initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
@@ -0,0 +1,35 @@
From cb583beba1acba55112fbb4636c1c73d9ae691a0 Mon Sep 17 00:00:00 2001
From: Johan Oudinet <johan.oudinet@gmail.com>
Date: Fri, 20 Nov 2020 00:33:30 +0100
Subject: [PATCH] Makefile.in: do not download or compile dependencies
Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
Makefile.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index abd64835..06f876bb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -97,7 +97,7 @@ ifneq ($(INSTALLGROUP),)
G_USER=-g $(INSTALLGROUP)
endif
-all: deps src
+all: src
deps: deps/.got
@@ -111,7 +111,7 @@ deps/.built: deps/.got
$(REBAR) configure-deps
$(REBAR) compile && :> deps/.built
-src: deps/.built
+src:
$(REBAR) skip_deps=true compile
update:
--
2.29.2
@@ -0,0 +1,28 @@
From 4283f675f21d3923e200092cec6418014a03ad52 Mon Sep 17 00:00:00 2001
From: Johan Oudinet <johan.oudinet@gmail.com>
Date: Thu, 26 Dec 2019 17:06:34 +0100
Subject: [PATCH] fix ejabberdctl
Change default values so ejabberdctl run commands as ejabberd user.
Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
ejabberdctl.template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ejabberdctl.template b/ejabberdctl.template
index a940c3df7..5166e5a27 100755
--- a/ejabberdctl.template
+++ b/ejabberdctl.template
@@ -15,7 +15,7 @@ SCRIPT_DIR=$(cd "${0%/*}" && pwd)
ERL="{{erl}}"
IEX="{{bindir}}/iex"
EPMD="{{epmd}}"
-INSTALLUSER="{{installuser}}"
+INSTALLUSER=ejabberd
# check the proper system user is used
case $(id -un) in
--
2.20.1
+35
View File
@@ -0,0 +1,35 @@
config BR2_PACKAGE_EJABBERD
bool "ejabberd"
depends on BR2_PACKAGE_ERLANG
depends on BR2_INSTALL_LIBSTDCPP # jiffy, stringprep
select BR2_PACKAGE_ERLANG_EIMP
select BR2_PACKAGE_ERLANG_IDNA # runtime
select BR2_PACKAGE_ERLANG_JIFFY # runtime
select BR2_PACKAGE_ERLANG_JOSE # runtime
select BR2_PACKAGE_ERLANG_LAGER
select BR2_PACKAGE_ERLANG_P1_ACME # runtime
select BR2_PACKAGE_ERLANG_P1_CACHE_TAB
select BR2_PACKAGE_ERLANG_P1_MQTREE # runtime
select BR2_PACKAGE_ERLANG_P1_OAUTH2 # runtime
select BR2_PACKAGE_ERLANG_P1_PKIX # runtime
select BR2_PACKAGE_ERLANG_P1_SIP
select BR2_PACKAGE_ERLANG_P1_STRINGPREP
select BR2_PACKAGE_ERLANG_P1_STUN
select BR2_PACKAGE_ERLANG_P1_TLS
select BR2_PACKAGE_ERLANG_P1_UTILS
select BR2_PACKAGE_ERLANG_P1_XML
select BR2_PACKAGE_ERLANG_P1_XMPP
select BR2_PACKAGE_ERLANG_P1_YAML
select BR2_PACKAGE_ERLANG_P1_YCONF # runtime
select BR2_PACKAGE_ERLANG_P1_ZLIB
select BR2_PACKAGE_GETENT
select BR2_PACKAGE_OPENSSL
help
Ejabberd is a Jabber/XMPP instant messaging server, written
in Erlang/OTP. Among other features, ejabberd is
cross-platform, fault-tolerant, clusterable and modular.
http://www.ejabberd.im
comment "ejabberd needs erlang, toolchain w/ C++"
depends on !BR2_PACKAGE_ERLANG || !BR2_INSTALL_LIBSTDCPP
+54
View File
@@ -0,0 +1,54 @@
#!/bin/sh
#
# Start/stop ejabberd
#
CTL=/usr/sbin/ejabberdctl
DEFAULT=/etc/ejabberd/ejabberdctl.cfg
INSTALLUSER=ejabberd
RUNDIR=/var/run/ejabberd
# Read default configuration file if present.
[ -r "$DEFAULT" ] && . "$DEFAULT"
# Create RUNDIR.
mkrundir() {
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
esac
+55
View File
@@ -0,0 +1,55 @@
#!/bin/sh -e
# Helper to bypass AC_ERLANG_CHECK_LIB
#
# Ejabberd releases do not download specific versions of its erlang
# dependencies. Instead, it clones the master branch of a git
# repository and asks erl to provide the library version. However,
# the target erl program cannot be called from the host. So, this
# script aims at finding the library version installed on the target,
# without calling erlang.
usage() {
cat <<EOF
Usage:
$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,
relative to TARGET_DIR. Otherwise, it returns "not found".
If there are several versions, it returns an error because it does not
know which one Erlang uses.
EOF
}
die () {
echo "$@" >&2
exit 1
}
if [ $# -ne 1 ]; then
usage
exit 0
else
library="$1"
fi
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."
;;
esac
+3
View File
@@ -0,0 +1,3 @@
# Locally computed
sha256 9e922b938458ae9d72d4e5fdd2d08a1fbad651aae47c9a9d15b79d0bbd1e11f8 ejabberd-20.07.tgz
sha256 469bb8cfa3ef22c102875ff31932450c075e6908ff3f7d36893485c0c30898eb COPYING
+67
View File
@@ -0,0 +1,67 @@
################################################################################
#
# ejabberd
#
################################################################################
EJABBERD_VERSION = 20.07
EJABBERD_SOURCE = ejabberd-$(EJABBERD_VERSION).tgz
EJABBERD_SITE = https://static.process-one.net/ejabberd/downloads/$(EJABBERD_VERSION)
EJABBERD_LICENSE = GPL-2.0+ with OpenSSL exception
EJABBERD_LICENSE_FILES = COPYING
EJABBERD_CPE_ID_VENDOR = process-one
EJABBERD_DEPENDENCIES = getent openssl erlang-eimp host-erlang-lager \
erlang-lager erlang-p1-cache-tab erlang-p1-sip \
erlang-p1-stringprep erlang-p1-stun erlang-p1-tls \
erlang-p1-utils erlang-p1-xml erlang-p1-xmpp erlang-p1-yaml \
erlang-p1-zlib host-erlang-p1-utils host-erlang-p1-xmpp
# 0001-remove-make-targets-for-deps.patch updates Makefile.in
EJABBERD_USE_AUTOCONF = YES
EJABBERD_AUTORECONF = YES
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
EJABBERD_DEPENDENCIES += linux-pam
endif
EJABBERD_ERLANG_LIBS = sasl public_key mnesia inets compiler
# Guess answers for these tests, configure will bail out otherwise
# saying error: cannot run test program while cross compiling.
EJABBERD_CHECK_LIB = $(TOPDIR)/$(EJABBERD_PKGDIR)/check-erlang-lib
EJABBERD_CONF_ENV = \
ac_cv_erlang_root_dir="$(HOST_DIR)/lib/erlang" \
$(foreach lib,$(EJABBERD_ERLANG_LIBS), \
ac_cv_erlang_lib_dir_$(lib)="`$(EJABBERD_CHECK_LIB) $(lib)`")
EJABBERD_CONF_OPTS = \
--enable-system-deps \
--disable-erlang-version-check
define EJABBERD_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) install -C $(@D)
endef
# Replace HOST_DIR prefix to /usr in environment variables of
# ejabberctl script.
define EJABBERD_FIX_EJABBERDCTL
$(SED) 's,="$(HOST_DIR),="/usr,' '$(TARGET_DIR)/usr/sbin/ejabberdctl'
endef
EJABBERD_POST_INSTALL_TARGET_HOOKS += EJABBERD_FIX_EJABBERDCTL
define EJABBERD_USERS
ejabberd -1 ejabberd -1 * /var/lib/ejabberd /bin/sh - ejabberd daemon
endef
define EJABBERD_PERMISSIONS
/etc/ejabberd r 750 root ejabberd - - - - -
/usr/sbin/ejabberdctl f 750 root ejabberd - - - - -
endef
define EJABBERD_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/ejabberd/S50ejabberd \
$(TARGET_DIR)/etc/init.d/S50ejabberd
endef
$(eval $(rebar-package))