Skip to content

Commit

Permalink
Upgrade the release binaries to FreeBSD 14.1 and OpenBSD 7.6 and swit…
Browse files Browse the repository at this point in the history
…ch away from a passwordless setup for simplification
  • Loading branch information
kit-ty-kate committed Oct 15, 2024
1 parent b675edb commit 0d3bdaf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
3 changes: 3 additions & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ users)
## Release scripts
* Upgrade the Alpine Linux container where the Linux release binaries are built from Alpine 3.13 to 3.20 [#6237 @kit-ty-kate]
* Make the release script produce a Linux/riscv64 binary [#6237 @kit-ty-kate]
* Upgrade the FreeBSD qemu image where the FreeBSD binary is built from FreeBSD 13.2 to 14.1 [#6237 @kit-ty-kate]
* Upgrade the OpenBSD qemu image where the OpenBSD binary is built from OpenBSD 7.4 to 7.6 [#6237 @kit-ty-kate]
* Simplify and improve the reliability of the one-click release script by switching away from a passwordless setup [#6237 @kit-ty-kate]

## Install script

Expand Down
4 changes: 2 additions & 2 deletions release/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ distclean: clean
REMOTE_DIR = /tmp/opam-release
REMOTE_MAKE = make
REMOTE_SHELL = /bin/sh
SSH = ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
SCP = scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
SSH = sshpass -ppassword ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
SCP = sshpass -ppassword scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
remote: $(OUTDIR)/opam-full-$(VERSION).tar.gz
$(SSH) "$(REMOTE)" "mkdir -p $(REMOTE_DIR)/$(OUTDIR)"
$(SCP) Makefile "$(REMOTE):$(REMOTE_DIR)/"
Expand Down
17 changes: 6 additions & 11 deletions release/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,25 @@
* no online account
* yes, i want the limited experience
* username: opam
* no password
* password: password
* 3 hints: just random or something
* no location
* no find my device
* send required diagnostic data
* no improve inking & typing
* send required diagnostic data
* no advertising ID
* no cortana
* Open gpedit.msc and right-click on "Computer Configuration -> Administrative Templates -> Windows Components -> Windows Update -> Configure Automatic Updates", click Edit and in the new window click on Enabled and then select "2. Notify for download and auto install", click Apply and then Ok.
* Start -> Power off
* Run qemu-system-x86_64 -drive file=Windows-10-x86_64.qcow2 -smp 8 -m 6G -machine q35
* Answer yes to the "would you like to be discoverable on the network" prompt
* Open the Settings app
* "System -> Power & Sleep" and select "Never" on the "When plugged in, turn off after" drop-down menu
* Put the slider on "Best performance"
* search for "Add an optional feature", then search for "OpenSSH" and install "OpenSSH Server"
* Run services.msc
* Double-click OpenSSH SSH Server then select Automatic from the Startup drop-down menu
* Click Ok
* Open cmd.exe as administrator and run "net start sshd", then "notepad C:/ProgramData/ssh/sshd_config"
* Uncomment and set:
* PermitEmptyPasswords yes
* PermitRootLogin yes
* PasswordAuthentication yes
* StrictMode no
* Save and close both applications
* Open regedit.exe and set HKey_Local_Machine\SYSTEM\CurrentControlSet\Control\Lsa\LimitBlankPasswordUse to 0
* Shutdown the computer using the startmenu button

## Github release
Expand Down Expand Up @@ -92,6 +87,6 @@
## Device requirements
* Mac M1 or above with Rosetta2
* >=70GB of disk space free
* brew dependencies: git, gpg, qemu>=8.1.0, docker>=24.0.0
* brew dependencies: git, gpg, qemu>=8.1.0 (avoid qemu 9.1.0, see https://gitlab.com/qemu-project/qemu/-/issues/2581), docker>=24.0.0, sshpass
* opam repo with the tag fetched
* Have the secret key available
8 changes: 4 additions & 4 deletions release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cd "$DIR"
LC_ALL=C
CWD=$(pwd)
JOBS=$(sysctl -n hw.ncpu)
SSH="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
SSH="sshpass -ppassword ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"

OUTDIR="out/$TAG"
mkdir -p "$OUTDIR"
Expand Down Expand Up @@ -71,7 +71,7 @@ qemu_build() {

if ! ${SSH} -p "${port}" root@localhost true; then
qemu-img convert -O raw "./qemu-base-images/${image}.qcow2" "./qemu-base-images/${image}.raw"
"qemu-system-${arch}" -drive "file=./qemu-base-images/${image}.raw,format=raw" -nic "user,hostfwd=tcp::${port}-:22" -m 2G -smp "${JOBS}" &
"qemu-system-${arch}" -drive "file=./qemu-base-images/${image}.raw,format=raw" -nic "user,hostfwd=tcp::${port}-:22" -machine q35 -m 2G -smp "${JOBS}" &
sleep 60
fi
${SSH} -p "${port}" root@localhost "${install}"
Expand All @@ -90,6 +90,6 @@ make JOBS="${JOBS}" TAG="$TAG" riscv64-linux
[ -f "${OUTDIR}/opam-$TAG-x86_64-macos" ] || make TAG="$TAG" JOBS="${JOBS}" macos-local MACOS_ARCH=x86_64 REMOTE_DIR=opam-release-$TAG GIT_URL="$CWD/.."
[ -f "${OUTDIR}/opam-$TAG-arm64-macos" ] || make TAG="$TAG" JOBS="${JOBS}" macos-local MACOS_ARCH=arm64 REMOTE_DIR=opam-release-$TAG GIT_URL="$CWD/.."
[ -d ./qemu-base-images ] || git clone https://gitlab.com/kit-ty-kate/qemu-base-images.git
[ -f "${OUTDIR}/opam-$TAG-x86_64-openbsd" ] || qemu_build 9999 OpenBSD-7.4-amd64 "pkg_add gmake curl bzip2" gmake x86_64
[ -f "${OUTDIR}/opam-$TAG-x86_64-freebsd" ] || qemu_build 9998 FreeBSD-13.2-RELEASE-amd64 "env IGNORE_OSVERSION=yes pkg install -y gmake curl bzip2" gmake x86_64
[ -f "${OUTDIR}/opam-$TAG-x86_64-openbsd" ] || qemu_build 9999 OpenBSD-7.6-amd64 "pkg_add gmake curl bzip2" gmake x86_64
[ -f "${OUTDIR}/opam-$TAG-x86_64-freebsd" ] || qemu_build 9998 FreeBSD-14.1-RELEASE-amd64 "env IGNORE_OSVERSION=yes pkg install -y gmake curl bzip2" gmake x86_64
[ -f "${OUTDIR}/opam-$TAG-x86_64-windows" ] || windows_build 9997 Windows-10-x86_64

0 comments on commit 0d3bdaf

Please sign in to comment.