From 139fd2a7cf4d97f0e462bcc954beaf930db4b1be Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Tue, 3 Dec 2024 01:18:00 +0100 Subject: [PATCH] Replace ExclusiveArch with ifarch Signed-off-by: Jindrich Novy --- rpm/podman.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rpm/podman.spec b/rpm/podman.spec index 7333fc4ff2..885938b85d 100644 --- a/rpm/podman.spec +++ b/rpm/podman.spec @@ -40,6 +40,9 @@ # %%{name} %global git0 %{container_base_url}/%{name} +# podman-machine subpackage will be present only on these architectures +%global machine_arches x86_64 aarch64 + Name: podman %if %{defined copr_build} Epoch: 102 @@ -179,6 +182,7 @@ capabilities specified in user quadlets. It is a symlink to %{_bindir}/%{name} and execs into the `%{name}sh` container when `%{_bindir}/%{name}sh` is set as a login shell or set as os.Args[0]. +%ifarch %{machine_arches} %package machine Summary: Metapackage for setting up %{name} machine Requires: %{name} = %{epoch}:%{version}-%{release} @@ -189,6 +193,7 @@ Requires: virtiofsd %description machine This subpackage installs the dependencies for %{name} machine, for more see: https://docs.podman.io/en/latest/markdown/podman-machine.1.html +%endif %prep %autosetup -Sgit -n %{name}-%{version_no_tilde} @@ -282,8 +287,10 @@ rm -f %{buildroot}%{_mandir}/man5/docker*.5 install -d -p %{buildroot}%{_datadir}/%{name}/test/system cp -pav test/system %{buildroot}%{_datadir}/%{name}/test/ +%ifarch %{machine_arches} # symlink virtiofsd in %%{name} libexecdir for machine subpackage ln -s ../virtiofsd %{buildroot}%{_libexecdir}/%{name} +%endif #define license tag if not already defined %{!?_licensedir:%global license %doc} @@ -338,9 +345,11 @@ ln -s ../virtiofsd %{buildroot}%{_libexecdir}/%{name} %{_bindir}/%{name}sh %{_mandir}/man1/%{name}sh.1* +%ifarch %{machine_arches} %files machine %dir %{_libexecdir}/%{name} %{_libexecdir}/%{name}/virtiofsd +%endif %changelog %autochangelog