Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/git-tools
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 15 Jan 2009 12:31:01 +0000 (13:31 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 15 Jan 2009 12:31:01 +0000 (13:31 +0100)
id-deb-build/id-pbuild-all.sh
id-new-project/id-new-project.sh
id-new-project/post-receive [new file with mode: 0755]
id-new-project/post-receive-email-id
update-archive/apt-ftparchive.conf.in
update-archive/apt-release.conf.in
update-archive/update-archive.sh

index b1db5a9..534f435 100755 (executable)
@@ -1,4 +1,9 @@
 #!/bin/sh
+update=true
+if test "$1" == "-f"; then
+       shift
+       update=false
+fi
 PKG="$1"
 if test -z "$PKG"; then
        echo "Specify .dsc file"
@@ -10,7 +15,9 @@ if test ! -e "$PKG"; then
 fi
 for dist in etch lenny; do
        for arch in i386 amd64; do
-               DIST=$dist ARCH=$arch pbuilder update --override-config
+               if $update; then
+                       DIST=$dist ARCH=$arch pbuilder update --override-config
+               fi
                DIST=$dist ARCH=$arch pbuilder --build $PKG
        done
 done
index 42d9410..0f615be 100755 (executable)
@@ -16,8 +16,8 @@ if test -z "${TYPE}"; then
        usage 
 fi
 
-if test ! -e post-receive-email-id; then
-       echo "file post-receive-email-id must be in current directory"
+if test ! -e post-receive; then
+       echo "file post-receive must be in the current directory"
        exit 1  
 fi
 
@@ -34,7 +34,7 @@ if git clone --bare $SRC ${PROJ}.git; then
        touch git-daemon-export-ok
        echo "${DESC}" >description
        git config core.sharedRepository true
-       cp ../post-receive-email-id hooks/post-receive
+       cp ../post-receive hooks/post-receive
        chmod +x hooks/post-receive
        git config hooks.mailinglist gitid@indexdata.dk
        cd ..
diff --git a/id-new-project/post-receive b/id-new-project/post-receive
new file mode 100755 (executable)
index 0000000..a95d7a7
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# An example hook script for the post-receive event
+#
+# This script is run after receive-pack has accepted a pack and the
+# repository has been updated.  It is passed arguments in through stdin
+# in the form
+#  <oldrev> <newrev> <refname>
+# For example:
+#  aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
+#
+# see contrib/hooks/ for an sample, or uncomment the next line (on debian)
+#
+
+
+. /home/git/tools/git-tools/post-receive-email-id
index 6f87ac7..114d613 100644 (file)
@@ -59,6 +59,7 @@
 #  - generate_delete_XXXX_email
 #  - generate_email_footer
 #
+
 generate_email()
 {
        # --- Arguments
@@ -374,6 +375,8 @@ generate_update_branch_email()
        if [ -z "$rewind_only" ]; then
                echo "Revisions details."
                echo ""
+               generate_gitweb_link
+               echo ""
                echo $LOGBEGIN
                git rev-parse --not --branches | grep -v $(git rev-parse $refname) |
                git rev-list --pretty --stdin $oldrev..$newrev
@@ -569,6 +572,20 @@ generate_delete_general_email()
        echo $LOGEND
 }
 
+GITWEB_PUB="http://git.indexdata.com"
+GITWEB_PRIV="https://gitid.indexdata.com"
+
+generate_gitweb_link()
+{      
+       proj_path=`pwd`
+       proj_dir=`basename $proj_path`
+       gitweb_host=$GITWEB_PUB
+       if echo "$proj_path" | grep -q "private"
+       then gitweb_host=$GITWEB_PRIV
+       fi
+       echo "$gitweb_host/?p=$proj_dir;a=commitdiff;h=$newrev"
+}
+
 # ---------------------------- main()
 
 # --- Constants
index 2042d57..c0bfa35 100644 (file)
@@ -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";
+//     };
+//};
+
index 50857c4..49ec1a2 100644 (file)
@@ -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";
index 03d3fe8..a7988ea 100755 (executable)
@@ -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: