Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
stumpwm: avoid remove .fasl after udpate
To:
OpenBSD ports <ports@openbsd.org>
Cc:
izder456 <izder456@disroot.org>, Timo Myyra <timo.myyra@bittivirhe.fi>, Klemens Nanni <kn@openbsd.org>
Date:
Wed, 09 Oct 2024 01:29:41 +0200

Download raw body.

Thread
ports@, izzy, Timo,

I was hunting this issue for quite some time and the last stop was here:
https://marc.info/?l=openbsd-ports&m=171368973700549&w=2

The cause of issue is a bug inside stumpwm which I've fixed:
https://github.com/stumpwm/stumpwm/pull/1214

So, here the diff which backports the fix to us.

After this fix stumpwm keeps all .fasl inside
~/.cache/common-lisp/sbcl-2.4.9.openbsd.sbcl-2.4.9-bsd-x64
where it should be.

The diff:

Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/stumpwm/Makefile,v
retrieving revision 1.23
diff -u -p -r1.23 Makefile
--- Makefile	30 Sep 2024 15:12:58 -0000	1.23
+++ Makefile	8 Oct 2024 23:23:15 -0000
@@ -2,7 +2,7 @@ COMMENT=		easily hackable Common LISP wi
 
 VERSION=		23.11
 DISTNAME=		stumpwm-${VERSION}
-REVISION=		7
+REVISION=		8
 
 CATEGORIES=		x11
 
Index: patches/patch-make-image_lisp_in
===================================================================
RCS file: /cvs/ports/x11/stumpwm/patches/patch-make-image_lisp_in,v
retrieving revision 1.1
diff -u -p -r1.1 patch-make-image_lisp_in
--- patches/patch-make-image_lisp_in	18 Feb 2024 07:46:17 -0000	1.1
+++ patches/patch-make-image_lisp_in	8 Oct 2024 23:23:15 -0000
@@ -7,3 +7,20 @@ Index: make-image.lisp.in
  (in-package #:cl-user)
  
  (let* ((expected-warnings
+@@ -48,6 +50,16 @@
+     (uiop:symbol-call '#:asdf '#:register-immutable-system system-name)))
+ 
+ (sb-ext:save-lisp-and-die "stumpwm" :toplevel (lambda ()
++                                                ;; stumpwm migth be build in fake enviroment, so use uiop:restore-image
++                                                ;; to compute real uiop:*user-cache* on that user
++                                                (uiop:restore-image)
++                                                ;; and clean asdf configuration to avoid some cached paths as well
++                                                (asdf:clear-configuration)
++                                                (asdf:clear-output-translations)
++                                                (asdf:initialize-output-translations
++                                                 '(:output-translations
++                                                   :enable-user-cache
++                                                   :ignore-inherited-configuration))
+                                                 ;; asdf requires sbcl_home to be set, so set it to the value when the image was built
+                                                 (alexandria:when-let ((home #.(sb-ext:posix-getenv "SBCL_HOME")))
+                                                   (sb-posix:putenv (format nil "SBCL_HOME=~A" home)))


-- 
wbr, Kirill