commit
16d02c00f7
@ -0,0 +1,29 @@
|
||||
# This file is part of the package-notes package.
|
||||
#
|
||||
# Add an ELF note with information about the package the code was compiled for.
|
||||
# See https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objects
|
||||
# for details.
|
||||
#
|
||||
# To opt out of the use of this feature completely, include this in the spec
|
||||
# file:
|
||||
#
|
||||
# %undefine _package_note_flags
|
||||
#
|
||||
# Which linker will be used? This should be either "bfd", "gold", "mold", or "lld".
|
||||
#
|
||||
# (The default linker for clang on armv7hl is lld.)
|
||||
%_package_note_linker %["%_target_cpu" == "armv7hl" && "%{toolchain}" == "clang" ? "lld" : "bfd"]
|
||||
|
||||
# These are defined for backwards compatibility. Do not use.
|
||||
%_package_note_file 1
|
||||
%_generate_package_note_file %{nil}
|
||||
|
||||
# Overall status: 1 if looks like we can insert the note, 0 otherwise
|
||||
# Unfortunately "clang" does not support specs files so the note insertion is disabled when using it.
|
||||
%_package_note_status %{!?_package_note_flags:0}%{?_package_note_flags:%[0%{?_package_note_file:1} && 0%{?name:1} && "%_target_cpu" != "noarch" && "%{toolchain}" != "clang" ? 1 : 0]}
|
||||
|
||||
|
||||
# The linker flags to be passed to the compiler to insert the notes section will
|
||||
# be created by the spec file, to avoid issues with quoting and escaping across
|
||||
# different build systems and shells.
|
||||
%_package_note_flags %[%_package_note_status ? "-specs=/usr/lib/rpm/redhat/redhat-package-notes" : ""]
|
@ -0,0 +1,2 @@
|
||||
*link:
|
||||
+ --package-metadata={\"type\":\"rpm\",\"name\":\"%:getenv(RPM_PACKAGE_NAME \",\"version\":\"%:getenv(RPM_PACKAGE_VERSION -%:getenv(RPM_PACKAGE_RELEASE \",\"architecture\":\"%:getenv(RPM_ARCH \",\"osCpe\":\"@OSCPE@\"}))))
|
@ -0,0 +1,147 @@
|
||||
## START: Set by rpmautospec
|
||||
## (rpmautospec version 0.6.1)
|
||||
## RPMAUTOSPEC: autorelease, autochangelog
|
||||
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
||||
release_number = 12;
|
||||
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
||||
print(release_number + base_release_number - 1);
|
||||
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
||||
## END: Set by rpmautospec
|
||||
|
||||
Name: package-notes
|
||||
Version: 0.5
|
||||
Release: %autorelease
|
||||
Summary: Generate LDFLAGS to insert .note.package section
|
||||
License: 0BSD
|
||||
URL: https://github.com/systemd/package-notes
|
||||
|
||||
Source0: redhat-package-notes.in
|
||||
Source1: macros.package-notes-srpm
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
This package provides a generator of linker scripts that insert a section with
|
||||
an ELF note with a JSON payload that describes the package the binary was built
|
||||
for.
|
||||
|
||||
%package srpm-macros
|
||||
Summary: %{summary}
|
||||
Obsoletes: package-notes < 0.5
|
||||
# Those are minimum versions that implement --package-metadata
|
||||
Conflicts: binutils < 2.37-34
|
||||
Conflicts: binutils-gold < 2.37-34
|
||||
Conflicts: mold < 1.3.0
|
||||
Conflicts: lld < 14.0.5-4
|
||||
|
||||
%description srpm-macros
|
||||
RPM macros to insert a section with an ELF note with a JSON payload that
|
||||
describes the package the binary was built for via a compiler spec file.
|
||||
|
||||
%prep
|
||||
# nothing to do
|
||||
|
||||
%build
|
||||
sed "s|@OSCPE@|$(cat /usr/lib/system-release-cpe)|" %{SOURCE0} >redhat-package-notes
|
||||
|
||||
%install
|
||||
install -Dt %{buildroot}%{_rpmconfigdir}/redhat/ redhat-package-notes
|
||||
install -m0644 -Dt %{buildroot}%{_rpmmacrodir}/ %{SOURCE1}
|
||||
|
||||
%files srpm-macros
|
||||
%{_rpmconfigdir}/redhat/redhat-package-notes
|
||||
%{_rpmmacrodir}/macros.package-notes-srpm
|
||||
|
||||
%changelog
|
||||
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 0.5-12
|
||||
- Rebuilt for MSVSphere 10
|
||||
|
||||
## START: Generated by rpmautospec
|
||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.5-12
|
||||
- Bump release for June 2024 mass rebuild
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Sat May 20 2023 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.5-8
|
||||
- Make sure redhat-package-notes spec is skipped if _package_note_flags is
|
||||
undefined (rbhz#2184553)
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Sat Sep 03 2022 Luca Boccassi <bluca@debian.org> - 0.5-6
|
||||
- test: run clang build too
|
||||
|
||||
* Mon Aug 29 2022 Luca Boccassi <bluca@debian.org> - 0.5-5
|
||||
- Disable by default with lld
|
||||
|
||||
* Tue Aug 16 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.5-4
|
||||
- Fix regression due to typo in _package_note_status
|
||||
- Fixes RHBZ#2118722
|
||||
|
||||
* Tue Aug 16 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.5-3
|
||||
- Switch to --package-metadata also with lld (#2051597)
|
||||
|
||||
* Tue Aug 09 2022 Luca Boccassi <bluca@debian.org> - 0.5-1
|
||||
- Switch to --package-metadata (#2055863, #2083878, #2099999, #2059858, #2055458)
|
||||
|
||||
* Sat Aug 06 2022 Tom Stellard <tstellar@redhat.com> - 0.4-17
|
||||
- Add CI test
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Sat Mar 26 2022 Luca Boccassi <bluca@debian.org> - 0.4-15
|
||||
- Fix wrong binary fields on big endian
|
||||
|
||||
* Tue Jan 25 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4-14
|
||||
- Disable notes when clang toolchain is used on arm
|
||||
|
||||
* Mon Jan 24 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4-13
|
||||
- Disable notes with linkers other than bfd
|
||||
|
||||
* Mon Jan 24 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4-12
|
||||
- Add --insert-after param to the note generation script
|
||||
|
||||
* Sat Jan 22 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4-11
|
||||
- Add %%_package_note_linker and document everything (rhbz#2043178,
|
||||
rhbz#2043368)
|
||||
|
||||
* Sat Jan 22 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4-10
|
||||
- Allow unsetting %%_package_note_readonly to drop the READONLY attribute
|
||||
|
||||
* Fri Jan 21 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4-9
|
||||
- Use %%{buildsubdir} in %%_package_note_file if defined
|
||||
|
||||
* Fri Jan 21 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4-8
|
||||
- Also voidify the macros if we're on a noarch build
|
||||
|
||||
* Fri Jan 21 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4-7
|
||||
- Use $RPM_PACKAGE_VERSION variable to refer to the package version
|
||||
|
||||
* Fri Jan 21 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4-6
|
||||
- Make _generate_package_note_file always recreate the file
|
||||
|
||||
* Fri Jan 21 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4-5
|
||||
- Conditionalize all macros on %%_package_note_file being defined
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Fri Jan 14 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4-3
|
||||
- Rename srpm macros file
|
||||
|
||||
* Fri Jan 14 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4-2
|
||||
- Add package-notes-srpm-macros subpackage to configure rpm builds
|
||||
|
||||
* Tue Nov 16 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4-1
|
||||
- Version 0.4
|
||||
|
||||
## END: Generated by rpmautospec
|
Loading…
Reference in new issue