Skip to content

Commit

Permalink
use last version
Browse files Browse the repository at this point in the history
  • Loading branch information
mojotalantikite committed Jan 29, 2024
1 parent 53a7cd4 commit 2a636a8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions services/uploads/src/avLayer/build/build.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
#!/usr/bin/env bash
set -e

VERSION=${VERSION:-1.0.3-30349}
echo "building clamav (${VERSION}) lambda layer..."
echo "building clamav lambda layer..."
uname -m
rm -rf bin
rm -rf lib
rm lambda_layer.zip || true

yum update -y
amazon-linux-extras install epel -y
yum install -y cpio yum-utils 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
curl -L --output clamav-0.103.3-22187.el7.art.x86_64.rpm http://www6.atomicorp.com/channels/atomic/centos/7/x86_64/RPMS/clamav-0.104.4-27025.el7.art.x86_64.rpm
rpm2cpio clamav-0*.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
Expand Down Expand Up @@ -63,7 +62,7 @@ popd

mkdir -p bin lib

cp /tmp/build/usr/bin/clamscan /tmp/build/usr/bin/freshclam /tmp/build/usr/bin/clamdscan bin/.
cp /tmp/build/usr/bin/clamscan /tmp/build/usr/bin/freshclam bin/.
cp -R /tmp/build/usr/lib64/* lib/.
cp -R /tmp/build/lib64/* lib/.
cp freshclam.conf bin/freshclam.conf
Expand Down

0 comments on commit 2a636a8

Please sign in to comment.