Makefile revision 3477
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# CDDL HEADER START
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# The contents of this file are subject to the terms of the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Common Development and Distribution License (the "License").
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# You may not use this file except in compliance with the License.
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont#
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# or http://www.opensolaris.org/os/licensing.
83a28ca274521e15086fc39febde507bcc4e145eMark Andrews# See the License for the specific language governing permissions
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# and limitations under the License.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# When distributing Covered Code, include this CDDL HEADER in each
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
e939674d53a127ddeeaf4b41fd72933f0b493308Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# fields enclosed by brackets "[]" replaced with your own identifying
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# information: Portions Copyright [yyyy] [name of copyright owner]
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont#
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# CDDL HEADER END
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont#
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont#
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontinclude ../../make-rules/shared-macros.mk
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPONENT_NAME= openssh
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPONENT_VERSION= 6.5p1
2a31bd531072824ef252c18303859d6af7451b00Francis DupontHUMAN_VERSION= $(COMPONENT_VERSION)
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# Version for IPS. The encoding rules are:
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# OpenSSH <x>.<y>p<n> => IPS <x>.<y>.0.<n>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# OpenSSH <x>.<y>.<z>p<n> => IPS <x>.<y>.<z>.<n>
2a31bd531072824ef252c18303859d6af7451b00Francis DupontIPS_COMPONENT_VERSION= 6.5.0.1
26d8ffe715e74d1e67d268551449b780fec1b95fAutomatic Updater
ca4e44ebe8f3b29a426fe047c4192262ca660c6fAutomatic UpdaterCOMPONENT_PROJECT_URL= http://www.openssh.org/
784a904bd06c7492361ed09a882d10c636b1291bAutomatic UpdaterCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
99d8f5a70440ee8b63ab1745d713b96dde890546Tinderbox UserCOMPONENT_ARCHIVE_HASH= sha256:a1195ed55db945252d5a1730d4a2a2a5c1c9a6aa01ef2e5af750a962623d9027
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserCOMPONENT_ARCHIVE_URL= http://mirror.team-cymru.org/pub/OpenBSD/OpenSSH/portable/$(COMPONENT_ARCHIVE)
19c7b1a0293498a3e36692c59646ed6e15ffc8d0Tinderbox UserCOMPONENT_BUGDB=utility/openssh
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews
2a31bd531072824ef252c18303859d6af7451b00Francis DupontTPNO= 16633
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontinclude ../../make-rules/prep.mk
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontinclude ../../make-rules/configure.mk
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontinclude ../../make-rules/ips.mk
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# Enable ASLR for this component
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntASLR_MODE = $(ASLR_ENABLE)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCFLAGS += -DSET_USE_PAM
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCFLAGS += -DDEPRECATE_SUNSSH_OPT
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCFLAGS += -DKRB5_BUILD_FIX
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCFLAGS += -DAUE_openssh=6172
e939674d53a127ddeeaf4b41fd72933f0b493308Mark AndrewsCFLAGS += -DDTRACE_SFTP
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCFLAGS += -DDISABLE_BANNER
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCFLAGS += -DPAM_ENHANCEMENT
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCFLAGS += -DPAM_BUGFIX
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCFLAGS += -DOPTION_DEFAULT_VALUE
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# We need to disable lazyloading of dynamic dependent libraries. During the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# pre-authentication phase, sshd will chroot to /var/empty which doesn't
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# contain any files. If we use lazyloading, sshd will fail to find any
e939674d53a127ddeeaf4b41fd72933f0b493308Mark Andrews# libraries that it needs.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntLDFLAGS += -B direct -z nolazyload
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Just $(BUILD_64) option was not propogating the 64 bit flags to all the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# necessary places. Hence the -m64 option is added to LDFLAGS for
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# CONFIGURE_OPTIONS.64.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Build with BSM audit. Do not check if getaudit and getaudit_addr are in
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# libbsm, because they are no longer in libbsm and not needed any way.
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCONFIGURE_OPTIONS += --with-audit=bsm
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCONFIGURE_OPTIONS += "ac_cv_lib_bsm_getaudit=yes"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCONFIGURE_OPTIONS += "ac_cv_func_getaudit=yes"
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark AndrewsCONFIGURE_OPTIONS += "ac_cv_func_getaudit_addr=yes"
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
a60bf97f9f7dcde6f4ca6e8188245fb0866200dbEvan HuntCONFIGURE_OPTIONS += --with-libedit
a60bf97f9f7dcde6f4ca6e8188245fb0866200dbEvan HuntCONFIGURE_OPTIONS += --with-kerberos5
a60bf97f9f7dcde6f4ca6e8188245fb0866200dbEvan HuntCONFIGURE_OPTIONS += --with-pam
a60bf97f9f7dcde6f4ca6e8188245fb0866200dbEvan HuntCONFIGURE_OPTIONS += --with-sandbox=no
a60bf97f9f7dcde6f4ca6e8188245fb0866200dbEvan HuntCONFIGURE_OPTIONS += --with-solaris-contracts
a60bf97f9f7dcde6f4ca6e8188245fb0866200dbEvan HuntCONFIGURE_OPTIONS += --with-solaris-projects
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCONFIGURE_OPTIONS += --with-tcp-wrappers
1f821c10583d9cddbaf3626a96ff8cf10cdb645bFrancis DupontCONFIGURE_OPTIONS += --with-4in6
1f821c10583d9cddbaf3626a96ff8cf10cdb645bFrancis DupontCONFIGURE_OPTIONS += --enable-strip=no
1f821c10583d9cddbaf3626a96ff8cf10cdb645bFrancis DupontCONFIGURE_OPTIONS += --without-rpath
1f821c10583d9cddbaf3626a96ff8cf10cdb645bFrancis DupontCONFIGURE_OPTIONS += --libexecdir=/usr/lib/ssh
1f821c10583d9cddbaf3626a96ff8cf10cdb645bFrancis DupontCONFIGURE_OPTIONS += --sbindir=/usr/lib/ssh
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCONFIGURE_OPTIONS += --sysconfdir=/etc/ssh
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCONFIGURE_OPTIONS += --disable-lastlog
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark Andrews# Copy the sftp dtrace provider file and the header file to source directory
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPONENT_PRE_BUILD_ACTION = \
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont ( echo "Copying dtrace sftp files..."; \
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont $(LN) -fs $(COMPONENT_DIR)/dtrace_sftp/*.[dh] $(SOURCE_DIR); \
e939674d53a127ddeeaf4b41fd72933f0b493308Mark Andrews )
e939674d53a127ddeeaf4b41fd72933f0b493308Mark Andrews
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# common targets
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontconfigure: $(CONFIGURE_64)
e939674d53a127ddeeaf4b41fd72933f0b493308Mark Andrews
aaaf8d4f4873d21e55c3ffb4f656203d08339865Mark Andrewsbuild: $(BUILD_64)
aaaf8d4f4873d21e55c3ffb4f656203d08339865Mark Andrews
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrewsinstall: $(INSTALL_64)
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
e939674d53a127ddeeaf4b41fd72933f0b493308Mark Andrews# Because of certain set up requirement, the regress test suite is ported to
e939674d53a127ddeeaf4b41fd72933f0b493308Mark Andrews# the STC gate.
e939674d53a127ddeeaf4b41fd72933f0b493308Mark Andrewstest: $(NO_TESTS)
e939674d53a127ddeeaf4b41fd72933f0b493308Mark Andrews
e939674d53a127ddeeaf4b41fd72933f0b493308Mark AndrewsBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
e939674d53a127ddeeaf4b41fd72933f0b493308Mark Andrews
e939674d53a127ddeeaf4b41fd72933f0b493308Mark Andrewsinclude ../../make-rules/depend.mk
e939674d53a127ddeeaf4b41fd72933f0b493308Mark Andrews