Makefile revision 6067
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley#
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley# CDDL HEADER START
3b9bbd52c81036217d92193f46b194a1bf0e00bdTinderbox User#
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# The contents of this file are subject to the terms of the
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# Common Development and Distribution License (the "License").
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# You may not use this file except in compliance with the License.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews#
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# or http://www.opensolaris.org/os/licensing.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# See the License for the specific language governing permissions
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# and limitations under the License.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews#
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
15a44745412679c30a6d022733925af70a38b715David Lawrence# information: Portions Copyright [yyyy] [name of copyright owner]
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson#
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# CDDL HEADER END
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson#
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid Lawrence#
2da2220fe7af2c45724b50b0187523b1fab0cf08Rob Austein# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
2da2220fe7af2c45724b50b0187523b1fab0cf08Rob Austein#
2da2220fe7af2c45724b50b0187523b1fab0cf08Rob AusteinBUILD_BITS= 64
2da2220fe7af2c45724b50b0187523b1fab0cf08Rob AusteinCOMPILER= gcc
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafssoninclude ../../make-rules/shared-macros.mk
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid LawrenceCOMPONENT_NAME= openssh
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid LawrenceCOMPONENT_VERSION= 7.2p2
cb3e854e181373807f7f011e5050c1a8013b4841Brian WellingtonHUMAN_VERSION= $(COMPONENT_VERSION)
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid Lawrence
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid Lawrence# Version for IPS. The encoding rules are:
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid Lawrence# OpenSSH <x>.<y>p<n> => IPS <x>.<y>.0.<n>
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# OpenSSH <x>.<y>.<z>p<n> => IPS <x>.<y>.<z>.<n>
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas GustafssonIPS_COMPONENT_VERSION= 7.2.0.2
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas GustafssonCOMPONENT_PROJECT_URL= http://www.openssh.org/
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas GustafssonCOMPONENT_ARCHIVE_HASH= sha256:a72781d1a043876a224ff1b0032daa4094d87565a68528759c1c2cab5482548c
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas GustafssonCOMPONENT_ARCHIVE_URL= http://mirrors.sonic.net/pub/OpenBSD/OpenSSH/portable/$(COMPONENT_ARCHIVE)
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson
6ca4964362ec37d6afbf614dbb9aaa2f525002f1Mark AndrewsTPNO_OPENSSH= 26419
c968a9ca37964ae0bdc5d452ad784ec93bd04c57David LawrenceTPNO_GSSKEX= 20377
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid Lawrence# Because of set up requirements, test suite is in stc gate.
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid LawrenceTEST_TARGET= $(SKIP_TEST)
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid Lawrence
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid Lawrence# 11.3 has conflicts with ON's SunSSH package, which had not yet added
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid Lawrence# mediated links, thus cannot be updated to.
b897c52f865b2fc4e220e2110b874e59c716456bBob Halleyifeq ($(BUILD_TYPE), evaluation)
b897c52f865b2fc4e220e2110b874e59c716456bBob HalleyBUILD_64=
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsINSTALL_64=
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsPUBLISH_STAMP=
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsendif
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsinclude $(WS_MAKE_RULES)/common.mk
9640c35421ba0bb4af6b6bfbff695d2a0ac560b3Mark Andrews
7877ad5db24dbad945afc670b2010c70d0d7e2f5Mark AndrewsCFLAGS += -DSET_USE_PAM
7877ad5db24dbad945afc670b2010c70d0d7e2f5Mark AndrewsCFLAGS += -DDEPRECATE_SUNSSH_OPT
b897c52f865b2fc4e220e2110b874e59c716456bBob HalleyCFLAGS += -DKRB5_BUILD_FIX
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCFLAGS += -DDTRACE_SFTP
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCFLAGS += -DDISABLE_BANNER
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCFLAGS += -DPAM_ENHANCEMENT
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCFLAGS += -DPAM_BUGFIX
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCFLAGS += -DOPTION_DEFAULT_VALUE
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCFLAGS += -DWITHOUT_ED25519
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCFLAGS += -DPER_SESSION_XAUTHFILE
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCFLAGS += -DWITHOUT_CAST128
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCFLAGS += -DENABLE_OPENSSL_FIPS
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# We need to disable lazyloading of dynamic dependent libraries. During the
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# pre-authentication phase, sshd will chroot to /var/empty which doesn't
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# contain any files. If we use lazyloading, sshd will fail to find any
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# libraries that it needs.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsLDFLAGS += $(LD_B_DIRECT) -z nolazyload
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Enable nxheap and nxstack security extensions
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsLDFLAGS += -z nxheap=enable -z nxstack=enable
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Fix 64-bit linking via compiler.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsLDFLAGS += $(CC_BITS)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --with-audit=solaris
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --with-libedit
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --with-kerberos5
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --with-pam
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --with-sandbox=no
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --with-solaris-contracts
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --with-tcp-wrappers
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --with-4in6
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --with-xauth=$(USRBINDIR)/xauth
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --disable-strip
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --without-rpath
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --libexecdir=$(USRLIBDIR)/ssh
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --sbindir=$(USRLIBDIR)/ssh
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)/ssh
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCONFIGURE_OPTIONS += --disable-lastlog
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark Andrews
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark Andrews# Copy the sftp dtrace provider file and the header file to source directory
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark AndrewsCOMPONENT_PRE_BUILD_ACTION = \
e107074f370ee86275bd64ab8bcaa429fec1c7e2Mark Andrews ( echo "Copying dtrace sftp files..."; \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(LN) -fs $(COMPONENT_DIR)/dtrace_sftp/*.[dh] $(SOURCE_DIR); \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews )
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid Lawrence# Copy Solaris specific source files and generate configuration script
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid LawrenceCOMPONENT_PREP_ACTION += \
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid Lawrence ( $(CP) sources/moduli sources/*.c $(@D)/; \
f4a7d04843eb62c92f2d4ff338da49ae86e3279bDavid Lawrence cd $(@D); autoconf; \
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence )
8959ca20706f210127d0af1df769fb945c92baeaMark Andrews
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid LawrenceREQUIRED_PACKAGES += library/libedit
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsREQUIRED_PACKAGES += library/security/openssl
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsREQUIRED_PACKAGES += library/zlib
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsREQUIRED_PACKAGES += security/kerberos-5
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsREQUIRED_PACKAGES += service/security/kerberos-5
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsREQUIRED_PACKAGES += system/core-os
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsREQUIRED_PACKAGES += system/library/security/gss
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsREQUIRED_PACKAGES += system/network
f6161d8b90541b52946ae845bc8e2bec2647d6cbMark AndrewsREQUIRED_PACKAGES += text/groff/groff-core
5bae12051f80947fb9a5a6a3a54762e8bd08d95bMark Andrews