You are not logged in.

#1 2010-04-03 11:50:23

dcc24
Member
Registered: 2009-10-31
Posts: 737

Package needs access to home directory

I'm trying to package something which has a build script that requires access to the user's home directory. This is not my choice, the upstream script is coded that way.

Since makepkg works in a fakeroot environment, build fails with something like:

Specified destination directory cannot be created: /root/some/thing/

Any ideas how to resolve this?


It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt. (Mark Twain)

My AUR packages

Offline

#2 2010-04-03 12:01:31

jurkan
Member
From: Germany
Registered: 2010-04-03
Posts: 23

Re: Package needs access to home directory

Quick and dirty: Creating /root in $pkgdir before compiling/installing. You can remove it after the make install or better copy the contents of the created folder over to /usr/share/$pkgname and create a .install-skript that informs the user to copy over the needed configuration files in his home.

Something like this:

mkdir $pkgdir/root
make || return 1
make install || return 1
mkdir -p $pkgdir/usr/share/$pkdir
mv $pkgdir/root/.whatever/ $pkgdir/usr/share/$pkgdir/
rm -R $pkgdir/root/

But I don't know whether this is the best solution.

Last edited by jurkan (2010-04-03 12:03:41)

Offline

#3 2010-04-03 12:05:19

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: Package needs access to home directory

dcc24 wrote:

I'm trying to package something which has a build script that requires access to the user's home directory. This is not my choice, the upstream script is coded that way.

Since makepkg works in a fakeroot environment, build fails with something like:

Specified destination directory cannot be created: /root/some/thing/

Any ideas how to resolve this?

Could you give us the url to the script so that we can find a workaround ? smile

Offline

#4 2010-04-03 12:07:25

dcc24
Member
Registered: 2009-10-31
Posts: 737

Re: Package needs access to home directory

@jurkan: As a last resort, that could be used but I'd really prefer a cleaner alternative. Thanks anyway smile

@flamelab: Well, of course smile

Deps: libvorbis vorbis-tools mercurial lame maven

http://code.google.com/p/quake2-gwt-por … AndRunning

Also note that if I follow those directions myself (i.e. not with makepkg) it works perfectly fine.

Last edited by dcc24 (2010-04-03 12:08:51)


It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt. (Mark Twain)

My AUR packages

Offline

#5 2010-04-03 12:12:29

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: Package needs access to home directory

I see. You can translate the scripts' code into PKGBUILD's bash code in the build() function, instead of running them directly.

For example, "build-dedicated-server" --> instead of running (for example) --> cd $srcdir/quake2-gwt-port/ && ./build-dedicated-server
do

cd $srcdir/quake2-gwt-port/maven-build
./mvn clean install

(the code and paths should be different, I just give an example).

Offline

#6 2010-04-03 14:07:33

dcc24
Member
Registered: 2009-10-31
Posts: 737

Re: Package needs access to home directory

Unfortunately that doesn't work. The error seems to be in some deeper place. If only people knew better not to hardcode paths into their scripts.


It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt. (Mark Twain)

My AUR packages

Offline

Board footer

Powered by FluxBB