Debian Bug report logs - #831521
[uscan] add support to run custom mk-origtargz

version graph

Package: devscripts; Maintainer for devscripts is Devscripts Maintainers <[email protected]>; Source for devscripts is src:devscripts (PTS, buildd, popcon).

Reported by: Sergio Durigan Junior <[email protected]>

Date: Sat, 16 Jul 2016 21:54:06 UTC

Severity: wishlist

Merged with 858319

Found in versions devscripts/2.17.2, devscripts/2.17.6+deb9u1

Full log


🔗 View this message in rfc822 format

X-Loop: [email protected]
Subject: Bug#831521: uscan: Implement new 'nomktar' option on watch file
Reply-To: Sergio Durigan Junior <[email protected]>, [email protected]
Resent-From: Sergio Durigan Junior <[email protected]>
Resent-To: [email protected]
Resent-CC: Devscripts Devel Team <[email protected]>
X-Loop: [email protected]
Resent-Date: Sat, 16 Jul 2016 21:54:06 +0000
Resent-Message-ID: <[email protected]>
Resent-Sender: [email protected]
X-Debian-PR-Message: report 831521
X-Debian-PR-Package: devscripts
X-Debian-PR-Keywords: patch
X-Debian-PR-Source: devscripts
Received: via spool by [email protected] id=B.146870589619650
          (code B); Sat, 16 Jul 2016 21:54:06 +0000
Received: (at submit) by bugs.debian.org; 16 Jul 2016 21:51:36 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.0-bugs.debian.org_2005_01_02
	(2014-02-07) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-13.9 required=4.0 tests=BAYES_00,DIGITS_LETTERS,
	DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HAS_PACKAGE,MURPHY_DRUGS_REL8,
	PGPSIGNATURE,RP_MATCHES_RCVD,SPF_PASS,URIBL_CNKR autolearn=ham
	autolearn_force=no version=3.4.0-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 12; hammy, 150; neutral, 253; spammy,
	0. spammytokens: hammytokens:0.000-+--H*c:pgp-sha512,
	0.000-+--UD:release.debian.org, 0.000-+--releasedebianorg,
	0.000-+--release.debian.org, 0.000-+--H*u:Gnus
Received: from kwanyin.sergiodj.net ([176.31.208.32])
	by buxtehude.debian.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
	(Exim 4.84_2)
	(envelope-from <[email protected]>)
	id 1bOXUl-00056L-WB
	for [email protected]; Sat, 16 Jul 2016 21:51:36 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sergiodj.net; s=20160602;
	h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=J2anYKFCCLojYyWWQIr98qpxd+s6d001WQtbN6yeY3s=;
	b=WpuI+yLqzHhZh/DqnJFOEDSqRYSjiCn5qeJjEuj3OC7emDYWnHjG0RYSXS3arv0CntInR+v7BNTQPqjOqaVITxUruevIplGTuU1AqwG6aEGn40GTb4f/EUqHc2FlXXDimzvgiujtNVNsxWn/1EJP2pNtV6E0ze97zcgERXBSQRs=;
From: Sergio Durigan Junior <[email protected]>
To: [email protected]
X-URL: http://blog.sergiodj.net
Date: Sat, 16 Jul 2016 17:51:21 -0400
Message-ID: <[email protected]>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-=";
	micalg=pgp-sha512; protocol="application/pgp-signature"
Delivered-To: [email protected]
[Message part 1 (text/plain, inline)]
Package: devscripts
Tags: patch

Hi,

Rationale: <https://lists.debian.org/debian-mentors/2016/07/msg00389.html>

Some Debian maintainers have to deal with upstream projects that do not
offer tarballs for releases.  The modus operandi for working around this
"issue" is to provide your own replacement for the 'uupdate' script,
which should be responsible for manipulating the file(s) downloaded from
upstream and prepare a "fake" tarball to be provided to 'uupdate'.

This works, but has one drawback: there is no "easy" way to suppress the
'mk-origtargz' program to run.  And the problem with this is that
'mk-origtargz' expects a compressed tarball as its input, always.
Calling it in the situation described above leads to an error.  So, the
user is left with some non-ideal options:

1) Invoke 'uscan' passing '--no-symlink' as one of the parameters.  This
has the side-effect of skipping the call to 'mk-origtargz'.  The obvious
disadvantages are: (a) it is not obvious to the user that this option
solves the problem described above, and (b) the user will have to
remember to pass this option every time.

2) Hacking the 'uupdate'-replacement script in order to invoke it by
hand.  The obvious disadvantage is that the user won't be able to use
'uscan', and also will have to remember this every time.

Therefore, to fix this issue, I am proposing a new option, to be
provided via 'opts=' in the watch file, whose purpose is to suppress the
execution of 'mk-origtargz'.  Its effect will be similar to passing
'--no-symlink', although the user will still be able to provide
'--rename', for example.

Opinions?

Cheers,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

[0001-uscan-Implement-nomktar-option-to-allow-user-to-spec.patch (text/x-diff, inline)]
From b40dbd4f6b052f0753aede3822a372149d8d0c7f Mon Sep 17 00:00:00 2001
From: Sergio Durigan Junior <[email protected]>
Date: Sat, 16 Jul 2016 17:36:29 -0400
Subject: [PATCH] uscan: Implement 'nomktar' option to allow user to specify
 when she does not want mk-origtargz to be invoked.

---
 debian/changelog |  6 ++++++
 scripts/uscan.pl | 11 ++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 3b9e5a0..3207485 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,14 @@
 devscripts (2.16.7) UNRELEASED; urgency=medium
 
+  [ Paul Wise ]
   * grep-excuses:
     + Fix the script for the removal of testing.pl from release.debian.org
 
+  [ Sergio Durigan Junior ]
+  * uscan:
+    + Implement 'nomktar' option to allow user to specify when she does
+      not want mk-origtargz to be invoked.
+
  -- Paul Wise <[email protected]>  Fri, 15 Jul 2016 22:36:19 +0800
 
 devscripts (2.16.6) unstable; urgency=medium
diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index 9403ba6..818292e 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -408,6 +408,13 @@ No signature available. (No warning.)
 
 Decompress compressed archive before the pgp/gpg signature verification.
 
+=item B<nomktar>
+
+Do not invoke B<mk-origtargz> after saving the downloaded file.  This
+is useful if you are dealing with files that are not tarballs, for
+example.  The side effect of this option is that no symlink will be
+created.
+
 =item B<bare>
 
 Disable all site specific special case code such as URL redirector uses and
@@ -2551,6 +2558,8 @@ sub process_watchline ($$$$$$)
 		    $options{'pgpmode'} = 'mangle';
 		} elsif ($opt =~ /^\s*oversionmangle\s*=\s*(.+?)\s*$/) {
 		    @{$options{'oversionmangle'}} = split /;/, $1;
+		} elsif ($opt =~ /^\s*nomktar\s*$/) {
+		    $options{'nomktar'} = 1;
 		} else {
 		    uscan_warn "unrecognised option $opt\n";
 		}
@@ -3700,7 +3709,7 @@ EOF
     my $mk_origtargz_out;
     my $path = "$destdir/$newfile_base";
     my $target = $newfile_base;
-    unless ($symlink eq "no") {
+    unless ($symlink eq "no" || $options{'nomktar'} ) {
 	my @cmd = ("mk-origtargz");
 	push @cmd, "--package", $pkg;
 	push @cmd, "--version", $common_mangled_newversion;
-- 
2.8.1

[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Thu May 15 06:39:08 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.