-
-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update request: ejabberd 23.10 → 24.06 #292110
Comments
I attempted the new Elixir/Mix based approach in the linked dup, but hit another error. |
@happysalada Any ideas what we can try here? |
can you paste the errors you are getting ? |
With this change: diff --git a/pkgs/servers/xmpp/ejabberd/default.nix b/pkgs/servers/xmpp/ejabberd/default.nix
index 821465ec3a52..05e2586417ba 100644
--- a/pkgs/servers/xmpp/ejabberd/default.nix
+++ b/pkgs/servers/xmpp/ejabberd/default.nix
@@ -2,6 +2,9 @@
, erlang, openssl, expat, libyaml, bash, gnused, gnugrep, coreutils, util-linux, procps, gd
, flock, autoreconfHook
, gawk
+, hex
+, elixir
+, rebar3
, nixosTests
, withMysql ? false
, withPgsql ? false
@@ -17,7 +20,7 @@ let
ctlpath = lib.makeBinPath [ bash gnused gnugrep gawk coreutils util-linux procps ];
in stdenv.mkDerivation rec {
pname = "ejabberd";
- version = "23.10";
+ version = "24.02";
nativeBuildInputs = [ makeWrapper autoreconfHook ];
@@ -29,7 +32,7 @@ in stdenv.mkDerivation rec {
src = fetchurl {
url = "https://www.process-one.net/downloads/downloads-action.php?file=/${version}/ejabberd-${version}.tar.gz";
- hash = "sha256-DW5/DYLZHNqJ4lddmag1B0E9ov/eObIVGASUeioPolg=";
+ hash = "sha256-ttSNO/K+82jpMh41Q2OByG14REuQQmScbEqrAIk5XAc=";
# remember to update the deps FOD hash & its pinned ejabberd-po commit
};
@@ -48,13 +51,13 @@ in stdenv.mkDerivation rec {
substituteInPlace rebar.config \
--replace \
'{git, "https://github.com/processone/ejabberd-po", {branch, "main"}}' \
- '{git, "https://github.com/processone/ejabberd-po", {tag, "26d6463386588d39f07027dabff3cb8dd938bf6b"}}'
+ '{git, "https://github.com/processone/ejabberd-po", {tag, "fd0e059de4c0772de37339a0a95f9a474d107b59"}}'
'';
configureFlags = [ "--enable-all" "--with-sqlite3=${sqlite.dev}" ];
nativeBuildInputs = [
- git erlang openssl expat libyaml sqlite pam zlib autoreconfHook
+ git erlang openssl expat libyaml sqlite pam zlib autoreconfHook rebar3 elixir hex
];
GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
@@ -83,7 +86,7 @@ in stdenv.mkDerivation rec {
outputHashAlgo = "sha256";
outputHashMode = "recursive";
- outputHash = "sha256-HrLu3wTF+cUxpGX0yK3nbB57SRM2ND3Crlxs5/8FIwI=";
+ outputHash = "";
};
configureFlags = [
@@ -97,6 +100,7 @@ in stdenv.mkDerivation rec {
] ++ lib.optional withSqlite "--with-sqlite3=${sqlite.dev}";
enableParallelBuilding = true;
+ makeFlags = [ "prod" ];
postPatch = ''
cp -r $deps deps I get these errors:
|
sorry looking at the error I don't have any idea of what it could be. I hope you solve it though. |
@jpds Based on your work, I was able to get diff --git a/pkgs/servers/xmpp/ejabberd/default.nix b/pkgs/servers/xmpp/ejabberd/default.nix
index 821465ec3a52..b1aaee54406e 100644
--- a/pkgs/servers/xmpp/ejabberd/default.nix
+++ b/pkgs/servers/xmpp/ejabberd/default.nix
@@ -2,6 +2,9 @@
, erlang, openssl, expat, libyaml, bash, gnused, gnugrep, coreutils, util-linux, procps, gd
, flock, autoreconfHook
, gawk
+, hex
+, elixir
+, rebar3
, nixosTests
, withMysql ? false
, withPgsql ? false
@@ -17,9 +20,9 @@ let
ctlpath = lib.makeBinPath [ bash gnused gnugrep gawk coreutils util-linux procps ];
in stdenv.mkDerivation rec {
pname = "ejabberd";
- version = "23.10";
+ version = "24.02";
- nativeBuildInputs = [ makeWrapper autoreconfHook ];
+ nativeBuildInputs = [ makeWrapper autoreconfHook rebar3 hex ];
buildInputs = [ erlang openssl expat libyaml gd ]
++ lib.optional withSqlite sqlite
@@ -29,7 +32,7 @@ in stdenv.mkDerivation rec {
src = fetchurl {
url = "https://www.process-one.net/downloads/downloads-action.php?file=/${version}/ejabberd-${version}.tar.gz";
- hash = "sha256-DW5/DYLZHNqJ4lddmag1B0E9ov/eObIVGASUeioPolg=";
+ hash = "sha256-ttSNO/K+82jpMh41Q2OByG14REuQQmScbEqrAIk5XAc=";
# remember to update the deps FOD hash & its pinned ejabberd-po commit
};
@@ -48,30 +51,31 @@ in stdenv.mkDerivation rec {
substituteInPlace rebar.config \
--replace \
'{git, "https://github.com/processone/ejabberd-po", {branch, "main"}}' \
- '{git, "https://github.com/processone/ejabberd-po", {tag, "26d6463386588d39f07027dabff3cb8dd938bf6b"}}'
+ '{git, "https://github.com/processone/ejabberd-po", {tag, "fd0e059de4c0772de37339a0a95f9a474d107b59"}}'
'';
configureFlags = [ "--enable-all" "--with-sqlite3=${sqlite.dev}" ];
nativeBuildInputs = [
- git erlang openssl expat libyaml sqlite pam zlib autoreconfHook
+ erlang openssl expat libyaml sqlite pam zlib autoreconfHook rebar3 elixir hex
];
GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
makeFlags = [ "deps" ];
+ preBuild = ''
+ export MIX_HOME="$(mktemp -d)" HEX_HOME="$(mktemp -d)"
+ '';
+
installPhase = ''
for i in deps/*; do
- ( cd $i
- git reset --hard
- git clean -ffdx
- git describe --always --tags > .rev
- rm -rf .git .github
- )
+ [ -d $i ] && {
+ pushd $i
+ rm -rf .git .github config.status config.log
+ popd
+ }
done
- # not a typo; comes from `make deps`
- rm deps/.got
cp -r deps $out
'';
@@ -83,7 +87,7 @@ in stdenv.mkDerivation rec {
outputHashAlgo = "sha256";
outputHashMode = "recursive";
- outputHash = "sha256-HrLu3wTF+cUxpGX0yK3nbB57SRM2ND3Crlxs5/8FIwI=";
+ outputHash = "sha256-7PC5cLg692aa1NrWEhokqs/FYMRBa5B6dwLiO3/41gI=";
};
configureFlags = [
@@ -104,6 +108,10 @@ in stdenv.mkDerivation rec {
patchShebangs .
'';
+ preBuild = ''
+ export REBAR_CACHE_DIR="$(mktemp -d)"
+ '';
+
postInstall = ''
sed -i \
-e '2iexport PATH=${ctlpath}:$PATH' \ But I got stuck on erlang/rebar3#1281:
erlang/rebar3#2643 (comment) mentioned that one can use the |
Another attempt, using rebar3_nix: https://gist.github.com/chuangzhu/e40c9cde919925fba25a3cb4da514e9c It builds, but ejabberdctl crashes |
OK I figured it out. It's just because we have an override $ ./result/bin/ejabberdctl
Failed RPC connection to the node ejabberd@localhost: nodedown
Commands to start an ejabberd node:
start Start in server mode
foreground Start in server mode (attached)
foreground-quiet Start in server mode (attached), show only critical messages
live Start in interactive mode, with Erlang shell
iexlive Start in interactive mode, with Elixir shell
Commands to interact with a running ejabberd node:
debug Attach an interactive Erlang shell to a running node
iexdebug Attach an interactive Elixir shell to a running node
etop Attach to a running node and start Erlang Top
ping Send ping to the node, returns pong or pang
started|stopped Wait for the node to fully start|stop
Optional parameters when starting an ejabberd node:
--config-dir dir Config ejabberd: /nix/store/p4c84sfmr1isnzbxb17f1whwvdpgpjh5-ejabberd-24.02/etc/ejabberd
--config file Config ejabberd: /nix/store/p4c84sfmr1isnzbxb17f1whwvdpgpjh5-ejabberd-24.02/etc/ejabberd/ejabberd.yml
--ctl-config file Config ejabberdctl: /nix/store/p4c84sfmr1isnzbxb17f1whwvdpgpjh5-ejabberd-24.02/etc/ejabberd/ejabberdctl.cfg
--logs dir Directory for logs: /nix/store/p4c84sfmr1isnzbxb17f1whwvdpgpjh5-ejabberd-24.02/var/log/ejabberd
--spool dir Database spool dir: /nix/store/p4c84sfmr1isnzbxb17f1whwvdpgpjh5-ejabberd-24.02/var/lib/ejabberd
--node nodename ejabberd node name: ejabberd@localhost |
@FliegendeWurst The PR has been ready for review for quite a while. If you are interested, could you help me review it? |
Notify maintainers
@abbradar @svanderburg
Note for maintainers: Please tag this issue in your PR.
I would attach this diff as a file if Microsoft GitHub didn’t disallow that. Simple version bump leads to errors.
Add a 👍 reaction to issues you find important.
1
Footnotes
Please consider giving up MS GitHub or offering a non-proprietary, non-US-corporate-controlled mirror for this free software project. I wish to delete this Microsoft account in the future, but I need more projects like this to support alternative methods to send patches & contribute. ↩
The text was updated successfully, but these errors were encountered: