René's URL Explorer Experiment


Title: Reproducible builds by pks-t · Pull Request #4334 · libgit2/libgit2 · GitHub

Open Graph Title: Reproducible builds by pks-t · Pull Request #4334 · libgit2/libgit2

X Title: Reproducible builds by pks-t · Pull Request #4334 · libgit2/libgit2

Description: Reproducible builds have the aim of generating the exact same binary files for the same input files, thus giving an actual verifiable path from source code to binary code. So this is actually a security feature. I've set out to make our build system fully deterministic in order to enable reproducible builds. Unforunately, the expected epic journey was more of a small trip out of the door, as most stuff is already built in a deterministic way. There were only two small outliers to this. The first one is our test suite. The "generate.py" script, which generates our test suite definitions, dumped the modules in a non-deterministic way. As such, our clar test suite was compiled with differently ordered structs and was thus not deterministic. The second one was how we generate static libraries. The tools ar(1) and ranlib(1) both are non-deterministic by default because they do inlike information like UID, GID and timestamps into the resulting static archive. This can be turned off by enabling the deterministic mode via a simple flag. While this sounds rather simple, I don't really like the solution for the CMake build system, as there is no simple way to just pass in additional flags to these commands. Instead, we have to override the complete commands as defined by three variables. We could hide this behind a simple build-time option "DETERMINISTIC_BUILD" or similar. All in all, this leaves us with three files which are not reproducible in the build directory (assuming the path to the build directory does not change): two of them are log files and the third is the clar cache. The first two are indeterministic by definiton and should stay so, the third is too unimportant to care. As it is a simple serialization of Python objects via pickle, there's also no easy fix here (I think, though I may be mistaken). The script I've used to test: #!/bin/sh set -e for i in 1 2 do rm -rf /tmp/build /tmp/build${i}.sha1sum mkdir -p /tmp/build cd /tmp/build cmake /home/pks/Development/libgit2 make -j5 find . -type f | sort | while read f do sha1sum "$f" >>/tmp/build${i}.sha1sum done done diff -u /tmp/build1.sha1sum /tmp/build2.sha1sum | grep '^+'

Open Graph Description: Reproducible builds have the aim of generating the exact same binary files for the same input files, thus giving an actual verifiable path from source code to binary code. So this is actually a sec...

X Description: Reproducible builds have the aim of generating the exact same binary files for the same input files, thus giving an actual verifiable path from source code to binary code. So this is actually a sec...

Opengraph URL: https://github.com/libgit2/libgit2/pull/4334

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:4f45baac-fc91-15dd-8eb6-b65a61e343d4
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCEF2:1846A4:4A497F3:62359CA:6A5D8D92
html-safe-nonceef76dcaec52b7df194b164126296c91a8f42c6e65aae45c037f33cf461f89af2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRUYyOjE4NDZBNDo0QTQ5N0YzOjYyMzU5Q0E6NkE1RDhEOTIiLCJ2aXNpdG9yX2lkIjoiNjI0MjU5ODkyMzQzMTQxNTE4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac682aa59827941174377fec1f6a8b2c3b0e3cc68dfb3cacf328b22c7465b717cc
hovercard-subject-tagpull_request:138516369
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/libgit2/libgit2/pull/4334/files
twitter:imagehttps://avatars.githubusercontent.com/u/4056630?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/4056630?s=400&v=4
og:image:altReproducible builds have the aim of generating the exact same binary files for the same input files, thus giving an actual verifiable path from source code to binary code. So this is actually a sec...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/libgit2/libgit2 git https://github.com/libgit2/libgit2.git
octolytics-dimension-user_id394745
octolytics-dimension-user_loginlibgit2
octolytics-dimension-repository_id901662
octolytics-dimension-repository_nwolibgit2/libgit2
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id901662
octolytics-dimension-repository_network_root_nwolibgit2/libgit2
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/libgit2/libgit2/pull/4334/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flibgit2%2Flibgit2%2Fpull%2F4334%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flibgit2%2Flibgit2%2Fpull%2F4334%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=libgit2%2Flibgit2
Reloadhttps://github.com/libgit2/libgit2/pull/4334/files
Reloadhttps://github.com/libgit2/libgit2/pull/4334/files
Reloadhttps://github.com/libgit2/libgit2/pull/4334/files
Please reload this pagehttps://github.com/libgit2/libgit2/pull/4334/files
libgit2 https://github.com/libgit2
libgit2https://github.com/libgit2/libgit2
Notifications https://github.com/login?return_to=%2Flibgit2%2Flibgit2
Fork 2.6k https://github.com/login?return_to=%2Flibgit2%2Flibgit2
Star 10.5k https://github.com/login?return_to=%2Flibgit2%2Flibgit2
Code https://github.com/libgit2/libgit2
Issues 423 https://github.com/libgit2/libgit2/issues
Pull requests 108 https://github.com/libgit2/libgit2/pulls
Discussions https://github.com/libgit2/libgit2/discussions
Actions https://github.com/libgit2/libgit2/actions
Projects https://github.com/libgit2/libgit2/projects
Security and quality 9 https://github.com/libgit2/libgit2/security
Insights https://github.com/libgit2/libgit2/pulse
Code https://github.com/libgit2/libgit2
Issues https://github.com/libgit2/libgit2/issues
Pull requests https://github.com/libgit2/libgit2/pulls
Discussions https://github.com/libgit2/libgit2/discussions
Actions https://github.com/libgit2/libgit2/actions
Projects https://github.com/libgit2/libgit2/projects
Security and quality https://github.com/libgit2/libgit2/security
Insights https://github.com/libgit2/libgit2/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Flibgit2%2Flibgit2%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Flibgit2%2Flibgit2%2Fissues%2Fnew%2Fchoose
ethomsonhttps://github.com/ethomson
libgit2:masterhttps://github.com/libgit2/libgit2/tree/master
pks-t:pks/reproducible-buildshttps://github.com/pks-t/libgit2/tree/pks/reproducible-builds
Conversation 3 https://github.com/libgit2/libgit2/pull/4334
Commits 2 https://github.com/libgit2/libgit2/pull/4334/commits
Checks 0 https://github.com/libgit2/libgit2/pull/4334/checks
Files changed https://github.com/libgit2/libgit2/pull/4334/files
Please reload this pagehttps://github.com/libgit2/libgit2/pull/4334/files
Reproducible builds https://github.com/libgit2/libgit2/pull/4334/files#top
Show all changes 2 commits https://github.com/libgit2/libgit2/pull/4334/files
583e414 tests: deterministically generate test suite definitions pks-t Aug 30, 2017 https://github.com/libgit2/libgit2/pull/4334/commits/583e4141022481e21a22aa71a1c4c988a57423e9
d630887 cmake: enable reproducible static linking pks-t Aug 30, 2017 https://github.com/libgit2/libgit2/pull/4334/commits/d630887bb6ab91a55e72fddc65db93ee6abcd984
Clear filters https://github.com/libgit2/libgit2/pull/4334/files
Please reload this pagehttps://github.com/libgit2/libgit2/pull/4334/files
Please reload this pagehttps://github.com/libgit2/libgit2/pull/4334/files
CMakeLists.txt https://github.com/libgit2/libgit2/pull/4334/files#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a
generate.py https://github.com/libgit2/libgit2/pull/4334/files#diff-8628d5d8680b9abd35c120a2b09675a24d2f54cd1d00a579e0e87bc832ca4005
CMakeLists.txthttps://github.com/libgit2/libgit2/pull/4334/files#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a
View file https://github.com/pks-t/libgit2/blob/d630887bb6ab91a55e72fddc65db93ee6abcd984/CMakeLists.txt
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/libgit2/libgit2/pull/4334/{{ revealButtonHref }}
https://github.com/libgit2/libgit2/pull/4334/files#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a
ethomsonhttps://github.com/ethomson
Sep 16, 2017https://github.com/libgit2/libgit2/pull/4334/files#r139294833
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/libgit2/libgit2/pull/4334/files
pks-thttps://github.com/pks-t
Sep 20, 2017https://github.com/libgit2/libgit2/pull/4334/files#r139957499
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/libgit2/libgit2/pull/4334/files
ethomsonhttps://github.com/ethomson
Sep 20, 2017https://github.com/libgit2/libgit2/pull/4334/files#r139958344
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/libgit2/libgit2/pull/4334/files
https://github.com/libgit2/libgit2/pull/4334/files#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a
https://github.com/libgit2/libgit2/pull/4334/files#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a
https://github.com/libgit2/libgit2/pull/4334/files#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a
tests/generate.pyhttps://github.com/libgit2/libgit2/pull/4334/files#diff-8628d5d8680b9abd35c120a2b09675a24d2f54cd1d00a579e0e87bc832ca4005
View file https://github.com/pks-t/libgit2/blob/d630887bb6ab91a55e72fddc65db93ee6abcd984/tests/generate.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/libgit2/libgit2/pull/4334/{{ revealButtonHref }}
https://github.com/libgit2/libgit2/pull/4334/files#diff-8628d5d8680b9abd35c120a2b09675a24d2f54cd1d00a579e0e87bc832ca4005
https://github.com/libgit2/libgit2/pull/4334/files#diff-8628d5d8680b9abd35c120a2b09675a24d2f54cd1d00a579e0e87bc832ca4005
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.