GithubHelp home page GithubHelp logo

primeqh / mender-artifact Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mendersoftware/mender-artifact

0.0 0.0 0.0 11.42 MB

Library for managing Mender artifact files

Home Page: https://mender.io

License: Other

Shell 1.54% Go 97.69% Makefile 0.72% Dockerfile 0.05%

mender-artifact's Introduction

Build Status Coverage Status Go Report Card

Mender Artifacts Library

Mender is an open source over-the-air (OTA) software updater for embedded Linux devices. Mender comprises a client running at the embedded device, as well as a server that manages deployments across many devices.

This repository contains the artifacts library, which is used by the Mender client, command line interface, server and for build integration with the Yocto Project.

The artifacts library makes it easy to programmatically work with a Mender artifact, which is a file that can be recognized by its .mender suffix. Mender artifacts can contain binaries, metadata, checksums, signatures and scripts that are used during a deployment. The artifact format acts as a wrapper, and uses the tar format to bundle several files into one.

In its simplest form, an artifact contains just a rootfs image, along with its checksum, id and device type compatibility.

The artifacts library might also be useful for other updaters or purposes. We are always happy to see other uses of it!

Mender logo

Getting started

To start using Mender, we recommend that you begin with the Getting started section in the Mender documentation.

Using the library

You can use the reader and the writer in go in the standard way:

import (
        "github.com/mendersoftware/mender-artifact/areader"
        "github.com/mendersoftware/mender-artifact/awriter"
...
)

For sample usage, please see the Mender client source code.

Downloading the binaries

You can find the latest mender-artifact binaries in the Downloads page on Mender Docs.

Building from source

Note: The build process is only supported on Linux-based environments.

Containerized

The preferred way to build mender-artifact from source is containerized in docker. This process can be used to generate binaries suitable for running on Linux, Windows and MacOS hosts.

You need the following prerequisites:

  • docker Installation instructions
  • the make tool. Most distributions offer a make package. Install it using your native package management tool, such as apt, yum, pacman, ...

In the source directory, build mender-artifact by issueing

make build-natives-contained

This results in the self-contained binary mender-artifact. You can leave it in place, or move it to a location on your systems PATH.

Note: containerized building on non-x86 platform is not supported yet

Native

To build mender-artifact from source you need the following prerequisites: (packages given for Debian-based environments)

In the source directory, mender-artifact is built by simply issueing

make

This results in the self-contained binary mender-artifact. You can leave it in place, or move it to a location on your systems PATH.

Enabling auto-completion in Bash & ZSH

Automatic installation through the Makefile

This is the easiest approach, and all that is needed it to run:

sudo make install-autocomplete-scripts

And the Bash auto-complete script will be installed to /etc/bash_completion.d, and if Zsh is installed on the system, the corresponding auto-completion script is installed into /usr/local/share/zsh/site-functions.

You can override both the DESTDIR (default: empty) and PREFIX (default: /usr/local) variables to alter the destination paths, i.e:

sudo make DESTDIR=/tmp PREFIX=/usr install-autocomplete-scripts

Manual installation

auto-completion of mender-artifact sub-commands can be added to either ZSH or Bash through:

Bash

The simplest way of enabling auto-completion in Bash is to copy the ./autocomplete/bash_autocomplete file into /etc/bash_completion.d/ like so:

sudo cp path/to/mender-aritfact/autocomplete/bash_autocomplete /etc/bash_completion.d/mender-artifact
source /etc/bash_completion.d/mender-artifact

Alternatively the following can be added to .bashrc:

PROG=mender-artifact
source path/to/mender-artifact/autocomplete/bash_autocomplete

ZSH

Auto-completion for ZSH is supported through the zsh_autocompletion script found in the ./autocomplete directory. In order to enable it consistently, add these lines to your .zshrc file:

source  path/to/mender-artifact/autocomplete/zsh_autocomplete

Contributing

We welcome and ask for your contribution. If you would like to contribute to Mender, please read our guide on how to best get started contributing code or documentation.

License

Mender is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Security disclosure

We take security very seriously. If you come across any issue regarding security, please disclose the information by sending an email to [email protected]. Please do not create a new public issue. We thank you in advance for your cooperation.

Connect with us

mender-artifact's People

Contributors

kacf avatar pasinskim avatar lluiscampos avatar dependabot[bot] avatar alfrunes avatar mzedel avatar tranchitella avatar merlin-northern avatar gregoriodistefano avatar maciejte avatar bboozzoo avatar 0lmi avatar maciejmrowiec avatar sbaxter-izo avatar danielskinstad avatar kjaskiewiczz avatar oldgiova avatar sebopsahl avatar cosinekitty avatar 414n avatar apodogrocki avatar andhe avatar estenberg avatar michaelhobo avatar lights0123 avatar craigcomstock avatar theyoctojester avatar michaelntech avatar m1cha avatar mikaelthd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.