#23 Fix RHEL build
Merged a year ago by nickc. Opened a year ago by yselkowitz.
rpms/ yselkowitz/annobin rawhide  into  rawhide

file modified
+2 -2
@@ -403,8 +403,8 @@ 

  BUILD_FLAGS="-fplugin=%{_tmppath}/tmp_annobin.so"

  

  # Disable the standard annobin plugin so that we do get conflicts.

- # Note - Fedora's rpm uses a different way of evaluating macros. 

- %if 0%{?fedora} == 0

+ # Note - rpm-4.10 uses a different way of evaluating macros.

+ %if 0%{?rhel} && 0%{?rhel} < 7

  OPTS="$(rpm --eval '%undefine _annotated_build %build_cflags %build_ldflags')"

  %else

  OPTS="$(rpm --undefine=_annotated_build --eval '%build_cflags %build_ldflags')"

RHEL 7+ have rpm versions which support the --undefine parameter. I'm not quite sure what this was intended to handle, but it currently breaks ELN builds, e.g. https://kojipkgs.fedoraproject.org//work/tasks/9238/97019238/build.log

ELN scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=97250010

/cc @nickc

I think the nested % in the shell command need %% quoting.

It seems both the "new" and "old" syntaxes work on RHEL 8 and 9, but only the "new" syntax works on recent Fedora (and hence ELN which is preparing for RHEL 10). Is this spec file still being used for RHEL older than that?

ping @nickc

rebased onto 4cb3354

a year ago

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/7af0949c6e1e454cbc3750990965f859

Pull-Request has been merged by nickc

a year ago
Metadata