From nobody Mon Mar 18 09:36:05 2024 X-Original-To: dev-commits-src-all@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 4TyqVF6lm4z5D5kK; Mon, 18 Mar 2024 09:36:05 +0000 (UTC) (envelope-from git@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 4TyqVF5w2Bz4kVv; Mon, 18 Mar 2024 09:36:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710754565; 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=dM0ijgOo0nBd3DQYIdpXqldnd5+zQiTGMLrFOiUSvKE=; b=a8ftlxP3NyVTfk/1WmqkIBsRgaAOCbYujY5NzuObM9bWAvQ84hK6aVZMF02Aipvvgn2jrG mcSd/ikKyUDPfnYIEYoB7XR2kq3q3YBbtiQESQN+YPzb/yhiX+F7M6xO3tWL+K/B5pGTkT fro8iqVAkEDZxg3k0JIDG9QSpRgoNJlI4SURJK+47lcxu91yfPbJPt5mtMXEYUrNeXvY9y 7CBCY7/1os1+qAq/5goD4mXtZs7siWCFtSkmcJvhi0fGTePcgsWWgO4lZ3yF9Sa+qA2jNe 9sFL50KP++ZWQ/gKQksMuzl88B+L1HBxU0JHkk3xCvufenIG60BJR31pTv74aA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710754565; a=rsa-sha256; cv=none; b=kb+PHHFx1ZOduSS+txTXnKwsJuimcWdVegxOM2bXmyfY9WmLNwE4foniaqQSllWWET/svY AgDHmA/3Tuq4FHvBm1m4mphAPkhBVyoPItmTv7ck1oQTRPsvoKKZR5gYu+VIrsgsn0QsWM Cw45D1pOiHxkpWD17e2zyJsuHgripv2Tc0wcC01iDMKxMYaZRL9CcJlzyLg7ogmIviIgen qSSL4CmQ6P+iStob4YfgfyAuhpy08/5wvzbPqgBVhF6jY8O9NfX5WLXtrfbXRcC6VlaShl +V1gOCt9mN1pB4WjgtWACpIqbLYtTwEfIGT2KUlXcxN7+dW2lIWRq0rGSa+/PA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710754565; 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=dM0ijgOo0nBd3DQYIdpXqldnd5+zQiTGMLrFOiUSvKE=; b=DbyOUlqxT8Gx1ba7wwZTYW4ouWceV93FBCb6O9hG26bc1wDq/29BNx5FxNAvgyQIrXGQWS JT0MrbGjRVG5x2Lui94AD+yexnVtsU7/4ZL/QYNZTkODKlT2bk3Vd6+gRJ6CJ5mHMbWDFK 3Aoh2AfjbFkIz31nJZbRzuQslq6aabcevTfSGga7PSv5LXwqGvT23ljSxiNEeR7B5AIryY fjoWj7SKFcxPBYvDQcmAluU30hrTRfUKQjlzWbIc35q/T+Z8R7rmTcRTr7Qk6TF1fbEpbb r9dztX1HozSpsTylfW8FPjpE/34+I7G1/Fou4b0SIYGEdARdQbdotEPQiQTorA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4TyqVF5VXYzHkw; Mon, 18 Mar 2024 09:36:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42I9a5U6056738; Mon, 18 Mar 2024 09:36:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42I9a5df056735; Mon, 18 Mar 2024 09:36:05 GMT (envelope-from git) Date: Mon, 18 Mar 2024 09:36:05 GMT Message-Id: <202403180936.42I9a5df056735@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Osipov Subject: git: 59b02bb420e3 - main - freebsd-update: Don't provide copiable commands in output List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59b02bb420e3b0a49af39f7817764ca444f7c793 Auto-Submitted: auto-generated The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=59b02bb420e3b0a49af39f7817764ca444f7c793 commit 59b02bb420e3b0a49af39f7817764ca444f7c793 Author: Michael Osipov AuthorDate: 2024-01-30 16:24:45 +0000 Commit: Michael Osipov CommitDate: 2024-03-18 09:33:42 +0000 freebsd-update: Don't provide copiable commands in output Previously, freebsd-update provided ready-to-go commands for copying and pasting into the terminal. This causes problems as soon as options are used and not supplied again by the user, e.g., '-b' or '-d'. Stop making them copiable and force the user to construct a valid command line by himself to avoid failures. PR: 276102 Approved by: jrm (mentor), emaste MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D43700 --- usr.sbin/freebsd-update/freebsd-update.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 551d40418240..a3e56127f9eb 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -776,7 +776,7 @@ fetch_check_params () { if ! [ -z "${TARGETRELEASE}" ]; then echo -n "`basename $0`: " - echo -n "-r option is meaningless with 'fetch' command. " + echo -n "'-r' option is meaningless with 'fetch' command. " echo "(Did you mean 'upgrade' instead?)" exit 1 fi @@ -784,8 +784,8 @@ fetch_check_params () { # Check that we have updates ready to install if [ -f ${BDHASH}-install/kerneldone -a $FORCEFETCH -eq 0 ]; then echo "You have a partially completed upgrade pending" - echo "Run '$0 install' first." - echo "Run '$0 fetch -F' to proceed anyway." + echo "Run '`basename $0` [options] install' first." + echo "Run '`basename $0` [options] fetch -F' to proceed anyway." exit 1 fi } @@ -798,7 +798,7 @@ upgrade_check_params () { NKERNCONF=${KERNCONF} # We need TARGETRELEASE set - _TARGETRELEASE_z="Release target must be specified via -r option." + _TARGETRELEASE_z="Release target must be specified via '-r' option." if [ -z "${TARGETRELEASE}" ]; then echo -n "`basename $0`: " echo "${_TARGETRELEASE_z}" @@ -863,7 +863,7 @@ install_check_params () { if ! [ -L ${BDHASH}-install ]; then echo "No updates are available to install." if [ $ISFETCHED -eq 0 ]; then - echo "Run '$0 fetch' first." + echo "Run '`basename $0` [options] fetch' first." exit 2 fi exit 0 @@ -871,7 +871,7 @@ install_check_params () { if ! [ -f ${BDHASH}-install/INDEX-OLD ] || ! [ -f ${BDHASH}-install/INDEX-NEW ]; then echo "Update manifest is corrupt -- this should never happen." - echo "Re-run '$0 fetch'." + echo "Re-run '`basename $0` [options] fetch'." exit 1 fi @@ -973,7 +973,7 @@ IDS_check_params () { _SERVERNAME_z=\ "SERVERNAME must be given via command line or configuration file." - _KEYPRINT_z="Key must be given via -k option or configuration file." + _KEYPRINT_z="Key must be given via '-k' option or configuration file." _KEYPRINT_bad="Invalid key fingerprint: " _WORKDIR_bad="Directory does not exist or is not writable: " @@ -2326,7 +2326,7 @@ upgrade_guess_components () { WARNING: This system is running a "${KCOMP}" kernel, which is not a kernel configuration distributed as part of FreeBSD ${RELNUM}. This kernel will not be updated: you MUST update the kernel manually -before running "$0 install". +before running '`basename $0` [options] install'. EOF fi @@ -2770,7 +2770,7 @@ upgrade_run () { # Remind the user that they need to run "freebsd-update install" # to install the downloaded bits, in case they didn't RTFM. - echo "To install the downloaded upgrades, run \"$0 install\"." + echo "To install the downloaded upgrades, run '`basename $0` [options] install'." } # Make sure that all the file hashes mentioned in $@ have corresponding @@ -2788,7 +2788,7 @@ install_verify () { if ! [ -f files/${HASH}.gz ]; then echo -n "Update files missing -- " echo "this should never happen." - echo "Re-run '$0 fetch'." + echo "Re-run '`basename $0` [options] fetch'." return 1 fi done < filelist @@ -3024,7 +3024,7 @@ install_files () { cat <<-EOF Kernel updates have been installed. Please reboot and run -"$0 install" again to finish installing updates. +'`basename $0` [options] install' again to finish installing updates. EOF exit 0 fi @@ -3111,8 +3111,8 @@ Kernel updates have been installed. Please reboot and run Completing this upgrade requires removing old shared object files. Please rebuild all installed 3rd party software (e.g., programs -installed from the ports tree) and then run "$0 install" -again to finish installing updates. +installed from the ports tree) and then run +'`basename $0` [options] install' again to finish installing updates. EOF rm newfiles exit 0 @@ -3491,7 +3491,7 @@ cmd_updatesready () { fi echo "There are updates available to install." - echo "Run '$0 install' to proceed." + echo "Run '`basename $0` [options] install' to proceed." } # Install downloaded updates.