mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-04-16 16:32:17 +02:00
fix(guix): mirror boost unordered patch through local distfiles
This commit is contained in:
parent
a8749e87ad
commit
a98f0d1164
7 changed files with 99 additions and 53 deletions
17
steps-guix/boost-unordered-patch/pass1.sh
Normal file
17
steps-guix/boost-unordered-patch/pass1.sh
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
src_unpack() {
|
||||
mkdir -p boost-unordered-patch
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
:
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
:
|
||||
}
|
||||
|
||||
src_install() {
|
||||
install -D -m 0644 /dev/null "${DESTDIR}/usr/share/boost-unordered-patch.done"
|
||||
}
|
||||
1
steps-guix/boost-unordered-patch/sources
Normal file
1
steps-guix/boost-unordered-patch/sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
f https://cdn.jsdelivr.net/npm/@openziti/ziti-sdk-nodejs@0.14.2/vcpkg/ports/boost-unordered/0001-unordered-fix-copy-assign.patch c6e04429fbf1629f10f456d47d9cfda1a89c4b1f242665cb4c091cd84b0d4626
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
--- guix-1.5.0/gnu/packages/boost.scm
|
||||
+++ guix-1.5.0/gnu/packages/boost.scm
|
||||
@@ -247,9 +247,13 @@ across a broad spectrum of applications.")
|
||||
version "/source/boost_"
|
||||
(version-with-underscores version) ".tar.bz2"))
|
||||
(patches
|
||||
- (list (boost-patch
|
||||
- "0001-unordered-fix-copy-assign.patch" version
|
||||
- "09j61m5xh7099k5na9i43x5rra51znf7vm2nyh89yqpizcll9q66")))
|
||||
+ (list (origin
|
||||
+ (method url-fetch)
|
||||
+ (uri "http://127.0.0.1:38445/0001-unordered-fix-copy-assign.patch")
|
||||
+ (file-name "boost-0001-unordered-fix-copy-assign.patch")
|
||||
+ (sha256
|
||||
+ (base32
|
||||
+ "09j61m5xh7099k5na9i43x5rra51znf7vm2nyh89yqpizcll9q66")))))
|
||||
(patch-flags '("-p2"))
|
||||
(sha256
|
||||
(base32
|
||||
|
|
@ -5,12 +5,15 @@ set -e
|
|||
|
||||
. /steps/bootstrap.cfg
|
||||
. /steps/env
|
||||
. /steps-guix/improve/local-distfiles-http.sh
|
||||
|
||||
guix_localstate_dir="/var/guix"
|
||||
daemon_socket="${guix_localstate_dir}/daemon-socket/socket"
|
||||
out_dir="/external/guix-images"
|
||||
export GUIX_DAEMON_SOCKET="${daemon_socket}"
|
||||
|
||||
trap stop_distfiles_http_server EXIT INT TERM HUP
|
||||
|
||||
if [ ! -S "${daemon_socket}" ]; then
|
||||
echo "guix-daemon socket is missing: ${daemon_socket}" >&2
|
||||
echo "Run improve/guix-daemon-and-pull.sh first." >&2
|
||||
|
|
@ -24,6 +27,7 @@ test -d /usr/share/guile/site/3.0/gnu/installer/aux-files || \
|
|||
cp -r /var/lib/guix/local-channels/guix/gnu/installer/aux-files \
|
||||
/usr/share/guile/site/3.0/gnu/installer/
|
||||
|
||||
start_distfiles_http_server
|
||||
guix system image \
|
||||
--system=x86_64-linux \
|
||||
-t iso9660 \
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ set -e
|
|||
|
||||
. /steps/bootstrap.cfg
|
||||
. /steps/env
|
||||
. /steps-guix/improve/local-distfiles-http.sh
|
||||
|
||||
guix_localstate_dir="/var/guix"
|
||||
daemon_socket="${guix_localstate_dir}/daemon-socket/socket"
|
||||
|
|
@ -12,12 +13,6 @@ channel_root="/var/lib/guix/local-channels"
|
|||
channel_repo="${channel_root}/guix"
|
||||
channel_work="/tmp/guix-local-channel-work"
|
||||
channels_file="/root/.config/guix/channels.scm"
|
||||
distfiles="${DISTFILES:-/external/distfiles}"
|
||||
distfiles_http_host="127.0.0.1"
|
||||
distfiles_http_port="38445"
|
||||
distfiles_http_base_url="http://${distfiles_http_host}:${distfiles_http_port}"
|
||||
distfiles_http_pid=""
|
||||
distfiles_http_log="/tmp/distfiles-httpd.log"
|
||||
guix_seed_helper="/steps-guix/improve/guix-1.5.0.sh"
|
||||
guix_patch_dir="/steps-guix/guix-1.5.0/patches"
|
||||
PATH="/usr/sbin:/sbin:${PATH}"
|
||||
|
|
@ -37,53 +32,6 @@ export GUILE_SYSTEM_COMPILED_PATH="${guile_site_ccache}:${guile_core_ccache}"
|
|||
export GUILE_EXTENSIONS_PATH="${guile_ext_path}"
|
||||
export GNUTLS_GUILE_EXTENSION_DIR="${guile_ext_path}"
|
||||
|
||||
stop_distfiles_http_server() {
|
||||
if [ -n "${distfiles_http_pid}" ] && kill -0 "${distfiles_http_pid}" >/dev/null 2>&1; then
|
||||
kill "${distfiles_http_pid}" >/dev/null 2>&1 || true
|
||||
wait "${distfiles_http_pid}" >/dev/null 2>&1 || true
|
||||
fi
|
||||
}
|
||||
|
||||
start_distfiles_http_server() {
|
||||
if [ ! -d "${distfiles}" ]; then
|
||||
echo "Distfiles directory is missing: ${distfiles}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v python3 >/dev/null 2>&1; then
|
||||
echo "python3 is required to serve local distfiles over HTTP." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -f "${distfiles_http_log}"
|
||||
|
||||
echo "Starting local distfiles HTTP server at ${distfiles_http_base_url}"
|
||||
python3 -m http.server "${distfiles_http_port}" \
|
||||
--bind "${distfiles_http_host}" \
|
||||
--directory "${distfiles}" \
|
||||
>"${distfiles_http_log}" 2>&1 &
|
||||
distfiles_http_pid="$!"
|
||||
|
||||
retry=0
|
||||
while [ "${retry}" -lt 30 ]; do
|
||||
if ! kill -0 "${distfiles_http_pid}" >/dev/null 2>&1; then
|
||||
echo "Local distfiles HTTP server exited unexpectedly." >&2
|
||||
cat "${distfiles_http_log}" >&2 || true
|
||||
exit 1
|
||||
fi
|
||||
if python3 -c "import urllib.request; urllib.request.urlopen('${distfiles_http_base_url}/', timeout=2).read(1)" \
|
||||
>/dev/null 2>&1; then
|
||||
return
|
||||
fi
|
||||
retry=$((retry + 1))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Timed out waiting for local distfiles HTTP server: ${distfiles_http_base_url}" >&2
|
||||
cat "${distfiles_http_log}" >&2 || true
|
||||
exit 1
|
||||
}
|
||||
|
||||
trap stop_distfiles_http_server EXIT INT TERM HUP
|
||||
|
||||
have_group() {
|
||||
|
|
|
|||
56
steps-guix/improve/local-distfiles-http.sh
Executable file
56
steps-guix/improve/local-distfiles-http.sh
Executable file
|
|
@ -0,0 +1,56 @@
|
|||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
distfiles="${DISTFILES:-/external/distfiles}"
|
||||
distfiles_http_host="127.0.0.1"
|
||||
distfiles_http_port="38445"
|
||||
distfiles_http_base_url="http://${distfiles_http_host}:${distfiles_http_port}"
|
||||
distfiles_http_pid=""
|
||||
distfiles_http_log="/tmp/distfiles-httpd.log"
|
||||
|
||||
stop_distfiles_http_server() {
|
||||
if [ -n "${distfiles_http_pid}" ] && kill -0 "${distfiles_http_pid}" >/dev/null 2>&1; then
|
||||
kill "${distfiles_http_pid}" >/dev/null 2>&1 || true
|
||||
wait "${distfiles_http_pid}" >/dev/null 2>&1 || true
|
||||
fi
|
||||
}
|
||||
|
||||
start_distfiles_http_server() {
|
||||
if [ ! -d "${distfiles}" ]; then
|
||||
echo "Distfiles directory is missing: ${distfiles}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v python3 >/dev/null 2>&1; then
|
||||
echo "python3 is required to serve local distfiles over HTTP." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -f "${distfiles_http_log}"
|
||||
|
||||
echo "Starting local distfiles HTTP server at ${distfiles_http_base_url}"
|
||||
python3 -m http.server "${distfiles_http_port}" \
|
||||
--bind "${distfiles_http_host}" \
|
||||
--directory "${distfiles}" \
|
||||
>"${distfiles_http_log}" 2>&1 &
|
||||
distfiles_http_pid="$!"
|
||||
|
||||
retry=0
|
||||
while [ "${retry}" -lt 30 ]; do
|
||||
if ! kill -0 "${distfiles_http_pid}" >/dev/null 2>&1; then
|
||||
echo "Local distfiles HTTP server exited unexpectedly." >&2
|
||||
cat "${distfiles_http_log}" >&2 || true
|
||||
exit 1
|
||||
fi
|
||||
if python3 -c "import urllib.request; urllib.request.urlopen('${distfiles_http_base_url}/', timeout=2).read(1)" \
|
||||
>/dev/null 2>&1; then
|
||||
return
|
||||
fi
|
||||
retry=$((retry + 1))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Timed out waiting for local distfiles HTTP server: ${distfiles_http_base_url}" >&2
|
||||
cat "${distfiles_http_log}" >&2 || true
|
||||
exit 1
|
||||
}
|
||||
|
|
@ -77,6 +77,7 @@ improve: guix-1.5.0
|
|||
build: guix-1.5.0
|
||||
build: loopback-bind-127001
|
||||
improve: services
|
||||
build: boost-unordered-patch
|
||||
improve: guix-daemon-and-pull
|
||||
improve: guix-build-iso
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue