-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
77 lines (53 loc) · 2.19 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
dnf-plugin-diff - show local changes in RPM packages
====================================================
It is often very convenient to edit files installed/tracked by RPM -
typically to hot-fix a source code on production system, or change the
default configuration files.
It is easy to detect what files have been changed in particular installed
RPM package (`$ rpm -V PACKAGE` helps here), but it was a pretty laborious
job to print the actual changes (diff). You had to a) download the
original RPM package, b) extract the package somewhere, c) detect what
files have actually been changed on the system and d) manually diff the
extracted files against the changed files installed on the system. This
is where the simple helper `dnf-plugin-diff` steps in.
Options/usage
-------------
$ dnf diff PKG [FILE [FILE ...]]
Diff original <PKG> contents against the locally changed files. By
default - `dnf diff` prints (to stdout) complete changes. Optionally the
output can be filtered by <FILE> arguments.
Typical use-case
----------------
I recall I changed a configuration of my `cgit` service, so I check what
configuration files I changed:
$ rpm -V cgit
S.5....T. c /etc/cgitrc
S.5....T. c /etc/httpd/conf.d/cgit.conf
But to see what has actually been change, I can do:
$ dnf diff cgit /etc/httpd/conf.d/cgit.conf
--- /etc/httpd/conf.d/cgit.conf 2018-08-18 03:31:33.000000000 +0200
+++ /etc/httpd/conf.d/cgit.conf 2018-12-15 10:27:23.310626910 +0100
@@ -1,5 +1,5 @@
Alias /cgit-data /usr/share/cgit
ScriptAlias /cgit /var/www/cgi-bin/cgit
-<Directory "/usr/share/cgit">
+<Directory "/data/cgit">
Require all granted
</Directory>
How to install
--------------
Temporarily, it's built only in copr:
$ dnf copr enable praiskup/dnf-plugin-diff
Execute:
$ dnf diff ...
No such command: diff. Please use /usr/bin/dnf --help
It could be a DNF plugin command, try: "dnf install 'dnf-command(diff)'"
$ sudo dnf install 'dnf-command(diff)'
Build from source
-----------------
$ autoreconf -vfi
$ ./configure --prefix=/usr
$ sudo make install
Build RPM from source
---------------------
Run `make dist` and use *.tar.gz file with rpm/*.spec file.