Fedora Linux Support Community & Resources Center
  #1  
Old 25th December 2010, 03:20 PM
marvin_ita Offline
Registered User
 
Join Date: Jun 2007
Location: Como - Italy
Posts: 248
linuxfirefox
Trying to repackage JOSM, stuck on error with patches

Hi,
I'm trying to make an updated rpm for JOSM, starting from the source RPM I found on koji.
However, when I issue the 'rpmbuild -bp' command I get
Code:
$ rpmbuild -bp josm.spec 
Esecuzione(%prep) in corso: /bin/sh -e /var/tmp/rpm-tmp.lUfdAp
+ umask 022
+ cd /home/marvin/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/marvin/rpmbuild/BUILD
+ rm -rf josm-0
+ /usr/bin/gzip -dc /home/marvin/rpmbuild/SOURCES/josm-0.3740svn.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd josm-0
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo 'Patch #0 (josm-0-disable_oauth.patch):'
Patch #0 (josm-0-disable_oauth.patch):
+ /bin/cat /home/marvin/rpmbuild/SOURCES/josm-0-disable_oauth.patch
+ /usr/bin/patch -s -p1 --fuzz=0
3 out of 3 hunks FAILED -- saving rejects to file build.xml.rej
errore: Stato d'uscita errato da /var/tmp/rpm-tmp.lUfdAp (%prep)


Errori di compilazione RPM:
    Stato d'uscita errato da /var/tmp/rpm-tmp.lUfdAp (%prep)
In another file I found the problem, changed the patch and I made it work, but with the build.xml I cannot see the reason it won't work, since the patch seems perfectly to me...
Reply With Quote
  #2  
Old 25th December 2010, 08:19 PM
vallimar Offline
Registered User
 
Join Date: Jul 2008
Posts: 823
windows_xp_2003chrome
Re: Trying to repackage JOSM, stuck on error with patches

It worked fine for me after fixing the MainApplication.java issue.
I did notice that the build.xml portion of the patch is in cr/lf dos-style format.
You didn't change that did you? That could mess up being able to apply it.
Depending on the editor used, it could have reformatted it without you knowing.
Reply With Quote
  #3  
Old 26th December 2010, 10:28 AM
marvin_ita Offline
Registered User
 
Join Date: Jun 2007
Location: Como - Italy
Posts: 248
linuxfirefox
Re: Trying to repackage JOSM, stuck on error with patches

That was the problem, thanks!
I used Kwrite to edit the patch and I didn't notice it was DOS formatted in the first lines.... editing from terminal did the trick!

Strange is that if I removed that patch from the .spec file there was another patch (that I didn't edit) failing on build.xml...

---------- Post added at 11:28 AM ---------- Previous post was at 11:05 AM ----------

Another question... I think I must change the REVISION.XML file in the source directory to match the actual revision or the program always complains it must be upgraded.
Is there a place where I can find that file in the git or svn repository or I must edit it by hand? How have you resolved this issue?

Thank you
Reply With Quote
  #4  
Old 26th December 2010, 03:38 PM
vallimar Offline
Registered User
 
Join Date: Jul 2008
Posts: 823
linuxchrome
Re: Trying to repackage JOSM, stuck on error with patches

Quote:
Strange is that if I removed that patch from the .spec file there was another patch (that I didn't edit) failing on build.xml...
It's not unusual to have later patches be dependant on earlier ones, especially as new patches are added on for newer releases and the older patch still works. Occasionally they will sometimes combine the patches, but not always.

Quote:
Another question... I think I must change the REVISION.XML file in the source directory to match the actual revision or the program always complains it must be upgraded.
Is there a place where I can find that file in the git or svn repository or I must edit it by hand? How have you resolved this issue?

Thank you
I don't actually use the program, I just grabbed it to test your case.
Not sure how it checks that. If you can't seem to locate it, let me know and I'll grab it again to see what I can find.
Reply With Quote
  #5  
Old 26th December 2010, 03:53 PM
marvin_ita Offline
Registered User
 
Join Date: Jun 2007
Location: Como - Italy
Posts: 248
linuxfirefox
Re: Trying to repackage JOSM, stuck on error with patches

Thank you Vallimar, I think I did it (I manually grabbed the info from svn and created the revision.xml file).
Reply With Quote
  #6  
Old 27th December 2010, 01:02 AM
vallimar Offline
Registered User
 
Join Date: Jul 2008
Posts: 823
linuxchrome
Re: Trying to repackage JOSM, stuck on error with patches

Great job! I find it rewarding and liberating to not be stuck with only what the distribution(s) offer.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i repackage already installed packages creeping death Using Fedora 17 30th April 2009 07:17 AM
How to repackage a rpm file? pepe123 Using Fedora 6 14th September 2008 09:30 PM
Instillation of Fedore Core 4 = OK, Installing the patches = Error?? leighmgardner Installation and Live Media 3 31st October 2005 04:24 PM


Current GMT-time: 02:38 (Thursday, 20-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat