null+****@clear*****
null+****@clear*****
2012年 4月 28日 (土) 15:22:37 JST
Kouhei Sutou 2012-04-28 15:22:37 +0900 (Sat, 28 Apr 2012)
New Revision: f42713ced3cbf89ec8257a8cc84b01de255fe122
Log:
apt: sign built packages in chroot
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-28 15:21:29 +0900 (bf08d29)
+++ packages/apt/Makefile.am 2012-04-28 15:22:37 +0900 (4d782b2)
@@ -8,7 +8,7 @@ REPOSITORY_BASE_NAME = $(REPOSITORY_PACKAGE)-$(REPOSITORY_VERSION)
all:
-release: build update sign upload
+release: build sign-packages update sign upload
remove-existing-packages:
for distribution in $(DISTRIBUTIONS); do \
@@ -27,6 +27,9 @@ download: ensure-rsync-path
$(RSYNC_PATH)/$${distribution} packages/; \
done
+sign-packages:
+ ./sign-packages.sh '$(GPG_UID)' '$(CODES)'
+
update:
./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-28 15:22:37 +0900 (dc43388)
@@ -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 \
+ $(find ${base_directory} -name '*.dsc' -or -name '*.changes') &
+ if [ "${PARALLEL}" != "yes" ]; then
+ wait
+ fi
+done
+
+wait