You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2017/12/14 21:04:48 UTC
[GitHub] aditihilbert closed pull request #353: Updated linux instruction for 1.3.0
aditihilbert closed pull request #353: Updated linux instruction for 1.3.0
URL: https://github.com/apache/mynewt-site/pull/353
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/docs/newt/install/newt_linux.md b/docs/newt/install/newt_linux.md
index 2578cf38f..e4895f324 100644
--- a/docs/newt/install/newt_linux.md
+++ b/docs/newt/install/newt_linux.md
@@ -1,6 +1,6 @@
## Installing Newt on Linux
-You can install the latest release (1.2.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 (1.3.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.
This page shows you how to:
@@ -16,7 +16,7 @@ If you are installing on an amd64 platform, we recommend that you install from t
See [Installing Previous Releases of Newt](/newt/install/prev_releases.md) to install an earlier version of newt.
-**Note:** We have tested the newt tool binary and apt-get install from the runtimeco APT repository for Ubuntu version 16. Earlier Ubuntu versions (for example: Ubuntu 14) may have incompatibility with the repository. You can manually download and install the Debian binary package.
+**Note:** We have tested the newt tool binary and apt-get install from the runtimeco 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 [Setting Up a Go Environment to Contribute to Newt and Newtmgr Tools](/faq/go_env) if you want to:
@@ -30,21 +30,11 @@ The newt Debian packages are stored in a private APT repository on **https://git
**Note**: You only need to perform this setup once on your computer. However, if you previously downloaded and imported the public key for the runtimeco APT repository, you will need to perform step 2 again as the key has changed.
+1. Download the public key for the runtimeco 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.
-1. Install the `apt-transport-https` package to use HTTPS to retrieve packages.
-2. Download the public key for the runtimeco APT repository and import the key into the apt keychain.
-3. Add the repository for the binary and source packages to the apt source list.
-
-
-<br>
-Install the apt-transport-https package:
-```no-highlight
-$ sudo apt-get update
-$ sudo apt-get install apt-transport-https
-```
<br>
-
Download the public key for the runtimeco apt repo (**Note:** There is a `-` after `apt-key add`):
```no-highlight
@@ -66,7 +56,7 @@ Update the available packages:
$ sudo apt-get update
```
<br>
-**Note:** If you are not using Ubuntu version 16, you may see the following errors. We have provided instructions on how to manually download and install the binary package.
+**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.
```no-highlight
@@ -84,7 +74,7 @@ You can use either apt-get to install the package, or manually download and inst
Run the following commands to upgrade or install the latest version of newt:
```no-highlight
-$ sudo apt-get update
+$ sudo apt-get update
$ sudo apt-get install newt
```
@@ -100,8 +90,8 @@ $ sudo apt-get install gcc-multilib
Download and install the package manually.
```no-highlight
-$wget https://raw.githubusercontent.com/runtimeco/binary-releases/master/mynewt-newt-tools_1.2.0/newt_1.2.0-1_amd64.deb
-$sudo dpkg -i newt_1.2.0-1_amd64.deb
+$ wget https://raw.githubusercontent.com/runtimeco/binary-releases/master/mynewt-newt-tools_1.3.0/newt_1.3.0-1_amd64.deb
+$ sudo dpkg -i newt_1.3.0-1_amd64.deb
```
<br>
See [Checking the Installed Version of Newt](#check) to verify that you are using the installed version of newt.
@@ -110,16 +100,13 @@ See [Checking the Installed Version of Newt](#check) to verify that you are usin
### Installing the Latest Release of Newt from a Source Package
If you are running Linux on a different architecture, you can build and install the latest release version of newt from source.
-
<br>
-1. You need Go version 1.7.6 or higher to build Newt. Currently, the latest Go version that Ubuntu installs is 1.6. Run `go version` to check if you have Go 1.7.6 installed. You can download Go from [https://golang.org/dl/](https://golang.org/dl/).
-<br>
2. Download and unpack the newt source:
```no-highlight
-$ wget -P /tmp https://github.com/apache/mynewt-newt/archive/mynewt_1_2_0_tag.tar.gz
-$ tar -xzf /tmp/mynewt_1_2_0_tag.tar.gz
+$ wget -P /tmp https://github.com/apache/mynewt-newt/archive/mynewt_1_3_0_tag.tar.gz
+$ tar -xzf /tmp/mynewt_1_3_0_tag.tar.gz
```
<br>
@@ -127,9 +114,9 @@ $ tar -xzf /tmp/mynewt_1_2_0_tag.tar.gz
```no-highlight
-$ cd mynewt-newt-mynewt_1_2_0_tag
+$ cd mynewt-newt-mynewt_1_3_0_tag
$ ./build.sh
-$ rm /tmp/mynewt_1_2_0_tag.tar.gz
+$ rm /tmp/mynewt_1_3_0_tag.tar.gz
```
<br>
@@ -154,7 +141,7 @@ $ rm /tmp/mynewt_1_2_0_tag.tar.gz
$ which newt
/usr/bin/newt
$ newt version
-Apache Newt version: 1.2.0
+Apache Newt version: 1.3.0
```
<br>
diff --git a/docs/newtmgr/install_linux.md b/docs/newtmgr/install_linux.md
index b50bd719f..c9007794a 100644
--- a/docs/newtmgr/install_linux.md
+++ b/docs/newtmgr/install_linux.md
@@ -1,8 +1,8 @@
## Installing Newtmgr on Linux
-You can install the latest release (1.2.0) of the newtmgr tool from a Debian binary package (amd64). You can also download and build the latest release version of newtmgr from source.
+You can install the latest release (1.3.0) of the newtmgr tool from a Debian binary package (amd64). You can also download and build the latest release version of newtmgr from source.
-This page shows you how to:
+This page shows you how to:
1. Set up your computer to download Debian binary packages from the runtimeco APT repository.
@@ -10,16 +10,16 @@ This page shows you how to:
2. Install the latest release version of newtmgr 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 newtmgr from source.
+3. Download, build, and install the latest release version of newtmgr from source.
See [Installing Previous Releases of Newtgmr](/newtmgr/prev_releases) to install an earlier version of newtmgr.
If you are installing on an amd64 platform, we recommend that you install from the binary package.
-**Note:** We have tested the newtmgr tool binary and apt-get install from the runtimeco APT repository for Ubuntu version 16. Earlier Ubuntu versions (for example: Ubuntu 14) may have incompatibility with the repository. You can manually download and install the Debian binary package.
+**Note:** We have tested the newtmgr tool binary and apt-get install from the runtimeco 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 [Setting Up a Go Environment to Contribute to Newt and Newtmgr Tools](/faq/go_env) if you want to:
+**Note:** See [Setting Up a Go Environment to Contribute to Newt and Newtmgr Tools](/faq/go_env) if you want to:
* Use the newtmgr 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 newtmgr tool.
@@ -32,36 +32,26 @@ The newtmgr Debian packages are stored in a private APT repository on **https://
**Note**: You only need to perform this setup once on your computer. However, if you previously downloaded and imported the public key for the runtimeco APT repository, you will need to perform step 2 again as the key has changed.
-
-1. Install the `apt-transport-https` package to use HTTPS to retrieve packages.
-2. Download the public key for the runtimeco APT repository and import the key into the apt keychain.
-3. Add the repository for the binary and source packages to the apt source list.
-
-<br>
-1. Install the apt-transport-https package:
-
-```no-highlight
-$sudo apt-get update
-$sudo apt-get install apt-transport-https
-```
+1. Download the public key for the runtimeco 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.
<br>
-2. Download the public key for the runtimeco apt repo (**Note:** There is a `-` after `apt-key add`):
+1. Download the public key for the runtimeco apt repo (**Note:** There is a `-` after `apt-key add`):
```no-highlight
wget -qO - https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/mynewt.gpg.key | sudo apt-key add -
```
<br>
-3. Add the repository for the binary packages to the `mynewt.list` apt source list file.
+2. Add the repository for the binary packages to the `mynewt.list` apt source list file.
```no-highlight
-$sudo -s
+$ sudo -s
[sudo] password for <user>:
-root$ cat > /etc/apt/sources.list.d/mynewt.list <<EOF
+# cat > /etc/apt/sources.list.d/mynewt.list <<EOF
deb https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main
EOF
-root$exit
+# exit
```
**Note:** Do not forget to exit the root shell.
@@ -69,7 +59,7 @@ root$exit
4. Verify the content of the source list file:
```no-highlight
-$more /etc/apt/sources.list.d/mynewt.list
+$ cat /etc/apt/sources.list.d/mynewt.list
deb https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main
```
@@ -77,16 +67,14 @@ deb https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main
5. Update the available packages:
```no-highlight
-$sudo apt-get update
+$ sudo apt-get update
```
<br>
-**Note:** If you are not using Ubuntu version 16, you may see the following errors. We have provided instructions on how to manually download and install the binary package.
+**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.
```no-highlight
-
W: Failed to fetch https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/dists/latest/main/source/Sources HttpError404
-
```
<br>
### Installing the Latest Release of Newtmgr from a Binary Package
@@ -100,7 +88,7 @@ Run the following commands to upgrade or install the latest version of newtmgr:
```no-highlight
-$ sudo apt-get update
+$ sudo apt-get update
$ sudo apt-get install newtmgr
```
@@ -110,8 +98,8 @@ $ sudo apt-get install newtmgr
Download and install the package manually.
```no-highlight
-$wget https://raw.githubusercontent.com/runtimeco/binary-releases/master/mynewt-newt-tools_1.2.0/newtmgr_1.2.0-1_amd64.deb
-$sudo dpkg -i newtmgr_1.2.0-1_amd64.deb
+$ wget https://raw.githubusercontent.com/runtimeco/binary-releases/master/mynewt-newt-tools_1.3.0/newtmgr_1.3.0-1_amd64.deb
+$ sudo dpkg -i newtmgr_1.3.0-1_amd64.deb
```
See [Checking the Installed Version of Newtmgr](#check) to verify that you are using the installed version of newtmgr.
@@ -122,7 +110,7 @@ See [Checking the Installed Version of Newtmgr](#check) to verify that you are u
If you are running Linux on a different architecture, you can build and install the latest release version of newtmgr from source.
<br>
-1. Download and install the latest version of [Go](https://golang.org/dl/). Newtmgr requires Go version 1.7.6 or higher.
+1. Download and install the latest version of [Go](https://golang.org/dl/) if it not already available on your distro. Newtmgr requires Go version 1.7.6 or higher.
<br>
2. Create a Go workspace in the /tmp directory:
@@ -140,33 +128,27 @@ $ export GOPATH=/tmp/go
3. Run `go get` to download the newtmgr source. Note that `go get` pulls down the HEAD from the master branch in git, builds, and installs newtmgr.
```no-highlight
-
$ go get mynewt.apache.org/newtmgr/newtmgr
$ ls -l /tmp/go/bin/newtmgr
-rwxr-xr-x 1 user staff 17884488 Jul 29 16:25 /tmp/go/bin/newtmgr
-
```
<br>
4. Check out the source from the latest release version:
```no-highlight
-
$ cd src/mynewt.apache.org/newtmgr
-$ git checkout mynewt_1_2_0_tag
-Note: checking out 'mynewt_1_2_0_tag'.
-
+$ git checkout mynewt_1_3_0_tag
+Note: checking out 'mynewt_1_3_0_tag'.
```
<br> 5. Build newtmgr from the latest release version:
```no-highlight
-
$ cd newtmgr
$ go install
$ ls /tmp/go/bin/newtmgr
-rwxr-xr-x 1 user staff 17888680 Jul 29 16:28 /tmp/go/bin/newtmgr
-
```
<br>
@@ -185,8 +167,7 @@ $ ls /tmp/go/bin/newtmgr
2. Get information about the newtmgr tool:
```no-highlight
-
-$newtmgr
+$ newtmgr
Newtmgr helps you manage remote devices running the Mynewt OS
Usage:
@@ -218,7 +199,6 @@ Flags:
-r, --tries int total number of tries in case of timeout (default 1)
Use "newtmgr [command] --help" for more information about a command.
-
```
<br>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services