Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[packaging] adapt mer packaging for git submodule method
- Loading branch information
Islam Amer
committed
Feb 6, 2014
1 parent
3e96955
commit 14942cb
Showing
9 changed files
with
628 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
rpm/0001-Add-dev-mmcblk-to-the-list-of-devices-to-be-detected.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@@ -, +, @@ | ||
volume | ||
--- | ||
gio/gunixvolume.c | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
--- a/gio/gunixvolume.c | ||
+++ a/gio/gunixvolume.c | ||
@@ -112,7 +112,8 @@ _g_unix_volume_new (GVolumeMonitor *volume_monitor, | ||
GUnixVolume *volume; | ||
|
||
if (!(g_unix_mount_point_is_user_mountable (mountpoint) || | ||
- g_str_has_prefix (g_unix_mount_point_get_device_path (mountpoint), "/vol/")) || | ||
+ g_str_has_prefix (g_unix_mount_point_get_device_path (mountpoint), "/vol/") || | ||
+ g_str_has_prefix (g_unix_mount_point_get_device_path (mountpoint), "/dev/mmcblk1")) || | ||
g_unix_mount_point_is_loopback (mountpoint)) | ||
return NULL; | ||
|
||
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
diff --git a/Makefile.am b/Makefile.am | ||
index f5c510d..cf668b4 100644 | ||
--- a/Makefile.am | ||
+++ b/Makefile.am | ||
@@ -6,7 +6,9 @@ include $(top_srcdir)/Makefile.decl | ||
|
||
ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS} | ||
|
||
-SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs | ||
+#SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs | ||
+SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po | ||
+ | ||
DIST_SUBDIRS = $(SUBDIRS) build | ||
|
||
bin_SCRIPTS = glib-gettextize | ||
@@ -62,8 +64,8 @@ BUILT_EXTRA_DIST = \ | ||
README \ | ||
INSTALL \ | ||
ChangeLog \ | ||
- config.h.win32 \ | ||
- gtk-doc.make | ||
+ config.h.win32 | ||
+# gtk-doc.make | ||
|
||
CONFIGURE_DEPENDENCIES = acglib.m4 | ||
|
||
@@ -116,7 +118,7 @@ files: | ||
|
||
release: | ||
rm -rf .deps */.deps | ||
- cd docs && make glib.html | ||
+# cd docs && make glib.html | ||
$(MAKE) distcheck | ||
|
||
sanity: | ||
diff --git a/autogen.sh b/autogen.sh | ||
index 01011d9..6ba2bf7 100755 | ||
--- a/autogen.sh | ||
+++ b/autogen.sh | ||
@@ -7,11 +7,11 @@ test -n "$srcdir" || srcdir=. | ||
olddir=`pwd` | ||
cd "$srcdir" | ||
|
||
-GTKDOCIZE=`which gtkdocize` | ||
-if test -z $GTKDOCIZE; then | ||
- echo "*** No GTK-Doc found, please install it ***" | ||
- exit 1 | ||
-fi | ||
+#GTKDOCIZE=`which gtkdocize` | ||
+#if test -z $GTKDOCIZE; then | ||
+# echo "*** No GTK-Doc found, please install it ***" | ||
+# exit 1 | ||
+#fi | ||
|
||
AUTORECONF=`which autoreconf` | ||
if test -z $AUTORECONF; then | ||
@@ -24,7 +24,7 @@ fi | ||
# regenerated from their corresponding *.in files by ./configure anyway. | ||
touch README INSTALL | ||
|
||
-gtkdocize || exit $? | ||
+#gtkdocize || exit $? | ||
autoreconf --force --install --verbose || exit $? | ||
|
||
cd "$olddir" | ||
diff --git a/configure.ac b/configure.ac | ||
index eb0be39..804741f 100644 | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -2589,7 +2589,7 @@ dnl ************************** | ||
dnl *** Checks for gtk-doc *** | ||
dnl ************************** | ||
|
||
-GTK_DOC_CHECK([1.15], [--flavour no-tmpl]) | ||
+dnl GTK_DOC_CHECK([1.15], [--flavour no-tmpl]) | ||
|
||
AC_ARG_ENABLE(man, | ||
[AC_HELP_STRING([--enable-man], | ||
@@ -3571,21 +3571,22 @@ gio/win32/Makefile | ||
gio/tests/Makefile | ||
gio/tests/gdbus-object-manager-example/Makefile | ||
po/Makefile.in | ||
-docs/Makefile | ||
-docs/reference/Makefile | ||
-docs/reference/glib/Makefile | ||
-docs/reference/glib/version.xml | ||
-docs/reference/gobject/Makefile | ||
-docs/reference/gobject/version.xml | ||
-docs/reference/gio/Makefile | ||
-docs/reference/gio/gdbus-object-manager-example/Makefile | ||
-docs/reference/gio/version.xml | ||
tests/Makefile | ||
tests/gobject/Makefile | ||
tests/refcount/Makefile | ||
m4macros/Makefile | ||
]) | ||
|
||
+#docs/Makefile | ||
+#docs/reference/Makefile | ||
+#docs/reference/glib/Makefile | ||
+#docs/reference/glib/version.xml | ||
+#docs/reference/gobject/Makefile | ||
+#docs/reference/gobject/version.xml | ||
+#docs/reference/gio/Makefile | ||
+#docs/reference/gio/gdbus-object-manager-example/Makefile | ||
+#docs/reference/gio/version.xml | ||
+ | ||
AC_CONFIG_COMMANDS([chmod-scripts], | ||
[chmod 0755 glib-zip | ||
chmod 0755 glib-gettextize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
From adee01a89537bf8bb2e81508f1a7a6c43202bb48 Mon Sep 17 00:00:00 2001 | ||
From: Damien Lespiau <damien.lespiau@intel.com> | ||
Date: Mon, 10 May 2010 20:31:55 +0100 | ||
Subject: [PATCH] Add a custom log handling for MeeGo | ||
|
||
* The log system should not output to stdout/stderr when not in an | ||
interactive shell as uxlaunch logs those to ~/.xsession-errors. | ||
* When being launched from a interactive shell, display the messages as | ||
usual | ||
* Log messages to syslog to be able to detect/investigate issues. The | ||
verbosity of messages logged this way is tweakable though the | ||
glib.syslog linux command line parameter: | ||
- glib.syslog=0 disables syslog logging | ||
- glib.syslog=1 logs error messages | ||
- ... | ||
- glib.syslog=6 logs debug messages | ||
It defaults to logging WARNING, CRITICAL and ERROR messages | ||
--- | ||
glib/gmessages.c | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++++- | ||
1 files changed, 143 insertions(+), 1 deletions(-) | ||
|
||
diff --git a/glib/gmessages.c b/glib/gmessages.c | ||
index 9a3eec3..ad05954 100644 | ||
--- a/glib/gmessages.c | ||
+++ b/glib/gmessages.c | ||
@@ -40,6 +40,7 @@ | ||
#include <signal.h> | ||
#include <locale.h> | ||
#include <errno.h> | ||
+#include <syslog.h> | ||
|
||
#include "glib.h" | ||
#include "gdebug.h" | ||
@@ -925,6 +926,142 @@ escape_string (GString *string) | ||
} | ||
} | ||
|
||
+/* That is a syslog version of default log handler. */ | ||
+ | ||
+#define IS_EMPTY_STRING(s) (NULL == (s) || 0 == *(s)) | ||
+ | ||
+#define GLIB_PREFIX "GLIB" | ||
+#define DEFAULT_DOMAIN "default" | ||
+#define DEFAULT_MESSAGE "(NULL) message" | ||
+ | ||
+/* | ||
+ * Returns the shift of maximum log level we should log. | ||
+ * This level can be tuned with a linux command line parameter: | ||
+ * glib.syslog=0 disables syslog logging | ||
+ * glib.syslog=1 logs error messages | ||
+ * ... | ||
+ * glib.syslog=6 logs debug messages | ||
+ * | ||
+ * We default to logging G_LOG_LEVEL_WARNING messages and down (ie. ERROR, | ||
+ * CRITICAL, WARNING) | ||
+ */ | ||
+ | ||
+#define GLIB_SYSLOG_CMDLINE_PARAM "glib.syslog=" | ||
+ | ||
+static guint | ||
+g_log_syslog_max_level_shift (void) | ||
+{ | ||
+ static guint max_level = 0; | ||
+ gchar *cmdline; | ||
+ guint i; | ||
+ gchar **tokens; | ||
+ | ||
+ if (G_LIKELY (max_level) != 0) | ||
+ return max_level; | ||
+ | ||
+ max_level = 4; /* defaults WARNING */ | ||
+ if (!g_file_get_contents ("/proc/cmdline", &cmdline, NULL, NULL)) | ||
+ return max_level; | ||
+ | ||
+ tokens = g_strsplit (cmdline, " ", 0); | ||
+ for (i = 0; tokens[i]; i++) | ||
+ { | ||
+ gchar *level, *token = tokens[i]; | ||
+ | ||
+ if (!g_str_has_prefix (token, GLIB_SYSLOG_CMDLINE_PARAM)) | ||
+ continue; | ||
+ | ||
+ level = token + sizeof (GLIB_SYSLOG_CMDLINE_PARAM) - 1; | ||
+ max_level = atoi (level); | ||
+ max_level = CLAMP (max_level + 1, 1, 7); | ||
+ } | ||
+ | ||
+ g_strfreev (tokens); | ||
+ g_free (cmdline); | ||
+ | ||
+ return max_level; | ||
+} | ||
+ | ||
+static void | ||
+g_log_syslog_handler (const gchar *log_domain, | ||
+ GLogLevelFlags log_level, | ||
+ const gchar *message, | ||
+ gpointer unused_data) | ||
+{ | ||
+ static gboolean initialized = FALSE; | ||
+ | ||
+ /* This call only variables */ | ||
+ const gchar* alert = (log_level & ALERT_LEVELS ? " ** " : " "); | ||
+ const gchar* aborting = (log_level & G_LOG_FLAG_FATAL ? "\naborting..." : ""); | ||
+ | ||
+ const gchar* prefix; | ||
+ int priority; | ||
+ | ||
+ /* Check first that logging facility is initialized */ | ||
+ if (G_UNLIKELY (initialized == FALSE)) | ||
+ { | ||
+ openlog (NULL, LOG_PID, LOG_USER); | ||
+ initialized = !initialized; | ||
+ } | ||
+ | ||
+ /* do we actually log that level? */ | ||
+ if ((1 << g_log_syslog_max_level_shift ()) < (log_level & G_LOG_LEVEL_MASK)) | ||
+ return; | ||
+ | ||
+ /* Validate log domain */ | ||
+ if (IS_EMPTY_STRING (log_domain)) | ||
+ log_domain = DEFAULT_DOMAIN; | ||
+ | ||
+ /* Check log message for validity */ | ||
+ if (IS_EMPTY_STRING (message)) | ||
+ message = DEFAULT_MESSAGE; | ||
+ | ||
+ /* Process the message prefix and priority */ | ||
+ switch (log_level & G_LOG_LEVEL_MASK) | ||
+ { | ||
+ case G_LOG_LEVEL_ERROR: | ||
+ prefix = "ERROR"; | ||
+ priority = LOG_ERR; | ||
+ break; | ||
+ case G_LOG_LEVEL_CRITICAL: | ||
+ prefix = "CRITICAL"; | ||
+ priority = LOG_CRIT; | ||
+ break; | ||
+ case G_LOG_LEVEL_WARNING: | ||
+ prefix = "WARNING"; | ||
+ priority = LOG_WARNING; | ||
+ break; | ||
+ case G_LOG_LEVEL_MESSAGE: | ||
+ prefix = "MESSAGE"; | ||
+ priority = LOG_NOTICE; | ||
+ break; | ||
+ case G_LOG_LEVEL_INFO: | ||
+ prefix = "INFO"; | ||
+ priority = LOG_INFO; | ||
+ break; | ||
+ default: | ||
+ prefix = "DEBUG"; | ||
+ priority = LOG_DEBUG; | ||
+ break; | ||
+ } | ||
+ | ||
+ /* Now printing the message to syslog */ | ||
+ syslog (priority, "%s %s%s%s - %s%s", GLIB_PREFIX, prefix, alert, log_domain, | ||
+ message, aborting); | ||
+} | ||
+ | ||
+static gboolean | ||
+is_interactive (void) | ||
+{ | ||
+ gint interactive = -1; | ||
+ | ||
+ if (G_LIKELY (interactive != -1)) | ||
+ return interactive; | ||
+ | ||
+ interactive = g_getenv ("PWD") != NULL; | ||
+ return interactive; | ||
+} | ||
+ | ||
void | ||
g_log_default_handler (const gchar *log_domain, | ||
GLogLevelFlags log_level, | ||
@@ -999,7 +1136,12 @@ g_log_default_handler (const gchar *log_domain, | ||
|
||
string = g_string_free (gstring, FALSE); | ||
|
||
- write_string (fd, string); | ||
+ /* only output a string to stdout/stderr if we are in an interactive shell */ | ||
+ if (is_interactive ()) | ||
+ write_string (fd, string); | ||
+ | ||
+ /* */ | ||
+ g_log_syslog_handler (log_domain, log_level, message, unused_data); | ||
g_free (string); | ||
} | ||
|
||
-- | ||
1.7.0.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This line is mandatory to access the configuration functions | ||
from Config import * | ||
addFilter("glib2-devel.* library-without-ldconfig-postin") | ||
addFilter("glib2-devel.* library-without-ldconfig-postun") |
Oops, something went wrong.