diff options
author | Dmitry Tantsur <divius.inside@gmail.com> | 2017-06-05 13:09:06 +0200 |
---|---|---|
committer | Dmitry Tantsur <divius.inside@gmail.com> | 2017-06-12 15:58:45 +0000 |
commit | 553b72dc819a9765521f2f8938da9dbeb1609d38 (patch) | |
tree | df1d52940ee884488bec40b4629b1974a382874a | |
parent | e46f75ed0924bae57bc885a950c68a193c5e0eec (diff) | |
download | ironic-python-agent-newton-eol.tar.gz |
[imagebuild] support requirements referring to /opt/stack/newnewton-eolstable/newton
Now that ironic-lib builds IPA from source, the IPA building procedure
needs to support requirements referring to /opt/stack/new.
As upper-constraints are not actually needed in the finalise step, they're
no longer used there to avoid dealing with file:/// references. We also
allow pre-release packages to be installed by pip.
Also install git as it's a build requirement for PBR.
Only tinyipa is updated, as it's used in the ironic-lib gate.
Change-Id: Ia942cb710eb3fe1ba56c68f91fa893795c9cb651
Closes-Bug: #1695877
(cherry picked from commit 381f5073b5d7b15ac848cdbc8dfbb252ff417aba)
-rwxr-xr-x | imagebuild/tinyipa/build-tinyipa.sh | 15 | ||||
-rw-r--r-- | imagebuild/tinyipa/build_files/buildreqs.lst | 1 | ||||
-rwxr-xr-x | imagebuild/tinyipa/finalise-tinyipa.sh | 4 |
3 files changed, 17 insertions, 3 deletions
diff --git a/imagebuild/tinyipa/build-tinyipa.sh b/imagebuild/tinyipa/build-tinyipa.sh index 55bc94d9..d6653759 100755 --- a/imagebuild/tinyipa/build-tinyipa.sh +++ b/imagebuild/tinyipa/build-tinyipa.sh @@ -68,6 +68,8 @@ cp requirements.txt $BUILDDIR/tmp/ipa-requirements.txt imagebuild/common/generate_upper_constraints.sh upper-constraints.txt cp upper-constraints.txt $BUILDDIR/tmp/upper-constraints.txt +echo Using upper-constraints: +cat upper-constraints.txt cd $WORKDIR sudo cp /etc/resolv.conf $BUILDDIR/etc/resolv.conf @@ -76,6 +78,17 @@ trap "sudo umount $BUILDDIR/proc; sudo umount $BUILDDIR/dev/pts" EXIT sudo mount --bind /proc $BUILDDIR/proc sudo mount --bind /dev/pts $BUILDDIR/dev/pts +if [ -d /opt/stack/new ]; then + # Running in CI environment, make checkouts available + $CHROOT_CMD mkdir -p /opt/stack/new + for project in $(ls /opt/stack/new); do + if grep -q "$project" $BUILDDIR/tmp/upper-constraints.txt && + [ -d "/opt/stack/new/$project/.git" ]; then + sudo cp -R "/opt/stack/new/$project" $BUILDDIR/opt/stack/new/ + fi + done +fi + $CHROOT_CMD mkdir /etc/sysconfig/tcedir $CHROOT_CMD chmod a+rwx /etc/sysconfig/tcedir $CHROOT_CMD touch /etc/sysconfig/tcuser @@ -95,6 +108,8 @@ $CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels setu $CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels pip $CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels -r /tmp/ipa-requirements.txt $CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --no-index --pre --wheel-dir /tmp/wheels --find-links=/tmp/localpip --find-links=/tmp/wheels ironic-python-agent +echo Resulting wheels: +ls -1 $BUILDDIR/tmp/wheels # Build tgt rm -rf $WORKDIR/build_files/tgt.tcz diff --git a/imagebuild/tinyipa/build_files/buildreqs.lst b/imagebuild/tinyipa/build_files/buildreqs.lst index 2b5c216d..5e16e432 100644 --- a/imagebuild/tinyipa/build_files/buildreqs.lst +++ b/imagebuild/tinyipa/build_files/buildreqs.lst @@ -16,3 +16,4 @@ zlib_base-dev.tcz glib2-dev.tcz pixman-dev.tcz binutils.tcz +git.tcz diff --git a/imagebuild/tinyipa/finalise-tinyipa.sh b/imagebuild/tinyipa/finalise-tinyipa.sh index 49b5d8cd..27c0db27 100755 --- a/imagebuild/tinyipa/finalise-tinyipa.sh +++ b/imagebuild/tinyipa/finalise-tinyipa.sh @@ -123,9 +123,7 @@ $CHROOT_CMD depmod -a `$WORKDIR/build_files/fakeuname -r` # If flag is set install the python now if $BUILD_AND_INSTALL_TINYIPA ; then - cp -a $BUILDDIR/tmp/upper-constraints.txt $FINALDIR/tmp/upper-constraints.txt - $CHROOT_CMD python /tmp/get-pip.py -c /tmp/upper-constraints.txt --no-wheel --no-index --find-links=file:///tmp/wheelhouse ironic_python_agent - rm -rf $FINALDIR/tmp/upper-constraints.txt + $CHROOT_CMD python /tmp/get-pip.py --no-wheel --no-index --find-links=file:///tmp/wheelhouse --pre ironic_python_agent rm -rf $FINALDIR/tmp/wheelhouse rm -rf $FINALDIR/tmp/get-pip.py fi |