{"id":23739632,"url":"https://github.com/chaotic-aur/toolbox","last_synced_at":"2025-09-04T15:31:30.265Z","repository":{"id":38318985,"uuid":"279072194","full_name":"chaotic-aur/toolbox","owner":"chaotic-aur","description":"Unified kit with all the scripts required for maintaining the repository 🧰","archived":false,"fork":false,"pushed_at":"2024-04-08T18:54:38.000Z","size":470,"stargazers_count":77,"open_issues_count":5,"forks_count":11,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-04-08T22:12:41.151Z","etag":null,"topics":["archlinux","aur","automation","continuous-deployment","pkgbuild","repository-management"],"latest_commit_sha":null,"homepage":"https://aur.chaotic.cx","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chaotic-aur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-07-12T13:40:16.000Z","updated_at":"2024-03-29T06:26:42.000Z","dependencies_parsed_at":"2022-07-12T02:17:03.269Z","dependency_job_id":"0c8ef000-fed4-437f-b129-acd8ed1aa6d3","html_url":"https://github.com/chaotic-aur/toolbox","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/chaotic-aur%2Ftoolbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaotic-aur%2Ftoolbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaotic-aur%2Ftoolbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaotic-aur%2Ftoolbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaotic-aur","download_url":"https://codeload.github.com/chaotic-aur/toolbox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231970931,"owners_count":18453925,"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":["archlinux","aur","automation","continuous-deployment","pkgbuild","repository-management"],"created_at":"2024-12-31T09:37:04.186Z","updated_at":"2024-12-31T09:39:00.005Z","avatar_url":"https://github.com/chaotic-aur.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Chaotic AUR\n\n## CLI\n\n- `chaotic pr{,epare} ${INPUTDIR} $@`\n\n  It generates a building script to be later run in a containerized environment.\n  `$INPUTDIR` is the name of the directory in \"$PWD\" which contains a PKGBUILD.\n\n- `chaotic {lw,lowerstrap}`\n\n  It generates a lowerdir for later chrooting.\n\n- `chaotic {mk,makepkg} ${INPUTDIR} $@`\n\n  Builds the package in a container using systemd-nspawn.\n  `$INPUTDIR` is the result of a `prepare`\n\n- `chaotic {mkd,makepwd} [${PACKAGES[@]}]`\n\n  Prepare and build all packages in the current directory.\n  If `PACKAGES` are not provided then it will try to build all sub-directories.\n\n- `chaotic {si,interfere-sync}`\n\n  Sync packages' interference repo.\n\n- `chaotic {bump,interfere-bump} [${PACKAGES[@]}]`\n\n  Generate and push a PKGREL_BUMPS file for use in interfere. Old entries will automatically be removed.\n  Uses `repoctl`.\n\n- `chaotic {sp,package-lists-sync}`\n\n  Sync package list repo.\n\n- `chaotic {dp,deploy} ${INPUTDIR}`\n\n  Sign the package and send to primary node.\n\n- `chaotic {dbb,db-bump}`\n\n  Add recently deployed packages to the database, while moving replaced packages to the archive.\n  Uses `repoctl`.\n\n- `chaotic db-rebuild`\n  Completely rebuild the database and files database from scratch, keeping the original DB around until the rebuild is finished.\n\n- `chaotic {rm,remove} ${PACKAGES[@]}`\n\n  Remove and archive all listed packages.\n  Uses `repoctl`.\n\n- `chaotic {get,aur-download} [-r] ${PACKAGES[@]}`\n\n  Download listed packages' sources from AUR.\n  Uses `repoctl`.\n\n- `chaotic cl{,eanup} ${INPUTDIR}`\n\n  Safely deletes old package sources.\n\n- `chaotic help {syncthing,rsync}`\n\n  Instructions to the mirroring services.\n  RSync is one-way (primary-\u003ecluster) only, and Syncthing is both ways.\n\n- `chaotic routine {hourly,morning,afternoon,nightly,midnight}`\n\n  Run the specified routine.\n\n- `chaotic routine clean-archive`\n\n  When on a primary node, clean up the archive folder.\n\n- `chaotic {clean-duplicates,dedup}`\n\n  Moves packages which have been replaced by newer (modify time) packages to the archive folder.\n\n- `chaotic {clg,clean-logs}`\n\n  After a `chaotic makepwd`, remove successfull and \"already built\" logs.\n\n- `chaotic {cls,clean-srccache} ${PACKAGE}`\n\n  Removes cached sources from a specific package.\n\n- `chaotic clean-sigs {,-q}`\n\n  Moves package files or archive files without their corresponding signature or archive file to the package archive.\n  Files have to be at least 1 hour old to be considered.\n\n- `chaotic {srt,sort-logs}`\n\n  Unclutters and sorts the raw log directory into easy to read subcategories\n\n- `chaotic find-discarded`\n\n  Find and print discarded packages. All packages that are in the database, but do not exist in the package list repo, are considered discarded, but have to be deleted manually.\n\n## Involved directories\n\n- `/var/cache/chaotic/sources/${PACKAGETAG}`\n\n  Per-package `SRCDEST`.\n\n- `/var/cache/chaotic/lower/{latest,$DATESTAMP}`\n\n  Lowerdirs.\n\n- `/var/cache/chaotic/cc/{PACKAGETAG}`\n\n  Per-package `~/.ccache`.\n\n- `/var/cache/chaotic/packages`\n\n  Container-shared pacman's cache.\n\n- `/var/lib/chaotic/interfere`\n\n  Cloned version of [interfere repository](https://github.com/chaotic-aur/interfere)\n\n# Dependencies\n\n`pacman -S --needed base-devel git arch-install-scripts repoctl fuse-overlayfs rsync python-telegram-send openssh`\n\nOne needs an active mirror or a setting (in /etc/chaotic.conf) like this:\n\n```sh\nexport CAUR_URL='https://builds.garudalinux.org/repos/chaotic-aur/x86_64'\nexport REPOCTL_CONFIG='/etc/chaotic/repoctl.conf'\nexport CAUR_REPOCTL_DB_URL=\"${CAUR_URL}/chaotic-aur.db.tar.zst\"\nexport CAUR_REPOCTL_DB_FILE=\"/tmp/chaotic/db.tar.zst\"\n```\n\nTo create a gpg key for the root user refer to this [ArchWiki article](https://wiki.archlinux.org/index.php/GnuPG#Create_a_key_pair) for more information. If you find problems when using \"sudo\", read the \"[su](https://wiki.archlinux.org/index.php/GnuPG#su)\" subsection.\nThen generate a ssh keypair for the root user.\n\n```sh\nsudo ssh-keygen\n```\n\nThe ssh public key (cat /root/.ssh/id_rsa.pub) then needs to be added to the primary servers' root authorized keys (/root/.ssh/authorized_keys). After that follow these [instructions](https://wiki.archlinux.org/index.php/GnuPG#Export_your_public_key) to export the gpg public key. This key will have to be [uploaded](https://wiki.archlinux.org/index.php/GnuPG#Sending_keys) to [keyserver.ubuntu.com](keyserver.ubuntu.com) in order for the key to be verified.\nThen, configure it as follows in `/etc/chaotic.conf`, like this:\n\n```sh\nexport CAUR_DEPLOY_PKGS=\"/var/www/chaotic-aur/x86_64\"\nexport CAUR_URL=\"http://localhost:8080/chaotic-aur/x86_64\"\nexport CAUR_SIGN_KEY='8A9E14A07010F7E3'\nexport CAUR_TYPE='cluster'\nexport REPOCTL_CONFIG='/etc/chaotic/repoctl.toml'\n```\n\nYou'll find more options in `src/chaotic` first lines.\n\nSupported `type` values are `primary`, `cluster`, and `dev`.\n\nFurthermore, a valid `.gitconfig` needs to be supplied in `/root/.gitconfig` to allow bumping packages via `chaotic bump` with a meaningful `email` and `name` supplied:\n\n```ini\n[user]\nemail = \"team@chaotic.cx\"\nname = \"Chaotic Dragon (Node) ☭\"\n```\n\nTo allow pushing to the interfere repo, a fitting ssh key also needs to be added to authenticate the node.\n\nTo have clean logs \u0026 less bandwidth usage `/etc/pacman.conf` settings need to be adjusted:\n\n- Enable `NoProgressBar`\n\n- Use `Server = file:///path-to-local-repo` as repo link if a local mirror is available\n\n- Don't use `ILoveCandy`\n\nTo deploy faster replace `openssh` with `openssh-hpn` on all nodes (adds performance-related [patches](https://www.psc.edu/research/networking/hpn-ssh/)). It should be noted that `openssh-hpn` recently changed its configuration and behavior and therefore doesn't provide a 1:1 replacement for `openssh` anymore.\n\n## Installation\n\nInstall dependencies, then:\n\n```\nsudo groupadd chaotic_op\nsudo usermod -aG chaotic_op $(whoami)\n\nmake build \u0026\u0026 sudo make install\n```\n\n## Lint\n\n```sh\npacman -S --needed yarn shellcheck\nyarn install\nyarn run lint\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaotic-aur%2Ftoolbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaotic-aur%2Ftoolbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaotic-aur%2Ftoolbox/lists"}