From 0aa6b2f033c5d61b8728f848918a0cca4181589e Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 28 Feb 2019 09:58:11 -0800 Subject: Centos6 wasn't able to su into `ctng' user Signed-off-by: Alexey Neyman diff --git a/testing/docker/centos6/Dockerfile b/testing/docker/centos6/Dockerfile index 02a261f..c3a0da8 100644 --- a/testing/docker/centos6/Dockerfile +++ b/testing/docker/centos6/Dockerfile @@ -8,4 +8,6 @@ RUN yum install -y autoconf gperf bison flex texinfo help2man gcc-c++ libtool li 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 +# The limits in this file prevent su'ing to ctng user +RUN rm -f /etc/security/limits.d/90-nproc.conf ENTRYPOINT [ "/sbin/dumb-init", "--" ] -- cgit v0.10.2-6-g49f6 From 857b7928b883e82971eba1dd02288b95c12b61ce Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 28 Feb 2019 11:05:36 -0800 Subject: uClibc-ng replaced a broken .lz tarball for 1.0.31 Signed-off-by: Alexey Neyman diff --git a/packages/uClibc-ng/1.0.31/chksum b/packages/uClibc-ng/1.0.31/chksum index c37dd3d..b553d60 100644 --- a/packages/uClibc-ng/1.0.31/chksum +++ b/packages/uClibc-ng/1.0.31/chksum @@ -2,10 +2,10 @@ md5 uClibc-ng-1.0.31.tar.xz c64afd82cacfc1b03a5e52b3f3fea2ba sha1 uClibc-ng-1.0.31.tar.xz 6c11dc0e62250f59feb4c6aa311206259b337e8d sha256 uClibc-ng-1.0.31.tar.xz 2215d7377118434d1697fd575f10d7a6be3f29e460d6b0e1ee9f6f5306288060 sha512 uClibc-ng-1.0.31.tar.xz 4103287a2861429f476ea4a5534cc291017bf237e9224d47285de05c83bcb58efc1be51985ab2f3e4cf73f43c1429190908ed7a4567c3f2248f4bd5a38d5d1ed -md5 uClibc-ng-1.0.31.tar.lz d41d8cd98f00b204e9800998ecf8427e -sha1 uClibc-ng-1.0.31.tar.lz da39a3ee5e6b4b0d3255bfef95601890afd80709 -sha256 uClibc-ng-1.0.31.tar.lz e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -sha512 uClibc-ng-1.0.31.tar.lz cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e +md5 uClibc-ng-1.0.31.tar.lz 386b50d0d23db97a37ec56e4ad1b6e0d +sha1 uClibc-ng-1.0.31.tar.lz 4e488dbbdb6e24cb51dc5eaeba0daf2b66afcc0d +sha256 uClibc-ng-1.0.31.tar.lz 5fb9e9a42efe5ad22bb785b539b9b4c03058a1b3293e469c067d8d0d73eecc79 +sha512 uClibc-ng-1.0.31.tar.lz 969b414a7a7ddcf80284fa83c27cb932476756d4438d1997f9d4e86541fe3806c533f6ee4c08a9d6cf1aa449bb9111fd71348256978cea69dc05df2a5fd32b1d md5 uClibc-ng-1.0.31.tar.bz2 2b96be86e441e47b47fcb683f066d822 sha1 uClibc-ng-1.0.31.tar.bz2 18cc94308f2c1f95997a674564014f63c39fe0bd sha256 uClibc-ng-1.0.31.tar.bz2 1597b67823f95a6f7e6c71138c8e2324700df83f3bf5c45eae4a861c0ff4492d -- cgit v0.10.2-6-g49f6 From 9b9e5c4162e39b63da4783124e844adf2f223f26 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 28 Feb 2019 14:39:08 -0800 Subject: Make lzip an optional dependency Signed-off-by: Alexey Neyman diff --git a/config/configure.in.in b/config/configure.in.in index a9bb8ad..49fdb2e 100644 --- a/config/configure.in.in +++ b/config/configure.in.in @@ -3,6 +3,9 @@ config CONFIGURE_has_static_link @KCONFIG_static_link@ +config CONFIGURE_has_lzip + @KCONFIG_lzip@ + config CONFIGURE_has_wget @KCONFIG_wget@ diff --git a/configure.ac b/configure.ac index 729047d..dddbd27 100644 --- a/configure.ac +++ b/configure.ac @@ -122,13 +122,24 @@ CTNG_CHECK_PROGS_REQ([readlink], [readlink]) CTNG_CHECK_PROGS_REQ([tar], [tar]) CTNG_CHECK_PROGS_REQ([gzip], [gzip]) CTNG_CHECK_PROGS_REQ([bzip2], [bzip2]) -CTNG_CHECK_PROGS_REQ([lzip], [lzip]) CTNG_CHECK_PROGS_REQ([xz], [xz]) CTNG_CHECK_PROGS_REQ([unzip], [unzip]) CTNG_CHECK_PROGS_REQ([help2man], [help2man]) CTNG_CHECK_PROGS_REQ([file], [file]) CTNG_CHECK_PROGS_REQ([which], [which]) +# Lzip is optional; all the packages that provide tarballs in .tar.lz format +# also provide them in some other format. All other formats are currently +# mandatory as there is at least one package that has no fallback for each +# of them. +# FIXME: this configure.ac should be only used for detecting the dependencies +# of the ct-ng framework itself; anything needed at build time should be +# determined by crosstool-NG.sh - perhaps, through another 'configure' that +# runs during `ct-ng build`. +AC_CHECK_PROGS([lzip], [lzip]) +CTNG_SET_KCONFIG_OPTION([lzip]) +AC_SUBST([lzip]) + # Not a fatal failure even if we have neither - the tarballs may # be provided in a local directory. AC_CHECK_PROGS([wget], [wget]) diff --git a/scripts/functions b/scripts/functions index fecdad2..09df03a 100644 --- a/scripts/functions +++ b/scripts/functions @@ -669,7 +669,9 @@ CT_DoListTarballExt() { printf ".tar.xz\n" printf ".tar.lzma\n" - printf ".tar.lz\n" + if [ "${CT_CONFIGURE_has_lzip}" = "y" ]; then + printf ".tar.lz\n" + fi printf ".tar.bz2\n" printf ".tar.gz\n.tgz\n" printf ".tar\n" @@ -2074,6 +2076,7 @@ CT_PackageRun() CT_DoFetch() { local tmp_dir + local extensions e a if [ "${src_release}" = "y" ]; then # Some packages do not contain any directory level at all @@ -2083,8 +2086,17 @@ CT_DoFetch() basename="${pkg_name}-${version}" fi pkg_dir="${pkg_name}/${version}" + # Check which extensions we are allowed to fetch + for a in ${archive_formats}; do + for e in $(CT_DoListTarballExt); do + if [ "${a}" = "${e}" ]; then + extensions="${extensions} ${a}" + break + fi + done + done if ! CT_GetFile package="${pkg_name}" pkg_dir="${pkg_dir}" dir_name="${dir_name}" \ - basename="${archive_filename}" extensions="${archive_formats}" \ + basename="${archive_filename}" extensions="${extensions}" \ digest="${CT_VERIFY_DOWNLOAD_DIGEST}" \ signature_format="${CT_VERIFY_DOWNLOAD_SIGNATURE:+${signature_format}}" \ mirrors="${mirrors}"; then -- cgit v0.10.2-6-g49f6 From 28e311d2b91d5df019eadcf580d653fc2033fa2e Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 28 Feb 2019 15:28:30 -0800 Subject: Allow already configured directories ... while building in docker Signed-off-by: Alexey Neyman diff --git a/testing/docker/common-scripts/ctng-install b/testing/docker/common-scripts/ctng-install index 6994fd5..1efd264 100755 --- a/testing/docker/common-scripts/ctng-install +++ b/testing/docker/common-scripts/ctng-install @@ -1,7 +1,25 @@ #!/bin/bash set -e +# Mounted directory may already be configured - or may not +# even had bootstrapped. +tar cf - -C / \ + --exclude=crosstool-ng/.build \ + --exclude=crosstool-ng/.build.all \ + --exclude=crosstool-ng/.git \ + --exclude=crosstool-ng/testing/docker \ + crosstool-ng | \ + tar xf - +cd crosstool-ng +if [ -r Makefile ]; then + make distclean +elif [ ! -r configure ]; then + ./bootstrap +fi +cd .. cd work -/crosstool-ng/configure --prefix=/opt/ctng +~/crosstool-ng/configure --prefix=/opt/ctng make make install +cd .. +rm -rf crosstool-ng -- cgit v0.10.2-6-g49f6