From: Andrei Kvapil <kvapss@gmail.com>
To: drbd-dev@lists.linbit.com
Subject: [Drbd-dev] [PATCH] compat: make spaas url configurable
Date: Wed, 15 Jun 2022 16:06:20 +0200 [thread overview]
Message-ID: <20220615140620.31630-1-kvapss@gmail.com> (raw)
Add opportunity to override SPAAS_URL with local address in case of
building drbd in environments without external internet connectivity.
---
Makefile | 1 +
drbd/Makefile | 2 ++
drbd/drbd-kernel-compat/gen_compat_patch.sh | 7 ++++---
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 87c29518..37d7851d 100644
--- a/Makefile
+++ b/Makefile
@@ -37,6 +37,7 @@ DOCKERIMAGESTARGETS = $(addprefix dockerimage.,$(DOCKERIMAGES))
# Use the SPAAS (spatch as a service) online service
# Have this as make variable for distributions.
SPAAS ?= true
+SPAAS_URL ?= https://drbd.io:2020
# default for KDIR/KVER
ifndef KVER
diff --git a/drbd/Makefile b/drbd/Makefile
index 597cf30f..089e5e3a 100644
--- a/drbd/Makefile
+++ b/drbd/Makefile
@@ -40,7 +40,9 @@ MAKEFLAGS += -rR --no-print-directory
# Use the SPAAS (spatch as a service) online service
# Have this as make variable for distributions.
SPAAS ?= true
+SPAAS_URL ?= https://drbd.io:2020
export SPAAS
+export SPAAS_URL
# since 2.6.16, KERNELRELEASE may be empty,
# e.g. when building against some (broken?) linux-header package.
diff --git a/drbd/drbd-kernel-compat/gen_compat_patch.sh b/drbd/drbd-kernel-compat/gen_compat_patch.sh
index c57b961c..b8595722 100644
--- a/drbd/drbd-kernel-compat/gen_compat_patch.sh
+++ b/drbd/drbd-kernel-compat/gen_compat_patch.sh
@@ -125,10 +125,11 @@ else
echo " SPAAS $chksum"
# check if SPAAS is even reachable
- if ! curl -fsS https://drbd.io:2020/api/v1/hello; then
+ SPAAS_URL=${SPAAS_URL:-https://drbd.io:2020}
+ if ! curl -fsS $SPAAS_URL/api/v1/hello; then
echo " ERROR: SPAAS is not reachable! Please check if your network"
echo " configuration or some firewall prohibits access to "
- echo " https://drbd.io:2020."
+ echo " $SPAAS_URL."
exit 1
fi
@@ -136,7 +137,7 @@ else
rm -f $compat_patch.tmp.header $compat_patch.tmp
if ! base64 $incdir/compat.h |
curl -T - -X POST -o $compat_patch.tmp -D $compat_patch.tmp.header -f \
- https://drbd.io:2020/api/v1/spatch/$REL_VERSION
+ $SPAAS_URL/api/v1/spatch/$REL_VERSION
then
ex=${PIPESTATUS[*]}
(
--
2.32.0 (Apple Git-132)
next reply other threads:[~2022-06-15 14:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 14:06 Andrei Kvapil [this message]
2022-06-15 16:32 ` [Drbd-dev] [PATCH] compat: make spaas url configurable Joel Colledge
2022-06-16 13:16 ` kvaps
2022-06-20 13:57 ` Joel Colledge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220615140620.31630-1-kvapss@gmail.com \
--to=kvapss@gmail.com \
--cc=drbd-dev@lists.linbit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox