Unified · Split
| @@ -26,7 +26,6 @@ · 25 unmodified lines | ||
| 26 | 26 | |
| 27 | 27 | readonly PROGNAME=$(basename $0) |
| 28 | 28 | readonly ARCH=$(uname -m) |
| 29 | −readonly VOIDRSAPUBKEY="60:ae:0c:d6:f0:95:17:80:bc:93:46:7a:89:af:a3:2d" | |
| 30 | 29 | |
| 31 | 30 | trap 'die "Interrupted! exiting..."' INT TERM HUP |
| 32 | 31 | |
| @@ -53,7 +52,6 @@ Options · 20 unmodified lines | ||
| 53 | 52 | -c <dir> Set XBPS cache directory (defaults to /var/cache/xbps) |
| 54 | 53 | -C <file> Full path to the XBPS configuration file |
| 55 | 54 | -h Show this help |
| 56 | − -k <dir> Full path to a directory with the XBPS RSA public keys for repositories | |
| 57 | 55 | -p <pkgs> Additional packages to install into the rootfs (separated by blanks) |
| 58 | 56 | -r <repo> Set XBPS repository (may be set multiple times) |
| 59 | 57 | -V Show version |
| @@ -100,18 +98,18 @@ register_binfmt() { · 40 unmodified lines | ||
| 100 | 98 | esac |
| 101 | 99 | } |
| 102 | 100 | |
| 101 | +: ${XBPS_REPOSITORY:=--repository=http://repo.voidlinux.eu/current} | |
| 103 | 102 | : ${XBPS_CACHEDIR:=--cachedir=/var/cache/xbps} |
| 104 | 103 | : ${PKGBASE:=base-system} |
| 105 | 104 | # |
| 106 | 105 | # main() |
| 107 | 106 | # |
| 108 | −while getopts "b:C:c:hk:p:r:V" opt; do | |
| 107 | +while getopts "b:C:c:hp:r:V" opt; do | |
| 109 | 108 | case $opt in |
| 110 | 109 | b) PKGBASE="$OPTARG";; |
| 111 | 110 | C) XBPS_CONFFILE="-C $OPTARG";; |
| 112 | 111 | c) XBPS_CACHEDIR="--cachedir=$OPTARG";; |
| 113 | 112 | h) usage; exit 0;; |
| 114 | − k) KEYSDIR="$OPTARG";; | |
| 115 | 113 | p) EXTRA_PKGS="$OPTARG";; |
| 116 | 114 | r) XBPS_REPOSITORY="--repository=$OPTARG $XBPS_REPOSITORY";; |
| 117 | 115 | V) echo "$PROGNAME @@MKLIVE_VERSION@@"; exit 0;; |
| @@ -146,18 +144,12 @@ for f in chroot tar xbps-install xbps-reconfigure xbps-query; do · 28 unmodified lines | ||
| 146 | 144 | fi |
| 147 | 145 | done |
| 148 | 146 | |
| 149 | −if [ -z "$KEYSDIR" ]; then | |
| 150 | − KEYSDIR="/var/db/xbps/keys" # use void default | |
| 151 | −fi | |
| 152 | 147 | # |
| 153 | 148 | # Check if package base-system is available. |
| 154 | 149 | # |
| 155 | 150 | rootfs=$(mktemp -d || die "FATAL: failed to create tempdir, exiting...") |
| 156 | −if [ ! -f "$KEYSDIR/${VOIDRSAPUBKEY}.plist" ]; then | |
| 157 | − die "cannot find xbps keys to install binary packages, exiting." | |
| 158 | −fi | |
| 159 | 151 | mkdir -p $rootfs/var/db/xbps/keys |
| 160 | −cp $KEYSDIR/${VOIDRSAPUBKEY}.plist $rootfs/var/db/xbps/keys | |
| 152 | +cp keys/*.plist $rootfs/var/db/xbps/keys | |
| 161 | 153 | |
| 162 | 154 | run_cmd_target "xbps-install -S $XBPS_CONFFILE $XBPS_CACHEDIR $XBPS_REPOSITORY -r $rootfs" |
| 163 | 155 | run_cmd_target "xbps-query -R -r $rootfs $XBPS_CONFFILE $XBPS_CACHEDIR $XBPS_REPOSITORY -ppkgver $PKGBASE" |