{"id":22914179,"url":"https://github.com/suse/klp-build","last_synced_at":"2025-05-12T13:42:55.889Z","repository":{"id":231944691,"uuid":"781512464","full_name":"SUSE/klp-build","owner":"SUSE","description":"The kernel livepatching creation tool","archived":false,"fork":false,"pushed_at":"2025-05-06T08:11:29.000Z","size":994,"stargazers_count":12,"open_issues_count":8,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-06T09:26:51.054Z","etag":null,"topics":["kernel","linux","livepatch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SUSE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-03T14:22:27.000Z","updated_at":"2025-04-16T11:02:08.000Z","dependencies_parsed_at":"2024-04-07T01:37:45.570Z","dependency_job_id":"0bd81a89-2048-4da5-a528-03e9274e854f","html_url":"https://github.com/SUSE/klp-build","commit_stats":null,"previous_names":["suse/klp-build"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUSE%2Fklp-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUSE%2Fklp-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUSE%2Fklp-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUSE%2Fklp-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SUSE","download_url":"https://codeload.github.com/SUSE/klp-build/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253749436,"owners_count":21958120,"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":["kernel","linux","livepatch"],"created_at":"2024-12-14T05:13:41.178Z","updated_at":"2025-05-12T13:42:55.854Z","avatar_url":"https://github.com/SUSE.png","language":"Python","readme":"# klp-build\n\nThe kernel livepatching creation tool\n\n## Development\n\nTo install the project and dependencies use:\n\n`pipx install .`\n\nTo run the project locally and test your changes use:\n\n`./klp-build`\n\nTo run tests use:\n\n`tox -e tests`\n\n# Creating a livepatch for multiple SUSE Linux Enterprise codestreams\n\n## Configuration\nklp-build supports a per-user configuration file located in\n__~/.config/klp-build/config__, following the standard ``key=value`` format.\nThe mandatory variables are:\n\n#### work_dir\nPath to directory where the livepatch data/code will be placed, including the one\ngenerated by the different stages of the livepatch creation.\nBy default set to: __~/klp/livepatches__.\n\n#### data_dir\nPath to directory where the dowloaded kernels source code will be placed. To create a\nlivepatch for upstream kernel, it has to point to a kernel tree with the\nsources already built. By default set to: __~/klp/data__.\n\n#### kernel_src_dir\nOnly used for SLE kernels. Should contain the path to the\n[kernel-source tree](https://github.com/SUSE/kernel-source) in order to check\nwhich codestreams already contains the fix and don't need the livepatch. It also\ngets the fix for the CVE being livepatched.\n\n## Setup\nTo create a new \"livepatch project\", use the setup command:\n\n```sh\nklp-build setup --name bsc1197597 --cve 2022-1048 --mod snd-pcm --conf CONFIG_SND_PCM --file-funcs sound/core/pcm.c snd_pcm_attach_substream snd_pcm_detach_substream --codestreams '15.5' --archs x86_64 ppc64le\n```\n\nklp-build will check if the configuration is enabled, if the symbol is present\non the module being livepatched. The check will be done in all architectures\ninformed as argument. If the argument is not informed, it will return an error\nif configuration is not available on any of them.\n\n## Extraction\n\n[klp-ccp](https://github.com/SUSE/klp-ccp) is used to extract the defective functions.\nTo extract the livepatches, run the command below:\n\n```sh\nklp-build extract --name bsc1197597\n```\n\nThe resulting livepatched will be placed\non __~/klp/livepatches/bsc1197597/ccp/$codestream__/lp, for example:\n\n``/home/john/klp/livepatches/bsc1197597/ccp/15.5u40/lp``\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuse%2Fklp-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuse%2Fklp-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuse%2Fklp-build/lists"}