Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# command -v ar
/usr/bin/ar
# cat /usr/bin/ar
#!/bin/sh
exec tcc -ar "$@"
# mv /usr/bin/ar /usr/bin/ar.old
# command ar
-sh: ar: not found
# cd /usr/ports/sudo
# cat Pkgfile
#!/bin/sh
# shellcheck disable=SC2034
# Description: Sudo (superuser do)
# URL: https://www.sudo.ws/sudo/
# Maintainer: James Mills, prologic at shortcircuit dot net dot au
name=sudo
version=1.9.3p1
release=1
source="https://www.sudo.ws/dist/$name-$version.tar.gz"
build() {
cd $name-$version
./configure --prefix=/usr \
--libexecdir=/usr/lib \
--with-logfac=auth \
--with-vardir=/var/lib/sudo \
--with-rundir=/var/run/sudo \
--disable-nls \
--disable-zlib \
--enable-shared=no
make
make DESTDIR=$PKG install
rm -r $PKG/usr/share/doc
}
# cat /etc/pkg.conf
#
# /etc/pkg.conf: pkg configuration
#
export URL=https://raw.githubusercontent.com/prologic/ulinux/master/ports/
export PKG_PORTSDIR=/usr/ports
export PKG_PKGSDIR="$PWD"
export CC=tcc
export LD=tcc
export CFLAGS="-D_BSD_SOURCE -I/usr/lib/tcc/include"
export MAKEFLAGS="-e"
# pkg build
=> Saved checksums to build/.checksum
=> removing old build
configure: Configuring Sudo version 1.9.3p1
checking for gcc... tcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether tcc accepts -g... yes
checking for tcc option to accept ISO C89... none needed
checking how to run the C preprocessor... tcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether to lecture users the first time they run sudo... yes
checking whether sudo should log via syslog or to a file by default... syslog
checking at which syslog priority to log commands... notice
checking at which syslog priority to log failures... alert
checking how long a line in the log file should be... 80
checking whether sudo should ignore '.' or '' in $PATH... no
checking whether to send mail when a user is not in sudoers... yes
checking whether to send mail when user listed but not for this host... no
checking whether to send mail when a user tries a disallowed command... no
checking who should get the mail that sudo sends... root
checking for bad password prompt... Password:
checking for bad password message... Sorry, try again.
checking whether to expect fully qualified hosts in sudoers... no
checking for umask programs should be run with... 0022
checking for default user to run commands as... root
checking for editor that visudo should use... vi
checking whether to obey EDITOR and VISUAL environment variables... yes
checking number of tries a user gets to enter their password... 3
checking time in minutes after which sudo will ask for a password again... 5
checking time in minutes after the password prompt will time out... 5
checking whether to include insults... no
checking whether to override the user's path... no
checking whether to get ip addresses from the network interfaces... yes
checking whether to use an askpass helper... no
checking whether to do user authentication by default... yes
checking whether to disable running the mailer as root... no
checking whether to disable shadow password support... no
checking whether root should be allowed to use sudo... yes
checking whether to log the hostname in the log file... no
checking whether to invoke a shell if sudo is given no arguments... no
checking whether to set $HOME to target user in shell mode... no
checking whether to disable 'command not found' messages... no
checking whether to enable environment debugging... no
checking whether to enable environment resetting by default... yes
checking how to run the C preprocessor... tcc -E
checking for ar... no
checking for ranlib... no
configure: error: the "ar" utility is required to build sudo
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment