Commit graph

2674 commits

Author SHA1 Message Date
Achilleas Koutsou
8970cdfd83 distro/rhel85: fix input name for copy tree inputs
The name parameter always existed but was not actually used.
2021-08-28 09:20:19 +02:00
Christian Kellner
242e1d69ee distro/rhel85: make isolinux installation optional
isolinux might not be wanted if legacy support is not desired or if it
is not supported by the architecture, i.e. by anything else than x86.
2021-08-28 09:20:19 +02:00
Achilleas Koutsou
4126f4e17a distro/rhel85: name param for xorrisofs input
It might not always be `bootiso-tree`.
2021-08-28 09:20:19 +02:00
Christian Kellner
3781cc0f47 distro/rhel85: make anaconda optional for dracut
Add an argument to `dracutStageOptions` so that additional dracut
modules can be supplied. Remove `anaconda` from the list of mods
that are included by default, and manually include it for the
anaconda based installer.

Co-Developed-by: Achilleas Koutsou <achilleas@koutsou.net>
Co-Developed-by: Antonio Murdaca <runcom@linux.com>
2021-08-28 09:20:19 +02:00
Antonio Murdaca
10e4a853bd osbuild2: ostree options for the fstab stage
osbuild, since version 30, supports the ostree deployments for the
fstab stage.

Co-Developed-by: Achilleas Koutsou <achilleas@koutsou.net>
Co-Developed-by: Christian Kellner <christian@kellner.me>
2021-08-28 09:20:19 +02:00
Achilleas Koutsou
a98be74135 osbuild2/ostree.preptree: add missing options
Add the missing options for the `org.osbuild.ostree.preptree` stage.
2021-08-28 09:20:19 +02:00
Christian Kellner
cda1884de3 osbuild2: files input is a valid copy stage input
Mark the `FilesInput` as valid input for the copy stage input so it
can be used in the constructor helper function(s).

Co-Developed-by: Achilleas Koutsou <achilleas@koutsou.net>
Co-Developed-by: Antonio Murdaca <runcom@linux.com>
2021-08-28 09:20:19 +02:00
Christian Kellner
d27596b24a osbuild2: make inputs generic for copy stage ctor
Add a level of indirection for the copy stage constructor function
in order to be able to use it with existing input types, like the
files input.

Co-Developed-by: Achilleas Koutsou <achilleas@koutsou.net>
Co-Developed-by: Antonio Murdaca <runcom@linux.com>
2021-08-28 09:20:19 +02:00
Achilleas Koutsou
2a98885953 osbuild2: OSTreeRemote → OSTreeSourceRemote
Properly name the ostree remote source struct.
2021-08-28 09:20:19 +02:00
Christian Kellner
f08fa8c5ca distro/rhel85: add install option for grub2 stage
Add a new `install` option to the `grub2StageOptions` which directly
translates to the `uefi.install` option for the grub2 stage. This
should be false for all existing pipelines, where RPM directly is
used to fill `/boot/efi/EFI/<vendor>`.

Co-Developed-by: Achilleas Koutsou <achilleas@koutsou.net>
Co-Developed-by: Antonio Murdaca <runcom@linux.com>
2021-08-28 09:20:19 +02:00
Antonio Murdaca
4fdf4dbd01 osbuild2: add stages for raw images and grub iso
Add the new stages included in osbuild 30 that can be used to
deploy an OSTree commit as well as the grub iso stage that
is used to configure grub2 (efi) for isos.
Bump the spec file requirement accordingly.

Co-Developed-by: Achilleas Koutsou <achilleas@koutsou.net>
Co-Developed-by: Christian Kellner <christian@kellner.me>
2021-08-28 09:20:19 +02:00
Achilleas Koutsou
14b5e98be8 osbuild2/xorrisofs: make Boot section optional
Should be a pointer otherwise it creates an empty object in the manifest
which makes the stage fail.

Co-Developed-by: Christian Kellner <christian@kellner.me>
2021-08-28 09:20:19 +02:00
Christian Kellner
a936c44d24 devcontainer: run container with privileges
Needed to actually execute osbuild in the container, since it
needs to mount and access loop devices.
2021-08-28 09:20:19 +02:00
Achilleas Koutsou
51bb4ea3a1 distro/rhel85: grub2 prefix path based on partition
If the partition table has a /boot partition, the grub2 prefix path
should be /grub2.
2021-08-28 09:20:19 +02:00
Achilleas Koutsou
39b0cf39d6 osbuild2: add support for LVM stages
Stage options implement a validate() method for checking values against
schema constraints.
2021-08-28 09:20:19 +02:00
Alexander Todorov
b777444319 Update Dependabot config
- limit the number of open PRs
- check for actions updates less often b/c this is less critical
2021-08-27 14:07:48 +02:00
Alexander Todorov
01f2e02a1b Whitelist Dependabot
it looks to me that the permission action will work only for regular
accounts, not bots.
2021-08-27 14:07:48 +02:00
Xiaofeng Wang
c683c70d8a test: Update ostree-ng.sh to cover bug BZ#1951087
Update the first blueprint to use "normal" kernel instead of to
use "rt" kernel. Then upgrade to "rt" kernel.

To work with this bug fix, we need osbuild fix and have to pin to
osbuild latest commit.

The customizations.user is removed from upgrade blueprint to work
with this bug fix. But it's for RHEL 8.5 only.
2021-08-27 12:56:54 +02:00
Christian Kellner
df30073d65 distro/rhel85: pre-load uid/gid database for edge
When building RHEL for Edge commits and a parent together with an
URL was specified, add a `org.osbuild.ostree.passwd` stage which
then will pre-load the uid/gid database with the data from the
parent commit. This ensures that uids and gids do not change for
the "child" commit.
2021-08-27 12:56:54 +02:00
Christian Kellner
f8c8f28ac8 osbuild2: new org.osbuild.ostree.passwd stage
Add support for the `org.osbuild.ostree.passwd` and with it also
support for the `org.osbuild.ostree.checkout` input.
This stage can be used to pre-load the user and groups database
from an existing commit to ensure that uids/gids are stable.
2021-08-27 12:56:54 +02:00
Christian Kellner
7059995268 osbuild-pipeline: support for ostree arguments
Add support for an "ostree" object that can contain the usual
"ref", "parent" and "url" option for ostree based artifacts.
2021-08-27 12:56:54 +02:00
Gianluca Zuccarelli
3b5783d8a0 distro: clean rhel90 image-installer package sets 2021-08-27 11:02:26 +02:00
Xiaofeng Wang
bff49c410d test: Add case - running edge-container on OCP as stage repo 2021-08-27 09:29:28 +02:00
Achilleas Koutsou
8c9d887f62 test/cases: update ostree-ng.sh to use new port
Edge container now serves on 8080
2021-08-27 09:29:28 +02:00
Achilleas Koutsou
b08fdf5e3f test/data: update rhel85 edge container manifests
Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-08-27 09:29:28 +02:00
Achilleas Koutsou
17a1d38189 news: add entry for edge-container using nginx
Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-08-27 09:29:28 +02:00
Achilleas Koutsou
ca56714aa4 rhel85: use nginx with custom config for container
Running the container on Openshift requires that the process inside the
container run without special permissions.
Switching to nginx and setting the following options that don't require
root privileges:
- Port 8080 (> 1024)
- pid file in '/tmp' instead of the default '/run' path

Also, the log file is chmod-ed to be world writable. Nginx always writes
to the default log file on startup, even if a different log file path is
specified in the configuration.

See rhbz#1945238

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-08-27 09:29:28 +02:00
Achilleas Koutsou
a717a7245b osbuild2: new stages
org.osbuild.chmod: runs chmod on one or more files
org.osbuild.nginx.conf: write nginx config file

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-08-27 09:29:28 +02:00
jabia99
6abb4b9af6
added dependabot configuration file (#1672)
dependabot is an independent security scanning tool which mostly
focuses on evaluating the dependency chain. Having the dependabot.yml
file on the main branch would enable the bot to test the dependencies
daily.
2021-08-26 09:41:54 +02:00
Gianluca Zuccarelli
78e042b47a distro: rhel90 tar-installer image type 2021-08-26 01:52:03 +02:00
Jakub Rusz
0865720589 ci: run base tests on RHEL-9 2021-08-25 19:16:04 +02:00
Jakub Rusz
37b14facd3 tests: update base tests for weldr-client
weldr-client returns different json structures than the original
composer-cli does. It is being replaced in RHEL-9 and these changes make
it possible to run the tests with both old composer-cli and
weldr-client.
2021-08-25 19:16:04 +02:00
Jakub Rusz
ad41022f4a tests/ci: set locale in deploy.sh
This hides warnings that are seen whenever dnf is called and also it is
no longer possible to initialize postresql database without it which is
used in base tests now.
2021-08-25 19:16:04 +02:00
Jakub Rusz
231499c5d4 tools: support rhel-9 in deploy.sh
There is not yet and official epel-9 repo so use an internal
implementation in the mean time as well as internal repositories during
the testing.
2021-08-25 19:16:04 +02:00
Chloe Kaubisch
8c26614049 cloudapi: rework return values
Change instances of panic on error to return StatusInternalServerError
instead. Additionally change return code 200s to http.StatusOK.

Fixes #1606
2021-08-25 17:48:29 +02:00
Gianluca Zuccarelli
4f4cb012d5 docs: add rhel90 filesystem support release note 2021-08-25 13:18:12 +02:00
Gianluca Zuccarelli
a198b292b5 test/cases: include rhel9 in filesystem test 2021-08-25 13:18:12 +02:00
Gianluca Zuccarelli
34ade35a5d rhel90: filsystem customization tests 2021-08-25 13:18:12 +02:00
Gianluca Zuccarelli
8374af3e6d distro: rhel90 custom filesystem support 2021-08-25 13:18:12 +02:00
Gianluca Zuccarelli
382b5370c0 distro: export common types
squash

unused type
2021-08-25 13:18:12 +02:00
Juan Abia
ee0af8b901 retry subscribing to RHN 2021-08-25 13:12:08 +02:00
Juan Abia
1e52484688 remove all rhn subscriptions before registering a new one 2021-08-24 11:53:08 +02:00
Gianluca Zuccarelli
b782ecaf1f distro: rhel85 internal tests 2021-08-24 00:22:29 +02:00
Gianluca Zuccarelli
d892909b2c test/cases: add filesystem failed case test 2021-08-24 00:22:29 +02:00
Gianluca Zuccarelli
d4403a03c0 distro: rhel85 add sub mounts to allow list 2021-08-24 00:22:29 +02:00
Tomas Hozza
a8d503e5b9 RHEL-85/90: modify the x86_64 EC2 images dracut configuration
Change the x86_64-specific dracut configuration of RHEL-8.5 and RHEL-9.0
EC2 and AMI images to not include `xen-netfront` driver and add `nvme`
driver, which was previously not included. Since the configuration is no
longer Xen-specific, rename the configuration file to `ec2.conf`.

Justification:
There is no reason to put `xen-netfront` to initramfs as EC2 images don't
boot from network root. In addition, add `nvme` driver to handle the case
when initramfs is getting forcefully rebuild on a Xen instance (and not able
to boot on Nitro after that).

Related to https://issues.redhat.com/browse/COMPOSER-1096.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-08-23 16:01:11 +02:00
Christian Kellner
20258bd45e distro/rhel90: use unified grub config
Feodra 34 and thus RHEL 9 switched to a unified grub configuration,
which means that the main grub config is always located in the same
location, /boot/grub2/grub.cfg.[1] osbuild has used this scheme for
hybrid boot on x64 but not on pure efi systems like aarch64. The
new osbuild option `uefi.unified` was introduced to select that new
unified grug cfg scheme also for those, pure efi, systems. Use that.

[1] https://fedoraproject.org/wiki/Changes/UnifyGrubConfig
2021-08-23 13:48:26 +02:00
Christian Kellner
22bff1df71 osbuild2/grub2: add unified option for uefi
The `uefi.unified` option indicates whether the `org.osbuild.grub2`
will use the unified grub configration scheme[1] used by Fedora 34
and thus RHEL 9.
NB: This requires osbuild version >= 32.

[1] https://fedoraproject.org/wiki/Changes/UnifyGrubConfig
2021-08-23 13:48:26 +02:00
Christian Kellner
fcace40710 osbuild2/grub2: add install option for uefi
The `uefi.install` option indicates whether the `org.osbuild.grub2`
stage will copy the efi binaries from the build root to the `/boot`
directory in the tree.

Co-Developed-by: Achilleas Koutsou <achilleas@koutsou.net>
Co-Developed-by: Antonio Murdaca <runcom@linux.com>
2021-08-23 13:48:26 +02:00
Achilleas Koutsou
321dcc56bf distro/rhel90: copy devices and mounts changes
Rebase brings RHEL 9.0 definition with old Mounts and Devices. Changes
applied to new distro pipelines and stage options.
2021-08-21 13:39:10 +02:00