[Fai-commit] r5588 - people/michael/experimental/patches

Michael Tautschnig mt at alioth.debian.org
Thu Oct 22 14:21:10 UTC 2009


Author: mt
Date: 2009-10-22 14:21:07 +0000 (Thu, 22 Oct 2009)
New Revision: 5588

Removed:
   people/michael/experimental/patches/bugfix-412889
Modified:
   people/michael/experimental/patches/logtail
   people/michael/experimental/patches/series
   people/michael/experimental/patches/setup-storage_full-crypto-support
Log:
Thomas added an alternative implementation to fix #412889 in trunk, removing
this patch; updated other patches to match current trunk


Deleted: people/michael/experimental/patches/bugfix-412889
===================================================================
--- people/michael/experimental/patches/bugfix-412889	2009-10-22 14:19:22 UTC (rev 5587)
+++ people/michael/experimental/patches/bugfix-412889	2009-10-22 14:21:07 UTC (rev 5588)
@@ -1,180 +0,0 @@
-2009-02-13  Michael Tautschnig  <mt at debian.org>
-
-	* bin/fai-mirror: Added -a command line option to support use with multiple
-		architectures (thanks Sebastian Harl) (closes: #412889, #343344)
-	* man/fai-mirror.1: Documentation of new -a option (thanks Sebastian Harl)
-Index: trunk/bin/fai-mirror
-===================================================================
---- trunk.orig/bin/fai-mirror
-+++ trunk/bin/fai-mirror	
-@@ -123,6 +123,8 @@
- }
- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- delete_base_packages() {
-+    local arch=$1
-+    shift
- 
-     # now delete all packages that are already included in base.tgz
-     local p
-@@ -134,14 +136,18 @@
-     fi
-     echo "Removing packages that are already included in base.tgz"
-     for p in $(cat $NFSROOT/var/tmp/base-pkgs.lis); do
--	if [ -f $archivedir/${p}_*.deb ]; then
--	    [ $verbose -eq 1 ] && echo "deleting package $p"
--	    rm $archivedir/${p}_*.deb
-+	# There might be more than one file - even for this architecture.
-+	local files=$(ls $archivedir/${p}_{$arch,all}.deb 2> /dev/null)
-+	for file in $files; do
-+	    if [ -f $file ]; then
-+		[ $verbose -eq 1 ] && echo "deleting package $p"
-+		rm $file
-         # else commands only for debugging
-         #    else
-         #	echo "package $p not found"
-         #	ls $archivedir/${p}_*.deb
--	fi
-+	    fi
-+	done
-     done
- }
- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-@@ -197,7 +203,8 @@
- verbose=0
- add=1
- qflag=-qq
--while getopts "Bvhx:pc:C:" opt ; do
-+archs="`dpkg-architecture -qDEB_HOST_ARCH`"
-+while getopts "Bvhx:pc:C:a:" opt ; do
-     case "$opt" in
- 	B) add=0 ;;
- 	C) cfdir=$OPTARG ;;
-@@ -206,6 +213,7 @@
- 	c) cclasses="$OPTARG";;
- 	p) preserve=1;;
- 	v) verbose=1; vflag=-v; qflag='';;
-+	a) archs="$OPTARG";;
- 	?) die 1 "Unknown option";;
-     esac
- done
-@@ -263,16 +271,25 @@
- # TODO: use -p to preserve sources.list
- perl -p -e 's/file:/copy:/' $cfdir/apt/sources.list > $aptcache/etc/apt/sources.list
- 
--echo "Getting package information"
--apt-get $qflag $aptoptions update >/dev/null
-+archs=${archs//,/ }
-+for arch in $archs; do
-+    arch=$(echo $arch | tr '[[:upper:]]' '[[:lower:]]')
-+    aptoptions_noarch="$aptoptions"
-+    aptoptions=" -o APT::Architecture=$arch $aptoptions_noarch"
-+
-+    echo "Getting package information for architecture $arch"
-+    apt-get $qflag $aptoptions update >/dev/null
-+
-+    set-classes
-+    echo "Downloading packages for classes:" $classes
-+    FAI=$FAI_CONFIGDIR install_packages -d $vflag
-+    [ $add -eq 1 ] && add_base_packages
-+    umount_dirs
-+    trap "" EXIT ERR
-+    [ $add -eq 0 ] && delete_base_packages $arch
- 
--set-classes
--echo "Downloading packages for classes:" $classes
--FAI=$FAI_CONFIGDIR install_packages -d $vflag
--[ $add -eq 1 ] && add_base_packages
--umount_dirs
--trap "" EXIT ERR
--[ $add -eq 0 ] && delete_base_packages
-+    aptoptions="$aptoptions_noarch"
-+done
- 
- # create mirror directory structure
- echo "Calling apt-move"
-@@ -287,21 +304,55 @@
- PKGCOMP='none gzip'
- EOF
- apt-move $qflag -c $aptmovefile update
--# since Packages.gz from apt-move does not include packages from my
--# repository, let's use apt-ftparchive for generiating correct index
--# files
--pfilegz=$(find $mirrordir/dists -name Packages.gz)
--pfile=$(find $mirrordir/dists -name Packages)
--pdist=$(cd $mirrordir/dists ; ls)
-+
-+# apt-move does not handle Packages files for multiple architectures,
-+# so we're creating those ourselves. Also, we're creating our own
-+# Release files.
-+#
-+# We trust in dists and components being created by apt-move.
-+echo "Creating Packages and Release files"
- cd $mirrordir
--# md5sums of apt-move are not valid, when we recreate Packages.gz using
--# apt-ftparchive, but we can use the header of the Release file
--grep -B99 MD5Sum:  $mirrordir/dists/$pdist/Release | grep -v MD5Sum: > $mirrordir/tmpfile
--rm $mirrordir/dists/$pdist/Release
--apt-ftparchive packages pool > $pfile
--gzip -c $pfile > $pfilegz
--apt-ftparchive release dists/$pdist >> tmpfile
--mv tmpfile dists/$pdist/Release
-+dists=$(cd $mirrordir/dists ; find * -maxdepth 0 -type d | xargs echo -n)
-+for dist in $dists; do
-+    distdir="$mirrordir/dists/$dist"
-+
-+    components=$(cd $distdir ; find * -maxdepth 0 -type d | xargs echo -n)
-+    for component in $components; do
-+        componentdir="$distdir/$component"
-+
-+        for arch in $archs; do
-+            archdir="$componentdir/binary-$arch"
-+            mkdir -p "$archdir"
-+            rm -rf $archdir/Packages{,gz}
-+
-+            dpkg-scanpackages --arch $arch . > $archdir/Packages
-+            gzip -c $archdir/Packages > $archdir/Packages.gz
-+
-+            cat > $archdir/Release <<EOF
-+Archive: $dist
-+Component: $component
-+Origin: fai-mirror
-+Label: fai-mirror
-+Architecture: $arch
-+EOF
-+        done
-+    done
-+
-+    mirror_archs=$(cd $distdir ; \
-+            ls */ | grep '^binary-' | cut -d'-' -f2- | xargs echo -n)
-+    cat > $distdir/Release <<EOF
-+Origin: fai-mirror
-+Label: fai-mirror
-+Suite: $dist
-+Codename: unknown
-+Date: `date -Ru`
-+Architectures: $mirror_archs
-+Components: $components
-+Description: unknown
-+EOF
-+
-+    apt-ftparchive release dists/$dist >> $distdir/Release
-+done
- 
- echo "$0 finished."
- echo -n "Mirror size and location: ";du -sh $mirrordir
-Index: trunk/man/fai-mirror.1
-===================================================================
---- trunk.orig/man/fai-mirror.1
-+++ trunk/man/fai-mirror.1	
-@@ -71,6 +71,11 @@
- Exclude these classes. Do not add the packages of these classes to
- the mirror.
- .TP
-+.B "\-a " ARCH[,ARCH]
-+Create the mirror for the given architectures. Default is the host
-+architecture. This has no influence on the list of classes. This might have to
-+be combined with -B to prevent architecture specific packages to be pulled in.
-+.TP
- .B \-p
- Preserve existing sources.list. NOT YET IMPLEMENTED.
- .TP

Modified: people/michael/experimental/patches/logtail
===================================================================
--- people/michael/experimental/patches/logtail	2009-10-22 14:19:22 UTC (rev 5587)
+++ people/michael/experimental/patches/logtail	2009-10-22 14:21:07 UTC (rev 5588)
@@ -46,7 +46,7 @@
  }
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  jobsrunning() {
-@@ -422,6 +426,7 @@
+@@ -424,6 +428,7 @@
  task_savelog() {
  
      mkdir -p $FAI_ROOT/var/{lib,log}/fai

Modified: people/michael/experimental/patches/series
===================================================================
--- people/michael/experimental/patches/series	2009-10-22 14:19:22 UTC (rev 5587)
+++ people/michael/experimental/patches/series	2009-10-22 14:21:07 UTC (rev 5588)
@@ -1,7 +1,6 @@
 setup-storage_exp-version
 logtail
 grub-pc
-bugfix-412889
 bugfix-313397
 bugfix-479537
 setup-storage_full-crypto-support

Modified: people/michael/experimental/patches/setup-storage_full-crypto-support
===================================================================
--- people/michael/experimental/patches/setup-storage_full-crypto-support	2009-10-22 14:19:22 UTC (rev 5587)
+++ people/michael/experimental/patches/setup-storage_full-crypto-support	2009-10-22 14:21:07 UTC (rev 5588)
@@ -186,7 +186,7 @@
 ===================================================================
 --- trunk.orig/lib/subroutines
 +++ trunk/lib/subroutines	
-@@ -780,6 +780,8 @@
+@@ -782,6 +782,8 @@
      # now we can copy fstab
      [ -f $fs ] && mv $fs $fs.old
      [ -f $LOGDIR/fstab ] && cp -p $LOGDIR/fstab $fs




More information about the Fai-commit mailing list