runit-artifacts.sh 728 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/sh

#
# Builds the artifacts required for runit on CentOS/Fedora (namely,
# runit itself, since runit is not packaged for those distros).
#

if [ -n "$DESTDIR" ]; then
    export DESTDIR="$DESTDIR/runit"
    mkdir -p $DESTDIR
fi

[ ! -f /tmp/yum-updated ] && yum makecache && touch /tmp/yum-updated

15
yum -y install rpmdevtools glibc-static which gcc make
16
cd /tmp
17 18
if [ -z "$RUNITSRC" ]; then
    yum -y install git
19
    git clone https://gitlab.flux.utah.edu/emulab/runit.git runit
20 21 22 23 24 25
else
    mkdir -p runit
    cp -pR $RUNITSRC/* runit
fi
cd runit
./redhat/build.sh
26 27 28 29
mkdir -p $DESTDIR/tmp
chmod root:root $DESTDIR/tmp
chmod 1777 $DESTDIR/tmp
cp -p ~/rpmbuild/RPMS/*/*.rpm $DESTDIR/tmp
30
cd /tmp
31
rm -rf runit ~/rpmbuild
32 33

exit 0