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


Message #49 received at [email protected] (full text, mbox, reply):

Received: (at 831521) by bugs.debian.org; 27 Aug 2017 21:42:02 +0000
From [email protected] Sun Aug 27 21:42:02 2017
X-Spam-Checker-Version: SpamAssassin 3.4.1-bugs.debian.org_2005_01_02
	(2015-04-28) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=4.0 tests=DIGITS_LETTERS,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,MURPHY_DRUGS_REL8,PGPSIGNATURE,RP_MATCHES_RCVD,
	SPF_PASS,URIBL_CNKR autolearn=unavailable autolearn_force=no
	version=3.4.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.5  spammytokens: hammytokens:
Return-path: <[email protected]>
Received: from kwanyin.sergiodj.net ([158.69.185.54])
	by buxtehude.debian.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.89)
	(envelope-from <[email protected]>)
	id 1dm5Jh-0001NH-Pd
	for [email protected]; Sun, 27 Aug 2017 21:42:02 +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:
	In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:
	Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
	Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
	List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
	 bh=m0fRuzQxvxG87L2RWxPc3OuBvpXV0wkH++4vOcLDHOY=; b=OkmfToapQwtDWh5Zmu1GvJs42
	w3Ff8AqFiQeuQmxrUTpMmpAx2J7jTS1RQdBjBu22PCvJWkh3fKhKbiGGWcbi0uIh6i5wD/SthLnLg
	tV8oH+2l3uDijP5bOu05R+QWtmPrOAEoRNBgHNzgANXyU15nimdKMoUHK7OsGyMFDpRps=;
From: Sergio Durigan Junior <[email protected]>
To: Osamu Aoki <[email protected]>
Cc: [email protected],  Christopher Hoskin <[email protected]>
Subject: Re: Custom repacking
References: <[email protected]>
X-URL: http://blog.sergiodj.net
Date: Sun, 27 Aug 2017 17:24:43 -0400
In-Reply-To: <[email protected]> (Osamu Aoki's
	message of "Mon, 28 Aug 2017 01:04:54 +0900")
Message-ID: <[email protected]>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
	micalg=pgp-sha512; protocol="application/pgp-signature"
X-Greylist: delayed 1034 seconds by postgrey-1.36 at buxtehude; Sun, 27 Aug 2017 21:42:01 UTC
[Message part 1 (text/plain, inline)]
On Sunday, August 27 2017, Osamu Aoki wrote:

> Hi,
>
> Just because uupdate entry in watch file enables to run custom script,
> abusing it is not good idea.
>
> uscan deligates its key functions to:
>  * repacking of upstream tarball/signature -- mk-origtargz
>  * updating new sorce tree                 -- uupdate
>
> So adding uscan a capability to run custom script in place of calling
> mk-origtargz is the right approach.
>
> That's exactly like repack.stub discussed in # 858319
>
> I need to address these bugs without making overcomplicated uscan to do
> more work.  Maybe if debian/mk-origtargz exists, it is used instead of
> the default one.   That's simple.  This also enables if someone have
> good script, I can merge into mk-origtargz.

Hi Osamu,

Thanks for following up this bug.  I confess I had forgotten about it!

Anyway, I took the liberty and implemented the following mostly-untested
patch to uscan which uses your idea and executes debian/mk-origtargz (if
it exists and is executable) instead of the system's mk-origtargz.

What do you thing?

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

diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index f871daf2..49a7acb2 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -60,8 +60,9 @@ than the last upstream version.
 =item * B<uscan> saves the downloaded tarball to the parent B<../> directory:
 I<< ../<upkg>-<uversion>.tar.gz >>
 
-=item * B<uscan> invokes B<mk-origtargz> to create the source tarball: I<<
-../<spkg>_<oversion>.orig.tar.gz >>
+=item * B<uscan> invokes B<mk-origtargz> to create the source tarball:
+I<< ../<spkg>_<oversion>.orig.tar.gz >> (if F<debian/mk-origtargz>
+exists and is executable, then execute it instead).
 
 =over
 
@@ -706,7 +707,8 @@ doesn't work.
 
 B<uscan> invokes B<mk-origtargz> to create the source tarball properly named
 for the source package with B<.orig.> (or B<< .orig-<component>. >> for the
-secondary tarballs) in its filename.
+secondary tarballs) in its filename.  If F<debian/mk-origtargz> exists and is
+executable, then B<uscan> invokes it instead.
 
 =over
 
@@ -3764,7 +3766,15 @@ EOF
     my $path = "$destdir/$newfile_base";
     my $target = $newfile_base;
     unless ($symlink eq "no") {
-	my @cmd = ("mk-origtargz");
+	my @cmd = ();
+	if (-x 'debian/mk-origtargz') {
+	    # If the user has specified a personalized 'mk-origtargz'
+	    # under debian/, we use it instead of the system script.
+	    push @cmd "debian/mk-origtargz";
+	    uscan_verbose "Using debian/mk-origtargz instead of mk-origtargz\n";
+	} else {
+	    push @cmd "mk-origtargz";
+	}
 	push @cmd, "--package", $pkg;
 	push @cmd, "--version", $common_mangled_newversion;
 	push @cmd, '--repack-suffix', $options{repacksuffix} if defined $options{repacksuffix};
[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:44:20 2025; Machine Name: buxtehude

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.