summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-07-01 16:41:20 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2021-07-02 14:49:13 +0200
commitd05a8836f29d41ec4a423d4f44dcbb93a8bdd759 (patch)
treeb41b0f76b9ee4b9a9e7a415fcde3b967b89db7a2 /guix
parente0e3bbbe6d78fc7a7f54325471af5d0e5c498471 (diff)
Switch to AGPL
Diffstat (limited to 'guix')
-rw-r--r--guix/vkraus/packages/webid-oidc.scm49
-rw-r--r--guix/vkraus/services/webid-oidc.scm46
-rw-r--r--guix/vkraus/systems/webid-oidc.scm80
3 files changed, 85 insertions, 90 deletions
diff --git a/guix/vkraus/packages/webid-oidc.scm b/guix/vkraus/packages/webid-oidc.scm
index f5f95c7..0fd3146 100644
--- a/guix/vkraus/packages/webid-oidc.scm
+++ b/guix/vkraus/packages/webid-oidc.scm
@@ -1,3 +1,19 @@
+;; webid-oidc, implementation of the Solid specification
+;; Copyright (C) 2020, 2021 Vivien Kraus
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU Affero General Public License as
+;; published by the Free Software Foundation, either version 3 of the
+;; License, or (at your option) any later version.
+
+;; 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 Affero General Public License for more details.
+
+;; You should have received a copy of the GNU Affero General Public License
+;; along with this program. If not, see <https://www.gnu.org/licenses/>.
+
(define-module (vkraus packages webid-oidc)
#:use-module (guix packages)
#:use-module (guix gexp)
@@ -106,7 +122,7 @@
(synopsis "")
(description "")
(home-page "https://labo.planete-kraus.eu/webid-oidc.git")
- (license license:gpl3+)
+ (license license:agpl3+)
(native-search-paths
(list (search-path-specification
(variable "LTDL_LIBRARY_PATH")
@@ -135,7 +151,10 @@
(inherit webid-oidc)
(name "webid-oidc-html")
(arguments
- '(#:phases
+ '(#:modules ((guix build utils)
+ (guix build gnu-build-system)
+ (ice-9 textual-ports))
+ #:phases
(modify-phases
%standard-phases
(add-after
@@ -146,17 +165,37 @@
`("-j" ,(number->string (parallel-job-count)))
'())
,@make-flags))))
+ (add-after
+ 'build-html 'complete-corresponding-source
+ (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
+ (apply invoke "make" "dist"
+ `(,@(if parallel-build?
+ `("-j" ,(number->string (parallel-job-count)))
+ '())
+ ,@make-flags))))
(replace
'install
- (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
+ (lambda* (#:key make-flags parallel-build? outputs #:allow-other-keys)
(apply invoke "make" "install-html"
`(,@(if parallel-build?
`("-j" ,(number->string (parallel-job-count)))
'())
- ,@make-flags)))))))
+ ,@make-flags))
+ (let ((version
+ (car
+ (string-split
+ (call-with-input-file ".tarball-version"
+ get-string-all)
+ #\newline))))
+ (copy-file (string-append
+ "webid-oidc-" version ".tar.gz")
+ (string-append
+ (assoc-ref outputs "out")
+ "/share/doc/webid-oidc/webid-oidc.html/complete-corresponding-source.tar.gz"))))))))
(synopsis "HTML documentation for webid-oidc")
(description "The manual for webid-oidc is provided as a texinfo
-file, which is exported to HTML.")))
+file, which is exported to HTML. Also include the complete
+corresponding source, as an AGPL requirement.")))
(define-public (make-website webid-oidc)
(file-append (webid-oidc-htmlize webid-oidc) "/share/doc/webid-oidc/webid-oidc.html"))
diff --git a/guix/vkraus/services/webid-oidc.scm b/guix/vkraus/services/webid-oidc.scm
index 984eced..641c700 100644
--- a/guix/vkraus/services/webid-oidc.scm
+++ b/guix/vkraus/services/webid-oidc.scm
@@ -1,3 +1,19 @@
+;; webid-oidc, implementation of the Solid specification
+;; Copyright (C) 2020, 2021 Vivien Kraus
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU Affero General Public License as
+;; published by the Free Software Foundation, either version 3 of the
+;; License, or (at your option) any later version.
+
+;; 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 Affero General Public License for more details.
+
+;; You should have received a copy of the GNU Affero General Public License
+;; along with this program. If not, see <https://www.gnu.org/licenses/>.
+
(define-module (vkraus services webid-oidc)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
@@ -16,6 +32,8 @@
webid-oidc-issuer-configuration?
(webid-oidc webid-oidc-issuer-configuration-webid-oidc
(default webid-oidc))
+ (complete-corresponding-source
+ webid-oidc-issuer-configuration-complete-corresponding-source)
(issuer webid-oidc-issuer-configuration-issuer)
(key-file webid-oidc-issuer-configuration-key-file
(default "/var/lib/webid-oidc/issuer/key.jwk"))
@@ -37,6 +55,8 @@
webid-oidc-reverse-proxy-configuration?
(webid-oidc webid-oidc-reverse-proxy-configuration-webid-oidc
(default webid-oidc))
+ (complete-corresponding-source
+ webid-oidc-reverse-proxy-configuration-complete-corresponding-source)
(port webid-oidc-reverse-proxy-port (default 8090))
(inbound-uri webid-oidc-reverse-proxy-configuration-inbound-uri)
(outbound-uri webid-oidc-reverse-proxy-configuration-outbound-uri)
@@ -52,6 +72,8 @@
webid-oidc-hello-configuration?
(webid-oidc webid-oidc-hello-configuration-webid-oidc
(default webid-oidc))
+ (complete-corresponding-source
+ webid-oidc-hello-configuration-complete-corresponding-source)
(port webid-oidc-hello-configuration-port (default 8089))
(extra-options
webid-oidc-hello-configuration-extra-options
@@ -63,6 +85,8 @@
webid-oidc-client-service-configuration?
(webid-oidc webid-oidc-client-service-configuration-webid-oidc
(default webid-oidc))
+ (complete-corresponding-source
+ webid-oidc-client-service-configuration-complete-corresponding-source)
(client-id webid-oidc-client-service-configuration-client-id)
(redirect-uri webid-oidc-client-service-configuration-redirect-uri)
(client-name webid-oidc-client-service-configuration-client-name (default "Example Solid App"))
@@ -78,6 +102,8 @@
webid-oidc-server-configuration?
(webid-oidc webid-oidc-server-configuration-webid-oidc
(default webid-oidc))
+ (complete-corresponding-source
+ webid-oidc-server-configuration-complete-corresponding-source)
(server-name webid-oidc-server-configuration-server-name)
(key-file webid-oidc-server-configuration-key-file
(default "/var/lib/webid-oidc/server/key.jwk"))
@@ -98,6 +124,7 @@
make-webid-oidc-issuer-configuration
webid-oidc-issuer-configuration?
webid-oidc-issuer-configuration-webid-oidc
+ webid-oidc-issuer-configuration-complete-corresponding-source
webid-oidc-issuer-configuration-issuer
webid-oidc-issuer-configuration-key-file
webid-oidc-issuer-configuration-subject
@@ -112,6 +139,7 @@
make-webid-oidc-reverse-proxy-configuration
webid-oidc-reverse-proxy-configuration?
webid-oidc-reverse-proxy-configuration-webid-oidc
+ webid-oidc-reverse-proxy-configuration-complete-corresponding-source
webid-oidc-reverse-proxy-configuration-port
webid-oidc-reverse-proxy-configuration-inbound-uri
webid-oidc-reverse-proxy-configuration-outbound-uri
@@ -122,6 +150,7 @@
make-webid-oidc-hello-configuration
webid-oidc-hello-configuration?
webid-oidc-hello-configuration-webid-oidc
+ webid-oidc-hello-configuration-complete-corresponding-source
webid-oidc-hello-configuration-port
webid-oidc-hello-configuration-extra-options
<webid-oidc-client-service-configuration>
@@ -129,6 +158,7 @@
make-webid-oidc-client-service-configuration
webid-oidc-client-service-configuration?
webid-oidc-client-service-configuration-webid-oidc
+ webid-oidc-client-service-configuration-complete-corresponding-source
webid-oidc-client-service-configuration-client-id
webid-oidc-client-service-configuration-redirect-uri
webid-oidc-client-service-configuration-client-name
@@ -140,6 +170,7 @@
make-webid-oidc-server-configuration
webid-oidc-server-configuration?
webid-oidc-server-configuration-webid-oidc
+ webid-oidc-server-configuration-complete-corresponding-source
webid-oidc-server-configuration-server-name
webid-oidc-server-configuration-key-file
webid-oidc-server-configuration-subject
@@ -153,7 +184,7 @@
(define webid-oidc-issuer-shepherd-service
(match-lambda
(($ <webid-oidc-issuer-configuration>
- webid-oidc issuer key-file subject password jwks-uri
+ webid-oidc ccs issuer key-file subject password jwks-uri
authorization-endpoint-uri token-endpoint-uri port
extra-options)
(with-imported-modules
@@ -181,6 +212,7 @@
(list
(string-append #$webid-oidc "/bin/webid-oidc")
"identity-provider"
+ "--complete-corresponding-source" #$ccs
"--server-name" #$issuer
"--key-file" #$key-file
"--subject" #$subject
@@ -204,7 +236,7 @@
(define webid-oidc-reverse-proxy-shepherd-service
(match-lambda
(($ <webid-oidc-reverse-proxy-configuration>
- webid-oidc port inbound-uri outbound-uri header
+ webid-oidc ccs port inbound-uri outbound-uri header
extra-options)
(with-imported-modules
(source-module-closure
@@ -231,6 +263,7 @@
(list
(string-append #$webid-oidc "/bin/webid-oidc")
"reverse-proxy"
+ "--complete-corresponding-source" #$ccs
"--port" (with-output-to-string (lambda () (display #$port)))
"--server-name" #$inbound-uri
"--backend-uri" #$outbound-uri
@@ -250,7 +283,7 @@
(define webid-oidc-hello-shepherd-service
(match-lambda
(($ <webid-oidc-hello-configuration>
- webid-oidc port extra-options)
+ webid-oidc ccs port extra-options)
(with-imported-modules
(source-module-closure
'((gnu build shepherd)
@@ -275,6 +308,7 @@
(make-forkexec-constructor
(list
(string-append #$webid-oidc "/bin/webid-oidc-hello")
+ "--complete-corresponding-source" #$ccs
"--port" (with-output-to-string (lambda () (display #$port)))
#$@extra-options)
#:user "webid-oidc"
@@ -289,7 +323,7 @@
(define webid-oidc-client-service-shepherd-service
(match-lambda
(($ <webid-oidc-client-service-configuration>
- webid-oidc client-id redirect-uri client-name client-uri port
+ webid-oidc ccs client-id redirect-uri client-name client-uri port
extra-options)
(with-imported-modules
(source-module-closure
@@ -314,6 +348,7 @@
(list
(string-append #$webid-oidc "/bin/webid-oidc")
"client-service"
+ "--complete-corresponding-source" #$ccs
"--client-id" #$client-id
"--redirect-uri" #$redirect-uri
"--client-name" #$client-name
@@ -332,7 +367,7 @@
(define webid-oidc-server-shepherd-service
(match-lambda
(($ <webid-oidc-server-configuration>
- webid-oidc server-name key-file subject password jwks-uri
+ webid-oidc ccs server-name key-file subject password jwks-uri
authorization-endpoint-uri token-endpoint-uri port
extra-options)
(with-imported-modules
@@ -360,6 +395,7 @@
(list
(string-append #$webid-oidc "/bin/webid-oidc")
"server"
+ "--complete-corresponding-source" #$ccs
"--server-name" #$server-name
"--key-file" #$key-file
"--subject" #$subject
diff --git a/guix/vkraus/systems/webid-oidc.scm b/guix/vkraus/systems/webid-oidc.scm
deleted file mode 100644
index 704c746..0000000
--- a/guix/vkraus/systems/webid-oidc.scm
+++ /dev/null
@@ -1,80 +0,0 @@
-(define-module (vkraus systems webid-oidc)
- #:use-module (gnu)
- #:use-module (guix)
- #:use-module (guix packages)
- #:use-module (guix download)
- #:use-module (vkraus services webid-oidc)
- #:use-module (vkraus packages webid-oidc)
- #:use-module (gnu services web))
-
-(operating-system
- (locale "fr_FR.utf8")
- (timezone "Europe/Paris")
- (keyboard-layout (keyboard-layout "fr"))
- (host-name "webid-oidc-issuer")
- (users %base-user-accounts)
- (packages
- (append
- (list (specification->package "nss-certs"))
- %base-packages))
- (services
- (append
- (cons*
- (service webid-oidc-issuer-service-type
- (webid-oidc-issuer-configuration
- (webid-oidc webid-oidc-snapshot)
- (issuer "http://localhost:8080")
- (subject "http://localhost:8080/profile/card#me")
- (password "p4ssw0rd")
- (jwks-uri "http://localhost:8080/keys")
- (authorization-endpoint-uri "http://localhost:8080/authorize")
- (token-endpoint-uri "http://localhost:8080/token")
- (port 8080)))
- (service webid-oidc-hello-service-type
- (webid-oidc-hello-configuration
- (webid-oidc webid-oidc-snapshot)
- (port 8081)))
- (service nginx-service-type
- (nginx-configuration
- (upstream-blocks
- (list
- (nginx-upstream-configuration
- (name "issuer")
- (servers (list "localhost:8080")))
- (nginx-upstream-configuration
- (name "server")
- (servers (list "localhost:8081")))))
- (server-blocks
- (list
- (nginx-server-configuration
- (server-name '("localhost"))
- (listen '("80"))
- (locations
- (list
- (nginx-location-configuration
- (uri "/profile/card")
- (body (list "proxy_pass http://issuer;")))
- (nginx-location-configuration
- (uri "/keys")
- (body (list "proxy_pass http://issuer;")))
- (nginx-location-configuration
- (uri "/authorize")
- (body (list "proxy_pass http://issuer;")))
- (nginx-location-configuration
- (uri "/token")
- (body (list "proxy_pass http://issuer;")))
- (nginx-location-configuration
- (uri "/")
- (body (list "proxy_pass http://server;"))))))))))
- %base-services)))
- (bootloader
- (bootloader-configuration
- (bootloader grub-efi-bootloader)
- (target "/boot/efi")
- (keyboard-layout keyboard-layout)))
- (file-systems
- (cons* (file-system
- (mount-point "/")
- (device "/dev/sda")
- (type "ext4"))
- %base-file-systems)))