Skip to contentSkip to conversation

Bump ejabberd version to 15.06

PATCH New Johan Oudinet 2 participants 19 messages Jul 8, 2015 – Jul 19, 2015

lore
Share & tools
lore
#0 lore raw

cover Bump ejabberd version to 15.06

ejabberdctl in this new version makes use of getent, so add it to ejabberd dependencies. We also provide two optionnal commits to simplify the init script and to show the correct version in ejabberd logs.
Since ejabberd upstream build system clones the master branch of its dependencies, this patch serie also upgrades every ejabberd dependency. Thus, it corresponds to an upstream ejabberd build from July 8th, 2015.

Johan Oudinet (11):
ejabberd: bump to version 15.06
ejabberd: simplify init script by patching ejabberdctl
ejabberd: fix package version
erlang-p1-utils: bump to version 1bf99f9
erlang-p1-cache-tab: bump to version f7ea12b
erlang-p1-tls: bump to version b070004
erlang-p1-stringprep: bump to version 3c64023
erlang-p1-xml: bump to version 2c61083
erlang-p1-stun: bump to version a3dce07
erlang-p1-sip: bump to version fd3e461
erlang-p1-yaml: bump to version e1f081e

 package/ejabberd/0001-remove-deps.patch            | 20 ++++---
 package/ejabberd/0002-disable-rebar-deps.patch     | 28 ++++++----
 package/ejabberd/0003-disable-test.patch           | 14 +++--
 ...006-disable-erlang-deprecated-types-check.patch | 20 +++++++
 package/ejabberd/0006-remove-doc.patch             | 26 ---------
 .../ejabberd/0007-fix-install-permissions.patch    | 64 ++++++++++++----------
 .../ejabberd/0008-add-ac_config_macro_dir.patch    | 30 ++++++++++
 package/ejabberd/0009-fix-ejabberdctl.patch        | 21 +++++++
 package/ejabberd/0010-fix-package-version.patch    | 19 +++++++
 package/ejabberd/Config.in                         |  1 +
 package/ejabberd/S50ejabberd                       | 32 +++++------
 package/ejabberd/ejabberd.mk                       |  4 +-
 package/erlang-p1-cache-tab/erlang-p1-cache-tab.mk |  2 +-
 package/erlang-p1-sip/erlang-p1-sip.mk             |  2 +-
 .../erlang-p1-stringprep/erlang-p1-stringprep.mk   |  2 +-
 package/erlang-p1-stun/erlang-p1-stun.mk           |  2 +-
 package/erlang-p1-tls/erlang-p1-tls.mk             |  2 +-
 package/erlang-p1-utils/erlang-p1-utils.mk         |  2 +-
 package/erlang-p1-xml/erlang-p1-xml.mk             |  2 +-
 package/erlang-p1-yaml/erlang-p1-yaml.mk           |  2 +-
 20 files changed, 188 insertions(+), 107 deletions(-)
 create mode 100644 package/ejabberd/0006-disable-erlang-deprecated-types-check.patch
 delete mode 100644 package/ejabberd/0006-remove-doc.patch
 create mode 100644 package/ejabberd/0008-add-ac_config_macro_dir.patch
 create mode 100644 package/ejabberd/0009-fix-ejabberdctl.patch
 create mode 100644 package/ejabberd/0010-fix-package-version.patch
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/11 ejabberd: bump to version 15.06

Adapt patches accordingly and add a dependency to getent.

---
 package/ejabberd/0001-remove-deps.patch            | 20 ++++---
 package/ejabberd/0002-disable-rebar-deps.patch     | 28 ++++++----
 package/ejabberd/0003-disable-test.patch           | 14 +++--
 ...006-disable-erlang-deprecated-types-check.patch | 20 +++++++
 package/ejabberd/0006-remove-doc.patch             | 26 ---------
 .../ejabberd/0007-fix-install-permissions.patch    | 64 ++++++++++++----------
 .../ejabberd/0008-add-ac_config_macro_dir.patch    | 30 ++++++++++
 package/ejabberd/Config.in                         |  1 +
 package/ejabberd/ejabberd.mk                       |  4 +-
 9 files changed, 126 insertions(+), 81 deletions(-)
 create mode 100644 package/ejabberd/0006-disable-erlang-deprecated-types-check.patch
 delete mode 100644 package/ejabberd/0006-remove-doc.patch
 create mode 100644 package/ejabberd/0008-add-ac_config_macro_dir.patch
package/ejabberd/0001-remove-deps.patch +11 -9
index 1982ca8..ffe2106 100644
@@ -5,16 +5,18 @@ Author: Philipp Huebner <[email protected]>
 
 Index: ejabberd/rebar.config.script
 ===================================================================
---- ejabberd.orig/rebar.config.script
-+++ ejabberd/rebar.config.script
-@@ -126,9 +126,7 @@ Config = [{erl_opts, Macros ++ HiPE ++ D
-           {sub_dirs, ["rel"]},
-           {keep_build_info, true},
-           {ct_extra_params, "-include "
--           ++ filename:join([Cwd, "tools"])},
+diff --git a/rebar.config.script b/rebar.config.script
+index b4dfaa3..9152c12 100644
+--- a/rebar.config.script
++++ b/rebar.config.script
+@@ -183,9 +183,7 @@ Config = [{erl_opts, Macros ++ HiPE ++ DebugInfo ++
+           {xref_checks, []},
+ 	  {xref_queries,
+ 	   [{"(XC - UC) || (XU - X - B - "
+-	     ++ string:join(CfgXrefs, " - ") ++ ")", []}]},
 -          {post_hooks, PostHooks ++ CfgPostHooks},
--          {deps, Deps ++ CfgDeps}],
-+           ++ filename:join([Cwd, "tools"])}],
+-          {deps, Deps ++ CfgDeps}] ++ ElixirConfig,
++	     ++ string:join(CfgXrefs, " - ") ++ ")", []}]}],
  %%io:format("ejabberd configuration:~n  ~p~n", [Config]),
  Config.
  
package/ejabberd/0002-disable-rebar-deps.patch +16 -12
index 80217ca..1ea40de 100644
@@ -5,9 +5,11 @@ Author: Philipp Huebner <[email protected]>
 
 Index: ejabberd/Makefile.in
 ===================================================================
---- ejabberd.orig/Makefile.in
-+++ ejabberd/Makefile.in
-@@ -68,26 +68,11 @@ else
+diff --git a/Makefile.in b/Makefile.in
+index ffd1d30..09cb8d7 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -74,26 +74,11 @@ else
    INIT_USER=$(INSTALLUSER)
  endif
  
@@ -33,10 +35,10 @@ Index: ejabberd/Makefile.in
 -	rm -rf deps/.built
 -	$(REBAR) update-deps && :> deps/.got
 -
- translations:
- 	contrib/extract_translations/prepare-translation.sh -updateall
+ xref: all
+ 	$(REBAR) skip_deps=true xref
  
-@@ -103,8 +88,6 @@ spec:
+@@ -109,8 +94,6 @@ spec:
  	$(ERL) -noinput +B -pa ebin -pa deps/*/ebin -eval \
  	'case xml_gen:compile("tools/xmpp_codec.spec") of ok -> halt(0); _ -> halt(1) end.'
  
@@ -45,14 +47,16 @@ Index: ejabberd/Makefile.in
  install: all
  	#
  	# Configuration files
-@@ -139,14 +122,11 @@ install: all
+@@ -151,8 +134,6 @@ install: all
  	$(INSTALL) -d $(BEAMDIR)
  	$(INSTALL) -m 644 ebin/*.app $(BEAMDIR)
  	$(INSTALL) -m 644 ebin/*.beam $(BEAMDIR)
 -	$(INSTALL) -m 644 deps/*/ebin/*.app $(BEAMDIR)
 -	$(INSTALL) -m 644 deps/*/ebin/*.beam $(BEAMDIR)
- 	rm -f $(BEAMDIR)/configure.beam
- 	#
+ 	# Install Elixir and Elixir dependancies
+ 	-$(INSTALL) -m 644 deps/*/lib/*/ebin/*.app $(BEAMDIR)
+ 	-$(INSTALL) -m 644 deps/*/lib/*/ebin/*.beam $(BEAMDIR)
+@@ -161,7 +142,6 @@ install: all
  	# ejabberd header files
  	$(INSTALL) -d $(INCLUDEDIR)
  	$(INSTALL) -m 644 include/*.hrl $(INCLUDEDIR)
@@ -60,11 +64,11 @@ Index: ejabberd/Makefile.in
  	#
  	# Binary C programs
  	$(INSTALL) -d $(PBINDIR)
-@@ -156,7 +136,6 @@ install: all
+@@ -173,7 +153,6 @@ install: all
  	#
  	# Binary system libraries
  	$(INSTALL) -d $(SODIR)
 -	$(INSTALL) -m 644 $(DLLs) $(SODIR)
+ 	-[ -f $(SODIR)/jiffy.so ] && (cd $(PRIVDIR); ln -s lib/jiffy.so; true)
+ 	-[ -f $(SODIR)/sqlite3_drv.so ] && (cd $(PRIVDIR); ln -s lib/sqlite3_drv.so; true)
  	#
- 	# Translated strings
- 	$(INSTALL) -d $(MSGSDIR)
package/ejabberd/0003-disable-test.patch +10 -4
index 4354ab6..1b28957 100644
@@ -6,16 +6,22 @@ Author: Philipp Huebner <[email protected]>
 
 Index: ejabberd/Makefile.in
 ===================================================================
---- ejabberd.orig/Makefile.in
-+++ ejabberd/Makefile.in
-@@ -260,10 +260,6 @@ dialyzer: erlang_plt deps_plt ejabberd_p
+diff --git a/Makefile.in b/Makefile.in
+index ffd1d30..835d611 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -306,14 +306,8 @@ dialyzer: erlang_plt deps_plt ejabberd_plt
  	status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
  
  test:
 -	@echo "************************** NOTICE ***************************************"
 -	@cat test/README
 -	@echo "*************************************************************************"
+-	@cd priv && ln -sf ../sql
 -	$(REBAR) skip_deps=true ct
  
- .PHONY: src doc edoc dialyzer Makefile TAGS clean clean-rel distclean rel \
+ quicktest:
+-	$(REBAR) skip_deps=true ct suites=elixir
+ 
+ .PHONY: src edoc dialyzer Makefile TAGS clean clean-rel distclean rel \
  	install uninstall uninstall-binary uninstall-all translations deps test spec \
package/ejabberd/0006-disable-erlang-deprecated-types-check.patch new file +20 -0
new file mode 100644
index 0000000..1b70953
@@ -0,0 +1,20 @@
+Description: disable ERLANG_DEPRECATED_CHECK
+ Without this patch, the configure will try to execute erlang to check
+ if it uses deprecated types. Assume the answer is false.
+Author: Johan Oudinet <[email protected]>
+
+Index: ejabberd/configure.ac
+====================================================================
+diff --git a/configure.ac b/configure.ac
+index 6ae0a24..e5498df 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -252,7 +252,7 @@ if test "$ENABLEUSER" != ""; then
+   AC_SUBST([INSTALLUSER], [$ENABLEUSER])
+ fi
+ 
+-ERLANG_DEPRECATED_TYPES_CHECK
++AC_SUBST(erlang_deprecated_types, false)
+ 
+ if test "$sqlite" = "true"; then
+    AX_LIB_SQLITE3([3.6.19])
package/ejabberd/0006-remove-doc.patch deleted +0 -26
deleted file mode 100644
index 0c0a21b..0000000
@@ -1,26 +0,0 @@
-Description: remove installing documentation
- Without this patch, the Makefile will try to install ejabberd
- documentation even if it is not generated, which will fail.
-Author: Johan Oudinet <[email protected]>
-
-Index: ejabberd/Makefile.in
-===================================================================
---- ejabberd.orig/Makefile.in	2014-10-21 16:43:42.604972005 +0200
-+++ ejabberd/Makefile.in	2014-10-21 16:45:12.419989667 +0200
-@@ -156,16 +156,6 @@ install: all
- 	$(INSTALL) -d -m 750 $(O_USER) $(LOGDIR)
- 	$(CHOWN_COMMAND) -R @INSTALLUSER@ $(LOGDIR) >$(CHOWN_OUTPUT)
- 	chmod -R 750 $(LOGDIR)
--	#
--	# Documentation
--	$(INSTALL) -d $(DOCDIR)
--	$(INSTALL) -m 644 doc/dev.html $(DOCDIR)
--	$(INSTALL) -m 644 doc/guide.html $(DOCDIR)
--	$(INSTALL) -m 644 doc/*.png $(DOCDIR)
--	[ -f doc/guide.pdf ] \
--		&& $(INSTALL) -m 644 doc/guide.pdf $(DOCDIR) \
--		|| echo "No doc/guide.pdf was built"
--	$(INSTALL) -m 644 COPYING $(DOCDIR)
- 
- uninstall: uninstall-binary
- 
package/ejabberd/0007-fix-install-permissions.patch +36 -28

97 lines not on this page · raw message

package/ejabberd/0008-add-ac_config_macro_dir.patch new file +30 -0
new file mode 100644
index 0000000..007e694
@@ -0,0 +1,30 @@
+upstream: https://github.com/processone/ejabberd/pull/628
+Author: Johan Oudinet <[email protected]>
+
+From 0e7d2b73be335353e9938668a699b3dbb7011c56 Mon Sep 17 00:00:00 2001
+From: Johan Oudinet <[email protected]>
+Date: Tue, 30 Jun 2015 10:53:45 +0200
+Subject: [PATCH] configure.ac: add AC_CONFIG_MACRO_DIR
+
+Otherwise, autoconf fails to find extra macros defined in the m4
+directory.
+---
+ configure.ac | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index a3e2638..0a60de0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -6,6 +6,8 @@ AC_INIT(ejabberd, m4_esyscmd([echo `git describe --tags 2>/dev/null || echo 0.0`
+ REQUIRE_ERLANG_MIN="5.9.1 (Erlang/OTP R15B01)"
+ REQUIRE_ERLANG_MAX="9.0.0 (No Max)"
+ 
++AC_CONFIG_MACRO_DIR([m4])
++
+ # Checks for programs.
+ AC_PROG_MAKE_SET
+ AC_PROG_INSTALL
+-- 
+2.1.4
+
package/ejabberd/Config.in +1 -0
index 1a27ef2..7b4e99b 100644
@@ -9,6 +9,7 @@ config BR2_PACKAGE_EJABBERD
 	select BR2_PACKAGE_ERLANG_P1_XML
 	select BR2_PACKAGE_ERLANG_P1_YAML
 	select BR2_PACKAGE_ERLANG_P1_ZLIB
+	select BR2_PACKAGE_GETENT
 	select BR2_PACKAGE_OPENSSL
 	help
 	  Ejabberd is a Jabber/XMPP instant messaging server, written
package/ejabberd/ejabberd.mk +2 -2
index 650dc0e..b413c8b 100644
@@ -4,11 +4,11 @@
 #
 ################################################################################
 
-EJABBERD_VERSION = 14.07
+EJABBERD_VERSION = 15.06
 EJABBERD_SITE = $(call github,processone,ejabberd,$(EJABBERD_VERSION))
 EJABBERD_LICENSE = GPLv2+ with OpenSSL exception
 EJABBERD_LICENSE_FILES = COPYING
-EJABBERD_DEPENDENCIES = openssl host-erlang-lager erlang-lager \
+EJABBERD_DEPENDENCIES = getent openssl host-erlang-lager erlang-lager \
 	erlang-p1-cache-tab erlang-p1-iconv erlang-p1-sip \
 	erlang-p1-stringprep erlang-p1-xml erlang-p1-yaml erlang-p1-zlib
 
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/11 ejabberd: simplify init script by patching ejabberdctl

In reply to Johan Oudinet

Let a user modify environment variables used in ejabberdctl by loading a default configuration file.

---
 package/ejabberd/0009-fix-ejabberdctl.patch | 21 +++++++++++++++++++
 package/ejabberd/S50ejabberd                | 32 +++++++++++++----------------
 2 files changed, 35 insertions(+), 18 deletions(-)
 create mode 100644 package/ejabberd/0009-fix-ejabberdctl.patch
package/ejabberd/0009-fix-ejabberdctl.patch new file +21 -0
new file mode 100644
index 0000000..9ae23ac
@@ -0,0 +1,21 @@
+Description: fix ejabberdctl
+ Change default values so ejabberdctl run commands as ejabberd user
+ Also add a way for the user to change default values.
+Signed-off-by: Johan Oudinet <[email protected]>
+
+diff --git a/ejabberdctl.template b/ejabberdctl.template
+index 79f4438..df0abba 100755
+--- a/ejabberdctl.template
++++ b/ejabberdctl.template
+@@ -14,7 +14,10 @@ SCRIPT_DIR=`cd ${0%/*} && pwd`
+ ERL={{erl}}
+ IEX={{bindir}}/iex
+ EPMD={{bindir}}/epmd
+-INSTALLUSER={{installuser}}
++INSTALLUSER=ejabberd
++
++# Read default configuration file if present.
++[ ! -r /etc/default/ejabberd ] || . /etc/default/ejabberd
+ 
+ # check the proper system user is used if defined
+ if [ "$INSTALLUSER" != "" ] ; then
package/ejabberd/S50ejabberd +14 -18
index ff38d92..2161ead 100644
@@ -3,30 +3,26 @@
 # Start/stop ejabberd
 #
 
-NAME=ejabberd
-USER=ejabberd
+CTL=/usr/sbin/ejabberdctl
+DEFAULT=/etc/default/ejabberd
+INSTALLUSER=ejabberd
 RUNDIR=/var/run/ejabberd
-SPOOLDIR=/var/lib/ejabberd
 
-# Read configuration variable file if it is present.
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+# Read default configuration file if present.
+[ -r "$DEFAULT" ] && . "$DEFAULT"
 
+# Create RUNDIR.
 mkrundir() {
-    install -d -o "$USER" -g "$USER" "$RUNDIR" "$SPOOLDIR"
-}
-
-# Run ejabberdctl as user $USER.
-ctl() {
-    su $USER -c "ejabberdctl $*"
+    install -d -o "$INSTALLUSER" -g "$INSTALLUSER" "$RUNDIR"
 }
 
 case "$1" in
     start)
         mkrundir || exit 1
         echo -n "Starting ejabberd... "
-        ctl start --spool "$SPOOLDIR"
+        "$CTL" start
         # Wait until ejabberd is up and running.
-        if ctl started; then
+        if "$CTL" started; then
             echo "done"
         else
             echo "failed"
@@ -34,23 +30,23 @@ case "$1" in
         ;;
     stop)
         echo -n "Stopping ejabberd... "
-        ctl stop > /dev/null
-        if [ $? -eq 3 ] || ctl stopped; then
+        "$CTL" stop > /dev/null
+        if [ $? -eq 3 ] || "$CTL" stopped; then
             echo "OK"
         else
             echo "failed"
         fi
         ;;
     status)
-        ctl status
+        "$CTL" status
         ;;
     restart|force-reload)
-        "$0" stop
+        "$0" stop || true
         "$0" start
         ;;
     live)
         mkrundir || exit 1
-        ctl live
+        "$CTL" live
         ;;
     *)
         echo "Usage: $0 {start|stop|status|restart|force-reload|live}"
Signature · 1 line
2.1.4
#6 lore raw

PATCH 3/11 ejabberd: fix package version

In reply to Johan Oudinet

The configure tries to guess the version from the last git tag, which is incorrect here as we are not inside ejabberd git repository.

---
 package/ejabberd/0010-fix-package-version.patch | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 package/ejabberd/0010-fix-package-version.patch
package/ejabberd/0010-fix-package-version.patch new file +19 -0
new file mode 100644
index 0000000..c8b3c10
@@ -0,0 +1,19 @@
+Description: fix package version
+ Without this patch, the configure tries to guess the version from the
+ last git tag, which is incorrect here as we are not inside ejabberd
+ git repository.
+Signed-off-by: Johan Oudinet <[email protected]>
+
+diff --git a/configure.ac b/configure.ac
+index e7bb43b..e7faac4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2,7 +2,7 @@
+ # Process this file with autoconf to produce a configure script.
+ 
+ AC_PREREQ(2.53)
+-AC_INIT(ejabberd, m4_esyscmd([echo `git describe --tags 2>/dev/null || echo 0.0` | sed 's/-g.*//;s/-/./' | tr -d '\012']), [ejabberd at process-one.net], [ejabberd])
++AC_INIT(ejabberd, [15.06], [ejabberd at process-one.net], [ejabberd])
+ REQUIRE_ERLANG_MIN="5.9.1 (Erlang/OTP R15B01)"
+ REQUIRE_ERLANG_MAX="9.0.0 (No Max)"
+ 
Signature · 1 line
2.1.4
#9 lore raw

PATCH 4/11 erlang-p1-utils: bump to version 1bf99f9

In reply to Johan Oudinet
---
 package/erlang-p1-utils/erlang-p1-utils.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/erlang-p1-utils/erlang-p1-utils.mk +1 -1
index 0e63031..c01d6d5 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-ERLANG_P1_UTILS_VERSION = 940f42d
+ERLANG_P1_UTILS_VERSION = 1bf99f9
 ERLANG_P1_UTILS_SITE = $(call github,processone,p1_utils,$(ERLANG_P1_UTILS_VERSION))
 ERLANG_P1_UTILS_LICENSE = GPLv2+
 ERLANG_P1_UTILS_LICENSE_FILES = COPYING
Signature · 1 line
2.1.4
#10 lore raw

PATCH 5/11 erlang-p1-cache-tab: bump to version f7ea12b

In reply to Johan Oudinet
---
 package/erlang-p1-cache-tab/erlang-p1-cache-tab.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/erlang-p1-cache-tab/erlang-p1-cache-tab.mk +1 -1
index f651b06..6c5d98a 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-ERLANG_P1_CACHE_TAB_VERSION = 7b89d6a
+ERLANG_P1_CACHE_TAB_VERSION = f7ea12b
 ERLANG_P1_CACHE_TAB_SITE = $(call github,processone,cache_tab,$(ERLANG_P1_CACHE_TAB_VERSION))
 ERLANG_P1_CACHE_TAB_LICENSE = GPLv2+
 ERLANG_P1_CACHE_TAB_LICENSE_FILES = COPYING
Signature · 1 line
2.1.4
#11 lore raw

PATCH 6/11 erlang-p1-tls: bump to version b070004

In reply to Johan Oudinet
---
 package/erlang-p1-tls/erlang-p1-tls.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/erlang-p1-tls/erlang-p1-tls.mk +1 -1
index d6e5801..d706797 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-ERLANG_P1_TLS_VERSION = 53f0478
+ERLANG_P1_TLS_VERSION = b070004
 ERLANG_P1_TLS_SITE = $(call github,processone,tls,$(ERLANG_P1_TLS_VERSION))
 ERLANG_P1_TLS_LICENSE = GPLv2+
 ERLANG_P1_TLS_LICENSE_FILES = COPYING
Signature · 1 line
2.1.4
#12 lore raw

PATCH 7/11 erlang-p1-stringprep: bump to version 3c64023

In reply to Johan Oudinet
---
 package/erlang-p1-stringprep/erlang-p1-stringprep.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/erlang-p1-stringprep/erlang-p1-stringprep.mk +1 -1
index 29bbe26..60c80bc 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-ERLANG_P1_STRINGPREP_VERSION = 9e9e0f8
+ERLANG_P1_STRINGPREP_VERSION = 3c64023
 ERLANG_P1_STRINGPREP_SITE = $(call github,processone,stringprep,$(ERLANG_P1_STRINGPREP_VERSION))
 ERLANG_P1_STRINGPREP_LICENSE = TCL
 ERLANG_P1_STRINGPREP_LICENSE_FILES = LICENSE.TCL
Signature · 1 line
2.1.4
#13 lore raw

PATCH 8/11 erlang-p1-xml: bump to version 2c61083

In reply to Johan Oudinet
---
 package/erlang-p1-xml/erlang-p1-xml.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/erlang-p1-xml/erlang-p1-xml.mk +1 -1
index 3bcac66..f81d3e5 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-ERLANG_P1_XML_VERSION = b530983
+ERLANG_P1_XML_VERSION = 2c61083
 ERLANG_P1_XML_SITE = $(call github,processone,xml,$(ERLANG_P1_XML_VERSION))
 ERLANG_P1_XML_LICENSE = GPLv2+
 ERLANG_P1_XML_LICENSE_FILES = COPYING
Signature · 1 line
2.1.4
#14 lore raw

PATCH 9/11 erlang-p1-stun: bump to version a3dce07

In reply to Johan Oudinet
---
 package/erlang-p1-stun/erlang-p1-stun.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/erlang-p1-stun/erlang-p1-stun.mk +1 -1
index 7b4b1a9..7920347 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-ERLANG_P1_STUN_VERSION = a7c07b6
+ERLANG_P1_STUN_VERSION = a3dce07
 ERLANG_P1_STUN_SITE = $(call github,processone,stun,$(ERLANG_P1_STUN_VERSION))
 ERLANG_P1_STUN_LICENSE = GPLv2+
 ERLANG_P1_STUN_LICENSE_FILES = COPYING
Signature · 1 line
2.1.4
#15 lore raw

PATCH 10/11 erlang-p1-sip: bump to version fd3e461

In reply to Johan Oudinet
---
 package/erlang-p1-sip/erlang-p1-sip.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/erlang-p1-sip/erlang-p1-sip.mk +1 -1
index b895f59..d017a92 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-ERLANG_P1_SIP_VERSION = bba4459
+ERLANG_P1_SIP_VERSION = fd3e461
 ERLANG_P1_SIP_SITE = $(call github,processone,p1_sip,$(ERLANG_P1_SIP_VERSION))
 ERLANG_P1_SIP_LICENSE = GPLv2 with OpenSSL exception
 ERLANG_P1_SIP_LICENSE_FILES = COPYING
Signature · 1 line
2.1.4
#16 lore raw

PATCH 11/11 erlang-p1-yaml: bump to version e1f081e

In reply to Johan Oudinet
---
 package/erlang-p1-yaml/erlang-p1-yaml.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/erlang-p1-yaml/erlang-p1-yaml.mk +1 -1
index 346e398..6f7c977 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-ERLANG_P1_YAML_VERSION = 236b943
+ERLANG_P1_YAML_VERSION = e1f081e
 ERLANG_P1_YAML_SITE = $(call github,processone,p1_yaml,$(ERLANG_P1_YAML_VERSION))
 ERLANG_P1_YAML_LICENSE = Apache-2.0
 ERLANG_P1_YAML_LICENSE_FILES = COPYING
Signature · 1 line
2.1.4
#17 lore raw

cover Bump ejabberd version to 15.06

In reply to Johan Oudinet

Dear Johan Oudinet,

Quoted 2 lines · Johan Oudinet

Johan Oudinet (11):
ejabberd: bump to version 15.06

Applied.

Quoted 1 line

ejabberd: simplify init script by patching ejabberdctl

Not applied yet, I'll send some comments as a reply to the patch itself.

Quoted 9 lines

ejabberd: fix package version
erlang-p1-utils: bump to version 1bf99f9
erlang-p1-cache-tab: bump to version f7ea12b
erlang-p1-tls: bump to version b070004
erlang-p1-stringprep: bump to version 3c64023
erlang-p1-xml: bump to version 2c61083
erlang-p1-stun: bump to version a3dce07
erlang-p1-sip: bump to version fd3e461
erlang-p1-yaml: bump to version e1f081e

All applied.

Another side question: ejabberd has quite a few patches, can you see if they can be upstreamed?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 2/11 ejabberd: simplify init script by patching ejabberdctl

In reply to Johan Oudinet

Dear Johan Oudinet,

Quoted 21 lines · Johan Oudinet

Let a user modify environment variables used in ejabberdctl by loading a default configuration file.

---
 package/ejabberd/0009-fix-ejabberdctl.patch | 21 +++++++++++++++++++
 package/ejabberd/S50ejabberd                | 32 +++++++++++++----------------
 2 files changed, 35 insertions(+), 18 deletions(-)
 create mode 100644 package/ejabberd/0009-fix-ejabberdctl.patch
package/ejabberd/0009-fix-ejabberdctl.patch new file +5 -0
new file mode 100644
index 0000000..9ae23ac
@@ -0,0 +1,21 @@
+Description: fix ejabberdctl
+ Change default values so ejabberdctl run commands as ejabberd user
+ Also add a way for the user to change default values.
+Signed-off-by: Johan Oudinet <[email protected]>
+

package/ejabberd/0009-fix-ejabberdctl.patch line 15

Quoted 10 lines
package/ejabberd/0009-fix-ejabberdctl.patch new file +10 -0
+diff --git a/ejabberdctl.template b/ejabberdctl.template
+index 79f4438..df0abba 100755
+--- a/ejabberdctl.template
++++ b/ejabberdctl.template
+@@ -14,7 +14,10 @@ SCRIPT_DIR=`cd ${0%/*} && pwd`
+ ERL={{erl}}
+ IEX={{bindir}}/iex
+ EPMD={{bindir}}/epmd
+-INSTALLUSER={{installuser}}
++INSTALLUSER=ejabberd

So this makes the patch Buildroot specific. Why isn't the {{installuser}} properly replaced by the "right" value at install time?

package/ejabberd/0009-fix-ejabberdctl.patch line 18

Quoted 3 lines
package/ejabberd/0009-fix-ejabberdctl.patch new file +3 -0
++
++# Read default configuration file if present.
++[ ! -r /etc/default/ejabberd ] || . /etc/default/ejabberd

I don't really understand why we are loading this default file here and in the init script itself. Who is installing this /etc/default/ejabberd file? What does it contain?

Quoted 13 lines
package/ejabberd/0009-fix-ejabberdctl.patch new file +3 -0
+ 
+ # check the proper system user is used if defined
+ if [ "$INSTALLUSER" != "" ] ; then
package/ejabberd/S50ejabberd +0 -2
index ff38d92..2161ead 100644
@@ -3,30 +3,26 @@
 # Start/stop ejabberd
 #
 
-NAME=ejabberd
-USER=ejabberd

package/ejabberd/S50ejabberd line 12

Quoted 10 lines
package/ejabberd/S50ejabberd +5 -3
+CTL=/usr/sbin/ejabberdctl
+DEFAULT=/etc/default/ejabberd
+INSTALLUSER=ejabberd
 RUNDIR=/var/run/ejabberd
-SPOOLDIR=/var/lib/ejabberd
 
-# Read configuration variable file if it is present.
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+# Read default configuration file if present.
+[ -r "$DEFAULT" ] && . "$DEFAULT"

And we're reading the /etc/default/ejabberd file here as well.

Can you give some more details about what is going on?

Quoted 34 lines
package/ejabberd/S50ejabberd +6 -10
+# Create RUNDIR.
 mkrundir() {
-    install -d -o "$USER" -g "$USER" "$RUNDIR" "$SPOOLDIR"
-}
-
-# Run ejabberdctl as user $USER.
-ctl() {
-    su $USER -c "ejabberdctl $*"
+    install -d -o "$INSTALLUSER" -g "$INSTALLUSER" "$RUNDIR"
 }
 
 case "$1" in
     start)
         mkrundir || exit 1
         echo -n "Starting ejabberd... "
-        ctl start --spool "$SPOOLDIR"
+        "$CTL" start
         # Wait until ejabberd is up and running.
-        if ctl started; then
+        if "$CTL" started; then
             echo "done"
         else
             echo "failed"
@@ -34,23 +30,23 @@ case "$1" in
         ;;
     stop)
         echo -n "Stopping ejabberd... "
-        ctl stop > /dev/null
-        if [ $? -eq 3 ] || ctl stopped; then
+        "$CTL" stop > /dev/null
+        if [ $? -eq 3 ] || "$CTL" stopped; then
             echo "OK"
         else

package/ejabberd/S50ejabberd case "$1" in · line 44

Quoted 10 lines
package/ejabberd/S50ejabberd +2 -2
             echo "failed"
         fi
         ;;
     status)
-        ctl status
+        "$CTL" status
         ;;
     restart|force-reload)
-        "$0" stop
+        "$0" stop || true

This change doesn't seem to be related.

package/ejabberd/S50ejabberd case "$1" in · line 52

Quoted 9 lines
package/ejabberd/S50ejabberd +1 -1
         "$0" start
         ;;
     live)
         mkrundir || exit 1
-        ctl live
+        "$CTL" live
         ;;
     *)
         echo "Usage: $0 {start|stop|status|restart|force-reload|live}"

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

PATCH 3/11 ejabberd: fix package version

In reply to Johan Oudinet

Dear Johan Oudinet,

Quoted 5 lines · Johan Oudinet

+ AC_PREREQ(2.53)
+-AC_INIT(ejabberd, m4_esyscmd([echo git describe --tags 2>/dev/null || echo 0.0 | sed 's/-g.*//;s/-/./' | tr -d '\012']), [ejabberd at process-one.net], [ejabberd]) ++AC_INIT(ejabberd, [15.06], [ejabberd at process-one.net], [ejabberd])
+ REQUIRE_ERLANG_MIN="5.9.1 (Erlang/OTP R15B01)"
+ REQUIRE_ERLANG_MAX="9.0.0 (No Max)"

I've merged this patch, but I'm not too happy with it, because it has no chance to be upstreamed as is. Do you think this is a problem you could report upstream, so that they can fix it in a way that works both for them and for Buildroot?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#18 lore raw

cover Bump ejabberd version to 15.06

In reply to Thomas Petazzoni

Thanks Thomas.

Quoted 22 lines · Thomas Petazzoni
Quoted 2 lines · Johan Oudinet

Johan Oudinet (11):
ejabberd: bump to version 15.06

Applied.

Quoted 1 line

ejabberd: simplify init script by patching ejabberdctl

Not applied yet, I'll send some comments as a reply to the patch itself.

Quoted 9 lines

ejabberd: fix package version
erlang-p1-utils: bump to version 1bf99f9
erlang-p1-cache-tab: bump to version f7ea12b
erlang-p1-tls: bump to version b070004
erlang-p1-stringprep: bump to version 3c64023
erlang-p1-xml: bump to version 2c61083
erlang-p1-stun: bump to version a3dce07
erlang-p1-sip: bump to version fd3e461
erlang-p1-yaml: bump to version e1f081e

Quoted 4 lines

All applied.

Another side question: ejabberd has quite a few patches, can you see if they can be upstreamed?

Yes, that's indeed an issue. I've sent upstream the ones that are not related to cross-compilation, and most of them have been accepted upstream.
So, at least those patches could be removed in the next ejabberd release. I'll try to get even more patched accepted upstream, but the ones related to cross-compilation would need to rewrite a big part of their configure.ac and Makefile.in files.

Signature · 3 lines
Johan
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
#4 lore raw

PATCH 2/11 ejabberd: simplify init script by patching ejabberdctl

In reply to Thomas Petazzoni

Thomas, All,

Quoted 28 lines · Thomas Petazzoni
Quoted 26 lines · Johan Oudinet

Let a user modify environment variables used in ejabberdctl by loading a default configuration file.

---
 package/ejabberd/0009-fix-ejabberdctl.patch | 21 +++++++++++++++++++
 package/ejabberd/S50ejabberd                | 32 +++++++++++++----------------
 2 files changed, 35 insertions(+), 18 deletions(-)
 create mode 100644 package/ejabberd/0009-fix-ejabberdctl.patch
package/ejabberd/0009-fix-ejabberdctl.patch new file +10 -0
new file mode 100644
index 0000000..9ae23ac
@@ -0,0 +1,21 @@
+Description: fix ejabberdctl
+ Change default values so ejabberdctl run commands as ejabberd user
+ Also add a way for the user to change default values.
+Signed-off-by: Johan Oudinet <[email protected]>
+
+diff --git a/ejabberdctl.template b/ejabberdctl.template
+index 79f4438..df0abba 100755
+--- a/ejabberdctl.template
++++ b/ejabberdctl.template
+@@ -14,7 +14,10 @@ SCRIPT_DIR=`cd ${0%/*} && pwd`
Quoted 8 lines

package/ejabberd/0009-fix-ejabberdctl.patch line 15

Quoted 5 lines
package/ejabberd/0009-fix-ejabberdctl.patch new file +5 -0
+ ERL={{erl}}
+ IEX={{bindir}}/iex
+ EPMD={{bindir}}/epmd
+-INSTALLUSER={{installuser}}
++INSTALLUSER=ejabberd

So this makes the patch Buildroot specific. Why isn't the {{installuser}} properly replaced by the "right" value at install time?

If we define the installuser variable, then the Makefile try to chmod files with this user, which does not necessarily exist in the host system. Debian packaging of ejabberd does the same trick to not set the installuser variable and patch the ejabberdctl instead. In the last buildroot version of ejabberd, each call of ejabberdctl was prefixed by "su ejabberd -c", which is less convenient than fixing INSTALLUSER to ejabberd.
If you prefer, I could modify this variable in a post-build hook.

Quoted 8 lines

package/ejabberd/0009-fix-ejabberdctl.patch line 18

Quoted 4 lines
package/ejabberd/0009-fix-ejabberdctl.patch new file +3 -0
++
++# Read default configuration file if present.
++[ ! -r /etc/default/ejabberd ] || . /etc/default/ejabberd

I don't really understand why we are loading this default file here and in the init script itself. Who is installing this /etc/default/ejabberd file? What does it contain?

I like shell scripts that read a configuration files in /etc/default so one can modify the script behavior without modifying it. No one is installing a /etc/default/ejabberd but I do use one in my installation where I set ERLANG_NODE to a specific IP address for ejabberd clustering and SPOOL_DIR to a temporary directory because the default spool directory (/var/lib/ejabberd) is read-only in my system. I understand this is something common in debian packaging but not in Buildroot. What's your suggestion?

Quoted 20 lines
Quoted 20 lines
package/ejabberd/0009-fix-ejabberdctl.patch new file +3 -0
+
+ # check the proper system user is used if defined
+ if [ "$INSTALLUSER" != "" ] ; then
package/ejabberd/S50ejabberd +3 -3
index ff38d92..2161ead 100644
@@ -3,30 +3,26 @@
 # Start/stop ejabberd
 #
 
-NAME=ejabberd
-USER=ejabberd
+CTL=/usr/sbin/ejabberdctl
+DEFAULT=/etc/default/ejabberd
+INSTALLUSER=ejabberd
 RUNDIR=/var/run/ejabberd
-SPOOLDIR=/var/lib/ejabberd
 
Quoted 8 lines

package/ejabberd/S50ejabberd line 12

Quoted 4 lines
package/ejabberd/S50ejabberd +2 -2
-# Read configuration variable file if it is present.
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+# Read default configuration file if present.
+[ -r "$DEFAULT" ] && . "$DEFAULT"

And we're reading the /etc/default/ejabberd file here as well.

Can you give some more details about what is going on?

Well, that's just for having a flexible script. Actually, in the previous buildroot packaging, I did not modify ejabberdctl to read an /etc/default/ejabberd file. Thus, I had to read it here and call ejabberdctl with --spool "$SPOOLDIR" option to change it. This was less convenient as one couldn't use ejabberdctl afterward without providing the same options given by /etc/init.d/S50ejabberd. Now, since ejabberdctl reads /etc/default/ejabberd, the init script is much simpler and one can use either the init script or ejabberdctl directly. We could remove the read of /etc/default/ejabberd here, as the only variables that can be changed are CTL, INSTALLUSER, and RUNDIR; it's unlikely that someone needs to change them.

Quoted 39 lines
Quoted 39 lines
package/ejabberd/S50ejabberd +6 -10
+# Create RUNDIR.
 mkrundir() {
-    install -d -o "$USER" -g "$USER" "$RUNDIR" "$SPOOLDIR"
-}
-
-# Run ejabberdctl as user $USER.
-ctl() {
-    su $USER -c "ejabberdctl $*"
+    install -d -o "$INSTALLUSER" -g "$INSTALLUSER" "$RUNDIR"
 }
 
 case "$1" in
     start)
         mkrundir || exit 1
         echo -n "Starting ejabberd... "
-        ctl start --spool "$SPOOLDIR"
+        "$CTL" start
         # Wait until ejabberd is up and running.
-        if ctl started; then
+        if "$CTL" started; then
             echo "done"
         else
             echo "failed"
@@ -34,23 +30,23 @@ case "$1" in
         ;;
     stop)
         echo -n "Stopping ejabberd... "
-        ctl stop > /dev/null
-        if [ $? -eq 3 ] || ctl stopped; then
+        "$CTL" stop > /dev/null
+        if [ $? -eq 3 ] || "$CTL" stopped; then
             echo "OK"
         else
             echo "failed"
         fi
         ;;
     status)
Quoted 8 lines

package/ejabberd/S50ejabberd case "$1" in · line 44

Quoted 6 lines
package/ejabberd/S50ejabberd +2 -2
-        ctl status
+        "$CTL" status
         ;;
     restart|force-reload)
-        "$0" stop
+        "$0" stop || true

This change doesn't seem to be related.

Which one? Using $CTL instead of ctl because we removed the ctl function or try to start the service even if stop failed? I agree that the second one is not related to the simplification of the init script. Should I split it in another commit?

Signature · 3 lines
Johan
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
#8 lore raw

PATCH 3/11 ejabberd: fix package version

In reply to Thomas Petazzoni

Thomas, All,

Quoted 9 lines · Thomas Petazzoni
Quoted 5 lines · Johan Oudinet

+ AC_PREREQ(2.53)
+-AC_INIT(ejabberd, m4_esyscmd([echo git describe --tags 2>/dev/null || echo 0.0 | sed 's/-g.*//;s/-/./' | tr -d '\012']), [ejabberd at process-one.net], [ejabberd]) ++AC_INIT(ejabberd, [15.06], [ejabberd at process-one.net], [ejabberd])
+ REQUIRE_ERLANG_MIN="5.9.1 (Erlang/OTP R15B01)"
+ REQUIRE_ERLANG_MAX="9.0.0 (No Max)"

Quoted 4 lines

I've merged this patch, but I'm not too happy with it, because it has no chance to be upstreamed as is. Do you think this is a problem you could report upstream, so that they can fix it in a way that works both for them and for Buildroot?

I've just asked them:
https://github.com/processone/ejabberd/issues/658

Signature · 1 line
Johan
#5 lore raw

PATCH 2/11 ejabberd: simplify init script by patching ejabberdctl

In reply to Johan Oudinet

Johan,

Quoted 11 lines · Johan Oudinet
Quoted 2 lines

So this makes the patch Buildroot specific. Why isn't the {{installuser}} properly replaced by the "right" value at install time?

If we define the installuser variable, then the Makefile try to chmod files with this user, which does not necessarily exist in the host system. Debian packaging of ejabberd does the same trick to not set the installuser variable and patch the ejabberdctl instead. In the last buildroot version of ejabberd, each call of ejabberdctl was prefixed by "su ejabberd -c", which is less convenient than fixing INSTALLUSER to ejabberd.
If you prefer, I could modify this variable in a post-build hook.

Ok, thanks for the additional explanation. The proposal you made works for me, especially since Debian is doing the same.

Quoted 6 lines
Quoted 3 lines

I don't really understand why we are loading this default file here and in the init script itself. Who is installing this /etc/default/ejabberd file? What does it contain?

I like shell scripts that read a configuration files in /etc/default so one can modify the script behavior without modifying it.

Me too. What was confusing me is that both the init script *and* the ejabberdctl script were reading it. But you gave some good explanation for that.

Quoted 6 lines
Quoted 1 line

This change doesn't seem to be related.

Which one? Using $CTL instead of ctl because we removed the ctl function or try to start the service even if stop failed? I agree that the second one is not related to the simplification of the init script. Should I split it in another commit?

The change to start the service even if the stop failed. But that's a minor detail.

Therefore, I've applied the patch as is. Thanks again for this contribution and the additional explanations!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com