Building a rpm from a relx release

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Building a rpm from a relx release

Zachary Kessin-2
I am working on building a RPM from a relx release, and one question I have is what is the best way to setup init scripts. What I want is of course for linux to start the erlang package on boot. Simply linking the normal start file into /etc/init.d does not work as you get directory errors.

So what have people had luck with


--
Zachary Kessin
Mostly Erlang Podcast
Skype: zachkessin
Twitter: @zkessin

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Building a rpm from a relx release

Karol Urbanski
The best way is to take a skeleton initscript (or edit an
existing one) and fill out the start/stop functions and the necessary
case statements; the initscript will act as a wrapper that calls
the start file in a way that will avoid directory errors.

After that, if you have a properly created initscript, all you need to
do is just chkconfig to autostart your package.

Don't package the /etc/rc.d/rcN.d symlink to the initscript; instead
create a postinstall script that will use chkconfig to add it to
autostart on package install. This is simply good practice so your rpm
file listing doesn't desynch if someone removes the package from
autostart.

Best regards,
Karol Urbanski
On Tue, Jul 28, 2015 at 12:19:04PM +0100, Zachary Kessin wrote:

>    I am working on building a RPM from a relx release, and one question I have is what is the best way to setup
>    init scripts. What I want is of course for linux to start the erlang package on boot. Simply linking the normal
>    start file into /etc/init.d does not work as you get directory errors.
>    So what have people had luck with
>
>    --
>    Zachary Kessin
>    Mostly Erlang Podcast
>    Skype: zachkessin
>    Twitter: @zkessin

> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Building a rpm from a relx release

Sean Cribbs
Zack,

https://github.com/basho/node_package has templates you can use, even if you don't use the entire thing (since it relies on reltool, not relx).

On Tue, Jul 28, 2015 at 6:50 AM, Karol Urbanski <[hidden email]> wrote:
The best way is to take a skeleton initscript (or edit an
existing one) and fill out the start/stop functions and the necessary
case statements; the initscript will act as a wrapper that calls
the start file in a way that will avoid directory errors.

After that, if you have a properly created initscript, all you need to
do is just chkconfig to autostart your package.

Don't package the /etc/rc.d/rcN.d symlink to the initscript; instead
create a postinstall script that will use chkconfig to add it to
autostart on package install. This is simply good practice so your rpm
file listing doesn't desynch if someone removes the package from
autostart.

Best regards,
Karol Urbanski
On Tue, Jul 28, 2015 at 12:19:04PM +0100, Zachary Kessin wrote:
>    I am working on building a RPM from a relx release, and one question I have is what is the best way to setup
>    init scripts. What I want is of course for linux to start the erlang package on boot. Simply linking the normal
>    start file into /etc/init.d does not work as you get directory errors.
>    So what have people had luck with
>
>    --
>    Zachary Kessin
>    Mostly Erlang Podcast
>    Skype: zachkessin
>    Twitter: @zkessin

> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Building a rpm from a relx release

Andre Graf
We're currently using a patched version of node_package that uses rebar3
(and therefore relx) for generating the VerneMQ deb and rpm packages.

you can find it in
https://github.com/dergraf/node_package/tree/rebar3-support

Cheers,
Andre

On 07/28/2015 03:53 PM, Sean Cribbs wrote:

> Zack,
>
> https://github.com/basho/node_package has templates you can use, even if
> you don't use the entire thing (since it relies on reltool, not relx).
>
> On Tue, Jul 28, 2015 at 6:50 AM, Karol Urbanski
> <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     The best way is to take a skeleton initscript (or edit an
>     existing one) and fill out the start/stop functions and the necessary
>     case statements; the initscript will act as a wrapper that calls
>     the start file in a way that will avoid directory errors.
>
>     After that, if you have a properly created initscript, all you need to
>     do is just chkconfig to autostart your package.
>
>     Don't package the /etc/rc.d/rcN.d symlink to the initscript; instead
>     create a postinstall script that will use chkconfig to add it to
>     autostart on package install. This is simply good practice so your rpm
>     file listing doesn't desynch if someone removes the package from
>     autostart.
>
>     Best regards,
>     Karol Urbanski
>     On Tue, Jul 28, 2015 at 12:19:04PM +0100, Zachary Kessin wrote:
>     >    I am working on building a RPM from a relx release, and one question I have is what is the best way to setup
>     >    init scripts. What I want is of course for linux to start the erlang package on boot. Simply linking the normal
>     >    start file into /etc/init.d does not work as you get directory errors.
>     >    So what have people had luck with
>     >
>     >    --
>     >    Zachary Kessin
>     >    Mostly Erlang Podcast
>     >    Skype: zachkessin
>     >    Twitter: @zkessin
>
>     > _______________________________________________
>     > erlang-questions mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > http://erlang.org/mailman/listinfo/erlang-questions
>
>     _______________________________________________
>     erlang-questions mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
>

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Building a rpm from a relx release

Max Lapshin-2
JFYI:  you can use erlang rpm builder  https://github.com/flussonic/epm  to make a deb or rpm.

It does not support all features of rpm (librpm is the most horrible code I ever seen), but it works for us.
It doesn't require any C rpm library and it may be used to make package from MacOS X.


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions