From: Johan Oudinet <johan.oudinet@gmail.com>
To: buildroot@buildroot.org
Cc: Johan Oudinet <johan.oudinet@gmail.com>
Subject: [Buildroot] [PATCH v2 23/23] package/ejabberd: fix warnings reported by check-package
Date: Thu, 29 Aug 2024 16:49:39 +0200 [thread overview]
Message-ID: <20240829144940.209964-24-johan.oudinet@gmail.com> (raw)
In-Reply-To: <20240829144940.209964-1-johan.oudinet@gmail.com>
Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
.checkpackageignore | 5 ---
package/ejabberd/S50ejabberd | 72 ++++++++++++++++---------------
package/ejabberd/check-erlang-lib | 39 +++++++++--------
3 files changed, 57 insertions(+), 59 deletions(-)
diff --git a/.checkpackageignore b/.checkpackageignore
index 4cfc202153..04aab622e9 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -466,11 +466,6 @@ package/efl/0001-ecore_evas-engines-drm-meson.build-use-gl_deps-as-en.patch lib_
package/efl/0002-ecore_evas-engines-drm-meson.build-fix-gl_drm-includ.patch lib_patch.Upstream
package/efl/0003-ecore_fb-fix-build-with-tslib.patch lib_patch.Upstream
package/eigen/0001-Adds-new-CMake-Options-for-controlling-build-compone.patch lib_patch.Upstream
-package/ejabberd/0001-Makefile.in-do-not-download-or-compile-dependencies.patch lib_patch.Upstream
-package/ejabberd/0002-fix-ejabberdctl.patch lib_patch.Upstream
-package/ejabberd/0003-correct-includes.patch lib_patch.Upstream
-package/ejabberd/S50ejabberd Shellcheck lib_sysv.Indent lib_sysv.Variables
-package/ejabberd/check-erlang-lib Shellcheck
package/elftosb/0001-fixes-includes.patch lib_patch.Upstream
package/elftosb/0002-force-cxx-compiler.patch lib_patch.Upstream
package/elfutils/0001-Add-a-enable-disable-progs-configure-option.patch lib_patch.Upstream
diff --git a/package/ejabberd/S50ejabberd b/package/ejabberd/S50ejabberd
index 83513bdc83..5d01034fb2 100644
--- a/package/ejabberd/S50ejabberd
+++ b/package/ejabberd/S50ejabberd
@@ -3,52 +3,54 @@
# Start/stop ejabberd
#
+DAEMON=ejabberd
CTL=/usr/sbin/ejabberdctl
DEFAULT=/etc/ejabberd/ejabberdctl.cfg
INSTALLUSER=ejabberd
RUNDIR=/var/run/ejabberd
# Read default configuration file if present.
+# shellcheck source=/dev/null
[ -r "$DEFAULT" ] && . "$DEFAULT"
# Create RUNDIR.
mkrundir() {
- install -d -o "$INSTALLUSER" -g "$INSTALLUSER" "$RUNDIR"
+ install -d -o "$INSTALLUSER" -g "$INSTALLUSER" "$RUNDIR"
}
case "$1" in
- start)
- mkrundir || exit 1
- printf "Starting ejabberd... "
- "$CTL" start
- # Wait until ejabberd is up and running.
- if "$CTL" started; then
- echo "done"
- else
- echo "failed"
- fi
- ;;
- stop)
- printf "Stopping ejabberd... "
- "$CTL" stop > /dev/null
- if [ $? -eq 3 ] || "$CTL" stopped; then
- echo "OK"
- else
- echo "failed"
- fi
- ;;
- status)
- "$CTL" status
- ;;
- restart|force-reload)
- "$0" stop || true
- "$0" start
- ;;
- live)
- mkrundir || exit 1
- "$CTL" live
- ;;
- *)
- echo "Usage: $0 {start|stop|status|restart|force-reload|live}"
- exit 1
+ start)
+ mkrundir || exit 1
+ printf 'Starting %s: ' "$DAEMON"
+ "$CTL" start
+ # Wait until ejabberd is up and running.
+ if "$CTL" started; then
+ echo "done"
+ else
+ echo "failed"
+ fi
+ ;;
+ stop)
+ printf 'Stopping %s: ' "$DAEMON"
+ "$CTL" stop > /dev/null
+ if [ $? -eq 3 ] || "$CTL" stopped; then
+ echo "OK"
+ else
+ echo "failed"
+ fi
+ ;;
+ status)
+ "$CTL" status
+ ;;
+ restart|force-reload)
+ "$0" stop || true
+ "$0" start
+ ;;
+ live)
+ mkrundir || exit 1
+ "$CTL" live
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|restart|force-reload|live}"
+ exit 1
esac
diff --git a/package/ejabberd/check-erlang-lib b/package/ejabberd/check-erlang-lib
index 63f8bf1926..4e51b54294 100755
--- a/package/ejabberd/check-erlang-lib
+++ b/package/ejabberd/check-erlang-lib
@@ -9,9 +9,9 @@
# without calling erlang.
usage() {
- cat <<EOF
+ cat <<EOF
Usage:
- $0 library
+ $0 library
Look for Erlang's library in TARGET_DIR/usr/lib/erlang/lib.
If the library is found, it returns the path to the latest version,
@@ -24,15 +24,15 @@ EOF
}
die () {
- echo "$@" >&2
- exit 1
+ echo "$@" >&2
+ exit 1
}
if [ $# -ne 1 ]; then
- usage
- exit 0
+ usage
+ exit 0
else
- library="$1"
+ library="$1"
fi
target_dir="${TARGET_DIR:-output/target}"
@@ -40,16 +40,17 @@ target_dir="${TARGET_DIR:-output/target}"
[ -d "$target_dir" ] || die "TARGET_DIR is not a directory. Please \
specify the TARGET_DIR environment variable."
-case "$(ls -1d -- "$target_dir/usr/lib/erlang/lib/$library-"* | wc -l)" in
- 0)
- echo "not found"
- ;;
- 1)
- echo "$target_dir/usr/lib/erlang/lib/$library-"* \
- | sed -e "s,^$target_dir,,"
- ;;
- *)
- die "Several versions of $library have been found. Please \
- remove the unused ones."
- ;;
+case "$(find "$target_dir/usr/lib/erlang/lib" -maxdepth 1 \
+ -name "$library-*" -type d | wc -l)" in
+ 0)
+ echo "not found"
+ ;;
+ 1)
+ echo "$target_dir/usr/lib/erlang/lib/$library-"* \
+ | sed -e "s,^$target_dir,,"
+ ;;
+ *)
+ die "Several versions of $library have been found. Please \
+ remove the unused ones."
+ ;;
esac
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-08-29 14:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 14:49 [Buildroot] [PATCH v2 00/23] Update Ejabberd and its dependencies Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 01/23] package/erlang-stun: renamed from erlang-p1-stun Johan Oudinet
2024-09-03 22:47 ` Yann E. MORIN
2024-08-29 14:49 ` [Buildroot] [PATCH v2 02/23] package/erlang-stun: bump version to 1.2.14 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 03/23] package/erlang-fast-xml: renamed from erlang-p1-xml Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 04/23] package/erlang-fast-xml: bump version to 1.1.52 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 05/23] package/erlang-xmpp: renamed from erlang-p1-xmpp Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 06/23] package/erlang-xmpp: bump version to 1.8.3 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 07/23] package/erlang-p1-utils: bump version to 1.0.26 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 08/23] package/erlang-p1-cache-tab: bump version to 1.0.31 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 09/23] package/erlang-p1-tls: bump version to 1.1.21 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 10/23] package/erlang-p1-stringprep: bump version to 1.0.30 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 11/23] package/erlang-fast-yaml: renamed from erlang-p1-yaml Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 12/23] package/erlang-fast-yaml: bump version to 1.0.37 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 13/23] package/erlang-p1-yconf: bump version to 1.0.16 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 14/23] package/erlang-p1-oauth2: bump version to 0.6.14 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 15/23] package/erlang-p1-pkix: bump version to 1.0.10 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 16/23] package/erlang-eimp: bump version to 1.0.23 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 17/23] package/erlang-p1-mqtree: bump version to 1.0.17 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 18/23] package/erlang-jose: bump version to 1.11.10 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 19/23] package/erlang-p1-acme: bump version to 1.0.23 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 20/23] package/erlang-p1-sip: bump version to 1.0.54 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 21/23] package/erlang-p1-zlib: bump version to 1.0.13 Johan Oudinet
2024-08-29 14:49 ` [Buildroot] [PATCH v2 22/23] package/ejabberd: bump version to 24.07 Johan Oudinet
2024-09-03 22:48 ` Yann E. MORIN
2024-08-29 14:49 ` Johan Oudinet [this message]
2024-09-03 22:45 ` [Buildroot] [PATCH v2 00/23] Update Ejabberd and its dependencies Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240829144940.209964-24-johan.oudinet@gmail.com \
--to=johan.oudinet@gmail.com \
--cc=buildroot@buildroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox