LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 03-25-2020, 04:36 PM   #1
budrz89
Member
 
Registered: Apr 2017
Distribution: LFS/Slackware
Posts: 99

Rep: Reputation: Disabled
Unhappy Using pacman as the package manager


Hi,

I was debating on which package manager to use for my LFS build. I used Slackware's package manager successfully but I couldn't get Arch Linux's Pacman to work. I followed this guide for Pacman on LFS 8.1 (modified it for LFS version 9.0) but as it was mentioned in the guide "... many binaries and other files were owned by ben," which is where I also got stuck on. It was fixed by manually changing owner on those files mentioned but I don't want to be doing this every time I build and install a package.

Any suggestions on how to fix this problem of having the incorrect owner on the libraries, binaries, etc.? I tried searching for a reason why pacman was doing this but I couldn't find a good answer (perhaps I'm only a white belt in Google-fu).
 
Old 03-26-2020, 07:46 AM   #2
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
There are quite a few projects on github where pacman has been added to LFS.
A google search gives me at least 7 projects.
For example this one: https://github.com/EastAPOLO/lfs-pacman
And even after you completed LFS you can try this: https://github.com/uditkarode/lfspacman

In my opinion most existing package managers are too tightly intergrated for the specific distro.
Slackware's pkgtools are so simple they can be used anywhere, next one in line is pkgutils from CRUX.

What is your goal exactly?
 
Old 03-26-2020, 06:34 PM   #3
budrz89
Member
 
Registered: Apr 2017
Distribution: LFS/Slackware
Posts: 99

Original Poster
Rep: Reputation: Disabled
I know that there are several projects out there with pacman on LFS, but some of them are either
automated and/or using systemd.

My goal is to build LFS manually with System V and having pacman as it's package manager. The
closest one to the idea that I had in mind is the project that I've mentioned but there are some
hiccups in the end, as stated in the link that you've provided: https://github.com/EastAPOLO/lfs-pacman

I'm trying to understand why those problems occur towards the end in finishing up LFS using pacman. It
seems that it shouldn't matter which package manager you use but you seem to be saying that each package
manager is somehow closely tied with it's distro. I don't understand how that is the case. I mean, it's
not like a package manager somehow "knows" distribution you're using, is it?

Could you explain why and how they are tightly integrated?
 
Old 03-27-2020, 04:44 AM   #4
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
A few things make pacman not that ideal for LFS.
Pacman does not allow root to build packages without tricks. Pacman assumes a filesystem hierarchy as used by arch linux which differs from lfs.

And if you are going to use pacman and the existing repos from archlinux, you will end up with arch linux.
 
1 members found this post helpful.
Old 03-27-2020, 07:35 AM   #5
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,102
Blog Entries: 6

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Quote:
And if you are going to use pacman and the existing repos from archlinux, you will end up with arch linux.
And you will have to be systemd for the software to work.

https://www.archlinux.org/packages/core/x86_64/pacman/
https://www.archlinux.org/pacman/
https://git.archlinux.org/svntogit/p...ackages/pacman
https://sources.archlinux.org/other/pacman/
 
1 members found this post helpful.
Old 03-27-2020, 10:13 AM   #6
budrz89
Member
 
Registered: Apr 2017
Distribution: LFS/Slackware
Posts: 99

Original Poster
Rep: Reputation: Disabled
Quote:
Pacman does not allow root to build packages without tricks. Pacman assumes a filesystem hierarchy as used by arch linux which differs from lfs.
OK, that makes sense.

Quote:
Quote:
And if you are going to use pacman and the existing repos from archlinux, you will end up with arch linux.
And you will have to be systemd for the software to work.
Seems like Artix Linux is what I'm thinking of or would end up building anyway, even if I could get past those problems. Never used it before but I guess it could be another project.

As for building LFS, I should look into pkgutils from CRUX. I'm curious to see how to integrate that into LFS.

Thanks for your suggestions/info!

Last edited by budrz89; 03-27-2020 at 10:29 AM. Reason: Add in the other quote for context
 
Old 04-03-2020, 12:22 PM   #7
basica
Member
 
Registered: Nov 2011
Location: Australia
Distribution: Arch, LFS
Posts: 171

Rep: Reputation: 38
Quote:
Originally Posted by budrz89 View Post
It was fixed by manually changing owner on those files mentioned but I don't want to be doing this every time I build and install a package.

Any suggestions on how to fix this problem of having the incorrect owner on the libraries, binaries, etc.? I tried searching for a reason why pacman was doing this but I couldn't find a good answer (perhaps I'm only a white belt in Google-fu).
That was while they're were in chapter 6 and building packages under that user. Presumably once they booted into their LFS system it wasn't an issue. You can't run makepkg as root which is why the user was created in the first place. I've used pacman with my LFS install a bunch of times without the issue that person encountered.
 
Old 04-06-2020, 09:56 PM   #8
budrz89
Member
 
Registered: Apr 2017
Distribution: LFS/Slackware
Posts: 99

Original Poster
Rep: Reputation: Disabled
@basica Ok, I will keep that in mind and try it again.
 
Old 04-12-2020, 11:05 PM   #9
budrz89
Member
 
Registered: Apr 2017
Distribution: LFS/Slackware
Posts: 99

Original Poster
Rep: Reputation: Disabled
Question

I just finished chapter 6 and I checked the ownership of all of the files. I wrote a script (which I think works) that checks this:

Code:
#!/bin/bash -e

cwd=$(pwd)
rm -f $cwd/file-list

pushd /

filelist=$(find ./ -user bob -group users -type f -name "*" ! -path "./home*" ! -path "./dev*" ! -path "./sys*" ! -path "./sources*" ! -path "./run" ! -path "./tmp*" ! -path "./svn*")

for f in ${filelist[@]}; do 
	ls -lah $f >> $cwd/file-list
done

popd
Most notably are some of the files that seem to not have the correct permissions (like in /usr/bin):

Code:
# grep "\-rw\-\-\-\-\-\-\-" file-list 
-rw------- 1 bob users 2.9K Apr 12 21:31 ./etc/pacman.conf
-rw------- 1 bob users 2.9K Apr 12 20:04 ./etc/pacman.conf.pacsave
-rw------- 1 bob users 5.6K Apr 12 20:42 ./etc/makepkg.conf
-rw------- 1 bob users 320 Apr 12 20:42 ./usr/lib/pkgconfig/libalpm.pc
-rw------- 1 bob users 953 Apr 12 19:12 ./usr/lib/libfakeroot/libfakeroot.la
-rw------- 1 bob users 946 Apr 12 20:42 ./usr/lib/libalpm.la
-rw------- 1 bob users 8.7K Apr 12 21:51 ./usr/lib/ldscripts/elf_l1om.xdwe
-rw------- 1 bob users 8.1K Apr 12 21:51 ./usr/lib/ldscripts/elf_iamcu.xdwe
-rw------- 1 bob users 8.4K Apr 12 21:51 ./usr/lib/ldscripts/elf_iamcu.xde
-rw------- 1 bob users 8.9K Apr 12 21:51 ./usr/lib/ldscripts/elf32_x86_64.xdwe
-rw------- 1 bob users 8.9K Apr 12 21:51 ./usr/lib/ldscripts/elf32_x86_64.xbn
-rw------- 1 bob users 8.9K Apr 12 21:51 ./usr/lib/ldscripts/elf_x86_64.xdwe
-rw------- 1 bob users 9.0K Apr 12 21:51 ./usr/lib/ldscripts/elf_x86_64.xwe
-rw------- 1 bob users 8.2K Apr 12 21:51 ./usr/lib/ldscripts/elf_iamcu.xwe
-rw------- 1 bob users 8.1K Apr 12 21:51 ./usr/lib/ldscripts/elf_i386.xsce
-rw------- 1 bob users 8.3K Apr 12 21:51 ./usr/lib/ldscripts/elf32_x86_64.xsw
....
-rw------- 1 bob users 8.9K Apr 11 16:20 ./usr/bin/updatedb
-rw------- 1 bob users 3.8K Apr 12 19:12 ./usr/bin/fakeroot
-rw------- 1 bob users 6.8K Apr 12 20:42 ./usr/bin/pacman-db-upgrade
-rw------- 2 bob users 1.4M Apr 12 21:51 ./usr/bin/ld
-rw------- 2 bob users 1.4M Apr 12 21:51 ./usr/bin/ld.bfd
-rw------- 1 bob users 20K Apr 12 20:42 ./usr/bin/pacman-key
-rw------- 1 bob users 19K Apr 12 20:42 ./usr/bin/repo-add
-rw------- 1 bob users 41K Apr 12 20:42 ./usr/bin/makepkg
-rw------- 1 bob users 6.4K Apr 12 20:42 ./usr/bin/makepkg-template
-rw------- 1 bob users 15K Apr 11 15:54 ./usr/bin/checkmk
-rw------- 1 bob users 151 Apr 12 20:42 ./usr/share/pkgconfig/libmakepkg.pc
-rw------- 1 bob users 5.1K Apr 12 20:42 ./usr/share/bash-completion/completions/pacman
-rw------- 1 bob users 521 Apr 12 19:12 ./usr/share/doc/fakeroot/README
-rw------- 1 bob users 875 Apr 11 15:06 ./usr/share/man/man8/chroot.8.gz
-rw------- 1 bob users 3.5K Apr 12 20:42 ./usr/share/makepkg/srcinfo.sh
...
-rw------- 1 bob users 1.4K Apr 12 20:42 ./usr/share/makepkg/lint_package/file_names.sh
-rw------- 1 bob users 1.3K Apr 12 20:42 ./usr/share/makepkg/lint_package/missing_backup.sh
-rw------- 1 bob users 1.4K Apr 12 20:42 ./usr/share/makepkg/lint_package/build_references.sh
-rw------- 1 bob users 1.3K Apr 12 20:42 ./usr/share/makepkg/executable/sudo.sh
-rw------- 1 bob users 1.3K Apr 12 20:42 ./usr/share/makepkg/executable/gzip.sh
-rw------- 1 bob users 1.3K Apr 12 20:42 ./usr/share/makepkg/executable/strip.sh
-rw------- 1 bob users 1.3K Apr 12 20:42 ./usr/share/makepkg/executable/distcc.sh
-rw------- 1 bob users 1.4K Apr 12 20:42 ./usr/share/makepkg/executable/checksum.sh
-rw------- 1 bob users 1.3K Apr 12 20:42 ./usr/share/makepkg/executable/ccache.sh
-rw------- 1 bob users 1.2K Apr 12 20:42 ./usr/share/makepkg/executable/fakeroot.sh
-rw------- 1 bob users 1.3K Apr 12 20:42 ./usr/share/makepkg/executable/pacman.sh
-rw------- 1 bob users 2.9K Apr 12 20:42 ./usr/share/makepkg/executable/vcs.sh
-rw------- 1 bob users 1.5K Apr 12 20:42 ./usr/share/makepkg/executable/gpg.sh
-rw------- 1 bob users 1.9K Apr 12 20:42 ./usr/share/makepkg/tidy/zipman.sh
-rw------- 1 bob users 1.4K Apr 12 20:42 ./usr/share/makepkg/tidy/staticlibs.sh
-rw------- 1 bob users 4.0K Apr 12 20:42 ./usr/share/makepkg/tidy/strip.sh
-rw------- 1 bob users 1.4K Apr 12 20:42 ./usr/share/makepkg/tidy/emptydirs.sh
-rw------- 1 bob users 1.3K Apr 12 20:42 ./usr/share/makepkg/tidy/libtool.sh
-rw------- 1 bob users 1.2K Apr 12 20:42 ./usr/share/makepkg/tidy/docs.sh
-rw------- 1 bob users 1.4K Apr 12 20:42 ./usr/share/makepkg/tidy/purge.sh
-rw------- 1 bob users 1.5K Apr 12 20:42 ./usr/share/makepkg/integrity.sh
-rw------- 1 bob users 2.7K Apr 12 20:42 ./usr/share/makepkg/source/svn.sh
-rw------- 1 bob users 1.4K Apr 12 20:42 ./usr/share/makepkg/source/local.sh
-rw------- 1 bob users 3.8K Apr 12 20:42 ./usr/share/makepkg/source/file.sh
-rw------- 1 bob users 3.2K Apr 12 20:42 ./usr/share/makepkg/source/bzr.sh
...
-rw------- 1 bob users 11K Apr 12 21:51 ./usr/share/locale/hu/LC_MESSAGES/gprof.mo
-rw------- 1 bob users 42K Apr 12 20:42 ./usr/share/locale/hu/LC_MESSAGES/pacman-scripts.mo
-rw------- 1 bob users 37K Apr 12 20:42 ./usr/share/locale/hu/LC_MESSAGES/pacman.mo
-rw------- 1 bob users 20K Apr 12 20:42 ./usr/share/locale/hu/LC_MESSAGES/libalpm.mo
-rw------- 1 bob users 11K Apr 12 21:51 ./usr/share/locale/ms/LC_MESSAGES/gprof.mo
-rw------- 1 bob users 37K Apr 12 20:42 ./usr/share/locale/eu_ES/LC_MESSAGES/pacman-scripts.mo
-rw------- 1 bob users 30K Apr 12 20:42 ./usr/share/locale/eu_ES/LC_MESSAGES/pacman.mo
-rw------- 1 bob users 16K Apr 12 20:42 ./usr/share/locale/eu_ES/LC_MESSAGES/libalpm.mo
-rw------- 1 bob users 55K Apr 12 21:51 ./usr/share/locale/id/LC_MESSAGES/ld.mo
-rw------- 1 bob users 11K Apr 12 21:51 ./usr/share/locale/id/LC_MESSAGES/gprof.mo
-rw------- 1 bob users 48K Apr 12 21:51 ./usr/share/locale/id/LC_MESSAGES/gold.mo
-rw------- 1 bob users 409K Apr 12 21:51 ./usr/share/locale/id/LC_MESSAGES/gas.mo
-rw------- 1 bob users 141K Apr 12 21:51 ./usr/share/locale/id/LC_MESSAGES/bfd.mo
-rw------- 1 bob users 36K Apr 12 20:42 ./usr/share/locale/id/LC_MESSAGES/pacman-scripts.mo
-rw------- 1 bob users 28K Apr 12 20:42 ./usr/share/locale/id/LC_MESSAGES/pacman.mo
-rw------- 1 bob users 16K Apr 12 20:42 ./usr/share/locale/id/LC_MESSAGES/libalpm.mo
-rw------- 1 bob users 30K Apr 12 21:51 ./usr/share/locale/id/LC_MESSAGES/opcodes.mo
-rw------- 1 bob users 150K Apr 12 21:51 ./usr/share/locale/id/LC_MESSAGES/binutils.mo
-rw------- 1 bob users 30K Apr 12 20:42 ./usr/share/locale/ast/LC_MESSAGES/pacman.mo
-rw------- 1 bob users 16K Apr 12 20:42 ./usr/share/locale/ast/LC_MESSAGES/libalpm.mo
-rw------- 1 bob users 57K Apr 12 21:51 ./usr/share/locale/it/LC_MESSAGES/ld.mo
....
-rw------- 1 bob users 14K Apr 12 21:51 ./usr/include/ansidecl.h
-rw------- 1 bob users 52K Apr 12 20:42 ./usr/include/alpm.h
-rw------- 1 bob users 2.2K Apr 12 21:51 ./usr/include/symcat.h
-rw------- 1 bob users 3.3K Apr 12 21:51 ./usr/include/diagnostics.h
-rw------- 1 bob users 17K Apr 12 21:51 ./usr/include/dis-asm.h
-rw------- 1 bob users 15K Apr 12 21:51 ./usr/include/plugin-api.h
-rw------- 1 bob users 35K Apr 12 21:51 ./usr/include/bfdlink.h
-rw------- 1 bob users 25K Apr 12 21:51 ./usr/include/ctf.h
I'm at a loss. Is there any hope in fixing this? You think that if I place the correct permissions and ownerships that the problem would go away once I boot into it?

Alternatively, I was thinking of installing with pacman and then installing the "crude" way (e.g. ./configure && make && make install), but this seems cumbersome.

I wonder if instead the way the instructions on github (or linuxfromscratch hints) in creating the user ben (I called it bob), if just creating a regular user using useradd would solve this issue. In other words, I wonder if it's because it's in the way this user is being created, unless I'm not understanding something.

Last edited by budrz89; 04-12-2020 at 11:35 PM.
 
  


Reply

Tags
lfs, ownership, package management, pacman


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Deb-pacman : A Pacman-style Frontend For APT Package Manager LXer Syndicated Linux News 1 12-09-2019 05:21 PM
Why do we need pacman-key if pacman checks md5? Mr. Alex Arch 5 03-09-2012 05:05 PM
Anyone else 'pacman -Sy' instead of simply 'pacman -S'-ing packages? Kenny_Strawn Arch 15 03-23-2011 01:09 PM
Which package manager do you like more, TXZ or Pacman? Amdx2_x64 Linux - Distributions 9 12-25-2010 01:41 AM
[SOLVED] Strange things happening with pacman package manager MTK358 Linux - General 9 02-11-2010 06:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration