Skip to content

Commit

Permalink
clamav to build using Solaris Userland
Browse files Browse the repository at this point in the history
  • Loading branch information
awatkins1966 committed Feb 27, 2020
0 parents commit 0c8e85c
Show file tree
Hide file tree
Showing 10 changed files with 2,597 additions and 0 deletions.
1,424 changes: 1,424 additions & 0 deletions COPYING.all

Large diffs are not rendered by default.

89 changes: 89 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END

#
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
#
BUILD_BITS=64
COMPILER=gcc
include ../../make-rules/shared-macros.mk

COMPONENT_NAME= clamav
COMPONENT_VERSION= 0.101.3
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
IPS_COMPONENT_VERSION= $(COMPONENT_VERSION)
BUILD_VERSION= 1

COMPONENT_PROJECT_URL= http://www.clamav.net
#COMPONENT_BUGDB= video/ffmpeg
#COMPONENT_ANITYA_ID= 1865

COMPONENT_ARCHIVE= clamav-$(COMPONENT_VERSION).tar.gz
COMPONENT_ARCHIVE_URL= http://www.clamav.net/downloads/production/$(COMPONENT_ARCHIVE)
COMPONENT_ARCHIVE_HASH=
COMPONENT_MAKE_JOBS= 1

BUILD_STYLE= configure

# configure does not accept many of the options set in
# configure.mk (CC=, CXX=, --bindir, --libdir, --sbindir).
#CONFIGURE_DEFAULT_DIRS set to NO since we need "--libdir=/usr/lib/amd64" set otherwise it could have been YES
CONFIGURE_DEFAULT_DIRS= no
CONFIGURE_OPTIONS += --prefix=/usr
CONFIGURE_OPTIONS += --mandir=/usr/share/man
CONFIGURE_OPTIONS += --bindir=/usr/bin
CONFIGURE_OPTIONS += --libdir=/usr/lib/amd64

# Need to add all config options by hand
CONFIGURE_OPTIONS += --with-user=defang8
CONFIGURE_OPTIONS += --with-group=nogroup
CONFIGURE_OPTIONS += --enable-readdir_r
CONFIGURE_OPTIONS += -enable-milter
#CONFIGURE_OPTIONS += --enable-strni # Not need for 0.101.3+
CONFIGURE_OPTIONS += --sysconfdir=/etc/clamav
CONFIGURE_OPTIONS += --with-dbdir=/var/clamav
CONFIGURE_OPTIONS += --datarootdir=/var/clamav
CONFIGURE_OPTIONS += --sbindir=/usr/lib/inet
#CONFIGURE_OPTIONS += --enable-shared
#CONFIGURE_OPTIONS += --strip=gstrip
#CONFIGURE_OPTIONS += --disable-x86asm
#CONFIGURE_OPTIONS += --mandir=/usr/share/man
#CONFIGURE_OPTIONS += --bindir=/usr/bin
#CONFIGURE_OPTIONS += --libdir=/usr/lib/amd64

COMPONENT_POST_BUILD_ACTION= \
(cd $(PROTO_DIR) ; $(MKDIR) -p var/spool/MIMEDefang var/clamav)

TEST_TARGET= $(NO_TESTS)
include $(WS_MAKE_RULES)/common.mk

# remove warnings that packages are missing
IPS_PKG_NAME= storage/clamav
REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += library/libxml2
REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
REQUIRED_PACKAGES += library/json-c
REQUIRED_PACKAGES += web/curl
REQUIRED_PACKAGES += library/ncurses
REQUIRED_PACKAGES += library/libmilter
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += library/pcre
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# clamav
4 changes: 4 additions & 0 deletions clamav.cron
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Format( minutes hours day-of-month month day-of-week command
#
03 11 * * * find /var/spool/MD-Quarantine -name "qdir*" -type d -mtime +7 -exec rm -rf {} \;
10 * * * * /usr/local/clamav/bin/freshclam --quiet
108 changes: 108 additions & 0 deletions clamav.p5m
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
#
<transform file path=usr.*/man/.+ -> default mangler.man.stability volatile>
set name=pkg.fmri \
value=pkg:/storage/clamav@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.summary value=clamav
set name=com.oracle.info.description \
value="ClamAV is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats"
set name=info.classification \
value="org.opensolaris.category.2008:Applications/System Utilities"
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=org.opensolaris.arc-caseid value=PSARC/YYYY/XXX
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
#
dir path=etc/clamav
file path=etc/clamav/clamav-milter.conf.sample
#
# config. file
file clamd.conf path=etc/clamav/clamd.conf mode=0644 overlay=allow preserve=true
file path=etc/clamav/clamd.conf.sample
file freshclam.conf path=etc/clamav/freshclam.conf mode=0644 overlay=allow \
preserve=true
file path=etc/clamav/freshclam.conf.sample
#
# SMF(5)
#file prof_service-network-clamd path=etc/security/prof_attr.d/service-network-clamd
file clamd.xml path=lib/svc/manifest/network/clamd.xml \
disable_fmri=svc:/application/clamd:default
file path=usr/bin/clamav-config
file path=usr/bin/clambc
file path=usr/bin/clamconf
file path=usr/bin/clamdscan
file path=usr/bin/clamdtop
file path=usr/bin/clamscan
file path=usr/bin/clamsubmit
file path=usr/bin/freshclam
file path=usr/bin/sigtool
file path=usr/include/clamav-types.h
file path=usr/include/clamav.h
link path=usr/lib/$(MACH64)/libclamav.so target=libclamav.so.9.0.2
link path=usr/lib/$(MACH64)/libclamav.so.9 target=libclamav.so.9.0.2
file path=usr/lib/$(MACH64)/libclamav.so.9.0.2
link path=usr/lib/$(MACH64)/libclammspack.so target=libclammspack.so.0.1.0
link path=usr/lib/$(MACH64)/libclammspack.so.0 target=libclammspack.so.0.1.0
file path=usr/lib/$(MACH64)/libclammspack.so.0.1.0
link path=usr/lib/$(MACH64)/libclamunrar.so target=libclamunrar.so.9.0.2
link path=usr/lib/$(MACH64)/libclamunrar.so.9 target=libclamunrar.so.9.0.2
file path=usr/lib/$(MACH64)/libclamunrar.so.9.0.2
link path=usr/lib/$(MACH64)/libclamunrar_iface.so \
target=libclamunrar_iface.so.9.0.2
link path=usr/lib/$(MACH64)/libclamunrar_iface.so.9 \
target=libclamunrar_iface.so.9.0.2
file path=usr/lib/$(MACH64)/libclamunrar_iface.so.9.0.2
file path=usr/lib/$(MACH64)/pkgconfig/libclamav.pc
file path=usr/lib/inet/clamd
file path=usr/sbin/clamav-milter
file path=usr/share/man/man1/clambc.1
file path=usr/share/man/man1/clamconf.1
file path=usr/share/man/man1/clamdscan.1
file path=usr/share/man/man1/clamdtop.1
file path=usr/share/man/man1/clamscan.1
file path=usr/share/man/man1/clamsubmit.1
file path=usr/share/man/man1/freshclam.1
file path=usr/share/man/man1/sigtool.1
file path=usr/share/man/man5/clamav-milter.conf.5
file path=usr/share/man/man5/clamd.conf.5
file path=usr/share/man/man5/freshclam.conf.5
file path=usr/share/man/man8/clamav-milter.8
file path=usr/share/man/man8/clamd.8
dir path=var/clamav owner=clamav group=clamav mode=0755
#
# Add log files (not a good way of doing it)
file clamd.log path=var/log/clamd.log owner=clamav group=clamav mode=0640 \
overlay=allow preserve=true
file freshclam.log path=var/log/freshclam.log owner=clamav group=clamav \
mode=0640 overlay=allow preserve=true
#
dir path=var/spool/MIMEDefang owner=clamav group=clamav mode=0700
#
# user/group (added by pkg)
group groupname=clamav gid=76
user username=clamav ftpuser=false gcos-field="CLAMAV Reserved UID" \
group=clamav uid=76
#
license COPYING.all license=COPYING.all
Loading

0 comments on commit 0c8e85c

Please sign in to comment.