[DRE-commits] [SCM] ruby-openid.git branch, master, updated. upstream/2.1.8-6-g1e6debd

Paul van Tilburg paulvt at debian.org
Fri May 11 22:47:53 UTC 2012


The following commit has been merged in the master branch:
commit cea62629eb990c6f7c0ed954eeeeb500717b0b92
Author: Paul van Tilburg <paulvt at debian.org>
Date:   Sat May 12 00:32:33 2012 +0200

    Merged some more changes from the old libopenid-ruby package

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..92348f1
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,7 @@
+The tarball is repacked by debian/repack.sh, which is called
+automatically from uscan.
+
+Patches to the upstream source are applied during build from
+debian/patches/. Use "make -f debian/rules apply-patches" to apply
+them and "make -f debian/rules reverse-patches" to unapply them.
+You can use cdbs-edit-patch(1) to edit these patches.
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..fba1157
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+use-system-installed-hmac
diff --git a/debian/patches/use-system-installed-hmac b/debian/patches/use-system-installed-hmac
new file mode 100644
index 0000000..cd521d8
--- /dev/null
+++ b/debian/patches/use-system-installed-hmac
@@ -0,0 +1,15 @@
+Index: libopenid-ruby-2.1.8debian.orig/lib/openid/cryptutil.rb
+===================================================================
+--- libopenid-ruby-2.1.8debian.orig.orig/lib/openid/cryptutil.rb	2010-04-11 22:20:42.000000000 -0300
++++ libopenid-ruby-2.1.8debian.orig/lib/openid/cryptutil.rb	2010-04-11 22:20:53.000000000 -0300
+@@ -4,8 +4,8 @@
+ begin
+   require "digest/hmac"
+ rescue LoadError
+-  require "hmac/sha1"
+-  require "hmac/sha2"
++  require "hmac-sha1"
++  require "hmac-sha2"
+ end
+ 
+ module OpenID
diff --git a/debian/repack.sh b/debian/repack.sh
new file mode 100755
index 0000000..400a563
--- /dev/null
+++ b/debian/repack.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Repackage upstream source to exclude non-distributable files
+# should be called as "repack.sh --upstream-source <ver> <downloaded file>
+# (for example, via uscan)
+
+set -e
+set -u
+
+VER="$2debian"
+FILE="$3"
+PKG=`dpkg-parsechangelog|grep ^Source:|sed 's/^Source: //'`
+
+REPACK_DIR="$PKG-$VER.orig" # DevRef § 6.7.8.2
+
+echo -e "\nRepackaging $FILE\n"
+
+DIR=`mktemp -d ./tmpRepackXXXXXX`
+trap "rm -rf \"$DIR\"" QUIT INT EXIT
+
+# Create an extra directory to cope with rootless tarballs
+UP_BASE="$DIR/unpack"
+mkdir "$UP_BASE"
+tar xjf "$FILE" -C "$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
+
+## Remove stuff
+rm -vfr $UP_BASE/lib/hmac
+## End
+
+mv "$UP_BASE" "$DIR/$REPACK_DIR"
+
+# Using a pipe hides tar errors!
+tar cfC "$DIR/repacked.tar" "$DIR" "$REPACK_DIR"
+gzip -9 < "$DIR/repacked.tar" > "$DIR/repacked.tar.gz"
+RESULTING_FILE="$(dirname $FILE)/${PKG}_${VER}.orig.tar.gz"
+mv "$DIR/repacked.tar.gz" "$RESULTING_FILE"
+rm -f "$FILE"
+
+echo "*** $FILE repackaged"
+echo "*** Please note that the upstream version must be $VER since we are repackaging the tarball!"

-- 
ruby-openid.git



More information about the Pkg-ruby-extras-commits mailing list