mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-23 08:28:48 +00:00
chore(scripts,cmake): dialog is an optional dep, do not list it among deps.
Cleaned up unused vars in postinst scripts. Finally, only show dialog window in interactive shells. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
parent
9232383616
commit
818f717622
@ -51,7 +51,7 @@ if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
|
|||||||
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "arm64")
|
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "arm64")
|
||||||
endif()
|
endif()
|
||||||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://www.falco.org")
|
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://www.falco.org")
|
||||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "dkms (>= 2.1.0.0), dialog")
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "dkms (>= 2.1.0.0)")
|
||||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
|
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
|
||||||
"${CMAKE_BINARY_DIR}/scripts/debian/postinst;${CMAKE_BINARY_DIR}/scripts/debian/prerm;${CMAKE_BINARY_DIR}/scripts/debian/postrm;${PROJECT_SOURCE_DIR}/cmake/cpack/debian/conffiles"
|
"${CMAKE_BINARY_DIR}/scripts/debian/postinst;${CMAKE_BINARY_DIR}/scripts/debian/prerm;${CMAKE_BINARY_DIR}/scripts/debian/postrm;${PROJECT_SOURCE_DIR}/cmake/cpack/debian/conffiles"
|
||||||
)
|
)
|
||||||
@ -59,7 +59,7 @@ set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
|
|||||||
set(CPACK_RPM_PACKAGE_LICENSE "Apache v2.0")
|
set(CPACK_RPM_PACKAGE_LICENSE "Apache v2.0")
|
||||||
set(CPACK_RPM_PACKAGE_ARCHITECTURE, "amd64")
|
set(CPACK_RPM_PACKAGE_ARCHITECTURE, "amd64")
|
||||||
set(CPACK_RPM_PACKAGE_URL "https://www.falco.org")
|
set(CPACK_RPM_PACKAGE_URL "https://www.falco.org")
|
||||||
set(CPACK_RPM_PACKAGE_REQUIRES "dkms, kernel-devel, systemd, dialog")
|
set(CPACK_RPM_PACKAGE_REQUIRES "dkms, kernel-devel, systemd")
|
||||||
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/scripts/rpm/postinstall")
|
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/scripts/rpm/postinstall")
|
||||||
set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/scripts/rpm/preuninstall")
|
set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/scripts/rpm/preuninstall")
|
||||||
set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/scripts/rpm/postuninstall")
|
set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/scripts/rpm/postuninstall")
|
||||||
|
@ -15,7 +15,7 @@ RUN if [ "$TARGETARCH" = "amd64" ] ; then curl -L -o grpcurl.tar.gz \
|
|||||||
https://github.com/fullstorydev/grpcurl/releases/download/v1.8.6/grpcurl_1.8.6_linux_arm64.tar.gz; \
|
https://github.com/fullstorydev/grpcurl/releases/download/v1.8.6/grpcurl_1.8.6_linux_arm64.tar.gz; \
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
RUN dnf install -y python-pip python docker findutils jq unzip && dnf clean all
|
RUN dnf install -y python-pip python docker findutils jq unzip sed curl && dnf clean all
|
||||||
ENV PATH="/root/.local/bin/:${PATH}"
|
ENV PATH="/root/.local/bin/:${PATH}"
|
||||||
RUN pip install --user avocado-framework==69.0
|
RUN pip install --user avocado-framework==69.0
|
||||||
RUN pip install --user avocado-framework-plugin-varianter-yaml-to-mux==69.0
|
RUN pip install --user avocado-framework-plugin-varianter-yaml-to-mux==69.0
|
||||||
|
@ -17,12 +17,11 @@
|
|||||||
#
|
#
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
DKMS_PACKAGE_NAME="@PACKAGE_NAME@"
|
|
||||||
DKMS_VERSION="@DRIVER_VERSION@"
|
|
||||||
NAME="@PACKAGE_NAME@"
|
|
||||||
|
|
||||||
chosen_driver="kmod"
|
chosen_driver="kmod"
|
||||||
|
|
||||||
|
if [ -z "$PS1" ]; then
|
||||||
|
echo "Skipping driver selection in non-interactive mode"
|
||||||
|
else
|
||||||
case "$1" in
|
case "$1" in
|
||||||
configure)
|
configure)
|
||||||
if [ -x /usr/bin/dialog ]; then
|
if [ -x /usr/bin/dialog ]; then
|
||||||
@ -44,6 +43,10 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
case "$chosen_driver" in
|
case "$chosen_driver" in
|
||||||
"kmod")
|
"kmod")
|
||||||
falco-driver-loader module
|
falco-driver-loader module
|
||||||
@ -52,8 +55,6 @@ case "$1" in
|
|||||||
falco-driver-loader bpf
|
falco-driver-loader bpf
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Based off what debhelper dh_systemd_enable/13.3.4 would have added
|
# Based off what debhelper dh_systemd_enable/13.3.4 would have added
|
||||||
# ref: https://www.debian.org/doc/manuals/debmake-doc/ch05.en.html#debhelper
|
# ref: https://www.debian.org/doc/manuals/debmake-doc/ch05.en.html#debhelper
|
||||||
|
@ -16,10 +16,11 @@
|
|||||||
#
|
#
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
mod_version="@DRIVER_VERSION@"
|
|
||||||
|
|
||||||
chosen_driver="kmod"
|
chosen_driver="kmod"
|
||||||
|
|
||||||
|
if [ -z "$PS1" ]; then
|
||||||
|
echo "Skipping driver selection in non-interactive mode"
|
||||||
|
else
|
||||||
if [ -x /usr/bin/dialog ]; then
|
if [ -x /usr/bin/dialog ]; then
|
||||||
CHOICE=$(dialog --clear --backtitle "Choose your preferred driver" --title "Falco driver" --menu "Choose one of the following options:" 15 40 4 \
|
CHOICE=$(dialog --clear --backtitle "Choose your preferred driver" --title "Falco driver" --menu "Choose one of the following options:" 15 40 4 \
|
||||||
1 "Kmod" \
|
1 "Kmod" \
|
||||||
@ -39,6 +40,8 @@ if [ -x /usr/bin/dialog ]; then
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
case "$chosen_driver" in
|
case "$chosen_driver" in
|
||||||
"kmod")
|
"kmod")
|
||||||
falco-driver-loader module
|
falco-driver-loader module
|
||||||
|
Loading…
Reference in New Issue
Block a user