[X2Go-Commits] [buildscripts] 01/01: Clean up source RPM files from binary file places.

git-admin at x2go.org git-admin at x2go.org
Fri Mar 6 03:41:21 CET 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository buildscripts.

commit 9f886b657bfa23691bdb4cfbc911f1f55a46278a
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Fri Mar 6 03:41:04 2015 +0100

    Clean up source RPM files from binary file places.
---
 bin/build-rpm-package |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index b8d669c..f571cca 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -1,6 +1,7 @@
 #!/bin/bash
 
 # Copyright (C) 2011-2013 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+# Copyright (C) 2015      by Mihai Moldovan <ionic at ionic.de>
 #
 # This programme is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -276,7 +277,7 @@ build_packages() {
 						             --clean \
 						             $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild/SOURCES/$PROJECT.spec; then
 							mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/x86_64/"
-							find "/var/cache/obs-build/$l_DIST/$l_CODENAME/x86_64/$BUILD_RESULT/RPMS/" -type f | egrep '.*\.rpm$' | while read rpmfile; do
+							find "/var/cache/obs-build/$l_DIST/$l_CODENAME/x86_64/$BUILD_RESULT/RPMS/" -type f | egrep '.*\.rpm$' | egrep -v '.*\.src\.rpm$' | while read rpmfile; do
 								cp "$rpmfile" "$PKGDIST/$l_DIST/$l_CODENAME/x86_64/"
 							done
 							rpmsign-unattended -D "%_gpg_name debian at x2go.org" --addsign "$PKGDIST/$l_DIST/$l_CODENAME/x86_64/"*.rpm
@@ -301,6 +302,9 @@ build_packages() {
 								# copy and later sign source RPM
 								cp "$srpm" "$PKGDIST/$l_DIST/$l_CODENAME/SRPM/"
 
+								# Clean up source RPM files. We copy them manually.
+								find "${PKGDIST}/${l_DIST}/${l_CODENAME}/x86_64" -type 'f' -iname '*.src.rpm' -exec rm -f '{}' \;
+
 								if [ "$l_DIST" = "epel" ] && [ "$l_CODENAME" = "5" ]; then
 									# References:
 									# /usr/lib/rpm/macros
@@ -344,15 +348,15 @@ build_packages() {
 						                    --clean \
 						                    $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild/SOURCES/$PROJECT.spec; then
 							mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/i386/"
-							find "/var/cache/obs-build/$l_DIST/$l_CODENAME/i386/$BUILD_RESULT/RPMS/" -type f | egrep '.*\.rpm$' | while read rpmfile; do
+							find "/var/cache/obs-build/$l_DIST/$l_CODENAME/i386/$BUILD_RESULT/RPMS/" -type f | egrep '.*\.rpm$' | egrep -v '.*\.src\.rpm$' | while read rpmfile; do
 								cp "$rpmfile" "$PKGDIST/$l_DIST/$l_CODENAME/i386/"
 							done
 							rpmsign-unattended -D "%_gpg_name debian at 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)"
+							SEARCH_SRPM="$(find "$PKGDIST/$l_DIST/$l_CODENAME/SRPM" -type 'f' -name "*.src.rpm" -print)"
 							if [ -z "$SEARCH_SRPM" ]; then
-								find "/var/cache/obs-build/$l_DIST/$l_CODENAME/i386/$BUILD_RESULT/SRPMS/" -type f | egrep '.*\.rpm$' | while read rpmfile; do
+								find "/var/cache/obs-build/$l_DIST/$l_CODENAME/i386/$BUILD_RESULT/SRPMS/" -type 'f' | egrep '.*\.src\.rpm$' | while read rpmfile; do
 									cp "$rpmfile" "$PKGDIST/$l_DIST/$l_CODENAME/SRPM/"
 								done
 								rpmsign-unattended -D "%_gpg_name debian at x2go.org" --addsign "$PKGDIST/$l_DIST/$l_CODENAME/SRPM/"*.rpm
@@ -376,6 +380,9 @@ build_packages() {
 									SIGN_SRPM=1
 								fi
 
+								# Clean up source RPM files. We copy them manually.
+								find "${PKGDIST}/${l_DIST}/${l_CODENAME}/i386" -type 'f' -iname '*.src.rpm' -exec rm -f '{}' \;
+
 								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 at x2go.org" -D "$RPMMACRO_V3SIGN" --addsign $PKGDIST/$l_DIST/$l_CODENAME/i386/*.rpm

--
Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git


More information about the x2go-commits mailing list