public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ejabberd] f45: Fix three issues that prevented ejabberd from starting (#1524199).
@ 2026-09-23 19:07 Randy Barlow
  0 siblings, 0 replies; only message in thread
From: Randy Barlow @ 2026-09-23 19:07 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/ejabberd
            Branch : f45
            Commit : bc14ce1db810db0568aa2659e8331264b8465d8b
            Author : Randy Barlow <randy@electronsweatshop.com>
            Date   : 2017-12-11T10:57:14-05:00
            Stats  : +73/-3 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/ejabberd/c/bc14ce1db810db0568aa2659e8331264b8465d8b?branch=f45

            Log:
            Fix three issues that prevented ejabberd from starting (#1524199).

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>

---
diff --git a/ejabberd-0005-Use-bin-sh-as-the-explicit-shell-when-using-su-in-ej.patch b/ejabberd-0005-Use-bin-sh-as-the-explicit-shell-when-using-su-in-ej.patch
new file mode 100644
index 0000000..3f669b4
--- /dev/null
+++ b/ejabberd-0005-Use-bin-sh-as-the-explicit-shell-when-using-su-in-ej.patch
@@ -0,0 +1,34 @@
+From 12d9d97baaff3bc4bd4910647f5de3378be0cf6e Mon Sep 17 00:00:00 2001
+From: Randy Barlow <randy@electronsweatshop.com>
+Date: Sun, 10 Dec 2017 12:52:22 -0500
+Subject: [PATCH] Use /bin/sh as the explicit shell when using su in
+ ejabberdctl.
+
+Some distributions (such as Fedora) use /sbin/nologin as the login
+shell for the ejabberd user. The newer version of ejabberdctl uses
+su to perform the command if the INSTALLUSER invokes the script.
+This commit adjusts the call to su so that it passes /bin/sh as
+the shell to use so that it will work correctly when the ejabberd
+user's shell is set to nologin.
+
+Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
+---
+ ejabberdctl.template | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ejabberdctl.template b/ejabberdctl.template
+index 83637766..571b90b6 100755
+--- a/ejabberdctl.template
++++ b/ejabberdctl.template
+@@ -110,7 +110,7 @@ export ERL_LIBS
+ exec_cmd()
+ {
+     case $EXEC_CMD in
+-        as_install_user) su -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
++        as_install_user) su -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
+         as_current_user) "$@" ;;
+     esac
+ }
+-- 
+2.14.3
+

diff --git a/ejabberd-0006-Remove-mod_avatar-from-the-ejabberd.yml-since-we-don.patch b/ejabberd-0006-Remove-mod_avatar-from-the-ejabberd.yml-since-we-don.patch
new file mode 100644
index 0000000..a8b9e15
--- /dev/null
+++ b/ejabberd-0006-Remove-mod_avatar-from-the-ejabberd.yml-since-we-don.patch
@@ -0,0 +1,29 @@
+From a2941a16a528ea6fb90f7a463834e565a1ef7d83 Mon Sep 17 00:00:00 2001
+From: Randy Barlow <randy@electronsweatshop.com>
+Date: Mon, 11 Dec 2017 10:28:25 -0500
+Subject: [PATCH] Remove mod_avatar from the ejabberd.yml since we don't
+ support it.
+
+Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
+---
+ ejabberd.yml.example | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/ejabberd.yml.example b/ejabberd.yml.example
+index 99892823..749ed3f9 100644
+--- a/ejabberd.yml.example
++++ b/ejabberd.yml.example
+@@ -769,10 +769,6 @@ modules:
+   mod_vcard:
+     search: false
+   mod_vcard_xupdate: {}
+-  ## Convert all avatars posted by Android clients from WebP to JPEG
+-  mod_avatar:
+-    convert:
+-      webp: jpeg
+   mod_version: {}
+   mod_stream_mgmt: {}
+   ##   Non-SASL Authentication (XEP-0078) is now disabled by default
+-- 
+2.14.3
+

diff --git a/ejabberd.service b/ejabberd.service
index 8d61797..5c39af5 100644
--- a/ejabberd.service
+++ b/ejabberd.service
@@ -10,11 +10,11 @@ User=ejabberd
 Group=ejabberd
 LimitNOFILE=16000
 RestartSec=5
-ExecStart=/usr/bin/ejabberdctl \
+ExecStart=/usr/bin/ejabberdctl start \
 		--config /etc/ejabberd/ejabberd.yml \
 		--ctl-config /etc/ejabberd/ejabberdctl.cfg \
 		--logs "/var/log/ejabberd" \
-		--spool "/var/lib/ejabberd" start
+		--spool "/var/lib/ejabberd"
 ExecStop=/usr/bin/ejabberdctl stop
 RemainAfterExit=yes
 # The CAP_DAC_OVERRIDE capability is required for pam authentication to work

diff --git a/ejabberd.spec b/ejabberd.spec
index 09ebcce..a9cb66e 100644
--- a/ejabberd.spec
+++ b/ejabberd.spec
@@ -5,7 +5,7 @@
 
 Name:           ejabberd
 Version:        17.09
-Release:        1%{?dist}
+Release:        2%{?dist}
 
 License:        GPLv2+
 Summary:        A distributed, fault-tolerant Jabber/XMPP server
@@ -38,6 +38,10 @@ Patch2: ejabberd-0002-Drop-post_hook_configure-from-rebar.config.patch
 Patch3: ejabberd-0003-Install-into-BINDIR-instead-of-SBINDIR.patch
 # Fedora-specific
 Patch4: ejabberd-0004-Enable-systemd-notification-if-available.patch
+# https://github.com/processone/ejabberd/pull/2158                             
+Patch5: ejabberd-0005-Use-bin-sh-as-the-explicit-shell-when-using-su-in-ej.patch
+# Remove mod_avatar from the config file since we don't have its dependency (eimp) in Fedora yet.
+Patch6: ejabberd-0006-Remove-mod_avatar-from-the-ejabberd.yml-since-we-don.patch
 
 
 BuildRequires:  elixir >= 1.4.4
@@ -350,6 +354,9 @@ fi
 
 
 %changelog
+* Mon Dec 11 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 17.09-2
+- Fix three issues that prevented ejabberd from starting (#1524199).
+
 * Fri Nov 10 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 17.09-1
 - Update to 17.09 (#1427123).
 - https://blog.process-one.net/ejabberd-17-09/

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-23 19:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 19:07 [rpms/ejabberd] f45: Fix three issues that prevented ejabberd from starting (#1524199) Randy Barlow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox