Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 80 lines (58 sloc) 1.96 KB
#!/bin/bash
DIST="$1"
echo "Not finished, see source for some instructions."
exit 1
source "/usr/share/dar/dar-functions"
if [ -d "$ROOT/$DIST" ]; then
echo "ERROR: Dir $ROOT/$DIST already exists." >&2
exit 1
fi
mkdir -p "$ROOT/logs" "$ROOT/home-made" "$ROOT/$DIST"
rpm --initdb --root "$ROOT/$DIST"
### Disable symbols in builds (for rh90) -g
# perl -pi.orig -e 's|-O2 -g|-O2|' /dar/chroot/*/usr/lib/rpm/{*/macros,macros,rpmrc}
cp -auvx /etc/sysconfig/network $ROOT/$DIST/etc/sysconfig/network
cp -auvx /usr/share/dar/skel/* $ROOT/$DIST
### Customizing build-environment
echo "PS1=\"[\u@$DIST \W]# \"" >> $ROOT/$DIST/root/.bashrc
cp -avx /etc/{group,fstab,mtab,hosts,passwd,resolv.conf,modules.conf,modprobe.conf,localtime} $ROOT/$DIST/etc/
### Prevent CPAN modules autoinstall
mkdir -p -m0400 $ROOT/$DIST/home/dag/.cpan/
chown root.root $ROOT/$DIST/home/dag/.cpan/
### copy fstab and mtab
### Customize /etc/rpm/macros
### Fix /dev/
rm -f $ROOT/$DIST/dev/null
mknod -m0666 $ROOT/$DIST/dev/null c 1 3
mknod -m0666 $ROOT/$DIST/dev/zero c 1 5
mknod -m0666 $ROOT/$DIST/dev/full c 1 7
mknod -m0644 $ROOT/$DIST/dev/random c 1 8
mknod -m0644 $ROOT/$DIST/dev/urandom c 1 9
mknod -m0666 $ROOT/$DIST/dev/tty c 5 0
mknod -m0666 $ROOT/$DIST/dev/ptmx c 5 2
ln -sf ../proc/self/fd $ROOT/$DIST/dev/fd
mkdir $ROOT/$DIST/dev/shm/
chmod 1777 $ROOT/$DIST/dev/shm/
: -<<EOF
adduser dag
chown dag.dag -R /usr/src/redhat/BUILD /dar/packages/ /dar/logs/
rpm --root -ihvU %
Install
util-linux (start)
basesystem-7.0-2.noarch.rpm
bash-2.05a-13.i386.rpm
filesystem-2.1.6-2.noarch.rpm
glibc-2.2.5-42.i686.rpm
glibc-common-2.2.5-42.i386.rpm
libtermcap-2.0.8-28.i386.rpm
mktemp-1.5-14.i386.rpm
termcap-11.0.1-10.noarch.rpm
EOF
: -<<EOF #$ROOT$DIST/etc/apt/sources.list
### Dag Apt Repository for Red Hat 8.0
rpm file:///dar/apt redhat/8.0/en/i386 dag
### Red Hat Linux 8.0
rpm http://apt.ccl.kuleuven.ac.be redhat/8.0/en/i386 os updates
EOF
#chroot $ROOT/$DIST /bin/nice /usr/bin/apt install
exit 0