| Message ID | 20261029121134.93697-1-valter.jansons@gmail.com |
|---|---|
| State | Superseded |
| Headers |
Return-Path: <location+bounces-73-patchwork=ipfire.org@lists.ipfire.org>
Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519)
(Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified))
by web04.haj.ipfire.org (Postfix) with ESMTPS id 4jFjl30mRSz3wwg
for <patchwork@web04.haj.ipfire.org>; Thu, 29 Oct 2026 12:11:43 +0000 (UTC)
Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org
[IPv6:2001:678:b28::201])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519)
(Client CN "mail02.haj.ipfire.org", Issuer "YE2" (not verified))
by mail01.ipfire.org (Postfix) with ESMTPS id 4jFjl30BDYz5jB
for <patchwork@ipfire.org>; Thu, 29 Oct 2026 12:11:43 +0000 (UTC)
Received: from mail02.haj.ipfire.org (localhost [IPv6:::1])
by mail02.haj.ipfire.org (Postfix) with ESMTP id 4jFjl26T2Vz3028
for <patchwork@ipfire.org>; Thu, 29 Oct 2026 12:11:42 +0000 (UTC)
X-Original-To: location@lists.ipfire.org
Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519 server-signature ECDSA (secp384r1 raw public key)
server-digest SHA384
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified))
by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4jFjl21knCz2xQT
for <location@lists.ipfire.org>; Thu, 29 Oct 2026 12:11:42 +0000 (UTC)
Received: from mail-dy1-x1329.google.com (mail-dy1-x1329.google.com
[IPv6:2607:f8b0:4864:20::1329])
(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
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "smtp.gmail.com", Issuer "WR4" (verified OK))
by mail01.ipfire.org (Postfix) with ESMTPS id 4jFjl11jftz3xV
for <location@lists.ipfire.org>; Thu, 29 Oct 2026 12:11:41 +0000 (UTC)
Authentication-Results: mail01.ipfire.org;
dkim=pass header.d=gmail.com header.s=20260707 header.b=0maXZk69;
spf=pass (mail01.ipfire.org: domain of valter.jansons@gmail.com designates
2607:f8b0:4864:20::1329 as permitted sender)
smtp.mailfrom=valter.jansons@gmail.com;
dmarc=pass (policy=none) header.from=gmail.com
ARC-Seal: i=1; a=rsa-sha256; d=lists.ipfire.org; s=202003rsa; cv=none;
t=1793275901;
b=lIrfJrPPYezr6lsVsIK4et2LOZfNMxFDKcaeVZKBjjt3uhdq+hMi8/7Vmlj8/fMsobrVij
chOniF/b5i6vu5ZbsNRS3qucW4h+9IM6NH6ElkqVwoSjSRoTxLdAnwmoFV/7RgWK+HqX0P
KBYwnA+/lKN9t17piATv/nfkg0uRULe94+1ERyKq6hlPp5t7GAvVivGT55q3a3reg2d+ER
gw6dBALNDMLFnAasC5zG/4o+JgMuAiT4d1hHy+le99w4Yedp/YON02ELwA4AnqzfadkGu1
5uuPqQsBld/hzkhr+E8E5WIqDz9GdepF7Lf2ciLxQfAt2WAr0uJYt6vBM79mbw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=lists.ipfire.org;
s=202003rsa; t=1793275901;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:
content-transfer-encoding:content-transfer-encoding:dkim-signature;
bh=JPoLnOwEMO+rv0EjzauUtl5Qwq2zFJh+ZTgDiTNnXJY=;
b=eYlVfCtUXEqfw7ZyrJMBWm3FMH7/HMJfp+5BRedhvTSerH/piAzMCPszHkXRqlEfXhkVZP
+Rcr+L7KO8ZujwD46BJ3nLAaggnIHnDMDyGmWNJvpLNK4itX9aXr/UYDx86EWvg0rCp2hJ
Hvd5971PN+SmSvgeZAN8mVI6AHTjyviViGPqsGURs0f1crsmjm3XL3oMuq2mQEJQi6Nh4V
N+tGXkN0xG4JFx963W1trroLHmVKEivXOAJrjlctEH+qnolX013HGqYqnfMgpMONed72LR
9mJMSCojy86Z0FNTyaaq5ikUJlq5W9aAMsVFy1yFEPKiAct2a8zc2AJz2tNNpw==
ARC-Authentication-Results: i=1;
mail01.ipfire.org;
dkim=pass header.d=gmail.com header.s=20260707 header.b=0maXZk69;
spf=pass (mail01.ipfire.org: domain of valter.jansons@gmail.com designates
2607:f8b0:4864:20::1329 as permitted sender)
smtp.mailfrom=valter.jansons@gmail.com;
dmarc=pass (policy=none) header.from=gmail.com
Received: by mail-dy1-x1329.google.com with SMTP id
5a478bee46e88-33fb4680717so1130629eec.1
for <location@lists.ipfire.org>; Thu, 29 Oct 2026 05:11:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1793275899; x=1793880699;
darn=lists.ipfire.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:to
:from:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=JPoLnOwEMO+rv0EjzauUtl5Qwq2zFJh+ZTgDiTNnXJY=;
b=0maXZk69wcd6Zl79uFZ/x8c31fzdhQ0CVGx3a/FmEdSBs1rl7ArPyP1hQQpephRvsq
CxstP9SwY3OE0kOG60Queoh+qWQPHGbFOMVdq7ath7P6XsM9ozA2B+8EhgAecZ+e4M2b
vhJIz7dSqFi8jd1s9qR96klvgjC4+HY3t0yOChxgATdY9imKOT035xUoDaLVmFPAPS0j
SZ0GbDzfrrCl4SYZxPsJZBC9ppGZI4iljNTayqAlZoe0iI4Vgs+1m1iMtAhBvX18LXGT
NtuEkCFcFBEBtb7oTYzUb8cnv9eBvRmYoKfU4tjW6y37eiTK8pNER5uyCfKmi8/W9FwB
Td4g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793275899; x=1793880699;
h=content-transfer-encoding:mime-version:message-id:date:subject:to
:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to:content-type;
bh=JPoLnOwEMO+rv0EjzauUtl5Qwq2zFJh+ZTgDiTNnXJY=;
b=d2ybsnnuOCvaBcUNxwUbLe5bdo2LsAH4NWjGCffSZZlBw0m94icfRjy+nzduBmd1Hj
66KhJsJ00BUzrQ09pdB4IFS5TgsQp8iYQyzGBCuh5aAwwvGKZgENpIjq362JpdlFimVM
tbMD/KvcVn/RqrBxgnaAdgpci0KFtBIeGC6e3taIVnJRA72adWxQLvxTlEwq49lJtTD6
n2LM13jkveL8OQd4QjyOjZBVYES2nb9vLqphDxx08PhdFeMtNMifc1IXAjwC4RgXyfJB
p6BDedd16g4jlOYXYfX+Bs3lVPoO1hyNebYhysYAktAwFsgFEBCP1Y7DVTaxwLZwK6hE
TE9A==
X-Gm-Message-State: AFq9FYK0BaeeBMKUyqnXdVyPwvlbzHhKwXYCdCyIWDtdVoCjDkC2Epev
fTReuMqMnRBUmD/NUmd9PExP35T/tL8GX+tPodZNeMZmBNlTkDibzjpa0w2aos2C
X-Gm-Gg: AYBFou0GKR1DqWOaFWToiVFCFO0FZ/yEx0E3ip9SRP2EcmiEifyK+O5GL/28o0dcuHV
At8Q+tGuXl8cwtqA2NWseJ7P3IvlfPbbOJfn4rVEvMVOl13oHFb0vCw4IeFRbQM8c7dUZyvZ0cV
DBE2JO+N6NWMJQLzrwMt8P3Z2UY3ExNUkXHgWvNVbvIGG4QDmg9rrJS+kEbr4F8LNiQzfscQWk8
DChcHQR0aIhrXWGBxsIA7pgJ2clsedxwd+BWXjSn+SjtvhLeRi+/kQS93NHCFwQw1avWImO2h8Q
ZXTlpL92n2hgKVdW9SMYTsjpCkMDSYN0Msj87+9LjcxWUNbB7fm8qCOUmuiEzcwwyv4890IlKWH
/U9e77YBBS1QVRgm+TmfAim0QTEutS+ubMWdqcWoijTGDR47S61jCBWIEXHXX/pJd+r+Nm06Iv7
pgT8K+WAwqItgkul4Lb8C0FwOUs5mRrtqUVZvq5HFCAb8R43jkYu9JfiLEMwWCOgIhGNSCQyy9q
+6xTyX5Z7AZeefxT9E+NJAvAyPq1QbEwvWQ0wPzl7kRIzrBTm5jxniVGAute/urc6vg7J3V+t7h
jNDwwkKBCzGiLCSnSfsxNeNiHPZBky0h5CUJamRhC/ki0w==
X-Received: by 2002:a05:693c:881a:20b0:369:4c3f:8a5 with SMTP id
5a478bee46e88-36a203cecbcmr8361024eec.14.1793275899087;
Thu, 29 Oct 2026 05:11:39 -0700 (PDT)
Received: from VT14-G5.localdomain ([221.146.12.107])
by smtp.gmail.com with ESMTPSA id
5a478bee46e88-36a239338e2sm20037354eec.18.2026.10.29.05.11.38
for <location@lists.ipfire.org>
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 29 Oct 2026 05:11:38 -0700 (PDT)
From: Valters Jansons <valter.jansons@gmail.com>
To: location@lists.ipfire.org
Subject: [PATCH] systemd: Standartize on Wants=/After= for network
Date: Thu, 29 Oct 2026 21:11:34 +0900
Message-ID: <20261029121134.93697-1-valter.jansons@gmail.com>
X-Mailer: git-send-email 2.56.0
Precedence: list
List-Id: <location.lists.ipfire.org>
List-Subscribe: <https://lists.ipfire.org/>,
<mailto:location+subscribe@lists.ipfire.org?subject=subscribe>
List-Unsubscribe: <https://lists.ipfire.org/>,
<mailto:location+unsubscribe@lists.ipfire.org?subject=unsubscribe>
List-Post: <mailto:location@lists.ipfire.org>
List-Help: <mailto:location+help@lists.ipfire.org?subject=help>
Sender: <location@lists.ipfire.org>
Mail-Followup-To: <location@lists.ipfire.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Rspamd-Action: no action
X-Spamd-Result: default: False [-6.84 / 11.00];
BAYES_HAM(-3.00)[100.00%];
R_DKIM_ALLOW(-1.60)[gmail.com:s=20260707];
DKIM_REPUTATION(-0.97)[-0.96776450034216];
SPF_REPUTATION_HAM(-0.78)[-0.7756594553143];
DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
R_MISSING_CHARSET(0.50)[];
R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4864::/56:c];
R_DKIM_ALIGNED(-0.10)[strict];
MIME_GOOD(-0.10)[text/plain];
MX_GOOD(-0.10)[gmail-smtp-in.l.google.com];
FREEMAIL_ENVFROM(0.00)[gmail.com];
RCVD_TLS_LAST(0.00)[];
DWL_DNSWL_NONE(0.00)[gmail.com:dkim];
RCPT_COUNT_ONE(0.00)[1];
FREEMAIL_FROM(0.00)[gmail.com];
ARC_NA(0.00)[];
MIME_TRACE(0.00)[0:+];
IP_REPUTATION_HAM(0.00)[asn: 15169(-0.30), country: US(-0.01),
ip: 2607:f8b0:4864:20::(-0.80)];
TO_MATCH_ENVRCPT_ALL(0.00)[];
DKIM_TRACE(0.00)[gmail.com:+];
ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US];
TO_DN_NONE(0.00)[];
RCVD_COUNT_TWO(0.00)[2];
FROM_EQ_ENVFROM(0.00)[];
RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1329:from];
ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1];
ALIAS_RESOLVED(0.00)[];
PREVIOUSLY_DELIVERED(0.00)[location@lists.ipfire.org];
RCVD_VIA_SMTP_AUTH(0.00)[];
MID_RHS_MATCH_FROM(0.00)[];
FROM_HAS_DN(0.00)[]
X-Rspamd-Server: mail01.haj.ipfire.org
X-Rspamd-Queue-Id: 4jFjl11jftz3xV
|
| Series |
systemd: Standartize on Wants=/After= for network
|
|
Commit Message
Valters Jansons
29 Oct 2026, 12:11 p.m. UTC
Current Requires=network.target is very strict. Standard practice is to
set it as Wants= instead as a lighter "should". The application can
then see what is actually going on.
Furthermore, an After= should be in place so that Systemd properly stops
the updater prior to bringing the network stack offline.
Signed-off-by: Valters Jansons <valter.jansons@gmail.com>
---
src/systemd/location-update.service.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
Hi Valters, Thanks for the patches. I applied the two Debian ones (psycopg3 and docbook-xml), but I have held back the systemd one. It sets Wants=network.target together with After=network-online.target. That doesn't work as intended: After= only orders the unit relative to network-online.target if something else pulls it in, and nothing does. So the updater can still start before the network is up. Your commit message says the aim is for the updater to be stopped before the network goes down, which is a shutdown-ordering goal. That is already covered by ordering against the target. For a service that needs the network, the usual pair is: Wants=network-online.target After=network-online.target I checked this with systemd-analyze verify and it passes cleanly. Could you resubmit it that way, with the commit message adjusted? Or tell me if you'd rather I apply it with that change myself. Best, Michael > On 29 Oct 2026, at 12:11, Valters Jansons <valter.jansons@gmail.com> wrote: > > Current Requires=network.target is very strict. Standard practice is to > set it as Wants= instead as a lighter "should". The application can > then see what is actually going on. > > Furthermore, an After= should be in place so that Systemd properly stops > the updater prior to bringing the network stack offline. > > Signed-off-by: Valters Jansons <valter.jansons@gmail.com> > --- > src/systemd/location-update.service.in | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/systemd/location-update.service.in b/src/systemd/location-update.service.in > index 50ba01f..b491a12 100644 > --- a/src/systemd/location-update.service.in > +++ b/src/systemd/location-update.service.in > @@ -1,7 +1,8 @@ > [Unit] > Description=Automatic Location Database Updater > Documentation=man:location(1) https://man-pages.ipfire.org/libloc/location.html > -Requires=network.target > +Wants=network.target > +After=network-online.target > > [Service] > Type=oneshot > -- > 2.56.0 > >
diff --git a/src/systemd/location-update.service.in b/src/systemd/location-update.service.in index 50ba01f..b491a12 100644 --- a/src/systemd/location-update.service.in +++ b/src/systemd/location-update.service.in @@ -1,7 +1,8 @@ [Unit] Description=Automatic Location Database Updater Documentation=man:location(1) https://man-pages.ipfire.org/libloc/location.html -Requires=network.target +Wants=network.target +After=network-online.target [Service] Type=oneshot