Browse Source

add packaging for Debian

master
Max Erenberg 12 months ago
parent
commit
7f7e30a04a
  1. 9
      .gitignore
  2. 9
      csc_milter/main.py
  3. 23
      debian/changelog
  4. 1
      debian/compat
  5. 15
      debian/control
  6. 1
      debian/copyright
  7. 2
      debian/csc-milter.service
  8. 6
      debian/rules
  9. 1
      debian/source/format

9
.gitignore vendored

@ -2,3 +2,12 @@ __pycache__/
*.swp
*.egg-info/
build/
/.pybuild/
# Ignore Debian auto-generated files.
/debian/debhelper-build-stamp
/debian/files
/debian/csc-milter/**
/debian/*.log
/debian/*.debhelper
/debian/*.substvars

9
csc_milter/main.py

@ -116,9 +116,14 @@ def main():
if args.mynetworks is not None:
networks = args.mynetworks.split()
else:
networks = get_postconf('mynetworks').split()
networks_str = get_postconf('mynetworks').replace(',', ' ')
networks = networks_str.split()
MYNETWORKS = [
ipaddress.ip_network(s.replace('[', '').replace(']', ''))
ipaddress.ip_network(
s.replace('[', '')
.replace(']', '')
.strip()
)
for s in networks
]

23
debian/changelog vendored

@ -0,0 +1,23 @@
csc-milter (0.1.1-1) buster; urgency=medium
* Fix bug in mynetworks parsing.
-- Max Erenberg <merenber@csclub.uwaterloo.ca> Sun, 29 Aug 2021 19:45:44 -0400
csc-milter (0.1.0-3) buster; urgency=medium
* Update absolute path in systemd service.
-- Max Erenberg <merenber@csclub.uwaterloo.ca> Sun, 29 Aug 2021 19:15:24 -0400
csc-milter (0.1.0-2) buster; urgency=medium
* Add systemd service to debian folder.
-- Max Erenberg <merenber@csclub.uwaterloo.ca> Sun, 29 Aug 2021 19:07:58 -0400
csc-milter (0.1.0-1) buster; urgency=medium
* Initial release.
-- Max Erenberg <merenber@csclub.uwaterloo.ca> Sun, 29 Aug 2021 22:22:55 +0000

1
debian/compat vendored

@ -0,0 +1 @@
10

15
debian/control vendored

@ -0,0 +1,15 @@
Source: csc-milter
Maintainer: Systems Committee <syscom@csclub.uwaterloo.ca>
Section: mail
Priority: optional
Standards-Version: 3.9.2
Build-Depends: debhelper (>=9),
dh-python,
python3-setuptools,
python3-all
Package: csc-milter
Architecture: any
Depends: ${misc:Depends}, ${python3:Depends}, python3-milter (>=1.0)
Description: Custom mail filter ("milter") for CSC.
This package implements custom filtering logic for the CSC mail server.

1
debian/copyright vendored

@ -0,0 +1 @@
License: GPL-3.0

2
systemd/csc-milter.service → debian/csc-milter.service vendored

@ -6,7 +6,7 @@ Wants=postfix.service
User=postfix
Group=postfix
RuntimeDirectory=csc-milter
ExecStart=/usr/local/bin/csc-milter
ExecStart=/usr/bin/csc-milter
[Install]
WantedBy=multi-user.target

6
debian/rules vendored

@ -0,0 +1,6 @@
#!/usr/bin/make -f
export PYBUILD_NAME=csc-milter
%:
dh $@ --with python3 --buildsystem=pybuild

1
debian/source/format vendored

@ -0,0 +1 @@
3.0 (quilt)
Loading…
Cancel
Save