You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
174 lines
10 KiB
174 lines
10 KiB
#!/bin/bash
|
|
|
|
NAME="pclinuxos"
|
|
VERSION="$1" # E.g: '26'
|
|
IMAGE="${NAME}:${VERSION}"
|
|
INSTALLROOT="/dev/shm/${IMAGE}"
|
|
|
|
sudo rm -rf "${INSTALLROOT}"
|
|
sudo mkdir -p "${INSTALLROOT}"
|
|
|
|
MIRROR="http://distrib-coffee.ipsl.jussieu.fr/pub/linux/pclinuxos/pclinuxos/apt/pclinuxos/64bit"
|
|
|
|
cd /dev/shm
|
|
wget -c \
|
|
"${MIRROR}/RPMS.x86_64/bash-4.3-48.1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/glibc-2.20-10pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/rpm-4.8.1-10pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64readline6-6.3-4pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64ncurses5-5.9-9pclos2015.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/rpm-helper-0.23.5-1pclos2015.noarch.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/mktemp-1.7-2pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/setup-2.7.17-1pclos2011.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/findutils-4.6.0-3pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/run-parts-3.2.1-1pclos2011.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/shadow-utils-4.1.4.2-1pclos2011.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/coreutils-8.27-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/chkconfig-1.3.37-4pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64ncursesw5-5.9-9pclos2015.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/gawk-4.1.2-1pclos2015.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64rpm1-4.8.1-10pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/cpio-2.11-3pclos2014.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/gawk-4.1.2-1pclos2015.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/grep-2.28-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/rpm-rambo-setup-1.1-2pclos2017.noarch.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/rpm-pclinuxos-setup-1.135-4pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64popt0-1.16-1pclos2011.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64tcb0-1.0.3-2pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64pam_userpass1-1.0.2-2pclos2011.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/pam_tcb-1.0.3-2pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64lzma5-5.2.3-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/bzip2-1.0.6-2pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64audit1-2.1.2-3pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/update-alternatives-1.9.0-1pclos2011.noarch.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/zlib1-1.2.10-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64bzip2_1-1.0.6-2pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/util-linux-ng-2.30.1-3pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64acl1-2.2.51-1pclos2013.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64attr1-2.4.46-1pclos2011.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64cap2-2.25-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64gmp10-6.1.2-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/info-install-5.0-2pclos2013.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/rmt-0.4b46-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64mpfr4-3.1.4-1pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64sigsegv2-2.10-2pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/dash-static-0.5.6.1-3pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/filesystem-2.1.9-1pclos2011.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/dash-static-0.5.6.1-3pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64pcre2_0-10.23-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64pcre1-8.36-1pclos2014.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/xz-5.2.3-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/ncurses-5.9-9pclos2015.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/libgcc1-4.9.2-2pclos2015.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/libstdc++6-4.9.2-2pclos2015.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64uuid1-2.30.1-3pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64udev0-168-6pclos2011.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64smartcols1-2.30.1-3pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64mount1-2.30.1-3pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64fdisk1-2.30.1-3pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64libcap-ng0-0.7.7-1pclos2015.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64blkid1-2.30.1-3pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/udev-168-6pclos2011.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64iso9660_7-0.93-3pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64blkid1-2.30.1-3pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/diffutils-3.3-1pclos2013.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64usb1.0_0-1.0.21-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/openssl-1.0.2l-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64cdio12-0.93-3pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64pcre-compatible0-8.21-1pclos2013.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/popt-data-1.16-1pclos2011.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64db4.8-4.8.30-1pclos2011.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64elfutils1-0.166-1pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64lua5.1-5.1.5-1pclos2012.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64magic1-5.31-2pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64nspr4-4.14-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64nss3-3.28.4-2pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64sqlite3_0-3.1070-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/rootcerts-20170401.00-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/ldetect-lst-0.2.8-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/nss-3.28.4-2pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/perl-base-5.22.3-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/gzip-1.8-1pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/usbutils-007-1pclos2014.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64notify4-0.7.7-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/less-487-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64glib2.0_0-2.52.3-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64gio2.0_0-2.52.3-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/gdk-pixbuf2.0-2.36.7-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/tcb-1.0.3-2pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/pkgconfig-0.29-1pclos2015.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64openssl1.0.0-1.0.2l-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/common-licenses-1.0-14pclos2017.noarch.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64gdk_pixbuf2.0_0-2.36.7-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64notify4-0.7.7-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/file-5.31-2pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64ffi6-3.2.1-1pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/perl-5.22.3-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64tiff3-3.9.5-2pclos2012.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/libnotify-0.7.7-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64x11_6-1.6.5-2.1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64jasper1-1.900.1-3pclos2014.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64jpeg8-1.4.2-1pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64png3-1.2.57-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/libxcb-1.12-3.1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64gdbm3-1.8.3-5pclos2013.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/nss_tcb-1.0.3-2pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64usb-compat0.1_4-0.1.5-2pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64tiff5-4.0.6-1pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64openssl-engines1.0.0-1.0.2l-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64xau6-1.0.8-3.1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64xdmcp6-1.1.2-3.1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64jbig1-2.0-1pclos2011.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64bsd0-0.8.3-1pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64icu56-56.1-1pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/icu56-data-56.1-1pclos2016.noarch.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64jpeg62-6b-48pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/cracklib-dicts-2.9.1-1pclos2014.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64crack2-2.9.1-1pclos2014.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64dbnss4.8-4.8.30-1pclos2011.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/apt-0.5.15lorg3.95-10pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/gnupg-1.4.22-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64apt-pkg0-0.5.15lorg3.95-10pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/apt-sources-list-1.2-7pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64curl4-7.54.0-2pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64ldap2.4_2-2.4.23-3pclos2015.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/apt-common-0.5.15lorg3.95-10pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64xml2_2-2.9.4-2pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64rtmp1-2.4-1pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64ssh2_1-1.6.0-1pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/openldap-2.4.23-3pclos2015.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64sasl2-2.1.23-3pclos2013.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64krb53-1.15.1-2pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/krb5-1.15.1-2pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64keyutils1-1.2-6pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64verto1-0.2.6-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64ext2fs2-1.43.1-2pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/e2fsprogs-1.43.1-2pclos2016.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/uuidd-2.30.1-3pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/lib64audit-devel-2.1.2-3pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/glibc-devel-2.20-10pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/glibc-headers-devel-4.9.4-1pclos2017.x86_64.rpm" \
|
|
"${MIRROR}/RPMS.x86_64/rpm-pclinuxos-setup-1.135-5pclos2017.x86_64.rpm" \
|
|
"http://ftp.nluug.nl/pub/os/Linux/distr/pclinuxos/pclinuxos/apt/pclinuxos/64bit/RPMS.x86_64/lib64pam0-1.1.4-1pclos2011.x86_64.rpm" \
|
|
"http://ftp.nluug.nl/pub/os/Linux/distr/pclinuxos/pclinuxos/apt/pclinuxos/64bit/RPMS.x86_64/pam-1.1.4-1pclos2011.x86_64.rpm" \
|
|
"http://ftp.nluug.nl/pub/os/Linux/distr/pclinuxos/pclinuxos/apt/pclinuxos/64bit/RPMS.x86_64/lib64pam-devel-1.1.4-1pclos2011.x86_64.rpm" \
|
|
"http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/6/x86_64/media/core/release//fdupes-1.51-6.mga6.x86_64.rpm" \
|
|
|
|
sudo mkdir -p "${INSTALLROOT}/var/lib/rpm"
|
|
sudo rpmdb --initdb --root="${INSTALLROOT}"
|
|
|
|
sudo rpm -Uvh \
|
|
--root="${INSTALLROOT}" \
|
|
*.rpm
|
|
|
|
cd -
|
|
|
|
sudo chroot "${INSTALLROOT}" rpmdb --rebuilddb
|
|
sudo chroot "${INSTALLROOT}" rpmdb --rebuilddb
|
|
|
|
sudo tar -C "${INSTALLROOT}" -c . >"${IMAGE}.tar"
|
|
sudo rm -rf "${INSTALLROOT}"
|
|
|
|
docker rmi -f "${IMAGE}"
|
|
docker import "${IMAGE}.tar" "${IMAGE}"
|