Skip to content

Commit

Permalink
new distribution: deepin v23 (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenchongbiao authored Nov 28, 2023
1 parent 811d464 commit 60e9f0d
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
# Remove distro plugins to filter and upload built distributions and its plugins later on
rm -rf ./distro-plugins/*
- name: Install Needed Dependencies
run: sudo apt-get update && sudo apt-get install -yq curl debian-archive-keyring jq mmdebstrap qemu-user-static binfmt-support
run: sudo apt-get update && sudo apt-get install -yq curl debian-archive-keyring jq mmdebstrap qemu-user-static binfmt-support multistrap
- name: Build distribution rootfs
run: |
for distros_to_be_built in $(cat ./distributions.txt); do
Expand Down
2 changes: 1 addition & 1 deletion bootstrap-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ "$(uname -o)" = "Android" ]; then
exit 1
fi

for i in curl git jq mmdebstrap sudo tar xz; do
for i in curl git jq mmdebstrap sudo tar xz multistrap; do
if [ -z "$(command -v "$i")" ]; then
echo "[!] '$i' is not installed."
exit 1
Expand Down
56 changes: 56 additions & 0 deletions distro-build/deepin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
dist_name="deepin"
dist_version="beige"

bootstrap_distribution() {
for arch in amd64 arm64; do
mkdir -p ${WORKDIR}/deepin-$(translate_arch "$arch")/etc/apt/trusted.gpg.d
curl --fail --location \
--output "${WORKDIR}/deepin-$(translate_arch "$arch")/etc/apt/trusted.gpg.d/deepin.gpg" \
"https://github.com/deepin-community/deepin-rootfs/raw/master/deepin.gpg"

echo -e "[General]\n\
arch=$arch\n\
directory=${WORKDIR}/deepin-$(translate_arch "$arch")/\n\
cleanup=true\n\
noauth=false\n\
unpack=true\n\
explicitsuite=false\n\
multiarch=\n\
aptsources=Debian\n\
bootstrap=Deepin\n\
[Deepin]\n\
packages=apt ca-certificates passwd locales-all\n\
source=https://community-packages.deepin.com/${dist_version}/\n\
suite=${dist_version}\n\
" >/tmp/${dist_version}.multistrap
sudo multistrap -f /tmp/${dist_version}.multistrap

rm -f "${WORKDIR}"/deepin-$(translate_arch "$arch")/etc/resolv.conf
echo "nameserver 1.1.1.1" > "${WORKDIR}"/deepin-$(translate_arch "$arch")/etc/resolv.conf
echo "en_US.UTF-8 UTF-8" > "${WORKDIR}"/deepin-$(translate_arch "$arch")/etc/locale.gen
echo "deb https://community-packages.deepin.com/${dist_version}/ ${dist_version} main commercial community" > ${WORKDIR}/deepin-$(translate_arch "$arch")/etc/apt/sources.list
echo "deb-src https://community-packages.deepin.com/${dist_version}/ ${dist_version} main commercial community" >> ${WORKDIR}/deepin-$(translate_arch "$arch")/etc/apt/sources.list

sudo tar -J -c \
-f "${ROOTFS_DIR}/deepin-$(translate_arch "$arch")-pd-${CURRENT_VERSION}.tar.xz" \
-C "$WORKDIR" \
"deepin-$(translate_arch "$arch")"
sudo chown $(id -un):$(id -gn) "${ROOTFS_DIR}/deepin-$(translate_arch "$arch")-pd-${CURRENT_VERSION}.tar.xz"
done
unset arch
}

write_plugin() {
cat <<- EOF > "${PLUGIN_DIR}/deepin.sh"
# This is a default distribution plug-in.
# Do not modify this file as your changes will be overwritten on next update.
# If you want customize installation, please make a copy.
DISTRO_NAME="deepin"
DISTRO_COMMENT="Supports only 64-bit CPUs."
TARBALL_URL['aarch64']="${GIT_RELEASE_URL}/deepin-aarch64-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['aarch64']="$(sha256sum "${ROOTFS_DIR}/deepin-aarch64-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')"
TARBALL_URL['x86_64']="${GIT_RELEASE_URL}/deepin-x86_64-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['x86_64']="$(sha256sum "${ROOTFS_DIR}/deepin-x86_64-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')"
EOF
}
10 changes: 10 additions & 0 deletions distro-plugins/deepin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This is a default distribution plug-in.
# Do not modify this file as your changes will be overwritten on next update.
# If you want customize installation, please make a copy.
DISTRO_NAME="deepin"
DISTRO_COMMENT="Supports only 64-bit CPUs."

TARBALL_URL['aarch64']="https://github.com/termux/proot-distro/releases/download/v4.3.1/deepin-aarch64-pd-v4.3.1.tar.xz"
TARBALL_SHA256['aarch64']="58f9538b5b3f70d845cfe7f8e708b5f79e536612c0f00d39c68ccedd23ef2d76"
TARBALL_URL['x86_64']="https://github.com/termux/proot-distro/releases/download/v4.3.1/deepin-x86_64-pd-v4.3.1.tar.xz"
TARBALL_SHA256['x86_64']="ce7dc056811483eea352d6ad61bf39296c2eb7281bbb40f76ae0a27300a51f4c"

0 comments on commit 60e9f0d

Please sign in to comment.