{"id":18901206,"url":"https://github.com/regular/ssb-pacman","last_synced_at":"2025-09-02T06:36:08.394Z","repository":{"id":44177415,"uuid":"141309850","full_name":"regular/ssb-pacman","owner":"regular","description":"A bridge from ArchLinux' pacman to ssb. Syncs arch package repos to  ssb network.","archived":false,"fork":false,"pushed_at":"2022-02-11T05:02:41.000Z","size":125,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-02T06:36:03.724Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/regular.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}},"created_at":"2018-07-17T15:36:14.000Z","updated_at":"2020-10-17T04:45:45.000Z","dependencies_parsed_at":"2022-08-27T19:12:12.560Z","dependency_job_id":null,"html_url":"https://github.com/regular/ssb-pacman","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/regular/ssb-pacman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regular%2Fssb-pacman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regular%2Fssb-pacman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regular%2Fssb-pacman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regular%2Fssb-pacman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/regular","download_url":"https://codeload.github.com/regular/ssb-pacman/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regular%2Fssb-pacman/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273244305,"owners_count":25070958,"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-09-02T02:00:09.530Z","response_time":77,"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":[],"created_at":"2024-11-08T08:55:27.373Z","updated_at":"2025-09-02T06:36:08.346Z","avatar_url":"https://github.com/regular.png","language":"JavaScript","readme":"# Objective\n\n- enable offline instalation of packages\n- keep old version of archlinux and archlinuxarm  packages\n- sync metadata via ssb\n- allow peer-to-peer installations\n- enable reproducable rootfs builds\n- mimic a local mirror server that pacman can use\n- create custom syncdb on demand, fitlering packages not in a given shrinkwrap file\n\n# Installation\n\n## Install sbot and ssb-pacman\n\n```\nnpm -g i scuttlebot-release\nmkdir -p ~/.ssb-pacman/node_modules\ncd ~/.ssb-pacman/node_modules/\ngit clone git@github.com:regular/ssb-pacman\ncd ssb-pacman\nnpm i\nnpm -g link\ncp sbot.config ../../config\nexport ssb_appname=ssb-pacman\nsbot start\n```\n\nin a different terminal\n\n```\nssb-pacman-sync\n```\n\nThis will take a long time to finish. You can use the scripts in `monitor` to watch the progress. (use tmux for a full dashboard-style experience)\n\nMeanwhile, in yet another terminal:\n\n```\nssb-pacman-init-keyring\n```\n\n## Install a minimal system in directory `root`\n\n```\nssb-pacman-bootstrap root\n```\n\nThis downloads and extracts the latest version of pacman and then runs it, so it can re-install itself properly (i.e. withe running package-specific\n.INSTALL scripts and pacman hooks, both witch are not done by the initial extract pass)\nThis results in a clean, minimal system with a working package manager that uses the secure scuttlebutt network as its \"mirror server\".\n\n## Use pacman to install a packages with dependencies in the chroot\n\n```\n# TODO: support multiple package names\nssb-pacman-install vim root\nssb-pacman-install sed root\nssb-pacman-install grep root\n```\n\nA pacman post-transaction hook is installed in the target root, that records\nthe exact hashes of installed packages. This is called the \"shrinkwrap file\". It's purpose\nis similar to package-lock.json or npm's shrinkwrap file.\n\n\n# Create shrinkwrap file\n\n```\nsudo arch-chroot /ssb-pacman-shrinkwrap\n```\n\nYou can enter the chroot to test stuff out.\n\n```\nsudo arch chroot\n```\n\n# TODO\n\n- [ ] bindings for vercmp instead of spawning the binary\n\n- [ ] check SHA before adding blob\n- [ ] clean up bootstrap\n- [ ] clean up signing (rename to keyring-setup)\n- [ ] rename install.sh to extract\n- [ ] unified binary\n- [ ] sbot pacman.startSession ID\n        returns stream of events\n- [ ] sbot pacman.applyShrinkwrap --session ID\n        write shrinkwrap file into session\n- [ ] sbot pacman.getAddress --session ID\n\n# Surprises\n\n- arch=any packages like \"archlinux-keyring\" are in all of the sync databases for each architecture. However, they actaully have different SHA256SUM entries in the sync db. So, we can not de-dupe based on SHA (or blobid). The reason for this is most likely the inclusion ov BUILDDATE in the metadata.\n\n\n# IDEAS\n\n## Reducing space requirements\n\nBecause all packages are compressed individually, we cannot take advantage of any overlap of binaty data between packages or differnt versions of packages. (First being relevant for data contained in packages for differnt architecture, latter being relevant for patches and bug fixes that only affect a few files in a big package)\n\nOne way to solve this could be to put the blob store onto a filesystem that has de-dupe and compression capabilites and then uncompress packages before storing them. We should set up an experiment to test this theory.\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregular%2Fssb-pacman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fregular%2Fssb-pacman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregular%2Fssb-pacman/lists"}