Package: rpm / 4.12.0.2+dfsg1-2

rpmdb-in-home.patch Patch series | download
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
Subject: Move default rpmdb path to user home
From: Michal Čihař <nijel@debian.org>
Bug-Debian; https://bug.debian.org/551669
Bug-Debian: https://bug.debian.org/741324
Bug-Ubuntu: https://bugs.launchpad.net/bugs/530023
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1069350

We don't want to use system database, because we don't want users to install
rpm packages on Debian.

[benh: Use bash for the expansion, as dash will never look up in the
 passwd file]

--- a/macros.in
+++ b/macros.in
@@ -165,7 +165,9 @@
 %_bzip2bin		%{__bzip2}
 
 #	The location of the rpm database file(s).
-%_dbpath		%{_var}/lib/rpm
+#	We want to lookup the home dir in the passwd file if necessary,
+#	which requires bash.
+%_dbpath		%(bash -c 'echo ~/.rpmdb')
 
 #	The location of the rpm database file(s) after "rpm --rebuilddb".
 %_dbpath_rebuild	%{_dbpath}