debian/0000755000000000000000000000000011771416652007200 5ustar debian/README.debian0000644000000000000000000000064311522226337011275 0ustar unhtml for Debian ----------------- This program removes all HTML tags from a HTML file and directs its output to stdout. It can be used as a filter for getting the text content of a HTML file without the need of firing up a web browser. Additional patches for removal of HTML entities were kindly added by "Prophet of the way ". Paul Seelig , Wed, 20 Aug 1997 01:18:21 +0200 debian/changelog0000644000000000000000000001524711771416652011063 0ustar unhtml (2.3.9-3) unstable; urgency=low * debian/compat: update to 9. * debian/control: - Update Maintainer field with Debian email. - Bump to Standards-Version 3.9.3. No changes required. - Update to debhelper 9. * debian/copyright: switch to machine-readable format. * Enable security hardening build flags: - debian/rules: pass hardening build flags to Makefile. - 40-add-flags-makefile.patch: add flags to unhtml target. - 30-fix-format-security-error.patch: fix error: "format not a string literal and no format arguments [-Werror=format-security]". This error appears when applying hardening build flags. -- Mònica Ramírez Arceda Sat, 23 Jun 2012 18:47:29 +0200 unhtml (2.3.9-2) unstable; urgency=low * Adopt the package (Closes: #576167). * Add Vcs-Git,Vcs-Browser fields in debian/control. -- Mònica Ramírez Arceda Wed, 02 Feb 2011 11:12:58 +0100 unhtml (2.3.9-1) unstable; urgency=low * QA upload. - Move to packaging format "3.0 (quilt)". * debian/clean - New file. * debian/chnagelog - Fix Debian version to *-1. * debian/compat - Update to 8. * debian/control - (Build-Depends): update to debhelper 8. - (Depends): add ${misc:Depends}. - (Maintainer): Set to Debian QA Group. - (Standards-Version): update to 3.9.1. * debian/copyright - Update layout. * debian/{docs,manpages} - New file. * debian/patches - (10): New. Make 8-bit clean (Closes: #364236). - (20): New. Off by one allocation (Closes: #534757). * debian/rules - (CC): Remove hard coded variable. - Update to dh(1). * debian/source/format - New file. -- Jari Aalto Mon, 25 Oct 2010 19:28:16 +0300 unhtml (2.3.9) unstable; urgency=low * New maintainer (closes: #309264). -- Víctor Pérez Pereira Wed, 1 Mar 2006 13:36:29 -0400 unhtml (2.3.8) unstable; urgency=low * QA upload. Switch to debhelper. -- Santiago Vila Wed, 3 Aug 2005 17:43:46 +0200 unhtml (2.3.7) unstable; urgency=low * Orphaning the package. Maintainer changed to Debian QA Group -- Al Stone Sun, 15 May 2005 20:25:51 -0600 unhtml (2.3.6) unstable; urgency=low * Forgot to change the Maintainer field in debian/control. Doh. * Closes: bug#134447 -- lintian warnings about standards level * Added test cases and tests directory * Closes: bug#58137 -- arbitrary limit on tag lengths removed * Closes: bug#58135 -- too naive about <> in plain text; unhtml now checks to see if a tag is a known html tag and only removes the text if it is. -- Al Stone Sun, 25 Apr 2004 22:07:18 -0600 unhtml (2.3.5) unstable; urgency=low * New maintainer. * Closes: bug#234419 -- ITA. * Closes: bug#164613 -- typo in README.debian and long description of the package -- Al Stone Fri, 23 Apr 2004 17:28:49 -0600 unhtml (2.3.4) unstable; urgency=low * Having already orphaned this package here is my last upload for it setting the package maintainer to Debian QA Group. -- Paul Seelig Wed, 10 Mar 2004 12:51:46 +0100 unhtml (2.3.3) unstable; urgency=low * Fixed override disparity -- Paul Seelig Fri, 21 Dec 2001 16:26:55 +0200 unhtml (2.3.2) unstable; urgency=low * Fixed some of the minor lintian errors which are listed at "http://lintian.debian.org/reports/mPaul_Seelig.html". -- Paul Seelig Wed, 19 Dec 2001 19:36:43 +0200 unhtml (2.3.1) unstable; urgency=low * Correcting falsely defined Build-Depends. (closes: #90108) -- Paul Seelig Mon, 19 Mar 2001 13:50:57 +0200 unhtml (2.3.0) unstable; urgency=low * Adapt version number to reflect selfcontainedness of package source. * Added Build-Depends in debian/control file. (closes: #89150) -- Paul Seelig Thu, 15 Mar 2001 03:47:17 +0200 unhtml (2.3-1) unstable; urgency=low * Increased MAX_TAG_SIZE in ops.h from 1024 to 65536 (closes: #64215) * Since there is no upstream maintainer for the sources anymore i've decided to make this package a self contained Debian package, thus getting rid of any dependencies on external source tarballs. -- Paul Seelig Sun, 18 Feb 2001 14:10:42 +0200 unhtml (2.2-5) frozen unstable; urgency=low * Recompiled with proper glibc support for frozen -- Paul Seelig Wed, 19 Jan 2000 12:51:04 +0200 unhtml (2.2-4) unstable; urgency=low * Added some patches sent by "Prophet of the way " to enable proper conversion of HTML entities. Closes Bug#47366. -- Paul Seelig Wed, 27 Oct 1999 18:29:10 +0200 unhtml (2.2-3) unstable; urgency=low * Upstream author agreed to make his source really conform to the GPL This should address Bug#17828 and unhtml is now DFSG compliant. :-) * Changed maintainer email address to "pseelig@debian.org". * Bumped up to standards version 3.0.1 -- Paul Seelig Wed, 13 Oct 1999 13:04:07 +0200 unhtml (2.2-2) unstable frozen; urgency=low * Moved to non-free until copyright gets properly resolved. This should address Bug#17828. * Changed maintainer email address to "pseelig@debian.org". -- Paul Seelig Sun, 06 Dec 1998 16:09:59 +0200 unhtml (2.2-1) unstable; urgency=low * New upstream release -- Paul Seelig Wed, 04 Feb 1998 16:09:59 +0200 unhtml (2.1-4) unstable; urgency=low * Corrected typos in debian/control file and debian/README.debian closing bug #16790. -- Paul Seelig Fri, 16 Jan 1998 15:31:52 +0200 unhtml (2.1-3) unstable; urgency=low * Recompiled with libc6 -- Paul Seelig Wed, 10 Dec 1997 10:31:52 +0200 unhtml (2.1-2) unstable; urgency=low * The original author agreed with the change of his programs' sources and name and provided a modified version of his sources under "ftp://kombat.acadiau.ca/pub/linux/Utils/clean-2.1/unhtml-2.1.tar.gz" which in turn was used for building this Debian package. -- Paul Seelig Mon, 29 Sep 1997 18:06:36 +0200 unhtml (2.1-1) unstable; urgency=low * Initial Release based on package clean-2.1 which was renamed to 'unhtml' for mnemonic and description reasons. * Changed all occurrences of "clean" to "unhtml" in the clean-2.1 source package. The original author agreed with the change of his programs' sources and name. -- Paul Seelig Wed, 20 Aug 1997 01:18:21 +0200 debian/source/0000755000000000000000000000000011567320330010466 5ustar debian/source/format0000644000000000000000000000001411522226337011677 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000211771400510010360 0ustar 9 debian/rules0000755000000000000000000000073211771407052010254 0ustar #!/usr/bin/make -f PACKAGE = unhtml CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) FLAGS:=$(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -fstack-protector-all -g -Wall export DEB_BUILD_MAINT_OPTIONS = hardening=+all override_dh_auto_build: $(MAKE) CFLAGS="$(FLAGS)" override_dh_auto_install: install -m 755 -D $(PACKAGE) debian/$(PACKAGE)/usr/bin/$(PACKAGE) %: dh $@ # End of file debian/control0000644000000000000000000000115211771400527010574 0ustar Source: unhtml Section: text Priority: extra Maintainer: Mònica Ramírez Arceda Build-Depends: debhelper (>= 9) Standards-Version: 3.9.3 Vcs-Git: git://git.debian.org/git/collab-maint/unhtml.git Vcs-Browser: http://git.debian.org/?p=collab-maint/unhtml.git Package: unhtml Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: Remove the markup tags from an HTML file This program removes all HTML tags from an HTML file and directs its output to stdout. It can be used as a filter for getting the text content of an HTML file without the need of firing up a web browser. debian/copyright0000644000000000000000000000646511771377263011152 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstrem-Name: unhtml Upstream-Contact: Kevin Swan <013639s@dragon.acadiau.ca> Source: ftp://kombat.acadiau.ca/pub/linux/Utils/clean-2.1/ Comment: It is based on the package 'clean-2.1' which was renamed in agreement with the original author to 'unhtml-2.1' for mnemonic and description reasons and was downloaded under the name of "unhtml-2.1.tar.gz" from the author's original site. Files: * Copyright: Copyright (C) 1996 VisionWare (Kevin Swan) License: GPL-2 Comment: This software is freely distributable under the GNU Public License, and may be altered in any way. The only condition for redistribution is that this README file be included with the revised/redistributed software, with the only modifications being additions describing what's been changed. . The upstream author authorized me to rerelease his source in order to make it really conform to the terms of the GPL. Here is his e-mail in this regard making "unhtml" really DFSG compliant: . ---------- snip --------------- . Date: Wed, 9 Dec 1998 02:51:18 -0400 (AST) From: Kevin Swan <013639s@dragon.acadiau.ca> To: pseelig@mail.uni-mainz.de Subject: Re: Uploaded unhtml-2.2-2 (source i386) to master Resent-Date: Sun, 13 Dec 1998 23:38:03 +0100 (CET) Resent-From: Paul Seelig Resent-To: pseelig@ietpd1.sowi.uni-mainz.de Resent-Subject: Re: Uploaded unhtml-2.2-2 (source i386) to master . > Can i take it for granted now that unhtml can be released under the > GPL now? May i include any mail reply from you to this message into > the Debian package? . Yes, you may. :) You are likely much more familiar with the terms of the GPL than I, and I would appreciate it if you would make the necessary modifications to my copyright agreement to make it agree with the GPL spirit. Thank you in advance, . Sincerely, . Kevin Swan. . -- ========================================================================= Kevin Swan Acadia University 013639s@dragon.acadiau.ca Fifth Year http://dragon.acadiau.ca/~013639s/ BCSH ========================================================================= . ---------- snip --------------- Files: debian/* Copyright: Copyright (C) 1997 Paul Seelig Copyright (C) 2011 Mònica Ramírez Arceda License: GPL-2 License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. debian/patches/0000755000000000000000000000000011771413555010626 5ustar debian/patches/20-memory-allocation.patch0000644000000000000000000000365111522226337015520 0ustar From b0ed7f3a28a6ac0989d874aeccaa614c6268677f Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Mon, 25 Oct 2010 19:09:36 +0300 Subject: [PATCH] Fix memory allocation by Justin T Pryzby Organization: Private Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Signed-off-by: Jari Aalto --- unhtml.c | 30 ++++++------------------------ 1 files changed, 6 insertions(+), 24 deletions(-) diff --git a/unhtml.c b/unhtml.c index c7cffa4..cee44d5 100644 --- a/unhtml.c +++ b/unhtml.c @@ -130,30 +130,16 @@ int main(int argc, char *argv[]) { m_putchar(tag[j]); } - if (tag_size > MAX_TAG_SIZE) { - free(tag); - tag_size = MAX_TAG_SIZE; - tag = (char *)malloc(tag_size); - if (!tag) { - fprintf (stderr, "Cannot malloc tag space (%d bytes).\n", tag_size); - return 1; - } - } - break; } - if (i > (tag_size - 1)) { - while (tag_size < i) - tag_size *= 2; - tmp = (char *)malloc(tag_size); + if (i >= tag_size-1) { + tag_size <<= 1; + tmp = realloc(tag, tag_size); if (!tmp) { fprintf (stderr, "Cannot malloc tag space (%d bytes).\n", tag_size); return 1; } - memset(tmp, 0, tag_size); - memcpy(tmp, tag, i); - free(tag); tag = tmp; } @@ -225,17 +211,13 @@ int main(int argc, char *argv[]) { tag[i] = ch; i++; - if (i > (tag_size - 1)) { - while (tag_size < i) - tag_size *= 2; - tmp = (char *)malloc(tag_size); + if (i >= tag_size-1) { + tag_size <<= 1; + tmp=realloc(tag, tag_size); if (!tmp) { fprintf (stderr, "Cannot malloc tag space (%d bytes).\n", tag_size); return 1; } - memset(tmp, 0, tag_size); - memcpy(tmp, tag, i); - free(tag); tag = tmp; } -- 1.7.1 debian/patches/series0000644000000000000000000000016311771404220012030 0ustar 10-make-8bit-clean.patch 20-memory-allocation.patch 30-fix-format-security-error.patch 40-add-flags-makefile.patch debian/patches/10-make-8bit-clean.patch0000644000000000000000000000125711522226337014725 0ustar From 628d8fb71b54531a0fa858cfd75bea4eeedae596 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Mon, 25 Oct 2010 19:07:14 +0300 Subject: [PATCH] Make 8-bit clean by Alexey Dobriyan Organization: Private Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Signed-off-by: Jari Aalto --- unhtml.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/unhtml.c b/unhtml.c index c7cffa4..5111f70 100644 --- a/unhtml.c +++ b/unhtml.c @@ -37,7 +37,7 @@ int main(int argc, char *argv[]) { char *tag; char *tmp; int tag_size; - char ch; + int ch; int i, j; -- 1.7.1 debian/patches/30-fix-format-security-error.patch0000644000000000000000000000076011771413555017142 0ustar Description: Fix error: format not a string literal and no format arguments [-Werror=format-security]. Author: Mònica Ramírez Arceda Last-Update: 2012-06-23 --- a/unhtml.c +++ b/unhtml.c @@ -75,7 +75,7 @@ if (argc == 2) { if ((inStream = fopen (argv[1], "r")) == NULL) { fprintf (stderr, "Error opening file [%s] for reading.\n", argv[1]); - fprintf (stderr, USAGE); + fprintf (stderr, "%s", USAGE); return 1; } } else debian/patches/40-add-flags-makefile.patch0000644000000000000000000000070711771413555015471 0ustar Description: Add flags to gcc in unhtml target of Makefile to be able to pass hardening build flags from debian/rules. Author: Mònica Ramírez Arceda Last-Update: 2012-06-23 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ all: unhtml unhtml: unhtml.o ops.o esc.o - $(CC) -o unhtml unhtml.o ops.o esc.o + $(CC) $(CFLAGS) -o unhtml unhtml.o ops.o esc.o unhtml.o: unhtml.c ops.h esc.h $(CC) $(CFLAGS) -c unhtml.c debian/docs0000644000000000000000000000002711522226337010043 0ustar Readme.html Readme.txt debian/manpages0000644000000000000000000000001111522226337010677 0ustar unhtml.1