Commit Graph

220 Commits

Author SHA1 Message Date
Colin Walters
28b30caecb configure: Enable set of standard -Werror=foo flags
We're not going to depend on gnome-common (I assume) so this patch
nicks the systemd macro to test for compiler flags, and uses it to set
a similar set of -Werror=foo as the gnome-common one does.

See https://bugzilla.gnome.org/show_bug.cgi?id=608953
See https://mail.gnome.org/archives/desktop-devel-list/2012-July/msg00100.html

If we're going to be setting more strict compiler flags for GNOME, we
should really ensure GLib builds with them first, as it's kind of the
model citizen.

In particular, you can see several times that downstreams such as
Debian have come in and fixed -Wformat-security bugs.  We should never
let those get into tarballs, or even commits.

https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-02 09:03:52 -04:00
Ryan Lortie
7d17fd6f61 Release GLib 2.35.1 2012-10-22 22:20:47 +02:00
Christian Persch
47bc95c0db build: Post branch version bump 2012-10-03 13:58:19 +02:00
Matthias Clasen
9fa86cf217 Bump version 2012-09-23 22:39:20 -04:00
Matthias Clasen
b470097b8b 2.34.0 2012-09-23 22:34:05 -04:00
Ryan Lortie
2cffb96088 bump version 2012-09-18 08:38:04 -04:00
Ryan Lortie
a47761a36e GLib 2.33.14 2012-09-17 17:53:58 -04:00
Colin Walters
d6cbb29f59 CVE-2012-3524: Hardening for being run in a setuid environment
Some programs attempt to use libglib (or even libgio) when setuid.
For a long time, GTK+ simply aborted if launched in this
configuration, but we never had a real policy for GLib.

I'm not sure whether we should advertise such support.  However, given
that there are real-world programs that do this currently, we can make
them safer with not too much effort.

Better to fix a problem caused by an interaction between two
components in *both* places if possible.

This patch adds a private function g_check_setuid() which is used to
first ensure we don't run an external dbus-launch binary if
DBUS_SESSION_BUS_ADDRESS isn't set.

Second, we also ensure the local VFS is used in this case.  The
gdaemonvfs extension point will end up talking to the session bus
which is typically undesirable in a setuid context.

Implementing g_check_setuid() is interesting - whether or not we're
running in a privilege-escalated path is operating system specific.
Note that GTK+'s code to check euid versus uid worked historically on
Unix, more modern systems have filesystem capabilities and SELinux
domain transitions, neither of which are captured by the uid
comparison.

On Linux/glibc, the way this works is that the kernel sets an
AT_SECURE flag in the ELF auxiliary vector, and glibc looks for it on
startup.  If found, then glibc sets a public-but-undocumented
__libc_enable_secure variable which we can use.  Unfortunately, while
it *previously* worked to check this variable, a combination of newer
binutils and RPM break it:
http://www.openwall.com/lists/owl-dev/2012/08/14/1

So for now on Linux/glibc, we fall back to the historical Unix version
until we get glibc fixed.

On some BSD variants, there is a issetugid() function.  On other Unix
variants, we fall back to what GTK+ has been doing.

Reported-By: Sebastian Krahmer <krahmer@suse.de>
Signed-off-by: Colin Walters <walters@verbum.org>
2012-09-13 18:34:29 -04:00
Matthias Clasen
dad25c4819 Bump version 2012-09-03 16:27:19 -04:00
Matthias Clasen
626abfdc10 2.33.10 2012-09-03 15:14:18 -04:00
Ryan Lortie
221bbd8d76 *bump*
thanks rico :)
2012-08-21 16:32:17 -04:00
Ryan Lortie
ed40bf6715 NEWS, versions, etc. 2012-08-20 18:36:51 -04:00
Javier Jardón
f8a5fc2e2e Revert "Use upstream gettext instead the glib one"
Commited by mistake
This reverts commit e930e3b3aa.
2012-08-15 02:46:16 +09:00
Javier Jardón
e930e3b3aa Use upstream gettext instead the glib one 2012-08-15 01:41:11 +09:00
Colin Walters
ddfcfa66ae build: Switch back to using AS_IF for conditionals
See https://bugzilla.gnome.org/show_bug.cgi?id=674483

https://bugzilla.gnome.org/show_bug.cgi?id=681413
2012-08-08 10:37:39 -04:00
Ryan Lortie
69dd29296e bump version 2012-08-06 16:20:36 -04:00
Ryan Lortie
6b43310ef4 GLib 2.33.8 2012-08-06 15:56:26 -04:00
Matthias Clasen
cc80ae321f Solaris build fix for GIO
Solaris/OpenSolaris/OpenIndiana define FIONREAD in sys/filio.h.
This commit adds a configure check for this header, and includes
it conditionally in gio/gsocket.c.

Patch by Fabian Groffen, bug 675524.
2012-08-06 11:55:59 -04:00
Matthias Clasen
0b8662635d configure.ac: Use AS_HELP_STRING throughout
https://bugzilla.gnome.org/show_bug.cgi?id=680831
2012-08-06 08:52:58 -04:00
Javier Jardón
0f6a092cc5 Make gtk-doc not a hard dependency of GLib
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=674314
2012-08-05 22:29:28 +09:00
Matthias Clasen
9f9ab64030 Rework the man page configury
Default to generate man pages if the required tools and
stylesheets are found. Error out if --enable-man is given
but tools or stylesheets are missing.
2012-08-03 23:36:45 -04:00
Matthias Clasen
0e37822e10 Bump version 2012-07-17 14:23:08 -04:00
Matthias Clasen
e97a4c7e5e 2.33.6
https://bugzilla.gnome.org/show_bug.cgi?id=680111
2012-07-17 13:47:26 -04:00
Matthias Clasen
11819933e2 Bump version 2012-07-16 06:01:55 -04:00
Christian Persch
938c28b36b regex: Require PCRE 8.13
Bump the required version for external PCRE to 8.13, to fix the build
with external PCRE.
2012-07-02 18:02:15 +02:00
Ryan Lortie
03f2f3b002 *bump* 2012-06-25 16:55:31 -04:00
Ryan Lortie
a5ed95c9ad GLib 2.33.3 2012-06-25 16:29:53 -04:00
Martin Jansa
9e1d4da14d configure: Add --disable-libelf option
See http://git.openembedded.org/openembedded-core/tree/meta/recipes-core/glib-2.0/glib-2.0/nolibelf.patch?id=1f73485a143f0aa6cd87636f3d36a7d1dfc40a3b

Signed-off-by: Colin Walters <walters@verbum.org>
2012-06-06 21:55:07 -04:00
Daniel Macks
f3ff037bd1 Pass -framework sub-flag without embedded whitespace
The "-framework" linker flag takes a second word as a parameter. If
they are passed separated with whitespace, some flag-handling routines
may not know to keep the two words together as a single unit. Use
-Wl,, to pass multiple words without embedded whitespace.

https://bugzilla.gnome.org/show_bug.cgi?id=566994
2012-06-05 21:26:58 -04:00
Daniel Macks
4690d85607 configure: Require libelf 0.8.12
Older versions don't have the required API.

(Commit message written by Colin Walters <walters@verbum.org>)

https://bugzilla.gnome.org/show_bug.cgi?id=673253
2012-06-05 14:16:27 -04:00
Ryan Lortie
bdf1660e28 GLib 2.33.2 2012-06-04 13:17:47 -04:00
Matthias Clasen
431d3adacd Improve libelf configure check
system libelf is not sufficient for glib (lacks elf_getshdrstrndx and
elf_getshdrnum) so let's make sure we don't define HAVE_LIBELF
2012-05-17 00:41:52 -04:00
Michael Olbrich
a365684bf0 configure.ac: more AS_IF
It looks like JH_CHECK_XML_CATALOG has some prerequisite as well

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>

https://bugzilla.gnome.org/show_bug.cgi?id=674483
2012-05-07 17:18:06 -04:00
Colin Walters
54e31ab4f1 configure: Use AS_IF almost everywhere
Not doing so is an evil trap, sadly.  This patch has been
compile-checked on Fedora 16, and I've verified that the generated
config.status and config.h is exactly the same.

https://bugzilla.gnome.org/show_bug.cgi?id=674483
2012-05-07 17:18:04 -04:00
Michael Olbrich
e30823d93f configure.ac: use AS_IF
This way any prerequisites for e.g. AC_CHECK_HEADER are always executed
before the 'if'.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>

https://bugzilla.gnome.org/show_bug.cgi?id=674483
2012-05-07 17:18:03 -04:00
Michael Biebl
8db824e00b configure: Reset LIBS after ELF check
If action-if-found is not specified, AC_CHECK_LIB will append the library
to LIBS. As we don't want to link everything against libelf, reset LIBS
after doing the checks.
2012-05-01 19:57:44 +02:00
Michael Olbrich
56bcba11dd make sure configure fails if AC_CHECK_ALIGNOF cannot detect the alignment
When cross-compiling with gcc >= 4.5 AC_CHECK_ALIGNOF fails to detect the
correct alignment. Without a previous AC_CHECK_TYPE for the same type, the
alignment is silently set to '0'.
This makes sure that configure fails and reports the problem.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>

https://bugzilla.gnome.org/show_bug.cgi?id=674483
2012-04-25 09:36:29 -04:00
Matthias Clasen
bf8a4ed099 Bump version to 2.33.1
This avoids triggering the 'too new' warning from 2.34 API.
2012-04-19 17:14:25 -04:00
Alexander Larsson
21e049b253 Tests: Move dbus specific tests to if HAVE_DBUS_DAEMON
These used to only be built on unix, but if you have dbus-daemon on
win32 we should really build them there too.
2012-04-19 18:19:10 +02:00
Alexandre Rostovtsev
b3f814883f Do not detect GNUstep as Cocoa
GNUstep also installs Foundation/Foundation.h

https://bugzilla.gnome.org/show_bug.cgi?id=674172

Signed-off-by: William Hua <william@attente.ca>
2012-04-18 00:00:29 -04:00
William Hua
a147004b83 Use Cocoa header for Cocoa test instead of Foundation. 2012-04-17 23:49:47 -04:00
Rafał Mużyło
6d19f11c89 configure: Fix typo in ELF check
Signed-off-by: Colin Walters <walters@verbum.org>
2012-04-15 11:17:28 -04:00
Colin Walters
4b98c512df build: When cross compiling, don't require host binaries if tests are not enabled
These binaries are now only used by the test suite.  glib-genmarshal
*used* to be required to generate marshallers, but isn't anymore now
that we use libffi (via g_cclosure_marshal_generic).

https://bugzilla.gnome.org/show_bug.cgi?id=667806
2012-04-15 11:15:54 -04:00
Colin Walters
f084b60377 build: Add --disable-modular-tests build option
This patch solves two problems:

First, it allows builders to optionally cut the circular dependency
between dbus and glib by disabling the modular tests (just like how
the tests can be disabled in dbus).

Second, the tests are entirely pointless to build if cross-compiling.

It also moves us slightly closer to the long term future we want where
the tests are a separate ./configure invocation and run against the
INSTALLED glib, not the one in the source tree. This would allow us to
run the tests constantly, not just when glib is built.

https://bugzilla.gnome.org/show_bug.cgi?id=667806
2012-04-15 11:15:54 -04:00
Matthias Clasen
55bbb9fc69 Bump version 2012-04-13 19:54:42 -04:00
William Hua
69d929e67f Be more precise about Carbon v. Cocoa. 2012-04-11 23:25:09 -04:00
Rodrigo Moya
9aa19e1d96 Use 'if test' for checking auto* variables' values 2012-04-04 11:55:40 +02:00
Rodrigo Moya
118c42e747 Always include G_SOCKET_FAMILY_UNIX value in GSocketFamily
This is needed because glib-mkenums doesn't handle #ifdef values in
enums, and so it needs to have all values always defined in the enum.
When not available, define the missing values to a negative value.
2012-04-04 11:39:03 +02:00
Matthias Clasen
27d95bd81f Rework the libelf configure checks one more time
It seems that there is quite a bit of variation out there, in
terms of libelf versions and API. Make the checks more thorough,
by not only checking for elf_begin, but also some of the shdr function
that we need. Also, explicitly check for libelf.h.

This should address bug 673132 and 673253.
2012-04-02 09:09:11 -04:00
Antoine Jacoutot
1494544958 gresource: libelf, try pkg-config first then fall-back to AC_CHECK_LIB
On some systems gelf.h may not be stored under the top level include
directory in which case we need to add the correct include paths in
cflags by using pkg-config(1).
2012-03-31 20:22:51 +02:00