From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id vlA8NABPc2C7bQAAgWs5BA (envelope-from ) for ; Sun, 11 Apr 2021 21:33:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6MYKLQBPc2CBYgAA1q6Kng (envelope-from ) for ; Sun, 11 Apr 2021 19:33:20 +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 4E97C12D99 for ; Sun, 11 Apr 2021 21:33:20 +0200 (CEST) Received: from localhost ([::1]:47334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVfpe-0008Co-H6 for larch@yhetil.org; Sun, 11 Apr 2021 15:33:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVfoe-0008C2-Rk for help-guix@gnu.org; Sun, 11 Apr 2021 15:32:16 -0400 Received: from sender4-op-o11.zoho.com ([136.143.188.11]:17120) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVfoc-0007A2-Kr for help-guix@gnu.org; Sun, 11 Apr 2021 15:32:16 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1618169528; cv=none; d=zohomail.com; s=zohoarc; b=AnpDoEvxkqbhHZuJMItEMwelGjc6iH9kEVSx8k2HE3VMQqUH3d6CxO8Cxm11wRgi5SgYgMOmRclq2IjfSuMd/3lVkbGu+T+2cYBdcKH5mObROSry1DaeWCyTgkYKgbRVdEPyrTte4P3QtpgGBT3EQHpnL9SuUCIuKSdzMzNwj6Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618169528; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=uAh3tByKDusfwL2BJQxlNvRtV53V5Hso63DtQkTFse4=; b=gIzoWtJdOaxYyOPSfSPmwQJqfKn9WpSov8qLK9m3nVd/pyYDLyQNUyS7HE20YVViH0YTqozgJsMln24OjHxAoWkNPpF/8wMFzghOVJfEzPLYrv9/A7yn+IexVDkc+oMAL0kuJeheSdG+qCVHXUYOuY62FCyZA2KIiQ9PXOSBepM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=beaver-labs.com; spf=pass smtp.mailfrom=edk@beaver-labs.com; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1618169528; s=zoho; d=beaver-labs.com; i=edk@beaver-labs.com; h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type; bh=uAh3tByKDusfwL2BJQxlNvRtV53V5Hso63DtQkTFse4=; b=HJyQ81DpHgKjeq6ejjw4+Rl81LysAV/eNQaeUtKT5Fvf43gc7yzWhnCOL5UYI6z3 ZNfL3xpzF1BZYy9S1aLurGdvfAVkllmcMk/nEG2QNXlmOYmfZO+u9XLd8FCVVNJgV5S IgR7U1k64WcGH2cLzzzLXbUmq2+I11cCJCpparQo= Received: from Rasoir (lfbn-idf3-1-808-29.w90-3.abo.wanadoo.fr [90.3.133.29]) by mx.zohomail.com with SMTPS id 1618169525319186.27523240556354; Sun, 11 Apr 2021 12:32:05 -0700 (PDT) User-agent: mu4e 1.4.15; emacs 27.1 From: edk@beaver-labs.com To: help-guix@gnu.org Subject: Environment of a shepherd service Message-ID: <87r1jgsjme.fsf@rdklein.fr> Date: Sun, 11 Apr 2021 21:31:53 +0200 MIME-Version: 1.0 Content-Type: text/plain X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.11; envelope-from=edk@beaver-labs.com; helo=sender4-op-o11.zoho.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618169600; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=uAh3tByKDusfwL2BJQxlNvRtV53V5Hso63DtQkTFse4=; b=DYw43ncKldb/ifR4rFtk83OmKvHJGNhzNfKCF9WjkbgFjkPDYSUB8lFFqErv2F47OVgg6N js7NXR9+Lw4uvGhkc5gwEgj+JtxtrGLDXHtzEmEQvIGH8CbdNCPT3Mxc8Z2WyyphlNp6yY reXAcW8emDlxk6Cjt6yO2kpA9IPp0kO99Nwk0TQI+KU6eG+v5DN0FAyoV1a4qOLm2a5imt 2dedTL504D10M2z3nvLLywO2WhKdtsr8E9YjQiaj4aXuDgV/89zErxvbCbvkoMxGcJU805 bet4cFPocq1ph+WQmARTeO/Py3Sv64/Uj32KjOMUPc4HjkQOaW9WixdG3dS5BQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1618169600; a=rsa-sha256; cv=pass; b=HaQNinMR7NBh3+8Q6Rh4hvqXrvO8tsN3r4gwlKJdVwbaWLXbr6ypbylGdJnR3K5mHE6sxv TfI4zSxSMgJYxEkQqeIQParfMdSGwmS+AHHqmhMSbMNhd+C1tKIYqHhQRU7uqSQwzHwPZS /WgkJuBB/zXyWL1PCRIyZVkciMDphujQQVOOw/lRP8pKqm6zDHD1lITshGLWhWs7qq3rdt 8yxPv+2OMx2HlcQgbEg1oWgeKSRB8dg64kXt86t/uQ0gJISfO4yaoPHjmbXL7pmeMMip6e ce0xWgMpdixQLU0yKc6RdpWZlzVthkSS2gdA+I+fMszz8g148XE57viZ3UPDBQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=beaver-labs.com header.s=zoho header.b=HJyQ81Dp; arc=pass ("zohomail.com:s=zohoarc:i=1"); spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -3.43 Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=beaver-labs.com header.s=zoho header.b=HJyQ81Dp; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 4E97C12D99 X-Spam-Score: -3.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: kNIJZH8aeuc2 Dear fellow Guixers, I'm trying to create an operating system declaration, so that I can run a piece of software of mine in a container with =guix system container=. I wrote a package for the software. The package works: the tests pass and when the package is installed I can run the software. I wrote a shepherd service for the software (it's called requisomatic). I copied the relevant part at the end of the email. When I run the container script created by =guix system container=, and get a shell in the container, I can run the software (I added the software's package to the globally installed packages in the operating-system definition). But, when I try to run it with shepherd, it fails because it can't find flask (a dependency of the software, which I've put as a propagated-input, and is indeed installed in the container). I replaced the software invocation in the shepherd service with just "env", and saw that the whole env in the service is: PATH=/run/current-system/profile/bin whereas in the shell I get when I connect to the container, the env contains many other variables, including a correctly set PYTHONPATH, which allows the finding of flask. So I now know why my software is not starting, but my question is: Why is the PYTHONPATH (and the other env vars, for that matter) not propagated from the package to the shepherd service by default ? And how can I make it so ? I would have expected the shepherd service to run with the global profile active. Follow up question, can shepherd services be specified to run in a specific profile ? So that I can have two services with incompatible dependencies running at the same time in the same operating-system ? Thanks in advance, Cheers, Edouard. -----extract from my operating-system declaration file------- (define requisomatic-shepherd-service (match-lambda (($ user group db-file) (list (shepherd-service (provision '(requisomatic)) (requirement '(user-processes networking)) (documentation "Run the requisomatic server") (start #~((make-forkexec-constructor ;; (append ;; (if db-file ;; `("env" ;; ,(string-append "REQUISOMATIC_DB_FILE=" db-file)) ;; '()) '("gunicorn" "requisomatic:app") ;; '("env") ;;) #:directory (string-append #$requisomatic "/bin/requisomatic/") #:log-file "/var/log/requisomatic.log"))) (stop #~(make-kill-destructor)))))))