You are not logged in.
Hi,
When building a package with makepkg, if the build process uses either ssh (for cvs access) or doxygen, the build fails because these programs try to create config files in /root . Apparently, the problem comes from fakeroot : doxygen thinks he is running as root and tries to create the config files in /root. Has anyone had this problem before? Any solutions?
Thanks a lot!
Autojump, the fastest way to navigate your filesystem from the command line!
Offline
try
export HOME=$startdir/src/.root
at the top of build()
Offline
Consider the following dummy pkg:
pkgname=dummy
pkgver=0.1.1
pkgrel=1
pkgdesc="A dummy package"
arch=('i686' 'x86_64')
url="http://shit.com"
license=('BSD')
depends=()
source=()
md5sums=()
build() {
echo "$(whoami) ${USER}"
echo "${HOME}"
echo "${UID} $(grep root /etc/passwd)"
}
It produce the following output when running makepkg:
==> Making package: dummy 0.1.1-1 (Wed Jul 16 11:28:49 PDT 2008)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==> Validating source files with md5sums...
==> Extracting Sources...
==> Removing existing pkg/ directory...
==> Entering fakeroot environment...
==> Starting build()...
root pierre
/home/pierre
0 root:x:0:0:root:/root:/bin/bash
==> Tidying install...
-> Removing info/doc files...
-> Compressing man pages...
-> Stripping debugging symbols from binaries and libraries...
==> Creating package...
-> Generating .PKGINFO file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: dummy (Wed Jul 16 11:28:50 PDT 2008)
As you can see user environnement variables are still in the scope. So redefining variables is useless when programs get home directory path from libc.
fakeroot change you uid to match the root one and hook the standard library. Using strace you can see this inconscistency:
$HOME links to the user home
libc links to the root home
fakeroot must have a way of changing home directory for the fake root because this problem is recurrent when using program that need to write/read config from home directory.
i didn't manage to find this options...
Anybody has an idea to do that?
Offline
Thank you for yor dummy package. It is very interesting.
fakeroot must have a way of changing home directory for the fake root because this problem is recurrent when using program that need to write/read config from home directory.
i didn't manage to find this options...
Sorry, but I do not agree. I cannot imagine a situation in which a package should alter or even read a user's directory, even if the user is root.
lardon, what is wrong with tardo's solution? Does it help to create that directory?
Offline