This is a Debian patch file for "less" 394. This file was obtained originally from: http://ftp.debian.org/debian/pool/main/l/less/\ less_394-4.diff.gz The contents are unchanged except for these comments. --- less-394.orig/debian/LESSOPEN +++ less-394/debian/LESSOPEN @@ -0,0 +1,59 @@ +From the man page: + You may define an "input preprocessor" for less. Before + less opens a file, it first gives your input preprocessor + a chance to modify the way the contents of the file are + displayed. + +What this means is that less(1) can automatically open up tar files, +uncompress gzipped files, and even display something reasonable for +graphics files. + +You just need to put the following in your +.zlogin/.login/.bash_profile/whatever: + +eval $(lesspipe) +or +eval $(lessfile) + +lesspipe will toss the contents/info on stdout and less will read them +as they come across. This means that you don't have to wait for the +decoding to finish before less shows you the file. This also means that +you'll get a 'byte N' instead of an N% as your file position. You can +seek to the end and back to get the N% but that means you have to wait +for the pipe to finish. + +lessfile will toss the contents/info on a file which less will then +read. After you're done, lessfile will then delete the file. This +means that the process has to finish before you see it, but you get nice +percentages (N%) up front. + +If you have some additional tests for binary files that I don't handle, go +ahead and send them to me. Note that I will never integrate commands +for text files. If you want to add man-ifying or html-izing commands to +your copy of lesspipe, go ahead, they just won't be integrated in the +main distribution. + +Here are two additional tests that you might like to use but aren't in +the lesspipe script due to speed or principle of least surprise. + + # Decode directories: + if [ -d "$1" ]; then + echo "$1:"; ls -l $1 + else + + # view strings inside of an executable + if [ -x "$1" ]; then + type=$(file "$1") + case "$type" in + *executable* ) + echo -e "$type\n" + strings "$1" + ;; + esac + fi + +These two entries courtesy of Adrian Bridgett . +Please send in your entries as well. + +If you have any questions, send me e-mail at . +Mentioning less in the subject line will help. --- less-394.orig/debian/changelog +++ less-394/debian/changelog @@ -0,0 +1,637 @@ +less (394-4) unstable; urgency=low + + * New maintainer. + * Set DH_COMPAT to 5. + * Added ${misc:Depends} to dependency list. + + -- Anibal Monsalve Salazar Mon, 16 Oct 2006 20:52:24 +1000 + +less (394-3) unstable; urgency=low + + * Print a message when catdoc or isoinfo are not installed. + Closes: #358704: lesspipe: treat catdoc and isoinfo like other helper + programs + * debian/control: Updated Standards-Version to 3.7.2. No changes needed. + + -- Thomas Schoepf Tue, 18 Jul 2006 11:16:11 +0200 + +less (394-2) unstable; urgency=low + + * Closes: #350252: less does not show .ear files + * debian/rules: switched to dh_installman from dh_installmanpages. + * debian/watch: added watch file. + * debian/lesspipe: support .7z archives. + Closes: #347237: lesspipe: please add 7-Zip format support + + -- Thomas Schoepf Mon, 13 Mar 2006 11:07:24 +0100 + +less (394-1) unstable; urgency=low + + * New upstream version. + * Closes: #297763: less: invokes nano as editor even though EDITOR + and VISUAL not set + * Closes: #338815: less: Missing prompt + + -- Thomas Schoepf Fri, 9 Dec 2005 23:36:49 +0100 + +less (393-1) unstable; urgency=low + + * New upstream version. + * Closes: #333475: less no longer handles bold+underline overstriking + correctly + * Closes: #336864: manpages: problem with iconv manpage + * Closes: #334771: history file is created world-readable + * Closes: #336606: Formatting issue in the less.1 man page + + -- Thomas Schoepf Wed, 2 Nov 2005 21:33:38 +0100 + +less (392-1) unstable; urgency=low + + * New upstream version + * Closes: #332671: early parts of overlong lines are missing when + single-stepping through file + * Closes: #333091: less -c displays garbage at the end of lines longer + than terminal width when searching + * Closes: #333140: line wrapping is buggy with less -c + * Closes: #333783: less: Does not work properly line length > 80 + * Closes: #333920: less: very weird output + * debian/control: Standards-Version: 3.6.2. No changes required. + * debian/control: Build-Depends: debhelper (>= 4.0.0) + * debian/rules: s/DH_COMPAT=2/DH_COMPAT=4/ + + -- Thomas Schoepf Fri, 14 Oct 2005 23:05:23 +0200 + +less (391-1) unstable; urgency=low + + * New upstream version. + * Closes: #180625: less: doesn't correctly display multibyte chars in search + string + * Closes: #180618: less: wrong - signs in utf-8 + * Closes: #226023: less: does not properly detect UTF-8 locales + * Closes: #237427: Segfault when directory is deleted while in help screen + * Closes: #249594: less: ignore-case in searches doesn't ignore case + * Closes: #257068: less: add [] to DEF_METACHARS + * Closes: #269993: less: search history across sessions would be nice + * Closes: #314248: less: Search command does not accept UTF-8 + multibyte characters + * Closes: #314249: less should filter non-printable (raw) characters + of the filename + + -- Thomas Schoepf Wed, 5 Oct 2005 18:04:29 +0200 + +less (382-2) unstable; urgency=low + + * debian/lesspipe: refuse to create temporary files in case 'tempfile' + is not installed, which does not happen on a sane Debian system. + Closes: #272267: Critical TMPFILE/root exploit in lesspipe + * debian/rules: Run configure with '--host' option on cross build. + Closes: #285413: less: [PATCH] cross build + + -- Thomas Schoepf Mon, 13 Dec 2004 16:08:26 +0100 + +less (382-1) unstable; urgency=medium + + * New upstream release. + less-382 is identical to 381 except for the removal + of some copyrighted code for OS-9 support. + + -- Thomas Schoepf Thu, 1 Jul 2004 14:41:49 +0200 + +less (381-3) unstable; urgency=low + + * debian/control: Standards-Version: 3.6.1. No changes required. + * debian/lesspipe.1: Put quotes around the command line examples + Closes: #201901: lesspipe: man page update for zsh + * Changed short description from + "A file pager program, similar to more(1)" to + "Pager programm similar to more". + Closes: #218836: poor short description + * debian/lesspipe: Support *.iso, *.raw, *.bin files. + Closes: #230556: lessfilter to list contents of ISO files (CD images) + + -- Thomas Schoepf Wed, 4 Feb 2004 15:25:37 +0100 + +less (381-2) unstable; urgency=low + + * debian/lesspipe.1: document which extensions are handled. + Closes: #183138: lesspipe/lessfile manual page unclear about built-in + behavior + + -- Thomas Schoepf Sun, 2 Mar 2003 22:43:21 +0100 + +less (381-1) unstable; urgency=low + + * New upstream version. + * Closes: #123988: less: can't backspace over UTF-8 + * debian/lesspipe: Support *.xpi files. + * debian/lesspipe: Support *.pdf files. + Closes: #171648: less: Add support for pdf using xpdf's pdftotext? + * debian/lesspipe: Support *.udeb files. + Closes: #172285: less: udeb support for lesspipe + * debian/rules: Removed -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 from + CFLAGS. less' configure script detects large file support itself now. + * Removed mimehandler debconf question. + Closes: #168668: "less" file usr/lib/mime/packages/less + fails debsums test + Closes: #174719: less: Danish template translation + + -- Thomas Schoepf Wed, 22 Jan 2003 21:12:34 +0100 + +less (378-2) unstable; urgency=low + + * debian/README.Debian: document that less can view Chinese text if + LESSCHARSET is set to utf-8 + Closes: Bug#160920: less: problem+fix viewing Chinese in less + + -- Thomas Schoepf Sun, 6 Oct 2002 15:09:15 +0200 + +less (378-1) unstable; urgency=low + + * New upstream version. + * debian/lessopen renamed to debian/lesspipe + * debian/lesspipe: Support unzoo to view .zoo files. + * Standards-Version: 3.5.7 + + -- Thomas Schoepf Tue, 1 Oct 2002 22:40:12 +0200 + +less (376-3) unstable; urgency=low + + * Closes:Bug#154856: debconf template translation for brazilian portuguese + + -- Thomas Schoepf Sat, 3 Aug 2002 14:20:22 +0200 + +less (376-2) unstable; urgency=low + + * Closes:Bug#150675: less: Less source package includes config.cache + + -- Thomas Schoepf Sat, 22 Jun 2002 00:45:01 +0200 + +less (376-1) unstable; urgency=low + + * New upstream version. + * Closes: Bug#118184: less displays files in incorrect order if a filename + is given multiple times + + -- Thomas Schoepf Wed, 19 Jun 2002 20:23:21 +0200 + +less (374-5) unstable; urgency=low + + * Closes:Bug#145385: less: Blanks in description + + -- Thomas Schoepf Wed, 1 May 2002 22:36:21 +0200 + +less (374-4) unstable; urgency=low + + * Closes:Bug#141167: less: updated French templates file + * Moved german translation from templates to templates.de + + -- Thomas Schoepf Thu, 4 Apr 2002 16:43:52 +0200 + +less (374-3) unstable; urgency=low + + * Closes: Bug#140967: templates file points to /usr/doc/less/LESSOPEN + + -- Thomas Schoepf Wed, 3 Apr 2002 14:23:40 +0200 + +less (374-2) unstable; urgency=low + + * Created a debconf template that asks whether to add a mime handler for + "application/*" + Closes: Bug#86349: Love-Love for lessopen! + Closes: Bug#133538: application/* breaks a lot + Closes: Bug#140356: less cannot display application/* + + -- Thomas Schoepf Sun, 31 Mar 2002 21:25:28 +0200 + +less (374-1) unstable; urgency=low + + * New upstream version. + * Closes: Bug#132058: -x sets scroll lines rather than tab stops + + -- Thomas Schoepf Wed, 20 Feb 2002 17:39:49 +0100 + +less (373-3) unstable; urgency=low + + * Closes: Bug#130804: over-allocate on really long lines + + -- Thomas Schoepf Mon, 18 Feb 2002 18:14:55 +0100 + +less (373-2) unstable; urgency=low + + * Closes: Bug#129366: application/* should be handled without LESSOPEN, too + + -- Thomas Schoepf Thu, 17 Jan 2002 20:08:44 +0100 + +less (373-1) unstable; urgency=low + + * New upstream version. + + -- Thomas Schoepf Mon, 14 Jan 2002 21:26:54 +0100 + +less (371-2) unstable; urgency=low + + * Added a mime handler for "application/*". + * Closes: Bug#128038: add .rar viewing support to lesspipe + + -- Thomas Schoepf Sun, 13 Jan 2002 12:58:18 +0100 + +less (371-1) unstable; urgency=low + + * New upstream version. + * Closes: Bug#69273: description of charset defaults in man page is + confusing + * Closes: Bug#87382: variable-width tabs + * Closes: Bug#123988: can't backspace over UTF-8 + * Closes: Bug#126499: New upstream release available (version 370) + * Standards-Version: 3.5.6 + * Closes: Bug#119999: please add # to DEF_METACHARS + which lets me remove the comment in lesspipe about filenames starting with + "#" (see Bug#79494). And this + Closes: Bug#122093: can't do 'eval `lessfile`' from prompt in tcsh + + -- Thomas Schoepf Fri, 4 Jan 2002 15:17:23 +0100 + +less (358-12) unstable; urgency=low + + * Closes: Bug#83384: lessopen: full of bashisms + * Closes: Bug#117639: */* is not allowed by RFC-1524 + + -- Thomas Schoepf Thu, 1 Nov 2001 11:36:23 +0100 + +less (358-11) unstable; urgency=low + + * Compile with -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 + Closes: Bug#83469: less doesn't handle files > 2GB + Closes: Bug#112999: less does not support files > 2gb + + -- Thomas Schoepf Fri, 26 Oct 2001 16:08:50 +0200 + +less (358-10) unstable; urgency=low + + * Closes: Bug#114913: less: uses echo -e + + -- Thomas Schoepf Mon, 8 Oct 2001 21:50:46 +0200 + +less (358-9) unstable; urgency=low + + * A system-wide lesskey file may be put to /etc/sysless. + Closes: Bug#74146: config file in /usr/bin ! + + -- Thomas Schoepf Mon, 27 Aug 2001 21:54:07 +0200 + +less (358-8) unstable; urgency=low + + * Closes: Bug#109643: less has a new homepage + + -- Thomas Schoepf Thu, 23 Aug 2001 12:51:42 +0200 + +less (358-7) unstable; urgency=low + + * Standards-Version: 3.5.2 + * lesspipe now handles .war (Java servlet archives). + + -- Thomas Schoepf Sun, 22 Jul 2001 18:55:38 +0200 + +less (358-6.1) unstable; urgency=low + + * Non-maintainer upload + * Recompile to fix problems on ARM + + -- Philip Blundell Sun, 11 Mar 2001 07:33:48 -0500 + +less (358-6) unstable; urgency=low + + * Closes: Bug#84402: Request addition to lesspipe + Additionally, support *.tar.dz + + -- Thomas Schoepf Fri, 2 Feb 2001 18:56:04 +0100 + +less (358-5) unstable; urgency=low + + * Closes: Bug#80989: less: less on a deb file that does not exist + + -- Thomas Schoepf Mon, 1 Jan 2001 12:52:04 +0100 + +less (358-4) unstable; urgency=low + + * Closes: Bug#79494: Lesspipe mishandles files with spaces, etc. + I removed the single quotes around %s in the LESSOPEN and LESSCLOSE + environment variables, although is re-actives an old bug (#25706). I still + thinks it's sensible, because with the quotes in place, you cannot view + any files with need-to-escape characters in their names, now you cannot + view only files with '#' as the first character, i.e. you can view them + when you write the path ahead (e.g. 'less ./#file'). + Plus, I added a note to lesspipe that should lead people who fell into this + trap door to the right direction. + + -- Thomas Schoepf Tue, 26 Dec 2000 19:33:25 +0100 + +less (358-3) unstable; urgency=low + + * debian/prerm: call update-alternatives only on removal not on upgrade etc. + * Install a manpage slave for pager.1 + + -- Thomas Schoepf Mon, 7 Aug 2000 13:44:48 +0200 + +less (358-2) unstable; urgency=low + + * Closes: #66990: debhelper should not be in Build-Depends-Indep + * Bumped Standards-Version to 3.2.0 + * Switch to debhelper v2. + + -- Thomas Schoepf Sat, 5 Aug 2000 01:19:27 +0200 + +less (358-1) unstable; urgency=low + + * New upstream version. + + -- Thomas Schoepf Sat, 15 Jul 2000 20:36:02 +0200 + +less (357-1) unstable; urgency=low + + * New upstream version. + * Closes: #44058: less wordwrap bug + * Closes: #66309: lesspipe can't find imagemagick + + -- Thomas Schoepf Sun, 9 Jul 2000 00:38:24 +0200 + +less (354-2) unstable; urgency=low + + * Corrected download address in copyright. + + -- Thomas Schoepf Mon, 29 May 2000 16:49:31 +0200 + +less (354-1) unstable; urgency=low + + * New upstream version. + + -- Thomas Schoepf Fri, 31 Mar 2000 22:18:28 +0200 + +less (352-1) unstable; urgency=low + + * New upstream version. + * Closes: #57123: lesspipe should display *.lha as well + * Documented the behavior, that bash sources the file referenced by + $BASH_ENV before executing a shell script (Closes: #50024). + + -- Thomas Schoepf Thu, 9 Mar 2000 11:34:54 +0100 + +less (346-7) frozen unstable; urgency=low + + * Applied a patch that is now blessed by the upstream maintainer. + Closes: #35223: less: can't edit files with spaces in the filename + Closes: #36991: less doesn't quote filesnames when starting the editor + Closes: #53403: less: problem with filenames with spaces + + -- Thomas Schoepf Fri, 28 Jan 2000 19:53:17 +0100 + +less (346-6) frozen unstable; urgency=low + + * Release Manager: Fixes a not yet reported bug that causes lesspipe to fail + on *.doc files without catdoc installed. + + -- Thomas Schoepf Thu, 20 Jan 2000 13:32:43 +0100 + +less (346-5) unstable; urgency=low + + * Compiled against new libncurses5. (closes: #53934) + + -- Thomas Schoepf Mon, 3 Jan 2000 18:47:41 +0100 + +less (346-4) unstable; urgency=low + + * Closes: #53614: Missing build dependencies + + -- Thomas Schoepf Tue, 28 Dec 1999 18:17:00 +0100 + +less (346-3) unstable; urgency=low + + * Closes: #53303: please include catdoc in lesspipe for MS-Word + + -- Thomas Schoepf Thu, 23 Dec 1999 19:38:06 +0100 + +less (346-2) unstable; urgency=low + + * Closes: #50201: lesspipe/lessfile: miniunz is now miniunzip + * debian/copyright: less may be distributed under the terms of either + the GPL or the Less License. + + -- Thomas Schoepf Mon, 15 Nov 1999 01:17:31 +0100 + +less (346-1) unstable; urgency=low + + * New Upstream version. + * Standards-Version: 3.1.0 and Build Dependencies. + + -- Thomas Schoepf Sat, 6 Nov 1999 13:13:00 +0100 + +less (345-2) unstable; urgency=low + + * debian/rules: Do not use target install-stamp anymore. + * Stop patching main.c now that $VISUAL is blessed by the policy. + + -- Thomas Schoepf Fri, 5 Nov 1999 21:50:07 +0100 + +less (345-1) unstable; urgency=low + + * New upstream version. + * Closes: #20184: Default keybindings in less should be changed. + * Closes: #32166: Change default character set to latin1 + * Closes: #36154, #36155: help screen describes -I option incorrectly + * Closes: #38498: lesskey patch + * Closes: #47535: segfault after typing h:d + + -- Thomas Schoepf Thu, 4 Nov 1999 22:36:04 +0100 + +less (340-5) unstable; urgency=low + + * Allow user defined lesspipe/lessfile filters via $HOME/.lessfilter. + (closes: #46210) + + -- Thomas Schoepf Sat, 2 Oct 1999 13:31:19 +0200 + +less (340-4) unstable; urgency=low + + * Added description of lesspipe's behavior on empty gzipped files to its + manpage. (closes: #24375) + + -- Thomas Schoepf Fri, 17 Sep 1999 00:26:41 +0200 + +less (340-3) unstable; urgency=low + + * No longer use hard-coded paths for non-standard utilities in lesspipe. + (closes: #31012) + * No longer leave empty temporary files on the system when less is called on + non-existing files and LESSOPEN is set to "lessfile '%s'". + * Mime: text/* priority=2. + + -- Thomas Schoepf Fri, 10 Sep 1999 20:15:23 +0200 + +less (340-2) unstable; urgency=low + + * Repackaged using debhelper. + * License is GPL. + * debian/control: Standards-Version: 3.0.1. + * Added mime support. (closes: #25891) + * Wrote manpages for lessecho and lesspipe. (closes: #15961) + * lessfile.1.gz is a symlink to lesspipe.1.gz. + * Modified lesspipe to use /bin/sh. (closes: #19049) + + -- Thomas Schoepf Thu, 9 Sep 1999 01:00:50 +0200 + +less (340-1) unstable; urgency=low + + * New maintainer (Thanks Darren!). + * New upstream version. (closes: #38297, #39756) + * Added support for .tar.bz2 to lessopen. (closes: #32538) + * Added support for .jar to lessopen. (closes: #43388) + * Added support for miniunz to lessopen. (closes: #41294) + + -- Thomas Schoepf Tue, 7 Sep 1999 12:36:03 +0200 + +less (332-4.1) frozen unstable; urgency=low + + * Non-maintainer upload + * Compiled with ncurses4 + + -- Joseph Carter Sun, 1 Nov 1998 03:30:54 -0800 + +less (332-4) unstable frozen; urgency=low + + * Actually fix arj entry. I'm not sure how the fix got reverted to the + old entry. + * Put '' around [:upper:] and [:lower:] in tr call to protect them from + the shell. Thanks to Alexey Marinichev . (Fixes + Bug #22311) + * I wasn't paying attention and thought that tempfile just gave me a + filename rather than creating a file. This of course doesn't work. + Now we only create the file when we need to. Thanks to Roberto + Lumbreras for pointing this out. (Fixes Bug #22320) + * Updated standards version to 2.4.1.0. Our one non-compliance was + insecure tempfiles. + + -- Darren Stalder Tue, 12 May 1998 02:19:45 -0700 + +less (332-3) unstable frozen; urgency=low + + * Modified rules so that you no longer have to be root to build the + package. (Fixes Bug #15454) + * Made lessopen tmp-secure (depend on debianutils >= 1.8 for tempfile). + (Fixes Bugs #19796, #15463) + * Made the filename canonically lowercase for matching in lessopen. + * Added directories, .bz, .bz2, .rpm entries to lessopen. (Fixes Bugs + $14200, #17486) + * Fixed arj entry to use the correct options. (I didn't have any .arj + handy.) (Fixes Bugs #17114, #17520) + * Linked lesspipe.1.gz/lessfile.1.gz to undocumented.7.gz until I have + time to write a real manpage. (Works on Bug #15961) + + -- Darren Stalder Sun, 19 Apr 1998 23:54:53 -0700 + +less (332-2) unstable; urgency=low + + * Quote the arguments to lesspipe so that it can handle filenames with + special characters such as '#'. Suggestion from Richard Braakman. + Thanks, Richard! (Bug #11859) + * Recompile with libc6. (Bug #11695) + * Use update-alternatives to register less(1) as /usr/bin/pager at level + 77. (Bug #12474) + * Told less(1) to use /usr/bin/editor if the envar EDITOR isn't set. + Changed defines.h.in to not redefine EDIT_PGM and removed checking the + VISUAL envar for the program to use. + * Register bug on less since it should depend on -something- installing + /usr/bin/editor but nothing I've seen does yet. + + -- Darren Stalder Tue, 23 Sep 1997 01:23:28 -0700 + +less (332-1) unstable; urgency=low + + * Upstream upgrade. This fixes bug #5483, #6492, and #9408. + * Removed changing the editor to ae. This closes bug #8036 and makes me + quite happy. + * Changed rules file to only ask for a password during clean if it needs + it. + * Included a LESSOPEN script. See /usr/doc/less/LESSOPEN for details. + This closes #3952 and #8111. + * Applied patch to screen.c from Herbert Thielen so that less properly + sets raw mode if stderr is redirected to /dev/null. This closes + #5512. + * NEWS is now installed as /usr/doc/less/changelog, mode 0644. This + closes #7835 and 7837. + * README is no longer included in the binary package since it's just + directions on how to install less. This closes #7836. + + -- Darren Stalder Wed, 18 Jun 1997 23:21:27 -0700 + +less (321-2) unstable; urgency=low + + * Updated to dpkg standards version 2.1.1.2, changed the rules file to + the format that I'm used to. This fixes #3336. + * Convinced less to use ae as the default editor. I can't stand it but + it's guaranteed to be on every debian system. Changed defines.h.in so + that I don't get lots of redefine errors. + * Reformatted the Description in the control file to clear #3616 + * It seems that the upstream release fixed the annoying 0 length bug. + This closes #4178, #4586, #4762, #6214, #6612 + + -- Darren Stalder Sun, 2 Feb 1997 20:10:05 -0800 + +Tue Jul 23 13:52:10 1996 Erick Branderhorst + + * mainstream update less 321. + * modified debian.control & debian.rules for version, architecture + * make install prefix instead of debian.rules specific install + +1. Added debian.* files + +The following changes are from Bill Mitchell: +Changes for less-290-8 + elf package + * rebuilt using ncurses shared lib + * changed ncurses-runtime dependency to ncurses3.0 + +Changes for less-290-7 + elf package + * added bugfix in #ifdef LINUX code in ch.c + +Changes for less-290-6 + elf package + * rebuilt for elf + +Changes for less-290-5 + aout package + * use alternative patch from Raul Miller to handle /proc files + +Changes for less-290-4 + aout package + * hacked filename.c with a workaround for a kernel bug + for files in /proc, + stat(filename) returns st_size set to 0 + lseek(fd, (off_t) 0, 2) returns 0 + this hack determines filesize by reading thru the file byte by byte + this doesn't address lseeek() being broken, and less(1) will + probably still misbehave if any /proc files are big enough + to make it want to use lseek() + +Changes for less-290-3 + +1. Added #ifdef DEBIAN block in screen.c to abort on unknown + terminal types instead of attempting to continue (due to + an apparent libtermcap.a bug which segfaults on tgetflag("hc") + for unknown terminal types). + +2. Added -DDEBAIN to cflags in debian.rules. + +3. Added build as a dependency to binary: target in debian.rules. + +4. Modified ./configure invocation handling in debian.rules. + +Changes for less-290-2 + +1. Cleaned up description and extended description on debian.control. + +** Local Variables: ** +** mode:debian-changelog ** +** change-log-default-name:"changelog" ** +** fill-prefix:" " ** +** End: ** --- less-394.orig/debian/control +++ less-394/debian/control @@ -0,0 +1,19 @@ +Source: less +Section: text +Priority: standard +Maintainer: Anibal Monsalve Salazar +Build-Depends: debhelper (>= 5), libncurses-dev +Standards-Version: 3.7.2 + +Package: less +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, debianutils (>= 1.8) +Description: Pager program similar to more + Less is a program similar to more(1), but which allows backward + movement in the file as well as forward movement. Also, less does not + have to read the entire input file before starting, so with large input + files it starts up faster than text editors like vi(1). Less uses + termcap (or terminfo on some systems), so it can run on a variety of + terminals. There is even limited support for hardcopy terminals. + . + Homepage: http://www.greenwoodsoftware.com/less/ --- less-394.orig/debian/rules +++ less-394/debian/rules @@ -0,0 +1,98 @@ +#!/usr/bin/make -f +#-*- makefile -*- +# Made with the aid of dh_make, by Craig Small +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +# Some lines taken from debmake, by Christoph Lameter. + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +export DH_COMPAT=5 + +DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +CONFARGS= --host=$(DEB_HOST_GNU_TYPE) +endif + +CFLAGS = -Wall -g #-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS += -O0 +else +CFLAGS += -O2 +endif + +build: build-stamp +build-stamp: + dh_testdir + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=`pwd`/debian/`dh_listpackages`/usr/share/man \ + --with-editor=/usr/bin/editor $(CONFARGS) + # Add here commands to compile the package. + $(MAKE) CFLAGS="$(CFLAGS)" + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) distclean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp. + $(MAKE) install prefix=`pwd`/debian/`dh_listpackages`/usr + install -m 0755 debian/lesspipe `pwd`/debian/`dh_listpackages`/usr/bin/lesspipe + ln -s lesspipe `pwd`/debian/`dh_listpackages`/usr/bin/lessfile + ln -s lesspipe.1.gz `pwd`/debian/`dh_listpackages`/usr/share/man/man1/lessfile.1.gz + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installdebconf + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installemacsen +# dh_installinit + dh_installmime + dh_installcron + dh_installman debian/lesspipe.1 + #dh_undocumented + dh_installchangelogs NEWS + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary --- less-394.orig/debian/lesspipe +++ less-394/debian/lesspipe @@ -0,0 +1,253 @@ +#!/bin/sh +# +# lessfile/lesspipe +# $Id: lessopen,v 1.4 1998/05/12 09:37:46 torin Exp $ +# Plus POSIX sh changes by Y.Dirson +# +# Less filter for viewing non text files. +# +# Written by: Behan Webster +# Many Modifications by Darren Stalder +# Further Modifications by Thomas Schoepf +# +# combined lessfile and lesspipe to avoid duplication of decode stage +# shell is sure icky. I'm real tempted to rewrite the whole thing in Perl +# +# Unfortunately, this means that I have filename dependencies sprinkled +# throughout the code. If you don't want lessfile to be called that, +# you'll need to change the LESSFILE envar below. +# +# Usage: eval `lessfile` or eval `lesspipe` +# +# less passes in: +# $1 filename to be viewed with less (used by LESSOPEN) +# and possibly (if used by lessfile) +# $2 filename that was created during LESSOPEN + +TMPDIR=${TMPDIR:-/tmp} +BASENAME=`basename $0` +LESSFILE=lessfile + +# Helper function to list contents of ISO files (CD images) +iso_list() { + isoinfo -d -i "$1" + isoinfo -d -i "$1" | grep -q ^Rock\.Ridge && iiopts="$iiopts -R" + isoinfo -d -i "$1" | grep -q ^Joliet && iiopts="$iiopts -J" + echo + isoinfo -f $iiopts -i "$1" +} + +if [ $# -eq 1 ] ; then + # we were called as LESSOPEN + + # if the file doesn't exist, we don't do anything + if [ ! -r "$1" ]; then + exit 0 + fi + + # generate filename for possible use by lesspipe + umask 077 + if [ $BASENAME = $LESSFILE ]; then + TMPFILE=`tempfile -d $TMPDIR -p lessf` + if [ -z "$TMPFILE" ]; then + echo >&2 "Could not find essential program 'tempfile'. Exiting" + exit 1 + fi + fi + + ( + # possibly redirect stdout to a file for lessfile + if [ $BASENAME = $LESSFILE ]; then exec > $TMPFILE; fi + + # Allow for user defined filters + #if [ -x ~/.lessfilter -a -O ~/.lessfilter ]; then + if [ -x ~/.lessfilter ]; then + ~/.lessfilter "$1" + if [ $? -eq 0 ]; then + if [ $BASENAME = $LESSFILE ]; then + if [ -s $TMPFILE ]; then + echo $TMPFILE + else + rm -f $TMPFILE + fi + fi + exit 0 + fi + fi + + # Decode file for less + case `echo "$1" | tr '[:upper:]' '[:lower:]'` in + *.arj) + if [ -x "`which unarj`" ]; then unarj l "$1" + else echo "No unarj available"; fi ;; + + *.tar.bz2) + if [ -x "`which bunzip2`" ]; then + bunzip2 -dc "$1" | tar tvvf - + else echo "No bunzip2 available"; fi ;; + + *.bz) + if [ -x "`which bunzip`" ]; then bunzip -c "$1" + else echo "No bunzip available"; fi ;; + + *.bz2) + if [ -x "`which bunzip2`" ]; then bunzip2 -dc "$1" + else echo "No bunzip2 available"; fi ;; + + *.deb|*.udeb) + echo "$1:"; dpkg --info "$1" + echo + echo '*** Contents:'; dpkg-deb --contents "$1" + ;; + + *.doc) + if [ -x "`which catdoc`" ]; then catdoc "$1" + else echo "No catdoc available"; fi ;; + + *.gif|*.jpeg|*.jpg|*.pcd|*.png|*.tga|*.tiff|*.tif) + if [ -x "`which identify`" ]; then + identify "$1" + else + echo "No identify available" + echo "Install ImageMagick to browse images" + fi + ;; + + *.iso) + if [ -x "`which isoinfo`" ]; then iso_list "$1" + else + echo "No isoinfo available" + echo "Install mkisofs to view ISO images" + fi + ;; + + *.bin|*.raw) + if [ -x "`which isoinfo`" ]; then + file "$1" | grep -q ISO\.9660 && iso_list "$1" + else + echo "No isoinfo available" + echo "Install mkisofs to view ISO images" + fi + ;; + + *.lha|*.lzh) + if [ -x "`which lha`" ]; then lha v "$1" + else echo "No lha available"; fi ;; + + *.pdf) + if [ -x "`which pdftotext`" ]; then pdftotext "$1" - + else echo "No pdftotext available"; fi ;; + + *.rar|*.r[0-9][0-9]) + if [ -x "`which rar`" ]; then rar v "$1" + elif [ -x "`which unrar`" ]; then unrar v "$1" + else echo "No rar or unrar available"; fi ;; + + *.rpm) + if [ -x "`which rpm`" ]; then + echo "$1:"; rpm -q -i -p "$1" + echo + echo '*** Contents:' + rpm -q -l -p "$1" + else echo "rpm isn't available, no query on rpm package possible"; fi ;; + + *.tar.gz|*.tgz|*.tar.z|*.tar.dz) + tar tzvf "$1" ;; + + # Note that this is out of alpha order so that we don't catch + # the gzipped tar files. + *.gz|*.z|*.dz) + gzip -dc "$1" ;; + + *.tar) + tar tvf "$1" ;; + + *.jar|*.war|*.ear|*.xpi|*.zip) + if [ -x "`which unzip`" ]; then unzip -v "$1"; + elif [ -x "`which miniunzip`" ]; then miniunzip -l "$1"; + elif [ -x "`which miniunz`" ]; then miniunz -l "$1"; + else echo "No unzip, miniunzip or miniunz available"; fi ;; + + *.7z) + if [ -x "`which 7za`" ]; then 7za l "$1"; + else echo "No 7za available"; fi ;; + + *.zoo) + if [ -x "`which zoo`" ]; then zoo v "$1"; + elif [ -x "`which unzoo`" ]; then unzoo -l "$1"; + else echo "No unzoo or zoo available"; fi ;; + + esac + ) 2>/dev/null + + if [ $BASENAME = $LESSFILE ]; then + if [ -s $TMPFILE ]; then + echo $TMPFILE + else + rm -f $TMPFILE + fi + fi + +elif [ $# -eq 2 ] ; then + # + # we were called as LESSCLOSE + # delete the file created if we were lessfile + # + if [ $BASENAME = $LESSFILE ]; then + if [ -n "$BASH" ]; then + if [ ! -O "$2" ]; then + echo "Error in deleting $2" > /dev/tty + fi + fi + + if [ -f "$2" ]; then + rm -f "$2" + else + echo "Error in deleting $2" > /dev/tty + fi + fi + +elif [ $# -eq 0 ] ; then + # + # must setup shell to use LESSOPEN/LESSCLOSE + # + # I have no idea how some of the more esoteric shells (es, rc) do + # things. If they don't do things in a Bourne manner, send me a patch + # and I'll incorporate it. + # + + # first determine the full path of lessfile/lesspipe + # if you can determine a better way to do this, send me a patch, I've + # not shell-scripted for many a year. + FULLPATH=`cd \`dirname $0\`;pwd`/$BASENAME + + case "$SHELL" in + *csh) + if [ $BASENAME = $LESSFILE ]; then + echo "setenv LESSOPEN \"$FULLPATH %s\";" + echo "setenv LESSCLOSE \"$FULLPATH %s %s\";" + else + echo "setenv LESSOPEN \"| $FULLPATH %s\";" + echo "setenv LESSCLOSE \"$FULLPATH %s %s\";" + fi + ;; + *) + if [ $BASENAME = $LESSFILE ]; then + echo "export LESSOPEN=\"$FULLPATH %s\";" + echo "export LESSCLOSE=\"$FULLPATH %s %s\";" + else + echo "export LESSOPEN=\"| $FULLPATH %s\";" + echo "export LESSCLOSE=\"$FULLPATH %s %s\";" + fi + ;; + esac + + #echo "# If you tried to view a file with a name that starts with '#', you" + #echo "# might see this message instead of the file's contents." + #echo "# To view the contents, try to put './' ahead of the filename when" + #echo "# calling less." + +else + echo "Usage: eval \`$BASENAME\`" + exit +fi --- less-394.orig/debian/copyright +++ less-394/debian/copyright @@ -0,0 +1,50 @@ +This package was debianized by Thomas Schoepf on +Wed, 8 Sep 1999 13:28:20 +0200. + +The previous maintainers were Darren Stalder , +Erick Branderhorst and +Bill Mitchell . + +It was downloaded from http://www.greenwoodsoftware.com/less/ + +Upstream Author: Mark Nudelman + +Copyright: + +This program is free software. You may redistribute it and/or +modify it under the terms of either: + +1. The GNU General Public License, as published by the Free + Software Foundation; either version 2, or (at your option) any + later version. A copy of this license is in the file + /usr/share/common-licenses/GPL. +or +2. The Less License. + + Less License + ------------ + +Less +Copyright (C) 1984-1999 Mark Nudelman + +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 in the documentation and/or other materials provided with + the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + --- less-394.orig/debian/dirs +++ less-394/debian/dirs @@ -0,0 +1 @@ +usr/bin --- less-394.orig/debian/lesspipe.1 +++ less-394/debian/lesspipe.1 @@ -0,0 +1,161 @@ +.TH LESSOPEN 1 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +lessfile, lesspipe \- "input preprocessor" for less. +.SH SYNOPSIS +.B lessfile, lesspipe +.SH "DESCRIPTION" +This manual page documents briefly the +.IR lessfile , +and +.I lesspipe +commands. +This manual page was written for the Debian GNU/Linux distribution +because the input preprocessor scripts are provided by Debian GNU/Linux and +are not part of the original program. +.PP +.I lessfile +and +.I lesspipe +are programs that can be used to modify the way the contents of a file are +displayed in +.I less. +What this means is that +.I less +can automatically open +up tar files, uncompress gzipped files, and even display something reasonable +for graphics files. +.PP +.I lesspipe +will toss the contents/info on STDOUT and +.I less +will read them +as they come across. This means that you do not have to wait for the +decoding to finish before less shows you the file. This also means that +you will get a 'byte N' instead of an N% as your file position. You can +seek to the end and back to get the N% but that means you have to wait +for the pipe to finish. +.PP +.I lessfile +will toss the contents/info on a file which +.I less +will then +read. After you are done, +.I lessfile +will then delete the file. This means that the process has to finish before +you see it, but you get nice percentages (N%) up front. +. +.SH USAGE +Just put one of the following two commands in your login script (e.g. +~/.bash_profile): +.PP + eval "$(lessfile)" +.PP +or +.PP + eval "$(lesspipe)" +.SH FILE TYPE RECOGNITION +File types are recognized by their extensions. +This is a list of currently supported extensions +(grouped by the programs that handle them): + +.DS + *.arj + *.tar.bz2 + *.bz + *.bz2 + *.deb, *.udeb + *.doc + *.gif, *.jpeg, *.jpg, *.pcd, *.png, *.tga, *.tiff, *.tif + *.iso, *.raw, *.bin + *.lha, *.lzh + *.pdf + *.rar, *.r[0-9][0-9] + *.rpm + *.tar.gz, *.tgz, *.tar.z, *.tar.dz + *.gz, *.z, *.dz + *.tar + *.jar, *.war, *.xpi, *.zip + *.zoo +.DE +.SH USER DEFINED FILTERS +It is possible to extend and overwrite the default +.I lesspipe +and +.I lessfile +input processor if you have specialized requirements. Create an executable +program with the name +.I .lessfilter +and put it into your home directory. This can be a shell script or a binary +program. + +.PP +It is important that this program returns the correct exit code: return 0 if +your filter handles the input, return 1 if the standard +.I lesspipe/lessfile +filter should handle the input. + +.PP +Here is an example script: + +.DS + #!/bin/sh + + case "$1" in + *.extension) + extension-handler "$1" + ;; + *) + # We don't handle this format. + exit 1 + esac + + # No further processing by lesspipe necessary + exit 0 +.DE + +.SH FILES +.TP +.I ~/.lessfilter +Executable file that can do user defined processing. See section USER DEFINED +FILTERS for more information. +.SH BUGS +When trying to open compressed 0 byte files, +.I less +displays the actual binary file contents. This is not a bug. +.I less +is designed to do that (see manual page less(1), section INPUT PREPROCESSOR). +This is the answer of Mark Nudelman : +.IP +"I recognized when I designed it that a +lesspipe filter cannot output an empty file and have less display +nothing in that case; it's a side effect of using the "no output" case +to mean "the filter has nothing to do". It could have been designed to +have some other mechanism to indicate "nothing to do", but "no output" +seemed the simplest and most intuitive for lesspipe writers." + +.PP +Sometimes, less does not display the contents file you want to view but output +that is produced by your login scripts (~/.bashrc or ~/.bash_profile). This +happens because less uses your current shell to run the lesspipe filter. Bash +first looks for the variable $BASH_ENV in the environment expands its value +and uses the expanded value as the name of a file to read and execute. If +this file produces any output less will display this. A way to solve this +problem is to put the following lines on the top of your login script that +produces output: + +.DS + if [ -z "$PS1" ]; then + exit + fi +.DE + +This tests whether the prompt variable $PS1 is set and if it isn't (which is +the case for non-interactive shells) it will exit the script. +.SH "SEE ALSO" +less(1) +.SH AUTHOR +This manual page was written by Thomas Schoepf , +for the Debian GNU/Linux system (but may be used by others). Most of the +text was copied from a description written by Darren Stalder . --- less-394.orig/debian/postinst +++ less-394/debian/postinst @@ -0,0 +1,55 @@ +#! /bin/sh +# postinst script for less +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/doc/packaging-manual/ +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +case "$1" in + configure) + update-alternatives --quiet --install /usr/bin/pager pager \ + /usr/bin/less 77 --slave /usr/share/man/man1/pager.1.gz \ + pager.1.gz /usr/share/man/man1/less.1.gz + + # Purge the debconf database we no longer need. + if [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_version 2.0 + db_purge + fi + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- less-394.orig/debian/prerm +++ less-394/debian/prerm @@ -0,0 +1,37 @@ +#! /bin/sh +# prerm script for less +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/doc/packaging-manual/ + +case "$1" in + remove) + update-alternatives --quiet --remove pager /usr/bin/less + ;; + upgrade|failed-upgrade|deconfigure) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- less-394.orig/debian/mime +++ less-394/debian/mime @@ -0,0 +1,2 @@ +text/plain; less '%s'; needsterminal; priority=8 +text/*; less '%s'; needsterminal; priority=2 --- less-394.orig/debian/docs +++ less-394/debian/docs @@ -0,0 +1 @@ +debian/LESSOPEN --- less-394.orig/debian/README.Debian +++ less-394/debian/README.Debian @@ -0,0 +1,10 @@ + +- If you want to view Chinese text and see garbage on the screen, you can try + to set the environment variable "LESSCHARSET" to "utf-8" before running + less, e.g. "export LESSCHARSET=utf-8" or "setenv LESSCHARSET utf8" for + c-shells. + +- When an editor is invoked, the default for Debian's less is to fall back + to "/usr/bin/editor" if neither VISUAL nor EDITOR is defined in the + enviroment. + --- less-394.orig/debian/watch +++ less-394/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://www.greenwoodsoftware.com/less/download.html less-(.*)\.tar\.gz