null+****@clear*****
null+****@clear*****
2012年 4月 29日 (日) 09:31:49 JST
Kouhei Sutou 2012-04-29 09:31:49 +0900 (Sun, 29 Apr 2012)
New Revision: 7331585f7ae893488078d532934079cf23b6276a
Log:
apt: sign packages
Added files:
packages/apt/sign-packages.sh
Modified files:
packages/apt/Makefile.am
Modified: packages/apt/Makefile.am (+4 -1)
===================================================================
--- packages/apt/Makefile.am 2012-04-29 09:26:09 +0900 (9a93aca)
+++ packages/apt/Makefile.am 2012-04-29 09:31:49 +0900 (1347e80)
@@ -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 \
@@ -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)'
Added: packages/apt/sign-packages.sh (+41 -0) 100755
===================================================================
--- /dev/null
+++ packages/apt/sign-packages.sh 2012-04-29 09:31:49 +0900 (a45a5af)
@@ -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