From nobody Sat Dec 31 22:33:42 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nkxjy397hz2nZrP for ; Sat, 31 Dec 2022 22:33:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nkxjy0Kyxz445l for ; Sat, 31 Dec 2022 22:33:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672526022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=83ivYEqMEV/wA0llC3ZQ1UZi4/E2HfHKhY0nOODVDN8=; b=yBzJgH+Nys1HdGhr2252H2l1FCtRrw4PU2yZgwWYGU2AxRYzt4iBL+GqzkfElcv46DuOM7 BlSHCz/oc6yEQhD+r9A6iQtFSGUh450eouZUqaqI3QjCvbsFPtwUCCHNvexXOXJN8hytP4 Ub9JBxLOM8fpkeD0CR4dYC4uoDPlS3a/FiRh+C18r5+xsBY+g5ta2Bwk1aBBQOTidQxucK G7Khk6KKPl62/9fisi4FYVUQQLgufygjOi+5a6I0QQXHHQ7zICoLNadqwbyDS/UvoRtDKw RMftY0SwCbiLWP1q2KzjUNS5BwiNWyUp/YjP21CRAJAVDrlV9VoVqFdxGtx9uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672526022; a=rsa-sha256; cv=none; b=SxKoxTGbKf6TkQnx1fWVrrOljeYwJgrwCpOZq1yWQM8np8PUrUBg92TpRGevQ/mEeuxs3h 6KiYHLVL8zNe92i5ecKdRuTDAmTHkAQq7yM/A1yMUAmNt1Ck35J/A3R9ofhxZtC9uFVlxK z+v0ID9HMn/u+tmGxM4ZK4OZLj+ZKHgK84WI8E4M2nvb7IDUT/+9kiAAqTN2ecrBcj1qWW rXdJyaFzw3+LJj5u+QnMnWOzJ64lyW7JR89jT9K2IIeVG6ATKQuv7MIEU4jcC2GwVPTUYu lkQraiaw1c/d+7aarmAMlUiSTJYNy7LhO1F+Hh3V3vGf+6qKFLivMIEpRKQTRw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nkxjx6XKbz152G for ; Sat, 31 Dec 2022 22:33:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 2BVMXfX9095295 for ; Sat, 31 Dec 2022 22:33:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2BVMXfu1095293 for bugs@FreeBSD.org; Sat, 31 Dec 2022 22:33:41 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 268686] freebsd-update cannot handle spaces in file paths Date: Sat, 31 Dec 2022 22:33:42 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: 06-birds-herald@icloud.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268686 Bug ID: 268686 Summary: freebsd-update cannot handle spaces in file paths Product: Base System Version: 13.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: 06-birds-herald@icloud.com Created attachment 239169 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D239169&action= =3Dedit Modifications to freebsd-update to make it work with spaces in the file pat= hs If freebsd-update is run with the -b -d or -f options followed by a path wi= th a space, freebsd-update prints its usage and exits instead of updating. This = is because it further splits arguments by spaces into more arguments internall= y, causing it to incorrectly parse them. There are also problems with the inte= rnal handling of the $BASEDIR and other path variables. This makes it difficult = to update certain installations, for example a jail located at a non-root loca= tion with a space in its path. This can be fixed by simply adding quotes to the necessary locations in the script, and changing the use of xargs in one location. I have attached a di= ff of what I had to do to get it to work for my usage (fetch, upgrade, and install). certctl, which is run by freebsd-update, also has a problem with spaces and would also need to be fixed in a similar manner. The script also doesn't return a nonzero error code upon failure to parse i= ts arguments. --=20 You are receiving this mail because: You are the assignee for the bug.=