mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2025-11-16 09:24:58 +00:00
Compare commits
7 Commits
4baff4a832
...
1bc0ddb673
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bc0ddb673 | ||
|
|
53540076a4 | ||
|
|
f844fc9e89 | ||
|
|
b30ee4ff9b | ||
|
|
3d3df47c25 | ||
|
|
85beb60c1a | ||
|
|
583bdda811 |
@ -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
|
||||
|
||||
@ -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)
|
||||
'())))
|
||||
|
||||
23
modules/rosenthal/packages/package-management.scm
Normal file
23
modules/rosenthal/packages/package-management.scm
Normal 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)))))
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user