Commit Graph

40 Commits

Author SHA1 Message Date
Yi Zhao
6b87622198 setools: upgrade 4.5.1 -> 4.6.0
ChangeLog:
https://github.com/SELinuxProject/setools/releases/tag/4.6.0

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-09-23 14:19:38 +08:00
Poonam Jadhav
48f7a7ba09 setools: Add native support
Enable using setools native for analyzing
the built SELinux policy during the build.

Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-07-11 11:18:58 +08:00
Scott Murray
05178ce178 Adapt to UNPACKDIR changes
Remove or update S definitions as required to work with oe-core
S/UNPACKDIR changes.  A default definition of S has been added to
selinux_common.inc to avoid duplication in the set of recipes that
use it to build packages from different subdirectories of the selinux
repo.  The three packagegroups test build successfully with these
changes.

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-06-30 13:38:18 +08:00
Yi Zhao
1e40ada23b setools: inherit cython class
Use the new cython class to avoid duplicated fixup code to remove build
paths.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2025-03-07 14:33:23 -05:00
Yi Zhao
3482e0e650 setools: switch to PEP-517 build backend
Fix QA warning:
WARNING: setools-4.5.1-r0 do_check_backend: QA Issue: inherits
setuptools3 but has pyproject.toml with setuptools.build_meta, use the
correct class [pep517-backend]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-08-26 08:16:18 -04:00
Yi Zhao
c1f20cb764 setools: upgrade 4.4.4 -> 4.5.1
ChangeLog:
https://github.com/SELinuxProject/setools/releases/tag/4.5.0
https://github.com/SELinuxProject/setools/releases/tag/4.5.1

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-06-29 20:48:59 -04:00
Yi Zhao
7d5dc44b35 setools: upgrade 4.4.3 -> 4.4.4
ChangeLog:
https://github.com/SELinuxProject/setools/releases/tag/4.4.4

* Refresh local patch

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2023-12-18 11:06:31 -05:00
Yi Zhao
5933e66507 setools: upgrade 4.4.2 -> 4.4.3
ChangeLog:
https://github.com/SELinuxProject/setools/releases/tag/4.4.3

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2023-08-08 10:34:54 -04:00
Yi Zhao
0c8af77822 setools: upgrade 4.1 -> 4.2
ChangeLog:
https://github.com/SELinuxProject/setools/releases/tag/4.4.2

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2023-04-30 21:33:46 -04:00
Yi Zhao
1e6a19762e setools: upgrade 4.4.0 -> 4.4.1
Changelog:
https://github.com/SELinuxProject/setools/releases/tag/4.4.1

License-Update: Refine COPYING text. No license changes.[1]

[1] fff1906ff4

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2023-03-06 11:04:54 -05:00
Yi Zhao
6683a43e61 setools: fix buildpaths issue
Fixes:
QA Issue: File /usr/src/debug/setools/4.4.0-r0/setools/policyrep.c in package setools-src
contains reference to TMPDIR [buildpaths]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2022-08-28 13:54:59 -04:00
Ashish Sharma
ab4b57bba0 meta-selinux: Use SPDX style licensing format
WARNING: checkpolicy-3.3-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2+ [obsolete-license] \
WARNING: setools-4.4.0-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2 LGPLv2.1 [obsolete-license] \
WARNING: policycoreutils-3.3-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2+ [obsolete-license] \
WARNING: refpolicy-standard-2.20210908+gitAUTOINC+23a8d103f3-r0.2 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2 [obsolete-license] \
WARNING: selinux-python-3.3-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2+ [obsolete-license] \
WARNING: ecryptfs-utils-111-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPL-2.0 [obsolete-license] \
WARNING: nikto-2.1.6-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2 [obsolete-license] \
WARNING: bastille-3.2.1-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2 [obsolete-license] \
WARNING: suricata-6.0.4-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2 [obsolete-license] \
WARNING: samhain-server-4.4.6-r0.7 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2 [obsolete-license] \
...

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2022-04-19 15:35:08 -04:00
Yi Zhao
87d3c3dd74 recipes: update SRC_URI branch and protocols
Update SRC_URIs using git to include branch=master if no branch is set
and also to use protocol=https for github urls.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-11-22 12:23:16 -05:00
Yi Zhao
c6f6f7c6f0 setools: disable native/nativesdk build
Disable native/nativesdk build as they don't work for a long time.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-29 21:34:22 -04:00
Yi Zhao
654201e25d meta-selinux: convert to new override syntax
This is the result of automated script conversion:
poky/scripts/contrib/convert-overrides.py meta-selinux

Converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-08-04 16:18:39 -04:00
Yi Zhao
ac47a5e325 setools: upgrade 4.3.0 -> 4.4.0
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2021-03-17 09:39:50 -04:00
Yi Zhao
5a58e87aa9 setools: fix build with Python 3.9
The Py_UNICODE_COPY, Py_UNICODE_FILL, PyUnicode_WSTR_LENGTH,
PyUnicode_FromUnicode(), PyUnicode_AsUnicode(), _PyUnicode_AsUnicode,
and PyUnicode_AsUnicodeAndSize() are marked as deprecated in Python 3.9.
(See: https://docs.python.org/3/whatsnew/3.9.html). But the current
python3-cython (0.29.21) hasn't adapt it yet.
Append '-Wno-deprecated-declarations' in CFLAGS as a workaround to fix
the build issue.

Fixes:
In file included from
/build/tmp-glibc/work/corei7-64-wrs-linux/setools/4.3.0-r0/recipe-sysroot/usr/include/python3.9/unicodeobject.h:1026,
    from /build/tmp-glibc/work/corei7-64-wrs-linux/setools/4.3.0-r0/recipe-sysroot/usr/include/python3.9/Python.h:97,
    from setools/policyrep.c:49:
/build/tmp-glibc/work/corei7-64-wrs-linux/setools/4.3.0-r0/recipe-sysroot/usr/include/python3.9/cpython/unicodeobject.h:446:26:
note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
setools/policyrep.c:97302:3: error: 'PyUnicode_AsUnicode' is deprecated [-Werror=deprecated-declarations]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-11-12 14:01:07 -05:00
Oleksii Miroshko
500578b2c2 setools: Add native support
Enable using setools for analyzing the built SELinux policy
during the build.

Signed-off-by: Oleksii Miroshko <miroshko@gmail.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2020-09-18 18:40:10 -04:00
Yi Zhao
8b3efbf23d setools: upgrade 4.2.2 -> 4.3.0
Remove __pycache__ directories when do_install.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2020-04-15 14:58:15 -04:00
Yi Zhao
88b9ab90c8 setools: upgrade 4.1.1 -> 4.2.2
* Switch to python3

* Drop patches:
  Fix-build-failure-with-GCC-7-due-to-possible-truncat.patch
  setools4-fix-cross-compiling-errors-for-powerpc-mips.patch

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2019-12-19 11:17:00 -05:00
Yi Zhao
09a904843b setools: update SRC_URI
SETools has moved from https://github.com/TresysTechnology/setools to
https://github.com/SELinuxProject/setools
See: https://github.com/TresysTechnology/setools/wiki

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2019-08-29 10:29:56 -04:00
Hongxu Jia
8b7a9638c5 setools: do not use unstable github archive tarballs
Since commit [21f84fc insane: add sanity checks to SRC_URI] applied
in oe-core, do not use unstable github archive tarballs

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2019-06-06 19:07:15 -04:00
Kai Kang
c0186953ac setools: fix build failure with gcc 7
Backport patch from setools upstream to fix build failure with GCC 7 due
to possible truncation of snprintf output. It could be reproduced on 64
bit bsps such as qemux86-64 and qemumips64 with configs:

  SELECTED_OPTIMIZATION = "${DEBUG_OPTIMIZATION}"
  DEBUG_BUILD = "1"

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2019-04-14 17:29:57 -04:00
Piotr Tworek
1fdd4c91d7 setools: Add missing python runtime deps.
The package needs logging, json and argparse modules to start.
Additionaly, it also needs libselinux-python in order to really work.
Without it it'll just print an error message instructing the user to
install it.

Signed-off-by: Piotr Tworek <tworaz666@gmail.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2018-10-23 13:16:39 +01:00
Mark Hatle
d855c624f3 setools: Fix build failures on 64-bit machines
Bring in a patch from https://github.com/vorlonofportland/setools,
commit id 790d7a538f515d27d2390f1ef56c9871b107a346.

Fixes an issue where setools fails with:

    error: '%04zd' directive output may be truncated writing between 4 and 10 bytes into a region of size 5 [-Werror=format-truncation=]
    snprintf(buff, 9, "@ttr%04zd", i + 1);

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-15 16:12:49 -05:00
Wenzong Fan
fdf76122b6 setools: uprev to 4.1.1
SETools v4 is a rewrite of SETools in Python, details refer to:
https://github.com/TresysTechnology/setools/wiki/Changes-Since-SETools-v3

Changes for upreving:
* removed setools_3.3.8.bb and all useless patch
* add patches to fix cross-compiling issues:
  - setools4-fixes-for-cross-compiling.patch
  - setools4-fix-cross-compiling-errors-for-powerpc-mips.patch

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>

Per discussion w/ Wenzong, added meta-python as a dependency and enabled
the RDEPENDS within the new setools_4.1.1.bb

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2017-09-14 08:28:09 -05:00
Philip Tricca
e09eaef7a9 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>
2015-09-17 15:18:43 -04:00
tprrt
aef47ac6a6 Fix setools building (-fPIC error)
Signed-off-by: tprrt <tprrt@tupi.fr>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2015-08-07 14:24:15 -04:00
Joe MacDonald
713359e1b8 userspace: update core selinux userspace tools
Update to the latest stable release, 20140506.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2014-11-01 11:45:31 -04:00
Joe MacDonald
8476ec5e64 selinux-userspace: update userspace SRC_URI and checksums
Trac has been turned off on OSS.  Update all SRC_URI links for the
userspace components to point at the github project releases.  The github
releases also have a slightly different directory structure in the
tarballs, requiring an update of the checksums as well.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2014-09-16 16:00:05 -04:00
Chong Lu
7984856ca2 setools: Add bison-native and flex-native to DEPENDS
Avoid policy_scan.c: No such file or directory

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2014-06-02 09:16:33 -05:00
Xin Ouyang
d562aac270 setools: not override do_configure in autotools class.
Signed-off-by: Xin Ouyang <xin.ouyang@windriver.com>
2014-05-16 18:10:05 +08:00
Mark Hatle
212b3d0822 setools: Uprev setools
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2013-10-02 13:24:46 -04:00
Xin Ouyang
332be21065 setools: fix incorrect PYTHON_LDFLAGS.
PYTHON_LDFLAGS is considered as the full path of libpython2.7.so,
dirname of the .so file will be expanded into -L<DIR>. As a result,
current PYTHON_LDFLAGS cause this compile result:
 ${CC} ... -L-LXXX/tmp/sysroots/qemux86-64/usr/lib64
     -L-lapol -lqpol -o _sesearch.so
So "-lapol" is ignored, fix this.

CQID: WIND00400717

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2013-01-24 19:47:38 +08:00
Xin Ouyang
8c50123a85 setools: add libxml2 DEPENDS.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-10-18 11:07:45 +08:00
Xin Ouyang
a9c8b9780a setools: inherit pythonnative
With new changes in oe-core, recipes which need python-native
should "inherit pythonnative".

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
2012-09-20 14:05:14 +08:00
Xin Ouyang
75e818530f setools: Patch for neverallow rules. 2012-03-27 17:37:53 +08:00
Xin Ouyang
c93ca62112 setools: Remove the python disabled patch.
Before the python modules are needed by policycoreutils.
2012-03-27 17:35:03 +08:00
Xin Ouyang
171760b17a setools: Fix depends and file list. 2012-03-27 17:32:30 +08:00
Xin Ouyang
16ed487d58 setools: Add version 3.3.7. 2012-03-08 10:35:55 +08:00