Hi,
On Sat, Jan 11, 2025 at 06:30:16PM +0000, Julien Plissonneau Duquène wrote:
> Package: git-buildpackage
> Version: 0.9.37
> Severity: normal
> Tags: patch
> X-Debbugs-Cc: Otto Kekäläinen <[email protected]>, [email protected]
>
> Dear Maintainers,
>
> Could you please change `gbp clone` defaults to NOT run `gbp setup-
> gitattributes` by default?
>
> This is related to the issues reported in [1].
>
> Blindly disabling .gitattributes is likely to break things that would
> otherwise
> be perfectly working such as the cases reported above. It might cause wrong
> encodings or line endings to end up in input data for test cases (and make
> them
> fail), or in scripts intended for other operating systems. It should really be
> reserved to the rare cases where upstream .gitattributes configuration make
> packaging work difficult or impossible, and even then it has caveats.
So I've followed your link chain from [1] and randomly picked kotlin and
what I see there is that `gbp clone` leaves a checkout with changes
since the .git/info/attributes is added too late (when files are already
checked out). So I think what we should do in gbp is either make sure
attribtes apply during clone or ensure that the checkout is adjusted to
the changed attributes after clone (e.g. via the equivalent of `git
checkout -f`). I think that's indeed a bug in gbp-clone that should be
fixed. I've opened
https://salsa.debian.org/agx/git-buildpackage/-/merge_requests/49
for that.
Cheers,
-- Guido
>
> A link to a MR to implement this change will follow.
>
> Best Regards,
>
>
> [1]: https://salsa.debian.org/salsa-ci-team/pipeline/-/issues/409
>
> --
> Julien Plissonneau Duquène
>
>
> -- System Information:
> Debian Release: trixie/sid
> APT prefers testing
> APT policy: (990, 'testing'), (20, 'unstable'), (10, 'experimental'), (5,
> 'stable-updates'), (5, 'stable-security'), (5, 'stable')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 6.11.10-amd64 (SMP w/12 CPU threads; PREEMPT)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not
> set
> Shell: /bin/sh linked to /usr/bin/dash
> Init: systemd (via /run/systemd/system)
> LSM: AppArmor: enabled
>
> Versions of packages git-buildpackage depends on:
> ii devscripts 2.24.10
> ii git 1:2.45.2-1
> ii man-db 2.13.0-1
> ii python3 3.12.8-1
> ii python3-dateutil 2.9.0-3
> ii python3-yaml 6.0.2-1+b1
> ii sensible-utils 0.0.24
>
> Versions of packages git-buildpackage recommends:
> ii cowbuilder 0.90
> ii pbuilder 0.231.1
> ii pristine-tar 1.50+nmu2
> ii python3-requests 2.32.3+dfsg-1
> ii sbuild 0.88.1
>
> Versions of packages git-buildpackage suggests:
> pn python3-notify2 <none>
> ii sudo 1.9.16p1-1
> ii unzip 6.0-28
>
> -- no debconf information