Package: kde-workspace / 4:4.11.13-2

place_global_config_in_etc.diff 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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
We use DEB_CONFIG_INSTALL_DIR ?= /usr/share/kde4/config but we want global
configuration files in /etc/kde4. This patch hardcodes this value in
config-workspace.cmake and renames the define to KDE_DEBIAN_CONFDIR so that
we can detect possible new uses of KDE_CONFDIR in upstream code that might
have trouble if we apply this patch. With the renamed define, it will at
least FTBFS, so that we have the chance to inspect.

Index: kde-workspace/config-workspace.h.cmake
===================================================================
--- kde-workspace.orig/config-workspace.h.cmake	2013-11-08 16:31:33.918010238 +0100
+++ kde-workspace/config-workspace.h.cmake	2013-11-08 16:31:33.914010400 +0100
@@ -129,7 +129,7 @@
 #define KDE_BINDIR "${BIN_INSTALL_DIR}"
 
 /* KDE's configuration directory */
-#define KDE_CONFDIR "${CONFIG_INSTALL_DIR}"
+#define KDE_DEBIAN_CONFDIR "/etc/kde4"
 
 /* KDE's static data directory */
 #define KDE_DATADIR "${DATA_INSTALL_DIR}"
Index: kde-workspace/kdm/kcm/main.cpp
===================================================================
--- kde-workspace.orig/kdm/kcm/main.cpp	2013-11-08 16:31:33.918010238 +0100
+++ kde-workspace/kdm/kcm/main.cpp	2013-11-08 16:31:33.914010400 +0100
@@ -282,7 +282,7 @@
     QString tempConfigName = pTempConfigFile->fileName();
 
     KConfig *pSystemKDMConfig = new KConfig(
-        QString::fromLatin1(KDE_CONFDIR "/kdm/kdmrc"), KConfig::SimpleConfig);
+        QString::fromLatin1(KDE_DEBIAN_CONFDIR "/kdm/kdmrc"), KConfig::SimpleConfig);
 
     KConfig *pTempConfig = pSystemKDMConfig->copyTo(tempConfigName);
     pTempConfig->sync();
@@ -301,7 +301,7 @@
 
     QString systemBackgroundConfigName =
         config->group("X-*-Greeter").readEntry(
-            "BackgroundCfg", KDE_CONFDIR "/kdm/backgroundrc");
+            "BackgroundCfg", KDE_DEBIAN_CONFDIR "/kdm/backgroundrc");
 
     KConfig systemBackgroundConfig(systemBackgroundConfigName, KConfig::SimpleConfig);
     KSharedConfigPtr pTempConfig = KSharedConfig::openConfig(tempBackgroundConfigName);
Index: kde-workspace/kdm/config.def
===================================================================
--- kde-workspace.orig/kdm/config.def	2013-11-08 16:31:33.918010238 +0100
+++ kde-workspace/kdm/config.def	2013-11-08 16:31:33.914010400 +0100
@@ -29,7 +29,7 @@
 #define RCVERMAJOR 2
 #define RCVERMINOR 4
 
-#define KDMCONF KDE_CONFDIR "/kdm"
+#define KDMCONF KDE_DEBIAN_CONFDIR "/kdm"
 #define KDMDATA KDE_DATADIR "/kdm"
 
 #include <sys/param.h> /* for #define BSD */
Index: kde-workspace/kdm/kfrontend/kdmctl.c
===================================================================
--- kde-workspace.orig/kdm/kfrontend/kdmctl.c	2013-11-08 16:31:33.918010238 +0100
+++ kde-workspace/kdm/kfrontend/kdmctl.c	2013-11-08 16:31:33.914010400 +0100
@@ -148,7 +148,7 @@
 {
     char *dpy = getenv("DISPLAY");
     const char *ctl = getenv("DM_CONTROL");
-    const char *cfg = KDE_CONFDIR "/kdm/kdmrc";
+    const char *cfg = KDE_DEBIAN_CONFDIR "/kdm/kdmrc";
     char *ptr;
     int fd;
 
Index: kde-workspace/kdm/kfrontend/genkdmconf.c
===================================================================
--- kde-workspace.orig/kdm/kfrontend/genkdmconf.c	2013-11-08 16:31:33.918010238 +0100
+++ kde-workspace/kdm/kfrontend/genkdmconf.c	2013-11-08 16:31:33.914010400 +0100
@@ -2926,7 +2926,7 @@
 
 
 static const char * const oldkdes[] = {
-    KDE_CONFDIR,
+    KDE_DEBIAN_CONFDIR,
     "/opt/kde4/share/config",
     "/usr/local/kde4/share/config",
 
@@ -2934,6 +2934,7 @@
     "/usr/local/kde/share/config",
     "/usr/local/share/config",
     "/usr/share/config",
+    "/etc/kde3",
 
     "/opt/kde3/share/config",
     "/usr/local/kde3/share/config",
@@ -2977,7 +2978,7 @@
 "    Note that you possibly need to use --no-old-kde to make this take effect.\n"
 "  --old-kde /path/to/old/kde-config-dir\n"
 "    Where to look for the kdmrc of a previously installed kdm.\n"
-"    Default is to scan " KDE_CONFDIR " and\n"
+"    Default is to scan " KDE_DEBIAN_CONFDIR " and\n"
 "    {/usr,/usr/local,{/opt,/usr/local}/{kde4,kde,kde3}}/share/config.\n"
 "  --no-old\n"
 "    Do not look at older xdm/kdm configurations, just create default config.\n"
Index: kde-workspace/kdm/kcm/helper.cpp
===================================================================
--- kde-workspace.orig/kdm/kcm/helper.cpp	2013-11-08 16:31:33.918010238 +0100
+++ kde-workspace/kdm/kcm/helper.cpp	2013-11-08 16:31:33.914010400 +0100
@@ -131,9 +131,9 @@
     QString tempConfigName = args.value("tempkdmrcfile").toString();
     QString tempBackgroundConfigName = args.value("tempbackgroundrcfile").toString();
 
-    QString systemConfigName = QString::fromLatin1(KDE_CONFDIR "/kdm/kdmrc");
+    QString systemConfigName = QString::fromLatin1(KDE_DEBIAN_CONFDIR "/kdm/kdmrc");
     QString systemBackgroundConfigName = KConfig(systemConfigName, KConfig::SimpleConfig)
-            .group("X-*-Greeter").readEntry("BackgroundCfg", KDE_CONFDIR "/kdm/backgroundrc");
+            .group("X-*-Greeter").readEntry("BackgroundCfg", KDE_DEBIAN_CONFDIR "/kdm/backgroundrc");
 
     int code = 0;
 
@@ -167,7 +167,7 @@
 {
     int subaction = args.value("subaction").toInt();
     QString facesDir =
-        KConfig(QString::fromLatin1(KDE_CONFDIR "/kdm/kdmrc"), KConfig::SimpleConfig)
+        KConfig(QString::fromLatin1(KDE_DEBIAN_CONFDIR "/kdm/kdmrc"), KConfig::SimpleConfig)
             .group("X-*-Greeter").readEntry("FaceDir",
                 QString(KStandardDirs::installPath("data") + "kdm/faces" + '/'));
 
Index: kde-workspace/kcontrol/dateandtime/helper.cpp
===================================================================
--- kde-workspace.orig/kcontrol/dateandtime/helper.cpp	2013-11-08 16:31:33.918010238 +0100
+++ kde-workspace/kcontrol/dateandtime/helper.cpp	2013-11-08 16:31:33.914010400 +0100
@@ -58,7 +58,7 @@
   int ret = 0;
 
   // write to the system config file
-  QFile config_file(KDE_CONFDIR "/kcmclockrc");
+  QFile config_file(KDE_DEBIAN_CONFDIR "/kcmclockrc");
   if(!config_file.exists()) {
     config_file.open(QIODevice::WriteOnly);
     config_file.close();
Index: kde-workspace/ksmserver/shutdowndlg.cpp
===================================================================
--- kde-workspace.orig/ksmserver/shutdowndlg.cpp	2013-11-08 16:31:33.918010238 +0100
+++ kde-workspace/ksmserver/shutdowndlg.cpp	2013-11-08 16:31:33.914010400 +0100
@@ -203,7 +203,7 @@
     mapSpdMethods->insert("HibernateState", QVariant::fromValue(spdMethods.contains(Solid::PowerManagement::HibernateState)));
     context->setContextProperty("spdMethods", mapSpdMethods);
 
-    QString bootManager = KConfig(KDE_CONFDIR "/kdm/kdmrc", KConfig::SimpleConfig).group("Shutdown").readEntry("BootManager", "None");
+    QString bootManager = KConfig(KDE_DEBIAN_CONFDIR "/kdm/kdmrc", KConfig::SimpleConfig).group("Shutdown").readEntry("BootManager", "None");
     context->setContextProperty("bootManager", bootManager);
 
     QStringList options;