Makefile revision 5566
25cc5fbba63f84b47e389af749f55abbbde71c8cChristian Maeder# CDDL HEADER START
25cc5fbba63f84b47e389af749f55abbbde71c8cChristian Maeder# The contents of this file are subject to the terms of the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# Common Development and Distribution License (the "License").
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# You may not use this file except in compliance with the License.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# or http://www.opensolaris.org/os/licensing.
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# See the License for the specific language governing permissions
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# and limitations under the License.
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder# When distributing Covered Code, include this CDDL HEADER in each
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# If applicable, add the following below this CDDL HEADER, with the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# fields enclosed by brackets "[]" replaced with your own identifying
d27ad22f77ca7399742b54e9dce2cdceed12d5e0Christian Maeder# information: Portions Copyright [yyyy] [name of copyright owner]
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder# CDDL HEADER END
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederCOMPONENT_VERSION= $(SRC_VERSION).$(SRC_PATCH_VERSION)
2e2094a642e3775b0d76b890556407941d3a53b6Christian MaederCOMPONENT_SRC= $(COMPONENT_NAME)-$(SRC_VERSION)p$(SRC_PATCH_VERSION)
2e2094a642e3775b0d76b890556407941d3a53b6Christian MaederCOMPONENT_SRC= $(COMPONENT_NAME)-$(SRC_VERSION)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder sha256:4316381708324da8b6cb151f655c1a11855207c7c02244d8ffdea5104d7cc308
8410667510a76409aca9bb24ff0eda0420088274Christian MaederCOMPONENT_ARCHIVE_URL= http://www.sudo.ws/sudo/dist/$(COMPONENT_ARCHIVE)
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder# Allows zero-sized struct/union declarations and void functions with return
d4892fa7401ceef014ea59d2d900773eaf88fcbdChristian Maeder# statements returning a value to work.
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederCOMPONENT_PREP_ACTION = ( cd $(@D) ; $(AUTORECONF) -f -I m4 )
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCONFIGURE_OPTIONS += --with-rundir=/system/volatile/sudo
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederCONFIGURE_OPTIONS += --libexecdir=/usr/lib/sudo
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederCONFIGURE_OPTIONS += "sudo_cv_var_nroff_opt_Tascii=no"
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederCOMPONENT_INSTALL_ARGS += bindir=$(USRBINDIR)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCOMPONENT_INSTALL_ARGS += sbindir=$(USRSBINDIR)
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder# Avoid calling "chown 0" on installed files
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder# Enable aslr for this component
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder# common targets
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder# 64 build corrupts audit logs because of 17561594. Until that is fixed do 32bit build.
c0c2380bced8159ff0297ece14eba948bd236471Christian MaederVISUDO=$(BUILD_DIR_32)/plugins/sudoers/visudo
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder # Since linking with libmd.so (which provides sha2 capability on
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder # Solaris) is optional, we have a check here to make sure that the
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder # configure script found it correctly.
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder # http://www.sudo.ws/bugs/show_bug.cgi?id=641
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder # Make sure that sudo is NOT built with it's internal sha2 implementation
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder if [[ -n $$( elfdump -s "$(VISUDO)" | grep SHA256Init | grep -v UNDEF ) ]]; then \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder echo "SHA256Init is not an undefined symbol in $(VISUDO)"; \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder # ... but is linked with libmd instead
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder if [[ -z $$( elfdump -d "$(VISUDO)" | grep 'NEEDED .* libmd.so' ) ]]; then \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder echo "$(VISUDO) is not linked against libmd.so"; \