Add openssh to rebootstrap
Hello,
Arguably, working on bootstrapping a new arch really wants having ssh
server available. openssh happens to provide a nognome build profile
that makes it easy to build early, as the attached patch does, available
on my repo
git@salsa.debian.org:sthibault/rebootstrap.git
as 8691e727d58c4ea8b4d85deeca114ffb1c9b2a8d
One notable thing is that openssh assumes that libc-dev pulls
libcrypt-dev, which the unstaged libc-dev does not do, but after the
first automatically_cross_build_packages run we do have libcrypt-dev
built so we can meet this requirement easily without adding another
glibc stage just for the dependency.
Samuel
commit 8691e727d58c4ea8b4d85deeca114ffb1c9b2a8d
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Fri Jul 11 13:58:46 2025 +0200
Add openssh
It notably assumes that libc-dev pulls libcrypt-dev, which the unstaged
libc-dev does not do, but after the first automatically_cross_build_packages
run we do have libcrypt-dev built so we can meet this requirement easily
without adding another glibc stage just for the dependency.
diff --git a/bootstrap.sh b/bootstrap.sh
index 3b17bde..b483788 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -2622,6 +2622,7 @@ add_automatic libbsd
add_automatic libcap2
add_automatic libdebian-installer
+add_automatic libedit
add_automatic libev
add_automatic libevent
add_automatic libffi
@@ -3522,6 +3523,7 @@ buildenv_util_linux() {
export scanf_cv_type_modifier=ms
}
+add_automatic wtmpdb
add_automatic xft
add_automatic xxhash
@@ -4067,6 +4069,7 @@ add_need krb5 # by audit
add_need libassuan # by gnupg2
dpkg-architecture "-a$HOST_ARCH" -ilinux-any && add_need libcap2 # by systemd
add_need libdebian-installer # by cdebconf
+add_need libedit # by openssh
add_need libevent # by unbound
add_need libgcrypt20 # by gnupg2, libprelude
add_need libgpg-error # by gnupg2
@@ -4097,6 +4100,7 @@ add_need sqlite3 # by python3.X
add_need tcl8.6 # by newt
add_need tcltk-defaults # by python3.X
add_need tcp-wrappers # by audit
+add_need wtmpdb # by openssh
add_need xz-utils # by libxml2
automatically_cross_build_packages() {
@@ -4182,6 +4186,9 @@ assert_built() {
automatically_cross_build_packages
+# staged libc-dev does not pull it, but packages expect it to
+apt_get_install "libcrypt-dev:$HOST_ARCH"
+
cross_build zlib "$(if test "$ENABLE_MULTILIB" != yes; then echo stage1; fi)"
mark_built zlib
# needed by dpkg, file, gnutls28, libpng1.6, libtool, libxml2, perl, slang2, tcl8.6, util-linux
@@ -4411,6 +4418,11 @@ mark_built gnupg2
automatically_cross_build_packages
+cross_build openssh pkg.openssh.nognome openssh_1
+mark_built openssh
+
+automatically_cross_build_packages
+
assert_built "$need_packages"
echo "checking installability of build-essential with dose"
Reply to: