Blame SPECS/kernel-srpm-macros.spec

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