From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eGAVHLQdQ2ErWwEAgWs5BA (envelope-from ) for ; Thu, 16 Sep 2021 12:34:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id WI3AF7QdQ2HycgAAB5/wlQ (envelope-from ) for ; Thu, 16 Sep 2021 10:34:28 +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 B0D5B157CD for ; Thu, 16 Sep 2021 12:34:27 +0200 (CEST) Received: from localhost ([::1]:53236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQoin-0001FX-7o for larch@yhetil.org; Thu, 16 Sep 2021 06:34:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQoZ4-0004et-FX for help-guix@gnu.org; Thu, 16 Sep 2021 06:24:22 -0400 Received: from mail-40131.protonmail.ch ([185.70.40.131]:62284) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQoYy-0000cH-4L for help-guix@gnu.org; Thu, 16 Sep 2021 06:24:22 -0400 Date: Thu, 16 Sep 2021 10:24:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1631787843; bh=dtLYbTmpWJsq6lV0hA1uhWFJA60815gBHnMT/FlMMhk=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=tUcKju7T6RFc/VZrvfnFr8JTs+YfOjKcEOt7WpTzaxlR9D+RyOqMsAq4yHORDtxZf 2IjLe+PVy09HB9vStrlsnqh4x261xs98wpvOMuhi1l9jJhp+kQ6R8OaRxRJQoddIcI gkPR5Xsgb+LhoOmCcORwWnPw0JZ7++2D7omHWrWg= To: Ricardo Wurmus From: phodina Cc: help-guix@gnu.org Subject: Re: GuixSD distro detection during configuration Message-ID: In-Reply-To: <878rzwq249.fsf@elephly.net> References: <58ydBqqUPUZUmdHHddL6k4FS5rODq9aw5UY_N-FMJF_dLIoxmi8hvkjnCVhjYGMEgiQ5gbF4Va_R-B-wpdTx9wc8ePQ1VHTGTdjlslNapsM=@protonmail.com> <878rzwq249.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.131; envelope-from=phodina@protonmail.com; helo=mail-40131.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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: , Reply-To: phodina Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631788468; h=from:from:sender:sender:reply-to: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=dtLYbTmpWJsq6lV0hA1uhWFJA60815gBHnMT/FlMMhk=; b=FBUXGL0ju2lO6fE96xA7fb/tn5dGG2AqySPXiXONvIruIPCQYmXpoUim+Wtvyx/PPSkurg Kk1HUHGTtxze5ZoY+nj2cFX2s62MmqtYLrT6BhHKiAgeXV7vK7ekh40/ZhiZSqs8EC7czK /wF15aAisY0v4VBcHyPtctkU9zymcRufpY67vaV9joDMyZnlWRlEiAzIJ16Bxq0zTOdOAP AQodgL0/vFy5pdqD0//FfmgsFir6sakQpk9bm+YWG2GhHW9X+x6qpw1ckHOrfEIRimPWNw Twazuk3W3DZLnZMs53WN92h2lP+xdBfUYJBmva9GQiqdNd2+8L+DOf9Szldf2A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631788468; a=rsa-sha256; cv=none; b=KUyFLmFDuz6PUSssbfVQ2vXtY1b4NfKoL4jkvkuOT8eK4csxkncEqJuIZH1AfKtdL7GoOr trcboc+3o68BLsEPMSEJiBGlLkb2+0CzzGzYx1K8/ZLDaO24pTDocr4Csh/dGw/uZjlu/Y FZOKWZfDUF4KWIiwAMzH7Lib5FwZdizti+o0/BP6HDZUqwuxwKK4mG+XJDBudsgki1GGrG taLY6SRCVpYM8mhIdIz7TdJpmMxr4PpCEnDcBxy5+lIE654+Z8ChD5Zgo8K9SJ8t8l9H1X 5pwBJgIayRxziFMW2P7CN19jnC9DJr+YkT5x76sNuMwiv3FKtcRLQa7LlTKVKg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail header.b=tUcKju7T; dmarc=pass (policy=quarantine) header.from=protonmail.com; 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.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail header.b=tUcKju7T; dmarc=pass (policy=quarantine) header.from=protonmail.com; 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: B0D5B157CD X-Spam-Score: -3.10 X-Migadu-Scanner: scn1.migadu.com X-TUID: i2wPtx9j/uz/ Hi Ricardo, > phodina via help-guix@gnu.org writes: > > > Hi, > > > > what is the best way to detect the GuixSD OS during the build? > > Why is distro detection desirable? I often found myself trying to > > work around buggy distro detection. > > (BTW: it=E2=80=99s called =E2=80=9CGuix System=E2=80=9D, not =E2=80=9CGui= xSD=E2=80=9D.) > Well it's not exactly desirable but the configure script wants to know in o= rder to copy the correct files. My idea was to create a patch with Guix System support and submit it upstre= am. > > I encountered the problem during build of realmd in the > > > > configure.ac [1]. > > > > Some distros have special file in /etc. So my first idea was to > > > > use /etc/config.scm. However, this is not visible during the > > > > package build. > > It is also not necessary to have /etc/config.scm. I, for example, > > have all my system configurations in a different directory. True, I also have there just a symlink but it's not mandatory. > > > Therefore I went with the /gnu/store. This works but I'm > > > > interested if there isn't even a better option. > > > > [1] > > > > https://github.com/freedesktop/realmd/blob/master/configure.ac > > Guix is often used on top of other distros, so the presence of > > /gnu/store is not enough to be sure that the distro is Guix > > System. > Yes it can be the case it's installed on a foreign distro. > > -------------------------------------------------------------------------= --------------------------------------------------------------- > > Ricardo Well in that case I agree with you that it's not desirable to use buggy dis= tro detection and the result will be therefore to keep the patch with the p= kg definition.