diff options
author | András Czigány | 2021-01-29 04:12:19 +0100 |
---|---|---|
committer | András Czigány | 2021-01-30 18:40:33 +0100 |
commit | 681331bce871c4ece9b9b17d5c50a79a98432fab (patch) | |
tree | 4157aeaf1761bacff7cf11e265e5a8213ea39f65 | |
parent | ab7f9a4fddb651d70e58ffa001e9c5580d75918d (diff) | |
download | aur-681331bce871c4ece9b9b17d5c50a79a98432fab.tar.gz |
fix eea.install, add dkms build scripts
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 45 | ||||
-rw-r--r-- | dkms.conf | 1 | ||||
-rwxr-xr-x | dkms_postinst | 10 |
4 files changed, 42 insertions, 20 deletions
@@ -1,7 +1,7 @@ pkgbase = eea-dkms pkgdesc = ESET Endpoint Antivirus Business for Linux pkgver = 7.1.9.0 - pkgrel = 2 + pkgrel = 3 url = https://www.eset.com/int/business/endpoint-antivirus-linux/ install = eea.install arch = x86_64 @@ -15,9 +15,11 @@ pkgbase = eea-dkms conflicts = eea source = https://download.eset.com/com/eset/apps/business/eea/linux/g2/latest/eeau.x86_64.bin source = dkms.conf + source = dkms_postinst source = linux-5.10.patch sha256sums = 59e6ad38eb3809997e2d5eb91a0195a3c321656f5e8e8c64e61a02a9ac8c922e - sha256sums = cceb98d3ed91939e5ee18f193a4b720a42175664a46cb52a78191526e51ddfe7 + sha256sums = 6a5743e0a975204ab9db97787ca72b9d43bc2203409f1169fb9cbd4c9c0dde5f + sha256sums = 32e44beb570365c1852f87429f56686751626b93eff81214fc84c4d2f93df096 sha256sums = fb0ce96e2586ff6d41e2d707c8738d3ecc14a5b1072bd8973c7a11af647c2f4d pkgname = eea-dkms @@ -6,7 +6,7 @@ _pkgname=eea pkgname="${_pkgname}-dkms" pkgver=7.1.9.0 -pkgrel=2 +pkgrel=3 arch=('x86_64') pkgdesc='ESET Endpoint Antivirus Business for Linux' url='https://www.eset.com/int/business/endpoint-antivirus-linux/' @@ -23,16 +23,19 @@ install=${_pkgname}.install _bundle=${_pkgname}u.${arch}.bin _deb=${_pkgname}-${pkgver}-ubuntu18.${arch}.deb -_kernel_module_dir=var/opt/eset/${_pkgname}/eventd +_kernel_module_dir=/var/opt/eset/${_pkgname}/eventd # https://www.eset.com/int/business/endpoint-antivirus-linux/download/ source=( "https://download.eset.com/com/eset/apps/business/eea/linux/g2/latest/${_bundle}" "dkms.conf" + "dkms_postinst" "linux-5.10.patch" ) + sha256sums=('59e6ad38eb3809997e2d5eb91a0195a3c321656f5e8e8c64e61a02a9ac8c922e' - 'cceb98d3ed91939e5ee18f193a4b720a42175664a46cb52a78191526e51ddfe7' + '0ff7dd79c8811afbc95b121f322bbec4839d7ce7334e5825fa447e3f3ad129e7' + '29108ffcfd83fc9e1b5cdfd6b7a06143f213466a7bfa0222b07490d04900e641' 'fb0ce96e2586ff6d41e2d707c8738d3ecc14a5b1072bd8973c7a11af647c2f4d') prepare() { @@ -54,24 +57,28 @@ prepare() { } pre_upgrade() { -`sed -e "s/^/\t/g" preinst` +`sed -e "s/^/\t/g" preinst | sed -e 's/\[ "$1" = "upgrade" ] || \[ "$1" = "2" ]/true/g'` } post_install() { -`sed -e "s/^/\t/g" postinst00` +`sed -e "s/^/\t/g" postinst00 | sed -e 's/\[ "$1" = "configure" ] || \[ "$1" = "1" ]/true/g'` } post_upgrade() { -`sed -e "s/^/\t/g" postinst` +`sed -e "s/^/\t/g" postinst | sed -e 's/\[ "$1" = "configure" ] || \[ "$1" = "1" ]/true/g' -e 's/\[ "$1" = "2" ]/false/g' -e 's/\[ "$1" = "configure" ] && \[ -n "$2" ]/true/g'` } pre_remove() { -`sed -e "s/^/\t/g" prerm` +`sed -e "s/^/\t/g" prerm | sed -e 's/\[ "$1" = "upgrade" ] || \[ "$1" = "1" ]/false/g'` } post_remove() { -`sed -e "s/^/\t/g" postrm` -}" | sed -e "/#!/d" > ${srcdir}/../${install} +`sed -e "s/^/\t/g" postrm | sed -e 's/\[ "$1" = "upgrade" ] || \[ "$1" = "1" ]/false/g' -e 's/\[ "$1" = "purge" ]/false/g'` + + # remove kernel modules + rm -rf /lib/modules/**/eset/eea + rmdir --ignore-fail-on-non-empty /lib/modules/**/eset +}" | sed -e "/#!/d;s/[ \t]*$//" > ${srcdir}/../${install} } @@ -85,14 +92,15 @@ package() { cd ${srcdir} # fix permissions - chmod 0755 ${pkgdir}/var - chmod 0755 ${pkgdir}/var/log +# chmod 0755 ${pkgdir}/opt +# chmod 0755 ${pkgdir}/var +# chmod 0755 ${pkgdir}/var/log chmod 0700 ${pkgdir}/var/log/eset/${_pkgname}/ +# chmod 0755 ${pkgdir}/var/opt + chmod 0775 ${pkgdir}/var/opt/eset/${_pkgname}/ chmod 1770 ${pkgdir}/var/opt/eset/${_pkgname}/cache/ chmod 1770 ${pkgdir}/var/opt/eset/${_pkgname}/cache/data/ - install -Dm644 "${pkgdir}"/opt/eset/etc/systemd/${_pkgname}.service "${pkgdir}"/usr/lib/systemd/system/${_pkgname}.service - # Patch kernel module to support kernels >=5.10 chmod 0755 ${pkgdir}/${_kernel_module_dir} local i;for i in "${source[@]}";do @@ -105,14 +113,15 @@ package() { msg2 "Installing DKMS module..." - # Copy dkms.conf - install -Dm644 dkms.conf "${pkgdir}"/usr/src/${_pkgname}-${pkgver}/dkms.conf + install -Dm644 dkms.conf "${pkgdir}"/${_kernel_module_dir}/dkms.conf + install -Dm755 dkms_postinst "${pkgdir}"/${_kernel_module_dir}/dkms_postinst # Set name and version sed -e "s/@_PKGNAME@/${_pkgname}/" \ -e "s/@PKGVER@/${pkgver}/" \ - -i "${pkgdir}"/usr/src/${_pkgname}-${pkgver}/dkms.conf + -i "${pkgdir}"/${_kernel_module_dir}/dkms.conf - # Move kernel module sources (including Makefile) to DKMS default - mv ${pkgdir}/${_kernel_module_dir}/* -t "${pkgdir}"/usr/src/${_pkgname}-${pkgver} + # Link kernel module sources (including Makefile) to DKMS default + mkdir "${pkgdir}"/usr/src + ln -s ${_kernel_module_dir} "${pkgdir}"/usr/src/${_pkgname}-${pkgver} } diff --git a/dkms.conf b/dkms.conf index fac1aad600e2..70824a25b5a9 100644 --- a/dkms.conf +++ b/dkms.conf @@ -5,3 +5,4 @@ BUILT_MODULE_NAME[0]="eset_rtp" BUILT_MODULE_LOCATION[0]="eset_rtp" DEST_MODULE_LOCATION[0]="/extra/eset/eea" AUTOINSTALL="yes" +POST_INSTALL=dkms_postinst diff --git a/dkms_postinst b/dkms_postinst new file mode 100755 index 000000000000..777d5af86c63 --- /dev/null +++ b/dkms_postinst @@ -0,0 +1,10 @@ +#!/bin/sh +source ./dkms.conf + +# DKMS only provides $kernelver, so using the default module dir +module_dir=/lib/modules/${kernelver} +module=${module_dir}/${DEST_MODULE_LOCATION[0]}/${BUILT_MODULE_NAME[0]}.ko + +xz -kd ${module}.xz +mkdir -p ${module_dir}/eset/eea +mv ${module} ${module_dir}/eset/eea |