From 53a7cd42ca0750900c7422b2e9fbe4dabb36eb1c Mon Sep 17 00:00:00 2001 From: Mojo Talantikite Date: Mon, 29 Jan 2024 16:35:26 -0500 Subject: [PATCH] more libs --- services/uploads/src/avLayer/build/build.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/services/uploads/src/avLayer/build/build.sh b/services/uploads/src/avLayer/build/build.sh index ff2a2258cd..739de3cba9 100755 --- a/services/uploads/src/avLayer/build/build.sh +++ b/services/uploads/src/avLayer/build/build.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash - set -e -echo "building clamav lambda layer..." +VERSION=${VERSION:-1.0.3-30349} +echo "building clamav (${VERSION}) lambda layer..." uname -m rm -rf bin rm -rf lib @@ -10,12 +10,16 @@ rm lambda_layer.zip || true yum update -y amazon-linux-extras install epel -y -yum install -y cpio yum-utils tar.x86_64 gzip zip +yum install -y cpio yum-utils zip # extract binaries for clamav, json-c, pcre mkdir -p /tmp/build pushd /tmp/build +# Download the clamav package that includes unrar +curl -L --output clamav.rpm "https://www6.atomicorp.com/channels/atomic/centos/7/x86_64/RPMS/clamav-${VERSION}.el7.art.x86_64.rpm" +rpm2cpio clamav.rpm | cpio -vimd + # Download libcrypt.so.1 curl -L --output glibc-2.17-317.el7.x86_64.rpm http://mirror.centos.org/centos/7/os/x86_64/Packages/glibc-2.17-317.el7.x86_64.rpm rpm2cpio glibc*.rpm | cpio -vimd