Ticket #4037: build-shadow.sh

File build-shadow.sh, 645 bytes (added by bdubbs@…, 8 years ago)

shadow script for use inside chroot

Line 
1#!/bin/bash
2
3DEST=/tmp/shadow
4PACKAGE=shadow-4.4
5
6rm -rf $DEST
7rm -rf $PACKAGE
8
9tar -xf $PACKAGE.tar.*
10cd $PACKAGE
11
12sed -i 's/groups$(EXEEXT) //' src/Makefile.in
13find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;
14find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
15find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;
16
17sed -i -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' \
18 -e 's@/var/spool/mail@/var/mail@' etc/login.defs
19
20sed -i 's/1000/999/' etc/useradd
21
22./configure --sysconfdir=/etc --with-group-name-max-length=32
23make
24make DESTDIR=$DEST install
25mv -v $DEST/usr/bin/passwd $DEST/bin
26
27
28