components/openssh/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Thu, 15 May 2014 16:58:20 -0700
changeset 1898 5c902a3c6e7e
parent 1888 67cbe9886a54
child 1924 72ec8810274b
permissions -rw-r--r--
18744156 /usr/gnu/bin/chroot is killed when executed with an invalid command argument
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
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    41
include ../../make-rules/prep.mk
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    42
include ../../make-rules/configure.mk
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    43
include ../../make-rules/ips.mk
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    44
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    45
# Enable ASLR for this component
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    46
ASLR_MODE = $(ASLR_ENABLE)
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    47
1862
753bed6dd354 18127340 migrate the sftp dtrace provider feature from SunSSH to OpenSSH
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1796
diff changeset
    48
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS) -DSET_USE_PAM -DDEPRECATE_SUNSSH_OPT -DLASTLOG_FIX -DKRB5_BUILD_FIX -DAUE_openssh=6172 -DDTRACE_SFTP"
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    49
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    50
# 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
    51
# 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
    52
# 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
    53
# libraries that it needs.
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    54
CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS) -B direct -z nolazyload"
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    55
1888
67cbe9886a54 18717604 openssh fails to build on s12_47 due to fix for 18184297
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1862
diff changeset
    56
# Build with BSM audit. Do not check if getaudit and getaudit_addr are in
67cbe9886a54 18717604 openssh fails to build on s12_47 due to fix for 18184297
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1862
diff changeset
    57
# libbsm, because they are no longer in libbsm and not needed any way.
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    58
CONFIGURE_OPTIONS += --with-audit=bsm
1888
67cbe9886a54 18717604 openssh fails to build on s12_47 due to fix for 18184297
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1862
diff changeset
    59
CONFIGURE_OPTIONS += "ac_cv_lib_bsm_getaudit=yes"       
67cbe9886a54 18717604 openssh fails to build on s12_47 due to fix for 18184297
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1862
diff changeset
    60
CONFIGURE_OPTIONS += "ac_cv_func_getaudit=yes"
67cbe9886a54 18717604 openssh fails to build on s12_47 due to fix for 18184297
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1862
diff changeset
    61
CONFIGURE_OPTIONS += "ac_cv_func_getaudit_addr=yes"
67cbe9886a54 18717604 openssh fails to build on s12_47 due to fix for 18184297
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1862
diff changeset
    62
     
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    63
CONFIGURE_OPTIONS += --with-libedit
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    64
CONFIGURE_OPTIONS += --with-kerberos5
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    65
CONFIGURE_OPTIONS += --with-pam
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    66
CONFIGURE_OPTIONS += --with-sandbox=no
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    67
CONFIGURE_OPTIONS += --with-solaris-contracts
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    68
CONFIGURE_OPTIONS += --with-solaris-projects
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    69
CONFIGURE_OPTIONS += --with-tcp-wrappers
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    70
CONFIGURE_OPTIONS += --with-4in6
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    71
CONFIGURE_OPTIONS += --enable-strip=no
1796
a2310ec32635 PSARC 2014/078 OpenSSH 6.5
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1618
diff changeset
    72
CONFIGURE_OPTIONS += --without-rpath
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    73
CONFIGURE_OPTIONS += --libexecdir=/usr/lib/ssh
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    74
CONFIGURE_OPTIONS += --sbindir=/usr/lib/ssh
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    75
CONFIGURE_OPTIONS += --sysconfdir=/etc/ssh
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    76
1862
753bed6dd354 18127340 migrate the sftp dtrace provider feature from SunSSH to OpenSSH
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1796
diff changeset
    77
# 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
    78
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
    79
    ( 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
    80
      $(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
    81
    )
753bed6dd354 18127340 migrate the sftp dtrace provider feature from SunSSH to OpenSSH
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 1796
diff changeset
    82
1612
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    83
# common targets
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    84
build:		$(BUILD_32)
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    85
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    86
install:	$(INSTALL_32)
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    87
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    88
# 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
    89
# the STC gate.
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    90
test:		$(NO_TESTS)
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    91
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    92
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    93
3f2ec017627f PSARC 2012/335 OpenSSH migration
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    94
include ../../make-rules/depend.mk