Mercurial > hg
view contrib/packaging/dockerrpm @ 43358:518655314fc5 stable
packaging: use "python3" for fedora29 ... and as buildrpm default
Change the buidrpm default. The CentOS targets explicitly use "python", and
changing the default will only influence Fedora 29.
A Python 3 package needs python3 dependencies, so pythonexe (and pythonver) is
used for specifying dependencies. Other OS versions will keep using "python" as
before ... or potentially change to explicit "python2". Fedora 29 packages can
thus also still be built for Python 2 - just not in the docker image that is
updated for Python 3.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Fri, 01 Nov 2019 12:59:22 +0100 |
parents | 433cdcb37321 |
children | e66a3bfcb19b |
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 mkdir -p $RPMBUILDDIR $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"