[Fai-commit] r5854 - in trunk: bin debian

Thomas Lange lange at alioth.debian.org
Fri Jul 9 20:02:28 UTC 2010


Author: lange
Date: 2010-07-09 20:02:13 +0000 (Fri, 09 Jul 2010)
New Revision: 5854

Modified:
   trunk/bin/fai-mirror
   trunk/debian/changelog
   trunk/debian/control
Log:
fai-mirror, control: replace apt-move by reprepro

Modified: trunk/bin/fai-mirror
===================================================================
--- trunk/bin/fai-mirror	2010-07-09 14:24:29 UTC (rev 5853)
+++ trunk/bin/fai-mirror	2010-07-09 20:02:13 UTC (rev 5854)
@@ -25,7 +25,7 @@
 # MA 02111-1307, USA.
 #*********************************************************************
 
-version="Version 1.11, 22-october-2009"
+version="Version 2.0, 9-july-2010"
 
 # variables: NFSROOT, FAI_CONFIGDIR, FAI_ETC_DIR
 
@@ -93,7 +93,6 @@
     # not a copy later during apt-move
     aptcache=$mirrordir/aptcache   # holds the package cache data
     archivedir=$aptcache/var/cache/apt/archives
-    aptmovefile=$aptcache/etc/apt-move.conf # stores apt-move.conf
     statefile=$aptcache/statefile
 
     # also used in install_packages.conf
@@ -194,8 +193,6 @@
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-[ -x "$(which apt-move)" ] || die 5 "apt-move not found. Please install package."
-
 preserve=0
 verbose=0
 add=1
@@ -280,36 +277,24 @@
 [ $add -eq 0 ] && delete_base_packages
 
 # create mirror directory structure
-echo "Calling apt-move"
-cat > $aptmovefile <<EOF   # generate apt-move.conf
-APTSITES=*
-LOCALDIR=$mirrordir
-DIST=$debdist
-FILECACHE=$archivedir
-LISTSTATE=$aptcache/var/lib/apt/lists
-DELETE=no
-CONTENTS=no
-PKGCOMP='none gzip'
+echo "Calling reprepro"
+mkdir $mirrordir/conf
+cat > $mirrordir/conf/distributions <<EOF   # generate config file for reprepro
+Codename: cskoeln
+Architectures: i386 amd64
+Components: main non-free contrib
+DebIndices: Packages Release . .bz2
+Description: FAI packages from author's repository
+Label: www.informatik.uni-koeln.de
+Origin: Original FAI archive
+Suite: lenny
 EOF
-# due to bug #441231 in apt-move, we have to specify the arhcitecture
-[ -n "$arch" ] && echo "ARCH=$arch" >> $aptmovefile # append architecture
-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)
-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
+# '
 
+# maybe using reprepro pulls it's possible to move instead of copy the packages
+reprepro -b $mirrordir includedeb cskoeln $mirrordir/aptcache/var/cache/apt/archives/*.deb
+rm -rf $mirrordir/db $mirrordir/conf $mirrordir/aptcache/var/cache/apt/archives
+
 echo "$0 finished."
 echo -n "Mirror size and location: ";du -sh $mirrordir
 cleandirs

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2010-07-09 14:24:29 UTC (rev 5853)
+++ trunk/debian/changelog	2010-07-09 20:02:13 UTC (rev 5854)
@@ -36,6 +36,7 @@
     subroutines, THANKS, setup-storage.8, Makefile, FAIBASE.var: remove
     setup_harddisks and variable USE_SETUP_STORAGE
   * NEWS: add info about setup_harddisks removal
+  * fai-mirror, control: replace apt-move by reprepro
 
   [ Michael Tautschnig ]
   * control: Move setup-storage to its own package (fai-setup-storage). Thanks

Modified: trunk/debian/control
===================================================================
--- trunk/debian/control	2010-07-09 14:24:29 UTC (rev 5853)
+++ trunk/debian/control	2010-07-09 20:02:13 UTC (rev 5854)
@@ -42,7 +42,7 @@
 Architecture: all
 Depends: fai-client, debootstrap
 Recommends: nfs-kernel-server, dhcp3-server, tftpd-hpa | tftpd, openssh-server, openssh-client, syslinux-common, openbsd-inetd | inet-superserver, iproute, fai-setup-storage
-Suggests: debmirror, apt-move, genisoimage, grub, aptitude, perl-tk, libproc-daemon-perl
+Suggests: debmirror, reprepro, genisoimage, grub, aptitude, perl-tk, libproc-daemon-perl
 Conflicts: fai
 Replaces: fai
 Description: Fully Automatic Installation server package
@@ -62,7 +62,7 @@
 
 Package: fai-quickstart
 Architecture: all
-Depends: fai-server, fai-doc, dhcp3-server, nfs-kernel-server, syslinux-common, tftpd-hpa, apt-move, genisoimage, openbsd-inetd | inet-superserver
+Depends: fai-server, fai-doc, dhcp3-server, nfs-kernel-server, syslinux-common, tftpd-hpa, reprepro, genisoimage, openbsd-inetd | inet-superserver
 Description: Fully Automatic Installation quickstart package
  FAI is a non-interactive system to install, customize and manage
  Linux systems and software configurations on computers as well as




More information about the Fai-commit mailing list