From de09708e185616fd3dead640e04ef66d8ff796be Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 30 Nov 2013 01:29:02 +0100 Subject: sign packages, add upload code --- bin/build-rpm-package | 15 +++++++++++---- home/.buildscripts/x2go.conf | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 30ee430..9955e4e 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -30,6 +30,7 @@ RPM_BUILDS_FOR="\ fedora: $FEDORA_DISTROS\n\ epel: $EPEL_DISTROS\n\ " +RPM_REPOS_BASE=/var/www/ COMPONENT_MAIN="main" COMPONENT_NIGHTLY="nightly" @@ -215,9 +216,11 @@ build_packages() { if [ "x$SKIP_ARCH" != "xx86_64" ] || [ "$IS_NOARCH" = "yes" ]; then mock -r ${l_DIST}-${l_CODENAME}-x86_64 --result $PKGDIST/$l_DIST/$l_CODENAME/x86_64 $PKGDIST/rpmbuild/SRPMS/$PROJECT-$UPSTREAM_VERSION-$PKG_SRCRELEASE.$IS_RELEASE.git$DATE.$GITREV.$COMPONENT.src.rpm + rpmsign --key-id=$GPG_KEY --addsign $PKGDIST/$l_DIST/$l_CODENAME/x86_64/*.rpm fi if [ "x$SKIP_ARCH" != "xi386" ] && [ "$IS_NOARCH" != "yes" ]; then mock -r ${l_DIST}-${l_CODENAME}-i386 --result $PKGDIST/$l_DIST/$l_CODENAME/i386 $PKGDIST/rpmbuild/SRPMS/$PROJECT-$UPSTREAM_VERSION-$PKG_SRCRELEASE.$IS_RELEASE.git$DATE.$GITREV.$COMPONENT.src.rpm + rpmsign --key-id=$GPG_KEY --addsign $PKGDIST/$l_DIST/$l_CODENAME/i386/*.rpm fi done } @@ -228,6 +231,7 @@ build_packages() { upload_packages() { # dupload the new packages to the reprepro repository + cat "$PROJECT_DIR/RPM_BUILDS_FOR" | egrep -v '(^$|^#.*$)' | while read line; do l_DIST=$(echo ${line/: /:} | cut -d":" -f1 | tr [:upper:] [:lower:]) l_CODENAMES=${CODENAMES:-$(echo ${line/: /:} | cut -d":" -f2- | tr [:upper:] [:lower:])} @@ -239,12 +243,15 @@ upload_packages() { for l_ARCH in x86_64 i386; do [ "x$SKIP_ARCH" != "x$l_ARCH" ] && { - cd "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH" - # TODO: upload package + # create remote directories in archive + ssh $REPOS_SERVER mkdir -p $RPM_REPOS_BASE/$l_DIST/$l_CODENAME/$l_ARCH/rpms + ssh $REPOS_SERVER mkdir -p $RPM_REPOS_BASE/$l_DIST/$l_CODENAME/$l_ARCH/repodata + + # copy rpms into repo + cd "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH" + scp *.rpm $REPOS_SERVER:$RPM_REPOS_BASE/$l_DIST/$l_CODENAME/$l_ARCH/rpms/ - #test -f ./dupload.conf || ln -s ~/.dupload.conf.$PREFIX ./dupload.conf - #ls $PROJECT_*.changes &>/dev/null && dupload -c --to $PREFIX-$l_DIST-$l_CODENAME $PROJECT_*.changes 0<&- } done done diff --git a/home/.buildscripts/x2go.conf b/home/.buildscripts/x2go.conf index d9ea0ef..6a47aca 100644 --- a/home/.buildscripts/x2go.conf +++ b/home/.buildscripts/x2go.conf @@ -18,6 +18,7 @@ DISTS_SUPPORTED="fedora epel" RPM_BUILDS_FOR="\ fedora: fe18 fe19 fe20 rawhide\n\ epel: sl6\n" +RPM_REPOS_BASE=/srv/sites/x2go.org/packages/ COMPONENT_MAIN="main" COMPONENT_NIGHTLY="heuler" -- cgit v1.2.3