-
-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to use system-wide packages due to missing permissions #1473
Comments
Any update on this issue? I tried to do something similar on the latest dub commit and got the same result. |
#1650 was supposed to solve the main issue, but unfortunately has become outdated and I need to find the time to adjust it properly. |
I've been toying around with the --cache=* and --tempbuild flags to see how viable is to package dub libraries and software using the latest commit of dub.
I want to build proper reproducible test cases for this things, but I will take my time doing that, for now I'll leave this here. |
Note that with the latest |
I built a test suite to show what I'm talking about here: https://github.com/grillo-delmal/dub-system-wide-lib-tests. (didn't use neither --cache nor --tempbuild options on them considering Geod24's comment) I ran the tests and got the following results: grillo-delmal/dub-system-wide-lib-tests#1
Is this expected? I am understanding correctly how this should work? |
I'm sorry my most recent comment was misleading. I mean with I had a quick look over the tests, but I think I need to sit down and have a proper look at it. I am hoping to do this next week, unless you can run them with dub master before that. EDIT: Thanks for the detailed tests! |
I know, my tests are running on the latest commit (1.30.0^53.git1330c9d7). I could build dub inside the container so it's easier to understand, but I already had that version packaged on a COPR repository, which was faster for me to use. |
I updated the container to download and build dub from the repo :), the results are the same |
Today I learned how to run my podman based test suite on the github workflow thingy :D I ran the tests on dub's latest commit (v1.31.0-beta.1-6-gdcbfcf24) and it still fails |
Great! I started to look into the issue yesterday. And with a clear head, your explanation makes it clear where the problem is. We probably shouldn't copy things for packages, just for the project. I was trying to refactor things so it's easier to express. |
Did some experiments during this week on the latest version, and apps depending on system libs living in a read-only space compile if you pass the --temp-build parameter. The main problem is that you have to rescue the resulting files from the temporary folder, which is kinda a roundabout way to deal with that... I still think that #2713 would be the ideal solution... but it's been stuck since last year... |
Hi!
I played around with the new system-wide dub packages (#838) feature recently, and unfortunately it doesn't seem to work right yet.
Dub tries to write into paths like
/usr/include/d/test-1.0/test/.dub/
, which of course fails because this global path is read-only.Ideally, dub would use a different temporary location for storing the build artifacts. Ideally, this would be in the .dub directory of the currently-built package, so we avoid writing to $HOME, or some other configurable location.
In other news, I am working on integrating the Meson build system with dub, so Meson can publish packages usable by dub (easy, just install them as packages into a system path and have Meson generate a dub.json) and use packages that exclusively use dub as well.
For that, I have dub commands run as build targets by ninja. I use commands like this:
dub build test -b plain -v -c test-static --root build-dir
I would expect dub to build the
test
package that is installed in/usr/include/d/test-1.0/test/
and output its build artifacts to thebuild-dir
directory, but that doesn't seem to be what happens here.Instead I get:
It would be pretty cool to pass dub a global package path in
/usr/include/d/<pkg>
, have it build the package and publish the result in a custom directory as well. That would avoid the permission error, and also make it easy to integrate dub as part of other build systems, by having it take care of building selected dependencies.Cheers,
Matthias
The text was updated successfully, but these errors were encountered: