From e738751e83b8590fe71c23d02027d92df6ee83a8 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sat, 27 Oct 2018 14:19:27 -0700 Subject: Accept any libtool version ct-ng will build its own version if a recent enough version is not detected. Signed-off-by: Alexey Neyman diff --git a/configure.ac b/configure.ac index d06be67..791cb7a 100644 --- a/configure.ac +++ b/configure.ac @@ -172,7 +172,7 @@ CTNG_PROG_VERSION_REQ_ANY([MAKE], [make_3_81_or_newer]) # Check other companion tools that we may or may not build. -CTNG_PROG_VERSION_REQ_STRICT([LIBTOOL], +CTNG_PROG_VERSION([LIBTOOL], [GNU libtool >= 2.4], [libtool], [glibtool libtool], -- cgit v0.10.2-6-g49f6 From dc01f618986a45a61ba35f9ecc3eaf1e884d715c Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sat, 27 Oct 2018 14:51:15 -0700 Subject: Add libtool to CentOS6 docker configuration Signed-off-by: Alexey Neyman diff --git a/testing/docker/centos6/Dockerfile b/testing/docker/centos6/Dockerfile index f76100f..e66386b 100644 --- a/testing/docker/centos6/Dockerfile +++ b/testing/docker/centos6/Dockerfile @@ -3,7 +3,7 @@ ARG CTNG_UID ARG CTNG_GID RUN groupadd -g $CTNG_GID ctng RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng -RUN yum install -y autoconf gperf bison flex texinfo help2man gcc-c++ patch \ +RUN yum install -y autoconf gperf bison flex texinfo help2man gcc-c++ libtool libtool-bin patch \ ncurses-devel python-devel perl-Thread-Queue bzip2 git wget xz unzip RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 RUN chmod a+x /sbin/dumb-init -- cgit v0.10.2-6-g49f6 From 9d432466648c50ca379ccc2db1c2839c3a7465fa Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sun, 28 Oct 2018 10:44:22 -0700 Subject: Change the layout a bit ... to a more natural installation paths, and also include ct-ng into $PATH in the containers. Signed-off-by: Alexey Neyman diff --git a/.gitignore b/.gitignore index 98e69eb..8010036 100644 --- a/.gitignore +++ b/.gitignore @@ -32,7 +32,9 @@ temp.* stamp-h1 # Testing -testing/docker/build-* +testing/docker/*/build +testing/docker/*/install +testing/docker/*/xtools # This is the place where toolchains are built .build/ diff --git a/testing/docker/archlinux/Dockerfile b/testing/docker/archlinux/Dockerfile index dd114b0..5f2b717 100644 --- a/testing/docker/archlinux/Dockerfile +++ b/testing/docker/archlinux/Dockerfile @@ -7,5 +7,6 @@ RUN pacman -Syu --noconfirm RUN pacman -S --noconfirm base-devel git help2man python unzip wget RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 RUN chmod a+x /sbin/dumb-init +RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile RUN echo 'export MENUCONFIG_COLOR=mono' >> /etc/profile ENTRYPOINT [ "/sbin/dumb-init", "--" ] diff --git a/testing/docker/centos6/Dockerfile b/testing/docker/centos6/Dockerfile index e66386b..02a261f 100644 --- a/testing/docker/centos6/Dockerfile +++ b/testing/docker/centos6/Dockerfile @@ -7,4 +7,5 @@ RUN yum install -y autoconf gperf bison flex texinfo help2man gcc-c++ libtool li ncurses-devel python-devel perl-Thread-Queue bzip2 git wget xz unzip RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 RUN chmod a+x /sbin/dumb-init +RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile ENTRYPOINT [ "/sbin/dumb-init", "--" ] diff --git a/testing/docker/centos7/Dockerfile b/testing/docker/centos7/Dockerfile index 4f1e4dc..b0f928d 100644 --- a/testing/docker/centos7/Dockerfile +++ b/testing/docker/centos7/Dockerfile @@ -7,4 +7,5 @@ RUN yum install -y autoconf gperf bison file flex texinfo help2man gcc-c++ libto ncurses-devel python-devel perl-Thread-Queue bzip2 git wget which xz unzip RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 RUN chmod a+x /sbin/dumb-init +RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile ENTRYPOINT [ "/sbin/dumb-init", "--" ] diff --git a/testing/docker/common-scripts/ctng-build-sample b/testing/docker/common-scripts/ctng-build-sample index 6a6de6a..ef823ee 100755 --- a/testing/docker/common-scripts/ctng-build-sample +++ b/testing/docker/common-scripts/ctng-build-sample @@ -1,9 +1,5 @@ #!/bin/bash set -e -cd -rm -rf work/bld-samples -mkdir -p work/bld-samples work/inst-xtools -cd work/bld-samples -export PATH=$HOME/work/inst-ctng/bin:$PATH -ct-ng build-all CT_PREFIX=$HOME/work/inst-xtools ${1+CT_SAMPLES="$*"} +cd work +ct-ng build-all ${1+CT_SAMPLES="$*"} diff --git a/testing/docker/common-scripts/ctng-install b/testing/docker/common-scripts/ctng-install index 500cb73..6994fd5 100755 --- a/testing/docker/common-scripts/ctng-install +++ b/testing/docker/common-scripts/ctng-install @@ -1,10 +1,7 @@ #!/bin/bash set -e -cd -rm -rf work/bld-ctng work/inst-ctng -mkdir work/bld-ctng -cd work/bld-ctng -/crosstool-ng/configure --prefix=$HOME/work/inst-ctng +cd work +/crosstool-ng/configure --prefix=/opt/ctng make make install diff --git a/testing/docker/common-scripts/ctng-test-basic b/testing/docker/common-scripts/ctng-test-basic index 0edb899..a811ec6 100755 --- a/testing/docker/common-scripts/ctng-test-basic +++ b/testing/docker/common-scripts/ctng-test-basic @@ -2,7 +2,6 @@ set -e cd -export PATH=$HOME/work/inst-ctng/bin:$PATH ct-ng help ct-ng list-samples ct-ng list-steps diff --git a/testing/docker/dmgr.sh b/testing/docker/dmgr.sh index c059a6f..1330867 100755 --- a/testing/docker/dmgr.sh +++ b/testing/docker/dmgr.sh @@ -36,6 +36,17 @@ EOF exit 1 } +do_cleanup() +{ + local d + + for d in "$@"; do + [ -d "$d" ] || continue + chmod -R a+w "$d" + rm -rf "$d" + done +} + # Build a docker container, store its ID. action_build() { @@ -54,11 +65,13 @@ _dckr() local scmd prefix shift - mkdir -p build-${cntr} + mkdir -p ${cntr}/{build,install,xtools} prefix="docker run --rm -i -t \ -v `pwd`/common-scripts:/common-scripts:ro \ -v ${topdir}:/crosstool-ng:ro \ - -v `pwd`/build-${cntr}:/home/ctng/work \ + -v `pwd`/${cntr}/build:/home/ctng/work \ + -v `pwd`/${cntr}/install:/opt/ctng \ + -v `pwd`/${cntr}/xtools:/home/ctng/x-tools \ -v $HOME/src:/home/ctng/src:ro \ ctng-${cntr}" if [ -n "${AS_ROOT}" ]; then @@ -77,6 +90,7 @@ action_install() # The test assumes the top directory is bootstrapped, but clean. msg "Setting up crosstool-NG in ${cntr}" + do_cleanup ${cntr}/build _dckr "${cntr}" /common-scripts/ctng-install && \ _dckr "${cntr}" /common-scripts/ctng-test-basic } @@ -87,8 +101,8 @@ action_sample() local cntr=$1 shift - # The test assumes the top directory is bootstrapped, but clean. msg "Building samples in ${cntr} [$@]" + do_cleanup ${cntr}/build _dckr "${cntr}" /common-scripts/ctng-build-sample "$@" } @@ -117,10 +131,16 @@ action_clean() local cntr=$1 msg "Cleaning up after ${cntr}" - if [ -d build-${cntr} ]; then - chmod -R a+w build-${cntr} - rm -rf build-${cntr} - fi + do_cleanup ${cntr}/build +} + +# Clean up after test suite run +action_distclean() +{ + local cntr=$1 + + msg "Dist cleaning ${cntr}" + do_cleanup ${cntr}/{build,install,xtools} } all_containers=`ls */Dockerfile | sed 's,/Dockerfile,,'` @@ -132,7 +152,7 @@ if [ "${selected_containers}" = "all" ]; then fi case "${action}" in - build|install|sample|enter|root|clean) + build|install|sample|enter|root|clean|distclean) for c in ${selected_containers}; do eval "action_${action} ${c} \"$@\"" done diff --git a/testing/docker/gentoo-amd64/Dockerfile b/testing/docker/gentoo-amd64/Dockerfile index ab5ac94..ec5c131 100644 --- a/testing/docker/gentoo-amd64/Dockerfile +++ b/testing/docker/gentoo-amd64/Dockerfile @@ -5,4 +5,5 @@ RUN groupadd -g $CTNG_GID ctng RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 RUN chmod a+x /sbin/dumb-init +RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile ENTRYPOINT [ "/sbin/dumb-init", "--" ] diff --git a/testing/docker/mint19-amd64/Dockerfile b/testing/docker/mint19-amd64/Dockerfile index 8fdcc52..65c2738 100644 --- a/testing/docker/mint19-amd64/Dockerfile +++ b/testing/docker/mint19-amd64/Dockerfile @@ -8,4 +8,5 @@ RUN apt-get install -y gcc gperf bison flex texinfo help2man make libncurses5-de python-dev autoconf automake libtool libtool-bin gawk RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 RUN chmod a+x /sbin/dumb-init +RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile ENTRYPOINT [ "/sbin/dumb-init", "--" ] -- cgit v0.10.2-6-g49f6 From 6eb2a236a9b39a2523b8373c8aaa47eebdbc5f97 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sun, 28 Oct 2018 11:28:13 -0700 Subject: More docker files ... for reference OSes Signed-off-by: Alexey Neyman diff --git a/testing/docker/fedora28/Dockerfile b/testing/docker/fedora28/Dockerfile new file mode 100644 index 0000000..20363c9 --- /dev/null +++ b/testing/docker/fedora28/Dockerfile @@ -0,0 +1,11 @@ +FROM fedora:28 +ARG CTNG_UID +ARG CTNG_GID +RUN groupadd -g $CTNG_GID ctng +RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng +RUN yum install -y autoconf gperf bison file flex texinfo help2man gcc-c++ libtool make patch \ + ncurses-devel python-devel perl-Thread-Queue bzip2 git wget which xz unzip +RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 +RUN chmod a+x /sbin/dumb-init +RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile +ENTRYPOINT [ "/sbin/dumb-init", "--" ] diff --git a/testing/docker/mint19-amd64/Dockerfile b/testing/docker/mint19-amd64/Dockerfile index 65c2738..7a0e4ba 100644 --- a/testing/docker/mint19-amd64/Dockerfile +++ b/testing/docker/mint19-amd64/Dockerfile @@ -5,7 +5,7 @@ RUN groupadd -g $CTNG_GID ctng RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng RUN apt-get update RUN apt-get install -y gcc gperf bison flex texinfo help2man make libncurses5-dev \ - python-dev autoconf automake libtool libtool-bin gawk + python-dev autoconf automake libtool libtool-bin gawk wget RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 RUN chmod a+x /sbin/dumb-init RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile diff --git a/testing/docker/ubuntu16.04/Dockerfile b/testing/docker/ubuntu16.04/Dockerfile new file mode 100644 index 0000000..36b7ec5 --- /dev/null +++ b/testing/docker/ubuntu16.04/Dockerfile @@ -0,0 +1,14 @@ +FROM ubuntu:16.04 +ARG CTNG_UID +ARG CTNG_GID +RUN groupadd -g $CTNG_GID ctng +RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng +RUN apt-get update +RUN apt-get install -y gcc gperf bison flex texinfo help2man make libncurses5-dev \ + python-dev autoconf automake libtool libtool-bin gawk wget bzip2 xz-utils unzip \ + patch +RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 +RUN chmod a+x /sbin/dumb-init +RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile +ENTRYPOINT [ "/sbin/dumb-init", "--" ] + diff --git a/testing/docker/ubuntu18.04/Dockerfile b/testing/docker/ubuntu18.04/Dockerfile new file mode 100644 index 0000000..13e1ba0 --- /dev/null +++ b/testing/docker/ubuntu18.04/Dockerfile @@ -0,0 +1,14 @@ +FROM ubuntu:18.04 +ARG CTNG_UID +ARG CTNG_GID +RUN groupadd -g $CTNG_GID ctng +RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng +RUN apt-get update +RUN apt-get install -y gcc gperf bison flex texinfo help2man make libncurses5-dev \ + python-dev autoconf automake libtool libtool-bin gawk wget bzip2 xz-utils unzip \ + patch +RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 +RUN chmod a+x /sbin/dumb-init +RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile +ENTRYPOINT [ "/sbin/dumb-init", "--" ] + diff --git a/testing/docker/ubuntu18.10/Dockerfile b/testing/docker/ubuntu18.10/Dockerfile new file mode 100644 index 0000000..b2ee94a --- /dev/null +++ b/testing/docker/ubuntu18.10/Dockerfile @@ -0,0 +1,14 @@ +FROM ubuntu:18.10 +ARG CTNG_UID +ARG CTNG_GID +RUN groupadd -g $CTNG_GID ctng +RUN useradd -d /home/ctng -m -g $CTNG_GID -u $CTNG_UID -s /bin/bash ctng +RUN apt-get update +RUN apt-get install -y gcc gperf bison flex texinfo help2man make libncurses5-dev \ + python-dev autoconf automake libtool libtool-bin gawk wget bzip2 xz-utils unzip \ + patch +RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 +RUN chmod a+x /sbin/dumb-init +RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile +ENTRYPOINT [ "/sbin/dumb-init", "--" ] + -- cgit v0.10.2-6-g49f6