Package Script

Mike B. thaz at if.rmci.net
Sun Apr 22 14:10:13 PDT 2001


I'm not sure how to write this, or even if it is a solution that make's 
sense, but maybe it's worth looking at.  It seems to me that 
installation/uninstallation could be handled this way.

1.  Do normal configure and make steps in a package
2.  Execute a script chroot /usr/src/ for the installation that does 
several things.
       script could do
           a- make install  #install package - would create(possibly) 
directories bin etc usr sbin etc....
           b- tar the newly created directories into a tarball
           c- list the newly created tarball's contents into a text 
file( or text processing macro)
           d- use the text file to do something like  
                               for each line in text file{
                                   echo rm -f $linefromtextfile >> 
uninstall.sh
                               }
           e- chown root uninstall.sh
           f- chmod u+x uninstall.sh
           g- tar command to add uninstall.sh to tarball
           h- cp packagename.tgz ./packages/
           i-  rm -rf bin etc sbin usr etc....
           j-  exit chroot
upon exit from chroot you could either untar the tarball that is now in 
/usr/src/packages or just do make install again.  

This way when you want to uninstall a package you could just to tar-xzvf 
packagename.tgz uninstall.sh && ./uninstall.sh


Can something be done like this?
Has it already been done?
Can it be done better?


I dislike package management schemes like rpm and .deb because they are 
a pain to create the packages for.  Also the tar thing is reliable.  I 
checked out the tgz hint once it was posted, but I can't get it to catch 
reliable all of the files generated from make install.  This way would 
be very reliable, as it would basicly create an empty directory tree 
that had only the packages files in it, and delete those directories 
when it was done, thereby making sure the next run would be clean.      
     


-- 
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the blfs-support mailing list