components/sudo/Makefile
author Lukas Rovensky <Lukas.Rovensky@oracle.com>
Thu, 03 Mar 2016 05:57:08 -0800
branchs11u3-sru
changeset 5568 d36fc1f41120
parent 4067 4be1f488dda8
child 7409 f574f35f5142
permissions -rw-r--r--
22663737 Upgrade sudo to version 1.8.15 22519409 problem in UTILITY/SUDO
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     1
#
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     3
#
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     7
#
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    12
#
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    18
#
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    20
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    21
#
5568
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    22
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    23
#
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    24
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    25
include ../../make-rules/shared-macros.mk
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    26
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    27
COMPONENT_NAME=		sudo
5568
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    28
SRC_VERSION=	1.8.15
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    29
SRC_PATCH_VERSION=
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    30
ifdef SRC_PATCH_VERSION
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    31
COMPONENT_VERSION=	$(SRC_VERSION).$(SRC_PATCH_VERSION)
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    32
COMPONENT_SRC=		$(COMPONENT_NAME)-$(SRC_VERSION)p$(SRC_PATCH_VERSION)
5568
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    33
else
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    34
COMPONENT_VERSION=	$(SRC_VERSION)
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    35
COMPONENT_SRC=		$(COMPONENT_NAME)-$(SRC_VERSION)
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    36
endif
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    37
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 797
diff changeset
    38
COMPONENT_ARCHIVE_HASH=	\
5568
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    39
    sha256:4316381708324da8b6cb151f655c1a11855207c7c02244d8ffdea5104d7cc308
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    40
COMPONENT_ARCHIVE_URL=	http://www.sudo.ws/sudo/dist/$(COMPONENT_ARCHIVE)
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    41
COMPONENT_PROJECT_URL=  http://www.sudo.ws/
2434
6c9bb5cf5610 15930486 - Auto-generation of Userland gate list for the Solaris 11 Update Release
Rich Burridge <rich.burridge@oracle.com>
parents: 864
diff changeset
    42
COMPONENT_BUGDB=	utility/sudo
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    43
5568
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    44
TPNO=			26593
3208
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
    45
3996
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3697
diff changeset
    46
include $(WS_MAKE_RULES)/prep.mk
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3697
diff changeset
    47
include $(WS_MAKE_RULES)/configure.mk
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3697
diff changeset
    48
include $(WS_MAKE_RULES)/ips.mk
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    49
5568
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    50
# Allows zero-sized struct/union declarations and void functions with return
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    51
# statements returning a value to work.
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    52
CFLAGS += -features=extensions
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    53
3048
4941064bbcd3 16446717 add Solaris adt_*() auditing to sudo
April Chin <april.chin@oracle.com>
parents: 2568
diff changeset
    54
COMPONENT_PREP_ACTION = ( cd $(@D) ; $(AUTORECONF) -f -I m4 )
4941064bbcd3 16446717 add Solaris adt_*() auditing to sudo
April Chin <april.chin@oracle.com>
parents: 2568
diff changeset
    55
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    56
CONFIGURE_ENV +=	"CC=$(CC)"
2568
f402d954b15b 16424604 Upgrade sudo to 1.8.6p7
April Chin <april.chin@oracle.com>
parents: 2506
diff changeset
    57
CONFIGURE_ENV +=	"CFLAGS=$(CFLAGS)"
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    58
CONFIGURE_ENV +=	"CXX=$(CXX)"
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    59
CONFIGURE_ENV +=	"MAKE=$(GMAKE)"
3208
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
    60
CONFIGURE_ENV +=	"LDFLAGS=$(LDFLAGS)"
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    61
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    62
CONFIGURE_OPTIONS +=	--with-ldap
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    63
CONFIGURE_OPTIONS +=	--with-project
5568
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    64
CONFIGURE_OPTIONS +=	--with-rundir=/system/volatile/sudo
3697
b681756a810c 19822771 sudo(1m) calls pam_open_session() which doesn't interact well w/pam_unix_session
Brent Paulson <Brent.Paulson@Oracle.COM>
parents: 3208
diff changeset
    65
CONFIGURE_OPTIONS +=	--with-pam
b681756a810c 19822771 sudo(1m) calls pam_open_session() which doesn't interact well w/pam_unix_session
Brent Paulson <Brent.Paulson@Oracle.COM>
parents: 3208
diff changeset
    66
CONFIGURE_OPTIONS +=	--with-pam-login
b681756a810c 19822771 sudo(1m) calls pam_open_session() which doesn't interact well w/pam_unix_session
Brent Paulson <Brent.Paulson@Oracle.COM>
parents: 3208
diff changeset
    67
CONFIGURE_OPTIONS +=	--disable-pam-session
447
7ca7b95abd2f PSARC/2011/252 sudo 1.8.1
Darren J Moffat <Darren.Moffat@Oracle.COM>
parents: 279
diff changeset
    68
CONFIGURE_OPTIONS +=	--with-tty-tickets
7ca7b95abd2f PSARC/2011/252 sudo 1.8.1
Darren J Moffat <Darren.Moffat@Oracle.COM>
parents: 279
diff changeset
    69
CONFIGURE_OPTIONS +=	--without-insults
7ca7b95abd2f PSARC/2011/252 sudo 1.8.1
Darren J Moffat <Darren.Moffat@Oracle.COM>
parents: 279
diff changeset
    70
CONFIGURE_OPTIONS +=	--without-lecture
7ca7b95abd2f PSARC/2011/252 sudo 1.8.1
Darren J Moffat <Darren.Moffat@Oracle.COM>
parents: 279
diff changeset
    71
CONFIGURE_OPTIONS +=	--with-ignore-dot
3048
4941064bbcd3 16446717 add Solaris adt_*() auditing to sudo
April Chin <april.chin@oracle.com>
parents: 2568
diff changeset
    72
CONFIGURE_OPTIONS +=	--with-solaris-audit
447
7ca7b95abd2f PSARC/2011/252 sudo 1.8.1
Darren J Moffat <Darren.Moffat@Oracle.COM>
parents: 279
diff changeset
    73
CONFIGURE_OPTIONS +=	--libexecdir=/usr/lib/sudo
864
8070f77a5a10 7174850 permanentish temporary files have returned again
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 840
diff changeset
    74
CONFIGURE_OPTIONS +=	"sudo_cv_var_nroff_opt_Tascii=no"
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    75
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    76
COMPONENT_BUILD_ENV +=	CC=$(CC) CXX=$(CXX)
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    77
COMPONENT_BUILD_ENV +=	"CFLAGS=$(CFLAGS)"
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    78
447
7ca7b95abd2f PSARC/2011/252 sudo 1.8.1
Darren J Moffat <Darren.Moffat@Oracle.COM>
parents: 279
diff changeset
    79
COMPONENT_INSTALL_TARGETS = install
3208
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
    80
COMPONENT_INSTALL_ARGS += bindir=$(USRBINDIR)
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
    81
COMPONENT_INSTALL_ARGS += sbindir=$(USRSBINDIR)
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
    82
5568
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    83
# Avoid calling "chown 0" on installed files
d36fc1f41120 22663737 Upgrade sudo to version 1.8.15
Lukas Rovensky <Lukas.Rovensky@oracle.com>
parents: 4067
diff changeset
    84
COMPONENT_INSTALL_ARGS += INSTALL_OWNER=
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    85
3048
4941064bbcd3 16446717 add Solaris adt_*() auditing to sudo
April Chin <april.chin@oracle.com>
parents: 2568
diff changeset
    86
# Enable aslr for this component
4941064bbcd3 16446717 add Solaris adt_*() auditing to sudo
April Chin <april.chin@oracle.com>
parents: 2568
diff changeset
    87
ASLR_MODE = $(ASLR_ENABLE)
4941064bbcd3 16446717 add Solaris adt_*() auditing to sudo
April Chin <april.chin@oracle.com>
parents: 2568
diff changeset
    88
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    89
# common targets
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    90
3208
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
    91
# 64 build corrupts audit logs because of 17561594. Until that is fixed do 32bit build.
447
7ca7b95abd2f PSARC/2011/252 sudo 1.8.1
Darren J Moffat <Darren.Moffat@Oracle.COM>
parents: 279
diff changeset
    92
build:		$(BUILD_32)
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    93
447
7ca7b95abd2f PSARC/2011/252 sudo 1.8.1
Darren J Moffat <Darren.Moffat@Oracle.COM>
parents: 279
diff changeset
    94
install:	$(INSTALL_32)
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    95
3208
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
    96
VISUDO=$(BUILD_DIR_32)/plugins/sudoers/visudo
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
    97
test:
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
    98
	# Since linking with libmd.so (which provides sha2 capability on
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
    99
	# Solaris) is optional, we have a check here to make sure that the
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
   100
	# configure script found it correctly.
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
   101
	# http://www.sudo.ws/bugs/show_bug.cgi?id=641
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
   102
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
   103
	# Make sure that sudo is NOT built with it's internal sha2 implementation
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
   104
	if [[ -n $$( elfdump -s "$(VISUDO)" | grep SHA256Init | grep -v UNDEF ) ]]; then \
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
   105
		echo "SHA256Init is not an undefined symbol in $(VISUDO)"; \
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
   106
		exit 1; \
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
   107
	fi
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
   108
	# ... but is linked with libmd instead
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
   109
	if [[ -z $$( elfdump -d "$(VISUDO)" | grep 'NEEDED .* libmd.so' ) ]]; then \
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
   110
		echo "$(VISUDO) is not linked against libmd.so"; \
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
   111
		exit 1; \
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
   112
	fi
73ff78fac05b 17890284 Update to sudo version 1.8.9p5
Vladimir Marek <Vladimir.Marek@oracle.com>
parents: 3048
diff changeset
   113
279
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   114
c6af843791cd 7044076 move sudo from sfw to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   115
3996
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3697
diff changeset
   116
REQUIRED_PACKAGES += library/zlib
20c0f21bbe1e 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 3697
diff changeset
   117
REQUIRED_PACKAGES += system/library
4067
4be1f488dda8 16997972 crypto package refactoring breaks userland build
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 3996
diff changeset
   118
REQUIRED_PACKAGES += system/library/security/crypto