1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-06 06:30:19 +00:00

* Fix the path to the dbus socket

* Make sure the messagebus user and group are created, and block out uid/gid
  556 for this
* Delete the dbus.pid file as part of a stop_postcmd (dbus doesn't delete its
  own pid file)
* Clean up some bash'isms in the KDE detection configure code
* Make the strtod() Call more 4.X friendly by not passing hex to it
This commit is contained in:
Joe Marcus Clarke 2004-07-22 05:41:15 +00:00
parent 52e0b64492
commit b1a2cec832
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=114395
6 changed files with 103 additions and 2 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= dbus
PORTVERSION= 0.21
PORTREVISION= 1
CATEGORIES= devel gnome
MASTER_SITES= http://freedesktop.org/Software/dbus/releases/
@ -26,7 +27,7 @@ CONFIGURE_ARGS= --enable-gtk \
--disable-gcj \
--disable-mono \
--with-system-pid-file=/var/run/dbus.pid \
--with-system-socket=/var/run \
--with-system-socket=/var/run/dbus \
--with-session-socket-dir=/var/tmp \
--disable-doxygen-docs \
--disable-xml-docs
@ -56,6 +57,9 @@ post-patch:
${FILESDIR}/dbus.sh > ${WRKSRC}/dbus.sh
post-install:
.if !defined(PACKAGE_BUILDING)
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.endif
${INSTALL_SCRIPT} ${WRKSRC}/dbus.sh ${PREFIX}/etc/rc.d
.include <bsd.port.post.mk>

View File

@ -19,6 +19,13 @@ rcvar=`set_rcvar`
command="%%PREFIX%%/bin/dbus-daemon-1"
pidfile="/var/run/${name}.pid"
stop_postcmd=stop_postcmd
stop_postcmd()
{
rm -f $pidfile
}
[ -z "$dbus_enable" ] && dbus_enable="NO"
[ -z "$dbus_flags" ] && dbus_flags="--system"

View File

@ -19,6 +19,13 @@ rcvar=`set_rcvar`
command="%%PREFIX%%/bin/dbus-daemon-1"
pidfile="/var/run/${name}.pid"
stop_postcmd=stop_postcmd
stop_postcmd()
{
rm -f $pidfile
}
[ -z "$dbus_enable" ] && dbus_enable="NO"
[ -z "$dbus_flags" ] && dbus_flags="--system"

View File

@ -0,0 +1,20 @@
--- configure.orig Thu Jul 22 01:12:36 2004
+++ configure Thu Jul 22 01:13:22 2004
@@ -24198,14 +24198,14 @@
echo "${ECHO_T}not found" >&6
fi
-if (! kde-config >& /dev/null); then
+if (! kde-config > /dev/null 2>&1); then
have_qt=no
else
kdelibs=`kde-config --install lib --expandvars 2>/dev/null`
- if test -z $kdelibs -o ! -f $kdelibs/libkdecore.la; then
+ if test -z $kdelibs -o ! -f $kdelibs/libkdecore.so; then
have_qt=no
else
- DBUS_QT_LIBS="$kdelibs/libkdecore.la"
+ DBUS_QT_LIBS="$kdelibs/libkdecore.so"
fi
fi

View File

@ -1,5 +1,5 @@
--- dbus/dbus-sysdeps.c.orig Wed Mar 17 17:08:09 2004
+++ dbus/dbus-sysdeps.c Tue Jun 22 15:41:42 2004
+++ dbus/dbus-sysdeps.c Thu Jul 22 01:25:51 2004
@@ -740,12 +740,38 @@
{
int bytes_written;
@ -49,3 +49,30 @@
_dbus_verbose ("Message from recvmsg() was not SCM_CREDS\n");
return FALSE;
}
@@ -3421,21 +3448,21 @@
exit (1);
}
- _dbus_string_init_const (&str, "0xff");
+ _dbus_string_init_const (&str, "255");
if (!_dbus_string_parse_double (&str,
0, &val, &pos))
{
_dbus_warn ("Failed to parse double");
exit (1);
}
- if (val != 0xff)
+ if (val != 255)
{
- _dbus_warn ("Failed to parse 0xff correctly, got: %f", val);
+ _dbus_warn ("Failed to parse 255 correctly, got: %f", val);
exit (1);
}
- if (pos != 4)
+ if (pos != 3)
{
- _dbus_warn ("_dbus_string_parse_double of \"0xff\" returned wrong position %d", pos);
+ _dbus_warn ("_dbus_string_parse_double of \"255\" returned wrong position %d", pos);
exit (1);
}

36
devel/dbus/pkg-install Normal file
View File

@ -0,0 +1,36 @@
#!/bin/sh
case $2 in
POST-INSTALL)
USER=messagebus
GROUP=${USER}
UID=556
GID=${UID}
PW=/usr/sbin/pw
if ${PW} group show "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
if ${PW} groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
fi
if ${PW} user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
else
if ${PW} useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d "/nonexistent" -s /sbin/nologin -c "D-BUS Daemon User"
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
exit 0
;;
esac