components/openssh/Makefile
author gww <gary.winiger@oracle.com>
Thu, 04 Dec 2014 16:14:22 -0800
changeset 3513 37c4496b7ed3
parent 2225 f064d3d3190d
child 3520 6bfe35769346
permissions -rw-r--r--
19629847 OpenSSH does not support Solaris Audit for login/logout.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
     1
#
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
     3
#
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
     7
#
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    12
#
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    18
#
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    20
#
1618
bf9f53038301 17997193 misc. problems in Makefile and openssh.p5m
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1612
diff changeset
    21
# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    22
#
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    24
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    25
COMPONENT_NAME=		openssh
1796
a2310ec32635 PSARC 2014/078 OpenSSH 6.5
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1618
diff changeset
    26
COMPONENT_VERSION=	6.5p1
1618
bf9f53038301 17997193 misc. problems in Makefile and openssh.p5m
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1612
diff changeset
    27
HUMAN_VERSION=		$(COMPONENT_VERSION)
bf9f53038301 17997193 misc. problems in Makefile and openssh.p5m
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1612
diff changeset
    28
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
bf9f53038301 17997193 misc. problems in Makefile and openssh.p5m
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1612
diff changeset
    29
bf9f53038301 17997193 misc. problems in Makefile and openssh.p5m
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1612
diff changeset
    30
# Version for IPS.  The encoding rules are:
bf9f53038301 17997193 misc. problems in Makefile and openssh.p5m
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1612
diff changeset
    31
#   OpenSSH <x>.<y>p<n>     => IPS <x>.<y>.0.<n>
bf9f53038301 17997193 misc. problems in Makefile and openssh.p5m
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1612
diff changeset
    32
#   OpenSSH <x>.<y>.<z>p<n> => IPS <x>.<y>.<z>.<n>
1796
a2310ec32635 PSARC 2014/078 OpenSSH 6.5
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1618
diff changeset
    33
IPS_COMPONENT_VERSION=	6.5.0.1
1618
bf9f53038301 17997193 misc. problems in Makefile and openssh.p5m
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1612
diff changeset
    34
bf9f53038301 17997193 misc. problems in Makefile and openssh.p5m
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1612
diff changeset
    35
COMPONENT_PROJECT_URL=	http://www.openssh.org/
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    36
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
1796
a2310ec32635 PSARC 2014/078 OpenSSH 6.5
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1618
diff changeset
    37
COMPONENT_ARCHIVE_HASH=	sha256:a1195ed55db945252d5a1730d4a2a2a5c1c9a6aa01ef2e5af750a962623d9027
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    38
COMPONENT_ARCHIVE_URL=	http://mirror.team-cymru.org/pub/OpenBSD/OpenSSH/portable/$(COMPONENT_ARCHIVE)
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    39
COMPONENT_BUGDB=utility/openssh
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    40
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1924
diff changeset
    41
TPNO=			16633
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1924
diff changeset
    42
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    43
include ../../make-rules/prep.mk
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    44
include ../../make-rules/configure.mk
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    45
include ../../make-rules/ips.mk
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    46
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    47
# Enable ASLR for this component
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    48
ASLR_MODE = $(ASLR_ENABLE)
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    49
2072
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2070
diff changeset
    50
CFLAGS += -DSET_USE_PAM
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2070
diff changeset
    51
CFLAGS += -DDEPRECATE_SUNSSH_OPT
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2070
diff changeset
    52
CFLAGS += -DKRB5_BUILD_FIX
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2070
diff changeset
    53
CFLAGS += -DDTRACE_SFTP
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2070
diff changeset
    54
CFLAGS += -DDISABLE_BANNER
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2070
diff changeset
    55
CFLAGS += -DPAM_ENHANCEMENT
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2070
diff changeset
    56
CFLAGS += -DPAM_BUGFIX
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2070
diff changeset
    57
CFLAGS += -DOPTION_DEFAULT_VALUE
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2070
diff changeset
    58
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2070
diff changeset
    59
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" 
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    60
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    61
# We need to disable lazyloading of dynamic dependent libraries. During the
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    62
# pre-authentication phase, sshd will chroot to /var/empty which doesn't
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    63
# contain any files. If we use lazyloading, sshd will fail to find any
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    64
# libraries that it needs.
2196
2063c1da2a7a 18163120 deliver OpenSSH in 64bit mode
kavya.racharla@oracle.com <kavya.racharla@oracle.com>
parents: 2181
diff changeset
    65
LDFLAGS += -B direct -z nolazyload
2063c1da2a7a 18163120 deliver OpenSSH in 64bit mode
kavya.racharla@oracle.com <kavya.racharla@oracle.com>
parents: 2181
diff changeset
    66
2063c1da2a7a 18163120 deliver OpenSSH in 64bit mode
kavya.racharla@oracle.com <kavya.racharla@oracle.com>
parents: 2181
diff changeset
    67
# Just $(BUILD_64) option was not propogating the 64 bit flags to all the
2063c1da2a7a 18163120 deliver OpenSSH in 64bit mode
kavya.racharla@oracle.com <kavya.racharla@oracle.com>
parents: 2181
diff changeset
    68
# necessary places. Hence the -m64 option is added to LDFLAGS for
2063c1da2a7a 18163120 deliver OpenSSH in 64bit mode
kavya.racharla@oracle.com <kavya.racharla@oracle.com>
parents: 2181
diff changeset
    69
# CONFIGURE_OPTIONS.64.
2063c1da2a7a 18163120 deliver OpenSSH in 64bit mode
kavya.racharla@oracle.com <kavya.racharla@oracle.com>
parents: 2181
diff changeset
    70
CONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    71
3513
37c4496b7ed3 19629847 OpenSSH does not support Solaris Audit for login/logout.
gww <gary.winiger@oracle.com>
parents: 2225
diff changeset
    72
CONFIGURE_OPTIONS += --with-audit=solaris
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    73
CONFIGURE_OPTIONS += --with-libedit
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    74
CONFIGURE_OPTIONS += --with-kerberos5
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    75
CONFIGURE_OPTIONS += --with-pam
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    76
CONFIGURE_OPTIONS += --with-sandbox=no
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    77
CONFIGURE_OPTIONS += --with-solaris-contracts
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    78
CONFIGURE_OPTIONS += --with-solaris-projects
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    79
CONFIGURE_OPTIONS += --with-tcp-wrappers
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    80
CONFIGURE_OPTIONS += --with-4in6
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    81
CONFIGURE_OPTIONS += --enable-strip=no
1796
a2310ec32635 PSARC 2014/078 OpenSSH 6.5
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1618
diff changeset
    82
CONFIGURE_OPTIONS += --without-rpath
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    83
CONFIGURE_OPTIONS += --libexecdir=/usr/lib/ssh
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    84
CONFIGURE_OPTIONS += --sbindir=/usr/lib/ssh
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    85
CONFIGURE_OPTIONS += --sysconfdir=/etc/ssh
2128
ea2364416471 PSARC/2014/342 pam_unix_session lastlog support
Brent Paulson <Brent.Paulson@Oracle.COM>
parents: 2072
diff changeset
    86
CONFIGURE_OPTIONS += --disable-lastlog
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    87
1862
753bed6dd354 18127340 migrate the sftp dtrace provider feature from SunSSH to OpenSSH
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1796
diff changeset
    88
# Copy the sftp dtrace provider file and the header file to source directory
753bed6dd354 18127340 migrate the sftp dtrace provider feature from SunSSH to OpenSSH
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1796
diff changeset
    89
COMPONENT_PRE_BUILD_ACTION = \
753bed6dd354 18127340 migrate the sftp dtrace provider feature from SunSSH to OpenSSH
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1796
diff changeset
    90
    ( echo "Copying dtrace sftp files..."; \
753bed6dd354 18127340 migrate the sftp dtrace provider feature from SunSSH to OpenSSH
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1796
diff changeset
    91
      $(LN) -fs $(COMPONENT_DIR)/dtrace_sftp/*.[dh] $(SOURCE_DIR); \
753bed6dd354 18127340 migrate the sftp dtrace provider feature from SunSSH to OpenSSH
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1796
diff changeset
    92
    )
753bed6dd354 18127340 migrate the sftp dtrace provider feature from SunSSH to OpenSSH
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1796
diff changeset
    93
3513
37c4496b7ed3 19629847 OpenSSH does not support Solaris Audit for login/logout.
gww <gary.winiger@oracle.com>
parents: 2225
diff changeset
    94
# Copy source files that are not yet part of a patch
37c4496b7ed3 19629847 OpenSSH does not support Solaris Audit for login/logout.
gww <gary.winiger@oracle.com>
parents: 2225
diff changeset
    95
COMPONENT_PREP_ACTION += ($(CP) sources/*.c $(@D)/)
37c4496b7ed3 19629847 OpenSSH does not support Solaris Audit for login/logout.
gww <gary.winiger@oracle.com>
parents: 2225
diff changeset
    96
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    97
# common targets
2225
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 2196
diff changeset
    98
configure:	$(CONFIGURE_64)
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 2196
diff changeset
    99
2196
2063c1da2a7a 18163120 deliver OpenSSH in 64bit mode
kavya.racharla@oracle.com <kavya.racharla@oracle.com>
parents: 2181
diff changeset
   100
build:		$(BUILD_64)
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
   101
2196
2063c1da2a7a 18163120 deliver OpenSSH in 64bit mode
kavya.racharla@oracle.com <kavya.racharla@oracle.com>
parents: 2181
diff changeset
   102
install:	$(INSTALL_64)
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
   103
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
   104
# Because of certain set up requirement, the regress test suite is ported to
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
   105
# the STC gate.
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
   106
test:		$(NO_TESTS)
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
   107
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
   108
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
   109
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
   110
include ../../make-rules/depend.mk