Pārlūkot izejas kodu

Implemented Ubuntu packaging for SNFServer.

Modified comments in OS startup script:  Changed Default-Start from 3 4 5
to 2 3 4 5 and Default-Stop from 0 1 2 6 to 0 1 6, moved BEGIN INIT INFO
comment block to beginning of the file.  Reason:  So that update-rc.d
runs without error or warning.


git-svn-id: https://svn.microneil.com/svn/PKG-SNF-CS-NIX/trunk@79 233e721a-07f6-49eb-a7da-05e0e16828fc
master
adeniz pirms 12 gadiem
vecāks
revīzija
aa628d2da3
22 mainītis faili ar 675 papildinājumiem un 10 dzēšanām
  1. 8
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-postfix/DEBIAN/copyright
  2. 43
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-postfix/DEBIAN/postinst
  3. 41
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-postfix/DEBIAN/postrm
  4. 35
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-postfix/DEBIAN/preinst
  5. 42
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-postfix/DEBIAN/prerm
  6. 8
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-sendmail/DEBIAN/copyright
  7. 43
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-sendmail/DEBIAN/postinst
  8. 41
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-sendmail/DEBIAN/postrm
  9. 35
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-sendmail/DEBIAN/preinst
  10. 42
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-sendmail/DEBIAN/prerm
  11. 6
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/changelog
  12. 1
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/compat
  13. 17
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/control
  14. 8
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/copyright
  15. 2
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/dirs
  16. 6
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/docs
  17. 48
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/postinst
  18. 47
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/postrm
  19. 43
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/preinst
  20. 42
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/prerm
  21. 107
    0
      SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/rules
  22. 10
    10
      SNF_CS_Developer_Package/Scripts/snf-server.ubuntu

+ 8
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-postfix/DEBIAN/copyright Parādīt failu

@@ -0,0 +1,8 @@
This package was debianized by ARM Research Labs on
Tue, 29 Jan 2013 20:05:23 -0500.

Copyright Holder: ARM Research Labs <support@armresearch.com>

License:

Artistic License

+ 43
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-postfix/DEBIAN/postinst Parādīt failu

@@ -0,0 +1,43 @@
#!/bin/sh
# postinst script for snf-server-postfix.
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
configure)
# Integrate with postfix.
/usr/sbin/SNFServerConfig -with=postfix

;;

abort-upgrade|abort-remove|abort-deconfigure)

;;

*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

+ 41
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-postfix/DEBIAN/postrm Parādīt failu

@@ -0,0 +1,41 @@
#!/bin/sh
# postrm script for snf-server-postfix.
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in

purge)
;;

remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;

*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

+ 35
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-postfix/DEBIAN/preinst Parādīt failu

@@ -0,0 +1,35 @@
#!/bin/sh
# preinst script for snf-server-postfix.
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
install|upgrade)
;;

abort-upgrade)
;;

*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

+ 42
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-postfix/DEBIAN/prerm Parādīt failu

@@ -0,0 +1,42 @@
#!/bin/sh
# prerm script for snf-server-postfix.
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
remove|upgrade|deconfigure)

# Remove integration with postfix or sendmail.
/usr/sbin/SNFServerConfig -with=none

;;

failed-upgrade)
;;

*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

+ 8
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-sendmail/DEBIAN/copyright Parādīt failu

@@ -0,0 +1,8 @@
This package was debianized by ARM Research Labs on
Tue, 29 Jan 2013 20:04:52 -0500.

Copyright Holder: ARM Research Labs <support@armresearch.com>

License:

Artistic License

+ 43
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-sendmail/DEBIAN/postinst Parādīt failu

@@ -0,0 +1,43 @@
#!/bin/sh
# postinst script for snf-server
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
configure)
# Integrate with sendmail.
/usr/sbin/SNFServerConfig -with=sendmail

;;

abort-upgrade|abort-remove|abort-deconfigure)

;;

*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

+ 41
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-sendmail/DEBIAN/postrm Parādīt failu

@@ -0,0 +1,41 @@
#!/bin/sh
# postrm script for snf-server
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in

purge)
;;

remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;

*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

+ 35
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-sendmail/DEBIAN/preinst Parādīt failu

@@ -0,0 +1,35 @@
#!/bin/sh
# preinst script for snf-server-sendmail
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
install|upgrade)
;;

abort-upgrade)
;;

*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

+ 42
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server-sendmail/DEBIAN/prerm Parādīt failu

@@ -0,0 +1,42 @@
#!/bin/sh
# prerm script for snf-server
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
remove|upgrade|deconfigure)

# Remove integration with sendmail.
/usr/sbin/SNFServerConfig -with=none

;;

failed-upgrade)
;;

*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

+ 6
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/changelog Parādīt failu

@@ -0,0 +1,6 @@
snf-server (3.0.14-1) stable; urgency=low

* Initial release

-- support <support@armresearch.com> Tue, 29 Jan 2013 19:57:42 -0500


+ 1
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/compat Parādīt failu

@@ -0,0 +1 @@
4

+ 17
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/control Parādīt failu

@@ -0,0 +1,17 @@
Source: snf-server
Section: mail
Priority: optional
Maintainer: support <support@armresearch.com>
Build-Depends: debhelper (>= 4.0.0), autotools-dev, curl
Standards-Version: 3.7.3

Package: snf-server
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, curl
Conflicts: snf-server
Recommends: postfix | sendmail
Description: Spam server for blocking spam and IP scanning from ARM Research
SNFServer is a server that interfaces with an MTA (such as postfix or
sendmail) to tag any email message that looks like spam. The criteria
for judging a message to be spam includes the message content and also
the originating IP address.

+ 8
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/copyright Parādīt failu

@@ -0,0 +1,8 @@
This package was debianized by ARM Research Labs on
Fri, 11 Jan 2013 15:40:52 -0500.

Copyright Holder: ARM Research Labs <support@armresearch.com>

License:

Artistic License

+ 2
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/dirs Parādīt failu

@@ -0,0 +1,2 @@
usr/bin
usr/sbin

+ 6
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/docs Parādīt failu

@@ -0,0 +1,6 @@
COPYING
INSTALL
BUGS
TODO
ChangeLog
README

+ 48
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/postinst Parādīt failu

@@ -0,0 +1,48 @@
#!/bin/sh
# postinst script for snf-server
#
# see: dh_installdeb(1)

# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
configure)
# Configure with testmode rulebase, no integration.
/usr/sbin/SNFServerConfig -setup

# Configure SNFServer to start on boot.
/usr/sbin/update-rc.d snf-server defaults

# Start the SNFServer service.
/usr/sbin/service snf-server start
/usr/sbin/service snf-server status

;;

abort-upgrade|abort-remove|abort-deconfigure)

;;

*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

+ 47
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/postrm Parādīt failu

@@ -0,0 +1,47 @@
#!/bin/sh
# postrm script for snf-server
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in

purge)

rm -rf /etc/snf-server /usr/share/snf-server /var/log/snf-server

# Remove configuration to start SNFServer on boot.
/usr/sbin/update-rc.d snf-server remove
;;

remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

;;

*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

+ 43
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/preinst Parādīt failu

@@ -0,0 +1,43 @@
#!/bin/sh
# preinst script for snf-server
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
install|upgrade)

# Create the snfuser user and group.
getent group snfuser > /dev/null || /usr/sbin/groupadd -r snfuser
getent passwd snfuser > /dev/null || \
/usr/sbin/useradd -r -g snfuser -s /sbin/nologin \
-c "Sniffer Account" snfuser


;;

abort-upgrade)
;;

*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

+ 42
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/prerm Parādīt failu

@@ -0,0 +1,42 @@
#!/bin/sh
# prerm script for snf-server
#
# see: dh_installdeb(1)

# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
remove|upgrade|deconfigure)

# Stop the SNFServer service.
service snf-server stop
service snf-server status
exit 0

;;

failed-upgrade)
;;

*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

+ 107
- 0
SNF_CS_Developer_Package/Packages/Ubuntu/snf-server/rules Parādīt failu

@@ -0,0 +1,107 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1


# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)


CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O3
endif

config.status: configure
dh_testdir
# Add here commands to configure the package.
CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-os-type=Ubuntu --sysconfdir=/etc


build: build-stamp

build-stamp: config.status
dh_testdir

# Add here commands to compile the package.
$(MAKE)
#docbook-to-man debian/snf-server.sgml > snf-server.1

touch build-stamp

clean:
dh_testdir
dh_testroot
rm -f build-stamp

# Add here commands to clean up after the build process.
-$(MAKE) distclean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif


dh_clean

install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs

# Add here commands to install the package into debian/snf-server.
$(MAKE) install DESTDIR=$(CURDIR)/debian/snf-server


# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs ChangeLog
dh_installdocs
dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

+ 10
- 10
SNF_CS_Developer_Package/Scripts/snf-server.ubuntu Parādīt failu

@@ -1,24 +1,24 @@
#! /bin/sh
#
# snf-server Starts and stops the SNFServer daemon (Ubuntu).
#
# Author: Alban Deniz
#
# Copyright (C) 2008 ARM Research Labs, LLC.
# See www.armresearch.com for the copyright terms.
#
### BEGIN INIT INFO
# Provides: SNFServer
# Required-Start: $syslog $remote_fs $network $named
# Should-Start: $time ypbind smtp
# Required-Stop: $syslog $remote_fs
# Should-Stop: $time ypbind smtp
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: SNFServer providing email filtering.
# Description: Start SNFServer to filter email for spam,
# blacklist IP addresses, etc.
### END INIT INFO
#
# snf-server Starts and stops the SNFServer daemon (Ubuntu).
#
# Author: Alban Deniz
#
# Copyright (C) 2008 ARM Research Labs, LLC.
# See www.armresearch.com for the copyright terms.
#

# Directory to run in.
runDir=PREFIX/share/PACKAGE_NAME

Notiek ielāde…
Atcelt
Saglabāt