From 68b6257e0eca1db21fb3556d925a247cd29020ea Mon Sep 17 00:00:00 2001 From: Damian Wrobel Date: Wed, 17 Jul 2019 10:49:05 +0200 Subject: [PATCH] Unify obtaining 'relesever' Continuation of https://pagure.io/fedora-kickstarts/c/19a7b3b113d97db14d27f6a86db3c7479453a5ea?branch=master but across entire repository. --- fedora-cloud-base.ks | 2 +- fedora-cloud-bigdata.ks | 2 +- fedora-cloud-experimental.ks | 2 +- fedora-container-common.ks | 2 +- fedora-disk-base.ks | 2 +- fedora-live-base.ks | 2 +- fedora-modular-disk-minimal.ks | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fedora-cloud-base.ks b/fedora-cloud-base.ks index a8bc5df..0fb3e7a 100644 --- a/fedora-cloud-base.ks +++ b/fedora-cloud-base.ks @@ -215,7 +215,7 @@ truncate -c -s 0 /var/log/dnf.log truncate -c -s 0 /var/log/dnf.rpm.log echo "Import RPM GPG key" -releasever=$(rpm -q --qf '%{version}\n' fedora-release) +releasever=$(rpm --eval '%{fedora}') basearch=$(uname -i) rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch diff --git a/fedora-cloud-bigdata.ks b/fedora-cloud-bigdata.ks index 0d96e3a..066aa96 100644 --- a/fedora-cloud-bigdata.ks +++ b/fedora-cloud-bigdata.ks @@ -182,7 +182,7 @@ dnf clean all truncate -c -s 0 /var/log/dnf.log echo "Import RPM GPG key" -releasever=$(rpm -q --qf '%{version}\n' fedora-release) +releasever=$(rpm --eval '%{fedora}') basearch=$(uname -i) rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch diff --git a/fedora-cloud-experimental.ks b/fedora-cloud-experimental.ks index 4f95ff7..02673c2 100644 --- a/fedora-cloud-experimental.ks +++ b/fedora-cloud-experimental.ks @@ -173,7 +173,7 @@ dnf clean all truncate -c -s 0 /var/log/dnf.log echo "Import RPM GPG key" -releasever=$(rpm -q --qf '%{version}\n' fedora-release) +releasever=$(rpm --eval '%{fedora}') basearch=$(uname -i) rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch diff --git a/fedora-container-common.ks b/fedora-container-common.ks index 28254ea..a1cce85 100644 --- a/fedora-container-common.ks +++ b/fedora-container-common.ks @@ -66,7 +66,7 @@ echo 'LANG="C.UTF-8"' > /etc/locale.conf # https://bugzilla.redhat.com/show_bug.cgi?id=1400682 echo "Import RPM GPG key" -releasever=$(rpm -q --qf '%{version}\n' fedora-release-container) +releasever=$(rpm --eval '%{fedora}') rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary echo "# fstab intentionally empty for containers" > /etc/fstab diff --git a/fedora-disk-base.ks b/fedora-disk-base.ks index fbc864f..a4285d8 100644 --- a/fedora-disk-base.ks +++ b/fedora-disk-base.ks @@ -62,7 +62,7 @@ glibc-all-langpacks # Setup Raspberry Pi firmware cp -P /usr/share/uboot/rpi_3/u-boot.bin /boot/efi/rpi3-u-boot.bin -releasever=$(rpm -q --qf '%{version}\n' fedora-release) +releasever=$(rpm --eval '%{fedora}') rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary echo "Packages within this disk image" rpm -qa diff --git a/fedora-live-base.ks b/fedora-live-base.ks index 243e83e..0b46a1b 100644 --- a/fedora-live-base.ks +++ b/fedora-live-base.ks @@ -304,7 +304,7 @@ EOF # work around for poor key import UI in PackageKit rm -f /var/lib/rpm/__db* -releasever=$(rpm -q --qf '%{version}\n' --whatprovides system-release) +releasever=$(rpm --eval '%{fedora}') basearch=$(uname -i) rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch echo "Packages within this LiveCD" diff --git a/fedora-modular-disk-minimal.ks b/fedora-modular-disk-minimal.ks index 688fc9c..4d4a108 100644 --- a/fedora-modular-disk-minimal.ks +++ b/fedora-modular-disk-minimal.ks @@ -58,7 +58,7 @@ dhcp-client # Setup Raspberry Pi firmware cp -P /usr/share/uboot/rpi_3/u-boot.bin /boot/efi/rpi3-u-boot.bin -releasever=$(rpm -q --qf '%{version}\n' fedora-modular-release) +releasever=$(rpm --eval '%{fedora}') rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary echo "Packages within this disk image" rpm -qa