Skip to content

Instantly share code, notes, and snippets.

@x-yuri

x-yuri/.md Secret

Last active March 25, 2024 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x-yuri/4434e03e59d0ed8a730410e9ebc4d05c to your computer and use it in GitHub Desktop.
Save x-yuri/4434e03e59d0ed8a730410e9ebc4d05c to your computer and use it in GitHub Desktop.

a.sh:

docker run --rm alpine:"$1" sh -euxc '
    apk update
    apk add build-base linux-pam-dev git
    git clone https://github.com/sudo-project/sudo
    cd sudo
    git checkout 96b7c1f0f
    ./configure
    make
    ldd src/sudo
'
$ sh a.sh 3.4
...
+ apk add build-base linux-pam-dev git
...
(2/37) Installing binutils (2.26-r1)
...
(13/37) Installing gcc (5.3.0-r0)
...
+ make
...
/bin/sh ../libtool --tag=disable-static --mode=link gcc -o sudo
conversation.o error.o exec.o exec_pty.o get_pty.o net_ifs.o load_plugins.o
parse_args.o sudo.o sudo_edit.o tgetpass.o ttysize.o utmp.o   -lintl
../common/libcommon.la ../compat/libreplace.la -static-libtool-libs

libtool: link: gcc -o sudo conversation.o error.o exec.o exec_pty.o
get_pty.o net_ifs.o load_plugins.o parse_args.o sudo.o sudo_edit.o
tgetpass.o ttysize.o utmp.o  -lintl ../common/.libs/libcommon.a
../compat/.libs/libreplace.a
...
+ ldd src/sudo
	/lib/ld-musl-x86_64.so.1 (0x7fbedfd48000)
	libintl.so.8 => /usr/lib/libintl.so.8 (0x7fbedf926000)
	libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7fbedfd48000)
$ sh a.sh 3.5
...
+ apk add build-base linux-pam-dev git
...
(2/36) Installing binutils (2.27-r1)
...
(12/36) Installing gcc (6.2.1-r1)
...
+ make
...
/bin/sh ../libtool --tag=disable-static --mode=link gcc -o sudo conversation.o
error.o exec.o exec_pty.o get_pty.o net_ifs.o load_plugins.o parse_args.o
sudo.o sudo_edit.o tgetpass.o ttysize.o utmp.o   -lintl
../common/libcommon.la ../compat/libreplace.la -static-libtool-libs

libtool: link: gcc -o sudo conversation.o error.o exec.o exec_pty.o get_pty.o
net_ifs.o load_plugins.o parse_args.o sudo.o sudo_edit.o tgetpass.o ttysize.o
utmp.o  -lintl ../common/.libs/libcommon.a ../compat/.libs/libreplace.a
...
+ ldd src/sudo
	/lib/ld-musl-x86_64.so.1 (0x73badd9f6000)
	libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x73badd9f6000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment