Skip to content

Commit

Permalink
[soil] Starting dev-setup2 task on Fedora (on sourcehut)
Browse files Browse the repository at this point in the history
Some more things work
  • Loading branch information
Andy C committed Jan 19, 2024
1 parent 4c264e1 commit a827928
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 8 deletions.
File renamed without changes.
22 changes: 22 additions & 0 deletions .builds/worker5.yml
@@ -0,0 +1,22 @@
# https://man.sr.ht/builds.sr.ht/compatibility.md#fedora-linux

image: fedora/40

packages:
# Same package names as Ubuntu
# https://packages.fedoraproject.org/pkgs/zip/zip/
- python2.7
- time
- zip

secrets:
- 2678474d-b22b-449f-a19a-16cb403c94cd

tasks:
- dev-setup2: |
cd oil
soil/worker.sh JOB-dev-setup2
- publish-dev-setup2: |
cd oil
soil/sourcehut.sh publish-html-assuming-ssh-key dev-setup2
39 changes: 38 additions & 1 deletion build/deps.sh
Expand Up @@ -91,6 +91,9 @@ rm-oils-crap() {
sudo rm -r -f -v /wedge
}

# Note: git is an implicit dependency -- that's how we got the repo in the
# first place!

# python2-dev is no longer available on Debian 12
# python-dev also seems gone
#
Expand All @@ -107,6 +110,36 @@ readonly -a WEDGE_DEPS_DEBIAN=(
"${PY3_BUILD_DEPS[@]}"
)

readonly -a WEDGE_DEPS_FEDORA=(

# Weird, Fedora doesn't have these by default!
hostname
tar
bzip2

# https://packages.fedoraproject.org/pkgs/wget/wget/
wget
# https://packages.fedoraproject.org/pkgs/tree-pkg/tree/
tree
gawk

readline-devel

# https://packages.fedoraproject.org/pkgs/gcc/gcc/
gcc gcc-c++

ninja-build
cmake

# Like PY3_BUILD_DEPS
# https://packages.fedoraproject.org/pkgs/zlib/zlib-devel/
zlib-devel
# https://packages.fedoraproject.org/pkgs/libffi/libffi-devel/
libffi-devel
# https://packages.fedoraproject.org/pkgs/openssl/openssl-devel/
openssl-devel
)

install-ubuntu-packages() {
### Packages for build/py.sh all, building wedges, etc.

Expand All @@ -126,10 +159,14 @@ wedge-deps-debian() {
install-ubuntu-packages -y
}

wedge-deps-fedora() {
sudo dnf install --assumeyes "${WEDGE_DEPS_FEDORA[@]}"
}

download-to() {
local dir=$1
local url=$2
wget --no-clobber --directory "$dir" "$url"
wget --no-clobber --directory-prefix "$dir" "$url"
}

maybe-extract() {
Expand Down
13 changes: 10 additions & 3 deletions soil/diagnose.sh
Expand Up @@ -71,7 +71,9 @@ dump-distro() {
fi
echo

apt-cache policy r-base-core
if command -v apt-cache > /dev/null; then
apt-cache policy r-base-core
fi
}

dump-user-host() {
Expand All @@ -82,8 +84,13 @@ dump-user-host() {
echo "PWD = $PWD"
echo

echo -n 'hostname = '
hostname
if command -v hostname > /dev/null; then
echo -n 'hostname = '
hostname
else
# Fedora
echo 'hostname command missing'
fi
echo

uname -a
Expand Down
19 changes: 15 additions & 4 deletions soil/worker.sh
Expand Up @@ -74,13 +74,23 @@ py-all-and-ninja soil/worker.sh py-all-and-ninja -
smoke-test build/dev-setup-test.sh smoke-test -
wedge-report build/deps.sh wedge-report -
EOF
}

# Fails on Ubuntu 20 because python2-dev isn't set up
# That's in the container
# build-minimal build/py.sh minimal -
# smoke-test build/dev-setup-test.sh smoke-test -
dev-setup2-tasks() {
# (task_name, script, action, result_html)
cat <<EOF
os-info soil/diagnose.sh os-info -
dump-env soil/diagnose.sh dump-env -
wedge-deps build/deps.sh wedge-deps-fedora -
fetch build/deps.sh fetch -
install-wedges build/deps.sh install-wedges -
py-all-and-ninja soil/worker.sh py-all-and-ninja -
smoke-test build/dev-setup-test.sh smoke-test -
wedge-report build/deps.sh wedge-report -
EOF
}


pea-tasks() {
### Print tasks for the 'pea' build

Expand Down Expand Up @@ -561,6 +571,7 @@ job-main() {
JOB-dummy() { job-main 'dummy'; }
JOB-raw-vm() { job-main 'raw-vm'; }
JOB-dev-setup() { job-main 'dev-setup'; }
JOB-dev-setup2() { job-main 'dev-setup2'; }

JOB-dev-minimal() { job-main 'dev-minimal'; }
JOB-interactive() { job-main 'interactive'; }
Expand Down

0 comments on commit a827928

Please sign in to comment.