ArchLinux tool to manage /etc configuration files using git.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alpm_conf-0.5.tar.gz.
File metadata
- Download URL: alpm_conf-0.5.tar.gz
- Upload date:
- Size: 112.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ba854586c6af9a74c00ed62e9956a87dc9a9ac12b9d93c164c1980b93943295
|
|
| MD5 |
90cba92030b7b9981e03ef9843a90832
|
|
| BLAKE2b-256 |
3645cf6fbf883cf513f9f5318c7fb8bab0ec5bb13f3cb209050edf6000991115
|
File details
Details for the file alpm_conf-0.5-py3-none-any.whl.
File metadata
- Download URL: alpm_conf-0.5-py3-none-any.whl
- Upload date:
- Size: 34.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f94b44e08c75ce881c9f952374ca9e6946475b174060df6d0ee21106f9578ec
|
|
| MD5 |
558df253964d2a6113b136137ad04b6f
|
|
| BLAKE2b-256 |
1d62f2d672de95db53d271ce175f373b6bbada4c20d03da2fdd644bd32dfd452
|