Re: Cleaning upstream tarballs
On 19/08/2016 00:27, gregor herrmann wrote:
> On Thu, 18 Aug 2016 21:41:04 +0100, Christopher Hoskin wrote:
>
>> I'm considering how to remove .jar files and convenience copies of other
>> libraries from upstream tar balls. It seems to me that there are several
>> ways of approaching repacking:
>
> Just one additional thought:
>
>> 1) Add Files-Excluded to debian/copyright
>> 2) Create a debian/orig-tar.sh script and call it from debian/watch
>> 3) Call jh_repack from debian/watch
>> 4) Create a debian/gbp.conf and add filters to the import-orig section
>
> In my understanding, these options have different objectives:
> 1) and 2) (if I interpret it correctly) remove files from the
> .orig.tar.gz while 4) leaves the tarball intact and only exclude
> files from being imported into gbp's typical upstream and master
> branches.
>
To make 4) behave like 1) or 2), you have to add the following parameter:
filter-pristine-tar = True
This will filter upstream's tarball before importing it into the Git
repository.
So a complete snippet would be:
[DEFAULT]
pristine-tar = True
filter-pristine-tar = True
filter = [
"src/file1.jar",
"src/lib/file2.jar"
]
(pristine-tar parameter is only useful if you use a pristine-tar branch)
HTH,
--
Mehdi
Reply to: