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: implement capability to run custom mk-origtargz
Reply-To: Christopher Hoskin <[email protected]>, [email protected]
Resent-From: Christopher Hoskin <[email protected]>
Resent-To: [email protected]
Resent-CC: Devscripts Devel Team <[email protected]>
X-Loop: [email protected]
Resent-Date: Wed, 30 Aug 2017 19:24:01 +0000
Resent-Message-ID: <[email protected]>
Resent-Sender: [email protected]
X-Debian-PR-Message: followup 831521
X-Debian-PR-Package: devscripts
X-Debian-PR-Keywords: 
References: <[email protected]>
X-Debian-PR-Source: devscripts
Received: via spool by [email protected] id=B831521.150412092517480
          (code B ref 831521); Wed, 30 Aug 2017 19:24:01 +0000
Received: (at 831521) by bugs.debian.org; 30 Aug 2017 19:22:05 +0000
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=-12.1 required=4.0 tests=FREEMAIL_FORGED_FROMDOMAIN,
	FREEMAIL_FROM,FROMDEVELOPER,HAS_PACKAGE,HEADER_FROM_DIFFERENT_DOMAINS,
	RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RCVD_IN_SORBS_SPAM,SPF_PASS,
	XMAILER_REPORTBUG autolearn=unavailable autolearn_force=no
	version=3.4.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.5  spammytokens: hammytokens:
Received: from mail-wr0-f173.google.com ([209.85.128.173])
	by buxtehude.debian.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
	(Exim 4.89)
	(envelope-from <[email protected]>)
	id 1dn8Yv-0004Xj-8F
	for [email protected]; Wed, 30 Aug 2017 19:22:05 +0000
Received: by mail-wr0-f173.google.com with SMTP id 40so20482462wrv.5
        for <[email protected]>; Wed, 30 Aug 2017 12:22:04 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:content-transfer-encoding:from:to
         :subject:message-id:date;
        bh=DiwI1Rql5ctsv/ZIjp9/reWLxBmsJzDw1kVH6sYemts=;
        b=sSyfgPP9WcE86//9FRx6Dcvg40Nhk9K7/PfE1ACJcWMX1NJotTtCyThC3h9ro2klsr
         q+IgkBoPw2Ge5dkRDQY4B/4GZurU2pCATQWbmJgWj5dZzuPfQ/N19vsWfOg6Qu8qMV3I
         gT313WlEezNZDQu7pdCMColUEuIwRaoRpXwvXPR8tJu9A5SEuAuA2MDYegmskU7I/oj5
         orJDMlv5h/sBkmZdGsiB/en2KU/l052eKr1RN+MTPgFibEhb9zuO4i6x86I8Tj2Lptw9
         VLaAx/or8fjZpHwLra/evInDJhuijze2okEc32wAPWjAnmJOmSRmj7OKwmxw5YU+9Awi
         hBBQ==
X-Gm-Message-State: AHYfb5hInPyejxEpOp3E2lwJ7m9tRzjug6CnzVNULVFGOyLokSYCjTSL
	DsVZHQLazLDdGkE6d0s=
X-Google-Smtp-Source: ADKCNb7tRT8epRYIF04LAwRhXve4NaYJCz5CXojt6JkibE84E655RCXQmyLlVp27NL5xKSXi7RjvhA==
X-Received: by 10.223.131.4 with SMTP id 4mr1860456wrd.149.1504120922826;
        Wed, 30 Aug 2017 12:22:02 -0700 (PDT)
Received: from inspiron530 (host217-43-215-4.range217-43.btcentralplus.com. [217.43.215.4])
        by smtp.gmail.com with ESMTPSA id 73sm4403504wrl.56.2017.08.30.12.22.02
        (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
        Wed, 30 Aug 2017 12:22:02 -0700 (PDT)
Received: from mans0954 by inspiron530 with local (Exim 4.89)
	(envelope-from <[email protected]>)
	id 1dn8Yr-0004yy-ET; Wed, 30 Aug 2017 20:22:01 +0100
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Christopher Hoskin <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Message-ID: <150412092133.19099.8196051605611880286.reportbug@inspiron530.home>
X-Mailer: reportbug 7.1.7
Date: Wed, 30 Aug 2017 20:22:01 +0100
Package: devscripts
Version: 2.17.6+deb9u1
Followup-For: Bug #831521

Thanks for looking into this. My second thought is that there's a lot of useful functionality in mk-origtargz (determining the correct form of the tarball from debain/changelog, converting from zip or xpi, excluding files based on patterns...) and anyone needing some custom functionality shouldn't need to reinvent this. In my case I needed to run a command on a number of files within the upstream tarball, and also exclude some files.

Now I could create a debian/mk-origtargz script which creates a temp directory, extracts the upstream tar ball to it, runs my commands on the extracted files, re-tars the temporary folder into an intermediate tarball, calls /usr/bin/mk-origtargz with the path of intermediate tarball as an argument and then removes the temporary folder and intermediate tarball, but that seems to duplicate a lot of what mk-origtargz already does.

I was wondering if it would be possible to insert some code around line 437 of mk-origtargz to check for the existance of a debian/modify-upstream script, and if it exists, call it with the path of the extracted files as the working directory?

Another possibility might be to split the mk-origtargz into an unpack and repack scripts, and re-implement mk-origtargz as a wrapper which calls the unpack and repack script. Anyone implementing a debian/mk-origtargz could then call the unpack script, do some custome logic and then call the repack script.

In the case of there being no upstream tarball, debian/mk-origtargz could assemble the upstream source into a temporary folder an then just call the repack script.

I haven't thought too hard about this, so these ideas may be flawed.

Christopher

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Thu May 15 06:44:19 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.