Blame SPECS/kernel-srpm-macros.spec

837a2d
Name:           kernel-srpm-macros
837a2d
Version:        1.0
837a2d
Release:        11%{?dist}
837a2d
Summary:        RPM macros that list arches the full kernel is built on
837a2d
# This package only exist in Fedora repositories
837a2d
# The license is the standard (MIT) specified in
837a2d
# Fedora Project Contribution Agreement
837a2d
# and as URL we provide dist-git URL
837a2d
License:        MIT
837a2d
URL:            https://src.fedoraproject.org/rpms/kernel-srpm-macros
837a2d
BuildArch:      noarch
837a2d
# We are now the ones shipping kmod.attr
837a2d
Conflicts:      redhat-rpm-config <= 184
837a2d
# macros.kmp, kmodtool and rpmsort were moved from kernel-rpm-macros
837a2d
# to kernel-srpm-macros in 1.0-9/185-9
837a2d
Conflicts:      kernel-rpm-macros < 185-9
837a2d
837a2d
# Macros
837a2d
Source0:        macros.kernel-srpm
837a2d
Source1:        macros.kmp
837a2d
837a2d
# Dependency generator scripts
837a2d
Source100:      find-provides.ksyms
837a2d
Source101:      find-requires.ksyms
837a2d
Source102:      firmware.prov
837a2d
Source103:      modalias.prov
837a2d
Source104:      provided_ksyms.attr
837a2d
Source105:      required_ksyms.attr
837a2d
Source106:      modalias.attr
837a2d
837a2d
# Dependency generators & their rules
837a2d
Source200:      kmod.attr
837a2d
837a2d
# Misc helper scripts
837a2d
Source300:      kmodtool
837a2d
Source301:      rpmsort
837a2d
Source302:      symset-table
837a2d
837a2d
# kabi provides generator
837a2d
Source400: kabi.attr
837a2d
Source401: kabi.sh
837a2d
837a2d
# BRPs
837a2d
Source500: brp-kmod-set-exec-bit
837a2d
Source501: brp-kmod-restore-perms
837a2d
837a2d
%global rrcdir /usr/lib/rpm/redhat
837a2d
837a2d
837a2d
%description
837a2d
This packages contains the rpm macro that list what arches
837a2d
the full kernel is built on.
837a2d
The variable to use is kernel_arches.
837a2d
837a2d
%package -n kernel-rpm-macros
837a2d
Version: 185
837a2d
Release: %{release}
837a2d
Summary: Macros and scripts for building kernel module packages
837a2d
Requires: redhat-rpm-config >= 13
837a2d
837a2d
# for brp-kmod-set-exec-bit
837a2d
Requires: %{_bindir}/find
837a2d
837a2d
%description -n kernel-rpm-macros
837a2d
Macros and scripts for building kernel module packages.
837a2d
837a2d
%prep
837a2d
# Not strictly necessary but allows working on file names instead
837a2d
# of source numbers in install section
837a2d
%setup -c -T
837a2d
cp -p %{sources} .
837a2d
837a2d
837a2d
%build
837a2d
# nothing to do
837a2d
837a2d
837a2d
%install
837a2d
mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d
837a2d
install -p -m 0644 -t %{buildroot}/%{_rpmconfigdir}/macros.d macros.kernel-srpm
837a2d
%if 0%{?rhel} >= 8
837a2d
  sed -i 's/^%%kernel_arches.*/%%kernel_arches x86_64 s390x ppc64le aarch64/' \
837a2d
    %{buildroot}/%{_rpmconfigdir}/macros.d/macros.kernel-srpm
837a2d
%endif
837a2d
837a2d
mkdir -p %{buildroot}%{rrcdir}/find-provides.d
837a2d
mkdir -p %{buildroot}%{_fileattrsdir}
837a2d
install -p -m 755 -t %{buildroot}%{rrcdir} kmodtool rpmsort symset-table
837a2d
install -p -m 755 -t %{buildroot}%{rrcdir} find-provides.ksyms find-requires.ksyms
837a2d
install -p -m 755 -t %{buildroot}%{rrcdir}/find-provides.d firmware.prov modalias.prov
837a2d
install -p -m 755 -t %{buildroot}%{rrcdir} brp-kmod-restore-perms brp-kmod-set-exec-bit
837a2d
install -p -m 644 -t %{buildroot}%{_rpmconfigdir}/macros.d macros.kmp
837a2d
install -p -m 644 -t %{buildroot}%{_fileattrsdir} kmod.attr
837a2d
837a2d
install -p -m 644 -t "%{buildroot}%{_fileattrsdir}" kabi.attr
837a2d
install -p -m 755 -t "%{buildroot}%{_rpmconfigdir}" kabi.sh
837a2d
837a2d
install -p -m 644 -t "%{buildroot}%{_fileattrsdir}" provided_ksyms.attr required_ksyms.attr
837a2d
install -p -m 644 -t "%{buildroot}%{_fileattrsdir}" modalias.attr
837a2d
837a2d
%files
837a2d
%{_rpmconfigdir}/macros.d/macros.kernel-srpm
837a2d
%{_rpmconfigdir}/macros.d/macros.kmp
837a2d
%{_fileattrsdir}/kmod.attr
837a2d
%{rrcdir}/kmodtool
837a2d
%{rrcdir}/rpmsort
837a2d
837a2d
%files -n kernel-rpm-macros
837a2d
%{_rpmconfigdir}/kabi.sh
837a2d
%{_fileattrsdir}/kabi.attr
837a2d
%{_fileattrsdir}/modalias.attr
837a2d
%{_fileattrsdir}/provided_ksyms.attr
837a2d
%{_fileattrsdir}/required_ksyms.attr
837a2d
%dir %{rrcdir}/find-provides.d
837a2d
%{rrcdir}/brp-kmod-restore-perms
837a2d
%{rrcdir}/brp-kmod-set-exec-bit
837a2d
%{rrcdir}/symset-table
837a2d
%{rrcdir}/find-provides.ksyms
837a2d
%{rrcdir}/find-requires.ksyms
837a2d
%{rrcdir}/find-provides.d/firmware.prov
837a2d
%{rrcdir}/find-provides.d/modalias.prov
837a2d
837a2d
%changelog
837a2d
* Thu Feb 17 2022 Eugene Syromiatnikov <esyr@redhat.com> - 1.0-11
837a2d
- Work around a change in type of __crc_* symbols for some kmods printed by nm
837a2d
  on ppc64le and s390x
837a2d
- Resolves: #2055464
837a2d
837a2d
* Thu Nov 18 2021 Eugene Syromiatnikov <esyr@redhat.com> - 1.0-10
837a2d
- Add conflicts of kernel-srpm-macros with kernel-rpm-macros < 185-9
837a2d
  as macros.kmp, kmodtool, and rpmsort were moved from the latter
837a2d
  to the former.
837a2d
837a2d
* Mon Sep 20 2021 Eugene Syromiatnikov <esyr@redhat.com> - 1.0-9
837a2d
- Update scripts with RHEL-specific changes.
837a2d
837a2d
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.0-8
837a2d
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
837a2d
  Related: rhbz#1991688
837a2d
837a2d
* Tue May 25 2021 Michal Domonkos <mdomonko@redhat.com> - 1.0-7
837a2d
- Bump release for a rebuild in a sidetag
837a2d
837a2d
* Wed May 12 2021 Michal Domonkos <mdomonko@redhat.com> - 1.0-6
837a2d
- Adopt kernel-rpm-macros subpackage & kmod.attr from redhat-rpm-config
837a2d
- Resolves: #1959914
837a2d
837a2d
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.0-5
837a2d
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
837a2d
837a2d
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-4
837a2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
837a2d
837a2d
* Tue Aug 04 2020 Merlin Mathesius <mmathesi@redhat.com> - 1.0-3
837a2d
- Escape percent for %%kernel_arches macro
837a2d
837a2d
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-2
837a2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
837a2d
837a2d
* Tue Jul 21 2020 Troy Dawson <tdawson@redhat.com> - 1.0-1
837a2d
- Initial build
837a2d