Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions rivet-cli/installer.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,9 @@
;; deb/rpm integrate with the distribution package manager, while AppImage
;; carries its own GTK4 dependency closure and becomes the signed in-place
;; update payload when enabled.
(for ([format (in-list (project-linux-formats project))])
(case format
;; `fmt`, not `format`: the builtin stays reachable inside the branches.
(for ([fmt (in-list (project-linux-formats project))])
(case fmt
[("deb") (create-deb! project package)]
[("rpm") (create-rpm! project package)]
[("appimage") (create-appimage! project package)]))
Expand Down
8 changes: 4 additions & 4 deletions rivet-cli/main.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,14 @@
(say "release installer: ~a" installer)
(say "portable zip: ~a" portable-zip)
(when (eq? (system-type 'os) 'unix)
(for ([format (in-list ((command "project" 'project-linux-formats)
(current-project!)))])
(for ([fmt (in-list ((command "project" 'project-linux-formats)
(current-project!)))])
(define extra
(case format
(case fmt
[("deb") ((command "deb" 'deb-installer-path) (current-project!))]
[("rpm") ((command "rpm" 'rpm-installer-path) (current-project!))]
[("appimage") ((command "appimage" 'appimage-installer-path) (current-project!))]))
(say "release ~a: ~a" format extra)))
(say "release ~a: ~a" fmt extra)))
(if manifest
(say "signed update manifest: ~a" manifest)
(say "update manifest: skipped (--without-updates)"))
Expand Down
7 changes: 5 additions & 2 deletions rivet-cli/verify.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,11 @@
;; broken installer cannot pass a release gate.
(define (verify-linux-native-installers! project)
(define who 'verify-package!)
(for ([format (in-list (project-linux-formats project))])
(case format
;; The loop variable must not be named `format`: the branches below call
;; the format builtin, and the shadow turned "deb" into a procedure
;; application (rivet #320).
(for ([fmt (in-list (project-linux-formats project))])
(case fmt
[("deb")
(define installer (deb-installer-path project))
(required-file! who installer "deb installer")
Expand Down
17 changes: 17 additions & 0 deletions rivet/tests/linux-installer.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,23 @@
#:production? #t
#:launch-smoke? #f))))))

;; Regression for rivet #320: the native-installer verification loop
;; named its variable `format`, shadowing the builtin, so verifying a
;; project with linux-formats applied the string "deb" as a procedure.
;; Building and verifying a real deb exercises that branch end to end.
(define deb-project
(rivet-project package-root (hasheq 'name "Smoke" 'linux-formats '("deb"))))
(with-production-env
(lambda ()
(create-installer! deb-project package #:production? #t)))
(check-equal?
(with-production-env
(lambda ()
(verify-package! deb-project package
#:production? #t
#:launch-smoke? #f)))
package)

(delete-file private-key-path)
(delete-file public-key-path))

Expand Down
Loading