Bug 2233454 - Function not called
Summary: Function not called
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-22 09:18 UTC by Remi Collet
Modified: 2023-09-18 00:15 UTC (History)
4 users (show)

Fixed In Version: rpm-4.18.99-1.fc39
Clone Of:
Environment:
Last Closed: 2023-09-18 00:15:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Remi Collet 2023-08-22 09:18:15 UTC
scl-utils-build provides /usr/lib/rpm/macros.d/macros.scl which define the scl_package function:

    %scl_package() %{expand:%{!?_root_prefix:
    %global pkg_name                %1
    %global scl_name                %{scl}
    ...

When trying to build some package which calls this function doesn't works anymore (was ok in F38 with rpm 4.18

     %global scl_name_base    php
     %global scl_name_version 74
     %global scl              %{scl_name_base}%{scl_name_version}
     %scl_package %scl

Result: none of the expected macros are defined

Mock output:

   Start: build setup for php74-7.4-3.remi.src.rpm
   warning: line 27: Possible unexpanded macro in: Name:          %scl_name
   error: line 44: Dependency tokens must begin with alpha-numeric, '_' or '/': Requires:      -runtime(x86-64)      = 7.4-3.fc39.remi



Reproducible: Always

Comment 1 Remi Collet 2023-08-22 09:20:25 UTC
Also reported on scl-utils
https://github.com/sclorg/scl-utils/issues/50

Comment 2 Panu Matilainen 2023-08-22 09:32:34 UTC
Please provide concrete steps for reproducing. I wouldn't know where to even begin looking for a package exhibiting this.

Comment 3 Remi Collet 2023-08-22 09:47:03 UTC
In a chroot with scl-utils-build installed

You can try https://rpms.remirepo.net/SRPMS/php74-7.4-3.remi.src.rpm
(this is a SCL meta package)

Perhaps you also need to have %scl_vendor and %_scl_prefix defined

In my mock configuration, I have

config_opts['chroot_setup_cmd'] = 'install @buildsys-build ccache scl-utils-build '
config_opts['macros']['%scl_vendor']="remi"
config_opts['macros']['%_scl_prefix']="/opt/remi"
config_opts['macros']['%_build_id_links']='none'

Comment 4 Panu Matilainen 2023-08-22 10:15:28 UTC
Thanks.

In the meanwhile, I just realized that this is quite obviously fallout from https://github.com/rpm-software-management/rpm/commit/cececfb6851234aca3e8d102de1c192c6bdf3e67 which defines root_prefix in a way that scl-utils clashes with scl-utils usage :-/

Comment 5 Remi Collet 2023-08-22 10:39:53 UTC
(In reply to Panu Matilainen from comment #4)
> Thanks.
> 
> In the meanwhile, I just realized that this is quite obviously fallout from
> https://github.com/rpm-software-management/rpm/commit/
> cececfb6851234aca3e8d102de1c192c6bdf3e67 which defines root_prefix in a way
> that scl-utils clashes with scl-utils usage :-/

Thanks for explanation
Simple fix in the scl-utils side
https://github.com/sclorg/scl-utils/pull/51

And everything seems to work as expected (running more build now)

Comment 6 Panu Matilainen 2023-08-22 10:56:27 UTC
In the meanwhile I fixed it in the rpm side :D
https://github.com/rpm-software-management/rpm/pull/2625

Comment 7 Panu Matilainen 2023-08-22 11:37:28 UTC
Should be fixed in rpm-4.18.92-3.fc40 but this'll need an F39 update too.

Comment 8 Fedora Update System 2023-08-24 06:46:03 UTC
FEDORA-2023-d1971fb6db has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-d1971fb6db

Comment 9 Fedora Update System 2023-09-05 02:01:17 UTC
FEDORA-2023-067d943f23 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-067d943f23`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-067d943f23

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2023-09-18 00:15:59 UTC
FEDORA-2023-067d943f23 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.