From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C0493158041 for ; Sat, 30 Mar 2024 05:38:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 265AAE2A8F; Sat, 30 Mar 2024 05:38:46 +0000 (UTC) Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B3424E2A39 for ; Sat, 30 Mar 2024 05:38:45 +0000 (UTC) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1e034607879so21084135ad.0 for ; Fri, 29 Mar 2024 22:38:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711777124; x=1712381924; darn=lists.gentoo.org; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=Zo19d7TJrVspFUl4rdHoFW+kSiH5BJ24WWY+10m6oFY=; b=gRHHHppicdJuBlDgyMcCh6+UQRuEG4Spzm33vCYvM6c6xeO5Xk7ol5+kh4+6Ju0q8P ShB2cUathwsMZXkPBTQCaEFIM0NkIIdOY2hvS+WkCf8TxWpaDhzMwTSCckNgXODt4y8o EBbYDE+tTzAqObVtcpswjNu0r3wlNzkxFReJGU/F9szMWk566Vim0ivzADnWEsXzFPD/ wk1cWEMUtXD9jWGJmPffzjn4EWVs/vwz6AENI6nRIOyX/3SzVPwtULgfiWOKzLjsfmPi tioxk9uCoyDj/nlYsXgDbqZf0p3oLAYeeKvPlJXsyf9Tj1hhKuTcKBfntcrYEY1JjbEt ZWCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711777124; x=1712381924; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Zo19d7TJrVspFUl4rdHoFW+kSiH5BJ24WWY+10m6oFY=; b=Xl7qSIhdACU9YG15M4qW9w1jyy/q5F0T4tzAgHu4g+cKq53xJaDZgHZNt7lFZWgYSJ XG6IF8zTgEPzILDs3wKpE+exPYTHg2K6YO/ayiSN72EwTx3Kwvl2yMM7pa2VKFQEzKci VnjtgAMBzQjFpb2TAj/Vu8dewMtyLB40YX5P69cVQjCBV8nLTebDFEitzTzHIIDfLZL8 Y+Gn3lO2tvnF4nTKA7HVDL4hNHdzv5RdAVggRJtv/BOK/HDLGtDwj1n4Ex5JQaBo7ak7 XEifd8eWNGJywicmtoNeeNlLjoLULuYyGqfRqzeOHWDx3oVB9X5t++7in1Q8M90sBwkI X5+A== X-Gm-Message-State: AOJu0YycFY0X+FGqRB1NMV+Jcdn40lMzHhwjNp/3DLNYNlCLcIK5AHbO 0c5t1w+a3WQr7ve4cCYHIhkxtRXjlh+OQcHwzt5+oO1gbO9pBnw8lgZRNkHG X-Google-Smtp-Source: AGHT+IH92FVN4J7pdBAk4u44MlSB9bgWaKOUl0eZeIVetMr+OelqyJCZ674CYuR5eDBcHZPBLSxCIA== X-Received: by 2002:a17:903:444:b0:1e0:9468:e711 with SMTP id iw4-20020a170903044400b001e09468e711mr4392805plb.52.1711777123297; Fri, 29 Mar 2024 22:38:43 -0700 (PDT) Received: from [192.168.247.5] (d206-116-145-237.bchsia.telus.net. [206.116.145.237]) by smtp.gmail.com with ESMTPSA id u2-20020a170902e5c200b001d8f81ecea1sm4386485plf.172.2024.03.29.22.38.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Mar 2024 22:38:42 -0700 (PDT) Message-ID: <3fe654a8-74eb-4ba3-a7c3-acf4f81f2060@gmail.com> Date: Fri, 29 Mar 2024 22:38:42 -0700 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: gentoo-user@lists.gentoo.org From: Daniel Frey Subject: [gentoo-user] silencing distcc with systemd Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Archives-Salt: 2bd5497b-a03b-44de-8762-cd07df40f21b X-Archives-Hash: 5125fc8e4a1be0c22a50621ae7f42579 Hi all, I've moved a couple of machines from openrc to systemd. I have discovered this odd problem. On openrc, distcc was quiet during building packages. It would obey environment variable set in /etc/env.d: DISTCC_DIR=/var/distcc DISTCC_ENABLE_DISCREPANCY_EMAIL= DISTCC_FALLBACK=1 DISTCC_SAVE_TEMPS=0 DISTCC_SSH= DISTCC_TCP_CORK= DISTCC_VERBOSE=0 This currently shows up in the enviroment (checked with `set`.) However, on systemd it spams messages in build logs: distccd[290662] (dcc_check_compiler_masq) Warning: x86_64-pc-linux-gnu-g++ on distccd's path is /usr/lib/distcc/bin/x86_64-pc-linux-gnu-g++ and really a link to /usr/bin/distcc distcc[293558] (dcc_trace_version) distcc 3.4 x86_64-pc-linux-gnu; built Mar 28 2024 05:05:38 distcc[293558] (dcc_recursion_safeguard) safeguard: 1 distcc[293558] (dcc_recursion_safeguard) safeguard level=1 distcc[293558] (main) compiler name is "x86_64-pc-linux-gnu-g++" distcc[293558] (dcc_set_path) setting PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/17/bin distcc[293558] exec on localhost: x86_64-pc-linux-gnu-g++ -O2 -pipe -march=znver3 -felide-constructors -fno-strict-aliasing -pie -fPIC -fstack-protector --param=ssp-buffer-size=4 -Wconversion -Wno-sign-conversion -fno-omit-frame-pointer -Wall -Wenum-compare -Wenum-conversion -Wextra -Wformat-security -Wmissing-braces -Wno-format-truncation -Wno-init-self -Wno-nonnull-compare -Wno-unused-parameter -Woverloaded-virtual -Wnon-virtual-dtor -Wvla -Wwrite-strings -std=gnu++11 -fvisibility=hidden -o /tmp/distccd_9988a064.o -c /tmp/distccd_998ea064.ii distcc[293558] (dcc_mkdir) ERROR: mkdir '/dev/null/.distcc' failed: Not a directory distcc[293558] (dcc_spawn_child) forking to execute: x86_64-pc-linux-gnu-g++ -O2 -pipe -march=znver3 -felide-constructors -fno-strict-aliasing -pie -fPIC -fstack-protector --param=ssp-buffer-size=4 -Wconversion -Wno-sign-conversion -fno-omit-frame-pointer -Wall -Wenum-compare -Wenum-conversion -Wextra -Wformat-security -Wmissing-braces -Wno-format-truncation -Wno-init-self -Wno-nonnull-compare -Wno-unused-parameter -Woverloaded-virtual -Wnon-virtual-dtor -Wvla -Wwrite-strings -std=gnu++11 -fvisibility=hidden -o /tmp/distccd_9988a064.o -c /tmp/distccd_998ea064.ii distcc[293558] (dcc_spawn_child) child started as pid293559 distcc[293559] (dcc_increment_safeguard) setting safeguard: _DISTCC_SAFEGUARD=2 /var/tmp/portage/dev-db/mariadb-10.6.17/work/mysql/storage/innobase/fsp/fsp0file.cc: In member function ‘dberr_t Datafile::validate_for_recovery()’: /var/tmp/portage/dev-db/mariadb-10.6.17/work/mysql/storage/innobase/fsp/fsp0file.cc:419:16: warning: this statement may fall through [-Wimplicit-fallthrough=] /var/tmp/portage/dev-db/mariadb-10.6.17/work/mysql/storage/innobase/fsp/fsp0file.cc:429:2: note: here distcc[293558] (dcc_collect_child) cc child 293559 terminated with status 0 distcc[293558] (dcc_collect_child) cc times: user 0.000000s, system 0.000000s, 0 minflt, 0 majflt distcc[293558] compile (null) on localhost completed ok distcc[293558] elapsed compilation time 1.651658s distcc[293558] (dcc_exit) exit: code 0; self: 0.000832 user 0.000832 sys; children: 1.523681 user 0.134703 sys distcc[293558] (dcc_mkdir) ERROR: mkdir '/dev/null/.distcc' failed: Not a directory distcc[293558] (dcc_cleanup_tempfiles_inner) deleted 0 temporary files I was trying to solve this problem and it's normally set in the environment as above. I read systemd uses a different mechanism, but it doesn't work. I did set /etc/systemd/system/distccd.service.d/00gentoo.conf as per instructions I found on the wiki: Environment="DISTCC_VERBOSE=0" Environment="DISTCC_SAVE_TEMPS=0" Environment="DISTCC_DIR=/var/distcc" Reloaded using `systemctl daemon-reload` and restarted distccd - although this is happening on the client side and it's not really the daemon (as far as I can tell.) The output is showing up while compiling using emerge. I can see it's sourcing this file: distccd.service - Distccd: A Distributed Compilation Server Loaded: loaded (/etc/systemd/system/distccd.service; enabled; preset: disabled) Drop-In: /etc/systemd/system/distccd.service.d └─00gentoo.conf Active: active (running) since Fri 2024-03-29 22:04:12 PDT; 29min ago Is there some other place that needs this environment set? It clearly isn't getting the environment set somewhere in systemd as this error is solved with the DISTCC_DIR in the file sourced above: distcc[293558] (dcc_mkdir) ERROR: mkdir '/dev/null/.distcc' failed: Not a directory ...and the DISTCC_VERBOSE=0 is supposed to silence build messages. Any insight would be helpful... as this problem is easily solved in openrc but it seem to be rather difficult with systemd. Dan