Closed suedi closed 9 years ago
@suedi So it builds as a regular user but not the aurbuild user (when running as root)... It seems to be creating ~/.terminfo/ during the build process but that should NOT be possible.
This is not specific to the AUR wrapper either, running makepkg manually creates the same directory, ignoring the fakeroot jail. I cannot even find where in the source code for st-pizz this is being called. What is going on?!
Okay figured out where it's creating those untracked files.
Makefile: Line 52
tic -s st.info
4 entries written to ~/.terminfo
From the tic manpage
First, you may override the system default by setting the variable TERMINFO in your shell environment to a valid (existing) directory name. Secondly, if tic cannot get access to /usr/share/terminfo or your TERMINFO directory, it looks for the directory $HOME/.terminfo; if that directory exists, the entry is placed there.
Still investigating
So, the Makefile provided for that program calls external commands directly, which is bad practice for exactly this reason.
Moreover, the fact that those files are able to be written to the user's home directory, points towards a possible bug in makepkg or fakeroot, which will require a follow-up inquiry.
In the meantime, I have left a comment for the AUR maintainer and here's a proper PKGBUILD that works as it should.
Thanks for speedy handling.
Tried your PKGBUILD and can confirm it is working.
So is there no known package that still require --asroot option of makepkg in your opinion?
Good job!
The AUR maintainer for st-pizz has fixed the PKGBUILD, so you will no longer need to use my patched version.
So, I filed a report with the pacman
developer mailing list. Apparently the behavior is a well known limitation for the all major package build environments and why it's important that maintainers are vigilant to check for untracked files.
In the future, apacman
will always build packages as the unprivileged aurbuild user. However, for now I'm closing this bug.
When building package st-pizz I get following error:
I solved it with applying patch from https://aur.archlinux.org/packages/makepkg-asroot/
and building the package by hand with "makepkg --asroot"
Maybe you have a better way of handling this?
comments?