Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Debian repository management part 2/2

Issue #31:
- use reprepro to build the repository
- include source package
- update to release engineering documentation
  • Loading branch information...
commit ee68172ed8f6e91ad8a9ced03c516d58e8482868 1 parent c96b9b6
@jean1 jean1 authored
Showing with 49 additions and 24 deletions.
  1. +20 −2 RELENG
  2. +29 −22 pkg/debian/update-repo
View
22 RELENG
@@ -76,6 +76,24 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXX
cd $NETMAGIS
make debian-packages
- 3.c. Copy packages to the web server
+ 3.c. Create repository if needed
+
+ mkdir -p /local/repo/conf
+ # add the following lines in /local/repo/conf/distributions
+ Origin: netmagis
+ Label: netmagis
+ Codename: stable
+ Architectures: amd64 i386
+ Components: main
+ Description: Apt repository for netmagis
+
+ 3.d. Update local repository
+
+ make debian-repo
+
+ 3.e. Copy local repository to the web server
+
+ tar cf - -C /local repo | \
+ ssh netmagis.org tar xf - -C /www/docs/files
+
- scp netmagis-*-debian-*.tar.gz netmagis.org:/www/docs/files/
View
51 pkg/debian/update-repo
@@ -1,5 +1,17 @@
#!/bin/sh
+#
+# Create or update Debian repository
+#
+# Usage Example:
+#
+# update-repo 2.1 $HOME/netmagis/pkg/debian /local/repo
+#
+# The package reprepro is required to run this script
+#
+# History:
+# 2012/05/16 : pda/jean : design
+
if [ $# -ne 3 ]
then
echo "Usage: $0 version pkgdir repodir" >&2
@@ -10,16 +22,14 @@ VERSION="$1"
PKGDIR="$2"
REPODIR="$3"
-BINSFX="dists/stable/main"
-BINDIR="$REPODIR/$BINSFX"
-
-# Check repository consistency
-if [ \! -d $BINDIR ]
+# Check repository existence
+if [ ! -d "$REPODIR" ]
then
- echo "Directory $BINDIR does not exist" >&2
+ echo "Directory $REPODIR does not exist" >&2
exit 1
fi
+
# Check for packages
for i in common database metro servers topo utils www
do
@@ -31,19 +41,16 @@ do
fi
done
-# Guess architectures
-arch=`ls $PKGDIR|sed -n "/netmagis-.*_$VERSION-.*_\(.*\)\.deb/s//\1/p"|sort -u`
-
-# Copy packages
-for a in $arch
-do
- mkdir -p $BINDIR/binary-$a
- cp $PKGDIR/netmagis-*_$VERSION-*_$a.deb $BINDIR/binary-$a
-
- # Generate Packages.gz relative to the debian directory
- (
- cd $REPODIR
- /usr/bin/dpkg-scanpackages $BINSFX/binary-$a | \
- gzip -9 > $BINSFX/binary-$a/Packages.gz
- )
-done
+# Create configuration file for reprepro
+cat > $REPODIR/conf/distributions <<EOF
+Origin: netmagis
+Label: netmagis
+Codename: stable
+Architectures: amd64 i386
+Components: main
+Description: Apt repository for netmagis
+#SignWith: <key-id>
+EOF
+
+# Create or update repository
+reprepro -b $REPODIR includedeb stable $PKGDIR/netmagis-*_$VERSION-*.deb
Please sign in to comment.
Something went wrong with that request. Please try again.