Create patch under Windows - windows

I want to create a patch for a header in order to fix my appveyor build. I used WinMerge to create the following file:
--- C:/Qt/5.3/mingw482_32/include/QtGui/qopengl.h Thu Jun 19 11:08:06 2014
+++ C:/Qt/5.3/mingw482_32/include/QtGui/qopengl2.h Sat Nov 08 11:20:32 2014
## -49,6 +49,7 ##
// Windows always needs this to ensure that APIENTRY gets defined
#if defined(Q_OS_WIN)
# include <QtCore/qt_windows.h>
+# undef MemoryBarrier
#endif
// Note: Mac OSX is a "controlled platform" for OpenGL ABI so we
When running the patch command I get the following result:
C:\Users\Martin\dev\TravisTest>patch -u patch_qopengl c:\Qt\5.3\mingw482_32\include\QtGui\qopengl.h
patch: **** Only garbage was found in the patch input.
What's wrong?

Related

How can I find POEdit errors

I'm getting duplicate message definition errors in POEdit and I cannot update from that catalog.
POEdit doesn't show details and the line numbers in the errors don't match.
How can I find what is wrong?
Sat Mar 11 16:51:31 2017: /var/folders/qt/cg8qlhc159v9s15kmhy1h4440000gn/T/poeditgGtdFw/1input.po:2791: duplicate message definition...
Sat Mar 11 16:51:31 2017: /var/folders/qt/cg8qlhc159v9s15kmhy1h4440000gn/T/poeditgGtdFw/1input.po:65: ...this is the location of the first definition
Sat Mar 11 16:51:31 2017: /var/folders/qt/cg8qlhc159v9s15kmhy1h4440000gn/T/poeditgGtdFw/1input.po:2827: duplicate message definition...
Sat Mar 11 16:51:31 2017: /var/folders/qt/cg8qlhc159v9s15kmhy1h4440000gn/T/poeditgGtdFw/1input.po:1530: ...this is the location of the first definition
Sat Mar 11 16:51:31 2017: /Users/burakkilic/Applications/Poedit.app/Contents/PlugIns/GettextTools.bundle/Contents/MacOS/bin/msgmerge: found 2 fatal errors
Sat Mar 11 16:51:31 2017: Entries in the catalogue are probably incorrect.
Sat Mar 11 16:51:31 2017: Updating the catalogue failed. Click on 'Details >>' for details.
How can I find what is wrong?
msgfmt -v -c /path/to/1input.po

Single Column rpm command output

I have an application where I want to get the RPM info of several packages and format it in a pleasing and eye-catching way. *boom*.
My problem is that rpm wants to format the data into two columns, which is annoying.
Command
rpm -qi ruby
Result
Name : ruby Relocations: (not relocatable)
Version : 1.8.6.36 Vendor: (none)
Release : 2 Build Date: Thu 18 Sep 2008 10:50:30 AM EDT
Install Date: Thu 25 Sep 2008 12:12:53 PM EDT Build Host: kickbench
Group : Development/Languages Source RPM: ruby-1.8.6.36-2.src.rpm
Size : 1664035 License: Ruby License/GPL - see COPYING
Signature : (none)
URL : http://www.ruby-lang.org/
Summary : An interpreter of object-oriented scripting language.
Description : [truncated]
What I want
Name : ruby
Relocations : (not relocatable)
Version : 1.8.6.36
Vendor : (none)
Release : 2
Build Date : Thu 18 Sep 2008 10:50:30 AM EDT
Install Date: Thu 25 Sep 2008 12:12:53 PM EDT
Build Host : kickbench
Group : Development/Languages
Source RPM : ruby-1.8.6.36-2.src.rpm
Size : 1664035
License : Ruby License/GPL - see COPYING
Signature : (none)
URL : http://www.ruby-lang.org/
Summary : An interpreter of object-oriented scripting language.
Description : [truncated]
Is there any way to get this formatting without manually specifying a reaally long --queryformat?
Alternatively, any way to do this native to Ruby would be fine.
pairs = %x{rpm -qi ruby}
.split(/(?<!:)\s{2,}(?![\s:])|#$//)
.map{|line| line.split(/\s*:\s+/, 2)}
width = pairs.map{|pair| pair.first.length}.max
pairs.each{|k, v| puts "#{k.ljust(width)}: #{v}"}

automated build inno setup error

This question is regarding getting version directly from assembly. I have followed instructions from this post
My script looks as follow.
#define MyAppName "Keyboard Trader"
#define SrcApp "Keyboard Trader.exe"
#define FileVerStr GetFileVersion(SrcApp)
#define StripBuild(str VerStr) Copy(VerStr, 1, RPos(".", VerStr)-1)
#define AppVerStr StripBuild(FileVerStr)
But while compiling script it throws following Error
Compile started: Tuesday, Oct 11 2011 at 01:15 AM
---
Compiling script with Inno Setup 5.4.2 (a)
---
[ISPP] Preprocessing.
---------------------
Compile Error!
Line: 12
**Error: [ISPP] Actual parameter VerStr is not of the declared type.**
What I am missing here?
GetFileVersion() is returning a blank string as it can't find the the SrcApp path.
Try specifying a fully qualified path or using:
#define SrcApp AddBackslash(SourcePath) + "Keyboard Trader.exe"

Perl script are not running on Apache 2.2.15 with mod_fcgid / Win32

I have installed apache 2.2.15 with mod_fcgid on Windows XP SP3 and Activestate Perl (tried both 5.12 & 5.8.9)
tried the perl example script in the mod_fcgid reference page but it
is not working
I get this in error log
[Tue Dec 07 23:10:35 2010] [info] mod_fcgid: server 127.0.0.1:/usr/bin/perl.exe(5476) started
[Tue Dec 07 23:10:35 2010] [warn] [client 127.0.0.1] (OS 109)The pipe has been ended. : mod_fcgid : get overlap result error
[Tue Dec 07 23:10:35 2010] [error] [client 127.0.0.1] Premature end of script headers: f.pl
[Tue Dec 07 23:10:35 2010] [error] [client 127.0.0.1] File does not exist: C:/Apache2/htdocs/favicon.ico
[Tue Dec 07 23:10:39 2010] [info] mod_fcgid - infoneto: process /usr/bin/perl.exe(5476) exit(communication error), return code 9
I double check everything including:
The #!/usr/bin/perl.exe line
The mod_fcgid is loaded
When running the script as plain cgi it works
When I turned to the older mod_fastcgi it works just fine as a fastcgi (i.e. loads once runs many times).
Using process monitor I can see that apache starts Perl but it Perl exits almost instantly without even loading the Perl script
I tried it also on Apache 2.0.52 & 2.0.63 with older mod_fcgid and with Apache 2.2.15 with the newest mod_fcgid (2.3.6) but no luck
What can be done ?
I googled around but no one seems to have solution or managed using mod_fcgid with perl on Win32
I opened a bug on both FCGI at cpan and on apache tracker but no one seems to care...
Is there a solution for this ?
Does someone else need this ? (mod_fcgid with Perl on Apache/Win32)
You're on Win32, and you have a /usr/bin/perl.exe? Are you sure?
Regardless, I think you're looking for mod_fastcgi rather than mod_fcgid; at least, a quick google search seemed that it fixed the problem for most. Apparently mod_fcgid is not working as well under Windows.

How do I use the sed command to remove all lines between 2 phrases (including the phrases themselves)

I am generating a log from which I want to remove X startup output which looks like this:
X.Org X Server 1.7.6
Release Date: 2010-03-17
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.31-607-imx51 armv7l Ubuntu
Current Operating System: Linux nvidia 2.6.33.2 #1 SMP PREEMPT Mon May
31 21:38:29 PDT 2010 armv7l
Kernel command line: mem=448M#0M nvmem=64M#448M mem=512M#512M
chipuid=097c81c6425f70d7 vmalloc=320M video=tegrafb
console=ttyS0,57600n8 usbcore.old_scheme_first=1 tegraboot=nand
root=/dev/nfs ip=:::::usb0:on rw tegra_ehci_probe_delay=5000 smp dvfs
tegrapart=recovery:1b80:a00:800,boot:2680:1000:800,environment:3780:40:800,system:38c0:2bc00:800,cache:2f5c0:4000:800,userdata:336c0:c840:800
envsector=3080
Build Date: 23 April 2010 05:19:26PM
xorg-server 2:1.7.6-2ubuntu7 (Bryce Harrington <bryce#ubuntu.com>)
Current version of pixman: 0.16.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Wed Jun 16 19:52:00 2010
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using config directory: "/usr/lib/X11/xorg.conf.d"
Is there any way to do this without manually checking pattern for each line?
Possibly:
sed '1,/^(==) Using config directory: "/d'
Or, possibly:
sed '/^X.Org X Server /,/^(==) Using config directory: "/d'

Resources