It is currently Sun Nov 19, 2017 6:05 am

Package Creator and Manager in bash

All times are UTC - 6 hours

Post new topic Reply to topic  [ 4 posts ] 
Author Message
 PostPosted: Mon Sep 18, 2006 1:37 pm   

Joined: Mon Sep 18, 2006 1:16 pm
Posts: 27
Not sure if this has been done before (might have), but in my learning process I want to learn more intricate bash scripts. I think a bash based package manager and bash based package creator would be awesome and interesting to look into. It could also prove useful to some.

Bash Package maker-
* make a directory containing a program put into a file structure (like you would see in a regular package) and run:
./ /pathtoprogramfolder
to compress the folder structure and programs in it into maybe a tar.bz2 and then change the extension to something like .bpk (bash package).

Bash Package Manager-
* be able to run:
./ install /pathtopackage/package.bpk
to install a package. then have the package manager make a install log of the installed components and maybe place it somewhere in a folder with a new log per package installed. so when you issue:
./ remove packagename
it will remove that installed package and the install log too.

If no one is willing or able to make such a set of scripts, it's ok.

 PostPosted: Mon Sep 18, 2006 9:47 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 693
Location: Des Moines, Iowa
yast is actually a bash based package manager...... for suse/opensuse.

I'm sure you could mod it all out if you wanted too ;)

 Profile WWW  
 PostPosted: Sat Sep 23, 2006 1:01 am   

Joined: Wed Sep 06, 2006 12:19 pm
Posts: 54
Location: Covington, WA
Actually, this is exactly what the 'pkgutils' tools do in Slackware......

The package maker is called 'makepkg' which tarballs and compresses an entre pkg tree into a '.tgz' package (but you can modify it to use any extension, I suppose)....

Next is 'installpkg' which, as it's name implies, installs the pkg created with 'makepkg', and creates a log of the metadata and list of files installed into /var/log/packages, and also adds the postinstall script (called '') if one if found into /var/log/scripts.......

Then there's 'removepkg' which removes the installed pkg by reading the log file for the file list, then removes the package log (and script log if one is present).......

Then you have 'upgradepkg', which will upgrade an existing package.....

Finally, there's 'pkgtool', which is a curses-based wrapper for the others one can use to find all about the installed packages, install new packages, upgrade existing ones......

These are all shell scripts used by Slackware......

Also, Crux has a script for making packages in it's 'pkgtools' package, called 'pkgmk'.......Though, I think the install util is a C program......I can't remember as it's been a while since I used Crux.......


PS: I'm also working on a shell script package manager for an LFS setup I'm creating........ ;-)

 PostPosted: Mon Oct 30, 2006 2:05 pm   

Joined: Fri Oct 14, 2005 9:30 am
Posts: 61
Well I have actually done something of the sort here. Its not vry advanced or anything but I think it's kinda what you meant.

 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours

Who is online

Users browsing this forum: No registered users and 15 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group