You are not logged in.

#1 2008-07-15 14:59:37

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Problems with ssh and doxygen in makepkg

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

#2 2008-07-15 16:16:41

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: Problems with ssh and doxygen in makepkg

try

export HOME=$startdir/src/.root

at the top of build()

Offline

#3 2008-07-16 11:03:14

ElCerdo
Member
Registered: 2008-07-16
Posts: 3

Re: Problems with ssh and doxygen in makepkg

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

#4 2008-07-26 16:56:13

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: Problems with ssh and doxygen in makepkg

Tardo's solution doesn't work, any ideas? el cerdo's post describes my problem more precisely.


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#5 2008-07-26 19:21:18

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Problems with ssh and doxygen in makepkg

Thank you for yor dummy package. It is very interesting.

ElCerdo wrote:

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

Board footer

Powered by FluxBB