Bug 657478

Summary: Invalid declare statement in macros.mingw32 with some packages
Product: [Fedora] Fedora Reporter: Anders Wäänänen <waananen>
Component: mingw32-filesystemAssignee: Kalev Lember <kalevlember>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: drizt72, erik-fedora, fedora-mingw, kalevlember, rjones
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: mingw32-filesystem-65-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-22 03:44:38 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:
Attachments:
Description Flags
Remove dots in generated shell variable names none

Description Anders Wäänänen 2010-11-26 08:52:20 UTC
Description of problem:

I'm using a custom build of mingw32-python in order to build Python bindings
for a software package. For this packages the code in macros.mingw32 breaks:

...
  for i in `ls %{_mingw32_bindir}/*|grep -- "-config\$"` ; do \
    x=`basename $i|tr "a-z+-" "A-ZX_"`; \
    declare -x $x="$i" ; export $x; \
  done; \
...

The variable name $x contains a ('.') when it finds the python2.x-config script
in %{_mingw32_bindir}. One could imagine that this problem could be triggered
on other *-config scripts.

The fix is easy: filter away dots ('.') from the filename when generating the
variable name (eg. |cut -d '.').

Version-Release number of selected component (if applicable):

I found this in Fedora 12, but it seems applicable to Fedora 14.

How reproducible:

Build a package which requires mingw32-python. The mingw32-python does
not yet exist in Fedora (unfortunately).

Steps to Reproduce:
1.
2.
3.
  
Actual results:

Package build fails

Expected results:

Package should build

Additional info:

Cheers

Anders

Comment 1 Ivan Romanov 2010-11-26 09:12:59 UTC
hello Anders.

May I see your mingw32-python package?

Comment 2 Anders Wäänänen 2010-11-26 09:18:55 UTC
Yes, this was based on an OpenSuSE package:

http://download.nordugrid.org/software/mingw32-python/testing/2.6.2-14.4.1ng/fedora/12/

Comment 3 Richard W.M. Jones 2010-11-26 09:43:34 UTC
Agreed this is a bug, and your suggestion looks good.
Want to post a patch to the mingw32-filesystem package?

Comment 4 Anders Wäänänen 2010-11-26 10:25:14 UTC
Created attachment 463052 [details]
Remove dots in generated shell variable names

Here is a simple patch which should solve the bug.

Cheers

Anders

Comment 5 Richard W.M. Jones 2010-11-26 10:47:41 UTC
(In reply to comment #4)
> Created attachment 463052 [details]
> Remove dots in generated shell variable names
> 
> Here is a simple patch which should solve the bug.
> 
> Cheers
> 
> Anders

Looks fine to me.  You also need to increase the
version number (*not* the release, which should go
back to 1).

If you want to apply for commit access via
https://admin.fedoraproject.org/pkgdb/acls/name/mingw32-filesystem
then you can update the package yourself.

Comment 6 Anders Wäänänen 2010-11-26 13:07:02 UTC
(In reply to comment #5)
 
> If you want to apply for commit access via
> https://admin.fedoraproject.org/pkgdb/acls/name/mingw32-filesystem
> then you can update the package yourself.

I'm not sure how to apply from that page since I'm not a packager (yet).

Anders

Comment 7 Erik van Pienbroek 2010-11-26 13:19:31 UTC
Do you already have a package submitted to Fedora which can be reviewed? Or don't you wish to become a package maintainer?

Comment 8 Anders Wäänänen 2010-11-26 13:23:45 UTC
No, I don't have a package ready yet, but I do plan to submit one at some point.

Anders

Comment 9 Erik van Pienbroek 2010-11-26 13:36:09 UTC
Are you okay with me applying the change for now?

Comment 10 Anders Wäänänen 2010-11-26 13:39:51 UTC
(In reply to comment #9)
> Are you okay with me applying the change for now?

Yes, by all means please do!

Cheers

Anders

Comment 11 Kalev Lember 2011-03-17 15:56:30 UTC
The issue came up again with mingw32-binutils 2.21 that includes a new binary with dot in its name: ld.bfd. I've fixed it with a similar patch in both F15 and rawhide.

Sorry for not using your patch Anders, I wasn't aware of this ticket.

http://pkgs.fedoraproject.org/gitweb/?p=mingw32-filesystem.git;a=commitdiff;h=5b66efd7edd41be17b8bd7eb7d4a8a6d472e2089

Comment 12 Fedora Update System 2011-03-17 15:57:44 UTC
mingw32-filesystem-65-1.fc15, mingw32-binutils-2.21-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mingw32-filesystem-65-1.fc15,mingw32-binutils-2.21-1.fc15

Comment 13 Fedora Update System 2011-03-22 03:44:32 UTC
mingw32-filesystem-65-1.fc15, mingw32-binutils-2.21-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Anders Wäänänen 2012-06-06 14:49:06 UTC
(In reply to comment #13)
> mingw32-filesystem-65-1.fc15, mingw32-binutils-2.21-1.fc15 has been pushed
> to the Fedora 15 stable repository.  If problems still persist, please make
> note of it in this bug report.

I've noted that the patch in comment #11 does not cover both issues fixed in
attachment mentioned in comment #4 thus this is still an issue (also in Fedora 17).

Currently it borks on files in bin which ends in -config which is a problem with eg. python2.7-config. Sorry that I did not notice that the fix in comment #11 was not sufficient.

Can we reopen this issue?

Comment 15 Erik van Pienbroek 2012-06-06 17:39:11 UTC
Is the package which triggers this behaviour still available? The link mentioned in comment #2 isn't available any more. And what is the exact output/error message you're seeing?

Comment 16 Erik van Pienbroek 2012-06-06 17:53:14 UTC
I just prepped an updated package for Fedora 17: http://koji.fedoraproject.org/koji/taskinfo?taskID=4133139
Could you test if this resolve this issue?
(Note: don't use this package on fedora 15/16 as it isn't compatible)

Comment 17 Anders Wäänänen 2012-06-06 19:00:07 UTC
(In reply to comment #16)
> I just prepped an updated package for Fedora 17:
> http://koji.fedoraproject.org/koji/taskinfo?taskID=4133139
> Could you test if this resolve this issue?
> (Note: don't use this package on fedora 15/16 as it isn't compatible)

Yes this update solves the problem in my mock Fedora 17 environment.

Comment 18 Fedora Update System 2012-06-15 11:20:51 UTC
mingw-filesystem-95-11.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/FEDORA-2012-9379/mingw-filesystem-95-11.fc17

Comment 19 Fedora Update System 2012-06-20 19:31:15 UTC
mingw-filesystem-95-11.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.