Navigation Menu

Skip to content

Commit

Permalink
apt: sign packages
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 29, 2012
1 parent 90c988e commit 7331585
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/apt/Makefile.am
Expand Up @@ -5,7 +5,7 @@ CODES = squeeze wheezy unstable lucid natty oneiric precise

all:

release: build update-repository sign-repository upload
release: build sign-packages update-repository sign-repository upload

remove-existing-packages:
for distribution in $(DISTRIBUTIONS); do \
Expand All @@ -18,6 +18,9 @@ download:
$(RSYNC_PATH)/$${distribution}/ $${distribution}; \
done

sign-packages:
./sign-packages.sh '$(GPG_UID)' '$(CODES)'

update-repository:
./update-repository.sh '$(PACKAGE_NAME)' '$(ARCHITECTURES)' '$(CODES)'

Expand Down
41 changes: 41 additions & 0 deletions packages/apt/sign-packages.sh
@@ -0,0 +1,41 @@
#!/bin/sh

script_base_dir=`dirname $0`

if [ $# != 2 ]; then
echo "Usage: $0 GPG_UID CODES"
echo " e.g.: $0 'F10399C0' 'lenny unstable hardy karmic'"
exit 1
fi

GPG_UID=$1
CODES=$2

run()
{
"$@"
if test $? -ne 0; then
echo "Failed $@"
exit 1
fi
}

for code_name in ${CODES}; do
case ${code_name} in
lenny|squeeze|wheezy|unstable)
distribution=debian
;;
*)
distribution=ubuntu
;;
esac

base_directory=packages/${distribution}
debsign --re-sign -k${GPG_UID} \
$(find ${base_directory} -name '*.dsc' -or -name '*.changes') &
if [ "${PARALLEL}" != "yes" ]; then
wait
fi
done

wait

0 comments on commit 7331585

Please sign in to comment.