A Chocolatey-compatible multi-platform Package Server written in Rust
Clone or download
Drakulix Fix #8
Simple copy-and-paste code error resulted in an empty "IsPrerelease" field.
choco.exe rejects this without a clear error message, but instead with
trying to get the same package with a new version, appending ".0" to the old one.
If this fails it states, that the package does not exist.

Tagging new version 1.0.2
Latest commit a362250 Dec 6, 2016
Permalink
Failed to load latest commit information.
migrations/20160205110151_create_tables_v1 Initial Commit Aug 2, 2016
resources Add screenshots Aug 2, 2016
src Fix #8 Dec 6, 2016
.gitignore Initial Commit Aug 2, 2016
CHANGELOG.md Initial Commit Aug 2, 2016
Cargo.lock Fix #8 Dec 6, 2016
Cargo.toml Fix #8 Dec 6, 2016
LICENSE Initial Commit Aug 2, 2016
README.md Clean up Readme Aug 3, 2016
build.rs Update to Diesel 0.7 Aug 2, 2016
hazel.service Initial Commit Aug 2, 2016
hazel.toml Initial Commit Aug 2, 2016
icon.png Initial Commit Aug 2, 2016
vagga.yaml Fix `vagga run` Aug 3, 2016

README.md

Hazel

A Chocolatey-compatible multi-platform Package Server written in Rust

Hazel provides a Nuget Feed aimed to be used as source for chocolatey. It does not aim to be a feature-complete Nuget Feed nor to be 100% standard compliant (although this is desirable), but rather to provide everything necessary for chocolatey and possibly extend on its functionality.

Gallery

Building

Easy way (vagga)

  1. Get vagga
  2. Run vagga build

Hard way

  1. Get Rust 1.9.0 or higher
  2. Get libssl-dev, libpq-dev, libldap2-dev
  3. Run cargo build --release --no-default-features --features stable
  4. (Optional for deb) Get libldap2-dev and pkg-config
  5. (Optional for deb) Get cargo-deb (cargo install --git https://github.com/mmstick/cargo-deb/)
  6. (Optional for deb) Run cargo deb --no-build

Running / Installation

Testing

  1. Get vagga
  2. Run vagga run

Production

  • A Postgres Server accessible by the hazel process (version depends on diesel - currently minimum tested is 9.4)
  • A file system location to store package
  • libraries: openssl, libpq, libldap2
  • Build & Run cargo run or get Deb Package from Releases
  • (Optional / Self-Build) Copy the hazel.toml from this repo to /etc/hazel.toml and the hazel.service file to /etc/systemd/system/.
  • (Optional / Deb) Copy the hazel.toml from /etc/skel/hazel.toml to /etc/hazel.toml
  • (Optional) Run hazel through systemd with systemctl start hazel

Note: Currently hazel.service runs as root by default, you might want to create a new user, set the appropriate rights on the directories used in the hazel.toml and run hazel with limited permissions.

We aim to provide automatically build artifacts in near feature for Windows, OSX and more Linux Distributions.

Usage

$ ./hazel -h
hazel 1.0.0
Victor Brekenfeld <brekenfeld@mpib-berlin.mpg.de>
Chocolatey-compatible Package Server

USAGE:
    hazel [FLAGS] [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -q, --quiet      Disable console output. Hazel will not make any attempts to open stdout/err
    -V, --version    Prints version information
    -v               Sets the level of verbosity (may be used up to 4 times)

OPTIONS:
    -c, --config <config>      Config file location (e.g. config.toml)
    -d, --db_url <dburl>       Sets the postgres database url (e.g.
                               postgres://postgres:postgr3s@localhost/hazel_feed_v1)
    -l, --logfile <logfile>    Sets a log file path (default: None)
    -p, --port <port>          HTTP port to listen on (default 80)
    -s, --storage <storage>    Sets the storage path (e.g. /var/hazel/storage/) (default current working
                               directory)

Every option may also be set via the config file and much more advanced options not available to simple command line parameters. See our wiki for more advanced configurations.

Installation

Install Rust and run:

git clone --branch 1.0.0 http://github.com/mpib-berlin/hazel
cd hazel
cargo build --release --no-default-features --features stable

We aim to provide prebuild and tested artifacts in near feature for Windows, OSX and Linux.

If you encounter any errors, feel free to open an issue on our issue tracker.

Documentation

Additional Documentation and links to Nuget/Chocolatey can be found in our Wiki!

Contributing

Contributions are highly welcome, just make a Pull Request. Please keep in mind to make them modular and configurable.

Copyright & License

This Code is owned by the Max Planck Institute for Human Development in Berlin, Germany.

It is Licensed under the AGPL-3.0. It may not be copied, modified, or distributed except according to those terms.

In practice this usually means, you may use the code freely to run your own server, but as soon, as you make modifications you need to disclose them, if your server is publically accessable.