Control: tag -1 patch On Monday, 30 July 2018 4:46:50 PM AEST Emmanuel Bourg wrote:
> > "debian/orig-tar.sh" is redundant as all it does can be done by "uscan". > > It can be done with uscan but not as conveniently. debian/orig-tar.sh > keeps only the Java runtime with a simple "rm -Rfv !(Java)" call. To get > the equivalent behavior with uscan we would have to list all the > runtimes excluded, which is more tedious to maintain. Perhaps not as tedious as you might think - the attached patch reproduces behavior of custom repack script in less lines, that are straightforward to maintain and far more common (if not universal) in Debian ecosystem. Using standard approach to repacking is good and the additional advantage is explicit visibility of what is being thrown away - for example it is good to know that original tarball contains pre-built .JAR file... IMHO on this instance repack is so straightforward that custom script is difficult to justify... > The reason is the Java Team doesn't want to maintain the ANTLR runtime > for other languages than Java. We tried that with ANTLR 2.x and that was > too difficult to manage properly. We now prefer splitting the package by > language, each maintained by skilled dedicated developers and with it's > own independent update schedule. There are the libantlr3c and > python3-antlr3 packages for example. I see... But isn't the down side of this approach is necessary coordination of uploads of multiple source packages? Suppose we'll introduce libantlr4-dev with C++ support which is not built from the same source package as "antlr4" - then compiler and headers would be provided by different binary packages produced by different source packages. Inevitably that will create mismatch situations and odd bugs that would be impossible to have if support for various languages were to be built from single source, as intended by upstream... -- Cheers, Dmitry Smirnov. --- However beautiful the strategy, you should occasionally look at the results. -- Winston Churchill
signature.asc
Description: This is a digitally signed message part.
>From a566ff1720ffca4a10eff11dabcd86c298239012 Mon Sep 17 00:00:00 2001 From: Dmitry Smirnov <only...@member.fsf.org> Date: Mon, 30 Jul 2018 18:42:45 +1000 Subject: [PATCH] Re-pack tarball using Files-Excluded; watch file format to version 4 (Closes: #904962). --- debian/copyright | 18 ++++++++++++++++++ debian/orig-tar.sh | 29 ----------------------------- debian/watch | 11 +++++++++-- 3 files changed, 27 insertions(+), 31 deletions(-) delete mode 100755 debian/orig-tar.sh diff --git a/debian/copyright b/debian/copyright index f9f2945..3ecc76f 100644 --- a/debian/copyright +++ b/debian/copyright @@ -2,6 +2,24 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: ANTLRv4 Upstream-Contact: Terence Parr <pa...@antlr.org> Source: https://github.com/antlr/antlr4 +Files-Excluded: + antlr4-maven-plugin/nb-configuration.xml + build/* + runtime/Cpp + runtime/CSharp + runtime/Go + ~~runtime/Java + runtime/Java/lib/*.jar + runtime/Java/nb-configuration.xml + runtime/JavaScript + runtime/Python2 + runtime/Python3 + runtime/Swift + runtime-testsuite/resources + runtime-testsuite/test + tool/nb-configuration.xml +Comment: + This package focuses exclusively on Java. Files: * Copyright: 2005-2016, Terence Parr diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh deleted file mode 100755 index 7d9dd28..0000000 --- a/debian/orig-tar.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -TAR=../antlr4_$2.orig.tar.xz -DIR=antlr-$2 -ORIG_TAR=$3 - -mkdir -p $DIR -tar -xf $ORIG_TAR --strip-components=1 -C $DIR -rm $ORIG_TAR - -pushd $DIR/runtime -shopt -s extglob -rm -Rfv !(Java) -popd - -find $DIR -name ".*" -exec rm '{}' \; -rm -f $TAR -XZ_OPT=--best tar -c -v -J -f $TAR \ - --exclude 'runtime/Java/target' \ - --exclude 'runtime-testsuite/resources' \ - --exclude 'runtime-testsuite/src' \ - --exclude 'runtime-testsuite/test' \ - --exclude 'nb-configuration.xml' \ - --exclude '*.nuspec' \ - --exclude '*.ps1' \ - --exclude '*.jar' \ - --exclude '.travis*' \ - $DIR -rm -rf $DIR diff --git a/debian/watch b/debian/watch index d31f9f2..8e5e60d 100644 --- a/debian/watch +++ b/debian/watch @@ -1,2 +1,9 @@ -version=3 -https://github.com/antlr/antlr4/tags .*/(?:antlr-)?([\d\.]+).tar.gz debian debian/orig-tar.sh +# uscan(1) configuration file. +version=4 + +opts="\ +pgpmode=none,\ +repack,compression=xz,repacksuffix=+repack,\ +dversionmangle=s{[+~]repack\d*}{},\ +" https://github.com/antlr/antlr4/releases \ + .*/archive/v?(\d[\d\.]+)\.tar\.gz -- 2.11.0