summaryrefslogtreecommitdiffstats
path: root/Cargo.toml
AgeCommit message (Collapse)Author
2021-05-17v0.1.3v0.1.3Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-05-11v0.1.2v0.1.2Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-04-22v0.1.1v0.1.1Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-04-20Update dependency: diesel 1.4 -> 1.4.6Matthias Beyer
See also: https://rustsec.org/advisories/RUSTSEC-2021-0037.html https://github.com/diesel-rs/diesel/pull/2663 Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> (cherry picked from commit 38b6ded40c6d840c9d3951f0a082cd55b1b0109c)
2021-04-20Update dependency: tar 0.4 -> 0.4.16Matthias Beyer
See: https://rustsec.org/advisories/RUSTSEC-2018-0002.html https://github.com/alexcrichton/tar-rs/pull/156 Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> (cherry picked from commit c75d620e5bc6e454f8c6cecf1e440d430dac97a8)
2021-03-17Add crate metadataMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-17Update config: own fork -> 0.11Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-16Update dialoguer: 0.7 -> 0.8Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-13Switch from sha1 to sha-1Matthias Beyer
This is because the "sha1" crate seems to be unmaintained (no release in 3 years) but the sha-1 crate seems to be actively maintained in the context of a bigger rust-crypto-functions project. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Tested-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-11Add xdg-based config file mergingMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-10Merge branch 'pathes-to-absolute'Matthias Beyer
2021-03-10Merge branch 'update-deps'Matthias Beyer
2021-03-10Re-write patch postprocessingMatthias Beyer
This patch rewrites patch post-processing with a new setter in the config-rs crate: Config::set_once() That is introduced on a PR I've written for the crate. The PR: https://github.com/mehcode/config-rs/pull/172 The new function is more likely to land on the config-rs master branch than the old one, as it does not introduce more exported types from the config-rs crate. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-09Implement patch-path rewritingMatthias Beyer
This patch ensures that pathes for patches are always relative to the repository root, when loading the packages layered from the repository. The problem is well described in the comment in the code, so this commit message ends here. This patch was written using an proposed feature for the config-rs dependency: https://github.com/mehcode/config-rs/pull/165 This PR added a `Config::get_value_mut()` function and exported the `config::value::ValueKind` type in config-rs public API. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Add filters for listing containers on endpointsMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07Use the bytesize crate to format size of memory nicelyMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-07result-inspect: 0.1 -> 0.2Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-05Enable tokio feature "time"Matthias Beyer
We need the "time" feature in tokio, because we want to implement pinging with a wait time between the pings. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-03-01Implement "release rm" subcommandMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-02-21Update typed-builder: 0.8 -> 0.9Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-02-21Update shiplift: git -> 0.7Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-02-15Force "funty" to 1.1.0Matthias Beyer
This forces the transitive dependency of "bitvec", named "funty", to 1.1.0. Rationale: https://github.com/bitvecto-rs/bitvec/issues/105#issuecomment-778570981 Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-02-06Rewrite package organizational structure using DAGMatthias Beyer
This patch reimplements the package orchestration functionality to rely on a DAG rather than a tree. A / \ B E / \ \ C D F Before this change, the structure the packages were organized in for a build was a tree. That did work reasonable well for initial development of butido, because this is a simple case and the implementation is rather simple, too. But, packages and their dependencies are not always organized in a tree. Most of the time, they are organized in a DAG: .-> C -, / \ D > A \ / `-> B -ยด This is a real-world example: A could be a common crypto-library that I do not want to name here. B and C could be libraries that use the said crypto-library and D could be a program that use B and C. Because said crypto-library builds rather long, building it twice and throwing one result away is a no-go. A DAG as organizational structure makes that issue go away entirely. Also, we can later implement checks whether the DAG contains multiple versions of the same library, if that is undesireable. The change itself is rather big, frankly because it is a non-trivial change the replace the whole data structure and its handling in the orchestrator code. First of all, we introduce the "daggy" library, which provides the DAG implementation on top of the popular "petgraph" library. The package `Tree` datastructure was replaced by a package `Dag` datastructure. This type implements the heavy-lifting that is needed to load a package and all its dependencies from the `Repository` object. The `JobTree` was also reimplemented, but as `daggy::Dag` provides a convenient `map()` function, its implementation which transforms the package `Dag` into a job `Dag` is rather trivial. `crate::job::Dag` then provides the convenience `iter()` function to iterate over all elements in the DAG and providing a `JobDefinition` object for each node. The topology in which we traverse the DAG is not an issue, as we need to create tasks for all `JobDefinition`s anyways, so we do not care about traversal topology at all. The `crate::package::Package` type got an `Hash` implementation, which is necessary to keep track of the mappings while reading the DAG from the repository. The implementation does not create the edges between the nodes in the DAG right when inserting, but afterwards. To keep track of the `daggy::NodeIndex`es, it keeps a mapping Package -> NodeIndex in a Hashmap. Thus, `Package` must implement `std::hash::Hash` Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Tested-by: Matthias Beyer <mail@beyermatthias.de> squash! Reimplement as DAG
2021-01-30Update tokio: 0.2 -> 1.0, shipliftMatthias Beyer
Because tokio 1.0 does not ship with the Stream trait, this patch also introduces tokio_stream as new dependency. For more information, look here: https://docs.rs/tokio/1.0.3/tokio/stream/index.html Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-30typed-builder: 0.7 -> 0.8Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-30reqwest: 0.10 -> 0.11Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-30itertools: 0.9 -> 0.10Matthias Beyer
We don't need resiter::Map here anymore because itertools 0.10 provides a map_ok() extension. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-29Add dependency: aquamarineMatthias Beyer
MIT licensed documentation helper crate for drawing nice graphes. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-25Remove unused crateMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-15Reimplement tree printing using 'ptree'Matthias Beyer
This patch reimplements the tree-printing using the 'ptree' crate. Because ptree wants the tree item to implement `Clone`, a wrapper type is added which then implements `Clone` and `ptree::TreeItem` Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-01-15Add compatiblity setting in configuration fileMatthias Beyer
This patch adds a compatibility setting in the configuration file, so that butido does not fail late when parsing configuration parameters or package definition files, but early, when the configured compatilibty does not match the version of butido itself. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-13Revert "Reimplement hash verification"Matthias Beyer
This reverts commit c3fc1281142ec10414197a31070cc45930a859e3 and commit 18b256e040881ac674463913b2a7e290125ea738. The problem here is that we introduced "ring" to our dependencies, which has a unappropriate license (ISC and openssl thing). We should not depend on such a library, because it may conflict with our own EPL 2.0 (IANAL). Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-13Add more Authors to Cargo.tomlMatthias Beyer
2021-01-13Set license in Cargo.tomlMatthias Beyer
2021-01-12Reimplement hash verificationMatthias Beyer
This patch re-implements hashing using the "ring" crypto library and implementing a streaming hashing with it. This way, we stream the file to the hasher rather than reading the full file to memory. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-12Fix: Spawn filesystem task on a blocking tokio threadMatthias Beyer
This patch changes the (possibly heavy) File reading from disk to be executed on a blocking tokio thread. This way, we ensure we do not block until the `read()` operation is finished and can continue executing async tasks on the runtime. Because IO might be expensive (think of a 5GB file that is read to memory), this is a good optimization. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-12Pin shiplift to revisionMatthias Beyer
With this patch, we pin shiplift to a revision. That is because shiplift may break from one revision to another on master (which just happened and which is what we fixed in cc8d3a7912203c90a6591e0d178c80f620bd61d0 ("Fix: Add type annotation"). We expect shiplift to hit tokio 1.0 anytime now and because of that we might want to do a manual update of shiplift and tokio rather than an imperative `cargo update` which may (short-term) break our codebase. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
2021-01-11Fix: Remove indentation from script snippets when building scriptChristoph Prokop
We actually need to make an ugly (and very bad performing) hack here, to get the `unindent` crate to actually unindent here. text = format!("\n{}", text).unindent(), the format!() call is necessary to tell `unindent::Unindent::unindent()` that the intended indentation is actually zero. If we do not add that `\n` here, the first line of the to-be-unindented indented text stays unintentionally indented. For example, unindenting the intentionally indented string: " intentionally indented intentionally indented " results unintentionally in the partially indented and partially unindented text: " intentionally indented intentionally indented " Which is not our intention of course, although it seems to be the intention of the unindent crate, as documented. But with the intentionally added `\n` we unindent the indentation of all indented "intentionally indented" lines. Signed-off-by: Christoph Prokop <christoph.prokop@atos.net> Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Christoph Prokop <christoph.prokop@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
2020-12-16Replace manual Display implementations with deriveMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-15Add subcommand to generate CLI completion scriptMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-14Disable logging in handlebarsMatthias Beyer
Because the scripts we run should not be able to access the logger during handlbars rendering. This is due to the fact that we need to have control over stdout/stderr because of the progress bar printing, but also because there's absolutely no need for the user to log during the handlebars rendering process. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-14Remove ContainerError type, thiserror dependencyMatthias Beyer
This removes the ContainerError type for simplicity. We can call anyhow!() and just work with that, no need to pull in thiserror just for one type. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-11CleanupMatthias Beyer
Sort and make indention nice. Also dev-dependencies where removed because indoc is a normal dependency anyways. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-11Remove unused dependency: tracingMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-11Add feature: script lintingMatthias Beyer
This patch adds script linting via a configurable script. With this patch, the configuration can point to a script or program that gets the packaging script on STDIN and might exit with a nonzero value on error. The simplest script I can think of that adds value is: #!/bin/bash shellcheck - to run the packaging script through shellcheck. stdout and stderr of the linting script are printed in case of non-zero return value. Linting can be disabled by not setting the script in the config or by passing a commandline flag to skip linting (a warning will be printed in this case). Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-07Fix Licensing issueMatthias Beyer
The licensing issue fixed by this patch is described in the comment in the code. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-03Dependency: tokio: Enable only features we needMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-12-03Update dependency: ascii_table must be 3.0.2 or newerMatthias Beyer
This patch updates the ascii_table dependency with a requirement to be 3.0.2 or newer. This is because ascii_table was licensed as GPLv3 before that version, and got relicensed to MIT in 3.0.2. Because we do not want to depend on a library that is GPLv3, we asked the author to relicense their crate, which is what they did for us. This patch thus ensures that we do not link GPLv3 code. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-26Update dependency: clap: 3.0.0-beta.1 -> 3.0.0-beta.2Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-11-26Update dependency: env_logger: 0.7 -> 0.8Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>