/usr/lib/rinse/fedora-22/post-install.sh is in rinse 3.2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | #!/bin/sh
#
# Customise the distribution post-install.
#
prefix=$1
if [ ! -d "${prefix}" ]; then
echo "Serious error - the named directory doesn't exist."
exit
fi
arch=i386
if [ $ARCH = "amd64" ] ; then
arch=x86_64
fi
#
# 2. Copy the cached .RPM files into the yum directory, so that
# yum doesn't need to download them again.
#
echo " Setting up DNF cache"
mkdir -p ${prefix}/var/cache/yum/core/packages/
for i in ${prefix}/*.rpm ; do
cp -p $i ${prefix}/var/cache/yum/core/packages/
done
cp -pu $cache_dir/$dist.$ARCH/* ${prefix}/var/cache/yum/core/packages/
#
# 3. Ensure that DNF has a working configuration file.
#
# use the mirror URL which was specified in rinse.conf
# A correct mirror URL does not contain /Packages on the end
mirror=`dirname $mirror`
# save original yum.conf
mv ${prefix}/etc/yum.conf ${prefix}/etc/yum.conf.orig
cat > ${prefix}/etc/yum.repos.d/rinse.repo <<EOF
[main]
reposdir=/dev/null
logfile=/var/log/yum.log
[core]
name=core
baseurl=$mirror
gpgcheck=0
repo_gpgcheck=0
EOF
#
# 4. Install some package via DNF
#
echo " Bootstrapping DNF"
chroot ${prefix} /usr/bin/dnf -y install vim-minimal dhclient
# restore original yum.conf
mv ${prefix}/etc/yum.conf.orig ${prefix}/etc/yum.conf
# If you get this error, then replace https with http in /etc/yum.repos.d/*
# Error: Cannot retrieve metalink for repository: fedora/19/x86_64. Please verify its path and try again
#
#sed -i -e 's/https:/http:/' ${prefix}/etc/yum.repos.d/*
#
# 5. Clean up
#
chroot ${prefix} /usr/bin/dnf clean all
rm ${prefix}/etc/yum.repos.d/rinse.repo
umount ${prefix}/proc
umount ${prefix}/sys
#
# 6. Remove the .rpm files from the prefix root.
#
rm -f ${prefix}/*.rpm ${prefix}/var/cache/yum/core/packages/*.rpm
find ${prefix} -name '*.rpmorig' -delete
find ${prefix} -name '*.rpmnew' -delete
|