enable multi-arch builds

Resolves: RHEL-10568
This commit is contained in:
Dan Horák 2023-11-24 11:36:43 +01:00
parent 20230f8ddc
commit 1f98c6e050

View File

@ -21,7 +21,6 @@ Version: 2.29.0
Release: 1%{?dist} Release: 1%{?dist}
Epoch: 2 Epoch: 2
License: MIT License: MIT
ExclusiveArch: s390 s390x
#URL: http://www.ibm.com/developerworks/linux/linux390/s390-tools.html #URL: http://www.ibm.com/developerworks/linux/linux390/s390-tools.html
URL: https://github.com/ibm-s390-tools/s390-tools URL: https://github.com/ibm-s390-tools/s390-tools
Source0: https://github.com/ibm-s390-tools/s390-tools/archive/v%{version}.tar.gz#/s390-tools-%{version}.tar.gz Source0: https://github.com/ibm-s390-tools/s390-tools/archive/v%{version}.tar.gz#/s390-tools-%{version}.tar.gz
@ -66,6 +65,13 @@ Patch1003: cmsfs-1.1.8-args.patch
Patch2000: src_vipa-2.1.0-deprecate.patch Patch2000: src_vipa-2.1.0-deprecate.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
%ifarch s390x
#
# s390x/native package structure
#
Requires: s390utils-core = %{epoch}:%{version}-%{release} Requires: s390utils-core = %{epoch}:%{version}-%{release}
Requires: s390utils-base = %{epoch}:%{version}-%{release} Requires: s390utils-base = %{epoch}:%{version}-%{release}
Requires: s390utils-osasnmpd = %{epoch}:%{version}-%{release} Requires: s390utils-osasnmpd = %{epoch}:%{version}-%{release}
@ -74,8 +80,10 @@ Requires: s390utils-mon_statd = %{epoch}:%{version}-%{release}
Requires: s390utils-iucvterm = %{epoch}:%{version}-%{release} Requires: s390utils-iucvterm = %{epoch}:%{version}-%{release}
Requires: s390utils-ziomon = %{epoch}:%{version}-%{release} Requires: s390utils-ziomon = %{epoch}:%{version}-%{release}
Requires: s390utils-cmsfs = %{epoch}:%{version}-%{release} Requires: s390utils-cmsfs = %{epoch}:%{version}-%{release}
%endif
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: glib2-devel
%if %{with rust} %if %{with rust}
%if 0%{?rhel} %if 0%{?rhel}
BuildRequires: libcurl-devel BuildRequires: libcurl-devel
@ -191,6 +199,10 @@ make \
DISTRELEASE=%{release} \ DISTRELEASE=%{release} \
V=1 V=1
%ifarch s390x
#
# s390x/native specific %%build section
#
pushd cmsfs-%{cmsfsver} pushd cmsfs-%{cmsfsver}
./configure ./configure
make CC="gcc %{build_cflags} -fno-strict-aliasing %{build_ldflags}" make CC="gcc %{build_cflags} -fno-strict-aliasing %{build_ldflags}"
@ -199,6 +211,7 @@ popd
pushd src_vipa-%{vipaver} pushd src_vipa-%{vipaver}
make CC_FLAGS="%{build_cflags} -fPIC" LD_FLAGS="%{build_ldflags} -shared" LIBDIR=%{_libdir} make CC_FLAGS="%{build_cflags} -fPIC" LD_FLAGS="%{build_ldflags} -shared" LIBDIR=%{_libdir}
popd popd
%endif
%install %install
@ -216,6 +229,10 @@ make install \
DISTRELEASE=%{release} \ DISTRELEASE=%{release} \
V=1 V=1
%ifarch s390x
#
# s390x/native specific %%install section
#
# sign the stage3 bootloader # sign the stage3 bootloader
%if %{with signzipl} %if %{with signzipl}
if [ -x /usr/bin/rpm-sign ]; then if [ -x /usr/bin/rpm-sign ]; then
@ -287,11 +304,57 @@ install -p -m 644 %{SOURCE17} %{buildroot}%{_udevrulesdir}/81-ccw.rules
# zipl.conf to be ghosted # zipl.conf to be ghosted
touch %{buildroot}%{_sysconfdir}/zipl.conf touch %{buildroot}%{_sysconfdir}/zipl.conf
%endif
%ifarch s390x
#
# s390x/native main %%files section
#
%files %files
%doc README.md %doc README.md
%else
#
# multiarch %%files section
#
%files
%doc README.md
%license LICENSE
%{_bindir}/genprotimg
%{_bindir}/pvattest
%{_bindir}/pvextract-hdr
%if %{with rust}
%{_bindir}/pvsecret
%endif
%{_mandir}/man1/genprotimg.1*
%{_mandir}/man1/pvattest.1*
%{_mandir}/man1/pvattest-create.1*
%{_mandir}/man1/pvattest-perform.1*
%{_mandir}/man1/pvattest-verify.1*
%if %{with rust}
%{_mandir}/man1/pvsecret-add.1*
%{_mandir}/man1/pvsecret-create-association.1*
%{_mandir}/man1/pvsecret-create-meta.1*
%{_mandir}/man1/pvsecret-create.1*
%{_mandir}/man1/pvsecret-list.1*
%{_mandir}/man1/pvsecret-lock.1*
%{_mandir}/man1/pvsecret-version.1*
%{_mandir}/man1/pvsecret.1*
%endif
%dir %{_datadir}/s390-tools
%{_datadir}/s390-tools/genprotimg/
#
# enf of multi-arch section
#
%endif
%ifarch s390x
#
# s390x specific sub-packages
#
#
# ************************* s390-tools core package ************************* # ************************* s390-tools core package *************************
# #
%package core %package core
@ -409,7 +472,6 @@ BuildRequires: glibc-static
BuildRequires: cryptsetup-devel >= 2.0.3 BuildRequires: cryptsetup-devel >= 2.0.3
BuildRequires: json-c-devel BuildRequires: json-c-devel
BuildRequires: rpm-devel BuildRequires: rpm-devel
BuildRequires: glib2-devel
BuildRequires: libxml2-devel BuildRequires: libxml2-devel
@ -1073,6 +1135,11 @@ User-space development files for the s390/s390x architecture.
%{_libdir}/libekmfweb.so %{_libdir}/libekmfweb.so
%{_libdir}/libkmipclient.so %{_libdir}/libkmipclient.so
#
# end of s390x specific sub-packages
#
%endif
%changelog %changelog
* Mon Dec 04 2023 Dan Horák <dhorak@redhat.com> - 2:2.29.0-1 * Mon Dec 04 2023 Dan Horák <dhorak@redhat.com> - 2:2.29.0-1
@ -1082,7 +1149,8 @@ User-space development files for the s390/s390x architecture.
- zkey: support for key type PKEY_TYPE_EP11_AES (RHEL-11441) - zkey: support for key type PKEY_TYPE_EP11_AES (RHEL-11441)
- vmur: fix handling of option -t (RHEL-11479) - vmur: fix handling of option -t (RHEL-11479)
- dbginfo.sh: global original Input Field Separator (IFS) (RHEL-16526) - dbginfo.sh: global original Input Field Separator (IFS) (RHEL-16526)
- Resolves: RHEL-11409 RHEL-10573 RHEL-10579 RHEL-11441 RHEL-11479 RHEL-16526 - enable multi-arch build (RHEL-10568)
- Resolves: RHEL-11409 RHEL-10573 RHEL-10579 RHEL-11441 RHEL-11479 RHEL-16526 RHEL-10568
* Mon Aug 07 2023 Dan Horák <dhorak@redhat.com> - 2:2.27.0-3 * Mon Aug 07 2023 Dan Horák <dhorak@redhat.com> - 2:2.27.0-3
- zdev/dracut: fix kdump build to integrate with site support (#2229178) - zdev/dracut: fix kdump build to integrate with site support (#2229178)