Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06
@ 2015-07-08  9:54 Johan Oudinet
  2015-07-08  9:54 ` [Buildroot] [PATCH 01/11] ejabberd: bump to version 15.06 Johan Oudinet
                   ` (11 more replies)
  0 siblings, 12 replies; 19+ messages in thread
From: Johan Oudinet @ 2015-07-08  9:54 UTC (permalink / raw)
  To: buildroot

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

-- 
2.1.4

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 01/11] ejabberd: bump to version 15.06
  2015-07-08  9:54 [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Johan Oudinet
@ 2015-07-08  9:54 ` Johan Oudinet
  2015-07-08  9:54 ` [Buildroot] [PATCH 02/11] ejabberd: simplify init script by patching ejabberdctl Johan Oudinet
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Johan Oudinet @ 2015-07-08  9:54 UTC (permalink / raw)
  To: buildroot

Adapt patches accordingly and add a dependency to getent.

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
 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

diff --git a/package/ejabberd/0001-remove-deps.patch b/package/ejabberd/0001-remove-deps.patch
index 1982ca8..ffe2106 100644
--- a/package/ejabberd/0001-remove-deps.patch
+++ b/package/ejabberd/0001-remove-deps.patch
@@ -5,16 +5,18 @@ Author: Philipp Huebner <debalance@debian.org>
 
 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.
  
diff --git a/package/ejabberd/0002-disable-rebar-deps.patch b/package/ejabberd/0002-disable-rebar-deps.patch
index 80217ca..1ea40de 100644
--- a/package/ejabberd/0002-disable-rebar-deps.patch
+++ b/package/ejabberd/0002-disable-rebar-deps.patch
@@ -5,9 +5,11 @@ Author: Philipp Huebner <debalance@debian.org>
 
 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)
diff --git a/package/ejabberd/0003-disable-test.patch b/package/ejabberd/0003-disable-test.patch
index 4354ab6..1b28957 100644
--- a/package/ejabberd/0003-disable-test.patch
+++ b/package/ejabberd/0003-disable-test.patch
@@ -6,16 +6,22 @@ Author: Philipp Huebner <debalance@debian.org>
 
 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 \
diff --git a/package/ejabberd/0006-disable-erlang-deprecated-types-check.patch b/package/ejabberd/0006-disable-erlang-deprecated-types-check.patch
new file mode 100644
index 0000000..1b70953
--- /dev/null
+++ b/package/ejabberd/0006-disable-erlang-deprecated-types-check.patch
@@ -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 <johan.oudinet@gmail.com>
+
+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])
diff --git a/package/ejabberd/0006-remove-doc.patch b/package/ejabberd/0006-remove-doc.patch
deleted file mode 100644
index 0c0a21b..0000000
--- a/package/ejabberd/0006-remove-doc.patch
+++ /dev/null
@@ -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 <johan.oudinet@gmail.com>
-
-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
- 
diff --git a/package/ejabberd/0007-fix-install-permissions.patch b/package/ejabberd/0007-fix-install-permissions.patch
index b4633aa..452025d 100644
--- a/package/ejabberd/0007-fix-install-permissions.patch
+++ b/package/ejabberd/0007-fix-install-permissions.patch
@@ -6,55 +6,57 @@ Author: Johan Oudinet <johan.oudinet@gmail.com>
 
 Index: ejabberd/Makefile.in
 ===================================================================
---- ejabberd.orig/Makefile.in	2014-10-28 12:36:49.228713322 +0100
-+++ ejabberd/Makefile.in	2014-10-28 13:53:13.538888807 +0100
-@@ -91,10 +91,10 @@ spec:
+diff --git a/Makefile.in b/Makefile.in
+index ffd1d30..a60c5b7 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -114,10 +114,8 @@ DLLs := $(wildcard deps/*/priv/*.so) $(wildcard deps/*/priv/lib/*.so)
  install: all
  	#
  	# Configuration files
 -	$(INSTALL) -d -m 750 $(G_USER) $(ETCDIR)
-+	$(INSTALL) -d $(ETCDIR)
- 	[ -f $(ETCDIR)/ejabberd.yml ] \
+-	[ -f $(ETCDIR)/ejabberd.yml ] \
 -		&& $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml-new \
 -		|| $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml
-+		&& $(INSTALL) -b -m 644 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml-new \
-+		|| $(INSTALL) -b -m 644 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml
++	$(INSTALL) -d $(ETCDIR)
++	$(INSTALL) -b -m 644 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml
  	$(SED) -e "s*{{rootdir}}*@prefix@*" \
  		-e "s*{{installuser}}*@INSTALLUSER@*" \
- 		-e "s*{{libdir}}*@libdir@*" \
-@@ -104,13 +104,12 @@ install: all
+ 		-e "s*{{bindir}}*@bindir@*" \
+@@ -127,14 +125,11 @@ install: all
+ 		-e "s*{{docdir}}*@docdir@*" \
  		-e "s*{{erl}}*@ERL@*" ejabberdctl.template \
  		> ejabberdctl.example
- 	[ -f $(ETCDIR)/ejabberdctl.cfg ] \
+-	[ -f $(ETCDIR)/ejabberdctl.cfg ] \
 -		&& $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new \
 -		|| $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
-+		&& $(INSTALL) -b -m 644 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new \
-+		|| $(INSTALL) -b -m 644 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
++	$(INSTALL) -b -m 644 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
  	$(INSTALL) -b -m 644 $(G_USER) inetrc $(ETCDIR)/inetrc
  	#
  	# Administration script
 -	[ -d $(SBINDIR) ] || $(INSTALL) -d -m 755 $(SBINDIR)
 -	$(INSTALL) -m 550 $(G_USER) ejabberdctl.example $(SBINDIR)/ejabberdctl
 +	$(INSTALL) -D ejabberdctl.example $(SBINDIR)/ejabberdctl
- 	#
- 	# Init script
- 	$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*" \
-@@ -129,10 +128,7 @@ install: all
- 	$(INSTALL) -m 644 include/*.hrl $(INCLUDEDIR)
+ 	# Elixir binaries
+ 	[ -d $(BINDIR) ] || $(INSTALL) -d -m 755 $(BINDIR)
+ 	-[ -f deps/elixir/bin/iex ] && $(INSTALL) -m 550 $(G_USER) deps/elixir/bin/iex $(BINDIR)/iex
+@@ -165,9 +160,9 @@ install: all
  	#
  	# Binary C programs
--	$(INSTALL) -d $(PBINDIR)
+ 	$(INSTALL) -d $(PBINDIR)
 -	$(INSTALL) -m 750 $(O_USER) tools/captcha.sh $(PBINDIR)
--	-[ -f deps/p1_pam/priv/bin/epam ] \
--		&& $(INSTALL) -m 750 $(O_USER) deps/p1_pam/priv/bin/epam $(PBINDIR)
-+	$(INSTALL) -D tools/captcha.sh $(PBINDIR)/captcha.sh
+-	$(INSTALL) -m 750 $(O_USER) tools/joincluster $(PBINDIR)
+-	$(INSTALL) -m 750 $(O_USER) tools/leavecluster $(PBINDIR)
++	$(INSTALL) tools/captcha.sh $(PBINDIR)
++	$(INSTALL) tools/joincluster $(PBINDIR)
++	$(INSTALL) tools/leavecluster $(PBINDIR)
+ 	-[ -f deps/p1_pam/priv/bin/epam ] \
+ 		&& $(INSTALL) -m 750 $(O_USER) deps/p1_pam/priv/bin/epam $(PBINDIR)
  	#
- 	# Binary system libraries
- 	$(INSTALL) -d $(SODIR)
-@@ -140,22 +136,6 @@ install: all
- 	# Translated strings
- 	$(INSTALL) -d $(MSGSDIR)
- 	$(INSTALL) -m 644 priv/msgs/*.msg $(MSGSDIR)
+@@ -184,29 +179,6 @@ install: all
+ 	# Copy lite.sql
+ 	-[ -d deps/sqlite3 ] && $(INSTALL) -d $(SQLDIR)
+ 	-[ -d deps/sqlite3 ] && $(INSTALL) -m 644 sql/lite.sql $(SQLDIR)
 -	#
 -	# Spool directory
 -	$(INSTALL) -d -m 750 $(O_USER) $(SPOOLDIR)
@@ -71,6 +73,12 @@ Index: ejabberd/Makefile.in
 -	$(INSTALL) -d -m 750 $(O_USER) $(LOGDIR)
 -	$(CHOWN_COMMAND) -R @INSTALLUSER@ $(LOGDIR) >$(CHOWN_OUTPUT)
 -	chmod -R 750 $(LOGDIR)
+-	#
+-	# Documentation
+-	$(INSTALL) -d $(DOCDIR)
+-	[ -f doc/guide.html ] \
+-		&& $(INSTALL) -m 644 doc/guide.html $(DOCDIR) \
+-		|| echo "Documentation not included in sources"
+-	$(INSTALL) -m 644 COPYING $(DOCDIR)
  
  uninstall: uninstall-binary
-
diff --git a/package/ejabberd/0008-add-ac_config_macro_dir.patch b/package/ejabberd/0008-add-ac_config_macro_dir.patch
new file mode 100644
index 0000000..007e694
--- /dev/null
+++ b/package/ejabberd/0008-add-ac_config_macro_dir.patch
@@ -0,0 +1,30 @@
+upstream: https://github.com/processone/ejabberd/pull/628
+Author: Johan Oudinet <johan.oudinet@gmail.com>
+
+From 0e7d2b73be335353e9938668a699b3dbb7011c56 Mon Sep 17 00:00:00 2001
+From: Johan Oudinet <johan.oudinet@gmail.com>
+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
+
diff --git a/package/ejabberd/Config.in b/package/ejabberd/Config.in
index 1a27ef2..7b4e99b 100644
--- a/package/ejabberd/Config.in
+++ b/package/ejabberd/Config.in
@@ -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
diff --git a/package/ejabberd/ejabberd.mk b/package/ejabberd/ejabberd.mk
index 650dc0e..b413c8b 100644
--- a/package/ejabberd/ejabberd.mk
+++ b/package/ejabberd/ejabberd.mk
@@ -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
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 02/11] ejabberd: simplify init script by patching ejabberdctl
  2015-07-08  9:54 [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Johan Oudinet
  2015-07-08  9:54 ` [Buildroot] [PATCH 01/11] ejabberd: bump to version 15.06 Johan Oudinet
@ 2015-07-08  9:54 ` Johan Oudinet
  2015-07-11 10:30   ` Thomas Petazzoni
  2015-07-08  9:54 ` [Buildroot] [PATCH 03/11] ejabberd: fix package version Johan Oudinet
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 19+ messages in thread
From: Johan Oudinet @ 2015-07-08  9:54 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
 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

diff --git a/package/ejabberd/0009-fix-ejabberdctl.patch b/package/ejabberd/0009-fix-ejabberdctl.patch
new file mode 100644
index 0000000..9ae23ac
--- /dev/null
+++ b/package/ejabberd/0009-fix-ejabberdctl.patch
@@ -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 <johan.oudinet@gmail.com>
+
+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
diff --git a/package/ejabberd/S50ejabberd b/package/ejabberd/S50ejabberd
index ff38d92..2161ead 100644
--- a/package/ejabberd/S50ejabberd
+++ b/package/ejabberd/S50ejabberd
@@ -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}"
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 03/11] ejabberd: fix package version
  2015-07-08  9:54 [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Johan Oudinet
  2015-07-08  9:54 ` [Buildroot] [PATCH 01/11] ejabberd: bump to version 15.06 Johan Oudinet
  2015-07-08  9:54 ` [Buildroot] [PATCH 02/11] ejabberd: simplify init script by patching ejabberdctl Johan Oudinet
@ 2015-07-08  9:54 ` Johan Oudinet
  2015-07-11 10:31   ` Thomas Petazzoni
  2015-07-08  9:54 ` [Buildroot] [PATCH 04/11] erlang-p1-utils: bump to version 1bf99f9 Johan Oudinet
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 19+ messages in thread
From: Johan Oudinet @ 2015-07-08  9:54 UTC (permalink / raw)
  To: buildroot

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 <johan.oudinet@gmail.com>
---
 package/ejabberd/0010-fix-package-version.patch | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 package/ejabberd/0010-fix-package-version.patch

diff --git a/package/ejabberd/0010-fix-package-version.patch b/package/ejabberd/0010-fix-package-version.patch
new file mode 100644
index 0000000..c8b3c10
--- /dev/null
+++ b/package/ejabberd/0010-fix-package-version.patch
@@ -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 <johan.oudinet@gmail.com>
+
+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)"
+ 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 04/11] erlang-p1-utils: bump to version 1bf99f9
  2015-07-08  9:54 [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Johan Oudinet
                   ` (2 preceding siblings ...)
  2015-07-08  9:54 ` [Buildroot] [PATCH 03/11] ejabberd: fix package version Johan Oudinet
@ 2015-07-08  9:54 ` Johan Oudinet
  2015-07-08  9:54 ` [Buildroot] [PATCH 05/11] erlang-p1-cache-tab: bump to version f7ea12b Johan Oudinet
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Johan Oudinet @ 2015-07-08  9:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
 package/erlang-p1-utils/erlang-p1-utils.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/erlang-p1-utils/erlang-p1-utils.mk b/package/erlang-p1-utils/erlang-p1-utils.mk
index 0e63031..c01d6d5 100644
--- a/package/erlang-p1-utils/erlang-p1-utils.mk
+++ b/package/erlang-p1-utils/erlang-p1-utils.mk
@@ -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
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 05/11] erlang-p1-cache-tab: bump to version f7ea12b
  2015-07-08  9:54 [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Johan Oudinet
                   ` (3 preceding siblings ...)
  2015-07-08  9:54 ` [Buildroot] [PATCH 04/11] erlang-p1-utils: bump to version 1bf99f9 Johan Oudinet
@ 2015-07-08  9:54 ` Johan Oudinet
  2015-07-08  9:54 ` [Buildroot] [PATCH 06/11] erlang-p1-tls: bump to version b070004 Johan Oudinet
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Johan Oudinet @ 2015-07-08  9:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
 package/erlang-p1-cache-tab/erlang-p1-cache-tab.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/erlang-p1-cache-tab/erlang-p1-cache-tab.mk b/package/erlang-p1-cache-tab/erlang-p1-cache-tab.mk
index f651b06..6c5d98a 100644
--- a/package/erlang-p1-cache-tab/erlang-p1-cache-tab.mk
+++ b/package/erlang-p1-cache-tab/erlang-p1-cache-tab.mk
@@ -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
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 06/11] erlang-p1-tls: bump to version b070004
  2015-07-08  9:54 [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Johan Oudinet
                   ` (4 preceding siblings ...)
  2015-07-08  9:54 ` [Buildroot] [PATCH 05/11] erlang-p1-cache-tab: bump to version f7ea12b Johan Oudinet
@ 2015-07-08  9:54 ` Johan Oudinet
  2015-07-08  9:54 ` [Buildroot] [PATCH 07/11] erlang-p1-stringprep: bump to version 3c64023 Johan Oudinet
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Johan Oudinet @ 2015-07-08  9:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
 package/erlang-p1-tls/erlang-p1-tls.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/erlang-p1-tls/erlang-p1-tls.mk b/package/erlang-p1-tls/erlang-p1-tls.mk
index d6e5801..d706797 100644
--- a/package/erlang-p1-tls/erlang-p1-tls.mk
+++ b/package/erlang-p1-tls/erlang-p1-tls.mk
@@ -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
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 07/11] erlang-p1-stringprep: bump to version 3c64023
  2015-07-08  9:54 [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Johan Oudinet
                   ` (5 preceding siblings ...)
  2015-07-08  9:54 ` [Buildroot] [PATCH 06/11] erlang-p1-tls: bump to version b070004 Johan Oudinet
@ 2015-07-08  9:54 ` Johan Oudinet
  2015-07-08  9:54 ` [Buildroot] [PATCH 08/11] erlang-p1-xml: bump to version 2c61083 Johan Oudinet
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Johan Oudinet @ 2015-07-08  9:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
 package/erlang-p1-stringprep/erlang-p1-stringprep.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/erlang-p1-stringprep/erlang-p1-stringprep.mk b/package/erlang-p1-stringprep/erlang-p1-stringprep.mk
index 29bbe26..60c80bc 100644
--- a/package/erlang-p1-stringprep/erlang-p1-stringprep.mk
+++ b/package/erlang-p1-stringprep/erlang-p1-stringprep.mk
@@ -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
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 08/11] erlang-p1-xml: bump to version 2c61083
  2015-07-08  9:54 [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Johan Oudinet
                   ` (6 preceding siblings ...)
  2015-07-08  9:54 ` [Buildroot] [PATCH 07/11] erlang-p1-stringprep: bump to version 3c64023 Johan Oudinet
@ 2015-07-08  9:54 ` Johan Oudinet
  2015-07-08  9:54 ` [Buildroot] [PATCH 09/11] erlang-p1-stun: bump to version a3dce07 Johan Oudinet
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Johan Oudinet @ 2015-07-08  9:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
 package/erlang-p1-xml/erlang-p1-xml.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/erlang-p1-xml/erlang-p1-xml.mk b/package/erlang-p1-xml/erlang-p1-xml.mk
index 3bcac66..f81d3e5 100644
--- a/package/erlang-p1-xml/erlang-p1-xml.mk
+++ b/package/erlang-p1-xml/erlang-p1-xml.mk
@@ -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
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 09/11] erlang-p1-stun: bump to version a3dce07
  2015-07-08  9:54 [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Johan Oudinet
                   ` (7 preceding siblings ...)
  2015-07-08  9:54 ` [Buildroot] [PATCH 08/11] erlang-p1-xml: bump to version 2c61083 Johan Oudinet
@ 2015-07-08  9:54 ` Johan Oudinet
  2015-07-08  9:54 ` [Buildroot] [PATCH 10/11] erlang-p1-sip: bump to version fd3e461 Johan Oudinet
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 19+ messages in thread
From: Johan Oudinet @ 2015-07-08  9:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
 package/erlang-p1-stun/erlang-p1-stun.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/erlang-p1-stun/erlang-p1-stun.mk b/package/erlang-p1-stun/erlang-p1-stun.mk
index 7b4b1a9..7920347 100644
--- a/package/erlang-p1-stun/erlang-p1-stun.mk
+++ b/package/erlang-p1-stun/erlang-p1-stun.mk
@@ -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
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 10/11] erlang-p1-sip: bump to version fd3e461
  2015-07-08  9:54 [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Johan Oudinet
                   ` (8 preceding siblings ...)
  2015-07-08  9:54 ` [Buildroot] [PATCH 09/11] erlang-p1-stun: bump to version a3dce07 Johan Oudinet
@ 2015-07-08  9:54 ` Johan Oudinet
  2015-07-08  9:54 ` [Buildroot] [PATCH 11/11] erlang-p1-yaml: bump to version e1f081e Johan Oudinet
  2015-07-11 10:28 ` [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Thomas Petazzoni
  11 siblings, 0 replies; 19+ messages in thread
From: Johan Oudinet @ 2015-07-08  9:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
 package/erlang-p1-sip/erlang-p1-sip.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/erlang-p1-sip/erlang-p1-sip.mk b/package/erlang-p1-sip/erlang-p1-sip.mk
index b895f59..d017a92 100644
--- a/package/erlang-p1-sip/erlang-p1-sip.mk
+++ b/package/erlang-p1-sip/erlang-p1-sip.mk
@@ -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
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 11/11] erlang-p1-yaml: bump to version e1f081e
  2015-07-08  9:54 [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Johan Oudinet
                   ` (9 preceding siblings ...)
  2015-07-08  9:54 ` [Buildroot] [PATCH 10/11] erlang-p1-sip: bump to version fd3e461 Johan Oudinet
@ 2015-07-08  9:54 ` Johan Oudinet
  2015-07-11 10:28 ` [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Thomas Petazzoni
  11 siblings, 0 replies; 19+ messages in thread
From: Johan Oudinet @ 2015-07-08  9:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
 package/erlang-p1-yaml/erlang-p1-yaml.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/erlang-p1-yaml/erlang-p1-yaml.mk b/package/erlang-p1-yaml/erlang-p1-yaml.mk
index 346e398..6f7c977 100644
--- a/package/erlang-p1-yaml/erlang-p1-yaml.mk
+++ b/package/erlang-p1-yaml/erlang-p1-yaml.mk
@@ -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
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06
  2015-07-08  9:54 [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Johan Oudinet
                   ` (10 preceding siblings ...)
  2015-07-08  9:54 ` [Buildroot] [PATCH 11/11] erlang-p1-yaml: bump to version e1f081e Johan Oudinet
@ 2015-07-11 10:28 ` Thomas Petazzoni
  2015-07-14  9:10   ` Johan Oudinet
  11 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2015-07-11 10:28 UTC (permalink / raw)
  To: buildroot

Dear Johan Oudinet,

On Wed,  8 Jul 2015 11:54:13 +0200, Johan Oudinet wrote:

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

Applied.

>   ejabberd: simplify init script by patching ejabberdctl

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

>   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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 02/11] ejabberd: simplify init script by patching ejabberdctl
  2015-07-08  9:54 ` [Buildroot] [PATCH 02/11] ejabberd: simplify init script by patching ejabberdctl Johan Oudinet
@ 2015-07-11 10:30   ` Thomas Petazzoni
  2015-07-14  9:52     ` Johan Oudinet
  0 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2015-07-11 10:30 UTC (permalink / raw)
  To: buildroot

Dear Johan Oudinet,

On Wed,  8 Jul 2015 11:54:15 +0200, Johan Oudinet wrote:
> Let a user modify environment variables used in ejabberdctl by loading
> a default configuration file.
> 
> Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
> ---
>  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
> 
> diff --git a/package/ejabberd/0009-fix-ejabberdctl.patch b/package/ejabberd/0009-fix-ejabberdctl.patch
> new file mode 100644
> index 0000000..9ae23ac
> --- /dev/null
> +++ b/package/ejabberd/0009-fix-ejabberdctl.patch
> @@ -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 <johan.oudinet@gmail.com>
> +
> +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?

> ++
> ++# 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?

> + 
> + # check the proper system user is used if defined
> + if [ "$INSTALLUSER" != "" ] ; then
> diff --git a/package/ejabberd/S50ejabberd b/package/ejabberd/S50ejabberd
> index ff38d92..2161ead 100644
> --- a/package/ejabberd/S50ejabberd
> +++ b/package/ejabberd/S50ejabberd
> @@ -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"

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

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

>  
> +# 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

This change doesn't seem to be related.

>          "$0" start
>          ;;
>      live)
>          mkrundir || exit 1
> -        ctl live
> +        "$CTL" live
>          ;;
>      *)
>          echo "Usage: $0 {start|stop|status|restart|force-reload|live}"

Thanks,

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 03/11] ejabberd: fix package version
  2015-07-08  9:54 ` [Buildroot] [PATCH 03/11] ejabberd: fix package version Johan Oudinet
@ 2015-07-11 10:31   ` Thomas Petazzoni
  2015-07-14 10:02     ` Johan Oudinet
  0 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2015-07-11 10:31 UTC (permalink / raw)
  To: buildroot

Dear Johan Oudinet,

On Wed,  8 Jul 2015 11:54:16 +0200, Johan Oudinet wrote:

> + 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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06
  2015-07-11 10:28 ` [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Thomas Petazzoni
@ 2015-07-14  9:10   ` Johan Oudinet
  0 siblings, 0 replies; 19+ messages in thread
From: Johan Oudinet @ 2015-07-14  9:10 UTC (permalink / raw)
  To: buildroot

Thanks Thomas.

On Sat, Jul 11, 2015 at 12:28 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
>
> On Wed,  8 Jul 2015 11:54:13 +0200, Johan Oudinet wrote:
>
>> Johan Oudinet (11):
>>   ejabberd: bump to version 15.06
>
> Applied.
>
>>   ejabberd: simplify init script by patching ejabberdctl
>
> Not applied yet, I'll send some comments as a reply to the patch itself.
>
>>   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?

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.

-- 
Johan
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 02/11] ejabberd: simplify init script by patching ejabberdctl
  2015-07-11 10:30   ` Thomas Petazzoni
@ 2015-07-14  9:52     ` Johan Oudinet
  2015-07-19 21:09       ` Thomas Petazzoni
  0 siblings, 1 reply; 19+ messages in thread
From: Johan Oudinet @ 2015-07-14  9:52 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On Sat, Jul 11, 2015 at 12:30 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
>
> On Wed,  8 Jul 2015 11:54:15 +0200, Johan Oudinet wrote:
>> Let a user modify environment variables used in ejabberdctl by loading
>> a default configuration file.
>>
>> Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
>> ---
>>  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
>>
>> diff --git a/package/ejabberd/0009-fix-ejabberdctl.patch b/package/ejabberd/0009-fix-ejabberdctl.patch
>> new file mode 100644
>> index 0000000..9ae23ac
>> --- /dev/null
>> +++ b/package/ejabberd/0009-fix-ejabberdctl.patch
>> @@ -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 <johan.oudinet@gmail.com>
>> +
>> +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?

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.

>
>> ++
>> ++# 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?

>
>> +
>> + # check the proper system user is used if defined
>> + if [ "$INSTALLUSER" != "" ] ; then
>> diff --git a/package/ejabberd/S50ejabberd b/package/ejabberd/S50ejabberd
>> index ff38d92..2161ead 100644
>> --- a/package/ejabberd/S50ejabberd
>> +++ b/package/ejabberd/S50ejabberd
>> @@ -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"
>
> 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.

>
>>
>> +# 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
>
> 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?

-- 
Johan
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 03/11] ejabberd: fix package version
  2015-07-11 10:31   ` Thomas Petazzoni
@ 2015-07-14 10:02     ` Johan Oudinet
  0 siblings, 0 replies; 19+ messages in thread
From: Johan Oudinet @ 2015-07-14 10:02 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On Sat, Jul 11, 2015 at 12:31 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
>
> On Wed,  8 Jul 2015 11:54:16 +0200, Johan Oudinet wrote:
>
>> + 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?

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

-- 
Johan

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 02/11] ejabberd: simplify init script by patching ejabberdctl
  2015-07-14  9:52     ` Johan Oudinet
@ 2015-07-19 21:09       ` Thomas Petazzoni
  0 siblings, 0 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2015-07-19 21:09 UTC (permalink / raw)
  To: buildroot

Johan,

On Tue, 14 Jul 2015 11:52:41 +0200, Johan Oudinet wrote:

> > 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.

> > 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.

> > 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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-07-19 21:09 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-08  9:54 [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Johan Oudinet
2015-07-08  9:54 ` [Buildroot] [PATCH 01/11] ejabberd: bump to version 15.06 Johan Oudinet
2015-07-08  9:54 ` [Buildroot] [PATCH 02/11] ejabberd: simplify init script by patching ejabberdctl Johan Oudinet
2015-07-11 10:30   ` Thomas Petazzoni
2015-07-14  9:52     ` Johan Oudinet
2015-07-19 21:09       ` Thomas Petazzoni
2015-07-08  9:54 ` [Buildroot] [PATCH 03/11] ejabberd: fix package version Johan Oudinet
2015-07-11 10:31   ` Thomas Petazzoni
2015-07-14 10:02     ` Johan Oudinet
2015-07-08  9:54 ` [Buildroot] [PATCH 04/11] erlang-p1-utils: bump to version 1bf99f9 Johan Oudinet
2015-07-08  9:54 ` [Buildroot] [PATCH 05/11] erlang-p1-cache-tab: bump to version f7ea12b Johan Oudinet
2015-07-08  9:54 ` [Buildroot] [PATCH 06/11] erlang-p1-tls: bump to version b070004 Johan Oudinet
2015-07-08  9:54 ` [Buildroot] [PATCH 07/11] erlang-p1-stringprep: bump to version 3c64023 Johan Oudinet
2015-07-08  9:54 ` [Buildroot] [PATCH 08/11] erlang-p1-xml: bump to version 2c61083 Johan Oudinet
2015-07-08  9:54 ` [Buildroot] [PATCH 09/11] erlang-p1-stun: bump to version a3dce07 Johan Oudinet
2015-07-08  9:54 ` [Buildroot] [PATCH 10/11] erlang-p1-sip: bump to version fd3e461 Johan Oudinet
2015-07-08  9:54 ` [Buildroot] [PATCH 11/11] erlang-p1-yaml: bump to version e1f081e Johan Oudinet
2015-07-11 10:28 ` [Buildroot] [PATCH 00/11] Bump ejabberd version to 15.06 Thomas Petazzoni
2015-07-14  9:10   ` Johan Oudinet

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