1.0.141
All checks were successful
Build / Build project (push) Successful in 1m33s

This commit is contained in:
Alexander Zhirov 2025-05-31 15:16:21 +03:00
parent 588257617c
commit 999c2762ca
Signed by: alexander
GPG key ID: C8D8BE544A27C511
7 changed files with 128 additions and 0 deletions

3
README.md Normal file
View file

@ -0,0 +1,3 @@
# debootstrap
debootstrap installs Debian base systems in a subdirectory of another, already installed system.

View file

@ -0,0 +1,21 @@
diff --git a/debootstrap b/debootstrap
index 43a7383..62c991f 100755
--- a/debootstrap
+++ b/debootstrap
@@ -547,15 +547,7 @@ fi
###########################################################################
-if in_path dpkg && \
- dpkg --print-architecture >/dev/null 2>&1; then
- HOST_ARCH=$(/usr/bin/dpkg --print-architecture)
-elif in_path udpkg && \
- udpkg --print-architecture >/dev/null 2>&1; then
- HOST_ARCH=$(/usr/bin/udpkg --print-architecture)
-elif [ -e "$DEBOOTSTRAP_DIR/arch" ]; then
- HOST_ARCH=$(cat "$DEBOOTSTRAP_DIR/arch")
-fi
+HOST_ARCH=amd64
HOST_OS="$HOST_ARCH"
# basic host OS guessing for non-Debian systems
if [ -z "$HOST_OS" ]; then

View file

@ -0,0 +1,15 @@
diff --git a/functions b/functions
index c6752f4..7ee6619 100644
--- a/functions
+++ b/functions
@@ -176,6 +176,10 @@ default_mirror () {
DEF_MIRROR="$1"
}
+default_components () {
+ export USE_COMPONENTS="$1"
+}
+
FINDDEBS_NEEDS_INDICES="false"
finddebs_style () {
case "$1" in

29
files/scripts/1.8_x86-64 Normal file
View file

@ -0,0 +1,29 @@
case $SUITE in
1.8_x86-64|4.8_arm|1.7_x86-64|4.7_arm|novorossiysk|sevastopol|smolensk|3.8_s390x|12.8_x86-64)
default_mirror $USER_MIRROR
;;
orel)
default_mirror https://dl.astralinux.ru/astra/stable/2.12_x86-64/repository
;;
esac
mirror_style release
download_style apt
finddebs_style from-indices
variants - buildd fakechroot minbase
keyring /usr/share/apt/astra-archive.gpg
if [ -z $CUSTOM_COMPONENTS ]; then
default_components 'main|contrib|non-free|non-free-firmware'
fi
# include common settings
if [ -e "$DEBOOTSTRAP_DIR/scripts/debian-common" ]; then
. "$DEBOOTSTRAP_DIR/scripts/debian-common"
elif [ -e /debootstrap/debian-common ]; then
. /debootstrap/debian-common
elif [ -e "$DEBOOTSTRAP_DIR/debian-common" ]; then
. "$DEBOOTSTRAP_DIR/debian-common"
else
error 1 NOCOMMON "File not found: debian-common"
fi

29
files/scripts/orel Normal file
View file

@ -0,0 +1,29 @@
case $SUITE in
1.8_x86-64|4.8_arm|1.7_x86-64|4.7_arm|novorossiysk|sevastopol|smolensk)
default_mirror $USER_MIRROR
;;
orel)
default_mirror https://dl.astralinux.ru/astra/stable/2.12_x86-64/repository
;;
esac
mirror_style release
download_style apt
finddebs_style from-indices
variants - buildd fakechroot minbase
keyring /usr/share/apt/astra-archive.gpg
if [ -z $CUSTOM_COMPONENTS ]; then
default_components 'main|contrib|non-free'
fi
# include common settings
if [ -e "$DEBOOTSTRAP_DIR/scripts/debian-common" ]; then
. "$DEBOOTSTRAP_DIR/scripts/debian-common"
elif [ -e /debootstrap/debian-common ]; then
. /debootstrap/debian-common
elif [ -e "$DEBOOTSTRAP_DIR/debian-common" ]; then
. "$DEBOOTSTRAP_DIR/debian-common"
else
error 1 NOCOMMON "File not found: debian-common"
fi

2
files/series Normal file
View file

@ -0,0 +1,2 @@
patches/0001-arch-detect.patch
patches/0002-def_components.patch

29
package.yml Normal file
View file

@ -0,0 +1,29 @@
name : debootstrap
version : 1.0.141
release : 1
source :
- git|https://salsa.debian.org/installer-team/debootstrap.git : 8457f34b4c30a09e7acfabf5ab153146cc3470ed
homepage : https://salsa.debian.org/installer-team/debootstrap
license : MIT
component : programming.tools
summary : Bootstrap a basic Debian system
description: |
Bootstrap a basic Debian system
rundeps :
- binutils
build : |
%apply_patches
install : |
make DESTDIR="$installdir" install
install -Dm00644 $pkgfiles/scripts/1.8_x86-64 $installdir/usr/share/debootstrap/scripts/1.8_x86-64
install -Dm00644 $pkgfiles/scripts/orel $installdir/usr/share/debootstrap/scripts/orel
ln -sf 1.8_x86-64 $installdir/usr/share/debootstrap/scripts/12.8_x86-64
ln -sf 1.8_x86-64 $installdir/usr/share/debootstrap/scripts/3.8_s390x
ln -sf orel $installdir/usr/share/debootstrap/scripts/1.7_x86-64
ln -sf orel $installdir/usr/share/debootstrap/scripts/4.7_arm
ln -sf orel $installdir/usr/share/debootstrap/scripts/4.8_arm
ln -sf orel $installdir/usr/share/debootstrap/scripts/novorossiysk
ln -sf orel $installdir/usr/share/debootstrap/scripts/sevastopol
ln -sf orel $installdir/usr/share/debootstrap/scripts/smolensk