From fcc482c696d7b41aa333d98e1d1b701524bd55759420e8cbf7d2a282d329cc6a Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Fri, 27 May 2011 08:40:53 +0000 Subject: [PATCH 1/7] Accepting request 71625 from home:dimstar:branches:Base:System ok.. that one works too OBS-URL: https://build.opensuse.org/request/show/71625 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gobject-introspection?expand=0&rev=47 --- gi-find-deps.sh | 2 +- gobject-introspection.attr | 3 +++ gobject-introspection.changes | 8 ++++++++ gobject-introspection.spec | 7 +++++-- 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 gobject-introspection.attr diff --git a/gi-find-deps.sh b/gi-find-deps.sh index c5470f6..dd97bcd 100644 --- a/gi-find-deps.sh +++ b/gi-find-deps.sh @@ -28,7 +28,7 @@ fi function find_provides { while read file; do case $file in - /usr/lib[^/]*/girepository-1.0/*.typelib) + *.typelib) split_name_version $(basename $file | sed 's,.typelib$,,') print_req_prov ;; diff --git a/gobject-introspection.attr b/gobject-introspection.attr new file mode 100644 index 0000000..d438654 --- /dev/null +++ b/gobject-introspection.attr @@ -0,0 +1,3 @@ +%__gobjectintrospection_provides %{_rpmconfigdir}/gi-find-deps.sh -P +%__gobjectintrospection_requires %{_rpmconfigdir}/gi-find-deps.sh -R +%__gobjectintrospection_path ^(%{_libdir}/girepository-1\.0/.*\.typelib)|(.*\.py)|(.*\.js)$ diff --git a/gobject-introspection.changes b/gobject-introspection.changes index 0576358..f8aaedd 100644 --- a/gobject-introspection.changes +++ b/gobject-introspection.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue May 17 09:06:56 UTC 2011 - dimstar@opensuse.org + +- Add gobject-introspection.attr: install rpm reqprov plugin + handler. +- Move the rpm helpers (gi-find-deps.sh and gobject.attr) to the + main package. + ------------------------------------------------------------------- Wed Apr 27 09:16:02 UTC 2011 - dimstar@opensuse.org diff --git a/gobject-introspection.spec b/gobject-introspection.spec index 466f69a..b04aa58 100644 --- a/gobject-introspection.spec +++ b/gobject-introspection.spec @@ -28,6 +28,7 @@ Group: Development/Libraries/GNOME Source0: %{name}-%{version}.tar.bz2 # gi-find-deps.sh is a rpm helper for Provides and Requires. Script creates typelib()-style Provides/Requires. Source1: gi-find-deps.sh +Source2: gobject-introspection.attr Source99: %{name}-rpmlintrc BuildRequires: bison BuildRequires: fdupes @@ -88,7 +89,8 @@ a uniform, machine readable format. %install %makeinstall find %{buildroot} -type f -name "*.la" -delete -print -install -D %{S:1} %{buildroot}%{_prefix}/lib/rpm/gi-find-deps.sh +install -D %{S:1} %{buildroot}%{_rpmconfigdir}/gi-find-deps.sh +install -D %{S:2} -m 0644 %{buildroot}%{_rpmconfigdir}/fileattrs/gobjectintrospection.attr %fdupes %{buildroot} %clean @@ -121,6 +123,8 @@ rm -rf %{buildroot} %{_datadir}/gobject-introspection-1.0/Makefile.introspection %{_datadir}/gobject-introspection-1.0/tests/ %{_datadir}/gobject-introspection-1.0/gdump.c +%{_rpmconfigdir}/gi-find-deps.sh +%{_rpmconfigdir}/fileattrs/gobjectintrospection.attr %files -n libgirepository-1_0-1 %defattr(-,root,root) @@ -139,6 +143,5 @@ rm -rf %{buildroot} # FIXME: those two files should be moved to the main package when bgo#629930 gets fixed %{_libdir}/pkgconfig/gobject-introspection-1.0.pc %{_libdir}/pkgconfig/gobject-introspection-no-export-1.0.pc -%{_prefix}/lib/rpm/gi-find-deps.sh %changelog From 1f1d2717b3247e5ce11a56c2590bdcb26bb7806a69b791028e3cd0b85dd6e8de Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Fri, 27 May 2011 08:44:43 +0000 Subject: [PATCH 2/7] Accepting request 71631 from home:vuntz:branches:GNOME:Factory tweak OBS-URL: https://build.opensuse.org/request/show/71631 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gobject-introspection?expand=0&rev=48 --- gobject-introspection.changes | 10 ++++++---- gobject-introspection.spec | 2 +- ...ect-introspection.attr => gobjectintrospection.attr | 0 3 files changed, 7 insertions(+), 5 deletions(-) rename gobject-introspection.attr => gobjectintrospection.attr (100%) diff --git a/gobject-introspection.changes b/gobject-introspection.changes index f8aaedd..fd662d8 100644 --- a/gobject-introspection.changes +++ b/gobject-introspection.changes @@ -1,10 +1,12 @@ ------------------------------------------------------------------- Tue May 17 09:06:56 UTC 2011 - dimstar@opensuse.org -- Add gobject-introspection.attr: install rpm reqprov plugin - handler. -- Move the rpm helpers (gi-find-deps.sh and gobject.attr) to the - main package. +- Add gobjectintrospection.attr: install rpm reqprov plugin + handler, benefitting from the new rpm 4.9 infrastructure. +- Move the rpm helpers to the main package: this is really what is + used to build with gobject-introspection, while the devel + subpackage is mostly needed if building against + libgirepository-1.0. ------------------------------------------------------------------- Wed Apr 27 09:16:02 UTC 2011 - dimstar@opensuse.org diff --git a/gobject-introspection.spec b/gobject-introspection.spec index b04aa58..931541d 100644 --- a/gobject-introspection.spec +++ b/gobject-introspection.spec @@ -28,7 +28,7 @@ Group: Development/Libraries/GNOME Source0: %{name}-%{version}.tar.bz2 # gi-find-deps.sh is a rpm helper for Provides and Requires. Script creates typelib()-style Provides/Requires. Source1: gi-find-deps.sh -Source2: gobject-introspection.attr +Source2: gobjectintrospection.attr Source99: %{name}-rpmlintrc BuildRequires: bison BuildRequires: fdupes diff --git a/gobject-introspection.attr b/gobjectintrospection.attr similarity index 100% rename from gobject-introspection.attr rename to gobjectintrospection.attr From e257168b83ef8dc4cf05f92e23c03189b8289ad8dc84f3a390b80adc2abae6db Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Fri, 27 May 2011 10:41:06 +0000 Subject: [PATCH 3/7] Accepting request 71662 from home:dimstar:branches:Base:System A little bit more advanced check to get typelib() style provides here too... checking during install if the template list matches OBS-URL: https://build.opensuse.org/request/show/71662 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gobject-introspection?expand=0&rev=49 --- gobject-introspection-typlib.template | 16 ++++++++++++++++ gobject-introspection.changes | 7 +++++++ gobject-introspection.spec | 9 ++++++++- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 gobject-introspection-typlib.template diff --git a/gobject-introspection-typlib.template b/gobject-introspection-typlib.template new file mode 100644 index 0000000..16c9f41 --- /dev/null +++ b/gobject-introspection-typlib.template @@ -0,0 +1,16 @@ +typelib(DBus) = 1.0 +typelib(DBusGLib) = 1.0 +typelib(GIRepository) = 2.0 +typelib(GL) = 1.0 +typelib(GLib) = 2.0 +typelib(GModule) = 2.0 +typelib(GObject) = 2.0 +typelib(Gio) = 2.0 +typelib(cairo) = 1.0 +typelib(fontconfig) = 2.0 +typelib(freetype2) = 2.0 +typelib(libxml2) = 2.0 +typelib(xfixes) = 4.0 +typelib(xft) = 2.0 +typelib(xlib) = 2.0 +typelib(xrandr) = 1.3 diff --git a/gobject-introspection.changes b/gobject-introspection.changes index fd662d8..0872895 100644 --- a/gobject-introspection.changes +++ b/gobject-introspection.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri May 27 10:07:14 UTC 2011 - dimstar@opensuse.org + +- Manually provide the typelib() symbols for libgirepository-1_0-1. + The rpm magic is not yet in place and can thus not automatically + detect the symbols. + ------------------------------------------------------------------- Tue May 17 09:06:56 UTC 2011 - dimstar@opensuse.org diff --git a/gobject-introspection.spec b/gobject-introspection.spec index 931541d..582c1c7 100644 --- a/gobject-introspection.spec +++ b/gobject-introspection.spec @@ -29,6 +29,7 @@ Source0: %{name}-%{version}.tar.bz2 # gi-find-deps.sh is a rpm helper for Provides and Requires. Script creates typelib()-style Provides/Requires. Source1: gi-find-deps.sh Source2: gobjectintrospection.attr +Source3: gobject-introspection-typlib.template Source99: %{name}-rpmlintrc BuildRequires: bison BuildRequires: fdupes @@ -54,6 +55,9 @@ a uniform, machine readable format. License: LGPLv2.1+ Summary: GObject Introspection Library Group: Development/Libraries/GNOME +# Provide typelib() symbols based on gobject-introspection-typlib.template +# The template is checked during install if it matches the installed *.typelib files. +%(cat %{S:3} | awk '{ print "Provides: " $1}') %description -n libgirepository-1_0-1 The goal of the project is to describe the APIs and collect them in @@ -84,13 +88,16 @@ a uniform, machine readable format. --enable-gtk-doc \ %endif --disable-static -%__make %{?jobs:-j%jobs} V=1 +%__make %{?_smp_mflags} V=1 %install %makeinstall find %{buildroot} -type f -name "*.la" -delete -print install -D %{S:1} %{buildroot}%{_rpmconfigdir}/gi-find-deps.sh install -D %{S:2} -m 0644 %{buildroot}%{_rpmconfigdir}/fileattrs/gobjectintrospection.attr +# comparing, if we provide all the symbols expected. +ls %{buildroot}%{_libdir}/girepository-1.0/*.typelib | sh %{S:1} -P > gobject-introspection-typelib.installed +diff -s %{S:3} gobject-introspection-typelib.installed %fdupes %{buildroot} %clean From 46b25b8db537ed3d3037a57cdaaee6bab2e7d17dc4c46a59fc9ef7ad4bcb8450 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Tue, 31 May 2011 08:01:33 +0000 Subject: [PATCH 4/7] Accepting request 71895 from home:dimstar:branches:Base:System More gi-scan-fixes... now also fix totem-plugins requiring weird stuff OBS-URL: https://build.opensuse.org/request/show/71895 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gobject-introspection?expand=0&rev=50 --- gi-find-deps.sh | 11 +++++++---- ...mplate => gobject-introspection-typelib.template | 0 gobject-introspection.changes | 13 +++++++++++++ gobject-introspection.spec | 6 +++--- 4 files changed, 23 insertions(+), 7 deletions(-) rename gobject-introspection-typlib.template => gobject-introspection-typelib.template (100%) diff --git a/gi-find-deps.sh b/gi-find-deps.sh index dd97bcd..f6e308e 100644 --- a/gi-find-deps.sh +++ b/gi-find-deps.sh @@ -8,10 +8,13 @@ function split_name_version { base=$1 -symbol=${base%-*} +tsymbol=${base%-*} +# Sometimes we get a Requires on Gdk.Settings.foo, bebause you can directly use imports.gi.Gdk.Settings.Foo in Javascript. +# We know that the symbol in this case is call Gdk, so we cut everything after the . away. +symbol=$(echo $tsymbol | awk -F. '{print $1}') version=${base#*-} # In case there is no '-' in the filename, then the split above 'fails' and version == symbol (thus: no version specified) -if [ "$symbol" = "$version" ]; then +if [ "$tsymbol" = "$version" ]; then unset version fi } @@ -56,13 +59,13 @@ function find_requires { while read file; do case $file in *.js) - for module in $(grep -h -P -o "imports.gi.([^\s;]+)" $file | grep -v "imports.gi.version" | sed 's,imports.gi.,,'); do + for module in $(grep -h -P -o "imports.gi.([^\s'\";]+)" $file | grep -v "imports.gi.version" | sed 's,imports.gi.,,'); do split_name_version $module print_req_prov done ;; *.py) - for module in $(grep -h -P "from gi.repository import (\w+)" $file | sed -e 's,from gi.repository import,,' -r -e 's:\s+as\s+\w+::g' -e 's:,::g'); do + for module in $(grep -h -P "from gi.repository import (\w+)" $file | sed 's:#.*::' | sed -e 's,from gi.repository import,,' -r -e 's:\s+as\s+\w+::g' -e 's:,::g'); do split_name_version $module print_req_prov done diff --git a/gobject-introspection-typlib.template b/gobject-introspection-typelib.template similarity index 100% rename from gobject-introspection-typlib.template rename to gobject-introspection-typelib.template diff --git a/gobject-introspection.changes b/gobject-introspection.changes index 0872895..357f331 100644 --- a/gobject-introspection.changes +++ b/gobject-introspection.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Sat May 28 15:41:02 UTC 2011 - dimstar@opensuse.org + +- Minor fixes on gi-find-deps.sh: + + quotes are not allowed symbols in an import name. Fixes for + example gnome-shell Requiring typelib('). + + The typelib Symbol is not supposed to contain a dot [.]. Should + we find a Requires / Provides that does, then we know we were + cought in some code using it direcly as an object. The Typelib + symbol in this case is the first token before the first dot. + + Ignore anything after # in python parsing (it's a comment). +- Provide the template based typelib() versioned. + ------------------------------------------------------------------- Fri May 27 10:07:14 UTC 2011 - dimstar@opensuse.org diff --git a/gobject-introspection.spec b/gobject-introspection.spec index 582c1c7..0bf4a65 100644 --- a/gobject-introspection.spec +++ b/gobject-introspection.spec @@ -29,7 +29,7 @@ Source0: %{name}-%{version}.tar.bz2 # gi-find-deps.sh is a rpm helper for Provides and Requires. Script creates typelib()-style Provides/Requires. Source1: gi-find-deps.sh Source2: gobjectintrospection.attr -Source3: gobject-introspection-typlib.template +Source3: gobject-introspection-typelib.template Source99: %{name}-rpmlintrc BuildRequires: bison BuildRequires: fdupes @@ -55,9 +55,9 @@ a uniform, machine readable format. License: LGPLv2.1+ Summary: GObject Introspection Library Group: Development/Libraries/GNOME -# Provide typelib() symbols based on gobject-introspection-typlib.template +# Provide typelib() symbols based on gobject-introspection-typelib.template # The template is checked during install if it matches the installed *.typelib files. -%(cat %{S:3} | awk '{ print "Provides: " $1}') +%(cat %{S:3} | awk '{ print "Provides: " $0}') %description -n libgirepository-1_0-1 The goal of the project is to describe the APIs and collect them in From a0d5b9f79cd01d399b9604f9b61c0f21ae87bf0dc126801b38e2f2dbd07f0281 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Tue, 31 May 2011 08:02:37 +0000 Subject: [PATCH 5/7] Accepting request 72223 from home:vuntz:branches:GNOME:Factory typos OBS-URL: https://build.opensuse.org/request/show/72223 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gobject-introspection?expand=0&rev=51 --- gobject-introspection.changes | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gobject-introspection.changes b/gobject-introspection.changes index 357f331..3bcf8fc 100644 --- a/gobject-introspection.changes +++ b/gobject-introspection.changes @@ -2,14 +2,14 @@ Sat May 28 15:41:02 UTC 2011 - dimstar@opensuse.org - Minor fixes on gi-find-deps.sh: - + quotes are not allowed symbols in an import name. Fixes for + + Quotes are not allowed symbols in an import name. Fixes for example gnome-shell Requiring typelib('). - + The typelib Symbol is not supposed to contain a dot [.]. Should + + The typelib symbol is not supposed to contain a dot [.]. Should we find a Requires / Provides that does, then we know we were - cought in some code using it direcly as an object. The Typelib + caught in some code using it direcly as an object. The typelib symbol in this case is the first token before the first dot. + Ignore anything after # in python parsing (it's a comment). -- Provide the template based typelib() versioned. +- Provide the template-based typelib() versioned. ------------------------------------------------------------------- Fri May 27 10:07:14 UTC 2011 - dimstar@opensuse.org From 0ef404a1e8654e33d8a78637b2574d017d73c47865b8f9745c74b815926f46ff Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Wed, 1 Jun 2011 08:22:11 +0000 Subject: [PATCH 6/7] Accepting request 72323 from home:dimstar:branches:Base:System All typelib's are good in libdir OBS-URL: https://build.opensuse.org/request/show/72323 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gobject-introspection?expand=0&rev=52 --- gobjectintrospection.attr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gobjectintrospection.attr b/gobjectintrospection.attr index d438654..fbc73c8 100644 --- a/gobjectintrospection.attr +++ b/gobjectintrospection.attr @@ -1,3 +1,3 @@ %__gobjectintrospection_provides %{_rpmconfigdir}/gi-find-deps.sh -P %__gobjectintrospection_requires %{_rpmconfigdir}/gi-find-deps.sh -R -%__gobjectintrospection_path ^(%{_libdir}/girepository-1\.0/.*\.typelib)|(.*\.py)|(.*\.js)$ +%__gobjectintrospection_path ^(%{_libdir}/.*\.typelib)|(.*\.py)|(.*\.js)$ From a7ab51a7208fcad27ae53105ffa84f98ecec213a000205f441272ee9ebd8c15c Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 3 Jun 2011 13:10:13 +0000 Subject: [PATCH 7/7] Accepting request 72628 from home:dimstar:branches:GNOME:Factory Only provide the typelib() symbol... do not yet require any OBS-URL: https://build.opensuse.org/request/show/72628 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gobject-introspection?expand=0&rev=53 --- gobject-introspection.changes | 6 ++++++ gobjectintrospection.attr | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gobject-introspection.changes b/gobject-introspection.changes index 3bcf8fc..2649c88 100644 --- a/gobject-introspection.changes +++ b/gobject-introspection.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 3 13:02:55 UTC 2011 - dimstar@opensuse.org + +- Currently only add typelib() Provides symbol to make sure we do + not break entire Factory. + ------------------------------------------------------------------- Sat May 28 15:41:02 UTC 2011 - dimstar@opensuse.org diff --git a/gobjectintrospection.attr b/gobjectintrospection.attr index fbc73c8..3f3496d 100644 --- a/gobjectintrospection.attr +++ b/gobjectintrospection.attr @@ -1,3 +1,2 @@ %__gobjectintrospection_provides %{_rpmconfigdir}/gi-find-deps.sh -P -%__gobjectintrospection_requires %{_rpmconfigdir}/gi-find-deps.sh -R %__gobjectintrospection_path ^(%{_libdir}/.*\.typelib)|(.*\.py)|(.*\.js)$