Compare commits

...

7 Commits

Author SHA1 Message Date
Hilton Chain
1bc0ddb673
rosenthal: caddy: Update to 2.10.1.
* modules/rosenthal/packages/web.scm (caddy): Update to 2.10.1.
[native-inputs]: Update vendored Go dependencies.
2025-08-23 15:05:59 +08:00
Hilton Chain
53540076a4
rosenthal: ai-robots-txt: Update to 1.39.
* modules/rosenthal/packages/web.scm (ai-robots-txt): Update to 1.39.
2025-08-23 14:57:01 +08:00
Hilton Chain
f844fc9e89
rosenthal: tailscale: Update to 1.86.2.
* modules/rosenthal/packages/networking.scm (tailscale): Update to 1.86.2.
[native-inputs]: Update vendored Go dependencies.
2025-08-23 14:56:50 +08:00
Hilton Chain
b30ee4ff9b
rosenthal: sing-box: Update to 1.12.3.
* modules/rosenthal/packages/networking.scm (sing-box): Update to 1.12.3.
[native-inputs]: Update vendored Go dependencies.
2025-08-23 14:54:27 +08:00
Hilton Chain
3d3df47c25
rosenthal: cloudflared: Update to 2025.8.1.
* modules/rosenthal/packages/networking.scm (cloudflared): Update to 2025.8.1.
2025-08-23 14:49:45 +08:00
Hilton Chain
85beb60c1a
rosenthal: cloudflare-warp-bin: Update to 2025.6.1335.0.
* modules/rosenthal/packages/binaries.scm (cloudflare-warp-bin): Update to 2025.6.1335.0.
2025-08-23 14:49:44 +08:00
Hilton Chain
583bdda811
rosenthal: Add guix/hako.
* modules/rosenthal/packages/patches/guix-change-publish-cache-storage.patch:
New file.
* modules/rosenthal/packages/package-management.scm (guix/hako): New variable.
2025-08-23 14:36:51 +08:00
5 changed files with 159 additions and 17 deletions

View File

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

View File

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

View File

@ -0,0 +1,23 @@
;;; 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

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