From 78cbc42d54ea777225100f01674fb7faa90afb7022b7668e589797bb77a5dd44 Mon Sep 17 00:00:00 2001 From: Ignaz Forster Date: Wed, 19 Aug 2020 07:03:21 +0000 Subject: [PATCH] Accepting request 827574 from home:Guillaume_G:branches:openSUSE:Factory:ARM - Add patch to fix install on %arm: * ignition-fix-arm32-installation.patch OBS-URL: https://build.opensuse.org/request/show/827574 OBS-URL: https://build.opensuse.org/package/show/devel:kubic:ignition/ignition?expand=0&rev=57 --- ignition-fix-arm32-installation.patch | 11 +++++++++++ ignition.changes | 6 ++++++ ignition.spec | 26 ++++++++++++++------------ 3 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 ignition-fix-arm32-installation.patch diff --git a/ignition-fix-arm32-installation.patch b/ignition-fix-arm32-installation.patch new file mode 100644 index 0000000..c66e191 --- /dev/null +++ b/ignition-fix-arm32-installation.patch @@ -0,0 +1,11 @@ +--- ignition-2.6.0/Makefile.orig 2020-08-18 10:36:22.791294210 +0000 ++++ ignition-2.6.0/Makefile 2020-08-18 10:39:07.126682387 +0000 +@@ -8,6 +8,8 @@ else ifeq ($(GOARCH),aarch64) + GOARCH=arm64 + else ifeq ($(patsubst i%86,386,$(GOARCH)),386) + GOARCH=386 ++else ifeq ($(patsubst armv%,arm,$(GOARCH)),arm) ++ GOARCH=arm + endif + + .PHONY: all diff --git a/ignition.changes b/ignition.changes index b840a11..c137422 100644 --- a/ignition.changes +++ b/ignition.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 18 11:56:54 UTC 2020 - Guillaume GARDET + +- Add patch to fix install on %arm: + * ignition-fix-arm32-installation.patch + ------------------------------------------------------------------- Wed Aug 12 09:27:01 UTC 2020 - Ignaz Forster diff --git a/ignition.spec b/ignition.spec index 2d8aad2..1e3ab13 100644 --- a/ignition.spec +++ b/ignition.spec @@ -39,27 +39,28 @@ Source21: ignition-userconfig-timeout-arm.conf Patch1: 0001-fix-install-permissions.patch Patch2: 0002-allow-multiple-mounts-of-same-device.patch Patch3: 0003-fix-i386-build.patch +Patch4: ignition-fix-arm32-installation.patch +BuildRequires: dracut +BuildRequires: golang(API) >= 1.12 +BuildRequires: libblkid-devel +BuildRequires: systemd-rpm-macros +BuildRequires: update-bootloader-rpm-macros Requires: %{name}-dracut-grub2 Requires: dracut Requires: virt-what -Provides: ignition-dracut = 0.0+git20200722.98ed51d -Obsoletes: ignition-dracut < 0.0+git20200722.98ed51d +Recommends: %{_sbindir}/groupadd +Recommends: %{_sbindir}/sgdisk +Recommends: %{_sbindir}/useradd +Recommends: %{_sbindir}/usermod Recommends: /sbin/mkfs.btrfs Recommends: /sbin/mkfs.ext4 Recommends: /sbin/mkfs.vfat Recommends: /sbin/mkfs.xfs Recommends: /sbin/mkswap Recommends: /sbin/udevadm -Recommends: /usr/sbin/groupadd -Recommends: /usr/sbin/sgdisk -Recommends: /usr/sbin/useradd -Recommends: /usr/sbin/usermod Suggests: /sbin/mdadm -BuildRequires: dracut -BuildRequires: libblkid-devel -BuildRequires: systemd-rpm-macros -BuildRequires: update-bootloader-rpm-macros -BuildRequires: golang(API) >= 1.12 +Provides: ignition-dracut = 0.0+git20200722.98ed51d +Obsoletes: ignition-dracut < 0.0+git20200722.98ed51d %{update_bootloader_requires} %description @@ -88,6 +89,7 @@ which creates firstboot_happened after the first boot. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 mkdir dracut/30ignition-microos grub systemd_suse chmod +x %{SOURCE3} %{SOURCE4} %{SOURCE8} @@ -106,7 +108,7 @@ sed -i -e 's|go build -ldflags|go build -buildmode=pie -ldflags|g' build env VERSION=%{version} GLDFLAGS='-X github.com/coreos/ignition/v2/internal/distro.selinuxRelabel=false -X github.com/coreos/ignition/v2/internal/distro.writeAuthorizedKeysFragment=false ' bash -x ./build %install -make -o all install DESTDIR="${RPM_BUILD_ROOT}" +make -o all install DESTDIR=%{buildroot} install -d %{buildroot}%{_sysconfdir}/grub.d install -d %{buildroot}%{_prefix}/lib/systemd/system/ignition-firstboot-complete.service.d