mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-28 16:32:57 +02:00
openssh: enable systemd socket activation for sshd by default.
This commit is contained in:
parent
c71f5b085f
commit
3c45cf4606
6 changed files with 46 additions and 17 deletions
10
srcpkgs/openssh/files/sshd.socket
Normal file
10
srcpkgs/openssh/files/sshd.socket
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Conflicts=sshd.service
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=22
|
||||||
|
Accept=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sockets.target
|
||||||
|
Also=sshdgenkeys.service
|
8
srcpkgs/openssh/files/sshd@.service
Normal file
8
srcpkgs/openssh/files/sshd@.service
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
[Unit]
|
||||||
|
Description=OpenSSH Per-Connection Daemon
|
||||||
|
After=sshdgenkeys.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=-/usr/sbin/sshd -i
|
||||||
|
StandardInput=socket
|
||||||
|
StandardError=syslog
|
|
@ -1,14 +1,12 @@
|
||||||
# Template file for 'openssh-client'.
|
# Template file for 'openssh-client'.
|
||||||
#
|
#
|
||||||
depends="openssh>=6.0p1"
|
conf_files="/etc/ssh/ssh_config"
|
||||||
|
depends="openssh>=$version"
|
||||||
short_desc="The OpenSSH client"
|
short_desc="The OpenSSH client"
|
||||||
long_desc="${long_desc}
|
long_desc="${long_desc}
|
||||||
|
|
||||||
This package contains the ${pkgname} client files."
|
This package contains the ${pkgname} client files."
|
||||||
|
|
||||||
conf_files="/etc/ssh/ssh_config"
|
|
||||||
|
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
for f in scp sftp slogin ssh ssh-add ssh-agent \
|
for f in scp sftp slogin ssh ssh-add ssh-agent \
|
||||||
ssh-copy-id ssh-keyscan findssl; do
|
ssh-copy-id ssh-keyscan findssl; do
|
||||||
|
|
15
srcpkgs/openssh/openssh-server.INSTALL
Normal file
15
srcpkgs/openssh/openssh-server.INSTALL
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
case $ACTION in
|
||||||
|
post)
|
||||||
|
cat <<_EOF
|
||||||
|
===========================================================================
|
||||||
|
Two systemd services are provided by ${PKGNAME}-${VERSION}:
|
||||||
|
|
||||||
|
- sshd.service (starts a single instance of sshd)
|
||||||
|
- sshd.socket (per-connection on demand sshd)
|
||||||
|
|
||||||
|
By default we enable the on-demand per-connection daemon, which is lighter
|
||||||
|
when there are few connections.
|
||||||
|
===========================================================================
|
||||||
|
_EOF
|
||||||
|
;;
|
||||||
|
esac
|
|
@ -1,15 +1,13 @@
|
||||||
# Template file for 'openssh-server'.
|
# Template file for 'openssh-server'.
|
||||||
#
|
#
|
||||||
depends="openssh>=6.0p1"
|
conf_files="/etc/ssh/sshd_config /etc/pam.d/sshd"
|
||||||
|
systemd_services="sshd.socket on"
|
||||||
|
depends="openssh>=$version"
|
||||||
short_desc="The OpenSSH server"
|
short_desc="The OpenSSH server"
|
||||||
long_desc="${long_desc}
|
long_desc="${long_desc}
|
||||||
|
|
||||||
This package contains the ${pkgname} server files."
|
This package contains the ${pkgname} server files."
|
||||||
|
|
||||||
conf_files="/etc/ssh/sshd_config /etc/pam.d/sshd"
|
|
||||||
systemd_services="sshd.service on sshdgenkeys.service on"
|
|
||||||
|
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
vmove usr/libexec/sftp-server usr/libexec
|
vmove usr/libexec/sftp-server usr/libexec
|
||||||
vmove etc/ssh/sshd_config etc/ssh
|
vmove etc/ssh/sshd_config etc/ssh
|
||||||
|
@ -19,7 +17,9 @@ do_install() {
|
||||||
vmove usr/share/man/man8/${f}.8 usr/share/man/man8
|
vmove usr/share/man/man8/${f}.8 usr/share/man/man8
|
||||||
done
|
done
|
||||||
vmove etc/pam.d etc
|
vmove etc/pam.d etc
|
||||||
vinstall ${FILESDIR}/sshd.service 644 lib/systemd/system
|
vmkdir lib/systemd/system
|
||||||
vinstall ${FILESDIR}/sshdgenkeys.service 644 lib/systemd/system
|
install -m644 ${FILESDIR}/*.{socket,service} \
|
||||||
vinstall ${FILESDIR}/sshd.tmpfiles.d 644 usr/lib/tmpfiles.d sshd.conf
|
${DESTDIR}/lib/systemd/system
|
||||||
|
vinstall ${FILESDIR}/sshd.tmpfiles.d 644 \
|
||||||
|
usr/lib/tmpfiles.d sshd.conf
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Template file for 'openssh'
|
# Template file for 'openssh'
|
||||||
pkgname=openssh
|
pkgname=openssh
|
||||||
version=6.0p1
|
version=6.0p1
|
||||||
|
revision=1
|
||||||
distfiles="ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/$pkgname-$version.tar.gz"
|
distfiles="ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/$pkgname-$version.tar.gz"
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--without-tcp-wrappers --datadir=/usr/share/openssh
|
configure_args="--without-tcp-wrappers --datadir=/usr/share/openssh
|
||||||
|
@ -10,6 +11,8 @@ configure_args="--without-tcp-wrappers --datadir=/usr/share/openssh
|
||||||
--with-kerberos5=/usr"
|
--with-kerberos5=/usr"
|
||||||
depends="shadow"
|
depends="shadow"
|
||||||
makedepends="perl>=0 zlib-devel openssl-devel pam-devel mit-krb5-devel e2fsprogs-devel"
|
makedepends="perl>=0 zlib-devel openssl-devel pam-devel mit-krb5-devel e2fsprogs-devel"
|
||||||
|
conf_files="/etc/ssh/moduli"
|
||||||
|
subpackages="$pkgname-client $pkgname-server"
|
||||||
short_desc="The OpenSSH implementation of SSH protocol versions 1 and 2"
|
short_desc="The OpenSSH implementation of SSH protocol versions 1 and 2"
|
||||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
homepage="http://www.openssh.org"
|
homepage="http://www.openssh.org"
|
||||||
|
@ -30,11 +33,6 @@ long_desc="
|
||||||
client and server. To make this package useful, you should also
|
client and server. To make this package useful, you should also
|
||||||
install openssh-client, openssh-server, or both."
|
install openssh-client, openssh-server, or both."
|
||||||
|
|
||||||
conf_files="/etc/ssh/moduli"
|
|
||||||
subpackages="$pkgname-client $pkgname-server"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vinstall contrib/sshd.pam.generic 644 etc/pam.d sshd
|
vinstall contrib/sshd.pam.generic 644 etc/pam.d sshd
|
||||||
vinstall contrib/findssl.sh 755 usr/bin findssl
|
vinstall contrib/findssl.sh 755 usr/bin findssl
|
||||||
|
|
Loading…
Add table
Reference in a new issue