Patchwork [STABLE] buildrpm: move creation of RPM directories from dockerrpm

login
register
mail settings
Submitter Mathias De Maré
Date Jan. 12, 2016, 4:23 p.m.
Message ID <e505b8864dd50b333edb.1452615827@waste.org>
Download mbox | patch
Permalink /patch/12693/
State Accepted
Commit d713fa934fb95581953f0ef2873973a3661a41c1
Headers show

Comments

Mathias De Maré - Jan. 12, 2016, 4:23 p.m.
# HG changeset patch
# User Mathias De Maré <mathias.demare@gmail.com>
# Date 1452145477 -3600
#      Thu Jan 07 06:44:37 2016 +0100
# Branch stable
# Node ID e505b8864dd50b333edb14a7c37baa0cff9a8aba
# Parent  6c7d26cef0cda4752c02b7478f1270a84393510b
buildrpm: move creation of RPM directories from dockerrpm

Handling the creation of the RPM directories in buildrpm
is more consistent and takes care of non-docker builds as well.
Bryan O'Sullivan - Jan. 14, 2016, 10:20 p.m.
On Tue, Jan 12, 2016 at 8:23 AM, Mathias De Maré <mathias.demare@gmail.com>
wrote:

> buildrpm: move creation of RPM directories from dockerrpm
>

I applied this before I saw the follow-on discussion. Simply changing the
shebang line to a bash script should fix the problem reported by Anton.

Patch

diff --git a/contrib/buildrpm b/contrib/buildrpm
--- a/contrib/buildrpm
+++ b/contrib/buildrpm
@@ -68,7 +68,7 @@ 
     RPMPYTHONVER=%{nil}
 fi
 
-mkdir -p $RPMBUILDDIR/SOURCES
+mkdir -p $RPMBUILDDIR/{SOURCES,BUILD,SRPMS,RPMS}
 $HG archive -t tgz $RPMBUILDDIR/SOURCES/mercurial-$version-$release.tar.gz
 if [ "$PYTHONVER" ]; then
 (
diff --git a/contrib/dockerrpm b/contrib/dockerrpm
--- a/contrib/dockerrpm
+++ b/contrib/dockerrpm
@@ -15,8 +15,6 @@ 
 RPMBUILDDIR=$ROOTDIR/packages/$PLATFORM
 contrib/buildrpm --rpmbuilddir $RPMBUILDDIR --prepare $*
 
-mkdir -p $RPMBUILDDIR/{BUILD,SRPMS,RPMS}
-
 DSHARED=/mnt/shared
 $DOCKER run -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \
     rpmbuild --define "_topdir $DSHARED" -ba $DSHARED/SPECS/mercurial.spec --clean