LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 832

Rep: Reputation: 167Reputation: 167
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: 464

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

Original Poster
Rep: Reputation: 167Reputation: 167
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: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

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

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
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 832

Original Poster
Rep: Reputation: 167Reputation: 167
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!
 
Old 01-08-2013, 05:33 AM   #7
McZ
Member
 
Registered: Aug 2012
Posts: 42

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!
 
Old 01-08-2013, 06:11 AM   #8
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 832

Original Poster
Rep: Reputation: 167Reputation: 167
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!
 
Old 08-28-2013, 10:47 AM   #9
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 832

Original Poster
Rep: Reputation: 167Reputation: 167
I have just updated the package manager if any one is interested!
http://keithhedger.hostingsiteforfre...-0.1.14.tar.gz
 
  


Reply

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


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
[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/Novell 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


All times are GMT -5. The time now is 04:53 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration