From patchwork Thu Dec 9 08:39:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominique Martinet X-Patchwork-Id: 1565671 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=ARe7j6/F; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::d38; helo=mail-io1-xd38.google.com; envelope-from=swupdate+bncbcwivbv7sugrbrmby6gqmgqejtjmvaa@googlegroups.com; receiver=) Received: from mail-io1-xd38.google.com (mail-io1-xd38.google.com [IPv6:2607:f8b0:4864:20::d38]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4J8nX94hjtz9sCD for ; Thu, 9 Dec 2021 19:39:36 +1100 (AEDT) Received: by mail-io1-xd38.google.com with SMTP id e14-20020a6bf10e000000b005e23f0f5e08sf6244075iog.17 for ; Thu, 09 Dec 2021 00:39:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1639039174; cv=pass; d=google.com; s=arc-20160816; b=u9gkKoWJZ9G17sLsoVkIM7mmEsF+SWFNzufDnU6fCkl6R3flbFy9Qf44dLZZP616k1 O4l6CfJzLeoTltX/N3y5KQggUD17aaKmJRQkvcoJBTRynGXqBHlxEJJ+s08pHlFmwOSE PKRbb/CVAfutYTJKGtKaH3IHS7/wizLdpUqY3moREDdBKGTWKmoZYRRaA/ikZFd+zbfo DiixSF9dY3oXG3tSJ6T9SPz30cRdPTFlrNxr+nSlFPWqPFiUlimJv1blZqF7GX90dZ48 MHTGdiqOuSS4DsIadvMFr2yLtJfV6vRZX4b0MEBvXwjptU0JQX8LGd3zF3QJ6iZjelNh 5quw== 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:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=D8Gv6TSVd21rYCS4cobdCA+CC7SST9F1pEwzmGkmgyQ=; b=tPXitlHnsaCqT1sUwNcs1GJ8lDZj3cZumDmNIDTaeZbiHKCIasXlVavETKibnWUhX/ WH7SX2BsCjIZUmKTGMGVivAsIolmn2eETGfBq+BqcWZhX51TYAlWq6SlzIGoJccRYwC3 ho8YdAu93qf5qqho6S6envUvd/1QqEyVEl8+1xKwPdh/sbB38+Kmk7ECthgxCkaP/iQJ x5vkoSbqxTnf9C0Do74vzgvKFdbtsC9Hmgc0A0ZUmcxInirHk9IR1N+qxwlV9VdXMIeB /s2JPlWZvv8bP+CmQHPvYPu4boeh9MtDEJcqJ7bWUduOhuWe5Cd6cKUhklyznxjEQQt8 cioQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=D8Gv6TSVd21rYCS4cobdCA+CC7SST9F1pEwzmGkmgyQ=; b=ARe7j6/FihUNOheym893Z/pyb+RTpesGpWjCaKv3DFzZn5l0M8nEZbG9iSm1oEY6Hd zoTLyiJ3tfuUYJDCsc1ZjxLrIyR4V0QNOxVRik8ZhS3XPv2HEV/WLJa1Ikh/HuEj3yhg DRRjrLYYWStXwjy50wJ0ItSqW3a47zT/0EdsRhGb8JhE6LBDldb2cAjSxJDf6cTjFX+r 8Ak+v6IOc6J/f4VmNBYmOF8SwmuNRgsB1V7/7jKHhB+5OIJ44A4aB/OCqDl1q6HjoLUJ WC4mpcsGDg1Z7MfAwp8YdoWPnVtC6hBDtpSVJUX8Sps8qtz0hxfBwZ6vjkcD5n3zRXVX Ktrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=D8Gv6TSVd21rYCS4cobdCA+CC7SST9F1pEwzmGkmgyQ=; b=Iu6i5xOS+cFUamltvlQqpti5zHOspJE02/92hs/lutsxunuoK4Kxl11A2nWPSm7SIX yL18OW6OAH10n7XELCpCwWLIjoXnOzJT81PXYTqhlT/kKpVqtAhi0M9qxFvgTjLX8LHd ZV/O88ThSJ45ILEddgdLON7po+KFf4XEDcMgENCbBqkaVL/di4SYODd0jRKJ4WB1V/vb 1lc4OSMEdP2NW//BvWweUtk8Ax4/tvUiOC2U0qDkxBgysg878fZ9kIf8VLB5QCYou/YB r2X7HWrVdtf9hzaQQptDOTF9QGJO71kJBGSMtAxJwQ4wjEsAiQwj+U3wezllw+AgKBIM 9iOA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM530ZC27WDQu1JRlBk+oEPEQlLDDAoEexUq9Mccafe7NwN9EJ7rny yju0xbjuGLxt8ksNGEVW2CY= X-Google-Smtp-Source: ABdhPJx6NEduT699hBz1cKatDuekj9rGqdOLqkXXdeY47Hbxw3l8tSXulcLhy8fpks/yncoeZgynHw== X-Received: by 2002:a05:6602:1352:: with SMTP id i18mr13286619iov.195.1639039173918; Thu, 09 Dec 2021 00:39:33 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6638:1642:: with SMTP id a2ls449462jat.11.gmail; Thu, 09 Dec 2021 00:39:33 -0800 (PST) X-Received: by 2002:a02:9f87:: with SMTP id a7mr6898104jam.136.1639039173368; Thu, 09 Dec 2021 00:39:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639039173; cv=none; d=google.com; s=arc-20160816; b=YJ16sHl4a8RmkJM/XdLCdEuKlMI/4Lfw0jN8p0mFP9lh8AqtqstDcSvzvc+Rt8t4hc p7Zu7t9CjE32sCIMT4b0BkpzAHVttEiMUtPeR9UlormlETHysUZuV9huGgA4AI66bix2 6WjJ70eCNh3KFFp7uX9tOtgnQBp0eIuVd0UiFi0BWER6d8V9jCGk19RC6F6ZJEvWeh5S 0sbvwk/CEhhI5By1kWjleC1D3Zircb3NrcQxl5OKXtyZrYwnUNwwTSF5T28/UnIgyE9e uBwTz/1uwBgOahaQpjSj4pOgWLtIBYgQxZkv3Pp9+YmpC+my4uLWVyZS00+Ka+37tyJt +PCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=F7QqZupx8u8eRmTd0ey5aiQZL8MECWXZKwA0UjccaVU=; b=0Vp3UItjtyoKgCv5M+/g03I8BlcwfkRRu57Yv4zk5dUFbMtl82+A4lo3wsMWoB8jlY txk/VQyrZjIZHyex9Y11qD3tiyzjsw8OytpfDDOjEKbTT/Vzu/8ZJK+auxd9MpGyWWCr 6E+t45/68BXlT4mI7HkbF1EX9pQvPdRYjzcfu3iwyad77FqNxwNajVBKVcmMuibcHaWK 43ZZvV3p4nJqR4prA4xss1buBgEf2K8NyzB/WN4Cx0y/F9+7MZS4J7l5fYf1GRgEzuOu KCh3FR7gcM+q3TZqEj2Y25NQMfrxdKJssbVjkIO8HyQ6TKhmllem525W3i/k4r1BllJi gCrg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Received: from gw2.atmark-techno.com (gw2.atmark-techno.com. [35.74.137.57]) by gmr-mx.google.com with ESMTP id h11si247260ila.4.2021.12.09.00.39.32 for ; Thu, 09 Dec 2021 00:39:33 -0800 (PST) Received-SPF: pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) client-ip=35.74.137.57; Received: from gw2.atmark-techno.com (localhost [127.0.0.1]) by gw2.atmark-techno.com (Postfix) with ESMTP id 72B8F20CD5 for ; Thu, 9 Dec 2021 17:39:31 +0900 (JST) Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by gw2.atmark-techno.com (Postfix) with ESMTPS id 5354820CD5 for ; Thu, 9 Dec 2021 17:39:31 +0900 (JST) Received: by mail-pg1-f199.google.com with SMTP id z4-20020a656104000000b00321790921fbso2931295pgu.4 for ; Thu, 09 Dec 2021 00:39:31 -0800 (PST) X-Received: by 2002:a17:903:120a:b0:143:e4e9:4cdb with SMTP id l10-20020a170903120a00b00143e4e94cdbmr65196893plh.89.1639039170376; Thu, 09 Dec 2021 00:39:30 -0800 (PST) X-Received: by 2002:a17:903:120a:b0:143:e4e9:4cdb with SMTP id l10-20020a170903120a00b00143e4e94cdbmr65196876plh.89.1639039170132; Thu, 09 Dec 2021 00:39:30 -0800 (PST) Received: from pc-0115 (117.209.187.35.bc.googleusercontent.com. [35.187.209.117]) by smtp.gmail.com with ESMTPSA id n6sm5854595pfa.28.2021.12.09.00.39.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Dec 2021 00:39:29 -0800 (PST) Received: from martinet by pc-0115 with local (Exim 4.95) (envelope-from ) id 1mvExc-003w3j-Fj; Thu, 09 Dec 2021 17:39:28 +0900 From: Dominique Martinet To: swupdate@googlegroups.com Cc: Dominique Martinet Subject: [swupdate] [PATCH] doc: add documentation for archive handler Date: Thu, 9 Dec 2021 17:39:26 +0900 Message-Id: <20211209083926.938142-1-dominique.martinet@atmark-techno.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Original-Sender: dominique.martinet@atmark-techno.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , the archive handler was briefly named at the start of the chapter, but there was no explicit section for it. In paritcular, preserve-attributes is only documented briefly in sw-description.rst somewhere which has nothing to do with handlers, when the flag is actually only ever used for this handler, so it makes sense to re-document it here to clarify. Signed-off-by: Dominique Martinet --- While I'm spamming you with patches, here's one more... preserve-attributes had eluded me for longer than it should have and it won't hurt to bring it a bit further forward. Note the indentation in this file is all over the place, with tabs for some examples and spaces for others, and some sections with a bit of both. Since the delta handler section used space I went for the same. doc/source/handlers.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doc/source/handlers.rst b/doc/source/handlers.rst index ca4ea5a6707c..dc52cbbe2a69 100644 --- a/doc/source/handlers.rst +++ b/doc/source/handlers.rst @@ -781,6 +781,28 @@ the source - it can be a file or a partition. } } +Archive handler +--------------- + +The archive handler extracts an archive to a destination path. +It supports whatever format libarchive has been compiled to support, for example even if swupdate +itself has no direct support for xz it can be possible to extract tar.xz files with it. + +The attribute `preserve-attributes` must be set to preserve timestamps. uid/gid (numeric), +permissions (except +x, always preserved) and extended attributes. + +:: + + files: ( + { + filename = "examples.tar.zst"; + type = "archive"; + path = "/extract/here"; + preserve-attributes = true; + installed-directly = true; + } + ); + Disk partitioner ----------------