components/sudo/Makefile
branchs11-update
changeset 3208 73ff78fac05b
parent 3048 4941064bbcd3
child 3697 b681756a810c
equal deleted inserted replaced
3205:0991d62b193d 3208:73ff78fac05b
    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.6
    28 SRC_VERSION=	1.8.9
    29 SRC_PATCH_VERSION=	7
    29 SRC_PATCH_VERSION=	5
    30 COMPONENT_VERSION=	$(SRC_VERSION).$(SRC_PATCH_VERSION)
    30 COMPONENT_VERSION=	$(SRC_VERSION).$(SRC_PATCH_VERSION)
    31 COMPONENT_SRC=		$(COMPONENT_NAME)-$(SRC_VERSION)p$(SRC_PATCH_VERSION)
    31 COMPONENT_SRC=		$(COMPONENT_NAME)-$(SRC_VERSION)p$(SRC_PATCH_VERSION)
    32 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
    32 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
    33 COMPONENT_ARCHIVE_HASH=	\
    33 COMPONENT_ARCHIVE_HASH=	\
    34     sha256:301089edb22356f59d097f6abbe1303f03927a38691b02959d618546c2125036
    34     sha256:bc9d5c96de5f8b4d2b014f87a37870aef60d2891c869202454069150a21a5c21
    35 COMPONENT_ARCHIVE_URL=	http://www.sudo.ws/sudo/dist/$(COMPONENT_ARCHIVE)
    35 COMPONENT_ARCHIVE_URL=	http://www.sudo.ws/sudo/dist/$(COMPONENT_ARCHIVE)
    36 COMPONENT_PROJECT_URL=  http://www.sudo.ws/
    36 COMPONENT_PROJECT_URL=  http://www.sudo.ws/
    37 COMPONENT_BUGDB=	utility/sudo
    37 COMPONENT_BUGDB=	utility/sudo
       
    38 
       
    39 TPNO=			16733
    38 
    40 
    39 include $(WS_TOP)/make-rules/prep.mk
    41 include $(WS_TOP)/make-rules/prep.mk
    40 include $(WS_TOP)/make-rules/configure.mk
    42 include $(WS_TOP)/make-rules/configure.mk
    41 include $(WS_TOP)/make-rules/ips.mk
    43 include $(WS_TOP)/make-rules/ips.mk
    42 
    44 
    43 # configure.in has been patched, so re-generate configure file
       
    44 COMPONENT_PREP_ACTION = ( cd $(@D) ; $(AUTORECONF) -f -I m4 )
    45 COMPONENT_PREP_ACTION = ( cd $(@D) ; $(AUTORECONF) -f -I m4 )
    45 
    46 
    46 CONFIGURE_ENV +=	"CC=$(CC)"
    47 CONFIGURE_ENV +=	"CC=$(CC)"
    47 CONFIGURE_ENV +=	"CFLAGS=$(CFLAGS)"
    48 CONFIGURE_ENV +=	"CFLAGS=$(CFLAGS)"
    48 CONFIGURE_ENV +=	"CXX=$(CXX)"
    49 CONFIGURE_ENV +=	"CXX=$(CXX)"
    49 CONFIGURE_ENV +=	"MAKE=$(GMAKE)"
    50 CONFIGURE_ENV +=	"MAKE=$(GMAKE)"
       
    51 CONFIGURE_ENV +=	"LDFLAGS=$(LDFLAGS)"
    50 
    52 
    51 CONFIGURE_OPTIONS +=	--with-ldap
    53 CONFIGURE_OPTIONS +=	--with-ldap
    52 CONFIGURE_OPTIONS +=	--with-project
    54 CONFIGURE_OPTIONS +=	--with-project
    53 CONFIGURE_OPTIONS +=	--with-timedir=/system/volatile/sudo
    55 CONFIGURE_OPTIONS +=	--with-timedir=/system/volatile/sudo
    54 CONFIGURE_OPTIONS +=	--with-pam --with-pam-login
    56 CONFIGURE_OPTIONS +=	--with-pam --with-pam-login
    62 
    64 
    63 COMPONENT_BUILD_ENV +=	CC=$(CC) CXX=$(CXX)
    65 COMPONENT_BUILD_ENV +=	CC=$(CC) CXX=$(CXX)
    64 COMPONENT_BUILD_ENV +=	"CFLAGS=$(CFLAGS)"
    66 COMPONENT_BUILD_ENV +=	"CFLAGS=$(CFLAGS)"
    65 
    67 
    66 COMPONENT_INSTALL_TARGETS = install
    68 COMPONENT_INSTALL_TARGETS = install
       
    69 COMPONENT_INSTALL_ARGS += bindir=$(USRBINDIR)
       
    70 COMPONENT_INSTALL_ARGS += sbindir=$(USRSBINDIR)
       
    71 
    67 
    72 
    68 # Enable aslr for this component
    73 # Enable aslr for this component
    69 ASLR_MODE = $(ASLR_ENABLE)
    74 ASLR_MODE = $(ASLR_ENABLE)
    70 
    75 
    71 # common targets
    76 # common targets
    72 
    77 
       
    78 # 64 build corrupts audit logs because of 17561594. Until that is fixed do 32bit build.
    73 build:		$(BUILD_32)
    79 build:		$(BUILD_32)
    74 
    80 
    75 install:	$(INSTALL_32)
    81 install:	$(INSTALL_32)
    76 
    82 
    77 test:		$(NO_TESTS)
    83 VISUDO=$(BUILD_DIR_32)/plugins/sudoers/visudo
       
    84 test:
       
    85 	# Since linking with libmd.so (which provides sha2 capability on
       
    86 	# Solaris) is optional, we have a check here to make sure that the
       
    87 	# configure script found it correctly.
       
    88 	# http://www.sudo.ws/bugs/show_bug.cgi?id=641
       
    89 
       
    90 	# Make sure that sudo is NOT built with it's internal sha2 implementation
       
    91 	if [[ -n $$( elfdump -s "$(VISUDO)" | grep SHA256Init | grep -v UNDEF ) ]]; then \
       
    92 		echo "SHA256Init is not an undefined symbol in $(VISUDO)"; \
       
    93 		exit 1; \
       
    94 	fi
       
    95 	# ... but is linked with libmd instead
       
    96 	if [[ -z $$( elfdump -d "$(VISUDO)" | grep 'NEEDED .* libmd.so' ) ]]; then \
       
    97 		echo "$(VISUDO) is not linked against libmd.so"; \
       
    98 		exit 1; \
       
    99 	fi
       
   100 
    78 
   101 
    79 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
   102 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
    80 
   103 
    81 include $(WS_TOP)/make-rules/depend.mk
   104 include $(WS_TOP)/make-rules/depend.mk