Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Fingercomp

Hel Repository

Recommended Posts

about.6c5ea71c.png

Greetings! Today we've finally released the Hel Repository, the project we've been working for a half of year (we have no idea why it took so long).

We collected many good ideas about an ideal package repository, melted all of them together, and forged a solution to OC package distributing problems.

It's really easy to use, not harder than downloading programs from Pastebin. To install a program type the following command in the OpenOS shell:

$ hpm install <package name>

A few moments later the package becomes installed with all of its dependencies, ready to be used.


Why Hel? It's cool, lightweight, simple. All you need is the client program. It's small, yet powerful.
And a rather fast OpenPrograms module is included in the client. With cache.

To install an OpenPrograms package, first update the cache:

$ hpm oppm:cache update

And then use the following command:

$ hpm oppm:install <package name>

Of course, hpm has a few more features than what we've described. Have a look at the manpage that hpm automatically downloads.


Okay, enough speaking of the OC client, let's think about program developers.
You can easily maintain several versions of your applications. You can use any repository package as dependency.

Create an account. Describe your package (use Markdown to format description), attach code samples (in Lua, Moonscript, or 20 more languages). Tag the package. Attach a few images related to the program if you have them.

That's it! The package will become available immediately. Everyone will be able see it, and everyone will be able to install it.

By the way, the repository stores metadata of packages (not the actual file contents) that's used by hpm to download programs -- regardless of where they're stored.

 
The Hel project consists of three parts.

  •  The backend. It's written in Python. The backend stores all data in database. It's documented on the wiki. Take a look at it if you want to add Hel integration to your app.
  •  The frontend. Created with the power of functional programming and the Elm language. It's the web interface we've mentioned above.
  •  The OpenComputers client. It's small (3k lines of code) but mighty. :) Written in MoonScript.

Sources of these parts are available on GitHub.

Report found bugs or feature requests here or at the Github issue tracker. If you want to contribute, open a pull request.


Okay, that sounds good, but how to use it?

The frontend is hosted here. There's nothing to describe. Open the site and, well, use it.

The API is available here. The wiki tells how to use the API.

The OC client can be installed by running the following:

$ pastebin run vf6upeAN

This command will fetch the latest version of hpm. You should also run this command if hpm breaks. Usually this happens when we make a breaking change to the API. In this case, we'll update hpm as soon as possible.


Licensed under the MIT license.
Authors: @Fingercomp, @MoonlightOwl.

Link to post
Share on other sites

The client software downloaded by the pastebin run command crashes with:

/tmp/181178399.0:1819: unfinished long string (starting at line 1) near <eof>

Game Version: 1.7.10

OpenOS v1.6, 4096 KB RAM, Lua BIOS EEPROM

T3 Server:

  • CPU: Tier 2 APU
  • RAM: 4x T3.5
  • HDD - 3x T3
  • Attached Components:
    • 3x T3 Component Bus
    • T3 Data Card
    • Network Card
    • Internet Card
    • T2 Redstone Card
    • T2 Screen: 5Tx8W block dimensions
Edited by DaMachinator
Incomplete information
Link to post
Share on other sites

Okay, so I forgot that the tmpfs size is limited to 512 bytes. The installer was about seven times larger than that. I've fixed the bug. Rerun the command, it should work now. I hope you'll like what we've made. :)

 

Oh, I'm aware of this issue and already working on resolving the bug.

There's a workaround you can try using for now. Hopefully it will work.

$ pastebin get vf6upeAN ./installer.lua
$ ./installer.lua
$ rm ./installer.lua

The bug is going to be fixed as soon as possible. Thanks for reminding me, anyway.

Link to post
Share on other sites

I've released a hpm update today. Now you can create a manifest for your program if you don't want to mess with uploading it to the repository.

 

Suppose you're developing your OC project that has a lot of files and dependencies. It actually becomes tedious to manage all of such things up. No problem! Upload dependencies to the repository, and then create the manifest.

{name="name-of-program",
 version="1.0.5-dev",
 dependencies={
  {name="logging", version="^1,!=1.5", type="required"},
  {name="network", version="^2", type="required"}
 },
 files={
  {url="path/relative/to/manifest/script.lua", dir="/usr/bin", name="script.lua"},
  {url="path/relative/to/manifest/another-file.lua", dir="/usr/lib/program", name="another-file.lua"}
 }}

Then use tar to create an archive containing project files, and send the file somebody.

That person extracts files from the archive and runs the following command.

$ hpm install -l .

Well, the program becomes installed.

 

Btw, there's a command to install the dependencies of program, leaving the project itself untouched.

$ hpm install -ld path/to/project

 

I'm already going to use this feature for our large project. You can take a look at our manifest file as an example: https://github.com/cc-ru/ut-server/blob/master/manifest

I hope you'll find this feature useful as we did!

Link to post
Share on other sites

I've updated hpm once again. This time the update brings some really useful features.

  • First, I've changed the way you install and remove non-hel packages. Instead of hpm install oppm:package you need to run hpm oppm:install package. This made it incredibly easier to implement the other features.
  • save command no longer exist. To install a package to the current directory, pass the -s flag to install (or oppm:install).
  • Added hel:upgrade that tries to install the up-to-date versions of the installed packages. This is one of the main features of this update, although it was simple to implement, as it turned out.
  • Added hel:search. When it's run without any arguments, it simply lists all packages in the Hel Repository. By passing arguments you can filter out unwanted results. Don't forget to add | less at the end of command if the output is loo large.
  • Added oppm:search. It works similarly to the hel:search.
  • Added oppm:info. Previously there only was the hel:info command, and that was a little confusing.
  • Multiple arguments for install and remove commands are handled correctly now. In previous version it was pretty spammy.
  • Dependent packages are not removed when the reinstalling a package now.
  • hpm builds are now minified using the wonderful LuaMinify program. I've managed to reduce the size from 192 kB to 72 kB without changing any program logic.
  • Plans are confirmed only when there are no pending changes to approve.
  • Fixed a few minor bugs.

To update, simply run the following command:

$ pastebin run vf6upeAN
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.