From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2AfeADLws2C2bAAAgWs5BA (envelope-from ) for ; Sun, 30 May 2021 22:06:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id ECGrNzHws2BgEQAAbx9fmQ (envelope-from ) for ; Sun, 30 May 2021 20:06:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A55F019499 for ; Sun, 30 May 2021 22:06:09 +0200 (CEST) Received: from localhost ([::1]:52632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnRhI-0007xx-Nm for larch@yhetil.org; Sun, 30 May 2021 16:06:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnRhC-0007xn-R5 for guix-patches@gnu.org; Sun, 30 May 2021 16:06:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48866) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lnRhC-0008AV-AP for guix-patches@gnu.org; Sun, 30 May 2021 16:06:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lnRhC-0004BT-4s for guix-patches@gnu.org; Sun, 30 May 2021 16:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48751] [PATCH] services: laminar: Create parent directory for unix socket. References: <20210530195952.22708-1-arunisaac@systemreboot.net> In-Reply-To: <20210530195952.22708-1-arunisaac@systemreboot.net> Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 May 2021 20:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48751 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48751@debbugs.gnu.org Cc: Arun Isaac Received: via spool by 48751-submit@debbugs.gnu.org id=B48751.162240513416047 (code B ref 48751); Sun, 30 May 2021 20:06:02 +0000 Received: (at 48751) by debbugs.gnu.org; 30 May 2021 20:05:34 +0000 Received: from localhost ([127.0.0.1]:60412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnRgj-0004Al-Qf for submit@debbugs.gnu.org; Sun, 30 May 2021 16:05:34 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:37574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnRgh-0004Ab-2F for 48751@debbugs.gnu.org; Sun, 30 May 2021 16:05:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=g3WN6lEByo4G+4tGs6Bh7X9FDHTjjBFistj9oBXmHXQ=; b=eHgpyIlz61UwKhpLgi9YcTUqfR e6ZX4W0t6cPmSDFjAH9qgiNFmcMIC0HHF7b4Q+s+HbYoUAh/x7rfwiO26Ew21eAE9fFyJLuW8Gjx0 PAGhTST10u0W8Myk5jQhVyno79FEKkQ8tpJFJj3Q8cDdvM1JdbvW/W9JlCEjM1gEZfvevbO3V8tPk 1fiCX0Pt0UXsI/mOzySJcxaNUAfFg73aWtNgVizMGVoORIK1OET1J2/TSyemszIKB+NHncsdVOIBq KLsR6nIxSrkdPeKo/i9CkdVqIbWh4hUxEg16RRWM9fLilA079PMKcq6ZH/sBySXnJ5QNhz+/Xwpy3 Z4TVl4yw==; Received: from [192.168.2.1] (helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1lnRge-000011-RZ; Mon, 31 May 2021 01:35:28 +0530 From: Arun Isaac Date: Mon, 31 May 2021 01:35:27 +0530 Message-Id: <20210530200527.23041-1-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622405169; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=g3WN6lEByo4G+4tGs6Bh7X9FDHTjjBFistj9oBXmHXQ=; b=HddgXA9H6DWFhtzSy9/k5h8MkAcNImufyg52/WW/3tYdynDGFQUqxDPjSd6GnO+L/dpIAG fYURqIbCS4x9bCj/niKobekJ/QF4mCTF7OR3lPVMPH/8foScR2xEz6Idp35qKrd73LnMIq CeL329annxcSPFCmD60gTh71NPdxikDbSXPSWvgFAaU6n1oEJd+b/7tAATv8IPmXbPlqUY /IhgN+SUeevBVvgX9FwoXcvyp626RevS/VAkEwmTPw2y12aN666jKhQTMRIozknrlDPJbe IFmdQzawSuLeaMRgC3AT7Dmko1sQIS61TbvWXrm6heWYrUlZNq5ZAbb8axcqjg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622405169; a=rsa-sha256; cv=none; b=cQUVF38qQy0KU98MqfXuO2qFWvinquY1A2ttoysfXsL3JF1lwybunvUNWjBfxQ0xVpha3c nFOoplExK/cEruvNOfKDYrEDRzJinqp55mmur6qj9vdnd3KgRqcSSw5s9NoawI7HR1OgtN x49vwvfpjSTlIwUnvHtAWDR3XLPIwiKopNkYvToYbBqSfrbHNdMELUXkuDG7aTmhvi3nF9 pnjtyteC6KXgH02JFiGJWlNk0Po0BkG1mJ0yuWbQq+kqP+reMD4hdF17syBdiqmqPx0jgh lS7DNSEoikp14OFElKTYFM9ZbuWal2ekhwOCm/w3jddPhP0c5kc6BgKl7PHEyg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=eHgpyIlz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=eHgpyIlz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: A55F019499 X-Spam-Score: -0.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: N4BtVwHAvibd * gnu/services/ci.scm (laminar-activation): New function. (laminar-service-type): Extend activation-service-type with laminar-activation. --- gnu/services/ci.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gnu/services/ci.scm b/gnu/services/ci.scm index 0b18521e76..0c3566bcaf 100644 --- a/gnu/services/ci.scm +++ b/gnu/services/ci.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018, 2019, 2020, 2021 Christopher Baines +;;; Copyright © 2021 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -115,13 +116,25 @@ (home-directory (laminar-configuration-home-directory config)) (shell #~(string-append #$shadow "/sbin/nologin"))))) +(define (laminar-activation config) + (let ((bind-http (laminar-configuration-bind-http config))) + #~(begin + ;; If listen is a unix socket, create its parent directory. + (when (string-prefix? "unix:" #$bind-http) + (let ((run-directory + (dirname (substring #$bind-http (string-length "unix:")))) + (user (getpw "laminar"))) + (mkdir-p run-directory) + (chown run-directory (passwd:uid user) (passwd:gid user))))))) + (define laminar-service-type (service-type (name 'laminar) (extensions (list (service-extension shepherd-root-service-type laminar-shepherd-service) - (service-extension account-service-type laminar-account))) + (service-extension account-service-type laminar-account) + (service-extension activation-service-type laminar-activation))) (default-value (laminar-configuration)) (description "Run the Laminar continuous integration service."))) -- 2.31.0