[Python-modules-commits] r31384 - in packages/pynag/trunk/debian (6 files)

spamaps at users.alioth.debian.org spamaps at users.alioth.debian.org
Tue Nov 4 05:26:02 UTC 2014


    Date: Tuesday, November 4, 2014 @ 05:26:01
  Author: spamaps
Revision: 31384

Removing docs/_source/jquery.js and docs/_source/underscore.js per
policy and lintian errors.

Added:
  packages/pynag/trunk/debian/README.Source
  packages/pynag/trunk/debian/repack.local
  packages/pynag/trunk/debian/repack.sh
Modified:
  packages/pynag/trunk/debian/changelog
  packages/pynag/trunk/debian/copyright
  packages/pynag/trunk/debian/watch

Added: packages/pynag/trunk/debian/README.Source
===================================================================
--- packages/pynag/trunk/debian/README.Source	                        (rev 0)
+++ packages/pynag/trunk/debian/README.Source	2014-11-04 05:26:01 UTC (rev 31384)
@@ -0,0 +1,2 @@
+docs/_static/jquery.js and docs_static/underscore.js are removed as they
+are vendored libraries.

Modified: packages/pynag/trunk/debian/changelog
===================================================================
--- packages/pynag/trunk/debian/changelog	2014-11-04 05:00:04 UTC (rev 31383)
+++ packages/pynag/trunk/debian/changelog	2014-11-04 05:26:01 UTC (rev 31384)
@@ -1,6 +1,8 @@
-pynag (0.9.1-1) UNRELEASED; urgency=medium
+pynag (0.9.1+dfsg-1) UNRELEASED; urgency=medium
 
   * New Upstream release
+  * Removing docs/_source/jquery.js and docs/_source/underscore.js per
+    policy and lintian errors.
 
  -- Clint Byrum <spamaps at debian.org>  Tue, 04 Nov 2014 05:22:48 +0100
 

Modified: packages/pynag/trunk/debian/copyright
===================================================================
--- packages/pynag/trunk/debian/copyright	2014-11-04 05:00:04 UTC (rev 31383)
+++ packages/pynag/trunk/debian/copyright	2014-11-04 05:26:01 UTC (rev 31384)
@@ -22,3 +22,10 @@
  .
  On Debian systems, the complete text of the GNU General
  Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+Files: debian/repack.sh
+Copyright: 2009, Ryan Niebur <ryan at debian.org>
+ 2009-2011, gregor herrmann <gregoa at debian.org>
+License: Artistic or GPL-1+
+ This program is free software and can be distributed under the same terms as
+ Perl.

Added: packages/pynag/trunk/debian/repack.local
===================================================================
--- packages/pynag/trunk/debian/repack.local	                        (rev 0)
+++ packages/pynag/trunk/debian/repack.local	2014-11-04 05:26:01 UTC (rev 31384)
@@ -0,0 +1,2 @@
+rm docs/_static/jquery.js
+rm docs/_static/underscore.js

Added: packages/pynag/trunk/debian/repack.sh
===================================================================
--- packages/pynag/trunk/debian/repack.sh	                        (rev 0)
+++ packages/pynag/trunk/debian/repack.sh	2014-11-04 05:26:01 UTC (rev 31384)
@@ -0,0 +1,219 @@
+#!/bin/sh
+
+# see the repack.stub for how to use
+
+# Copyright 2009, Ryan Niebur <ryan at debian.org>
+# Copyright 2009-2011, gregor herrmann <gregoa at debian.org>
+# License: Artistic or GPL-1+
+
+# TODO: provide example watch files and repack.locals
+# TODO: test suite. problems fixed that need to be tested:
+# * globbing
+# * whitespace and then comments in the MANIFEST
+# TODO: does / in weird places work? test suite too.
+# TODO: I actually broke stuff with the MANIFEST change not thinking..
+# TODO: allow for a sepearate (and multiple) MANIFEST files, then
+# de-uglify libsyntax-highlight-engine-kate-perl.
+# TODO: have each mv and rm check that something actually changed, and
+# if not, die
+
+set -e
+set -u
+
+usage() {
+    echo "Usage: repack.sh --upstream-version <ver> <downloaded file>"
+    exit 1
+}
+
+if [ "$#" != "3" ]; then
+    usage
+fi
+if [ "$1" != "--upstream-version" ]; then
+    usage
+fi
+if [ ! -f "$3" ]; then
+    if [ -n "$3" ]; then
+        echo "$3 doesn't exist"
+    fi
+    usage
+fi
+VER="$2"
+FILE="$3"
+PKG=`dpkg-parsechangelog --show-field Source`
+
+SUFFIX="+dfsg"
+
+echo
+echo "Repackaging $FILE"
+echo
+
+DIR=`mktemp -d ./tmpRepackXXXXXX`
+DIR=$(readlink -f "$DIR")
+trap "/bin/rm -rf \"$DIR\"" QUIT INT EXIT
+
+# Create an extra directory to cope with rootless tarballs
+UP_BASE="$DIR/unpack"
+mkdir "$UP_BASE"
+tar xf "$FILE" -C "$UP_BASE" || unzip "$FILE" -d "$UP_BASE"
+
+if [ `ls -1 "$UP_BASE" | wc -l` -eq 1 ]; then
+	# Tarball does contain a root directory
+	UP_BASE="$UP_BASE/`ls -1 "$UP_BASE"`"
+fi
+
+RM_OPTS="-vrf"
+
+real_rm(){
+    /bin/rm "$@"
+}
+
+real_mv(){
+    /bin/mv "$@"
+}
+
+rm(){
+    set +f
+    MYOLDPWD=$(pwd)
+    cd "$UP_BASE"
+    if [ "$MANIFEST" = "1" ]; then
+        PERM=$(stat --format=%a "MANIFEST")
+        chmod u+w "MANIFEST"
+    fi
+    for i in $@; do
+        if [ "$MANIFEST" = "1" ]; then
+            PATTERN="^$i"
+            if [ -d "$i" ]; then
+                if ! { echo "$PATTERN" | grep -q "/$" ; }; then
+                    PATTERN="${PATTERN}/"
+                fi
+            else
+                PATTERN="${PATTERN}\s?"
+            fi
+            grep -Ev "$PATTERN" "MANIFEST" > "$DIR/MANIFEST"
+            real_mv "$DIR/MANIFEST" "MANIFEST"
+        fi
+        real_rm "$RM_OPTS" "$i"
+    done
+    if [ "$MANIFEST" = "1" ]; then
+        chmod $PERM "MANIFEST"
+    fi
+    cd $MYOLDPWD
+    set -f
+}
+
+mv(){
+    set +f
+    OLD=$(pwd)
+    cd $UP_BASE
+    real_mv "$@"
+    cd $OLD
+    if [ "$MANIFEST" = "1" ]; then
+        echo "MANIFEST cannot be manipulated with mv yet, patches welcome"
+        exit 1
+    fi
+    set -f
+}
+
+# bump with incompatible changes
+REPACK_VERSION=4
+
+requires_version(){
+    if [ $REPACK_VERSION -lt $1 ]; then
+        echo "repack.sh is not up to date enough for this package. you need at least version $1, while this script is only version $REPACK_VERSION"
+        exit 1
+    fi
+}
+
+MANIFEST=0
+## Remove stuff
+set -f
+MYORIGPWD=$(pwd)
+cd "$UP_BASE"
+. "$MYORIGPWD/debian/repack.local"
+cd $MYORIGPWD
+set +f
+## End
+
+REPACK_DIR="$PKG-${VER}${SUFFIX}.orig" # DevRef § 6.7.8.2
+DFSG_TAR="$(dirname $FILE)/${PKG}_${VER}${SUFFIX}.orig.tar"
+
+real_mv "$UP_BASE" "$DIR/$REPACK_DIR"
+
+# .gz or .bz2?
+FILETYPE=$(file --brief --mime-type --dereference "$FILE")
+case "$FILETYPE" in
+    application/x-gzip|application/gzip|application/zip)
+        C_PROGRAM="gzip"
+        C_SUFFIX="gz"
+        ;;
+    application/x-bzip2|application/bzip2)
+        C_PROGRAM="bzip2"
+        C_SUFFIX="bz2"
+        ;;
+    application/x-xz|application/xz)
+        C_PROGRAM="xz"
+        C_SUFFIX="xz"
+        ;;
+    *)
+        echo "E: Unknown filetye $FILETYPE"
+        exit 1
+        ;;
+esac
+    
+# Using a pipe hides tar errors!
+tar cfC "$DIR/repacked.tar" "$DIR" "$REPACK_DIR"
+$C_PROGRAM -9 < "$DIR/repacked.tar" > "$DIR/repacked.tar.$C_SUFFIX"
+
+real_mv "$DIR/repacked.tar.$C_SUFFIX" "$DFSG_TAR.$C_SUFFIX"
+
+echo "*** $DFSG_TAR.$C_SUFFIX ready"
+
+exit 0
+POD=<<EOF
+=head1 NAME
+
+dpt-repack -- repackaging helper
+
+=head1 SYNOPSIS
+
+B<dpt repack> --upstream-version I<version> I<downloaded file>"
+
+=head1 DESCRIPTION
+
+B<dpt repack> helps creating repackaged tarballs, suitable for feeding
+L<dpkg-source(1)>.
+
+Work is commenced in three stages:
+
+=over
+
+=item
+
+B<dpt repack> unpacks the provided upstream tarball.
+
+=item
+
+F<debian/repack.local> is sourced to remove unsuitable content.
+
+=item
+
+B<dpt repack> packs the sources again, under a suitable file name in the
+form C<package_ver.orig.tar.gz> (suffix depending on initial compression).
+
+=back
+
+B<dpt repack> invokes F<debian/repack.local> in an environment where B<rm> and
+B<mv> are replaced with functions that reflect the operations in the
+F<MANIFEST> file, if present.
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2009, Ryan Niebur L<ryan at debian.org>
+
+Copyright 2009-2011, gregor herrmann L<gregoa at debian.org>
+
+This program is free software and can be distributed under the same terms as
+Perl.
+
+=cut
+EOF

Modified: packages/pynag/trunk/debian/watch
===================================================================
--- packages/pynag/trunk/debian/watch	2014-11-04 05:00:04 UTC (rev 31383)
+++ packages/pynag/trunk/debian/watch	2014-11-04 05:26:01 UTC (rev 31384)
@@ -1,2 +1,4 @@
 version=3
-https://pypi.python.org/packages/source/p/pynag/pynag-(.*).tar.gz
+opts=dversionmangle=s/\+dfsg$// \
+https://pypi.python.org/packages/source/p/pynag/pynag-(.*).tar.gz \
+debian sh debian/repack.sh




More information about the Python-modules-commits mailing list