coreos / layering-examples

Apache License 2.0
105 stars 24 forks source link

replace-systemd: new example #25

Closed jlebon closed 2 years ago

jlebon commented 2 years ago

Minimal example showing replacement of a base core package like systemd directly from Bodhi.

jlebon commented 2 years ago

This requires https://github.com/coreos/rpm-ostree/pull/3670 and https://github.com/coreos/rpm-ostree/pull/3704.

jlebon commented 2 years ago

Latest testing-devel has new enough rpm-ostree now.

Testing:

$ host podman build -f Dockerfile
STEP 1/2: FROM quay.io/coreos-assembler/fcos:testing-devel
Trying to pull quay.io/coreos-assembler/fcos:testing-devel...
Getting image source signatures
Copying blob a2f72d6cbbe0 done
Copying config 6cd0120577 done
Writing manifest to image destination
Storing signatures
STEP 2/2: RUN rpm-ostree override replace https://bodhi.fedoraproject.org/updates/FEDORA-2022-0bbb402870 &&     rpm-ostree cleanup -m &&     ostree container commit
Downloading https://kojipkgs.fedoraproject.org/packages/systemd/250.3/6.fc36/x86_64/systemd-udev-250.3-6.fc36.x86_64.rpm...done
Downloading https://kojipkgs.fedoraproject.org/packages/systemd/250.3/6.fc36/x86_64/systemd-250.3-6.fc36.x86_64.rpm...done
Downloading https://kojipkgs.fedoraproject.org/packages/systemd/250.3/6.fc36/x86_64/systemd-libs-250.3-6.fc36.x86_64.rpm...done
Downloading https://kojipkgs.fedoraproject.org/packages/systemd/250.3/6.fc36/x86_64/systemd-container-250.3-6.fc36.x86_64.rpm...done
Downloading https://kojipkgs.fedoraproject.org/packages/systemd/250.3/6.fc36/x86_64/systemd-pam-250.3-6.fc36.x86_64.rpm...done
Downloading https://kojipkgs.fedoraproject.org/packages/systemd/250.3/6.fc36/x86_64/systemd-resolved-250.3-6.fc36.x86_64.rpm...done
Enabled rpm-md repositories: fedora-cisco-openh264 fedora-modular updates-modular updates fedora updates-archive
Updating metadata for 'fedora-cisco-openh264'...done
Updating metadata for 'fedora-modular'...done
Updating metadata for 'updates-modular'...done
Updating metadata for 'updates'...done
Updating metadata for 'fedora'...done
Updating metadata for 'updates-archive'...done
Importing rpm-md...done
rpm-md repo 'fedora-cisco-openh264'; generated: 2022-04-07T16:52:38Z solvables: 4
rpm-md repo 'fedora-modular'; generated: 2022-05-04T21:12:01Z solvables: 825
rpm-md repo 'updates-modular'; generated: 2022-06-14T02:11:42Z solvables: 1155
rpm-md repo 'updates'; generated: 2022-06-16T01:02:22Z solvables: 13729
rpm-md repo 'fedora'; generated: 2022-05-04T21:16:11Z solvables: 67992
rpm-md repo 'updates-archive'; generated: 2022-06-16T01:48:18Z solvables: 14834
Resolving dependencies...done
Installing 6 packages:
  systemd-250.3-6.fc36.x86_64 (@commandline)
  systemd-container-250.3-6.fc36.x86_64 (@commandline)
  systemd-libs-250.3-6.fc36.x86_64 (@commandline)
  systemd-pam-250.3-6.fc36.x86_64 (@commandline)
  systemd-resolved-250.3-6.fc36.x86_64 (@commandline)
  systemd-udev-250.3-6.fc36.x86_64 (@commandline)
Downgrading: systemd-libs;250.3-6.fc36;x86_64;local
Downgrading: systemd-pam;250.3-6.fc36;x86_64;local
Downgrading: systemd-resolved;250.3-6.fc36;x86_64;local
Downgrading: systemd;250.3-6.fc36;x86_64;local
Downgrading: systemd-container;250.3-6.fc36;x86_64;local
Downgrading: systemd-udev;250.3-6.fc36;x86_64;local
Cleanup: systemd-udev;250.7-1.fc36;x86_64;installed
Cleanup: systemd-container;250.7-1.fc36;x86_64;installed
Cleanup: systemd;250.7-1.fc36;x86_64;installed
Cleanup: systemd-libs;250.7-1.fc36;x86_64;installed
Cleanup: systemd-pam;250.7-1.fc36;x86_64;installed
Cleanup: systemd-resolved;250.7-1.fc36;x86_64;installed
Checking /var for files
Found file: "/var/cache/ldconfig/aux-cache"
Found file: "/var/lib/systemd/catalog/database"
Found file: "/var/lib/systemd/random-seed"
Found file: "/var/lib/alternatives"
Found file: "/var/lib/rpm"
Found file: "/var/lib/vagrant"
Found file: "/var/log/README"
Found file: "/var/log/tallylog"
Found file: "/var/log/wtmp"
Found file: "/var/log/btmp"
Found file: "/var/log/lastlog"
Found file: "/var/lock"
Found file: "/var/mail"
Found file: "/var/run"
COMMIT
--> 00fd47c88a1
00fd47c88a190717d39517e5922eb2052daeacbb1b6def67d26750fc92af6454