From 61a4706c764384b2ca147cbf9b3e6f0de1621083 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Mon, 1 Jun 2015 12:20:25 +0000 Subject: [PATCH] scripts: Use get_os.sh for packaging Use get_os.sh for determining which distribution and version packages are built for, and upload accordingly. Signed-off-by: Jan Lindemann --- scripts/create-mkdebian.sh | 3 ++- scripts/mkspec-wrapper.sh | 8 ++++++-- scripts/pkg.sh | 8 +++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/create-mkdebian.sh b/scripts/create-mkdebian.sh index 06662169..a5f49afe 100644 --- a/scripts/create-mkdebian.sh +++ b/scripts/create-mkdebian.sh @@ -128,7 +128,8 @@ done chmod 755 rules cd .. -dch --create --newversion \$VERSION-\$RELEASE --controlmaint --package \$NAME --distribution stable "Release built by $0" + +dch --create --newversion \$VERSION-\$RELEASE --controlmaint --package \$NAME --force-distribution --distribution \$DISTRIBUTION "Release built by $0" echo "Produced by $0, the output should be in the \"debian\" sub-directory." EOT diff --git a/scripts/mkspec-wrapper.sh b/scripts/mkspec-wrapper.sh index 2d8619c1..0804f228 100644 --- a/scripts/mkspec-wrapper.sh +++ b/scripts/mkspec-wrapper.sh @@ -16,7 +16,7 @@ usage() [ "$1" ] && exit $1 } -set -- `getopt P:T:V:S:N:hR:D: "$@"` +set -- `getopt P:T:V:S:N:hR:D:d: "$@"` while [ "$1" != -- ]; do case $1 in @@ -49,6 +49,9 @@ case $1 in -P) PROJECT="$2" shift;; + -d) + DISTRIBUTION="$2" + shift;; *) usage 1;; esac @@ -96,7 +99,8 @@ export \ SOURCE \ VERSION RELEASE V \ INSTALL_LOG \ - FILTER_DEVEL + FILTER_DEVEL \ + DISTRIBUTION bash $MKSPEC_SH diff --git a/scripts/pkg.sh b/scripts/pkg.sh index d134f2be..a79c306b 100644 --- a/scripts/pkg.sh +++ b/scripts/pkg.sh @@ -392,6 +392,7 @@ build_pkg() local src_tree=$DIST_SRC_DIR/$src_base local tar_archive=$src_base.tar.bz2 local tar_archive_orig=$src_base.orig.tar.bz2 + local distribution=`os` local RPM_REQUIRES_RUN=`echo $RPM_REQUIRES_RUN | sed "s/__NEXT_VERSION__/$version/g"` local RPM_REQUIRES_DEVEL=`echo $RPM_REQUIRES_DEVEL | sed "s/__NEXT_VERSION__/$version/g"` @@ -448,6 +449,7 @@ build_pkg() -R "$RPM_REQUIRES_RUN" \ -D "$RPM_REQUIRES_DEVEL" \ -P $PROJECT \ + -d $distribution \ > $RPM_PROJECT.$deffmt ) done @@ -529,12 +531,12 @@ upload_pkg() [janware-debian] fqdn = $server # login = - incoming = /srv/ftp/pub/packages/linux/debian/mini-dinstall/incoming/ + incoming = /srv/ftp/pub/packages/all/debian/mini-dinstall/incoming/ method = rsync hash = sha allow_unsigned_uploads = yes distributions = debian-8 - allowed_distributions = stable + allowed_distributions = `os` delayed = run_lintian = no run_dinstall = no @@ -816,7 +818,7 @@ cmd_milk_install_log() for p in run devel; do postinst=$out/$name-$p.postinst - init_postinst $postinst + milk_install_log_init_postinst $postinst cat $out/$name-$p.dirs $out/$name-$p.install | grep . | while read file dir; do #echo read file \"$file\" >&2 file=`echo /$file | sed 's/inst-root\///; s%^//*%/%'`