From 5ab433863a1a492992b728374526434bb55d02bf Mon Sep 17 00:00:00 2001 From: Zac Bentley Date: Fri, 11 Mar 2016 17:14:52 -0500 Subject: [PATCH] Issue 94494; exclude deprecated options from launchd plist on new OSX versions --- bus/org.freedesktop.dbus-session.plist.in | 9 +----- configure.ac | 50 +++++++++++++++++++++++-------- 2 files changed, 39 insertions(+), 20 deletions(-) mode change 100644 => 100755 configure.ac diff --git a/bus/org.freedesktop.dbus-session.plist.in b/bus/org.freedesktop.dbus-session.plist.in index 40ff370..3501440 100644 --- a/bus/org.freedesktop.dbus-session.plist.in +++ b/bus/org.freedesktop.dbus-session.plist.in @@ -5,14 +5,7 @@ Label org.freedesktop.dbus-session - ServiceIPC - - - - + @DBUS_PLIST_SUBST@ ProgramArguments diff --git a/configure.ac b/configure.ac old mode 100644 new mode 100755 index 1d08030..8ac4865 --- a/configure.ac +++ b/configure.ac @@ -74,6 +74,7 @@ AC_PROG_MKDIR_P COMPILER_COVERAGE COMPILER_OPTIMISATIONS PKG_PROG_PKG_CONFIG +AC_PROG_SED # TAP test driver support AC_PROG_AWK @@ -1497,23 +1498,48 @@ AS_AC_EXPAND(EXPANDED_LIBEXECDIR, "$libexecdir") AS_AC_EXPAND(EXPANDED_DATADIR, "$datadir") #### Check our operating system -operating_system=unknown -if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then - operating_system=redhat -fi -if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then - operating_system=slackware -fi -if test -f /usr/bin/cygwin1.dll || test -f $EXPANDED_BINDIR/cygwin1.dll ; then - operating_system=cygwin -fi +OS_FAMILY=$host_os +OS_TYPE=unknown +OS_VERSION=unknown +case $OS_FAMILY in + darwin*) + # The sw_vers utility on OSX can be used to get release information: + AC_PATH_PROG([SW_VERS], [sw_vers]) + if test -n $sw_vers ; then + OS_TYPE=$($SW_VERS | $SED -n 's/^ProductName:[[:space:]]*//p') + OS_VERSION=$($SW_VERS | $SED -n 's/^ProductVersion:[[:space:]]*//p') + fi + AS_VERSION_COMPARE($OS_VERSION,"10.11.0",[DBUS_PLIST_SUBST=$(echo "ServiceIPCOnDemand")]) + ;; + linux*) + if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then + OS_TYPE=redhat + elif test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then + OS_TYPE=slackware + fi + # os-release is an attempt at canonicalization. See: https://www.freedesktop.org/software/systemd/man/os-release.html + if test -f /etc/os-release ; then + OS_VERSION=$($SED -n 's/^VERSION_ID="\(.*\)"[[:space:]]*$/\1/p' /etc/os-release) + elif test -f /usr/lib/os-release ; then + OS_VERSION=$($SED -n 's/^VERSION_ID="\(.*\)"[[:space:]]*$/\1/p' /usr/lib/os-release) + elif test -f $EXPANDED_SYSCONFDIR/os-release ; then + OS_VERSION=$($SED -n 's/^VERSION_ID="\(.*\)"[[:space:]]*$/\1/p' $EXPANDED_SYSCONFDIR/os-release) + fi + ;; + *) + if test -f /usr/bin/cygwin1.dll || test -f $EXPANDED_BINDIR/cygwin1.dll ; then + OS_TYPE=cygwin + fi + ;; +esac -#### Sort out init scripts +AC_SUBST(DBUS_PLIST_SUBST) +#### Sort out init scripts if test x$with_init_scripts = x; then - case x$operating_system in + case x$OS_TYPE in xredhat) with_init_scripts=redhat ;; xslackware) with_init_scripts=slackware ;; xcygwin) with_init_scripts=cygwin ;; -- 2.5.4 (Apple Git-61)