Skip to content
Snippets Groups Projects
Commit b616a8ed authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Merge branch 'jbonjean'

parents b8ea6839 cf471472
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# Author: Julien Bonjean (julien@bonjean.info) # Author: Julien Bonjean (julien@bonjean.info)
# #
# Creation Date: 2009-04-20 # Creation Date: 2009-04-20
# Last Modified: 2009-06-23 10:31:34 -0400 # Last Modified: 2009-07-03 17:02:33 -0400
##################################################### #####################################################
# #
...@@ -30,6 +30,12 @@ SCP_BASE="scp ${SSH_OPTIONS} -r -P 50001" ...@@ -30,6 +30,12 @@ SCP_BASE="scp ${SSH_OPTIONS} -r -P 50001"
# home directory # home directory
ROOT_DIR="/home/projects/sflphone" ROOT_DIR="/home/projects/sflphone"
# local hidden repository (only for changelog commit)
LOCAL_REPOSITORY=${ROOT_DIR}/.sflphone-repository
# gpg passphrase file
GPG_FILE="${ROOT_DIR}/.gpg-sflphone"
# vbox config directory # vbox config directory
export VBOX_USER_HOME="${ROOT_DIR}/vbox" export VBOX_USER_HOME="${ROOT_DIR}/vbox"
...@@ -62,8 +68,9 @@ USER="sflphone" ...@@ -62,8 +68,9 @@ USER="sflphone"
RELEASE_MODE= RELEASE_MODE=
SNAPSHOT_TAG=`date +%s` SNAPSHOT_TAG=`date +%Y%m%d`
DO_CLEAN=1
DO_PREPARE=1 DO_PREPARE=1
DO_PUSH=1 DO_PUSH=1
DO_MAIN_LOOP=1 DO_MAIN_LOOP=1
...@@ -95,6 +102,7 @@ do ...@@ -95,6 +102,7 @@ do
--help) --help)
echo echo
echo "Options :" echo "Options :"
echo " --skip-clean"
echo " --skip-prepare" echo " --skip-prepare"
echo " --skip-push" echo " --skip-push"
echo " --skip-main-loop" echo " --skip-main-loop"
...@@ -106,6 +114,8 @@ do ...@@ -106,6 +114,8 @@ do
echo " --list-machines" echo " --list-machines"
echo echo
exit 0;; exit 0;;
--skip-clean)
unset DO_CLEAN;;
--skip-prepare) --skip-prepare)
unset DO_PREPARE;; unset DO_PREPARE;;
--skip-push) --skip-push)
...@@ -155,7 +165,9 @@ if [ "${WHO}" != "${USER}" ]; then ...@@ -155,7 +165,9 @@ if [ "${WHO}" != "${USER}" ]; then
fi fi
# logging # logging
if [ ${DO_CLEAN} ]; then
rm -rf ${PACKAGING_RESULT_DIR} 2>/dev/null rm -rf ${PACKAGING_RESULT_DIR} 2>/dev/null
fi
mkdir ${PACKAGING_RESULT_DIR} 2>/dev/null mkdir ${PACKAGING_RESULT_DIR} 2>/dev/null
if [ ${DO_LOGGING} ]; then if [ ${DO_LOGGING} ]; then
...@@ -231,12 +243,9 @@ if [ ${DO_PREPARE} ]; then ...@@ -231,12 +243,9 @@ if [ ${DO_PREPARE} ]; then
fi fi
echo "Version is : ${VERSION}" echo "Version is : ${VERSION}"
# if push is activated # generate the changelog, according to the distribution and the git commit messages
if [ ${DO_PUSH} ];then echo "Update debian changelogs"
cd ${REPOSITORY_DIR}
# first changelog generation for commit
echo "Update debian changelogs (1/2)"
${SCRIPTS_DIR}/sfl-git-dch.sh ${VERSION} ${RELEASE_MODE} ${SCRIPTS_DIR}/sfl-git-dch.sh ${VERSION} ${RELEASE_MODE}
if [ "$?" -ne "0" ]; then if [ "$?" -ne "0" ]; then
...@@ -244,13 +253,18 @@ if [ ${DO_PREPARE} ]; then ...@@ -244,13 +253,18 @@ if [ ${DO_PREPARE} ]; then
exit -1 exit -1
fi fi
# if push is activated
if [[ ${DO_PUSH} && ${RELEASE_MODE} ]];then
echo " Doing commit" echo " Doing commit"
cd ${REPOSITORY_DIR} cd ${LOCAL_REPOSITORY}
git commit -m "[#1262] Updated debian changelogs (${VERSION})" . git commit -m "[#1262] Updated debian changelogs (${VERSION})" .
echo " Pushing commit" echo " Pushing commit"
git push origin master git push origin master
cd -
fi fi
# change current branch if needed # change current branch if needed
...@@ -261,16 +275,6 @@ if [ ${DO_PREPARE} ]; then ...@@ -261,16 +275,6 @@ if [ ${DO_PREPARE} ]; then
echo "Using master branch" echo "Using master branch"
fi fi
# generate the changelog, according to the distribution and the git commit messages
echo "Update debian changelogs (2/2)"
cd ${REPOSITORY_DIR}
${SCRIPTS_DIR}/sfl-git-dch.sh ${VERSION} ${RELEASE_MODE}
if [ "$?" -ne "0" ]; then
echo "!! Cannot update debian changelogs"
exit -1
fi
echo "Write version numbers for following processes" echo "Write version numbers for following processes"
echo "${VERSION}" > ${REPOSITORY_DIR}/sflphone-common/VERSION echo "${VERSION}" > ${REPOSITORY_DIR}/sflphone-common/VERSION
echo "${VERSION}" > ${REPOSITORY_DIR}/sflphone-client-gnome/VERSION echo "${VERSION}" > ${REPOSITORY_DIR}/sflphone-client-gnome/VERSION
...@@ -375,27 +379,9 @@ fi ...@@ -375,27 +379,9 @@ fi
if [ ${DO_SIGNATURES} ]; then if [ ${DO_SIGNATURES} ]; then
echo
echo "Sign packages"
echo
echo "Check GPG agent"
pgrep -u "sflphone" gpg-agent > /dev/null
if [ "$?" -ne "0" ]; then
echo "!! GPG agent is not running"
exit -1
fi
GPG_AGENT_INFO=`cat $HOME/.gpg-agent-info 2> /dev/null`
export ${GPG_AGENT_INFO}
if [ "${GPG_AGENT_INFO}" == "" ]; then
echo "!! Cannot get GPG agent info"
exit -1
fi
echo "Sign packages" echo "Sign packages"
find ${PACKAGING_RESULT_DIR}/deb/dists -name "*.deb" -exec dpkg-sig -k 'Savoir-Faire Linux Inc.' --sign builder --sign-changes full {} \; >/dev/null 2>&1 find ${PACKAGING_RESULT_DIR}/deb/dists -name "*.deb" -exec dpkg-sig -g '-q --passphrase `cat '${GPG_FILE}'`' -k 'Savoir-Faire Linux Inc.' --sign builder --sign-changes full {} \;
find ${PACKAGING_RESULT_DIR}/deb/dists -name "*.changes" -printf "debsign -k'Savoir-Faire Linux Inc.' %p\n" | sh >/dev/null 2>&1 find ${PACKAGING_RESULT_DIR}/deb/dists -name "*.changes" -exec gpg --local-user 'Savoir-Faire Linux Inc.' --passphrase `cat ${GPG_FILE}` --clearsign --list-options no-show-policy-urls --armor --textmode --output {}.asc {} \;
fi fi
######################### #########################
......
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
# @date: 2008 Jan 16 # @date: 2008 Jan 16
ROOT_DIR="/var/repos/sflphone/debian" ROOT_DIR="/var/repos/sflphone/debian"
# gpg passphrase file
GPG_FILE="${ROOT_DIR}/.gpg-sflphone"
USER="sflphone-package-manager" USER="sflphone-package-manager"
export LANG=en_CA.UTF-8 export LANG=en_CA.UTF-8
...@@ -18,19 +22,9 @@ if [ "${WHO}" != "${USER}" ]; then ...@@ -18,19 +22,9 @@ if [ "${WHO}" != "${USER}" ]; then
exit -1; exit -1;
fi fi
echo "Check GPG agent" echo "Remove cache files"
pgrep -u "sflphone-package-manager" gpg-agent > /dev/null rm -f packages-i386.db
if [ "$?" -ne "0" ]; then rm -f packages-amd64.db
echo "!! GPG agent is not running"
exit -1
fi
GPG_AGENT_INFO=`cat $HOME/.gpg-agent-info 2> /dev/null`
export ${GPG_AGENT_INFO}
if [ "${GPG_AGENT_INFO}" == "" ]; then
echo "!! Cannot get GPG agent info"
exit -1
fi
apt-ftparchive generate conf/apt-ftparchive.conf apt-ftparchive generate conf/apt-ftparchive.conf
...@@ -52,23 +46,23 @@ echo "Sign the Release files" ...@@ -52,23 +46,23 @@ echo "Sign the Release files"
rm -f dists/intrepid/Release.gpg rm -f dists/intrepid/Release.gpg
rm -f dists/intrepid-testing/Release.gpg rm -f dists/intrepid-testing/Release.gpg
rm -f dists/intrepid-daily/Release.gpg rm -f dists/intrepid-daily/Release.gpg
gpg --no-tty -u C842D122 --output dists/intrepid/Release.gpg -ba dists/intrepid/Release gpg --passphrase `cat ${GPG_FILE}` --no-tty -u C842D122 --output dists/intrepid/Release.gpg -ba dists/intrepid/Release
gpg --no-tty -u C842D122 --output dists/intrepid-testing/Release.gpg -ba dists/intrepid-testing/Release gpg --passphrase `cat ${GPG_FILE}` --no-tty -u C842D122 --output dists/intrepid-testing/Release.gpg -ba dists/intrepid-testing/Release
gpg --no-tty -u C842D122 --output dists/intrepid-daily/Release.gpg -ba dists/intrepid-daily/Release gpg --passphrase `cat ${GPG_FILE}` --no-tty -u C842D122 --output dists/intrepid-daily/Release.gpg -ba dists/intrepid-daily/Release
rm -f dists/hardy/Release.gpg rm -f dists/hardy/Release.gpg
rm -f dists/hardy-testing/Release.gpg rm -f dists/hardy-testing/Release.gpg
rm -f dists/hardy-daily/Release.gpg rm -f dists/hardy-daily/Release.gpg
gpg --no-tty -u C842D122 --output dists/hardy/Release.gpg -ba dists/hardy/Release gpg --passphrase `cat ${GPG_FILE}` --no-tty -u C842D122 --output dists/hardy/Release.gpg -ba dists/hardy/Release
gpg --no-tty -u C842D122 --output dists/hardy-testing/Release.gpg -ba dists/hardy-testing/Release gpg --passphrase `cat ${GPG_FILE}` --no-tty -u C842D122 --output dists/hardy-testing/Release.gpg -ba dists/hardy-testing/Release
gpg --no-tty -u C842D122 --output dists/hardy-daily/Release.gpg -ba dists/hardy-daily/Release gpg --passphrase `cat ${GPG_FILE}` --no-tty -u C842D122 --output dists/hardy-daily/Release.gpg -ba dists/hardy-daily/Release
rm -f dists/jaunty/Release.gpg rm -f dists/jaunty/Release.gpg
rm -f dists/jaunty-testing/Release.gpg rm -f dists/jaunty-testing/Release.gpg
rm -f dists/jaunty-daily/Release.gpg rm -f dists/jaunty-daily/Release.gpg
gpg --no-tty -u C842D122 --output dists/jaunty/Release.gpg -ba dists/jaunty/Release gpg --passphrase `cat ${GPG_FILE}` --no-tty -u C842D122 --output dists/jaunty/Release.gpg -ba dists/jaunty/Release
gpg --no-tty -u C842D122 --output dists/jaunty-testing/Release.gpg -ba dists/jaunty-testing/Release gpg --passphrase `cat ${GPG_FILE}` --no-tty -u C842D122 --output dists/jaunty-testing/Release.gpg -ba dists/jaunty-testing/Release
gpg --no-tty -u C842D122 --output dists/jaunty-daily/Release.gpg -ba dists/jaunty-daily/Release gpg --passphrase `cat ${GPG_FILE}` --no-tty -u C842D122 --output dists/jaunty-daily/Release.gpg -ba dists/jaunty-daily/Release
echo "All done" echo "All done"
exit 0 exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment