Fix SELinux deny_ptrace .spec build rules (BZ 786878).
This commit is contained in:
parent
d8e4a58344
commit
01b1870f18
89
gdb-attach-fail-reasons-5of5configure.patch
Normal file
89
gdb-attach-fail-reasons-5of5configure.patch
Normal file
@ -0,0 +1,89 @@
|
||||
--- 1/gdb/config.in 2012-03-09 18:40:28.001871023 +0100
|
||||
+++ ./gdb/config.in 2012-03-09 18:41:46.552621113 +0100
|
||||
@@ -245,6 +245,9 @@
|
||||
/* Define if librpm library is being used. */
|
||||
#undef HAVE_LIBRPM
|
||||
|
||||
+/* Define to 1 if you have the `selinux' library (-lselinux). */
|
||||
+#undef HAVE_LIBSELINUX
|
||||
+
|
||||
/* Define if libunwind library is being used. */
|
||||
#undef HAVE_LIBUNWIND
|
||||
|
||||
@@ -483,6 +486,9 @@
|
||||
/* Define to 1 if you have the `sbrk' function. */
|
||||
#undef HAVE_SBRK
|
||||
|
||||
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
|
||||
+#undef HAVE_SELINUX_SELINUX_H
|
||||
+
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
--- 1/gdb/configure 2012-03-09 18:40:28.183870443 +0100
|
||||
+++ ./gdb/configure 2012-03-09 18:41:45.783623559 +0100
|
||||
@@ -15557,6 +15557,64 @@ $as_echo "#define HAVE_PERSONALITY 1" >>
|
||||
|
||||
fi
|
||||
|
||||
+for ac_header in selinux/selinux.h
|
||||
+do :
|
||||
+ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
|
||||
+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then :
|
||||
+ cat >>confdefs.h <<_ACEOF
|
||||
+#define HAVE_SELINUX_SELINUX_H 1
|
||||
+_ACEOF
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+done
|
||||
+
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5
|
||||
+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; }
|
||||
+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ ac_check_lib_save_LIBS=$LIBS
|
||||
+LIBS="-lselinux $LIBS"
|
||||
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+
|
||||
+/* Override any GCC internal prototype to avoid an error.
|
||||
+ Use char because int might match the return type of a GCC
|
||||
+ builtin and then its argument prototype would still apply. */
|
||||
+#ifdef __cplusplus
|
||||
+extern "C"
|
||||
+#endif
|
||||
+char security_get_boolean_active ();
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+return security_get_boolean_active ();
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+if ac_fn_c_try_link "$LINENO"; then :
|
||||
+ ac_cv_lib_selinux_security_get_boolean_active=yes
|
||||
+else
|
||||
+ ac_cv_lib_selinux_security_get_boolean_active=no
|
||||
+fi
|
||||
+rm -f core conftest.err conftest.$ac_objext \
|
||||
+ conftest$ac_exeext conftest.$ac_ext
|
||||
+LIBS=$ac_check_lib_save_LIBS
|
||||
+fi
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5
|
||||
+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; }
|
||||
+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then :
|
||||
+ cat >>confdefs.h <<_ACEOF
|
||||
+#define HAVE_LIBSELINUX 1
|
||||
+_ACEOF
|
||||
+
|
||||
+ LIBS="-lselinux $LIBS"
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+
|
||||
|
||||
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
|
||||
# except that the argument to --with-sysroot is optional.
|
11
gdb.spec
11
gdb.spec
@ -33,7 +33,7 @@ Version: 7.4.50.%{snap}
|
||||
|
||||
# The release always contains a leading reserved number, start it at 1.
|
||||
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||
Release: 29%{?dist}
|
||||
Release: 30%{?dist}
|
||||
|
||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
|
||||
Group: Development/Debuggers
|
||||
@ -559,6 +559,7 @@ Patch650: gdb-attach-fail-reasons-2of5.patch
|
||||
Patch651: gdb-attach-fail-reasons-3of5.patch
|
||||
Patch652: gdb-attach-fail-reasons-4of5.patch
|
||||
Patch653: gdb-attach-fail-reasons-5of5.patch
|
||||
Patch657: gdb-attach-fail-reasons-5of5configure.patch
|
||||
|
||||
# Fix inferior calls, particularly uncaught thrown exceptions (BZ 799531).
|
||||
Patch654: gdb-x86-onstack.patch
|
||||
@ -579,7 +580,7 @@ BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_i
|
||||
# dlopen() no longer makes rpm-libs%{?_isa} (it's .so) a mandatory dependency.
|
||||
BuildRequires: rpm-devel%{?_isa}
|
||||
%endif # 0%{!?el5:1}
|
||||
BuildRequires: zlib-devel%{?_isa}
|
||||
BuildRequires: zlib-devel%{?_isa} libselinux-devel%{?_isa}
|
||||
%if 0%{!?_without_python:1}
|
||||
%if 0%{?el5:1}
|
||||
# This RHEL-5.6 python version got split out python-libs for ppc64.
|
||||
@ -850,6 +851,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
||||
%patch651 -p1
|
||||
%patch652 -p1
|
||||
%patch653 -p1
|
||||
%patch657 -p1
|
||||
%patch654 -p1
|
||||
%patch655 -p1
|
||||
%patch656 -p1
|
||||
@ -1017,6 +1019,8 @@ perl -i.relocatable -pe 's/^(D\[".*_RELOCATABLE"\]=" )1(")$/${1}0$2/' gdb/config
|
||||
make %{?_smp_mflags} CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$FPROFILE_CFLAGS"
|
||||
|
||||
! grep '_RELOCATABLE.*1' gdb/config.h
|
||||
grep '^#define HAVE_LIBSELINUX 1$' gdb/config.h
|
||||
grep '^#define HAVE_SELINUX_SELINUX_H 1$' gdb/config.h
|
||||
|
||||
if [ "$fprofile" = "-fprofile" ]
|
||||
then
|
||||
@ -1319,6 +1323,9 @@ fi
|
||||
%endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
|
||||
|
||||
%changelog
|
||||
* Fri Mar 9 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-30.fc17
|
||||
- Fix SELinux deny_ptrace .spec build rules (BZ 786878).
|
||||
|
||||
* Tue Mar 6 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-29.fc17
|
||||
- Fix inferior calls, particularly uncaught thrown exceptions (BZ 799531).
|
||||
- Fix DWARF DIEs CU vs. section relative offsets (Joel Brobecker, me).
|
||||
|
Loading…
Reference in New Issue
Block a user