[packages/setools] - added x32 patch (add libx32 to search libdirs) - added swig-version patch (allow swig 3.0.x) - add
qboosh
qboosh at pld-linux.org
Mon Oct 26 18:39:27 CET 2015
commit 321aa0609c0a4e1cc58b7556c57a08c1f57b05fa
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Oct 26 18:39:03 2015 +0100
- added x32 patch (add libx32 to search libdirs)
- added swig-version patch (allow swig 3.0.x)
- added sepol patch (adjust to current libsepol)
- added selinux patch (rely on recent libselinux instead of hack with weak extern, rejected by gcc 5 as conflicting declaration)
- release 3
setools-selinux.patch | 26 +++++++++++++++++++
setools-sepol.patch | 64 ++++++++++++++++++++++++++++++++++++++++++++++
setools-swig-version.patch | 15 +++++++++++
setools-x32.patch | 18 +++++++++++++
setools.spec | 18 +++++++++----
5 files changed, 136 insertions(+), 5 deletions(-)
---
diff --git a/setools.spec b/setools.spec
index 25f1b2c..0ffa024 100644
--- a/setools.spec
+++ b/setools.spec
@@ -7,7 +7,7 @@ Summary: Policy analysis tools for SELinux
Summary(pl.UTF-8): Narzędzia do analizy polityk SELinuksa
Name: setools
Version: 3.3.8
-Release: 2
+Release: 3
License: GPL v2+ (tools), LGPL v2.1+ (libraries)
Group: Applications/System
#Source0Download: http://oss.tresys.com/projects/setools/wiki/download
@@ -20,6 +20,10 @@ Patch2: %{name}-tcl.patch
Patch3: %{name}-format.patch
Patch4: %{name}-swig-part2.patch
Patch5: %{name}-link.patch
+Patch6: %{name}-x32.patch
+Patch7: %{name}-swig-version.patch
+Patch8: %{name}-sepol.patch
+Patch9: %{name}-selinux.patch
URL: https://github.com/TresysTechnology/setools3/wiki
BuildRequires: autoconf >= 2.59
BuildRequires: automake
@@ -31,8 +35,8 @@ BuildRequires: gtk+2-devel >= 2:2.8
%{?with_java:BuildRequires: jdk >= 1.2}
BuildRequires: libglade2-devel >= 2.0
BuildRequires: libselinux-devel >= 1.30
-BuildRequires: libsepol-devel >= 2.0.29
-BuildRequires: libsepol-static >= 2.0.29
+BuildRequires: libsepol-devel >= 2.4
+BuildRequires: libsepol-static >= 2.4
BuildRequires: libstdc++-devel
BuildRequires: libtool
BuildRequires: libxml2-devel >= 2
@@ -110,8 +114,8 @@ Summary: Policy analysis support libraries for SELinux
Summary(pl.UTF-8): Biblioteki wspierające analizę polityk SELinuksa
License: LGPL v2.1+
Group: Libraries
-Requires: libselinux >= 1.30
-Requires: libsepol >= 2.0.29
+Requires: libselinux >= 2.4
+Requires: libsepol >= 2.4
Requires: sqlite3 >= 3.2.0
%description libs
@@ -265,6 +269,10 @@ Ten pakiet zawiera wiązania Tcl-a do bibliotek uruchomieniowych:
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
%build
%{__libtoolize}
diff --git a/setools-selinux.patch b/setools-selinux.patch
new file mode 100644
index 0000000..622544e
--- /dev/null
+++ b/setools-selinux.patch
@@ -0,0 +1,26 @@
+--- setools-3.3.8/secmds/replcon.cc.orig 2013-01-16 17:36:25.000000000 +0100
++++ setools-3.3.8/secmds/replcon.cc 2015-10-26 18:27:42.035133853 +0100
+@@ -60,8 +60,6 @@
+ {NULL, 0, NULL, 0}
+ };
+
+-extern int lsetfilecon_raw(const char *, security_context_t) __attribute__ ((weak));
+-
+ /**
+ * As that setools must work with older libselinux versions that may
+ * not have the _raw() functions, declare them as weak. If libselinux
+@@ -70,14 +68,7 @@
+ */
+ static int replcon_lsetfilecon(const char *path, security_context_t context)
+ {
+- if (lsetfilecon_raw != NULL)
+- {
+ return lsetfilecon_raw(path, context);
+- }
+- else
+- {
+- return lsetfilecon(path, context);
+- }
+ }
+
+ struct replcon_info
diff --git a/setools-sepol.patch b/setools-sepol.patch
new file mode 100644
index 0000000..e39bd5f
--- /dev/null
+++ b/setools-sepol.patch
@@ -0,0 +1,64 @@
+--- setools-3.3.8/libqpol/src/policy_extend.c.orig 2013-01-16 17:36:24.000000000 +0100
++++ setools-3.3.8/libqpol/src/policy_extend.c 2015-10-26 17:37:22.584888789 +0100
+@@ -843,7 +843,7 @@
+ for (class_node = rule->perms; class_node; class_node = class_node->next) {
+ key.rule_type = rule->specified;
+ key.source_val = key.target_val = i + 1;
+- key.class_val = class_node->class;
++ key.class_val = class_node->tclass;
+ key.cond = cond;
+ if (qpol_syn_rule_table_insert_entry(policy, table, &key, new_rule))
+ goto err;
+@@ -856,7 +856,7 @@
+ key.rule_type = rule->specified;
+ key.source_val = i + 1;
+ key.target_val = j + 1;
+- key.class_val = class_node->class;
++ key.class_val = class_node->tclass;
+ key.cond = cond;
+ if (qpol_syn_rule_table_insert_entry(policy, table, &key, new_rule))
+ goto err;
+--- setools-3.3.8/libqpol/src/policy_define.c.orig 2013-01-16 17:36:24.000000000 +0100
++++ setools-3.3.8/libqpol/src/policy_define.c 2015-10-26 17:43:37.267694311 +0100
+@@ -1449,7 +1449,7 @@
+ return -1;
+ }
+ class_perm_node_init(perm);
+- perm->class = i + 1;
++ perm->tclass = i + 1;
+ perm->data = datum->s.value;
+ perm->next = avrule->perms;
+ avrule->perms = perm;
+@@ -1699,7 +1699,7 @@
+ goto out;
+ }
+ class_perm_node_init(cur_perms);
+- cur_perms->class = i + 1;
++ cur_perms->tclass = i + 1;
+ if (!perms)
+ perms = cur_perms;
+ if (tail)
+--- setools-3.3.8/libqpol/src/syn_rule_query.c.orig 2013-01-16 17:36:24.000000000 +0100
++++ setools-3.3.8/libqpol/src/syn_rule_query.c 2015-10-26 17:46:15.095897256 +0100
+@@ -67,7 +67,7 @@
+ return NULL;
+ }
+
+- return db->class_val_to_struct[srcs->cur->class - 1];
++ return db->class_val_to_struct[srcs->cur->tclass - 1];
+ }
+
+ static int syn_rule_class_state_next(qpol_iterator_t * iter)
+@@ -465,10 +465,10 @@
+ }
+
+ for (node = internal_rule->perms; node; node = node->next) {
+- for (i = 0; i < db->class_val_to_struct[node->class - 1]->permissions.nprim; i++) {
++ for (i = 0; i < db->class_val_to_struct[node->tclass - 1]->permissions.nprim; i++) {
+ if (!(node->data & (1 << i)))
+ continue;
+- tmp = sepol_av_to_string(db, node->class, (sepol_access_vector_t) (1 << i));
++ tmp = sepol_av_to_string(db, node->tclass, (sepol_access_vector_t) (1 << i));
+ if (tmp) {
+ tmp++; /* remove prepended space */
+ for (cur = 0; cur < perm_list_sz; cur++)
diff --git a/setools-swig-version.patch b/setools-swig-version.patch
new file mode 100644
index 0000000..2f90142
--- /dev/null
+++ b/setools-swig-version.patch
@@ -0,0 +1,15 @@
+--- setools-3.3.8/m4/ac_pkg_swig.m4.orig 2013-01-16 17:36:22.000000000 +0100
++++ setools-3.3.8/m4/ac_pkg_swig.m4 2015-10-26 18:02:47.777488446 +0100
+@@ -106,9 +106,9 @@
+ if test -z "$available_patch" ; then
+ [available_patch=0]
+ fi
+- if test $available_major -ne $required_major \
+- -o $available_minor -ne $required_minor \
+- -o $available_patch -lt $required_patch ; then
++ if test $available_major -lt $required_major \
++ -o $available_major -eq $required_major -a $available_minor -lt $required_minor \
++ -o $available_major -eq $required_major -a $available_minor -eq $required_minor -a $available_patch -lt $required_patch ; then
+ AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org])
+ SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
+ else
diff --git a/setools-x32.patch b/setools-x32.patch
new file mode 100644
index 0000000..c374320
--- /dev/null
+++ b/setools-x32.patch
@@ -0,0 +1,18 @@
+--- setools-3.3.8/configure.ac.orig 2015-10-26 17:06:19.871423815 +0100
++++ setools-3.3.8/configure.ac 2015-10-26 17:08:34.501753575 +0100
+@@ -412,13 +412,13 @@
+ sepol_devel_incdir="${sepol_devel}/include"
+ selinux_devel_incdir="${selinux_devel}/include"
+ dnl if /lib64 exists then use that directory, otherwise revert to just /lib
+-for dir in lib64 lib ; do
++for dir in libx32 lib64 lib ; do
+ sepol_devel_libdir="${sepol_devel}/${dir}"
+ if test -f ${sepol_devel_libdir}/libsepol.so ; then
+ break
+ fi
+ done
+-for dir in lib64 lib ; do
++for dir in libx32 lib64 lib ; do
+ selinux_devel_libdir="${selinux_devel}/${dir}"
+ if test -f ${selinux_devel_libdir}/libselinux.so ; then
+ break
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/setools.git/commitdiff/321aa0609c0a4e1cc58b7556c57a08c1f57b05fa
More information about the pld-cvs-commit
mailing list