{"id":26232575,"url":"https://github.com/bulletmark/pacpush","last_synced_at":"2025-10-13T23:10:36.058Z","repository":{"id":44382173,"uuid":"109793344","full_name":"bulletmark/pacpush","owner":"bulletmark","description":"Arch Linux utility to push a host's package and AUR caches to other hosts","archived":false,"fork":false,"pushed_at":"2025-10-08T05:18:36.000Z","size":133,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-08T07:17:25.053Z","etag":null,"topics":["archlinux","pacman","paru","trizen","yay"],"latest_commit_sha":null,"homepage":"","language":"Python","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/bulletmark.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-11-07T06:00:21.000Z","updated_at":"2025-10-08T05:18:35.000Z","dependencies_parsed_at":"2024-06-10T05:47:03.459Z","dependency_job_id":"08a24298-494f-4226-bb8c-5492df90a61b","html_url":"https://github.com/bulletmark/pacpush","commit_stats":null,"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"purl":"pkg:github/bulletmark/pacpush","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bulletmark%2Fpacpush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bulletmark%2Fpacpush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bulletmark%2Fpacpush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bulletmark%2Fpacpush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bulletmark","download_url":"https://codeload.github.com/bulletmark/pacpush/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bulletmark%2Fpacpush/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011849,"owners_count":26085004,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["archlinux","pacman","paru","trizen","yay"],"created_at":"2025-03-13T00:37:32.806Z","updated_at":"2025-10-13T23:10:36.052Z","avatar_url":"https://github.com/bulletmark.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PACPUSH\n[![AUR](https://img.shields.io/aur/version/pacpush)](https://aur.archlinux.org/packages/pacpush/)\n[![PyPi](https://img.shields.io/pypi/v/pacpush)](https://pypi.org/project/pacpush/)\n\n[pacpush](http://github.com/bulletmark/pacpush) is a simple command line\nutility which Arch Linux users can use to manually push `pacman` and AUR\nhelper Arch Linux package updates to other machines to avoid having to\ndownload them more than once via the web.\n\nMy use case follows as a good example of what this utility is for.\n\nI update my main Arch PC and my Arch laptop every day using\n[`yay`](https://github.com/Jguer/yay). Previously, I would update either\nboth machines in parallel, or one before the other. So both machines\nwould download the package lists from the web, then download and install\nthe out of date system packages, then download, build, and install all\nout of date AUR packages. This takes quite some time, particularly on a\nslow internet connection, and it is inefficient to be downloading and\nbuilding most packages twice for the same architecture machines.\n\nUsing `pacpush`, I now update my PC first then after that update has\nfinished I run `pacpush lt` on my PC to update `lt` directly via my\nlocal LAN. Pacpush pushes the updated package lists, then queries `lt`\nto work out which packages `lt` has out of date (including AUR\npackages), then pushes all the system and AUR packages that it has which\n`lt` needs.\n\nAfter running `pacpush`, I run a [`yay`](https://github.com/Jguer/yay)\nupdate on `lt` and it completes very quickly because `lt` only needs to\ndownload the system and AUR packages my PC did not have. I typically use\nvery similar system and AUR packages on both machines so typically `lt`\ndoesn't need to download or build any updated AUR packages at all.\n\nObviously this only works for machines of the same architecture, i.e.\ncompatible package files, so `pacpush` checks for this before pushing any\nfiles.\n\nYou need to have root ssh access to the remote machines for `pacpush` to\nwork. See the [SSH AND KEY CONFIGURATION](#ssh-and-key-configuration)\nsection below on how best to set this up.\n\nIf you specify multiple hosts then the program will update them in\nparallel. You can limit, or increase, the number of parallel updates\nusing the `-p/--parallel-count` option. Update messages are output in a\nunique color for each host.\n\nNote that `pacpush` should work with any AUR helper so long as you set\n`--aur-build-dir` appropriately in your configuration file, see the\n[CONFIGURATION FILE](#configuration-file) section below for details.\n\nThe latest version and documentation is available at\nhttps://github.com/bulletmark/pacpush.\n\n## COMPARISION TO PACSERVE\n\nTo solve this problem, I originally started using\n[pacserve](https://aur.archlinux.org/packages/pacserve/) which is what\nis usually recommended for this use case. However pacserve does not sync\nthe package lists nor does it do anything about AUR packages which is\nparticularly unfortunate because AUR package downloads often include\nhuge source and other files and can require long build times. Since\n`pacpush` pushes the entire AUR directory for each required package, the\nsecond machine benefits by typically not having to download or rebuild\nany updated AUR packages at all.\n\n## INSTALLATION\n\nJust install [_pacpush from the\nAUR_](https://aur.archlinux.org/packages/pacpush/) to the local and\nremote hosts.\n\nNote pacpush is also available [on\nPyPI](https://pypi.org/project/pacpush/) if you prefer so just ensure\nthat [`pipx`](https://pipx.pypa.io/stable/) is installed then type the\nfollowing to install on each machine. Requires Python 3.8 or later.\n\n    $ pipx install pacpush\n\nTo upgrade:\n\n    $ pipx upgrade pacpush\n\n## SSH AND KEY CONFIGURATION\n\nYou run `pacpush` directly on the command line as your normal user, not\nas root and not using `sudo` explicitly. You specify as arguments the\nhost, or hosts, you want to update. The utility will re-invoke itself\nusing `sudo` and will push the required package updates.\n\nYou need to set up root ssh access from your host machine to the remote\nmachine[s] for this to work. For security and convenience, it is\nessential to use an ssh key. The following procedure copies your\npersonal public ssh key to the remote root account. Your first need to\nset up your own personal ssh key pair of course, see Google for that\npart.\n\nOn a remote host to which you want to `pacpush` (assuming you have\nalready set up personal ssh access to that host):\n\n    $ sudo mkdir -p /root/.ssh\n    $ sudo chmod 700 /root/.ssh\n    $ sudo cp ~/.ssh/authorized_keys /root/.ssh\n\nPossibly remove any keys on that remote host you don't want to allow if you have\nmore than one for root:\n\n    $ sudoedit /root/.ssh/authorized_keys\n\nNote that the `sudo` invoked by `pacpush` on itself when you run it as\nyour normal user passes on `$SSH_AUTH_SOCK` so that the remote root ssh\nsession authenticates against your personal ssh key.\n\nFor rsync/ssh configuration convenience, `rsync` and `ssh` commands run\nby root are specified with your personal user's ssh configuration file\n`~/.ssh/config` if it exists (unless you specify an explicit\n`--ssh-config-file` for pacpush usage as described in the next section).\nNote `rsync` and `ssh` commands run on behalf of root user explicitly\nspecify target `root@host` so that any `User` specification in your\npersonal ssh configuration for any host is ignored.\n\n### TROUBLESHOOTING YOUR SSH CONFIGURATION\n\nIf you are having problems with your ssh configuration, you can try what is\ndescribed in this section to help diagnose the issue.\n\nAssume we have a `client` machine from where we want to run the `pacpush`\ncommand, and a `server` machine which we want to update from `client` remotely.\n\nRun following commands on `client`:\n\n    $ ssh server ls -l .ssh\n    $ rsync server:.ssh\n\nBoth the above commands should list the contents of `~/.ssh/` on\n`server` and prove you have your personal user key configured and\nworking correctly.\n\nAgain on `client`, run the following commands:\n\n    $ sudo SSH_AUTH_SOCK=$SSH_AUTH_SOCK ssh -F $HOME/.ssh/config root@server ls -l .ssh\n    $ sudo SSH_AUTH_SOCK=$SSH_AUTH_SOCK rsync -e \"ssh -F $HOME/.ssh/config\" root@server:.ssh/\n\nBoth the above commands should each list the contents of `/root/.ssh/` on\n`server` and prove you have your personal user key configured and\nworking for root user.\n\nA tip for when you trying to diagnose ssh problems is to use the `-v` flag to make\n`ssh` commands more verbose. So, e.g., in the two `sudo` commands above, try also\nadding a `-v` before the `-F`. Also check/monitor your server side `sshd` log.\nE.g. run `journalctl -f -u sshd` in a server side terminal window as you try to\nmake the connection.\n\n## CONFIGURATION FILE\n\n:warning: __From pacpush version 3 onwards, the format of the\n`~/.config/pacpush/pacpush.conf` file has changed\nfrom [YAML](https://yaml.org/) to a simple text file where you\nspecify any of the pacpush [startup options](#usage).__\n\nYou can add default options to a personal configuration file\n`~/.config/pacpush/pacpush.conf`. If that file exists then each line of\noptions will be concatenated and automatically prepended to your\n`pacpush` command line arguments. Comments in the file (i.e. starting\nwith a `#`) are ignored. Type `pacpush -h` to see all [supported\noptions](#usage). The configuration file is read for the invoking user\nonly on the local host client machine. The configuration file is ignored\non any remote machine you are pushing to (because all required options\nare passed from the client).\n\nYou may want to change the `--aur-build-dir` setting which is the\nlocation of your AUR helpers download/build directory. This is the\ndirectory from which AUR packages are rsync'd from the local host to\nremote hosts. `--aur-build-dir` can be set to a single directory string,\nor a list of directories by inserting a \"`;`\" between multiple directory\nnames. Ensure that `--aur-build-dir` is set to, or at least contains,\nthe build directory your AUR helper uses. Directories which don't exist\nare ignored.\n\n**Example Settings**\n\nAUR Helper | Build directory setting\n---------- | -----------------------\n`yay` | `--aur-build-dir ~/.cache/yay`.\n`paru` | `--aur-build-dir ~/.cache/paru/clone`.\n\nThe default configuration is to sync many of the common AUR helper\ndirectories that exist on your host machine. See the default\n`--aur-build-dir` directories listed by `pacpush -h`. Pacpush will sync\npackages in each `--aur-build-dir` directory which exists, and is\npending an update. E.g. if you were using trizen some time ago, and am\nnow using yay instead, then you could keep this default setting and just\ndo a `rm -rf ~/.cache/trizen` because pacpush ignores `--aur-build-dir`\ndirectories which don't exist. Or you could just set `--aur-build-dir\n~/.cache/yay` in your `~/.config/pacpush/pacpush.conf` which is the\nslightly more efficient approach.\n\nYou can also create and specify a custom\n[`--ssh-config-file`](https://linux.die.net/man/5/ssh_config) file. This\nallows you to specify ssh settings for pacpush use, either globally, or\nfor each host. See [`man\nssh_config`](https://linux.die.net/man/5/ssh_config) for details on how\nto specify ssh (including per host) settings. If the specified\n`--ssh-config-file` path is relative then it is taken to be relative to\n`~/.config/pacpush/`.\n\nAny of the options specified in the next [Usage](#usage) section can be\nspecified in `~/.config/pacpush/pacpush.conf`.\n\n## USAGE\n\nType `pacpush -h` to view the usage summary:\n\n```\nusage: pacpush [-h] [-b AUR_BUILD_DIR] [-n] [-m] [-p PARALLEL_COUNT] [-u]\n                  [-s] [-a] [-C] [-N] [-M] [-F SSH_CONFIG_FILE] [-V] [-d]\n                  [hosts ...]\n\nUtility to push this Arch hosts system and AUR package caches to other host[s]\nto avoid those other hosts having to download the same new package lists and\nupdated packages, at least for shared common packages. Requires root ssh\naccess to other hosts (it is easier with an auth key).\n\npositional arguments:\n  hosts                 hosts to update\n\noptions:\n  -h, --help            show this help message and exit\n  -b, --aur-build-dir AUR_BUILD_DIR\n                        AUR build directory[s]. Can specify one, or multiple\n                        directories separated by \";\". Default is \"~/.cache/yay\n                        ;~/.cache/paru/clone;~/.cache/trizen;~/.cache/pikaur/a\n                        ur_repos;~/.cache/aurman\". Non-existent directories\n                        are ignored.\n  -n, --dryrun          dry run only\n  -m, --no-machcheck    do not check machine type compatibility\n  -p, --parallel-count PARALLEL_COUNT\n                        max number of hosts to update in parallel. Default is\n                        10.\n  -u, --updates         just report all installed packages with updates\n                        pending, including AUR packages\n  -s, --sys-only        only sync/report system packages, not AUR\n  -a, --aur-only        only sync/report AUR packages, not system\n  -C, --no-color        do not color output messages\n  -N, --no-color-invert\n                        do not invert color on error/priority messages\n  -M, --mirrorlist      also sync mirrorlist file\n  -F, --ssh-config-file SSH_CONFIG_FILE\n                        ssh configuration file to use. Default is\n                        \"~/.ssh/config\" (if it exists).\n  -V, --version         show pacpush version\n  -d, --debug           output debug messages\n\nNote you can set default starting options in\n$HOME/.config/pacpush/pacpush.conf.\n```\n\n## LICENSE\n\nCopyright (C) 2017 Mark Blakeney. This program is distributed under the\nterms of the GNU General Public License.\nThis program is free software: you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the\nFree Software Foundation, either version 3 of the License, or any later\nversion.\nThis program is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General\nPublic License at \u003chttps://en.wikipedia.org/wiki/GNU_General_Public_License\u003e for more details.\n\n\u003c!-- vim: se ai syn=markdown: --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbulletmark%2Fpacpush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbulletmark%2Fpacpush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbulletmark%2Fpacpush/lists"}