[SCM] KDE Base Workspace module packaging branch, kde4.5, updated. debian/4.4.5-3-35-gef83695
George Kiagiadakis
gkiagia-guest at alioth.debian.org
Mon Aug 30 18:31:22 UTC 2010
The following commit has been merged in the kde4.5 branch:
commit a3e76aca8c032180e7afd48d8020d3626c90725c
Author: George Kiagiadakis <kiagiadakis.george at gmail.com>
Date: Mon Aug 30 19:50:39 2010 +0300
Fix the issue with the misplaced kcmclockrc configuration file.
This commit modifies patch 21 to also patch the kcm_clock helper to use
/etc/kde4 for its configuration file and completely removes KDE_CONFDIR
from config-workspace.h so that we can catch any future wrong uses of this
macro. In addition, it adds code in kdebase-workspace-bin.postinst to move
the misplaced kcmclockrc configuration file from /usr/share to /etc.
---
debian/changelog | 8 ++-
debian/kdebase-workspace-bin.postinst | 10 +++-
...irs.diff => 21_place_global_config_in_etc.diff} | 53 ++++++++++++-------
debian/patches/series | 2 +-
4 files changed, 49 insertions(+), 24 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 6afc359..099d264 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,8 +7,10 @@ kdebase-workspace (4:4.5.0+svn1166505-0r1) UNRELEASED; urgency=low
* Change my email address in uploaders.
* Refresh patches.
- Re-work patch 11_kdm_X_path.diff.
- - Extend patch 21_kdm_doesnt_use_kstandarddirs.diff
- to also patch the new kdm kcm kauth helper.
+ - Re-work patch 21_kdm_doesnt_use_kstandarddirs.diff (and rename it to
+ 21_place_global_config_in_etc.diff) to also patch the new kdm kcm kauth
+ helper and the kcm_clock helper and provide a method to catch future
+ wrong uses of the KDE_CONFDIR macro with regards to the debian policy.
* Drop patches for bugs that are fixed upstream:
- 01_plasma_netbook_no_autostart.diff
- 27_ld_exclude_libs_qtuitools.diff
@@ -54,6 +56,8 @@ kdebase-workspace (4:4.5.0+svn1166505-0r1) UNRELEASED; urgency=low
* Add dependency to iso-codes in kdebase-workspace-bin, since it is
a runtime dependency for kcm_keyboard.
* Fix the kdm init script to use any overrides set in /etc/default/kdm.d/.
+ * Add code in kdebase-workspace-bin.postinst to move the misplaced kcmclockrc
+ configuration file from /usr/share to /etc.
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Sat, 31 Jul 2010 16:41:50 +0300
diff --git a/debian/kdebase-workspace-bin.postinst b/debian/kdebase-workspace-bin.postinst
index 8c3f787..cb9b89a 100644
--- a/debian/kdebase-workspace-bin.postinst
+++ b/debian/kdebase-workspace-bin.postinst
@@ -23,7 +23,15 @@ case "$1" in
x-session-manager /usr/bin/startkde 40 \
--slave /usr/share/man/man1/x-session-manager.1.gz \
x-session-manager.1.gz "/usr/share/man/man1/startkde.1.gz"
-
+
+ # Move misplaced configuration file. Older versions of kcm_clock used to
+ # store their configuration in /usr/share, but newer versions store it in /etc/kde4.
+ if [ -e /usr/share/kde4/config/kcmclockrc ] && [ ! -e /etc/kde4/kcmclockrc ];
+ then
+ mv /usr/share/kde4/config/kcmclockrc /etc/kde4/kcmclockrc
+ # fix permissions too, older versions used to create the file in 600 mode and later in 004 mode.
+ chmod 644 /etc/kde4/kcmclockrc
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/patches/21_kdm_doesnt_use_kstandarddirs.diff b/debian/patches/21_place_global_config_in_etc.diff
similarity index 67%
rename from debian/patches/21_kdm_doesnt_use_kstandarddirs.diff
rename to debian/patches/21_place_global_config_in_etc.diff
index d5b04f4..586855f 100644
--- a/debian/patches/21_kdm_doesnt_use_kstandarddirs.diff
+++ b/debian/patches/21_place_global_config_in_etc.diff
@@ -1,19 +1,21 @@
-As we use DEB_CONFIG_INSTALL_DIR ?= /usr/share/kde4/config
-and we want kdm configuration files in /etc/kde4/kdm,
-Let's hardcode it and introduce KDM_CONFDIR.
+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.
--- a/config-workspace.h.cmake
+++ b/config-workspace.h.cmake
-@@ -126,6 +126,9 @@
- /* KDE's static data directory */
- #define KDE_DATADIR "${DATA_INSTALL_DIR}"
+@@ -121,7 +121,7 @@
+ #define KDE_BINDIR "${BIN_INSTALL_DIR}"
-+/* KDM's configuration directory */
-+#define KDM_CONFDIR "/etc/kde4"
-+
- /* Define where your java executable is */
- #undef PATH_JAVA
+ /* 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}"
--- a/kcontrol/kdm/main.cpp
+++ b/kcontrol/kdm/main.cpp
@@ -282,7 +282,7 @@
@@ -21,7 +23,7 @@ Let's hardcode it and introduce KDM_CONFDIR.
KConfig *pSystemKDMConfig = new KConfig(
- QString::fromLatin1(KDE_CONFDIR "/kdm/kdmrc"), KConfig::SimpleConfig);
-+ QString::fromLatin1(KDM_CONFDIR "/kdm/kdmrc"), KConfig::SimpleConfig);
++ QString::fromLatin1(KDE_DEBIAN_CONFDIR "/kdm/kdmrc"), KConfig::SimpleConfig);
KConfig *pTempConfig = pSystemKDMConfig->copyTo(tempConfigName);
pTempConfig->sync();
@@ -30,7 +32,7 @@ Let's hardcode it and introduce KDM_CONFDIR.
QString systemBackgroundConfigName =
config->group("X-*-Greeter").readEntry(
- "BackgroundCfg", KDE_CONFDIR "/kdm/backgroundrc");
-+ "BackgroundCfg", KDM_CONFDIR "/kdm/backgroundrc");
++ "BackgroundCfg", KDE_DEBIAN_CONFDIR "/kdm/backgroundrc");
KConfig systemBackgroundConfig(systemBackgroundConfigName);
KSharedConfigPtr pTempConfig = KSharedConfig::openConfig(tempBackgroundConfigName);
@@ -41,7 +43,7 @@ Let's hardcode it and introduce KDM_CONFDIR.
#define RCVERMINOR 4
-#define KDMCONF KDE_CONFDIR "/kdm"
-+#define KDMCONF KDM_CONFDIR "/kdm"
++#define KDMCONF KDE_DEBIAN_CONFDIR "/kdm"
#define KDMDATA KDE_DATADIR "/kdm"
#include <sys/param.h> /* for #define BSD */
@@ -52,7 +54,7 @@ Let's hardcode it and introduce KDM_CONFDIR.
char *dpy = getenv("DISPLAY");
const char *ctl = getenv("DM_CONTROL");
- const char *cfg = KDE_CONFDIR "/kdm/kdmrc";
-+ const char *cfg = KDM_CONFDIR "/kdm/kdmrc";
++ const char *cfg = KDE_DEBIAN_CONFDIR "/kdm/kdmrc";
char *ptr;
int fd;
@@ -63,7 +65,7 @@ Let's hardcode it and introduce KDM_CONFDIR.
static const char * const oldkdes[] = {
- KDE_CONFDIR,
-+ KDM_CONFDIR,
++ KDE_DEBIAN_CONFDIR,
"/opt/kde4/share/config",
"/usr/local/kde4/share/config",
@@ -80,7 +82,7 @@ Let's hardcode it and introduce KDM_CONFDIR.
" --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 " KDM_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"
@@ -91,10 +93,10 @@ Let's hardcode it and introduce KDM_CONFDIR.
QString tempBackgroundConfigName = args.value("tempbackgroundrcfile").toString();
- QString systemConfigName = QString::fromLatin1(KDE_CONFDIR "/kdm/kdmrc");
-+ QString systemConfigName = QString::fromLatin1(KDM_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", KDM_CONFDIR "/kdm/backgroundrc");
++ .group("X-*-Greeter").readEntry("BackgroundCfg", KDE_DEBIAN_CONFDIR "/kdm/backgroundrc");
int code = 0;
@@ -103,7 +105,18 @@ Let's hardcode it and introduce KDM_CONFDIR.
int subaction = args.value("subaction").toInt();
QString facesDir =
- KConfig(QString::fromLatin1(KDE_CONFDIR "/kdm/kdmrc"), KConfig::SimpleConfig)
-+ KConfig(QString::fromLatin1(KDM_CONFDIR "/kdm/kdmrc"), KConfig::SimpleConfig)
++ KConfig(QString::fromLatin1(KDE_DEBIAN_CONFDIR "/kdm/kdmrc"), KConfig::SimpleConfig)
.group("X-*-Greeter").readEntry("FaceDir",
KStandardDirs::installPath("data") + "kdm/faces") + '/';
+--- a/kcontrol/dateandtime/helper.cpp
++++ b/kcontrol/dateandtime/helper.cpp
+@@ -54,7 +54,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();
diff --git a/debian/patches/series b/debian/patches/series
index a097932..b37a32c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,7 +7,7 @@
12_be_better_at_honouring_user_kdm_theming.diff
13_kdm_override_docs.diff
20_use_dejavu_as_default_font.diff
-21_kdm_doesnt_use_kstandarddirs.diff
+21_place_global_config_in_etc.diff
22_kdm_xreset_hook_framework.diff
26_run_kaboom_when_starting_kde.diff
97_fix_target_link_libraries.diff
--
KDE Base Workspace module packaging
More information about the pkg-kde-commits
mailing list