malscan-fedora.spec 4.27 KB
Newer Older
Josh Grancell's avatar
Josh Grancell committed
1 2 3
Summary: Linux malware scanner for web servers
Name: malscan
Version: 1.7.0
Josh Grancell's avatar
Josh Grancell committed
4
Release: rc9.fedora
Josh Grancell's avatar
Josh Grancell committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
URL:     https://github.com/jgrancell/malscan
License: MIT
Group: Applications/System
BuildRoot: %{_tmppath}/%{name}-root
Requires: bash wget file
Requires: clamav clamav-update
Requires: malscan-db
Source0: malscan-%{version}.tar.gz
BuildArch: noarch

%description
Malscan is a linux malware scanner developed for web servers and desktops, to provide additional signatures and scanning mechanisms to ClamAV.

%prep
%setup

%build

%pre
getent group malscan >/dev/null || groupadd -r malscan
getent passwd malscan >/dev/null || useradd -r -g malscan -s /sbin/nologin -c "Malscan Service User" malscan
exit 0

%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}/etc/malscan
mkdir -p ${RPM_BUILD_ROOT}/usr/local/share/malscan
mkdir -p ${RPM_BUILD_ROOT}/usr/local/bin
mkdir -p ${RPM_BUILD_ROOT}/var/lib/malscan
mkdir -p ${RPM_BUILD_ROOT}/var/log/malscan
mkdir -p ${RPM_BUILD_ROOT}/usr/local/share/man/man1

install malscan.conf ${RPM_BUILD_ROOT}/etc/malscan/malscan.conf
install freshclam.conf ${RPM_BUILD_ROOT}/etc/malscan/freshclam.conf
install malscan ${RPM_BUILD_ROOT}/usr/local/bin/malscan
install malscan.1 ${RPM_BUILD_ROOT}/usr/local/share/man/man1/malscan.1
install LICENSE ${RPM_BUILD_ROOT}/usr/local/share/malscan/malscan.license
install version.txt ${RPM_BUILD_ROOT}/usr/local/share/malscan/version.txt

%clean
rm -rf ${RPM_BUILD_ROOT}

%post

%files
%defattr(-,root,root)
%config(noreplace) %attr(644,root,root) /etc/malscan/malscan.conf
%config(noreplace) %attr(644,root,root) /etc/malscan/freshclam.conf
%attr(755,root,root) /usr/local/bin/malscan
%dir %attr(755,malscan,malscan) /usr/local/share/malscan
%dir %attr(755,malscan,malscan) /var/lib/malscan
%dir %attr(755,malscan,malscan) /var/log/malscan
%attr(644,malscan,malscan) /usr/local/share/malscan/malscan.license
%attr(644,malscan,malscan) /usr/local/share/malscan/version.txt
%doc /usr/local/share/man/man1/malscan.1

%changelog
Josh Grancell's avatar
Josh Grancell committed
62 63 64 65 66 67 68 69 70 71
* Thu Mar 22 2018 Josh Grancell <jgrancell@malscan.org> 1.7.0-rc9
- Fixed: Configuration options are now rejected if not already set in /etc/malscan/malscan.conf. (fixes #12)
- Fixed: Configuration options are now scrubbed to prevent arbitrary code injection. (fixes #12)
- Fixed: Confirms that permissions are now correct for Freshclam. (fixes #13)
- Fixed: Detection counts are now correct. (fixes #14)

* Mon Dec 25 2017 Josh Grancell <jgrancell@malscan.org> 1.7.0-rc8
- Fixed: Minor packaging updates

* Thu Dec 24 2016 Josh Grancell <jgrancell@malscan.org> 1.7.0-rc7
Josh Grancell's avatar
Josh Grancell committed
72 73
- Fixed: Updated RPM build pipeline

Josh Grancell's avatar
Josh Grancell committed
74
* Thu Oct 06 2016 Josh Grancell <jgrancell@malscan.org> 1.7.0-rc6
Josh Grancell's avatar
Josh Grancell committed
75 76
- Fixed: Logs will now have the correct date and time for each entry

Josh Grancell's avatar
Josh Grancell committed
77
* Thu Oct 06 2016 Josh Grancell <jgrancell@malscan.org> 1.7.0-rc5
Josh Grancell's avatar
Josh Grancell committed
78 79
- New: Added pid locking. Only one copy of malscan can run at a time, now.

Josh Grancell's avatar
Josh Grancell committed
80
* Thu Oct 06 2016 Josh Grancell <jgrancell@malscan.org> 1.7.0-rc4
Josh Grancell's avatar
Josh Grancell committed
81 82
- Fixed broken rc3 release

Josh Grancell's avatar
Josh Grancell committed
83
* Thu Oct 06 2016 Josh Grancell <jgrancell@malscan.org> 1.7.0-rc3
Josh Grancell's avatar
Josh Grancell committed
84 85
- Fixed: Configuration options can now only be set by the root user, not by a user in the malscan group (updates #12)

Josh Grancell's avatar
Josh Grancell committed
86
* Thu Oct 06 2016 Josh Grancell <jgrancell@malscan.org> 1.7.0-rc2
Josh Grancell's avatar
Josh Grancell committed
87 88
- Updated: Build number bump for package testing

Josh Grancell's avatar
Josh Grancell committed
89
* Thu Jul 11 2016 Josh Grancell <jgrancell@malscan.org> 1.7.0-rc1
Josh Grancell's avatar
Josh Grancell committed
90 91 92 93 94 95 96 97 98 99 100
- New: Configuration options can now be viewed using the malscan -c command. (fixes #10)
- New: Configuration options can now be set using the malscan -s OPTION value command.
- New: Initial packaging of ClamAV databases to make the first `malscan -u` command run substantially faster.
- Fixed: malscan will now correctly check for sudo
- Fixed: malscan will now check to see if the user is in the malscan group, in lieu of being run as sudo
- Updated: malscan will now use its own freshclam.conf file and /var/lib/malscan signatures directory, to prevent conflicts with ClamAV
- Updated: The malscan file structure has been updated to conform with the FHS. (fixes #7)
- Updated: Removed whitelisting and tripwire scanning until it can be re-worked in a later release
- Updated: Removed reporting until it can be re-developed in a later release.
- Updated: Rewrote the install.sh script to support Fedora, Debian, and CentOS/RHEL 7
- Updated: Created RPM packaging for CentOS/RHEL 6, 7, and Fedora 22/23/24 (fixes #8)