LinuxQuestions.org
Visit Jeremy's Blog.
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 04-15-2014, 06:17 AM   #1
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Rep: Reputation: 195Reputation: 195
When it is the right time to try to implement a package manager?


I want to use one for all packages, including the core. So I am assuming it is after this step? http://www.linuxfromscratch.org/lfs/...adjusting.html

I am assuming that at this point I am able to install the package manager's depedencies and then build/manage chapter 6

EDIT: Or would it be after GCC is ready?http://www.linuxfromscratch.org/lfs/...ter06/gcc.html

Last edited by moisespedro; 04-15-2014 at 06:41 AM.
 
Old 04-15-2014, 06:44 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,129

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
Beginning of chapter six right after building the tool chain and before starting to build the basic system, is where I do it.
 
Old 04-15-2014, 06:58 AM   #3
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
So right after this step?http://www.linuxfromscratch.org/lfs/...adjusting.html I would then install zlib, xz and libarchive (for pkgutils - my package manager of choice)
 
Old 04-15-2014, 07:18 AM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,129

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
NO after building the tool chain and stripping and then taring up the tool chain in case something goes wrong, at the START of chapter 6 here:
http://www.linuxfromscratch.org/lfs/...ble/part3.html
 
Old 04-15-2014, 07:30 AM   #5
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
So, will adding the missing dependencies at that point work?
 
Old 04-15-2014, 07:42 AM   #6
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,129

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
No sorry, you will have to wait until later on in the build if you want to use a package manager that needs a lot of deps, just had a look at the deps for libarchive, you will need to install quite a few before you can install it.

You can either wait until the basic system is installed or find a binary version of the package manager you want to install ( and the dependencies).

This is one of the problems of using a package manager you often need a lot of stuff installed before you can run it, its a bit of a chicken and egg problem.

You could try a simpler script based package manager, which would only need bash/tar for instance which is available from the tools.

In some ways it might be best to think of the basic system as one 'meta' package and don't update bits of it, just redo the whole basic system when needed.
 
Old 04-15-2014, 07:50 AM   #7
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
It just requires libarchive, xz and zlib. Maybe it works? And I thought about that like using it just for the BLFS packages bit I'd rather use it for everything.
 
Old 04-15-2014, 07:53 AM   #8
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,129

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
You may find that the dependencies although optional for libarchive in the BLFS book if not installed will cause you some problems if they are not installed, suck it and see
 
Old 04-15-2014, 07:59 AM   #9
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
Is it posible to build a single package on another system with the pkg manager and all its dependencies? Idk the name of this and idk how to explain but I am thinking about somethin like what happens with ffmpeg, where you can either have all its dependencies separatadely or have them all built in on a single ffmpeg package.

Last edited by moisespedro; 04-15-2014 at 08:01 AM.
 
Old 04-15-2014, 08:09 AM   #10
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,129

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
Quote:
Originally Posted by moisespedro View Post
Is it posible to build a single package on another system with the pkg manager and all its dependencies?...
That's a bit like asking "how long is a piece of string?", it would depend on the package manager, the package you are building, and the system, probably yes but maybe no, it would I suppose depend on the libs it was linked to on the build system and the libs installed in the target system, if for instance it is linked to libA version 3.0 and on the target system you have libA version 1.0 you will probably have difficulties.
 
Old 04-15-2014, 08:11 AM   #11
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
Well, gonna try when I get home. If nothing works I am gonna keep the core ubtouched and use the package manager just for BLFS and stuff like that
 
Old 04-15-2014, 12:54 PM   #12
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
I failed
 
Old 04-15-2014, 04:54 PM   #13
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Don't worry about an add-in package manager. In fact Make itself is an excellent package manager in it's own right as are shell scripts.

When I start chapter 6, usually I start backing up my sources using

Code:
make clean
This way, if and when I need to rebuild or reinstall a package all I have to do is run:

Code:
make uninstall
./configure --<options>
make -jX
make install
Along with any other extra mv, cp, etc. commands.

If a file is moved around for the install, I usually will copy the cp commands and re-edit them in a shell script to delete them using the rm command.

Make really is the best package manager truthfully for LFS due to it's design.

As for x11, I actually still utilize the Alan Coopersmith of Sun/Oracle's method:

Quote:
"At Sun, we were using /usr/X11 and plan to stick with it."
There's also the Fakeroot methodology as well that's officially hinted at by the book. I would learn how to use Fakeroot first before you attempt anything like pkgtools, pacman, etc.
 
Old 04-15-2014, 05:12 PM   #14
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
I got some help on #lfs-support and I managed to install pkgutils before chapter 6, I am writing the Pkgfiles (they are like this) and as we speak I am here packaging GCC with pkgutils, everything is going fine so far (a lot of trial and error but still). Reaper, the idea of using just Make is bad imo, I am too disorganized and a package manager like pkgutils or pkgtool is perfect for me.
 
Old 04-17-2014, 04:02 AM   #15
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Adding in a package manager is good but take care with scripting especially with post-install scripts.

BLFS did specifically warn against certain installation practices such as a package manager in which some files can't be installed or generated without a post-installation script to work.
 
  


Reply


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
Update Manager , Synaptic package manager & dpkg: warning error massage sa3paleasm Linux - Software 1 08-07-2013 04:45 PM
How do I implement memory manager get and put (My malloc() ) mysterious88 Programming 3 11-16-2010 09:45 AM
install using package manager fails every time ServalSoft Mandriva 3 06-20-2009 05:38 AM
Poll: Yast Package Manager vs. Smart Package Manager in 10.1 agentchange SUSE / openSUSE 6 06-02-2006 08:29 AM
Time Released Package Manager? IKar Linux - Software 2 01-28-2005 05:48 AM

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

All times are GMT -5. The time now is 02:10 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