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.0.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.0-py2.py3-none-any.whl (16.4 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: config_diff_soso-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 1a32a89824ebaffd8a9482854ad99b3ff76c63e9dbe9428695f3df197baf5337
MD5 92fa35459c3c3f3e8eb7d1058d66699f
BLAKE2b-256 9fcb9e61db20e0ce4c456daea7fef7c61b43176f589bd7414d3fb52c8ed46eec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for config_diff_soso-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e78f1a8810683d70391f69a60ccbec2d94a3e16fe0096cc9fa15466f5fea782f
MD5 f7a0416df911f38126104a4f0b8cb88d
BLAKE2b-256 d82b1da1363f86196465cb2a4c903ac0545e81c25268dbd4708790ed65ad6259

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