All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC PATCH] toolchain/toolchain-wrapper: remove --build-id=none option
Date: Wed, 11 Nov 2020 21:58:16 +0100	[thread overview]
Message-ID: <20201111205816.GD3971474@scaer> (raw)
In-Reply-To: <20201111194840.2949984-1-john@metanate.com>

Jihn, all,

On 2020-11-11 19:48 +0000, John Keeping spake thusly:
> The only build-id style that is not reproducible is "uuid", but the
> default is "sha1" so packages would have to go out of their way to
> choose a non-reproducible build-id.  Having build IDs in general is
> useful as it can be used to match split debuginfo.

I would think we would then want to make sha1 the explicit build-id,
rather than merely depend on the default (even though it has been sha1
since 2007, it may change with future binutils versions).

> I haven't seen any packages that do this, and if there are any that use

Try mot to use first person in commit message; instead, use a neutral
third-person. Also, I find your commit message to have things a bit
shuffled around. We usually liek to have commit logs that explain the
current status, explain why this is a problem, and explain what is done
to overcome the problem, For example:

    When a reproducible build is attempted (with BR2_REPRODUCIBLE=y), we forcibly
    disable the use of build-ids, on the assumption that they are not reproducible,
    as explained in b285c80143 (toolchain/toolchain-wrapper: explicitly pass
    --build-id=none if BR2_REPRODUCIBLE).

    However, only the 'uuid' build-id is not reproducible. 'sha1' (and 'md5') are
    based on the "normative parts of the output contents", so are stable accross
    builds.

    Re-enable use of the build-id even in reproducible builds. We do ensure that
    the same build-id type is used, by forcing it to 'sha1'

However, I would still doubt that build-ids are reproducible, even when
explicitly set to 'sha1', which has been the default since 2007 now, and
given that the commit referenced above was done because indeed they were
not reproducible...

So, I am not sure what the "normative parts of the output contents" are,
but it seems that there is something that is not reproducible, that
influences the build-id. See also the snippet referenced from that
commit https://gitlab.com/snippets/1886180/raw , which found that the
the only delta between two reproducible builds was exactly only the
sha1-based build-id...

Regards,
Yann E. MORIN.

> non-reproducible build-ids then that should be treated as a bug in that
> package like any other reproducibility issue; there is no reason to
> globally disable build IDs when BR2_REPRODUCIBLE is set.
> 
> Signed-off-by: John Keeping <john@metanate.com>
> ---
>  toolchain/toolchain-wrapper.mk | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk
> index 8b551e3a18..56d86fa1ea 100644
> --- a/toolchain/toolchain-wrapper.mk
> +++ b/toolchain/toolchain-wrapper.mk
> @@ -22,7 +22,6 @@ TOOLCHAIN_WRAPPER_OPTS = \
>  	$(call qstrip,$(BR2_TARGET_OPTIMIZATION))
>  
>  ifeq ($(BR2_REPRODUCIBLE),y)
> -TOOLCHAIN_WRAPPER_OPTS += -Wl,--build-id=none
>  ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y)
>  TOOLCHAIN_WRAPPER_OPTS += -ffile-prefix-map=$(BASE_DIR)=buildroot
>  else
> -- 
> 2.29.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2020-11-11 20:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 19:48 [Buildroot] [RFC PATCH] toolchain/toolchain-wrapper: remove --build-id=none option John Keeping
2020-11-11 20:58 ` Yann E. MORIN [this message]
2020-11-11 21:00   ` Yann E. MORIN
2020-11-12 11:07   ` John Keeping
2020-11-12 20:03     ` John Keeping
2020-11-12 21:11       ` Yann E. MORIN
2020-11-12 20:58     ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201111205816.GD3971474@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.