Skip to main content

This script uses debsums to extract the package maintainer's config file for

Project description

config_diff_soso

Copies the original configuration files and your changes with a diff.

WHAT DID I DO!!!?

If you're like me, you make changes to your Debian/Ubuntu system as needed, and don't always keep a good record of what you have done.

When I upgrade to a newer version of my operating system, I want to make the same changes to the new install. That's what prompted me to create this script.

Now I can do a new installation with the newest package maintainer's version of all the config files, and then go through the changed files and make the fixes on the new install.

Install

The usual pip installation:

$ pip install config_diff_soso

...or...

$ python3 -m pip install config_diff_soso

Usage

$ config_diff_soso

What it does

This script uses debsums to extract the package maintainer's config file for every package on your system, and compares it to the version on your machine, saving a copy of each with another file showing the differences between them.

It creates a directory in the current working directory with the following template:

<host name>-config-diff-<date>

Inside this directory will be created subdirectories which mirror the directories and file name of each configuration file. The filename will be stored as the final directory in the tree, with one file each for the original package maintainer's version, your version, and a "diff" of the changes between them.

For example, using "/etc/default/grub":

Original path:

etc
└── apache2
    └── apache2.conf

The differences will be saved as:

etc
└── apache2
    └── apache2.conf
        ├── diff
        ├── original
        └── yours

Effects

This script makes no changes to your system, only records what you have already changed.

It needs sudo rights to run some commands. Check the script before using it to make sure it doesn't do anything malicious. I would. Run it as a regular user, and you'll be prompted for your password when needed.

It takes a while for debsums to extract all the packages. Be patient. If you upgrade a system with a lot of changes to system configuration files, it'll be worth it.

The script downloads .deb files from your configured apt repository, if they do not already exist. If you want to make sure that you download the most recent versions, run "sudo apt-cache clean" before running this script.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

config_diff_soso-1.0.1.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

config_diff_soso-1.0.1-py2.py3-none-any.whl (16.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file config_diff_soso-1.0.1.tar.gz.

File metadata

  • Download URL: config_diff_soso-1.0.1.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for config_diff_soso-1.0.1.tar.gz
Algorithm Hash digest
SHA256 fc9830a833617b64213d3e2d6c86fcc5e0334f0a03e970738e0edc2008fb6592
MD5 1f5dd0f7176f56eef87e07c6158412f1
BLAKE2b-256 719edf9b074308662746425d4ba3c498be6f548059955eb3fb2262c5542b00e1

See more details on using hashes here.

File details

Details for the file config_diff_soso-1.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for config_diff_soso-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a8f1d33786556cdba3c280e8fb7f4012d480522393370ac33ac7d4d70a2cf045
MD5 1fded06ee198cca0a69914e52a2b8174
BLAKE2b-256 4527d1289021d3216a4adb4bbeb54cd81628f83a1d49f885d7e27141e3a1b56c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page