From patchwork Tue Jan 3 14:07:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 45820 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4C8D827BBED; Tue, 3 Jan 2023 14:09:37 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1EC9B27BBEB for ; Tue, 3 Jan 2023 14:09:36 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pChyd-00027w-9g; Tue, 03 Jan 2023 09:09:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pChyS-00025V-Fm for guix-patches@gnu.org; Tue, 03 Jan 2023 09:09:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pChyR-0003vN-24 for guix-patches@gnu.org; Tue, 03 Jan 2023 09:09:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pChyQ-0006fE-HX; Tue, 03 Jan 2023 09:09:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60516] [PATCH] services: git-daemon: Deprecate 'git-daemon-service' procedure. Resent-From: mirai@makinata.eu Original-Sender: "Debbugs-submit" Resent-CC: me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 03 Jan 2023 14:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60516 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60516@debbugs.gnu.org Cc: Bruno Victal , me@tobias.gr X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: me@tobias.gr Received: via spool by submit@debbugs.gnu.org id=B.167275489425553 (code B ref -1); Tue, 03 Jan 2023 14:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jan 2023 14:08:14 +0000 Received: from localhost ([127.0.0.1]:44984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pChxe-0006e4-1i for submit@debbugs.gnu.org; Tue, 03 Jan 2023 09:08:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:60246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pChxb-0006dv-PZ for submit@debbugs.gnu.org; Tue, 03 Jan 2023 09:08:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pChxX-0001xb-TA for guix-patches@gnu.org; Tue, 03 Jan 2023 09:08:11 -0500 Received: from smtpmciv1.myservices.hosting ([185.26.107.237]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pChxU-0003n5-0v for guix-patches@gnu.org; Tue, 03 Jan 2023 09:08:07 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.172]) by smtpmciv1.myservices.hosting (Postfix) with ESMTP id 3FDE020612 for ; Tue, 3 Jan 2023 15:07:59 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 03CC180096; Tue, 3 Jan 2023 15:07:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-1.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id PCBmaoBm6l_Z; Tue, 3 Jan 2023 15:07:58 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-118-236.dsl.telepac.pt [85.242.118.236]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 63B9A80093; Tue, 3 Jan 2023 15:07:58 +0100 (CET) From: mirai@makinata.eu Date: Tue, 3 Jan 2023 14:07:49 +0000 Message-Id: X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Tags: patch Received-SPF: pass client-ip=185.26.107.237; envelope-from=mirai@makinata.eu; helo=smtpmciv1.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Bruno Victal * gnu/services/version-control.scm (git-daemon-service): Define with 'define-deprecated' * doc/guix.texi (Version Control Services): Replace with 'git-daemon-service-type' --- doc/guix.texi | 25 +++++++++++-------------- gnu/services/version-control.scm | 4 +++- 2 files changed, 14 insertions(+), 15 deletions(-) base-commit: 473692b812b4ab4267d9bddad0fb27787d2112ff diff --git a/doc/guix.texi b/doc/guix.texi index 5c85680831..552a403bcb 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -34838,27 +34838,24 @@ How often to run the node cleaning job. The default is once per day, at The @code{(gnu services version-control)} module provides a service to allow remote access to local Git repositories. There are three options: -the @code{git-daemon-service}, which provides access to repositories via +the @code{git-daemon-service-type}, which provides access to repositories via the @code{git://} unsecured TCP-based protocol, extending the @code{nginx} web server to proxy some requests to @code{git-http-backend}, or providing a web interface with @code{cgit-service-type}. -@deffn {Scheme Procedure} git-daemon-service [#:config (git-daemon-configuration)] - -Return a service that runs @command{git daemon}, a simple TCP server to +@defvar git-daemon-service-type +Type for a service that runs @command{git daemon}, a simple TCP server to expose repositories over the Git protocol for anonymous access. -The optional @var{config} argument should be a -@code{} object, by default it allows read-only -access to exported@footnote{By creating the magic file -@file{git-daemon-export-ok} in the repository directory.} repositories under -@file{/srv/git}. - -@end deffn +The value for this service type is a @code{} +record, by default it allows read-only access to exported@footnote{By +creating the magic file @file{git-daemon-export-ok} in the repository +directory.} repositories under @file{/srv/git}. +@end defvar @deftp {Data Type} git-daemon-configuration -Data type representing the configuration for @code{git-daemon-service}. +Data type representing the configuration for @code{git-daemon-service-type}. @table @asis @item @code{package} (default: @code{git}) @@ -34895,8 +34892,8 @@ Whether to listen on an alternative port, which defaults to 9418. If not empty, only allow access to this list of directories. @item @code{extra-options} (default: @code{'()}) -Extra options will be passed to @command{git daemon}, please run -@command{man git-daemon} for more information. +Extra options that will be passed to @command{git daemon}.@footnote{Run +@command{man git-daemon} for more information.} @end table @end deftp diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 86d40bdbe3..14ff0a59a6 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -29,6 +29,7 @@ (define-module (gnu services version-control) #:use-module (gnu system shadow) #:use-module (gnu packages version-control) #:use-module (gnu packages admin) + #:use-module (guix deprecation) #:use-module (guix records) #:use-module (guix gexp) #:use-module (guix store) @@ -178,7 +179,8 @@ (define git-daemon-service-type protocol.") (default-value (git-daemon-configuration)))) -(define* (git-daemon-service #:key (config (git-daemon-configuration))) +(define-deprecated (git-daemon-service #:key (config (git-daemon-configuration))) + git-daemon-service-type "Return a service that runs @command{git daemon}, a simple TCP server to expose repositories over the Git protocol for anonymous access.