summaryrefslogtreecommitdiff
path: root/guix/forge/klaus.scm
diff options
context:
space:
mode:
authorArun Isaac2023-07-25 12:43:13 +0100
committerArun Isaac2023-07-25 19:20:55 +0100
commitcbff2b6e44a54ab8e62c4f86d98cd0f262cb2858 (patch)
tree4a5daa36306be4d8f6ed7aad8b2e11a25ffe02b6 /guix/forge/klaus.scm
parenta1ccddaaeb42999cc8996ce536647037a2dd120c (diff)
downloadguix-forge-cbff2b6e44a54ab8e62c4f86d98cd0f262cb2858.tar.gz
guix-forge-cbff2b6e44a54ab8e62c4f86d98cd0f262cb2858.tar.lz
guix-forge-cbff2b6e44a54ab8e62c4f86d98cd0f262cb2858.zip
klaus: Add git-without-safe-directory-check.
* guix/forge/klaus.scm: Import git-minimal from (gnu packages version-control), (guix gexp) and (guix utils). (git-without-safe-directory-check): New variable.
Diffstat (limited to 'guix/forge/klaus.scm')
-rw-r--r--guix/forge/klaus.scm27
1 files changed, 26 insertions, 1 deletions
diff --git a/guix/forge/klaus.scm b/guix/forge/klaus.scm
index fcc63a5..099b42f 100644
--- a/guix/forge/klaus.scm
+++ b/guix/forge/klaus.scm
@@ -19,11 +19,14 @@
(define-module (forge klaus)
#:use-module ((gnu packages check) #:select (python-nose))
+ #:use-module ((gnu packages version-control) #:select (git-minimal))
#:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
- #:use-module (guix packages))
+ #:use-module (guix packages)
+ #:use-module (guix utils))
(define-public python-httpauth
(package
@@ -42,3 +45,25 @@
(description "@code{python-httpauth} is WSGI middleware that secures some/all
routes using HTTP Digest Authentication.")
(license license:bsd-2)))
+
+;; We use klaus to serve shared repositories. But, git's safe
+;; directory check does not permit us to use shared
+;; repositories. Disable it. The more long term solution is to rewrite
+;; klaus to not use the git CLI at all. See
+;; https://github.com/jonashaag/klaus/issues/322
+(define-public git-without-safe-directory-check
+ (package
+ (inherit git-minimal)
+ (name "git-without-safe-directory-check")
+ (arguments
+ (substitute-keyword-arguments (package-arguments git-minimal)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'disable-safe-directory-check
+ (lambda _
+ ;; Disable the safe directory check.
+ (substitute* "setup.c"
+ (("return data\\.is_safe;")
+ "return 1;"))
+ ;; Disable tests broken by this change.
+ (setenv "GIT_SKIP_TESTS" "t0033 t9700")))))))))