Commit Graph

30 Commits

Author SHA1 Message Date
Troy Dawson
f06191d02c Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
2024-10-29 08:53:47 -07:00
Troy Dawson
4015320d9b Bump release for June 2024 mass rebuild 2024-06-24 09:06:43 -07:00
Fedora Release Engineering
6b27ac2112 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 11:45:53 +00:00
Fedora Release Engineering
fada8d387c Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 11:40:19 +00:00
Fedora Release Engineering
8819e2bc7f Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 18:28:14 +00:00
Zbigniew Jędrzejewski-Szmek
f329e5dd44 Make sure redhat-package-notes spec is skipped if _package_note_flags is undefined
... (rbhz#2184553)

The proposed fix was provided by Adam Williamson.
2023-05-20 20:49:07 +02:00
Fedora Release Engineering
a57c7ae4f3 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 23:13:02 +00:00
Luca Boccassi
9f2673bf3a test: run clang build too 2022-09-03 15:26:26 +01:00
Luca Boccassi
42dfa0c11b Disable by default with lld
lld does not support -spec files, so it cannot be used. Disable it again.

- Fixes RHBZ#2119266
2022-08-29 13:44:29 +01:00
Benjamin A. Beasley
791dc804c3 Fix regression due to typo in _package_note_status
- Fixes RHBZ#2118722
2022-08-16 10:31:14 -04:00
Zbigniew Jędrzejewski-Szmek
9f2cdc9ab4 Switch to --package-metadata also with lld 2022-08-16 15:32:17 +02:00
Zbigniew Jędrzejewski-Szmek
5c54ab3586 Adjust whitespace and tweak comments
Also drop the now-unused script.

The URL is restored because we have documentation there.

[skip changelog]

drop
2022-08-16 15:32:17 +02:00
Luca Boccassi
9da9df8af2 Switch to --package-metadata
Use a compiler specs file to avoid issues with escaping and quoting
when a package is built using autotools.
Generate the osCpe string at build time for now, as it's not set
as an env var by rpm yet.
2022-08-09 10:59:13 +01:00
Tom Stellard
145f26fa48 Add CI test 2022-08-06 19:24:00 +02:00
Fedora Release Engineering
5615a58334 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 02:31:01 +00:00
Luca Boccassi
58ec8a67f5 Fix wrong binary fields on big endian
Sync with https://github.com/systemd/package-notes/pull/31

On big endian machines we need to swap the first three fields, which
are binary and thus need to match endianess.
Just use LONG() instead of BYTE sequences.
2022-03-26 18:22:42 +00:00
Zbigniew Jędrzejewski-Szmek
d26d18e6f4 Disable notes when clang toolchain is used on arm
Per https://bugzilla.redhat.com/show_bug.cgi?id=2043178#c27.
2022-01-25 18:19:07 +01:00
Zbigniew Jędrzejewski-Szmek
2ee6aa07f8 Disable notes with linkers other than bfd
%_package_note_linker != "bfd" disables note insertion, so that it also works
as another opt-out mechanism. Maybe we can improve support in the future.

From https://bugzilla.redhat.com/show_bug.cgi?id=2043178#c26:

  It turns out that gold does something wrong with sections.
  When we add the new section, it shifts existing sections (and even gets one section less than before):
  │ -  Entry point address:               0x500
  │ +  Entry point address:               0x50
  │    Start of program headers:          64 (bytes into file)
  │ -  Start of section headers:          6328 (bytes into file)
  │ +  Start of section headers:          8344 (bytes into file)
  │    Flags:                             0x0
  │    Size of this header:               64 (bytes)
  │    Size of program headers:           56 (bytes)
  │ -  Number of program headers:         9
  │ +  Number of program headers:         8
  │    Size of section headers:           64 (bytes)
  │ -  Number of section headers:         36
  │ -  Section header string table index: 35
  │ +  Number of section headers:         38
  │ +  Section header string table index: 37

  There's a bug open to add INSERT AFTER [https://sourceware.org/bugzilla/show_bug.cgi?id=15373],
  but it's 8 years old.

  Opting out seems to be the best we can do for now.

I also noticed that gold support -dT, only lld doesn't, so the conditional is
adjusted accordingly.
2022-01-24 13:10:04 +01:00
Zbigniew Jędrzejewski-Szmek
41c9a3140e Add --insert-after param to the note generation script
I thought this would allow insertion with ld.gold, but it turns out
that the resulting binary has something wrong with sections. So only the
change to the script is committed, because it makes it much easier to
experiment with various linkers.
2022-01-24 13:09:53 +01:00
Zbigniew Jędrzejewski-Szmek
e9d5c37bb3 Add %_package_note_linker and document everything (rhbz#2043178, rhbz#2043368) 2022-01-22 12:02:34 +01:00
Zbigniew Jędrzejewski-Szmek
87708e909b Allow unsetting %_package_note_readonly to drop the READONLY attribute
READONLY is supported in ld.bfd from binutils >= 2.38, though the
patch was backported in rawhide. It is also unsupported by ld.gold,
so let's make it easy to skip it, since things will also work without
it, just a tiny bit worse.
2022-01-22 11:20:25 +01:00
Zbigniew Jędrzejewski-Szmek
b7381d643d Use %{buildsubdir} in %_package_note_file if defined
Thanks to this the file is (in the common case) created in the unpacked
build directory, and not one level up. I.e.
/builddir/build/BUILD/lirc-0.10.0/.package_note-lirc-0.10.0-34.fc36.x86_64
instead of /builddir/build/BUILD/.package_note-lirc-0.10.0-34.fc36.x86_64.ld.
This is nicer esp. for 'fedpkg local' builds, where the dist-git directory is
used as the build dir.

When there are multiple %setup calls, the *last* extracted directory
becomes %{buildsubdir}. This might be confusing, but it shouldn't cause
problems for this use.

Suggested in https://bugzilla.redhat.com/show_bug.cgi?id=2043092#c21.
2022-01-21 17:01:16 +01:00
Zbigniew Jędrzejewski-Szmek
d32fe6caa2 Also voidify the macros if we're on a noarch build
IIUC, the normal %ifarch syntax cannot be used, because the definition
needs to be inline. The best I could find is %_target_cpu, which seems to be
set to "noarch" for noarch builds.
2022-01-21 17:01:16 +01:00
Zbigniew Jędrzejewski-Szmek
04c3c7d716 Use $RPM_PACKAGE_VERSION variable to refer to the package version
When subpackages are used, and have different Version fields, we end up with
the version of the last subpackage in %version. But RPM_PACKAGE_VERSION is
set early, and seems to have the right version.

Fixes rhbz#2043143.
2022-01-21 17:01:16 +01:00
Zbigniew Jędrzejewski-Szmek
1acac701a6 Make _generate_package_note_file always recreate the file
The idea was that we can avoid unnecessary work if the macro is called more than
once. But in hindsight this might be risky: let's instead minimize the number of
places where the macros is called, but always overwrite the file so that we
don't end up with a stale version from a previous build.
2022-01-21 17:01:16 +01:00
Zbigniew Jędrzejewski-Szmek
fb5900700e Conditionalize all macros on %_package_note_file being defined
This way %undefine _package_note_file is a good way to opt-out of the
feature. The other macros wouldn't work without %_package_note_file anyway.
2022-01-21 17:01:16 +01:00
Fedora Release Engineering
52ae83790c - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 22:44:01 +00:00
Zbigniew Jędrzejewski-Szmek
070ec6f27f Rename srpm macros file 2022-01-14 19:17:33 +01:00
Zbigniew Jędrzejewski-Szmek
c0df21c270 Add package-notes-srpm-macros subpackage to configure rpm builds 2022-01-14 18:50:39 +01:00
Zbigniew Jędrzejewski-Szmek
d4bfe9cb08 Version 0.4 2021-11-16 19:33:12 +01:00