| Message ID | 20240221082221.11997-7-stefano.babic@swupdate.org |
|---|---|
| State | Accepted |
| Delegated to: | Stefano Babic |
| Headers | show
Return-Path: <swupdate+bncBAABBQXF22XAMGQEWPNY2JY@googlegroups.com>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
unprotected) header.d=googlegroups.com header.i=@googlegroups.com
header.a=rsa-sha256 header.s=20230601 header.b=H+YqP/Wt;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com
(client-ip=2a00:1450:4864:20::537; helo=mail-ed1-x537.google.com;
envelope-from=swupdate+bncbaabbqxf22xamgqewpny2jy@googlegroups.com;
receiver=patchwork.ozlabs.org)
Received: from mail-ed1-x537.google.com (mail-ed1-x537.google.com
[IPv6:2a00:1450:4864:20::537])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4Tfq5M0ffTz23d5
for <incoming@patchwork.ozlabs.org>; Wed, 21 Feb 2024 19:22:30 +1100 (AEDT)
Received: by mail-ed1-x537.google.com with SMTP id
4fb4d7f45d1cf-564d6955fc4sf680899a12.2
for <incoming@patchwork.ozlabs.org>;
Wed, 21 Feb 2024 00:22:30 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1708503748; cv=pass;
d=google.com; s=arc-20160816;
b=EEJ47GKelx5yUC5QmGVzeu7oWDVV6Mb+Xow2Q6lfYt76kremqFgTZjMmAJ8kYYrD3v
mqrIw+B2bkd6KKQInhplfBr4i6E2oX9BlnUQCuky0AVrXPQBc8s6uCTfLLrJNtDFLB5q
VhZeDhSTLceuylv4Zfrza9amw3eM5EoTWwJPIMuMJ/Jt2JYLdp3ficbTC7S/jt6ubgUY
nc+uyP1sGZv0s4fVBM30aPHR3rB4nIJioNtjg14XtXxYfPDMwETjK7v1Qtp5a0KzMqyX
CGVUtEL1XsIlmlI38VhGHfw+ZwNAMi0M99M7B33letaRaaMJsyV2aMCTys1n/Fd5mme3
bjNQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:list-id:mailing-list:precedence:ui-outboundreport:mime-version
:references:in-reply-to:message-id:date:subject:cc:to:from:sender
:dkim-signature;
bh=YSOpoEsvxZBr/Jln1NJlN09m6LNCxzmH+5sqKtSrskI=;
fh=n2ru78EJ1bDUXoy4Vb2Xz1PfShCQ3UwJNrX1BVS8780=;
b=H6y32rZ7uK1nBtOOJadX3zH/qx5uub+rdHaNi07B19kKP9z5MkFcIvWlxlDCZbO74m
i7fNlMNwWXq3BvIwtDxImiOcCZxUdgDwX+CTgfSdFTOfoTFBxbwiGiCdbNSvWwfU467s
xcFYWp63OVSRWPf05vNTjEUY1sXIHgHZKNroyTaBvCHBvyLgN1j15N9qldN7SyiDDcof
0Dc00O7mkzcPBk6CbS8qQOsBSCwyBdkyOXDhqT608WayVL0+adbG3w811adaa+QVHLjp
KUeIGyboI2jOtPOtflXNXrPheobUXVxiXhsF3at4ZbWA5w2M12rYxYHQXwosRV6S7KRW
DdYw==;
darn=patchwork.ozlabs.org
ARC-Authentication-Results: i=2; gmr-mx.google.com;
dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=c4aZd+Kd;
spf=pass (google.com: domain of stefano.babic@swupdate.org designates
212.227.126.133 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=googlegroups.com; s=20230601; t=1708503748; x=1709108548;
darn=patchwork.ozlabs.org;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:list-id:mailing-list:precedence:x-original-authentication-results
:x-original-sender:ui-outboundreport:mime-version:references
:in-reply-to:message-id:date:subject:cc:to:from:sender:from:to:cc
:subject:date:message-id:reply-to;
bh=YSOpoEsvxZBr/Jln1NJlN09m6LNCxzmH+5sqKtSrskI=;
b=H+YqP/WteXDv31u1rUnfjHxN+biMIHpIa2F3T+LdjOtaZ/ShmVsAYlaVgAUJhU4o72
NeTKbg8C6L6XqFXe0vcPY3d/+kVsdD2Nj+WIBZ4vSz1KudvFFIDmPy87vVUShXnS/JEC
l1q6IoXicV/RB6mIpt3kNG6LH5FIcyMPyA5QNXC1wDt6XMK0m3R1Swk0DmU9DuaCu8O4
khIrL23gaCNbtiKt+sVLQBL4CVLppkRzkFZLvX+GOIk9K3HbTSPAwbjuh7U+jfBrzJZe
nMsaBxtMUHa+0T8e8xcpYgx9pEmLvMYagI+vpzpL7xogVcmflYcqlZOsY02BTsmYCY7p
pTag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1708503748; x=1709108548;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:x-spam-checked-in-group:list-id:mailing-list:precedence
:x-original-authentication-results:x-original-sender
:ui-outboundreport:mime-version:references:in-reply-to:message-id
:date:subject:cc:to:from:x-beenthere:x-gm-message-state:sender:from
:to:cc:subject:date:message-id:reply-to;
bh=YSOpoEsvxZBr/Jln1NJlN09m6LNCxzmH+5sqKtSrskI=;
b=osHjKKnMz/81a8cS4SxCAm4zTwcVn3qCztJUZrBKUrTlHYzFxflB1zKCR49HhjC8mL
UlMa9lfydgKPIgeLm+le2BsLk98TF2HJieW1laOw/LIHwizND8CCZsWmGDDlkVGpgShv
OyKul9R6+ByfFmT6Q9vNwreS1MqUuPVqwHaC+snva3SkBshY+A05ckKTkgjdmkwlSSFF
7LjwsTzDBxCuv5mvkNEXv5+7PVCw3bc4zvNpmwt4CFOXaTRHocsPFXY5EhmkjVe/z1q8
Myn/lVPt9ugE8W/0HYIPFQExZmU7zaIRa9T1xkZxR+7Vwetot04EBj0ef9aEcAFTSH9d
hBTQ==
Sender: swupdate@googlegroups.com
X-Forwarded-Encrypted: i=2;
AJvYcCUF0Mec4NxAPxwOFOFXdsSTYJ1lnopOKqvJODygsXS72CgOoFF8B2davvOLHihwqyCBa01RkKr2LeMas2u2rZc5UXsQnaHg/OL0/140sA==
X-Gm-Message-State: AOJu0Yw8aWJejl2XKzBhnQONbiA9PqZqW8CRok/xcIFcFCx5NVO0pVAS
HaKB9QRzJj/yd7y74NVXDmJXhVcrVv45c5iI+Fip259JPiPum5zw
X-Google-Smtp-Source:
AGHT+IEIS+iHv/ub92YE1birfByuvNGM1PYG4Te4tTgWqjNBOfOJpg4fxqSAkcYwy/OonOZch/e6uw==
X-Received: by 2002:aa7:d74c:0:b0:564:20f5:6926 with SMTP id
a12-20020aa7d74c000000b0056420f56926mr7763999eds.14.1708503746851;
Wed, 21 Feb 2024 00:22:26 -0800 (PST)
X-BeenThere: swupdate@googlegroups.com
Received: by 2002:a05:6402:5293:b0:561:2701:7e02 with SMTP id
en19-20020a056402529300b0056127017e02ls956594edb.0.-pod-prod-07-eu; Wed, 21
Feb 2024 00:22:25 -0800 (PST)
X-Received: by 2002:a05:6402:31e1:b0:564:bcb1:45f6 with SMTP id
dy1-20020a05640231e100b00564bcb145f6mr3162318edb.15.1708503745026;
Wed, 21 Feb 2024 00:22:25 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1708503745; cv=none;
d=google.com; s=arc-20160816;
b=BdZe+keMRhyEIDrsLLevhSCDCkx+Bxm3tKHwt6U+d4mh4HSNO9dpg5HZklWdBXxA0+
wttbaP12IMk1FhEkUOCslWDmGYzN5GCbjdQP3p7OQDdH7oCYCIWidSdKsfwysXcFnV5f
r9hzp7orVN/F7vAyBTSo63qry2yp/nmd2Ke6BPfvOSQGBsQaJoAq6WTKDqoCGFJOsGuU
FSrnfTh/OXLVqMPX4bYfa3o1r1NuBaV5SHUaXLjEbpIe2yEWH+mE0oLmea52tSLhmoTj
BLuIU+QKM/MgSjURkxlBsSAoc1xDTbWETNHxRcYWnwsljcy4iv2iwzznpZLHN3RP4S97
j4Fw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=ui-outboundreport:content-transfer-encoding:mime-version:references
:in-reply-to:message-id:date:subject:cc:to:from:dkim-signature;
bh=AUNqii4CA9Ah2ZBmCu3MNvpI+O/AmsnpwFxC37T0rCA=;
fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=;
b=l6wtGPFmtNkx3LCz9+/FkZCkIoBB6JZMp6Qw6ciM0/ZeJA2pPg338m5xOQW8cjwzKN
1+0cu1R8S+aJGiEBWk2RO+VeOlBkyFG0a5uxLcd1sc8uE84Kx7AK6MfU0HzyQZj7tr7H
ss7kbC7eDLSJVbgB9HJDcKKYn97Q8TbhYyrnIo4IhMkgH8JJ/CKTDxhUclrIgyUVq9hj
D/e2zdFqUldoq1XSlRpMiB2/RXJfBxJ1/ijXV3MYfncvmKDoxJvZmDdB2kQkBWeiOapD
EeYi+EFx+t4qobu00eI+ZH/Wx9afHY62djY1oBqMWLoFLJWjF1Pq814slWL25wfY3oRF
kVlw==;
dara=google.com
ARC-Authentication-Results: i=1; gmr-mx.google.com;
dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=c4aZd+Kd;
spf=pass (google.com: domain of stefano.babic@swupdate.org designates
212.227.126.133 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org
Received: from mout.kundenserver.de (mout.kundenserver.de. [212.227.126.133])
by gmr-mx.google.com with ESMTPS id
x2-20020a50d602000000b00564af3e693fsi312797edi.5.2024.02.21.00.22.24
for <swupdate@googlegroups.com>
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 21 Feb 2024 00:22:25 -0800 (PST)
Received-SPF: pass (google.com: domain of stefano.babic@swupdate.org
designates 212.227.126.133 as permitted sender) client-ip=212.227.126.133;
X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6
Received: from paperino.fritz.box ([88.217.136.221]) by
mrelayeu.kundenserver.de (mreue011 [213.165.67.97]) with ESMTPSA (Nemesis) id
1MIdNt-1rfgYf2MWj-00EhEd; Wed, 21 Feb 2024 09:22:24 +0100
From: Stefano Babic <stefano.babic@swupdate.org>
To: swupdate@googlegroups.com
Cc: Stefano Babic <stefano.babic@swupdate.org>
Subject: [swupdate] [PATCH 06/13] Introduce entry for post-update failure
scripts
Date: Wed, 21 Feb 2024 09:22:14 +0100
Message-Id: <20240221082221.11997-7-stefano.babic@swupdate.org>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20240221082221.11997-1-stefano.babic@swupdate.org>
References: <20240221082221.11997-1-stefano.babic@swupdate.org>
MIME-Version: 1.0
X-Provags-ID: V03:K1:vVvsyVNTK5AxvV3qxoYYLP8AYAfbkni7F+wuceyKw5thaJWFuqE
WfFTaVtIDCm8+Qs2PRZ0JE0xRCZZ413j8EoAeIZ7QoICVtCv2g/QxXnjMCw1CQThtTwMS5Y
OtLQUlva67tls9FOmZtMZcBvy+la4HaUJEimXF8KfgihVs7UVrRBOUMBjEoXYJ6a8ODUQaH
JtwOfsEgsC1GkL9YW0ZFg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:CzPKjlRBDXY=;kHeTVxp3PkY/+bPyDvyH9PZ+oCf
rzWuiYYfsC0and1+oNqKLWlRFNOmvumrw/pzXo9MtZH9A2iqtzIxxQwuD7tTjI2zA6WKYftbp
AxefbaEwYt3/MlKxJrbH0SByAoRH0fDag46SSCJfBzqlKY+1AN1tC2C+/J6wq/0IkFysNg/zP
BnwkMFj8nJVa2Hu3j08qjM0WYw1FZiRQ2Nq2RBTQOSrdVrrFZhTtxyvn2aUbwg3aJi11z5Ai7
TElfJWRT9c/fjbDKVXJJSKl+Om62WLSUc8Va16tOJjmwLCTE/FTfpGRte0Def9Blxoq27/szz
eci9alQqk2qz5dtgtsPAwCClSqZuriEAeP11IaDIGp1INWWD9fq0n9R3oLwiOcE5BztU0OxZn
jtQP8w4ImPSNMsWDSgYOaQfjXlThlfFLHBaSf7r5X2sinR+7bO4aENHkth2hnnrjJK3hSiB/b
zwlcazVQzm1U4xKA8NfQ81E0jR+Fk7GhaSeQej5JdxRVsVTUf+kuq703FofLykDrRS3vnpBmy
1qEdOEclgZNgj0H5ACrB/0Zm4Kqom4iplnpTF+0RpBIoHDDwIWs3mxnJek+JxCYY4QWjjXzVn
e8E4akTz4+XdAnl7XXZswLdIPdCx9n4atfm6D/PDnBOaMmzcXZ7sdmf7yC6lh0pXTRr+WV1M9
1dUjjJO469LNrkLx0eKDQ/FoLMD+mUdv+fTlwrgO5/2w9w1WGG+kGbVJi37vRCSBGobx/M6gY
iPaqjXKfwQelU/ns6UZ9dhuq/wpv8WCggmgAWmo4q4xX06Z56rxNvE=
X-Original-Sender: stefano.babic@swupdate.org
X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass
header.i=@swupdate.org header.s=s1-ionos header.b=c4aZd+Kd; spf=pass
(google.com: domain of stefano.babic@swupdate.org designates 212.227.126.133
as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org
Content-Type: text/plain; charset="UTF-8"
Precedence: list
Mailing-list: list swupdate@googlegroups.com;
contact swupdate+owners@googlegroups.com
List-ID: <swupdate.googlegroups.com>
X-Spam-Checked-In-Group: swupdate@googlegroups.com
X-Google-Group-Id: 605343134186
List-Post: <https://groups.google.com/group/swupdate/post>,
<mailto:swupdate@googlegroups.com>
List-Help: <https://groups.google.com/support/>,
<mailto:swupdate+help@googlegroups.com>
List-Archive: <https://groups.google.com/group/swupdate
List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>,
<mailto:swupdate+subscribe@googlegroups.com>
List-Unsubscribe:
<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,
<https://groups.google.com/group/swupdate/subscribe>
|
| Series |
Extend Lua Environemnt and post-failure scripts
|
expand
|
diff --git a/include/handler.h b/include/handler.h index 36e860b3..509a89ac 100644 --- a/include/handler.h +++ b/include/handler.h @@ -11,10 +11,18 @@ #include <stdbool.h> struct img_type; + +/* + * Identify the type of a script + * A script can contain functions for several of these + * entries. For example, it can contain both a pre- and post- + * install functions. + */ typedef enum { NONE, - PREINSTALL, - POSTINSTALL + PREINSTALL, /* Script runs as preinstall */ + POSTINSTALL, /* Script runs a postinstall */ + POSTFAILURE /* Script called in case update fails */ } script_fn ; /*
There are cases where an update fails, and some glue logic must be added to restore the system before update has begun. To help this, introduce FAILURE scripts, that should be called only in case an update fails (and they are in alternative to POSTINSTALL). Signed-off-by: Stefano Babic <stefano.babic@swupdate.org> --- include/handler.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) -- 2.34.1