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
2626
2727 readonly PROGNAME=$(basename $0)
2828 readonly ARCH=$(uname -m)
29−readonly VOIDRSAPUBKEY="60:ae:0c:d6:f0:95:17:80:bc:93:46:7a:89:af:a3:2d"
3029
3130 trap 'die "Interrupted! exiting..."' INT TERM HUP
3231
@@ -53,7 +52,6 @@ Options · 20 unmodified lines
5352 -c <dir> Set XBPS cache directory (defaults to /var/cache/xbps)
5453 -C <file> Full path to the XBPS configuration file
5554 -h Show this help
56− -k <dir> Full path to a directory with the XBPS RSA public keys for repositories
5755 -p <pkgs> Additional packages to install into the rootfs (separated by blanks)
5856 -r <repo> Set XBPS repository (may be set multiple times)
5957 -V Show version
@@ -100,18 +98,18 @@ register_binfmt() { · 40 unmodified lines
10098 esac
10199 }
102100
101+: ${XBPS_REPOSITORY:=--repository=http://repo.voidlinux.eu/current}
103102 : ${XBPS_CACHEDIR:=--cachedir=/var/cache/xbps}
104103 : ${PKGBASE:=base-system}
105104 #
106105 # main()
107106 #
108−while getopts "b:C:c:hk:p:r:V" opt; do
107+while getopts "b:C:c:hp:r:V" opt; do
109108 case $opt in
110109 b) PKGBASE="$OPTARG";;
111110 C) XBPS_CONFFILE="-C $OPTARG";;
112111 c) XBPS_CACHEDIR="--cachedir=$OPTARG";;
113112 h) usage; exit 0;;
114− k) KEYSDIR="$OPTARG";;
115113 p) EXTRA_PKGS="$OPTARG";;
116114 r) XBPS_REPOSITORY="--repository=$OPTARG $XBPS_REPOSITORY";;
117115 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
146144 fi
147145 done
148146
149−if [ -z "$KEYSDIR" ]; then
150− KEYSDIR="/var/db/xbps/keys" # use void default
151−fi
152147 #
153148 # Check if package base-system is available.
154149 #
155150 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
159151 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
161153
162154 run_cmd_target "xbps-install -S $XBPS_CONFFILE $XBPS_CACHEDIR $XBPS_REPOSITORY -r $rootfs"
163155 run_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