LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   fakeroot problem (http://www.linuxquestions.org/questions/linux-software-2/fakeroot-problem-302373/)

finrod_2002 03-16-2005 02:40 PM

fakeroot problem
 
Hi,
I have debian/sarge installed with debootstrap.
I tried to build a Java Package with the command:

# make-jpkg <java-package-name>

and I got the following error:

You are real root -- unfortunately, some Java distributions have
install scripts that directly manipulate /etc, and may cause some
inconsistencies on your system. Instead, you should become a
non-root user and run:

fakeroot make-jpkg jre-1_5_0_02-linux-i586.bin

which will allow no damage to be done to your system files and
still permit the Java distribution to successfully extract.

Aborting...


I tried as normal user using fakeroot and also sudo and I got the same error.

Everybody on the Internet says that to install javapackages you only need fakeroot, but on my system fakeroot doesn't work.

finrod_2002 03-16-2005 04:05 PM

Actually, I think the problem is not in the fakeroot, but in the make-jpkg script:


if touch /lib/.test 2>/dev/null; then
rm -f /lib/.test
echo "You are real root -- unfortunately, some Java distribution s have" >&2
echo "install scripts that directly manipulate /etc, and may cau se some" >&2
echo "inconsistencies on your system. Instead, you should become a" >&2
echo "non-root user and run:" >&2
echo >&2
echo "fakeroot make-jpkg $@" >&2
echo >&2
echo "which will allow no damage to be done to your system files and" >&2
echo "still permit the Java distribution to successfully extract ." >&2
echo >&2
echo "Aborting." >&2
exit 1
fi

The following commands run in my system without errors:

fakeroot touch /lib/.test
fakeroot rm /lib/.test

I'm sorry, but I'm not so expert in using fakeroot, is it normal that you can run those
commands without errors?

finrod_2002 03-16-2005 04:23 PM

I've solved the problem:

I had the following /lib permissions, I don't know why:

drwxrwxrwx 4 root root 4096 Mar 16 21:21 lib

Of course, with these permissions everyone can write in the /lib directory.

I changed them to:

drwxr-xr-x 4 root root 4096 Mar 16 22:10 lib

Only root can write in /lib know.


and

fakeroot make-jpkg <java-name>

works, because the test fails:

if touch /lib/.test 2>/dev/null; then
rm -f /lib/.test

He can't create the .test file anymore, because know only
root can do that.


All times are GMT -5. The time now is 07:25 PM.