2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2002-10-17 10:55:05 +02:00
|
|
|
#
|
|
|
|
# openssh
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2002-10-17 10:55:05 +02:00
|
|
|
|
2019-06-21 18:46:28 +02:00
|
|
|
OPENSSH_VERSION = 8.0p1
|
2010-12-01 15:44:26 +01:00
|
|
|
OPENSSH_SITE = http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable
|
2017-03-30 15:43:39 +02:00
|
|
|
OPENSSH_LICENSE = BSD-3-Clause, BSD-2-Clause, Public Domain
|
2014-05-06 17:42:38 +02:00
|
|
|
OPENSSH_LICENSE_FILES = LICENCE
|
2019-04-25 20:14:37 +02:00
|
|
|
OPENSSH_CONF_ENV = \
|
|
|
|
LD="$(TARGET_CC)" \
|
|
|
|
LDFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl`
|
2014-12-24 08:54:24 +01:00
|
|
|
OPENSSH_CONF_OPTS = \
|
|
|
|
--sysconfdir=/etc/ssh \
|
2018-12-20 18:58:13 +01:00
|
|
|
--with-default-path=$(BR2_SYSTEM_DEFAULT_PATH) \
|
2014-12-24 08:54:24 +01:00
|
|
|
--disable-lastlog \
|
|
|
|
--disable-utmp \
|
|
|
|
--disable-utmpx \
|
|
|
|
--disable-wtmp \
|
|
|
|
--disable-wtmpx \
|
|
|
|
--disable-strip
|
2002-10-17 10:55:05 +02:00
|
|
|
|
2018-12-17 23:25:32 +01:00
|
|
|
define OPENSSH_PERMISSIONS
|
|
|
|
/var/empty d 755 root root - - - - -
|
|
|
|
endef
|
|
|
|
|
2016-07-11 16:35:14 +02:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),)
|
2015-08-29 09:46:35 +02:00
|
|
|
OPENSSH_CONF_OPTS += --without-pie
|
|
|
|
endif
|
2014-07-30 14:32:21 +02:00
|
|
|
|
2019-04-25 20:14:37 +02:00
|
|
|
OPENSSH_DEPENDENCIES = host-pkgconf zlib openssl
|
2003-11-12 10:31:12 +01:00
|
|
|
|
2017-04-18 15:03:03 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y)
|
|
|
|
OPENSSH_DEPENDENCIES += cryptodev-linux
|
|
|
|
OPENSSH_CONF_OPTS += --with-ssl-engine
|
|
|
|
else
|
|
|
|
OPENSSH_CONF_OPTS += --without-ssl-engine
|
|
|
|
endif
|
|
|
|
|
2012-09-15 16:27:53 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
|
2015-07-14 22:20:22 +02:00
|
|
|
define OPENSSH_INSTALL_PAM_CONF
|
|
|
|
$(INSTALL) -D -m 644 $(@D)/contrib/sshd.pam.generic $(TARGET_DIR)/etc/pam.d/sshd
|
|
|
|
$(SED) '\%password required /lib/security/pam_cracklib.so%d' $(TARGET_DIR)/etc/pam.d/sshd
|
|
|
|
$(SED) 's/\#UsePAM no/UsePAM yes/' $(TARGET_DIR)/etc/ssh/sshd_config
|
|
|
|
endef
|
|
|
|
|
2012-09-15 16:27:53 +02:00
|
|
|
OPENSSH_DEPENDENCIES += linux-pam
|
2014-09-27 21:32:44 +02:00
|
|
|
OPENSSH_CONF_OPTS += --with-pam
|
2015-07-14 22:20:22 +02:00
|
|
|
OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_PAM_CONF
|
|
|
|
else
|
|
|
|
OPENSSH_CONF_OPTS += --without-pam
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
|
|
|
|
OPENSSH_DEPENDENCIES += libselinux
|
|
|
|
OPENSSH_CONF_OPTS += --with-selinux
|
|
|
|
else
|
|
|
|
OPENSSH_CONF_OPTS += --without-selinux
|
2012-09-15 16:27:53 +02:00
|
|
|
endif
|
|
|
|
|
2019-02-06 17:36:39 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS),y)
|
|
|
|
define OPENSSH_INSTALL_SYSTEMD_SYSUSERS
|
|
|
|
$(INSTALL) -m 0644 -D package/openssh/sshd-sysusers.conf \
|
|
|
|
$(TARGET_DIR)/usr/lib/sysusers.d/sshd.conf
|
|
|
|
endef
|
|
|
|
else
|
|
|
|
define OPENSSH_USERS
|
|
|
|
sshd -1 sshd -1 * /var/empty - - SSH drop priv user
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2013-12-04 11:37:53 +01:00
|
|
|
define OPENSSH_INSTALL_INIT_SYSTEMD
|
|
|
|
$(INSTALL) -D -m 644 package/openssh/sshd.service \
|
2015-03-20 20:13:59 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/sshd.service
|
2013-12-04 11:37:53 +01:00
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
2015-03-20 20:13:59 +01:00
|
|
|
ln -fs ../../../../usr/lib/systemd/system/sshd.service \
|
2013-12-04 11:37:53 +01:00
|
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/sshd.service
|
2019-02-06 17:36:39 +01:00
|
|
|
$(OPENSSH_INSTALL_SYSTEMD_SYSUSERS)
|
2010-09-01 22:48:22 +02:00
|
|
|
endef
|
|
|
|
|
2013-12-04 11:37:53 +01:00
|
|
|
define OPENSSH_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -D -m 755 package/openssh/S50sshd \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S50sshd
|
|
|
|
endef
|
2010-09-01 22:48:22 +02:00
|
|
|
|
2018-02-07 19:35:59 +01:00
|
|
|
define OPENSSH_INSTALL_SSH_COPY_ID
|
|
|
|
$(INSTALL) -D -m 755 $(@D)/contrib/ssh-copy-id $(TARGET_DIR)/usr/bin/ssh-copy-id
|
|
|
|
endef
|
|
|
|
|
|
|
|
OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_SSH_COPY_ID
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|