diff --git a/prosody-0.11.5-lua-5.4.patch b/prosody-0.11.5-lua-5.4.patch deleted file mode 100644 index 09c0804..0000000 --- a/prosody-0.11.5-lua-5.4.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -up prosody-0.11.5/configure.lua54 prosody-0.11.5/configure ---- prosody-0.11.5/configure.lua54 2020-06-30 15:47:57.575906862 -0400 -+++ prosody-0.11.5/configure 2020-06-30 15:50:52.970509696 -0400 -@@ -44,7 +44,7 @@ Configure $APP_NAME prior to building. - Default is \$PREFIX/lib - --datadir=DIR Location where the server data should be stored. - Default is \$PREFIX/var/lib/$APP_DIRNAME ----lua-version=VERSION Use specific Lua version: 5.1, 5.2, or 5.3 -+--lua-version=VERSION Use specific Lua version: 5.1, 5.2, 5.3, or 5.4 - Default is auto-detected. - --lua-suffix=SUFFIX Versioning suffix to use in Lua filenames. - Default is "$LUA_SUFFIX" (lua$LUA_SUFFIX...) -@@ -237,7 +237,7 @@ do - --lua-version|--with-lua-version) - [ -n "$value" ] || die "Missing value in flag $key." - LUA_VERSION="$value" -- [ "$LUA_VERSION" = "5.1" ] || [ "$LUA_VERSION" = "5.2" ] || [ "$LUA_VERSION" = "5.3" ] || die "Invalid Lua version in flag $key." -+ [ "$LUA_VERSION" = "5.1" ] || [ "$LUA_VERSION" = "5.2" ] || [ "$LUA_VERSION" = "5.3" ] || [ "$LUA_VERSION" = "5.4" ] || die "Invalid Lua version in flag $key." - LUA_VERSION_SET=yes - ;; - --with-lua) -@@ -340,7 +340,7 @@ then - fi - - detect_lua_version() { -- detected_lua=$("$1" -e 'print(_VERSION:match(" (5%.[123])$"))' 2> /dev/null) -+ detected_lua=$("$1" -e 'print(_VERSION:match(" (5%.[1234])$"))' 2> /dev/null) - if [ "$detected_lua" != "nil" ] - then - if [ "$LUA_VERSION_SET" != "yes" ] -@@ -403,8 +403,11 @@ then - elif [ "$LUA_VERSION_SET" = "yes" ] && [ "$LUA_VERSION" = "5.3" ] - then - suffixes="5.3 53 -5.3 -53" -+ elif [ "$LUA_VERSION_SET" = "yes" ] && [ "$LUA_VERSION" = "5.4" ] -+ then -+ suffixes="5.4 54 -5.4 -54" - else -- suffixes="5.1 51 -5.1 -51 5.2 52 -5.2 -52 5.3 53 -5.3 -53" -+ suffixes="5.1 51 -5.1 -51 5.2 52 -5.2 -52 5.3 53 -5.3 -53 5.4 54 -5.4 -54" - fi - for suffix in "" $suffixes - do diff --git a/prosody-0.11.5-lua54.patch b/prosody-0.11.5-lua54.patch new file mode 100644 index 0000000..09c0804 --- /dev/null +++ b/prosody-0.11.5-lua54.patch @@ -0,0 +1,43 @@ +diff -up prosody-0.11.5/configure.lua54 prosody-0.11.5/configure +--- prosody-0.11.5/configure.lua54 2020-06-30 15:47:57.575906862 -0400 ++++ prosody-0.11.5/configure 2020-06-30 15:50:52.970509696 -0400 +@@ -44,7 +44,7 @@ Configure $APP_NAME prior to building. + Default is \$PREFIX/lib + --datadir=DIR Location where the server data should be stored. + Default is \$PREFIX/var/lib/$APP_DIRNAME +---lua-version=VERSION Use specific Lua version: 5.1, 5.2, or 5.3 ++--lua-version=VERSION Use specific Lua version: 5.1, 5.2, 5.3, or 5.4 + Default is auto-detected. + --lua-suffix=SUFFIX Versioning suffix to use in Lua filenames. + Default is "$LUA_SUFFIX" (lua$LUA_SUFFIX...) +@@ -237,7 +237,7 @@ do + --lua-version|--with-lua-version) + [ -n "$value" ] || die "Missing value in flag $key." + LUA_VERSION="$value" +- [ "$LUA_VERSION" = "5.1" ] || [ "$LUA_VERSION" = "5.2" ] || [ "$LUA_VERSION" = "5.3" ] || die "Invalid Lua version in flag $key." ++ [ "$LUA_VERSION" = "5.1" ] || [ "$LUA_VERSION" = "5.2" ] || [ "$LUA_VERSION" = "5.3" ] || [ "$LUA_VERSION" = "5.4" ] || die "Invalid Lua version in flag $key." + LUA_VERSION_SET=yes + ;; + --with-lua) +@@ -340,7 +340,7 @@ then + fi + + detect_lua_version() { +- detected_lua=$("$1" -e 'print(_VERSION:match(" (5%.[123])$"))' 2> /dev/null) ++ detected_lua=$("$1" -e 'print(_VERSION:match(" (5%.[1234])$"))' 2> /dev/null) + if [ "$detected_lua" != "nil" ] + then + if [ "$LUA_VERSION_SET" != "yes" ] +@@ -403,8 +403,11 @@ then + elif [ "$LUA_VERSION_SET" = "yes" ] && [ "$LUA_VERSION" = "5.3" ] + then + suffixes="5.3 53 -5.3 -53" ++ elif [ "$LUA_VERSION_SET" = "yes" ] && [ "$LUA_VERSION" = "5.4" ] ++ then ++ suffixes="5.4 54 -5.4 -54" + else +- suffixes="5.1 51 -5.1 -51 5.2 52 -5.2 -52 5.3 53 -5.3 -53" ++ suffixes="5.1 51 -5.1 -51 5.2 52 -5.2 -52 5.3 53 -5.3 -53 5.4 54 -5.4 -54" + fi + for suffix in "" $suffixes + do diff --git a/prosody-0.11.7-epel6.patch b/prosody-0.11.7-epel6.patch new file mode 100644 index 0000000..ff80b46 --- /dev/null +++ b/prosody-0.11.7-epel6.patch @@ -0,0 +1,60 @@ +Hack by Robert Scheck for prosody >= 0.11.7 which removes the +service_command_warning() function for EPEL 6, because the SysVinit script actually uses +this functionality. + +--- prosody-0.11.7/prosodyctl 2020-05-31 22:39:34.000000000 +0200 ++++ prosody-0.11.7/prosodyctl.epel6 2020-10-01 22:57:47.161806878 +0200 +@@ -199,26 +199,11 @@ + return 1; + end + +-local function service_command_warning(service_command) +- if prosody.installed and configmanager.get("*", "prosodyctl_service_warnings") ~= false then +- show_warning("WARNING: Use of prosodyctl start/stop/restart/reload is not recommended"); +- show_warning(" if Prosody is managed by an init system - use that directly instead."); +- lfs = lfs or require +- if lfs.attributes("/etc/systemd") then +- show_warning(" e.g. systemctl %s prosody", service_command); +- elseif lfs.attributes("/etc/init.d/prosody") then +- show_warning(" e.g. /etc/init.d/prosody %s", service_command); +- end +- show_warning(""); +- end +-end +- + function commands.start(arg) + if arg[1] == "--help" then + show_usage([[start]], [[Start Prosody]]); + return 1; + end +- service_command_warning("start"); + local ok, ret = prosodyctl.isrunning(); + if not ok then + show_message(error_messages[ret]); +@@ -309,8 +294,6 @@ + return 1; + end + +- service_command_warning("stop"); +- + if not prosodyctl.isrunning() then + show_message("Prosody is not running"); + return 1; +@@ -346,8 +329,6 @@ + return 1; + end + +- service_command_warning("restart"); +- + commands.stop(arg); + return commands.start(arg); + end +@@ -441,8 +422,6 @@ + return 1; + end + +- service_command_warning("reload"); +- + if not prosodyctl.isrunning() then + show_message("Prosody is not running"); + return 1; diff --git a/prosody.init b/prosody.init index ee37aa1..b5bd4d9 100644 --- a/prosody.init +++ b/prosody.init @@ -48,6 +48,7 @@ start() { } stop() { + [ -x $exec ] || exit 5 echo -n $"Stopping $prog: " # Avoid output "Stopped\n" and "Prosody is not running\n" OUTPUT="`daemon $exec stop`" @@ -60,6 +61,7 @@ stop() { } reload() { + [ -x $exec ] || exit 5 echo -n $"Reloading $prog: " # Avoid prosody specific output after successful reload OUTPUT="`$exec reload`" @@ -95,7 +97,8 @@ case "$1" in $1 ;; force-reload) - restart + stop + start ;; status) rh_status diff --git a/prosody.service b/prosody.service index bb02bb9..1b3fac1 100644 --- a/prosody.service +++ b/prosody.service @@ -3,11 +3,14 @@ Description=Prosody XMPP (Jabber) server After=network-online.target [Service] -Type=forking +Type=simple +User=prosody +Group=prosody PIDFile=/run/prosody/prosody.pid -ExecStart=/usr/bin/prosodyctl start -ExecReload=/usr/bin/prosodyctl reload -ExecStop=/usr/bin/prosodyctl stop +ExecStart=/usr/bin/prosody -F +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-failure +UMask=0027 [Install] WantedBy=multi-user.target diff --git a/prosody.spec b/prosody.spec index 1356bcc..de654de 100644 --- a/prosody.spec +++ b/prosody.spec @@ -1,16 +1,12 @@ -%if 0%{?fedora} > 19 && 0%{?fedora} <= 30 -%global lua_version 5.1 -%else %{!?lua_version: %global lua_version %{lua: print(string.sub(_VERSION, 5))}} -%endif %global sslcert %{_sysconfdir}/pki/%{name}/localhost.crt %global sslkey %{_sysconfdir}/pki/%{name}/localhost.key Summary: Flexible communications server for Jabber/XMPP Name: prosody -Version: 0.11.5 -Release: 4%{?dist} +Version: 0.11.7 +Release: 1%{?dist} License: MIT URL: https://prosody.im/ Source0: https://prosody.im/downloads/source/%{name}-%{version}.tar.gz @@ -25,7 +21,8 @@ Source8: prosody-localhost.cfg.lua Source9: prosody-example.com.cfg.lua Patch0: prosody-0.11.0-config.patch Patch1: prosody-0.11.4-lua53.patch -Patch2: prosody-0.11.5-lua-5.4.patch +Patch2: prosody-0.11.5-lua54.patch +Patch3: prosody-0.11.7-epel6.patch BuildRequires: gcc, libidn-devel, openssl-devel BuildRequires: gnupg2 Requires: %{_bindir}/openssl @@ -40,11 +37,6 @@ Requires(post): /sbin/chkconfig, %{_bindir}/openssl Requires(preun): /sbin/service, /sbin/chkconfig Requires(postun): /sbin/service %endif -%if 0%{?fedora} > 19 && 0%{?fedora} <= 30 -Requires: compat-lua, lua-filesystem-compat, lua5.1-bitop -Requires: lua-expat-compat, lua-socket-compat, lua-sec-compat -BuildRequires: compat-lua, compat-lua-devel -%else %if 0%{?rhel} > 6 || 0%{?fedora} > 15 Requires: lua(abi) = %{lua_version} %else @@ -55,7 +47,6 @@ Requires: lua-filesystem, lua-expat, lua-socket, lua-sec Requires: lua-bitop %endif BuildRequires: lua, lua-devel -%endif %description Prosody is a flexible communications server for Jabber/XMPP written in Lua. @@ -64,20 +55,19 @@ to be easy to extend and give a flexible system on which to rapidly develop added functionality, or prototype new protocols. %prep -gpgv2 --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %setup -q %patch0 -p1 -b .config %patch1 -p1 -b .lua53 %patch2 -p1 -b .lua54 +%if 0%{?rhel} == 6 +%patch3 -p1 -b .epel6 +%endif %build ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ -%if 0%{?fedora} > 19 && 0%{?fedora} <= 30 - --lua-version=%{lua_version} \ - --with-lua-include=%{_includedir}/lua-%{lua_version} \ -%endif --add-cflags="$RPM_OPT_FLAGS" \ %if 0%{?rhel} > 6 || 0%{?fedora} --add-ldflags="$RPM_LD_FLAGS" \ @@ -216,6 +206,12 @@ fi %{_mandir}/man1/%{name}*.1* %changelog +* Thu Oct 01 2020 Robert Scheck 0.11.7-1 +- Upgrade to 0.11.7 (#1877424) + +* Wed Sep 09 2020 Robert Scheck 0.11.6-1 +- Upgrade to 0.11.6 (#1877424) + * Tue Jul 28 2020 Fedora Release Engineering - 0.11.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index fae1cab..52bf2f9 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ SHA512 (gpgkey-32A9EDDE3609931EB98CEAC315907E8E7BDD6BFE.gpg) = daf6d670d3283aac1860cbb77977b0aa17724f41aa517d00e34054ef99a7c571b1d7d33b690824689124dc757dd89fdd43fe5a531b46183fffc22cd4d638a8ae SHA512 (gpgkey-3E52119EF853C59678DBBF6BADED9A77B67AD329.gpg) = e68af731a075af006129e7f206649ce44791b152a9ddb0abffc5acbaae5e28582cf38a3cdb1943e6170c5e189a535c650f567605394d86c22f8f7430f82dfdda -SHA512 (prosody-0.11.5.tar.gz) = 43a9facee8d61b69e277e7e8a9091fbfa60be71d6141195dff991f6020c8afadacce26f356b869cb2d7edd9be285e9ce1bcd822f9628cc845d91757e818a0dff -SHA512 (prosody-0.11.5.tar.gz.asc) = f3af5fd1095592fc69bbbea1c015d39752f05ea4e9a326435ad62c5c55f312fdf7b1e5a56a16dac3b763d42eb63efaa3ad279fa19a86bc0e1cca024c2bf8f62a +SHA512 (prosody-0.11.7.tar.gz) = 923aa92598ef851ed8408931942859f78f1e3d700fee251f4f5ca67abdcdae43448318ed90a9a1cdc7824d5f4dc5a4732fad4b9ed36d97455fa9b3bff0881a20 +SHA512 (prosody-0.11.7.tar.gz.asc) = 4f5e2ba773265fb91732305a626c3251b39bacb3f619b9cf083d08209e70ad1c0fb82111dba455f47ecc74eb0036bc5f931d1acd1d4bc43f33cfc63c855a3058