suse 9.1 Pro, rebuild distro with updates
Hi ! I have an autoyast that works fine, but I would like to include a snapshot of the updates/patches in my installation tree. Anybody knows where to store updates and which files to update (scripts to run) to get the updates/patches 'active'. Br /Jan Terje
jan terje tønnessen writes:
Hi ! I have an autoyast that works fine, but I would like to include a snapshot of the updates/patches in my installation tree. Anybody knows where to store updates and which files to update (scripts to run) to get the updates/patches 'active'.
Hi Jan! I use the script below to maintain a current installation tree. The script first renames the original "suse" directory in the installation tree to "suse.orig". Then it builds the directory "suse.new" by hard-linking files from "suse.orig", the update-directory and some of my own rpms. Then it removes old versions and finally renames "suse.new" to "suse" and runs the "create_package_descr" script. You'll have to modify some paths to your needs, and probably add a line to download the newest update-directory using rsync. By using hard-links we still have the original installation tree available without wasting a lot of disk space. The script doesn't upgrade the kernel or yast2-modules. I don't remember exactly why, but I guess it's because the kernel used during the installation should be the same as the one that's installed. Best regards, Rasmus -- Rasmus Borup Hansen, system adm. University of Copenhagen Email: rbh@math.ku.dk Institute for Mathematical Sciences Phone: +45 353 20759 Universitetsparken 5 Cell phone: +45 287 50742 DK-2100 Ø Office: 04.2.08 Denmark #!/bin/sh cd /dist/suse/9.1 if [ -e suse.new ]; then echo "Removing bogus \"suse.new\"-tree." rm -rf suse.new fi if [ ! -e suse.orig ]; then echo "Renaming old \"suse\"-tree to \"suse.orig\"." mv suse suse.orig ln -s suse.orig suse fi echo "Making \"suse.new\"-tree from \"suse.orig\"-tree." mkdir suse.new cd suse.orig find . -type d -exec mkdir -p /dist/suse/9.1/suse.new/{} \; find . -type f -name '*.rpm' -exec ln {} /dist/suse/9.1/suse.new/{} \; find . -type f -not -name '*.rpm' -exec cp {} /dist/suse/9.1/suse.new/{} \; # Get updates by rsync? echo "Linking patches into \"suse.new\"-tree." cd /dist/suse/i386/update/9.1/rpm RPMS=`find . -type f -name '*.rpm' -not -name 'kernel*.rpm' -not -name 'yast2*.rpm' -not -name '*.patch.rpm' -not -path './src/*'` for RPM in $RPMS ; do if [ ! -e /dist/suse/9.1/suse.new/$RPM ]; then ln $RPM /dist/suse/9.1/suse.new/$RPM fi done echo "Linking local RPPMS into \"suse.new\"-tree." cd /dist/local/RPMS RPMS=`find . -type f -name '*.rpm' -not -name '*.patch.rpm' -not -path './src/*'` for RPM in $RPMS ; do ARCH=`echo $RPM | sed 's/.*\.\([a-zA-Z0-9]*\).rpm$/\1/'` BASENAME=`basename $RPM` mkdir -p /dist/suse/9.1/suse.new/$ARCH if [ ! -e /dist/suse/9.1/suse.new/$ARCH/$BASENAME ]; then ln $RPM /dist/suse/9.1/suse.new/$ARCH/$BASENAME fi done echo "Removing old versions from \"suse.new\"-tree." cd /dist/suse/9.1/suse.new BASES=`find . -name '*.rpm' | sed 's/-[^-]*-[^-]*$//' | sort -u` for BASE in $BASES ; do BASEDIR=`dirname $BASE` BASENAME=`basename $BASE | sed 's/+/\\\\+/'` FILES=`find $BASEDIR -regex '.*/'$BASENAME'-[^-]*-[^-]*$'` if [ -z "$FILES" ]; then echo "Warning! No files found for package $BASE (perhaps an unhandled regexp-metachar\?)." else NEWEST=`ls -rt $FILES | tail -1` ln $NEWEST $NEWEST.foo rm $FILES mv $NEWEST.foo $NEWEST fi done echo "Renaming \"suse.new\"-tree to \"suse\"." cd /dist/suse/9.1 if [ -e suse ]; then rm -rf suse fi mv suse.new suse echo "Recreating package descriptions." cd /dist/suse/9.1/suse /dist/suse/scripts/create_package_descr -x setup/descr/EXTRA_PROV \ -l en -l cs -l de -l es -l fr -l hu -l sk
participants (2)
-
jan terje tønnessen
-
Rasmus Borup Hansen