create the signature to the Packages file for authentication checking

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15212 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
xq2005 2013-02-20 06:07:54 +00:00
parent afe5dd5024
commit bf2aa12fd3

View File

@ -99,6 +99,27 @@ else
tar_name="core-debs-snap.tar.bz2"
fi
#use flock to only one person build at the same time
# Get a lock, so can not do 2 builds at once
exec 8>/var/lock/xcatbld.lock
if ! flock -n 8; then
echo "Can't get lock /var/lock/xcatbld.lock. Someone else must be doing a build right now. Exiting...."
exit 1
fi
export HOME=/root
#sync the gpg key to the build machine local
gsa_url=http://pokgsa.ibm.com/projects/x/xcat/build/linux
mkdir -p $HOME/.gnupg
for key_name in pubring.gpg secring.gpg trustdb.gpg; do
if [ ! -f $HOME/.gnupg/$key_name ] || [ `wc -c $HOME/.gnupg/$key_name|cut -f 1 -d' '` == 0 ]; then
rm -f $HOME/.gnupg/$key_name
wget -P $HOME/.gnupg $GSA/keys/$key_name
chmod 600 $HOME/.gnupg/$key_name
fi
done
if [ "$c_flag" ]
then
# strip the /src/xcat-core from the end of the dir to get the next dir up and use as the release
@ -157,7 +178,7 @@ then
rm -f ../../debs/${file_low}-amd64_*.deb
cd $file
dch -v $pkg_version -b -c debian/changelog $build_string
dpkg-buildpackage
dpkg-buildpackage -uc -us
rc=$?
if [ $rc -gt 0 ]; then
echo "Error: $file build package failed exit code $rc"
@ -191,12 +212,14 @@ Codename: $dist
Architectures: amd64 i386
Components: main
Description: Repository automatically genereted conf
SignWith: yes
__EOF__
done
cat << __EOF__ > conf/options
verbose
ask-passphrase
basedir .
__EOF__
@ -287,12 +310,14 @@ Codename: $dist
Architectures: i386 amd64
Components: main
Description: Repository automatically genereted conf
SignWith: yes
__EOF__
done
cat << __EOF__ > conf/options
verbose
ask-passphrase
basedir .
__EOF__