LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 12-27-2012, 12:55 PM   #1
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Package Manager For LFS


Pretty soon after starting to build LFS/BLFS I realized I needed some sort of package manager to keep track of what had been installed and where and having come from slackware I was used to the slackpkg package manager so I decided to write my own - This is the result, just download the tarball from here:
http://keithhedger.hostingsiteforfre...g-0.1.9.tar.gz

Unpack it somewhere, cd into the unpacked folder and run the install script as root ie;
Code:
sudo ./LFSPkg.LFSBuild
If you use the template script when you want to update a package just place the new archive in the same folder as the script alter the version number in the script and run ( using wget for instance )
Code:
sudo ./wget.LFSBuild upgrade
The package will be rebuilt and you will be asked which package to upgrade.

A number of package scripts can be found here:
http://keithhedger.hostingsiteforfre...fspkg/packages
Download a single folder (alsa-lib for instance) with:
wget --recursive --no-host-directories --cut-dirs=2 -np --level=1 http://keithhedger.hostingsiteforfre...kages/alsa-lib

Just download the folder and its contents cd into it and run the build script.
These packages including scripts, patches and archives are supplied "AS IS" and you use them at your own risk.

A number of files/folders are used these are:
Installed with lfspkg:

/usr/bin/lfspkg - The main bash script.
/usr/share/LFSPkg/LFSFunctions - helper functions.
/usr/share/man/man1/lfspkg.1 - manpage.

~/.config/lfspkg.rc - Local config file, should contain only the following:

TMP=${TMP:-/tmp/LFS}
OUTPUT=${OUTPUT:-/path/to/store/packages}

Where TMP is the location for tempory files ( defaults to /tmp if not set )
OUTPUT is the location to save built packages ( defaults to /tmp if not set )

/var/lib/LFSPackages - Folder contains gziped lists containg package information.

EXAMPLES

Build and install a package from the current directory:
lfspkg -n "SomePackage" -p "6.6.6" -d "DEV" -b 34 -c

Build a package from the current directory and save to /some/other/tmp:
OUTPUT=/some/other/tmp lfspkg -n "SomePackage" -p "6.6.6" -m

Install a package:
lfspkg "/media/SkyNet/UpdatedPakckages/wget-1.14-1_NET_LFSPKG.tar.gz" -i

Create a template script based on an archive file name:
lfspkg -t wget-1.14.tar.gz

Find a file in an installed package:
lfspkg -f wget
...
wget Found in package: wget-1.14-2_NET_LFSPKG
At these locations:
./etc/wgetrc
./usr/share/man/man1/wget.1
./usr/share/locale/nl/LC_MESSAGES/wget.mo
...
./usr/share/info/wget.info
./usr/bin/wget
...

Find an installed package:
lfspkg wget

Matches for:wget
wget-1.14-1_NET_LFSPKG

Remove a package:
lfspkg -r wget

When removing a package or listing the contents of a package you will be asked to choose from a list of possible matches.
You must have admin priviliges to install or remove files but you do not need to be root to just build a package.

Have a look at the LSFBuild scripts and the man page for more info, hope some of you find this helpful, any suggestions etc please let me know.
 
Old 12-30-2012, 07:38 AM   #2
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
Maybe it's just me, but those links aren't working. Never have.
 
Old 12-30-2012, 08:57 AM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Must be you works fine in firefox and links
 
1 members found this post helpful.
Old 12-30-2012, 09:17 AM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Works for me
 
Old 01-08-2013, 02:19 AM   #5
McZ
Member
 
Registered: Aug 2012
Posts: 46

Rep: Reputation: Disabled
Quote:
Originally Posted by Keith Hedger View Post
...

Install a package:
lfspkg "/media/SkyNet/UpdatedPakckages/wget-1.14-1_NET_LFSPKG.tar.gz" -i
...
"My" network name! or maybe it is from Terminator

Anyway, the package manager looks nice. Very similar script as I once had, maybe because I was inspired by slackware tools But now I have changed all that into Makefiles like FreeBSD ports system and I call them Builds. Not really a package manager because I can only install the packages so far no un-install, altough they do create a tar.bz2 file for each package.
 
Old 01-08-2013, 03:49 AM   #6
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Glad you like it, it too was inspired by slackware! The ability to quickly install/uninstall when testing software was my main concern and also being able to search for a specific installed file.

I've also got "Blue Midget", "Deep Thought", "Tardis", "Stargate" etc I'm such a geek!
 
1 members found this post helpful.
Old 01-08-2013, 05:33 AM   #7
McZ
Member
 
Registered: Aug 2012
Posts: 46

Rep: Reputation: Disabled
Quote:
Originally Posted by Keith Hedger View Post
Glad you like it, it too was inspired by slackware! The ability to quickly install/uninstall when testing software was my main concern and also being able to search for a specific installed file.

I've also got "Blue Midget", "Deep Thought", "Tardis", "Stargate" etc I'm such a geek!
Yes, but very annoying. Because now I want to redo my repo and packaga manager again!
 
1 members found this post helpful.
Old 01-08-2013, 06:11 AM   #8
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by McZ View Post
Yes, but very annoying. Because now I want to redo my repo and packaga manager again!
Oh the joys of rolling your own!
 
1 members found this post helpful.
Old 08-28-2013, 10:47 AM   #9
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
I have just updated the package manager if any one is interested!
http://keithhedger.hostingsiteforfre...-0.1.14.tar.gz
 
1 members found this post helpful.
Old 08-03-2016, 07:14 PM   #10
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Please note the above links are out of date and you should use the git versions here:

https://github.com/KeithDHedger/LFSPkg
https://github.com/KeithDHedger/LFSPkgBuilds
 
1 members found this post helpful.
Old 09-12-2017, 08:38 AM   #11
challengersky
LQ Newbie
 
Registered: Sep 2017
Location: SoCal
Distribution: Linux from Scratch (Debian / Ubuntu)
Posts: 15

Rep: Reputation: Disabled
Question When to install LFSPkg during LFS build?

Hello,

After reading through the thread and the directions I'm still confused as to when to install and start using LFSPkg Manager?

I'm now at the beginning of Chapter 6 of the LFS book. Do I install LFSPkg now and use it to install every package in chapter 6? Or wait until the end, then install LFSPkg and use it only for the specified packages mentioned in the 'how-to' and 'README' files?

Thanks for the help.
 
Old 09-12-2017, 09:04 AM   #12
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Basically you can start using the package manager at any time from the beginning of chapter six, I use right from the start of the chapter, but you can start using it at any time, of course any packages installed manually outside of the package manager will not be available to the manager to update/remove etc.

Check the readme's from the git repo here:
https://github.com/KeithDHedger/LFSP...SScripts/HowTo

Last edited by Keith Hedger; 09-12-2017 at 09:07 AM.
 
1 members found this post helpful.
Old 08-16-2020, 01:47 PM   #13
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Just updated builds scripts and package manager to build a basic systemd OS, will be working on the systemd BLFS bits shortly.
 
  


Reply

Tags
lfs, lfspkg, package management, package manager, software



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
[SOLVED] Synaptic package manager won't open due to faulty package nine9nine Linux - Software 7 09-15-2011 07:30 PM
Adept package installer not working if not launched by package manager iqbala Ubuntu 3 11-29-2008 06:32 AM
Using the Slackware Package Manager in LFS? Seph64 Linux From Scratch 6 10-25-2007 11:16 AM
Poll: Yast Package Manager vs. Smart Package Manager in 10.1 agentchange SUSE / openSUSE 6 06-02-2006 08:29 AM
synaptic package manager forcing me to delete a broken package mbman Linux - Software 6 04-25-2006 09:30 AM

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

All times are GMT -5. The time now is 10:47 PM.

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