This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch feature/create_upload_SRPMs in repository buildscripts. at e28bd10 bin/build-rpm-package: also copy source RPM's to staging dir and sign them. This branch includes the following new commits: new e28bd10 bin/build-rpm-package: also copy source RPM's to staging dir and sign them. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch feature/create_upload_SRPMs in repository buildscripts. commit e28bd10413a06212d2e7304c1b622c3a07985d8e Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Jan 28 20:11:28 2015 +0100 bin/build-rpm-package: also copy source RPM's to staging dir and sign them. --- bin/build-rpm-package | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 164e06e..8a6012d 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -239,7 +239,7 @@ build_packages() { # modify changelog for this build ### TODO: add changelog entry for this automatic build - mkdir -p $PKGDIST/$l_DIST/$l_CODENAME/{x86_64,i386} + mkdir -p $PKGDIST/$l_DIST/$l_CODENAME/{x86_64,i386,SRPM} # TODO: obtain packages from our YUM repository??? #OTHERMIRROR="" @@ -272,6 +272,12 @@ build_packages() { cp "$rpmfile" "$PKGDIST/$l_DIST/$l_CODENAME/x86_64/" done rpmsign-unattended -D "%_gpg_name debian@x2go.org" --addsign "$PKGDIST/$l_DIST/$l_CODENAME/x86_64/"*.rpm + + # also copy and sign source RPM's + find "/var/cache/obs-build/$l_DIST/$l_CODENAME/x86_64/home/abuild/rpmbuild/SRPMS/" -type f | egrep '.*\.rpm$' | while read rpmfile; do + cp "$rpmfile" "$PKGDIST/$l_DIST/$l_CODENAME/SRPM/" + done + rpmsign-unattended -D "%_gpg_name debian@x2go.org" --addsign "$PKGDIST/$l_DIST/$l_CODENAME/SRPM/"*.rpm else rm -Rf "$TEMP_DIR" exit -1 @@ -284,14 +290,19 @@ build_packages() { done ls $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild/SRPMS/$PROJECT-$UPSTREAM_VERSION-$PKG_SRCRELEASE.$IS_RELEASE.git$DATE.$GITREV.$COMPONENT.*.src.rpm | while read srpm; do if mock -r ${l_DIST}-${l_CODENAME}-x86_64 --result $PKGDIST/$l_DIST/$l_CODENAME/x86_64 $srpm; then + # copy and later sign source RPM + cp "$srpm" "$PKGDIST/$l_DIST/$l_CODENAME/SRPM/" + if [ "$l_DIST" = "epel" ] && [ "$l_CODENAME" = "5" ]; then # References: # /usr/lib/rpm/macros # http://adminotes.blogspot.fr/2011/12/centos-6-rpm-sign-problem-v4-signatures... RPMMACRO_V3SIGN="%__gpg_sign_cmd %{__gpg} /usr/bin/gpg --force-v3-sigs --digest-algo=sha1 --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning -u \"%{_gpg_name}\" -sbo %{__signature_filename} %{__plaintext_filename}" rpmsign-unattended -D "%_gpg_name debian@x2go.org" -D "$RPMMACRO_V3SIGN" --addsign $PKGDIST/$l_DIST/$l_CODENAME/x86_64/*.rpm + rpmsign-unattended -D "%_gpg_name debian@x2go.org" -D "$RPMMACRO_V3SIGN" --addsign $PKGDIST/$l_DIST/$l_CODENAME/SRPM/*.rpm else rpmsign-unattended -D "%_gpg_name debian@x2go.org" --addsign $PKGDIST/$l_DIST/$l_CODENAME/x86_64/*.rpm + rpmsign-unattended -D "%_gpg_name debian@x2go.org" --addsign $PKGDIST/$l_DIST/$l_CODENAME/SRPM/*.rpm fi cat $PKGDIST/$l_DIST/$l_CODENAME/x86_64/build.log else @@ -325,6 +336,15 @@ build_packages() { cp "$rpmfile" "$PKGDIST/$l_DIST/$l_CODENAME/i386/" done rpmsign-unattended -D "%_gpg_name debian@x2go.org" --addsign "$PKGDIST/$l_DIST/$l_CODENAME/i386/"*.rpm + + # copy and later sign source RPM's, if needed (that is, not already generated by x86_64/noarch code above) + SEARCH_SRPM="$(find "$PKGDIST/$l_DIST/$l_CODENAME/SRPM" -name "*.rpm" -print)" + if [ -z "$SEARCH_SRPM" ]; then + find "/var/cache/obs-build/$l_DIST/$l_CODENAME/i386/home/abuild/rpmbuild/SRPMS/" -type f | egrep '.*\.rpm$' | while read rpmfile; do + cp "$rpmfile" "$PKGDIST/$l_DIST/$l_CODENAME/SRPM/" + done + rpmsign-unattended -D "%_gpg_name debian@x2go.org" --addsign "$PKGDIST/$l_DIST/$l_CODENAME/SRPM/"*.rpm + fi else rm -Rf "$TEMP_DIR" exit -1 @@ -337,11 +357,20 @@ build_packages() { rm -f $PKGDIST/$l_DIST/$l_CODENAME/i386/build.log ls $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild/SRPMS/$PROJECT-$UPSTREAM_VERSION-$PKG_SRCRELEASE.$IS_RELEASE.git$DATE.$GITREV.$COMPONENT.*.src.rpm | while read srpm; do if nice mock -r ${l_DIST}-${l_CODENAME}-i386 --result $PKGDIST/$l_DIST/$l_CODENAME/i386 "$srpm"; then + # only copy and sign source RPM if necessary + SIGN_SRPM=0 + if [ ! -e "$PKGDIST/$l_DIST/$l_CODENAME/SRPM/$(basename "$srpm")" ]; then + cp "$srpm" "$PKGDIST/$l_DIST/$l_CODENAME/SRPM/" + SIGN_SRPM=1 + fi + if [ "$l_DIST" = "epel" ] && [ "$l_CODENAME" = "5" ]; then RPMMACRO_V3SIGN="%__gpg_sign_cmd /usr/bin/gpg --force-v3-sigs --digest-algo=sha1 --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning -u \"%_gpg_name\" -sbo %{__signature_filename} %{__plaintext_filename}" rpmsign-unattended -D "%_gpg_name debian@x2go.org" -D "$RPMMACRO_V3SIGN" --addsign $PKGDIST/$l_DIST/$l_CODENAME/i386/*.rpm + [ "x$SIGN_SRPM" = "x1" ] && rpmsign-unattended -D "%_gpg_name debian@x2go.org" -D "$RPMMACRO_V3SIGN" --addsign $PKGDIST/$l_DIST/$l_CODENAME/SRPM/*.rpm else rpmsign-unattended -D "%_gpg_name debian@x2go.org" --addsign $PKGDIST/$l_DIST/$l_CODENAME/i386/*.rpm + [ "x$SIGN_SRPM" = "x1" ] && rpmsign-unattended -D "%_gpg_name debian@x2go.org" --addsign $PKGDIST/$l_DIST/$l_CODENAME/i386/*.rpm fi cat $PKGDIST/$l_DIST/$l_CODENAME/i386/build.log else -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git