public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ejabberd] f45: Address re-review findings
@ 2026-09-23 19:08 Peter Lemenkov
0 siblings, 0 replies; only message in thread
From: Peter Lemenkov @ 2026-09-23 19:08 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/ejabberd
Branch : f45
Commit : 778697b7f4b627d0ca549a7394ee1a1f58789cac
Author : Peter Lemenkov <lemenkov@gmail.com>
Date : 2026-09-23T20:19:50+02:00
Stats : +37/-68 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/ejabberd/c/778697b7f4b627d0ca549a7394ee1a1f58789cac?branch=f45
Log:
Address re-review findings
- Complete the License tag (MQTT modules are Apache-2.0, bundled JS is MIT)
- Add Provides: bundled(...) for the minified JavaScript libraries
- Drop the unDraw illustration which is under a non-redistributable license
- Create the ejabberd user via systemd-sysusers instead of %pre scriptlet
- Drop the self-signed certificate generation in %post
- Restore the erlang-luerl dependency and enable Lua support
(used by prosody2ejabberd)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
diff --git a/.gitignore b/.gitignore
index 7328e0c..3609483 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/ejabberd-26.07.tar.gz
+/ejabberd-*.tar.gz
diff --git a/ejabberd.spec b/ejabberd.spec
index be42c9c..1975f0a 100644
--- a/ejabberd.spec
+++ b/ejabberd.spec
@@ -14,6 +14,7 @@
%global fast_yaml_ver 1.0.40
%global idna_ver 7.1.0
%global jose_ver 1.11.12
+%global luerl_ver 1.2.0
%global mqtree_ver 1.0.20
%global p1_acme_ver 1.0.31
%global p1_mysql_ver 1.0.28
@@ -38,10 +39,13 @@ Version: 26.07
Release: %autorelease
BuildArch: noarch
-License: GPL-2.0-or-later
+# The bulk of the code is GPL-2.0-or-later. The MQTT modules (src/mod_mqtt*.erl,
+# src/mqtt_codec.erl, include/mqtt.hrl) are Apache-2.0. The bundled JavaScript
+# in priv/js and priv/mod_invites/static is MIT.
+License: GPL-2.0-or-later AND Apache-2.0 AND MIT AND BSD-3-Clause
Summary: A distributed, fault-tolerant Jabber/XMPP server
URL: https://www.ejabberd.im/
-VCS: scm:git:https://github.com/processone/ejabberd.git
+VCS: git:https://github.com/processone/ejabberd.git
Source0: https://github.com/processone/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
Source2: ejabberd.logrotate
@@ -59,6 +63,8 @@ Source13: ejabberdctl.polkit.rules
Source14: ejabberd.te
Source15: ejabberd.fc
Source16: ejabberd.if
+# systemd-sysusers config
+Source17: ejabberd.sysusers
BuildRequires: erlang-cache_tab >= %{cache_tab_ver}
@@ -72,6 +78,7 @@ BuildRequires: erlang-fast_xml >= %{fast_xml_ver}
BuildRequires: erlang-fast_yaml >= %{fast_yaml_ver}
BuildRequires: erlang-idna >= %{idna_ver}
BuildRequires: erlang-jose >= %{jose_ver}
+BuildRequires: erlang-luerl >= %{luerl_ver}
# For the eunit tests
BuildRequires: erlang-meck
BuildRequires: erlang-mqtree >= %{mqtree_ver}
@@ -101,18 +108,25 @@ BuildRequires: autoconf
BuildRequires: automake
BuildRequires: make
-# For creating user and group
-Requires(pre): shadow-utils
-
-Requires(post): /usr/bin/openssl
+Requires(post): libselinux-utils
+Requires(post): policycoreutils
+Requires(post): policycoreutils-python-utils
+Requires(post): selinux-policy-base >= %{selinux_policyver}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
-Provides: user(%{name})
-Provides: group(%{name})
+# Minified JavaScript libraries shipped by upstream without version information
+# https://github.com/davidshimjs/qrcodejs
+Provides: bundled(js-qrcode)
+# https://github.com/bestiejs/platform.js
+Provides: bundled(js-platform)
+# https://github.com/tofsjonas/sortable
+Provides: bundled(js-sortable)
+
+Requires: selinux-policy >= %{selinux_policyver}
+Obsoletes: ejabberd-selinux < 26.07
-Requires: ejabberd-selinux == %{version}-%{release}
# From rebar
Requires: erlang-cache_tab >= %{cache_tab_ver}
Requires: erlang-eimp >= %{eimp_ver}
@@ -125,6 +139,7 @@ Requires: erlang-fast_xml >= %{fast_xml_ver}
Requires: erlang-fast_yaml >= %{fast_yaml_ver}
Requires: erlang-idna >= %{idna_ver}
Requires: erlang-jose >= %{jose_ver}
+Requires: erlang-luerl >= %{luerl_ver}
Requires: erlang-mqtree >= %{mqtree_ver}
Requires: erlang-odbc
Requires: erlang-os_mon
@@ -153,22 +168,6 @@ platforms (tested on Linux, FreeBSD, NetBSD, Solaris, Mac OS X and
Windows NT/2000/XP).
-%package selinux
-BuildArch: noarch
-
-Summary: SELinux policy for ejabberd
-
-Requires: selinux-policy >= %{selinux_policyver}
-Requires(post): selinux-policy-base >= %{selinux_policyver}
-Requires(post): libselinux-utils
-Requires(post): policycoreutils
-Requires(post): policycoreutils-python-utils
-
-
-%description selinux
-This is the SELinux policy for ejabberd.
-
-
%prep
%autosetup -p1
@@ -180,6 +179,10 @@ sed -i 's/{rebar3_hex, "[^"]*"},//' rebar.config
# the internal map representation and doesn't hold on Erlang/OTP 27.3.
sed -i '/^-ifndef(OTP_BELOW_27)\./,/^-endif\./d' test/json_test.erl
+# The unDraw illustration is under a license which forbids redistribution of
+# the assets. The invite page still works without it.
+rm -f priv/mod_invites/static/illus-empty.svg priv/mod_invites/copyright
+
cp %{S:14} %{S:15} %{S:16} .
@@ -193,6 +196,7 @@ autoreconf -ivf
--enable-odbc \
--enable-mysql \
--enable-pgsql \
+ --enable-lua \
--enable-pam \
--enable-sip \
--enable-stun \
@@ -232,6 +236,7 @@ install -D -p -m 0644 %{S:11} %{buildroot}%{_sysconfdir}/pam.d/ejabberd
# install systemd entry
install -D -m 0644 -p %{S:4} %{buildroot}%{_unitdir}/%{name}.service
+install -D -m 0644 -p %{S:17} %{buildroot}%{_sysusersdir}/%{name}.conf
# install config for logrotate
install -D -p -m 0644 %{S:2} %{buildroot}%{_sysconfdir}/logrotate.d/ejabberd
@@ -275,12 +280,6 @@ install -p -m 0644 ejabberd.pp.bz2 %{buildroot}%{_datadir}/selinux/packages
%pre
-getent group %{name} >/dev/null || groupadd -r %{name}
-getent passwd %{name} >/dev/null || \
-useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin -M \
--c "ejabberd" %{name} 2>/dev/null || :
-
-
if [ $1 -gt 1 ]; then
# we should backup DB in every upgrade
if ejabberdctl status >/dev/null ; then
@@ -309,42 +308,15 @@ if [ $1 -gt 1 ]; then
echo
fi
fi
-
-
-%pre selinux
%selinux_relabel_pre -s %{selinuxtype}
%post
%systemd_post %{name}.service
-
-# Create SSL certificate with default values if it doesn't exist
-(cd /etc/ejabberd
-if [ ! -f ejabberd.pem ]
-then
- echo "Generating SSL certificate /etc/ejabberd/ejabberd.pem..."
- HOSTNAME=$(hostname -s 2>/dev/null || echo "localhost")
- DOMAINNAME=$(hostname -d 2>/dev/null || echo "localdomain")
- openssl req -new -x509 -days 365 -nodes -out ejabberd.pem \
- -keyout ejabberd.pem > /dev/null 2>&1 <<+++
-.
-.
-.
-$DOMAINNAME
-$HOSTNAME
-ejabberd
-root@$HOSTNAME.$DOMAINNAME
-+++
-chown ejabberd:ejabberd ejabberd.pem
-chmod 600 ejabberd.pem
-fi)
-
-
-%post selinux
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{modulename}.pp.bz2
-%posttrans selinux
+%posttrans
/usr/sbin/restorecon -i -R /var/lib/ejabberd/
/usr/sbin/restorecon -i -R /var/log/ejabberd/
%selinux_relabel_post -s %{selinuxtype}
@@ -356,9 +328,6 @@ fi)
%postun
%systemd_postun_with_restart %{name}.service
-
-
-%postun selinux
if [ $1 -eq 0 ]; then
%selinux_modules_uninstall -s %{selinuxtype} %{modulename}
fi
@@ -374,6 +343,7 @@ fi
%attr(640,ejabberd,ejabberd) %config(noreplace) %{_sysconfdir}/ejabberd/inetrc
%{_unitdir}/%{name}.service
+%{_sysusersdir}/%{name}.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/pam.d/%{name}
@@ -381,6 +351,8 @@ fi
%{_mandir}/man5/ejabberd.yml.5*
%{_datadir}/polkit-1/actions/ejabberdctl.policy
%{_datadir}/polkit-1/rules.d/51-ejabberdctl.rules
+%{_datadir}/selinux/devel/include/%{moduletype}/ejabberd.if
+%{_datadir}/selinux/packages/ejabberd.pp.bz2
%{_bindir}/ejabberdctl
%{erlang_appdir}
@@ -389,10 +361,5 @@ fi
%attr(750,ejabberd,ejabberd) %dir %{_localstatedir}/log/ejabberd
-%files selinux
-%{_datadir}/selinux/devel/include/%{moduletype}/ejabberd.if
-%{_datadir}/selinux/packages/ejabberd.pp.bz2
-
-
%changelog
%autochangelog
diff --git a/ejabberd.sysusers b/ejabberd.sysusers
new file mode 100644
index 0000000..75aee15
--- /dev/null
+++ b/ejabberd.sysusers
@@ -0,0 +1,2 @@
+#Type Name ID GECOS Home directory Shell
+u ejabberd - "ejabberd" /var/lib/ejabberd /sbin/nologin
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-23 19:08 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:08 [rpms/ejabberd] f45: Address re-review findings Peter Lemenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox