diff options
author | David Spencer <baildon.research@googlemail.com> | 2016-12-29 08:44:21 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-12-31 08:22:12 +0700 |
commit | 2cb3e7b88b1df0d1123fd5e08e22e4c6ba861d04 (patch) | |
tree | a2437e0ec007a1d5ea42abd24c2f5bb20cf94ef7 /development/diffoscope | |
parent | e8e323bd5ac350e95761d09a7125ed036fc97085 (diff) |
development/diffoscope: Added (in-depth comparison tool).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/diffoscope')
-rw-r--r-- | development/diffoscope/README | 29 | ||||
-rw-r--r-- | development/diffoscope/diffoscope.1 | 108 | ||||
-rw-r--r-- | development/diffoscope/diffoscope.SlackBuild | 88 | ||||
-rw-r--r-- | development/diffoscope/diffoscope.info | 10 | ||||
-rw-r--r-- | development/diffoscope/slack-desc | 19 |
5 files changed, 254 insertions, 0 deletions
diff --git a/development/diffoscope/README b/development/diffoscope/README new file mode 100644 index 000000000000..4ed67559e7ff --- /dev/null +++ b/development/diffoscope/README @@ -0,0 +1,29 @@ +diffoscope will try to get to the bottom of what makes files or +directories different. It will recursively unpack archives of many +kinds and transform various binary formats into more human readable +form to compare them. + + +Mandatory Dependencies + +Both python-magic and python-libarchive-c must be built with python3 +support, for example + + PYTHON3=yes ./python-magic.SlackBuild + PYTHON3=yes ./python-libarchive-c.SlackBuild + + +Optional Dependencies + +argcomplete (for argument completion) +colord (for comparing images) +colordiff (for comparing images) +fontforge (for comparing font files) +fpc (for Pascal support) +ghc (for Haskell support) +graphviz (for comparing images) +jdk (for Java support) +mono (for Mono support) +pdftk (for comparing pdf documents) +sng (for comparing images) +tlsh (for fuzzy matching -- must build tlsh with 'PYTHON3=yes') diff --git a/development/diffoscope/diffoscope.1 b/development/diffoscope/diffoscope.1 new file mode 100644 index 000000000000..a816cd5171df --- /dev/null +++ b/development/diffoscope/diffoscope.1 @@ -0,0 +1,108 @@ +.\" Man page generated from reStructuredText. +. +.TH DIFFOSCOPE 1 "" "" "Debian" +.SH NAME +diffoscope \- in-depth comparison of files, archives, and directories +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.SH SYNOPSIS +.INDENT 0.0 +.INDENT 3.5 +diffoscope [\-h] [\-\-version] [\-\-debug] [\-\-html output] [\-\-text output] [\-\-max\-report\-size bytes] [\-\-css url] file1 file2 +.UNINDENT +.UNINDENT +.SH DESCRIPTION +.sp +diffoscope will try to get to the bottom of what makes files or +directories different. It will recursively unpack archives of many kinds +and transform various binary formats into more human readable form to +compare them. It can compare two tarballs, ISO images, or PDF just as +easily. +.sp +It can be scripted through error codes, and a report can be produced +with the detected differences. The report can be text or HTML. +When no type of report has been selected, diffoscope defaults +to write a text report on the standard output. +.sp +diffoscope is developed as part of the “reproducible builds” Debian +project and was formerly known as “debbindiff”. +.SH OPTIONS +.INDENT 0.0 +.TP +.B \-h\fP,\fB \-\-help +show this help message and exit +.TP +.B \-\-version +show program\(aqs version number and exit +.TP +.B \-\-debug +display debug messages +.TP +.BI \-\-html \ output +write HTML report to given file +(use \- for standard output) +.TP +.BI \-\-text \ output +write plain text report to given file +(use \- for standard output) +.TP +.BI \-\-max\-report\-size \ BYTES +maximum bytes written in report (default: 2048000) +.TP +.BI \-\-max\-diff\-block\-lines \ MAX_DIFF_BLOCK_LINES +maximum number of lines per diff block (default: 50) +.TP +.BI \-\-max\-diff\-input\-lines \ MAX_DIFF_INPUT_LINES +maximum number of lines fed to diff (default: 100000) +.TP +.BI \-\-fuzzy\-threshold \ FUZZY_THRESHOLD +threshold for fuzzy\-matching (0 to disable, 60 is +default, 400 is high fuzziness) +.TP +.B \-\-new\-file +treat absent files as empty +.TP +.BI \-\-css \ url +link to an extra CSS for the HTML report +.UNINDENT +.SH EXIT STATUS +.sp +Exit status is 0 if inputs are the same, 1 if different, 2 if trouble. +.SH SEE ALSO +.INDENT 0.0 +.IP \(bu 2 +\fI<https://diffoscope.org/>\fP +.IP \(bu 2 +\fI<https://wiki.debian.org/ReproducibleBuilds>\fP +.UNINDENT +.SH AUTHOR +Debian "Reproducible Builds" Team +.SH COPYRIGHT +GPL-3+ +.\" Generated by docutils manpage writer. +. diff --git a/development/diffoscope/diffoscope.SlackBuild b/development/diffoscope/diffoscope.SlackBuild new file mode 100644 index 000000000000..f9057e7e4c6c --- /dev/null +++ b/development/diffoscope/diffoscope.SlackBuild @@ -0,0 +1,88 @@ +#!/bin/sh + +# Slackware build script for diffoscope + +# Copyright 2016 David Spencer, Baildon, West Yorkshire, U.K. +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 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. + +PRGNAM=diffoscope +VERSION=${VERSION:-66} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +python3 setup.py install --root=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/man/man1 +gzip -9 < $CWD/diffoscope.1 > $PKG/usr/man/man1/diffoscope.1.gz + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING README.rst $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/development/diffoscope/diffoscope.info b/development/diffoscope/diffoscope.info new file mode 100644 index 000000000000..c2dfeb04e411 --- /dev/null +++ b/development/diffoscope/diffoscope.info @@ -0,0 +1,10 @@ +PRGNAM="diffoscope" +VERSION="66" +HOMEPAGE="https://diffoscope.org/" +DOWNLOAD="https://pypi.python.org/packages/e2/63/ea3fd64021c90d067706fe4dcb5c122ab91e71493ff3ac413aeb49c62c90/diffoscope-66.tar.gz" +MD5SUM="816c24c11950a6ee96ace9ed45e6f583" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="python-libarchive-c python-magic" +MAINTAINER="David Spencer" +EMAIL="baildon.research@googlemail.com" diff --git a/development/diffoscope/slack-desc b/development/diffoscope/slack-desc new file mode 100644 index 000000000000..c137cc61cd64 --- /dev/null +++ b/development/diffoscope/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +diffoscope: diffoscope (in-depth comparison tool) +diffoscope: +diffoscope: diffoscope will try to get to the bottom of what makes files or +diffoscope: directories different. It will recursively unpack archives of many +diffoscope: kinds and transform various binary formats into more human readable +diffoscope: form to compare them. +diffoscope: +diffoscope: https://diffoscope.org/ +diffoscope: +diffoscope: +diffoscope: |