Commit graph

1186 commits

Author SHA1 Message Date
Jakub Sierżęga
90a03b61f4 profile.d: Show welcome message on Fedora Sericea
Since Sericea is an official variant of Fedora, it should have an
official welcome message like the other ones.

https://github.com/containers/toolbox/pull/1293

Signed-off-by: Jakub Sierżęga <jakub.sierzega@comarch.com>
2023-06-09 10:29:59 +02:00
Debarshi Ray
a58d81db4e profile.d: Re-align
This will make the subsequent commit easier to read.

https://github.com/containers/toolbox/pull/1293
2023-06-09 10:28:31 +02:00
Debarshi Ray
b6ca18ead1 pkg/utils, test/system: Use the Ubuntu images from quay.io/toolbx/...
https://github.com/containers/toolbox/pull/1306
2023-06-08 15:35:44 +02:00
Ievgen Popovych
8dcd5d7cb4 .github/workflows: Publish the Ubuntu images at quay.io/toolbx/...
Until now, the Ubuntu images (versions 16.04, 18.04, 20.04, 22.04 and
22.10) were published at quay.io/toolbx-images/ubuntu-toolbox:22.04,
etc..  This changes the location to quay.io/toolbx/ubuntu-toolbox:22.04
and builds an image for Ubuntu 23.04 that was added recently [1].

Build and push when there are changes in the `images/ubuntu` directory
or in the GitHub workflow itself, as well as every other week (7th and
21st days of a month to be precise).

The toolbox(1) code and the system tests will be switched to the new
location after the first round of images are available.

[1] Commit 3cfb6bf888
    https://github.com/containers/toolbox/pull/1292

https://github.com/containers/toolbox/pull/483

Signed-off-by: Ievgen Popovych <jmennius@gmail.com>
2023-06-08 14:52:31 +02:00
Debarshi Ray
4a1d9fc037 pkg/utils: Mark a private function as such
Reading the VERSION_ID field from the host operating system's
os-release(5) only needs to happen when initializing this package.

Fallout from 9e2825524a

https://github.com/containers/toolbox/pull/1304
2023-06-07 17:04:06 +02:00
Erazem Kokot
2568528cb7 images: Add arch-toolbox image definitions for Arch Linux
This is the definition of the arch-toolbox image for Arch Linux that
plays well with Toolbx.

Today, it's published at quay.io/toolbx-images/archlinux-toolbox:latest,
but the name of the published image will be changed to arch-toolbox [1]
to match the os-release(5) ID on Arch Linux.  The convention of naming
the Toolbx images according to the os-release(5) ID is deeply ingrained
in the Toolbx code base.  It will be better to keep things simple by
continuing that practice, instead of adding a one-off exception.

Maintenance of this image has been passed to Morten Linderud.

[1] https://github.com/toolbx-images/images/pull/82

https://github.com/containers/toolbox/pull/861
2023-06-06 22:57:22 +02:00
Ievgen Popovych
3cfb6bf888 images: ubuntu: Add 23.04 Lunar image
Signed-off-by: Ievgen Popovych <jmennius@gmail.com>

https://github.com/containers/toolbox/pull/1292
2023-05-03 13:45:04 +02:00
Ievgen Popovych
10b39a6a12 images: ubuntu: Remove APT ESM hook
This was recently introduced with `ubuntu-advantage-tools` and it tries
to poke at some system services introducing annoying delay and messages.

Even if the services are present (on Ubuntu host) and systemd is
accessible (rootful container) - that wouldn't be appropriate still.

https://github.com/containers/toolbox/pull/1291

Signed-off-by: Ievgen Popovych <jmennius@gmail.com>
2023-05-03 13:41:01 +02:00
Ievgen Popovych
947bb612e1 images: ubuntu: Move flatpak-xdg-utils installation to Containerfile
Since `flatpak-xdg-utils` is essential to the images, not 'extra'.

https://github.com/containers/toolbox/pull/1291

Signed-off-by: Ievgen Popovych <jmennius@gmail.com>
2023-05-03 13:41:00 +02:00
Debarshi Ray
1b3e557e20 .github/CODEOWNERS: Clarify ownership of the images for Ubuntu
This reflects the value of the 'maintainer' LABELs of the images.

https://github.com/containers/toolbox/pull/483
https://github.com/containers/toolbox/pull/1287
2023-04-06 15:11:41 +02:00
Debarshi Ray
d6c64dc042 .github/CODEOWNERS: Clarify ownership of the images for RHEL
This partly reflects the value of the 'maintainer' LABELs of the current
images.  Oliver is the original author, but he has lots of other duties
these days, and wanted me to help him co-maintain the images.

Note that the toolbox image definitions for RHEL do need a maintainer
who is a Red Hat employee.  Otherwise they won't be able to actually
build and publish the images at registry.access.redhat.com.

https://github.com/containers/toolbox/pull/1288
2023-03-31 19:59:37 +02:00
Nils Lindemann
add05de27e doc/toolbox-create: Tweak the default container examples for consistency
... with 'enter' and 'run'.

https://github.com/containers/toolbox/pull/1281

Signed-off-by: Nils Lindemann <nilslindemann@tutanota.com>
2023-03-30 21:52:49 +02:00
Nils Lindemann
05191026c9 doc/toolbox-enter, doc/toolbox-run: Fix the default container examples
The phrase 'using a custom image' is awkward because it makes it sound
as if the image plays an important role in 'enter' and 'run'.  That's
not true.

Also, titles are sweeter when they are shorter.

https://github.com/containers/toolbox/pull/1281

Signed-off-by: Nils Lindemann <nilslindemann@tutanota.com>
2023-03-30 21:48:30 +02:00
Nils Lindemann
cceea52af6 doc/toolbox-enter, doc/toolbox-run: Fix the custom container examples
When a specific Toolbx container is selected by name for 'enter' and
'run', it's not necessary that the container was created using a custom
image.  The container could have also been created using one of the
built-in images.

Secondly, the phrase 'using a custom image' is awkward because it makes
it sound as if the image plays an important role in 'enter' and 'run'.
That's not true.

Finally, titles are sweeter when they are shorter.

https://github.com/containers/toolbox/pull/1281

Signed-off-by: Nils Lindemann <nilslindemann@tutanota.com>
2023-03-30 21:40:03 +02:00
Debarshi Ray
198107cceb .github/CODEOWNERS: Clarify the location of the data/gfx directory
... to be at the root of the repository.  Without the leading slash, the
documentation suggests that it could be a data/gfx directory anywhere in
the repository [1].

[1] https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

Fallout from 3773ceb0c5

https://github.com/containers/toolbox/pull/1286
2023-03-29 14:50:19 +02:00
Ievgen Popovych
a84a358b3b pkg/utils, test/system: Offer built-in support for Ubuntu
This allows using the --distro and --release options to create and enter
Ubuntu containers.

Note that Ubuntu 4.10 was the first ever Ubuntu release [1].  Hence,
values older than that are not permitted for the --release option.

Some changes by Debarshi Ray.

[1] https://wiki.ubuntu.com/Releases

https://github.com/containers/toolbox/pull/483
https://github.com/containers/toolbox/pull/1284

Signed-off-by: Ievgen Popovych <jmennius@gmail.com>
2023-03-28 00:14:19 +02:00
Ievgen Popovych
8c41d85498 images: Add ubuntu-toolbox image definitions for Ubuntu
These are the definitions of the ubuntu-toolbox images for Ubuntus
16.04, 18.04, 20.04, 22.04 and 22.10 that play well with Toolbx.  Such
as, password-less sudo, able to resolve its own hostname, SELinux is
masked off, etc..  At the moment, these are already published at
quay.io/toolbx-images/ubuntu-toolbox:22.04 and such.

https://github.com/containers/toolbox/pull/483
https://github.com/containers/toolbox/pull/1284

Signed-off-by: Ievgen Popovych <jmennius@gmail.com>
2023-03-28 00:14:06 +02:00
Debarshi Ray
ddd1221d44 test/system: Test 'run' with a RHEL Toolbx container
https://github.com/containers/toolbox/pull/1283
2023-03-27 13:44:38 +02:00
Debarshi Ray
7e9d3918f5 test/system: Test 'run' with a Fedora Toolbx container
It's good to ensure that older well-known Toolbx images continue to work
with newer versions of 'run'.

https://github.com/containers/toolbox/pull/1283
2023-03-27 13:41:51 +02:00
Debarshi Ray
7269547af9 cmd/utils: Handle space-separated input when asking for confirmation
fmt.Scanf [1] is fragile when it comes to space-separated input.  It
stores successive space-separated values into successive arguments as
determined by the format string.  This breaks with untrusted input that
can have an unknown number of space-separated values.

Here are some examples:

  $ toolbox create
  Image required to create toolbox container.
  Download registry.fedoraproject.org/fedora-toolbox:39 (294.8MB)?
    [y/N]: no no not at all
  $ no not at all
  bash: no: command not found...

  $ toolbox create
  Image required to create toolbox container.
  Download registry.fedoraproject.org/fedora-toolbox:39 (294.8MB)?
    [y/N]: foo bar
  Download registry.fedoraproject.org/fedora-toolbox:39 (294.8MB)?
    [y/N]: Download registry.fedoraproject.org/fedora-toolbox:39
    (294.8MB)? [y/N]:

Instead this is what should happen:

  $ toolbox create
  Image required to create toolbox container.
  Download registry.fedoraproject.org/fedora-toolbox:39 (294.8MB)?
    [y/N]: no no not at all
  Download registry.fedoraproject.org/fedora-toolbox:39 (294.8MB)?
    [y/N]: foo bar
  Download registry.fedoraproject.org/fedora-toolbox:39 (294.8MB)?
    [y/N]:

Fallout from 936f22ff15

[1] https://pkg.go.dev/fmt#Scanf

https://github.com/containers/toolbox/pull/1279
2023-03-27 09:28:14 +02:00
Debarshi Ray
c56b74921a test/system: Test 'create' with a RHEL Toolbx container
https://github.com/containers/toolbox/pull/1282
2023-03-26 10:49:11 +02:00
Debarshi Ray
23e636bb2a test/system: Remove redundant quotes
https://github.com/containers/toolbox/pull/1282
2023-03-26 10:37:10 +02:00
Debarshi Ray
9f4d906e39 test/system: Remove redundant comment
It's quite obvious what the corresponding code is doing, and it isn't
any harder to understand than the rest of the code that's not commented.

https://github.com/containers/toolbox/pull/1282
2023-03-26 10:36:59 +02:00
Debarshi Ray
06245dbf52 test/system: Synchronize with the parseRelease() unit tests
https://github.com/containers/toolbox/pull/1280
2023-03-24 19:57:33 +01:00
Debarshi Ray
26b031f686 test/system: Split the tests for parsing releases
This will make it easier to find out exactly which test failed.

https://github.com/containers/toolbox/pull/1280
2023-03-23 18:09:45 +01:00
Debarshi Ray
44cbdb1f18 test/system: Ensure that both non-Toolbx containers & images are skipped
https://github.com/containers/toolbox/pull/1273
2023-03-22 12:05:06 +01:00
Debarshi Ray
11f5cde45e test/system: Check the number of images after pulling them
This is a quick sanity check with 'podman images' to ensure that all the
images are in place before running 'list'.  Other tests already do this,
so this change makes these two tests consistent with the rest.

https://github.com/containers/toolbox/pull/1273
2023-03-22 10:40:57 +01:00
Debarshi Ray
63aeabe86b test/system: Factor out some repeated code
https://github.com/containers/toolbox/pull/1273
2023-03-22 10:08:47 +01:00
Debarshi Ray
55bf3d06a8 test/system: Use fully qualified image names to check the 'list' output
https://github.com/containers/toolbox/pull/1273
2023-03-22 09:45:23 +01:00
Debarshi Ray
164c9eff36 test/system: Test 'list' with a RHEL Toolbx image
This restores parts of commit e09de9f3e5.

https://github.com/containers/toolbox/pull/1273
2023-03-22 09:18:04 +01:00
Debarshi Ray
aa9da193c6 test/system: Test 'list' with an old Fedora Toolbx image
It's good to ensure that older well-known Toolbx images continue to work
with newer versions of 'list'.

https://github.com/containers/toolbox/pull/1278
2023-03-22 09:16:58 +01:00
Debarshi Ray
571cfc1296 test/system: Use the same convenience function as elsewhere
Fallout from b27795a03e

https://github.com/containers/toolbox/pull/1278
2023-03-22 09:16:52 +01:00
Debarshi Ray
96d629c21f test/system: Test 'list' with the default Toolbx image
This is the 'simple' case of having a well-known Toolbx image (ie.,
not a copy, not an image without a name, not a non-Toolbx image).  It's
good to ensure that the default image works as expected with 'list'
before moving on to more complex scenarios.

https://github.com/containers/toolbox/pull/1278
2023-03-22 09:16:44 +01:00
Debarshi Ray
20fa122820 test/system: Test 'list' both with and without --images
https://github.com/containers/toolbox/pull/1278
2023-03-22 09:16:37 +01:00
Debarshi Ray
6890f5dc8d test/system: Rename a 'list' test for clarity
A subsequent commit will add a variant of this test that uses 'list'
without the '--images' option.

https://github.com/containers/toolbox/pull/1278
2023-03-22 09:16:29 +01:00
Debarshi Ray
9cae66ddd8 test/system: Check the standard error & output streams separately
https://github.com/containers/toolbox/pull/1278
2023-03-22 09:16:20 +01:00
Debarshi Ray
e22a82fec8 test/system: Simplify the line count checks by relying on Bats >= 1.7.0
Fedora 35 was stuck with Bats 1.5.0.  However, it reached End of Life on
13th December 2022 and was dropped from the CI [1].  Fedora 36 is the
oldest supported Fedora and it has Bats 1.8.2.

Therefore, there's no need to retain compatibility with Bats < 1.7.0.

Note that bats_require_minimum_version itself is only available from
Bats 1.7.0 [2].

[1] Commit 419e4e8cd9
    https://github.com/containers/toolbox/pull/1237

[2] Bats commit 71d6b71cebc3d32b
    https://github.com/bats-core/bats-core/issues/556
    https://bats-core.readthedocs.io/en/stable/warnings/BW02.html

https://github.com/containers/toolbox/pull/1273
2023-03-21 19:20:21 +01:00
Debarshi Ray
08e40e666e test/system: Shorten the names of the tests and use consistent wording
Currently, some of the names of the tests were too long, and had
inconsistent and verbose wording.  This made it difficult to look at
them and get a gist of all the scenarios being tested.  The names are
like headings.  They shouldn't be too long, should capture the primary
objective of the test and be consistent in their wording.

https://github.com/containers/toolbox/pull/1276
2023-03-21 19:11:20 +01:00
Debarshi Ray
5b8a7a00c0 test/system: Use long options, instead of their shorter aliases
The long options are easier to grep(1) for in the sources than their
shorter aliases.

https://github.com/containers/toolbox/pull/1276
2023-03-21 19:11:13 +01:00
Debarshi Ray
f364812781 test/system: Shorten the names of the tests and use consistent wording
Currently, some of the names of the tests were too long, and had
inconsistent and verbose wording.  This made it difficult to look at
them and get a gist of all the scenarios being tested.  The names are
like headings.  They shouldn't be too long, should capture the primary
objective of the test and be consistent in their wording.

https://github.com/containers/toolbox/pull/1271
2023-03-20 18:28:10 +01:00
Debarshi Ray
edd82d7e6e test/system: Style fixes
Fallout from e5bab51bca

https://github.com/containers/toolbox/pull/1271
2023-03-20 18:28:07 +01:00
Debarshi Ray
3773ceb0c5 .github/CODEOWNERS: Clarify ownership of the Toolbx graphics
https://github.com/containers/toolbox/pull/1270
2023-03-20 15:25:21 +01:00
Debarshi Ray
0200b4e6d9 .github: Add CODEOWNERS
Toolbx was conceived to address the needs of Fedora Linux.  Even though
it works on host operating systems outside the Fedora family, it hasn't
treated them with the same importance as Fedora Linux and derivatives
like Red Hat Enterprise Linux.  Subsequent commits will change that by
adding first-class support for host operating systems beyond the Fedora
universe.  eg., Arch Linux and Ubuntu.

The current Toolbx maintainers, Ondřej Míchal and myself, are Fedora
developers and don't have the bandwidth to drive changes and track down
bugs in OSes outside the Fedora family.  Therefore, maintenance of some
parts of the code base will be delegated to contributors from those
other OS communities.

This is a step in that direction by clearly specifying which part of the
code base is maintained by whom.

https://github.com/containers/toolbox/pull/1268
2023-03-17 19:28:15 +01:00
Debarshi Ray
c6760299d2 pkg/utils, test/system: Add some more tests for parsing RHEL releases
https://github.com/containers/toolbox/pull/1262
2023-03-16 22:01:45 +01:00
Debarshi Ray
e01927bfdc pkg/utils, test/system: Add some more tests for parsing Fedora releases
https://github.com/containers/toolbox/pull/1262
2023-03-16 22:01:45 +01:00
Debarshi Ray
1c320b0eb0 pkg/utils: Simplify the definition of parseRelease() unit test cases
https://github.com/containers/toolbox/pull/1267
2023-03-16 21:04:24 +01:00
Debarshi Ray
56a64a68bd pkg/utils: Remove unused error
Fallout from b5474bff84

https://github.com/containers/toolbox/pull/1267
2023-03-16 20:53:12 +01:00
Debarshi Ray
a4cc791f39 test/system: Synchronize with the parseRelease() unit tests
https://github.com/containers/toolbox/pull/1266
2023-03-16 18:41:24 +01:00
Debarshi Ray
1bd6cf17ce test/system: Split the tests for parsing releases
This will make it easier to find out exactly which test failed.

https://github.com/containers/toolbox/pull/1266
2023-03-16 18:31:12 +01:00
Debarshi Ray
6b6cb1b2f9 .zuul: Enable testing on Fedora 38
https://github.com/containers/toolbox/pull/1265
2023-03-16 17:57:46 +01:00