commit d7db0ca32e9c9eac3fefacf20d53ea0251b836f0 Author: cyteen Date: Thu Nov 5 16:20:18 2020 +0000 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1177240 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.tar.xz filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md new file mode 100644 index 0000000..d55f293 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# About this Repo + +The generated tarballs don't belong in a git repo. In the past we had to use git checkout --orphan, which very effectively discards all the history of the branch for each tarball. The benefit is much shorter download times, since there's no big binary history. + +Now the tarballs are handled by git-lfs: +git lfs install # initialize the Git LFS project +git lfs track "*.tar.xz" + +This is the Git repo of the Docker [official image](https://docs.docker.com/docker-hub/official_repos/) for [debian](https://registry.hub.docker.com/_/debian/). See [the Docker Hub page](https://registry.hub.docker.com/_/debian/) for the full readme on how to use this Docker image and for information regarding contributing and issues. + +The full readme is generated over in [docker-library/docs](https://github.com/docker-library/docs), specificially in [docker-library/docs/debian](https://github.com/docker-library/docs/tree/master/debian). + +## Maintainers + +This image is maintained by [tianon](https://nm.debian.org/public/person/tianon) and [paultag](https://nm.debian.org/public/person/paultag), who are Debian Developers. + +## Building + +This image is built using `bin/mkimage.sh`, where the interesting bits live in `bin/mkimage/debootstrap`. + + +The [`master` branch](https://github.com/tianon/docker-brew-debian) contains the scripts and is where any "development" happens, and +the [`dist` branch](https://github.com/tianon/docker-brew-debian/tree/dist) contains the built tarballs and the build logs. + +Separate branches: + +dist-unstable +dist-stable +dist-oldstable +master diff --git a/ascii/Dockerfile b/ascii/Dockerfile new file mode 100644 index 0000000..f5307be --- /dev/null +++ b/ascii/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +ADD rootfs.tar.xz / +CMD ["/bin/bash"] diff --git a/ascii/build-command.txt b/ascii/build-command.txt new file mode 100644 index 0000000..c8a2f01 --- /dev/null +++ b/ascii/build-command.txt @@ -0,0 +1,3 @@ +mkimage.sh --dir . --compression xz debootstrap --variant=minbase --components=main --include=inetutils-ping,iproute2 --force-check-gpg ascii http://pkgmaster.devuan.org/merged + +https://github.com/docker/docker/blob/master/contrib/mkimage.sh diff --git a/ascii/include b/ascii/include new file mode 100644 index 0000000..788ab46 --- /dev/null +++ b/ascii/include @@ -0,0 +1 @@ +inetutils-ping,iproute2 diff --git a/ascii/slim/Dockerfile b/ascii/slim/Dockerfile new file mode 100644 index 0000000..f5307be --- /dev/null +++ b/ascii/slim/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +ADD rootfs.tar.xz / +CMD ["/bin/bash"] diff --git a/beowulf/include b/beowulf/include new file mode 100644 index 0000000..788ab46 --- /dev/null +++ b/beowulf/include @@ -0,0 +1 @@ +inetutils-ping,iproute2 diff --git a/chimaera/include b/chimaera/include new file mode 100644 index 0000000..788ab46 --- /dev/null +++ b/chimaera/include @@ -0,0 +1 @@ +inetutils-ping,iproute2 diff --git a/components b/components new file mode 100644 index 0000000..ba2906d --- /dev/null +++ b/components @@ -0,0 +1 @@ +main diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh new file mode 100755 index 0000000..080db80 --- /dev/null +++ b/generate-stackbrew-library.sh @@ -0,0 +1,174 @@ +#!/bin/bash +set -e +set -x + +#master='master' +master='devuan' + +cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" + +declare -A aliases +aliases=( + [$(cat latest)]='latest' +) +declare -A noVersion +noVersion=( + [oldstable]=1 + [stable]=1 + [testing]=1 + [unstable]=1 + [ceres]=1 +) + +versions=( */ ) +versions=( "${versions[@]%/}" ) + +cat <<-EOH +Maintainers: Deprecated code used by debian, but generates devuan images + suitable for docker. + + GitRepo: https://github.com/tianon/docker-brew-debian.git + GitRepo: https://git.ring-zero.co.uk/docker/docker-brew-debian.git +EOH + +branches=( dist-stable dist-unstable dist-oldstable dist-testing $master ) + +for branch in "${branches[@]}"; do + if [ "$branch" = $master ]; then + continue + fi + commitRange="$master..$branch" + commitCount="$(git rev-list "$commitRange" --count 2>/dev/null || true)" + if [ "$commitCount" ] && [ "$commitCount" -gt 0 ]; then + echo + echo '# commits:' "($commitRange)" + git log --format=format:'- %h %s%n%w(0,2,2)%b' "$commitRange" | sed 's/^/# /' + fi +done + +# prints "$2$1$3$1...$N" +join() { + local sep="$1"; shift + local out; printf -v out "${sep//%/%%}%s" "$@" + echo "${out#$sep}" +} + +for version in "${versions[@]}"; do + tarball="$version/rootfs.tar.xz" + commit="$(git log -1 --format='format:%H' "${branches[@]}" -- "$tarball")" + if [ -z "$commit" ]; then + echo >&2 "warning: cannot determine commit for $tarball; skipping" + continue + fi + branch= + for b in "${branches[@]}"; do + if git merge-base --is-ancestor "$commit" "$b" &> /dev/null; then + branch="$b" + break + fi + done + if [ -z "$branch" ]; then + echo >&2 "error: cannot determine branch for $tarball (commit $commit)" + exit 1 + fi + + versionAliases=() + if [ -z "${noVersion[$version]}" ]; then + fullVersion="$(git show "$commit:$tarball" | tar -xvJ etc/debian_version --to-stdout 2>/dev/null || true)" + if [ -z "$fullVersion" ] || [[ "$fullVersion" == */ceres ]]; then + fullVersion="$(eval "$(git show "$commit:$tarball" | tar -xvJ etc/os-release --to-stdout 2>/dev/null || true)" && echo "$VERSION" | cut -d' ' -f1)" + if [ -z "$fullVersion" ]; then + # lucid... + fullVersion="$(eval "$(git show "$commit:$tarball" | tar -xvJ etc/lsb-release --to-stdout 2>/dev/null || true)" && echo "$DISTRIB_DESCRIPTION" | cut -d' ' -f2)" # DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS" + fi + else + while [ "${fullVersion%.*}" != "$fullVersion" ]; do + versionAliases+=( $fullVersion ) + fullVersion="${fullVersion%.*}" + done + fi + if [ "$fullVersion" != "$version" ]; then + versionAliases+=( $fullVersion ) + fi + fi + versionAliases+=( $version $(git show "$commit:$version/suite" 2>/dev/null || true) ${aliases[$version]} ) + + echo + cat <<-EOE + Tags: $(join ', ' "${versionAliases[@]}") + GitFetch: refs/heads/$branch + GitCommit: $commit + Directory: $version + EOE + + for imageVariant in slim backports; do + if [ "$(git show "$commit:$version/$imageVariant/Dockerfile" 2>/dev/null || true)" ]; then + echo + cat <<-EOE + Tags: $version-$imageVariant + GitFetch: refs/heads/$branch + GitCommit: $commit + Directory: $version/$imageVariant + EOE + fi + done +done + +dockerfilesBase='https://github.com/cyteen/dockerfiles' +dockerfilesGit="$dockerfilesBase.git" +dockerfilesBranch='master' +dockerfiles="$dockerfilesBase/commits/$dockerfilesBranch/devuan" +#echo "$(curl -fsSL https://github.com/cyteen/dockerfiles/commits/master/devuan/ascii/Dockerfile.atom | tac|tac | awk -F '[ \t]*[<>/]+' '$2 == "id" && $3 ~ /Commit/ { print $4; exit }')" + +# rcBuggyCommit="$(curl -fsSL "$dockerfiles/rc-buggy/Dockerfile.atom" | tac|tac | awk -F '[ \t]*[<>/]+' '$2 == "id" && $3 ~ /Commit/ { print $4; exit }')" +#experimentalCommit="$(curl -fsSL "$dockerfiles/experimental/Dockerfile.atom" | tac|tac | awk -F '[ \t]*[<>/]+' '$2 == "id" && $3 ~ /Commit/ { print $4; exit }')" + ceresCommit="$(curl -fsSL "$dockerfiles/ceres/Dockerfile.atom" | tac|tac | awk -F '[ \t]*[<>/]+' '$2 == "id" && $3 ~ /Commit/ { print $4; exit }')" + beowulfCommit="$(curl -fsSL "$dockerfiles/beowulf/Dockerfile.atom" | tac|tac | awk -F '[ \t]*[<>/]+' '$2 == "id" && $3 ~ /Commit/ { print $4; exit }')" + asciiCommit="$(curl -fsSL "$dockerfiles/ascii/Dockerfile.atom" | tac|tac | awk -F '[ \t]*[<>/]+' '$2 == "id" && $3 ~ /Commit/ { print $4; exit }')" + jessieCommit="$(curl -fsSL "$dockerfiles/jessie/Dockerfile.atom" | tac|tac | awk -F '[ \t]*[<>/]+' '$2 == "id" && $3 ~ /Commit/ { print $4; exit }')" + +cat <<-EOE + + # unstable/ceres + Tags: ceres + GitRepo: $dockerfilesGit + GitFetch: refs/heads/$dockerfilesBranch + GitCommit: $ceresCommit + Directory: devuan/ceres + + # testing/beowulf + Tags: beowulf + GitRepo: $dockerfilesGit + GitFetch: refs/heads/$dockerfilesBranch + GitCommit: $beowulfCommit + Directory: devuan/beowulf + + # stable/ascii + Tags: ascii + GitRepo: $dockerfilesGit + GitFetch: refs/heads/$dockerfilesBranch + GitCommit: $asciiCommit + Directory: devuan/ascii + + # old-stable/jessie + Tags: jessie + GitRepo: $dockerfilesGit + GitFetch: refs/heads/$dockerfilesBranch + GitCommit: $jessieCommit + Directory: devuan/ascii +EOE + +# # sid + rc-buggy +# Tags: rc-buggy +# GitRepo: $dockerfilesGit +# GitFetch: refs/heads/$dockerfilesBranch +# GitCommit: $rcBuggyCommit +# Directory: devuan/rc-buggy +# +# # unstable + experimental +# Tags: experimental +# GitRepo: $dockerfilesGit +# GitFetch: refs/heads/$dockerfilesBranch +# GitCommit: $experimentalCommit +# Directory: devuan/experimental + diff --git a/jessie/Dockerfile b/jessie/Dockerfile new file mode 100644 index 0000000..f5307be --- /dev/null +++ b/jessie/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +ADD rootfs.tar.xz / +CMD ["/bin/bash"] diff --git a/jessie/backports/Dockerfile b/jessie/backports/Dockerfile new file mode 100644 index 0000000..5ac9cc8 --- /dev/null +++ b/jessie/backports/Dockerfile @@ -0,0 +1,2 @@ +FROM devuan:jessie +RUN awk '$1 ~ "^deb" { $3 = $3 "-backports"; print; exit }' /etc/apt/sources.list > /etc/apt/sources.list.d/backports.list diff --git a/jessie/build-command.txt b/jessie/build-command.txt new file mode 100644 index 0000000..4039542 --- /dev/null +++ b/jessie/build-command.txt @@ -0,0 +1,3 @@ +mkimage.sh --dir . --compression xz debootstrap --variant=minbase --components=main --include=inetutils-ping,iproute2 --force-check-gpg jessie http://pkgmaster.devuan.org/merged + +https://github.com/docker/docker/blob/master/contrib/mkimage.sh diff --git a/jessie/build.log b/jessie/build.log new file mode 100644 index 0000000..65974b7 --- /dev/null +++ b/jessie/build.log @@ -0,0 +1,558 @@ ++ mkdir -p /«BREWDIR»/jessie/rootfs ++ debootstrap --variant=minbase --components=main --include=inetutils-ping,iproute2 --force-check-gpg jessie /«BREWDIR»/jessie/rootfs http://pkgmaster.devuan.org/merged +I: Retrieving InRelease +I: Checking Release signature +I: Valid Release signature (key id E032601B7CA10BC3EA53FA81BB23C00C61FC752C) +I: Retrieving Packages +I: Validating Packages +I: Resolving dependencies of required packages... +I: Resolving dependencies of base packages... +I: Found additional required dependencies: insserv libaudit-common libaudit1 libbz2-1.0 libdb5.3 libdebconfclient0 libfdisk1 libsemanage-common libsemanage1 libslang2 libustr-1.0-1 sysvinit-core +I: Found additional base dependencies: debian-archive-keyring gnupg gpgv libapt-pkg4.12 libreadline6 libstdc++6 libusb-0.1-4 netbase readline-common +I: Checking component main on http://pkgmaster.devuan.org/merged... +I: Retrieving apt 1.0.9.8.4 +I: Validating apt 1.0.9.8.4 +I: Retrieving base-files 8+devuan7 +I: Validating base-files 8+devuan7 +I: Retrieving base-passwd 3.5.37 +I: Validating base-passwd 3.5.37 +I: Retrieving bash 4.3-11+deb8u1 +I: Validating bash 4.3-11+deb8u1 +I: Retrieving bsdutils 1:2.26.2-6+devuan1 +I: Validating bsdutils 1:2.26.2-6+devuan1 +I: Retrieving coreutils 8.23-4 +I: Validating coreutils 8.23-4 +I: Retrieving dash 0.5.7-4+b1 +I: Validating dash 0.5.7-4+b1 +I: Retrieving debconf 1.5.56+deb8u1 +I: Validating debconf 1.5.56+deb8u1 +I: Retrieving debconf-i18n 1.5.56+deb8u1 +I: Validating debconf-i18n 1.5.56+deb8u1 +I: Retrieving debian-archive-keyring 2017.5~deb8u1 +I: Validating debian-archive-keyring 2017.5~deb8u1 +I: Retrieving debianutils 4.4+b1 +I: Validating debianutils 4.4+b1 +I: Retrieving devuan-baseconf 0.6.4+devuan1.3 +I: Validating devuan-baseconf 0.6.4+devuan1.3 +I: Retrieving devuan-keyring 2017.10.03 +I: Validating devuan-keyring 2017.10.03 +I: Retrieving diffutils 1:3.3-1+b1 +I: Validating diffutils 1:3.3-1+b1 +I: Retrieving dpkg 1.17.27 +I: Validating dpkg 1.17.27 +I: Retrieving e2fslibs 1.42.12-2+b1 +I: Validating e2fslibs 1.42.12-2+b1 +I: Retrieving e2fsprogs 1.42.12-2+b1 +I: Validating e2fsprogs 1.42.12-2+b1 +I: Retrieving findutils 4.4.2-9+b1 +I: Validating findutils 4.4.2-9+b1 +I: Retrieving gcc-4.8-base 4.8.4-1 +I: Validating gcc-4.8-base 4.8.4-1 +I: Retrieving gcc-4.9-base 4.9.2-10 +I: Validating gcc-4.9-base 4.9.2-10 +I: Retrieving gnupg 1.4.18-7+deb8u3 +I: Validating gnupg 1.4.18-7+deb8u3 +I: Retrieving gpgv 1.4.18-7+deb8u3 +I: Validating gpgv 1.4.18-7+deb8u3 +I: Retrieving grep 2.20-4.1 +I: Validating grep 2.20-4.1 +I: Retrieving gzip 1.6-4 +I: Validating gzip 1.6-4 +I: Retrieving hostname 3.15 +I: Validating hostname 3.15 +I: Retrieving inetutils-ping 2:1.9.2.39.3a460-3 +I: Validating inetutils-ping 2:1.9.2.39.3a460-3 +I: Retrieving init 1.24+devuan1.0 +I: Validating init 1.24+devuan1.0 +I: Retrieving initscripts 2.88dsf-59.2+devuan2 +I: Validating initscripts 2.88dsf-59.2+devuan2 +I: Retrieving insserv 1.14.0-5 +I: Validating insserv 1.14.0-5 +I: Retrieving iproute2 3.16.0-2 +I: Validating iproute2 3.16.0-2 +I: Retrieving libacl1 2.2.52-2 +I: Validating libacl1 2.2.52-2 +I: Retrieving libapt-pkg4.12 1.0.9.8.4 +I: Validating libapt-pkg4.12 1.0.9.8.4 +I: Retrieving libattr1 1:2.4.47-2 +I: Validating libattr1 1:2.4.47-2 +I: Retrieving libaudit-common 1:2.4-1 +I: Validating libaudit-common 1:2.4-1 +I: Retrieving libaudit1 1:2.4-1+b1 +I: Validating libaudit1 1:2.4-1+b1 +I: Retrieving libblkid1 2.26.2-6+devuan1 +I: Validating libblkid1 2.26.2-6+devuan1 +I: Retrieving libbz2-1.0 1.0.6-7+b3 +I: Validating libbz2-1.0 1.0.6-7+b3 +I: Retrieving libc-bin 2.19-18+deb8u10 +I: Validating libc-bin 2.19-18+deb8u10 +I: Retrieving libc6 2.19-18+deb8u10 +I: Validating libc6 2.19-18+deb8u10 +I: Retrieving libcomerr2 1.42.12-2+b1 +I: Validating libcomerr2 1.42.12-2+b1 +I: Retrieving libdb5.3 5.3.28-9 +I: Validating libdb5.3 5.3.28-9 +I: Retrieving libdebconfclient0 0.192 +I: Validating libdebconfclient0 0.192 +I: Retrieving libfdisk1 2.26.2-6+devuan1 +I: Validating libfdisk1 2.26.2-6+devuan1 +I: Retrieving libgcc1 1:4.9.2-10 +I: Validating libgcc1 1:4.9.2-10 +I: Retrieving liblocale-gettext-perl 1.05-8+b1 +I: Validating liblocale-gettext-perl 1.05-8+b1 +I: Retrieving liblzma5 5.1.1alpha+20120614-2+b3 +I: Validating liblzma5 5.1.1alpha+20120614-2+b3 +I: Retrieving libmount1 2.26.2-6+devuan1 +I: Validating libmount1 2.26.2-6+devuan1 +I: Retrieving libncurses5 5.9+20140913-1+b1 +I: Validating libncurses5 5.9+20140913-1+b1 +I: Retrieving libpam-modules 1.1.8-3.1+deb8u2+b1 +I: Validating libpam-modules 1.1.8-3.1+deb8u2+b1 +I: Retrieving libpam-modules-bin 1.1.8-3.1+deb8u2+b1 +I: Validating libpam-modules-bin 1.1.8-3.1+deb8u2+b1 +I: Retrieving libpam-runtime 1.1.8-3.1+deb8u2 +I: Validating libpam-runtime 1.1.8-3.1+deb8u2 +I: Retrieving libpam0g 1.1.8-3.1+deb8u2+b1 +I: Validating libpam0g 1.1.8-3.1+deb8u2+b1 +I: Retrieving libpcre3 2:8.35-3.3+deb8u4 +I: Validating libpcre3 2:8.35-3.3+deb8u4 +I: Retrieving libreadline6 6.3-8+b3 +I: Validating libreadline6 6.3-8+b3 +I: Retrieving libselinux1 2.3-2 +I: Validating libselinux1 2.3-2 +I: Retrieving libsemanage-common 2.3-1 +I: Validating libsemanage-common 2.3-1 +I: Retrieving libsemanage1 2.3-1+b1 +I: Validating libsemanage1 2.3-1+b1 +I: Retrieving libsepol1 2.3-2 +I: Validating libsepol1 2.3-2 +I: Retrieving libslang2 2.3.0-2 +I: Validating libslang2 2.3.0-2 +I: Retrieving libsmartcols1 2.26.2-6+devuan1 +I: Validating libsmartcols1 2.26.2-6+devuan1 +I: Retrieving libss2 1.42.12-2+b1 +I: Validating libss2 1.42.12-2+b1 +I: Retrieving libstdc++6 4.9.2-10 +I: Validating libstdc++6 4.9.2-10 +I: Retrieving libtext-charwidth-perl 0.04-7+b3 +I: Validating libtext-charwidth-perl 0.04-7+b3 +I: Retrieving libtext-iconv-perl 1.7-5+b2 +I: Validating libtext-iconv-perl 1.7-5+b2 +I: Retrieving libtext-wrapi18n-perl 0.06-7 +I: Validating libtext-wrapi18n-perl 0.06-7 +I: Retrieving libtinfo5 5.9+20140913-1+b1 +I: Validating libtinfo5 5.9+20140913-1+b1 +I: Retrieving libusb-0.1-4 2:0.1.12-25 +I: Validating libusb-0.1-4 2:0.1.12-25 +I: Retrieving libustr-1.0-1 1.0.4-3+b2 +I: Validating libustr-1.0-1 1.0.4-3+b2 +I: Retrieving libuuid1 2.26.2-6+devuan1 +I: Validating libuuid1 2.26.2-6+devuan1 +I: Retrieving login 1:4.2-3+deb8u4 +I: Validating login 1:4.2-3+deb8u4 +I: Retrieving lsb-base 4.1+devuan2 +I: Validating lsb-base 4.1+devuan2 +I: Retrieving mawk 1.3.3-17 +I: Validating mawk 1.3.3-17 +I: Retrieving mount 2.26.2-6+devuan1 +I: Validating mount 2.26.2-6+devuan1 +I: Retrieving multiarch-support 2.19-18+deb8u10 +I: Validating multiarch-support 2.19-18+deb8u10 +I: Retrieving ncurses-base 5.9+20140913-1 +I: Validating ncurses-base 5.9+20140913-1 +I: Retrieving ncurses-bin 5.9+20140913-1+b1 +I: Validating ncurses-bin 5.9+20140913-1+b1 +I: Retrieving netbase 5.3 +I: Validating netbase 5.3 +I: Retrieving passwd 1:4.2-3+deb8u4 +I: Validating passwd 1:4.2-3+deb8u4 +I: Retrieving perl-base 5.20.2-3+deb8u8 +I: Validating perl-base 5.20.2-3+deb8u8 +I: Retrieving readline-common 6.3-8 +I: Validating readline-common 6.3-8 +I: Retrieving sed 4.2.2-4+deb8u1 +I: Validating sed 4.2.2-4+deb8u1 +I: Retrieving sensible-utils 0.0.9 +I: Validating sensible-utils 0.0.9 +I: Retrieving startpar 0.59-3 +I: Validating startpar 0.59-3 +I: Retrieving sysv-rc 2.88dsf-59.2+devuan2 +I: Validating sysv-rc 2.88dsf-59.2+devuan2 +I: Retrieving sysvinit-core 2.88dsf-59.2+devuan2 +I: Validating sysvinit-core 2.88dsf-59.2+devuan2 +I: Retrieving sysvinit-utils 2.88dsf-59.2+devuan2 +I: Validating sysvinit-utils 2.88dsf-59.2+devuan2 +I: Retrieving tar 1.27.1-2+deb8u1 +I: Validating tar 1.27.1-2+deb8u1 +I: Retrieving tzdata 2017b-0+deb8u1 +I: Validating tzdata 2017b-0+deb8u1 +I: Retrieving util-linux 2.26.2-6+devuan1 +I: Validating util-linux 2.26.2-6+devuan1 +I: Retrieving zlib1g 1:1.2.8.dfsg-2+b1 +I: Validating zlib1g 1:1.2.8.dfsg-2+b1 +I: Chosen extractor for .deb packages: dpkg-deb +I: Extracting base-files... +I: Extracting base-passwd... +I: Extracting bash... +I: Extracting bsdutils... +I: Extracting coreutils... +I: Extracting dash... +I: Extracting debconf... +I: Extracting debconf-i18n... +I: Extracting debianutils... +I: Extracting diffutils... +I: Extracting dpkg... +I: Extracting e2fslibs... +I: Extracting e2fsprogs... +I: Extracting findutils... +I: Extracting gcc-4.8-base... +I: Extracting gcc-4.9-base... +I: Extracting grep... +I: Extracting gzip... +I: Extracting hostname... +I: Extracting init... +I: Extracting initscripts... +I: Extracting insserv... +I: Extracting libacl1... +I: Extracting libattr1... +I: Extracting libaudit-common... +I: Extracting libaudit1... +I: Extracting libblkid1... +I: Extracting libbz2-1.0... +I: Extracting libc-bin... +I: Extracting libc6... +I: Extracting libcomerr2... +I: Extracting libdb5.3... +I: Extracting libdebconfclient0... +I: Extracting libfdisk1... +I: Extracting libgcc1... +I: Extracting liblocale-gettext-perl... +I: Extracting liblzma5... +I: Extracting libmount1... +I: Extracting libncurses5... +I: Extracting libpam-modules... +I: Extracting libpam-modules-bin... +I: Extracting libpam-runtime... +I: Extracting libpam0g... +I: Extracting libpcre3... +I: Extracting libselinux1... +I: Extracting libsemanage-common... +I: Extracting libsemanage1... +I: Extracting libsepol1... +I: Extracting libslang2... +I: Extracting libsmartcols1... +I: Extracting libss2... +I: Extracting libtext-charwidth-perl... +I: Extracting libtext-iconv-perl... +I: Extracting libtext-wrapi18n-perl... +I: Extracting libtinfo5... +I: Extracting libustr-1.0-1... +I: Extracting libuuid1... +I: Extracting login... +I: Extracting lsb-base... +I: Extracting mawk... +I: Extracting mount... +I: Extracting multiarch-support... +I: Extracting ncurses-base... +I: Extracting ncurses-bin... +I: Extracting passwd... +I: Extracting perl-base... +I: Extracting sed... +I: Extracting sensible-utils... +I: Extracting startpar... +I: Extracting sysv-rc... +I: Extracting sysvinit-core... +I: Extracting sysvinit-utils... +I: Extracting tar... +I: Extracting tzdata... +I: Extracting util-linux... +I: Extracting zlib1g... +I: Installing core packages... +I: Unpacking required packages... +I: Unpacking base-files... +I: Unpacking base-passwd... +I: Unpacking bash... +I: Unpacking bsdutils... +I: Unpacking coreutils... +I: Unpacking dash... +I: Unpacking debconf... +I: Unpacking debconf-i18n... +I: Unpacking debianutils... +I: Unpacking diffutils... +I: Unpacking dpkg... +I: Unpacking e2fslibs:amd64... +I: Unpacking e2fsprogs... +I: Unpacking findutils... +I: Unpacking gcc-4.8-base:amd64... +I: Unpacking gcc-4.9-base:amd64... +I: Unpacking grep... +I: Unpacking gzip... +I: Unpacking hostname... +I: Unpacking init... +I: Unpacking initscripts... +I: Unpacking insserv... +I: Unpacking libacl1:amd64... +I: Unpacking libattr1:amd64... +I: Unpacking libaudit-common... +I: Unpacking libaudit1:amd64... +I: Unpacking libblkid1:amd64... +I: Unpacking libbz2-1.0:amd64... +I: Unpacking libc-bin... +I: Unpacking libc6:amd64... +I: Unpacking libcomerr2:amd64... +I: Unpacking libdb5.3:amd64... +I: Unpacking libdebconfclient0:amd64... +I: Unpacking libfdisk1:amd64... +I: Unpacking libgcc1:amd64... +I: Unpacking liblocale-gettext-perl... +I: Unpacking liblzma5:amd64... +I: Unpacking libmount1:amd64... +I: Unpacking libncurses5:amd64... +I: Unpacking libpam-modules:amd64... +I: Unpacking libpam-modules-bin... +I: Unpacking libpam-runtime... +I: Unpacking libpam0g:amd64... +I: Unpacking libpcre3:amd64... +I: Unpacking libselinux1:amd64... +I: Unpacking libsemanage-common... +I: Unpacking libsemanage1:amd64... +I: Unpacking libsepol1:amd64... +I: Unpacking libslang2:amd64... +I: Unpacking libsmartcols1:amd64... +I: Unpacking libss2:amd64... +I: Unpacking libtext-charwidth-perl... +I: Unpacking libtext-iconv-perl... +I: Unpacking libtext-wrapi18n-perl... +I: Unpacking libtinfo5:amd64... +I: Unpacking libustr-1.0-1:amd64... +I: Unpacking libuuid1:amd64... +I: Unpacking login... +I: Unpacking lsb-base... +I: Unpacking mawk... +I: Unpacking mount... +I: Unpacking multiarch-support... +I: Unpacking ncurses-base... +I: Unpacking ncurses-bin... +I: Unpacking passwd... +I: Unpacking perl-base... +I: Unpacking sed... +I: Unpacking sensible-utils... +I: Unpacking startpar... +I: Unpacking sysv-rc... +I: Unpacking sysvinit-core... +I: Unpacking sysvinit-utils... +I: Unpacking tar... +I: Unpacking tzdata... +I: Unpacking util-linux... +I: Unpacking zlib1g:amd64... +I: Configuring required packages... +I: Configuring gcc-4.8-base:amd64... +I: Configuring lsb-base... +I: Configuring sensible-utils... +I: Configuring ncurses-base... +I: Configuring libsemanage-common... +I: Configuring gcc-4.9-base:amd64... +I: Configuring libaudit-common... +I: Configuring libc6:amd64... +I: Configuring startpar... +I: Configuring libc-bin... +I: Configuring sysvinit-utils... +I: Configuring diffutils... +I: Configuring insserv... +I: Configuring findutils... +I: Configuring libsmartcols1:amd64... +I: Configuring debianutils... +I: Configuring hostname... +I: Configuring multiarch-support... +I: Configuring mawk... +I: Configuring bsdutils... +I: Configuring libpcre3:amd64... +I: Configuring libbz2-1.0:amd64... +I: Configuring base-files... +I: Configuring libdebconfclient0:amd64... +I: Configuring libselinux1:amd64... +I: Configuring libcomerr2:amd64... +I: Configuring libslang2:amd64... +I: Configuring libsepol1:amd64... +I: Configuring libgcc1:amd64... +I: Configuring libustr-1.0-1:amd64... +I: Configuring libaudit1:amd64... +I: Configuring libtinfo5:amd64... +I: Configuring libattr1:amd64... +I: Configuring libss2:amd64... +I: Configuring liblzma5:amd64... +I: Configuring base-passwd... +I: Configuring e2fslibs:amd64... +I: Configuring libdb5.3:amd64... +I: Configuring zlib1g:amd64... +I: Configuring libsemanage1:amd64... +I: Configuring libacl1:amd64... +I: Configuring ncurses-bin... +I: Configuring libncurses5:amd64... +I: Configuring coreutils... +I: Configuring tar... +I: Configuring dpkg... +I: Configuring sed... +I: Configuring perl-base... +I: Configuring grep... +I: Configuring debconf... +I: Configuring tzdata... +I: Configuring gzip... +I: Configuring dash... +I: Configuring libtext-iconv-perl... +I: Configuring sysv-rc... +I: Configuring liblocale-gettext-perl... +I: Configuring libtext-charwidth-perl... +I: Configuring libpam0g:amd64... +I: Configuring libpam-modules-bin... +I: Configuring bash... +I: Configuring libtext-wrapi18n-perl... +I: Configuring libpam-modules:amd64... +I: Configuring libpam-runtime... +I: Configuring debconf-i18n... +I: Configuring passwd... +I: Configuring login... +I: Configuring libuuid1:amd64... +I: Configuring libblkid1:amd64... +I: Configuring libmount1:amd64... +I: Configuring mount... +I: Configuring libfdisk1:amd64... +I: Configuring initscripts... +I: Configuring util-linux... +I: Configuring e2fsprogs... +I: Configuring sysvinit-core... +I: Configuring init... +I: Configuring libc-bin... +I: Unpacking the base system... +I: Unpacking apt... +I: Unpacking debian-archive-keyring... +I: Unpacking devuan-baseconf... +I: Unpacking devuan-keyring... +I: Unpacking gnupg... +I: Unpacking gpgv... +I: Unpacking inetutils-ping... +I: Unpacking iproute2... +I: Unpacking libapt-pkg4.12:amd64... +I: Unpacking libreadline6:amd64... +I: Unpacking libstdc++6:amd64... +I: Unpacking libusb-0.1-4:amd64... +I: Unpacking netbase... +I: Unpacking readline-common... +I: Configuring the base system... +I: Configuring readline-common... +I: Configuring gpgv... +I: Configuring iproute2... +I: Configuring devuan-keyring... +I: Configuring debian-archive-keyring... +I: Configuring devuan-baseconf... +I: Configuring libstdc++6:amd64... +I: Configuring libapt-pkg4.12:amd64... +I: Configuring libusb-0.1-4:amd64... +I: Configuring libreadline6:amd64... +I: Configuring netbase... +I: Configuring inetutils-ping... +I: Configuring gnupg... +I: Configuring apt... +I: Configuring libc-bin... +I: Base system installed successfully. ++ echo exit 101 > '/«BREWDIR»/jessie/rootfs/usr/sbin/policy-rc.d' ++ rootfs_chroot dpkg-divert --local --rename --add /sbin/initctl ++ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ++ /usr/sbin/chroot /«BREWDIR»/jessie/rootfs dpkg-divert --local --rename --add /sbin/initctl +Adding 'local diversion of /sbin/initctl to /sbin/initctl.distrib' ++ cp -a /«BREWDIR»/jessie/rootfs/usr/sbin/policy-rc.d /«BREWDIR»/jessie/rootfs/sbin/initctl ++ sed -i 's/^exit.*/exit 0/' /«BREWDIR»/jessie/rootfs/sbin/initctl ++ rootfs_chroot apt-get clean ++ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ++ /usr/sbin/chroot /«BREWDIR»/jessie/rootfs apt-get clean ++ echo force-unsafe-io > '/«BREWDIR»/jessie/rootfs/etc/dpkg/dpkg.cfg.d/docker-apt-speedup' ++ cat > '/«BREWDIR»/jessie/rootfs/etc/apt/apt.conf.d/docker-clean' ++ echo Acquire::Languages 'none' > '/«BREWDIR»/jessie/rootfs/etc/apt/apt.conf.d/docker-no-languages' ++ echo Acquire::GzipIndexes 'true' > '/«BREWDIR»/jessie/rootfs/etc/apt/apt.conf.d/docker-gzip-indexes' ++ echo Apt::AutoRemove::SuggestsImportant 'false' > '/«BREWDIR»/jessie/rootfs/etc/apt/apt.conf.d/docker-autoremove-suggests' +-------------------------------------------------------------------------- +jessie +-------------------------------------------------------------------------- ++ echo 'deb http://pkgmaster.devuan.org/merged jessie main' ++ echo 'deb-src http://pkgmaster.devuan.org/merged jessie main' ++ echo 'deb http://pkgmaster.devuan.org/merged jessie-updates main' ++ echo 'deb-src http://pkgmaster.devuan.org/merged jessie-updates main' ++ echo 'deb http://pkgmaster.devuan.org/merged jessie-security main' ++ echo 'deb-src http://pkgmaster.devuan.org/merged jessie-security main' ++ rootfs_chroot sh -xc 'apt-get update && apt-get dist-upgrade -y' ++ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ++ /usr/sbin/chroot /«BREWDIR»/jessie/rootfs sh -xc 'apt-get update && apt-get dist-upgrade -y' ++ apt-get update +Hit http://pkgmaster.devuan.org jessie InRelease +Get:1 http://pkgmaster.devuan.org jessie-updates InRelease [63.5 kB] +Get:2 http://pkgmaster.devuan.org jessie-security InRelease [62.9 kB] +Get:3 http://pkgmaster.devuan.org jessie/main Sources [8940 kB] +Get:4 http://pkgmaster.devuan.org jessie/main amd64 Packages [9144 kB] +Get:5 http://pkgmaster.devuan.org jessie-updates/main Sources [21.4 kB] +Get:6 http://pkgmaster.devuan.org jessie-updates/main amd64 Packages [23.7 kB] +Get:7 http://pkgmaster.devuan.org jessie-security/main Sources [251 kB] +Get:8 http://pkgmaster.devuan.org jessie-security/main amd64 Packages [536 kB] +Fetched 19.0 MB in 29s (646 kB/s) +Reading package lists... ++ apt-get dist-upgrade -y +Reading package lists... +Building dependency tree... +The following packages will be upgraded: + gnupg gpgv perl-base tzdata +4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Need to get 2815 kB of archives. +After this operation, 453 kB disk space will be freed. +Get:1 http://pkgmaster.devuan.org/merged/ jessie-security/main perl-base amd64 5.20.2-3+deb8u9 [1226 kB] +Get:2 http://pkgmaster.devuan.org/merged/ jessie-security/main gpgv amd64 1.4.18-7+deb8u4 [209 kB] +Get:3 http://pkgmaster.devuan.org/merged/ jessie-security/main gnupg amd64 1.4.18-7+deb8u4 [1149 kB] +Get:4 http://pkgmaster.devuan.org/merged/ jessie-updates/main tzdata all 2017c-0+deb8u1 [232 kB] +perl: warning: Setting locale failed. +perl: warning: Please check that your locale settings: + LANGUAGE = (unset), + LC_ALL = (unset), + LC_CTYPE = "en_GB.UTF-8", + LANG = "en_GB.UTF-8" + are supported and installed on your system. +perl: warning: Falling back to the standard locale ("C"). +locale: Cannot set LC_CTYPE to default locale: No such file or directory +locale: Cannot set LC_MESSAGES to default locale: No such file or directory +locale: Cannot set LC_ALL to default locale: No such file or directory +debconf: delaying package configuration, since apt-utils is not installed +Fetched 2815 kB in 17s (163 kB/s) +E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory) +(Reading database ... 6568 files and directories currently installed.) +Preparing to unpack .../perl-base_5.20.2-3+deb8u9_amd64.deb ... +Unpacking perl-base (5.20.2-3+deb8u9) over (5.20.2-3+deb8u8) ... +Setting up perl-base (5.20.2-3+deb8u9) ... +(Reading database ... 6568 files and directories currently installed.) +Preparing to unpack .../gpgv_1.4.18-7+deb8u4_amd64.deb ... +Unpacking gpgv (1.4.18-7+deb8u4) over (1.4.18-7+deb8u3) ... +Setting up gpgv (1.4.18-7+deb8u4) ... +(Reading database ... 6568 files and directories currently installed.) +Preparing to unpack .../gnupg_1.4.18-7+deb8u4_amd64.deb ... +Unpacking gnupg (1.4.18-7+deb8u4) over (1.4.18-7+deb8u3) ... +Setting up gnupg (1.4.18-7+deb8u4) ... +(Reading database ... 6568 files and directories currently installed.) +Preparing to unpack .../tzdata_2017c-0+deb8u1_all.deb ... +Unpacking tzdata (2017c-0+deb8u1) over (2017b-0+deb8u1) ... +Setting up tzdata (2017c-0+deb8u1) ... +locale: Cannot set LC_CTYPE to default locale: No such file or directory +locale: Cannot set LC_ALL to default locale: No such file or directory +debconf: unable to initialize frontend: Dialog +debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) +debconf: falling back to frontend: Readline +debconf: unable to initialize frontend: Readline +debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) +debconf: falling back to frontend: Teletype + +Current default time zone: 'Etc/UTC' +Local time is now: Fri Nov 17 13:28:36 UTC 2017. +Universal Time is now: Fri Nov 17 13:28:36 UTC 2017. +Run 'dpkg-reconfigure tzdata' if you wish to change it. + ++ rm -rf /«BREWDIR»/jessie/rootfs/var/lib/apt/lists/lock /«BREWDIR»/jessie/rootfs/var/lib/apt/lists/partial /«BREWDIR»/jessie/rootfs/var/lib/apt/lists/pkgmaster.devuan.org_merged_dists_jessie_InRelease /«BREWDIR»/jessie/rootfs/var/lib/apt/lists/pkgmaster.devuan.org_merged_dists_jessie_main_binary-amd64_Packages.gz /«BREWDIR»/jessie/rootfs/var/lib/apt/lists/pkgmaster.devuan.org_merged_dists_jessie_main_source_Sources.gz /«BREWDIR»/jessie/rootfs/var/lib/apt/lists/pkgmaster.devuan.org_merged_dists_jessie-security_InRelease /«BREWDIR»/jessie/rootfs/var/lib/apt/lists/pkgmaster.devuan.org_merged_dists_jessie-security_main_binary-amd64_Packages.gz /«BREWDIR»/jessie/rootfs/var/lib/apt/lists/pkgmaster.devuan.org_merged_dists_jessie-security_main_source_Sources.gz /«BREWDIR»/jessie/rootfs/var/lib/apt/lists/pkgmaster.devuan.org_merged_dists_jessie-updates_InRelease /«BREWDIR»/jessie/rootfs/var/lib/apt/lists/pkgmaster.devuan.org_merged_dists_jessie-updates_main_binary-amd64_Packages.gz /«BREWDIR»/jessie/rootfs/var/lib/apt/lists/pkgmaster.devuan.org_merged_dists_jessie-updates_main_source_Sources.gz ++ mkdir /«BREWDIR»/jessie/rootfs/var/lib/apt/lists/partial ++ tar --numeric-owner --create --auto-compress --file /«BREWDIR»/jessie/rootfs.tar.xz --directory /«BREWDIR»/jessie/rootfs '--transform=s,^./,,' . ++ cat > '/«BREWDIR»/jessie/Dockerfile' ++ echo 'CMD ["/bin/bash"]' ++ rm -rf /«BREWDIR»/jessie/rootfs diff --git a/jessie/build.manifest b/jessie/build.manifest new file mode 100644 index 0000000..2f812e5 --- /dev/null +++ b/jessie/build.manifest @@ -0,0 +1,90 @@ +apt 1.0.9.8.4 +base-files 8+devuan7 +base-passwd 3.5.37 +bash 4.3-11+deb8u1 +bsdutils 1:2.26.2-6+devuan1 +coreutils 8.23-4 +dash 0.5.7-4+b1 +debconf 1.5.56+deb8u1 +debconf-i18n 1.5.56+deb8u1 +debian-archive-keyring 2017.5~deb8u1 +debianutils 4.4+b1 +devuan-baseconf 0.6.4+devuan1.3 +devuan-keyring 2017.10.03 +diffutils 1:3.3-1+b1 +dpkg 1.17.27 +e2fslibs 1.42.12-2+b1 +e2fsprogs 1.42.12-2+b1 +findutils 4.4.2-9+b1 +gcc-4.8-base 4.8.4-1 +gcc-4.9-base 4.9.2-10 +gnupg 1.4.18-7+deb8u4 +gpgv 1.4.18-7+deb8u4 +grep 2.20-4.1 +gzip 1.6-4 +hostname 3.15 +inetutils-ping 2:1.9.2.39.3a460-3 +init 1.24+devuan1.0 +initscripts 2.88dsf-59.2+devuan2 +insserv 1.14.0-5 +iproute2 3.16.0-2 +libacl1 2.2.52-2 +libapt-pkg4.12 1.0.9.8.4 +libattr1 1:2.4.47-2 +libaudit-common 1:2.4-1 +libaudit1 1:2.4-1+b1 +libblkid1 2.26.2-6+devuan1 +libbz2-1.0 1.0.6-7+b3 +libc-bin 2.19-18+deb8u10 +libc6 2.19-18+deb8u10 +libcomerr2 1.42.12-2+b1 +libdb5.3 5.3.28-9 +libdebconfclient0 0.192 +libfdisk1 2.26.2-6+devuan1 +libgcc1 1:4.9.2-10 +liblocale-gettext-perl 1.05-8+b1 +liblzma5 5.1.1alpha+20120614-2+b3 +libmount1 2.26.2-6+devuan1 +libncurses5 5.9+20140913-1+b1 +libpam-modules 1.1.8-3.1+deb8u2+b1 +libpam-modules-bin 1.1.8-3.1+deb8u2+b1 +libpam-runtime 1.1.8-3.1+deb8u2 +libpam0g 1.1.8-3.1+deb8u2+b1 +libpcre3 2:8.35-3.3+deb8u4 +libreadline6 6.3-8+b3 +libselinux1 2.3-2 +libsemanage-common 2.3-1 +libsemanage1 2.3-1+b1 +libsepol1 2.3-2 +libslang2 2.3.0-2 +libsmartcols1 2.26.2-6+devuan1 +libss2 1.42.12-2+b1 +libstdc++6 4.9.2-10 +libtext-charwidth-perl 0.04-7+b3 +libtext-iconv-perl 1.7-5+b2 +libtext-wrapi18n-perl 0.06-7 +libtinfo5 5.9+20140913-1+b1 +libusb-0.1-4 2:0.1.12-25 +libustr-1.0-1 1.0.4-3+b2 +libuuid1 2.26.2-6+devuan1 +login 1:4.2-3+deb8u4 +lsb-base 4.1+devuan2 +mawk 1.3.3-17 +mount 2.26.2-6+devuan1 +multiarch-support 2.19-18+deb8u10 +ncurses-base 5.9+20140913-1 +ncurses-bin 5.9+20140913-1+b1 +netbase 5.3 +passwd 1:4.2-3+deb8u4 +perl-base 5.20.2-3+deb8u9 +readline-common 6.3-8 +sed 4.2.2-4+deb8u1 +sensible-utils 0.0.9 +startpar 0.59-3 +sysv-rc 2.88dsf-59.2+devuan2 +sysvinit-core 2.88dsf-59.2+devuan2 +sysvinit-utils 2.88dsf-59.2+devuan2 +tar 1.27.1-2+deb8u1 +tzdata 2017c-0+deb8u1 +util-linux 2.26.2-6+devuan1 +zlib1g 1:1.2.8.dfsg-2+b1 diff --git a/jessie/include b/jessie/include new file mode 100644 index 0000000..788ab46 --- /dev/null +++ b/jessie/include @@ -0,0 +1 @@ +inetutils-ping,iproute2 diff --git a/jessie/slim/Dockerfile b/jessie/slim/Dockerfile new file mode 100644 index 0000000..f5307be --- /dev/null +++ b/jessie/slim/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +ADD rootfs.tar.xz / +CMD ["/bin/bash"] diff --git a/latest b/latest new file mode 100644 index 0000000..dc797ba --- /dev/null +++ b/latest @@ -0,0 +1 @@ +jessie diff --git a/mirror b/mirror new file mode 100644 index 0000000..0e0153e --- /dev/null +++ b/mirror @@ -0,0 +1 @@ +http://pkgmaster.devuan.org/merged diff --git a/mkimage.sh b/mkimage.sh new file mode 120000 index 0000000..337c79f --- /dev/null +++ b/mkimage.sh @@ -0,0 +1 @@ +../bin/mkimage.sh \ No newline at end of file diff --git a/oldstable/include b/oldstable/include new file mode 100644 index 0000000..f8f500b --- /dev/null +++ b/oldstable/include @@ -0,0 +1 @@ +inetutils-ping,iproute diff --git a/repo b/repo new file mode 100644 index 0000000..5fe2ec0 --- /dev/null +++ b/repo @@ -0,0 +1 @@ +devuan diff --git a/slim-excludes b/slim-excludes new file mode 100644 index 0000000..f558132 --- /dev/null +++ b/slim-excludes @@ -0,0 +1,10 @@ +# This file contains the list of files/directories which will be removed for the "slim" image variants. +# https://github.com/tianon/docker-brew-debian/issues/48 +# https://wiki.ubuntu.com/ReducingDiskFootprint#Drop_unnecessary_files +/usr/share/doc/* +/usr/share/groff/* +/usr/share/info/* +/usr/share/linda/* +/usr/share/lintian/* +/usr/share/locale/* +/usr/share/man/* diff --git a/stable/include b/stable/include new file mode 100644 index 0000000..f8f500b --- /dev/null +++ b/stable/include @@ -0,0 +1 @@ +inetutils-ping,iproute diff --git a/testing/include b/testing/include new file mode 100644 index 0000000..788ab46 --- /dev/null +++ b/testing/include @@ -0,0 +1 @@ +inetutils-ping,iproute2 diff --git a/testing/merged-usr b/testing/merged-usr new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/testing/merged-usr @@ -0,0 +1 @@ +1 diff --git a/unstable/include b/unstable/include new file mode 100644 index 0000000..788ab46 --- /dev/null +++ b/unstable/include @@ -0,0 +1 @@ +inetutils-ping,iproute2 diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..66be722 --- /dev/null +++ b/update.sh @@ -0,0 +1,256 @@ +#!/bin/bash +set -x +set -eo pipefail + +cd "$(readlink -f "$(dirname "$BASH_SOURCE")")" + +declare -A codenameCache=() +codename() { + local suite="$1"; shift + if [ -z "${codenameCache[$suite]}" ]; then + local ret="$(curl -fsSL "http://pkgmaster.devuan.org/merged/dists/$suite/Release" | awk -F ': ' '$1 == "Codename" { print $2 }' || true)" + codenameCache[$suite]="${ret:-$suite}" + fi + echo "${codenameCache[$suite]}" +} + +declare -A backports=( + [stable]=1 + [oldstable]=1 + [$(codename stable)]=1 + [$(codename oldstable)]=1 +) + +declare -A unstableSuites=( + [unstable]=1 + [testing]=1 + [$(codename unstable)]=1 + [$(codename testing)]=1 +) +declare -A stableSuites=( + [stable]=1 + [$(codename stable)]=1 +) + +versions=( "$@" ) +if [ ${#versions[@]} -eq 0 ]; then + branch="$(git describe --contains --all HEAD)" + case "$branch" in + dist-oldstable) + for suite in */; do + suite="${suite%/}" + [ -z "${stableSuites[$suite]}" ] || continue + [ -z "${unstableSuites[$suite]}" ] || continue + versions+=( "$suite" ) + done + ;; + dist-stable) + for suite in "${!stableSuites[@]}"; do + if [ -d "$suite" ]; then + versions+=( "$suite" ) + fi + done + ;; + dist-unstable) + for suite in "${!unstableSuites[@]}"; do + if [ -d "$suite" ]; then + versions+=( "$suite" ) + fi + done + ;; + *) + versions=( */ ) + ;; + esac +fi +versions=( "${versions[@]%/}" ) + +get_part() { + dir="$1" + shift + part="$1" + shift + if [ -f "$dir/$part" ]; then + cat "$dir/$part" + return 0 + fi + if [ -f "$part" ]; then + cat "$part" + return 0 + fi + if [ $# -gt 0 ]; then + echo "$1" + return 0 + fi + return 1 +} + +repo="$(get_part . repo '')" +if [ "$repo" ]; then + origRepo="$repo" + if [[ "$repo" != */* ]]; then + user="$(docker info | awk '/^Username:/ { print $2 }')" + if [ "$user" ]; then + repo="$user/$repo" + fi + fi +fi + +latest="$(get_part . latest '')" +for version in "${versions[@]}"; do + dir="$(readlink -f "$version")" + variant="$(get_part "$dir" variant 'minbase')" + components="$(get_part "$dir" components 'main')" + include="$(get_part "$dir" include '')" + arch="$(get_part "$dir" arch '')" + mergedUsr="$(get_part "$dir" merged-usr '')" + suite="$(get_part "$dir" suite "$version")" + mirror="$(get_part "$dir" mirror '')" + script="$(get_part "$dir" script '')" + + args=( --dir "$dir" --compression 'xz' debootstrap ) + [ -z "$variant" ] || args+=( --variant="$variant" ) + [ -z "$components" ] || args+=( --components="$components" ) + [ -z "$include" ] || args+=( --include="$include" ) + [ -z "$arch" ] || args+=( --arch="$arch" ) + [ -z "$mergedUsr" ] || args+=( --merged-usr ) + + debootstrapVersion="$(debootstrap --version)" + debootstrapVersion="${debootstrapVersion##* }" + if dpkg --compare-versions "$debootstrapVersion" '>=' '1.0.69'; then + args+=( --force-check-gpg ) + fi + + args+=( "$suite" ) + if [ "$mirror" ]; then + args+=( "$mirror" ) + if [ "$script" ]; then + args+=( "$script" ) + fi + fi + + mkimage="$(readlink -f "${MKIMAGE:-"mkimage.sh"}")" + { + echo "$(basename "$mkimage") ${args[*]/"$dir"/.}" + echo + echo 'https://github.com/docker/docker/blob/master/contrib/mkimage.sh' + } > "$dir/build-command.txt" + + sudo rm -rf "$dir/rootfs" + sudo nice ionice -c 3 "$mkimage" "${args[@]}" 2>&1 | tee "$dir/build.log" + + sudo chown -R "$(id -u):$(id -g)" "$dir" + + if [ "$repo" ]; then + ( set -x && docker build -t "${repo}:${suite}" "$dir" ) + if [ "$suite" != "$version" ]; then + ( set -x && docker tag "${repo}:${suite}" "${repo}:${version}" ) + fi + if [ "$suite" = "$latest" ]; then + ( set -x && docker tag "$repo:$suite" "$repo:latest" ) + fi + docker run --rm "${repo}:${suite}" bash -xc ' + cat /etc/apt/sources.list + echo + cat /etc/os-release 2>/dev/null + echo + cat /etc/lsb-release 2>/dev/null + echo + cat /etc/debian_version 2>/dev/null + true + ' + docker run --rm "${repo}:${suite}" dpkg-query -f '${Package}\t${Version}\n' -W > "$dir/build.manifest" + fi + + if [ "${backports[$suite]}" ]; then + mkdir -p "$dir/backports" + echo "FROM $origRepo:$suite" > "$dir/backports/Dockerfile" + cat >> "$dir/backports/Dockerfile" <<-'EOF' + RUN awk '$1 ~ "^deb" { $3 = $3 "-backports"; print; exit }' /etc/apt/sources.list > /etc/apt/sources.list.d/backports.list + EOF + + if [ "$repo" ]; then + ( set -x && docker build -t "${repo}:${suite}-backports" "$dir/backports" ) + fi + fi + + IFS=$'\n' + set -o noglob + slimExcludes=( $(get_part "$dir" slim-excludes '' | grep -vE '^#|^$') ) + set +o noglob + unset IFS + if [ "${#slimExcludes[@]}" -gt 0 ]; then + sudo rm -rf "$dir/slim/rootfs" + mkdir -p "$dir/slim/rootfs" + sudo tar --extract --file "$dir/rootfs.tar.xz" --directory "$dir/slim/rootfs" + + dpkgCfgFile="$dir/slim/rootfs/etc/dpkg/dpkg.cfg.d/docker" + sudo mkdir -p "$(dirname "$dpkgCfgFile")" + { + echo '# This is the "slim" variant of the Debian base image.' + echo '# Many files which are normally unnecessary in containers are excluded,' + echo '# and this configuration file keeps them that way.' + } | sudo tee -a "$dpkgCfgFile" + + neverExclude='/usr/share/doc/*/copyright' + for slimExclude in "${slimExcludes[@]}"; do + { + echo + echo "# dpkg -S '$slimExclude'" + if dpkgOutput="$(sudo chroot "$dir/slim/rootfs" dpkg -S "$slimExclude" 2>&1)"; then + echo "$dpkgOutput" | sed 's/: .*//g; s/, /\n/g' | sort -u | xargs + else + echo "$dpkgOutput" + fi | fold -w 76 -s | sed 's/^/# /' + echo "path-exclude $slimExclude" + } | sudo tee -a "$dpkgCfgFile" + if [[ "$slimExclude" == *'/*' ]]; then + if [ -d "$dir/slim/rootfs/$(dirname "$slimExclude")" ]; then + # use two passes so that we don't fail trying to remove directories from $neverExclude + sudo chroot "$dir/slim/rootfs" \ + find "$(dirname "$slimExclude")" \ + -mindepth 1 \ + -not -path "$neverExclude" \ + -not -type d \ + -delete + sudo chroot "$dir/slim/rootfs" \ + find "$(dirname "$slimExclude")" \ + -mindepth 1 \ + -empty \ + -delete + fi + else + sudo chroot "$dir/slim/rootfs" rm -f "$slimExclude" + fi + done + { + echo + echo '# always include these files, especially for license compliance' + echo "path-include $neverExclude" + } | sudo tee -a "$dpkgCfgFile" + + sudo tar --numeric-owner --create --auto-compress --file "$dir/slim/rootfs.tar.xz" --directory "$dir/slim/rootfs" --transform='s,^./,,' . + sudo rm -rf "$dir/slim/rootfs" + cp "$dir/Dockerfile" "$dir/slim/" + + sudo chown -R "$(id -u):$(id -g)" "$dir/slim" + + ls -lh "$dir/rootfs.tar.xz" "$dir/slim/rootfs.tar.xz" + + if [ "$repo" ]; then + ( set -x && docker build -t "${repo}:${suite}-slim" "$dir/slim" ) + docker images "${repo}:${suite}" | tail -1 + docker images "${repo}:${suite}-slim" | tail -1 + fi + fi + + find "$dir" \ + \( \ + -name '*.txt' \ + -or -name '*.log' \ + \) \ + -exec sed -i \ + -e 's!'"$PWD"'!/«BREWDIR»!g' \ + -e 's!'"$(dirname "$mkimage")"'!/«MKIMAGEDIR»!g' \ + '{}' + +done