matrix2051 icon indicating copy to clipboard operation
matrix2051 copied to clipboard

Packaging

Open Thaodan opened this issue 3 years ago • 11 comments

Hey,

I have a few questions regarding packaging this app.

  • Why does mix try to install hex and rebar even thou it is already already installed with elixir?
  • Can I make mix deps.get stop asking questions?

Thaodan avatar Jul 10 '22 02:07 Thaodan

the --overwrite flag of mix release skips the question, at least on rebuilds. I don't know about the other question

progval avatar Jul 10 '22 02:07 progval

To fix both issues I did set include_ert to false. Now it's using the dependencies provided by elrang and use hex from elixir.

Thaodan avatar Jul 10 '22 15:07 Thaodan

Do you have any documentation of what this does and how to use it?

progval avatar Jul 10 '22 15:07 progval

First I have to correct something:

  • mix local.hex --force was still needed since hex isn't packaged on Arch Linux (just parts of it where included into mix).
  • To make mix to use the already installed rebar3 I had to set MIX_HOME=/usr/ bin and MIX_ARCHIVE=$srcdir/mix/archives

Do you have any documentation of what this does and how to use it? mix help release

It stops mix release from trying to bundle the erlang runtime.

Another small step is to cleanup all the batch files included by mix.

The final step would be to make mix to use the elixir runtime that is already packaged.

Thaodan avatar Jul 10 '22 17:07 Thaodan

Are you also interested into have a systemd unit saved in this repo?

Thaodan avatar Jul 10 '22 19:07 Thaodan

Ugh that looks annoying. There's already a systemd unit in https://github.com/progval/matrix2051/blob/main/INSTALL.md ; feel free to improve it or suggest alternatives

progval avatar Jul 10 '22 19:07 progval

How does this one look?

https://aur.archlinux.org/cgit/aur.git/tree/matrix2051.service?h=matrix2051-git

Thaodan avatar Jul 10 '22 20:07 Thaodan

Oh I didn't realize you were actually packaging it in AUR.

It looks good to me.

There are many redundant options in this service. eg. ProtectSystem=strict and ProtectHome=true are implied by DynamicUser=true. Is it standard practice to include them anyway?

progval avatar Jul 10 '22 20:07 progval

Oh I didn't realize you were actually packaging it in AUR.

It looks good to me.

There are many redundant options in this service. eg. ProtectSystem=strict and ProtectHome=true are implied by DynamicUser=true. Is it standard practice to include them anyway?

Oh thanks, it is not practice to include redundant options however if for some reasons a non dynamicuser setting would be ued they still to make sense to include.

Thaodan avatar Jul 11 '22 01:07 Thaodan