[Pkg-privacy-commits] [flashproxy] 35/65: add `debian/rules e2e-check` for convenience, and make it more robust - use TOR_SOCKS_PORT consistently - work with signed and unsigned .changes files

Ximin Luo infinity0 at moszumanska.debian.org
Fri Aug 21 13:49:43 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch _volatile-rc
in repository flashproxy.

commit 435bf559d56c83fc9b17757f203288fcd29be863
Author: Ximin Luo <infinity0 at pwned.gg>
Date:   Mon May 19 17:25:06 2014 +0100

    add `debian/rules e2e-check` for convenience, and make it more robust
    - use TOR_SOCKS_PORT consistently
    - work with signed and unsigned .changes files
---
 debian/flashproxy-end-to-end-test.sh |  5 +++--
 debian/rules                         | 10 ++++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/debian/flashproxy-end-to-end-test.sh b/debian/flashproxy-end-to-end-test.sh
index 04a49c2..e3de17a 100755
--- a/debian/flashproxy-end-to-end-test.sh
+++ b/debian/flashproxy-end-to-end-test.sh
@@ -36,7 +36,8 @@ if [ -f "$1" ]; then
 	perl - "$1" <<-'EOF' | cut '-d ' -f5 | grep '.deb$' | { cd "$(dirname "$1")" && xargs sudo dpkg -i; }
 	use Parse::DebControl;
 	$parser = new Parse::DebControl;
-	@data = @{$parser->parse_file("gpg --decrypt $ARGV[0] 2>/dev/null|", $options)};
+	@data = @{$parser->parse_file("{ grep -q SIGNATURE $ARGV[0] && \
+	  gpg --decrypt $ARGV[0] 2>/dev/null || cat $ARGV[0]; } |", $options)};
 	$files = $data[0]{'Files'};
 	$files =~ s/^\n+//;
 	print "$files\n";
@@ -84,7 +85,7 @@ sudo service apache2 restart
 # configure flashproxy-client
 cp /usr/share/doc/flashproxy-client/torrc .
 sed -i -e 's|./flashproxy-client|/usr/bin/flashproxy-client -f https://localhost --facilitator-pubkey /etc/flashproxy/reg-daemon.pub -4 --register-methods http|g' torrc
-echo "SocksPort 19050" >> torrc
+echo "SocksPort $TOR_SOCKS_PORT" >> torrc
 
 # start tor and node-flashproxy
 tor -f torrc & pid_tor=$!
diff --git a/debian/rules b/debian/rules
index 9a2f06d..41dc485 100755
--- a/debian/rules
+++ b/debian/rules
@@ -54,3 +54,13 @@ override_dh_auto_clean:
 	dh_auto_clean $(DH_facilitator)
 	dh_auto_clean $(DH_proxy)
 	rm -f setup.py
+
+e2e-check:
+	dpkg -s libparse-debcontrol-perl >/dev/null
+	CHANGES="../flashproxy_$$(dpkg-parsechangelog -SVersion)_$$(dpkg --print-architecture).changes"; \
+	if [ -f "$$CHANGES" ]; then \
+		debian/flashproxy-end-to-end-test.sh "$$CHANGES"; \
+	else \
+		echo >&2 "did you built the package yet? file not found: $$CHANGES"; \
+		false; \
+	fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/flashproxy.git



More information about the Pkg-privacy-commits mailing list