Skip to content

Commit

Permalink
Merge pull request #3101 from aafeijoo-suse/use-distro-pretty-name
Browse files Browse the repository at this point in the history
Print distribution pretty name on installation
  • Loading branch information
behrmann authored Oct 4, 2024
2 parents 7ed05d9 + be0730f commit b5f4a9b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ jobs:
- ubuntu
# TODO: Add CentOS once they have systemd v254 or newer.
exclude:
# pacman and archlinux-keyring are not packaged in OpenSUSE.
# pacman and archlinux-keyring are not packaged in openSUSE.
- distro: arch
tools: opensuse
# apt, debian-keyring and ubuntu-keyring are not packaged in OpenSUSE.
# apt, debian-keyring and ubuntu-keyring are not packaged in openSUSE.
- distro: debian
tools: opensuse
- distro: ubuntu
Expand Down
2 changes: 1 addition & 1 deletion mkosi.conf.d/20-opensuse/mkosi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Distribution=opensuse
Release=tumbleweed

[Content]
# OpenSUSE does not ship an unsigned shim
# openSUSE does not ship an unsigned shim
ShimBootloader=none
Packages=
diffutils
Expand Down
4 changes: 2 additions & 2 deletions mkosi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def install_distribution(context: Context) -> None:
if not context.config.packages:
return

with complete_step(f"Installing extra packages for {str(context.config.distribution).capitalize()}"):
with complete_step(f"Installing extra packages for {context.config.distribution.pretty_name()}"):
context.config.distribution.install_packages(context, context.config.packages)
else:
if context.config.overlay or context.config.output_format in (
Expand All @@ -207,7 +207,7 @@ def install_distribution(context: Context) -> None:
)
return

with complete_step(f"Installing {str(context.config.distribution).capitalize()}"):
with complete_step(f"Installing {context.config.distribution.pretty_name()}"):
context.config.distribution.install(context)

if context.config.machine_id:
Expand Down
8 changes: 4 additions & 4 deletions mkosi/bootloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def prepare_grub_config(context: Context) -> Optional[Path]:

if want_grub_efi(context):
# Signed EFI grub shipped by distributions reads its configuration from /EFI/<distribution>/grub.cfg
# (except in OpenSUSE) in the ESP so let's put a shim there to redirect to the actual configuration
# (except in openSUSE) in the ESP so let's put a shim there to redirect to the actual configuration
# file.
if context.config.distribution == Distribution.opensuse:
earlyconfig = context.root / "efi/EFI/BOOT/grub.cfg"
Expand Down Expand Up @@ -246,7 +246,7 @@ def find_signed_grub_image(context: Context) -> Optional[Path]:
patterns = [
f"usr/lib/grub/*-signed/grub{arch}.efi.signed", # Debian/Ubuntu
f"boot/efi/EFI/*/grub{arch}.efi", # Fedora/CentOS
"usr/share/efi/*/grub.efi", # OpenSUSE
"usr/share/efi/*/grub.efi", # openSUSE
]

for p in flatten(context.root.glob(pattern) for pattern in patterns):
Expand Down Expand Up @@ -790,7 +790,7 @@ def install_shim(context: Context) -> None:
f"usr/lib/shim/shim{arch}.efi.signed.latest", # Ubuntu
f"usr/lib/shim/shim{arch}.efi.signed", # Debian
f"boot/efi/EFI/*/shim{arch}.efi", # Fedora/CentOS
"usr/share/efi/*/shim.efi", # OpenSUSE
"usr/share/efi/*/shim.efi", # openSUSE
]

unsigned = [
Expand All @@ -805,7 +805,7 @@ def install_shim(context: Context) -> None:
f"usr/lib/shim/mm{arch}.efi.signed", # Debian
f"usr/lib/shim/mm{arch}.efi", # Ubuntu
f"boot/efi/EFI/*/mm{arch}.efi", # Fedora/CentOS
"usr/share/efi/*/MokManager.efi", # OpenSUSE
"usr/share/efi/*/MokManager.efi", # openSUSE
]

unsigned = [
Expand Down
4 changes: 2 additions & 2 deletions mkosi/distributions/opensuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def repositories(cls, context: Context) -> Iterable[RpmRepository]:

if not gpgkeys and not context.config.repository_key_fetch:
die(
"OpenSUSE GPG keys not found in /usr/share/distribution-gpg-keys",
"openSUSE GPG keys not found in /usr/share/distribution-gpg-keys",
hint="Make sure the distribution-gpg-keys package is installed",
)

Expand Down Expand Up @@ -241,7 +241,7 @@ def architecture(cls, arch: Architecture) -> str:
}.get(arch) # fmt: skip

if not a:
die(f"Architecture {a} is not supported by OpenSUSE")
die(f"Architecture {a} is not supported by openSUSE")

return a

Expand Down
2 changes: 1 addition & 1 deletion mkosi/installer/rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def setup_rpm(
for plugin in plugindir.iterdir():
f.write(f"%__transaction_{plugin.stem} %{{nil}}\n")

# Write an rpm sequoia policy that allows SHA1 as various distribution GPG keys (OpenSUSE) still use SHA1
# Write an rpm sequoia policy that allows SHA1 as various distribution GPG keys (openSUSE) still use SHA1
# for various things.
# TODO: Remove when all rpm distribution GPG keys have stopped using SHA1.
if not (p := context.sandbox_tree / "etc/crypto-policies/back-ends/rpm-sequoia.config").exists():
Expand Down

0 comments on commit b5f4a9b

Please sign in to comment.