-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildenv
85 lines (73 loc) · 2.68 KB
/
buildenv
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
# bump: sudo-version /SUDO_VERSION="(.*)"/ https://www.sudo.ws/getting/source/|re:/sudo-([\d.]+p?\d?).tar.gz"/$1/
SUDO_VERSION="1.9.16p2"
export ZOPEN_BUILD_LINE="STABLE"
export ZOPEN_CATEGORIES="core"
export ZOPEN_DEV_URL="https://github.com/sudo-project/sudo.git"
export ZOPEN_DEV_DEPS="make coreutils zoslib openssl zlib gawk openssl getopt"
export ZOPEN_STABLE_URL="https://www.sudo.ws/dist/sudo-$SUDO_VERSION.tar.gz"
export ZOPEN_STABLE_DEPS="make coreutils zoslib openssl zlib gawk openssl getopt"
export ZOPEN_EXTRA_CPPFLAGS="-I\${OPENSSL_HOME}/include -I\${ZLIB_HOME}/include"
export ZOPEN_EXTRA_CONFIGURE_OPTS="--without-interfaces --with-runas-default=BPXROOT --enable-openssl --enable-static-sudoers"
export ZOPEN_MAKE_MINIMAL="yes"
export ZOPEN_MAKE_OPTS="-j\$ZOPEN_NUM_JOBS"
export ZOPEN_CHECK_MINIMAL="yes"
export ZOPEN_CHECK_OPTS="-i check-verbose"
export ZOPEN_INSTALL_OPTS="install vardir=\"\$ZOPEN_INSTALL_DIR/var/lib/sudo\" sysconfdir=\"\$ZOPEN_INSTALL_DIR/etc\" rundir=\"\$ZOPEN_INSTALL_DIR/var/run/sudo\""
export ZOPEN_COMP=CLANG # use clang
zopen_check_results()
{
chk="$1/$2_check.log"
successes=$(grep -e ".*: OK" ${chk} | wc -l)
failures=$(grep -e ".*: FAIL" ${chk} | wc -l)
totalRunTests=$(($successes+$failures))
cat <<ZZ
actualFailures:$failures
totalTests:$totalRunTests
expectedFailures:35
ZZ
}
zopen_append_to_env()
{
cat <<EOF
export PATH="\$PWD/sbin:\$PATH"
EOF
}
zopen_post_install()
{
}
zopen_append_to_setup()
{
cat <<EOF
echo "================================================================================"
echo "IMPORTANT NOTE: Installation of sudo is NOT COMPLETE. "
echo "For details on sudo, see: https://www.sudo.ws/releases/stable/#${SUDO_VERSION} "
echo "To finish installing sudo, run the following commands with elevated privileges: "
echo "SUDO_HOME=\$SUDO_HOME"
EOF
cat <<'EOF'
echo "chown 0:0 \$SUDO_HOME/bin/*"
echo "chmod u+s \$SUDO_HOME/bin/*"
echo "Review the \$SUDO_HOME/etc/sudoers file."
echo "Use visudo to create your own /etc/sudoers file."
echo "================================================================================"
EOF
echo "chmod 4755 \"\$SUDO_HOME/bin/\"*"
echo "chmod 4750 \"\$SUDO_HOME/sbin/\"*"
}
zopen_install_caveats()
{
cat <<EOF
IMPORTANT NOTE: Installation of sudo is NOT COMPLETE.
For details on sudo, see: https://www.sudo.ws/releases/stable/#${SUDO_VERSION}
To finish installing sudo, run the following commands with elevated privileges (root): "
SUDO_HOME=\$ZOPEN_PKGINSTALL/sudo/sudo
chown 0:0 \$SUDO_HOME/bin/*
chmod u+s \$SUDO_HOME/bin/*
Review the \$SUDO_HOME/etc/sudoers file.
Use visudo to create your own /etc/sudoers file.
EOF
}
zopen_get_version()
{
echo "$SUDO_VERSION" | cut -d 'p' -f 1
}