Compare commits

..

No commits in common. "1bc0ddb67334bfb0aec342b561e5c7f448f71255" and "4baff4a83251c816860f4e9e3b2f136d6ad6e9f4" have entirely different histories.

5 changed files with 17 additions and 159 deletions

View File

@ -42,7 +42,7 @@
(define-public cloudflare-warp-bin (define-public cloudflare-warp-bin
(package (package
(name "cloudflare-warp-bin") (name "cloudflare-warp-bin")
(version "2025.6.1335.0") (version "2025.5.943.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "https://pkg.cloudflareclient.com" (uri (string-append "https://pkg.cloudflareclient.com"
@ -50,7 +50,7 @@
"cloudflare-warp_" version "_amd64.deb")) "cloudflare-warp_" version "_amd64.deb"))
(sha256 (sha256
(base32 (base32
"1kk6z05n0ryhvn7xbhlx79qnvyl5drbvvqzy9sy5fclcv8x29gpi")))) "0j1b6f2jdwawr4dbi3vrf3yra5qhdck0djg8lmf29ah8p5yjrsz8"))))
(build-system copy-build-system) (build-system copy-build-system)
(arguments (arguments
(list #:install-plan (list #:install-plan

View File

@ -18,7 +18,7 @@
(define-public cloudflared (define-public cloudflared
(package (package
(name "cloudflared") (name "cloudflared")
(version "2025.8.1") (version "2025.8.0")
(source (origin (source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
@ -30,7 +30,7 @@
;; (snippet '(delete-file-recursively "vendor")) ;; (snippet '(delete-file-recursively "vendor"))
(sha256 (sha256
(base32 (base32
"1vi5wmsbb6s90ss8v8xvnimgp85n5f1q679w4wzip0823g7z58zf")))) "1qfi1770jaiwhklp1d7vd6kl8yfyxv1i64vdz7n8p4f015v47y4j"))))
(build-system go-build-system) (build-system go-build-system)
(arguments (arguments
(list #:go go-1.24 (list #:go go-1.24
@ -139,7 +139,7 @@ bypass network restrictions." )
(define-public sing-box (define-public sing-box
(package (package
(name "sing-box") (name "sing-box")
(version "1.12.3") (version "1.12.1")
(source (origin (source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
@ -148,7 +148,7 @@ bypass network restrictions." )
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"1253dbdixq936y3f5gw72an1l25pinzdqqnz1i9983ajxc5l4y1q")))) "088vl3ad324r11g341gca6qrj53pyr1nfwhf7jmpy89m9wxp33ky"))))
(build-system go-build-system) (build-system go-build-system)
(arguments (arguments
(list (list
@ -216,7 +216,7 @@ bypass network restrictions." )
(file-name "vendored-go-dependencies") (file-name "vendored-go-dependencies")
(sha256 (sha256
(base32 (base32
"1dbw0p8mmhxh715x7r9kwy5dribl3pa979fpfa98ayyynvd0zxb3")))) "1b5dd8qyla8i007sjy412am9rmsm303gk7drrh0y2wq46lya4rdi"))))
(if (%current-target-system) (if (%current-target-system)
(list this-package) (list this-package)
'()))) '())))
@ -257,7 +257,7 @@ a SOCKS5 proxy.")
(define-public tailscale (define-public tailscale
(package (package
(name "tailscale") (name "tailscale")
(version "1.86.2") (version "1.84.3")
(source (origin (source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
@ -266,15 +266,13 @@ a SOCKS5 proxy.")
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"1l8wqn2pd876cyyhfr9c7ry66jll1mfn4vfxdjdfck9gm6ydz346")) "1cdmr6z351i2ammr82gvbs2x3cp9w75q0nzvvk91rsx2khvd8yyh"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
'(begin '(begin
(delete-file-recursively "tool") (delete-file-recursively "tool")
(substitute* "net/tstun/tun_linux.go" (substitute* "net/tstun/tun_linux.go"
(("/sbin/(modprobe)" _ cmd) cmd)) (("/sbin/(modprobe)" _ cmd) cmd))))))
(substitute* "go.mod"
(("1.24.4") "1.24"))))))
(build-system go-build-system) (build-system go-build-system)
(arguments (arguments
(list (list
@ -370,7 +368,7 @@ a SOCKS5 proxy.")
(file-name "vendored-go-dependencies") (file-name "vendored-go-dependencies")
(sha256 (sha256
(base32 (base32
"0l4j763bk2k9pl99rvga1kk828szmjwl7vc9jvrrfq6bj6rd4171")))) "1pbcp946wingy0xw8nc1x0hdj55scndv8kdgzfni0f4hwlq045j0"))))
(if (%current-target-system) (if (%current-target-system)
(list this-package) (list this-package)
'()))) '())))

View File

@ -1,23 +0,0 @@
;;; SPDX-FileCopyrightText: 2022, 2025 Hilton Chain <hako@ultrarare.space>
;;;
;;; SPDX-License-Identifier: GPL-3.0-or-later
(define-module (rosenthal packages package-management)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (rosenthal utils packages)
#:use-module (gnu packages package-management))
(define-public guix/hako
(package
(inherit
(package-with-extra-patches guix
(rosenthal-patches "guix-change-publish-cache-storage.patch")))
(name "guix-hako")
(arguments
(substitute-keyword-arguments (package-arguments guix)
((#:tests? _ #t) #f)
((#:parallel-build? _ #f) #t)))
(properties '((disable-updater? . #t)))))

View File

@ -1,116 +0,0 @@
From 6bbddf0346ac4575f447688941d01e7edd0ed2e8 Mon Sep 17 00:00:00 2001
Message-ID: <6bbddf0346ac4575f447688941d01e7edd0ed2e8.1755929731.git.hako@ultrarare.space>
From: Hilton Chain <hako@ultrarare.space>
Date: Sat, 23 Aug 2025 14:07:19 +0800
Subject: [PATCH] publish: Store cache in a layout identical to API endpoints.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This allows serving substitutes using a file server.
--8<---------------cut here---------------start------------->8---
/path/to/publish/cache
├── hashes
│   ├── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb
│   └── ql2nxr2b587kjydfwivjsnhmqya957bq
├── nar
│   ├── none
│   │   └── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb-hello-2.12.2.nar
│   └── zstd
│   └── ql2nxr2b587kjydfwivjsnhmqya957bq-helix-25.01.1.nar
├── k0pin1y1r0vdkdbg3lwjqc52hpwjbdyb.narinfo
└── ql2nxr2b587kjydfwivjsnhmqya957bq.narinfo
--8<---------------cut here---------------end--------------->8---
Change-Id: I07689f08eef23c5cd4494451678f4e1ad709f1b3
---
guix/scripts/publish.scm | 32 +++++++-------------------------
1 file changed, 7 insertions(+), 25 deletions(-)
diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm
index e9c69336392..e5ac80e0619 100644
--- a/guix/scripts/publish.scm
+++ b/guix/scripts/publish.scm
@@ -425,16 +425,12 @@ (define* (render-narinfo store request hash
(define* (nar-cache-file directory item
#:key (compression %no-compression))
- (string-append directory "/"
+ (string-append directory "/nar/"
(symbol->string (compression-type compression))
"/" (basename item) ".nar"))
-(define* (narinfo-cache-file directory item
- #:key (compression %no-compression))
- (string-append directory "/"
- (symbol->string (compression-type compression))
- "/" (basename item)
- ".narinfo"))
+(define* (narinfo-cache-file directory item)
+ (string-append directory "/" (string-take (basename item) 32) ".narinfo"))
(define (hash-part-mapping-cache-file directory hash)
(string-append directory "/hashes/" hash))
@@ -547,9 +543,7 @@ (define* (render-narinfo/cached store request hash
(let* ((item (hash-part->path* store hash cache))
(compressions (actual-compressions item compressions))
(cached (and (not (string-null? item))
- (narinfo-cache-file cache item
- #:compression
- (first compressions)))))
+ (narinfo-cache-file cache item))))
(cond ((string-null? item)
(not-found request #:ttl negative-ttl))
((file-exists? cached)
@@ -648,8 +642,7 @@ (define* (bake-narinfo+nar cache item
(match compressions
((main others ...)
- (let ((narinfo (narinfo-cache-file cache item
- #:compression main)))
+ (let ((narinfo (narinfo-cache-file cache item)))
(with-atomic-file-output narinfo
(lambda (port)
;; Open a new connection to the store. We cannot reuse the main
@@ -672,8 +665,7 @@ (define* (bake-narinfo+nar cache item
;; atime-based cache eviction considers either all the nars or none
;; of them as candidates.
(for-each (lambda (other)
- (let ((other (narinfo-cache-file cache item
- #:compression other)))
+ (let ((other (narinfo-cache-file cache item)))
(link narinfo other)))
others))))))
@@ -1043,6 +1035,7 @@ (define (string->compression-type string)
("gzip" 'gzip)
("lzip" 'lzip)
("zstd" 'zstd)
+ ("none" 'none)
(_ #f)))
(define (effective-compression requested-type compressions)
@@ -1140,17 +1133,6 @@ (define* (make-request-handler store
#:compression compression)))
(not-found request)))
- ;; /nar/<store-item>
- ((components ... store-item)
- (if (nar-path? components)
- (if cache
- (render-nar/cached store cache request store-item
- #:ttl narinfo-ttl
- #:compression %no-compression)
- (render-nar store request store-item
- #:compression %no-compression))
- (not-found request)))
-
(x (not-found request)))
(not-found request)))
base-commit: 73f943fd9f4cc69bd0463e6c64abeb65e060e1da
--
2.51.0

View File

@ -20,7 +20,7 @@
(define-public ai-robots-txt (define-public ai-robots-txt
(package (package
(name "ai-robots-txt") (name "ai-robots-txt")
(version "1.39") (version "1.38")
(source (origin (source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
@ -29,7 +29,7 @@
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"10x5rvqz1l4gqhhnf12pjqmv4azah9k4970ik0vjrj6z70dpdpk3")) "1f7ahibhmghdm9hh05730c8fm6xk67qq7xx0w5ql573yi0yi0gqc"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet '(delete-file-recursively "code")))) (snippet '(delete-file-recursively "code"))))
(build-system copy-build-system) (build-system copy-build-system)
@ -102,7 +102,7 @@ order to protect upstream resources from web crawlers.")
(define-public caddy (define-public caddy
(package (package
(name "caddy") (name "caddy")
(version "2.10.1") (version "2.10.0")
(source (origin (source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
@ -111,11 +111,10 @@ order to protect upstream resources from web crawlers.")
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"0h6bnkrqnikyial2d3rvs2ksamwghs837y88qk73sbqahprjakp8")) "00crxr956sp865pc3mg0zsacsy80s8v4jgqpmbq3hrsk2gcdsc47"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet '(substitute* "go.mod" (snippet '(substitute* "go.mod"
(("^toolchain.*") "") (("^toolchain.*") "")))))
(("1.25") "1.24")))))
(build-system go-build-system) (build-system go-build-system)
(arguments (arguments
(list #:go go-1.24 (list #:go go-1.24
@ -179,7 +178,7 @@ order to protect upstream resources from web crawlers.")
(file-name "vendored-go-dependencies") (file-name "vendored-go-dependencies")
(sha256 (sha256
(base32 (base32
"1gza58qyxiz0v0wgsvbj3dpcaf8h9b5qpm42dhr10b36lmc2cdy2"))))) "0iwxhc85xnhpqrahiaw1017vxg27hc5q22rc0f96g42mc2mbi2zl")))))
(home-page "https://caddyserver.com/") (home-page "https://caddyserver.com/")
(synopsis "Extensible HTTP web server with automatic HTTPS") (synopsis "Extensible HTTP web server with automatic HTTPS")
(description (description