From 0bd7d22e032d045c75660ad4a8c6e290c79ca23b Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 5 Mar 2015 20:25:09 +0000 Subject: [PATCH] Move ssh into a dedicated package Flag config files as "to be merged on upgrade" --- etc/Makefile | 2 +- etc/rc.d/Makefile | 8 ++++++-- lib/libpam/modules/pam_ssh/Makefile | 1 + secure/lib/libssh/Makefile | 1 + secure/libexec/Makefile.inc | 1 + secure/usr.bin/scp/Makefile | 1 + secure/usr.bin/sftp/Makefile | 1 + secure/usr.bin/ssh-add/Makefile | 1 + secure/usr.bin/ssh-agent/Makefile | 1 + secure/usr.bin/ssh-keygen/Makefile | 1 + secure/usr.bin/ssh-keyscan/Makefile | 1 + secure/usr.bin/ssh/Makefile | 1 + secure/usr.sbin/sshd/Makefile | 1 + usr.bin/ssh-copy-id/Makefile | 1 + 14 files changed, 19 insertions(+), 3 deletions(-) diff --git a/etc/Makefile b/etc/Makefile index a103f10e3b4f..95f75f9e6b1c 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -276,7 +276,7 @@ distribution: ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution .endif .if ${MK_OPENSSH} != "no" - cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 644 \ + cd ${.CURDIR}; ${INSTALL} -T package=ssh,config -o ${BINOWN} -g ${BINGRP} -m 644 \ ${SSH} ${DESTDIR}/etc/ssh .endif .if ${MK_OPENSSL} != "no" diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 811517f68422..849d620e2f2e 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -111,7 +111,6 @@ FILES= DAEMON \ securelevel \ serial \ sppp \ - ${_sshd} \ statd \ static_arp \ static_ndp \ @@ -246,7 +245,8 @@ FILES+= keyserv .endif .if ${MK_OPENSSH} != "no" -_sshd= sshd +FILESGROUPS+= SSH +SSH= sshd .endif .if ${MK_PF} != "no" @@ -298,4 +298,8 @@ ACPIDIR= /etc/rc.d ACPIMODE= ${BINMODE} ACPIPACKAGE= acpi +SSHDIR= /etc/rc.d +SSHMODE= ${BINMODE} +SSHPACKAGE= ssh + .include diff --git a/lib/libpam/modules/pam_ssh/Makefile b/lib/libpam/modules/pam_ssh/Makefile index b5ca478561dc..3d4502166c0c 100644 --- a/lib/libpam/modules/pam_ssh/Makefile +++ b/lib/libpam/modules/pam_ssh/Makefile @@ -6,6 +6,7 @@ SSHDIR= ${.CURDIR}/../../../../crypto/openssh LIB= pam_ssh MAN= pam_ssh.8 SRCS= pam_ssh.c +PACKAGE= ssh # required when linking with a dynamic libssh SRCS+= roaming_dummy.c diff --git a/secure/lib/libssh/Makefile b/secure/lib/libssh/Makefile index 725ace8d47f7..624a6e01db35 100644 --- a/secure/lib/libssh/Makefile +++ b/secure/lib/libssh/Makefile @@ -19,6 +19,7 @@ SRCS= authfd.c authfile.c bufaux.c bufbn.c buffer.c \ kexc25519.c kexc25519c.c poly1305.c chacha.c cipher-chachapoly.c \ ssh-ed25519.c digest-openssl.c hmac.c \ sc25519.c ge25519.c fe25519.c ed25519.c verify.c hash.c blocks.c +PACKAGE= ssh # gss-genr.c should be in $SRCS but causes linking problems, so it is # compiled directly into sshd instead. diff --git a/secure/libexec/Makefile.inc b/secure/libexec/Makefile.inc index 6d620e245bff..084a71910243 100644 --- a/secure/libexec/Makefile.inc +++ b/secure/libexec/Makefile.inc @@ -1,5 +1,6 @@ # $FreeBSD$ BINDIR?= /usr/libexec +PACKAGE= ssh .include "../Makefile.inc" diff --git a/secure/usr.bin/scp/Makefile b/secure/usr.bin/scp/Makefile index 203fbc304fd7..194afb5831f6 100644 --- a/secure/usr.bin/scp/Makefile +++ b/secure/usr.bin/scp/Makefile @@ -5,6 +5,7 @@ PROG= scp SRCS= scp.c CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +PACKAGE= ssh .if !defined(NO_SHARED) # required when linking with a dynamic libssh diff --git a/secure/usr.bin/sftp/Makefile b/secure/usr.bin/sftp/Makefile index 42728be2871b..4750f923da73 100644 --- a/secure/usr.bin/sftp/Makefile +++ b/secure/usr.bin/sftp/Makefile @@ -5,6 +5,7 @@ PROG= sftp SRCS= sftp.c sftp-client.c sftp-common.c sftp-glob.c progressmeter.c CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +PACKAGE= ssh .if !defined(NO_SHARED) # required when linking with a dynamic libssh diff --git a/secure/usr.bin/ssh-add/Makefile b/secure/usr.bin/ssh-add/Makefile index ec6ebc13acd0..ceca32606ce7 100644 --- a/secure/usr.bin/ssh-add/Makefile +++ b/secure/usr.bin/ssh-add/Makefile @@ -5,6 +5,7 @@ PROG= ssh-add SRCS+= ssh-add.c CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +PACKAGE= ssh .if !defined(NO_SHARED) # required when linking with a dynamic libssh diff --git a/secure/usr.bin/ssh-agent/Makefile b/secure/usr.bin/ssh-agent/Makefile index e263dec0617f..3b2085931d41 100644 --- a/secure/usr.bin/ssh-agent/Makefile +++ b/secure/usr.bin/ssh-agent/Makefile @@ -5,6 +5,7 @@ PROG= ssh-agent SRCS= ssh-agent.c CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +PACKAGE= ssh .if !defined(NO_SHARED) # required when linking with a dynamic libssh diff --git a/secure/usr.bin/ssh-keygen/Makefile b/secure/usr.bin/ssh-keygen/Makefile index db8dc7efc5d8..276d43e95a5c 100644 --- a/secure/usr.bin/ssh-keygen/Makefile +++ b/secure/usr.bin/ssh-keygen/Makefile @@ -5,6 +5,7 @@ PROG= ssh-keygen SRCS= ssh-keygen.c CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +PACKAGE= ssh .if !defined(NO_SHARED) # required when linking with a dynamic libssh diff --git a/secure/usr.bin/ssh-keyscan/Makefile b/secure/usr.bin/ssh-keyscan/Makefile index b6b506063f7a..52c0f89655f9 100644 --- a/secure/usr.bin/ssh-keyscan/Makefile +++ b/secure/usr.bin/ssh-keyscan/Makefile @@ -5,6 +5,7 @@ PROG= ssh-keyscan SRCS= ssh-keyscan.c roaming_dummy.c CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +PACKAGE= ssh LIBADD= ssh diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile index b29ee2ebf136..97e98a145b22 100644 --- a/secure/usr.bin/ssh/Makefile +++ b/secure/usr.bin/ssh/Makefile @@ -7,6 +7,7 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespace.h LINKS= ${BINDIR}/ssh ${BINDIR}/slogin MAN= ssh.1 ssh_config.5 MLINKS= ssh.1 slogin.1 +PACKAGE= ssh SRCS= ssh.c readconf.c clientloop.c sshtty.c \ sshconnect.c sshconnect1.c sshconnect2.c mux.c \ diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile index f2c7e362acd4..ce91e4636399 100644 --- a/secure/usr.sbin/sshd/Makefile +++ b/secure/usr.sbin/sshd/Makefile @@ -18,6 +18,7 @@ SRCS= sshd.c auth-rhosts.c auth-passwd.c auth-rsa.c auth-rh-rsa.c \ roaming_common.c roaming_serv.c \ sandbox-null.c sandbox-rlimit.c sandbox-systrace.c sandbox-darwin.c \ sandbox-seccomp-filter.c sandbox-capsicum.c +PACKAGE= ssh # gss-genr.c really belongs in libssh; see src/secure/lib/libssh/Makefile SRCS+= gss-genr.c diff --git a/usr.bin/ssh-copy-id/Makefile b/usr.bin/ssh-copy-id/Makefile index 033c435bbbfd..93f5ec4a62a9 100644 --- a/usr.bin/ssh-copy-id/Makefile +++ b/usr.bin/ssh-copy-id/Makefile @@ -2,5 +2,6 @@ SCRIPTS= ssh-copy-id.sh MAN= ssh-copy-id.1 +PACKAGE= ssh .include