diff options
-rw-r--r-- | README.md | 31 | ||||
-rw-r--r-- | docker/Dockerfile | 23 | ||||
-rwxr-xr-x | rebar | bin | 0 -> 201543 bytes | |||
-rw-r--r-- | rebar.config | 3 |
4 files changed, 57 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..f45f8dc --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +`sd_notify` Erlang interface for Centos 7. +--- + +This add the `sd_notify` to the Centos erlang package. +I tested it starting for zero-dependencies RabbitMQ package ([github](https://github.com/rabbitmq/erlang-rpm) - [binany](https://www.rabbitmq.com/releases/erlang/) ) + +Build from source +- +To build it execute the docker image. +To add it to your package: + + mkdir -p /usr/lib64/erlang/lib/sd_notify-0.9/priv/ + mkdir -p /usr/lib64/erlang/lib/sd_notify-0.9/ebin/ + cp priv/* /usr/lib64/erlang/lib/sd_notify-0.9/priv/ + cp ebin/* /usr/lib64/erlang/lib/sd_notify-0.1/ebin/ + + +To test it use: `sd_notify:sd_notify(0,"READY=1")`, in this way: + + [root@a499ee66251a]# erl + ... + 1> sd_notify:sd_notify(0,"READY=1"). + ok + +Download the binary +- +WIP + +RabbitMQ notes: +- +RabbitMQ does not need `sd_notify`, this add this feature for the users that in general need `sd_notify`. The integration should be considerer as **experimental**
\ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..d373b54 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,23 @@ +FROM centos + +RUN yum -y update + +RUN yum install -y \ + gcc \ + systemd-devel \ + make \ + git \ + wget \ + which + + + +RUN mkdir /build && cd /build + +RUN wget https://www.rabbitmq.com/releases/erlang/erlang-18.1-1.el7.centos.x86_64.rpm + +RUN rpm -i erlang-18.1-1.el7.centos.x86_64.rpm + +RUN wget https://github.com/rebar/rebar/wiki/rebar && chmod +x rebar + + Binary files differdiff --git a/rebar.config b/rebar.config new file mode 100644 index 0000000..4f871b1 --- /dev/null +++ b/rebar.config @@ -0,0 +1,3 @@ +{port_env, [{"LDFLAGS", "$LDFLAGS -lsystemd"}]}. + +{erl_opts, [debug_info, warnings_as_errors]}. |