{"id":21734907,"url":"https://github.com/santana/binpatch","last_synced_at":"2025-07-12T07:35:58.592Z","repository":{"id":393835,"uuid":"11698","full_name":"santana/binpatch","owner":"santana","description":"Ports-like framework for creating binary patches for OpenBSD","archived":false,"fork":false,"pushed_at":"2012-03-21T05:40:16.000Z","size":138,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-19T15:48:22.356Z","etag":null,"topics":["openbsd","patching"],"latest_commit_sha":null,"homepage":"http://openbsdbinpatch.sourceforge.net/","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/santana.png","metadata":{"files":{"readme":"README","changelog":"Changelog","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":"2008-04-22T04:18:07.000Z","updated_at":"2024-11-06T12:50:09.000Z","dependencies_parsed_at":"2022-07-07T13:35:48.263Z","dependency_job_id":null,"html_url":"https://github.com/santana/binpatch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/santana/binpatch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santana%2Fbinpatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santana%2Fbinpatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santana%2Fbinpatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santana%2Fbinpatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santana","download_url":"https://codeload.github.com/santana/binpatch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santana%2Fbinpatch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264958198,"owners_count":23689011,"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","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":["openbsd","patching"],"created_at":"2024-11-26T05:11:06.842Z","updated_at":"2025-07-12T07:35:58.575Z","avatar_url":"https://github.com/santana.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"= The binpatch framework\n\nTable of contents\n\n1. What is binpatch\n2. Why binary patches\n3. Using binpatch\n\t3.1 Maintenance\n\t3.2 Building a binary patch\n\t3.3 Installation\n4. Download\n\n== 1. What is binpatch\n\nbinpatch is a framework for creating binary patches for OpenBSD on all\nplatforms in a semi-automatic way. It can automatically download the\nsource patches published on http://www.openbsd.org/errata.html, apply them,\nbuild them, and package the result into binary patches.\n\nThese binary patches in turn can be distributed across a network and applied\neasily to any number of servers with a custom script. Since they are just\nsimple compressed tar balls with the programs/libraries patched, applied is\nas easy as:\n\n# tar xzpf binpatch-3.8-i386-001.tgz -C /\n\n== 2. Why binary patches\n\nBinary patches is a convenient way to keep your servers up to date with\nsecurity and reliability patches.  Unlike the traditional method of patching\nthe source tree, applying binary patches doesn't need extra disk space to\nhold the whole source tree, compilers or a powerful enough CPU to build the\nprograms patched in a reasonable period of time.\n\n== 3. Using binpatch\n\nThe binpatch framework resemblances the OpenBSD ports subsystem in many ways.\nIt's no coincidence since binpatch took ideas from the OpenBSD ports\nsubsystem.\n\nbinpatch is a make script with routines that automate downloading, applying,\nbuilding and packaging binary patches. Using binpatch means executing the\nfollowing tasks: maintenance, building and installation.\n\nMaintenance and building are not intended for end users of binary patches. If\nyou are insterested only on installing a binary patch you can safely skip the\nfollowing two sections.\n\n=== 3.1 Maintenance\n\nThe magic in binpatch must be invoked by a custom Makefile that informs\nbinpatch about the patches available and how they should be built. It's similar\nto making a port, where you need to write a Makefile with directions about how\na port must be built. A sample self-documented Makefile is included in this\ndistribution. After editing a Makefile, we have to build the patched files.\n\nThis is the sequence of targets:\n\n\tinit: \"fake\" install of a complete OpenBSD system\n\textract: unpacks the OpenBSD sources\n\tpatch: downloads the patch given from the master site and applies it\n\tbuild: builds the programs/libraries affected\n\tplist: creates the PLIST with the names of the files modified\n\nThere's no fetch target. binpatch doesn't currently download neither the\ninstallation sets nor the sources. You have to put them manually under the\nrequired directory.\n\nThe binpatch directory structure must be like this:\n\nbinpatch/\n\t|\n\t+--- Makefile\n\t|\n\t+--- bsd.binpatch.mk\n\t|\n\t+--- distfiles/\n\t|\t|\n\t|\t+--- i386/  (installation sets here)\n\t|\t|\n\t|\t+--- src.tar.gz\n\t|\t|\n\t|\t+--- sys.tar.gz\n\t|\n\t+--- packages/\n\t|\n\t+--- patches/\n\t|\t|\n\t|\t+--- common/\n\t|\t|\n\t|\t+--- i386/\n\t|\n\t+--- pkg/\n\t|\t|\n\t|\t+--- PLIST-i386-001 (PLIST files here)\n\t|\n\t+--- work-binpatch-3.7/\n\t\t|\n\t\t+--- fake/\n\t\t|\n\t\t+--- obj/\n\t\t|\n\t\t+--- src/\n\nAll directories, except for distfiles, are created by binpatch.\n\nBuilding the patches files is as easy as:\n\n# make PATCH=\"001\" build\n\nor:\n\n# make PATCH=\"001\"\n\nsince build is the default target. build will run all the previous steps\nneeded.\n\nAfter that, run the plist target:\n\n# make PATCH=\"001\" plist\n\nYou'll get a PLIST file under pkg with the name of the modified files.\nBuilders of binary patches will use this file to package binary patches.\n\nWARNING: binpatch is not aware of any dependency between patches. You have\nto build them sequentially. DO NOT clean anything.\n\n=== 3.2 Building a binary patch\n\n# make PATCH=\"001\" package\n\nThat's it. This will create a binpatch-${OSREV}-${ARCH}-001.tgz file under the\npkg directory.\n\n=== 3.3 Installation\n\nFrom within the binpatch subdirectory and after building the binary patch:\n\n# make PATCH=\"001\" install\n\nor if you got the binary patch from somewhere else:\n\n# tar xzpf binpatch-${OSREV}-${ARCH}-001.tgz -C /\n\nbinpatch doesn't provide a way to keep track of patches applied, but if you\nneed it, you can always write a simple script to do it:\n\npatch_add:\n#!/bin/sh\ntar xzpf \"$1\" -C /\nmkdir -p /var/db/patches/`basename \"$1\" .tgz`\n\npatch_info:\n#!/bin/sh\nls /var/db/patches/\n\npatch_add could be modified to backup the files listed by tar tf $1 into\n/var/db/patches; this would make patch_delete possible.\n\nWARNING: Binary patches are incremental and cannot be uninstalled.\n\n== 4. Download\n\nbinpatch is freely available under the BSD license at\nhttp://sf.net/projects/openbsdbinpatch\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantana%2Fbinpatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsantana%2Fbinpatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantana%2Fbinpatch/lists"}