Commit Graph

52 Commits (74196b7d059684e555a87e5409c21c56c727066b)

Author SHA1 Message Date
Fabrice Fontaine 7075cc3455 package/mender: requires MD4 and RMD160 support in openssl
Enable MD4 and RMD160 in openssl to fix build failure raised since
commit a83d41867c

Fixes:
 - http://autobuild.buildroot.org/results/0b9ad028609f7e3e4eddd4439deaf7b3aa1d1273

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-06-12 14:12:54 +02:00
Adam Duskett 8c7222ad03 package/mender: the dbus plugin requires libglib2
If libglib2 is not build before building the dbus plugin, mender fails to
compile with the following error:
Package 'gio-2.0', required by 'virtual:world', not found

 - Add a check for libglib2 in addition to dbus when enabling the dbus plugin.
 - Depend on libglib2 if both packages are selected.

Fixes:
http://autobuild.buildroot.org/results/1bc5893b88db08612059ad899c2bc3b2abb291fb

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-05-21 10:54:39 +02:00
Adam Duskett b32f95290f package/mender: bump version to 2.6.0
Also update the progressbarlicense hash due to a year bump

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-04-24 18:14:10 +02:00
Adam Duskett 028a210f66 package/mender: add nodbus to tags if dbus is not selected
The README.md file suggests passing "nodbus" as a tag if dbus is not selected.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-04-03 09:30:22 +02:00
Adam Duskett 0cb8b25169 package/mender: make xz optional
According to the README.md file, xz is optional.
  - Remove the dependency on the xz package.
  - If the xz package is not selected, add "nolzma" to MENDER_TAGS

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-04-03 09:30:20 +02:00
Adam Duskett 8e80da620b package/mender/mender.mk: fix license list
The license files were updated in the .hash file, but not in the .mk file.

Fixes:
http://autobuild.buildroot.org/results/42c2987e5cf2bb8918f7fdbd8303951f34b8ead1
Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-04-03 09:30:19 +02:00
Adam Duskett 948e2c3467 package/mender: install dbus authentication file if dbus is selected
While not a requirement to run mender itself, the mender-connect package
requires this file to be installed to talk to mender.

Signed-off-by: Adam Duskett <Aduskett@rivian.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-03-31 09:22:51 +02:00
Adam Duskett 04adea7674 package/mender: bump version to 2.5.0
Other changes:
  - Add host-pkgconf as a dependency. It's used to find OpenSSL.
  - Set new license hashes.

Signed-off-by: Adam Duskett <Aduskett@rivian.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-03-30 22:29:34 +02:00
Adam Duskett b5f7fa8838 package/mender/mender.mk: fix linker version argument
The current linker flag "-X main.Version=$(MENDER_VERSION)" no longer points
to the correct location, which results in "version: unknown" when runnning
"mender -version." Update the linker flag to point to the correct location.

Signed-off-by: Adam Duskett <Aduskett@rivian.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-03-30 22:29:17 +02:00
Adam Duskett e6c2e3a869 package/mender/mender.mk: use MENDER_PKGDIR variable
Currently there is a mix of calls to package/mender and $(MENDER_PKGDIR) in the
mender.mk file. Standardize the calls to only $(MENDER_PKGDIR).

Signed-off-by: Adam Duskett <Aduskett@rivian.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-03-30 22:29:07 +02:00
Adam Duskett 136f317c68 package/mender: do not automatically select uboot tools if uboot is selected
Because uboot requires a set of unique patches for each board, the
upstream package developers are phasing out supporting uboot wherever
possible.  Instead, they recommend using Grub2 as a secondary
bootloader and using the mender-grubenv package.

Because the mender-grubenv file provides it's own fw_printenv script,
it is not possible to know if U-Boot's fw_printenv or mender-grubenv's
fw_printenv should be used.

As such, remove selecting uboot tools when uboot is selected, and
instead add a more comprehensive note in the help section about what
Mender requires for uboot and grub2-based systems, with a link to the
meta-mender github project for the base uboot patches, and a link to
the official documentation on manual uboot integration.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-03-16 21:30:43 +01:00
Adam Duskett b5056518cd package/mender: bump version to 2.4.2
Other changes:
  - Openssl is now a dependency.
  - Set new license hashes due to new dependencies.
  - Set new license file hash due to a year change.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-03-14 23:10:25 +01:00
Adam Duskett db751e2c89 package/mender: Fix incorrectly named service file
Many of the mender CLI commands use systemctl commands to get information about
the daemon, such as the PID (IE: systemctl show -p MainPID mender-client).
As seen above, these commands expect the service file to be named
"mender-client" instead of "mender."

As such, in the current state, running a forced update check in the CLI will
result in the following error:
failed to force updateCheck: could not find the PID of the mender daemon.

Changing the name of mender.service to mender-client.service fixes the issue.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-08-28 22:36:49 +02:00
Adam Duskett c66585ac5a package/mender/mender.mk: add missing backslash
Without this backslash, any attempt to run make will result in the error:
package/mender/mender.mk:44: *** recipe commences before first target.  Stop

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-07-16 09:08:56 +02:00
Adam Duskett 48c127aea1 package/mender: add support for update modules
Mender has support for performing other types of updates other than
just overwriting the rootfs partition that isn't currently in use on
the target.

Some of the default provided modules provide support for:
  - Updating a docker container.
  - Running a script.
  - Installing an RPM.
  - Overwriting a directory.
  - Updating a single-file.

The single-file update module is used by upstream for onboarding a new
device to a server, and this fails with Buildroot devices because the
modules are currently not installed.

Install the directory, script, and single-file modules by default, and
install the docker or rpm script if their respective packages are
selected.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-07-15 23:46:40 +02:00
Adam Duskett f0fd581a3a package/mender: set the default script version to 3
Version 3 scripts have been supported since version 2.0 and should be the
default.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-07-15 23:41:52 +02:00
Adam Duskett d535581c00 package/mender: bump version to 2.3.0
Update the following license file hashes due to copyright year changes:
  - vendor/github.com/mendersoftware/mendertesting/LICENSE
  - vendor/github.com/mendersoftware/mender-artifact/LICENSE

Remove hashes for the the following removed files:
  - vendor/github.com/mendersoftware/log/LICENSE
  - vendor/github.com/mendersoftware/scopestack/LICENSE

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-07-15 23:41:43 +02:00
Adam Duskett 39e5e016b1 package/mender: bump version to 2.2.0
Other changes:
  - Update license file hashes due to copyright year change.
  - Remove vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE
    as it no longer exists.
  - Add new vendor/github.com/urfave/cli/LICENSE hash.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-03-29 21:19:09 +02:00
Jérémy Rosen 3e092163e5 package: rely on systemctl preset-all for buildroot-provided services
All the packages in this list have the following properties
* units are provided by buildroot in the package directory
* the SYSTEMD_INSTALL_INIT_HOOK is exactly equivalent to what the
  [Install] section of the unit does

The fix removes the soflinking in the .mk file

Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2019-12-18 18:27:41 +01:00
Adam Duskett a991a6c834 package/mender: bump to version 2.1.2
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-12-05 21:28:38 +01:00
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