diff --git a/baselibs.conf b/baselibs.conf index 003dd7d..ca7116e 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,4 +1,5 @@ -glib2 +glib2-tools + +/usr/bin/gio-querymodules(-64)? libglib-2_0-0 obsoletes "glib2- <= " provides "glib2- = " @@ -6,6 +7,9 @@ libgmodule-2_0-0 libgio-2_0-0 libgthread-2_0-0 libgobject-2_0-0 +libgio-fam + post "%{_bindir}/gio-querymodules %{_libdir}/gio/modules" + postun "%{_bindir}/gio-querymodules %{_libdir}/gio/modules" arch ppc package glib2-devel arch sparcv9 package glib2-devel diff --git a/glib2.changes b/glib2.changes index feb141a..5e6ec12 100644 --- a/glib2.changes +++ b/glib2.changes @@ -1,12 +1,55 @@ +------------------------------------------------------------------- +Thu Jul 22 14:30:12 CEST 2010 - vuntz@opensuse.org + +- Add rpm macros to ease installation of external gio modules and + of gsettings schemas. +- Rename the main package to glib2-tools since it's really what it + contains. Instead, make libglib-2_0-0 provides/obsoletes glib2. +- Make the devel package Requires glib2-tools, since users of the + new rpm macros will need the tools during the build. +- Also do not move the post/postun scriptlets of previous glib2 to + glib2-tools: gio-querymodules needs to be called by packages + installing a module, not by the package containing + gio-querymodules. +- Move glib-compile-schemas from devel package to glib2-tools. +- Add %{_datadir}/glib-2.0/schemas/gschemas.compiled ghost file to + libgio-2_0-0: this is where gsettings schemas will be compiled. +- Add glib2-tools Recommends to libgio-2_0-0, since those tools are + useful when libgio is installed. + +------------------------------------------------------------------- +Wed Jul 21 11:22:58 CEST 2010 - vuntz@opensuse.org + +- Change pcre-devel BuildRequires to pkgconfig(libpcre). +- Remove checks for old versions of openSUSE (11.0). +- Remove conflicts with gnome-vfs2 < 2.22.0 which is not needed + since openSUSE 11.0. +- Remove workaround that was settings the +x permission on + gtester-report. +- Add systemtap support: add systemtap-sdt-devel BuildRequires, + pass --enable-systemtap to configure and add workaround for + misinstalled tapsets. We also temporary need a python + BuildRequires because of a missing dependency for + systemtap-sdt-devel. +- Use %{?_smp_mflags} instead of %{?jobs:-j%jobs}. + ------------------------------------------------------------------- Wed Jul 14 10:13:33 UTC 2010 - dimstar@opensuse.org - Update to version 2.25.11: - + this release sees the complete removal of the old 'g*alias' - hacks - + use proper feature test macros for isnan - + use pkg-config to check for zlib - + Many more changes since last stable release, please see NEWS + + Many changes since 2.24.1. See NEWS for the full list of + changes, the list below is only highlights. + + Add GSettings API. + + Add a predefined boxed type for GError. + + Add support for timeouts in GSocket. + + Add GDBus API. + + GVariant now requires strings to be UTF-8. + + Initial support for dtrace and systemtap profiling. + + Add GPermission interface. + + Add GApplication API. + + Add GBinding API. + + Deprecate GRelation and GCompletion. + + Updated translations. ------------------------------------------------------------------- Thu Jun 3 19:11:32 CEST 2010 - vuntz@opensuse.org diff --git a/glib2.spec b/glib2.spec index a27b561..be9f665 100644 --- a/glib2.spec +++ b/glib2.spec @@ -21,6 +21,9 @@ Name: glib2 %define _name glib Version: 2.25.11 +# FIXME: change zlib-devel to pkgconfig(zlib) once we have a recent enough version of zlib +# FIXME: remove python BuildRequires once sr#43603 is accepted +# FIXME: find out if tapsets should really be in devel package or in main package Release: 1 License: LGPLv2.1+ Summary: A Library with Convenient Functions Written in C @@ -32,9 +35,10 @@ Source2: glib2.csh Source3: SuSEconfig.glib2 # Not upsteam file. Only proposes upstream packages: Source4: glib2-upstream-gnome_defaults.conf +Source5: macros.glib2 # Not depending on gtk-doc shortens bootstrap compilation path. # Please update this file from the latest gtk-doc package: -Source5: gtk-doc.m4 +Source6: gtk-doc.m4 Source99: baselibs.conf # PATCH-FIX-OPENSUSE glib2-bnc379332-desktop-su.patch bnc379332 vuntz@novell.com -- Use X-KDE-SubstituteUID Patch8: glib2-bnc379332-desktop-su.patch @@ -45,33 +49,32 @@ Patch11: glib2-fate300461-gettext-gkeyfile-suse.patch BuildRequires: fam-devel BuildRequires: fdupes BuildRequires: gcc-c++ -BuildRequires: pcre-devel +BuildRequires: libselinux-devel BuildRequires: pkg-config +# Only needed because of missing deps in systemtap-sdt-devel, see sr#43603 +BuildRequires: python +BuildRequires: systemtap-sdt-devel BuildRequires: translation-update-upstream BuildRequires: zlib-devel -%if %suse_version > 1100 -BuildRequires: libselinux-devel -%endif +BuildRequires: pkgconfig(libpcre) # For temporary %%posttrans script only. PreReq: coreutils PreReq: /bin/sed -Requires: %{name}-branding -Requires: %{name}-lang = %{version} -# Conflicts with gnome_defaults.conf from gnome-vfs2 in 10.3 -Conflicts: gnome-vfs2 < 2.22.0 -# bug437293 -%ifarch ppc64 -Obsoletes: glib2-64bit -%endif -# -Provides: glib2-doc = 2.19.6 -Obsoletes: glib2-doc < 2.19.6 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This library provides convenient functions, such as lists and hashes, to a C programmer and is used by Gtk+ and GNOME. +%package tools +License: LGPLv2.1+ +Summary: A Library with Convenient Functions Written in C -- Tools +Group: Development/Libraries/C and C++ + +%description tools +This library provides convenient functions, such as lists and hashes, +to a C programmer and is used by Gtk+ and GNOME. + %package branding-upstream License: LGPLv2.1+ Summary: Definition of GNOME Default Applications @@ -99,11 +102,14 @@ distribution wise GNOME defaults. License: GPLv2+ Requires: %{name} = %{version} pkg-config glibc-devel # Now require the subpackages too +Requires: glib2-tools = %{version} Requires: libglib-2_0-0 = %{version} Requires: libgmodule-2_0-0 = %{version} Requires: libgio-2_0-0 = %{version} Requires: libgthread-2_0-0 = %{version} Requires: libgobject-2_0-0 = %{version} +Provides: glib2-doc = 2.19.6 +Obsoletes: glib2-doc < 2.19.6 Summary: Include files and libraries mandatory for development Group: Development/Libraries/C and C++ # bug437293 @@ -124,7 +130,10 @@ hashes, to a C programmer and is used by Gtk+ and GNOME. License: LGPLv2.1+ Summary: A Library with Convenient Functions Written in C Group: Development/Libraries/C and C++ +Requires: %{name}-branding = %{version} Recommends: %{name}-lang = %{version} +Provides: %{name} = %{version} +Obsoletes: %{name} < %{version} # bug437293 %ifarch ppc64 Obsoletes: glib2-64bit @@ -153,6 +162,8 @@ to a C programmer and is used by Gtk+ and GNOME. License: LGPLv2.1+ Summary: A Library with Convenient Functions Written in C Group: Development/Libraries/C and C++ +# The tools are useful for people having libgio +Recommends: %{name}-tools # bug437293 %ifarch ppc64 Obsoletes: glib2-64bit @@ -170,8 +181,8 @@ License: LGPLv2.1+ Summary: A Library with Convenient Functions Written in C Group: Development/Libraries/C and C++ # we need gio-querymodules in %post/%postun -Requires(post): %{name} -Requires(postun): %{name} +Requires(post): %{name}-tools +Requires(postun): %{name}-tools Supplements: packageand(libgio-2_0-0:fam) %description -n libgio-fam @@ -182,7 +193,6 @@ to a C programmer and is used by Gtk+ and GNOME. License: LGPLv2.1+ Summary: A Library with Convenient Functions Written in C Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} # bug437293 %ifarch ppc64 Obsoletes: glib2-64bit @@ -217,17 +227,16 @@ translation-update-upstream cp -a %{S:1} %{S:2} %{S:3} . cp -a %{S:4} gnome_defaults.conf if ! test -f %{_datadir}/aclocal/gtk-doc.m4 ; then - cp -a %{S:5} m4macros/ + cp -a %{S:6} m4macros/ fi %build %configure \ --enable-static \ -%if %suse_version > 1100 --enable-selinux \ -%endif - --with-pcre=system -%{__make} %{?jobs:-j%jobs} + --with-pcre=system \ + --enable-systemtap +%{__make} %{?_smp_mflags} %check # make check does not work on x86_64. See http://bugzilla.gnome.org/show_bug.cgi?id=554969 @@ -238,6 +247,7 @@ fi %if 0%{?suse_version} <= 1120 %{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/* %endif +%find_lang %{_name}20 mkdir -p $RPM_BUILD_ROOT/etc/profile.d install -D -m0644 glib2.sh $RPM_BUILD_ROOT/etc/profile.d/zzz-glib2.sh install -D -m0644 glib2.csh $RPM_BUILD_ROOT/etc/profile.d/zzz-glib2.csh @@ -247,20 +257,21 @@ install -D -m0644 gnome_defaults.conf $RPM_BUILD_ROOT%{_sysconfdir}/gnome_defaul mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/gio-2.0 $RPM_BUILD_ROOT%{_datadir}/applications touch $RPM_BUILD_ROOT%{_localstatedir}/cache/gio-2.0/defaults.list ln -s %{_localstatedir}/cache/gio-2.0/defaults.list $RPM_BUILD_ROOT%{_datadir}/applications/defaults.list -# fix some permission issue, but only if needed -test ! -x $RPM_BUILD_ROOT/%{_bindir}/gtester-report && chmod +x $RPM_BUILD_ROOT/%{_bindir}/gtester-report # gio-querymodules magic %if "%{_lib}" == "lib64" mv $RPM_BUILD_ROOT%{_bindir}/gio-querymodules $RPM_BUILD_ROOT%{_bindir}/gio-querymodules-64 %endif touch $RPM_BUILD_ROOT%{_libdir}/gio/modules/giomodule.cache +# gsettings magic +touch $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas/gschemas.compiled # remove files we don't care about rm $RPM_BUILD_ROOT%{_libdir}/gio/modules/libgiofam.*a -# We do not need the la files for 11.1 and newer -%if %suse_version > 1100 rm $RPM_BUILD_ROOT%{_libdir}/*.la -%endif -%find_lang %{_name}20 +# fix installation of systemtap files +mv %{buildroot}%{buildroot}%{_datadir}/systemtap %{buildroot}%{_datadir}/systemtap +# Install rpm macros +mkdir -p %{buildroot}%{_sysconfdir}/rpm +cp %{S:5} %{buildroot}%{_sysconfdir}/rpm %fdupes $RPM_BUILD_ROOT %posttrans @@ -277,13 +288,6 @@ if test -f etc/gnome_defaults.conf.rpmsave ; then mv etc/gnome_defaults.conf.rpmsave etc/gnome_defaults.conf fi -%post -%if "%{_lib}" == "lib64" - %{_bindir}/gio-querymodules-64 %{_libdir}/gio/modules -%else - %{_bindir}/gio-querymodules %{_libdir}/gio/modules -%endif - %post -n libglib-2_0-0 -p /sbin/ldconfig %post -n libgobject-2_0-0 -p /sbin/ldconfig @@ -301,9 +305,6 @@ fi %{_bindir}/gio-querymodules %{_libdir}/gio/modules %endif -# No %postun about gio-querymodules for the main package since the binary is -# part of this package, and so doesn't exist anymore in %postun - %postun -n libglib-2_0-0 -p /sbin/ldconfig %postun -n libgobject-2_0-0 -p /sbin/ldconfig @@ -324,18 +325,22 @@ fi %clean rm -rf $RPM_BUILD_ROOT -%files +%files tools %defattr(-,root,root) -%doc AUTHORS COPYING README NEWS ChangeLog -%{_sysconfdir}/profile.d/zzz-glib2.* %{_sysconfdir}/bash_completion.d/gdbus-bash-completion.sh %{_sysconfdir}/bash_completion.d/gsettings-bash-completion.sh -%{_bindir}/gio-querymodules* %{_bindir}/gdbus +%{_bindir}/gio-querymodules* +%{_bindir}/glib-compile-schemas %{_bindir}/gsettings -%{_datadir}/man/man1/gdbus.1.gz -%{_datadir}/man/man1/gio-querymodules.1.gz -%{_datadir}/man/man1/gsettings.1.gz +%{_mandir}/man1/gdbus.1* +%{_mandir}/man1/gio-querymodules.1* +%{_mandir}/man1/glib-compile-schemas.1* +%{_mandir}/man1/gsettings.1* +# We put those files here, but they don't really belong here. They just don't +# have a better home... The zzz-glib2 scripts could arguably be in +# libglib-2_0-0 but that would break the shared library policy. +%{_sysconfdir}/profile.d/zzz-glib2.* /sbin/conf.d/SuSEconfig.glib2 %files branding-upstream @@ -344,6 +349,7 @@ rm -rf $RPM_BUILD_ROOT %files -n libglib-2_0-0 %defattr(-, root, root) +%doc AUTHORS COPYING README NEWS ChangeLog %{_libdir}/libglib*.so.* %files -n libgmodule-2_0-0 @@ -364,6 +370,9 @@ rm -rf $RPM_BUILD_ROOT %dir %{_libdir}/gio %dir %{_libdir}/gio/modules %ghost %{_libdir}/gio/modules/giomodule.cache +%dir %{_datadir}/glib-2.0/ +%dir %{_datadir}/glib-2.0/schemas/ +%ghost %{_datadir}/glib-2.0/schemas/gschemas.compiled %{_datadir}/applications/defaults.list %dir %{_localstatedir}/cache/gio-2.0 %ghost %{_localstatedir}/cache/gio-2.0/defaults.list @@ -376,24 +385,36 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root) -%{_bindir}/glib-* -%{_bindir}/gobject-* -%{_bindir}/gtester* -%doc %{_mandir}/man?/glib-*.* -%doc %{_mandir}/man?/gobject-*.* -%doc %{_mandir}/man?/gtester*.* +%{_bindir}/glib-genmarshal +%{_bindir}/glib-gettextize +%{_bindir}/glib-mkenums +%{_bindir}/gobject-query +%{_bindir}/gtester +%{_bindir}/gtester-report +%doc %{_mandir}/man?/glib-genmarshal.* +%doc %{_mandir}/man?/glib-gettextize.* +%doc %{_mandir}/man?/glib-mkenums.* +%doc %{_mandir}/man?/gobject-query.* +%doc %{_mandir}/man?/gtester.* +%doc %{_mandir}/man?/gtester-report.* %{_datadir}/aclocal/*.m4 -%{_datadir}/glib-2.0 +%dir %{_datadir}/glib-2.0/ +%{_datadir}/glib-2.0/gdb/ +%{_datadir}/glib-2.0/gettext/ +%{_datadir}/glib-2.0/schemas/gschema.dtd %{_includedir}/glib-2.0 %{_includedir}/gio-unix-2.0 %{_libdir}/lib*.so %{_libdir}/lib*.*a -%{_libdir}/glib-2.0 +%dir %{_libdir}/glib-2.0/ +%{_libdir}/glib-2.0/include/ %{_libdir}/pkgconfig/*.pc %{_datadir}/gtk-doc/html/gio %{_datadir}/gtk-doc/html/glib %{_datadir}/gtk-doc/html/gobject %{_datadir}/gdb/auto-load/%{_libdir}/*-gdb.py +%{_datadir}/systemtap/tapset/*.stp +%{_sysconfdir}/rpm/macros.glib2 # Own these directories to not depend on gtk-doc while building: %dir %{_datadir}/gtk-doc %dir %{_datadir}/gtk-doc/html diff --git a/macros.glib2 b/macros.glib2 new file mode 100644 index 0000000..9f6a24c --- /dev/null +++ b/macros.glib2 @@ -0,0 +1,52 @@ +# RPM macros for packages installing a GSettings schema or GIO module +# +# When a package installs a GSettings schemas, it should use all +# three macros: +# +# - %glib2_gsettings_schema_requires in the preamble +# - %glib2_gsettings_schema_post in %post +# - %glib2_gsettings_schema_postun in %postun +# +# When a package installs a GIO module, it should use all +# three macros: +# +# - %glib2_gio_module_requires in the preamble +# - %glib2_gio_module_post in %post +# - %glib2_gio_module_postun in %postun +# + +%glib2_gsettings_schema_requires \ +Requires(post): glib2-tools \ +Requires(postun): glib2-tools + +%glib2_gsettings_schema_post \ +%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas + +# Note: we ignore upgrades (already handled in %post of the new package). +%glib2_gsettings_schema_postun \ +if [ $1 -eq 0 ]; then \ + %{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas \ +fi + +%glib2_gio_module_requires \ +Requires(post): glib2-tools \ +Requires(postun): glib2-tools + +# On install, update the cache +%glib2_gio_module_post \ +%if "%{_lib}" == "lib64" \ + %{_bindir}/gio-querymodules-64 %{_libdir}/gio/modules \ +%else \ + %{_bindir}/gio-querymodules %{_libdir}/gio/modules \ +%endif + +# On uninstall, update the cache. Note: we ignore upgrades (already +# handled in %post of the new package). +%glib2_gio_module_postun \ +if [ $1 -eq 0 ]; then \ + %if "%_lib" == "lib64" \ + %{_bindir}/gio-querymodules-64 %{_libdir}/gio/modules \ + %else \ + %{_bindir}/gio-querymodules %{_libdir}/gio/modules \ + %endif \ +fi