[net-nds/389-ds-base] add with maximum rust removed since it builds fine
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
From 28d4871c5844b41d63a5cbc093b4453c98d5427e Mon Sep 17 00:00:00 2001
|
||||
From: Matt Jolly <kangie@gentoo.org>
|
||||
Date: Thu, 7 Nov 2024 20:08:44 +1000
|
||||
Subject: [PATCH] Fix rust in configure
|
||||
|
||||
RUSTC and CARGO are standard variables that are often used to indicate
|
||||
the desired implementation to build systems.
|
||||
|
||||
Prefix existing usage of these variables with `HAS_` so that this
|
||||
does not just break
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -95,10 +95,10 @@ AS_IF([test "$enable_rust_offline" = yes],
|
||||
[rust_vendor_sources=""])
|
||||
AC_SUBST([rust_vendor_sources])
|
||||
if test "$enable_rust_offline" = yes; then
|
||||
- AC_CHECK_PROG(CARGO, [cargo], [yes], [no])
|
||||
- AC_CHECK_PROG(RUSTC, [rustc], [yes], [no])
|
||||
+ AC_CHECK_PROG(HAS_CARGO, [cargo], [yes], [no])
|
||||
+ AC_CHECK_PROG(HAS_RUSTC, [rustc], [yes], [no])
|
||||
|
||||
- AS_IF([test "$CARGO" != "yes" -o "$RUSTC" != "yes"], [
|
||||
+ AS_IF([test "$HAS_CARGO" != "yes" -o "$HAS_RUSTC" != "yes"], [
|
||||
AC_MSG_FAILURE("Rust based plugins cannot be built cargo=$CARGO rustc=$RUSTC")
|
||||
])
|
||||
fi
|
||||
@@ -944,4 +944,3 @@ AC_CONFIG_FILES([Makefile rpm/389-ds-base.spec ])
|
||||
AC_CONFIG_FILES([.cargo/config])
|
||||
|
||||
AC_OUTPUT
|
||||
-
|
||||
--
|
||||
2.47.0
|
||||
|
||||
17
net-nds/389-ds-base/files/389-ds-base-db-gentoo.patch
Normal file
17
net-nds/389-ds-base/files/389-ds-base-db-gentoo.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
diff --git a/m4/db.m4 b/m4/db.m4
|
||||
index c916c2b83..a9dd5ef2b 100644
|
||||
--- a/m4/db.m4
|
||||
+++ b/m4/db.m4
|
||||
@@ -96,9 +96,9 @@ if test -z "$db_inc"; then
|
||||
fi
|
||||
|
||||
dnl figure out which version of db we're using from the header file
|
||||
-db_ver_maj=`grep DB_VERSION_MAJOR $db_incdir/db.h | awk '{print $3}'`
|
||||
-db_ver_min=`grep DB_VERSION_MINOR $db_incdir/db.h | awk '{print $3}'`
|
||||
-db_ver_pat=`grep DB_VERSION_PATCH $db_incdir/db.h | awk '{print $3}'`
|
||||
+db_ver_maj=`gcc -E -fdirectives-only $db_incdir/db.h | grep DB_VERSION_MAJOR | awk '{print $3}'`
|
||||
+db_ver_min=`gcc -E -fdirectives-only $db_incdir/db.h | grep DB_VERSION_MINOR | awk '{print $3}'`
|
||||
+db_ver_pat=`gcc -E -fdirectives-only $db_incdir/db.h | grep DB_VERSION_PATCH | awk '{print $3}'`
|
||||
|
||||
dnl Ensure that we have libdb at least 4.7, older versions aren't supported
|
||||
if test ${db_ver_maj} -lt 4; then
|
||||
3
net-nds/389-ds-base/files/389-ds-base.conf
Normal file
3
net-nds/389-ds-base/files/389-ds-base.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
d /var/log/dirsrv 0700 dirsrv dirsrv -
|
||||
d /var/lib/dirsrv 0700 dirsrv dirsrv -
|
||||
d /run/lock/dirsrv 0770 dirsrv dirsrv -
|
||||
43
net-nds/389-ds-base/files/389-ds-snmp.initd
Normal file
43
net-nds/389-ds-base/files/389-ds-snmp.initd
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
PIDFILE="/run/ldap-agent.pid"
|
||||
CONFIGFILE="/etc/dirsrv/config/ldap-agent.conf"
|
||||
|
||||
# instance support in progress
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use logger snmpd
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting 389 Directory Server ldap-snmp agent"
|
||||
start-stop-daemon --start --quiet -b \
|
||||
--pidfile ${PIDFILE} --exec /usr/sbin/ldap-agent -- ${CONFIGFILE}
|
||||
eend ${?}
|
||||
if [ "${?}" != "0" ]; then
|
||||
local entries=/etc/dirsrv/slapd-*
|
||||
if [ -n "${entries}" ]; then
|
||||
ewarn "Please make sure that ${CONFIGFILE} contains at least"
|
||||
ewarn "one of the following entries:"
|
||||
for entry in ${entries}; do
|
||||
entry=$(basename ${entry})
|
||||
ewarn "server ${entry}"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping 389 Directory Server ldap-snmp agent"
|
||||
start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
|
||||
eend ${?}
|
||||
}
|
||||
|
||||
restart() {
|
||||
svc_stop
|
||||
sleep 2
|
||||
svc_start
|
||||
}
|
||||
89
net-nds/389-ds-base/files/389-ds.initd-r1
Normal file
89
net-nds/389-ds-base/files/389-ds.initd-r1
Normal file
@@ -0,0 +1,89 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
DIRSRV_EXEC="/usr/sbin/ns-slapd"
|
||||
PID_DIRECTORY="/run/dirsrv"
|
||||
LOCK_DIRECTORY="/var/lock/dirsrv"
|
||||
DIRSRV_CONF_DIR="/etc/dirsrv"
|
||||
DS_INSTANCES=${DIRSRV_CONF_DIR}/slapd-*
|
||||
|
||||
depend() {
|
||||
need net logger
|
||||
use dns
|
||||
provide dirsrv ldap
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ -z "${DS_INSTANCES}" ]; then
|
||||
eerror "389 Directory Server has not been configured."
|
||||
eend 1
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig || return 1
|
||||
|
||||
for instance in ${DS_INSTANCES}; do
|
||||
instance=$(basename ${instance})
|
||||
# skip .removed instances, bug #338133
|
||||
if [ "${instance%%.removed}" != "${instance}" ]; then
|
||||
continue
|
||||
fi
|
||||
# Create the required directories in case they got nuked
|
||||
mkdir -p ${PID_DIRECTORY}
|
||||
mkdir -p ${LOCK_DIRECTORY}/${instance}
|
||||
# This will probably break one day, we should be pulling out the suitespotuser from dse.ldif
|
||||
chown dirsrv: ${PID_DIRECTORY}
|
||||
chown dirsrv: ${LOCK_DIRECTORY}/${instance}
|
||||
ebegin "Starting 389 Directory Server: instance ${instance}"
|
||||
start-stop-daemon --start --quiet -m \
|
||||
--pidfile ${PID_DIRECTORY}/${instance}.startpid \
|
||||
--exec ${DIRSRV_EXEC} -- -D ${DIRSRV_CONF_DIR}/${instance} \
|
||||
-i ${PID_DIRECTORY}/${instance}.pid \
|
||||
-w ${PID_DIRECTORY}/${instance}.startpid
|
||||
sts=${?}
|
||||
eend ${sts}
|
||||
if [ "${sts}" != "0" ]; then
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
stop() {
|
||||
checkconfig || return 1
|
||||
|
||||
for instance in ${DS_INSTANCES}; do
|
||||
instance=$(basename ${instance})
|
||||
if [ "${instance%%.removed}" != "${instance}" ]; then
|
||||
continue
|
||||
fi
|
||||
ebegin "Stopping 389 Directory Server: instance ${instance}"
|
||||
start-stop-daemon --stop --quiet \
|
||||
--pidfile ${PID_DIRECTORY}/${instance}.pid \
|
||||
--exec ${DIRSRV_EXEC}
|
||||
eend ${?}
|
||||
done
|
||||
}
|
||||
|
||||
status() {
|
||||
for instance in ${DS_INSTANCES}; do
|
||||
instance=$(basename ${instance})
|
||||
if [ "${instance%%.removed}" != "${instance}" ]; then
|
||||
continue
|
||||
fi
|
||||
if [ -e ${PID_DIRECTORY}/${instance}.pid ]; then
|
||||
pid=$(cat ${PID_DIRECTORY}/${instance}.pid)
|
||||
if [ $(echo "$pid" | grep -c $pid) -ge 1 ]; then
|
||||
einfo "389 Directory Server: instance ${instance} (pid $pid) running."
|
||||
else
|
||||
ewarn "389 Directory Server: instance ${instance} (pid $pid) NOT running."
|
||||
fi
|
||||
else
|
||||
eerror "389 Directory Server: instance ${instance} is NOT running."
|
||||
fi
|
||||
done
|
||||
}
|
||||
10
net-nds/389-ds-base/files/README.gentoo
Normal file
10
net-nds/389-ds-base/files/README.gentoo
Normal file
@@ -0,0 +1,10 @@
|
||||
If you are planning to use 389-ds-snmp (ldap-agent),
|
||||
make sure to properly configure: /etc/dirsrv/config/ldap-agent.conf
|
||||
adding proper 'server' entries, and adding the lines below to
|
||||
=> /etc/snmp/snmpd.conf
|
||||
master agent
|
||||
agentXSocket /var/agentx/master"
|
||||
|
||||
To start 389 Directory Server (LDAP service) at boot:"
|
||||
|
||||
rc-update add 389-ds default"
|
||||
Reference in New Issue
Block a user