From a356496599c4e94cf31e780f52787c446e0fe204 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 18 Nov 2008 13:42:48 +0100 Subject: [PATCH] amd64/i386 architectures --- update-archive/apt-ftparchive.conf.in | 37 +++++++++++++++------- update-archive/apt-release.conf.in | 2 +- update-archive/update-archive.sh | 55 +++++++++++++++++++-------------- 3 files changed, 58 insertions(+), 36 deletions(-) diff --git a/update-archive/apt-ftparchive.conf.in b/update-archive/apt-ftparchive.conf.in index 2042d57..c0bfa35 100644 --- a/update-archive/apt-ftparchive.conf.in +++ b/update-archive/apt-ftparchive.conf.in @@ -1,11 +1,11 @@ -// $Id: apt-ftparchive.conf.in,v 1.1.1.1 2006-06-15 11:53:00 adam Exp $ +// $Id: apt-ftparchive.conf.in,v 1.2 2008-10-20 10:24:15 adam Exp $ // This config is for us with the pool-structure for the packages, thus we // don't use a Tree Section in here // The debian archive should be in the current working dir Dir { ArchiveDir "."; - CacheDir "."; + CacheDir "tmp"; }; // Create Packages, Packages.gz and Packages.bz2, remove what you don't need @@ -19,16 +19,29 @@ Default { // ./pool/main any way you like, apt-ftparchive will take any deb (and // source package) it can find. This creates a Packages a Sources and a // Contents file for these in the main section of the sid release -BinDirectory "pool/@dist@" { - Packages "dists/@dist@/main/binary-i386/Packages"; - Sources "dists/@dist@/main/source/Sources"; - Contents "dists/@dist@/Contents-i386"; -} +// BinDirectory "pool/@dist@" { +// Packages "dists/@dist@/main/binary-i386/Packages"; +// Sources "dists/@dist@/main/source/Sources"; +// Contents "dists/@dist@/Contents-i386"; +// }; -// By default all Packages should have the extension ".deb" -Default { - Packages { - Extensions ".deb"; - }; +TreeDefault { + Directory "pool/$(DIST)/$(ARCH)"; + SrcDirectory "pool/$(DIST)/source"; + Packages "$(DIST)/$(SECTION)/binary-$(ARCH)/Packages"; + Sources "$(DIST)/$(SECTION)/source/Sources"; + Contents "$(DIST)/Contents-$(ARCH)"; }; +Tree "dists/@dist@" { + Sections "main"; + Architectures "source @architectures@"; + SrcOverride "/dev/null"; +}; +// By default all Packages should have the extension ".deb" +//Default { +// Packages { +// Extensions ".deb"; +// }; +//}; + diff --git a/update-archive/apt-release.conf.in b/update-archive/apt-release.conf.in index 50857c4..49ec1a2 100644 --- a/update-archive/apt-release.conf.in +++ b/update-archive/apt-release.conf.in @@ -2,6 +2,6 @@ APT::FTPArchive::Release::Origin "Indexdata"; APT::FTPArchive::Release::Label "Indexdata"; APT::FTPArchive::Release::Suite "@dist@"; APT::FTPArchive::Release::Codename "@dist@"; -APT::FTPArchive::Release::Architectures "i386"; +APT::FTPArchive::Release::Architectures "@architectures@"; APT::FTPArchive::Release::Components "main"; APT::FTPArchive::Release::Description "Index Data Debian packages"; diff --git a/update-archive/update-archive.sh b/update-archive/update-archive.sh index 03d3fe8..a7988ea 100755 --- a/update-archive/update-archive.sh +++ b/update-archive/update-archive.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: update-archive.sh,v 1.12 2007-11-11 19:47:15 adam Exp $ +# $Id: update-archive.sh,v 1.13 2008-10-20 10:24:15 adam Exp $ if test ! -f apt-ftparchive.conf.in; then echo "$0: apt-ftparchive.conf.in must be located in current directory" exit 1 @@ -27,9 +27,14 @@ fi confdir=`pwd` cd $debiandir +# Uncomment to clean the .db (cache) +# rm ${debiandir}/tmp/* + +architectures="i386 amd64" + for dist in lenny etch sarge woody; do # Make symlinks from the regular FTP archive - d=pool/$dist + d=pool/dists/$dist if test ! -d $d; then mkdir -p $d; fi for l in $d/*; do if test -L $l; then @@ -40,16 +45,26 @@ for dist in lenny etch sarge woody; do fi fi done - ln -sf /home/ftp/pub/*/debian/$dist/* $d + # ln -sf /home/ftp/pub/*/debian/$dist/* $d + mkdir -p $d/source + ln -sf /home/ftp/pub/*/debian/$dist/* $d/source + rm $d/source/*.deb + for arch in $architectures; do + mkdir -p $d/${arch} + ln -sf /home/ftp/pub/*/debian/$dist/*_${arch}.* $d/${arch} + ln -sf /home/ftp/pub/*/debian/$dist/*_all.* $d/${arch} + done # ${confdir}/symclean.sh $d - d=dists/$dist/main/binary-i386 - if test ! -d $d; then mkdir -p $d; fi - echo "Archive: $dist" >$d/Release - echo 'Component: main' >>$d/Release - echo 'Origin: Indexdata' >>$d/Release - echo 'Architecture: i386' >>$d/Release + for arch in $architectures; do + d=dists/$dist/main/binary-$arch + if test ! -d $d; then mkdir -p $d; fi + echo "Archive: $dist" >$d/Release + echo 'Component: main' >>$d/Release + echo 'Origin: Indexdata' >>$d/Release + echo "Architecture: $arch" >>$d/Release + done d=dists/$dist/main/source if test ! -d $d; then mkdir -p $d; fi @@ -59,34 +74,28 @@ for dist in lenny etch sarge woody; do echo 'Architecture: source' >>$d/Release # generate + echo "Begin Generate $dist" F=apt-ftparchive.conf - sed "s/@dist@/$dist/g" <${confdir}/${F}.in >$F + sed "s/@dist@/$dist/g" <${confdir}/${F}.in |sed "s/@architectures@/${architectures}/g" > $F # Don't know if clean is needed! # apt-ftparchive clean apt-ftparchive.conf apt-ftparchive generate apt-ftparchive.conf + echo "Done generate $dist" # release r=dists/$dist/Release F=apt-release.conf - sed "s/@dist@/$dist/g" <${confdir}/${F}.in >$F + sed "s/@dist@/$dist/g" <${confdir}/${F}.in | sed "s/@architectures@/${architectures}/g" >$F # Move Release file away while calling using release rm $r apt-ftparchive -c $F release dists/$dist >tmp_Release mv tmp_Release $r # sign - r=dists/$dist/Release - rm -f ${r}.gpg - gpg --sign -u "Index Data" -ba -o ${r}.gpg dists/$dist/Release - - # Make symlinks to make old sources list work (makedeb.sh compat) - F=dists/indexdata/$dist - if test ! -d $F; then - mkdir -p $F - fi - F=dists/indexdata/$dist/released - if test ! -d $F; then - ln -s /home/ftp/pub/debian/dists/$dist/main $F + if true; then + r=dists/$dist/Release + rm -f ${r}.gpg + gpg --sign -u "Index Data" -ba -o ${r}.gpg dists/$dist/Release fi done # Local Variables: -- 1.7.10.4