pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/quagga Backport an Illumos patch to fix the minimu...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/61c257c6e942
branches:  trunk
changeset: 645248:61c257c6e942
user:      fhajny <fhajny%pkgsrc.org@localhost>
date:      Sun Jan 25 22:14:05 2015 +0000

description:
Backport an Illumos patch to fix the minimum privilege model, fixes quagga
on SunOS. Add SMF manifest and method.
Bump PKGREVISION.

diffstat:

 net/quagga/Makefile                             |   11 +-
 net/quagga/distinfo                             |    4 +-
 net/quagga/files/smf/manifest.xml               |  454 ++++++++++++++++++++++++
 net/quagga/patches/patch-lib_privs.c            |  162 ++++++++
 net/quagga/patches/patch-solaris_quagga.init.in |   38 ++
 5 files changed, 667 insertions(+), 2 deletions(-)

diffs (truncated from 708 to 300 lines):

diff -r d89772fa72bd -r 61c257c6e942 net/quagga/Makefile
--- a/net/quagga/Makefile       Sun Jan 25 21:40:21 2015 +0000
+++ b/net/quagga/Makefile       Sun Jan 25 22:14:05 2015 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.48 2014/12/02 20:22:14 gdt Exp $
+# $NetBSD: Makefile,v 1.49 2015/01/25 22:14:05 fhajny Exp $
 #
 
 DISTNAME=      quagga-0.99.23.1
+PKGREVISION=   1
 CATEGORIES=    net
 MASTER_SITES=  http://download.savannah.gnu.org/releases/quagga/
 
@@ -42,6 +43,14 @@
 
 .include "options.mk"
 
+.if ${INIT_SYSTEM} == "smf"
+BUILD_DIRS=            . solaris
+SMF_INSTANCES=         bgp ospf ospf6 rip ripng zebra
+SMF_METHODS=           quagga
+SMF_METHOD_SRC.quagga= ${WRKSRC}/solaris/quagga.init
+FILES_SUBST+=          PKG_SMF_METHOD_DIR=${PKG_SMF_METHOD_DIR}
+.endif
+
 PLIST_CAT+=            ${PKGDIR}/PLIST
 
 LIBS+=                 ${LDFLAGS}
diff -r d89772fa72bd -r 61c257c6e942 net/quagga/distinfo
--- a/net/quagga/distinfo       Sun Jan 25 21:40:21 2015 +0000
+++ b/net/quagga/distinfo       Sun Jan 25 22:14:05 2015 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.20 2014/12/02 20:22:14 gdt Exp $
+$NetBSD: distinfo,v 1.21 2015/01/25 22:14:05 fhajny Exp $
 
 SHA1 (quagga-0.99.23.1.tar.gz) = 0501f527383cfa548a800de9816cf1423f6b2336
 RMD160 (quagga-0.99.23.1.tar.gz) = 6102fdf118cf31de8155dfcaffee91207ff56164
 Size (quagga-0.99.23.1.tar.gz) = 2526612 bytes
 SHA1 (patch-configure) = a58a698ba9b8a174c3623a9cd4b52518e410c0df
+SHA1 (patch-lib_privs.c) = d86ec56c9f57f38af6cce5285fb95759efc7c8e9
+SHA1 (patch-solaris_quagga.init.in) = 85c63089ecc0852f737f3be347d0ad90093d844f
 SHA1 (patch-zebra-kernel_socket.c) = d9a2f3a301d4ac8392c246a2661859657a6dca5e
diff -r d89772fa72bd -r 61c257c6e942 net/quagga/files/smf/manifest.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/quagga/files/smf/manifest.xml Sun Jan 25 22:14:05 2015 +0000
@@ -0,0 +1,454 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type='manifest' name='SUNWquagga-daemons:quagga'>
+  <service name='@SMF_PREFIX@/quagga' type='service' version='1'>
+    <instance name='zebra' enabled='false'>
+      <dependency name='fs' grouping='require_all' restart_on='none' type='service'>
+        <service_fmri value='svc:/system/filesystem/usr:default' />
+      </dependency>
+      <dependency name='net' grouping='require_all' restart_on='none' type='service'>
+        <service_fmri value='svc:/network/initial' />
+      </dependency>
+      <!-- do not not run unless routing-setup has run -->
+      <dependency name='network_routing_setup' grouping='require_all' restart_on='refresh' type='service'>
+        <service_fmri value='svc:/network/routing-setup' />
+      </dependency>
+      <exec_method type='method' name='start' exec='@PREFIX@/@PKG_SMF_METHOD_DIR@/quagga zebra' timeout_seconds='60'>
+        <method_context>
+          <method_credential user='root' group='root' />
+        </method_context>
+      </exec_method>
+      <exec_method type='method' name='stop' exec=':kill' timeout_seconds='60'></exec_method>
+      <!--    if we define these properties at the service level, each
+                instance inherits them, and it can override with
+                desired values.
+        -->
+      <property_group name='startd' type='framework'>
+        <!-- sub-process core dumps shouldn't restart session -->
+        <propval name='ignore_error' type='astring' value='core,signal' />
+      </property_group>
+      <!-- Properties in this group are used by routeadm (1M) -->
+      <property_group name='routeadm' type='application'>
+        <stability value='Unstable' />
+        <!-- Identifies service as a routing service -->
+        <propval name='daemon' type='astring' value='@PREFIX@/sbin/zebra' />
+        <propval name='value_authorization' type='astring' value='solaris.smf.value.routing' />
+        <!-- zebra should not contribute to ipv4/ipv6 routing state -->
+        <propval name='protocol' type='astring' value='zebra' />
+      </property_group>
+      <!-- Properties in this group are modifiable via routeadm (1M) -->
+      <property_group name='routing' type='application'>
+        <stability value='Evolving' />
+        <propval name='value_authorization' type='astring' value='solaris.smf.value.routing' />
+        <!-- Options common to Quagga daemons
+                     Property names are equivalent to the long
+                     option name, consult Quagga documentation -->
+        <!-- The config file to use, if not the default -->
+        <propval name='config_file' type='astring' value='' />
+        <!-- The vty_port to listen on if not the default.
+                     0 to disable -->
+        <propval name='vty_port' type='integer' value='0' />
+        <!-- The address to bind the VTY interface to, if not any. -->
+        <propval name='vty_address' type='astring' value='' />
+        <!-- The user to switch to after startup, if not the default -->
+        <propval name='user' type='astring' value='' />
+        <!-- The group to switch to, if not the default.
+                     If user is specified, this defaults to a group with
+                     same name as user -->
+        <propval name='group' type='astring' value='' />
+        <!-- The pidfile to use, if not the default of
+                     /var/run/zebra -->
+        <propval name='pid_file' type='astring' value='' />
+        <!-- Options specific to zebra -->
+        <propval name='batch' type='boolean' value='false' />
+      </property_group>
+      <property_group name='general' type='framework'>
+        <!-- to start stop routing services -->
+        <propval name='action_authorization' type='astring' value='solaris.smf.manage.routing' />
+        <propval name='value_authorization' type='astring' value='solaris.smf.manage.routing' />
+      </property_group>
+      <template>
+        <common_name>
+          <loctext xml:lang='C'>Quagga: zebra, RIB, kernel intermediary and misc daemon</loctext>
+        </common_name>
+        <documentation>
+          <manpage title='zebra' section='1M' manpath='@PREFIX@/man' />
+          <doc_link name='quagga.net' uri='http://www.quagga.net/' />
+        </documentation>
+      </template>
+    </instance>
+    <instance name='rip' enabled='false'>
+      <dependency name='fs' grouping='require_all' restart_on='none' type='service'>
+        <service_fmri value='svc:/system/filesystem/usr:default' />
+      </dependency>
+      <dependency name='ipv4-forwarding' grouping='optional_all' restart_on='refresh' type='service'>
+        <service_fmri value='svc:/network/ipv4-forwarding' />
+      </dependency>
+      <!-- do not not run unless routing-setup has run -->
+      <dependency name='network_routing_setup' grouping='require_all' restart_on='refresh' type='service'>
+        <service_fmri value='svc:/network/routing-setup' />
+      </dependency>
+      <!-- ensure that restart of zebra is propogated to daemon -->
+      <dependency name='zebra' grouping='optional_all' restart_on='restart' type='service'>
+        <service_fmri value='svc:/@SMF_PREFIX@/quagga:zebra' />
+      </dependency>
+      <exec_method type='method' name='start' exec='@PREFIX@/@PKG_SMF_METHOD_DIR@/quagga ripd' timeout_seconds='60'>
+        <method_context>
+          <method_credential user='root' group='root' />
+        </method_context>
+      </exec_method>
+      <exec_method type='method' name='stop' exec=':kill' timeout_seconds='60'></exec_method>
+      <property_group name='startd' type='framework'>
+        <!-- sub-process core dumps shouldn't restart session -->
+        <propval name='ignore_error' type='astring' value='core,signal' />
+      </property_group>
+      <!-- Properties in this group are used by routeadm (1M) -->
+      <property_group name='routeadm' type='application'>
+        <stability value='Unstable' />
+        <!-- Identifies service as a routing service -->
+        <propval name='daemon' type='astring' value='@PREFIX@/sbin/ripd' />
+        <propval name='legacy-daemon' type='astring' value='/usr/sfw/sbin/ripdstart' />
+        <propval name='value_authorization' type='astring' value='solaris.smf.value.routing' />
+        <propval name='protocol' type='astring' value='ipv4' />
+      </property_group>
+      <!-- Properties in this group are modifiable via routeadm (1M) -->
+      <property_group name='routing' type='application'>
+        <propval name='value_authorization' type='astring' value='solaris.smf.value.routing' />
+        <!-- Options common to Quagga daemons -->
+        <!-- The config file to use, if not the default -->
+        <propval name='config_file' type='astring' value='' />
+        <!-- The vty_port to listen on if not the default.
+                     0 to disable -->
+        <propval name='vty_port' type='integer' value='0' />
+        <!-- The address to bind the VTY interface to, if not any. -->
+        <propval name='vty_address' type='astring' value='' />
+        <!-- The user to switch to after startup, if not the default -->
+        <propval name='user' type='astring' value='' />
+        <!-- The group to switch to, if not the default.
+                     If user is specified, this defaults to a group with
+                     same name as user -->
+        <propval name='group' type='astring' value='' />
+        <!-- The pidfile to use, if not the default of
+                     /var/run/zebra -->
+        <propval name='pid_file' type='astring' value='' />
+        <!-- Options specific to ripd -->
+        <propval name='retain' type='boolean' value='false' />
+      </property_group>
+      <property_group name='general' type='framework'>
+        <!-- to start stop routing services -->
+        <propval name='action_authorization' type='astring' value='solaris.smf.manage.routing' />
+        <propval name='value_authorization' type='astring' value='solaris.smf.manage.routing' />
+      </property_group>
+      <template>
+        <common_name>
+          <loctext xml:lang='C'>Quagga: ripd, RIPv1/2 IPv4 routing protocol daemon.</loctext>
+        </common_name>
+        <documentation>
+          <manpage title='ripd' section='1M' manpath='@PREFIX@/man' />
+          <doc_link name='quagga.net' uri='http://www.quagga.net/' />
+        </documentation>
+      </template>
+    </instance>
+    <instance name='ripng' enabled='false'>
+      <dependency name='fs' grouping='require_all' restart_on='none' type='service'>
+        <service_fmri value='svc:/system/filesystem/usr:default' />
+      </dependency>
+      <dependency name='ipv6-forwarding' grouping='optional_all' restart_on='refresh' type='service'>
+        <service_fmri value='svc:/network/ipv6-forwarding' />
+      </dependency>
+      <!-- do not not run unless routing-setup has run -->
+      <dependency name='network_routing_setup' grouping='require_all' restart_on='refresh' type='service'>
+        <service_fmri value='svc:/network/routing-setup' />
+      </dependency>
+      <!-- ensure that restart of zebra is propogated to daemon -->
+      <dependency name='zebra' grouping='optional_all' restart_on='restart' type='service'>
+        <service_fmri value='svc:/@SMF_PREFIX@/quagga:zebra' />
+      </dependency>
+      <exec_method type='method' name='start' exec='@PREFIX@/@PKG_SMF_METHOD_DIR@/quagga ripngd' timeout_seconds='60'>
+        <method_context>
+          <method_credential user='root' group='root' />
+        </method_context>
+      </exec_method>
+      <exec_method type='method' name='stop' exec=':kill' timeout_seconds='60'></exec_method>
+      <property_group name='startd' type='framework'>
+        <!-- sub-process core dumps shouldn't restart session -->
+        <propval name='ignore_error' type='astring' value='core,signal' />
+      </property_group>
+      <!-- Properties in this group are used by routeadm (1M) -->
+      <property_group name='routeadm' type='application'>
+        <stability value='Unstable' />
+        <!-- Identifies service as a routing service -->
+        <propval name='daemon' type='astring' value='@PREFIX@/sbin/ripngd' />
+        <propval name='value_authorization' type='astring' value='solaris.smf.value.routing' />
+        <propval name='protocol' type='astring' value='ipv6' />
+      </property_group>
+      <!-- Properties in this group are modifiable via routeadm (1M) -->
+      <property_group name='routing' type='application'>
+        <propval name='value_authorization' type='astring' value='solaris.smf.value.routing' />
+        <!-- Options common to Quagga daemons -->
+        <!-- The config file to use, if not the default -->
+        <propval name='config_file' type='astring' value='' />
+        <!-- The vty_port to listen on if not the default.
+                     0 to disable -->
+        <propval name='vty_port' type='integer' value='0' />
+        <!-- The address to bind the VTY interface to, if not any. -->
+        <propval name='vty_address' type='astring' value='' />
+        <!-- The user to switch to after startup, if not the default -->
+        <propval name='user' type='astring' value='' />
+        <!-- The group to switch to, if not the default.
+                     If user is specified, this defaults to a group with
+                     same name as user -->
+        <propval name='group' type='astring' value='' />
+        <!-- The pidfile to use, if not the default of
+                     /var/run/zebra -->
+        <propval name='pid_file' type='astring' value='' />
+        <!-- Options specific to ripngd -->
+        <propval name='retain' type='boolean' value='false' />
+      </property_group>
+      <property_group name='general' type='framework'>
+        <!-- to start stop routing services -->
+        <propval name='action_authorization' type='astring' value='solaris.smf.manage.routing' />
+        <propval name='value_authorization' type='astring' value='solaris.smf.manage.routing' />
+      </property_group>
+      <template>
+        <common_name>
+          <loctext xml:lang='C'>Quagga: ripngd, RIPng IPv6 routing protocol daemon.</loctext>
+        </common_name>
+        <documentation>
+          <manpage title='ripngd' section='1M' manpath='@PREFIX@/man' />
+          <doc_link name='quagga.net' uri='http://www.quagga.net/' />
+        </documentation>
+      </template>
+    </instance>
+    <instance name='ospf' enabled='false'>
+      <dependency name='fs' grouping='require_all' restart_on='none' type='service'>
+        <service_fmri value='svc:/system/filesystem/usr:default' />
+      </dependency>
+      <dependency name='ipv4-forwarding' grouping='optional_all' restart_on='refresh' type='service'>
+        <service_fmri value='svc:/network/ipv4-forwarding' />
+      </dependency>
+      <!-- do not not run unless routing-setup has run -->
+      <dependency name='network_routing_setup' grouping='require_all' restart_on='refresh' type='service'>
+        <service_fmri value='svc:/network/routing-setup' />
+      </dependency>
+      <!-- ensure that restart of zebra is propogated to daemon -->
+      <dependency name='zebra' grouping='optional_all' restart_on='restart' type='service'>
+        <service_fmri value='svc:/@SMF_PREFIX@/quagga:zebra' />
+      </dependency>
+      <exec_method type='method' name='start' exec='@PREFIX@/@PKG_SMF_METHOD_DIR@/quagga ospfd' timeout_seconds='60'>
+        <method_context>
+          <method_credential user='root' group='root' />
+        </method_context>
+      </exec_method>
+      <!-- ospfd can take a long time to shutdown, due to graceful 
+             shutdown 
+         -->
+      <exec_method type='method' name='stop' exec=':kill' timeout_seconds='600'></exec_method>
+      <property_group name='startd' type='framework'>
+        <!-- sub-process core dumps shouldn't restart session -->
+        <propval name='ignore_error' type='astring' value='core,signal' />
+      </property_group>
+      <!-- Properties in this group are used by routeadm (1M) -->
+      <property_group name='routeadm' type='application'>
+        <stability value='Unstable' />
+        <!-- Identifies service as a routing service -->



Home | Main Index | Thread Index | Old Index