From owner-freebsd-bugs@freebsd.org Wed Oct 17 13:34:21 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4095210D590C for ; Wed, 17 Oct 2018 13:34:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id CE36180B04 for ; Wed, 17 Oct 2018 13:34:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 8E1A410D590B; Wed, 17 Oct 2018 13:34:20 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C30210D590A for ; Wed, 17 Oct 2018 13:34:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A0BC80AFE for ; Wed, 17 Oct 2018 13:34:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 741F3194ED for ; Wed, 17 Oct 2018 13:34:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w9HDYJDe040935 for ; Wed, 17 Oct 2018 13:34:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w9HDYJjD040934 for bugs@FreeBSD.org; Wed, 17 Oct 2018 13:34:19 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 180861] gpart(8): gpart backup/restore doesn't restore labels Date: Wed, 17 Oct 2018 13:34:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: bugzilla.freebsd@omnilan.de X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2018 13:34:21 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D180861 Harald Schmalzbauer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla.freebsd@omnilan.de --- Comment #5 from Harald Schmalzbauer --- As of 12.0-ALPHA9, gpart does partial label restore in case of GPT labels, = when user is specifying -l flag and label contains whitespace(s). Everything po= st 1st whitespace gets lost. E.g. MS-Windows Setups set labels with whitespaces. Parsing to the end of line instead of whatever [^[:alnum:]] might be in use should do the trick, but haven't had a look into the code and the trivial f= ix isn't as trivial for me as it should be ;-) If /dev/ada0 has a GPT with labels containing whitespaces, you can falsify = with disk=3Dada0 file=3D"${TMP:-/tmp}"/${disk}.gpart.txt /sbin/gpart backup ${disk} > "${file}" /bin/cat "${file}" | /sbin/gpart restore -Fl ${disk} If you look at $file, there's something like "Basic data partition", which became "Basic" during restore. -harry --=20 You are receiving this mail because: You are the assignee for the bug.=