alpm-conf is an ArchLinux tool to manage /etc configuration files using git. It is implemented as a Python package.
Overview
Packages installed by pacman whose etc files have been changed in the last pacman upgrade and that have been changed by the root user [1] in the /etc directory are tracked in the master branch of the git repository created by the alpm-conf create subcommand.
Using the same algorithm that is used by pacman to select files that are installed with a .pacnew extension [2], the update subcommand cherry-picks the changes (i.e. merges the changes) made to etc files by the pacman upgrade into the files on a temporary master-tmp branch [3] created by the subcommand as a descendant of the master branch. The merge subcommand merges the master-tmp branch into the master branch and copies those files to the /etc directory. This completes the transaction and the temporary branch is deleted.
alpm-conf also tracks the changes in files that are created in /etc by the root user such as netctl profiles for example. The files must be added first and commited to the master branch by the alpm-conf user in order to be tracked afterward by alpm-conf.
The diff subcommand is a standalone utility that uses a temporary alpm-conf repository to print [4] the differences between the etc files of installed pacman package archives and the corresponding files modified in the /etc directory. The command takes less than 2 seconds to complete on a plain laptop with 1212 installed packages.
Git commands allow to:
list the names of files created in /etc by the root user and tracked in the master branch
print [4] the changes made in the master-tmp branch before running the merge subcommand
print [4] the changes made by the last alpm-conf merge subcommand
print [4] the differences between the etc files of installed pacman package archives and the corresponding files modified in the /etc directory
Documentation
The documentation is hosted at Read the Docs:
The stable documentation of the last released version.
The latest documentation of the current GitLab development version.
To access the documentation as a pdf document one must click on the icon at the down-right corner of any page. It allows to switch between stable and latest versions and to select the corresponding pdf document.
Requirements
The ArchLinux packages that are required by alpm-conf are installed with the command:
# pacman -Sy git util-linux alpm-mtree python pyalpm python-zstandard
pyalpm and alpm-mtree are used to access the ArchLinux local database, util-linux provides setpriv allowing to run alpm-conf as root while running git commands as the creator of the git repository.
Installation
Install the python-alpm-conf package from the AUR.
Or install alpm-conf with pip:
$ python -m pip install alpm-conf
Footnotes
Metadata
Release files for alpm-conf 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| alpm_conf-0.5.tar.gz | 112.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| alpm_conf-0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 146.6 kB
Release files / alpm_conf-0.5.tar.gz
| Download URL | alpm_conf-0.5.tar.gz |
|---|---|
| Size | 112.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ba854586c6af9a74c00ed62e9956a87dc9a9ac12b9d93c164c1980b93943295
|
|
BLAKE2b-256 checksum How to use checksums |
3645cf6fbf883cf513f9f5318c7fb8bab0ec5bb13f3cb209050edf6000991115
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.4
|
Release files / alpm_conf-0.5-py3-none-any.whl
| Download URL | alpm_conf-0.5-py3-none-any.whl |
|---|---|
| Size | 34.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f94b44e08c75ce881c9f952374ca9e6946475b174060df6d0ee21106f9578ec
|
|
BLAKE2b-256 checksum How to use checksums |
1d62f2d672de95db53d271ce175f373b6bbada4c20d03da2fdd644bd32dfd452
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.4
|
Security for alpm-conf 0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.