Skip to content

Commit

Permalink
Update 5.2.1-1 (#410)
Browse files Browse the repository at this point in the history
* Initial Refactor for 5.1.4-1

* Reorder docs and patch processing

* Explicit targets for copy

* Update install phase of specs

* Disable AutoReqProv

* Update install splash

* Refactor post install

* Update README

* Distinguish rhel and suse rpms in naming
Clarify naming in README
Log ms-configure to /var/log

* Do not automatically enable mailscanner on debian builds
Move notes in packages to end of ms-configure
Alter notes in specs to notify user to run ms-configure

* Correct package name in copy

* Move mtagroup creation back to spec

* patch.diff no longer valid

* Remove patch.diff from spec and build

* Bump to version 5.2.1-1 for major changes

* ATTENTION block added to README

* Cosmetic changes to README

* Tab cleanup of README

* Revert not enabling mailscanner during install

* Explicit destination file for copy on suse builds

* Reorder doc copies for tarballing

* Remove unneeded subdirectory in suse build

* 5.2.1-1 Builds
  • Loading branch information
shawniverson authored Nov 3, 2019
1 parent 7b5b644 commit 0a87daf
Show file tree
Hide file tree
Showing 35 changed files with 979 additions and 820 deletions.
25 changes: 11 additions & 14 deletions Build.debian
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#!/usr/bin/env bash

# Jerry Benton
# 24 APR 2016
#
# Shawn Iverson <shawniverson@efa-project.org>
# 22 OCT 2018
# Updated: 2 Nov 2019
# MailScanner Team <https://www.mailscanner.info>
#
#
# this Build.debian script should be located in the base
Expand Down Expand Up @@ -107,16 +104,16 @@ chmod +x $WORK/etc/cron.hourly/*
# create a working dir for package
PKGTMP="/tmp/deb.$$/";
mkdir -p $PKGTMP/MailScanner-${FULLMSVER}
fakeroot dpkg -b $WORK $PKGTMP/MailScanner-${FULLMSVER}/MailScanner-$FULLMSVER-noarch.deb
cp $DEVBASEDIR/debian/install.sh $PKGTMP/MailScanner-${FULLMSVER}
cp $DEVBASEDIR/changelog $PKGTMP/MailScanner-${FULLMSVER}
cp $DEVBASEDIR/LICENSE $PKGTMP/MailScanner-${FULLMSVER}
cp $DEVBASEDIR/README $PKGTMP/MailScanner-${FULLMSVER}
cp $DEVBASEDIR/common/patch/patch.diff $PKGTMP/MailScanner-${FULLMSVER}
chmod +x $PKGTMP/MailScanner-${FULLMSVER}/install.sh
#cp $DEVBASEDIR/debian/install.sh $PKGTMP/MailScanner-${FULLMSVER}
mkdir -p $WORK/usr/share/MailScanner/doc
cp $DEVBASEDIR/changelog $WORK/usr/share/MailScanner/doc/
cp $DEVBASEDIR/LICENSE $WORK/usr/share/MailScanner/doc/
cp $DEVBASEDIR/README $WORK/usr/share/MailScanner/doc/
fakeroot dpkg -b $WORK $PKGTMP/MailScanner-$FULLMSVER-noarch.deb
#chmod +x $PKGTMP/MailScanner-${FULLMSVER}/install.sh
cd $PKGTMP
tar czf MailScanner-${FULLMSVER}.deb.tar.gz *
mv -f MailScanner-${FULLMSVER}.deb.tar.gz $FILEOUT
#tar czf MailScanner-${FULLMSVER}.deb.tar.gz *
mv -f MailScanner-${FULLMSVER}-noarch.deb $FILEOUT

rm -rf $PKGTMP
rm -rf $WORK
5 changes: 2 additions & 3 deletions Build.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash

# Checked and updated to be more streamlined by
# Jerry Benton
# 3 MAY 2016
# Updated 2 Nov 2019
# MailScanner Team <https://www.mailscanner.info>

# this Build.tarball script should be located in the base
# directory when run.
Expand Down
48 changes: 23 additions & 25 deletions Build.rhel
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#!/usr/bin/env bash
#
# Written by:
# Jerry Benton < mailscanner@mailborder.com >
# 13 FEB 2015
# 18 April 2016 - Updated
#
# Shawn Iverson <shawniverson@efa-project.org>
# 22 October 2018
# Updated: 2 Nov 2019
# MailScanner Team <https://www.mailscanner.info>
#
# This script will build the latest RPM install
# package and put it in /msbuilds/rpm
Expand Down Expand Up @@ -127,6 +122,12 @@ chmod +x $WORK/usr/lib/MailScanner/init/*
chmod +x $WORK/etc/cron.daily/*
chmod +x $WORK/etc/cron.hourly/*

# Doc and patches
mkdir -p $WORK/usr/share/MailScanner/doc
cp $DEVBASEDIR/changelog $WORK/usr/share/MailScanner/doc/changelog
cp $DEVBASEDIR/README $WORK/usr/share/MailScanner/doc/README
cp $DEVBASEDIR/LICENSE $WORK/usr/share/MailScanner/doc/LICENSE

# Build the src tarball for RPM construction
cd $WORK
cd ..
Expand All @@ -135,34 +136,31 @@ tar czf ~/rpmbuild/SOURCES/MailScanner-${MSVERSION}.tgz MailScanner-${MSVERSION}
# return to where i started
cd $THISCURDIR

# create the output dir in $RPMOUT
if [ -d $RPMOUT/MailScanner-$VERSION ]; then
rm -rf $RPMOUT/MailScanner-$VERSION
fi
mkdir -p $RPMOUT/MailScanner-$VERSION
# create the output dir $RPMOUT
# if [ -d $RPMOUT ]; then
# rm -rf $RPMOUT
# fi
# mkdir -p $RPMOUT

# copy some file we need
cp $SRCDIR/install.sh $RPMOUT/MailScanner-$VERSION/
cp $DEVBASEDIR/README $RPMOUT/MailScanner-$VERSION/
cp $DEVBASEDIR/LICENSE $RPMOUT/MailScanner-$VERSION/
cp $DEVBASEDIR/common/patch/patch.diff $RPMOUT/MailScanner-$VERSION/
find $RPMOUT/MailScanner-$VERSION -name 'install.sh' -exec chmod 755 {} \;
find $RPMOUT/MailScanner-$VERSION -name 'LICENSE' -exec chmod 644 {} \;
find $RPMOUT/MailScanner-$VERSION -name 'README' -exec chmod 644 {} \;
find $RPMOUT/MailScanner-$VERSION -name 'patch.diff' -exec chmod 644 {} \;
#cp $SRCDIR/install.sh $RPMOUT/MailScanner-$VERSION/
#find $RPMOUT/MailScanner-$VERSION -name 'install.sh' -exec chmod 755 {} \;
#find $RPMOUT/MailScanner-$VERSION -name 'LICENSE' -exec chmod 644 {} \;
#find $RPMOUT/MailScanner-$VERSION -name 'README' -exec chmod 644 {} \;
#find $RPMOUT/MailScanner-$VERSION -name 'patch.diff' -exec chmod 644 {} \;

# Build the RPM and SRPMS
# extra define statements help make the rpm backwards compatible
#rpmbuild -ba --sign --define "_binary_filedigest_algorithm 1" --define "_binary_payload 1" ~/rpmbuild/SPECS/mailscanner.spec
rpmbuild -ba --define "_binary_filedigest_algorithm 1" --define "_binary_payload 1" ~/rpmbuild/SPECS/mailscanner.spec

# copy the rpm built to the output dir
cp ~/rpmbuild/RPMS/noarch/MailScanner-${VERSION}.noarch.rpm $RPMOUT/MailScanner-$VERSION
cd $RPMOUT
tar czf MailScanner-${VERSION}.rhel.tar.gz MailScanner-$VERSION
rm -rf $RPMOUT/MailScanner-$VERSION
cp ~/rpmbuild/RPMS/noarch/MailScanner-${VERSION}.rhel.noarch.rpm $RPMOUT
#cd $RPMOUT
#tar czf MailScanner-${VERSION}.rhel.tar.gz MailScanner-$VERSION
#rm -rf $RPMOUT/MailScanner-$VERSION
rm -rf $WORK

echo;
echo "Completed: $RPMOUT/MailScanner-${VERSION}.rhel.tar.gz";
echo "Completed: $RPMOUT/MailScanner-${VERSION}.rhel.noarch.rpm";

44 changes: 18 additions & 26 deletions Build.suse
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#!/usr/bin/env bash
#
# Written by:
# Jerry Benton < mailscanner@mailborder.com >
# 3 MAY 2016
#
# Updated by:
# Shawn Iverson <shawniverson@efa-project.org
# 22 OCT 2018
# Updated: 2 Nov 2019
# MailScanner Team <https://www.mailscanner.info>
#
# This script will build the latest SuSE install
# package and put it in /msbuilds/suse
Expand Down Expand Up @@ -99,6 +94,7 @@ cp -fr $DEVBASEDIR/suse/etc/* $WORK/etc/

# usr
cp -fr $DEVBASEDIR/common/usr/* $WORK/usr/
cp -fr $DEVBASEDIR/suse/usr/* $WORK/usr/

# Insert the version number we are building
perl -pi -e 's/VersionNumberHere/'$MSVERSION'/;' $WORK/etc/MailScanner/MailScanner.conf
Expand Down Expand Up @@ -126,6 +122,11 @@ chmod +x $WORK/usr/lib/MailScanner/init/*
chmod +x $WORK/etc/cron.daily/*
chmod +x $WORK/etc/cron.hourly/*

mkdir -p $WORK/usr/share/MailScanner/doc
cp $DEVBASEDIR/changelog $WORK/usr/share/MailScanner/doc/changelog
cp $DEVBASEDIR/README $WORK/usr/share/MailScanner/doc/README
cp $DEVBASEDIR/LICENSE $WORK/usr/share/MailScanner/doc/LICENSE

# Build the src tarball for RPM construction
cd $WORK
cd ..
Expand All @@ -134,34 +135,25 @@ tar czf ~/rpmbuild/SOURCES/MailScanner-${MSVERSION}.tgz MailScanner-${MSVERSION}
# return to where i started
cd $THISCURDIR

# create the output dir in $RPMOUT
if [ -d $RPMOUT/MailScanner-$VERSION ]; then
rm -rf $RPMOUT/MailScanner-$VERSION
fi
mkdir -p $RPMOUT/MailScanner-$VERSION

# copy some file we need
cp $SRCDIR/install.sh $RPMOUT/MailScanner-$VERSION/
cp $DEVBASEDIR/README $RPMOUT/MailScanner-$VERSION/
cp $DEVBASEDIR/LICENSE $RPMOUT/MailScanner-$VERSION/
cp $DEVBASEDIR/common/patch/patch.diff $RPMOUT/MailScanner-$VERSION/
find $RPMOUT/MailScanner-$VERSION -name 'install.sh' -exec chmod 755 {} \;
find $RPMOUT/MailScanner-$VERSION -name 'LICENSE' -exec chmod 644 {} \;
find $RPMOUT/MailScanner-$VERSION -name 'README' -exec chmod 644 {} \;
find $RPMOUT/MailScanner-$VERSION -name 'patch.diff' -exec chmod 644 {} \;
#cp $SRCDIR/install.sh $RPMOUT/MailScanner-$VERSION/
# find $RPMOUT/MailScanner-$VERSION -name 'install.sh' -exec chmod 755 {} \;
# find $RPMOUT/MailScanner-$VERSION -name 'LICENSE' -exec chmod 644 {} \;
# find $RPMOUT/MailScanner-$VERSION -name 'README' -exec chmod 644 {} \;
# find $RPMOUT/MailScanner-$VERSION -name 'patch.diff' -exec chmod 644 {} \;

# Build the RPM and SRPMS
# extra define statements help make the rpm backwards compatible
#rpmbuild -ba --sign --define "_binary_filedigest_algorithm 1" --define "_binary_payload 1" ~/rpmbuild/SPECS/mailscanner.spec
rpmbuild -ba --define "_binary_filedigest_algorithm 1" --define "_binary_payload 1" ~/rpmbuild/SPECS/mailscanner.spec

# copy the rpm built to the output dir
cp ~/rpmbuild/RPMS/noarch/MailScanner-${VERSION}.noarch.rpm $RPMOUT/MailScanner-$VERSION
cd $RPMOUT
tar czf MailScanner-${VERSION}.suse.tar.gz MailScanner-$VERSION
rm -rf $RPMOUT/MailScanner-$VERSION
cp ~/rpmbuild/RPMS/noarch/MailScanner-${VERSION}.suse.noarch.rpm $RPMOUT
#cd $RPMOUT
# tar czf MailScanner-${VERSION}.suse.tar.gz MailScanner-$VERSION
#rm -rf $RPMOUT/MailScanner-$VERSION
rm -rf $WORK

echo;
echo "Completed: $RPMOUT/MailScanner-${VERSION}.suse.tar.gz";
echo "Completed: $RPMOUT/MailScanner-${VERSION}.suse.noarch.rpm";

95 changes: 57 additions & 38 deletions README
Original file line number Diff line number Diff line change
@@ -1,59 +1,78 @@
# Welcome to MailScanner!
#
# Current version: 5.1.3-2 Release (5.1.4-1 pending testing)
# Current version: 5.2.1-1
#
# 27 January 2019
# 3 November 2019
# MailScanner Team <https://www.mailscanner.info>
#
#
# MailScanner is an open source email gateway that processes email for
# spam, viruses, phishing, and other malicious content. MailScanner
# leverages other open source software such as ClamAV and
# Spamassassin. MailScanner will run on any NIX platform and includes
# install packages for popular distributions such as Redhat, Debian, and
# SUSE in addition to any generic NIX package.
#
# Info: https://www.mailscanner.info
# Release: https://www.mailscanner.info/downloads
# Github: https://github.com/MailScanner/v5
# Manual: https://s3.amazonaws.com/msv5/docs/ms-admin-guide.pdf
# Milter: https://github.com/MailScanner/v5/blob/master/doc/MailScanner%20Milter%20Guide.pdf
# Support: http://lists.mailscanner.info/mailman/listinfo/mailscanner
#
# Info: https://www.mailscanner.info
# Release: https://www.mailscanner.info/downloads
# Github: https://github.com/MailScanner/v5
# Manual: https://s3.amazonaws.com/msv5/docs/ms-admin-guide.pdf
# Milter: https://github.com/MailScanner/v5/blob/master/doc/MailScanner%20Milter%20Guide.pdf
# Support: http://lists.mailscanner.info/mailman/listinfo/mailscanner
#
# Install
# tar -xvzf MailScanner-5.x.x-x.distro.tar.gz
# cd MailScanner-5.x.x-x
# ./install.sh
# (reboot may be required)
# ##################### ATTENTION ###################
# # Install and update instructions have changed. #
# # With the exception of the generic *nix package, #
# # MailScanner now installs via deb and rpm first. #
# ##################### ATTENTION ###################
#
# Update
# tar -xvzf MailScanner-5.x.x-x.distro.tar.gz
# cd MailScanner-5.x.x-x
# ./install.sh --update
# (reboot may be required)
# Install
# Redhat-based
# rpm -ivh MailScanner-5.x.x-x.rhel.noarch.rpm
# /usr/sbin/ms-configure
# Debian-based
# dpkg -i MailScanner-5.x.x.x-x-noarch.deb
# /usr/sbin/ms-configure
# SuSE-based
# rpm -ivh MailScanner-5.x.x.x-x.suse.noarch.rpm
# /usr/sbin/ms-configure
# Other *nix
# tar -xvzf MailScanner-5.x.x-x.nix.tar.gz
# ./install.sh
#
# MTA Guides:
# sendmail - https://www.mailscanner.info/sendmail
# postfix - https://www.mailscanner.info/postfix
# exim - https://www.mailscanner.info/exim
# Update
# Redhat-based
# rpm -Uvh MailScanner-5.x.x-x.rhel.noarch.rpm
# /usr/sbin/ms-configure --update
# Debian-based
# dpkg -i MailScanner-5.x.x.x-x-noarch.deb
# /usr/sbin/ms-configure --update
# SuSE-based
# rpm -Uvh MailScanner-5.x.x-x.suse.noarch.rpm
# /usr/sbin/ms-configure --update
# Other *nix
# tar -xvzf MailScanner-5.x.x-x.nix.tar.gz
# ./install.sh
#
# Setup:
# Edit /etc/MailScanner/defaults and set options
# Edit /etc/MailScanner/MailScanner.conf and set options
# service mailscanner start
# MTA Guides:
# sendmail - https://www.mailscanner.info/sendmail
# postfix - https://www.mailscanner.info/postfix
# exim - https://www.mailscanner.info/exim
#
# NIX:
# For generic NIX systems, create a symlink for controlling the
# start/stop/restart of the program to:
# Setup:
# Edit /etc/MailScanner/defaults and set options
# Edit /etc/MailScanner/MailScanner.conf and set options
# service mailscanner start
#
# /usr/lib/MailScanner/init/ms-init
# NIX:
# For generic NIX systems, create a symlink for controlling the
# start/stop/restart of the program to:
#
# * This is not required for RHEL, CentOS, Debian, Ubuntu, SUSE
# /usr/lib/MailScanner/init/ms-init
#
# File Locations:
# /etc/MailScanner
# /usr/share/MailScanner
# /usr/lib/MailScanner
# * This is not required for RHEL, CentOS, Debian, Ubuntu, SUSE
#

# File Locations:
# /etc/MailScanner
# /usr/share/MailScanner
# /usr/lib/MailScanner
#
Binary file removed builds/MailScanner-5.1.3-2.deb.tar.gz
Binary file not shown.
16 changes: 0 additions & 16 deletions builds/MailScanner-5.1.3-2.deb.tar.gz.sig

This file was deleted.

Binary file removed builds/MailScanner-5.1.3-2.nix.tar.gz
Binary file not shown.
16 changes: 0 additions & 16 deletions builds/MailScanner-5.1.3-2.nix.tar.gz.sig

This file was deleted.

Binary file removed builds/MailScanner-5.1.3-2.rhel.tar.gz
Binary file not shown.
16 changes: 0 additions & 16 deletions builds/MailScanner-5.1.3-2.rhel.tar.gz.sig

This file was deleted.

Binary file removed builds/MailScanner-5.1.3-2.suse.tar.gz
Binary file not shown.
16 changes: 0 additions & 16 deletions builds/MailScanner-5.1.3-2.suse.tar.gz.sig

This file was deleted.

Binary file added builds/MailScanner-5.2.1-1-noarch.deb
Binary file not shown.
Loading

0 comments on commit 0a87daf

Please sign in to comment.