Bug 669052

Summary: Invalid Source URL in the spec file
Product: [Fedora] Fedora Reporter: Roman Rakus <rrakus>
Component: mingw32-glib2Assignee: Richard W.M. Jones <rjones>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: eblake, erik-fedora, fedora-mingw, fedora, kalevlember, lfarkas, rjones, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-12 16:57:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roman Rakus 2011-01-12 15:27:45 UTC
There is
Source0:        http://download.gnome.org/sources/glib/2.26/glib-%{version}.tar.bz2

And should be 2.27, because version is 2.27.4.

I can imagine some macros for this versioning. The same mistake is in f13.

Comment 1 Thomas Sailer 2011-01-12 16:57:33 UTC
Indeed. Thanks. Fixed in repo, but will not rebuild just for this change.

Comment 2 Eric Blake 2011-01-12 17:32:06 UTC
You pushed this fix:

-Source0:        http://download.gnome.org/sources/glib/2.26/glib-%{version}.tar.bz2
+Source0:        http://download.gnome.org/sources/glib/2.27/glib-%{version}.tar.bz2

But you should have pushed this fix:

+Source0:        http://download.gnome.org/sources/glib/%{version}/glib-%{version}.tar.bz2

so that it doesn't keep biting you on every %{version} bump.

Comment 3 Erik van Pienbroek 2011-01-12 17:42:03 UTC
No that's incorrect, %{version} expands to something like '2.27.4' while the folder on the download mirror is named '2.27'

Comment 4 Roman Rakus 2011-01-12 20:08:02 UTC
What about something like;
%define baseversion 2.27
%define minversion .4

Version: %{baseversion}%{minversion}
Source0:       
http://download.gnome.org/sources/glib/%{baseversion}/glib-%{version}.tar.bz2

Maybe some better words :)

Comment 5 Kalev Lember 2011-01-12 20:49:16 UTC
... or something like this, taken from gtkmm30.spec:
# first two digits of version
%define release_version %(echo %{version} | awk -F. '{print $1"."$2}')

Source0:        http://download.gnome.org/sources/glib/%{release_version}/glib-%{version}.tar.bz2