Skip to content

Commit 15d805e

Browse files
Merge pull request #1356 from jan-cerny/oscap_podman_cmake
Add `oscap-podman` to CMake and add man page for `oscap-podman`
2 parents 10af6a9 + fc1c6a0 commit 15d805e

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ endif()
289289
cmake_dependent_option(ENABLE_OSCAP_UTIL_AS_RPM "enable the scap-as-rpm utility, this lets you package SCAP data as RPMs" ON "NOT WIN32" OFF)
290290
cmake_dependent_option(ENABLE_OSCAP_UTIL_SSH "enables the oscap-ssh utility, this lets you scan remote machines over ssh" ON "NOT WIN32" OFF)
291291
cmake_dependent_option(ENABLE_OSCAP_UTIL_VM "enables the oscap-vm utility, this lets you scan VMs and VM storage images" ON "NOT WIN32" OFF)
292+
cmake_dependent_option(ENABLE_OSCAP_UTIL_PODMAN "enables the oscap-podman utility, this lets you scan Podman containers and container images" ON "NOT WIN32" OFF)
292293
cmake_dependent_option(ENABLE_OSCAP_UTIL_CHROOT "enables the oscap-chroot utility, this lets you scan entire chroots using offline scanning" ON "NOT WIN32" OFF)
293294

294295
# ---------- TEST-SUITE SWITCHES
@@ -355,6 +356,7 @@ message(STATUS "oscap-docker: ${ENABLE_OSCAP_UTIL_DOCKER}")
355356
message(STATUS "scap-as-rpm: ${ENABLE_OSCAP_UTIL_AS_RPM}")
356357
message(STATUS "oscap-ssh: ${ENABLE_OSCAP_UTIL_SSH}")
357358
message(STATUS "oscap-vm: ${ENABLE_OSCAP_UTIL_VM}")
359+
message(STATUS "oscap-podman: ${ENABLE_OSCAP_UTIL_PODMAN}")
358360
message(STATUS "oscap-chroot: ${ENABLE_OSCAP_UTIL_CHROOT}")
359361
message(STATUS " ")
360362

utils/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ if(ENABLE_OSCAP_UTIL_VM)
7171
DESTINATION "${CMAKE_INSTALL_MANDIR}/man8"
7272
)
7373
endif()
74+
if(ENABLE_OSCAP_UTIL_PODMAN)
75+
install(PROGRAMS "oscap-podman"
76+
DESTINATION ${CMAKE_INSTALL_BINDIR}
77+
)
78+
install(FILES "oscap-podman.8"
79+
DESTINATION "${CMAKE_INSTALL_MANDIR}/man8"
80+
)
81+
endif()
7482
if(ENABLE_OSCAP_UTIL_AS_RPM)
7583
install(PROGRAMS "scap-as-rpm"
7684
DESTINATION ${CMAKE_INSTALL_BINDIR}

utils/oscap-podman.8

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.TH oscap-podman "8" "June 2019" "Red Hat, Inc." "System Administration Utilities"
2+
3+
.SH NAME
4+
oscap-podman \- Tool for offline SCAP evaluation of Podman container images and Podman containers
5+
.SH DESCRIPTION
6+
oscap-podman runs oscap tool on a given container image or container.
7+
8+
This script cannot run in rootless mode.
9+
10+
.SH USAGE
11+
12+
Usage of the tool mimics usage and options of oscap(8) tool.
13+
14+
.SS Compliance scan of Podman container image:
15+
oscap-podman IMAGE_NAME OSCAP_ARGUMENT [OSCAP_ARGUMENT...]
16+
17+
.SS Compliance scan of Podman container:
18+
oscap-podman CONTAINER_NAME OSCAP_ARGUMENT [OSCAP_ARGUMENT...]
19+
20+
Refer to oscap(8) to learn about OSCAP_ARGUMENT options.
21+
22+
.SH REPORTING BUGS
23+
.nf
24+
Please report bugs using https://github.com/OpenSCAP/openscap/issues
25+
26+
.SH AUTHORS
27+
.nf
28+
Jan Černý <[email protected]>
29+
.fi

0 commit comments

Comments
 (0)