From patchwork Sun Jun 12 23:54:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijai Kumar K X-Patchwork-Id: 1878 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Mon, 13 Jun 2022 09:54:34 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-il1-f187.google.com (mail-il1-f187.google.com [209.85.166.187]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 25D7sWqI028097 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 13 Jun 2022 09:54:33 +0200 Received: by mail-il1-f187.google.com with SMTP id y18-20020a927d12000000b002d3dd2a5d53sf4160505ilc.0 for ; Mon, 13 Jun 2022 00:54:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655106867; cv=pass; d=google.com; s=arc-20160816; b=tKS/FOKa/t5YY3C+2Wu7W8YuZu6kJucsKFFcOi5k7zvX3OD8Yq0oja1BIBO//2WgTn gYDjEtFpw3L4Q7u7sntfwlRwXR+gDl9fVCbdsEDjodfpdoLBUX0FHfAaLQ0k5B0UE9ov kZ+pMFfdgBrRq+lDuXk++NgRm+/5s214a8hr+PVpHKj/VXwdnHfVhAdBl/oNUfoJPlrd r2+YNmIZL9yTwfXm5W5IT1Iin04AJ8LRsQ1Y87ThooT1eUzl7Qwy5JGFOKuEawjtyJ5u by58zyDdrge/4Rre44dg/Ht6SYrCGzXtZ8YHMjoSAUsnCNNbyLr51p4g1WI0edWuYKPP SB0w== 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:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:sender :dkim-signature; bh=hdjrGazbLd/O4PeihFYgvkeVJAl9nlTHOaV6ZdUg/bk=; b=Wz8lVoKgFkxpOcbazDWhjTYURXzzkDUKOC2KNr2/s57C0FpZxi4H/mR09TzodCiCKK NWd5kKwOadIfstTVP/yzMnL8Rsh2hGYXSlTefvgfi4DjG+WBXW8hMQh9Dm3c7YDVtgyG 9TG+NzRQ4Eo6pQiIxzFdBD/knxPr057Jat5tXZDomxDNGtczfiQf9mM7szLQOv4zr7FH GpG5BZ2M3iFbisHkuX+9gkPen+6oFALCYiqhZCDwtBnMHySDUNo/JDmkWGbDVWS4XqWx YGqJJN/C/qi4h/LsGHmMTRMj8iwb6OVS4Wuj2fUdIf2XHCNxNuhPYpk5rWjAFmiu0+u2 znEg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:ironport-sdr:from:to:cc:subject:date:message-id:in-reply-to :references: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=hdjrGazbLd/O4PeihFYgvkeVJAl9nlTHOaV6ZdUg/bk=; b=SCPc7+QVK8WEdnIY85GAE+53+klfCMJS/32uWEruM7Z/FI6V/erty4bRCsuz9DXZT+ h78U6ii3059cYOlssN1/DPfu8dxMZ3+I2vjG7rmRu/H8Em81FyyjvPtXGQ0Kf52nfVDB daLbNGkbrtrM5vZ+6UkqW49WPBDkQdbn73zkFXbi7aQEPTxPPtC8wigmN/+TiaKBGWqB hHB41S/rMPPIe0zRaiUGwRLVPKgaHXRa5+kJ/enefyy20PfGaOtTVXTXRRcFP20Ph1pK yQvv6TDKkj4aZdz1xGhpd7jOCoAs5Q7KtbvY4z4+MuMP59qgl7+x6BHA3ZI8/UHOoMqa NrAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:ironport-sdr:from:to:cc:subject:date :message-id:in-reply-to:references: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=hdjrGazbLd/O4PeihFYgvkeVJAl9nlTHOaV6ZdUg/bk=; b=aDVXVUYh2eiIplzo137hQ3WH64YOCOeOOPFKz4su1BIurHAxQoTJsA75Y18eM+tGdW dSnihgGLSV0Q+nkCpseJ+7mwCnS4GmYB7oHiKjRpOI6WIo3TBcWc7GfV/3uJ+AW/B3rx RazRmQDgpkAGPqxFwIZyNtaL//WHuSJ5nG3YRKnP1pFCvLgs6Z55LfFRHizyt/kHilSZ hP6w2/QgXwN4oMPfA2V25o0xn7b0kIaP1BYXmhOJXtsWBayX/9TuxjGZyrCVAeOGWuz4 ZVp0Gt9IdVq+GQbnTMN/bHPJHrmT+hyInTJNnX8MDbVbtek2oAfH+9i0aXsRc6wDKv03 jbHg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530dYiw0H3mhunOlogPS9y1SWTMbKbGv7T0h4FH8gF+FmILrM2UY Nk8zUYMzUdzFhXSQlxBJYfQ= X-Google-Smtp-Source: ABdhPJyu5SSkwX3fQTjECkh8FpO/+lZtZAhAfurl4/ICyeHPirbwJcI2Lsc5K47/+jASps2fW2qE9A== X-Received: by 2002:a05:6e02:20cc:b0:2d1:a5d6:b78c with SMTP id 12-20020a056e0220cc00b002d1a5d6b78cmr30950783ilq.160.1655106867272; Mon, 13 Jun 2022 00:54:27 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6e02:178f:b0:2d1:b9cc:3abd with SMTP id y15-20020a056e02178f00b002d1b9cc3abdls771032ilu.1.gmail; Mon, 13 Jun 2022 00:54:26 -0700 (PDT) X-Received: by 2002:a05:6e02:180e:b0:2d3:c497:710 with SMTP id a14-20020a056e02180e00b002d3c4970710mr32022722ilv.166.1655106866786; Mon, 13 Jun 2022 00:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655106866; cv=none; d=google.com; s=arc-20160816; b=OsIl2KpRTe7REvsHAxSaGfcfEP+nekQEqTAnpUQuBagNzRtOWhfyM2tEPZcLQXPw/8 u69ot1wcuP/+Iotn4c7EBnAtu0MmvZ9iN4LVlzM90BiqL8WI1IxXTNRidQfQMQF1i94L GejsSWbpq042qmTjpAERy+f7Fxp9uEUwbJqaJNUpSlUjvx0vJoKtANVdoq4Zdp8cd89f d5LF2FLxFhd1AcBYBA2DfeGv8OGpFZCF3Tj0nvjb2xrB2vxmPFgudOOzgDnP5UzwwU6k YQF/bLgb+BIE2uwj28XRMfQqr1hEqMneuKocEIBYjsRbmgGF/yl2hRlM+FSFOPx2AeYy Jphw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr; bh=Zfb0uJf2HgN2QKa/a0MwarJQM2LFkXv1RWeewf1d9pQ=; b=Lobdmpfn6Hj5xJDRl3Q7MPivCIeTWB+/Tm3skHibyRy9XE9x+uCg1YdRxXheFTbjLE 4+Oxot/2k969a9YLE84+Rx4ywVsX6+6K54NTVqdrtWxKwuqBkwyb4czNLMQon/zo7CBu eleKloYk1EApnFxk6hpFNv+jyJzdOxAak1y103Ijms9sUx4kMOLoZJOGrj8FAKN4AOcI i51phaP6hr+ujg9lCQN3xOFIqRKDYFDXn4POnGZCo0V4CSNbxv0MVa/D33TSEaZxmWRG N/rkFtoqzbWFULV7yJjPuglH2ZQrX6qORSRx+x1qYyCd+oNFeSyp+hzp/XQ5jNkh44UR qWfA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com. [68.232.129.153]) by gmr-mx.google.com with ESMTPS id v10-20020a056602014a00b006495f98f57asi281003iot.1.2022.06.13.00.54.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jun 2022 00:54:26 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) client-ip=68.232.129.153; X-IronPort-AV: E=Sophos;i="5.91,296,1647331200"; d="scan'208";a="79831823" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 12 Jun 2022 23:54:26 -0800 IronPort-SDR: pPPkf2uJrHKu3BEJnvDmENfxeVK3Si4oBeQfRSOu1zYWTWlnumAEK8ey5bNpx23BKEuOD1AjKl jhQpHVejFJfYwWljWTcV7wUjmRO9ebWuuMGDutV9LDuzXHsZh/ZHXjgYAEW/mJj7rqibfrgxOU LIXtY7YsY+gGGfWzk0oZCKRH7F7tLeo+NOvtgYhykeRtAzUZauTPFPwMiKNDk2Z19XgC/YRD9e 3ZaKNKk3GxKTfmLgdtLS1JYhNILexF+ijwaqv6R4wTOdOZXdpJbHgOOOUaTOVCNTxQXshZ76Tz VNo= From: Vijai Kumar K To: CC: , , Vijai Kumar K Subject: [PATCH v2 2/2] wic: Update to the latest revision Date: Mon, 13 Jun 2022 13:24:01 +0530 Message-ID: <20220613075401.2059119-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220613075401.2059119-1-Vijaikumar_Kanagarajan@mentor.com> References: <20220613075401.2059119-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-11.mgc.mentorg.com (147.34.90.211) To svr-orw-mbx-12.mgc.mentorg.com (147.34.90.212) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: INBOX Update to the latest wic from OE-core. OE-core Revision: 06ed2aa93fc25a681e3a00ee120d9395b04845da Signed-off-by: Vijai Kumar K --- RECIPE-API-CHANGELOG.md | 19 +++++++++++++++++++ scripts/lib/wic/help.py | 6 ++++++ scripts/lib/wic/ksparser.py | 1 + scripts/lib/wic/partition.py | 1 + scripts/lib/wic/plugins/imager/direct.py | 5 +++-- 5 files changed, 30 insertions(+), 2 deletions(-) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index 2998824..436b204 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -406,3 +406,22 @@ groups are now created after all packages are installed. Changes in next --------------- + +### Wic adds / mountpoint to fstab + +In the older version of wic, any mount point named / is skipped from adding +into the fstab entry. + +With the latest wic, this is not the case. / mount point, if any, is added +to /etc/fstab for automount. + +Any wks file which assumed that / would be skipped from /etc/fstab should +now be corrected. Otherwise, it might result in multiple / entries in /etc/fstab. +One by the image_configure_fstab function from image class and one by wic. + +Below is an example wks entry that might cause an issue. +Replace "part /" with "part" to avoid adding duplicate entry for /. + +``` +part / --source rootfs --ondisk sda --fstype ext4 --label platform --align 1024 --use-uuid +``` diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py index 4ff7470..73e3380 100644 --- a/scripts/lib/wic/help.py +++ b/scripts/lib/wic/help.py @@ -940,6 +940,12 @@ DESCRIPTION quotes. If not specified, the default string is "defaults". + --fspassno: Specifies the order in which filesystem checks are done + at boot time by fsck. See fs_passno parameter of + fstab(5). This parameter will be copied into the + /etc/fstab file of the installed system. If not + specified the default value of "0" will be used. + --label label: Specifies the label to give to the filesystem to be made on the partition. If the given label is already in use by another filesystem, diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py index 0df9eb0..a49b7b9 100644 --- a/scripts/lib/wic/ksparser.py +++ b/scripts/lib/wic/ksparser.py @@ -155,6 +155,7 @@ class KickStart(): part.add_argument('--change-directory') part.add_argument("--extra-space", type=sizetype("M")) part.add_argument('--fsoptions', dest='fsopts') + part.add_argument('--fspassno', dest='fspassno') part.add_argument('--fstype', default='vfat', choices=('ext2', 'ext3', 'ext4', 'btrfs', 'squashfs', 'vfat', 'msdos', 'erofs', diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index 09e491d..e50871b 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py @@ -33,6 +33,7 @@ class Partition(): self.include_path = args.include_path self.change_directory = args.change_directory self.fsopts = args.fsopts + self.fspassno = args.fspassno self.fstype = args.fstype self.label = args.label self.use_label = args.use_label diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index 4d0b836..c44159b 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py @@ -117,7 +117,7 @@ class DirectPlugin(ImagerPlugin): updated = False for part in self.parts: if not part.realnum or not part.mountpoint \ - or part.mountpoint == "/" or not part.mountpoint.startswith('/'): + or not part.mountpoint.startswith('/'): continue if part.use_uuid: @@ -138,8 +138,9 @@ class DirectPlugin(ImagerPlugin): device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum) opts = part.fsopts if part.fsopts else "defaults" + passno = part.fspassno if part.fspassno else "0" line = "\t".join([device_name, part.mountpoint, part.fstype, - opts, "0", "0"]) + "\n" + opts, "0", passno]) + "\n" fstab_lines.append(line) updated = True