Commit graph

21 commits

Author SHA1 Message Date
Fabrice Fontaine ad8a032b67 package/policycoreutils: fix build with NLS
Fixes:
 - http://autobuild.buildroot.org/results/43b5580fa9f26eac71afa9f3cca413f2791c054d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-10-14 21:40:30 +02:00
Thomas Petazzoni 682714b1e5 package/policycoreutils: drop !BR2_arc dependency
libsemanage no longer has the !BR2_arc dependency, so we can drop it
as well from policycoreutils. In practice, we still can't select
policycoreutils on ARC due to BR2_PACKAGE_AUDIT_ARCH_SUPPORTS.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-10-10 00:13:45 +02:00
Thomas Petazzoni 63a456304a package/policycoreutils: now available on !glibc configs
Now that libsemanage is available on non-glibc configurations, we can
also allow the selection of policycoreutils for such configurations.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-10-10 00:09:38 +02:00
Thomas Petazzoni 48f77b20c5 package/policycoreutils: don't pass DESTDIR when building host variant
DESTDIR was needed before upstream commit
6b901a4fb80cc61c46f75144b5bb366b8da38e82 ("policycoreutils: build:
follow standard semantics for DESTDIR and PREFIX"), but now the proper
semantic is used for DESTDIR and PREFIX.

However, in addition to the PREFIX that is already passed, we also
need to pass ETCDIR and SBINDIR, which are not defined in terms of
PREFIX.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-09-22 20:04:56 +02:00
Thomas Petazzoni 8af9e534e7 package/policycoreutils: drop ARCH variable
The ARCH variable is no longer referenced by the policycoreutils build
system since upstream commit 4cc808671a18b5405be5707eefedd78b9c693268
("Move policycoreutils/mcstrans to mcstrans.")

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-09-22 20:04:55 +02:00
Thomas Petazzoni 6136ecb0b0 package/policycoreutils: drop host-setools dependency from host-policycoreutils
There is no reason for host-policycoreutils to depend on host-setools,
it builds/works fine without it.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-09-22 20:04:54 +02:00
Thomas Petazzoni 39e7c72aa5 package/policycoreutils: drop host-python(3) dependency for host-policycoreutils
Since SELinux 2.7, the python tools that used to be in policycoreutils
have been moved into a separate package, called "python" in upstream
SELinux, and "selinux-python" in Buildroot. Therefore, we can drop the
host-python(3) dependency from host-policycoreutils.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-09-22 20:04:53 +02:00
Thomas Petazzoni c1230b289a package/policycoreutils: drop host-dbus-glib dependency from host-policycoreutils
Since SELinux 2.7, restorecond has been moved to a separate package
from policycoreutils. Due to this, host-dbus-glib is no longer needed
to build host-policycoreutils.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-09-22 20:04:52 +02:00
Adam Duskett 819cfcf7aa Standardize Adam Duskett's email address
Globally change Adam Duskett's email address to aduskett@gmail.com.

Note that one or two of the patches may have been applied upstream with
the old email address, but in that case those patches will anyway be
removed when bumping.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-07-04 00:10:47 +02:00
Adam Duskett 163ecb788b package/policycoreutils: bump to version 2.9
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-04-11 14:32:56 +02:00
Fabrice Fontaine 7802399278 policycoreutils: bump to version 2.8
Update first and second patch

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-10-11 22:02:33 +02:00
Adam Duskett 9d6da7a264 policycoreutils: split packages and bump to 2.7
Policycoreutils was broken up into several packages, as such several
changes needed to happen for this patch to work:

- Remove patches 3, 4, and 5 as they no longer apply.
- Refresh patches 1 and 2 to work with version 2.7
- Remove semodule_${deps,expand,link,package} and sestatus from the makedirs
  in the mk file.
- Remove restorecond from the make and config file. (Seperate package)
- Remove Audit2allow from the make and config file. (In a different package)
- Remove the package sepolgen
- Add the package selinux-python
- Add the package restorecond
- Add the package semodule-utils
- Add the relevant Config.in.legacy options into the menu.

Because these are utilities that work on top of python, the older versions of
these utilites still work, and as such this should be a single patch.

Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-10-18 23:24:13 +02:00
Arnout Vandecappelle 44874939f8 policycoreutils: rework host installation
policycoreutils has a pretty peculiar interpretation of DESTDIR and
PREFIX.  PREFIX is not consistently used: some installation paths and
include paths are forced to $(DESTDIR)/usr/... . In other cases,
PREFIX is indeed used. PREFIX defaults to $(DESTDIR)/usr

Try to be a little bit more correct by passing both DESTDIR and PREFIX,
both set to $(HOST_DIR). This is not a complete fix: some things are
still installed in $(HOST_DIR)/usr - but nothing we care about (just
manpages, systemd services, ...). More importantly, however, it still
looks for e.g. D-Bus in $(DESTDIR)/usr/include/dbus-1.0.

Still, it's better than nothing.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 16:06:53 +02:00
Arnout Vandecappelle 0f9c0bf3d5 Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/bin
Since things are no longer installed in $(HOST_DIR)/usr, the callers
should also not refer to it.

This is a mechanical change with
git grep -l '$(HOST_DIR)/usr/bin' | xargs sed -i 's%$(HOST_DIR)/usr/bin%$(HOST_DIR)/bin%g'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 15:19:29 +02:00
Thomas Petazzoni fb38b44289 policycoreutils: fix check-package warnings
- 'depends on' before 'select'
 - rewrap Config.in help text

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-09 15:33:54 +02:00
Adam Duskett 005a5f33f2 policycoreutils: add option to build audit2allow
This python utility scans the logs for messages logged when the system
denied permission for operations, and  generates  a snippet of policy
rules which, if loaded into policy, might have allowed  those operations
to succeed.  However, this utility only generates Type Enforcement (TE)
allow rules.

Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com>
[Thomas: adjust Config.in to propagate the dependencies of sepolgen,
checkpolicy and python3.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-09 15:33:54 +02:00
Rahul Bedarkar af31c309e7 boot, linux, package: use SPDX short identifier for GPLv2/GPLv2+
We want to use SPDX identifier for license strings as much as possible.
SPDX short identifier for GPLv2/GPLv2+ is GPL-2.0/GPL-2.0+.

This change is done by using following command.
find . -name "*.mk" | xargs sed -ri '/LICENSE( )?[\+:]?=/s/\<GPLv2\>/GPL-2.0/g'

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-01 15:16:38 +02:00
Adam Duskett 2957074559 policycoreutils: bump version to 2.6
Signed-off-by: Adam Duskett <aduskett@codeblue.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-01-25 23:25:26 +13:00
Matt Weber 08af46e390 policycoreutils: restorecon libglib2 dependency
Updated to match Config.in select of libglib2
package as dependency if restorecon is enabled.

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-12-13 10:55:55 +01:00
Matt Weber a08b08e8c9 policycoreutils: CPPFLAGS undefine _FILE_OFFSET_BITS
Undefining _FILE_OFFSET_BITS here because of a "bug" with glibc fts.h
large file support.

Similar action was taken previously for CFLAGS.

Resolves:
http://autobuild.buildroot.net/results/4cb/4cb70d776bee01f1284e0c0be5b3fb5f1011353a/
http://autobuild.buildroot.net/results/f43/f438149e7d83475d425e1c1f17550f3cf5f69340/

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-12-13 10:55:45 +01:00
Clayton Shotwell cb328f77f8 policycoreutils: new package
This package contains the core policy utilities that are required
for basic operation of an SELinux system.

Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
Tested-by: Bryce Ferguson <bryce.ferguson@rockwellcollins.com>
Signed-off-by: Bryce Ferguson <bryce.ferguson@rockwellcollins.com>
[Thomas:
 - Move the Config.in comment at the top of the Config.in file rather
   than between the main option and its sub-options, as this breaks
   menuconfig indentation.
 - Fix the propagation of the libsemanage dependencies. libsemanage
   depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS and
   BR2_TOOLCHAIN_USES_GLIBC which were not accounted for. Since it
   depends on BR2_TOOLCHAIN_USES_GLIBC, then all the gettext related
   handling becomes useless and has been removed.
 - Rename the prompt of the restorecond sub-option to just
   "restorecond".
 - Use TARGET_CONFIGURE_OPTS and HOST_CONFIGURE_OPTS instead of
   passing LDFLAGS, CC, etc. manually.
 - Use make "foreach" function for loops instead of shell "for" loops.
 - Rework the explanation of why we're passing DESTDIR at build time.
 - Minor formatting tweaks here and there.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-12-10 15:55:31 +01:00