{"id":13438898,"url":"https://github.com/void-linux/xbps","last_synced_at":"2025-05-14T20:05:41.720Z","repository":{"id":38015599,"uuid":"137503503","full_name":"void-linux/xbps","owner":"void-linux","description":"The X Binary Package System (XBPS)","archived":false,"fork":false,"pushed_at":"2025-01-24T15:07:56.000Z","size":10358,"stargazers_count":880,"open_issues_count":182,"forks_count":126,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-04-13T15:10:01.302Z","etag":null,"topics":["hacktoberfest","voidlinux"],"latest_commit_sha":null,"homepage":"https://voidlinux.org/xbps/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/void-linux.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-15T15:26:10.000Z","updated_at":"2025-04-12T22:10:08.000Z","dependencies_parsed_at":"2024-01-10T18:13:08.437Z","dependency_job_id":"a94dd3f8-b30b-4c50-baf3-3ca5a641f9b3","html_url":"https://github.com/void-linux/xbps","commit_stats":{"total_commits":3724,"total_committers":70,"mean_commits":53.2,"dds":"0.23684210526315785","last_synced_commit":"e82437f1d34facc0744f628938a1b3835dc7d963"},"previous_names":[],"tags_count":91,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/void-linux%2Fxbps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/void-linux%2Fxbps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/void-linux%2Fxbps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/void-linux%2Fxbps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/void-linux","download_url":"https://codeload.github.com/void-linux/xbps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732486,"owners_count":21152852,"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":["hacktoberfest","voidlinux"],"created_at":"2024-07-31T03:01:09.445Z","updated_at":"2025-04-13T15:10:17.532Z","avatar_url":"https://github.com/void-linux.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"[![Packaging status](https://repology.org/badge/vertical-allrepos/xbps.svg)](https://repology.org/project/xbps/versions)\n\n[![Tests](https://github.com/void-linux/xbps/actions/workflows/ci.yaml/badge.svg)](https://github.com/void-linux/xbps/actions/workflows/ci.yaml)\n[![CodeQL](https://github.com/void-linux/xbps/actions/workflows/codeql.yaml/badge.svg)](https://github.com/void-linux/xbps/actions/workflows/codeql.yaml)\n[![Coverity Scan Build Status](https://scan.coverity.com/projects/20884/badge.svg)](https://scan.coverity.com/projects/void-linux-xbps)\n\n## XBPS\n\nThe X Binary Package System (in short XBPS) is a binary package system\n**designed and implemented from scratch**. Its goal is to be fast, easy to use,\nbug-free, featureful and portable as much as possible.\n\nThe XBPS code is totally **compatible with POSIX/SUSv2/C99 standards**, and\nreleased with a **Simplified BSD license (2 clause)**. There is a well\ndocumented API provided by the XBPS Library that is the basis for its frontends\nto handle binary packages and repositories. Some highlights:\n\n * Supports **multiple local/remote repositories** (HTTP/HTTPS/FTP).\n * **RSA signed remote repositories** (NEW in 0.27).\n * Supports **multiple compression formats** for repositories:\n   gzip (zlib), bzip2, lz4, xz, [zstd](https://github.com/facebook/zstd) (default).\n * Supports **multiple compression formats** for package archives:\n   gzip (zlib), bzip2, lz4, xz, [zstd](https://github.com/facebook/zstd) (default).\n * **SHA256 hashes** for package metadata, files and binary packages.\n * Supports **package states** (ala dpkg) to mitigate broken package\n   installs/updates.\n * Ability to **resume** partial package install/updates.\n * Ability to **unpack only files that have been modified** in package updates.\n * Ability to use **virtual packages**.\n * Ability to **ignore completely** any number of packages in dependency resolution.\n * Ability to **check for incompatible shared libraries in reverse\n   dependencies**.\n * Ability to **update reverse dependencies** of any number of packages or **globally**\n   in a single transaction.\n * Ability to **replace packages**.\n * Ability to **put packages on hold** (to never update them. NEW in 0.16).\n * Ability to **preserve/update configuration files**.\n * Ability to **force reinstallation** of any installed package.\n * Ability to **downgrade any** installed package.\n * Ability to **execute pre/post install/remove/update scriptlets**.\n * Ability to **check package integrity**: missing files, hashes, missing or\n   unresolved (reverse)dependencies, dangling or modified symlinks, etc.\n\nXBPS contains an almost complete test suite, currently with ~200 test cases,\nand its number is growing daily! If you find any issue and you can reproduce it,\nwe will fix it and a new test case will be created. No more regressions!\n\nXBPS is brought to you by:\n\n- [Juan Romero Pardines (main author)](https://github.com/xtraeme)\n- [Enno Boland](https://github.com/Gottox)\n- [Duncan Overbruck](https://github.com/duncaen)\n\nand many other contributors in the free community that have helped improving it.\nSee the `AUTHORS` file for a complete list of contributors.\n\nThanks to all who have contributed.\n\n### Build requirements\n\nTo build this you'll need:\n\n  - A C99 compiler (clang, gcc, pcc, tcc)\n  - A POSIX compatible shell\n  - [GNU make](https://www.gnu.org/software/make/)\n  - [pkgconf](http://pkgconf.org/)\n  - [zlib](https://www.zlib.net)\n  - [openssl](https://www.openssl.org) or [libressl](https://www.libressl.org/)\n  - [libarchive \u003e= 3.3.3](https://www.libarchive.org) with lz4 and zstd support.\n\nand optionally:\n\n  - [graphviz](https://www.graphviz.org) and [doxygen](https://www.doxygen.org)\n    (--enable-api-docs) to build API documentation.\n  - [atf \u003e= 0.15](https://github.com/jmmv/kyua) (--enable-tests) to build the\n    Kyua test suite.\n\n### Building and testing for dummies\n\n```\n$ git clone https://github.com/void-linux/xbps\n$ cd xbps\n$ ./configure --enable-rpath --prefix=/usr --sysconfdir=/etc\n$ make -j$(nproc)\n$ make DESTDIR=~/xbps-git install clean\n$ export PATH=~/xbps-git/usr/bin:$PATH\n$ xbps-query -V\n...\n```\n\nThanks to `--enable-rpath` you can install it anywhere and it will still use\nthe libxbps shared library at `$ORIGIN/../lib`, that means that if xbps\nis installed to `$HOME/xbps-git/usr`, the executables will use\n`$HOME/xbps-git/usr/lib` to locate `libxbps`.\n\nHappy testing!\n\n### Tests\n\nTo run the test suite make sure *kyua* is installed and run the following:\n\n```\n$ ./configure --enable-tests\n$ make\n$ make check\n```\n\n### Build instructions\n\nStandard configure script (not generated by GNU autoconf).\n\n```\n$ ./configure --prefix=/blah\n$ make -jX\n$ make install\n```\n\nBy default PREFIX is set `/usr/local` and may be changed by setting `--prefix`\nin the `configure` script. The `DESTDIR` variable is also supported at the\ninstall stage.\n\nThere are some more options that can be tweaked, see them with\n`./configure --help`.\n\nGood luck!\n\n### Binaries\n\nBinaries for Linux compiled statically with the musl C library are available:\n\n* [aarch64](https://repo-default.voidlinux.org/static/xbps-static-latest.aarch64-musl.tar.xz)\n* [armv6l](https://repo-default.voidlinux.org/static/xbps-static-latest.armv6l-musl.tar.xz)\n* [armv7l](https://repo-default.voidlinux.org/static/xbps-static-latest.armv7l-musl.tar.xz)\n* [i686](https://repo-default.voidlinux.org/static/xbps-static-latest.i686-musl.tar.xz)\n* [x86\\_64](https://repo-default.voidlinux.org/static/xbps-static-latest.x86_64-musl.tar.xz)\n\nThese builds are available on all official void mirrors, along with their\n*sha256* [checksums](https://repo-default.voidlinux.org/static/sha256sums.txt).\n\n### Usage instructions\n\nThe xbps package includes the following utilities (among others, not a complete list):\n\n * `xbps-create (1)`      - XBPS utility to create binary packages\n * `xbps-dgraph (1)`      - XBPS utility to generate dot(1) graphs\n * `xbps-install (1)`     - XBPS utility to install and update packages\n * `xbps-pkgdb (1)`       - XBPS utility to report and fix issues in pkgdb\n * `xbps-query (1)`       - XBPS utility to query for package and repository information\n * `xbps-reconfigure (1)` - XBPS utility to configure installed packages\n * `xbps-remove (1)`      - XBPS utility to remove packages\n * `xbps-rindex (1)`      - XBPS utility to handle local binary package repositories\n\nIn the following sections there will be a brief description of how these utilities currently work.\n\n### Package expressions\n\nIn the following examples there will be commands accepting an argument such as `\u003cpackage expression\u003e`. A package expression is a form to match a pattern; currently XBPS \u003e= 0.19 supports 3 ways to specify them:\n\n * by specifying a package name, i.e `foo`.\n * by specifying the exact package name and version, i.e `foo-1.0_1`.\n * by specifying a package name and version separated by any of the following version comparators:\n      * `\u003c` less than\n      * `\u003e` greater than\n      * `\u003c=` less than or equal to\n      * `\u003e=` greater than or equal to\n\n    Such example would be `foo\u003e=2.0` or `blah-foo\u003c=1.0`.\n\n### Repositories\n\nRepositories can be declared in a configuration file of the `configuration` or `system configuration` directories:\n\n * `\u003csysconfdir\u003e/xbps.d` - The configuration directory (set to `/etc/xbps.d`)\n * `\u003csharedir\u003e/xbps.d` - The system directory (set to `/usr/share/xbps.d`)\n\nA configuration file bearing the same filename in `/etc/xbps.d` overrides the one from `\u003csharedir\u003e/xbps.d`.\nBy default the `XBPS` package provides only the main Void repository in the `/usr/share/xbps.d/00-repository-main.conf` file.\n\nAdditional repositories can be added by installing any of the following XBPS packages or creating new configuration files manually:\n\n```\n$ xbps-query -Rs void-repo\n[*] void-repo-debug-3_1            Void Linux drop-in file for the debug repository\n[*] void-repo-multilib-3_1         Void Linux drop-in file for the multilib repository\n[*] void-repo-multilib-nonfree-3_1 Void Linux drop-in file for the multilib/nonfree repository\n[*] void-repo-nonfree-3_1          Void Linux drop-in file for the nonfree repository\n$\n```\n\n\u003e Repositories specified in the `configuration` directory are added to the head of the list, while repositories specified via `system configuration` directories are appended to the existing list.\n\n\u003e If no repositories are found it's possible to declare them manually via the command line option `--repository`, currently accepted in `xbps-install(1)` and `xbps-query(1)`.\n\n### xbps-query - querying packages and repositories\n\n\u003e xbps-query(1) will try to match `\u003cpackage expression\u003e` in local packages. This behaviour\ncan be changed by enabling the `-R` or `--repository` option to force repository mode.\n\nTo query the list of installed packages:\n\n    $ xbps-query -l\n\nTo query the list of working repositories:\n\n    $ xbps-query -L\n\nTo query the list of installed packages that were installed manually (not as dependencies):\n\n    $ xbps-query -m\n\nTo query the list of packages on hold (won't be upgraded automatically):\n\n    $ xbps-query -H\n\nTo query the list of installed package orphans (packages that were installed as dependencies but there is not any package currently that requires it):\n\n    $ xbps-query -O\n\nTo query a package and show its meta information:\n\n    $ xbps-query \u003cpackage expression\u003e\n\n\u003e Additionally the `-p or --property` option can be used to only show a specific key of a package:\n\n    $ xbps-query --property=pkgver xbps\n    xbps-0.19_1\n    $\n\n\u003e Multiple properties can be specified by delimiting them with commas, i.e `-p key,key2`.\n\nTo query a package and show its file list:\n\n    $ xbps-query -f \u003cpackage expression\u003e\n\nTo query a package and show required run-time dependencies:\n\n    $ xbps-query -x \u003cpackage expression\u003e\n\nTo query a package and show required reverse run-time dependencies:\n\n    $ xbps-query -X \u003cpackage expression\u003e\n\nTo query for packages matching a file with specified pattern(s) (ownedby mode):\n\n    $ xbps-query -o \u003cpattern\u003e\n\n\u003e Where `\u003cpattern\u003e` is a shell wildcard pattern as explained in fnmatch(3); e.g `\"*.png\"`.\n\n\u003e Multiple `\u003cpatterns\u003e` can be specified as arguments.\n\nTo query for packages matching pkgname/version/description with specified pattern(s) (search mode):\n\n    $ xbps-query -s \u003cpattern\u003e\n\n\u003e The same rules explained above in the `ownedby` mode shall be applied.\n\n### xbps-install - installing and updating packages\n\nTo synchronize remote repository index files:\n\n    $ xbps-install -S\n\n\u003e The `-S, --sync` option can be combined while installing or updating packages, i.e `xbps-install -Su`.\n\nTo install a package:\n\n    $ xbps-install \u003cpackage expression\u003e\n\nTo install multiple packages at once:\n\n    $ xbps-install \u003cpackage expression\u003e \u003cpackage expressions\u003e\n\nTo update a single package:\n\n    $ xbps-install -u \u003cpackage expression\u003e\n\nTo update all packages (also known as dist-upgrade in Debian/Ubuntu):\n\n    $ xbps-install -u\n\n\u003e The `-n, --dry-run` option can be used to print what packages will be updated and/or installed and doesn't need permissions in the target rootdir, which can be useful to list updates.\n\n### xbps-remove - removing packages\n\nTo remove a package:\n\n    $ xbps-remove \u003cpackage name\u003e\n\nTo recursively remove unneeded dependencies that were installed by the target package:\n\n    $ xbps-remove -R \u003cpackage name\u003e\n\nTo remove package orphans:\n\n    $ xbps-remove -o\n\nTo clean the cache directory and remove outdated packages and/or packages with wrong hash:\n\n    $ xbps-remove -O\n\n\u003e To remove package orphans and clean the cache repository both options can be combined, i.e `xbps-remove -Oo`.\n\n### xbps-reconfigure - configure (or force configuration of) a package\n\nThe `xbps-reconfigure(1)` utility may be used to configure packages that were not previously\n(perhaps due to a power outage, process killed, etc) or simply to force package\nreconfiguration. By default and unless the `-f, --force` option is set, only packages that\nwere not configured will be processed.\n\nIts usage is simple, specify a package name or `-a, --all` for all packages:\n\n    $ xbps-reconfigure [-f] \u003cpackage name\u003e | -a\n\n### xbps-pkgdb - checking for errors in packages and pkgdb\n\nThe `xbps-pkgdb(1)` utility may be used to check for errors in packages and in the package database.\nIt is also used to update the *package database* format (if there have been changes). It works exactly the\nsame way as `xbps-reconfigure(1)` and expects a package name or -a, --all for all packages.\n\n    $ xbps-pkgdb \u003cpackage name\u003e | -a\n\nTo put a package on hold mode (won't be upgraded in dist-upgrade mode):\n\n    $ xbps-pkgdb -m hold \u003cpackage name\u003e\n\nTo remove a package from hold mode:\n\n    $ xbps-pkgdb -m unhold \u003cpackage name\u003e\n\nTo put a package in automatic mode (as it were installed as a dependency):\n\n    $ xbps-pkgdb -m auto \u003cpackage name\u003e\n\nTo put a package in manual mode (won't be detected as orphan):\n\n    $ xbps-pkgdb -m manual \u003cpackage name\u003e\n\nTo update the pkgdb format to the latest one:\n\n    $ xbps-pkgdb -u\n\n\u003e NOTE: updating the pkgdb format does not happen too frequently, therefore it's only necessary in rare circumstances.\n\n### xbps-rindex - Create, update and administer local repositories\n\nThis command only has 3 operation modes:\n\n * Add [-a, --all]: adds the specified packages into the specified repository and removes previous entry if found:\n\n        $ xbps-rindex -a /path/to/repository/*.xbps\n\n\u003e The `-f, --force` option can be used to forcefully register a package into the repository index, even if the same version is already registered.\n\n * Clean [-c, --clean]: cleans the index of the specified repository by removing outdated or invalid entries (nonexistent packages, unmatched hashes, etc):\n\n        $ xbps-rindex -c /path/to/repository\n\n * Remove-obsoletes [-r, --remove-obsoletes]: removes obsolete packages in repository (outdated, broken and unmatched hashes):\n\n        $ xbps-rindex -r /path/to/repository\n\n### Examples\n\nUpgrade all packages in the system, without asking for an answer:\n\n    # xbps-install -Syu\n\nClean the cache directory and remove package orphans:\n\n    # xbps-remove -Oo\n\nShow information of a package available in repositories:\n\n    $ xbps-query -R xbps\n\nShow filelist of a package available in repositories:\n\n    $ xbps-query -Rf xbps\n\nFind the packages that own the file `/bin/ls` in repositories:\n\n    $ xbps-query -Ro /bin/ls\n\nMake a package keepable (won't be detected as orphan):\n\n    # xbps-pkgdb -m manual xbps\n\nSearch for packages in repositories matching the `xbps` pattern in its `pkgver` and `short_desc` objects:\n\n    $ xbps-query -Rs xbps\n\nRemove a package and all unnecessary dependencies that were installed:\n\n    # xbps-remove -R xbmc\n\nAppending repositories via command line:\n\n    $ xbps-query --repository=\u003curl\u003e ...\n    # xbps-install --repository=\u003curl\u003e ...\n\nSwitch an installed package to on *hold* mode (won't be updated via `xbps-install -u`):\n\n    # xbps-pkgdb -m hold \u003cpkgname\u003e\n\nSwitch an installed package to the *unhold* mode (will be updated if there are updates):\n\n    # xbps-pkgdb -m unhold \u003cpkgname\u003e\n\nCheck for errors on installed packages and in pkgdb:\n\n    # xbps-pkgdb -a\n\nListing all files not managed by xbps:\n\n```sh\n#!/bin/sh\n\ntmp=$(mktemp -dt xbps-disownedXXXXXX)\npkg=$tmp/pkg\nfs=$tmp/fs\n\ntrap \"rm -rf $tmp\" EXIT\n\nxbps-query -o \\* | cut -d ' ' -f2 | sort \u003e $pkg\nfind /boot /etc /opt /usr /var -xdev -type f -print | sort \u003e $fs\n\ncomm -23 $fs $pkg\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoid-linux%2Fxbps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoid-linux%2Fxbps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoid-linux%2Fxbps/lists"}