Add GPL headers

This commit is contained in:
Ray Miller 2025-06-01 16:13:05 +01:00
parent b81433c75e
commit 00c5c91b11
Signed by: ray
GPG key ID: 043F786C4CD681B8
15 changed files with 261 additions and 21 deletions

View file

@ -1,3 +1,20 @@
#|
This file is part of Ordo.
Copyright (C) 2025 Ray Miller
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo cli run) (define-module (ordo cli run)
#:use-module (config) #:use-module (config)
#:use-module (config api) #:use-module (config api)

View file

@ -1,3 +1,20 @@
#|
This file is part of Ordo.
Copyright (C) 2025 Ray Miller
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo connection) (define-module (ordo connection)
#:use-module (ice-9 exceptions) #:use-module (ice-9 exceptions)
#:use-module (oop goops) #:use-module (oop goops)

View file

@ -1,3 +1,20 @@
#|
This file is part of Ordo.
Copyright (C) 2025 Ray Miller
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo connection base) (define-module (ordo connection base)
#:use-module (ice-9 match) #:use-module (ice-9 match)
#:use-module (oop goops) #:use-module (oop goops)

View file

@ -1,3 +1,20 @@
#|
This file is part of Ordo.
Copyright (C) 2025 Ray Miller
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo connection local) (define-module (ordo connection local)
#:use-module (ice-9 popen) #:use-module (ice-9 popen)
#:use-module (oop goops) #:use-module (oop goops)

View file

@ -1,3 +1,20 @@
#|
This file is part of Ordo.
Copyright (C) 2025 Ray Miller
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo connection ssh) (define-module (ordo connection ssh)
#:use-module (oop goops) #:use-module (oop goops)
#:use-module (ice-9 exceptions) #:use-module (ice-9 exceptions)

View file

@ -1,3 +1,20 @@
#|
This file is part of Ordo.
Copyright (C) 2025 Ray Miller
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo connection sudo) (define-module (ordo connection sudo)
#:use-module (oop goops) #:use-module (oop goops)
#:use-module (ice-9 exceptions) #:use-module (ice-9 exceptions)
@ -19,13 +36,13 @@
(define-method (setup (conn <sudo-connection>)) (define-method (setup (conn <sudo-connection>))
(when (become-password conn) (when (become-password conn)
(let ((out rc (exec conn "mktemp"))) (let ((out rc (remote-exec conn "mktemp")))
(unless (zero? rc) (unless (zero? rc)
(raise-exception (make-exception (raise-exception (make-exception
(make-external-error) (make-external-error)
(make-exception-with-message (format #f "Failed to create temporary directory: ~a" (car out)))))) (make-exception-with-message (format #f "Failed to create temporary directory: ~a" (car out))))))
(let ((tmp-file (car out))) (let ((tmp-file (car out)))
(call-with-output-file conn tmp-file (cut write-line (become-password conn) <>)) (with-remote-output-file conn tmp-file (cut write-line (become-password conn) <>))
(set! (password-tmp-file conn) tmp-file))))) (set! (password-tmp-file conn) tmp-file)))))
(define-method (build-command (conn <sudo-connection>) (prog-name <string>) (prog-args <list>) (options <list>)) (define-method (build-command (conn <sudo-connection>) (prog-name <string>) (prog-args <list>) (options <list>))
@ -46,4 +63,4 @@
(define-method (teardown (conn <sudo-connection>)) (define-method (teardown (conn <sudo-connection>))
(when (slot-bound? conn 'password-tmp-file) (when (slot-bound? conn 'password-tmp-file)
(exec conn (format #f "rm -f ~a" (string-shell-quote (password-tmp-file conn)))))) (remote-exec conn (format #f "rm -f ~a" (string-shell-quote (password-tmp-file conn))))))

View file

@ -1,3 +1,20 @@
#|
This file is part of Ordo.
Copyright (C) 2025 Ray Miller
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo context) (define-module (ordo context)
#:use-module (srfi srfi-69)) #:use-module (srfi srfi-69))

View file

@ -1,3 +1,20 @@
#|
This file is part of Ordo.
Copyright (C) 2025 Ray Miller
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo inventory) (define-module (ordo inventory)
#:use-module (ice-9 eval-string) #:use-module (ice-9 eval-string)
#:use-module (ice-9 match) #:use-module (ice-9 match)

View file

@ -1,3 +1,20 @@
#|
This file is part of Ordo.
Copyright (C) 2025 Ray Miller
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo logger) (define-module (ordo logger)
#:use-module (oop goops) #:use-module (oop goops)
#:use-module ((srfi srfi-1) #:select (take-while member)) #:use-module ((srfi srfi-1) #:select (take-while member))

View file

@ -1,3 +1,20 @@
#|
This file is part of Ordo.
Copyright (C) 2025 Ray Miller
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo play) (define-module (ordo play)
#:use-module (oop goops) #:use-module (oop goops)
#:use-module (ordo connection) #:use-module (ordo connection)

View file

@ -1,3 +1,20 @@
#|
This file is part of Ordo.
Copyright (C) 2025 Ray Miller
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo playbook) (define-module (ordo playbook)
#:use-module (ice-9 eval-string) #:use-module (ice-9 eval-string)
#:use-module (ice-9 textual-ports) #:use-module (ice-9 textual-ports)

View file

@ -1,3 +1,20 @@
#|
This file is part of Ordo.
Copyright (C) 2025 Ray Miller
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo util flatten) (define-module (ordo util flatten)
#:export (flatten)) #:export (flatten))

View file

@ -1,3 +1,20 @@
#|
This file is part of Ordo.
Copyright (C) 2025 Ray Miller
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo util keyword-args) (define-module (ordo util keyword-args)
#:use-module (ice-9 exceptions) #:use-module (ice-9 exceptions)
#:export (keyword-arg #:export (keyword-arg

View file

@ -1,3 +1,20 @@
#|
This file is part of Ordo.
Copyright (C) 2025 Ray Miller
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo util read-lines) (define-module (ordo util read-lines)
#:use-module (ice-9 rdelim) #:use-module (ice-9 rdelim)
#:export (read-lines)) #:export (read-lines))

View file

@ -1,21 +1,23 @@
;; This file is part of Ordo. #|
;; This file is part of Ordo.
;; Shell quoting implementation is based on Perl's String::ShellQuote
;; Copyright (c) 1997 Roderick Schertler. Shell quoting implementation is based on Perl's String::ShellQuote
;; Copyright (c) 1997 Roderick Schertler.
;; Guile implementation Copyright (c) 2025 Ray Miller.
;; Guile implementation Copyright (c) 2025 Ray Miller.
;; Ordo is free software: you can redistribute it and/or modify it under
;; the terms of the GNU General Public License as published by the Free This program is free software: you can redistribute it and/or modify it under
;; Software Foundation, either version 3 of the License, or (at your option) the terms of the GNU General Public License as published by the Free
;; any later version. Software Foundation, either version 3 of the License, or (at your option)
;; any later version.
;; Ordo is distributed in the hope that it will be useful, but WITHOUT ANY
;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR This program is distributed in the hope that it will be useful, but WITHOUT ANY
;; A PARTICULAR PURPOSE. See the GNU General Public License for more details. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
;; A PARTICULAR PURPOSE. See the GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License along with
;; Ordo. If not, see <https://www.gnu.org/licenses/>. You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|#
(define-module (ordo util shell-quote) (define-module (ordo util shell-quote)
#:use-module (rx irregex) #:use-module (rx irregex)