Initial Import
authorPrajwal Mohan <prajwal.karur.mohan@intel.com>
Fri, 27 Apr 2012 22:49:12 +0000 (15:49 -0700)
committerPrajwal Mohan <prajwal.karur.mohan@intel.com>
Fri, 27 Apr 2012 22:49:12 +0000 (15:49 -0700)
glib-2.24.0-syslog-message-handler.patch [new file with mode: 0644]
glib-2.31.20.sha256sum [new file with mode: 0644]
glib-2.31.20.tar.xz [new file with mode: 0644]
glib2-rpmlintrc [new file with mode: 0644]
glib2.changes [new file with mode: 0644]
glib2.csh [new file with mode: 0644]
glib2.sh [new file with mode: 0644]
glib2.spec [new file with mode: 0644]

diff --git a/glib-2.24.0-syslog-message-handler.patch b/glib-2.24.0-syslog-message-handler.patch
new file mode 100644 (file)
index 0000000..3c25c5a
--- /dev/null
@@ -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
+
diff --git a/glib-2.31.20.sha256sum b/glib-2.31.20.sha256sum
new file mode 100644 (file)
index 0000000..db73757
--- /dev/null
@@ -0,0 +1,3 @@
+ed9785e16f8e2c55ae3cdbc9afe321fccff6c8de91db37e485ed39c42e010d39  glib-2.31.20.news
+4c4dd2c4495286df2dabeda74b546fbee8cb3a33cbc3824083bd6f240b1089bb  glib-2.31.20.changes
+3475e1d866c462a36b89d4bae91181513c390ad0af25f445618321da1e022c2a  glib-2.31.20.tar.xz
diff --git a/glib-2.31.20.tar.xz b/glib-2.31.20.tar.xz
new file mode 100644 (file)
index 0000000..2001889
Binary files /dev/null and b/glib-2.31.20.tar.xz differ
diff --git a/glib2-rpmlintrc b/glib2-rpmlintrc
new file mode 100644 (file)
index 0000000..1e20d52
--- /dev/null
@@ -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")
diff --git a/glib2.changes b/glib2.changes
new file mode 100644 (file)
index 0000000..0c78b80
--- /dev/null
@@ -0,0 +1,133 @@
+* Thu Mar 15 2012 Jimmy Huang <jimmy.huang@linux.intel.com> - 2.31.20
+- Update to 2.31.20
+
+* Thu Nov 24 2011 Damien Lespiau <damien.lespiau@intel.com> - 2.30.2
+- Update to 2.30
+- Use the .tar.xz version of the tarball
+
+* Sat Jun 11 2011 Anas Nashif <anas.nashif@intel.com> - 2.28.8
+- Cleanup spec
+
+* Mon Jun 06 2011 Damien Lespiau <damien.lespiau@intel.com> - 2.28.8
+- Update to latest stable version
+
+* Fri May 27 2011 Anas Nashif <anas.nashif@intel.com> - 2.28.7
+- Update to 2.28.7
+- Split Documentation and Locale files
+
+* Mon Apr 25 2011 Peter J Zhu <peter.j.zhu@intel.com> - 2.28.6
+- Move more binaries to main package to align with rest GSettings needes
+
+* Mon Apr 25 2011 Peter J Zhu <peter.j.zhu@intel.com> - 2.28.6
+- Move glib-compile-schemas to binary packages so that packages using GSettings doesn't pull glib2-devel. One example is telpathy-logger which pulles in glib2-devel to tablet image
+
+* Thu Apr 14 2011 Damien Lespiau <damien.lespiau@intel.com> - 2.28.6
+- More translation and documentation updates,
+- Fix a potential crasher in g_settings_delay()
+
+* Tue Apr 05 2011 Anas Nashif <anas.nashif@intel.com> - 2.28.5
+- Update to latest bug fix release + translation updates
+- 2.28.5
+
+* Wed Feb 16 2011 Rob Bradford <rob@linux.intel.com> - 2.28.0
+- Update to 2.28 - needed for updating Empathy and related components which we
+need to continue interoperating with previously supported IM protocols
+
+* Fri Oct 15 2010 Damien Lespiau <damien.lespiau@intel.com> - 2.26.0
+- Update to 2.26.0
+- Remove unused patch from package
+
+* Mon May 10 2010 Damien Lespiau <damien.lespiau@intel.com> - 2.24.0
+- The message log handler is now configurable and does not print
+  to stdout/stderr when not in an interactive shell
+
+* Sat Apr 10 2010 Anas Nashif <anas.nashif@intel.com> - 2.24.0
+- Fixed rpmlint errors
+
+* Tue Mar 30 2010 Vivian Zhang <vivian.zhang@intel.com> - 2.24.0
+- Update to 2.24.0
+
+* Fri Mar 26 2010 Anas Nashif <anas.nashif@intel.com> - 2.23.5
+- Remove Epoch requirement on pkgconfig
+
+* Tue Mar 9 2010 Vivian Zhang <vivian.zhang@intel.com> - 2.23.5
+- Upgrade to 2.23.5
+
+* Mon Mar 01 2010 Anas Nashif <anas.nashif@intel.com> - 2.23.3
+- Add zlib-devel to BuildRequires
+
+* Fri Feb 19 2010 Arjan van de Ven <arjan@linux.intel.com> - 2.23.3
+- Use profile guided optimization during the build
+
+* Fri Feb 12 2010 Arjan van de Ven <arjan@linux.intel.com> - 2.23.3
+- Upgrade to 2.23.3
+
+* Wed Jan 13 2010 Xu Li <xu.li@intel.com> - 2.23.1
+- Upgrade to 2.23.1
+
+* Wed Dec 23 2009 Xu Li <xu.li@intel.com> - 2.23.0
+- Upgrade to 2.23.0
+
+* Fri Dec 04 2009 Xu Li <xu.li@intel.com> - 2.22.3
+- Upgrade to 2.22.3
+- Fix installed file list
+
+* Thu Sep 24 2009 Xu Li <xu.li@intel.com> - 2.22.0
+- Upgrade to 2.22.0
+
+* Sun Sep 06 2009 Anas Nashif <anas.nashif@intel.com> - 2.21.6
+- Update to 2.21.6
+
+* Mon Aug 31 2009 Xu Li <xu.li@intel.com> - 2.21.5
+- Upgrade to 2.21.5
+
+* Sat Aug 22 2009 Anas Nashif <anas.nashif@intel.com> - 2.21.4
+- Update to 2.21.4
+
+* Wed Jun 17 2009 Ross Burton <ross@linux.intel.com> 2.20.1
+- Integrate patch from upstream to optimise GMarkup parsing
+
+* Tue May 5 2009 Arjan van de Ven <arjan@linux.intel.com> 2.20.1
+- use --enable-debug=minimal to disable the really expensive 
+  type checking gobject asserts
+
+* Thu Apr 30 2009 Arjan van de Ven <arjan@linux.intel.com> 2.20.1
+- since we use ext3, using fsync is both unneeded and extremely expensive,
+  lets not do that.
+
+* Wed Apr 22 2009 Xu Li <xu.li@intel.com> 2.20.1
+- Upgrade to 2.20.1
+
+* Wed Mar 18 2009 Xu Li <xu.li@intel.com> 2.20.0
+- Upgrade to 2.20.0
+
+* Thu Feb 19 2009 Anas Nashif <anas.nashif@intel.com> 2.19.8
+- Update to 2.19.8
+
+* Tue Feb 17 2009 Damien Lespiau <damien.lespiau@intel.com> 2.19.6
+- Fix syslog patch to pass LSB Desktop-T2C tests
+
+* Thu Feb 12 2009 Damien Lespiau <damien.lespiau@intel.com> 2.19.6
+- Add a patch to use syslog as glib default error message handler
+  (the original patch is from Maemo)
+
+* Sat Feb 07 2009 Anas Nashif <anas.nashif@intel.com> 2.19.6
+- Update to version 2.19.6
+
+* Wed Dec 10 2008 Anas Nashif <anas.nashif@intel.com> 2.19.2
+- Update to version 2.19
+- Re-enable static libraries
+
+* Wed Dec 10 2008 Anas Nashif <anas.nashif@intel.com> 2.18.2
+- Do not install static libs
+
+* Wed Dec 03 2008 Anas Nashif <anas.nashif@intel.com> 2.18.2
+- Spec file cleanup
+
+ * Thu Nov 20 2008 Xu Li <xu.li@intel.com> - 2.18.2
+- Upgrade to 2.18.2
+- Disable the dependency of libselinux for Moblin
+- Disable the dependency of gtk-doc for Moblin
+
+* Sat Sep 20 2008 Anas Nashif <anas.nashif@intel.com> 2.18.0
+- update to 2.18
diff --git a/glib2.csh b/glib2.csh
new file mode 100644 (file)
index 0000000..3a7d294
--- /dev/null
+++ b/glib2.csh
@@ -0,0 +1,6 @@
+
+## This caused GLib2 applications to convert filenames from 
+## locale encoding to UTF-8. If the locale encoding is already
+## UTF-8 then it makes no difference.
+
+setenv G_BROKEN_FILENAMES 1
diff --git a/glib2.sh b/glib2.sh
new file mode 100644 (file)
index 0000000..e8fd18d
--- /dev/null
+++ b/glib2.sh
@@ -0,0 +1,6 @@
+
+## This caused GLib2 applications to convert filenames from 
+## locale encoding to UTF-8. If the locale encoding is already
+## UTF-8 then it makes no difference.
+
+export G_BROKEN_FILENAMES=1
diff --git a/glib2.spec b/glib2.spec
new file mode 100644 (file)
index 0000000..0f808de
--- /dev/null
@@ -0,0 +1,154 @@
+%define libdir /%{_lib}
+
+Summary: A library of handy utility functions
+Name: glib2
+Version: 2.31.20
+Release: 2.24
+License: LGPLv2+
+Group: System/Libraries
+URL: http://www.gtk.org
+Source: http://download.gnome.org/sources/glib/2.31/glib-%{version}.tar.xz
+Source1: http://download.gnome.org/sources/glib/2.31/glib-%{version}.sha256sum
+Source2: glib2.sh
+Source3: glib2.csh
+Source101: %{name}-rpmlintrc
+
+Patch1: glib-2.24.0-syslog-message-handler.patch
+BuildRequires: pkgconfig
+BuildRequires: pkgconfig(libpcre)
+BuildRequires: pkgconfig(libffi)
+BuildRequires: pkgconfig(zlib)
+BuildRequires: gettext-tools
+# for sys/inotify.h
+BuildRequires: glibc-devel
+BuildRequires: libattr-devel
+BuildRequires: python-xml
+
+%description
+GLib is the low-level core library that forms the basis
+for projects such as GTK+ and GNOME. It provides data structure
+handling for C, portability wrappers, and interfaces for such runtime
+functionality as an event loop, threads, dynamic loading, and an
+object system.
+
+This package provides version 2 of GLib.
+
+%package devel
+Summary: A library of handy utility functions
+Group: Development/Libraries
+Requires: pkgconfig 
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+The glib2-devel package includes the header files for
+version 2 of the GLib library.
+
+# anaconda needs static libs, see RH bug #193143
+%package static
+Summary: A library of handy utility functions
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+The glib2-static package includes static libraries
+of version 2 of the GLib library.
+
+%prep
+%setup -q -n glib-%{version}
+%patch1 -p1
+
+
+%build
+%configure --disable-gtk-doc --enable-static --with-runtime-libdir=../../%{_lib} --disable-selinux --disable-visibility --enable-debug=yes --with-pcre=system
+
+#
+# First, build glib enabled for generating the Profile Guided Optimization
+# metadata
+#
+make %{?_smp_mflags} CFLAGS="$CFLAGS -pg -fprofile-generate"
+
+#
+# Now run the glib performance tests to create the profile dta
+#
+cd tests/gobject
+make performance CFLAGS="$CFLAGS -pg -fprofile-generate"
+cd ../..
+tests/gobject/performance type-check
+
+#
+# And now compile again, using the generated profile data
+#
+rm `find -name "*.lo"`
+rm `find -name "*.o"`
+make %{?_smp_mflags} CFLAGS="$CFLAGS -fprofile-use"
+
+%install
+
+make DESTDIR=%{buildroot} install
+## glib2.sh and glib2.csh
+./mkinstalldirs %{buildroot}%{_sysconfdir}/profile.d
+install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d
+install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/profile.d
+
+rm -f %{buildroot}%{_libdir}/*.la
+rm -f %{buildroot}%{_libdir}/gio/modules/*.{a,la}
+
+# we don't provide bash completion
+rm -rf %{buildroot}%{_sysconfdir}/bash_completion.d
+
+%find_lang glib20
+mv glib20.lang glib2.lang
+
+%clean
+rm -rf %{buildroot}
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%docs_package
+
+%lang_package
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS COPYING
+%{libdir}/libglib-2.0.so.*
+%{libdir}/libgthread-2.0.so.*
+%{libdir}/libgmodule-2.0.so.*
+%{libdir}/libgobject-2.0.so.*
+%{libdir}/libgio-2.0.so.*
+%{_sysconfdir}/profile.d/*
+%dir %{_libdir}/gio
+%dir %{_libdir}/gio/modules
+%{_bindir}/gio-querymodules
+%{_bindir}/glib-compile-resources
+%{_bindir}/glib-compile-schemas
+%{_bindir}/gsettings
+%{_bindir}/gdbus
+
+%files devel
+%defattr(-, root, root, -)
+%{_libdir}/lib*.so
+%{_libdir}/glib-2.0
+%{_includedir}/*
+%{_datadir}/aclocal/*
+%{_libdir}/pkgconfig/*
+%{_datadir}/glib-2.0
+%{_datadir}/gdb/auto-load/lib/*.py*
+%doc %{_datadir}/gtk-doc/html/*
+%{_bindir}/gdbus-codegen
+%{_libdir}/gdbus-2.0/codegen/*.py*
+%{_bindir}/glib-genmarshal
+%{_bindir}/glib-gettextize
+%{_bindir}/glib-mkenums
+%{_bindir}/gobject-query
+%{_bindir}/gresource
+%{_bindir}/gtester
+%attr (0755, root, root) %{_bindir}/gtester-report
+
+%files static
+%defattr(-, root, root, -)
+%{_libdir}/lib*.a
+