diff --git a/CMakeLists.txt b/CMakeLists.txt index 3eb5d19b..d4f3d143 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,11 +141,9 @@ ExternalProject_Add(lpeg -add_subdirectory(${SYSDIG_DIR}/driver ${PROJECT_BINARY_DIR}/driver) add_subdirectory(${SYSDIG_DIR}/userspace/libscap ${PROJECT_BINARY_DIR}/userspace/libscap) add_subdirectory(${SYSDIG_DIR}/userspace/libsinsp ${PROJECT_BINARY_DIR}/userspace/libsinsp) -add_subdirectory(scripts) add_subdirectory(rules) add_subdirectory(userspace/digwatch) @@ -163,15 +161,13 @@ set(CPACK_GENERATOR DEB RPM TGZ) set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Sysdig ") set(CPACK_DEBIAN_PACKAGE_SECTION "utils") + set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.sysdig.org") -set(CPACK_DEBIAN_PACKAGE_DEPENDS "dkms (>= 2.1.0.0)") -set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/scripts/debian/postinst;${CMAKE_BINARY_DIR}/scripts/debian/prerm") +set(CPACK_DEBIAN_PACKAGE_DEPENDS "sysdig") set(CPACK_RPM_PACKAGE_LICENSE "GPLv2") set(CPACK_RPM_PACKAGE_URL "http://www.sysdig.org") -set(CPACK_RPM_PACKAGE_REQUIRES "dkms, gcc, make, kernel-devel, perl") -set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/scripts/rpm/postinstall") -set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/scripts/rpm/preuninstall") +set(CPACK_RPM_PACKAGE_REQUIRES "sysdig") set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION /usr/src /usr/share/man /usr/share/man/man8) include(CPack) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt deleted file mode 100644 index 4af86d1a..00000000 --- a/scripts/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -configure_file(debian/postinst.in debian/postinst) -configure_file(debian/prerm.in debian/prerm) diff --git a/scripts/debian/postinst.in b/scripts/debian/postinst.in deleted file mode 100755 index e187dac1..00000000 --- a/scripts/debian/postinst.in +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -set -e - -DKMS_PACKAGE_NAME="@PACKAGE_NAME@" -DKMS_VERSION="@PROBE_VERSION@" - -postinst_found=0 - -case "$1" in - configure) - for DKMS_POSTINST in /usr/lib/dkms/common.postinst /usr/share/$DKMS_PACKAGE_NAME/postinst; do - if [ -f $DKMS_POSTINST ]; then - $DKMS_POSTINST $DKMS_PACKAGE_NAME $DKMS_VERSION /usr/share/$DKMS_PACKAGE_NAME "" $2 - postinst_found=1 - break - fi - done - if [ "$postinst_found" -eq 0 ]; then - echo "ERROR: DKMS version is too old and $DKMS_PACKAGE_NAME was not" - echo "built with legacy DKMS support." - echo "You must either rebuild $DKMS_PACKAGE_NAME with legacy postinst" - echo "support or upgrade DKMS to a more current version." - exit 1 - fi - ;; -esac diff --git a/scripts/debian/prerm.in b/scripts/debian/prerm.in deleted file mode 100755 index 8b841812..00000000 --- a/scripts/debian/prerm.in +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -set -e - -DKMS_PACKAGE_NAME="@PACKAGE_NAME@" -DKMS_VERSION="@PROBE_VERSION@" - -case "$1" in - remove|upgrade|deconfigure) - if [ "$(dkms status -m $DKMS_PACKAGE_NAME -v $DKMS_VERSION)" ]; then - dkms remove -m $DKMS_PACKAGE_NAME -v $DKMS_VERSION --all - fi - ;; -esac diff --git a/scripts/rpm/postinstall b/scripts/rpm/postinstall deleted file mode 100755 index 5ec759d2..00000000 --- a/scripts/rpm/postinstall +++ /dev/null @@ -1,13 +0,0 @@ -dkms add -m sysdig -v %{version} --rpm_safe_upgrade -if [ `uname -r | grep -c "BOOT"` -eq 0 ] && [ -e /lib/modules/`uname -r`/build/include ]; then - dkms build -m sysdig -v %{version} - dkms install --force -m sysdig -v %{version} -elif [ `uname -r | grep -c "BOOT"` -gt 0 ]; then - echo -e "" - echo -e "Module build for the currently running kernel was skipped since you" - echo -e "are running a BOOT variant of the kernel." -else - echo -e "" - echo -e "Module build for the currently running kernel was skipped since the" - echo -e "kernel source for this kernel does not seem to be installed." -fi diff --git a/scripts/rpm/preuninstall b/scripts/rpm/preuninstall deleted file mode 100755 index 8fc95ce3..00000000 --- a/scripts/rpm/preuninstall +++ /dev/null @@ -1 +0,0 @@ -dkms remove -m sysdig -v %{version} --all --rpm_safe_upgrade