Wednesday 4 October 2023

Fetching source code in Ubuntu: apt source, pull-lp-source, and git-ubuntu

-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEXHq+og+GMEWcyMi14n8s+EWML6QFAmUduBAFAwAAAAAACgkQ4n8s+EWML6Rv
fQ//ZYRtCXXGO3+BG0K0G4BOXHGoWTERzZu+9hE8fhPUu4pxpiItRDjNNax6p9qmsQP1vpLfaBvg
ipNk/yA8SwN63ukkvVbvd0ygF6U6NHlLwkNgmHY9s6q0q0otkr07nDlYuYIBjduNiD88rsUU8MGb
bpZoBHUar2z1VWWQuln7//nz2DINZv0RSo8q4PiGR+7s08aMQH3k3X5YZXJrk8ziZBl6MiIC8ys9
EX8Y68/45nZwruql3IrNeFLMRJs8Y8VUe90GeSQYWREwUFWGza95yRBUJEonkBkJhrbEPhsjVJs1
G7MA4CkBWf1U/JCh7txzm9ha9tVmCv9yVaF5qnIzww6vt23aLp1HwFrfGldgAj6JwQMMtKR5eF5T
MtdRqBzB76INqXp9u10MOUHVKjk6JlJE/Qv+ezz5Nst/61YnNdzvrS9ySCZZOwvwOYA51MWmDZQ7
Ozp638oDtutU3ZqrpyYZKk1MzxxJYSZ7mjmdEmIGqUDkT2mSI4BPdvv6Un51QCbJd1xl7iObnqpS
nxYKohC+Y6XC7PYOZmqV1Zp5zjoL3R2uVwXHHYMnV6fQ0m/j6460PzCWu9iwISmYDpS8wMsqKZYa
xd+hg42ELT1sfLoCcO4uqRpVxLKqzprdPiV6oMWnkuKXjvj+IoGHUz3YZzWD3OoaNLnEyotCK0JY
vrQ=
=/VIj
-----END PGP SIGNATURE-----
Hello,

Yesterday, I worked on a patch for ubuntu-dev-tools[1] to display the same
message that apt source does when fetching a package tracked in a VCS. Here's an
example of that message:

$ apt source lxqt-about
Reading package lists... Done
NOTICE: 'lxqt-about' packaging is maintained in the 'Git' version control system
at:

https://git.lubuntu.me/Lubuntu/lxqt-about-packaging.git


Please use:


git clone https://git.lubuntu.me/Lubuntu/lxqt-about-packaging.git
to retrieve the latest (possibly unreleased) updates to the package.
[...]

This message is quite useful as a reminder to fetch the code the "right way."
I've uploaded this to unstable.

I would like to bring git-ubuntu into this message, somehow. If a package does
not have a Vcs-Git line, a message such as this should be displayed:

Alternatively, you may use:
git ubuntu clone lxqt-about
to get the latest updates.

While this seems great at first, there's quite a few edge cases to consider.
After talking with Julian and Robie on IRC[2], an approach of automatically
adding a "Vcs-Clone" field via Launchpad was brought up. I would like to further
this discussion here, and ask a few specific questions:
- Is there an easy way for determining whether a given source package is
imported via git-ubuntu?
- Would it be appropriate to consolidate those messages, only giving the
"Vcs-Clone" field?
- Is there a better approach to this, one that's more sustainable long-term?
- Is git-ubuntu ready for this kind of exposure, and if it isn't, how can we
bring it to that point?

Thank you for your time; I hope this email helps move the needle forward for our
developers.

[1]
https://git.launchpad.net/ubuntu-dev-tools/commit/?id=2f396fe54956c85e0f0e62891f29dc7bab7d110b
[2] https://irclogs.ubuntu.com/2023/10/04/%23ubuntu-devel.html#t18:39

--
Simon Quigley
simon@tsimonq2.net
tsimonq2 on LiberaChat and OFTC
@tsimonq2:linuxdelta.com on Matrix
5C7A BEA2 0F86 3045 9CC8
C8B5 E27F 2CF8 458C 2FA4