From d00d0d43643e5b72fd9b6a224a86c1ffccad8f73 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Wed, 19 Jul 2023 14:58:54 -0500 Subject: [PATCH] cleanups, test in mission-portal please --- ci/Dockerfile-cfengine-build-package | 2 +- ci/clean.sh | 2 +- ci/docker.sh | 2 +- ci/setup-projects.sh | 19 ++++--------------- ci/setup.sh | 17 ++++++++++++++--- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ci/Dockerfile-cfengine-build-package b/ci/Dockerfile-cfengine-build-package index 8a003dbf9..65f1e8951 100644 --- a/ci/Dockerfile-cfengine-build-package +++ b/ci/Dockerfile-cfengine-build-package @@ -1,5 +1,5 @@ FROM ubuntu:20.04 RUN apt-get update -y && apt-get install -y systemd wget sudo ADD "${NTECH_ROOT}/buildscripts/ci/setup.sh" / -RUN /setup.sh +RUN /bin/bash -c '/setup.sh 2>&1 > setup.log' CMD [ "/lib/systemd/systemd" ] diff --git a/ci/clean.sh b/ci/clean.sh index d8026e55a..ca54f7738 100755 --- a/ci/clean.sh +++ b/ci/clean.sh @@ -3,4 +3,4 @@ name=cfengine-build-package # TODO: a softer clean might get into the container and run ./buildscripts/build-scripts/clean-buildmachine docker stop $name docker rm $name -#docker rmi $name +docker rmi $name diff --git a/ci/docker.sh b/ci/docker.sh index 97bf36fd4..8a535d83e 100755 --- a/ci/docker.sh +++ b/ci/docker.sh @@ -26,7 +26,7 @@ mkdir -p "${NTECH_ROOT}/cache" docker cp "${NTECH_ROOT}/cache/." $name:/root/.cache # in order for build-scripts/autogen to generate a revision file: -for i in core buildscripts buildscripts/deps-packaging enterprise nova +for i in core buildscripts buildscripts/deps-packaging enterprise nova masterfiles do docker exec -i $name bash -c "git config --global --add safe.directory /data/$i" done diff --git a/ci/setup-projects.sh b/ci/setup-projects.sh index ccc07700a..f74dcb585 100755 --- a/ci/setup-projects.sh +++ b/ci/setup-projects.sh @@ -1,10 +1,12 @@ #!/usr/bin/env bash -echo "where and what version of node/npm do we have?" +echo "=== tool versions (npm, node, composer) ===" which npm npm --version which node node --version +which composer +composer --version set -ex ( @@ -16,8 +18,6 @@ fi ) # install composer and friends -sudo apt-get -qq -y install curl php7.4-cli php7.4-curl php7.4-zip php7.4-mbstring php7.4-xml php7.4-gd composer - ( if test -f "mission-portal/composer.json"; then cd mission-portal @@ -43,25 +43,14 @@ fi ( if test -f "mission-portal/ldap/composer.json"; then - sudo apt-get -qq -y install php7.4-ldap cd mission-portal/ldap # install PHP dependencies from composer composer install fi ) -# packages needed for autogen -sudo apt-get -qy install git autoconf automake m4 make bison flex \ - binutils libtool gcc g++ libc-dev libpam0g-dev python2 python3 psmisc \ - libtokyocabinet-dev libssl-dev libpcre3-dev default-jre-headless - +# packages needed for autogen are installed in setup.sh NO_CONFIGURE=1 PROJECT=nova ./buildscripts/build-scripts/autogen -# packages needed for building -sudo apt-get -qy install bison flex binutils build-essential fakeroot ntp \ - dpkg-dev libpam0g-dev python2 python3 debhelper pkg-config psmisc nfs-common \ - dpkg-dev debhelper g++ libncurses5 pkg-config build-essential libpam0g-dev fakeroot rsync gcc make sudo wget - # remove unwanted dependencies sudo apt-get -qy purge libltdl-dev libltdl7 #libtool - diff --git a/ci/setup.sh b/ci/setup.sh index 05f7289ae..124e48be8 100755 --- a/ci/setup.sh +++ b/ci/setup.sh @@ -9,6 +9,9 @@ sudo rm -f /bin/rpm # Install dependencies sudo apt-get update -y +# install apt-utils so that debconf can configure installed packages +sudo apt-get install apt-utils + # git is needed for build-scripts/autogen to determine revision for such things as deps-packaging sudo apt-get install -qy git @@ -21,14 +24,22 @@ wget https://bootstrap.pypa.io/pip/2.7/get-pip.py -O get-pip.py sudo python2 get-pip.py sudo pip install psycopg2-binary -# Remove libltdl -sudo apt-get -qy purge 'libltdl*' +# install composer and friends +sudo apt-get -qq -y install curl php7.4-cli php7.4-curl php7.4-zip php7.4-mbstring php7.4-xml php7.4-gd composer php7.4-ldap +# packages needed for autogen +sudo apt-get -qy install git autoconf automake m4 make bison flex \ + binutils libtool gcc g++ libc-dev libpam0g-dev python2 python3 psmisc + +# packages needed for buildscripts +sudo apt-get -qy install libncurses5 rsync +# packages needed for building +sudo apt-get -qy install bison flex binutils build-essential fakeroot ntp \ + dpkg-dev libpam0g-dev python2 python3 debhelper pkg-config psmisc nfs-common # remove unwanted packages sudo apt-get -qq purge apache* "postgresql*" redis* # packages needed for installing Mission portal dependencies - # remove any nodejs or node- packages currently in place sudo apt-get remove -y 'nodejs*' 'node-*' # replace with exact version we want