Marcel Telka
2024-04-02 f1b1912adc00984cd165470b728dda03ac81b2c6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
 
#
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2020, Michal Nowak
# Copyright (c) 2020-2022 Nona Hansel
#
 
BUILD_BITS= 64
OPENSSL_VERSION= 3.1
include ../../../make-rules/shared-macros.mk
 
COMPONENT_NAME=        sudo
SRC_VERSION=        1.9.15
SRC_PATCH_VERSION=    5
SRC_DOT_PATCH_VERSION=    $(shell [ $(SRC_PATCH_VERSION) -gt 0 ] && echo .$(SRC_PATCH_VERSION))
SRC_P_PATCH_VERSION=    $(shell [ $(SRC_PATCH_VERSION) -gt 0 ] && echo p$(SRC_PATCH_VERSION))
HUMAN_VERSION=        $(SRC_VERSION)$(SRC_P_PATCH_VERSION)
COMPONENT_VERSION=    $(SRC_VERSION)$(SRC_DOT_PATCH_VERSION)
COMPONENT_SUMMARY=    sudo - tool to allow certain tasks to be run as root by ordinary users
COMPONENT_SRC=        $(COMPONENT_NAME)-$(SRC_VERSION)$(SRC_P_PATCH_VERSION)
COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= sha256:558d10b9a1991fb3b9fa7fa7b07ec4405b7aefb5b3cb0b0871dbc81e3a88e558
COMPONENT_PROJECT_URL=  https://www.sudo.ws
COMPONENT_ARCHIVE_URL=    $(COMPONENT_PROJECT_URL)/sudo/dist/$(COMPONENT_ARCHIVE)
COMPONENT_SIG_URL=    $(COMPONENT_ARCHIVE_URL).sig
COMPONENT_FMRI=        security/sudo
COMPONENT_CLASSIFICATION=    Applications/System Utilities
COMPONENT_LICENSE=    ISC-like, BSD, zlib license
COMPONENT_LICENSE_FILE=    LICENSE.md
 
include $(WS_MAKE_RULES)/common.mk
 
CONFIGURE_ENV += MAKE=$(GMAKE)
 
COMPONENT_PREP_ACTION = ( cd $(@D)  && autoreconf -vif )
 
CONFIGURE_OPTIONS += --with-ldap
CONFIGURE_OPTIONS += --with-project
CONFIGURE_OPTIONS += --with-rundir=/var/run/sudo
CONFIGURE_OPTIONS += --with-pam 
CONFIGURE_OPTIONS += --with-pam-login
CONFIGURE_OPTIONS += --disable-pam-session
CONFIGURE_OPTIONS += --with-tty-tickets
CONFIGURE_OPTIONS += --without-insults
CONFIGURE_OPTIONS += --without-lecture
CONFIGURE_OPTIONS += --with-ignore-dot
CONFIGURE_OPTIONS += --with-bsm-audit
CONFIGURE_OPTIONS += --libexecdir=$(USRLIBDIR64)
 
COMPONENT_BUILD_ENV += CC="$(CC)"
COMPONENT_BUILD_ENV += CXX="$(CXX)"
COMPONENT_BUILD_ENV += CFLAGS="$(CFLAGS)"
 
COMPONENT_INSTALL_TARGETS = install
 
COMPONENT_TEST_TRANSFORMS += '-ne "/OK/p" '
COMPONENT_TEST_TRANSFORMS += '-ne "/FAIL/p" '
COMPONENT_TEST_TRANSFORMS += '-ne "/errors/p" '
COMPONENT_TEST_TRANSFORMS += '-ne "/failed/p" '
 
# Avoid calling "chown 0" on installed files
COMPONENT_INSTALL_ARGS += INSTALL_OWNER=
 
# Enable aslr for this component
ASLR_MODE = $(ASLR_ENABLE)
 
# Auto-generated dependencies
REQUIRED_PACKAGES += library/security/openssl-31
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += system/library