mirror of
https://github.com/johndoe6345789/SparkOS.git
synced 2026-04-24 13:34:56 +00:00
Add BusyBox verification to test script and documentation
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
@@ -23,7 +23,9 @@ FROM alpine:3.19
|
|||||||
COPY scripts/docker-install-packages.sh /tmp/
|
COPY scripts/docker-install-packages.sh /tmp/
|
||||||
RUN /tmp/docker-install-packages.sh
|
RUN /tmp/docker-install-packages.sh
|
||||||
|
|
||||||
# Note: Alpine includes busybox by default
|
# Alpine Linux includes BusyBox by default
|
||||||
|
# BusyBox provides: shell (sh), networking (udhcpc, ip, ping, wget), and core utilities
|
||||||
|
# This is verified by the test.sh script which shows BusyBox version and available applets
|
||||||
|
|
||||||
# Create minimal rootfs structure
|
# Create minimal rootfs structure
|
||||||
COPY scripts/docker-setup-rootfs.sh /tmp/
|
COPY scripts/docker-setup-rootfs.sh /tmp/
|
||||||
|
|||||||
@@ -126,8 +126,15 @@ The Docker image includes:
|
|||||||
- Pre-built init system binary
|
- Pre-built init system binary
|
||||||
- Minimal root filesystem structure
|
- Minimal root filesystem structure
|
||||||
- Test environment for validation
|
- Test environment for validation
|
||||||
|
- **BusyBox shell and utilities**: Alpine Linux base provides BusyBox (verified on startup)
|
||||||
- **Multi-architecture support**: Available for both AMD64 (x86_64) and ARM64 (aarch64) architectures
|
- **Multi-architecture support**: Available for both AMD64 (x86_64) and ARM64 (aarch64) architectures
|
||||||
|
|
||||||
|
When you run the Docker image, it automatically verifies:
|
||||||
|
- BusyBox version and installation
|
||||||
|
- Available BusyBox applets (sh, ls, cat, etc.)
|
||||||
|
- Required networking tools (udhcpc, ip, ping, wget)
|
||||||
|
- Custom init system binary
|
||||||
|
|
||||||
Images are automatically built and published to [GitHub Container Registry](https://github.com/johndoe6345789/SparkOS/pkgs/container/sparkos) on every push to main branch.
|
Images are automatically built and published to [GitHub Container Registry](https://github.com/johndoe6345789/SparkOS/pkgs/container/sparkos) on every push to main branch.
|
||||||
|
|
||||||
**Building Releases with Docker (No Root Required):**
|
**Building Releases with Docker (No Root Required):**
|
||||||
|
|||||||
@@ -2,9 +2,47 @@
|
|||||||
echo "SparkOS Docker Test Environment"
|
echo "SparkOS Docker Test Environment"
|
||||||
echo "================================"
|
echo "================================"
|
||||||
echo ""
|
echo ""
|
||||||
echo "SparkOS init binary: /sparkos/rootfs/sbin/init"
|
|
||||||
|
# Verify BusyBox is present and working
|
||||||
|
echo "Verifying BusyBox..."
|
||||||
|
echo "-------------------"
|
||||||
|
if command -v busybox >/dev/null 2>&1; then
|
||||||
|
echo "✓ BusyBox is installed"
|
||||||
|
echo ""
|
||||||
|
echo "BusyBox version:"
|
||||||
|
busybox | head -n 1
|
||||||
|
echo ""
|
||||||
|
echo "BusyBox location:"
|
||||||
|
which busybox
|
||||||
|
ls -lh $(which busybox)
|
||||||
|
echo ""
|
||||||
|
echo "Shell (/bin/sh) is BusyBox:"
|
||||||
|
ls -lh /bin/sh
|
||||||
|
if [ -L /bin/sh ]; then
|
||||||
|
echo " → /bin/sh is a symlink to: $(readlink /bin/sh)"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
echo "Available BusyBox applets (sample):"
|
||||||
|
busybox --list | head -n 20
|
||||||
|
echo " ... and $(busybox --list | wc -l) total applets"
|
||||||
|
echo ""
|
||||||
|
echo "Networking applets (required for SparkOS):"
|
||||||
|
for cmd in udhcpc ip ifconfig ping wget; do
|
||||||
|
if busybox --list | grep -q "^${cmd}$"; then
|
||||||
|
echo " ✓ $cmd"
|
||||||
|
else
|
||||||
|
echo " ✗ $cmd (NOT FOUND)"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "✗ BusyBox not found!"
|
||||||
|
echo " SparkOS requires BusyBox for shell and utilities"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Verifying init binary..."
|
echo "Verifying SparkOS init binary..."
|
||||||
|
echo "--------------------------------"
|
||||||
if [ -f /sparkos/rootfs/sbin/init ]; then
|
if [ -f /sparkos/rootfs/sbin/init ]; then
|
||||||
echo "✓ Init binary exists"
|
echo "✓ Init binary exists"
|
||||||
ls -lh /sparkos/rootfs/sbin/init
|
ls -lh /sparkos/rootfs/sbin/init
|
||||||
@@ -22,11 +60,21 @@ else
|
|||||||
echo "✗ Init binary not found!"
|
echo "✗ Init binary not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Root filesystem structure:"
|
echo "Root filesystem structure:"
|
||||||
|
echo "--------------------------"
|
||||||
ls -la /sparkos/rootfs/
|
ls -la /sparkos/rootfs/
|
||||||
echo ""
|
echo ""
|
||||||
echo "SparkOS is ready for testing!"
|
echo "================================"
|
||||||
|
echo "✓ SparkOS is ready for testing!"
|
||||||
|
echo "================================"
|
||||||
|
echo ""
|
||||||
|
echo "Summary:"
|
||||||
|
echo " - BusyBox: $(busybox | head -n 1)"
|
||||||
|
echo " - Init: Custom SparkOS init system"
|
||||||
|
echo " - Shell: BusyBox sh (/bin/sh)"
|
||||||
|
echo " - Networking: BusyBox udhcpc, ip, ping, wget"
|
||||||
echo ""
|
echo ""
|
||||||
echo "To test the init system:"
|
echo "To test the init system:"
|
||||||
echo " docker run --rm <image> /sparkos/rootfs/sbin/init --help"
|
echo " docker run --rm <image> /sparkos/rootfs/sbin/init --help"
|
||||||
Reference in New Issue
Block a user