--- libedit-2.11-20080614.orig/debian/rules +++ libedit-2.11-20080614/debian/rules @@ -0,0 +1,104 @@ +#! /usr/bin/make -f +## debian/rules for libedit, mostly a pmake workaround.. +## hacked together by Gergely Nagy +## $MadHouse: Debian/libedit/debian/rules,v 1.3 2001/11/04 01:57:26 algernon Exp $ + +# This is the debhelper compatability version to use. + +PACKAGE = libedit +PKGDIR = ${CURDIR}/debian/tmp +PMAKE_ARGS = MKPROFILE=no MKCATPAGES=no MLINKS= MANPAGES= \ + SHLIB_SHFLAGS="-Wl,-soname,libedit.so.${major}" \ + LDADD="-lbsd -lcurses" +EDITLINE_3_LINKS = el_init el_end el_reset el_gets el_getc el_push \ + el_parse el_set el_get el_source el_resize el_line \ + el_insertstr el_deletestr history_init history_end history + +version = 2.11 +major = 2 +## For automatic update from CVS +CVSROOT = :pserver:anoncvs@anoncvs.netbsd.org:/cvsroot +DATE = $(shell date +%Y%m%d) +ROOT = basesrc + +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) +CROSS=CC=$(DEB_HOST_GNU_TYPE)-gcc LD=$(DEB_HOST_GNU_TYPE)-ld +endif + +# Workaround for pmake fussiness +ifeq (mips-linux,$(DEB_HOST_GNU_TYPE)) +PMAKE_ARGS += MACHINE_ARCH=mipseb +endif + +include /usr/share/quilt/quilt.make + +build: patch build-stamp +build-stamp: + dh_testdir + chmod 755 libedit/makelist # workaround a bug in upstream source + cd libedit && $(CROSS) pmake ${PMAKE_ARGS} + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + dh_clean build-stamp + -cd libedit && pmake distclean + +install: build + dh_testdir + dh_testroot + dh_clean + install -d ${PKGDIR}/usr/lib/$(DEB_HOST_MULTIARCH) + install -d ${PKGDIR}/usr/include/readline + install -d ${PKGDIR}/usr/include/libedit + install -d ${PKGDIR}/usr/share/man/man3 + install -d ${PKGDIR}/usr/share/man/man5 + install -d ${PKGDIR}/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig + install -m 644 $(CURDIR)/debian/libedit-vis.h ${PKGDIR}/usr/include/libedit/vis.h + install -m 644 $(CURDIR)/debian/libedit.pc ${PKGDIR}/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig + cd libedit && \ + pmake install incinstall DESTDIR=${PKGDIR} ${PMAKE_ARGS} +## pmake workaround + cd libedit/readline && \ + pmake incinstall DESTDIR=${PKGDIR} ${PMAKE_ARGS} + mv ${PKGDIR}/usr/include/readline ${PKGDIR}/usr/include/editline + ln -sf libedit.so.${version} ${PKGDIR}/usr/lib/$(DEB_HOST_MULTIARCH)/libedit.so.${major} + ln -sf libedit.so.${major} ${PKGDIR}/usr/lib/$(DEB_HOST_MULTIARCH)/libedit.so + +binary-indep: build install +binary-arch: build install + dh_testdir + dh_testroot +## Install manpages + install -m 0644 libedit/editline.3 ${PKGDIR}/usr/share/man/man3/editline.3el + install -m 0644 libedit/editrc.5 ${PKGDIR}/usr/share/man/man5/editrc.5el +## End + dh_movefiles + @list="${EDITLINE_3_LINKS}"; for l in $$list; do \ + echo "ln -sf editline.3el ${CURDIR}/debian/libedit-dev/usr/share/man/man3/$$l.3el"; \ + ln -sf editline.3el ${CURDIR}/debian/libedit-dev/usr/share/man/man3/$$l.3el; \ + done + dh_installdocs + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch + +cvs-update: + cvs -d ${CVSROOT} export -D now -d libedit-${DATE} ${ROOT}/lib/libedit + +.PHONY: build clean binary-indep binary-arch binary install cvs-update --- libedit-2.11-20080614.orig/debian/changelog +++ libedit-2.11-20080614/debian/changelog @@ -0,0 +1,281 @@ +libedit (2.11-20080614-2.2) unstable; urgency=low + + * Non-maintainer upload. + * Fix a regression in the previous NMU: the pkgconfig file has gone + missing, add it back in. + + -- Steve Langasek Wed, 17 Aug 2011 07:49:54 +0000 + +libedit (2.11-20080614-2.1) unstable; urgency=low + + * Non-maintainer upload. + * debian/patches/fix_gcc_warnings.diff: fix warnings about deprecated + headers. Closes: #634324. + * debian/rules: don't double-link .so files twice into the library. + Closes: #628679. + * debian/rules: cope with pmake switching us to multiarch automatically. + * debian/control: since the package is already multiarched for us by pmake, + mark it as such and bump build-dependencies on debhelper and pmake to + suit. + + -- Steve Langasek Wed, 17 Aug 2011 00:05:33 +0000 + +libedit (2.11-20080614-2) unstable; urgency=high + + * libedit2.shlibs: Fix minimal dependency version + Patch by Agustin Martin + Closes: 523260 + + -- Anibal Monsalve Salazar Tue, 21 Sep 2010 12:24:54 +1000 + +libedit (2.11-20080614-1) unstable; urgency=low + + * Fix typo in 03-el.c-MAXPATHLEN.diff + * Standards version is 3.8.2 + * Use libbsd + Patch by Guillem Jover + Closes: 513027 + + -- Anibal Monsalve Salazar Mon, 22 Jun 2009 11:55:49 +1000 + +libedit (2.11~20080614-2) unstable; urgency=low + + * Merge with Ubuntu + - debian/patches/20-fortify.patch: handle error conditions found + by -D_FORTIFY_SOURCE=2; closes: #488456 + * Suggests libbsd0; closes: #513027 + * Support crossbuilding; closes: #489846, #489847 + * Homepage is + http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-5-0/src/lib/libedit/ + * Standards version is 3.8.1 + * debhelper compatibility is 7 + + -- Anibal Monsalve Salazar Fri, 22 May 2009 10:29:58 +1000 + +libedit (2.11~20080614-1ubuntu1) intrepid; urgency=low + + * debian/patches/20-fortify.patch: handle error conditions found + by -D_FORTIFY_SOURCE=2. + + -- Kees Cook Sat, 28 Jun 2008 17:59:27 -0700 + +libedit (2.11~20080614-1) unstable; urgency=low + + * Update sources from CVS repo; closes: #478922 + * Depend on quilt and rename all patches + * Remove patch code from debian/rules; closes: #484401 + * Provide vis.h; closes: #357594 + * Update debian/coyright + * Let dh_makeshlibs create libedit2.postrm libedit2.postinst + * Priority of libedit2 is standard + * Standards version is 3.8.0 + * Patches: + Remove 09-export_completion_matches.diff + It won't compile with this patch: + rl_completion_matches defined twice + Add 10-define_SIZE_T_MAX.diff + Define SIZE_T_MAX as UINT_MAX in limits.h + Add 11-357594-vis.h.diff + Minor adaptation for Glibc by Robert Millan + Add 12-libedit-Makefile.diff + Without it I get the following message: + make: ${_MKTARGET_CREATE} expands to empty string + Add 13-symbol_not_found.diff by Anibal Monsalve Salazar + Without it I get the following messages: + symbol strlcpy/strlcat not found in none of the libraries + + -- Anibal Monsalve Salazar Sat, 14 Jun 2008 17:13:08 +1000 + +libedit (2.9.cvs.20050518-4) unstable; urgency=low + + * New pkgconfig file. Patch by Matthieu Gallien + Closes: #420813. + * Fix the following lintian issues: + W: libedit source: debian-rules-sets-DH_COMPAT line 7 + W: libedit source: package-uses-deprecated-debhelper-compat-version 2 + W: libedit source: substvar-source-version-is-deprecated libedit-dev + + -- Anibal Monsalve Salazar Tue, 07 Aug 2007 18:53:29 +1000 + +libedit (2.9.cvs.20050518-3) unstable; urgency=low + + * New maintainer. + * ACKed NMU. Closes: #318843. + * Standards-Version: 3.7.2. + * libedit2: added dependency on ${misc:Depends}. + + -- Anibal Monsalve Salazar Wed, 07 Feb 2007 10:20:20 +1100 + +libedit (2.9.cvs.20050518-2.2) unstable; urgency=low + + * NMU + * Unfortunately, rl_completion_matches have to be exported. + + -- Piotr Roszatycki Mon, 1 Aug 2005 19:05:13 +0200 + +libedit (2.9.cvs.20050518-2.1) unstable; urgency=low + + * NMU + * Export completion_matches function. Closes: #318843. + + -- Piotr Roszatycki Mon, 1 Aug 2005 16:59:48 +0200 + +libedit (2.9.cvs.20050518-2) unstable; urgency=low + + * Workaround for wrong permissions in source (closes: #309843) + + -- Pawel Wiecek Fri, 20 May 2005 12:15:12 +0200 + +libedit (2.9.cvs.20050518-1) unstable; urgency=low + + * Updated sources from CVS (closes: #286356) + + -- Pawel Wiecek Wed, 18 May 2005 23:36:58 +0200 + +libedit (2.9.cvs.20040827-1) unstable; urgency=low + + * Updated sources from CVS (closes: #254031, #263421) + + -- Pawel Wiecek Tue, 31 Aug 2004 00:06:38 +0200 + +libedit (2.6.cvs.20020109-7) unstable; urgency=low + + * Applied patch from Robert Millan to fix some issues on + GNU/k*BSD ports (closes: #227123) + + -- Pawel Wiecek Fri, 16 Jan 2004 16:45:42 +0100 + +libedit (2.6.cvs.20020109-6) unstable; urgency=low + + * Finally applied the right way to workaround mips building problems (thanks + to Colin Watson and Steve Langasek) (closes: #213100) + * Updated standards version (no changes needed) + + -- Pawel Wiecek Thu, 2 Oct 2003 21:32:09 +0200 + +libedit (2.6.cvs.20020109-5) unstable; urgency=low + + * Made patches from 2.6.cvs.20020109-4 really work (closes: #207448) + + -- Pawel Wiecek Wed, 27 Aug 2003 19:45:28 +0200 + +libedit (2.6.cvs.20020109-4) unstable; urgency=low + + * Applied patch from Ben Burton to fix the problem with + typing tab characters (closes: #169804, #169813, #196326) + * Updated standards version + * Updated package sections (moved libedit2-dev to libdevel) + * Fixed 05-readline-Makefile-mipseb.dpatch (closes: #188669) + + -- Pawel Wiecek Wed, 18 Jun 2003 13:13:54 +0200 + +libedit (2.6.cvs.20020109-3) unstable; urgency=low + + * Finally a maintainer release (closes: #166125) + * Updated the copyright file (closes: #188404) + * Updated standards version + + -- Pawel Wiecek Fri, 25 Apr 2003 15:38:01 +0200 + +libedit (2.6.cvs.20020109-2.1) unstable; urgency=low + + * NMU + * Patched fgetln() to behave correctly on error, thus fixing a + read_history() bug that caused infinite memory consumption + (closes: #166125) + + -- Ben Burton Fri, 31 Jan 2003 01:43:29 +1100 + +libedit (2.6.cvs.20020109-2) unstable; urgency=low + + * Added patch to correctly build on mips (closes: #135333) + + -- Pawel Wiecek Wed, 27 Feb 2002 14:42:46 +0100 + +libedit (2.6.cvs.20020109-1) unstable; urgency=low + + * Updated sources from CVS (closes: #122636) + + -- Pawel Wiecek Wed, 9 Jan 2002 10:58:25 +0100 + +libedit (2.6.cvs.20011104-2) unstable; urgency=low + + * New maintainer (closes: #120652) + + -- Pawel Wiecek Fri, 23 Nov 2001 13:49:44 +0100 + +libedit (2.6.cvs.20011104-1) unstable; urgency=low + + * New upstream version + * debian/patches/03-el.c-MAXPATHLEN.dpatch: ported to new snapshot + * debian/patches/02-el.c-issetugid.dpatch: likewise + * debian/rules: bumped version + * debian/libedit2.files: moved from 2.5 to 2.6 + + -- Gergely Nagy Sun, 4 Nov 2001 02:44:43 +0100 + +libedit (2.5.cvs.20010821-7) unstable; urgency=low + + * The `Someone teach me C' release + * debian/patches/03-el.c-MAXPATHLEN.dpatch: Fixed the patch, so the + MAXPATHLEN and non-MAXPATHLEN cases don't mix (what a silly typo!). + This way, there won't be any segfault. (Closes: #111819) + * debian/rules (PMAKE_ARGS): added -lcurses to LDADD (Closes: #111821) + * debian/patches/04-readline.h-stdio.dpatch: new patch, which adds an + #include to readline.h + * debian/patches/00list: added the new patch (Closes: #111820) + + -- Gergely Nagy Tue, 11 Sep 2001 13:57:36 +0200 + +libedit (2.5.cvs.20010821-6) unstable; urgency=low + + * debian/rules (cvs-update): okay, this time it actually works + * debian/control: versioned dependency on fixed pmake, thanks Steve! + * debian/scripts/ld-hack.sh: removed, since new pmake solves some + of our problems + * debian/rules: removed some of the pmake workarounds, added others + + -- Gergely Nagy Sun, 9 Sep 2001 04:03:47 +0200 + +libedit (2.5.cvs.20010821-5) unstable; urgency=low + + * debian/control: priority set to optional, as per the request of + Ben Burton . + * debian/scripts/ld-hack.sh: wrapper around gcc to fool pmake + * debian/rules: use ld-hack.sh and an appropriate SHLIB_SHFLAGS + to work around pmake, which tries to link with ld instead of gcc. + This fixes the build problem on at least hppa. + + -- Gergely Nagy Wed, 5 Sep 2001 15:08:59 +0200 + +libedit (2.5.cvs.20010821-4) unstable; urgency=low + + * Added bsdmainutils to the build-depends (Closes: #111041) + + -- Gergely Nagy Mon, 3 Sep 2001 18:53:44 +0200 + +libedit (2.5.cvs.20010821-3) unstable; urgency=low + + * debian/rules (unpatch): use sort -r instead of tac + (glibc-compat, libedit-${DATE}): superceded by new cvs-update + (cvs-update): completely rewrote, more robust and elegant + * debian/patches/03-el.c-MAXPATHLEN.dpatch: on systems without + MAXPATHLEN, allocate memory dynamicaly. This fixes the build on + the Hurd. + * glibc-bsd-compat/bsd-compat.h: Added #include + to eliminate XTABS redefinition in libedit-20010821/tty.h + + -- Gergely Nagy Mon, 3 Sep 2001 12:34:55 +0200 + +libedit (2.5.cvs.20010821-2) unstable; urgency=low + + * Added missing build-dependency on libncurses5-dev (Closes: #110579) + * While there, added a dependency on that one to libedit-dev + + -- Gergely Nagy Thu, 30 Aug 2001 11:27:02 +0200 + +libedit (2.5.cvs.20010821-1) unstable; urgency=low + + * Initial release (Closes: #109398) + + -- Gergely Nagy Sat, 25 Aug 2001 11:59:34 +0200 --- libedit-2.11-20080614.orig/debian/libedit2.shlibs +++ libedit-2.11-20080614/debian/libedit2.shlibs @@ -0,0 +1 @@ +libedit 2 libedit2 (>= 2.11-20080614-1) --- libedit-2.11-20080614.orig/debian/libedit-dev.files +++ libedit-2.11-20080614/debian/libedit-dev.files @@ -0,0 +1,8 @@ +usr/include/libedit/vis.h +usr/include/editline/readline.h +usr/include/histedit.h +usr/lib/*/libedit.a +usr/lib/*/libedit.so +usr/share/man/man3/editline.3el +usr/share/man/man5/editrc.5el +usr/lib/*/pkgconfig/libedit.pc --- libedit-2.11-20080614.orig/debian/libedit2.files +++ libedit-2.11-20080614/debian/libedit2.files @@ -0,0 +1,2 @@ +usr/lib/*/libedit.so.2.11 +usr/lib/*/libedit.so.2 --- libedit-2.11-20080614.orig/debian/libedit-vis.h +++ libedit-2.11-20080614/debian/libedit-vis.h @@ -0,0 +1,8 @@ +#ifndef LIBEDIT_VIS_H +#define LIBEDIT_VIS_H + +#warning "This header is obsolete, use instead." + +#include + +#endif --- libedit-2.11-20080614.orig/debian/control +++ libedit-2.11-20080614/debian/control @@ -0,0 +1,33 @@ +Source: libedit +Section: libs +Priority: standard +Maintainer: Anibal Monsalve Salazar +Build-Depends: debhelper (>= 8.1.3), quilt, pmake (>= 1.111-3), groff-base, + libbsd-dev (>= 0.1.3), libncurses5-dev, bsdmainutils +Standards-Version: 3.8.2 +Vcs-Browser: http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/ +Homepage: http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-5-0/src/lib/libedit/ + +Package: libedit2 +Section: libs +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: BSD editline and history libraries + The editline library provides generic line editing and + history functions. + . + It slightly resembles GNU readline + +Package: libedit-dev +Section: libdevel +Priority: optional +Architecture: any +Multi-Arch: same +Depends: libedit2 (= ${binary:Version}), libbsd-dev (>= 0.1.3), libncurses5-dev +Description: BSD editline and history libraries (development files) + The editline library provides generic line editing and + history functions. + . + It slightly resembles GNU readline --- libedit-2.11-20080614.orig/debian/libedit-dev.links +++ libedit-2.11-20080614/debian/libedit-dev.links @@ -0,0 +1 @@ +usr/include/editline/readline.h usr/include/editline/history.h --- libedit-2.11-20080614.orig/debian/compat +++ libedit-2.11-20080614/debian/compat @@ -0,0 +1 @@ +7 --- libedit-2.11-20080614.orig/debian/copyright +++ libedit-2.11-20080614/debian/copyright @@ -0,0 +1,40 @@ +This package was debianized by Gergely Nagy . + +It was checked out from NetBSD CVS on 2008-06-14. +(CVS_RSH=ssh CVSROOT=anoncvs@anoncvs.NetBSD.org:/cvsroot cvs checkout -P $path) + +Upstream Author: NetBSD Foundation + +Homepage: http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-5-0/src/lib/libedit/ + +Copyright: + + Copyright (c) 1992, 1993 + The Regents of the University of California. All rights reserved. + + This code is derived from software contributed to Berkeley by + Christos Zoulas of Cornell University. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. --- libedit-2.11-20080614.orig/debian/libedit.pc +++ libedit-2.11-20080614/debian/libedit.pc @@ -0,0 +1,13 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: libedit +Description: Not just a replacement library for libreadline and libhistory. +Version: 2.11 +Requires: +Requires.private: libbsd +Libs: -L${libdir} -ledit -lcurses +Libs.private: +Cflags: -I${includedir} --- libedit-2.11-20080614.orig/debian/patches/02-el.c-issetugid.diff +++ libedit-2.11-20080614/debian/patches/02-el.c-issetugid.diff @@ -0,0 +1,22 @@ + 02-el.c-issetugid.diff by Gergely Nagy + + issetugid(2) is not implemented on GNU systems, so #ifdef it out + +--- a/libedit/el.c 2008-04-06 02:53:28.000000000 +1100 ++++ b/libedit/el.c 2009-06-23 08:51:48.000000000 +1000 +@@ -479,12 +479,14 @@ el_source(EditLine *el, const char *fnam + + fp = NULL; + if (fname == NULL) { +-#ifdef HAVE_ISSETUGID ++#if 1 + static const char elpath[] = "/.editrc"; + char path[MAXPATHLEN]; + ++#ifndef __GLIBC__ + if (issetugid()) + return (-1); ++#endif + if ((ptr = getenv("HOME")) == NULL) + return (-1); + if (strlcpy(path, ptr, sizeof(path)) >= sizeof(path)) --- libedit-2.11-20080614.orig/debian/patches/20-fortify.patch +++ libedit-2.11-20080614/debian/patches/20-fortify.patch @@ -0,0 +1,21 @@ +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488456 + +Patch by Kees Cook + +--- a/libedit/vi.c 2006-10-22 17:48:13.000000000 +1000 ++++ b/libedit/vi.c 2009-06-23 08:35:58.000000000 +1000 +@@ -1012,8 +1012,12 @@ vi_histedit(EditLine *el, int c) + if (fd < 0) + return CC_ERROR; + cp = el->el_line.buffer; +- write(fd, cp, el->el_line.lastchar - cp +0u); +- write(fd, "\n", 1); ++ if (write(fd, cp, el->el_line.lastchar - cp +0u)<0 || ++ write(fd, "\n", 1)<0) { ++ close(fd); ++ unlink(tempfile); ++ return CC_ERROR; ++ } + pid = fork(); + switch (pid) { + case -1: --- libedit-2.11-20080614.orig/debian/patches/10-define_SIZE_T_MAX.diff +++ libedit-2.11-20080614/debian/patches/10-define_SIZE_T_MAX.diff @@ -0,0 +1,16 @@ + 10-define_SIZE_T_MAX.diff by Anibal Monsalve Salazar + define SIZE_T_MAX as UINT_MAX in limits.h + +--- a/libedit/readline.c 2008-04-29 16:53:01.000000000 +1000 ++++ a/libedit/readline.c 2008-06-14 23:54:16.000000000 +1000 +@@ -61,6 +61,10 @@ __RCSID("$NetBSD: readline.c,v 1.75 2008 + #include "readline/readline.h" + #include "filecomplete.h" + ++#ifndef SIZE_T_MAX ++#define SIZE_T_MAX UINT_MAX ++#endif ++ + void rl_prep_terminal(int); + void rl_deprep_terminal(void); + --- libedit-2.11-20080614.orig/debian/patches/08-readline-history.h.diff +++ libedit-2.11-20080614/debian/patches/08-readline-history.h.diff @@ -0,0 +1,18 @@ + 08-readline-history.h.diff by Pawel Wiecek + (compatibility with older versions) + + Setting the global variable rl_inhibit_completion to 1 did indeed + disable completion, but the invoking key (e.g., ) was not + inserted directly into the input line as it should be. + This patch fixes this problem, and also declares rl_inhibit_completion + in readline.h for better readline compatibility. + +--- a/libedit/readline/Makefile 2003-08-03 19:23:15.000000000 +1000 ++++ b/libedit/readline/Makefile 2009-06-23 08:35:58.000000000 +1000 +@@ -10,4 +10,6 @@ INCS= readline.h + INCSDIR= /usr/include/readline + INCSYMLINKS= readline.h ${INCSDIR}/history.h + ++incinstall:: linksinstall ++ + .include --- libedit-2.11-20080614.orig/debian/patches/03-el.c-MAXPATHLEN.diff +++ libedit-2.11-20080614/debian/patches/03-el.c-MAXPATHLEN.diff @@ -0,0 +1,38 @@ + 03-el.c-MAXPATHLEN.diff by Gergely Nagy + + on systems without MAXPATHLEN, allocate memory dynamically + +--- a/libedit/el.c 2009-06-23 08:57:04.000000000 +1000 ++++ b/libedit/el.c 2009-06-23 08:57:30.000000000 +1000 +@@ -481,7 +481,11 @@ el_source(EditLine *el, const char *fnam + if (fname == NULL) { + #if 1 + static const char elpath[] = "/.editrc"; ++#ifdef MAXPATHLEN + char path[MAXPATHLEN]; ++#else ++ char *path; ++#endif + + #ifndef __GLIBC__ + if (issetugid()) +@@ -489,10 +493,19 @@ el_source(EditLine *el, const char *fnam + #endif + if ((ptr = getenv("HOME")) == NULL) + return (-1); ++#ifndef MAXPATHLEN ++ path = (char *)malloc(strlen(ptr) + strlen(elpath) + 10); ++ if (path == NULL) ++ return (-1); ++ /* Always succeeds, since we have enough memory */ ++ strcpy(path, ptr); ++ strcat(path, elpath); ++#else + if (strlcpy(path, ptr, sizeof(path)) >= sizeof(path)) + return (-1); + if (strlcat(path, elpath, sizeof(path)) >= sizeof(path)) + return (-1); ++#endif + fname = path; + #else + /* --- libedit-2.11-20080614.orig/debian/patches/series +++ libedit-2.11-20080614/debian/patches/series @@ -0,0 +1,9 @@ +01-Makefile.diff +02-el.c-issetugid.diff +03-el.c-MAXPATHLEN.diff +04-readline.h-stdio.diff +08-readline-history.h.diff +10-define_SIZE_T_MAX.diff +12-libedit-Makefile.diff +20-fortify.patch +fix_gcc_warnings.diff --- libedit-2.11-20080614.orig/debian/patches/04-readline.h-stdio.diff +++ libedit-2.11-20080614/debian/patches/04-readline.h-stdio.diff @@ -0,0 +1,15 @@ + 04-readline.h-stdio.diff by Gergely Nagy + + since readline.h uses types defined in stdio.h, that header should + be included + +--- a/libedit/readline/readline.h 2008-04-29 16:53:01.000000000 +1000 ++++ b/libedit/readline/readline.h 2009-06-23 08:35:58.000000000 +1000 +@@ -31,6 +31,7 @@ + #ifndef _READLINE_H_ + #define _READLINE_H_ + ++#include + #include + + /* list of readline stuff supported by editline library's readline wrapper */ --- libedit-2.11-20080614.orig/debian/patches/fix_gcc_warnings.diff +++ libedit-2.11-20080614/debian/patches/fix_gcc_warnings.diff @@ -0,0 +1,56 @@ +Description: fix warnings about deprecated headers +Author: Steve Langasek +Bug-Debian: http://bugs.debian.org/634324 + +Index: libedit-2.11-20080614/libedit/Makefile +=================================================================== +--- libedit-2.11-20080614.orig/libedit/Makefile ++++ libedit-2.11-20080614/libedit/Makefile +@@ -4,7 +4,7 @@ + OS!= sh -c "case `uname -s` in GNU|GNU/*) echo GNU ;; *) uname -s ;; esac" + + .if ${OS} == GNU || ${OS} == Linux +-CFLAGS += -include bsd/bsd.h ++CFLAGS += -include bsd/sys/cdefs.h -include bsd/stdio.h + MKLINT=no + .endif + +Index: libedit-2.11-20080614/libedit/readline.c +=================================================================== +--- libedit-2.11-20080614.orig/libedit/readline.c ++++ libedit-2.11-20080614/libedit/readline.c +@@ -48,7 +48,7 @@ + #include + #include + #ifdef HAVE_VIS_H +-#include ++#include + #else + #include "np/vis.h" + #endif +Index: libedit-2.11-20080614/libedit/filecomplete.c +=================================================================== +--- libedit-2.11-20080614.orig/libedit/filecomplete.c ++++ libedit-2.11-20080614/libedit/filecomplete.c +@@ -47,7 +47,7 @@ + #include + #include + #ifdef HAVE_VIS_H +-#include ++#include + #else + #include "np/vis.h" + #endif +Index: libedit-2.11-20080614/libedit/history.c +=================================================================== +--- libedit-2.11-20080614.orig/libedit/history.c ++++ libedit-2.11-20080614/libedit/history.c +@@ -48,7 +48,7 @@ + #include + #include + #ifdef HAVE_VIS_H +-#include ++#include + #else + #include "np/vis.h" + #endif --- libedit-2.11-20080614.orig/debian/patches/01-Makefile.diff +++ libedit-2.11-20080614/debian/patches/01-Makefile.diff @@ -0,0 +1,23 @@ + 01-Makefile.diff by Neal H Walfield and + Gergely Nagy + + Add the necessary includes and other things to the libedit + Makefile, so it will compile on GNU systems, with our supplied + glue code + +--- a/libedit/Makefile ++++ b/libedit/Makefile +@@ -1,6 +1,13 @@ + # $NetBSD: Makefile,v 1.36 2007/05/28 12:06:18 tls Exp $ + # @(#)Makefile 8.1 (Berkeley) 6/4/93 + ++OS!= sh -c "case `uname -s` in GNU|GNU/*) echo GNU ;; *) uname -s ;; esac" ++ ++.if ${OS} == GNU || ${OS} == Linux ++CFLAGS += -include bsd/bsd.h ++MKLINT=no ++.endif ++ + USE_SHLIBDIR= yes + + WARNS= 3 --- libedit-2.11-20080614.orig/debian/patches/12-libedit-Makefile.diff +++ libedit-2.11-20080614/debian/patches/12-libedit-Makefile.diff @@ -0,0 +1,52 @@ + 12-libedit-Makefile.diff by Anibal Monsalve Salazar + without this patch I get the following message: + make: ${_MKTARGET_CREATE} expands to empty string + +--- a/libedit/Makefile 2007-05-28 22:06:18.000000000 +1000 ++++ a/libedit/Makefile 2008-06-15 13:53:50.000000000 +1000 +@@ -59,45 +59,37 @@ CLEANFILES+= ${AHDR} fcns.h help.h fcns. + SUBDIR= readline + + vi.h: vi.c makelist Makefile +- ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \ + > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + + emacs.h: emacs.c makelist Makefile +- ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/emacs.c \ + > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + + common.h: common.c makelist Makefile +- ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/common.c \ + > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + + fcns.h: ${AHDR} makelist Makefile +- ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + + fcns.c: ${AHDR} fcns.h help.h makelist Makefile +- ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + + help.c: ${ASRC} makelist Makefile +- ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -bc ${ASRC} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + + help.h: ${ASRC} makelist Makefile +- ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} + + editline.c: ${OSRCS} makelist Makefile +- ${_MKTARGET_CREATE} + ${HOST_SH} ${LIBEDITDIR}/makelist -e ${OSRCS:T} > ${.TARGET}.tmp && \ + mv ${.TARGET}.tmp ${.TARGET} +