From patchwork Fri Dec 4 13:47:34 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenwen Fu X-Patchwork-Id: 107323 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.8341.1796392067035782930 for ; Fri, 04 Dec 2026 05:47:47 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=D1cd2pg0; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: qualcomm.com, ip: 205.220.168.131, mailfrom: wenwfu@qualcomm.com) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B4BI5In3691971; Fri, 4 Dec 2026 13:47:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=LeCVlPJi9QKghLWCXuS4bTPcS8mxWMFi85B WJQsleIU=; b=D1cd2pg05XDtJ4A5OlLZf6nQBm9B93WW9ARMg7qzouBWhZYGDmi JqE5TQVNxrz/v4sSPYaNFEKZIGrhC9BlKB/L3T5eTra3XSdLUZBrRsCDD0MBhlV8 srLNCUX/bFKadlhYci6BI4xhpiLwXPmsI73359guWZ6A4NcTpJoXzFovd2G4ibac Bd9EvomRXGg6iItdDoVsfvtzhp/JINjIylnlPBsxPVedQb+XAJGEXJIt8nNF1vFJ sjjTKgBCOP8+wuD2g2axFP0NeDlxoGopZDz9AXVDfKIf3XYAqDsW3zrj90IzrHAs jxvg/qVCPXqeuS4x/HbmXYNpeh38D0GnX6Q== Received: from aptaippmta01.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com [103.229.16.4]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jbq7qsgj1-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 04 Dec 2026 13:47:38 +0000 (GMT) Received: from pps.filterd (aptaippmta01.qualcomm.com [127.0.0.1]) by APTAIPPMTA01.qualcomm.com (8.18.1.11/8.18.1.11) with ESMTP id 6B4DlaFD1033470; Fri, 4 Dec 2026 13:47:36 GMT Received: from wenwfu2-gv.qualcomm.com (smtphost-taiwan.qualcomm.com [10.249.136.33]) by APTAIPPMTA01.qualcomm.com (PPS) with ESMTPS id 6B4DlaTQ1033463 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 04 Dec 2026 13:47:36 +0000 (GMT) Received: by wenwfu2-gv.qualcomm.com (Postfix, from userid 3975139) id 1A85A3F2; Fri, 4 Dec 2026 21:47:36 +0800 (CST) From: Wenwen Fu To: yocto-patches@lists.yoctoproject.org Cc: Wenwen Fu , Chen Qi Subject: [meta-selinux] [wrynose] [PATCH] selinux-scripts: retain successful boot oneshots Date: Fri, 4 Dec 2026 21:47:34 +0800 Message-ID: <20261204134734.1807361-1-wenwfu@qti.qualcomm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Proofpoint-Reinject: loops=2 maxloops=12 X-QCInternal: smtphost X-QCInternal: smtphost X-Authority-Analysis: v=2.4 cv=Ne9zRGD4 c=1 sm=1 tr=0 ts=6b12c47a cx=c_pps a=nuhDOHQX5FNHPW3J6Bj6AA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=pUM-KoujPXoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=l1Qx80aHAAAA:8 a=vuWC69gRFTnaZK3v1c8A:9 a=WgdIQCTgsCNV9betECkp:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjA0MDA1NCBTYWx0ZWRfX2gV6ooMoHaE0 2Vvfr2gnJzg2IikZbPLM71UNCNeLsy5KKAmDBLyPh/AObepQE1BulrzNAPgG3F8qQw8D7r5lUyN TNJGYtCARVK6jGg7DDgSpcJzjyB03gyEzqOyn+oLdVVKzLNptnU+Ys2kDnGqGtn4XIP9FHI3eOo eAojmIu90N7yq2yXU2Na+FWvIQXtjNQZTU6Ghntzz1VxLFuZ5VYV/t5ILf6yWMQWqBy17gAiSDC KMkniKv1Z/dDlBa6Qms97ZdjklN430VoJDCPd1w0jVdetNuiGoB30eRbtHA3x5A+K8m9Hy0jVRu WZP376w/uvreN1OXzQzKlQ0wy/h3gALkYksXXeuG8ZY0C5hkHxTXE5UlhtMjenl6XdpA+6n1q42 V9esqfcYWHXQnirkTTTuoOYNhjMwcRy20WQcJ5nOqtsM0Oc+RnBj81eUVWseuiUtt/LAxFCJRn7 X0HrXtcJsos7jYlLDKA== X-Proofpoint-ORIG-GUID: lXLqJe7stvHLWhaYRl-E2ivGnIHnhRVN X-Proofpoint-Spam-Info: AW1haW4tMjYxMjA0MDA1NCBTYWx0ZWRfXzK2PTsovnR0v ILSzW6X9x9oIq5ounSYvGMJig+GVHplt8HUaqA0Px7WXLv+eU82OqQNXcv/cd0qZCkTmTZOzNsW cR7gVHrquVpFZs5KAgojJoyY3B5JtA8= X-Proofpoint-GUID: lXLqJe7stvHLWhaYRl-E2ivGnIHnhRVN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-04_02,2026-12-03_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 malwarescore=0 clxscore=1011 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612040054 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Fri, 04 Dec 2026 13:47:53 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/5675 The selinux-autorelabel and selinux-labeldev services are boot-time oneshots wanted by sysinit.target. Without RemainAfterExit, they return to inactive after a successful run. If sysinit.target is still pending, a later start transaction requiring it can enqueue these dependencies again, rerunning work already completed during the same boot. Repeated starts can hit the service start limit even when the scripts exit with zero. Set RemainAfterExit=yes for both services so successful completion is kept as active (exited), preventing later start requests from rerunning the scripts. Explicit restarts still run them again. Assisted-by: Codex:GPT-6 Signed-off-by: Wenwen Fu Signed-off-by: Chen Qi (cherry picked from commit 2765bc2c79dd232a41b48eb42a3793a311e638a1) Signed-off-by: Wenwen Fu --- .../selinux-autorelabel/selinux-autorelabel.service | 1 + .../selinux-scripts/selinux-labeldev/selinux-labeldev.service | 1 + 2 files changed, 2 insertions(+) diff --git a/recipes-security/selinux-scripts/selinux-autorelabel/selinux-autorelabel.service b/recipes-security/selinux-scripts/selinux-autorelabel/selinux-autorelabel.service index 3c2a576..54dd844 100644 --- a/recipes-security/selinux-scripts/selinux-autorelabel/selinux-autorelabel.service +++ b/recipes-security/selinux-scripts/selinux-autorelabel/selinux-autorelabel.service @@ -5,6 +5,7 @@ Before=sysinit.target [Service] Type=oneshot +RemainAfterExit=yes ExecStart=/usr/bin/selinux-autorelabel.sh [Install] diff --git a/recipes-security/selinux-scripts/selinux-labeldev/selinux-labeldev.service b/recipes-security/selinux-scripts/selinux-labeldev/selinux-labeldev.service index 96142a3..3f061ad 100644 --- a/recipes-security/selinux-scripts/selinux-labeldev/selinux-labeldev.service +++ b/recipes-security/selinux-scripts/selinux-labeldev/selinux-labeldev.service @@ -5,6 +5,7 @@ Before=sysinit.target [Service] Type=oneshot +RemainAfterExit=yes ExecStart=/usr/bin/selinux-labeldev.sh [Install]