History

mkrootfs: use built-in void pubkey; assign default void repo if -r unset.

Juan RP committed 12 years ago

Commit f2e9e4f1 parent ddbf4951 file · +3 −11Browse files

Unified · Split

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t