1 unstable release

Uses old Rust 2015

0.1.0 Jul 17, 2017

#1890 in Development tools

21 downloads per month

MIT license

160KB
3K SLoC

Subcomponent

Build Status

Subcomponent is a components orchestrator. You define components as being opaque projects that can be retrieved using various methods (git, svn, download, ...). Components can express dependencies between each other. This allows to run user-defined commands in a specific order.

This is expressed in the subcomponent description language:

subcomponents {
    my-lib-component {
        path: "where/the/lib/will/be/downloaded";
        name: "My Lib";

        fetch {
            git {
                url: "git://example.com/repo.git",
                     "https://example.com/repo.git",
                     "https://example-backup.com/repo.git";
                branch: "dev";
                shallow: true;
            }
        }
    }

    xen {
       name: "Xen";
       path: "xen-4.8.0";

       fetch {
          artifact {
             url: "https://downloads.xenproject.org/release/xen/4.8.0/xen-4.8.0.tar.gz";
             compression: "tar", "gz";
             pgp-signature: "https://downloads.xenproject.org/release/xen/4.8.0/xen-4.8.0.tar.gz.sig";
             pgp-pubkey: "83FE14C957E82BD9";
          }
       }
    }
}

TODO List

  • Dependencies between components
  • status command
  • Definition of command hooks
  • gzip unpacker
  • xz unpacker
  • Booleans should be handled by the lexer, not by the parser

Documentation

Sphinx is used to generate the documentation, so you first need to have it installed:

pip install sphinx

Then, to generate the HTML documentation, you can just run the following:

make -C doc html man

The HTML documentation will be available in docs/_build/html/. The manual page of subcomponent will be in docs/_build/man.

Tests

Subcomponent prefers to develop system tests instead of unit tests. You can run unit tests via cargo:

cargo test

System tests rely on robotframework, so you first need to make sure that this python module is installed:

pip install robotframework

The following commands are available

make -C tests unit-tests        # Run unit tests in release
make -C tests system-tests      # Run system tests in release
make -C tests                   # Run all the tests in release

Please report failing tests!

Continuous Integration

We use travis to check that upstream code pass the implemented tests.

License

Subcomponent is MIT-licensed. See the LICENSE file for more details.

Dependencies

~5.5MB
~77K SLoC