openSUSE / obs-build

OBS build script, can be used with OBS or stand alone
GNU General Public License v2.0
133 stars 186 forks source link

debtransform: latest changes break DEB builds when "debian.tar" is not compressed #842

Closed meaksh closed 2 years ago

meaksh commented 2 years ago

With recent changes introduced to debtransform, we started getting failed builds in several of our Salt DEB packages that were successfully building before:

...
[   49s] ** Started: debtransform --release 198.1.uyuni //usr/src/packages/SOURCES //usr/src/packages/SOURCES/salt.dsc //usr/src/packages/SOURCES.DEB
[   49s] No DEBTRANSFORM-FILES-TAR line in the .dsc file.
[   49s] Attempting automatic discovery of a debian archive.
[   49s] Debian archive chosen for transformation: debian.tar
[   49s] Transforming into source package '3.0 (quilt)' format
[   49s] Modifying dsc Version field to "3004+ds-1+198.1.uyuni"
[   49s] Hardlinking //usr/src/packages/SOURCES/salt_3004.orig.tar.gz to //usr/src/packages/SOURCES.DEB/salt_3004+ds.orig.tar.gz
[   49s] files c56a47a43e139c851c5720afc67ce83f 17847268 salt_3004+ds.orig.tar.gz
[   49s] Scanning //usr/src/packages/SOURCES.DEB/salt_3004+ds.orig.tar.gz...
[   50s] Scanning //usr/src/packages/SOURCES/debian.tar...
[   50s] Add tar file contents 'debian.tar'
[   50s]     to debian quilt tar file '../SOURCES.DEB/salt_3004+ds-1+198.1.uyuni.debian.tar'
[   50s] tar: /tmp/GbVYC3PVWC/debian.tar: Cannot open: No such file or directory
[   50s] tar: Exiting with failure status due to previous errors
[   50s] Add file 'debian_source_format'
[   50s]     to debian quilt tar file '../SOURCES.DEB/salt_3004+ds-1+198.1.uyuni.debian.tar'
[   50s]     with internal path       'debian/source/format'
[   50s] Writing //usr/src/packages/SOURCES.DEB/salt_3004+ds-1+198.1.uyuni.dsc
[   50s] dpkg-source: warning: extracting unsigned source package (/usr/src/packages/SOURCES.DEB/salt_3004+ds-1+198.1.uyuni.dsc)
[   50s] dpkg-source: info: extracting salt in /usr/src/packages/BUILD
[   50s] dpkg-source: info: unpacking salt_3004+ds.orig.tar.gz
[   51s] dpkg-source: info: unpacking salt_3004+ds-1+198.1.uyuni.debian.tar.gz
[   51s] dpkg-source: warning: /usr/src/packages/BUILD/debian/rules does not exist
[   51s] -----------------------------------------------------------------
[   51s] ----- building salt.dsc (user abuild)
[   51s] -----------------------------------------------------------------
[   51s] -----------------------------------------------------------------
[   52s] Recipe file 'salt.dsc' is being checked for 'DEBTRANSFORM-FILES'... not found
[   52s] tail: cannot open 'debian/changelog' for reading: No such file or directory
[   52s] dpkg-buildpackage: error: tail of debian/changelog subprocess returned exit status 1
[   52s] ### VM INTERACTION START ###
[   52s] [   44.664848][    T1] sysrq: Power Off
[   52s] [   44.668348][   T16] reboot: Power down
[   52s] ### VM INTERACTION END ###

In our package, we do provide debian.tar (uncompressed) containing proper files (including debian/changelog), and so far, the package have been building without problems. We use Debtransform-Tar in our dsc file.

After checking this issue with @darix, workaround is to compress debian.tar as xz.

darix commented 2 years ago

@ila-embsys - could this be another regression from your work?

ila-embsys commented 2 years ago

@ila-embsys - could this be another regression from your work?

Yep! There was another issue with the same description: https://github.com/openSUSE/obs-build/issues/833. Also, yesterday I provided a fix for non-compressed tars: https://github.com/openSUSE/obs-build/pull/840.