FS#12653 - Issues with fakeroot again
Attached to Project:
Pacman
Opened by Gereon Schomber (IncredibleLaser) - Saturday, 03 January 2009, 15:41 GMT
Last edited by Dan McGee (toofishes) - Thursday, 16 April 2009, 04:02 GMT
Opened by Gereon Schomber (IncredibleLaser) - Saturday, 03 January 2009, 15:41 GMT
Last edited by Dan McGee (toofishes) - Thursday, 16 April 2009, 04:02 GMT
|
Details
Summary and Info:
After it wprked last time I checked, I'm having trouble with fakeroot again. When running a configure-skript in fakeroot (mplayer-svn is the troublemaker), I get segmentation faults. Same goes for building amarok2 (build still fails, but at a much later point because of a different error). My question is: would't it be smarter and more logical to run the whole build-process with makepkg as regular user and only create the final package (which would be makepkg --repackage) with fakeroot? It should work, as a user in fakeroot sees all his files belonging to root. However, some build scripts seem to do weird things when run as root without real root privileges. Or at least make this an optional switch in makepkg, as only few packages are concerned. |
This task depends upon
Closed by Dan McGee (toofishes)
Thursday, 16 April 2009, 04:02 GMT
Reason for closing: Upstream
Additional comments about closing: Upstream issue with libfakeroot+nvidia-libgl
Thursday, 16 April 2009, 04:02 GMT
Reason for closing: Upstream
Additional comments about closing: Upstream issue with libfakeroot+nvidia-libgl
The option to build as regular user and package using fakeroot is already coded and will be in pacman-3.3.
Checking for freetype >= 2.0.9 ... ./configure: line 94: 22119 Segmentation fault "$TMPEXE" >> "$TMPLOG" 2>&1
no
even though freetype is installed.
With !fakeroot in BUILDENV in my makepkg.conf, I get;
Checking for freetype >= 2.0.9 ... yes
Sorry to be bugging like this, but I think this has to be fixed in the makepkg script. If that is wrong, just tell me.
tmp_run() {
"$TMPEXE" >> "$TMPLOG" 2>&1
}
When replacing "$TMPEXE" >> "$TMPLOG" 2>&1 with : , the script runs fine (that's all my patch does).
tmp_run() {
echo $TMPEXE
echo $TMPLOG
"$TMPEXE" >> "$TMPLOG" 2>&1
}
And got:
Checking for freetype >= 2.0.9 ... /tmp/mplayer-conf-6164-29451
configure.log
yes
So it appears that the program /tmp/mplayer-conf-6164-29451 (the numbers will vary...) is causing this issue.
My immediate thought is what are the permissions on your /tmp directory (ls -ld /tmp)?
As described in Bug 12646 from IncredibleLaser this happens only with fakeroot, not as normal user with doing the same as from the PKGBUILD in the srcdir and not with "makepkg --asroot".
drwxrwxrwt 10 root root 4096 3. Jan 18:01 /tmp
makepkg
fakeroot makepkg --repackage --asroot -f
and I can build and install at least amarok2-svn without problems with a custom PKGBUILD (libmtp is needed), mplayer-svn was not tested. Files installed have the right ownership. My suggestion is to make building via makepkg as regular user the default. This is a feature request after all, and there could be hidden something fishy in the Makefile like creating a needed user, even though this results in an error.
$ grep tmpfs /etc/fstab
tmpfs /dev/shm tmpfs defaults,rw 0 0
$ ls -ld /tmp/
drwxrwxrwt 10 root root 4096 4. Jan 09:36 /tmp/
$ grep tmpfs /etc/fstab
none /dev/shm tmpfs defaults 0 0
fakeroot-ng uses PTRACE to fool programs root is running, whereis fakeroot uses LD_PRELOAD. Not sure which one of the two is technological superior, and I doubt makepkg can handle it as a drop in replacement.
This bug probably has to wait for pacman-3.3 to be release. Them makepkg will separate the building and packaging stages of package building and only use fakeroot for packaging.
FS#12592FS#13375for future information about fakeroot issues.