summaryrefslogtreecommitdiffstats
path: root/package/setools/0003-setools-Update-for-2015-02-02-Userspace-release.patch
diff options
context:
space:
mode:
authorAdam Duskett <aduskett@gmail.com>2017-10-17 18:32:16 -0400
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-10-18 22:48:26 +0200
commit96d3d017963b28fe3925f77f3cb4b37e425ff79d (patch)
tree706b294535948f501e460e1ca14a51afd9365330 /package/setools/0003-setools-Update-for-2015-02-02-Userspace-release.patch
parent38e36cd0e1ec55743766e48564d952e38ff40113 (diff)
downloadbuildroot-96d3d017963b28fe3925f77f3cb4b37e425ff79d.tar.gz
buildroot-96d3d017963b28fe3925f77f3cb4b37e425ff79d.zip
libsepol: bump to 2.7, setools: bump to 4.1.1
The reason for combining these patches is because the old version of setools is not compatible iwth libsepol 2.7. If a user where to do a git pull on a patch that only updates libsepol or setools, the build would fail to compile. setools has been completely rewritten in python instead of C. The current version of setools includes a few programs that require python-qt5 or python-networkx to run, however the package does not check to see if these exist when compiling, and will install the scripts to the target directory even if they don't exist. In the case of python-networkx, this package is not available on Buildroot. The scripts that require them are: sedta and seinfoflow. In the case of python-qt5, qpol is the script that requires it. Some setools.mk notes to get the package to compile: - Convert the package .mk to use python-package instead of autotools-package. - setup.py hard codes base_lib_dirs to point to several host directories. To fix this, sed is used before compiling to point the base_lib_dirs to the staging directory. - setup.py also includes the "Werror" flag, however compilers before gcc6 cause a few autogenerated variables to not be initialized before use, causing the build to fail. To fix this, a patch is provided that removes the Werror flag. - Remove sedta and seinfoflow from the target system after install. These packages rely on the package python-networkx which is not available in buildroot. - Remove the installed apol package and the setoolsgui directory from the target directory if python-qt5 is not selected. Other changes: - Removed all patches, as they are not compatible with the new version of setools. - Add COPYING, COPYING.GPL, and COPYING.LGPL to setools.hash Signed-off-by: Adam Duskett <Adamduskett@outlook.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/setools/0003-setools-Update-for-2015-02-02-Userspace-release.patch')
-rw-r--r--package/setools/0003-setools-Update-for-2015-02-02-Userspace-release.patch90
1 files changed, 0 insertions, 90 deletions
diff --git a/package/setools/0003-setools-Update-for-2015-02-02-Userspace-release.patch b/package/setools/0003-setools-Update-for-2015-02-02-Userspace-release.patch
deleted file mode 100644
index b0842d961a..0000000000
--- a/package/setools/0003-setools-Update-for-2015-02-02-Userspace-release.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-setools: Add patch to support 2.4 toolstack.
-Signed-off-by: Philip Tricca <flihp@twobit.us>
-Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-URL: https://github.com/flihp/meta-selinux/commit/e09eaef7a9acb552a4a5e1f90117154ae06b6fda
-
-Signed-off-by: Adam Duskett <Aduskett@gmail.com>
-
-diff --git a/libqpol/src/policy_define.c b/libqpol/src/policy_define.c
-index fad6b60..231962f 100644
---- a/libqpol/src/policy_define.c
-+++ b/libqpol/src/policy_define.c
-@@ -1449,7 +1449,7 @@ int define_compute_type_helper(int which, avrule_t ** rule)
- 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 @@ int define_te_avtab_helper(int which, avrule_t ** rule)
- 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)
-diff --git a/libqpol/src/policy_extend.c b/libqpol/src/policy_extend.c
-index 5325a87..1417271 100644
---- a/libqpol/src/policy_extend.c
-+++ b/libqpol/src/policy_extend.c
-@@ -843,7 +843,7 @@ static int qpol_syn_rule_table_insert_sepol_avrule(qpol_policy_t * policy, qpol_
- 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 @@ static int qpol_syn_rule_table_insert_sepol_avrule(qpol_policy_t * policy, qpol_
- 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;
-diff --git a/libqpol/src/syn_rule_query.c b/libqpol/src/syn_rule_query.c
-index 3e63204..d7578f1 100644
---- a/libqpol/src/syn_rule_query.c
-+++ b/libqpol/src/syn_rule_query.c
-@@ -67,7 +67,7 @@ static void *syn_rule_class_state_get_cur(const qpol_iterator_t * iter)
- 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 @@ int qpol_syn_avrule_get_perm_iter(const qpol_policy_t * policy, const qpol_syn_a
- }
-
- 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/secmds/replcon.cc b/secmds/replcon.cc
-index 34f7c1a..307c39f 100644
---- a/secmds/replcon.cc
-+++ b/secmds/replcon.cc
-@@ -60,7 +60,7 @@ static struct option const longopts[] = {
- {NULL, 0, NULL, 0}
- };
-
--extern int lsetfilecon_raw(const char *, security_context_t) __attribute__ ((weak));
-+extern int lsetfilecon_raw(const char *, const char *) __attribute__ ((weak));
-
- /**
- * As that setools must work with older libselinux versions that may
OpenPOWER on IntegriCloud