Hi,
Our sir told me to use the fake root for doing packages instead of getting logged in as root. But can any one guide me how to use fake root ?
How to use fake root to build packages
Re: How to use fake root to build packages
I just learned about this also from the other thread. I figured out how to use fakeroot by reading the man page (man fakeroot). Here's how I do it.
fakeroot slkbuild
If you don't use slkbuild, then just insert the build script file name instead.
You might also want to consider Shador's method
Rich
fakeroot slkbuild
If you don't use slkbuild, then just insert the build script file name instead.
You might also want to consider Shador's method
I just inserted this line my users ~.bashrc file.Shador wrote: I do:
alias build="fakeroot slkbuild -X"
Rich
Last edited by laprjns on 1. Jan 2010, 15:21, edited 1 time in total.
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
― George Orwell, 1984
- damNageHack
- Posts: 663
- Joined: 24. Sep 2009, 17:07
Re: How to use fake root to build packages
I am using a build script from zenwalk with handles with the binaries release of apache-ant.
fakeroot seemes not to work here with makepkg and other stuff ...
fakeroot seemes not to work here with makepkg and other stuff ...
$ fakeroot ./build-ant.sh
(...)
ln: Erzeuge symbolische Verknüpfung „./WHATSNEW“: Keine Berechtigung
cp: reguläre Datei „/tmp/package-ant/usr/src/ant-1.7.1/build-ant.sh“ kann nicht angelegt werden: Keine Berechtigung
./build-ant.sh: line 105: /tmp/package-ant/install/slack-desc: Keine Berechtigung
./build-ant.sh: line 131: /tmp/package-ant/install/doinst.sh: Keine Berechtigung
./build-ant.sh: line 151: makepkg: command not found

This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
Re: How to use fake root to build packages
This sounds like your user hadn't access to /tmp. Is that possible?damNageHack wrote:I am using a build script from zenwalk with handles with the binaries release of apache-ant.
fakeroot seemes not to work here with makepkg and other stuff ...
$ fakeroot ./build-ant.sh
(...)
ln: Erzeuge symbolische Verknüpfung „./WHATSNEW“: Keine Berechtigung
cp: reguläre Datei „/tmp/package-ant/usr/src/ant-1.7.1/build-ant.sh“ kann nicht angelegt werden: Keine Berechtigung
./build-ant.sh: line 105: /tmp/package-ant/install/slack-desc: Keine Berechtigung
./build-ant.sh: line 131: /tmp/package-ant/install/doinst.sh: Keine Berechtigung
./build-ant.sh: line 151: makepkg: command not found
The problem with makepkg is that many packagers just invoke 'makepkg' relying on PATH. But fakeroot doesn't touch PATH (i.e. it's still a user's PATH), so to make it work you just have to replace it with '/sbin/makepkg'
- damNageHack
- Posts: 663
- Joined: 24. Sep 2009, 17:07
Re: How to use fake root to build packages
Nope.Shador wrote: This sounds like your user hadn't access to /tmp. Is that possible?
$ ls -ld /tmp/
drwxrwxrwt 11 root root 420 2010-01-01 15:18 /tmp/
$ mount |grep tmp
tmpfs on /dev/shm type tmpfs (rw)
none on /tmp type tmpfs (rw)
Done. But /tmp problem still exists.Shador wrote:The problem with makepkg is that many packagers just invoke 'makepkg' relying on PATH. But fakeroot doesn't touch PATH (i.e. it's still a user's PATH), so to make it work you just have to replace it with '/sbin/makepkg'

This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
Re: How to use fake root to build packages
I don't know what the script is trying to do at those lines, but it definitely is some kind of permission problem.
touch /tmp/somefile works too?
touch /tmp/somefile works too?
- damNageHack
- Posts: 663
- Joined: 24. Sep 2009, 17:07
Re: How to use fake root to build packages
Code: Select all
fakeroot touch /tmp/bla

This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
- damNageHack
- Posts: 663
- Joined: 24. Sep 2009, 17:07
Re: How to use fake root to build packages
Yes. On the other machine, it works perfectly. So I assume a configuration problem caused by the user (me in this caseShador wrote:I don't know what the script is trying to do at those lines, but it definitely is some kind of permission problem.


This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
Re: How to use fake root to build packages
No problem.damNageHack wrote:Yes. On the other machine, it works perfectly. So I assume a configuration problem caused by the user (me in this caseShador wrote:I don't know what the script is trying to do at those lines, but it definitely is some kind of permission problem.).
