{"id":21506620,"url":"https://github.com/afresh1/sxxu","last_synced_at":"2025-07-16T01:33:38.275Z","repository":{"id":8154308,"uuid":"9574762","full_name":"afresh1/sxxu","owner":"afresh1","description":"OpenBSD SiteXX Utilities","archived":false,"fork":false,"pushed_at":"2020-06-15T01:26:15.000Z","size":2085,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"blead","last_synced_at":"2023-03-11T20:32:37.056Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"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/afresh1.png","metadata":{"files":{"readme":"README","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":"2013-04-21T04:25:01.000Z","updated_at":"2022-07-03T22:55:17.000Z","dependencies_parsed_at":"2022-09-24T14:33:09.372Z","dependency_job_id":null,"html_url":"https://github.com/afresh1/sxxu","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afresh1%2Fsxxu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afresh1%2Fsxxu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afresh1%2Fsxxu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afresh1%2Fsxxu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afresh1","download_url":"https://codeload.github.com/afresh1/sxxu/tar.gz/refs/heads/blead","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226090712,"owners_count":17572117,"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-23T19:43:18.153Z","updated_at":"2024-11-23T19:43:18.761Z","avatar_url":"https://github.com/afresh1.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"sxxu - siteXX utility\n=====================\n## a tool to help build OpenBSD siteXX files ##\n\nThis was inspired by siteXYtools from mongers.org, but it seemed like it\nneeded a few additional features to make it easier to do more common tasks.\n\nFor more information on siteXX files see:\nhttp://www.openbsd.org/faq/faq4.html#site\n\n\nThe goals of sxxu are to help you:\n* Keep configuration for your systems in a source control\n* Recover from a disaster more quickly\n* Do a matching install on a secondary system so you can\n  * Upgrade between versions of OpenBSD with the ability to revert\n  * Replace aging hardware\n  * Build a test environment before pushing changes to a production system\n\nsxxu is meant to be a simple utility for installing systems.  It does not have\nthe ability to continue to push changes out to already installed systems.  For\nthat functionality there are many more powerful solutions.  I do wonder if it\nwould be possible to patch sysmerge to support some way of migrating these\nfiles.\n\nSome of the problems sxxu tries to solve:\n* duplication of common configuration for each system\n* permissions easily get broken when configuration is in source control\n\n### USAGE ###\n    sxxu [-kmR] [-w WRKDIR]  [machine1 [machine2 [...]]]\n     -k : Keep WRKDIR\n     -m : rebuild mtree files\n     -R : don't Recurse into Roles\n     -w : specify the WRKDIR\n\n\n### DETAILS ###\n\nIn the basedir, each directory is considered a \"role\", the common directory is\nmerged into each role by default and any directory named role-* does not\ngenerate a tgz by default.\n\nAny of the directory structure not in the siteXX directory is treated as a\nnormal siteXX that will extract to the root of your system after the install.\n\nSpecial files are kept in the siteXX directories.  These special files are\nprocessed by the install.sxxu after install.\n\nIf a role/install.site exists, this **WILL** overwrite the `install.sxxu` that\nwould have processed these special files.\n\nCreate a directory structure for your system:\n\n    basedir/\n     |-common/\n     |---siteXX\n     |------roles\n     |------mtree\n     |------siteXXrc\n     |------pkg_add_list\n     |------install_list\n     |------patches/\n     |------packages/\n     |------install.site\n     |-machine1/\n     |---siteXX/\n     |-machine2/\n     |---etc/\n     |------my_app.conf\n     |---siteXX/\n     |-role-imap/\n     |---siteXX/\n     |---var/\n     |-----sendmail/\n\nSpecial files and directories inside the siteXX directory:\n  * roles\n    * Contains a list of \"roles\" (directories in the basedir) to merge into\n      this configuration.  The common directory is automatically included in\n      all configurations.\n\n  * mtree\n    * An [mtree(8)](http://www.openbsd.org/cgi-bin/man.cgi?query=mtree\u0026sektion=8)\n      spec file for permissions on the files in this role. It gets\n      applied before the files are put into the archive. See below\n      for notes on how to create and update.\n\n  * siteXXrc\n    * A ksh script that is included before running the `*_list` commands and\n      the individual `install.site` files for each role.\n\n  * pkg_path\n    * A list (one per line) of sites to add to the `PKG_PATH` environment.\n      Can also be colon separated the same as a normal `PKG_PATH`.\n\n  * *_list\n    * A list of arguments to commands to be run.  For example if `pkg_add_list`\n      containing \"rsync nrpe check_hw_sensors\" will attempt to run\n      `pkg_add rsync nrpe check_hw_sensors`.\n\n      The command is executed for each line of the file.\n\n      You can set environment variables in the siteXXrc file for arguments.\n      Setting \"`pkg_add_args='-i'`\" in a siteXXrc would make the above command\n      `pkg_add -i rsync nrpe check_hw_sensors`\n\n  * patches/\n    * All patches in this dir need to be relative to the root of the system\n      where the tgz was extracted.\n\n  * packages/\n    * Package files that will get installed.  Completely separate from\n      pkg_add_list above.  It does inherit `pkg_path` and `pkg_add_args`.\n\n  * install.site\n    * Your script that gets run after all the above things have been done.\n\n/etc/hostname.if files\n\nIf you create /etc/hostname files with generic interfaces, then set \n${interface}_if in siteXXrc to the name of the interface, sxxu will\nrename the hostname file to the interface you specified.\n\nIf you create `/etc/hostname.egress` and in siteXX/siteXXrc set\n`egress_if=em0` then after other processing, the `/etc/hostname.egress` file\nwill be renamed to `/etc/hostname.em0`\n\n### MTREE ###\n\nYou can use `sxxu -m` to generate mtree spec files.  This will generate the\nspec files with the permissions the files have after copying and applying the\nexisting mtree file.\n\nYou can get some more advanced features with some other switches.\n\n    # sxxu -kRw /tmp/sxxu-work\n\nwill extract all roles including those named role-* into /tmp/sxxy-work\nwithout following the included roles.  At that point you can change\npermissions in the work directory as you see fit, then when you are ready,\nfrom the place where your source files are you would run\n\n    $ sxxu -mw /tmp/sxxu-work\n\nwhich will regenerate the mtree specs with the permissions you have set.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafresh1%2Fsxxu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafresh1%2Fsxxu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafresh1%2Fsxxu/lists"}