Mercurial > hg
view contrib/packaging/dockerrpm @ 42247:970aaf38c3fc
contrib: have byteify-strings explode if run in Python 2
Differential Revision: https://phab.mercurial-scm.org/D6341
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 03 May 2019 15:53:56 -0400 |
parents | 4c0d4bbdc395 |
children | 433cdcb37321 |
line wrap: on
line source
#!/bin/bash -e BUILDDIR=$(dirname $0) export ROOTDIR=$(cd $BUILDDIR/../..; pwd) PLATFORM="$1" shift # extra params are passed to buildrpm DOCKER=$($BUILDDIR/hg-docker docker-path) CONTAINER=hg-docker-$PLATFORM if [[ -z "${HG_DOCKER_OWN_USER}" ]]; then DOCKERUID=1000 DOCKERGID=1000 else DOCKERUID=$(id -u) DOCKERGID=$(id -g) fi $BUILDDIR/hg-docker build --build-arg UID=$DOCKERUID --build-arg GID=$DOCKERGID $BUILDDIR/docker/$PLATFORM $CONTAINER RPMBUILDDIR=$ROOTDIR/packages/$PLATFORM $ROOTDIR/contrib/packaging/buildrpm --rpmbuilddir $RPMBUILDDIR --prepare $* DSHARED=/mnt/shared DBUILDUSER=build $DOCKER run -e http_proxy -e https_proxy -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \ rpmbuild --define "_topdir $DSHARED" -ba $DSHARED/SPECS/mercurial.spec --clean $DOCKER run -e http_proxy -e https_proxy -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \ createrepo $DSHARED cat << EOF > $RPMBUILDDIR/mercurial.repo # Place this file in /etc/yum.repos.d/mercurial.repo [mercurial] name=Mercurial packages for $PLATFORM # baseurl=file://$RPMBUILDDIR/ baseurl=http://hg.example.com/build/$PLATFORM/ skip_if_unavailable=True gpgcheck=0 enabled=1 EOF echo echo "Build complete - results can be found in $RPMBUILDDIR"