From patchwork Thu Jun 7 21:30:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 926525 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="owKOdRhT"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="N3mirNPS"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 411zH62bNMz9s01 for ; Fri, 8 Jun 2018 07:30:42 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=1oKybQ60wOP2ZhzRADKjyYckGG1bawSkM78IcfiwBYs=; b=owKOdRhTnki57z WbxNowRThDbQCHmluAOlhLOIP7flcsLxoQswdT4Fqiduxhq8PHxf7GfnSDyQwKqdmK+PXqbi+07tf WithPfhVnPHbNTWVgwY2j5BEIeSYVoeAkxX4dotRf8mlLeImqn17QGx1neJuDSwPikyA0GPg4pUSS ztiXyCdmrUGHqLbjKRnxN17pe7zd4ygABElBRjKCJkZWOW+uZCIAwm3M+sStslF+uzN4ew2QZNhq5 2fA0n/R1zvIAtsqzyQtY2zXwR61HJrC6wH0d4W1DPoqDmQjUCV0F5efpiworxhixU16wy80LWXqNV bVg55tWNjBH3DV1F7hLg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fR2UK-0000F4-1T; Thu, 07 Jun 2018 21:30:32 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fR2UG-0008Rk-DB for openwrt-devel@lists.openwrt.org; Thu, 07 Jun 2018 21:30:30 +0000 Received: by mail-wm0-x242.google.com with SMTP id v131-v6so21959720wma.1 for ; Thu, 07 Jun 2018 14:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=fuWi5eAaTw+1ge/ys6RCguFE+XP3C7+DhBk0PrDjnxQ=; b=N3mirNPS7iiJofwqch0lTQOgNJ+/W6SFO03YupEGmQmFdaKJ/OfgZNWkMxqSg+vdl9 8Wz7rGAZiEIk76gte7gudq1VYzOJQM5yYsZx8bVmONbO3Hj+VBOE7cxZMj4tQIkEZui7 2KNocuVC1mDYbApaqkdIw4IA7IY0HwdBG67D37t5rqag0l2UOtioBvgx5GnjVNF/hQCt TJK089OUxKOrHvVIMtcqS8kuSVaKzHR0rNhyUbDLCeAaFFY6mHeKvbGHKdnWzlJ4dn6T 9vE7xFBpr7PDGttxX2HpZ2aGe3nk7PyM3FeHk5OYsEOq1h3Sbpb8pU2hHwzkNdqSN/Pr z7TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fuWi5eAaTw+1ge/ys6RCguFE+XP3C7+DhBk0PrDjnxQ=; b=P4KS0pRzqrFOh3jMycsiDngUlNIKRtuOcR0Hr/ONsp0a0p6YyKycxlBZBIbgKjYHQy FY6XtbS1ieXIYpg6chkqnn9BpRblEYkWkAAFUhfThvwcQhDxPbxhOLPKOa/ThPe1UGLx gQAeZ3cM/rdmjZUScmn53sO21jBTY4IwB4OV0Y0JHxq1ELKa6bbZ5JcIX5RROcDU87Uo ZU+TFjpwp4ZGRljraNg5OXtfxKmfSap0xko0JYHXcaNVycOz1kLX5Vep8ipj1lixz24j fVB0U8UBMNlcvjHS1S8tXASemF/pTR5fSsGi7oU9LVMr/zG+qthFkaN1yL2Rdbb1Mkqf YTdw== X-Gm-Message-State: APt69E3FPvhzFeFHRJ1Z2A2q0bbMZjLQgM4Fk0qYBj9bPyxMI3551LVx u5A0/hKOop0UOheluao7T82Zf8mn X-Google-Smtp-Source: ADUXVKKdZbIr+ydUI6qnPmOqsJY9KOHJ2FeptZdRZhmx2bRPx7Mfe/ENkdxPzW9DcONQ+I7gTESmOA== X-Received: by 2002:a1c:9:: with SMTP id 9-v6mr2611168wma.10.1528407016054; Thu, 07 Jun 2018 14:30:16 -0700 (PDT) Received: from debian64.daheim (p200300D5FBC5D8FC0000000000000830.dip0.t-ipconnect.de. [2003:d5:fbc5:d8fc::830]) by smtp.gmail.com with ESMTPSA id 12-v6sm3495502wmn.27.2018.06.07.14.30.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Jun 2018 14:30:15 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.91) (envelope-from ) id 1fR2U2-0004lg-GY; Thu, 07 Jun 2018 23:30:14 +0200 From: Christian Lamparter To: openwrt-devel@lists.openwrt.org Date: Thu, 7 Jun 2018 23:30:14 +0200 Message-Id: <20180607213014.18285-1-chunkeey@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180607_143028_448354_65E56746 X-CRM114-Status: GOOD ( 13.36 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (chunkeey[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c09:0:0:0:242 listed in] [list.dnswl.org] Subject: [OpenWrt-Devel] [PATCH] mtd-utils: revert faulty upstream patch for now X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "L . Wayne Leach" , John Crispin MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Some of the ubi-tools in the upstream mtd-utils have been broken by a bad patch upstream. It causes major breakage during sysupgrade when the kernel, rootfs, ... volumes are deleted in the wrong order. This patch therefore reverts the faulty upstream commit which fixes the bug. linux-mtd mailing-list thread: Cc: John Crispin Reported-by: L. Wayne Leach Signed-off-by: Christian Lamparter --- Affects OpenWrt 18.06 as well. so please backport this patch. Forum thread: https://forum.lede-project.org/t/meraki-mx60-installing-current-snapshot-router-booted-into-receovery/ --- ...rrect-error-number-in-ubi_get_vol_in.patch | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 package/utils/mtd-utils/patches/200-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch diff --git a/package/utils/mtd-utils/patches/200-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch b/package/utils/mtd-utils/patches/200-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch new file mode 100644 index 0000000000..79695c4954 --- /dev/null +++ b/package/utils/mtd-utils/patches/200-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch @@ -0,0 +1,30 @@ +From 7d27becbb355853ba778e8b83fe171eecb8195d2 Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Thu, 7 Jun 2018 22:36:19 +0200 +Subject: [PATCH] Revert "Return correct error number in ubi_get_vol_info1" + +This reverts commit dede98ffb706676309488d7cc660f569548d5930. +--- + lib/libubi.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/lib/libubi.c b/lib/libubi.c +index b50e68a..978b433 100644 +--- a/lib/libubi.c ++++ b/lib/libubi.c +@@ -1240,11 +1240,8 @@ int ubi_get_vol_info1(libubi_t desc, int dev_num, int vol_id, + info->dev_num = dev_num; + info->vol_id = vol_id; + +- if (vol_get_major(lib, dev_num, vol_id, &info->major, &info->minor)) { +- if (errno == ENOENT) +- errno = ENODEV; ++ if (vol_get_major(lib, dev_num, vol_id, &info->major, &info->minor)) + return -1; +- } + + ret = vol_read_data(lib->vol_type, dev_num, vol_id, buf, 50); + if (ret < 0) +-- +2.17.1 +