ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] ncurses patching fails


From: Mark
Subject: Re: [Ltib] ncurses patching fails
Date: Tue, 17 Aug 2010 10:53:18 +0100
User-agent: KMail/1.13.5 (Linux/2.6.34-12-desktop; KDE/4.4.4; x86_64; ; )

Hello Stuart

I think that adding a known version of patch to the host packages makes a lot 
of sense. Also, as you point out, adding patch to the default host install 
could save a lot of problems in the future.

Thanks for your help.

Mark

On Saturday 07 Aug 2010 10:57:50 Stuart Hughes wrote:
> Hi Mark,
> 
> I've looked into this and found that Suse are using a very recent alpha
> version of patch.  Even the 2.6.1 tarball release does not include this.
>  If you look at this link, you can see some background, it will cause
> fall-out not just on LTIB:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=274079
> 
> My take is that if your file (directory) permissions allow it, then it
> should work.  Furthermore, backward compatibility overrides correctness
> IMHO in most cases (security being an exception).
> 
> Anyhow, to fix your installation for now:
> 
> * Revert any changes you have made
> * Install a known version of patch for LTIB use
> $ ./ltib --hostcf -p patch
> 
> This will compile and install a copy of patch in /opt/ltib/usr/bin,
> which ltib will use in preference to the host copy.  From then on the
> old behaviour will be restored.
> 
> I'm thinking about adding this package to the default host install
> package list for LTIB.
> 
> Pros:  avoids this on Suse and who knows what in the future
> Cons:  another 30s or so added to the first time install
> 
> Does anyone have any objections?
> 
> Regards, Stuart
> 
> Mark wrote:
> > Hello Stuart
> > 
> > The version of patch on my machine is "GNU patch 2.6.1.81-5b68" (I'm
> > using openSUSE 11.3).
> > 
> > Your patch to the spec file works, however more files need to be added as
> > aclocal.m4 is not the only read-only file that needs to be patched. For
> > ncurses I would need to add the following lines:
> > 
> > chmod +w aclocal.m4
> > chmod +w configure
> > chmod +w c++/cursesw.cc
> > chmod +w include/curses.h.in
> > 
> > This problem is not limited to ncurses, so far I have run into the same
> > issue with tcp_wrappers, portmap and timezone(tzcode,tzdata). I've run
> > 'chmod -R +w *' on the tarballs, perhaps it would be better to include
> > this in the spec files?
> > 
> > Regards
> > 
> > Mark
> > 
> > On Wednesday 04 Aug 2010 18:58:44 Stuart Hughes wrote:
> >> Hi Mark,
> >> 
> >> Nothing has changed with that package in ages.  I suspect the problem is
> >> to do with your host distribution and its version of patch.  I just
> >> tried on a Dreamlinux 3.5 (Debian Lenny vintage) and I see:
> >> 
> >> + STATUS=0
> >> + '[' 0 -ne 0 ']'
> >> + cd ncurses-5.3
> >> + echo 'Patch #0 (ncurses-5.3-etip-2.patch):'
> >> Patch #0 (ncurses-5.3-etip-2.patch):
> >> + patch -p1 -s
> >> + echo 'Patch #1 (ncurses-5.3-vsscanf.patch):'
> >> Patch #1 (ncurses-5.3-vsscanf.patch):
> >> + patch -p1 -s
> >> + echo 'Patch #2 (ncurses-5.3-wint_t.patch):'
> >> Patch #2 (ncurses-5.3-wint_t.patch):
> >> + patch -p1 -s
> >> + exit 0
> >> Executing(%build): /bin/sh -e
> >> /data/seh/Src/ltib_bsps/savannah_ltib/tmp/rpm-tmp.52436
> >> + umask 022
> >> 
> >> Looking at aclocal.m4 I see:
> >> -r--r--r-- 1 seh seh 82995 2010-08-04 18:50 aclocal.m4
> >> 
> >> and checking the file I can see it got patched.
> >> 
> >> Can you check your version of patch to confirm this, mine is:
> >> 
> >> $ patch --version
> >> patch --versionpatch 2.5.9
> >> [snip]
> >> 
> >> I think the new one is being too helpful.  I think the best think
> >> overall is to change the spec file and make the offending file
> >> writeable.
> >> 
> >> Could you try this on your machine (rm -rf rpm/BUILD/ncurses* first):
> >> 
> >> edit: dist/lfs-5.1/ncurses/ncurses.spec
> >> 
> >> and apply this patch:
> >> 
> >> 
> >> Index: dist/lfs-5.1/ncurses/ncurses.spec
> >> ===================================================================
> >> RCS file: /sources/ltib/ltib/dist/lfs-5.1/ncurses/ncurses.spec,v
> >> retrieving revision 1.2
> >> diff -u -r1.2 ncurses.spec
> >> --- dist/lfs-5.1/ncurses/ncurses.spec      10 Jul 2009 09:21:05 -0000      
> >> 1.2
> >> +++ dist/lfs-5.1/ncurses/ncurses.spec      4 Aug 2010 17:58:02 -0000
> >> @@ -20,6 +20,8 @@
> >> 
> >>  %Prep
> >>  %setup
> >> 
> >> +# make aclocal.m4 writable for later versions of patch
> >> +chmod +w aclocal.m4
> >> 
> >>  %patch0 -p1
> >>  %patch1 -p1
> >>  %patch2 -p1
> >> 
> >> Then run:
> >> 
> >> $ ./ltib -p ncurses
> >> 
> >> If that fixes it, I'll check in the update.
> >> 
> >> Regards, Stuart
> >> 
> >> Mark wrote:
> >>> Hello
> >>> 
> >>> I've just updated my copy of LTIB via CVS and can no longer get ncurses
> >>> to build because the source cannot be patched:
> >>> 
> >>> 
> >>> + cd ncurses-5.3
> >>> + echo 'Patch #0 (ncurses-5.3-etip-2.patch):'
> >>> Patch #0 (ncurses-5.3-etip-2.patch):
> >>> + patch -p1 -s
> >>> File aclocal.m4 is read-only; refusing to patch
> >>> 1 out of 1 hunk ignored -- saving rejects to file aclocal.m4.rej
> >>> File configure is read-only; refusing to patch
> >>> 1 out of 1 hunk ignored -- saving rejects to file configure.rej
> >>> error: Bad exit status from /home/mark/ltib/tmp/rpm-tmp.13551 (%prep)
> >>> 
> >>> 
> >>> The problem appears to be that the permissions for the relevant source
> >>> files are set to read-only and so the patches cannot be applied. I
> >>> haven't had (or haven't noticed) any problems building ncurses in the
> >>> past, and I can't see that any of the sources have changed recently.
> >>> 
> >>> Anybody else had this problem?
> >>> 
> >>> Thanks
> >>> 
> >>> Mark
> >>> 
> >>> _______________________________________________
> >>> LTIB home page: http://ltib.org
> >>> 
> >>> Ltib mailing list
> >>> address@hidden
> >>> http://lists.nongnu.org/mailman/listinfo/ltib



reply via email to

[Prev in Thread] Current Thread [Next in Thread]