summaryrefslogtreecommitdiffstats
path: root/redhat/docker/pclinuxos.sh
blob: 3791afc94e86543964d7c56487287b2427fd0f72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
#!/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}"