summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2013-11-30 01:29:02 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2013-11-30 01:29:02 +0100
commitde09708e185616fd3dead640e04ef66d8ff796be (patch)
treee549de1ddbf91d787690d7a4cdb316852bd9dcde
parent2f0cd01670f90d5fdbd2719f52781568ae8f117e (diff)
downloadbuildscripts-de09708e185616fd3dead640e04ef66d8ff796be.tar.gz
buildscripts-de09708e185616fd3dead640e04ef66d8ff796be.tar.bz2
buildscripts-de09708e185616fd3dead640e04ef66d8ff796be.zip
sign packages, add upload code
-rwxr-xr-xbin/build-rpm-package15
-rw-r--r--home/.buildscripts/x2go.conf1
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"