From abb52331c6d6c9370e8785ddd74f83e02172bd2c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 19 2015 15:49:13 +0000 Subject: import gom-0.2.1-3.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..afd0a7d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/gom-0.2.1.tar.xz diff --git a/.gom.metadata b/.gom.metadata new file mode 100644 index 0000000..41c3313 --- /dev/null +++ b/.gom.metadata @@ -0,0 +1 @@ +27357835540e3ae67451c957bb7b6a98083d52a9 SOURCES/gom-0.2.1.tar.xz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-gom-Fix-converting-pointer-to-GType.patch b/SOURCES/0001-gom-Fix-converting-pointer-to-GType.patch new file mode 100644 index 0000000..2045e42 --- /dev/null +++ b/SOURCES/0001-gom-Fix-converting-pointer-to-GType.patch @@ -0,0 +1,66 @@ +From 51af68df5bfcf143bc8cced02f96c79403884a8f Mon Sep 17 00:00:00 2001 +From: Heiher +Date: Tue, 21 Apr 2015 07:51:00 +0800 +Subject: [PATCH] gom: Fix converting pointer to GType + +A gpointer will be the same size as a GType (64-bit), but +GPOINTER_TO_INT() will clamp that to int (32-bit) causing crashes +when we try to access the invalid GType values. + +This solves crashes when gom was compiled with "-fPIE -pie" CFLAGS + +https://bugzilla.gnome.org/show_bug.cgi?id=748196 +--- + gom/gom-repository.c | 5 ++--- + gom/gom-resource.c | 5 ++--- + 2 files changed, 4 insertions(+), 6 deletions(-) + +diff --git a/gom/gom-repository.c b/gom/gom-repository.c +index 873c721..bfa196a 100644 +--- a/gom/gom-repository.c ++++ b/gom/gom-repository.c +@@ -349,7 +349,7 @@ gom_repository_automatic_migrator (GomRepository *repository, + GList *l; + + for (l = object_types; l != NULL; l = l->next) { +- GType type = GPOINTER_TO_INT (l->data); ++ GType type = (GType) l->data; + GomResourceClass *klass; + GomCommandBuilder *builder; + GList *cmds, *c; +@@ -479,8 +479,7 @@ gom_repository_find_cb (GomAdapter *adapter, + repository = GOM_REPOSITORY(g_async_result_get_source_object(G_ASYNC_RESULT(simple))); + g_assert(GOM_IS_REPOSITORY(repository)); + +- resource_type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(simple), +- "resource-type")); ++ resource_type = (GType) g_object_get_data(G_OBJECT(simple), "resource-type"); + g_assert(g_type_is_a(resource_type, GOM_TYPE_RESOURCE)); + + filter = g_object_get_data(G_OBJECT(simple), "filter"); +diff --git a/gom/gom-resource.c b/gom/gom-resource.c +index f3029eb..b5dc50a 100644 +--- a/gom/gom-resource.c ++++ b/gom/gom-resource.c +@@ -612,7 +612,7 @@ gom_resource_build_save_cmd (GomResource *resource, + for (iter = types; iter; iter = iter->next) { + GomCommand *command; + +- resource_type = GPOINTER_TO_INT(iter->data); ++ resource_type = (GType) iter->data; + + g_object_set(builder, + "resource-type", resource_type, +@@ -844,8 +844,7 @@ gom_resource_fetch_m2m_cb (GomAdapter *adapter, + g_return_if_fail(G_IS_SIMPLE_ASYNC_RESULT(simple)); + + m2m_table = g_object_get_data(G_OBJECT(simple), "m2m-table"); +- resource_type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(simple), +- "resource-type")); ++ resource_type = (GType) g_object_get_data(G_OBJECT(simple), "resource-type"); + filter = g_object_get_data(G_OBJECT(simple), "filter"); + resource = GOM_RESOURCE(g_async_result_get_source_object(G_ASYNC_RESULT(simple))); + repository = gom_resource_get_repository(resource); +-- +2.4.3 + diff --git a/SPECS/gom.spec b/SPECS/gom.spec new file mode 100644 index 0000000..df80469 --- /dev/null +++ b/SPECS/gom.spec @@ -0,0 +1,72 @@ +Name: gom +Version: 0.2.1 +Release: 3%{?dist} +Summary: GObject to SQLite object mapper library + +License: LGPLv2+ +URL: https://wiki.gnome.org/Projects/Gom +Source0: https://download.gnome.org/sources/gom/0.2/gom-%{version}.tar.xz + +BuildRequires: gobject-introspection-devel +BuildRequires: intltool +BuildRequires: pkgconfig(gdk-pixbuf-2.0) +BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(sqlite3) + +Patch0: 0001-gom-Fix-converting-pointer-to-GType.patch + +%description +Gom provides an object mapper from GObjects to SQLite. It helps you write +applications that need to store structured data as well as make complex queries +upon that data. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%prep +%setup -q +%patch0 -p1 + +%build +%configure --disable-static +make %{?_smp_mflags} + +%install +%make_install +find $RPM_BUILD_ROOT -name '*.la' -delete + +%find_lang gom + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files -f gom.lang +%license COPYING +%{_libdir}/girepository-1.0/Gom-1.0.typelib +%{_libdir}/libgom-1.0.so.0* + +%files devel +%{_includedir}/gom-1.0/ +%{_libdir}/libgom-1.0.so +%{_libdir}/pkgconfig/gom-1.0.pc +%{_datadir}/gir-1.0/Gom-1.0.gir +%doc %{_datadir}/gtk-doc/ + +%changelog +* Fri Sep 11 2015 Bastien Nocera 0.2.1-3 +- Fix crasher during startup +Resolves: #1261939 + +* Wed Apr 22 2015 Bastien Nocera 0.2.1-2 +- Initial RHEL packaging +Resolves: #1184200 + +* Mon Aug 25 2014 Kalev Lember - 0.2.1-1 +- Initial Fedora packaging