@cryptotaxi247 / netdata-1 / commits / 067089dbe

Remove obsoleted libraries from install/uninstall scripts (#9661)

Vladimir Kobal committed Aug 6, 2020 at 18:43 UTC 067089dbe9f05d25ffad3e4fe3228802ad5142b1
3 files changed -35
contrib/debian/rules
-3
@@ -96,9 +96,6 @@ override_dh_installdocs:
96 --target $(TOP)/usr/share/doc/netdata/ \
97 {} \;
98
99 -override_dh_shlibdeps:
100 - dh_shlibdeps -X libnetdata_ebpf
101 -
99 override_dh_fixperms:
100 dh_fixperms
101
netdata-installer.sh
-2
@@ -1452,9 +1452,7 @@ install_ebpf() {
1452 # chown everything to root:netdata before we start copying out of our package
1453 run chown -R root:netdata "${tmp}"
1454
1455 - run cp -a -v "${tmp}"/library/* "${NETDATA_PREFIX}"/usr/libexec/netdata/plugins.d
1455 run cp -a -v "${tmp}"/*netdata_ebpf_*.o "${NETDATA_PREFIX}"/usr/libexec/netdata/plugins.d
1457 - run cp -a -v "${tmp}"/libnetdata_ebpf.so.* "${NETDATA_PREFIX}"/usr/libexec/netdata/plugins.d
1456
1457 rm -rf "${tmp}"
1458
packaging/installer/netdata-uninstaller.sh
-30
@@ -440,34 +440,6 @@ stop_all_netdata() {
440
441 trap quit_msg EXIT
442
443 -uninstall_ebpf() {
444 - # Removing NetData's libexec directory is taken care of which is where we
445 - # installed the rest of the shared libraires for the eBPF Collector.
446 -
447 - echo >&2 " Finding lib directory ..."
448 - libdir=
449 - libdir="$(ldconfig -v 2> /dev/null | grep ':$' | sed -e 's/://' | sort -r | grep 'usr' | head -n 1)"
450 - if [ -z "${libdir}" ]; then
451 - libdir="$(ldconfig -v 2> /dev/null | grep ':$' | sed -e 's/://' | sort -r | head -n 1)"
452 - fi
453 -
454 - if [ -z "${libdir}" ]; then
455 - echo >&2 "Unable to find the system lib directory we installed eBPF ebpf_kernel.so to ..."
456 - user_input "Press ENTER to search your system (which may take some time) ..."
457 - find / -type f -name 'libbpf_kernel.so' -o -name 'libbpf_kernel.so.0'
458 - echo >&2 "Please manually delete these files"
459 - return 1
460 - fi
461 -
462 - rm_file "${libdir}/libbpf_kernel.so.0"
463 - rm_file "${libdir}/libbpf_kernel.so"
464 - run ldconfig
465 -
466 - echo >&2 "ePBF uninstall all done!"
467 -
468 - return 0
469 -}
470 -
443 #shellcheck source=/dev/null
444 source "${ENVIRONMENT_FILE}" || exit 1
445
@@ -499,8 +471,6 @@ else
471 rm_dir "/etc/netdata"
472 fi
473
502 -uninstall_ebpf || echo >&2 "Unable to remove eBPF files automatically"
503 -
474 FILE_REMOVAL_STATUS=1
475
476 #### REMOVE NETDATA USER FROM ADDED GROUPS