Bug#973755: git-buildpackage: gbp clone and import-* should defuse git attributes
Hi, On Wed, Apr 27, 2022 at 07:34:13PM +0200, Christoph Berg wrote: > > Quite a lot of packages ship .gitattributes in their tarballs, leading > > to strange effects while building packages and, most importantly, > > leading to the imports not creating Git trees identical to the tarballs. > > rdkit was also affected by this. I ended up doing "gbp import-orig > --filter .gitattributes $tarball", but this will have to be remembered > on every future tarball import. You can set the filter in `d/gbp.conf` to not forget (the defusing of attributes with newer gbp should also work but filtering is likely better as you don't have to worry about new git attributes being added in the future). Cheers, -- Guido > > https://salsa.debian.org/debichem-team/rdkit/-/commit/6e8b2f28c07ea515be9549b92e975acf9d25c99b > > > A remedy to this would be git-buildpackage creating .git/info/attributes > > with this content: > > > > * -text -eol -crlf -ident -filter -working-tree-encoding > > > > This disables any transformation of the version-controlled file. > > > > Even better would be if gbp created the Git trees manually using > > low-level Git commands which don’t take Git attributes into account. > > Is that enough? Any later git command will still mangle the files if > that .gitattributes file is still present. > > Maybe it's not a problem since only files in debian/ should be > touched, but I guess there might still be weird problems with files in > debian/patches/ with non-native EOLs. > > Christoph
Bug#973755: git-buildpackage: gbp clone and import-* should defuse git attributes
Hi, On Fri, Jan 29, 2021 at 04:45:44PM +0100, Andrej Shadura wrote: > Hi, > > On Wed, 04 Nov 2020 16:02:01 +0100 Andrej Shadura > wrote:> Quite a lot of packages ship .gitattributes in their tarballs, > leading > > to strange effects while building packages and, most importantly, > > leading to the imports not creating Git trees identical to the tarballs. > > > > A remedy to this would be git-buildpackage creating .git/info/attributes > > with this content: > > > > * -text -eol -crlf -ident -filter -working-tree-encoding > > > > This disables any transformation of the version-controlled file. > > > > Even better would be if gbp created the Git trees manually using > > low-level Git commands which don’t take Git attributes into account. > > > > Fixing this bug will also fix #719363. > > Any update on this? Can we close this as we have git-setup-gitattributes and an option to gbp-clone now? Cheers, -- Guido > > Thanks! > > -- > Cheers, > Andrej
Bug#973755: git-buildpackage: gbp clone and import-* should defuse git attributes
> Quite a lot of packages ship .gitattributes in their tarballs, leading > to strange effects while building packages and, most importantly, > leading to the imports not creating Git trees identical to the tarballs. rdkit was also affected by this. I ended up doing "gbp import-orig --filter .gitattributes $tarball", but this will have to be remembered on every future tarball import. https://salsa.debian.org/debichem-team/rdkit/-/commit/6e8b2f28c07ea515be9549b92e975acf9d25c99b > A remedy to this would be git-buildpackage creating .git/info/attributes > with this content: > > * -text -eol -crlf -ident -filter -working-tree-encoding > > This disables any transformation of the version-controlled file. > > Even better would be if gbp created the Git trees manually using > low-level Git commands which don’t take Git attributes into account. Is that enough? Any later git command will still mangle the files if that .gitattributes file is still present. Maybe it's not a problem since only files in debian/ should be touched, but I guess there might still be weird problems with files in debian/patches/ with non-native EOLs. Christoph
Bug#973755: git-buildpackage: gbp clone and import-* should defuse git attributes
Hi, On Wed, 04 Nov 2020 16:02:01 +0100 Andrej Shadura wrote:> Quite a lot of packages ship .gitattributes in their tarballs, leading > to strange effects while building packages and, most importantly, > leading to the imports not creating Git trees identical to the tarballs. > > A remedy to this would be git-buildpackage creating .git/info/attributes > with this content: > > * -text -eol -crlf -ident -filter -working-tree-encoding > > This disables any transformation of the version-controlled file. > > Even better would be if gbp created the Git trees manually using > low-level Git commands which don’t take Git attributes into account. > > Fixing this bug will also fix #719363. Any update on this? Thanks! -- Cheers, Andrej
Bug#973755: git-buildpackage: gbp clone and import-* should defuse git attributes
Package: git-buildpackage Version: 0.9.20 Severity: important -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Dear Maintainer, Quite a lot of packages ship .gitattributes in their tarballs, leading to strange effects while building packages and, most importantly, leading to the imports not creating Git trees identical to the tarballs. A remedy to this would be git-buildpackage creating .git/info/attributes with this content: * -text -eol -crlf -ident -filter -working-tree-encoding This disables any transformation of the version-controlled file. Even better would be if gbp created the Git trees manually using low-level Git commands which don’t take Git attributes into account. Fixing this bug will also fix #719363. Thanks! - -- Cheers, Andrej -BEGIN PGP SIGNATURE- iQFIBAEBCAAyFiEEeuS9ZL8A0js0NGiOXkCM2RzYOdIFAl+iwmgUHGFuZHJld3No QGRlYmlhbi5vcmcACgkQXkCM2RzYOdK54gf+LrySXu92wrOwRpzkvBl7lccHRTw0 2a1QXSJHeDw5wwqXyO3K1lwRxQFx8vwdnEpqKmTOG4IboW9r9rKHqllhdy0UD4JM I1/LDbPB34czsao0EEjrbRorlT0dvz1GRe0c2i0B0bEPwklKntRK1MQUJJuYxszo XE8ONoCryEtVLODgWRv4rHPCdfOIWQmQFPloakyi91v2UWJDPzaw5Tjqvur7l+qI mb3rP9M3WWIfIsit/+13gl2xIt6eb1TE1+wswXQVf2Zz6QZvT1Ixxb0jGoww9q4w jMRrDKOD3WuBH3Fbiq60XYSyTSvv4cPaeGmBw7yrxkKZsw3aa/Fx6Q7Zdw== =3ONe -END PGP SIGNATURE-