From patchwork Mon Jun 1 16:50:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Fr=C3=A9d=C3=A9ric_Mangano-Tarumi?= X-Patchwork-Id: 1657 Return-Path: Delivered-To: patchwork@archlinux.org Received: from apollo.archlinux.org (localhost [127.0.0.1]) by apollo.archlinux.org (Postfix) with ESMTP id B3CAB191D557B for ; Mon, 1 Jun 2020 16:50:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on apollo.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=DKIM_SIGNED=0.1, DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,LOCAL_FAKEBUSINESS=0.5, MAILING_LIST_MULTI=-1,NUMERIC_HTTP_ADDR=0.001,RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=-0.01,RCVD_IN_MSPIKE_WL=-0.01,SPF_HELO_NONE=0.001, T_DMARC_POLICY_NONE=0.01 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-BL-Results: [127.0.9.2] [127.0.0.19] Received: from orion.archlinux.org (orion.archlinux.org [88.198.91.70]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Mon, 1 Jun 2020 16:50:34 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 7C0C01C7391E0B; Mon, 1 Jun 2020 16:50:29 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [IPv6:2a01:4f8:160:3033::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: luna) by orion.archlinux.org (Postfix) with ESMTPSA id C89AF1C7391E04; Mon, 1 Jun 2020 16:50:28 +0000 (UTC) Authentication-Results: orion.archlinux.org; dkim=pass (1024-bit key) header.d=mg0.fr header.i=@mg0.fr header.b=bGaMTao/ Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id B8EEE29CCF; Mon, 1 Jun 2020 16:50:28 +0000 (UTC) Authentication-Results: luna.archlinux.org; dkim=pass (1024-bit key) header.d=mg0.fr header.i=@mg0.fr header.b=bGaMTao/ Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id C12B129CCB for ; Mon, 1 Jun 2020 16:50:25 +0000 (UTC) Received: from orion.archlinux.org (orion.archlinux.org [IPv6:2a01:4f8:160:6087::1]) by luna.archlinux.org (Postfix) with ESMTPS for ; Mon, 1 Jun 2020 16:50:25 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id AE1041C7391E02 for ; Mon, 1 Jun 2020 16:50:23 +0000 (UTC) Received: from tsubame.mg0.fr (tsubame.mg0.fr [IPv6:2001:41d0:401:3100::402b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS for ; Mon, 1 Jun 2020 16:50:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mg0.fr; s=tsubame; h=Message-ID:Subject:To:From:Date:cc; bh=X7hAmJs51FERyqzu+tT7zEPNEwh0XTRe0Td1dc6bDwY=; b=bGaMTao/TQjmODsJhMYVsJveBF QAEEF6imgBZKw/pCEiof0cw5bcz/p96rBnTKix5Ygd6M77k0mweTvfxA+XYrQfvPrHRDUPDVA1ITy DUQGesmGRjAk0NYWHVNd2e8GJEeJn7M8ERQgqUm05/vLhoLiJYNbf5SFMSBQ30c7Ip48=; Received: from fmang by tsubame.mg0.fr with local (Exim 4.93) (envelope-from ) id 1jfndn-0026Od-7Y for aur-dev@archlinux.org; Mon, 01 Jun 2020 18:50:23 +0200 Date: Mon, 1 Jun 2020 18:50:23 +0200 From: =?utf-8?b?RnLDqWTDqXJpYw==?= Mangano-Tarumi To: aur-dev@archlinux.org Subject: [PATCH v2 2/2] Introduce conf/config.dev for development Message-ID: <20200601165023.GA500907@tsubame.mg0.fr> References: <159093460328.993942.12941354672188187108@typhoon> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <159093460328.993942.12941354672188187108@typhoon> X-BeenThere: aur-dev@archlinux.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Arch User Repository \(AUR\) Development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: aur-dev-bounces@archlinux.org Sender: "aur-dev" conf/config.dev’s purpose is to provide a lighter configuration template for developers, and split development-specific options off the default configuration file. --- TESTING | 8 +++----- conf/config.defaults | 10 ---------- conf/config.dev | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 conf/config.dev diff --git a/TESTING b/TESTING index 31e3bcbd..f62baefa 100644 --- a/TESTING +++ b/TESTING @@ -17,12 +17,10 @@ INSTALL. Ensure to enable the pdo_sqlite extension in php.ini. -3) Copy conf/config.defaults to conf/config and adjust the configuration - Pay attention to disable_http_login, enable_maintenance, aur_location and - htmldir. +3) Copy conf/config.dev to conf/config and read its instructions. - Be sure to change backend to sqlite and name to the file location of your - created test database. + Note that when the upstream config.dev is updated, you should compare it to + your conf/config. 4) Prepare the testing database: diff --git a/conf/config.defaults b/conf/config.defaults index ed495168..447dacac 100644 --- a/conf/config.defaults +++ b/conf/config.defaults @@ -41,16 +41,6 @@ cache = none cache_pkginfo_ttl = 86400 memcache_servers = 127.0.0.1:11211 -[php] -; Address PHP should bind when spawned in development mode by aurweb.spawn. -bind_address = 127.0.0.1:8081 -; Directory containing aurweb's PHP code, required by aurweb.spawn. -;htmldir = /path/to/web/html - -[fastapi] -; Address uvicorn should bind when spawned in development mode by aurweb.spawn. -bind_address = 127.0.0.1:8082 - [ratelimit] request_limit = 4000 window_length = 86400 diff --git a/conf/config.dev b/conf/config.dev new file mode 100644 index 00000000..e9c2112e --- /dev/null +++ b/conf/config.dev @@ -0,0 +1,36 @@ +; Configuration file for aurweb development. +; +; Options are implicitly inherited from ${AUR_CONFIG}.defaults, which lists all +; available options for productions, and their default values. This current file +; overrides only options useful for development, and introduces +; development-specific options too. +; +; Paths need to be absolute, so please replace $AUR_ROOT with your project root. + +[database] + +backend = sqlite +name = $AUR_ROOT/aurweb.sqlite3 + +; Alternative MySQL configuration +;backend = mysql +;name = aurweb +;user = aur +;password = aur + +[options] +aur_location = http://127.0.0.1:8080 +disable_http_login = 0 +enable-maintenance = 0 + +[php] +; Address PHP should bind when spawned in development mode by aurweb.spawn. +bind_address = 127.0.0.1:8081 +; Directory containing aurweb's PHP code, required by aurweb.spawn. +htmldir = $AUR_ROOT/web/html + +[fastapi] +; Address uvicorn should bind when spawned in development mode by aurweb.spawn. +bind_address = 127.0.0.1:8082 + +; vim: ft=dosini