On Sat, May 11, 2019 at 02:49:11PM +0000, Dmitry Bogatov wrote:
> From 2789fed85a6088c85f8f37ba96984eb7f3d8e8ef Mon Sep 17 00:00:00 2001
> From: Dmitry Bogatov <[email protected]>
> Date: Fri, 10 May 2019 23:32:01 +0000
> Subject: [PATCH] Make debian-watch-uses-insecure-uri more generic
>
> Instead of using hard-coded list of hosts, that are known to support
> https new implementation just replace "http://" with "https://" and
> makes sure, that uscan report is same.
Does lintian-brush still build successfully under e.g. sbuild with this patch?
I suspect that this makes the test for debian-watch-uses-insecure-uri fail
because it now needs internet access.
This also seems to unconditionally run uscan, regardless of whether there are
any
http: URLs in debian/watch, slowing down lintian-brush in situations when
there's nothing to fix. Could you perhaps grep for http: first?
> ---
> fixers/debian-watch-uses-insecure-uri.sh | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/fixers/debian-watch-uses-insecure-uri.sh
> b/fixers/debian-watch-uses-insecure-uri.sh
> index 85136b8..59c1e4f 100755
> --- a/fixers/debian-watch-uses-insecure-uri.sh
> +++ b/fixers/debian-watch-uses-insecure-uri.sh
> @@ -1,6 +1,17 @@
> #!/bin/sh
> -perl -p -i -e
> 's/http:\/\/code.launchpad.net\//https:\/\/code.launchpad.net\//' debian/watch
> -perl -p -i -e 's/http:\/\/launchpad.net\//https:\/\/launchpad.net\//'
> debian/watch
> -perl -p -i -e 's/http:\/\/ftp.gnu.org\//https:\/\/ftp.gnu.org\//'
> debian/watch
> +before=$(mktemp)
> +after=$(mktemp)
> +uscan --dehs > "${before}" 2>&1
> +sed -i.bak s,http://,https://,g debian/watch
> +uscan --dehs > "${after}" 2>&1
> +
> +# Make sure that reports are same up to http/https substitution in URL.
> +sed -i s,http://,https://,g "${before}" "${after}"
> +if cmp -s "${before}" "${after}" ; then
> + rm -f debian/watch.bak
> +else
> + mv debian/watch.bak debian/watch
> +fi
> +rm -f "${before}" "${after}"
> echo "Use secure URI in debian/watch."
> echo "Fixed-Lintian-Tags: debian-watch-uses-insecure-uri"