Skip to contentSkip to conversation

selinux-testsuite: update the dependencies in README.md

PATCH Applied Paul Moore 3 participants 7 messages Nov 27, 2019 – Dec 2, 2019 SELinux security module

lore
Share & tools
lore

Paul Moore

author maintainer
#0 lore raw

PATCH 1/1 selinux-testsuite: update the dependencies in README.md

From: Paul Moore <[email protected]>

The new kernel module tests added in a68d583c2a70 ("selinux-testsuite:
Add kernel module tests") require the kernel-devel package on Fedora, make sure we list that in the README.md file.

---
 README.md |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
README.md +3 -1
index e845df8..4352796 100644
@@ -53,6 +53,7 @@ similar dependencies):
 * attr _(tools used by the overlayfs tests)_
 * libbpf-devel _(tools used by the bpf tests)_
 * keyutils-libs-devel _(tools used by the keys tests)_
+* kernel-devel _(used by the kernel module tests)_
 
 On a modern Fedora system you can install these dependencies with the
 following command:
@@ -69,7 +70,8 @@ following command:
 		lksctp-tools-devel \
 		attr \
 		libbpf-devel \
-		keyutils-libs-devel
+		keyutils-libs-devel \
+		kernel-devel
 
 The testsuite requires a pre-existing base policy configuration of SELinux,
 using either the old example policy or the reference policy as the baseline.
#1 lore raw
Quoted 5 lines · Paul Moore

From: Paul Moore <[email protected]>

The new kernel module tests added in a68d583c2a70 ("selinux-testsuite:
Add kernel module tests") require the kernel-devel package on Fedora, make sure we list that in the README.md file.

Thanks, I should have thought of this when reviewing the patch :)

Quoted 19 lines
---
 README.md |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
README.md +1 -0
index e845df8..4352796 100644
@@ -53,6 +53,7 @@ similar dependencies):
 * attr _(tools used by the overlayfs tests)_
 * libbpf-devel _(tools used by the bpf tests)_
 * keyutils-libs-devel _(tools used by the keys tests)_
+* kernel-devel _(used by the kernel module tests)_
 
 On a modern Fedora system you can install these dependencies with the
 following command:

README.md following command: · line 74

Quoted 6 lines
README.md +2 -1
@@ -69,7 +70,8 @@ following command:
                lksctp-tools-devel \
                attr \
                libbpf-devel \
-               keyutils-libs-devel
+               keyutils-libs-devel \
+               kernel-devel

I'm wondering whether we should rather put kernel-devel-$(uname -r) here, to make sure that the right package is installed that corresponds to the running kernel version (which may not be the latest version that dnf will fetch). Or if the use of shell expansion feels too clever, then we should at last document that the command may not always install the version that is needed.

README.md following command: · line 77

Quoted 3 lines
README.md +0 -0
 The testsuite requires a pre-existing base policy configuration of SELinux,
 using either the old example policy or the reference policy as the baseline.

--
Ondrej Mosnacek <omosnace at redhat dot com>
Software Engineer, Security Technologies
Red Hat, Inc.

#2 lore raw
Quoted 25 lines · Ondrej Mosnacek
Quoted 5 lines · Paul Moore

From: Paul Moore <[email protected]>

The new kernel module tests added in a68d583c2a70 ("selinux-testsuite:
Add kernel module tests") require the kernel-devel package on Fedora, make sure we list that in the README.md file.

Thanks, I should have thought of this when reviewing the patch :)

Quoted 16 lines
---
  README.md |    4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
README.md +1 -0
index e845df8..4352796 100644
@@ -53,6 +53,7 @@ similar dependencies):
  * attr _(tools used by the overlayfs tests)_
  * libbpf-devel _(tools used by the bpf tests)_
  * keyutils-libs-devel _(tools used by the keys tests)_
+* kernel-devel _(used by the kernel module tests)_
 
Quoted 16 lines

README.md following command: · line 74

Quoted 9 lines
README.md +2 -1
  On a modern Fedora system you can install these dependencies with the
  following command:
@@ -69,7 +70,8 @@ following command:
                 lksctp-tools-devel \
                 attr \
                 libbpf-devel \
-               keyutils-libs-devel
+               keyutils-libs-devel \
+               kernel-devel

I'm wondering whether we should rather put kernel-devel-$(uname -r) here, to make sure that the right package is installed that corresponds to the running kernel version (which may not be the latest version that dnf will fetch). Or if the use of shell expansion feels too clever, then we should at last document that the command may not always install the version that is needed.

I'm often testing kernels I build myself and not via rpm.

Quoted 10 lines

README.md following command: · line 77

Quoted 4 lines
README.md +0 -0
  The testsuite requires a pre-existing base policy configuration of SELinux,
  using either the old example policy or the reference policy as the baseline.

--
Ondrej Mosnacek <omosnace at redhat dot com>
Software Engineer, Security Technologies
Red Hat, Inc.

#3 lore raw
Quoted 43 lines · Stephen Smalley
Quoted 25 lines · Ondrej Mosnacek
Quoted 5 lines · Paul Moore

From: Paul Moore <[email protected]>

The new kernel module tests added in a68d583c2a70 ("selinux-testsuite:
Add kernel module tests") require the kernel-devel package on Fedora, make sure we list that in the README.md file.

Thanks, I should have thought of this when reviewing the patch :)

Quoted 16 lines
---
  README.md |    4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
README.md +1 -0
index e845df8..4352796 100644
@@ -53,6 +53,7 @@ similar dependencies):
  * attr _(tools used by the overlayfs tests)_
  * libbpf-devel _(tools used by the bpf tests)_
  * keyutils-libs-devel _(tools used by the keys tests)_
+* kernel-devel _(used by the kernel module tests)_
 
Quoted 16 lines

README.md following command: · line 74

Quoted 9 lines
README.md +2 -1
  On a modern Fedora system you can install these dependencies with the
  following command:
@@ -69,7 +70,8 @@ following command:
                 lksctp-tools-devel \
                 attr \
                 libbpf-devel \
-               keyutils-libs-devel
+               keyutils-libs-devel \
+               kernel-devel

I'm wondering whether we should rather put kernel-devel-$(uname -r) here, to make sure that the right package is installed that corresponds to the running kernel version (which may not be the latest version that dnf will fetch). Or if the use of shell expansion feels too clever, then we should at last document that the command may not always install the version that is needed.

Quoted 1 line

I'm often testing kernels I build myself and not via rpm.

Right, then the command would just fail... :/ But it might be slightly faster to realize that you can just delete the kernel-devel line from the command when you're running a local kernel build, than figuring out why the test failed to build after a successful run of the command (in the non-latest stock kernel scenario). But I'm fine with just documenting it if we want to keep it simple.

Quoted 10 lines
Quoted 10 lines

README.md following command: · line 77

Quoted 5 lines
README.md +0 -0
  The testsuite requires a pre-existing base policy configuration of SELinux,
  using either the old example policy or the reference policy as the baseline.

--
Ondrej Mosnacek <omosnace at redhat dot com>
Software Engineer, Security Technologies
Red Hat, Inc.

--
Ondrej Mosnacek <omosnace at redhat dot com>
Software Engineer, Security Technologies
Red Hat, Inc.

author maintainer
#4 lore raw
Quoted 44 lines · Ondrej Mosnacek
Quoted 43 lines · Stephen Smalley
Quoted 41 lines · Ondrej Mosnacek
Quoted 5 lines · Paul Moore

From: Paul Moore <[email protected]>

The new kernel module tests added in a68d583c2a70 ("selinux-testsuite:
Add kernel module tests") require the kernel-devel package on Fedora, make sure we list that in the README.md file.

Thanks, I should have thought of this when reviewing the patch :)

Quoted 19 lines
---
  README.md |    4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
README.md +1 -0
index e845df8..4352796 100644
@@ -53,6 +53,7 @@ similar dependencies):
  * attr _(tools used by the overlayfs tests)_
  * libbpf-devel _(tools used by the bpf tests)_
  * keyutils-libs-devel _(tools used by the keys tests)_
+* kernel-devel _(used by the kernel module tests)_
 
  On a modern Fedora system you can install these dependencies with the
  following command:

README.md following command: · line 74

Quoted 6 lines
README.md +2 -1
@@ -69,7 +70,8 @@ following command:
                 lksctp-tools-devel \
                 attr \
                 libbpf-devel \
-               keyutils-libs-devel
+               keyutils-libs-devel \
+               kernel-devel

I'm wondering whether we should rather put kernel-devel-$(uname -r) here, to make sure that the right package is installed that corresponds to the running kernel version (which may not be the latest version that dnf will fetch). Or if the use of shell expansion feels too clever, then we should at last document that the command may not always install the version that is needed.

Quoted 8 lines
Quoted 1 line

I'm often testing kernels I build myself and not via rpm.

Right, then the command would just fail... :/ But it might be slightly faster to realize that you can just delete the kernel-devel line from the command when you're running a local kernel build, than figuring out why the test failed to build after a successful run of the command (in the non-latest stock kernel scenario). But I'm fine with just documenting it if we want to keep it simple.

I don't feel that strongly about it either way, but one could argue that if start versioning the kernel-devel package, why not all the other packages? What if you have a locally modified BPF userspace? Infiniband? I think you get the idea.

My opinion is that if you are going off into the weeds by replacing the kernel or portions of your userspace, you should know well enough how to ensure that they are properly installed ;)

Signature · 2 lines
paul moore
www.paul-moore.com
Acked-by on v1 1/1
#5 lore raw
In reply to Paul Moore
Quoted 7 lines · Paul Moore

From: Paul Moore <[email protected]>

The new kernel module tests added in a68d583c2a70 ("selinux-testsuite:
Add kernel module tests") require the kernel-devel package on Fedora, make sure we list that in the README.md file.

Quoted 27 lines
---
  README.md |    4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
README.md +3 -1
index e845df8..4352796 100644
@@ -53,6 +53,7 @@ similar dependencies):
  * attr _(tools used by the overlayfs tests)_
  * libbpf-devel _(tools used by the bpf tests)_
  * keyutils-libs-devel _(tools used by the keys tests)_
+* kernel-devel _(used by the kernel module tests)_
 
  On a modern Fedora system you can install these dependencies with the
  following command:
@@ -69,7 +70,8 @@ following command:
  		lksctp-tools-devel \
  		attr \
  		libbpf-devel \
-		keyutils-libs-devel
+		keyutils-libs-devel \
+		kernel-devel
 
  The testsuite requires a pre-existing base policy configuration of SELinux,
  using either the old example policy or the reference policy as the baseline.
#6 lore raw
In reply to Paul Moore
Quoted 7 lines · Paul Moore

From: Paul Moore <[email protected]>

The new kernel module tests added in a68d583c2a70 ("selinux-testsuite:
Add kernel module tests") require the kernel-devel package on Fedora, make sure we list that in the README.md file.

Thanks, applied.

Quoted 27 lines
---
  README.md |    4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
README.md +3 -1
index e845df8..4352796 100644
@@ -53,6 +53,7 @@ similar dependencies):
  * attr _(tools used by the overlayfs tests)_
  * libbpf-devel _(tools used by the bpf tests)_
  * keyutils-libs-devel _(tools used by the keys tests)_
+* kernel-devel _(used by the kernel module tests)_
 
  On a modern Fedora system you can install these dependencies with the
  following command:
@@ -69,7 +70,8 @@ following command:
  		lksctp-tools-devel \
  		attr \
  		libbpf-devel \
-		keyutils-libs-devel
+		keyutils-libs-devel \
+		kernel-devel
 
  The testsuite requires a pre-existing base policy configuration of SELinux,
  using either the old example policy or the reference policy as the baseline.