]> git.proxmox.com Git - proxmox-mailgateway.git/commitdiff
create new meta package for container environment
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 13 Mar 2019 13:55:27 +0000 (14:55 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 18 Mar 2019 05:48:42 +0000 (06:48 +0100)
If PMG gets installed in a container environment, e.g., in PVE CTs,
the installation does not requires its own kernel, as the host kernel
is used anyway. So add a new separate meta package which can be used
to install, or to switch, to such a setup.

A user can save well a third of the additional space required on top
of a quite minimal Debian installation, i.e., proxmox-mailgateway:

> 0 upgraded, 183 newly installed, 0 to remove and 0 not upgraded.
> Need to get 153 MB of archives.
> After this operation, 638 MB of additional disk space will be used.

vs. with new proxmox-mailgateway-container:

> 0 upgraded, 169 newly installed, 0 to remove and 0 not upgraded.
> Need to get 59.9 MB of archives.
> After this operation, 206 MB of additional disk space will be used.

This quite big difference does not comes only from the kernel, but
also it's dependencies like grub, initramfs-tools, pve-firmware, ...

On new CT installations you can just setup the PMG by installing:
> apt install proxmox-mailgateway-container
and be done, if you need to switch to a system with kernel you can do
so by installing proxmox-mailgateway .

To make a switch on an existing system you need to do the following:
> apt install proxmox-mailgateway-container
> apt purge pve-kernel-*
> apt autoremove --purge

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile
debian/control

index 08a15fa889967ce830f1ae97dffd329bf9efd5ea..57c3da1677e517c536324f569109e7043c4ecd1e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,9 @@ PKGREL=10
 PACKAGE=proxmox-mailgateway
 
 DEB=${PACKAGE}_${RELEASE}-${PKGREL}_all.deb
+CT_DEB=${PACKAGE}-container_${RELEASE}-${PKGREL}_all.deb
+
+DEBS=${DEB} ${CT_DEB}
 
 BUILD_DIR=build
 
@@ -12,16 +15,18 @@ DIST=stretch
 
 all: ${DEB}
 
+.PHONY: deb
+deb ${CT_DEB}: ${DEB}
 ${DEB}: debian
        rm -rf ${BUILD_DIR}
        mkdir -p ${BUILD_DIR}/debian
        cp -ar debian/* ${BUILD_DIR}/debian/
        cd ${BUILD_DIR}; dpkg-buildpackage -b -uc -us
-       lintian ${DEB}
+       lintian ${DEBS}
 
 .PHONY: upload
-upload: ${DEB}
-       tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist ${DIST} --arch ${ARCH}
+upload: ${DEBS}
+       tar cf - ${DEBS}|ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist ${DIST} --arch ${ARCH}
 
 clean:
        rm -rf ${BUILD_DIR} *.deb *.buildinfo *.changes
index 5a0d487b9471d514924f28d5ac1b4342f056d3c0..2a24137ea3a2388d804bef515f99bd978cca6079 100644 (file)
@@ -15,3 +15,15 @@ Description: Proxmox Mail Gateway
  including efficient Spam and virus filters. This is a meta package
  which will install everything needed. This package also depends on
  the latest available Proxmox kernel.
+
+Package: proxmox-mailgateway-container
+Architecture: all
+Depends: libc6, pmg-api
+Replaces: proxmox-mailgateway
+Breaks: proxmox-mailgateway
+Provides: proxmox-mailgateway
+Description: Proxmox Mail Gateway
+ The Proxmox Mail Gateway is an easy to use Open Source SMTP proxy,
+ including efficient Spam and virus filters. This is a meta package
+ which will install everything needed in a virtualized environment
+ where no kernel is necessary.