This moves the device configuration to a config script in configs/, from the
previous setup in the bootstrap scripts.
It does so by creating a new resources/ folder in the top-level directory, which
is then populated with the configuration file, and the server parameters only.
When the conversion is run with the demo configuration
configs/mender_convert_demo_config the conversion will install all the add-on's
available, and modify the configuration file in resources to align with our
regular Mender demo configuration.
Changelog: Add a demo configuration in configs/mender_convert_demo_config which
when added at run time creates a Mender demo setup in the converted image. This
includes short polling intervals, and all add-on's installed by default.
Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
Ubuntu calls group 0 "root" but MacOS calls it "wheel". This change allows
the same code to function on both.
Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
Changelog: Title
This is needed for MacOS compatibility as the default chown version there does
not understand the user.group syntax.
Changelog: Title
Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
Since we chown and chmod files in the overlay, we need to ensure that we
can write to them in each of the bootstrap-rootfs-overlay generation
scripts.
Eventually, I think we should make overlays as tarballs with ownership
and permissions inside the archive to avoid this dance.
Changelog: Title
Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
This may not be correct in all use cases but for the files that are currently created,
they should be owned by root. At a minimum they should not have the UID of the user
invoking mender-convert.
Changelog: Title
Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
Previously there was a mix between two, and four spaces.
This commits unifies all scripts to use two-spaces for indentation.
Changelog: None
Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
This mirrors the way it is handled in Yocto with the demo server, the production
server, and hosted mender.
Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
Changelog: Title
The goals of the re-write was to achieve the following:
1. It should be easy to extend the tool to support other boards or distributions
2. We should not compile code in the tool (rely on binaries built elsewhere)
compiling code increases complexity, due to requirement of toolchains etc.
3. The tool shall not be designed around specific hardware/platform types
- This is the case today with the usage of --device-type flag
4 The tool should be to convert images without knowing anything about the hardware/platform
relates to above 3.
5. Configuration interface should be simplified
- command line flags -> configuration files
6. Platform specific code shall be provided trough “hooks”, and are not part of the “core” mender-convert code
7. It shall be easy to extend functionality
- support for rootfs overlay to inject user applications/configurations
- ability to override how the Mender Artifact is generated (to be able to sign and include state-scripts)
8. Code structure should be modular
- Eases Maintenance and possibility of making isolated changes
Changelog: Title
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>