Bug 1744583

Summary: Macro %undefine is a built-in
Product: [Fedora] Fedora Reporter: Remi Collet <fedora>
Component: scl-utilsAssignee: Remi Collet <fedora>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 31CC: jnovy, jorton, kwizart, mnowak, pmatilai, pmoravco, slavek.kabrda, vondruch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-15 10:15:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix proposal
none
Fix proposal
none
Fix proposal none

Description Remi Collet 2019-08-22 13:26:21 UTC
scl-utils generate a macros-%{scl}-config file which contains overriden system macros.

ex: 
%scl php74

%undefine nfsmountable
%rh_layout 1

The %undefine generate tons of errors when this file is installed

error: /usr/lib/rpm/macros.d/macros.php74-config: line 3: Macro %undefine is a built-in (%define)

Deleting this line is a working workaround.


Notice: error is only raised by RPM 4.15 in F31
(but even is silently ignored by older version, the line still bad and have to be removed)

Comment 1 Remi Collet 2019-08-22 13:36:46 UTC
Created attachment 1606952 [details]
Fix proposal

Comment 2 Remi Collet 2019-08-22 13:38:27 UTC
Created attachment 1606953 [details]
Fix proposal

Comment 3 Remi Collet 2019-08-22 14:33:01 UTC
Created attachment 1607005 [details]
Fix proposal

Comment 4 Pavlina Moravcova Varekova 2019-09-03 08:17:52 UTC
The patch is correct.

Comment 5 Nicolas Chauvet (kwizart) 2019-09-03 11:37:08 UTC
(In reply to Remi Collet from comment #3)
> Created attachment 1607005 [details]
> Fix proposal

You need to use %% in comments. Or you will have the "macro in comment" issue.

Comment 6 Michal Nowak 2019-11-29 11:16:01 UTC
Can we move ahead with the patch? I seems to suffer this bug at https://copr-be.cloud.fedoraproject.org/results/mnohime/bind-dev/fedora-31-x86_64/01120455-isc-bind-bind/builder-live.log.gz:

RPM build errors:
    /etc/rpm/macros.isc-bind-config: line 5: Macro %undefine is a built-in (%define)
    /etc/rpm/macros.isc-bind-config: line 5: Macro %undefine is a built-in (%define)
    File not found: /builddir/build/BUILDROOT/isc-bind-bind-9.15.6-1.1.fc31.x86_64/opt/isc/isc-bind/root%{python_sitelib}/*
error: /etc/rpm/macros.isc-bind-config: line 5: Macro %undefine is a built-in (%define)

Comment 7 Remi Collet 2019-11-29 12:52:58 UTC
@Panu, do you want me to take care of merging patch proposal and run the build / updates ?

Comment 8 Michal Nowak 2019-12-13 10:03:12 UTC
Any update on this?

Comment 9 Remi Collet 2019-12-13 11:23:55 UTC
Will use my proven packager power to fix this.

Comment 10 Fedora Update System 2019-12-13 11:32:52 UTC
FEDORA-2019-c3685a481b has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-c3685a481b

Comment 11 Fedora Update System 2019-12-14 00:48:58 UTC
scl-utils-2.0.2-12.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-c3685a481b

Comment 12 Michal Nowak 2020-01-15 09:22:47 UTC
I see the updated scl-utils package in the 'updates' repo, perhaps this bug should be moved to some other state.

In any case it did not help our problem in comment#6 (https://copr-be.cloud.fedoraproject.org/results/mnohime/bind-dev/fedora-31-x86_64/01145028-isc-bind-bind/builder-live.log.gz):

RPM build errors:
    /etc/rpm/macros.isc-bind-config: line 5: Macro %undefine is a built-in (%define)
    /etc/rpm/macros.isc-bind-config: line 5: Macro %undefine is a built-in (%define)
    File not found: /builddir/build/BUILDROOT/isc-bind-bind-9.15.7-1.1.fc31.x86_64/opt/isc/isc-bind/root%{python_sitelib}/*
error: /etc/rpm/macros.isc-bind-config: line 5: Macro %undefine is a built-in (%define)

Comment 13 Remi Collet 2020-01-15 10:15:13 UTC
Strange, should have been closed by Bodhi.


Notice: to clear the warning, you need to rebuild the metapackage against the new version

But the "File not found" issue is a different issue, probably related to python packaging.

Comment 14 Michal Nowak 2020-01-23 06:10:07 UTC
Thanks Remi the for advice. We deleted the broken F31 metapackage, rebuilt it and then the rest in the F31 Copr, and it worked. We fixed the "File not found" problem in our packaging too.