Thursday 5 May 2022

Re: Sending LTO delta to Debian

On Thursday, May 05 2022, Andreas Hasenack wrote:

> this came up again in a review, and I wanted to ask a broader audience.
>
> How to we send LTO[1] related delta to Debian, given that Debian isn't
> using LTO (yet)?

TBH I think it depends on the Debian maintainer. I myself will gladly
accept a patch disabling LTO in Debian if it's been identified that LTO
will break my package, even if it's just to make things easier for the
derivative distro's (Ubuntu usually, but can be others) maintainer
(given that the patch will be a no-op in Debian, as you mentioned). But
I'm talking about a simple d/rules patch that will just touch
DEB_BUILD_MAINT_OPTIONS...

> Case in point was the ust package[2], which has this bit[3] part of
> the delta (just showing the first hunk):
> @@ -1,5 +1,5 @@
> liblttng-ust-python-agent.so.1 liblttng-ust-python-agent1 #MINVER#
> * Build-Depends-Package: liblttng-ust-dev
> - __start_lttng_ust_tracepoints_ptrs@Base 2.13.0
> - __stop_lttng_ust_tracepoints_ptrs@Base 2.13.0
> + (optional=lto)__start_lttng_ust_tracepoints_ptrs@Base 2.13.0
> + (optional=lto)__stop_lttng_ust_tracepoints_ptrs@Base 2.13.0
>
> Is this upstreamable to Debian as is? I know this depends most of the
> time on the maintainer, but in general what would be our arguments?
> Does it change the behavior of package building when lto is not used?
> In a non-lto case, would the disappearance of those symbols be caught?

... this, OTOH, is more involved.

Using "=XYZ" after "optional", in my experience, is only informational.
If a symbol disappears, it will be reported even if it's marked as
optional:

https://git.dpkg.org/cgit/dpkg/dpkg.git/tree/scripts/Dpkg/Shlibs/Symbol.pm#n485

But dpkg-gensymbols won't make the distinction between "this symbol
disappeared because of LTO" vs. "this symbol disappeared, period".

With my DD hat on, I'd say that I probably wouldn't be happy accepting
such a patch because it's much easier to introduce problems due to the
fact that the symbol will be marked as optional regardless of the
reason, but really shouldn't.

Thanks,

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel