{"id":19675818,"url":"https://github.com/progerxp/safepatch","last_synced_at":"2025-06-15T21:41:46.760Z","repository":{"id":28619597,"uuid":"32138254","full_name":"ProgerXP/SafePatch","owner":"ProgerXP","description":"Managable automatic patching of program files regardless of language, platform and design","archived":false,"fork":false,"pushed_at":"2015-03-13T08:06:43.000Z","size":520,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-10T04:25:26.156Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ProgerXP.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}},"created_at":"2015-03-13T07:19:16.000Z","updated_at":"2024-03-16T20:52:16.000Z","dependencies_parsed_at":"2022-09-03T16:10:48.410Z","dependency_job_id":null,"html_url":"https://github.com/ProgerXP/SafePatch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgerXP%2FSafePatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgerXP%2FSafePatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgerXP%2FSafePatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgerXP%2FSafePatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProgerXP","download_url":"https://codeload.github.com/ProgerXP/SafePatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240985482,"owners_count":19889101,"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":[],"created_at":"2024-11-11T17:26:00.568Z","updated_at":"2025-02-27T05:41:42.545Z","avatar_url":"https://github.com/ProgerXP.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"**SafePatch lets you edit program files and track those changes creating \"patches\" that can later be reverted or reused in a different setup.** Standalone PHP patches can be built providing automated installation and reverting of the bundled _safepatch_.\n\nMultiple patches are merged together gracefully. Patching is atomic (transactional) so that either it is fully completed or all files are left unchanged. \u003cbr /\u003e\nIntuitive text patch file format (`.sp`) is used but others (VQMod `.xml`, FluxBB `.txt`) can be used as well if the corresponding loader is written.\n\n**Non-PHP applications can use SafePatch** since no source code integration is required (albeit it's possible). Both **text and binary files** are supported.\n\nThis project has been migrated from Google Code.\n\n## Features\n* dependencies-free self-contained core (`safepatch.php`)\n* **web admin panel** for managing installed patched, tracking their changes (**diff**), etc.\n* patch builds with a web interface to revert them - all in one PHP script\n* atomic patching/reverting: if an error occurs (e.g. a file could not be written) all changes are rolled back\n* stability: detection of changes done to the patch or patched files after the patch has been applied\n* high-quality object-oriented code using exceptions instead of `die()`\n\n_The original idea was inspired by **[VQMod](http://code.google.com/p/vqmod/)**._ Main differences are:\n* **Files are edited in-place**:\n * Independence of the target application language (it might be _Python_, _C_ or anything else) because no file redirections need to be done.\n * Changes can be done directly to program files and they won't require cache update or anything else apart from changing the file itself.\n * **SafePatch** code can be removed and all changes will be kept.\n* **XML engine** is not required to parse **SafePatch** files\n* There's a [plugin](http://code.google.com/p/safepatch/source/browse/plugins/core/vqmod.php) to treat **VQMod** `.xml` patches as if they were in native **SafePatch** format - see Configuration for more details\n\n## Getting started\n**Installation process** is as straightforward as it can be: download the latest version and extract it somewhere on your server. _SafePatch_ should work with default settings if you give it write permissions to `logs/` and `state/` and read-only to the rest. Default configuration (**basePath**) assumes that files to be patched are located one level above the _SafePatch_ root.\n\nYou can now open the **control panel** (`http://yourhost.com/safepatch/admin/`) and start uploading patches or do other maintenance.\n\nIf you're familiar with PHP and the application you're attaching _SafePatch_ to is written in PHP too you can make it **automatically refresh patches** appearing in `patches/` by putting the following code at the beginning of `index.php` and/or other files that user requests from the Internet:\n\u003ccode language=\"php\"\u003erequire 'safepatch_root/safepatch.php';\u003c/code\u003e\n\n  Don't forget to **limit access to the control panel** using [HTTP Authorization](http://httpd.apache.org/docs/2.0/howto/auth.html) (bundled `.htaccess` has commented-out directives for this), GuestMode plugin or some other means.\n\n**Patching process** is also intuitive and can be done in two ways:\n* **Manual** - upload patches (usually files with `.sp` extensions but might be `.xml` or `.txt`) into `safepatch_root/patches/`; they will be applied automatically if you're put the above PHP code into your web scripts or you can apply them manually via the control panel;\n* **Automatic** - use the control panel's _Patches_ page to upload patches from your computer; they will be automatically stored in `patches/` and applied thereafter.\n\nKeep in mind that it's also possible to **create standalone patch builds** that work like mini-control panels and don't require the target server to have _SafePatch_ installed - just upload the single file and open it in a web browser.\n\n## Control panel\n![SafePatch control panel screenshot](https://raw.githubusercontent.com/ProgerXP/SafePatch/master/docs/screenshot.png)\n\n## Installing FluxBB mods video demonstration\nhttp://www.youtube.com/watch?v=uYbu_r75fy8\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogerxp%2Fsafepatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogerxp%2Fsafepatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogerxp%2Fsafepatch/lists"}