add new distributions
This commit is contained in:
@@ -28,9 +28,8 @@ if test -z "$archs"; then
|
||||
done
|
||||
fi
|
||||
excludes="precise-armhf stretch-armhf"
|
||||
no_universe="jessie sid wheezy"
|
||||
|
||||
ubuntu="bionic artful zesty xenial trusty"
|
||||
ubuntu="bionic artful xenial trusty"
|
||||
debian="buster stretch jessie sid"
|
||||
# not yet successfully installable: ubuntu zesty, debian buster
|
||||
|
||||
@@ -38,10 +37,11 @@ distros=(${distros:-"${ubuntu[@]}" "${debian[@]}"})
|
||||
|
||||
packages_qt5="libpoppler-qt5-dev libpodofo-dev libqt5designer5 libqt5svg5-dev libqt5webkit5-dev qt5-default qt5-qmake qtbase5-dev qtbase5-dev-tools qttools5-dev qttools5-dev-tools"
|
||||
packages_base="apt-transport-https automake autotools-dev binutils-dev debhelper default-jdk-headless doxygen dpkg-dev g++ git graphviz libboost-thread-dev libcppunit-dev liblog4cxx-dev libpcsclite-dev libpkcs11-helper1-dev libproxy-dev libssl-dev libtool libz-dev lsb-release mscgen nodejs pandoc pkg-config software-properties-common subversion subversion-tools xvfb texinfo"
|
||||
package_not_in_bionic="libpoppler-qt5-dev libqt5webkit5-dev texinfo libcppunit-dev liblog4cxx-dev mscgen nodejs pandoc xvfb libpodofo-dev libqt5designer5 qt5-default qttools5-dev-tools qttools5-dev"
|
||||
package_not_in_artful="texinfo libcppunit-dev liblog4cxx-dev mscgen nodejs pandoc xvfb libpodofo-dev libqt5designer5 qt5-default qttools5-dev-tools qttools5-dev"
|
||||
|
||||
#package_not_in_bionic="libpoppler-qt5-dev libqt5webkit5-dev texinfo libcppunit-dev liblog4cxx-dev mscgen nodejs pandoc xvfb libpodofo-dev libqt5designer5 qt5-default qttools5-dev-tools qttools5-dev"
|
||||
#package_not_in_artful="libpoppler-qt5-dev libqt5webkit5-dev texinfo libcppunit-dev liblog4cxx-dev mscgen nodejs pandoc xvfb libpodofo-dev libqt5designer5 qt5-default qttools5-dev-tools qttools5-dev"
|
||||
package_not_in_stretch="libssl-dev"
|
||||
package_not_in_zesty="texinfo libcppunit-dev liblog4cxx-dev mscgen nodejs pandoc xvfb libpodofo-dev libqt5designer5 qt5-default qttools5-dev-tools qttools5-dev"
|
||||
#package_not_in_zesty="texinfo libcppunit-dev liblog4cxx-dev mscgen nodejs pandoc xvfb libpodofo-dev libqt5designer5 qt5-default qttools5-dev-tools qttools5-dev"
|
||||
#package_not_in_yakkety="default-jdk-headless"
|
||||
package_not_in_wily="default-jdk-headless"
|
||||
package_not_in_vivid="default-jdk-headless liblog4cxx-dev"
|
||||
@@ -55,7 +55,7 @@ if test -z "${packages}"; then
|
||||
fi
|
||||
|
||||
fastmode=0;
|
||||
limit=
|
||||
declare -a limit=()
|
||||
arch=
|
||||
docker_user=${docker_user:-${USER:-$(id -un)}}
|
||||
while [ $# -gt 0 ]; do
|
||||
@@ -67,14 +67,15 @@ OPTIONS:
|
||||
|
||||
-h, --help show this help
|
||||
-f, --fastmode don't update existing distribution
|
||||
-l, --limit <distro> limit to given ditribution
|
||||
-a, --arch <arch> limit to given architecture
|
||||
-l, --limit <distro> limit to given ditribution (can be called multiple times)
|
||||
-a, --arch <arch> limit to given architecture (can be called multiple times)
|
||||
-u, --user <name> docker hub user name
|
||||
|
||||
VARIABLES:
|
||||
|
||||
docker_user docker hub user name (${docker_user})
|
||||
tmpdir temporary directory (${tmpdir})
|
||||
archs list of architectures to build for (${archs})
|
||||
|
||||
DESCRIPTION:
|
||||
|
||||
@@ -92,8 +93,8 @@ login to docker hub before you start this script.
|
||||
EOF
|
||||
exit 0;;
|
||||
(-f|--fastmode) fastmode=1;;
|
||||
(-l|--limit) shift; limit=$1;;
|
||||
(-a|--arch) shift; arch=$1;;
|
||||
(-l|--limit) shift; limit+=( "$1" );;
|
||||
(-a|--arch) shift; arch+=" $1";;
|
||||
(-u|--user) shift; docker_user=$1;;
|
||||
(*)
|
||||
echo "**** ERROR: unknown option $1" 1>&2
|
||||
@@ -113,6 +114,9 @@ error() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
if test ${#limit[@]} -gt 0; then
|
||||
distros=( "${limit[@]}" )
|
||||
fi
|
||||
for ((i=0; i<${#distros[@]}; ++i)); do
|
||||
for distro in ${distros[$i]}; do
|
||||
prevent=package_not_in_${distro}
|
||||
@@ -121,9 +125,6 @@ for ((i=0; i<${#distros[@]}; ++i)); do
|
||||
for pkg in ${!prevent}; do
|
||||
instpkgs=${instpkgs//${pkg}/}
|
||||
done
|
||||
if test -n "$limit" -a "$distro" != "$limit"; then
|
||||
continue
|
||||
fi
|
||||
if ! test -e /usr/share/debootstrap/scripts/${distro}; then
|
||||
echo "**** WARNING: skipping unsupported ${distro}" 1>&2
|
||||
continue;
|
||||
@@ -150,12 +151,12 @@ for ((i=0; i<${#distros[@]}; ++i)); do
|
||||
echo " ---- install ${tmpdir}/${distro}-${arch}" 1>&2
|
||||
sudo debootstrap --arch="$arch" "$distro" "${tmpdir}/${distro}-${arch}"
|
||||
else
|
||||
for ((i=0; $i<$numports; ++i)); do
|
||||
if test "${ports[$i]}" = "${arch}"; then
|
||||
for ((j=0; j<$numports; ++j)); do
|
||||
if test "${ports[$j]}" = "${arch}"; then
|
||||
break;
|
||||
fi
|
||||
done
|
||||
qemu="${qemus[$i]}"
|
||||
qemu="${qemus[$j]}"
|
||||
if ! test -e /usr/bin/qemu-${qemu}-static; then
|
||||
echo "**** WARNING: no emulator ${qemu} found, skipping ${arch}" 1>&2
|
||||
continue;
|
||||
@@ -212,10 +213,9 @@ EOF1
|
||||
sudo chroot "${tmpdir}/${distro}-${arch}" apt-get -o Acquire::ForceIPv4=true -y upgrade
|
||||
sudo chroot "${tmpdir}/${distro}-${arch}" apt-get -o Acquire::ForceIPv4=true install -y python-software-properties software-properties-common || \
|
||||
sudo chroot "${tmpdir}/${distro}-${arch}" apt-get -o Acquire::ForceIPv4=true install -y software-properties-common
|
||||
if [[ "${distro}" = "${no_universe}" ]]; then
|
||||
if [ "$type" != "debian" ]; then
|
||||
sudo chroot "${tmpdir}/${distro}-${arch}" add-apt-repository universe || \
|
||||
( test "$type" != "debian" && \
|
||||
sudo chroot "${tmpdir}/${distro}-${arch}" add-apt-repository "deb http://archive.ubuntu.com/ubuntu ${distro} universe" )
|
||||
sudo chroot "${tmpdir}/${distro}-${arch}" add-apt-repository "deb http://archive.ubuntu.com/ubuntu ${distro} universe"
|
||||
fi
|
||||
sudo chroot "${tmpdir}/${distro}-${arch}" apt-get -o Acquire::ForceIPv4=true update
|
||||
sudo chroot "${tmpdir}/${distro}-${arch}" apt-get -o Acquire::ForceIPv4=true -y dist-upgrade
|
||||
|
Reference in New Issue
Block a user