Is there a way that I can empty the `buildid` so the built would be reproducible?

This issue has been created since 2021-03-06.

Is there a way that I can empty the buildid so the built would be reproducible?

mholt wrote this answer on 2021-03-10

You mean like this? golang/go#33772

If you have a moment, could you verify that specifying -ldflags=-buildid= (preferably by adding this into the commands xcaddy runs) successfully removes the build ID and does in fact produce byte-for-byte identical builds, even in different working dirs?

mohammed90 wrote this answer on 2021-03-10

You mean like this? golang/go#33772

If you have a moment, could you verify that specifying -ldflags=-buildid= (preferably by adding this into the commands xcaddy runs) successfully removes the build ID and does in fact produce byte-for-byte identical builds, even in different working dirs?

I'm confused. We already use -trimpath and the cited issue shows it was fixed specifically for -trimpath so the ldflag is no longer needed. Is that not the case?

mholt wrote this answer on 2021-03-10

@mohammed90 I think you're right, but apparently we also need to blank out the buildid.

mohammed90 wrote this answer on 2021-03-10

Just tested on MacOS:

 ~ diff <(hexdump -Cv ./caddy-1) <(hexdump -Cv ./caddy-2)
 ~ ls buildenv_2021-03-11-0
buildenv_2021-03-11-0159.953366929/  buildenv_2021-03-11-0200.745738981/

Two different dirs, no diffs across the built binaries.

mholt wrote this answer on 2021-03-10

In that case, the builds should already be reproducible. Thanks for checking on that!

Will close, but feel free to continue discussion if needed.

More Details About Repo
Owner Name caddyserver
Repo Name xcaddy
Full Name caddyserver/xcaddy
Language Go
Created Date 2020-03-21
Updated Date 2022-09-22
Star Count 381
Watcher Count 14
Fork Count 72
Issue Count 3

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Offset error in testing dataset 1 2022-09-06 2022-09-17
TurboGAP installation question 3 2022-09-07 2022-09-17
erroe while compiling 1 2021-05-08 2022-03-01
I'm getting a lot of errors 3 2021-05-25 2022-03-01
Loader stuck at this <instaloader.nodeiterator.NodeIterator object at 0x7fe1476b7ba8> 1 2021-05-23 2022-03-01
NameError: name 'Username' is not defined 6 2021-05-21 2022-03-01
Make Notes on Volunteers Editable 1 2022-03-23 2022-08-20
AttributeError when renaming device 2 2021-03-23 2022-09-26
assign report object raise AttributeError: can't set attribute 1 2022-03-09 2022-09-27
BadLogLines in `AvailabilityTests.test_recovery_after_catastrophic_failure` 1 2022-06-09 2022-09-03
providing a Chocolatey package 0 2022-07-01 2022-09-24
Feature request: Default preferences 0 2022-07-13 2022-08-05
Donation link 2 2021-02-19 2022-01-11
Filther, overwriting font settings 6 2019-02-14 2022-08-11
Show some kind of menu indicator if menu is present when using "reveal appmenu on hover" 7 2021-05-10 2022-09-17
CaC Sequence contains no matching element 1 2022-07-15 2022-09-18
LYWSD03MMC no response macOS 2 2021-03-08 2022-07-19
InnerProduct速度问题 1 2020-10-14 2022-01-07
Provide Repository Changelog 3 2022-05-30 2022-09-02
2 Factor Authentication Ignored 8 2021-01-09 2022-09-22
Having multiple newsboat instances (with separated caches) while setting cache directory 5 2022-02-03 2022-07-16
[Bug]: 服务端更新到 1.23.2 后评论默认排序问题 1 2022-09-26 2022-09-21
Chapter Request: Lancaster, Pennsylvania 2 2021-02-22 2022-09-05
Chapter Request: Windhoek ,Namibia 2 2021-08-24 2022-09-10
Error in installing your Package 4 2021-12-16 2022-09-22
Consistent crash-to-desktop after clicking the "Add Exotic Skill" button 1 2021-06-23 2022-09-04
logseq.App.showMsg(`Error: ${msg}`, "error") is broken (Invalid arity: 2) 1 2022-04-28 2022-09-26
Cant get wildcard SSL! - already tried #1188 - Might be a Python issue 26 2022-01-14 2022-09-13
Make Keybinding menu use display name 0 2022-08-10 2022-09-21
Intermittent issues connecting specific characters to servers 5 2022-08-10 2022-09-19
Installation error on Windows 11 WSL2 - PG::UndefinedTable: ERROR: relation "spree_countries" does not exist 0 2022-04-19 2022-09-01
[Meta]: Add a blank set of folder icons 0 2022-06-20 2022-09-06
[tune/core] Question about GPU allocation in Tune 9 2022-06-29 2022-07-30
how to add subject to rolebinding or clusterrole binding? 0 2021-10-19 2022-02-14
[Walk the engine research] WF2: Gameplay design 0 2022-02-27 2022-02-21
Update dependency of willdurand/jsonp-callback-validator to 2.0 0 2022-02-16 2022-09-28
DDNS里面没有集成aliyun服务商 0 2021-12-28 2022-01-16
Add Http4SpanDecorator to apache-camel-2.20 instrumetation 2 2021-11-15 2022-09-27
opening src/Powercord/modules/ in Finder on macOS creates file, .DS_Store, causes powercord to crash on startup 1 2021-11-02 2022-09-23
BasicAuthenticationMechanism challenge contains a `Quarkus` realm property 0 2022-08-15 2022-08-12
Dismissing merge dialog when saving entry makes the app unusable 2 2019-10-18 2022-07-26
Liquibase/Flyway autoconfiguration order 4 2021-02-25 2022-09-11
Lyft Android SDK integration issue 2 2018-02-23 2022-08-20
Create a runbook to handle ErrorsInExternalDNS alarm 0 2022-01-25 2022-07-06
flutter_boost 支持iPad么?我通过flutterboost在iPad横屏的情况下,打开两个page,其中一个page就会不接受用户点击响应 1 2021-11-19 2022-09-23
Please provide an example on how to provide a custom configuration 12 2021-03-08 2022-09-29
Error running tests after upgrade to libgit2-sys 0.12.23+1.2.0 9 2021-09-17 2022-09-28
Development of SCA policies for Microsoft SQL Server 2017 2 2020-06-03 2022-09-21
Update service param value for VPN referrals. 4 2021-12-22 2022-08-31
Support for SpEL pointing to related entities in projection on first level. 3 2021-07-13 2022-08-22