diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..8aaddc8 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +tlstunnel (0.2.0-1) bullseye; urgency=medium + + * Add Debian packaging + + -- jordi fita mas Wed, 14 Jun 2023 20:40:39 +0000 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..0dea1e3 --- /dev/null +++ b/debian/control @@ -0,0 +1,37 @@ +Source: tlstunnel +Section: net +Priority: optional +Maintainer: jordi fita mas +Build-Depends: + debhelper-compat (= 13), + dh-golang, + golang-any, + golang-sourcehut-emersion-go-scfg-dev, + golang-github-caddyserver-certmagic-dev, + golang-github-klauspost-cpuid-dev, + golang-github-libdns-libdns-dev, + golang-github-pires-go-proxyproto-dev, + golang-github-pkg-errors-dev, + golang-go.uber-atomic-dev, + golang-go.uber-multierr-dev, + golang-go.uber-zap-dev, + golang-golang-x-crypto-dev, + golang-golang-x-tools-dev, + scdoc +Standards-Version: 4.6.0 +Vcs-Browser: https://git.sr.ht/~emersion/tlstunnel/tree +Vcs-Git: https://git.sr.ht/~emersion/tlstunnel +Homepage: https://git.sr.ht/~emersion/tlstunnel +Rules-Requires-Root: no +XS-Go-Import-Path: git.sr.ht/~emersion/tlstunnel + +Package: tlstunnel +Architecture: any +Depends: + ${shlibs:Depends}, + ${misc:Depends} +Built-Using: ${misc:Built-Using} +description: TLS reverse proxy + . + It features: Automatic TLS with Let's Encrypt, routing incoming connections to + backends using Server Name Indication, and support for the PROXY protocol. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..dc4cee3 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,31 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: https://git.sr.ht/~emersion/tlstunnel +Upstream-Name: tlstunnel +Upstream-Contact: ~emersion/public-inbox@lists.sr.ht + +Files: * +Copyright: 2020–2023 Simon Ser +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +Files: debian/* +Copyright: 2023 jordi fita mas +License: MIT + This debian package is distributed under the same license as the source + package. diff --git a/debian/manpages b/debian/manpages new file mode 100644 index 0000000..907996f --- /dev/null +++ b/debian/manpages @@ -0,0 +1 @@ +tlstunnel.1 diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..daebdc7 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,40 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +case "$1" in + configure) + # Create tlstunnel user and group + if ! getent group tlstunnel >/dev/null; then + addgroup --system --quiet tlstunnel + fi + if ! getent passwd tlstunnel >/dev/null; then + adduser --quiet \ + --system \ + --disabled-login \ + --no-create-home \ + --shell /bin/bash \ + --ingroup tlstunnel \ + --home /var/lib/tlstunnel \ + --gecos "tlstunnel daemon" \ + tlstunnel + fi + + # Make sure lib directory has correct permissions set + dpkg-statoverride --list "/var/lib/tlstunnel" >/dev/null || \ + dpkg-statoverride --add --force --quiet --update tlstunnel adm 0750 /var/lib/tlstunnel + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..c4b6b8f --- /dev/null +++ b/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ --builddirectory=_build --buildsystem=golang --with=golang + +execute_before_dh_auto_build: + make tlstunnel.1 diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/tlstunnel.service b/debian/tlstunnel.service new file mode 120000 index 0000000..9f91ff8 --- /dev/null +++ b/debian/tlstunnel.service @@ -0,0 +1 @@ +../contrib/systemd/tlstunnel.service \ No newline at end of file diff --git a/debian/tlstunnel.tmpfiles b/debian/tlstunnel.tmpfiles new file mode 120000 index 0000000..2d05ac1 --- /dev/null +++ b/debian/tlstunnel.tmpfiles @@ -0,0 +1 @@ +../contrib/systemd/tlstunnel.tmpfiles \ No newline at end of file