projects/guix·blob java-team · refs

1995 lines · 69.6 KiB

1#!/bin/sh
2# -*- mode: scheme; -*-
3# Extra care is taken here to ensure this script can run in most environments,
4# since it is invoked by 'git send-email'.
5pre_inst_env_maybe=
6command -v guix > /dev/null || pre_inst_env_maybe=./pre-inst-env
7exec $pre_inst_env_maybe guix repl -- "$0" "$@"
8!#
9
10;;; GNU Guix --- Functional package management for GNU
11;;; Copyright © 2022-2024 Ricardo Wurmus <[email protected]>
12;;; Copyright © 2022 Mathieu Othacehe <[email protected]>
13;;; Copyright © 2022, 2023, 2025 Maxim Cournoyer <[email protected]>
14;;; Copyright © 2022 Simon Tournier <[email protected]>
15;;; Copyright © 2025 Jelle Licht <[email protected]>
16;;; Copyright © 2025 Cayetano Santos <[email protected]>
17;;; Copyright © 2025-2026 Ludovic Courtès <[email protected]>
18;;; Copyright © 2025 jgart <[email protected]>
19;;; Copyright © 2026 Denis 'GNUtoo' Carikli <[email protected]>
20;;;
21;;; This file is part of GNU Guix.
22;;;
23;;; GNU Guix is free software; you can redistribute it and/or modify it
24;;; under the terms of the GNU General Public License as published by
25;;; the Free Software Foundation; either version 3 of the License, or (at
26;;; your option) any later version.
27;;;
28;;; GNU Guix is distributed in the hope that it will be useful, but
29;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31;;; GNU General Public License for more details.
32;;;
33;;; You should have received a copy of the GNU General Public License
34;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35
36;;; Commentary:
37
38;; This code defines development teams and team members, as well as their
39;; scope.
40
41;;; Code:
42
43(define-module (teams)
44 #:use-module (srfi srfi-1)
45 #:use-module (srfi srfi-9)
46 #:use-module (srfi srfi-26)
47 #:use-module (srfi srfi-34)
48 #:use-module (srfi srfi-35)
49 #:use-module (srfi srfi-71)
50 #:use-module (ice-9 format)
51 #:use-module (ice-9 regex)
52 #:use-module (ice-9 match)
53 #:use-module (ice-9 rdelim)
54 #:use-module (guix ui)
55 #:use-module (git)
56 #:use-module (json)
57 #:use-module (web client)
58 #:use-module (web request)
59 #:use-module (web response)
60 #:use-module (rnrs bytevectors)
61 #:use-module (guix base64))
62
63(define-record-type <regexp*>
64 (%make-regexp* pat flag rx)
65 regexp*?
66 (pat regexp*-pattern)
67 (flag regexp*-flag)
68 (rx regexp*-rx))
69
70;;; Work around regexp implementation.
71;;; This record allows to track the regexp pattern and then display it.
72(define* (make-regexp* pat #:optional (flag regexp/extended))
73 "Alternative to `make-regexp' producing annotated <regexp*> objects."
74 (%make-regexp* pat flag (make-regexp pat flag)))
75
76(define (regexp*-exec rx* str)
77 "Execute the RX* regexp, a <regexp*> object."
78 (regexp-exec (regexp*-rx rx*) str))
79
80(define-record-type <team>
81 (make-team id name description members scope)
82 team?
83 (id team-id)
84 (name team-name)
85 (description team-description)
86 (members team-members set-team-members!)
87 (scope team-scope))
88
89(define-record-type <person>
90 (make-person name email account)
91 person?
92 (name person-name)
93 (email person-email)
94 (account person-codeberg-account))
95
96(define (person name email account)
97 (make-person name email account))
98
99(define* (team id #:key name description (members '())
100 (scope '()))
101 (make-team id
102 (or name (symbol->string id))
103 description
104 members
105 scope))
106
107(define %teams
108 (make-hash-table))
109
110(define-syntax define-team
111 (lambda (x)
112 (syntax-case x ()
113 ((_ id value)
114 #`(begin
115 (define-public id value)
116 (hash-set! %teams 'id id))))))
117
118(define-syntax-rule (define-member person teams ...)
119 (let ((p person))
120 (for-each (lambda (team-id)
121 (let ((team
122 (hash-ref %teams team-id
123 (lambda ()
124 (error (format #false
125 "Unknown team ~a for ~a~%"
126 team-id p))))))
127 (set-team-members!
128 team (cons p (team-members team)))))
129 (quote (teams ...)))))
130
131
132;;;
133;;; Forgejo support.
134;;;
135
136(define-json-mapping <forgejo-validation-error>
137 forgejo-validation-error forgejo-validation-error?
138 json->forgejo-validation-error
139 (message forgejo-validation-error-message)
140 (url forgejo-validation-error-url))
141
142;; Forgejo team. This corresponds to both the 'Team' and 'CreateTeamOption'
143;; structures in Forgejo.
144(define-json-mapping <forgejo-team>
145 forgejo-team forgejo-team?
146 json->forgejo-team <=> forgejo-team->json
147 (name forgejo-team-name)
148 (id forgejo-team-id) ;integer | *unspecified*
149 (description forgejo-team-description)
150 (all-repositories? forgejo-team-all-repositories?
151 "includes_all_repositories")
152 (can-create-org-repository? forgejo-team-can-create-org-repository?
153 "can_create_org_repo")
154 (permission forgejo-team-permission
155 "permission" string->symbol symbol->string)
156 ;; A 'units' field exists but is deprecated in favor of 'units_map'.
157 (unit-map forgejo-team-unit-map
158 "units_map" json->unit-map unit-map->json))
159
160(define (unit-map->json lst)
161 (map (match-lambda
162 ((unit . permission)
163 (cons unit (symbol->string permission))))
164 lst))
165
166(define (json->unit-map lst)
167 (map (match-lambda
168 ((unit . permission)
169 (cons unit (string->symbol permission))))
170 lst))
171
172(define %default-forgejo-team-units
173 '("repo.code" "repo.issues" "repo.pulls" "repo.releases"
174 "repo.wiki" "repo.ext_wiki" "repo.ext_issues" "repo.projects"
175 "repo.packages" "repo.actions"))
176
177(define %default-forgejo-team-unit-map
178 ;; Everything (including "repo.code") is read-only by default, except a few
179 ;; units.
180 (map (match-lambda
181 ("repo.pulls" (cons "repo.pulls" 'write))
182 ("repo.issues" (cons "repo.issues" 'write))
183 ("repo.wiki" (cons "repo.wiki" 'write))
184 (unit (cons unit 'read)))
185 %default-forgejo-team-units))
186
187;; Forgejo user, as returned by 'forgejo-team-members'.
188(define-json-mapping <forgejo-user>
189 forgejo-user forgejo-user?
190 json->forgejo-user <=> forgejo-user->json
191 (id forgejo-user-id) ;integer
192 (active? forgejo-user-active? "active") ;boolean
193 (login forgejo-user-login) ;string
194 (full-name forgejo-user-full-name "full_name") ;string
195 ;; Various fields omitted.
196 )
197
198(define (forgejo-http-headers token)
199 "Return the HTTP headers for basic authorization with TOKEN."
200 `((content-type . (application/json (charset . "UTF-8")))
201 ;; The "Auth Basic" scheme needs a base64-encoded colon-separated user and
202 ;; token values. Forgejo doesn't seem to care for the user part but the
203 ;; colon seems to be necessary for the token value to get extracted.
204 (authorization . (basic . ,(base64-encode
205 (string->utf8
206 (string-append ":" token)))))))
207
208;; Error with a Forgejo request.
209(define-condition-type &forgejo-error &error
210 forgejo-error?
211 (url forgejo-error-url)
212 (method forgejo-error-method)
213 (response forgejo-error-response)
214 (api-error forgejo-error-api-error))
215
216(define %codeberg-organization
217 ;; Name of the organization at codeberg.org.
218 "guix")
219
220(define* (codeberg-url items #:key (parameters '()))
221 "Construct a Codeberg API URL with the path components ITEMS and query
222PARAMETERS."
223 (define query
224 (match parameters
225 (() "")
226 (((keys . values) ...)
227 (string-append "?" (string-join
228 (map (lambda (key value)
229 (string-append key "=" value)) ;XXX: hackish
230 keys values)
231 "&")))))
232
233 (string-append "https://codeberg.org/api/v1/"
234 (string-join items "/")
235 query))
236
237(define-syntax process-url-components
238 (syntax-rules (&)
239 "Helper macro to construct a Codeberg URL."
240 ((_ components ... & parameters)
241 (codeberg-url (list components ...)
242 #:parameters parameters))
243 ((_ components ...)
244 (codeberg-url (list components ...)))))
245
246(define-syntax define-forgejo-request
247 (syntax-rules (=>)
248 "Define a procedure that performs a Forgejo request."
249 ((_ (proc parameters ...)
250 docstring
251 (verb components ...)
252 body
253 => code
254 deserialize)
255 (define (proc token parameters ...)
256 docstring
257 (let* ((url (process-url-components components ...))
258 (response port (http-request url
259 #:method 'verb
260 #:streaming? #t
261 #:headers (forgejo-http-headers token)
262 #:body body)))
263 (if (= code (response-code response))
264 (let ((value (deserialize port)))
265 (when port (close-port port))
266 value)
267 (let ((error (and (= 422 (response-code response))
268 port
269 (false-if-exception
270 (json->forgejo-validation-error port)))))
271 (when port (close-port port))
272 (raise (condition (&forgejo-error (url url)
273 (method 'verb)
274 (response response)
275 (api-error error)))))))))
276 ((_ (proc parameters ...)
277 docstring
278 (method components ...)
279 => code
280 deserialize)
281 (define-forgejo-request (proc parameters ...)
282 docstring
283 (method components ...)
284 ""
285 => code
286 deserialize))
287 ((_ (proc parameters ...)
288 docstring
289 (method components ...)
290 => code)
291 (define-forgejo-request (proc parameters ...)
292 docstring
293 (method components ...)
294 ""
295 => code
296 (const *unspecified*)))))
297
298;; API documentation at <https://codeberg.org/api/swagger>.
299
300(define-forgejo-request (organization-teams/paginated organization page)
301 "Return the list of teams of ORGANIZATION, for the given PAGE (1-indexed)."
302 (GET "orgs" organization "teams"
303 & `(("page" . ,(number->string page))))
304 => 200
305 (lambda (port)
306 (map json->forgejo-team (vector->list (json->scm port)))))
307
308(define (organization-teams token organization)
309 "Return the list of teams of ORGANIZATION."
310 (let loop ((index 1)
311 (pages '()))
312 (match (organization-teams/paginated token organization index)
313 (()
314 (concatenate (reverse pages)))
315 (lst
316 (loop (+ 1 index)
317 (cons lst pages))))))
318
319(define-forgejo-request (create-team organization team)
320 "Create TEAM, a Forgejo team, under ORGANIZATION."
321 (POST "orgs" organization "teams")
322 (forgejo-team->json team)
323 => 201
324 json->forgejo-team)
325
326(define-forgejo-request (edit-team team)
327 "Update TEAM, a Forgejo team."
328 (PATCH "teams" (number->string (forgejo-team-id team)))
329 (forgejo-team->json team)
330 => 200
331 json->forgejo-team)
332
333(define-forgejo-request (delete-team team)
334 "Delete TEAM, a Forgejo team."
335 (DELETE "teams" (number->string (forgejo-team-id team)))
336 => 204)
337
338(define-forgejo-request (forgejo-team-members team)
339 "Return the list of account names of the members of TEAM, a Forgejo team."
340 (GET "teams" (number->string (forgejo-team-id team)) "members"
341 & '(("limit" . "100"))) ;get up to 100 members
342 => 200
343 (lambda (port)
344 (set-port-encoding! port "UTF-8")
345 (map json->forgejo-user (vector->list (json->scm port)))))
346
347(define-forgejo-request (add-team-member team user)
348 "Add USER (a string) to TEAM, a Forgejo team."
349 (PUT "teams" (number->string (forgejo-team-id team))
350 "members" user)
351 => 204)
352
353(define-forgejo-request (remove-team-member team user)
354 "Remove USER (a string) from TEAM, a Forgejo team."
355 (DELETE "teams" (number->string (forgejo-team-id team))
356 "members" user)
357 => 204)
358
359(define-forgejo-request (repository-teams owner repository)
360 "Return the list of teams assigned to REPOSITORY of OWNER."
361 (GET "repos" owner repository "teams"
362 & '(("limit" . "100"))) ;get up to 100 teams
363 => 200
364 (lambda (port)
365 (map json->forgejo-team (vector->list (json->scm port)))))
366
367(define-forgejo-request (add-repository-team owner repository team-name)
368 "Add TEAM-NAME as a team of OWNER's REPOSITORY."
369 (PUT "repos" owner repository "teams" team-name)
370 => 204)
371
372(define (team->forgejo-team team)
373 "Return a Forgejo team derived from TEAM, a <team> record."
374 (forgejo-team (team-id->forgejo-id (team-id team))
375 *unspecified* ;no numeric ID initially
376 (or (team-description team) "")
377 #f ;all-repositories?
378 #f ;can-create-org-repository?
379 'read ;permission
380 %default-forgejo-team-unit-map))
381
382(define* (update-team token forgejo-team team
383 #:key (log-port (current-error-port)))
384 "Update FORGEJO-TEAM on the server so that it matches TEAM."
385 (format log-port "updating team '~a'~%"
386 (forgejo-team-name forgejo-team))
387
388 ;; Update metadata: description, permissions, etc.
389 (edit-team token forgejo-team)
390
391 ;; Update the list of members so it matches those of TEAM.
392 (let* ((current (map forgejo-user-login
393 (forgejo-team-members token forgejo-team)))
394 (target (filter-map person-codeberg-account
395 (team-members team)))
396 (to-add (lset-difference string=? target current))
397 (to-remove (lset-difference string=? current target)))
398 (for-each (lambda (user)
399 (format log-port "adding '~a' to team '~a'~%"
400 user (forgejo-team-name forgejo-team))
401 (add-team-member token forgejo-team user))
402 to-add)
403 (for-each (lambda (user)
404 (format log-port "removing '~a' from team '~a'~%"
405 user (forgejo-team-name forgejo-team))
406 (remove-team-member token forgejo-team user))
407 to-remove)))
408
409(define* (synchronize-team token team
410 #:key
411 (current-teams
412 (organization-teams token
413 %codeberg-organization))
414 (log-port (current-error-port)))
415 "Synchronize TEAM, a <team> record, so that its metadata and list of members
416are accurate on Codeberg, either by creating it or by updating it if it
417already exists. Lookup team IDs among CURRENT-TEAMS."
418 (let ((forgejo-team
419 (find (let ((name (team-id->forgejo-id (team-id team))))
420 (lambda (candidate)
421 (string=? (forgejo-team-name candidate) name)))
422 current-teams)))
423 (if forgejo-team
424 (update-team token forgejo-team team
425 #:log-port log-port)
426 (let ((forgejo-team
427 (create-team token %codeberg-organization
428 (or forgejo-team
429 (team->forgejo-team team)))))
430 (format log-port "created team '~a'~%"
431 (forgejo-team-name forgejo-team))
432 (let ((members (filter-map person-codeberg-account
433 (team-members team))))
434 (for-each (lambda (member)
435 (add-team-member token forgejo-team member))
436 members)
437 (format log-port "added ~a members to team '~a'~%"
438 (length members)
439 (forgejo-team-name forgejo-team))
440 forgejo-team)))))
441
442(define (synchronize-teams token)
443 "Push all the existing teams on Codeberg."
444 (let ((teams (sort-teams
445 (hash-map->list (lambda (_ value) value) %teams))))
446 (format (current-error-port)
447 "creating ~a teams in the '~a' organization at Codeberg...~%"
448 (length teams) %codeberg-organization)
449
450 ;; Arrange to compute the list of existing teams once and for all.
451 (for-each (let ((teams (organization-teams token
452 %codeberg-organization)))
453 (lambda (team)
454 (synchronize-team token team
455 #:current-teams teams)))
456 teams)
457
458 ;; Ensure all the teams are associated with the main repository.
459 (let ((repository-teams (repository-teams token
460 %codeberg-organization
461 "guix")))
462 (for-each (lambda (missing)
463 (format (current-error-port)
464 "adding team '~a' to '~a/guix'~%"
465 (team-id missing) %codeberg-organization)
466 (add-repository-team token %codeberg-organization "guix"
467 (team-id->forgejo-id
468 (team-id missing))))
469 (let ((names (map forgejo-team-name repository-teams)))
470 (remove (lambda (team)
471 (member (team-id->forgejo-id (team-id team))
472 names))
473 teams))))))
474
475
476
477(define-team ai
478 (team 'ai
479 #:name "Artificial Intelligence"
480 #:description "Packages related to AI, ML and LLM."
481 #:scope (list "gnu/packages/machine-learning.scm")))
482
483(define-team audio
484 (team 'audio
485 #:name "Audio team"
486 #:description "Audio related packages."
487 #:scope (list "gnu/packages/audio.scm"
488 "gnu/packages/fluidplug.scm"
489 "gnu/packages/music.scm"
490 "gnu/packages/xiph.scm")))
491
492(define-team beam
493 (team 'beam
494 #:name "Erlang/Elixir/BEAM team"
495 #:description "The virtual machine at the core of the Erlang Open
496Telecom Platform (OTP), Erlang and Elxir languages and packages, development
497of Rebar and Mix build systems and Hex.pm importer."
498 #:scope (list (make-regexp* "^gnu/packages/elixir(-.+|)\\.scm$")
499 "guix/build/mix-build-system.scm"
500 "guix/build-system/mix.scm"
501 (make-regexp* "^gnu/packages/erlang(-.+|)\\.scm$")
502 "guix/build/rebar-build-system.scm"
503 "guix/build-system/rebar.scm"
504 "guix/import/hexpm.scm"
505 "guix/scripts/import/hexpm.scm")))
506
507(define-team bioinformatics
508 (team 'bioinformatics
509 #:name "Bioinformatics team"
510 #:scope (list "gnu/packages/bioinformatics.scm")))
511
512(define-team bootstrap
513 (team 'bootstrap
514 #:name "Bootstrap"
515 #:description "Full-source bootstrap: stage0, Mes, Gash, etc."
516 #:scope (list "gnu/packages/bootstrap.scm"
517 "gnu/packages/commencement.scm"
518 "gnu/packages/mes.scm")))
519
520(define-team build-tools
521 (team 'build-tools
522 #:name "Build tools team"
523 #:description "Build tools and parser generators."
524 #:scope (list "gnu/packages/assembly.scm"
525 "gnu/packages/autogen.scm"
526 "gnu/packages/autotools.scm"
527 "gnu/packages/bison.scm"
528 "gnu/packages/compiler-tools.scm"
529 "gnu/packages/m4.scm"
530 "gnu/packages/oyacc.scm"
531 "gnu/packages/re2c.scm")))
532
533(define-team c++
534 (team 'c++
535 #:name "C/C++ team"
536 #:description
537 "C and C++ libraries and tools."
538 #:scope (list "gnu/build-system/cmake.scm"
539 "gnu/build/cmake-build-system.scm"
540 "gnu/packages/c.scm"
541 "gnu/packages/cmake.scm"
542 "gnu/packages/cpp.scm"
543 "gnu/packages/ninja.scm"
544 "gnu/packages/valgrind.scm")))
545
546(define-team codeberg
547 (team 'codeberg
548 #:name "Codeberg Project Owners"
549 #:description
550 "Hackers with Owner status on our Codeberg Organization"))
551
552(define-team community
553 (team 'community
554 #:name "Community"
555 #:description
556 "We focus on collaboration, project growth and future (social)
557challenges"))
558
559(define-team maintainers
560 (team 'maintainers
561 #:name "Maintainers"
562 #:description
563 "Looking after project policies, commit access and code of conduct
564reports."))
565
566(define-team core
567 (team 'core
568 #:name "Core / Tools / Internals"
569 #:scope
570 (list "etc/teams.scm"
571 "guix/avahi.scm"
572 "guix/base16.scm"
573 "guix/base32.scm"
574 "guix/base64.scm"
575 "guix/bzr-download.scm"
576 "guix/cache.scm"
577 "guix/channels.scm"
578 "guix/ci.scm"
579 "guix/colors.scm"
580 "guix/combinators.scm"
581 "guix/config.scm"
582 "guix/cpio.scm"
583 "guix/cpu.scm"
584 "guix/cve.scm"
585 "guix/cvs-download.scm"
586 "guix/deprecation.scm"
587 "guix/derivations.scm"
588 "guix/describe.scm"
589 "guix/diagnostics.scm"
590 "guix/discovery.scm"
591 "guix/docker.scm"
592 "guix/download.scm"
593 "guix/elf.scm"
594 "guix/fossil-download.scm"
595 "guix/ftp-client.scm"
596 "guix/gexp.scm"
597 "guix/git-authenticate.scm"
598 "guix/git-download.scm"
599 "guix/git.scm"
600 "guix/glob.scm"
601 "guix/gnu-maintenance.scm"
602 "guix/gnupg.scm"
603 "guix/grafts.scm"
604 "guix/graph.scm"
605 "guix/hash.scm"
606 "guix/hg-download.scm"
607 "guix/http-client.scm"
608 "guix/i18n.scm"
609 "guix/inferior.scm"
610 "guix/ipfs.scm"
611 "guix/least-authority.scm"
612 "guix/licenses.scm"
613 "guix/lint.scm"
614 "guix/man-db.scm"
615 "guix/memoization.scm"
616 "guix/modules.scm"
617 "guix/monad-repl.scm"
618 "guix/monads.scm"
619 "guix/narinfo.scm"
620 "guix/nar.scm"
621 "guix/openpgp.scm"
622 "guix/packages.scm"
623 "guix/pki.scm"
624 "guix/platform.scm"
625 "guix/profiles.scm"
626 "guix/profiling.scm"
627 "guix/progress.scm"
628 "guix/quirks.scm"
629 "guix/read-print.scm"
630 "guix/records.scm"
631 "guix/remote.scm"
632 "guix/remote-procedures.scm"
633 "guix/repl.scm"
634 "guix/search-paths.scm"
635 "guix/self.scm"
636 "guix/serialization.scm"
637 "guix/sets.scm"
638 "guix/ssh.scm"
639 "guix/status.scm"
640 "guix/store.scm"
641 "guix/substitutes.scm"
642 "guix/svn-download.scm"
643 "guix/swh.scm"
644 "guix/tests.scm"
645 "guix/transformations.scm"
646 "guix/ui.scm"
647 "guix/upstream.scm"
648 "guix/utils.scm"
649 "guix/workers.scm"
650 (make-regexp* "^guix/platforms/")
651 (make-regexp* "^guix/scripts/")
652 (make-regexp* "^guix/store/")
653 (make-regexp* "^nix/"))))
654
655(define-team core-packages
656 (team 'core-packages
657 #:name "Core packages"
658 #:description "Core packages: the GNU tool chain, Guile, Coreutils, etc."
659 #:scope (list "gnu/packages/base.scm"
660 "gnu/packages/bootstrap.scm"
661 "gnu/packages/commencement.scm"
662 "gnu/packages/cross-base.scm"
663 "gnu/packages/gcc.scm"
664 "gnu/packages/guile.scm"
665 "gnu/packages/ld-wrapper.in"
666 "gnu/packages/make-bootstrap.scm"
667 "gnu/packages/multiprecision.scm"
668 "guix/build/gnu-build-system.scm"
669 "guix/build/utils.scm"
670 "guix/build-system/gnu.scm")))
671
672(define-team debian
673 (team 'debian
674 #:name "Debian team"
675 #:description
676 "Packages related to Debian and Debian derivatives."
677 #:scope (list "gnu/packages/debian.scm")))
678
679(define-team documentation
680 (team 'documentation
681 #:name "Documentation"
682 #:description "Documentation: the manual and cookbook."
683 #:scope (list (make-regexp* "\\.texi$")
684 "doc/build.scm"
685 "gnu/system/examples/bare-bones.tmpl"
686 "gnu/system/examples/lightweight-desktop.tmpl"
687 "gnu/system/examples/desktop.tmpl")))
688
689(define-team dotnet
690 (team 'dotnet
691 #:name ".NET"
692 #:description ".NET programming environment."
693 #:scope (list "gnu/packages/dotnet.scm")))
694
695(define-team electronics
696 (team 'electronics
697 #:name "Electronics team"
698 #:description "Electronics and hardware related packages."
699 #:scope (list "gnu/packages/electronics.scm"
700 "gnu/packages/hdl.scm"
701 "gnu/packages/libftdi.scm"
702 "gnu/packages/engineering.scm"
703 "gnu/packages/flashing-tools.scm")))
704
705(define-team emacs
706 (team 'emacs
707 #:name "Emacs team"
708 #:description "The extensible, customizable text editor and its
709ecosystem."
710 #:scope (list "gnu/packages/aux-files/emacs/guix-emacs.el"
711 "gnu/packages/aux-files/emacs/comp-integrity.el"
712 (make-regexp* "^gnu/packages/emacs(-.+|)\\.scm$")
713 "gnu/packages/tree-sitter.scm"
714 "guix/build/emacs-build-system.scm"
715 "guix/build/emacs-utils.scm"
716 "guix/build-system/emacs.scm"
717 "guix/import/elpa.scm"
718 "guix/scripts/import/elpa.scm"
719 "tests/import/elpa.scm")))
720
721(define-team embedded
722 (team 'embedded
723 #:name "Embedded"
724 #:scope (list "gnu/packages/bootloaders.scm"
725 "gnu/packages/coreboot.scm"
726 "gnu/packages/embedded.scm"
727 "gnu/packages/firmware.scm")))
728
729(define-team games
730 (team 'games
731 #:name "Games and Toys"
732 #:description "Packaging programs for amusement."
733 #:scope (list "gnu/packages/emulators.scm"
734 "gnu/packages/games.scm"
735 "gnu/packages/game-development.scm"
736 "gnu/packages/luanti.scm"
737 "gnu/packages/esolangs.scm" ; granted, rather niche
738 "gnu/packages/motti.scm"
739 "gnu/services/games.scm"
740 "gnu/tests/games.scm"
741 "guix/build/luanti-build-system.scm")))
742
743(define-team gnome
744 (team 'gnome
745 #:name "Gnome team"
746 #:description
747 "The Gnome desktop environment, along with core technologies such as
748GLib/GIO, GTK, GStreamer and Webkit."
749 #:scope (list (make-regexp* "etc/teams/gnome")
750 "gnu/packages/glib.scm"
751 "gnu/packages/gstreamer.scm"
752 "gnu/packages/gtk.scm"
753 "gnu/packages/gnome.scm"
754 "gnu/packages/gnome-circle.scm"
755 "gnu/packages/gnome-xyz.scm"
756 "gnu/packages/webkit.scm"
757 "gnu/services/desktop.scm"
758 "guix/build/glib-or-gtk-build-system.scm"
759 "guix/build/meson-build-system.scm")))
760
761(define-team go
762 (team 'go
763 #:name "Go team"
764 #:scope (list "gnu/packages/configuration-management.scm"
765 (make-regexp* "gnu/packages/golang(-.+|)\\.scm$")
766 "gnu/packages/syncthing.scm"
767 "gnu/packages/terraform.scm"
768 "guix/build-system/go.scm"
769 "guix/build/go-build-system.scm"
770 "guix/import/go.scm"
771 "guix/scripts/import/go.scm"
772 "tests/import/go.scm")))
773
774(define-team guile
775 (team 'guile
776 #:name "Guile team"
777 #:description
778 "Team for the Guile platform, libraries, and build system."
779 #:scope (list "gnu/packages/guile.scm"
780 "gnu/packages/guile-wm.scm"
781 "gnu/packages/guile-xyz.scm"
782 "guix/build-system/guile.scm"
783 "guix/build/guile-build-system.scm")))
784
785(define-team hare
786 (team 'hare
787 #:name "Hare"
788 #:scope (list "gnu/packages/hare.scm"
789 "gnu/packages/hare-apps.scm"
790 "gnu/packages/hare-xyz.scm"
791 "guix/build-system/hare.scm"
792 "guix/build/hare-build-system.scm")))
793
794(define-team haskell
795 (team 'haskell
796 #:name "Haskell team"
797 #:description
798 "GHC, Hugs, Haskell packages, the \"hackage\" and \"stackage\" importers, and
799the haskell-build-system."
800 #:scope
801 (list "gnu/packages/dhall.scm"
802 ;; Match haskell.scm and haskell-*.scm.
803 (make-regexp* "^gnu/packages/haskell(-.+|)\\.scm$")
804 "gnu/packages/purescript.scm"
805 "guix/build/haskell-build-system.scm"
806 "guix/build-system/haskell.scm"
807 "guix/import/cabal.scm"
808 "guix/import/hackage.scm"
809 "guix/import/stackage.scm"
810 "guix/scripts/import/hackage.scm")))
811
812(define-team home
813 (team 'home
814 #:name "Team for \"Guix Home\""
815 #:scope (list (make-regexp* "^(gnu|guix/scripts)/home(\\.scm$|/)")
816 "tests/guix-home.sh"
817 "tests/home-import.scm"
818 "tests/home-services.scm")))
819
820(define-team hpc
821 (team 'hpc
822 #:name "High-performance computing team"
823 #:description "High-performance computing (HPC) related packages."
824 #:scope (list "gnu/packages/fabric-management.scm"
825 "gnu/packages/mpi.scm"
826 "gnu/packages/oneapi.scm"
827 "gnu/packages/opencl.scm"
828 "gnu/packages/parallel.scm"
829 "gnu/packages/rocm.scm"
830 "gnu/packages/rocm-tools.scm"
831 "gnu/packages/rocm-libs.scm"
832 "gnu/packages/sycl.scm"
833 "gnu/packages/tbb.scm"
834 "gnu/packages/vulkan.scm")))
835
836(define-team hurd
837 (team 'hurd
838 #:name "Team for the Hurd"
839 #:description "GNU Hurd packages and operating system support."
840 #:scope (list "gnu/system/hurd.scm"
841 "gnu/system/images/hurd.scm"
842 "gnu/build/hurd-boot.scm"
843 "gnu/services/hurd.scm"
844 "gnu/packages/hurd.scm")))
845
846(define-team installer
847 (team 'installer
848 #:name "Installer script and system installer"
849 #:scope (list (make-regexp* "^gnu/installer(\\.scm$|/)"))))
850
851(define-team java
852 (team 'java
853 #:name "Java and Maven team"
854 #:description
855 "The JDK and JRE, the Maven build system, Java packages, the ant-build-system,
856and the maven-build-system."
857 #:scope
858 (list "gnu/packages/clojure.scm"
859 ;; Match java.scm and java-*.scm.
860 (make-regexp* "^gnu/packages/java(-.+|)\\.scm$")
861 ;; Match maven.scm and maven-*.scm
862 (make-regexp* "^gnu/packages/maven(-.+|)\\.scm$")
863 "gnu/packages/netbeans.scm"
864 "guix/build/ant-build-system.scm"
865 "guix/build/clojure-build-system.scm"
866 "guix/build/clojure-utils.scm"
867 "guix/build/java-utils.scm"
868 "guix/build/maven-build-system.scm"
869 ;; The maven directory
870 (make-regexp* "^guix/build/maven/")
871 "guix/build-system/ant.scm"
872 "guix/build-system/clojure.scm"
873 "guix/build-system/maven.scm")))
874
875(define-team javascript
876 (team 'javascript
877 #:name "JavaScript team"
878 #:description
879 "JavaScript/Node.js packages, the node build system."
880 #:scope (list "gnu/packages/javascript.scm"
881 "gnu/packages/node-xyz.scm"
882 "gnu/packages/node.scm"
883 "guix/build-system/node.scm"
884 "guix/build/node-build-system.scm"
885 "guix/import/npm-binary.scm"
886 "guix/scripts/import/npm-binary.scm")))
887
888(define-team julia
889 (team 'julia
890 #:name "Julia team"
891 #:description
892 "The Julia language, Julia packages, and the julia-build-system."
893 #:scope (list (make-regexp* "^gnu/packages/julia(-.+|)\\.scm$")
894 "guix/build/julia-build-system.scm"
895 "guix/build-system/julia.scm")))
896
897(define-team kde
898 (team 'kde
899 #:name "KDE team"
900 #:description
901 "The plasma desktop environment, and KDE Applications."
902 #:scope (list (make-regexp* "^gnu/packages/(kde)(-.+|)\\.scm$"))))
903
904(define-team linux-libre
905 (team 'linux-libre
906 #:name "Linux-libre kernel team"
907 #:scope (list "gnu/build/linux-modules.scm"
908 (make-regexp* "^gnu/packages/aux-files/linux-libre.*$")
909 "gnu/packages/linux.scm"
910 "gnu/tests/linux-modules.scm"
911 "guix/build/linux-module-build-system.scm"
912 "guix/build-system/linux-module.scm"
913 "etc/manifests/kernels.scm")))
914
915(define-team lisp
916 (team 'lisp
917 #:name "Lisp team"
918 #:description
919 "Common Lisp and similar languages, Common Lisp packages and the
920asdf-build-system."
921 #:scope (list (make-regexp* "^gnu/packages/lisp(-.+|)\\.scm$")
922 "guix/build/asdf-build-system.scm"
923 "guix/build/lisp-utils.scm"
924 "guix/build-system/asdf.scm")))
925
926(define-team localization
927 (team 'localization
928 #:name "Localization (l10n) team"
929 #:description
930 "Localization of your system to specific languages."
931 #:scope (list "gnu/packages/anthy.scm"
932 "gnu/packages/fcitx5.scm"
933 "gnu/packages/fonts.scm"
934 "gnu/packages/ibus.scm")))
935
936(define-team lua
937 (team 'lua
938 #:name "Lua team"
939 #:description
940 "Lua, Fennel, and related packages."
941 #:scope (list "gnu/packages/lua.scm"
942 "gnu/packages/luanti.scm")))
943
944(define-team lxqt
945 (team 'lxqt
946 #:name "LXQt team"
947 #:description "LXQt desktop environment."
948 #:scope (list "gnu/packages/lxqt.scm")))
949
950(define-team mate
951 (team 'mate
952 #:name "MATE team"
953 #:description "MATE desktop environment"
954 #:scope (list "gnu/packages/mate.scm")))
955
956(define-team mentors
957 (team 'mentors
958 #:name "Mentors"
959 #:description
960 "A group of mentors who chaperone contributions by newcomers."))
961
962(define-team mozilla
963 (team 'mozilla
964 #:name "Mozilla"
965 #:description
966 "Taking care of Icedove and Web Browsers based on Mozilla Thunderbird
967and Firefox."
968 #:scope (list "gnu/build/icecat-extension.scm"
969 "gnu/packages/browser-extensions.scm"
970 "gnu/packages/gnuzilla.scm"
971 "gnu/packages/librewolf.scm"
972 "gnu/packages/tor-browsers.scm")))
973
974(define-team ocaml
975 (team 'ocaml
976 #:name "OCaml and Dune team"
977 #:description
978 "The OCaml language, the Dune build system, OCaml packages, the \"opam\"
979importer, and the ocaml-build-system."
980 #:scope
981 (list "gnu/packages/ocaml.scm"
982 "gnu/packages/coq.scm"
983 "gnu/packages/rocq.scm"
984 "guix/build/ocaml-build-system.scm"
985 "guix/build/dune-build-system.scm"
986 "guix/build-system/ocaml.scm"
987 "guix/build-system/dune.scm"
988 "guix/import/opam.scm"
989 "guix/scripts/import/opam.scm"
990 "tests/import/opam.scm")))
991
992(define-team perl
993 (team 'perl
994 #:name "Perl and Raku team"
995 #:description
996 "Perl & Raku packages, the \"cpan\" importer, and the
997perl-build-system as well as the rakudo-build-system."
998 #:scope
999 (list (make-regexp* "^gnu/packages/perl(-.+|)\\.scm$")
1000 "guix/build/perl-build-system.scm"
1001 "guix/build/rakudo-build-system.scm"
1002 "guix/build-system/perl.scm"
1003 "guix/build-system/rakudo.scm"
1004 "guix/import/cpan.scm"
1005 "guix/scripts/import/cpan.scm")))
1006
1007(define-team python
1008 (team 'python
1009 #:name "Python team"
1010 #:description
1011 "Python, Python packages, the \"pypi\" importer, and the python-build-system."
1012 #:scope
1013 (list (make-regexp* "^gnu/packages/aux-files/python/.*\\.py$")
1014 "gnu/packages/django.scm"
1015 "gnu/packages/jupyter.scm"
1016 (make-regexp* "^gnu/packages/python(-.+|)\\.scm$")
1017 "gnu/packages/sphinx.scm"
1018 "gnu/packages/tryton.scm"
1019 "guix/build-system/pyproject.scm"
1020 "guix/build-system/python.scm"
1021 "guix/build/pyproject-build-system.scm"
1022 "guix/build/python-build-system.scm"
1023 "guix/build/toml.scm" ;temporary, until other build system will use it
1024 "guix/import/pypi.scm"
1025 "guix/scripts/import/pypi.scm"
1026 "tests/import/pypi.scm"
1027 "tests/toml.scm")))
1028
1029(define-team qa-packages
1030 (team 'qa-packages
1031 #:name "Team for quality assurance packages"
1032 #:description
1033 "Quality assurance software (CI/CD, testing, analysis;
1034no direct relation to Guix's QA)."
1035 #:scope (list "gnu/packages/benchmark.scm"
1036 "gnu/packages/check.scm"
1037 "gnu/packages/ci.scm"
1038 "gnu/packages/code.scm"
1039 "gnu/packages/debug.scm"
1040 "gnu/packages/dezyne.scm"
1041 "gnu/packages/libunwind.scm"
1042 "gnu/services/ci.scm"
1043 "gnu/tests/ci.scm")))
1044
1045(define-team qt
1046 (team 'qt
1047 #:name "Qt team"
1048 #:description
1049 "The Qt toolkit/library and the qt-build-system,
1050as well as some packages using Qt."
1051 #:scope (list "gnu/packages/qt.scm"
1052 "guix/build-system/qt.scm"
1053 "guix/build/qt-build-system.scm"
1054 "guix/build/qt-utils.scm")))
1055
1056(define-team r
1057 (team 'r
1058 #:name "R team"
1059 #:description
1060 "The R language, CRAN and Bioconductor repositories, the \"cran\" importer,
1061and the r-build-system."
1062 #:scope (list "gnu/packages/bioconductor.scm"
1063 "gnu/packages/cran.scm"
1064 "guix/build/r-build-system.scm"
1065 "guix/build-system/r.scm"
1066 "guix/import/cran.scm"
1067 "guix/scripts/import/cran.scm"
1068 "tests/import/cran.scm")))
1069
1070(define-team racket
1071 (team 'racket
1072 #:name "Racket team"
1073 #:description
1074 "The Racket language and Racket-based languages, Racket packages,
1075Racket's variant of Chez Scheme, and development of a Racket build system and
1076importer."
1077 #:scope (list "gnu/packages/chez.scm"
1078 "gnu/packages/racket.scm")))
1079
1080(define-team release
1081 (team 'release
1082 #:name "Release team"
1083 #:description
1084 "The current release team. Members are expected to change with each
1085release."
1086 #:scope (list "NEWS"
1087 "etc/manifests/release-minimal.scm"
1088 "etc/manifests/release-desktop.scm")))
1089
1090(define-team reproduciblebuilds
1091 (team 'reproduciblebuilds
1092 #:name "Reproducible Builds team"
1093 #:description
1094 "Reproducible Builds tooling and issues that affect any guix packages."
1095 #:scope (list "gnu/packages/diffoscope.scm")))
1096
1097(define-team ruby
1098 (team 'ruby
1099 #:name "Ruby team"
1100 #:scope (list (make-regexp* "^gnu/packages/(ruby)(-.+|)\\.scm$")
1101 "guix/build/ruby-build-system.scm"
1102 "guix/build-system/ruby.scm"
1103 "guix/import/gem.scm"
1104 "guix/scripts/import/gem.scm"
1105 "tests/import/gem.scm")))
1106
1107(define-team rust
1108 (team 'rust
1109 #:name "Rust"
1110 #:scope (list (make-regexp* "^gnu/packages/(crates|rust)(-.+|)\\.scm$")
1111 "gnu/packages/sequoia.scm"
1112 "guix/build/cargo-build-system.scm"
1113 "guix/build/cargo-utils.scm"
1114 "guix/build-system/cargo.scm"
1115 "guix/import/crate.scm"
1116 "guix/import/crate/cargo-lock.scm"
1117 "guix/scripts/import/crate.scm"
1118 "tests/import/crate.scm")))
1119
1120(define-team crypto
1121 (team 'crypto
1122 #:name "Crypto team"
1123 #:description
1124 "Secrets, passwords, cryptography and security related packages."
1125 #:scope (list (make-regexp* "^gnu/packages/(.*-|)crypto\\.scm$")
1126 "gnu/packages/cryptsetup.scm"
1127 "gnu/packages/cybersecurity.scm"
1128 "gnu/packages/gnupg.scm"
1129 "gnu/packages/nettle.scm"
1130 "gnu/packages/password-utils.scm"
1131 "gnu/packages/security-token.scm"
1132 "gnu/packages/ssh.scm"
1133 "gnu/packages/tls.scm"
1134 "gnu/packages/vpn.scm")))
1135
1136(define-team science
1137 (team 'science
1138 #:name "Science team"
1139 #:description "The main science disciplines and fields related
1140packages (e.g. Astronomy, Chemistry, Math, Physics etc.)"
1141 #:scope (list (make-regexp* "^gnu/packages/fortran(-.+|)\\.scm$")
1142 "gnu/packages/algebra.scm"
1143 "gnu/packages/astronomy.scm"
1144 "gnu/packages/chemistry.scm"
1145 "gnu/packages/geo.scm"
1146 "gnu/packages/graph.scm"
1147 "gnu/packages/lean.scm"
1148 "gnu/packages/maths.scm"
1149 "gnu/packages/medical.scm"
1150 "gnu/packages/physics.scm"
1151 "gnu/packages/sagemath.scm"
1152 "gnu/packages/statistics.scm")))
1153
1154(define-team security-response
1155 (team 'security-response
1156 #:name "Guix security response team"
1157 #:description "Security response team: \
1158https://guix.gnu.org/security/ ."))
1159
1160(define-team sugar
1161 (team 'sugar
1162 #:name "Sugar team"
1163 #:description
1164 "Everything related to the Sugar Desktop and learning environment."
1165 #:scope (list "gnu/packages/sugar.scm")))
1166
1167(define-team sysadmin
1168 (team 'sysadmin
1169 #:name "Sysadmin team"
1170 #:description
1171 "Networking, server clustering, high availability."
1172 #:scope (list "gnu/packages/admin.scm"
1173 "gnu/packages/acl.scm"
1174 "gnu/packages/adns.scm"
1175 "gnu/packages/antivirus.scm"
1176 "gnu/packages/apparmor.scm"
1177 "gnu/packages/authentication.scm"
1178 "gnu/packages/cluster.scm"
1179 "gnu/packages/configuration-management.scm"
1180 "gnu/packages/databases.scm"
1181 "gnu/packages/distributed.scm"
1182 "gnu/packages/dns.scm"
1183 "gnu/packages/high-availability.scm"
1184 "gnu/packages/kerberos.scm"
1185 "gnu/packages/logging.scm"
1186 "gnu/packages/monitoring.scm"
1187 "gnu/packages/nfs.scm"
1188 "gnu/packages/openldap.scm"
1189 "gnu/packages/openstack.scm"
1190 "gnu/packages/prometheus.scm"
1191 "gnu/packages/rdesktop.scm"
1192 "gnu/packages/samba.scm"
1193 "gnu/packages/selinux.scm"
1194 "gnu/packages/storage.scm"
1195 "gnu/packages/task-runners.scm"
1196 "gnu/packages/terraform.scm"
1197 "gnu/packages/virtualization.scm"
1198 "gnu/packages/vnc.scm"
1199 "gnu/services/admin.scm"
1200 "gnu/services/authentication.scm"
1201 "gnu/services/databases.scm"
1202 "gnu/services/dns.scm"
1203 "gnu/services/high-availability.scm"
1204 "gnu/services/kerberos.scm"
1205 "gnu/services/monitoring.scm"
1206 "gnu/services/nfs.scm"
1207 "gnu/services/samba.scm"
1208 "gnu/services/virtualization.scm"
1209 "gnu/services/vnc.scm"
1210 "gnu/tests/databases.scm"
1211 "gnu/tests/dns.scm"
1212 "gnu/tests/high-availability.scm"
1213 "gnu/tests/monitoring.scm"
1214 "gnu/tests/nfs.scm"
1215 "gnu/tests/samba.scm"
1216 "gnu/tests/virtualization.scm"
1217 "gnu/tests/vnc.scm")))
1218
1219(define-team telephony
1220 (team 'telephony
1221 #:name "Telephony team"
1222 #:description
1223 "Telephony packages and services such as Jami, Linphone, etc."
1224 #:scope (list "gnu/build/jami-service.scm"
1225 "gnu/packages/jami.scm"
1226 "gnu/packages/linphone.scm"
1227 "gnu/packages/telephony.scm"
1228 "gnu/services/telephony.scm"
1229 "gnu/tests/data/jami-dummy-account.dat"
1230 "gnu/tests/telephony.scm"
1231 "tests/services/telephony.scm")))
1232
1233(define-team tex
1234 (team 'tex
1235 #:name "TeX team"
1236 #:description
1237 "TeX, LaTeX, XeLaTeX, LuaTeX, TeXLive, the texlive-build-system, and
1238the \"texlive\" importer."
1239 #:scope (list "gnu/packages/tex.scm"
1240 "gnu/packages/texlive.scm"
1241 "guix/build/texlive-build-system.scm"
1242 "guix/build-system/texlive.scm"
1243 "guix/import/texlive.scm"
1244 "guix/scripts/import/texlive.scm"
1245 "tests/import/texlive.scm")))
1246
1247(define-team translations
1248 (team 'translations
1249 #:name "Translations"
1250 #:scope (list "etc/news.scm"
1251 (make-regexp* "^po/"))))
1252
1253(define-team vcs
1254 (team 'vcs
1255 #:name "Version control team"
1256 #:description
1257 "Version control packages, services, and Guix download backends."
1258 #:scope (list "gnu/packages/version-control.scm"
1259 "gnu/services/version-control.scm"
1260 "gnu/tests/version-control.scm"
1261 "guix/build/bzr.scm"
1262 "guix/build/cvs.scm"
1263 "guix/build/fossil.scm"
1264 "guix/build/git.scm"
1265 "guix/build/hg.scm"
1266 "guix/build/svn.scm")))
1267
1268(define-team xfce
1269 (team 'xfce
1270 #:name "Xfce team"
1271 #:description "Xfce desktop environment."
1272 #:scope (list "gnu/packages/xfce.scm")))
1273
1274(define-team zig
1275 (team 'zig
1276 #:name "Zig team"
1277 #:description "Zig, Zig packages, and the zig-build system"
1278 #:scope (list "gnu/packages/zig.scm"
1279 "gnu/packages/zig-xyz.scm"
1280 "guix/build/zig-build-system.scm"
1281 "guix/build-system/zig.scm")))
1282
1283
1284(define-member (person "Anderson Torres"
1285 "[email protected]"
1286 "AndersonTorres")
1287 community translations)
1288
1289(define-member (person "Eric Bavier"
1290 "[email protected]"
1291 "bavier")
1292 science)
1293
1294(define-member (person "Jonathan Brielmaier"
1295 "[email protected]"
1296 "jonsger")
1297 mozilla)
1298
1299(define-member (person "Denis Carikli"
1300 "[email protected]"
1301 "GNUtoo")
1302 embedded)
1303
1304(define-member (person "Ludovic Courtès"
1305 "[email protected]"
1306 "civodul")
1307 codeberg core core-packages guile hpc installer)
1308
1309(define-member (person "Andreas Enge"
1310 "[email protected]"
1311 "enge")
1312 bootstrap c++ codeberg core-packages crypto lxqt science tex)
1313
1314(define-member (person "Tanguy Le Carrour"
1315 "[email protected]"
1316 "tanguybl")
1317 python home)
1318
1319(define-member (person "Tobias Geerinckx-Rice"
1320 "[email protected]"
1321 "nckx")
1322 maintainers codeberg mentors)
1323
1324(define-member (person "Steve George"
1325 "[email protected]"
1326 "futurile")
1327 codeberg rust)
1328
1329(define-member (person "Leo Famulari"
1330 "[email protected]"
1331 "lfam")
1332 codeberg linux-libre)
1333
1334(define-member (person "Efraim Flashner"
1335 "[email protected]"
1336 "efraim")
1337 maintainers codeberg embedded bootstrap release rust)
1338
1339(define-member (person "jgart"
1340 "[email protected]"
1341 "jgart")
1342 hare lisp mentors)
1343
1344(define-member (person "John Kehayias"
1345 "[email protected]"
1346 "podiki")
1347 security-response)
1348
1349(define-member (person "Guillaume Le Vaillant"
1350 "[email protected]"
1351 "glv")
1352 lisp)
1353
1354(define-member (person "Julien Lepiller"
1355 "[email protected]"
1356 "roptat")
1357 java ocaml translations)
1358
1359(define-member (person "Philip McGrath"
1360 "[email protected]"
1361 "LiberalArtist")
1362 racket)
1363
1364(define-member (person "Mathieu Othacehe"
1365 "[email protected]"
1366 "mothacehe")
1367 maintainers codeberg installer mentors)
1368
1369(define-member (person "Florian Pelz"
1370 "[email protected]"
1371 "pelzflorian")
1372 translations)
1373
1374(define-member (person "Liliana Marie Prikler"
1375 "[email protected]"
1376 "lilyp")
1377 emacs games gnome qa-packages)
1378
1379(define-member (person "Ricardo Wurmus"
1380 "[email protected]"
1381 "rekado")
1382 bioinformatics codeberg r sugar)
1383
1384(define-member (person "Christopher Baines"
1385 "[email protected]"
1386 "cbaines")
1387 codeberg core mentors ruby)
1388
1389(define-member (person "Andrew Tropin"
1390 "[email protected]"
1391 "abcdw")
1392 home emacs)
1393
1394(define-member (person "Trevor Richards"
1395 "[email protected]"
1396 "trevdev")
1397 emacs lisp)
1398
1399(define-member (person "pukkamustard"
1400 "[email protected]"
1401 "pukkamustard")
1402 ocaml)
1403
1404(define-member (person "Josselin Poiret"
1405 "[email protected]"
1406 "jpoiret")
1407 installer)
1408
1409(define-member (person "Simon Tournier"
1410 "[email protected]"
1411 "zimoun")
1412 julia core mentors r security-response)
1413
1414(define-member (person "宋文武"
1415 "[email protected]"
1416 "iyzsong")
1417 games localization lxqt qt xfce)
1418
1419(define-member (person "Vagrant Cascadian"
1420 "[email protected]"
1421 "vagrantc")
1422 debian embedded linux-libre)
1423
1424(define-member (person "Vagrant Cascadian" ;XXX: duplicate
1425 "[email protected]"
1426 "vagrantc")
1427 reproduciblebuilds)
1428
1429(define-member (person "Maxim Cournoyer"
1430 "[email protected]"
1431 "apteryx")
1432 maintainers codeberg core documentation electronics javascript gnome
1433 qt telephony)
1434
1435(define-member (person "Munyoki Kilyungi"
1436 "[email protected]"
1437 "BonfaceKilz")
1438 python guile)
1439
1440(define-member (person "Gabriel Wicki"
1441 "[email protected]"
1442 "gabber")
1443 audio community documentation electronics embedded)
1444
1445(define-member (person "Divya Ranjan Pattanaik"
1446 "[email protected]"
1447 "divyaranjan")
1448 emacs rust haskell)
1449
1450(define-member (person "Clément Lassieur"
1451 "[email protected]"
1452 "snape")
1453 mozilla)
1454
1455(define-member (person "Sharlatan Hellseher"
1456 "[email protected]"
1457 "Hellseher")
1458 bioinformatics go python science)
1459
1460(define-member (person "Arthur Rodrigues"
1461 "[email protected]"
1462 "arthurhdrodrigues")
1463 go)
1464
1465(define-member (person "Mark H Weaver"
1466 "[email protected]"
1467 "mhw")
1468 mozilla)
1469
1470(define-member (person "Laurent Gatto"
1471 "[email protected]"
1472 "lgatto")
1473 r bioinformatics)
1474
1475(define-member (person "Nicolas Goaziou"
1476 "[email protected]"
1477 "ngz")
1478 tex)
1479
1480(define-member (person "André Batista"
1481 "[email protected]"
1482 "madage")
1483 mozilla)
1484
1485(define-member (person "Janneke Nieuwenhuizen"
1486 "[email protected]"
1487 "janneke")
1488 bootstrap build-tools codeberg core-packages home hurd installer
1489 qa-packages)
1490
1491(define-member (person "Zheng Junjie"
1492 "[email protected]"
1493 "Z572")
1494 core-packages)
1495
1496(define-member (person "Sughosha"
1497 "[email protected]"
1498 "SameExpert")
1499 audio kde)
1500
1501(define-member (person "Jelle Licht"
1502 "[email protected]"
1503 "jlicht")
1504 javascript)
1505
1506(define-member (person "Cayetano Santos"
1507 "[email protected]"
1508 "csantosb")
1509 ai emacs electronics hpc crypto reproduciblebuilds)
1510
1511(define-member (person "Greg Hogan"
1512 "[email protected]"
1513 "greghogan")
1514 c++)
1515
1516(define-member (person "Hilton Chain"
1517 "[email protected]"
1518 "hako"))
1519
1520(define-member (person "Noé Lopez"
1521 "[email protected]"
1522 "Baleine")
1523 gnome release)
1524
1525(define-member (person "Ashvith Shetty"
1526 "[email protected]"
1527 "Ashvith")
1528 javascript xfce)
1529
1530(define-member (person "Konrad Hinsen"
1531 "[email protected]"
1532 "khinsen")
1533 lisp)
1534
1535(define-member (person "Vinicius Monego"
1536 "[email protected]"
1537 "monego")
1538 python science)
1539
1540(define-member (person "Yelninei"
1541 "[email protected]"
1542 "Yelninei")
1543 hurd)
1544
1545(define-member (person "Giacomo Leidi"
1546 "[email protected]"
1547 "fishinthecalculator")
1548 audio beam)
1549
1550(define-member (person "Saku Laesvuori"
1551 "[email protected]"
1552 "slaesvuo")
1553 haskell)
1554
1555(define-member (person "Rodion Goritskov"
1556 "[email protected]"
1557 "rodion-goritskov")
1558 games java kde linux-libre release)
1559
1560(define-member (person "Jason Conroy"
1561 "[email protected]"
1562 "conroj")
1563 ocaml)
1564
1565(define-member (person "Rutherther"
1566 "[email protected]"
1567 "Rutherther")
1568 core release)
1569
1570(define-member (person "Morgan Arnold"
1571 "[email protected]"
1572 "mra")
1573 core)
1574
1575(define-member (person "Danny Milosavljevic"
1576 "[email protected]"
1577 "daym")
1578 bootstrap dotnet hpc python rust science)
1579
1580(define-member (person "Andy Tai"
1581 "[email protected]"
1582 "atai")
1583 ai)
1584
1585(define-member (person "Pierre-Henry Fröhring"
1586 "[email protected]"
1587 "phfrohring")
1588 beam)
1589
1590(define-member (person "Nguyễn Gia Phong"
1591 "[email protected]"
1592 "cnx")
1593 build-tools lua qa-packages sysadmin vcs)
1594
1595(define-member (person "Lilah Tascheter"
1596 "[email protected]"
1597 "tinystar")
1598 hare)
1599
1600(define-member (person "FuncProgLinux"
1601 "[email protected]"
1602 "FuncProgLinux")
1603 mate)
1604
1605(define-member (person "Reza Housseini"
1606 "[email protected]"
1607 "rhou")
1608 python science c++)
1609
1610(define-member (person "Yunqi Shao"
1611 "[email protected]"
1612 "yqshao")
1613 sysadmin)
1614
1615(define-member (person "Collin Doering"
1616 "[email protected]"
1617 "rekahsoft")
1618 embedded electronics haskell sysadmin)
1619
1620(define-member (person "Mathieu Lirzin"
1621 "[email protected]"
1622 "mthl")
1623 java)
1624
1625(define-member (person "Hugo Buddelmeijer"
1626 "[email protected]"
1627 "hugobuddel")
1628 python security-response)
1629
1630(define-member (person "Yan Abu Arab"
1631 "[email protected]"
1632 "tux1c")
1633 python sysadmin)
1634
1635(define-member (person "Wilko Meyer"
1636 "[email protected]"
1637 "theesm")
1638 linux-libre perl)
1639
1640(define-member (person "Untrusem"
1641 "[email protected]"
1642 "untrusem")
1643 community mozilla)
1644
1645(define-member (person "David Thompson"
1646 "[email protected]"
1647 "flockofbirbs")
1648 guile)
1649
1650(define-member (person "Sergio Pastor Pérez"
1651 "[email protected]"
1652 "pastor")
1653 guile hpc kde)
1654
1655(define-member (person "Carlo Zancanaro"
1656 "[email protected]"
1657 "czan")
1658 lua ruby)
1659
1660(define-member (person "Folât Pjêrsômêj"
1661 "[email protected]"
1662 "folaht")
1663 documentation)
1664
1665(define-member (person "Ashish SHUKLA"
1666 "[email protected]"
1667 "group")
1668 vcs)
1669
1670(define-member (person "Spencer King"
1671 "[email protected]"
1672 "spencerking")
1673 julia)
1674
1675(define-member (person "Peter Polidoro"
1676 "[email protected]"
1677 "peterpolidoro")
1678 electronics)
1679
1680(define-member (person "Thomas Kramer"
1681 "[email protected]"
1682 "tok")
1683 electronics)
1684
1685(define-member (person "gemmaro"
1686 "[email protected]"
1687 "gemmaro")
1688 ruby)
1689
1690(define-member (person "bdunahu"
1691 "[email protected]"
1692 "bdunahu")
1693 games)
1694
1695(define-member (person "Nomike"
1696 "[email protected]"
1697 "nomike")
1698 dotnet)
1699
1700(define-member (person "Fabio Natali"
1701 "[email protected]"
1702 "fnat")
1703 emacs)
1704
1705(define-member
1706 (person "Arun Isaac"
1707 "[email protected]"
1708 "arunisaac")
1709 codeberg)
1710
1711(define-member (person "Florian Korbacher"
1712 "[email protected]"
1713 "SilverlightningY")
1714 audio)
1715
1716(define-member (person "Orahcio Felício de Sousa"
1717 "[email protected]"
1718 "orahcio")
1719 go python science)
1720
1721(define-member (person "Vivien Kraus"
1722 "[email protected]"
1723 "vivien")
1724 hpc)
1725
1726(define-member (person "Ghislain Vaillant"
1727 "[email protected]"
1728 "ghisvail")
1729 bioinformatics python science)
1730
1731
1732(define (find-team name)
1733 (or (hash-ref %teams (string->symbol name))
1734 (error (format #false
1735 "no such team: ~a~%" name))))
1736
1737(define (find-team-by-scope files)
1738 "Return the team(s) which scope matches at least one of the FILES, as list
1739of file names as string."
1740 (hash-fold
1741 (lambda (key team acc)
1742 (if (any (lambda (file)
1743 (any (match-lambda
1744 ((? string? scope)
1745 (string=? scope file))
1746 ((? regexp*? scope)
1747 (regexp*-exec scope file)))
1748 (team-scope team)))
1749 files)
1750 (cons team acc)
1751 acc))
1752 '()
1753 %teams))
1754
1755(define (cc . teams)
1756 "Return arguments for `git send-email' to notify the members of the given
1757TEAMS when a patch is received by Debbugs."
1758 (let ((members (append-map team-members teams)))
1759 (unless (null? members)
1760 (format #true "--add-header=\"X-Debbugs-Cc: ~{~a~^, ~}\""
1761 (map person-email (sort-members members))))))
1762
1763(define (sort-members members)
1764 "Deduplicate and sort MEMBERS alphabetically by their name."
1765 (sort (delete-duplicates members equal?)
1766 (lambda (m1 m2)
1767 (string<? (person-name m1) (person-name m2)))))
1768
1769(define (member->string member)
1770 "Return the 'email <name>' string representation of MEMBER."
1771 (let* ((name (person-name member))
1772 (quoted-name/maybe (if (string-contains name ",")
1773 (string-append "\"" name "\"")
1774 name)))
1775 (format #false "~a <~a>" quoted-name/maybe (person-email member))))
1776
1777(define* (list-members team #:key (prefix ""))
1778 "Print the members of the given TEAM."
1779 (for-each (lambda (member)
1780 (format #t "~a~a~%" prefix (member->string member)))
1781 (sort-members (team-members team))))
1782
1783(define (print-team team)
1784 "Print TEAM, a <team> record object."
1785 (format #t
1786 "\
1787id: ~a
1788name: ~a
1789description: ~a
1790~amembers:
1791"
1792 (team-id team)
1793 (team-name team)
1794 (or (and=> (team-description team)
1795 (lambda (text)
1796 (string->recutils
1797 (fill-paragraph text (%text-width)
1798 (string-length "description: ")))))
1799 "<none>")
1800 (match (team-scope team)
1801 (() "")
1802 (scope (format #f "scope:~%~{+ ~a~^~%~}~%"
1803 (sort (map (match-lambda
1804 ((? regexp*? rx)
1805 (regexp*-pattern rx))
1806 (item item))
1807 scope)
1808 string<?)))))
1809 (list-members team #:prefix "+ ")
1810 (newline))
1811
1812(define (sort-teams teams)
1813 "Sort TEAMS, a list of <team> record objects."
1814 (sort teams
1815 (lambda (team1 team2)
1816 (string<? (symbol->string (team-id team1))
1817 (symbol->string (team-id team2))))))
1818
1819(define* (list-teams #:optional team-names)
1820 "Print all teams, their scope and their members."
1821 (for-each print-team
1822 (sort-teams
1823 (if team-names
1824 (map find-team team-names)
1825 (hash-map->list (lambda (_ value) value) %teams)))))
1826
1827
1828(define (diff-revisions rev-start rev-end)
1829 "Return the list of added, modified or removed files between REV-START
1830and REV-END, two git revision strings."
1831 (let* ((repository (repository-open (getcwd)))
1832 (commit1 (commit-lookup repository
1833 (object-id
1834 (revparse-single repository rev-start))))
1835 (commit2 (commit-lookup repository
1836 (object-id
1837 (revparse-single repository rev-end))))
1838 (diff (diff-tree-to-tree repository
1839 (commit-tree commit1)
1840 (commit-tree commit2)))
1841 (files '()))
1842 (diff-foreach
1843 diff
1844 (lambda (delta progress)
1845 (set! files
1846 (cons (diff-file-path (diff-delta-old-file delta)) files))
1847 0)
1848 (const 0)
1849 (const 0)
1850 (const 0))
1851 files))
1852
1853(define (git-patch->commit-id file)
1854 "Parse the commit ID from FILE, a patch produced with git."
1855 (call-with-input-file file
1856 (lambda (port)
1857 (let loop ((line (read-line port)))
1858 (when (eof-object? line)
1859 (error "could not find 'from' commit in patch" file))
1860 (let ((m (string-match "^From ([0-9a-f]{40})" line)))
1861 (if m
1862 (match:substring m 1)
1863 (loop (read-line port))))))))
1864
1865(define (git-patch->revisions file)
1866 "Return the start and end revisions of FILE, a patch file produced with git."
1867 (let* ((rev-end (git-patch->commit-id file))
1868 (rev-start (string-append rev-end "^")))
1869 (list rev-start rev-end)))
1870
1871(define (patch->teams patch-file)
1872 "Return the name of the teams in scope for the changes in PATCH-FILE."
1873 (map (compose symbol->string team-id)
1874 (find-team-by-scope (apply diff-revisions
1875 (git-patch->revisions patch-file)))))
1876
1877(define (team-id->forgejo-id id)
1878 "Return a name (string) suitable as a Forgejo team name."
1879 (define valid ;"AlphaDashDot"
1880 (char-set-union char-set:ascii (char-set #\-) (char-set #\.)))
1881
1882 (define (valid? chr)
1883 (char-set-contains? valid chr))
1884
1885 (string-map (match-lambda
1886 (#\+ #\p) ;special case for "c++"
1887 ((? valid? chr) chr)
1888 (_ #\-))
1889 (symbol->string id)))
1890
1891(define (team->codeowners-snippet team)
1892 (string-join (map (lambda (scope)
1893 (format #f "~50a @guix/~a"
1894 (if (regexp*? scope)
1895 (let ((regexp (regexp*-pattern scope)))
1896 ;; Caret may not match as expected in
1897 ;; 'CODEOWNERS' so drop it.
1898 (if (string-prefix? "^" regexp)
1899 (string-drop regexp 1)
1900 regexp))
1901 (regexp-quote scope))
1902 (team-id->forgejo-id (team-id team))))
1903 (team-scope team))
1904 "\n"
1905 'suffix))
1906
1907(define (export-codeowners port)
1908 (let ((teams (sort-teams
1909 (hash-map->list (lambda (_ value) value) %teams))))
1910 (display "\
1911# This -*- conf -*- file was generated by './etc/teams.scm codeowners'.
1912#
1913# It describes the expected reviewers for a pull request based on the
1914# changed files. Unlike what the name of the file suggests they don't
1915# own the code (ownership is collective in this house!) but merely have
1916# a good understanding of that area of the codebase and therefore are
1917# usually suited as a reviewer.\n\n"
1918 port)
1919 (for-each (lambda (team)
1920 (let ((scope (team->codeowners-snippet team)))
1921 ;; Some teams, like Mentors and Community have no scope,
1922 ;; which would result in seemingly arbitrary newlines.
1923 (unless (string-null? scope)
1924 (display scope port)
1925 (newline port))))
1926 teams)))
1927
1928
1929(define (main . args)
1930 (match args
1931 (("cc" . team-names)
1932 (apply cc (map find-team team-names)))
1933 (("cc-all-team-members")
1934 (apply cc (hash-map->list (lambda (_ team) team) %teams)))
1935 (("cc-members" patch-file)
1936 (unless (file-exists? patch-file)
1937 (error "patch file does not exist:" patch-file))
1938 (apply main "cc-members" (git-patch->revisions patch-file)))
1939 (("cc-members" rev-start rev-end)
1940 (apply cc (find-team-by-scope
1941 (diff-revisions rev-start rev-end))))
1942 (("cc-members-header-cmd" patch-file)
1943 (let* ((teams (map find-team (patch->teams patch-file)))
1944 (members (sort-members (append-map team-members teams))))
1945 (unless (null? members)
1946 (format #true "X-Debbugs-Cc: ~{~a~^, ~}"
1947 (map member->string members)))))
1948 (("cc-mentors-header-cmd" patch-file)
1949 (format #true "X-Debbugs-Cc: ~{~a~^, ~}"
1950 (map member->string
1951 (sort-members (team-members (find-team "mentors"))))))
1952 (("get-maintainer" patch-file)
1953 (apply main "list-members" (patch->teams patch-file)))
1954 (("list-teams" . args)
1955 (list-teams))
1956 (("list-members" . team-names)
1957 (for-each
1958 (lambda (team-name)
1959 (list-members (find-team team-name)))
1960 team-names))
1961 (("show" . team-names)
1962 (list-teams team-names))
1963 (("codeowners")
1964 (export-codeowners (current-output-port)))
1965 (("sync-codeberg-teams" token)
1966 (synchronize-teams token))
1967 (anything
1968 (format (current-error-port)
1969 "Usage: etc/teams.scm <command> [<args>]
1970
1971Commands:
1972 cc <team-name>
1973 get git send-email flags for cc-ing <team-name>
1974 cc-members <start> <end> | <patch>
1975 cc teams related to files changed between revisions or in a patch file
1976 cc-all-team-members
1977 cc all members of all teams (useful in GCD processes)
1978 cc-members-header-cmd <patch>
1979 cc-members variant for use with 'git send-email --header-cmd'
1980 cc-mentors-header-cmd <patch>
1981 command to use with 'git send-email --header-cmd' to notify mentors
1982 list-teams
1983 list teams and their members
1984 list-members <team-name>
1985 list members belonging to <team-name>
1986 get-maintainer <patch>
1987 compatibility mode with Linux get_maintainer.pl
1988 show <team-name>
1989 display <team-name> properties
1990 codeowners
1991 write a 'CODEOWNERS' file suitable for Codeberg on standard output
1992 sync-codeberg-teams <token>
1993 create or update the list of teams at Codeberg~%"))))
1994
1995(apply main (cdr (command-line)))