Commit graph

32 commits

Author SHA1 Message Date
Adam Duskett 28bcdf833a package/mender: bump to version 2.1.1
Also change License sha256sums.
Removed:
  - vendor/github.com/mendersoftware/log/COPYING
  - vendor/github.com/mendersoftware/scopestack/COPYING

Added:
  - vendor/golang.org/x/crypto/LICENSE
  - vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE

moved:
  - vendor/github.com/mendersoftware/go-liblzma/LICENSE to
    vendor/github.com/remyoudompheng/go-liblzma/LICENSE

  - vendor/github.com/Sirupsen/logrus/LICENSE to
    vendor/github.com/sirupsen/logrus/LICENSE

Updated:
  - vendor/github.com/mendersoftware/log/LICENSE: Changed from copyright mender
    software to Apache 2.0

  - vendor/github.com/mendersoftware/scopestack/LICENSE: Changed from copyright
    mender to Apache 2.0.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-10-28 23:13:42 +01:00
Adam Duskett db6ab4422a package/mender: bump to version 2.0.1
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-07-16 19:00:15 +02:00
Adam Duskett 9c52d4bee6 mender-grubenv: new package
Mender-grubenv contains the boot scripts and tools used by Mender to
integrate with the Grub2 bootloader.

The user must select the following Grub modules for this package:
loadenv, hashsum, echo, halt, gcry_sha256, and test.

Because this patch also includes a grub version of fw_printenv and fw_setenv,
package/mender/Config.in must be changed as well at the same time, because if
both uboot-tools and this package are selected, during startup, mender calls
the uboot-tools version of fw_printenv and fails to start.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Tested-by: Mirza Krak <mirza.krak@northern.tech>
Acked-by: Mirza Krak <mirza.krak@northern.tech>
[Arnout:
 - reorder depends clauses;
 - add runtime tag to grub2 dependency
 - remove wchar dependency from comment
 - only error if BR_BUILDING
 - use install instead of cp for a single file.]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-06-10 16:16:59 +02:00
Peter Korsgaard f590097045 Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-06-02 22:11:20 +02:00
Adam Duskett b24895e5a4 package/mender: bump to version 2.0.0
In addition:
  - Update hashes for license files due to copyright year change.
  - Add hash for vendor/golang.org/x/text/LICENSE
  - Add hash for vendor/github.com/mendersoftware/go-liblzma/LICENSE
  - Add new dependency xz, as mender now depends on LZMA.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-05-31 22:56:25 +02:00
Mirza Krak a10d911788 package/mender: update readme.txt
Provide additional details on how Mender works within Buildroot.

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
[Thomas: remove duplicate "Default configuration files" title, rewrap
text]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-05-31 16:24:40 +02:00
Mirza Krak bbb4bc7dfa package/mender: install additional inventory scripts
There are two additional inventory scripts provided in
the Mender client repository, let's install them.

- mender-inventory-os
    - will push content of /etc/os-release
- mender-inventory-rootfs-type
    - will push filesystem type of rootfs

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-05-28 23:06:23 +02:00
Mirza Krak 637352b50b package/mender: update rootfs parts in mender.conf
The configuration options (RootfsPartA/RootfsPartB) must
provide a valid path to a block devices.

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-05-28 22:43:04 +02:00
Angelo Compagnucci 8291bc7793 package/go: rename BR2_PACKAGE_HOST_GO_{ARCH_SUPPORTS,CGO_LINKING_SUPPORTS}
The hidden Config.in option BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS name is
not very clear as to whether it says whether Go is available for the
target architecture or the host architecture.

Until now, this was fine since there was support for host Go
packages. But as we are about to introduce support for building host
Go packages, we need to clarify the meaning of
BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS. Since it says whether the target
architecture has support for Go or not, we rename it to
BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS.

And since BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS is tightly related,
we rename it to BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Tested-by: Adam Duskett <aduskett@gmail.com>
[Thomas: entirely rewrite commit log]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-03-17 17:20:53 +01:00
Adam Duskett 93321e5f16 package/mender: add missing double quote in service file
There was a missing double quotes that would prevent the service from
starting.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Tested-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Acked-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-03-07 21:47:25 +01:00
Angelo Compagnucci 63739c5c25 package/mender: fix sysv startup script
Mender is a service explicitly written for systemd and so it doesn't
fork on background, doesn't redirect outputs and doesn't create a pid
file by itself.
To make the service running correctly is therefore necessary to use the
-m switch of start-stop-daemon to create the pid file and -b option to
send the process to background.
Logging is preserved because the service will log anyway on syslog.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-02-15 23:00:12 +01:00
Angelo Compagnucci dd97b055b1 package/mender: fix missing /var/lib
Mender needs /var/lib directory to be available: on some configurations
/var/lib is not available and thus the mender package installation fails.
This patch does a mkdir to ensure the /var/lib directory is always
available.

Fixes:

  http://autobuild.buildroot.net/results/d2237083a13ab7688dd2b6dc8dbcd4226ed5651a/

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-02-15 22:58:20 +01:00
Angelo Compagnucci 4b29c68ea2 package/mender: change to use release archive
Relase archive is distributed with depencies, this prevents the go
build system to download them.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-02-14 21:47:23 +01:00
Angelo Compagnucci 097e85abfc package/mender: fixing init script naming
Commit f88947c2fe (package/mender: adding systemv init file) added an init
script, but the installation logic referred to S04mender instead of S42mender.

Update the installation logic to match the file name.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
[Peter: expand commit message description]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-02-05 15:37:05 +01:00
Angelo Compagnucci d6f00c5047 package/mender: adding a readme file
This patch adds a readme file with basic instructions to get mender up
and running on a production system.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Acked-by: <aduskett@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-02-05 14:09:36 +01:00
Angelo Compagnucci 387fadbf8d package/mender: adding device_type file
In order to have the mender package working out of the box, the
/etc/mender/device_type should be present and should contain a
valid device_type value.
This patch provides a default file that can be overridden easily
from an overlay.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Acked-by: <aduskett@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-02-05 14:09:17 +01:00
Angelo Compagnucci 99ed53cc2b package/mender: adding artifact_info file
In order to have the mender package working out of the box, the
/etc/mender/artifact_info should be present and should contain a
valid artifact_name value.
This patch provides a default file that can be overridden easily
from an overlay.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Acked-by: <aduskett@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-02-05 14:08:47 +01:00
Angelo Compagnucci f88947c2fe package/mender: adding systemv init file
This patch adds a service file for the init system v.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Acked-by: <aduskett@gmail.com>
Reviewed-by: Titouan Christophe <titouan.christophe@railnova.eu>
[Peter: fix typo in stop()]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-02-05 13:45:07 +01:00
Angelo Compagnucci e78d516178 package/mender: adding a writable location
Mender needs /var/lib/mender to be writable at the service start, the
path is hardcoded and thus we cannot change it.
This patch solves the problem using the same approach we have for
dropbear.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: <aduskett@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-02-05 13:40:10 +01:00
Adam Duskett aa9ca504c9 package/mender: bump version to 1.7.0
Other changes:
- Remove upstreamed patch.
- Update license files sha256sum's due to year changes.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-12-26 22:33:27 +01:00
Mirza Krak bef30a9f4b package/mender: use MENDER_PKGDIR to access local files
Utilize the predefined variable MENDER_PKGDIR which points to the
directory containing mender.mk and Config.in, along with the local
files.

One benefit is also that it works when BR2_EXTERNAL is used, which
makes it easier to "backport" this to an older external tree.

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-10-21 16:07:10 +02:00
Giulio Benetti ad908f7330 mender: fix ioctl build failure on powerpc64le / power8
Build fails due to missing // +build ppc64le in ioctl_64_bit.go

Add patch to append ppc64le to // +build list.

Fixes
http://autobuild.buildroot.net/results/f22/f222b4389f9308363c386da25ec22a0919bc29fb//

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-08-29 15:42:42 +02:00
Mirza Krak ff2c8883fb package/mender: set version in go linker
This is used when calling the mender client with the
-version option and it says "unknown" if not set in
linker.

Now it displays the following:

    # mender -version
    1.4.0
    runtime: go1.10.2

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-20 17:14:09 +02:00
Mirza Krak 7175f968fb package/mender: update legal info
Also added license checksums in mender.hash

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-20 17:04:35 +02:00
Mirza Krak 5a70d2ae59 package/mender: use inventory and identity script from upstream source
These files are part of Mender sources and no point in keeping duplicate
files locally.

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-20 17:03:49 +02:00
Mirza Krak 3882c878fb package/mender: remove tenant.conf
Tenant Token is a configuration option that has to do with Hosted Mender,
where you you need to set this for the devices to connect to the
correct organization in a multi-tenant system.

The removal of tenant.conf usage (and /var/lib/mender/authtentoken)
was in Mender client version 1.2.0, where it was switched to be an mender.conf
option instead as the example above demonstrates. As the first version that was
integrated in Buildroot was 1.4.0, the inclusion of tenant.conf and the
creation of the symlink is not necessary.

Now it is specified as such in mender.conf:

Example:

/etc/mender/mender.conf
{
    TenantToken: "very long base64 encoded string"
}

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-20 16:55:01 +02:00
Mirza Krak 7c60fa9f88 package/mender: select BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV
The Mender client uses fw_printenv/fw_setenv to manipulate the U-boot
environment, e.g to change the boot candidate after a update has been
done.

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-20 16:52:33 +02:00
Mirza Krak 1770251816 package/mender: create directory containing Mender state script
Mender state-scripts are essentially "hooks" that can be provided to
influence the update flow.

They should be placed inside /etc/mender/scripts and the directory must
contain a file containing the current state-script format version. It is
currently "2".

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-20 16:51:08 +02:00
Mirza Krak 9b297505eb package/mender: provide sane values in mender.conf
The current values that are in mender.conf will actually
cause the Mender client to fail to start because of invalid
values.

Provide sane default values that at least allow the Mender client
to parse the configuration options and start running.

The values provided will actually work in a "Demo Environment",
see https://docs.mender.io/getting-started/create-a-test-environment.

Though an entry is required in /etc/hosts to resolve the URL to the
local IP address of the running demo server.

Example:

    echo "192.168.0.10 docker.mender.io s3.docker.mender.io" >> \
         /etc/hosts

Above is required because the demo certificate
(/etc/mender/server.crt) is created for https://docker.mender.io.

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-20 16:44:32 +02:00
Mirza Krak 3a9fd97d43 package/mender: fix install path for identity and inventory scripts
These scripts are used to generate the device identity and to populate
the the device inventory. The Mender client will call these and at least
the mender-device-identity is required to be present at the correct
location. Inventory scripts are there as an example and not
actually required.

Example output from identity script:

    $ ./mender-device-identity
    mac=de:ad:ca:fe:00:01
    cpuid=1112233

Example output from inventory script:

    $ ./mender-inventory-network
    mac_br-fbfdad18c33c=02:42:7e:74:96:85
    network_interfaces=br-fbfdad18c33c
    ipv4_br-fbfdad18c33c=172.21.0.1/16
    mac_enp0s25=de:ad:be:ef:bb:05
    network_interfaces=enp0s25
    ipv4_enp0s25=123.22.0.197/16
    ipv4_enp0s25=10.20.20.105/16
    ipv6_enp0s25=fe80::2aad:beff:feef:bb05/64

Inventory and device identity data is presented on the Mender server
front-end.

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-20 16:39:25 +02:00
Thomas Petazzoni 12b70acb82 mender: fix check-package warnings
Fixes:

package/mender/Config.in:7: help text: <tab><2 spaces><62 chars> (http://nightly.buildroot.org/#writing-rules-config-in)
package/mender/Config.in:8: help text: <tab><2 spaces><62 chars> (http://nightly.buildroot.org/#writing-rules-config-in)
package/mender/mender.mk:8: remove default value of _SOURCE variable (http://nightly.buildroot.org/#generic-package-reference)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-06-10 16:43:53 +02:00
Angelo Compagnucci 6ed0e6ba23 package/mender: new package
This patch add mender, an open source over-the-air (OTA) software
updater for embedded Linux devices.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
[Thomas:
 - add entry to DEVELOPERS file.
 - drop dependency on systemd, since there is really no build
   dependency, it's just that the init script integration is missing.
 - add Config.in comment about the thread dependency
 - don't override install commands, otherwise the mender binary is not
   installed, and instead use a post install target hook.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-06-05 21:43:42 +02:00