Bug#1065445: pristine-tar: fails if upstream tarball top directory name is capitalised
severity 1065445 important thanks On Tue, Mar 05, 2024 at 05:08:27PM +, Julian Gilbey wrote: > [...] > > I have reported this as a severity "important" bug because it may > silently (or not so silently) affect many packages. Well, I thought I'd reported this as "important", but it seems I forgot to actually do so. Raising the severity now. Best wishes, Julian
Bug#1065445: pristine-tar: fails if upstream tarball top directory name is capitalised
reassign 1065445 git-buildpackage retitle 1065445 git-buildpackage: --pristine-tar fails if upstream tarball top directory name is not - thanks (See below for explanation.) On Tue, Mar 05, 2024 at 07:41:02AM +, Julian Gilbey wrote: > severity 1065445 important > retitle 1065445 pristine-tar: fails if original tarball top directory name is > not - > thanks > > On Mon, Mar 04, 2024 at 08:53:21PM +, Julian Gilbey wrote: > > Package: pristine-tar > > Version: 1.50+nmu1 > > Severity: normal > > > > I discovered that a package I was trying to use with pristine-tar > > failed to work. The cause of the issue seems to be that the upstream > > tarball's top directory name is capitalised, but pristine-tar > > regenerates a tarball with the name lowercased. > > > > Steps to reproduce using git-buildpackage: > > 1. Import the attached minimal working example into git using the command: > >gbp import-dsc --pristine-tar hello_1.0-1.dsc > > > > 2. Change into the build directory: > >cd hello > > > > 3. Regenerate the original tar ball using pristine-tar, for example: > >gbp buildpackage -S > > > > 4. Return to the parent directory, then: > > > > $ tar ztf hello_1.0.orig.tar.gz > > Hello-1.0/ > > Hello-1.0/Makefile > > Hello-1.0/hello.c > > $ tar ztf build-area/hello_1.0.orig.tar.gz > > hello-1.0/ > > hello-1.0/Makefile > > hello-1.0/hello.c > > > > Note the capitalisation has changed. Also: > > > > $ ls -l hello_1.0.orig.tar.gz build-area/hello_1.0.orig.tar.gz > > -rw-r--r-- 1 jdg jdg 256 Mar 4 20:46 build-area/hello_1.0.orig.tar.gz > > -rw-r--r-- 1 jdg jdg 175 Mar 4 20:00 hello_1.0.orig.tar.gz > > > > Best wishes, > > > >Julian > > It turns out it's actually much more general than this: if the > original tarball does not have a top directory named > - > then pristine-tar fails; it *always* creates a tarball with top > directory called this, rather than using the name used by the original > upstream tarball. So pristine-tar fails on all such cases, including > cases where mk-origtargz has been used to exclude some files. > > Attached is a minimal example, hello2. > >Julian I checked pristine-tar directly on these examples, and it turns out that it can handle these situations with no problems. The problem only emerges when git-buildpackage is being used, as in the example I gave in the original bug report. I don't know how gbp import-orig/import-dsc --pristine-tar calls pristine-tar, but somehow it appears to forget the top directory name of the original tarball, leading to this problem. I have reported this as a severity "important" bug because it may silently (or not so silently) affect many packages. Best wishes, Julian
Bug#1065445: pristine-tar: fails if upstream tarball top directory name is capitalised
severity 1065445 important retitle 1065445 pristine-tar: fails if original tarball top directory name is not - thanks On Mon, Mar 04, 2024 at 08:53:21PM +, Julian Gilbey wrote: > Package: pristine-tar > Version: 1.50+nmu1 > Severity: normal > > I discovered that a package I was trying to use with pristine-tar > failed to work. The cause of the issue seems to be that the upstream > tarball's top directory name is capitalised, but pristine-tar > regenerates a tarball with the name lowercased. > > Steps to reproduce using git-buildpackage: > 1. Import the attached minimal working example into git using the command: >gbp import-dsc --pristine-tar hello_1.0-1.dsc > > 2. Change into the build directory: >cd hello > > 3. Regenerate the original tar ball using pristine-tar, for example: >gbp buildpackage -S > > 4. Return to the parent directory, then: > > $ tar ztf hello_1.0.orig.tar.gz > Hello-1.0/ > Hello-1.0/Makefile > Hello-1.0/hello.c > $ tar ztf build-area/hello_1.0.orig.tar.gz > hello-1.0/ > hello-1.0/Makefile > hello-1.0/hello.c > > Note the capitalisation has changed. Also: > > $ ls -l hello_1.0.orig.tar.gz build-area/hello_1.0.orig.tar.gz > -rw-r--r-- 1 jdg jdg 256 Mar 4 20:46 build-area/hello_1.0.orig.tar.gz > -rw-r--r-- 1 jdg jdg 175 Mar 4 20:00 hello_1.0.orig.tar.gz > > Best wishes, > >Julian It turns out it's actually much more general than this: if the original tarball does not have a top directory named - then pristine-tar fails; it *always* creates a tarball with top directory called this, rather than using the name used by the original upstream tarball. So pristine-tar fails on all such cases, including cases where mk-origtargz has been used to exclude some files. Attached is a minimal example, hello2. Julian hello2_1.0.orig.tar.gz Description: application/gzip Format: 3.0 (quilt) Source: hello2 Binary: hello2 Architecture: any Version: 1.0-1 Maintainer: Julian Gilbey Homepage: Standards-Version: 4.6.2 Build-Depends: debhelper-compat (= 13) Package-List: hello2 deb unknown optional arch=any Checksums-Sha1: 088958090dae03cbf08b77cd3d4f828a5708f1e4 167 hello2_1.0.orig.tar.gz ee6010e1aaee036ac478acf0b435103befd02ebd 2028 hello2_1.0-1.debian.tar.xz Checksums-Sha256: 2c625982f9b41d456f63c8385a3597c2ff02f2a4e535db802bca7426b2d44947 167 hello2_1.0.orig.tar.gz 187551b3d11623c2e2b984a9701f1fad74c532b2e948892a34a4d8dc28f3d901 2028 hello2_1.0-1.debian.tar.xz Files: 323ce17ab35564a9c31a8e0320f7a069 167 hello2_1.0.orig.tar.gz 12bb0fa03c08e92a450065425d0e570f 2028 hello2_1.0-1.debian.tar.xz hello2_1.0-1.debian.tar.xz Description: application/xz
Bug#1065445: pristine-tar: fails if upstream tarball top directory name is capitalised
Package: pristine-tar Version: 1.50+nmu1 Severity: normal I discovered that a package I was trying to use with pristine-tar failed to work. The cause of the issue seems to be that the upstream tarball's top directory name is capitalised, but pristine-tar regenerates a tarball with the name lowercased. Steps to reproduce using git-buildpackage: 1. Import the attached minimal working example into git using the command: gbp import-dsc --pristine-tar hello_1.0-1.dsc 2. Change into the build directory: cd hello 3. Regenerate the original tar ball using pristine-tar, for example: gbp buildpackage -S 4. Return to the parent directory, then: $ tar ztf hello_1.0.orig.tar.gz Hello-1.0/ Hello-1.0/Makefile Hello-1.0/hello.c $ tar ztf build-area/hello_1.0.orig.tar.gz hello-1.0/ hello-1.0/Makefile hello-1.0/hello.c Note the capitalisation has changed. Also: $ ls -l hello_1.0.orig.tar.gz build-area/hello_1.0.orig.tar.gz -rw-r--r-- 1 jdg jdg 256 Mar 4 20:46 build-area/hello_1.0.orig.tar.gz -rw-r--r-- 1 jdg jdg 175 Mar 4 20:00 hello_1.0.orig.tar.gz Best wishes, Julian
Bug#1065445: pristine-tar: fails if upstream tarball top directory name is capitalised
On Mon, Mar 04, 2024 at 08:53:21PM +, Julian Gilbey wrote: > Package: pristine-tar > Version: 1.50+nmu1 > Severity: normal > > I discovered that a package I was trying to use with pristine-tar > failed to work. The cause of the issue seems to be that the upstream > tarball's top directory name is capitalised, but pristine-tar > regenerates a tarball with the name lowercased. > > Steps to reproduce using git-buildpackage: > 1. Import the attached minimal working example into git using the command: >gbp import-dsc --pristine-tar hello_1.0-1.dsc > > 2. Change into the build directory: >cd hello > > 3. Regenerate the original tar ball using pristine-tar, for example: >gbp buildpackage -S > > 4. Return to the parent directory, then: > > $ tar ztf hello_1.0.orig.tar.gz > Hello-1.0/ > Hello-1.0/Makefile > Hello-1.0/hello.c > $ tar ztf build-area/hello_1.0.orig.tar.gz > hello-1.0/ > hello-1.0/Makefile > hello-1.0/hello.c > > Note the capitalisation has changed. Also: > > $ ls -l hello_1.0.orig.tar.gz build-area/hello_1.0.orig.tar.gz > -rw-r--r-- 1 jdg jdg 256 Mar 4 20:46 build-area/hello_1.0.orig.tar.gz > -rw-r--r-- 1 jdg jdg 175 Mar 4 20:00 hello_1.0.orig.tar.gz > > Best wishes, > >Julian I forgot to attach the hello package; here it is. Julian Format: 3.0 (quilt) Source: hello Binary: hello Architecture: any Version: 1.0-1 Maintainer: Julian Gilbey Homepage: Standards-Version: 4.6.2 Build-Depends: debhelper-compat (= 13) Package-List: hello deb unknown optional arch=any Checksums-Sha1: 13d5ecfcec8a27b9d89ea9e73ad0066fd2ece889 175 hello_1.0.orig.tar.gz 17f6726313b66fe7cecaa22aba10185037f945a1 2028 hello_1.0-1.debian.tar.xz Checksums-Sha256: 5d35cb0e91cbf6597d88d0c9fe4569544c391882ebf82a7754c2edba8bea50fb 175 hello_1.0.orig.tar.gz f23d59003adf6cda9a84c25f3836021781f7df42e1a0037b737d62568d7bf0bd 2028 hello_1.0-1.debian.tar.xz Files: 5f3b5a48f5a653abab7de8852c8380b7 175 hello_1.0.orig.tar.gz eb3450a52485d0bb39416a0e691af913 2028 hello_1.0-1.debian.tar.xz hello_1.0-1.debian.tar.xz Description: application/xz hello_1.0.orig.tar.gz Description: application/gzip