-
Notifications
You must be signed in to change notification settings - Fork 10
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
Cannot build signed packages with alternative GNUPGHOME #29
Comments
Does running |
It does. And I would expect it to because |
Ok, this does sound like something that should have a decent workaround. A root timer running commands as a user a bunch maybe isn't very common. So I'm not sure if there are standard ways to do this. Perhaps if we had a Otherwise I'm open to suggestions. |
I think there's a way to have it not be a root timer; the whole thing could just run as a user, IIRC. Something like: % sudo systemctl enable [email protected] Then the unit file uses That direction sounds more The Right Way to me, but 🤷♂️ .
I would consider a super narrow fix: echo "Running: aur sync --no-view --no-confirm --database=aurto --makepkg- conf=/etc/aurto/makepkg-chroot.conf $chroot_arg --upgrades" >&2
sudo -u "$user" \
+ env GNUPGPHOME="$GNUPGPHOME" \
"$lib_dir"/summerize-build \
aur sync --no-view --no-confirm --database=aurto \
--makepkg-conf=/etc/aurto/makepkg-chroot.conf $chroot_arg --upgrades I think it's reasonable to expect the end user to know (or figure out, maybe through docs or some FAQ around here) that they need to deal with the systemd-level concern, so I don't mind that a fix here still requires a unit drop-in to ensure the correct At that point, what you've done is an explicit It's attractive to make the list of env to preserve configurable, but I'd hesitate there. It's possible |
I guess I'm more interested in configurable env vars in general rather than just this one. One workaround for your case, could you import aur keys additionally into the default gpg home? I would like to have aurto running more as the user, I think some config can move into |
Yeah, I hear you. I was just saying that (FWIW, IMHO) seems like YAGNI to me.
I will probably end up there, yeah. The whole point of setting
Yeah, I would definitely pursue this option if I were you; the current approach feels fraught with unknown edge-cases just waiting to crop up. Would it be weird to have installation of It could be done pretty smoothly, IMO, with a |
Yes it would be interesting to see how far we can get with I'm not totally comfortable with the |
You should take some care with |
aurto output always suggests to install packages with |
This has caused problems in the past, now it's trouble with [aurto](aurto). I'm tired of fighting these sorts of problems, I'll just deal with the messiness of an extra dotfile under ~. [aurto]: alexheretic/aurto#29
The
update-aurto
service is not able to find PGP keys for building signed AUR packages:I'm 99% certain this is because I use an alternate
GNUPGPHOME
.I should be able to make this available to the service, by:
But this does not work.
I believe it comes down to how you invoke
sudo
, e.g.:Without
--preserve-env
/-E
,sudo
will not pass thatGNUPGHOME
on to the invoked command, so it won't be able to find my keys.I'm not sure the best way to fix this, since my initial attempt at just adding
-E
lead to other issues with other environment variables.The text was updated successfully, but these errors were encountered: