This is an automated email from the ASF dual-hosted git repository. janc pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git
commit d5fea5a92ca827c0c0a43914b77a186a85040269 Author: Slawomir Kasenberg <[email protected]> AuthorDate: Tue Jul 22 09:25:21 2025 +0200 docs: install: Update install instructions for Linux --- docs/install/newt_linux.rst | 141 ++++++-------------------------------------- 1 file changed, 17 insertions(+), 124 deletions(-) diff --git a/docs/install/newt_linux.rst b/docs/install/newt_linux.rst index cfb11de3..13bc169e 100644 --- a/docs/install/newt_linux.rst +++ b/docs/install/newt_linux.rst @@ -1,149 +1,40 @@ Installing Newt on Linux ------------------------ -You can install the latest release (1.9.0) of the newt tool from a Debian binary package (amd64). You can also download -and build the latest release version of newt from source. +You can install the latest release of the newt tool from https://mynewt.apache.org/download or download latest sources +directly from GitHub https://github.com/apache/mynewt-newt and build your binary localy. -This page shows you how to: - -1. Set up your computer to download Debian binary packages from the JuulLabs-OSS APT repository. - - **Note:** The key for signing the repository has changed. If you set up your computer before release 1.1.0, you will - need to download and import the public key again. - -2. Install the latest release version of newt from a Debian binary package. You can use apt-get to install the package - or manually download and install the Debian binary package. - -3. Download, build, and install the latest release version of newt from source. - -If you are installing on an amd64 platform, we recommend that you install from the binary package. - -See :doc:`prev_releases` to install an earlier version of newt. - -**Note:** We have tested the newt tool binary and apt-get install from the JuulLabs-OSS APT repository for Ubuntu version -1704. Earlier Ubuntu versions (for example: Ubuntu 14) may have incompatibility with the repository. You can manually -download and install the Debian binary package. - -**Note:** See :doc:`../../misc/go_env` if you want to: - -- Use the newt tool with the latest updates from the master branch. The master branch may be unstable and we recommend - that you use the latest stable release version. -- Contribute to the newt tool. - -Setting Up Your Computer to use apt-get to Install the Package -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The newt Debian packages are stored in a private APT repository on **https://github.com/JuulLabs-OSS/debian-mynewt**. -To use apt-get, you must set up the following on your computer to retrieve packages from the repository: - -**Note**: You only need to perform this setup once on your computer. However, if you previously downloaded and imported -the public key for the JuulLabs-OSS APT repository, you will need to perform step 2 again as the key has changed. - -1. Download the public key for the JuulLabs-OSS APT repository and import the key into the apt keychain. -2. Add the repository for the binary and source packages to the apt source list. - -Download the public key for the JuulLabs-OSS apt repo (**Note:** There is a ``-`` after ``apt-key add``): - -.. code-block:: console - - $ wget -qO - https://raw.githubusercontent.com/JuulLabs-OSS/debian-mynewt/master/mynewt.gpg.key | sudo apt-key add - - -Add the repository for the binary and source packages to the ``mynewt.list`` apt source list file: - -.. code-block:: console - - $ sudo tee /etc/apt/sources.list.d/mynewt.list <<EOF - deb https://raw.githubusercontent.com/JuulLabs-OSS/debian-mynewt/master latest main - EOF - -**Note:** Previously the repository lived under ``runtimeco/debian-mynewt``, and although -updating should remain working, if it stops pulling in the latest releases, please try updating -``/etc/apt/sources.list.d/mynewt.list`` and substitute ``runtimeco`` by ``JuulLabs-OSS``. - -Update the available packages: - -.. code-block:: console - - $ sudo apt-get update - -**Note:** If you are not using Ubuntu version 1704, you may see the following errors. We have provided instructions on -how to manually download and install the binary package. - -.. code-block:: console - - W: Failed to fetch https://raw.githubusercontent.com/JuulLabs-OSS/debian-mynewt/master/dists/latest/main/source/Sources HttpError404 - -Installing the Latest Release of Newt from a Binary Package -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can use either apt-get to install the package, or manually download and install the Debian binary package. - -Method 1: Using apt-get to Upgrade or to Install -============================================================================================== - -Run the following commands to upgrade or install the latest version of newt: - -.. code-block:: console - - $ sudo apt-get update - $ sudo apt-get install newt - -**Note:** If you encounter build errors (such as missing ``sys/mman.h``), please make sure you have a 32-bit glibc: - -.. code-block:: console - - $ sudo apt-get install gcc-multilib - -Method 2: Downloading and Installing the Debian Package Manually -============================================================================================== - -Download and install the package manually. - -.. code-block:: console + .. code-block:: console - $ wget https://raw.githubusercontent.com/JuulLabs-OSS/binary-releases/master/mynewt-newt-tools_1.9.0/newt_1.9.0-1_amd64.deb - $ sudo dpkg -i newt_1.9.0-1_amd64.deb + $ git clone https://github.com/apache/mynewt-newt.git -See `Checking the Installed Version of Newt`_ to verify that you are using the installed version of newt. -Installing the Latest Release of Newt from a Source Package +Installing Newt from Sources ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you are running Linux on a different architecture, you can build and install the latest release version of newt from -source. - The newt tool is written in Go (https://golang.org/). In order to build Apache Mynewt, you must have Go 1.12 or later installed on your system. Please visit the Golang website for more information on installing Go (https://golang.org/). -#. Download and unpack the newt source: - - .. code-block:: console - - $ wget -P /tmp https://github.com/apache/mynewt-newt/archive/mynewt_1_9_0_tag.tar.gz - $ tar -xzf /tmp/mynewt_1_9_0_tag.tar.gz - #. Run the build.sh to build the newt tool. .. code-block:: console - $ cd mynewt-newt-mynewt_1_9_0_tag + $ cd mynewt-newt $ ./build.sh - $ rm /tmp/mynewt_1_9_0_tag.tar.gz -#. You should see the ``newt/newt`` executable. Move the executable to a bin directory in your PATH: +#. Add the path to the newt tool to your PATH. - - If you previously built newt from the master branch, you can move the binary to your $GOPATH/bin directory. - - .. code-block:: console + .. code-block:: console - $ mv newt/newt $GOPATH/bin + $ mkdir ~/bin + $ mv ./newt/newt ~/bin/. + $ export PATH=$PATH:~/bin - - If you are installing newt for the first time and do not have a Go workspace set up, you can move the binary to - /usr/bin or a directory in your PATH: +#. To make newt visible in every new terminal add the export to ~/.bashrc - .. code-block:: console + .. code-block:: console - $ mv newt/newt /usr/bin + $ echo 'export PATH=$PATH:~/bin' >> ~/.bashrc Checking the Installed Version of Newt ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -155,7 +46,7 @@ Checking the Installed Version of Newt $ which newt /usr/bin/newt $ newt version - Apache Newt version: 1.9.0 + Apache Newt 1.13.0 / c6bf556 / 2024-11-15_06:58 2. Get information about newt: @@ -185,6 +76,7 @@ Checking the Installed Version of Newt apropos Search manual page names and descriptions build Build one or more targets clean Delete build artifacts for one or more targets + completion Generate the autocompletion script for the specified shell create-image Add image header to target binary debug Open debugger session to target docs Project documentation generation commands @@ -212,6 +104,7 @@ Checking the Installed Version of Newt -l, --loglevel string Log level (default "WARN") -o, --outfile string Filename to tee output to -q, --quiet Be quiet; only display error output + --shallow int Use shallow clone for git repositories up to specified number of commits -s, --silent Be silent; don't output anything -v, --verbose Enable verbose output when executing commands
