[abrt] disable unused warning for GLib, use right dependencies for RHEL

Jakub Filak jfilak at fedoraproject.org
Tue Aug 6 07:13:28 UTC 2013


commit 0c2a0dec061e785acde23b616c071d2bfc0e9aa4
Author: Jakub Filak <jfilak at redhat.com>
Date:   Mon Jul 29 11:34:57 2013 +0200

    disable unused warning for GLib, use right dependencies for RHEL

 abrt-2.1.6-get_rid_of_glib_warning.patch |   58 ++++++++++++++++++++++++++++++
 abrt.spec                                |   29 +++++++++++----
 2 files changed, 79 insertions(+), 8 deletions(-)
---
diff --git a/abrt-2.1.6-get_rid_of_glib_warning.patch b/abrt-2.1.6-get_rid_of_glib_warning.patch
new file mode 100644
index 0000000..cd9b616
--- /dev/null
+++ b/abrt-2.1.6-get_rid_of_glib_warning.patch
@@ -0,0 +1,58 @@
+diff -ruN abrt-2.1.6/src/configuration-gui/Makefile.am abrt-2.1.6.3.g85d7/src/configuration-gui/Makefile.am
+--- abrt-2.1.6/src/configuration-gui/Makefile.am	2013-07-23 10:10:02.000000000 +0200
++++ abrt-2.1.6.3.g85d7/src/configuration-gui/Makefile.am	2013-07-26 18:23:04.000000000 +0200
+@@ -4,9 +4,17 @@
+ 	abrt-config-widget.c \
+ 	abrt-config-widget.h
+ 
++# G_DEFINE_TYPE(...) macros result in
++# typedef '_GStaticAssertCompileTimeAssertion_0' locally defined but not used
++# warnings on some glib versions
++# (observed on glib2-2.34.2 on F18).
++# -Wno-error=unused-local-typedefs in CPPFLAGS suppresses this warning.
++# Newer glib may have it fixed.
++
+ libabrtconfigui_la_CPPFLAGS = \
+ 	-I$(srcdir)/../include \
+ 	-I$(srcdir)/../lib \
++	-Wno-error=unused-local-typedefs \
+ 	$(LIBREPORT_CFLAGS) \
+ 	$(GTK_CFLAGS) \
+ 	-DABRT_UI_DIR="\"$(uidir)\"" \
+@@ -25,6 +33,7 @@
+ system_config_abrt_CPPFLAGS = \
+ 	-I$(srcdir)/../include \
+ 	-I$(srcdir)/../lib \
++	-Wno-error=unused-local-typedefs \
+ 	$(GTK_CFLAGS) \
+ 	$(LIBREPORT_CFLAGS)
+ 
+diff -ruN abrt-2.1.6/src/configuration-gui/Makefile.in abrt-2.1.6.3.g85d7/src/configuration-gui/Makefile.in
+--- abrt-2.1.6/src/configuration-gui/Makefile.in	2013-07-26 07:55:59.000000000 +0200
++++ abrt-2.1.6.3.g85d7/src/configuration-gui/Makefile.in	2013-07-26 18:23:48.000000000 +0200
+@@ -419,9 +419,17 @@
+ 	abrt-config-widget.c \
+ 	abrt-config-widget.h
+ 
++
++# G_DEFINE_TYPE(...) macros result in
++# typedef '_GStaticAssertCompileTimeAssertion_0' locally defined but not used
++# warnings on some glib versions
++# (observed on glib2-2.34.2 on F18).
++# -Wno-error=unused-local-typedefs in CPPFLAGS suppresses this warning.
++# Newer glib may have it fixed.
+ libabrtconfigui_la_CPPFLAGS = \
+ 	-I$(srcdir)/../include \
+ 	-I$(srcdir)/../lib \
++	-Wno-error=unused-local-typedefs \
+ 	$(LIBREPORT_CFLAGS) \
+ 	$(GTK_CFLAGS) \
+ 	-DABRT_UI_DIR="\"$(uidir)\"" \
+@@ -438,6 +446,7 @@
+ system_config_abrt_CPPFLAGS = \
+ 	-I$(srcdir)/../include \
+ 	-I$(srcdir)/../lib \
++	-Wno-error=unused-local-typedefs \
+ 	$(GTK_CFLAGS) \
+ 	$(LIBREPORT_CFLAGS)
+ 
diff --git a/abrt.spec b/abrt.spec
index 9350c1d..202767b 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -32,7 +32,7 @@
 Summary: Automatic bug detection and reporting tool
 Name: abrt
 Version: 2.1.6
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+
 Group: Applications/System
 URL: https://fedorahosted.org/abrt/
@@ -44,6 +44,9 @@ Patch2: abrt-2.1.6.rhel-remove_all_ureport_lines_from_config.patch
 Patch3: abrt-2.1.6.rhel-dont_enable_shortened_reporting_in_gnome.patch
 Patch4: abrt-2.1.1-disable_autoreporting_dialog.patch
 
+# remove with abrt > 2.1.6
+Patch5: abrt-2.1.6-get_rid_of_glib_warning.patch
+
 BuildRequires: dbus-devel
 BuildRequires: gtk3-devel
 BuildRequires: rpm-devel >= 4.6
@@ -139,7 +142,9 @@ Group: System Environment/Libraries
 Requires: curl
 Requires: %{name} = %{version}-%{release}
 Requires: abrt-libs = %{version}-%{release}
+%if 0%{!?rhel:1}
 Requires: libreport-plugin-kerneloops >= %{libreport_ver}
+%endif
 
 %description addon-kerneloops
 This package contains plugin for collecting kernel crash information from
@@ -220,11 +225,15 @@ Requires: abrt-addon-vmcore
 Requires: abrt-addon-ccpp
 Requires: abrt-addon-python
 Requires: abrt-addon-xorg
+%if 0%{?rhel}
+Requires: libreport-plugin-rhtsupport >= %{libreport_ver}
+%else
 Requires: abrt-retrace-client
 Requires: abrt-plugin-bodhi
 Requires: libreport-plugin-bugzilla >= %{libreport_ver}
 Requires: libreport-plugin-logger >= %{libreport_ver}
 Requires: libreport-plugin-ureport >= %{libreport_ver}
+%endif
 
 %description cli
 Virtual package to install all necessary packages for usage from command line
@@ -243,7 +252,6 @@ Requires: abrt-addon-kerneloops
 Requires: abrt-addon-uefioops
 Requires: abrt-addon-vmcore
 Requires: abrt-addon-ccpp
-Requires: abrt-retrace-client
 Requires: abrt-addon-python
 Requires: abrt-addon-xorg
 # Default config of addon-ccpp requires gdb
@@ -251,16 +259,17 @@ Requires: gdb >= 7.0-3
 Requires: elfutils
 Requires: abrt-gui
 Requires: gnome-abrt
+%if 0%{?rhel}
+Requires: libreport-rhel >= %{libreport_ver}
+Requires: libreport-plugin-rhtsupport >= %{libreport_ver}
+%else
+Requires: abrt-retrace-client
 Requires: abrt-plugin-bodhi
 Requires: libreport-plugin-bugzilla >= %{libreport_ver}
 Requires: libreport-plugin-logger >= %{libreport_ver}
 Requires: libreport-plugin-ureport >= %{libreport_ver}
-%if 0%{?fedora}
 Requires: libreport-fedora >= %{libreport_ver}
 %endif
-%if 0%{?rhel}
-Requires: libreport-rhel >= %{libreport_ver}
-%endif
 #Requires: abrt-plugin-firefox
 Provides: bug-buddy
 
@@ -314,11 +323,11 @@ to the shell
 %endif
 #Fedora
 %patch1 -p1 -b .gpgcheck
+%patch5 -p1
 
 %build
 autoconf
-# Removed -Werror until abrt/abrt#673 is fixed
-CFLAGS="%{optflags}" %configure --enable-doxygen-docs --disable-silent-rules
+CFLAGS="%{optflags} -Werror" %configure --enable-doxygen-docs --disable-silent-rules
 make %{?_smp_mflags}
 
 %install
@@ -861,6 +870,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh
 
 %changelog
+* Mon Jul 29 2013 Jakub Filak <jfilak at redhat.com> 2.1.6-2
+- disable gcc unused-typedef warning for GLib
+- use right dependencies for RHEL
+
 * Fri Jul 26 2013 Jakub Filak <jfilak at redhat.com> 2.1.6-1
 - replace functions deprecated in Gtk-3.10 with their substitutes
 - integrate with satyr, drop btparser


More information about the scm-commits mailing list