?

Log in

No account? Create an account

xpack.py - a "super" packaging tool

« previous entry | next entry »
Feb. 26th, 2011 | 03:03 am

I wrote a script to make "package" in tgz, rpm or deb (experimental) from given files list. Here is an example session how it works:

$ ls
files.list  xpack.py
$ cat files.list
/etc/auto.*
/etc/modprobe.d/*
/etc/resolv.conf
/etc/yum.repos.d/fedora.repo
#/etc/aliases.db
/etc/system-release
/etc/httpd/conf.d
$ python xpack.py -n sysdata -w ./0 -q files.list
03:52:50 [WARNING]  /etc/auto.master is owned by autofs and it (sysdata) will conflict with autofs
03:52:50 [WARNING]  /etc/auto.misc is owned by autofs and it (sysdata) will conflict with autofs
03:52:51 [WARNING]  /etc/auto.net is owned by autofs and it (sysdata) will conflict with autofs
03:52:51 [WARNING]  /etc/auto.smb is owned by autofs and it (sysdata) will conflict with autofs
03:52:51 [WARNING]  /etc/httpd/conf.d is owned by httpd and it (sysdata) will conflict with httpd
03:52:51 [WARNING]  /etc/modprobe.d/blacklist-visor.conf is owned by pilot-link and it (sysdata) will conflict with pilot-link
03:52:51 [WARNING]  /etc/modprobe.d/blacklist.conf is owned by hwdata and it (sysdata) will conflict with hwdata
03:52:51 [WARNING]  /etc/modprobe.d/dist-alsa.conf is owned by module-init-tools and it (sysdata) will conflict with module-init-tools
03:52:52 [WARNING]  /etc/modprobe.d/dist-oss.conf is owned by module-init-tools and it (sysdata) will conflict with module-init-tools
03:52:52 [WARNING]  /etc/modprobe.d/dist.conf is owned by module-init-tools and it (sysdata) will conflict with module-init-tools
03:52:52 [WARNING]  /etc/modprobe.d/libmlx4.conf is owned by libmlx4 and it (sysdata) will conflict with libmlx4
03:52:52 [WARNING]  /etc/modprobe.d/poulsbo.conf is owned by xorg-x11-drv-psb and it (sysdata) will conflict with xorg-x11-drv-psb
03:52:52 [WARNING]  /etc/system-release is owned by fedora-release and it (sysdata) will conflict with fedora-release
03:52:53 [WARNING]  /etc/yum.repos.d/fedora.repo is owned by fedora-release and it (sysdata) will conflict with fedora-release
03:52:53 [WARNING] [Errno 1] Operation not permitted: '/tmp/t/0/sysdata-0.1/src/etc/httpd/conf.d'
$  ls
0  files.list  xpack.py
$ ls 0
sysdata-0.1
$ ls 0/sysdata-0.1/
MANIFEST            README          configure     rpm.mk                         sysdata-0.1.tar.gz                       xpack-package-filelist.pkl
MANIFEST.overrides  aclocal.m4      configure.ac  src                            sysdata-overrides-0.1-1.fc14.noarch.rpm  xpack-sbuild.stamp
Makefile            autom4te.cache  install-sh    sysdata-0.1-1.fc14.noarch.rpm  sysdata.spec                             xpack-setup.stamp
Makefile.am         config.log      missing       sysdata-0.1-1.fc14.src.rpm     xpack-build.stamp
Makefile.in         config.status   rpm           sysdata-0.1.tar.bz2            xpack-configure.stamp
$ rpm -qlp 0/sysdata-0.1/sysdata-0.1-1.fc14.noarch.rpm
/etc/resolv.conf
/usr/share/doc/sysdata-0.1
/usr/share/doc/sysdata-0.1/MANIFEST
/usr/share/doc/sysdata-0.1/README
$ rpm -qlp 0/sysdata-0.1/sysdata-overrides-0.1-1.fc14.noarch.rpm
/etc/auto.master
/etc/auto.misc
/etc/auto.net
/etc/auto.smb
/etc/httpd/conf.d
/etc/modprobe.d/blacklist-visor.conf
/etc/modprobe.d/blacklist.conf
/etc/modprobe.d/dist-alsa.conf
/etc/modprobe.d/dist-oss.conf
/etc/modprobe.d/dist.conf
/etc/modprobe.d/libmlx4.conf
/etc/modprobe.d/poulsbo.conf
/etc/system-release
/etc/yum.repos.d/fedora.repo
/usr/share/doc/sysdata-overrides-0.1
/usr/share/doc/sysdata-overrides-0.1/MANIFEST.overrides
$

If you're interested in it and want to see how it works and what can be done with it, take a look at the output of `xpack.py --show-examples` also.

The idea behind this script is that the system should be consist of static data ('packages') and 'procedual' setup process (such as creating and editing /etc/httpd/conf.d/foo.conf, recovering dot files in users' dirs from backup data, etc.) be removed at a maximum.

What is more, I want to remove most manual and 'procedual' configuration steps need human interaction except for installation of some additional packages to setup our systems.

This script will help packaging configuration files modified by users manually and user data, so to install these packages finishes the system setup almost.

Link | Leave a comment | | Flag

Comments {0}