id: add note about conditional compiling to README section

This commit is contained in:
Jan Scheer 2021-07-13 12:24:03 +02:00
parent 36a192c5f6
commit 6111cd6e1b
No known key found for this signature in database
GPG key ID: C62AD4C29E2B9828
4 changed files with 15 additions and 16 deletions

View file

@ -14,7 +14,7 @@ env:
PROJECT_DESC: "Core universal (cross-platform) utilities"
PROJECT_AUTH: "uutils"
RUST_MIN_SRV: "1.51.0" ## MSRV v1.51.0
RUST_COV_SRV: "2020-07-01" ## (~v1.47.0) supported rust version for code coverage; (date required/used by 'coverage') ## !maint: refactor when code coverage support is included in the stable channel
RUST_COV_SRV: "2020-08-01" ## (~v1.47.0) supported rust version for code coverage; (date required/used by 'coverage') ## !maint: refactor when code coverage support is included in the stable channel
on: [push, pull_request]
@ -275,9 +275,6 @@ jobs:
case '${{ matrix.job.os }}' in
macos-latest) brew install coreutils ;; # needed for testing
esac
case '${{ matrix.job.features }}' in
feat_selinux) sudo apt-get -y update ; sudo apt-get -y install libselinux1-dev ;; # TODO: is here the right place for this?
esac
- name: Initialize workflow variables
id: vars
shell: bash

View file

@ -48,14 +48,7 @@ jobs:
- name: Run GNU tests
shell: bash
run: |
# bash uutils/util/run-gnu-test.sh # TODO: revert after testing
bash uutils/util/run-gnu-test.sh tests/id/context.sh
bash uutils/util/run-gnu-test.sh tests/id/no-context.sh
bash uutils/util/run-gnu-test.sh tests/id/smack.sh
bash uutils/util/run-gnu-test.sh tests/id/uid.sh
bash uutils/util/run-gnu-test.sh tests/id/setgid.sh
bash uutils/util/run-gnu-test.sh tests/id/zero.sh
bash uutils/util/run-gnu-test.sh tests/id/gnu-zero-uids.sh
bash uutils/util/run-gnu-test.sh
- name: Extract testing info
shell: bash
run: |

View file

@ -138,6 +138,11 @@ feat_os_unix_musl = [
#
"feat_require_unix",
]
# "feat_selinux" == set of utilities providing support for SELinux Security Context if enabled with `--features feat_selinux`.
# NOTE:
# The selinux(-sys) crate requires `libselinux` headers and shared library to be accessible in the C toolchain at compile time.
# Running a uutils compiled with `feat_selinux` requires an SELinux enabled Kernel at run time.
feat_selinux = ["id/selinux", "selinux"]
## feature sets with requirements (restricting cross-platform availability)
#
# ** NOTE: these `feat_require_...` sets should be minimized as much as possible to encourage cross-platform availability of utilities
@ -146,7 +151,6 @@ feat_os_unix_musl = [
feat_require_crate_cpp = [
"stdbuf",
]
feat_selinux = ["id/selinux", "selinux"]
# "feat_require_unix" == set of utilities requiring support which is only available on unix platforms (as of 2020-04-23)
feat_require_unix = [
"chgrp",

View file

@ -5,7 +5,10 @@
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
//
// spell-checker:ignore (ToDO) asid auditid auditinfo auid cstr egid emod euid getaudit getlogin gflag nflag pline rflag termid uflag gsflag zflag cflag
// README:
// This was originally based on BSD's `id`
// (noticeable in functionality, usage text, options text, etc.)
// and synced with:
@ -25,8 +28,10 @@
//
// * Help text based on BSD's `id` manpage and GNU's `id` manpage.
//
// spell-checker:ignore (ToDO) asid auditid auditinfo auid cstr egid emod euid getaudit getlogin gflag nflag pline rflag termid uflag gsflag zflag cflag
// * This passes GNU's coreutils Test suite (8.32) for "tests/id/context.sh" if compiled with
// `--features feat_selinux`. It should also pass "tests/id/no-context.sh", but that depends on
// `uu_ls -Z` being implemented and therefore fails at the moment
//
#![allow(non_camel_case_types)]
#![allow(dead_code)]