Bug 2051542 - %autochangelog causes koji build issues for skopeo package [NEEDINFO]
Summary: %autochangelog causes koji build issues for skopeo package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rpmautospec
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-07 13:06 UTC by Lokesh Mandvekar
Modified: 2022-05-11 01:23 UTC (History)
3 users (show)

Fixed In Version: python-rpmautospec-0.2.6-1.fc34 python-rpmautospec-0.2.6-1.fc36 python-rpmautospec-0.2.6-1.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-11 01:23:21 UTC
Type: Bug
lsm5: needinfo? (asaleh)


Attachments (Terms of Use)

Description Lokesh Mandvekar 2022-02-07 13:06:16 UTC
Description of problem:

So, I'm trying to switch the skopeo package to use %autochangelog but I notice weird build issues on koji with it. This issue doesn't occur when I do a local `rpmbuild -ba` , but I notice it on koji and mock builds.




Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/skopeo.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False
error: /builddir/build/SPECS/skopeo.spec: line 270: Macro % has illegal name (%define)
  1<    (%define)
error: /builddir/build/SPECS/skopeo.spec: line 270: Macro %instead failed to expand
  0<  (%global)
- use 
Building target platforms: noarch
Building for target noarch
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.10/site-packages/mockbuild/util.py", line 600, in do_with_status
    raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
mockbuild.exception.Error: Command failed: 
 # bash --login -c /usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/skopeo.spec




Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=82501046 

Spec file: https://src.fedoraproject.org/rpms/skopeo/blob/rawhide/f/skopeo.spec



If I revert to using manual changelogs, I'm able to build it fine on koji.

Also, I don't notice this issue on other packages like podman and buildah which I've successfully switched to use autospec.

Comment 1 Lokesh Mandvekar 2022-02-07 13:50:48 UTC
I have reverted to using manual changelogs for now to get a successful koji build. But in case you want the version with %autochangelog, it's at https://src.fedoraproject.org/rpms/skopeo/blob/a6bccb7be23565d15eb15bb25816eca8fba978dd/f/skopeo.spec .

Thanks!

Comment 2 Ben Cotton 2022-02-08 20:09:05 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 3 Lokesh Mandvekar 2022-02-17 20:00:19 UTC
Hi Adam, just checking if you got the chance to review this issue. I'm now seeing the same issue when I try to make the change on the podman package.

Comment 4 Lokesh Mandvekar 2022-02-17 21:29:34 UTC
Ok, I think I know the cause now. If the dist-git commit messages ever mentioned an unescaped macro, autospec would populate the changelog from git causing the build to blow up. Could this case be handled in autospec please?

Comment 5 Fedora Update System 2022-02-17 21:58:08 UTC
FEDORA-2022-4fa6cc5a21 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-4fa6cc5a21

Comment 6 Fedora Update System 2022-02-17 22:12:14 UTC
FEDORA-2022-2a64302e0b has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-2a64302e0b

Comment 7 Fedora Update System 2022-02-21 18:12:08 UTC
FEDORA-2022-edaffae104 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-edaffae104

Comment 8 Fedora Update System 2022-02-21 18:36:39 UTC
FEDORA-2022-3b3ffd7f8c has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-3b3ffd7f8c

Comment 9 Lokesh Mandvekar 2022-02-22 15:45:33 UTC
ignore the podman bodhi updates listed here. They're only happening because the bz id is listed as a related bz. I'll remove the bz id in the next update.

Comment 10 Fedora Update System 2022-02-25 17:03:49 UTC
FEDORA-2022-cabb50e103 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-cabb50e103

Comment 11 Fedora Update System 2022-02-25 19:03:08 UTC
FEDORA-2022-b212ac738a has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b212ac738a

Comment 12 Fedora Update System 2022-03-03 15:02:08 UTC
FEDORA-2022-77b35723e3 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-77b35723e3

Comment 13 Fedora Update System 2022-03-03 18:46:18 UTC
FEDORA-2022-77b35723e3 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Nils Philippsen 2022-03-04 12:06:13 UTC
(In reply to Lokesh Mandvekar from comment #4)
> Ok, I think I know the cause now. If the dist-git commit messages ever
> mentioned an unescaped macro, autospec would populate the changelog from git
> causing the build to blow up. Could this case be handled in autospec please?

Having just skimmed over this issue I assume you're right. As a workaround, you could copy the existing changelog block to a changelog file as described here: https://docs.pagure.org/Fedora-Infra.rpmautospec/opting-in.html#for-existing-packages

I have changes queued up which would fix this (among other things plus enhancements) and I'm planning to roll them out shortly.

Comment 15 Fedora Update System 2022-04-25 16:46:30 UTC
FEDORA-2022-1e8145fb45 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-1e8145fb45

Comment 16 Fedora Update System 2022-04-25 16:46:32 UTC
FEDORA-2022-e050aa1e6d has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2022-e050aa1e6d

Comment 17 Fedora Update System 2022-04-25 16:46:35 UTC
FEDORA-2022-0c44eb0df4 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-0c44eb0df4

Comment 18 Fedora Update System 2022-04-26 06:26:17 UTC
FEDORA-2022-1e8145fb45 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-1e8145fb45`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-1e8145fb45

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

Comment 19 Fedora Update System 2022-04-26 08:04:04 UTC
FEDORA-2022-0c44eb0df4 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-0c44eb0df4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-0c44eb0df4

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

Comment 20 Fedora Update System 2022-04-26 08:08:40 UTC
FEDORA-2022-e050aa1e6d has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-e050aa1e6d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-e050aa1e6d

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

Comment 21 Lokesh Mandvekar 2022-04-26 12:19:02 UTC
Hello, thanks for the bodhi updates. Doesn't look the issue is fixed yet though.

The podman package is suffering from the same issue and I tried enabling %autochangelog just now on it. The rawhide build failed: https://koji.fedoraproject.org/koji/taskinfo?taskID=86250187 . root.log does show 0.2.6-1.

Thanks!

Comment 22 Fedora Update System 2022-05-03 14:58:17 UTC
FEDORA-2022-e050aa1e6d has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 23 Fedora Update System 2022-05-07 04:31:31 UTC
FEDORA-2022-1e8145fb45 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 24 Lokesh Mandvekar 2022-05-09 14:50:49 UTC
Reopening as the issue still occurs. See the build at https://koji.fedoraproject.org/koji/taskinfo?taskID=86838555

Thanks

Comment 25 Fedora Update System 2022-05-11 01:23:21 UTC
FEDORA-2022-0c44eb0df4 has been pushed to the Fedora 35 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.