mirror of
https://github.com/GXDE-OS/GXDE.git
synced 2026-11-06 01:51:11 +08:00
Revert "使用解压rootfs替代debootstrap,提升速度"
This reverts commit cec74ff92c.
Signed-off-by: gfdgd_xi <3025613752@qq.com>
This commit is contained in:
@@ -21,26 +21,9 @@ function useLoongnix() {
|
||||
function useDeepin25() {
|
||||
sudo cp .github/workflows/crimson /usr/share/debootstrap/scripts/ -v
|
||||
}
|
||||
function getRootfsFromCloudTar() {
|
||||
# $1=suite(bookworm/trixie) $2=arch
|
||||
local suite=$1
|
||||
local arch=$2
|
||||
local version
|
||||
case "$suite" in
|
||||
bookworm) version=12 ;;
|
||||
trixie) version=13 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
local tarball="debian-${version}-nocloud-${arch}.tar.xz"
|
||||
local url="http://cdimage.debian.org/cdimage/cloud/${suite}/latest/${tarball}"
|
||||
sudo rm -rf "$bottlePath"
|
||||
sudo mkdir -p "$bottlePath"
|
||||
wget -O "/tmp/${tarball}" "$url"
|
||||
sudo tar -xJf "/tmp/${tarball}" -C "$bottlePath"
|
||||
}
|
||||
|
||||
sudo apt update
|
||||
sudo apt install debootstrap rename binfmt-support qemu-user qemu-user-static git xz-utils wget -y
|
||||
sudo apt install debootstrap rename binfmt-support qemu-user qemu-user-static git -y
|
||||
ls /usr/bin/qemu-*
|
||||
bottlePath=./system-bottle
|
||||
if [[ $2 == "beige" ]]; then
|
||||
@@ -52,16 +35,11 @@ else
|
||||
useLoongnix
|
||||
fi
|
||||
fi
|
||||
if [[ $1 != "loong64" ]] && [[ $2 == "bookworm" || $2 == "trixie" ]]; then
|
||||
# 非 loong64 的 bookworm/trixie 直接从官方云镜像 tar 解压,跳过 debootstrap
|
||||
getRootfsFromCloudTar $2 $1
|
||||
if [[ $2 == "crimson" ]]; then
|
||||
useDeepin25
|
||||
sudo debootstrap --no-check-gpg --include=git,deepin-keyring,gcc,make,g++,dpkg-dev,qtbase5-dev,ca-certificates --arch=$1 $2 $bottlePath $5
|
||||
else
|
||||
if [[ $2 == "crimson" ]]; then
|
||||
useDeepin25
|
||||
sudo debootstrap --no-check-gpg --include=git,deepin-keyring,gcc,make,g++,dpkg-dev,qtbase5-dev,ca-certificates --arch=$1 $2 $bottlePath $5
|
||||
else
|
||||
sudo debootstrap --no-check-gpg --include=git,gcc,make,debian-ports-archive-keyring,debian-archive-keyring,g++,dpkg-dev,qtbase5-dev,ca-certificates --arch=$1 $2 $bottlePath $5
|
||||
fi
|
||||
sudo debootstrap --no-check-gpg --include=git,gcc,make,debian-ports-archive-keyring,debian-archive-keyring,g++,dpkg-dev,qtbase5-dev,ca-certificates --arch=$1 $2 $bottlePath $5
|
||||
fi
|
||||
|
||||
if [[ $2 == "crimson" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user