Commit Graph

24 Commits

Author SHA1 Message Date
Evan Goode
86fdcfb160 Replace dnf with dnf5 2024-04-29 11:48:00 -04:00
Michal Hlavinka
358de365f3 remove passwd, it was retired
passwd was retired, it's function was replaced by shadow-utils,
which is already include in ks
see https://fedoraproject.org/wiki/Changes/LibuserDeprecation
2024-03-20 12:43:30 +01:00
Debarshi Ray
0d99c64eb2 container-toolbox: Use 'toolbx' as VARIANT_ID in os-release(5)
This is meant to distinguish OCI containers and images that are designed
specifically for Toolbx from others.  Toolbx containers are long-lasting
pet containers for interactive command line use, which makes them
substantially different from short-lived containers running services.

Therefore, it can be useful to be able to identify Toolbx containers and
images when generating statistics about Fedora usage.

https://pagure.io/Fedora-Council/tickets/issue/449
https://pagure.io/fedora-kickstarts/pull-request/1015
2024-02-13 19:10:14 +00:00
Adam Williamson
268181498d Replace all 'wget' with 'wget2-wget': Wget2asWget Change
Per https://fedoraproject.org/wiki/Changes/Wget2asWget , wget
has been retired from Rawhide and replaced by wget2-wget.

I think kickstarts *do* resolve Provides so this probably works
okay as-is, but it seems clearer to update the name.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-01-31 09:17:37 -08:00
Ian Wienand
eab4fdc148
fedora-container-toolbox: drop systemd
Since change 48e2c3b559 this kickstart
is pulling in systemd.

This was noticed because since
49306cb6ea started bringing in
weak-dependencies, we started installing systemd-resolved is which
created a symlinked /etc/resolv.conf in the image.  Toolbox will not
currently reset this on container start, as it is a symlink (this
behaviour is a bit complicated; see [1]).  This leads to an
incompatability running the toolbox on *non* systemd-resolved hosts
(e.g. RHEL9); you are left with a dangling symlink and no
name-resolution in the toolbox.

We do not want systemd in the toolbox image by default it; remove it
from the list.  Exclude systemd-resolved specifically, so if something
else brings in systemd we still don't include this.

[1] https://github.com/containers/toolbox/issues/1410
2023-12-18 10:00:13 +11:00
Debarshi Ray
c0884eadaf container-toolbox: Sprinkle some comments
https://pagure.io/fedora-kickstarts/pull-request/1008
2023-10-31 01:34:49 +01:00
Debarshi Ray
8e97664cb7 container-toolbox: Synchronize the tests with the Container/Dockerfile
The same changes were made to the Container/Dockerfile equivalent of the
fedora-toolbox OCI images in recent times [1, 2, 3].

[1] Toolbx commit 20188a097a1a7a16
    https://github.com/containers/toolbox/commit/20188a097a1a7a16
    https://github.com/containers/toolbox/pull/1384

[2] Toolbx commit e41d920dd9a847cc
    https://github.com/containers/toolbox/commit/e41d920dd9a847cc
    https://github.com/containers/toolbox/pull/1390

[3] Toolbx commit 9b5313e5a76c9278
    https://github.com/containers/toolbox/commit/9b5313e5a76c9278
    https://github.com/containers/toolbox/pull/1394

https://pagure.io/fedora-kickstarts/pull-request/1008
2023-10-31 01:34:45 +01:00
Debarshi Ray
7725ee859c container-toolbox: Restore the tests
The tests can't be run inside the '%post --nochroot' section because
the paths being tested don't include the /mnt/sysimage prefix.  The
tests must be run in the %post section without --nochroot so that they
are run inside the chroot environment.

The translations for the RPM manuals were removed upstream during the
RPM 4.19 development cycle [1].  So, replace them with rpm2cpio(8),
which is another popular command shipped by the rpm package.

[1] RPM commit 4df74a9644b18136
    https://github.com/rpm-software-management/rpm/commit/4df74a9644b18136
    https://github.com/rpm-software-management/rpm/pull/2245

https://pagure.io/fedora-kickstarts/pull-request/1008
2023-10-31 01:34:40 +01:00
Debarshi Ray
744a9fd9aa container-toolbox: Add psmisc
It's currently being pulled in as a dependency of iproute.  However,
since it's explicitly mentioned in the list of default packages on
Fedora Silverblue and Workstation [1], it should be mentioned here too.

The same change was also made to the Container/Dockerfile equivalent of
the fedora-toolbox OCI images [2].

[1] fedora-comps commit e4ed54dfcc497fd0
    https://pagure.io/fedora-comps/c/e4ed54dfcc497fd0
    https://pagure.io/fedora-comps/pull-request/379

[2] Toolbx commit e41d920dd9a847cc
    https://github.com/containers/toolbox/commit/e41d920dd9a847cc
    https://github.com/containers/toolbox/pull/1390

https://bugzilla.redhat.com/show_bug.cgi?id=2244503
https://pagure.io/fedora-kickstarts/pull-request/1003
2023-10-25 18:31:29 +02:00
Debarshi Ray
d6aac886a0 container-toolbox: Use vim-minimal, not vim-enhanced
Fedora Silverblue and Workstation, and hence the Container/Dockerfile
equivalent of the fedora-toolbox OCI images, contain vim-minimal by
default, not vim-enhanced.  This is because the default editor is GNU
nano, not Vim.

https://bugzilla.redhat.com/show_bug.cgi?id=2244503
https://pagure.io/fedora-kickstarts/pull-request/1003
2023-10-25 18:31:29 +02:00
Debarshi Ray
30f76d387d container-toolbox: Install all languages (part 2)
This is a continuation from commit 69555b7b91, which tried to
ensure that all languages are present in the fedora-toolbox OCI image by
removing --inst-langs=en from fedora-container-toolbox.ks.  Sadly, this
wasn't enough.

The image was still missing various localization bits like translations
for programs and manuals.  All translations for all programs, such as
LC_MESSAGES and LC_TIME, were missing, except for those coming from
glibc-all-langpacks.  eg., see:
  $ LANG=cs_CZ.UTF-8 cp foo bar
  cp: cannot stat 'foo': Adresář nebo soubor neexistuje

Only the part coming from glibc is translated.  The part coming from
coreutils isn't.  There are lots and lots of such packages.  eg., bash,
coreutils, dnf, grep, rpm, sed, tar, etc..

Any package with translated manuals marked with %lang() in their %files
section were missing them.  eg., man-db, passwd, psmisc, etc..

Finally, even though the %pre section in fedora-container-toolbox.ks
removes %_install_langs from /etc/rpm/macros.image-language-conf, it was
still set to en_US in the final image.

This was happening because fedora-container-toolbox.ks includes
fedora-container-common.ks, and some unintended bits from the latter
were leaking into the fedora-toolbox OCI image's build.

The image was still being built with '%packages --inst-langs=en',
possibly since fedora-container-common.ks has '%package --instLangs=en'.
That option wasn't just being applied to the packages being installed by
fedora-container-common.ks, but also to those being installed by
fedora-container-toolbox.ks [1].

Secondly, fedora-container-common.ks sets %_install_langs to en_US in
its %post section.  This will strip out all non-English languages from
future RPM transactions in containers created from the image.

To address this, fedora-container-toolbox.ks has now been decoupled from
fedora-container-common.ks, by copying over the relevant bits.

[1] https://koji.fedoraproject.org/koji/buildinfo?buildID=2311452
    https://kojipkgs.fedoraproject.org//packages/Fedora-Container-Toolbox/Rawhide/20231025.n.0/images/fedora-container-toolbox.ks
    https://kojipkgs.fedoraproject.org//packages/Fedora-Container-Toolbox/Rawhide/20231025.n.0/images/koji-f40-build-108073454-base.ks
    https://kojipkgs.fedoraproject.org//packages/Fedora-Container-Toolbox/Rawhide/20231025.n.0/data/logs/image/oz-aarch64.log

https://bugzilla.redhat.com/show_bug.cgi?id=2244503
https://pagure.io/fedora-kickstarts/pull-request/1002
2023-10-25 18:25:45 +02:00
Debarshi Ray
69555b7b91 container-toolbox: Install all languages
The Container/Dockerfile equivalent of the fedora-toolbox OCI images
installed all languages by removing %_install_langs (set to en_US by the
fedora base image) from /etc/rpm/macros.image-language-conf [1].  The
Kickstart does the same in the %pre section.

Therefore, it's self-contradictory to have '%packages --inst-langs=en'.

The fedora-toolbox OCI image is meant for interactive command line
environments, not for deploying server applications.  Therefore, they
need a fully featured CLI user experience at par with what's offered on
Fedora Silverblue and Workstation.  Among the Kickstart files defined
here, other than fedora-container-toolbox.ks, only these ones don't
install all languages:
  * fedora-cloud-base.ks
  * fedora-container-base-minimal.ks
  * fedora-container-base.ks
  * fedora-container-common.ks
  * fedora-eln-container-base.ks
  * fedora-server-vm-full.ks

All the other Kickstarts, and definitely those for Fedora Workstation,
install all languages.

[1] https://src.fedoraproject.org/container/fedora-toolbox
    https://github.com/containers/toolbox/tree/main/images/fedora

https://bugzilla.redhat.com/show_bug.cgi?id=2244503
https://pagure.io/fedora-kickstarts/pull-request/997
2023-10-16 19:14:17 +02:00
Debarshi Ray
49306cb6ea container-toolbox: Include weak dependencies
The Container/Dockerfile equivalent of the fedora-toolbox OCI images
didn't exclude weak dependencies [1] so the Kickstart shouldn't either.

The fedora-toolbox OCI image is meant for interactive command line
environments, not for deploying server applications.  Therefore, they
need a fully featured CLI user experience at par with what's offered on
Fedora Silverblue and Workstation.  Among the Kickstart files defined
here, other than fedora-container-toolbox.ks, only these ones exclude
weak dependencies:
  * fedora-container-base-minimal.ks
  * fedora-container-base.ks
  * fedora-container-common.ks
  * fedora-eln-container-base.ks
  * fedora-modular-disk-minimal.ks

None of the other Kickstarts, and definitely not those for Fedora
Workstation, exclude weak dependencies.

As a concrete example, the default-editor meta RPM relies on Recommends
for its functionality [2].

[1] https://src.fedoraproject.org/container/fedora-toolbox
    https://github.com/containers/toolbox/tree/main/images/fedora

[2] fedora nano commit e53ee57baa33a1d8
    https://src.fedoraproject.org/rpms/nano/c/e53ee57baa33a1d8
    https://src.fedoraproject.org/rpms/nano/pull-request/7
    https://bugzilla.redhat.com/show_bug.cgi?id=1955884

https://pagure.io/fedora-kickstarts/pull-request/995
2023-10-16 06:39:34 +00:00
Debarshi Ray
f10385252a container-toolbox: Fix typo between %pre and %post
The snippet to fix the /run/lock breakage and the lines following it
were copied from the first %post section in fedora-container-base.ks.
However, the %end marker to terminate the previous %pre section, and the
starting %post marker went missing in fedora-container-toolbox.ks

https://pagure.io/fedora-kickstarts/pull-request/993
2023-10-06 02:59:50 +02:00
Debarshi Ray
0087ea3b3f container-toolbox: Use default-editor, not nano-default-editor
In Fedora 33, nano-default-editor was introduced to make GNU nano the
default editor [1].  After a year, it was found out that it breaks
upgrades across Fedora releases if the user had chosen some other editor
as the default [2].

The difference doesn't matter here because the fedora-toolbox OCI image
is being created from scratch without involving any upgrades.  However,
since fedora-comps was switched to default-editor [3], it's better to
do the same and stay consistent.  If nothing else, it won't make the
reader stop and ponder if there's any real reason that it was done
differently for the fedora-toolbox image.

[1] fedora nano commit cf1ce689f154d0a1
    https://src.fedoraproject.org/rpms/nano/c/cf1ce689f154d0a1
    https://src.fedoraproject.org/rpms/nano/pull-request/1
    https://fedoraproject.org/wiki/Changes/UseNanoByDefault

[2] fedora nano commit e53ee57baa33a1d8
    https://src.fedoraproject.org/rpms/nano/c/e53ee57baa33a1d8
    https://src.fedoraproject.org/rpms/nano/pull-request/7
    https://bugzilla.redhat.com/show_bug.cgi?id=1955884

[3] fedora-comps commit 3496ed634cf452da
    https://pagure.io/fedora-comps/c/3496ed634cf452da
    https://pagure.io/fedora-comps/pull-request/663
    https://bugzilla.redhat.com/show_bug.cgi?id=1955884

https://pagure.io/fedora-kickstarts/pull-request/992
2023-10-06 01:03:57 +02:00
Evan Goode
f7bf98d3af Revert replacing DNF with DNF5
The switch to DNF 5 has been postponed, likely to Fedora 41. See
https://pagure.io/fesco/issue/3039.

This reverts the following commits:
41a8487712
d84d3e61e0
b24aea7e68
02439d3a30
2023-08-07 17:32:41 +00:00
Tomas Hrcka
f716f34b6d container toolbox more comments
Signed-off-by: Tomas Hrcka <thrcka@redhat.com>
2023-07-12 14:51:12 +02:00
Tomas Hrcka
b41eb6bd15 container toolbox - make additional packages alphabetically ordered
- disable manpage checks

Signed-off-by: Tomas Hrcka <thrcka@redhat.com>
2023-07-12 12:00:53 +02:00
Samyak Jain
8eda3b701e Remove --excludedocs from toolbox, need of man pages
Signed-off-by: Samyak Jain <samyak.jn11@gmail.com>
2023-07-11 13:04:10 +05:30
Kevin Fenzi
d3c38de593 toolbox: remove dnf swaps, add glibc-langpacks-all to be included.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-30 11:19:07 -07:00
Evan Goode
b24aea7e68 Replace dnf-utils, dnf-plugins-core with dnf5-plugins 2023-06-29 18:32:51 +00:00
Evan Goode
d84d3e61e0 Replace dnf with dnf5 2023-06-29 18:32:51 +00:00
Kevin Fenzi
e095131572 toolbox: drop standard and core from toolbox
standard pulls in sssd
core pulls in sssd-common
both of those pull in sssd-client, which is excluded in container-common
(to minimize size/deps).

If we need these, we can look at another solution.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-28 13:11:39 -07:00
Samyak Jain
48e2c3b559 init: kickstart for fedora-container-toolbox
Signed-off-by: Samyak Jain <samyak.jn11@gmail.com>
2023-06-21 12:16:19 +05:30