{"id":28763886,"url":"https://github.com/cockroachdb/bincheck","last_synced_at":"2025-10-12T08:14:48.545Z","repository":{"id":22574316,"uuid":"96721684","full_name":"cockroachdb/bincheck","owner":"cockroachdb","description":"Verify CockroachDB binaries","archived":true,"fork":false,"pushed_at":"2022-03-22T00:22:57.000Z","size":17975,"stargazers_count":3,"open_issues_count":0,"forks_count":16,"subscribers_count":46,"default_branch":"master","last_synced_at":"2025-09-30T01:54:52.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cockroachdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-10T01:07:26.000Z","updated_at":"2025-09-08T17:04:32.000Z","dependencies_parsed_at":"2022-07-27T03:02:15.026Z","dependency_job_id":null,"html_url":"https://github.com/cockroachdb/bincheck","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cockroachdb/bincheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cockroachdb%2Fbincheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cockroachdb%2Fbincheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cockroachdb%2Fbincheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cockroachdb%2Fbincheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cockroachdb","download_url":"https://codeload.github.com/cockroachdb/bincheck/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cockroachdb%2Fbincheck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010802,"owners_count":26084807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-17T09:10:42.446Z","updated_at":"2025-10-12T08:14:48.492Z","avatar_url":"https://github.com/cockroachdb.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cockroachdb/bincheck\n\n[![Build Status](https://github.com/cockroachdb/bincheck/actions/workflows/ci.yaml/badge.svg)](https://github.com/cockroachdb/bincheck/actions/workflows/ci.yaml)\n\nbincheck verifies the sanity of CockroachDB release binaries. At present, the\nsanity checks are:\n\n  * starting a one-node server and running a simple SQL query, and\n  * verifying the output of `cockroach version`.\n\n## Testing a new release\n\nOpen a PR that updates the version in [VERSION] on the appropriate branch (eg: `release-2.0` for 2.0 builds).\nYou can use the little pencil button to edit the file directly through the GitHub UI (no need to\nfork the repo):\n\n**Important: make sure to select the \"start a pull request\" option before clicking \"Propose changes\":**\n  \n\u003cimg width=\"550\" src=\"https://user-images.githubusercontent.com/3051672/105749155-0b15e880-5f11-11eb-97a7-308cec768df3.png\"\u003e\n\n\nThe PR will automatically kick off checks to verify the release using GitHub\nActions.  If the checks complete successfully, you can merge the PR and you're\ndone!\n\n## The nitty-gritty\n\n### Overview\n\nFor the MacOS and Windows binaries, the mechanics involved are simple. We ask\nGitHub Actions to spin us up a MacOS or Windows runner, download the\nappropriate pre-built `cockroach` binary, and run our sanity checks.\n\nLinux is more complicated, not out of necessity, but out of ambition. We co-opt\nthe Linux verification step to additionally test support for pre-SSE4.2\nCPUs\u003csup\u003e†\u003c/sup\u003e. This requires emulating such a CPU, and Linux is the only\noperating system that is feasible to run under emulation. Windows and MacOS have\nprohibitively slow boot times, and, perhaps more importantly, Windows and MacOS\ninstall media are not freely available.\n\nSo, with the help of [Buildroot], an embedded Linux build manager, this\nrepository ships an [8.7MB Linux distribution][linux-image] that's capable of\nrunning under [QEMU] and launching our pre-built CockroachDB binaries. To verify\nthe Linux binaries, we first boot this Linux distribution on an emulated\npre-SSE4.2 CPU (`qemu-system-x86_64 -cpu qemu64,-sse4.2`), then run our sanity\nchecks from inside this VM.\n\n\u003csup\u003e†\u003c/sup\u003e\u003csmall\u003eSSE4.2 support is particularly important in CockroachDB,\nsince RocksDB internally uses a [CRC32C checksum][crc32c] to protect against\ndata corruption. SSE4.2 includes hardware support for computing CRC32C\nchecksums, but is only available on CPUs released after November 2008. Producing\na binary that can dynamically switch between the SSE4.2 and non-SSE4.2\nimplementations at runtime [has proven difficult][issue-15589].\n\u003c/small\u003e\n\n### Updating the Linux image\n\nAfter [installing Buildroot][buildroot-install]:\n\n```shell\n$ make qemu_x86_64_glibc_defconfig BR2_EXTERNAL=${BINCHECK-REPO}/buildroot\n$ make menuconfig  # Only if configuration changes are necessary.\n$ make\n$ cp output/images/bzImage ${BINCHECK-REPO}/images/qemu_x86_64_glibc_bzImage\n```\n\nAt the time of writing, `qemu_x86_64_glibc_defconfig` instructed Buildroot to\nbuild a Linux 4.9 kernel, install Bash and OpenSSH into userland, and configure\nsshd to boot at startup and allow passwordless `root` authentication.\n`/etc/fstab` is modified to mount the first hard drive at `/bincheck`, assuming\nit's a FAT volume.\n\n[buildroot-install]: https://buildroot.org/download.html\n[issue-15589]: https://github.com/cockroachdb/cockroach/issues/15589\n[linux-image]: ./images/qemu_x86_64_glibc_bzImage\n[Buildroot]: https://buildroot.org\n[CRC32C]: http://www.evanjones.ca/crc32c.html\n[QEMU]: http://qemu.org\n[VERSION]: ./VERSION\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcockroachdb%2Fbincheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcockroachdb%2Fbincheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcockroachdb%2Fbincheck/lists"}