Skip to content

Commit 7367dcd

Browse files
committed
Use quicklisp-mirror if it exists in the current OpenShift project.
1 parent 1cec0fa commit 7367dcd

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

1.0/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ RUN wget --progress=bar:force "https://downloads.sourceforge.net/project/sbcl/sb
5151
cd .. && rm -rf sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 sbcl-${SBCL_VERSION}-x86-64-linux && \
5252
wget https://beta.quicklisp.org/quicklisp.lisp && \
5353
sbcl --non-interactive --load install.lisp && \
54+
patch -p0 < quicklisp-mirror.patch && \
5455
chown -R 1001:1001 /opt/app-root && \
5556
chmod -R go+rw /opt/app-root
5657

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--- quicklisp/quicklisp/http.lisp~ 2017-06-27 20:42:01.000000000 -0400
2+
+++ quicklisp/quicklisp/http.lisp 2019-01-08 06:52:26.654287287 -0500
3+
@@ -809,6 +809,24 @@
4+
(maximum-redirects *maximum-redirects*))
5+
"default scheme-function for http protocol."
6+
(setf url (merge-urls url *default-url-defaults*))
7+
+
8+
+ ;; --- container-lisp local hack ----------------------------------------
9+
+ ;;
10+
+ ;; We want to use a local quicklisp mirror if one is deployed in the
11+
+ ;; current OpenShift project. Test whether we can do this by
12+
+ ;; performing a DNS check for "quicklisp-mirror" (FQDN is
13+
+ ;; "quicklisp-mirror.PROJECT.svc.cluster.local").
14+
+
15+
+ (if (string= (hostname url) "beta.quicklisp.org")
16+
+ (setf (hostname url)
17+
+ (handler-case
18+
+ (progn
19+
+ (sb-bsd-sockets:get-host-by-name "quicklisp-mirror")
20+
+ "quicklisp-mirror")
21+
+ (sb-bsd-sockets:host-not-found-error ()
22+
+ "beta.quicklisp.org"))))
23+
+ ;; ----------------------------------------------------------------------
24+
+
25+
(setf file (merge-pathnames file))
26+
(let ((redirect-count 0)
27+
(original-url url)

0 commit comments

Comments
 (0)