factor: override deployment copy-file to skip setting file permissions

Assisted-by: DeepSeek V4 Flash
This commit is contained in:
·𐑑𐑴𐑕𐑑𐑩𐑤
2026-06-05 18:17:51 +07:00
parent 7aaa9694b8
commit dde6eefd58
@@ -33,10 +33,22 @@ in
extraVocabs ? [ ],
deployScriptText ? /* factor */ ''
USING: command-line io io.backend io.pathnames kernel namespaces sequences
tools.deploy tools.deploy.config tools.deploy.backend vocabs.loader ;
tools.deploy tools.deploy.config tools.deploy.backend vocabs.loader
io.directories.unix ;
IN: deploy-me
! The Nix sandboxs seccomp filter blocks chmod(2). Factors
! copy-file calls set-file-permissions which chmods the target
! to the sources mode, 0o444. The blocked syscall returns
! EACCES, crashing the deploys. The method override skips the
! set-file-permissions call (Nix will manage its output
! permissions).
!
! Surfaced with Factor 0.101 which added icon PNG resources to
! the definitions.icons vocab to copy-vocab-resources.
M: unix copy-file call-next-method ;
: load-and-deploy ( path/vocab -- )
normalize-path [
parent-directory add-vocab-root