Table of Contents | ||
---|---|---|
|
Questions
Assuming at least some of the packages involved belong to repo modules, how can/should we handle:
pkglist + packages.yaml => building tarball/ISO
Can the pkg/tar/ISO build process still create a usable ISO as it currently does, or will something have to change?
filtering an OS ISO down to its pkglist
e
Note |
---|
Possible (but involved) We can probably use dir2module to re-package just the modules we need and mergerepo_c to build them into a slimmed-down AppStream based on pkglist.txt (or a SIMP/ repo for packages.yml) Details at the end of the RPM module header examples |
adding external packages in packages.yaml
running repoclosure
Warning |
---|
Currently failing: Currently, an AppStream repo mirrored with dnf reposync fails dnf repoclosure rather badly, while the real AppStream repo only has two unresolved deps (both ursine). |
If it can be done: How?
...
Table of Contents | ||
---|---|---|
|
Questions
Assuming at least some of packages we need to ship with SIMP already belong to repo modules, how can/should we handle:
pkglist.txt + packages.yaml => building ISO
Is it possible for the pkg/tar/ISO build process to still create a usable ISO?
Filtering an OS ISO down to its pkglist + adding external packages in packages.yaml
Note |
---|
70% Confidence it’s Possible — but will be complicated We can use dir2module to re-package specific modular packages into slimmer versions of their own modules and then use mergerepo_c to collect them into a slimmed-down AppStream/ repo (based on pkglist.txt) or SIMP/ (based on packages.yml). However, there are several issues that make this complicated:
Remaining unknowns:
|
Testing ISO RPMs' completeness with a repoclosure
Tip |
---|
Recommendation: Use |
To run a repoclosure against ISO-bound/based repos that are staged on the local filesystem:
Code Block |
---|
dnf repoclosure
--disablerepo=\* \
--repofrompath=base,/mnt/BaseOS \
--repofrompath test1,/opt/dnf_reposync_from_iso \
--arch x86_64 \
--check test1 --check base |
Notes:
Make sure there is a
--repofrompath=
for each local repository directory that should be considered during resolution.The
--arch x86_64
Using these arguments, the repoclosure does not require purpose-built
*.repo
files and does not need to run within mock or a chroot.
Impacts to unpack_dvd & kickstart repositories
...
Notes:
So far, the selinux-*policy RPMs have handled whatever I’ve tried
Ancient policy wiki at https://fedoraproject.org/wiki/SELinuxModularityDesign (probably outdated)
Supporting questions
Can we repackage a “thinned-out” module with only select packages?
probably:
EL8 RPM prereqs: createrepo_c (appstream) + modulemd-tools (epel)
Process:
Create initial repo with ursine modules
Code Block mkdir -p $NEW_REPO_DIR/Packages/ursine cp "${URSINE_PACKAGE_FILES[@]}" "$NEW_REPO_DIR/Packages/ursine/" cd "$NEW_REPO_DIR" createrepo_c .
Create a modular repo from packages that already have a common module header
The approach of taking NSVCA from the RPM headers is incomplete and cannot be relied upon to be accurate or available—theStatus colour Yellow title WARNING ModularityLabel
header can contain any String
Use another means of obtaining this data; preferably from the repo itself (the data is sourced from the source repository’sStatus colour Red title DO NOT PRODUCTIZE {XXXXX}-modules.yaml.gz
file)Code Block # Get the ModularityLabel from the RPMs ### WARNING: All RPMs in the module must have a SINGLE and IDENTICAL ModularityLabel find "$DIR_WITH_RPMS" -name \*.rpm \ -exec rpm -qp {} --qf '%{ModularityLabel}\n' \; \ | sort -u ### WARNING: EL and EPEL module headers are aurrent in NSVC format by #### CONVENTION; in reality the ModularityLabel cannot be relied #### upon for correct NSVC data! MODULE_HEADER=nodejs:10:8020020200707141642:6a468ee4
...
Info |
---|
Judging by the bug report at https://bugzilla.redhat.com/show_bug.cgi?id=1547041, The current behavior only resolves module packages using default or enabled streams & profiles. |
Clean DNF install --downloadonly with all deps
...
Make sure you enable/disable the repos to match what you intend for resolution; --config is an option, too.
Code Block | ||
---|---|---|
| ||
DNF_DLONLY_TARGET_PACKAGE=httpd DNF_DLONLY_INSTALL_ROOT=/root/fake-install-dir DNF_DLONLY_PACKAGE_DIR=/root/downloadonly dnf install --downloadonly \ --setopt=install_weak_deps=False \ --installroot="$DNF_DLONLY_INSTALL_ROOT" \ --downloaddir="$DNF_DLONLY_PACKAGE_DIR" \ --disablerepo=\* \ --enablerepo=appstreambaseos \ --disablerepoenablerepo=testappstream \ --releasever=8 \ "$DNF_DLONLY_TARGET_PACKAGE" | ||
Notes:
An an
--enablerepo=
for each repo to consider during resolution.Pointing to an empty
--installroot=
will causednf install --downloadonly
to download EVERY dependency, including the packages for the baseos.In this case,
--setopt=install_weak_deps=False
may be useful to ignore weak RPM dependencies and cut down on the download size.
Documentation
https://sgallagh.wordpress.com/2019/08/14/sausage-factory-modules-fake-it-till-you-make-it/
Notes on building modules independently of Fedora’s hosted build system
https://pagure.io/modularity/issue/141
> * AGREED: Profiles cannot be removed during the lifetime of the stream in order to avoid breaking scripts. Options may exist for exceptional cases on an individual basis. (contyk, 15:41:06)