Merge nucleic/olive-ember-seal-q7vk into dev

This commit is contained in:
2026-07-18 15:14:54 -07:00
commit d919c693dd
34 changed files with 624 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
Package: nash-default-shell
Version: @VERSION@
Architecture: all
Maintainer: Nucleic <[email protected]>
Section: shells
Priority: optional
Depends: nash
Description: force nash as the system default shell (NASH.md §7.1)
The maintainer-script form of the locked divert block: /bin/bash and /bin/dash
are dpkg-diverted to /usr/bin/{bash,dash}.real and /bin/{bash,dash,sh} point at
nash, so shebangs and tools that hardcode sh/bash land in nash. Real shells
stay reachable at the .real paths — nash's parse-failure fallback depends on
them. Removing this package cleanly restores stock shells. dpkg-divert keeps
apt upgrades of bash/dash from clobbering the links.
@@ -0,0 +1,4 @@
# narOS shell environment (nash-default-shell). NUCLEIC_REAL_BASH is nash's
# parse-failure fallback + NUCLEIC_NASH_DISABLE target (NASH.md §4.1).
export NUCLEIC_REAL_BASH=/usr/bin/bash.real
[ -n "${SHELL:-}" ] || export SHELL=/usr/local/bin/nash
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
# NASH.md §7.1, verbatim semantics (merged-usr symlink handling verified in nash M0).
set -e
if [ "$1" = "configure" ]; then
dpkg-divert --package nash-default-shell --divert /usr/bin/bash.real --rename --add /bin/bash
dpkg-divert --package nash-default-shell --divert /usr/bin/dash.real --rename --add /bin/dash
ln -sf /usr/local/bin/nash /bin/bash
ln -sf /usr/local/bin/nash /bin/dash
ln -sf /usr/local/bin/nash /bin/sh
fi
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
# Clean revert: drop the nash links, un-divert the real shells, restore sh -> dash.
set -e
if [ "$1" = "remove" ]; then
rm -f /bin/bash /bin/dash
dpkg-divert --package nash-default-shell --rename --remove /bin/bash
dpkg-divert --package nash-default-shell --rename --remove /bin/dash
ln -sf dash /usr/bin/sh
fi