Create staging distribution branch

This commit is contained in:
wpetit 2021-07-26 09:31:58 +02:00
parent 61c3cd33be
commit 7660daf768
7 changed files with 82 additions and 20 deletions

View File

@ -55,18 +55,6 @@ smtp:
# Configuration du stockage # Configuration du stockage
data: data:
path: fakesmtp.db path: fakesmtp.db
# Configuration du relais SMTP
relay:
enabled: false # Activer/désactiver le relais SMTP
address: "" # Adresse du serveur au format "host:port"
identity: "" # Identité du compte utilisateur, peut être laissé vide
username: "" # Identifiant du compte SMTP, non utilisé sur anonymous = true
password: "" # Mot de passe du compte SMTP, non utilisé sur anonymous = true
anonymous: false # Utiliser le mode d'authentification "anonyme"
useTLS: false # Utiliser TLS pour se connecter au serveur SMTP
insecureSkipVerify: true # Ne pas vérifier le certificat du serveur pour les connexions TLS/STARTTLS
fromOverride: "" # Surcharger l'adresse émetteur des courriels transmis
``` ```
### Variables d'environnement ### Variables d'environnement
@ -91,14 +79,6 @@ Les valeurs des variables d'environnement surchargent les valeurs présentes dan
|`FAKESMTP_SMTP_ALLOWINSECUREAUTH`|`smtp.allowInsecureAuth`| |`FAKESMTP_SMTP_ALLOWINSECUREAUTH`|`smtp.allowInsecureAuth`|
|`FAKESMTP_SMTP_DEBUG`|`smtp.debug`| |`FAKESMTP_SMTP_DEBUG`|`smtp.debug`|
|`FAKESMTP_DATA_PATH`|`data.path`| |`FAKESMTP_DATA_PATH`|`data.path`|
|`FAKESMTP_RELAY_ENABLED`|`relay.enabled`|
|`FAKESMTP_RELAY_ADDRESS`|`relay.address`|
|`FAKESMTP_RELAY_IDENTITY`|`relay.identity`|
|`FAKESMTP_RELAY_USERNAME`|`relay.username`|
|`FAKESMTP_RELAY_PASSWORD`|`relay.password`|
|`FAKESMTP_RELAY_ANONYMOUS`|`relay.anonymous`|
|`FAKESMTP_RELAY_INSECURE_SKIP_VERIFY`|`relay.insecureSkipVerify`|
|`FAKESMTP_RELAY_FROM_OVERRIDE`|`relay.fromOverride`|
## Démarrer avec les sources ## Démarrer avec les sources

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

14
debian/control vendored Normal file
View File

@ -0,0 +1,14 @@
Source: fake-smtp
Section: unknown
Priority: optional
Maintainer: William Petit <wpetit@cadoles.com>
Build-Depends: debhelper (>= 8.0.0), wget, ca-certificates, tar, curl
Standards-Version: 3.9.4
Homepage: http://forge.cadoles.com/wpetit/fake-smtp
Vcs-Git: http://forge.cadoles.com/wpetit/fake-smtp.git
Vcs-Browser: http://forge.cadoles.com/wpetit/fake-smtp
Package: fake-smtp
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Serveur SMTP factice pour le développement avec interface web

1
debian/fake-smtp.dirs vendored Normal file
View File

@ -0,0 +1 @@
var/lib/fake-smtp

11
debian/fake-smtp.service vendored Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Serveur SMTP factice pour le développement avec interface web
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/fake-smtp -workdir /usr/share/fake-smtp -config /etc/fake-smtp/config.yml
Restart=on-failure
[Install]
WantedBy=multi-user.target

54
debian/rules vendored Normal file
View File

@ -0,0 +1,54 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
GO_VERSION := 1.14.2
OS := linux
ARCH := amd64
GOPATH=$(HOME)/go
ifeq (, $(shell which go 2>/dev/null))
override_dh_auto_build: install-go
endif
ifeq (, $(shell which node 2>/dev/null))
override_dh_auto_build: install-nodejs
endif
%:
dh $@ --with systemd
override_dh_auto_build: $(GOPATH)
GOPATH=$(GOPATH) PATH="$(PATH):/usr/local/go/bin:$(GOPATH)/bin" make tooling
npm install
GOPATH=$(GOPATH) PATH="$(PATH):/usr/local/go/bin:$(GOPATH)/bin" go mod vendor
GOPATH=$(GOPATH) PATH="$(PATH):/usr/local/go/bin:$(GOPATH)/bin" ARCH_TARGETS=$(ARCH) make release
$(GOPATH):
mkdir -p $(GOPATH)
install-go:
wget https://dl.google.com/go/go$(GO_VERSION).$(OS)-$(ARCH).tar.gz
tar -C /usr/local -xzf go$(GO_VERSION).$(OS)-$(ARCH).tar.gz
install-nodejs:
curl -sL https://deb.nodesource.com/setup_13.x | bash -
apt-get install -y nodejs
override_dh_auto_install:
mkdir -p debian/fake-smtp/usr/share/fake-smtp
mkdir -p debian/fake-smtp/etc/fake-smtp
mkdir -p debian/fake-smtp/usr/bin
cp -r release/fake-smtp-$(OS)-$(ARCH)/* debian/fake-smtp/usr/share/fake-smtp/
mv debian/fake-smtp/usr/share/fake-smtp/bin/fake-smtp debian/fake-smtp/usr/bin/fake-smtp
mv debian/fake-smtp/usr/share/fake-smtp/config.yml debian/fake-smtp/etc/fake-smtp/config.yml
install -d debian/fake-smtp
override_dh_strip:
override_dh_auto_test:

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (native)