Skip to content

Commit 9aa5f5a

Browse files
thozzaachilleas-k
authored andcommitted
SPEC: initrd sub-package fixups and exclude i686 arch on el
There is no i686 golang package on CentOS Stream and RHEL, which makes our builds fail on these distributions. Also, make sure that osbuild depends on the same version of osbuild-initrd, so that one can't mix and match different version of these packages. Lastly, move the 'golang' BuildRequires to the initrd sub-package which is the one that needs it. Also use the golang macros that we use in other projects. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
1 parent 6d406fb commit 9aa5f5a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

osbuild.spec

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@ Source0: %{forgesource}
2020
Source1: https://github.com/osbuild/initrd/releases/download/%{osbuild_initrd_version}/osbuild-initrd-%{osbuild_initrd_version}.tar.gz
2121
Summary: A build system for OS images
2222

23+
# There is no golang support for i686 on centos and RHEL
24+
%if 0%{?rhel} || 0%{?centos}
25+
ExcludeArch: i686
26+
%endif
27+
2328
BuildRequires: make
2429
BuildRequires: python3-devel
2530
BuildRequires: python3-docutils
2631
BuildRequires: python3-setuptools
2732
BuildRequires: systemd
28-
BuildRequires: golang
2933

3034
# for tests
3135
BuildRequires: python3-iniparse
@@ -55,7 +59,7 @@ Requires: util-linux
5559
Requires: python3-%{pypi_name} = %{version}-%{release}
5660
Requires: (%{name}-selinux if selinux-policy-%{selinuxtype})
5761
Requires: python3-librepo
58-
Requires: %{name}-initrd
62+
Requires: %{name}-initrd = %{version}-%{release}
5963

6064
# This is required for `osbuild`, for RHEL-10 and above
6165
# the stdlib tomllib module can be used instead
@@ -124,6 +128,7 @@ to build OSTree based images.
124128

125129
%package initrd
126130
Summary: osbuild initrd for vm support
131+
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
127132

128133
%description initrd
129134
Osbuild initrd used for in-vm support.

0 commit comments

Comments
 (0)