mirror of
https://github.com/GXDE-OS/GXDE.git
synced 2026-11-05 21:51:09 +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() {
|
function useDeepin25() {
|
||||||
sudo cp .github/workflows/crimson /usr/share/debootstrap/scripts/ -v
|
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 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-*
|
ls /usr/bin/qemu-*
|
||||||
bottlePath=./system-bottle
|
bottlePath=./system-bottle
|
||||||
if [[ $2 == "beige" ]]; then
|
if [[ $2 == "beige" ]]; then
|
||||||
@@ -52,16 +35,11 @@ else
|
|||||||
useLoongnix
|
useLoongnix
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $1 != "loong64" ]] && [[ $2 == "bookworm" || $2 == "trixie" ]]; then
|
if [[ $2 == "crimson" ]]; then
|
||||||
# 非 loong64 的 bookworm/trixie 直接从官方云镜像 tar 解压,跳过 debootstrap
|
useDeepin25
|
||||||
getRootfsFromCloudTar $2 $1
|
sudo debootstrap --no-check-gpg --include=git,deepin-keyring,gcc,make,g++,dpkg-dev,qtbase5-dev,ca-certificates --arch=$1 $2 $bottlePath $5
|
||||||
else
|
else
|
||||||
if [[ $2 == "crimson" ]]; then
|
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
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $2 == "crimson" ]]; then
|
if [[ $2 == "crimson" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user