Imported Debian patch 2.0.1+dfsg-1 debian debian/2.0.1+dfsg-1
authorGianfranco Costamagna <costamagnagianfranco@yahoo.it>
Wed, 1 Oct 2014 12:44:28 +0000 (14:44 +0200)
committerSophie Brun <sophie@freexian.com>
Fri, 30 Jan 2015 10:06:37 +0000 (11:06 +0100)
16 files changed:
debian/README.source [new file with mode: 0644]
debian/binwalk.1 [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/manpages [new file with mode: 0644]
debian/patches/0001-Some-typos-fixed.patch [new file with mode: 0644]
debian/patches/0002-fix-hardening-no-fortify-functions-debian-lintian-wa.patch [new file with mode: 0644]
debian/patches/0003-fix-return-exit-value-shared-libs-cannot-use-exit-bu.patch [new file with mode: 0644]
debian/patches/destdir.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/source/format [new file with mode: 0644]
debian/watch [new file with mode: 0644]

diff --git a/debian/README.source b/debian/README.source
new file mode 100644 (file)
index 0000000..b45a8c1
--- /dev/null
@@ -0,0 +1,3 @@
+The src/bundles directory has been removed, since ssdeep contains a non-free
+source file edit_dist.c (debian bug: #764357) and we embed it.
+Since bundled deps are not used they are all stripped from the source tarball.
diff --git a/debian/binwalk.1 b/debian/binwalk.1
new file mode 100644 (file)
index 0000000..3dade66
--- /dev/null
@@ -0,0 +1,166 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.44.1.
+.TH BINWALK "1" "August 2014" "binwalk v2.0.1" "User Commands"
+.SH NAME
+binwalk \- tool for searching binary images for embedded files and executable code
+.SH SYNOPSIS
+.B binwalk
+[\fIOPTIONS\fR] [\fIFILE1\fR] [\fIFILE2\fR] [\fIFILE3\fR] ...
+.SH DESCRIPTION
+Binwalk v2.0.0
+Craig Heffner, http://www.binwalk.org
+.SS "Signature Scan Options:"
+.TP
+\fB\-B\fR, \fB\-\-signature\fR
+Scan target file(s) for common file signatures
+.TP
+\fB\-R\fR, \fB\-\-raw=\fR<str>
+Scan target file(s) for the specified sequence of bytes
+.TP
+\fB\-A\fR, \fB\-\-opcodes\fR
+Scan target file(s) for common executable opcodes
+.TP
+\fB\-C\fR, \fB\-\-cast\fR
+Cast offsets as a given data type (use \fB\-y\fR to specify the data type / endianness)
+.TP
+\fB\-m\fR, \fB\-\-magic=\fR<file>
+Specify a custom magic file to use
+.TP
+\fB\-b\fR, \fB\-\-dumb\fR
+Disable smart signature keywords
+.SS "Extraction Options:"
+.TP
+\fB\-e\fR, \fB\-\-extract\fR
+Automatically extract known file types
+.TP
+\fB\-D\fR, \fB\-\-dd=\fR<type:ext:cmd>
+Extract <type> signatures, give the files an extension of <ext>, and execute <cmd>
+.TP
+\fB\-M\fR, \fB\-\-matryoshka\fR
+Recursively scan extracted files
+.TP
+\fB\-d\fR, \fB\-\-depth=\fR<int>
+Limit matryoshka recursion depth (default: 8 levels deep)
+.TP
+\fB\-j\fR, \fB\-\-size=\fR<int>
+Limit the size of each extracted file
+.TP
+\fB\-r\fR, \fB\-\-rm\fR
+Cleanup extracted / zero\-size files after extraction
+.TP
+\fB\-z\fR, \fB\-\-carve\fR
+Carve data from files, but don't execute extraction utilities
+.SS "Entropy Analysis Options:"
+.TP
+\fB\-E\fR, \fB\-\-entropy\fR
+Calculate file entropy
+.TP
+\fB\-J\fR, \fB\-\-save\fR
+Save plot as a PNG
+.TP
+\fB\-N\fR, \fB\-\-nplot\fR
+Do not generate an entropy plot graph
+.TP
+\fB\-Q\fR, \fB\-\-nlegend\fR
+Omit the legend from the entropy plot graph
+.SS "Binary Diffing Options:"
+.TP
+\fB\-W\fR, \fB\-\-hexdump\fR
+Perform a hexdump / diff of a file or files
+.TP
+\fB\-G\fR, \fB\-\-green\fR
+Only show lines containing bytes that are the same among all files
+.TP
+\fB\-i\fR, \fB\-\-red\fR
+Only show lines containing bytes that are different among all files
+.TP
+\fB\-U\fR, \fB\-\-blue\fR
+Only show lines containing bytes that are different among some files
+.TP
+\fB\-w\fR, \fB\-\-terse\fR
+Diff all files, but only display a hex dump of the first file
+.SS "Fuzzy Hash Options:"
+.TP
+\fB\-F\fR, \fB\-\-fuzzy\fR
+Perform fuzzy hash matching on files/directories
+.TP
+\fB\-u\fR, \fB\-\-cutoff=\fR<int>
+Set the cutoff percentage
+.TP
+\fB\-S\fR, \fB\-\-strings\fR
+Diff strings inside files instead of the entire file
+.TP
+\fB\-s\fR, \fB\-\-same\fR
+Only show files that are the same
+.TP
+\fB\-p\fR, \fB\-\-diff\fR
+Only show files that are different
+.TP
+\fB\-n\fR, \fB\-\-name\fR
+Only compare files whose base names are the same
+.TP
+\fB\-L\fR, \fB\-\-symlinks\fR
+Don't ignore symlinks
+.SS "Heuristic Compression Options:"
+.TP
+\fB\-H\fR, \fB\-\-heuristic\fR
+Heuristically classify high entropy data
+.TP
+\fB\-a\fR, \fB\-\-trigger=\fR<float>
+Set the entropy trigger level (0.0 \- 1.0, default: 0.90)
+.SS "Raw Compression Options:"
+.TP
+\fB\-X\fR, \fB\-\-deflate\fR
+Scan for raw deflate compression streams
+.SS "Binary Visualization Options:"
+.TP
+\fB\-3\fR, \fB\-\-3D\fR
+Generate a 3D binary visualization
+.TP
+\fB\-2\fR, \fB\-\-2D\fR
+Project data points onto 3D cube walls only
+.TP
+\fB\-Z\fR, \fB\-\-points=\fR<int>
+Set the maximum number of plotted data points
+.TP
+\fB\-V\fR, \fB\-\-grids\fR
+Display the x\-y\-z grids in the resulting plot
+.SS "General Options:"
+.TP
+\fB\-l\fR, \fB\-\-length=\fR<int>
+Number of bytes to scan
+.TP
+\fB\-o\fR, \fB\-\-offset=\fR<int>
+Start scan at this file offset
+.TP
+\fB\-K\fR, \fB\-\-block=\fR<int>
+Set file block size
+.TP
+\fB\-g\fR, \fB\-\-swap=\fR<int>
+Reverse every n bytes before scanning
+.TP
+\fB\-I\fR, \fB\-\-invalid\fR
+Show results marked as invalid
+.TP
+\fB\-x\fR, \fB\-\-exclude=\fR<str>
+Exclude results that match <str>
+.TP
+\fB\-y\fR, \fB\-\-include=\fR<str>
+Only show results that match <str>
+.TP
+\fB\-f\fR, \fB\-\-log=\fR<file>
+Log results to file
+.TP
+\fB\-c\fR, \fB\-\-csv\fR
+Log results to file in CSV format
+.TP
+\fB\-t\fR, \fB\-\-term\fR
+Format output to fit the terminal window
+.TP
+\fB\-q\fR, \fB\-\-quiet\fR
+Suppress output to stdout
+.TP
+\fB\-v\fR, \fB\-\-verbose\fR
+Enable verbose output
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+Show help output
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..04e9a8d
--- /dev/null
@@ -0,0 +1,74 @@
+binwalk (2.0.1+dfsg-1) unstable; urgency=medium
+
+  * Tweak rules/clean target.
+  * Bump standard version to 3.9.6, no changes required.
+  * Remove bundled deps, ssdeep has a non-free file inside.
+    (cfr: #764357).
+  * Removed bundled depds inside copyright.
+  * Add a README.source file explaining why we remove bundles
+    directory.
+  * Remove libfuzzy2 as b-d, upstream says the feature will be removed
+    in the next release), avoding an autoremoval.
+  * d/copyright: add src/bundles to Files-Excluded, thanks Vincent Cheng!
+
+ -- Gianfranco Costamagna <costamagnagianfranco@yahoo.it>  Wed, 01 Oct 2014 14:44:28 +0200
+
+binwalk (2.0.1-1) unstable; urgency=medium
+
+  * Imported Upstream version 2.0.1 (Closes: #727553, Closes: #754317)
+    - Updated docs location
+  * Tweak rules file to remove binary files when cleaning.
+  * debian/control: add X-Python-Version: >= 2.7 and
+    some new dependencies such as python-pyqtgraph.
+  * debian/control: add python-opengl python-qt4 and python-qt4-gl
+    as depdencies, to force the right pyqtgraph render engine.
+  * patch destdir.patch, add DESTDIR to install path.
+  * Add dh-autoreconf as build-dependency, and some missing
+    runtime dependencies, needed to correctly extract the various
+    kind of supported files.
+  * Bump standard version to 3.9.5, no changes required.
+  * Add myself to uploaders.
+  * debian/{control,watch,copyright} New website (Closes: #734708)
+  * Update VCS fields to canonical.
+  * Update man page.
+  * Update copyright file.
+
+ -- Gianfranco Costamagna <costamagnagianfranco@yahoo.it>  Mon, 30 Jun 2014 12:24:41 +0200
+
+binwalk (1.0-1) unstable; urgency=low
+
+  * [c78b7e93] Imported Upstream version 1.0
+    - full rewrite in python
+  * [5eb6c54c] migrate to new python rewrite
+  * [be1394d6] add python API to /u/s/docs/binwalk
+
+ -- Leo Costela <costela@debian.org>  Wed, 20 Feb 2013 18:21:37 +0100
+
+binwalk (0.5.0-1) unstable; urgency=low
+
+  * [e62042e2] Imported Upstream version 0.5.0
+  * [c04a9633] add patch to fix DESTDIR handling during install
+
+ -- Leo Costela <costela@debian.org>  Thu, 17 Jan 2013 17:12:32 +0100
+
+binwalk (0.4.5-1) unstable; urgency=low
+
+  * [6b44b155] Imported Upstream version 0.4.5
+
+ -- Leo Costela <costela@debian.org>  Sat, 08 Sep 2012 13:19:20 +0200
+
+binwalk (0.4.4-1) unstable; urgency=low
+
+  * [658252c0] Imported Upstream version 0.4.4
+  * [30f6357d] debian/copyright: add copyrighted blocks in magic.* files
+  * [d3607624] drop use_cppflags.patch (merged upstream)
+  * [f7060555] don't build with --enable-libmagic and drop README.source
+
+ -- Leo Costela <costela@debian.org>  Mon, 06 Aug 2012 17:56:57 +0200
+
+binwalk (0.4.3+dfsg-1) unstable; urgency=low
+
+  * First debian package (closes: #660654)
+
+ -- Leo Costela <costela@debian.org>  Sun, 15 Jul 2012 15:55:22 +0200
+
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..5ecb543
--- /dev/null
@@ -0,0 +1,41 @@
+Source: binwalk
+Section: devel
+Priority: optional
+Maintainer: Leo Costela <costela@debian.org>
+Uploaders: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+Build-Depends: debhelper (>= 9),
+ python-all-dev,
+ dh-autoreconf
+Standards-Version: 3.9.6
+X-Python-Version: >= 2.7
+Homepage: https://github.com/devttys0/binwalk
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/binwalk.git
+Vcs-Git: git://anonscm.debian.org/collab-maint/binwalk.git
+
+Package: binwalk
+Architecture: any
+Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends},
+ python-matplotlib,
+ python-pyqtgraph,
+ libmagic1,
+ python-opengl,
+ python-qt4,
+ python-qt4-gl
+Recommends: mtd-utils,
+ ncompress,
+ bzip2,
+ arj,
+ p7zip,
+ p7zip-full,
+ openjdk-7-jdk | openjdk-8-jdk
+Description: tool for searching binary images for embedded files and executable code
+ Binwalk is a tool for searching a given binary image for embedded files
+ and executable code. Specifically, it is designed for identifying files
+ and code embedded inside of firmware images. Binwalk uses the libmagic
+ library, so it is compatible with magic signatures created for the Unix
+ file utility.
+ .
+ Binwalk also includes a custom magic signature file which contains
+ improved signatures for files that are commonly found in firmware images
+ such as compressed/archived files, firmware headers, Linux kernels,
+ bootloaders, filesystems, etc.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..3511fa7
--- /dev/null
@@ -0,0 +1,71 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: binwalk
+Upstream-Contact: Craig Heffner <heffnercj@gmail.com>
+Files-Excluded: src/bundles
+Source: https://github.com/devttys0/binwalk
+
+Files: *
+Copyright: 2010-2012, Craig Heffner <heffnercj@gmail.com>
+License: Expat
+
+Files: src/C/compress/compress42.c
+Copyright: 1984-1992 Spencer W. Thomas, Jim McKie, Steve Davies, Ken Turkowski, James A. Woods, Joe Orost
+           1984-1992 Dave Mack <csu@alembic.acs.com>
+           1984-1992 Peter Jannesen, Network Communication Systems <peter@ncs.nl>
+License: Expat
+
+Files: src/C/miniz/tinfl.c
+Copyright: 2011 Rich Geldreich <richgel99@gmail.com>
+License: unlicense
+
+Files: src/binwalk/magic/binwalk
+       src/magic/compressed
+Copyright: 2003 Andrew Tridgell
+License: other
+ You may do whatever you want with this file
+Comment: this applies only to a small block inside the files
+
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+License: unlicense
+ This is free and unencumbered software released into the public domain.
+ .
+ Anyone is free to copy, modify, publish, use, compile, sell, or
+ distribute this software, either in source code form or as a compiled
+ binary, for any purpose, commercial or non-commercial, and by any
+ means.
+ .
+ In jurisdictions that recognize copyright laws, the author or authors
+ of this software dedicate any and all copyright interest in the
+ software to the public domain. We make this dedication for the benefit
+ of the public at large and to the detriment of our heirs and
+ successors. We intend this dedication to be an overt act of
+ relinquishment in perpetuity of all present and future rights to this
+ software under copyright law.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+ .
+ For more information, please refer to <http://unlicense.org/>
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..1970b9f
--- /dev/null
@@ -0,0 +1,2 @@
+API.md
+README.md
diff --git a/debian/manpages b/debian/manpages
new file mode 100644 (file)
index 0000000..9254061
--- /dev/null
@@ -0,0 +1 @@
+debian/binwalk.1
diff --git a/debian/patches/0001-Some-typos-fixed.patch b/debian/patches/0001-Some-typos-fixed.patch
new file mode 100644 (file)
index 0000000..db20536
--- /dev/null
@@ -0,0 +1,83 @@
+From 9916b0e9b030bd909c25e35b712551f4b07006f0 Mon Sep 17 00:00:00 2001
+From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+Date: Mon, 25 Aug 2014 10:48:52 +0200
+Subject: [PATCH] Some typos fixed
+
+---
+ src/binwalk/core/parser.py       | 14 +++++++-------
+ src/binwalk/modules/general.py   |  2 +-
+ src/binwalk/modules/signature.py |  2 +-
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+--- a/src/binwalk/core/parser.py
++++ b/src/binwalk/core/parser.py
+@@ -263,9 +263,9 @@
+             # Default to little endian, unless the type field starts with 'be'. 
+             # This assumes that we're running on a little endian system...
+             if entry.type.startswith('be'):
+-                endianess = self.BIG_ENDIAN
++                endianness = self.BIG_ENDIAN
+             else:
+-                endianess = self.LITTLE_ENDIAN
++                endianness = self.LITTLE_ENDIAN
+             
+             # Try to convert the condition to an integer. This does not allow
+             # for more advanced conditions for the first line of a signature, 
+@@ -287,8 +287,8 @@
+             elif 'quad' in entry.type:
+                 entry.length = 8
+-            # Convert the integer value to a string of the appropriate endianess
+-            entry.condition = self._to_string(intval, entry.length, endianess)
++            # Convert the integer value to a string of the appropriate endianness
++            entry.condition = self._to_string(intval, entry.length, endianness)
+         return entry
+@@ -332,13 +332,13 @@
+         return candidate_offsets
+-    def _to_string(self, value, size, endianess):
++    def _to_string(self, value, size, endianness):
+         '''
+         Converts an integer value into a raw string.
+         @value     - The integer value to convert.
+         @size      - Size, in bytes, of the integer value.
+-        @endianess - One of self.LITTLE_ENDIAN | self.BIG_ENDIAN.
++        @endianness - One of self.LITTLE_ENDIAN | self.BIG_ENDIAN.
+         Returns a raw string containing value.
+         '''
+@@ -347,7 +347,7 @@
+         for i in range(0, size):
+             data += chr((value >> (8*i)) & 0xFF)
+-        if endianess != self.LITTLE_ENDIAN:
++        if endianness != self.LITTLE_ENDIAN:
+             data = data[::-1]
+         return data
+--- a/src/binwalk/modules/general.py
++++ b/src/binwalk/modules/general.py
+@@ -70,7 +70,7 @@
+         Option(long='quiet',
+                short='q',
+                kwargs={'quiet' : True},
+-               description='Supress output to stdout'),
++               description='Suppress output to stdout'),
+         Option(long='verbose',
+                short='v',
+                kwargs={'verbose' : True},
+--- a/src/binwalk/modules/signature.py
++++ b/src/binwalk/modules/signature.py
+@@ -27,7 +27,7 @@
+             Option(short='C',
+                    long='cast',
+                    kwargs={'enabled' : True, 'cast_data_types' : True},
+-                   description='Cast offsets as a given data type (use -y to specify the data type / endianess)'),
++                   description='Cast offsets as a given data type (use -y to specify the data type / endianness)'),
+             Option(short='m',
+                    long='magic',
+                    kwargs={'enabled' : True, 'magic_files' : []},
diff --git a/debian/patches/0002-fix-hardening-no-fortify-functions-debian-lintian-wa.patch b/debian/patches/0002-fix-hardening-no-fortify-functions-debian-lintian-wa.patch
new file mode 100644 (file)
index 0000000..1458687
--- /dev/null
@@ -0,0 +1,61 @@
+From c594e03abaadd3757bbb6a1f737486afc5e1f616 Mon Sep 17 00:00:00 2001
+From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+Date: Mon, 25 Aug 2014 10:54:13 +0200
+Subject: [PATCH] fix hardening-no-fortify-functions debian lintian warning
+
+---
+ Makefile.in             | 1 +
+ src/C/compress/Makefile | 4 ++--
+ src/C/miniz/Makefile    | 4 ++--
+ 3 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 83b9aea..618e98a 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -1,5 +1,6 @@
+ export CC=@CC@
+ export CFLAGS=@CFLAGS@
++export CPPFLAGS=@CPPFLAGS@
+ export SONAME=@SONAME@
+ export SOEXT=@SOEXT@
+ export prefix=@prefix@
+diff --git a/src/C/compress/Makefile b/src/C/compress/Makefile
+index 1531d75..12f5996 100644
+--- a/src/C/compress/Makefile
++++ b/src/C/compress/Makefile
+@@ -3,11 +3,11 @@ LIBNAME=libcompress42.$(SOEXT)
+ all: $(LIBNAME)
+ $(LIBNAME): compress42.o
+-      $(CC) $(CFLAGS) -shared -Wl,$(SONAME),$(LIBNAME) compress42.o -o $(LIBNAME) $(LDFLAGS)
++      $(CC) $(CFLAGS) $(CPPFLAGS) -shared -Wl,$(SONAME),$(LIBNAME) compress42.o -o $(LIBNAME) $(LDFLAGS)
+       chmod +x $(LIBNAME)
+ compress42.o:
+-      $(CC) $(CFLAGS) compress42.c -c
++      $(CC) $(CFLAGS) $(CPPFLAGS) compress42.c -c
+ install:
+       mkdir -p $(DESTDIR)$(LIBDIR)
+diff --git a/src/C/miniz/Makefile b/src/C/miniz/Makefile
+index d8c7448..b3727be 100644
+--- a/src/C/miniz/Makefile
++++ b/src/C/miniz/Makefile
+@@ -3,11 +3,11 @@ LIBNAME=libtinfl.$(SOEXT)
+ all: $(LIBNAME)
+ $(LIBNAME): tinfl.o
+-      $(CC) $(CFLAGS) -shared -Wl,$(SONAME),$(LIBNAME) tinfl.o -o $(LIBNAME) $(LDFLAGS)
++      $(CC) $(CFLAGS) $(CPPFLAGS) -shared -Wl,$(SONAME),$(LIBNAME) tinfl.o -o $(LIBNAME) $(LDFLAGS)
+       chmod +x $(LIBNAME)
+ tinfl.o:
+-      $(CC) $(CFLAGS) -c tinfl.c
++      $(CC) $(CFLAGS) $(CPPFLAGS) -c tinfl.c
+ install:
+       mkdir -p $(DESTDIR)$(LIBDIR)
+-- 
+1.9.1
+
diff --git a/debian/patches/0003-fix-return-exit-value-shared-libs-cannot-use-exit-bu.patch b/debian/patches/0003-fix-return-exit-value-shared-libs-cannot-use-exit-bu.patch
new file mode 100644 (file)
index 0000000..f5dc66a
--- /dev/null
@@ -0,0 +1,132 @@
+From c37f8e9081407225d84bfb2215250823898de810 Mon Sep 17 00:00:00 2001
+From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+Date: Mon, 25 Aug 2014 11:17:12 +0200
+Subject: [PATCH] fix return exit value, shared libs cannot use exit, but
+ return instead
+
+---
+ src/C/compress/compress42.c | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+--- a/src/C/compress/compress42.c
++++ b/src/C/compress/compress42.c
+@@ -193,7 +193,6 @@
+       extern  void    *memset LARGS((void *,char,unsigned int));
+       extern  void    *memcpy LARGS((void *,void const *,unsigned int));
+       extern  int             atoi    LARGS((char const *));
+-      extern  void    exit    LARGS((int));
+       extern  int             isatty  LARGS((int));
+ #endif
+       
+@@ -645,7 +644,7 @@
+ #endif
+ int   main                    ARGS((int,char **));
+-void          Usage                   ARGS((void));
++int   Usage                   ARGS((void));
+ void          comprexx                ARGS((char **));
+ void          compdir                 ARGS((char *));
+ void          compress                ARGS((int,int));
+@@ -654,9 +653,9 @@
+ int   is_compressed           ARGS((char *,int));
+ void          read_error              ARGS((void));
+ void          write_error             ARGS((void));
+-void  abort_compress  ARGS((void));
++int   abort_compress  ARGS((void));
+ void          prratio                 ARGS((FILE *,long,long));
+-void          about                   ARGS((void));
++int   about                   ARGS((void));
+ /*****************************************************************
+  * TAG( main )
+@@ -724,7 +723,7 @@
+       if (filelist == NULL)
+               {
+                       fprintf(stderr, "Cannot allocate memory for file list.\n");
+-                      exit (1);
++                      return 1;
+               }
+       fileptr = filelist;
+       *filelist = NULL;
+@@ -765,9 +764,8 @@
+                                       {
+                               case 'V':
+                                               about();
+-                                              break;
+-
+-                                      case 's':
++                                              return 0;
++                              case 's':
+                                               silent = 1;
+                                               quiet = 1;
+                                               break;
+@@ -799,6 +797,7 @@
+                                               {
+                                               fprintf(stderr, "Missing maxbits\n");
+                                               Usage();
++                                              return 1;
+                                               }
+                                               maxbits = atoi(*argv);
+@@ -823,6 +822,7 @@
+                               default:
+                                               fprintf(stderr, "Unknown flag: '%c'; ", **argv);
+                                               Usage();
++                                              return 1;
+                                       }
+                       }
+                       }
+@@ -873,10 +873,10 @@
+               //rsize = read(0, input_buffer, sizeof(input_buffer));
+               //decompress(input_buffer, rsize);
+-              //exit((exit_code== -1) ? 1:exit_code);
++              //return (exit_code== -1) ? 1:exit_code;
+       }
+-void
++int
+ Usage()
+       {
+               fprintf(stderr, "\
+@@ -894,7 +894,7 @@
+        -r   Recursive. If a filename is a directory, descend\n\
+             into it and compress everything in it.\n");
+-              exit(1);
++              return 1;
+       }
+ void
+@@ -1888,13 +1888,13 @@
+               abort_compress();
+       }
+-void
++int
+ abort_compress()
+       {
+               if (remove_ofname)
+               unlink(ofname);
+-              exit(1);
++              return 1;
+       }
+ void
+@@ -1924,7 +1924,7 @@
+               fprintf(stream, "%d.%02d%%", q / 100, q % 100);
+       }
+-void
++int
+ about()
+       {
+               /* CJH */
+@@ -1977,5 +1977,5 @@
+      Spencer W. Thomas, Jim McKie, Steve Davies,\n\
+      Ken Turkowski, James A. Woods, Joe Orost\n");
+-              exit(0);
++              return 0;
+       }
diff --git a/debian/patches/destdir.patch b/debian/patches/destdir.patch
new file mode 100644 (file)
index 0000000..831ae72
--- /dev/null
@@ -0,0 +1,13 @@
+Author: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+Description: install the program in DESTDIR std location, patch already merged upstream
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -22,7 +22,7 @@
+ ifeq ($(strip $(prefix)),)
+       PREFIX=""
+ else
+-      PREFIX="--prefix=$(prefix)"
++      PREFIX="--prefix=$(DESTDIR)$(prefix)"
+ endif
+ .PHONY: all install build deps clean uninstall
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..a5b715a
--- /dev/null
@@ -0,0 +1,4 @@
+destdir.patch
+0001-Some-typos-fixed.patch
+0002-fix-hardening-no-fortify-functions-debian-lintian-wa.patch
+0003-fix-return-exit-value-shared-libs-cannot-use-exit-bu.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..7dc9556
--- /dev/null
@@ -0,0 +1,12 @@
+#!/usr/bin/make -f
+
+# export DH_VERBOSE=1
+
+override_dh_auto_clean:
+       if [ -e Makefile ]; then dh_auto_clean; fi
+
+override_dh_auto_configure:
+       dh_auto_configure -- --disable-bundles
+
+%:
+       dh $@ --with autoreconf,python2
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644 (file)
index 0000000..15961fc
--- /dev/null
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/(\+|\.)dfsg$// \
+       https://github.com/devttys0/binwalk/tags .*/v?(\d\S*)\.tar\.gz