Bug 1154596 - spectool not downloading source
Summary: spectool not downloading source
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmspectool
Version: 22
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: 2014-10-20 09:22 UTC by Parag Nemade
Modified: 2023-04-23 03:43 UTC (History)
6 users (show)

Fixed In Version: rpmspectool-1.99.4-1.fc23 rpmspectool-1.99.4-1.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-28 22:59:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Work around spectool breakage (1.03 KB, patch)
2014-10-20 09:38 UTC, Ville Skyttä
no flags Details | Diff

Description Parag Nemade 2014-10-20 09:22:39 UTC
Description of problem:
I don't understand what is wrong with this http://pkgs.fedoraproject.org/cgit/python-cpuinfo.git/plain/python-cpuinfo.spec file as following command not working for me on fedora 21
spectool -g python-cpuinfo.spec

Version-Release number of selected component (if applicable):
rpmdevtools-8.4-3.fc21.noarch

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:
unable to download source archive file

Expected results:
should download source archive files

Additional info:

Comment 1 Ville Skyttä 2014-10-20 09:38:49 UTC
Created attachment 948484 [details]
Work around spectool breakage

The way the python3-%{module_name} %package section is written along with its placement trips spectool.

If you want to work around it in python-cpuinfo.spec, the attached patch should work.

Comment 2 Parag Nemade 2014-10-20 10:56:29 UTC
Thank you. It worked. I will use the correct placement of python3 subpackage in python specfiles.

You can close this bug.

Comment 3 Ville Skyttä 2014-10-20 11:32:46 UTC
I'd rather keep it open because it is a genuine spectool bug, there was nothing incorrect about your original specfile.

Comment 4 Jaroslav Reznik 2015-03-03 17:04:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 5 Nils Philippsen 2015-11-25 12:45:35 UTC
With the spectool rewrite (see bug #1279723), I'd like to take this up again. Changing component to rpmspectool accordingly.

The issue that triggers the bug is probably that spectool stops reading the "preamble" when it encounters %package (on line 18, left side in attachment #948484 [details]) which leaves the %if from line 17 "open" in the intermediate "processed" spec file which spectool uses to expand source and patch URLs, causing a syntax error. I think a good remedy is to add code that unwinds any open %if blocks when it encounters any of the non-preamble sections (%package, %description, ...).

Comment 6 Nils Philippsen 2015-11-25 13:00:54 UTC
https://github.com/nphilipp/rpmspectool/issues/1

Comment 7 Fedora Update System 2015-12-10 17:38:59 UTC
rpmspectool-1.99.4-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-d7595935f4

Comment 8 Fedora Update System 2015-12-11 05:59:41 UTC
rpmspectool-1.99.4-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update rpmspectool'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-05191ca973

Comment 9 Fedora Update System 2015-12-11 19:56:56 UTC
rpmspectool-1.99.4-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update rpmspectool'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-d7595935f4

Comment 10 Fedora Update System 2015-12-28 22:59:25 UTC
rpmspectool-1.99.4-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2016-01-03 21:19:54 UTC
rpmspectool-1.99.4-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Sergio Basto 2023-04-23 03:43:07 UTC

spectool -g moby-engine.spec --define "_sourcedir ."

this make work for me instead 

spectool -g moby-engine.spec
error: Unable to open /home/sergio/rpmbuild/SOURCES/provides.spec.inc: No such file or directory
RPM Failed to parse spec file.


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