{"id":23984587,"url":"https://github.com/tohuwabohu/puppet-patch","last_synced_at":"2026-03-11T19:30:55.606Z","repository":{"id":15274620,"uuid":"18003964","full_name":"tohuwabohu/puppet-patch","owner":"tohuwabohu","description":"Puppet module to manage and apply diff files using the patch command","archived":false,"fork":false,"pushed_at":"2023-08-11T20:38:29.000Z","size":103,"stargazers_count":6,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-20T13:38:28.059Z","etag":null,"topics":["diff-files","patch","puppet"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tohuwabohu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2014-03-22T06:55:27.000Z","updated_at":"2023-09-14T19:56:26.000Z","dependencies_parsed_at":"2024-06-21T05:44:50.151Z","dependency_job_id":"a8c9f3c5-963e-4366-a786-ae4f6553eeee","html_url":"https://github.com/tohuwabohu/puppet-patch","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/tohuwabohu/puppet-patch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tohuwabohu%2Fpuppet-patch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tohuwabohu%2Fpuppet-patch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tohuwabohu%2Fpuppet-patch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tohuwabohu%2Fpuppet-patch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tohuwabohu","download_url":"https://codeload.github.com/tohuwabohu/puppet-patch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tohuwabohu%2Fpuppet-patch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30395578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T18:46:22.935Z","status":"ssl_error","status_checked_at":"2026-03-11T18:46:17.045Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["diff-files","patch","puppet"],"created_at":"2025-01-07T13:33:30.276Z","updated_at":"2026-03-11T19:30:55.591Z","avatar_url":"https://github.com/tohuwabohu.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# patch\n\n[![License](https://img.shields.io/github/license/tohuwabohu/puppet-patch.svg)](https://github.com/tohuwabohu/puppet-patch/blob/master/LICENSE.txt)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/tohuwabohu/patch.svg)](https://forge.puppetlabs.com/tohuwabohu/patch)\n[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/tohuwabohu/patch.svg)](https://forge.puppetlabs.com/tohuwabohu/patch)\n\n## Overview\n\nManage and apply diff files on original files using the patch command.\n\n## Usage\n\n* Install patch with package settings; this itself doesn't do much. To apply patches, you have to use `patch::file`.\n```\nclass { 'patch': }\n```\n\n* Apply diff referenced by a file on a given original file\n```\npatch::file { '/path/to/file':\n  diff_source =\u003e '/path/to/diff',\n}\n```\n\n* Apply inline diff on a given original file\n```\npatch::file { '/path/to/file':\n  diff_content =\u003e '\u003cinline-diff\u003e',\n}\n```\n\n* Apply two diff files in a particular order on the same original file\n```\n$target = '/path/to/file'\npatch::file { 'first-patch':\n  target      =\u003e $target,\n  prefix      =\u003e '0001',\n  diff_source =\u003e '/path/to/0001.diff',\n}\npatch::file { 'second-patch':\n  target      =\u003e $target,\n  prefix      =\u003e '0002',\n  diff_source =\u003e '/path/to/0002.diff',\n  require     =\u003e Patch::File['first-patch'],\n}\n```\n\n* Apply diff to a directory\n```\npatch::directory { '/path/to/target/directory':\n  diff_source =\u003e '/path/to/diff',\n  strip =\u003e 2,\n}\n```\n\n## Limitations\n\nThe module has been tested on the following operating systems. Testing and patches for other platforms are welcome.\n\n* Debian 7.0 (Wheezy)\n* Debian 8.0 (Jessie)\n* Ubuntu 14.04 (Trusty Tahr)\n* Ubuntu 16.04 (Xenial Xerus)\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n### Development\n\nThis project uses rspec-puppet and beaker to ensure the module works as expected and to prevent regressions.\n\n```\ngem install bundler\nbundle install --path vendor\n\nbundle exec rake spec\nbundle exec rake beaker\n```\n(note: see [Beaker - Supported ENV variables](https://github.com/puppetlabs/beaker-rspec/blob/master/README.md)\nfor a list of environment variables to control the default behaviour of Beaker)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftohuwabohu%2Fpuppet-patch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftohuwabohu%2Fpuppet-patch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftohuwabohu%2Fpuppet-patch/lists"}