[packages/ejabberd] use system installed elixir
atler
atler at pld-linux.org
Mon Nov 11 02:37:49 CET 2024
commit bd790cf327be06019874fbe4141284ca81966b3c
Author: Jan Palus <atler at pld-linux.org>
Date: Sat Nov 9 01:40:18 2024 +0100
use system installed elixir
ejabberd.spec | 15 ++++++---------
system-elixir.patch | 43 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 9 deletions(-)
---
diff --git a/ejabberd.spec b/ejabberd.spec
index 7da647b..49c2a2a 100644
--- a/ejabberd.spec
+++ b/ejabberd.spec
@@ -28,8 +28,6 @@ Source11: ejabberd-cache_tab-20220502.tar.gz
# Source11-md5: 822bec23631e956ce927ecc5ae31e24d
Source12: ejabberd-eimp-20220502.tar.gz
# Source12-md5: 39b7de8ad391da8fb12ff9b76301ced5
-Source13: ejabberd-elixir-20170515.tar.gz
-# Source13-md5: 73be42f7d0cda7aeee5c0e6dadc0c451
Source14: ejabberd-ezlib-20220502.tar.gz
# Source14-md5: 32dadbeff189a0fa18c21aa42258fa1a
Source15: ejabberd-fast_tls-20221012.tar.gz
@@ -78,9 +76,11 @@ Patch1: %{name}-config.patch
# https://paleg.github.io/mod_logdb/
# https://github.com/paleg/ejabberd/compare/paleg:19.08...paleg:19.08-mod_logdb.patch
Patch3: %{name}-mod_logdb.patch
+Patch4: system-elixir.patch
URL: http://www.ejabberd.im/
BuildRequires: autoconf
BuildRequires: automake
+BuildRequires: elixir
BuildRequires: erlang >= 2:22.2
BuildRequires: erlang-rebar
BuildRequires: expat-devel >= 1.95
@@ -125,12 +125,15 @@ Requires: %{name} = %{version}-%{release}
Server-side logging module.
%prep
-%setup -q -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19 -a 20 -a 21 -a 22 -a 23 -a 24 -a 25 -a 26 -a 27 -a 28 -a 29 -a 30 -a 31 -a 32 -a 33 -a 34
+%setup -q -a 10 -a 11 -a 12 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19 -a 20 -a 21 -a 22 -a 23 -a 24 -a 25 -a 26 -a 27 -a 28 -a 29 -a 30 -a 31 -a 32 -a 33 -a 34
%patch0 -p1
%patch1 -p1
%if %{with logdb}
%patch3 -p1
%endif
+%patch4 -p1
+
+%{__sed} -i -e 's, at ELIXIRDIR@,%{_libdir}/elixir,' ejabberdctl.template rebar.config
# Various parts of the build system use 'git describe'
# which returns nonsense on manual builds using the builder script
@@ -145,8 +148,6 @@ git add configure.ac
git commit -a -m "dummy commit"
git tag "%{version}"
-sed -i -e 's,#!.*/usr/bin/env.*elixir,#!/usr/bin/elixir,' deps/elixir/bin/mix deps/elixir/lib/mix/lib/mix/tasks/escript.build.ex
-
%build
unset GIT_DIR GIT_WORK_TREE
%{__aclocal} -I m4
@@ -328,9 +329,6 @@ fi
%defattr(644,root,root,755)
%doc sql _doc/*
%attr(755,root,root) %{_sbindir}/*
-%attr(755,root,root) %{_bindir}/elixir
-%attr(755,root,root) %{_bindir}/iex
-%attr(755,root,root) %{_bindir}/mix
%attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/ejabberd-inetrc
%attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/ejabberd.yml
%attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/ejabberdctl.cfg
@@ -350,7 +348,6 @@ fi
%attr(755,root,root) %{_libdir}/eimp-*/priv/bin/eimp
%{_libdir}/eimp-*/ebin
%{_libdir}/eimp-*/LICENSE.txt
-%{_libdir}/elixir-*
%{_libdir}/ezlib-*
%{_libdir}/fast_tls-*
%{_libdir}/fast_xml-*
diff --git a/system-elixir.patch b/system-elixir.patch
new file mode 100644
index 0000000..c36db79
--- /dev/null
+++ b/system-elixir.patch
@@ -0,0 +1,43 @@
+--- ejabberd-23.10/rebar.config.orig 2023-10-17 15:57:50.000000000 +0200
++++ ejabberd-23.10/rebar.config 2024-11-09 01:35:09.804284686 +0100
+@@ -27,8 +27,6 @@
+ {eimp, ".*", {git, "https://github.com/processone/eimp", {tag, "1.0.22"}}},
+ {if_var_true, tools,
+ {ejabberd_po, ".*", {git, "https://github.com/processone/ejabberd-po", {branch, "main"}}}},
+- {if_var_true, elixir,
+- {elixir, ".*", {git, "https://github.com/elixir-lang/elixir", {tag, "v1.4.4"}}}},
+ {if_var_true, pam,
+ {epam, ".*", {git, "https://github.com/processone/epam", {tag, "1.0.14"}}}},
+ {if_var_true, redis,
+@@ -81,8 +79,6 @@
+ {yconf, ".*", {git, "https://github.com/processone/yconf", {tag, "1.0.15"}}}
+ ]}.
+
+-{gitonly_deps, [elixir]}.
+-
+ {if_var_true, latest_deps,
+ {floating_deps, [cache_tab,
+ eimp,
+@@ -158,9 +154,9 @@
+ ]}}.
+
+ {if_rebar3, {if_var_true, elixir,
+- {project_app_dirs, [".", "elixir/lib"]}}}.
++ {project_app_dirs, ["@ELIXIRDIR@/lib"]}}}.
+ {if_not_rebar3, {if_var_true, elixir,
+- {lib_dirs, ["deps/elixir/lib"]}}}.
++ {lib_dirs, ["@ELIXIRDIR@/lib"]}}}.
+ {if_var_true, elixir,
+ {src_dirs, ["include"]}}.
+
+--- ejabberd-23.10/ejabberdctl.template.orig 2024-11-11 00:07:00.959534985 +0100
++++ ejabberd-23.10/ejabberdctl.template 2024-11-11 00:27:41.237266444 +0100
+@@ -85,7 +85,7 @@
+ [ -n "$ERL_DIST_PORT" ] && ERLANG_OPTS="$ERLANG_OPTS -erl_epmd_port $ERL_DIST_PORT -start_epmd false"
+ # if vm.args file exists in config directory, pass it to Erlang VM
+ [ -f "$VMARGS" ] && ERLANG_OPTS="$ERLANG_OPTS -args_file $VMARGS"
+-ERL_LIBS='{{libdir}}'
++ERL_LIBS='{{libdir}}:@ELIXIRDIR@/lib'
+ ERL_CRASH_DUMP="$LOGS_DIR"/erl_crash_$(date "+%Y%m%d-%H%M%S").dump
+ ERL_INETRC="$CONFIG_DIR"/ejabberd-inetrc
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ejabberd.git/commitdiff/ce0e3441fa37c2ca6f8098ba00576b9feaa5640b
More information about the pld-cvs-commit
mailing list