Unified · Split
| @@ -114,6 +114,13 @@ _EOF · 113 unmodified lines | |||
| 114 | exit 1 | 114 | exit 1 |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | copy_void_keys() { | ||
| 118 | if [ ! -d "$1"/var/db/xbps/keys ]; then | ||
| 119 | mkdir -p "$1"/var/db/xbps/keys | ||
| 120 | cp /var/db/xbps/keys/*.plist "$1"/var/db/xbps/keys | ||
| 121 | fi | ||
| 122 | } | ||
| 123 | |||
| 117 | install_packages() { | 124 | install_packages() { |
| 118 | for f in ${PACKAGE_LIST}; do | 125 | for f in ${PACKAGE_LIST}; do |
| 119 | info_msg " $f" | 126 | info_msg " $f" |
| @@ -138,11 +145,10 @@ install_packages() { · 18 unmodified lines | |||
| 138 | if [ -f $ROOTFS/usr/lib/systemd/system/NetworkManager.service ]; then | 145 | if [ -f $ROOTFS/usr/lib/systemd/system/NetworkManager.service ]; then |
| 139 | systemd-nspawn -D $ROOTFS systemctl enable NetworkManager.service >>$LOGFILE 2>&1 | 146 | systemd-nspawn -D $ROOTFS systemctl enable NetworkManager.service >>$LOGFILE 2>&1 |
| 140 | fi | 147 | fi |
| 141 | |||
| 142 | install -Dm755 /usr/sbin/void-installer $ROOTFS/usr/sbin/void-installer | ||
| 143 | } | 148 | } |
| 144 | 149 | ||
| 145 | generate_initramfs() { | 150 | generate_initramfs() { |
| 151 | copy_void_keys $ROOTFS/kernel_temp | ||
| 146 | # Install required pkgs in a temporary rootdir to create | 152 | # Install required pkgs in a temporary rootdir to create |
| 147 | # the initramfs and to copy required files. | 153 | # the initramfs and to copy required files. |
| 148 | $XBPS_INSTALL_CMD -r $ROOTFS/kernel_temp -Sy \ | 154 | $XBPS_INSTALL_CMD -r $ROOTFS/kernel_temp -Sy \ |
| @@ -351,12 +357,11 @@ XBPS_ARGS="-r $ROOTFS -y" · 202 unmodified lines | |||
| 351 | XBPS_ARGS="$XBPS_ARGS -c $REPOSITORY_CACHE" | 357 | XBPS_ARGS="$XBPS_ARGS -c $REPOSITORY_CACHE" |
| 352 | XBPS_VERSION=$($XBPS_QUERY_CMD -V|awk '{print $2}') | 358 | XBPS_VERSION=$($XBPS_QUERY_CMD -V|awk '{print $2}') |
| 353 | case $XBPS_VERSION in | 359 | case $XBPS_VERSION in |
| 354 | # XBPS >= 0.21 | 360 | *) ;; |
| 355 | [0-9].[2-9][1-9]*) ;; | ||
| 356 | *) echo "Your xbps utilities are too old ($XBPS_VERSION), 0.21 is required."; exit 1;; | ||
| 357 | esac | 361 | esac |
| 358 | 362 | ||
| 359 | # Sync index for remote repos first. | 363 | # Sync index for remote repos first. |
| 364 | copy_void_keys $ROOTFS | ||
| 360 | $XBPS_INSTALL_CMD -r $ROOTFS -S >/dev/null 2>&1 | 365 | $XBPS_INSTALL_CMD -r $ROOTFS -S >/dev/null 2>&1 |
| 361 | 366 | ||
| 362 | _linux_series=$($XBPS_QUERY_CMD -r $ROOTFS -Rx linux) | 367 | _linux_series=$($XBPS_QUERY_CMD -r $ROOTFS -Rx linux) |