#94 Enable writing ssh keys fragments on RHEL/CentOS >= 9
Merged 2 years ago by bgilbert. Opened 2 years ago by lorbus.
rpms/ lorbus/ignition ssh-key-dir-rhel9  into  rawhide

file modified
+10 -3
@@ -19,7 +19,7 @@ 

  %global dracutlibdir %{_prefix}/lib/dracut

  

  Name:           ignition

- Release:        4%{?dist}

+ Release:        5%{?dist}

  Summary:        First boot installer and configuration tool

  

  # Upstream license specification: Apache-2.0
@@ -249,9 +249,13 @@ 

  

  %build

  export LDFLAGS="-X github.com/coreos/ignition/v2/internal/version.Raw=%{version} -X github.com/coreos/ignition/v2/internal/distro.selinuxRelabel=true "

- %if 0%{?rhel} || 0%{?centos}

+ %if 0%{?rhel} && 0%{?rhel} <= 8

+ # Disable writing ssh keys fragments on RHEL/CentOS <= 8

+ LDFLAGS+=' -X github.com/coreos/ignition/v2/internal/distro.writeAuthorizedKeysFragment=false '

+ %endif

+ %if 0%{?rhel}

  # Need uncompressed debug symbols for debuginfo extraction

- LDFLAGS+=' -X github.com/coreos/ignition/v2/internal/distro.writeAuthorizedKeysFragment=false -compressdwarf=false '

+ LDFLAGS+=' -compressdwarf=false '

I'd guess this isn't needed on RHEL 9 either, but we don't need to address that in this PR.

  %endif

  export GOFLAGS="-mod=vendor"

  
@@ -339,6 +343,9 @@ 

  %endif

  

  %changelog

+ * Tue Aug 9 2022 Christian Glombek <cglombek@redhat.com> - 2.14.0-5

+ - Enable writing ssh keys fragments on RHEL/CentOS >= 9

+ 

  * Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.0-4

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

  

https://issues.redhat.com/browse/COS-1589

This is assuming the canonical spec is maintained here. This change will have to be pulled into RHEL and CentOS Stream dist-gits.

@walters @siosm

This will need to wait until we have ssh-key-dir in SCOS.

Build succeeded.

This should be a NOP for Fedora/FCOS so we can merge this one and coordinate the change for C9S/SCOS.

+1 to merging this now, and coordinating the SCOS merge afterwards

Won't this also disable fragments on Fedora?

@bgilbert I don't understand, which part specifically? It should only disable it on RHEL/CentOS <= 8

On Fedora, 0%{?rhel} and 0%{?centos} will both evaluate to 0, which is less than 8.

rebased onto 9a333ae8ad1244d3851885ba54aca6c454a73e45

2 years ago

indeed, thank you for catching this @bgilbert! Fixed

You don't need to handle RHEL and CentOS separately. %rhel is defined on both.

Build succeeded.

rebased onto 37fa77577d82038ff558486f3872a22d1d880999

2 years ago

rebased onto a637ff4

2 years ago

I'd guess this isn't needed on RHEL 9 either, but we don't need to address that in this PR.

Build succeeded.

Pull-Request has been merged by bgilbert

2 years ago

Thanks for handling this!

Metadata