Skip to content

dpkg-source fails on no final newline differences detected with sbuild

With sbuild, we no longer have a extract-sources stage and the build runs directly on the sources that have been checked out from git.

In MariaDB the builds started failing as a result, emitting the error:

dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/mariadb_11.8.3-1+salsaci+20250912+1316.diff.2B_WE9
dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/mariadb_11.8.3-1+salsaci+20250912+1316.diff.2B_WE9
dpkg-source: hint: make sure the version in debian/changelog matches the unpacked source tree
dpkg-source: hint: make sure the version in debian/changelog matches the unpacked source tree
dpkg-source: hint: you can integrate the local changes with dpkg-source --commit
dpkg-source: hint: you can integrate the local changes with dpkg-source --commit
dpkg-source: info: local changes detected, the modified files are:
dpkg-source: info: local changes detected, the modified files are:
dpkg-source: warning: file mariadb-11.8.3/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/template/VisualGDB/wolfssl_template_IDF_v5.1_ESP32.vgdbproj has no final newline (either original or modified version)
dpkg-source: warning: file mariadb-11.8.3/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/template/VisualGDB/wolfssl_template_IDF_v5.1_ESP32.vgdbproj has no final newline (either original or modified version)
dpkg-source: warning: file mariadb-11.8.3/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/VisualGDB/wolfssl_benchmark_IDF_v4.4_ESP32.vgdbproj has no final newline (either original or modified version)
dpkg-source: warning: file mariadb-11.8.3/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/VisualGDB/wolfssl_benchmark_IDF_v4.4_ESP32.vgdbproj has no final newline (either original or modified version)
...

Full log at https://salsa.debian.org/mariadb-team/mariadb-server/-/jobs/8307700

I am not able to reproduce this locally, but I suspect it is due to Windows line endings either not included or being included despite being cleaned away in the source tarball, and relates on how git attributes are used. See related #322 (closed) / #409 and !424 (merged), !462 (merged) and !581 and https://salsa.debian.org/salsa-ci-team/pipeline#git-attributes.

Suggestions welcome on if we should do some extra gitattributes management in sbuild, or if this is something that individual packages simply need to manage.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information