Skip to content

Commit

Permalink
create-installimg: switch from mock to plain yum
Browse files Browse the repository at this point in the history
Mock is really not tuned towards production of a standalone
filesystem, and adds too much cruft (special user in the rootfs, etc)
and constraints (yum^Wdnf config embedded in its own config file,
CentOS7-era version much too old and lacking useful features) for too
little value.

Script now has to be run as root, preferably in our SDK docker.
  • Loading branch information
ydirson committed Apr 18, 2023
1 parent ce3438c commit 1e15b1e
Show file tree
Hide file tree
Showing 17 changed files with 1,210 additions and 1,060 deletions.
21 changes: 8 additions & 13 deletions README-iso.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Creates `install-$RELEASE.img` for input to `create-install-iso`, from:
```
./scripts/mirror-repos.sh 8.3
./scripts/create-installimg.sh \
sudo ./scripts/create-installimg.sh \
--srcurl file://$HOME/mirrors/xcpng/8.3 \
8.3.0
Expand All @@ -47,19 +47,19 @@ Creates `install-$RELEASE.img` for input to `create-install-iso`, from:
8.3.0 install-8.3.0-x86_64.img xcp-ng-8.3-install.iso
```

### 8.2.1
### latest 8.2

```
./scripts/mirror-repos.sh 8.2
./scripts/create-installimg.sh \
sudo ./scripts/create-installimg.sh \
--srcurl file://$HOME/mirrors/xcpng/8.2 \
8.2.1
8.2.updates
./scripts/create-install-iso.sh \
--srcurl file://$HOME/mirrors/xcpng/8.2 \
-V "XCP-NG_821_TEST" \
8.2.1 install-8.2.1-x86_64.img xcp-ng-8.2.1-install.iso
8.2.1 install-8.2.updates-x86_64.img xcp-ng-8.2.1-install.iso
```

### testing boot modes in qemu
Expand Down Expand Up @@ -134,11 +134,8 @@ Work to reproduce install.img
- ...
* file diffs:
* kernel modules differ (!)
* mock leaves a "mockbuild" user and "mock" group behind
* /etc/issue
* /etc/localtime points to Paris not UTC
* host contamination:
* hostname leaks into $B/etc/hosts
* ~~$B/etc/multipath.conf.disabled~~: not really, comes from BuildRequires
* metadata diffs
* removed locale files are not flagged as missing in CH8C install.img by "rpm -V", not clear now they achieved this
Expand All @@ -157,7 +154,7 @@ Comparison of install.img between XCP-ng 8.2.0's official ISOs and newly generat
- [ ] There's also another depmod conf file that we used to modify the same way: /etc/depmod.d/dist.conf. Which one is necessary?

- [ ] We modify filemodes in /usr/lib/debug/usr, why?
- [ ] Also filemodes of /etc/fstab, /etc/gshadow, /etc/hosts, /etc/shadow, /var/lib/yum/history
- [ ] Also filemodes of /etc/fstab, /etc/hosts, /var/lib/yum/history

- [ ] We remove less modules than Citrix, so in results less firmware files are removed too? (triggerin in host-installer) => investigate

Expand All @@ -169,20 +166,18 @@ Comparison of install.img between XCP-ng 8.2.0's official ISOs and newly generat

- [ ] There are two .rpmnew files we can delete, including /etc/hosts.rpmnew whose contents is better (includes localhost4)

- [ ] There's a /installation-homedir, why?
- [x] ~~There's a /installation-homedir, why?~~

- [ ] Clean-up /var/lib/yum

Store our own version of mock's bootstrap image quay.io/centos/centos:7


### ISO image

- [ ] Remove groups-XS.xml

- [x] kernel-alt is missing in Packages/

- [ ] Store quay.io image locally? Only if a simple file.
- [x] ~~Store quay.io image locally? Only if a simple file.~~

- [ ] Packages/ for 8.2.0 contains libverto-libevent instead of libverto-tevent (both fulfill the same Provides). Could it have adverse effects? Does this problem affect 8.3 ISOs? Create a yum conf, used when Packages/ is generated, where in case of doubt libverto-tevent be prefered?

Expand Down
255 changes: 255 additions & 0 deletions configs/8.2.testing/packages.lst
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
GeoIP
acl
aic94xx-firmware
audit-libs
avago-megaraid-sas
avago-mpt3sas
basesystem
bash
bind-libs-lite
bind-license
biosdevname
boost-system
boost-thread
bridge-utils
broadcom-bnxt-en
bzip2
bzip2-libs
ca-certificates
chelsio-cxgb4
chkconfig
chrony
cisco-enic
cisco-fnic
coreutils
cpio
cracklib
cracklib-dicts
cryptsetup-libs
curl
cyrus-sasl-lib
dbus
dbus-libs
device-mapper
device-mapper-event
device-mapper-event-libs
device-mapper-libs
device-mapper-multipath
device-mapper-multipath-libs
device-mapper-persistent-data
dhclient
dhcp-common
dhcp-libs
diffutils
dmidecode
e2fsprogs
e2fsprogs-libs
edk2
efibootmgr
efivar-libs
elfutils-default-yama-scope
elfutils-libelf
elfutils-libs
emulex-lpfc
ethtool
expat
fcoe-utils
file-libs
filesystem
findutils
fipscheck
fipscheck-lib
gawk
gdbm
gdisk
glib2
glibc
glibc-common
gmp
gnupg2
gpgme
grep
gssproxy
gzip
hardlink
host-installer-startup
hostname
hwdata
info
initscripts
intel-e1000e
intel-fm10k
intel-i40e
intel-ice
intel-igb
intel-ixgbe
iproute
iputils
ipxe
iscsi-initiator-utils
iscsi-initiator-utils-iscsiuio
json-c
kbd
kbd-legacy
kbd-misc
kernel
kernel-alt
keyutils
keyutils-libs
kmod
kmod-libs
kpartx
krb5-libs
libacl
libaio
libassuan
libattr
libbasicobjects
libblkid
libcap
libcap-ng
libcollection
libcom_err
libconfig
libcurl
libdb
libdb-utils
libedit
libempserver
libestr
libevent
libfastjson
libffi
libgcc
libgcrypt
libgpg-error
libicu
libidn
libini_config
libmnl
libmount
libnfsidmap
libnl3
libpath_utils
libpciaccess
libpwquality
librados2
libref_array
libreport-filesystem
libseccomp
libselinux
libsemanage
libsepol
libss
libssh2
libstdc++
libsysfs
libtasn1
libtirpc
libuser
libutempter
libuuid
libverto
libverto-libevent
libxml2
linux-firmware
lldpad
logrotate
lua
lvm2
lvm2-libs
lz4
lzo
mdadm
microsemi-smartpqi
ncurses
ncurses-base
ncurses-libs
net-tools
newt
newt-python
nfs-utils
nspr
nss
nss-pem
nss-softokn
nss-softokn-freebl
nss-sysinit
nss-tools
nss-util
openldap
openssh
openssh-clients
openssh-server
openssl-libs
p11-kit
p11-kit-trust
pam
pciutils
pciutils-libs
pcre
pinentry
popt
procps-ng
psmisc
pth
pygpgme
pyliblzma
python
python-iniparse
python-libs
python-pycurl
python-urlgrabber
pyxattr
qlogic-fastlinq
qlogic-netxtreme2-4.19.0+1-modules
qlogic-netxtreme2
qlogic-qla2xxx
qlogic-qla2xxx-firmware
qrencode-libs
quota
quota-nls
readline
rootfiles
rpcbind
rpm
rpm-build-libs
rpm-libs
rpm-python
rsync
rsyslog
sed
setup
sg3_utils-libs
shadow-utils
shared-mime-info
slang
sqlite
systemd
systemd-libs
systemd-sysv
sysvinit-tools
tar
tcp_wrappers
tcp_wrappers-libs
tzdata
ustr
util-linux
vendor-drivers
vim-minimal
wget
xcp-python-libs
xen-dom0-libs
xen-dom0-tools
xen-installer-files
xen-libs
xen-tools
xcp-ng-release
xcp-ng-release-presets
xz
xz-libs
yajl
yum
yum-metadata-parser
yum-plugin-fastestmirror
zlib
39 changes: 39 additions & 0 deletions configs/8.2.testing/yum.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[main]
keepcache=1
debuglevel=2
reposdir=/dev/null
logfile=/var/log/yum.log
retries=20
obsoletes=1
gpgcheck=1
assumeyes=1
syslog_ident=mock
syslog_device=
metadata_expire=0
mdpolicy=group:primary
best=1
protected_packages=
skip_missing_names_on_install=0
tsflags=nodocs

# repos
[xcpng-base]
name=xcpng-$releasever - Base
baseurl=@@SRCURL@@/base/@@RPMARCH@@/
gpgkey=https://xcp-ng.org/RPM-GPG-KEY-xcpng
failovermethod=priority
skip_if_unavailable=False

[xcpng-updates]
name=xcpng-$releasever - Updates
baseurl=@@SRCURL@@/updates/@@RPMARCH@@/
gpgkey=https://xcp-ng.org/RPM-GPG-KEY-xcpng
failovermethod=priority
skip_if_unavailable=False

[xcpng-testing]
name=xcpng-$releasever - Testing
baseurl=@@SRCURL@@/testing/@@RPMARCH@@/
gpgkey=https://xcp-ng.org/RPM-GPG-KEY-xcpng
failovermethod=priority
skip_if_unavailable=False
Loading

0 comments on commit 1e15b1e

Please sign in to comment.