components/sudo/Makefile
changeset 5497 862a4276da0f
parent 5125 34cc580c62c2
child 5682 94c0ca64c022
equal deleted inserted replaced
5496:4870e9e5e06b 5497:862a4276da0f
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
    18 #
    18 #
    19 # CDDL HEADER END
    19 # CDDL HEADER END
    20 
    20 
    21 #
    21 #
    22 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
    22 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
    23 #
    23 #
    24 
    24 
    25 include ../../make-rules/shared-macros.mk
    25 include ../../make-rules/shared-macros.mk
    26 
    26 
    27 COMPONENT_NAME=		sudo
    27 COMPONENT_NAME=		sudo
    28 SRC_VERSION=	1.8.9
    28 SRC_VERSION=	1.8.15
    29 SRC_PATCH_VERSION=	5
    29 SRC_PATCH_VERSION=
       
    30 ifdef SRC_PATCH_VERSION
    30 COMPONENT_VERSION=	$(SRC_VERSION).$(SRC_PATCH_VERSION)
    31 COMPONENT_VERSION=	$(SRC_VERSION).$(SRC_PATCH_VERSION)
    31 COMPONENT_SRC=		$(COMPONENT_NAME)-$(SRC_VERSION)p$(SRC_PATCH_VERSION)
    32 COMPONENT_SRC=		$(COMPONENT_NAME)-$(SRC_VERSION)p$(SRC_PATCH_VERSION)
       
    33 else
       
    34 COMPONENT_VERSION=	$(SRC_VERSION)
       
    35 COMPONENT_SRC=		$(COMPONENT_NAME)-$(SRC_VERSION)
       
    36 endif
    32 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
    37 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
    33 COMPONENT_ARCHIVE_HASH=	\
    38 COMPONENT_ARCHIVE_HASH=	\
    34     sha256:bc9d5c96de5f8b4d2b014f87a37870aef60d2891c869202454069150a21a5c21
    39     sha256:4316381708324da8b6cb151f655c1a11855207c7c02244d8ffdea5104d7cc308
    35 COMPONENT_ARCHIVE_URL=	http://www.sudo.ws/sudo/dist/$(COMPONENT_ARCHIVE)
    40 COMPONENT_ARCHIVE_URL=	http://www.sudo.ws/sudo/dist/$(COMPONENT_ARCHIVE)
    36 COMPONENT_PROJECT_URL=  http://www.sudo.ws/
    41 COMPONENT_PROJECT_URL=  http://www.sudo.ws/
    37 COMPONENT_BUGDB=	utility/sudo
    42 COMPONENT_BUGDB=	utility/sudo
    38 
    43 
    39 TPNO=			16733
    44 TPNO=			26593
    40 
    45 
    41 include $(WS_MAKE_RULES)/prep.mk
    46 include $(WS_MAKE_RULES)/prep.mk
    42 include $(WS_MAKE_RULES)/configure.mk
    47 include $(WS_MAKE_RULES)/configure.mk
    43 include $(WS_MAKE_RULES)/ips.mk
    48 include $(WS_MAKE_RULES)/ips.mk
       
    49 
       
    50 # Allows zero-sized struct/union declarations and void functions with return
       
    51 # statements returning a value to work.
       
    52 CFLAGS += -features=extensions
    44 
    53 
    45 COMPONENT_PREP_ACTION = ( cd $(@D) ; $(AUTORECONF) -f -I m4 )
    54 COMPONENT_PREP_ACTION = ( cd $(@D) ; $(AUTORECONF) -f -I m4 )
    46 
    55 
    47 CONFIGURE_ENV +=	"CFLAGS=$(CFLAGS)"
    56 CONFIGURE_ENV +=	"CFLAGS=$(CFLAGS)"
    48 CONFIGURE_ENV +=	"MAKE=$(GMAKE)"
    57 CONFIGURE_ENV +=	"MAKE=$(GMAKE)"
    49 CONFIGURE_ENV +=	"CPPFLAGS=$(CPPFLAGS) -I/usr/include/openldap"
    58 CONFIGURE_ENV +=	"CPPFLAGS=$(CPPFLAGS) -I/usr/include/openldap"
    50 CONFIGURE_ENV +=	"LDFLAGS=$(LDFLAGS) -m64 -lldap_r-2.4"
    59 CONFIGURE_ENV +=	"LDFLAGS=$(LDFLAGS) -m64 -lldap_r-2.4"
    51 
    60 
    52 CONFIGURE_OPTIONS +=	--with-ldap
    61 CONFIGURE_OPTIONS +=	--with-ldap
    53 CONFIGURE_OPTIONS +=	--with-project
    62 CONFIGURE_OPTIONS +=	--with-project
    54 CONFIGURE_OPTIONS +=	--with-timedir=/system/volatile/sudo
    63 CONFIGURE_OPTIONS +=	--with-rundir=/system/volatile/sudo
    55 CONFIGURE_OPTIONS +=	--with-pam
    64 CONFIGURE_OPTIONS +=	--with-pam
    56 CONFIGURE_OPTIONS +=	--with-pam-login
    65 CONFIGURE_OPTIONS +=	--with-pam-login
    57 CONFIGURE_OPTIONS +=	--disable-pam-session
    66 CONFIGURE_OPTIONS +=	--disable-pam-session
    58 CONFIGURE_OPTIONS +=	--with-tty-tickets
    67 CONFIGURE_OPTIONS +=	--with-tty-tickets
    59 CONFIGURE_OPTIONS +=	--without-insults
    68 CONFIGURE_OPTIONS +=	--without-insults
    60 CONFIGURE_OPTIONS +=	--without-lecture
    69 CONFIGURE_OPTIONS +=	--without-lecture
    61 CONFIGURE_OPTIONS +=	--with-ignore-dot
    70 CONFIGURE_OPTIONS +=	--with-ignore-dot
    62 CONFIGURE_OPTIONS +=	--with-solaris-audit
    71 CONFIGURE_OPTIONS +=	--with-solaris-audit
    63 CONFIGURE_OPTIONS +=	--libexecdir=/usr/lib/sudo
    72 CONFIGURE_OPTIONS +=	--libexecdir=/usr/lib/$(MACH64)/sudo
    64 CONFIGURE_OPTIONS +=	"sudo_cv_var_nroff_opt_Tascii=no"
    73 CONFIGURE_OPTIONS +=	"sudo_cv_var_nroff_opt_Tascii=no"
    65 
    74 
    66 COMPONENT_BUILD_ENV +=	CC=$(CC) CXX=$(CXX)
    75 COMPONENT_BUILD_ENV +=	CC=$(CC) CXX=$(CXX)
    67 COMPONENT_BUILD_ENV +=	"CFLAGS=$(CFLAGS)"
    76 COMPONENT_BUILD_ENV +=	"CFLAGS=$(CFLAGS)"
    68 
    77 
    69 COMPONENT_INSTALL_TARGETS = install
    78 COMPONENT_INSTALL_TARGETS = install
    70 COMPONENT_INSTALL_ARGS += bindir=$(USRBINDIR)
    79 COMPONENT_INSTALL_ARGS += bindir=$(USRBINDIR)
    71 COMPONENT_INSTALL_ARGS += sbindir=$(USRSBINDIR)
    80 COMPONENT_INSTALL_ARGS += sbindir=$(USRSBINDIR)
       
    81 
       
    82 # Avoid calling "chown 0" on installed files
       
    83 COMPONENT_INSTALL_ARGS += INSTALL_OWNER=
    72 
    84 
    73 # Make sure that sudo is NOT built with its internal sha2 implementation
    85 # Make sure that sudo is NOT built with its internal sha2 implementation
    74 # http://www.sudo.ws/bugs/show_bug.cgi?id=641
    86 # http://www.sudo.ws/bugs/show_bug.cgi?id=641
    75 COMPONENT_TEST_ENV_CMD =
    87 COMPONENT_TEST_ENV_CMD =
    76 COMPONENT_TEST_CMD = \
    88 COMPONENT_TEST_CMD = \
    80 	fi; \
    92 	fi; \
    81 	$(GMAKE)
    93 	$(GMAKE)
    82 
    94 
    83 # Tests may output some compilation lines, so just pull out the relevant test
    95 # Tests may output some compilation lines, so just pull out the relevant test
    84 # output lines for the test results comparison
    96 # output lines for the test results comparison
    85 COMPONENT_TEST_TRANSFORMS += '-e "/^sudo_conf\|^sudo_parseln\|^check_addr\|^check_base64\|^check_fill\|^iolog_path\|^check_symbols\|^sudoers\|^testsudoers\|^visudo\|^check_ttyname/!d"'
    97 COMPONENT_TEST_TRANSFORMS += '-e "/^parse_gids_test\|^strsplit_test\|^atofoo_test\|^hltq_test\|^sudo_conf\|^sudo_parseln\|^check_addr\|^check_base64\|^check_fill\|^iolog_path\|^check_symbols\|^sudoers\|^testsudoers\|^visudo\|^check_ttyname/!d"'
    86 COMPONENT_TEST_TRANSFORMS += '-e "s/\(\/dev\/pts\/\)[0-9][0-9]*/\1\#/"'
    98 COMPONENT_TEST_TRANSFORMS += '-e "s/\(\/dev\/pts\/\)[0-9][0-9]*/\1\#/"'
    87 
    99 
    88 # Enable aslr for this component
   100 # Enable aslr for this component
    89 ASLR_MODE = $(ASLR_ENABLE)
   101 ASLR_MODE = $(ASLR_ENABLE)
    90 
   102