Add things for network luks unlock

This commit is contained in:
moparisthebest
2016-12-02 13:28:54 -05:00
parent 6266b8dc2c
commit 2ab9a20f30
27 changed files with 5492 additions and 0 deletions

28
src/tinyssh/.SRCINFO Normal file
View File

@@ -0,0 +1,28 @@
# Generated by mksrcinfo v8
# Mon Aug 15 17:51:45 UTC 2016
pkgbase = tinyssh
pkgdesc = Small SSH server using NaCl / TweetNaCl
pkgver = 20160812
pkgrel = 1
url = http://tinyssh.org
install = tinyssh.install
arch = x86_64
arch = i686
arch = arm
arch = armv6h
license = Public Domain
makedepends = gcc
makedepends = make
source = tinyssh-20160812.tar.gz::https://mojzis.com/software/tinyssh/tinyssh-20160812.tar.gz
source = tinyssh@.socket
source = tinyssh@.service
source = tinysshgenkeys.service
source = tinyssh-20160812.tar.gz.asc::https://mojzis.com/software/tinyssh/tinyssh-20160812.tar.gz.asc
sha512sums = 54817e7e0da778eb4e404e165caff321ef3c8b13f1e1840c9fad1e8f6f64fee086019f4222199bf2b47e19754913400bb719443a944c612e987e3d3fdae14147
sha512sums = 9fbc5ae3b6d1df6d78eedf812fdd8fe115e81fc0811f4799d541e37239d53db22203e691026ed479a38c9f17043e52d43b44054be51ae03c2f12f3f235c5b83a
sha512sums = 9c9ba78c5b61f64f42f59cfe556519d9ab2c3e4d45f36d6f78c5e7728b050c494673239630dae66398006f3f20fb3a26f22899cd0728ed17e61c655b372236b3
sha512sums = 415cdfe649eedcbb11a263938c0a66bef42432210baa2e2c9e428d5e8e486fb4dedad53b9fdb9086bf97ca506909d3b3054aaca56f02c063e0b8d5fab4e56198
sha512sums = SKIP
pkgname = tinyssh

6
src/tinyssh/.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
tinyssh-*.tar.bz2
tinyssh-*.tar.xz
tinyssh-*.tar.gz
tinyssh-*.tar.gz.asc
src/*
pkg/*

41
src/tinyssh/PKGBUILD Normal file
View File

@@ -0,0 +1,41 @@
# Maintainer: Adrian Perez <aperez@igalia.com>
# Co-Maintainer: Giancarlo Razzolini <grazzolini@gmail.com>
pkgname='tinyssh'
pkgver='20160812'
pkgrel='1'
pkgdesc='Small SSH server using NaCl / TweetNaCl'
url='http://tinyssh.org'
arch=('x86_64' 'i686' 'arm' 'armv6h')
license=('Public Domain')
makedepends=('gcc' 'make')
install='tinyssh.install'
source=("${pkgname}-${pkgver}.tar.gz::https://mojzis.com/software/${pkgname}/${pkgname}-${pkgver}.tar.gz"
tinyssh@.socket tinyssh@.service tinysshgenkeys.service
"${pkgname}-${pkgver}.tar.gz.asc::https://mojzis.com/software/${pkgname}/${pkgname}-${pkgver}.tar.gz.asc")
sha512sums=('54817e7e0da778eb4e404e165caff321ef3c8b13f1e1840c9fad1e8f6f64fee086019f4222199bf2b47e19754913400bb719443a944c612e987e3d3fdae14147'
'9fbc5ae3b6d1df6d78eedf812fdd8fe115e81fc0811f4799d541e37239d53db22203e691026ed479a38c9f17043e52d43b44054be51ae03c2f12f3f235c5b83a'
'9c9ba78c5b61f64f42f59cfe556519d9ab2c3e4d45f36d6f78c5e7728b050c494673239630dae66398006f3f20fb3a26f22899cd0728ed17e61c655b372236b3'
'415cdfe649eedcbb11a263938c0a66bef42432210baa2e2c9e428d5e8e486fb4dedad53b9fdb9086bf97ca506909d3b3054aaca56f02c063e0b8d5fab4e56198'
'SKIP')
validpgpkeys=('AADF2EDF5529F1702772C8A2DEC4D246931EF49B')
build () {
cd "${srcdir}/${pkgname}-${pkgver//./}"
make
}
package () {
cd "${srcdir}/${pkgname}-${pkgver//./}"
make install DESTDIR="${pkgdir}"
# Nowadays /usr/sbin is a symlink to /usr/bin
mv "${pkgdir}"/usr/{s,}bin
install -m 755 -d ${pkgdir}/etc/tinyssh
install -m 755 -d "${pkgdir}/usr/lib/systemd/system"
install -m 644 -t "${pkgdir}/usr/lib/systemd/system" \
"${srcdir}/tinysshgenkeys.service" \
"${srcdir}/tinyssh@.service" \
"${srcdir}/tinyssh@.socket"
}

31
src/tinyssh/tinyssh.install Executable file
View File

@@ -0,0 +1,31 @@
#! /bin/bash
#
# tinyssh.install
# Copyright (C) 2014 Adrian Perez <aperez@igalia.com>
#
# Distributed under terms of the MIT license.
#
set -e
post_install () {
cat <<-EOF
A generic systemd template unit has been installed, which can be used
to make TinySSH listen on more than one interface/address. To configure
it in the default port (22) on all interfaces, use:
systemctl enable tinyssh@22.socket
systemctl start tinyssh@22.socket
Note that you can also specify the interface address, and multiple
address/port combinations can be configured at the same time by writing
the "ipaddress:port" as the unit instance. For example:
systemctl enable tinyssh@192.168.0.10:22222.socket
systemctl start tinyssh@192.168.0.10:22222.socket
EOF
}
post_upgrade () {
post_install
}

View File

@@ -0,0 +1,9 @@
[Unit]
Description=TinySSH Per-Connection Daemon
Documentation=http://tinyssh.org
After=tinysshgenkeys.service
[Service]
ExecStart=/usr/bin/tinysshd /etc/tinyssh/sshkeydir
StandardInput=socket
StandardError=journal

View File

@@ -0,0 +1,13 @@
[Unit]
Description=TinySSH service (socket-activated)
Documentation=http://tinyssh.org
Wants=tinysshgenkeys.service
[Socket]
ListenStream=%i
Accept=true
KeepAlive=true
IPTOS=low-delay
[Install]
WantedBy=sockets.target

View File

@@ -0,0 +1,8 @@
[Unit]
Description=TinySSH Key Generation
ConditionPathIsDirectory=!/etc/tinyssh/sshkeydir
[Service]
ExecStart=/usr/bin/tinysshd-makekey /etc/tinyssh/sshkeydir
Type=oneshot
RemainAfterExit=true