Merge pull request #1156 from stilor/more-docker-stuff

More docker stuff
This commit is contained in:
Alexey Neyman 2019-02-28 17:35:38 -08:00 committed by GitHub
commit c4126d9397
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 54 additions and 8 deletions

View File

@ -3,6 +3,9 @@
config CONFIGURE_has_static_link
@KCONFIG_static_link@
config CONFIGURE_has_lzip
@KCONFIG_lzip@
config CONFIGURE_has_wget
@KCONFIG_wget@

View File

@ -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])

View File

@ -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

View File

@ -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

View File

@ -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", "--" ]

View File

@ -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