Installing libreoffice using fakeroot pkgmk yields incorrect ownership
by budrz89 from LinuxQuestions.org on (#56PH7)
Hi,
The LFS version that I'm running is 9.1, sysvinit, with the pkgutils manager. I'm trying to install libreoffice using
Code:fakeroot pkgmkbut I'm getting incorrect ownership in the .footprint
Code:...
-rw-r--r-- 0 user user 1852 Aug 7 20:20 opt/libreoffice-6.4.5.2/share/icons/hicolor/48x48/apps/libreoffice-math.svg
-rw-r--r-- 0 user user 1852 Aug 7 20:20 opt/libreoffice-6.4.5.2/share/icons/hicolor/48x48/apps/libreoffice-impress.svg
-rw-r--r-- 0 user user 1852 Aug 7 20:20 opt/libreoffice-6.4.5.2/share/icons/hicolor/48x48/apps/libreoffice-writer.svg
...Of course when I run as root (with patch file similar to the one done here https://crux.nu/ports/contrib/3.5/li...efile.in.patch ), I get the correct ownership.
Code:...
-rw-r--r-- 0 root root 1852 Aug 7 20:20 opt/libreoffice-6.4.5.2/share/icons/hicolor/48x48/apps/libreoffice-math.svg
-rw-r--r-- 0 root root 1852 Aug 7 20:20 opt/libreoffice-6.4.5.2/share/icons/hicolor/48x48/apps/libreoffice-impress.svg
-rw-r--r-- 0 root root 1852 Aug 7 20:20 opt/libreoffice-6.4.5.2/share/icons/hicolor/48x48/apps/libreoffice-writer.svg
...Attached is my Pkgfile (most of which I copied and pasted from the BLFS book) and makefile.in.patch (I had to put a ".txt" at the end because otherwise it wouldn't let me upload it so just ignore that). I've tried installing without the patch using
Code:su user -c <command>on all of the commands before the install command and I've tried using
Code:chown -Rv root:root $PKGat the end of the installation, but then I would get something like
Code:chown: Operation not permitted.which doesn't make sense since I'm using fakeroot. Is there some way to get the correct ownership on these files listed in .footprint?
BTW, I do realize that I need to fix the last if statement because I get incorrect linking, but I was thinking of putting that in a "post-install" script to be run after the installation.
Finally, I just wanted to also point out that I'm new to the pkgutils manager, so most of my Pkgfiles might be very simple. I'm still learning on the types of things that I can do in a Pkgfile script (e.g. for the most part, I know that 'build' function can be used and now I've learned that 'unpack_source' can also be used).
Attached Files


The LFS version that I'm running is 9.1, sysvinit, with the pkgutils manager. I'm trying to install libreoffice using
Code:fakeroot pkgmkbut I'm getting incorrect ownership in the .footprint
Code:...
-rw-r--r-- 0 user user 1852 Aug 7 20:20 opt/libreoffice-6.4.5.2/share/icons/hicolor/48x48/apps/libreoffice-math.svg
-rw-r--r-- 0 user user 1852 Aug 7 20:20 opt/libreoffice-6.4.5.2/share/icons/hicolor/48x48/apps/libreoffice-impress.svg
-rw-r--r-- 0 user user 1852 Aug 7 20:20 opt/libreoffice-6.4.5.2/share/icons/hicolor/48x48/apps/libreoffice-writer.svg
...Of course when I run as root (with patch file similar to the one done here https://crux.nu/ports/contrib/3.5/li...efile.in.patch ), I get the correct ownership.
Code:...
-rw-r--r-- 0 root root 1852 Aug 7 20:20 opt/libreoffice-6.4.5.2/share/icons/hicolor/48x48/apps/libreoffice-math.svg
-rw-r--r-- 0 root root 1852 Aug 7 20:20 opt/libreoffice-6.4.5.2/share/icons/hicolor/48x48/apps/libreoffice-impress.svg
-rw-r--r-- 0 root root 1852 Aug 7 20:20 opt/libreoffice-6.4.5.2/share/icons/hicolor/48x48/apps/libreoffice-writer.svg
...Attached is my Pkgfile (most of which I copied and pasted from the BLFS book) and makefile.in.patch (I had to put a ".txt" at the end because otherwise it wouldn't let me upload it so just ignore that). I've tried installing without the patch using
Code:su user -c <command>on all of the commands before the install command and I've tried using
Code:chown -Rv root:root $PKGat the end of the installation, but then I would get something like
Code:chown: Operation not permitted.which doesn't make sense since I'm using fakeroot. Is there some way to get the correct ownership on these files listed in .footprint?
BTW, I do realize that I need to fix the last if statement because I get incorrect linking, but I was thinking of putting that in a "post-install" script to be run after the installation.
Finally, I just wanted to also point out that I'm new to the pkgutils manager, so most of my Pkgfiles might be very simple. I'm still learning on the types of things that I can do in a Pkgfile script (e.g. for the most part, I know that 'build' function can be used and now I've learned that 'unpack_source' can also be used).
Attached Files
![]() | makefile.in.patch.txt (1.5 KB) |
![]() | Pkgfile.txt (12.5 KB) |