]> git.proxmox.com Git - mirror_frr.git/blobdiff - redhat/frr.spec.in
redhat: Fix fallout from PR722 (accidently disabled PIMd on non-Redhat systems)
[mirror_frr.git] / redhat / frr.spec.in
index 6d94b5a5cc1336fc6712995f948918514f13d009..8c555a3c421f0919f4fe7675abd0ec6a8d607329 100644 (file)
@@ -8,35 +8,34 @@
 # rpms again and again on the same day, so the newer rpms can be installed.
 # bumping the number each time.
 
-####################### FRRouting (FRR) configure options #########################
+#################### FRRouting (FRR) configure options #####################
 # with-feature options
-%{!?with_tcp_zebra:            %global with_tcp_zebra          0 }
-%{!?with_pam:                  %global with_pam                0 }
-%{!?with_ospfclient:           %global with_ospfclient         1 }
-%{!?with_ospfapi:              %global with_ospfapi            1 }
-%{!?with_irdp:                 %global with_irdp               1 }
-%{!?with_rtadv:                        %global with_rtadv              1 }
-%{!?with_mpls:                 %global with_mpls               0 }
-%{!?with_ldpd:                 %global with_ldpd               0 }
-%{!?with_shared:               %global with_shared             1 }
-%{!?with_multipath:            %global with_multipath          256 }
-%{!?frr_user:          %global frr_user                frr }
-%{!?vty_group:                 %global vty_group               frrvty }
-%{!?with_fpm:                  %global with_fpm                0 }
-%{!?with_watchfrr:             %global with_watchfrr   1 }
-%{!?with_bgp_vnc:              %global with_bgp_vnc            0 }
+%{!?with_tcp_zebra:     %global  with_tcp_zebra     0 }
+%{!?with_pam:           %global  with_pam           0 }
+%{!?with_ospfclient:    %global  with_ospfclient    1 }
+%{!?with_ospfapi:       %global  with_ospfapi       1 }
+%{!?with_irdp:          %global  with_irdp          1 }
+%{!?with_rtadv:         %global  with_rtadv         1 }
+%{!?with_ldpd:          %global  with_ldpd          1 }
+%{!?with_shared:        %global  with_shared        1 }
+%{!?with_multipath:     %global  with_multipath     256 }
+%{!?frr_user:           %global  frr_user           frr }
+%{!?vty_group:          %global  vty_group          frrvty }
+%{!?with_fpm:           %global  with_fpm           0 }
+%{!?with_watchfrr:      %global  with_watchfrr      1 }
+%{!?with_bgp_vnc:       %global  with_bgp_vnc       0 }
+%{!?with_pimd:          %global  with_pimd          1 }
 
 # path defines
-%define                _sysconfdir     /etc/frr
-%define         _sbindir        /usr/lib/frr
-%define                zeb_src         %{_builddir}/%{name}-%{frrversion}
-%define                zeb_rh_src      %{zeb_src}/redhat
-%define                zeb_docs        %{zeb_src}/doc
-%define         frr_tools    %{zeb_src}/tools
-%define         cumulus_dir     %{zeb_src}/cumulus/etc
+%define     _sysconfdir   /etc/frr
+%define     _sbindir      /usr/lib/frr
+%define     zeb_src       %{_builddir}/%{name}-%{frrversion}
+%define     zeb_rh_src    %{zeb_src}/redhat
+%define     zeb_docs      %{zeb_src}/doc
+%define     frr_tools     %{zeb_src}/tools
 
 # defines for configure
-%define                _localstatedir  /var/run/frr
+%define     _localstatedir  /var/run/frr
 ############################################################################
 
 #### Version String tweak
 %{expand: %%global rpmversion %(echo '@VERSION@' | tr [:blank:]- _ )}
 %define         frrversion   @VERSION@
 
-#### Check version of texi2html 
-# Old versions don't support "--number-footnotes" option.
-%{expand: %%global texi2htmlversion %(/usr/bin/texi2html --version | cut -d. -f1)}
-
 #### Check for systemd or init.d (upstart)
 # Check for init.d (upstart) as used in CentOS 6 or systemd (ie CentOS 7)
-%{expand: %%global initsystem %(if [[ `/sbin/init --version 2> /dev/null` =~ upstart ]]; then echo upstart; elif [[ `systemctl` =~ -\.mount ]]; then echo systemd; fi)}
+%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210
+    %global initsystem systemd
+%else
+%if (0%{?fedora} && 0%{?fedora} < 15) || (0%{?rhel} && 0%{?rhel} < 7)
+    %global initsystem upstart
+%else
+    %{expand: %%global initsystem %(if [[ `/sbin/init --version 2> /dev/null` =~ upstart ]]; then echo upstart; elif [[ `readlink -f /sbin/init` = /usr/lib/systemd/systemd ]]; then echo systemd; elif [[ `systemctl` =~ -\.mount ]]; then echo systemd; fi)}
+%endif
+%endif
 #
 # If init system is systemd, then always disable watchfrr
 #
 %if "%{initsystem}" == "systemd"
-       # Note: For systems with systemd, watchfrr will NOT be built. Systemd
-       # takes over the role of restarting crashed processes. Value will
-       # be overwritten with 0 below for systemd independent on the setting here
-       %global with_watchfrr 1
+    # Note: For systems with systemd, watchfrr will NOT be built. Systemd
+    # takes over the role of restarting crashed processes. Value will
+    # be overwritten with 0 below for systemd independent on the setting here
+    %global with_watchfrr 1
 %endif
 
-# if FPM is enabled, then enable tcp_zebra as well
+#### Check for RedHat 6.x or CentOS 6.x - they are too old to support PIM. 
+####   Always disable it on these old systems unconditionally
+#
+# if CentOS / RedHat and version < 7, then disable PIMd (too old, won't work)
+%if 0%{?rhel} && 0%{?rhel} < 7
+    %global  with_pimd  0
+%endif
+
+# if FPM is enabled, then enable tcp_zebra as well 
 #
 %if %{with_fpm}
-       %global with_tcp_zebra  1
+    %global with_tcp_zebra  1
 %endif
 
 # misc internal defines
-%{!?frr_uid:           %global         frr_uid      92 }
-%{!?frr_gid:           %global         frr_gid      92 }
-%{!?vty_gid:           %global         vty_gid         85 }
+%{!?frr_uid:            %global  frr_uid            92 }
+%{!?frr_gid:            %global  frr_gid            92 }
+%{!?vty_gid:            %global  vty_gid            85 }
 
-%define                daemon_list     zebra ripd ospfd bgpd isisd pimd ripngd ospfd6d
+%define     daemon_list zebra ripd ospfd bgpd isisd ripngd ospf6d
 
 %if %{with_ldpd}
-%define         daemon_ldpd    ldpd
+%define     daemon_ldpd ldpd
+%else
+%define     daemon_ldpd ""
+%endif
+
+%if %{with_pimd}
+%define     daemon_pimd pimd
 %else
-%define                daemon_ldpd     ""
+%define     daemon_pimd ""
 %endif
 
 %if %{with_watchfrr}
-%define         daemon_watchfrr        watchfrr
+%define     daemon_watchfrr watchfrr
 %else
-%define                daemon_watchfrr ""
+%define     daemon_watchfrr ""
 %endif
 
-%define                all_daemons     %{daemon_list} %{daemon_ldpd} %{daemon_watchfrr}
+%define     all_daemons %{daemon_list} %{daemon_ldpd} %{daemon_pimd} %{daemon_watchfrr}
 
 # allow build dir to be kept
-%{!?keep_build:                %global         keep_build      0 }
+%{!?keep_build:         %global  keep_build         0 }
 
 #release sub-revision (the two digits after the CONFDATE)
-%{!?release_rev:       %global         release_rev     01 }
+%{!?release_rev:        %global  release_rev        01 }
 
 Summary: Routing daemon
-Name:                  frr
-Version:               %{rpmversion}
-Release:               @CONFDATE@%{release_rev}%{?dist}
-License:               GPLv2+
-Group:                 System Environment/Daemons
-Source0:               http://www.frrouting.org/releases/frr/%{name}-%{frrversion}.tar.gz
-URL:                   http://www.frrouting.org
-Requires:              ncurses json-c
-Requires(pre): /sbin/install-info
+Name:           frr
+Version:        %{rpmversion}
+Release:        @CONFDATE@%{release_rev}%{?dist}
+License:        GPLv2+
+Group:          System Environment/Daemons
+Source0:        http://www.frrouting.org/releases/frr/%{name}-%{frrversion}.tar.gz
+URL:            http://www.frrouting.org
+Requires(pre):  /sbin/install-info
 Requires(preun): /sbin/install-info
-Requires(post):        /sbin/install-info
-BuildRequires: texi2html texinfo autoconf patch libcap-devel groff 
-BuildRequires: readline readline-devel ncurses ncurses-devel
-BuildRequires: json-c-devel bison flex
-Requires:              ncurses initscripts
+Requires(post): /sbin/install-info
+BuildRequires:  gcc texi2html texinfo patch libcap-devel groff
+BuildRequires:  readline readline-devel ncurses ncurses-devel
+BuildRequires:  json-c-devel bison >= 2.7 flex make
+Requires:       ncurses json-c initscripts
 %if %{with_pam}
-BuildRequires: pam-devel
-Requires:              pam
+BuildRequires:  pam-devel
+Requires:       pam
 %endif
 %if "%{initsystem}" == "systemd"
-BuildRequires:         systemd
-Requires(post):                systemd
-Requires(preun):       systemd
-Requires(postun):      systemd
+BuildRequires:      systemd systemd-devel
+Requires(post):     systemd
+Requires(preun):    systemd
+Requires(postun):   systemd
 %else
 # Initscripts > 5.60 is required for IPv6 support
-Requires(pre):         initscripts >= 5.60
+Requires(pre):      initscripts >= 5.60
 %endif
-Provides:                      routingdaemon = %{version}-%{release}
-BuildRoot:                     %{_tmppath}/%{name}-%{version}-root
-Obsoletes:                     bird gated mrt zebra frr-sysvinit
+Provides:           routingdaemon = %{version}-%{release}
+BuildRoot:          %{_tmppath}/%{name}-%{version}-root
+Obsoletes:          bird gated mrt zebra frr-sysvinit
 
 %description
 FRRouting is a free software that manages TCP/IP based routing
@@ -144,6 +160,15 @@ Group: System Environment/Daemons
 %description contrib
 Contributed/3rd party tools which may be of use with frr.
 
+%package pythontools
+Summary: python tools for frr
+BuildRequires: python
+Requires: python python-ipaddr
+Group: System Environment/Daemons
+
+%description pythontools
+Contributed python 2.7 tools which may be of use with frr.
+
 %package devel
 Summary: Header and object files for frr development
 Group: System Environment/Daemons
@@ -174,85 +199,86 @@ developing OSPF-API and frr applications.
     --libdir=%{_libdir} \
     --libexecdir=%{_libexecdir} \
     --localstatedir=%{_localstatedir} \
-       --disable-werror \
+    --disable-werror \
 %if !%{with_shared}
-       --disable-shared \
+    --disable-shared \
 %endif
 %if %{with_multipath}
-       --enable-multipath=%{with_multipath} \
+    --enable-multipath=%{with_multipath} \
 %endif
 %if %{with_tcp_zebra}
-       --enable-tcp-zebra \
+    --enable-tcp-zebra \
 %endif
-       --enable-vtysh \
+    --enable-vtysh \
 %if %{with_ospfclient}
-       --enable-ospfclient=yes \
+    --enable-ospfclient \
 %else
-       --enable-ospfclient=no\
+    --disable-ospfclient\
 %endif
 %if %{with_ospfapi}
-       --enable-ospfapi=yes \
+    --enable-ospfapi=yes \
 %else
-       --enable-ospfapi=no \
+    --enable-ospfapi=no \
 %endif
 %if %{with_irdp}
-       --enable-irdp=yes \
+    --enable-irdp=yes \
 %else
-       --enable-irdp=no \
+    --enable-irdp=no \
 %endif
 %if %{with_rtadv}
-       --enable-rtadv=yes \
+    --enable-rtadv=yes \
 %else
-       --enable-rtadv=no \
+    --enable-rtadv=no \
 %endif
-%if %{with_mpls}
-       --enable-mpls=yes \
+%if %{with_ldpd}
+    --enable-ldpd \
 %else
-       --disable-mpls \
+    --disable-ldpd \
 %endif
-%if %{with_ldpd}
-       --enable-ldpd \
+%if %{with_pimd}
+    --enable-pimd \
 %else
-       --disable-ldpd \
+    --disable-pimd \
 %endif
 %if %{with_pam}
-       --with-libpam \
+    --with-libpam \
 %endif
 %if 0%{?frr_user:1}
-       --enable-user=%frr_user \
-       --enable-group=%frr_user \
+    --enable-user=%frr_user \
+    --enable-group=%frr_user \
 %endif
 %if 0%{?vty_group:1}
-       --enable-vty-group=%vty_group \
+    --enable-vty-group=%vty_group \
 %endif
 %if %{with_fpm}
-       --enable-fpm \
+    --enable-fpm \
 %else
-       --disable-fpm \
+    --disable-fpm \
 %endif
 %if %{with_watchfrr}
-       --enable-watchfrr \
+    --enable-watchfrr \
 %else
-       --disable-watchfrr \
+    --disable-watchfrr \
 %endif
 %if %{with_bgp_vnc}
-       --enable-bgp-vnc \
+    --enable-bgp-vnc \
 %else
-       --disable-bgp-vnc \
+    --disable-bgp-vnc \
 %endif
-       --enable-gcc-rdynamic \
-       --enable-isisd=yes \
-       --enable-systemd=yes \
-       --enable-poll=yes
+    --enable-isisd=yes \
+%if "%{initsystem}" == "systemd"
+    --enable-systemd=yes \
+%endif
+    --enable-poll=yes
 
 make %{?_smp_mflags} MAKEINFO="makeinfo --no-split"
 
 pushd doc
-%if %{texi2htmlversion} < 5
+if [ $(texi2html --version | cut -d. -f1) -lt 5 ]; then
 texi2html --number-sections frr.texi
-%else
+else
 texi2html --number-footnotes  --number-sections frr.texi
-%endif
+fi
 popd
 
 %install
@@ -263,29 +289,27 @@ make DESTDIR=%{buildroot} INSTALL="install -p" CP="cp -p" install
 # Remove this file, as it is uninstalled and causes errors when building on RH9
 rm -rf %{buildroot}/usr/share/info/dir
 
+# Remove debian init script if it was installed
+rm -f %{buildroot}%{_sbindir}/frr
 
 # install /etc sources
 %if "%{initsystem}" == "systemd"
 mkdir -p %{buildroot}%{_unitdir}
-install %{frr_tools}/frr.service \
-       %{buildroot}%{_unitdir}/frr.service
+install %{zeb_rh_src}/frr.service \
+    %{buildroot}%{_unitdir}/frr.service
+install %{zeb_rh_src}/frr.init \
+    %{buildroot}%{_sbindir}/frr
 %else
 mkdir -p %{buildroot}/etc/rc.d/init.d
-for daemon in %{all_daemons} ; do
-       if [ x"${daemon}" != x"" ] ; then
-               install %{zeb_rh_src}/${daemon}.init \
-                       %{buildroot}/etc/rc.d/init.d/${daemon}
-       fi
-done
+install %{zeb_rh_src}/frr.init \
+    %{buildroot}/etc/rc.d/init.d/frr
 %endif
 
-install %{cumulus_dir}/frr/debian.conf %{buildroot}/etc/frr
-install %{cumulus_dir}/frr/daemons %{buildroot}/etc/frr
-install -m644 %{cumulus_dir}/default/frr %{buildroot}/etc/default
+install %{zeb_rh_src}/daemons %{buildroot}/etc/frr
 install -m644 %{zeb_rh_src}/frr.pam \
-       %{buildroot}/etc/pam.d/frr
+    %{buildroot}/etc/pam.d/frr
 install -m644 %{zeb_rh_src}/frr.logrotate \
-       %{buildroot}/etc/logrotate.d/frr
+    %{buildroot}/etc/logrotate.d/frr
 install -d -m750  %{buildroot}/var/run/frr
 
 %pre
@@ -318,11 +342,11 @@ fi
 
 zebra_spec_add_service ()
 {
-  # Add port /etc/services entry if it isn't already there 
-  if [ -f /etc/services ] && \
-      ! %__sed -e 's/#.*$//' /etc/services | %__grep -wq $1 ; then
-    echo "$1           $2                      # $3"  >> /etc/services
-  fi
+    # Add port /etc/services entry if it isn't already there 
+    if [ -f /etc/services ] && \
+        ! %__sed -e 's/#.*$//' /etc/services | %__grep -wq $1 ; then
+        echo "$1        $2          # $3"  >> /etc/services
+    fi
 }
 
 zebra_spec_add_service zebrasrv 2600/tcp "zebra service"
@@ -336,144 +360,99 @@ zebra_spec_add_service ospf6d   2606/tcp "OSPF6d vty"
 zebra_spec_add_service ospfapi  2607/tcp "OSPF-API"
 %endif
 zebra_spec_add_service isisd    2608/tcp "ISISd vty"
+%if %{with_pimd}
 zebra_spec_add_service pimd     2611/tcp "PIMd vty"
+%endif
 %if %{with_ldpd}
 zebra_spec_add_service ldpd     2612/tcp "LDPd vty"
 %endif
 
 %if "%{initsystem}" == "systemd"
 for daemon in %all_daemons ; do
-       %systemd_post frr.service
+    %systemd_post frr.service
 done
 %else
-for daemon in %all_daemons ; do
-       /sbin/chkconfig --add ${daemon}
-done
+/sbin/chkconfig --add frr
 %endif
 
 /sbin/install-info %{_infodir}/frr.info.gz %{_infodir}/dir
 
 # Create dummy files if they don't exist so basic functions can be used.
 if [ ! -e %{_sysconfdir}/zebra.conf ]; then
-       echo "hostname `hostname`" > %{_sysconfdir}/zebra.conf
+    echo "hostname `hostname`" > %{_sysconfdir}/zebra.conf
 %if 0%{?frr_user:1}
-       chown %frr_user:%frr_user %{_sysconfdir}/zebra.conf*
+    chown %frr_user:%frr_user %{_sysconfdir}/zebra.conf*
 %endif
-       chmod 640 %{_sysconfdir}/zebra.conf
+    chmod 640 %{_sysconfdir}/zebra.conf*
 fi
 for daemon in %{all_daemons} ; do
-       if [ ! -e %{_sysconfdir}/${daemon}.conf ]; then
-               touch %{_sysconfdir}/${daemon}.conf
-               %if 0%{?frr_user:1}
-                       chown %frr_user:%frr_user %{_sysconfdir}/${daemon}.conf*
-               %endif
-       fi
+    if [ x"${daemon}" != x"" ] ; then
+        if [ ! -e %{_sysconfdir}/${daemon}.conf ]; then
+            touch %{_sysconfdir}/${daemon}.conf
+            %if 0%{?frr_user:1}
+                chown %frr_user:%frr_user %{_sysconfdir}/${daemon}.conf*
+            %endif
+        fi
+    fi
 done
+%if 0%{?frr_user:1}
+    chown %frr_user:%frr_user %{_sysconfdir}/daemons
+%endif
+
 %if %{with_watchfrr}
-       # No config for watchfrr - this is part of /etc/sysconfig/frr
-       rm -f %{_sysconfdir}/watchfrr.*
+    # No config for watchfrr - this is part of /etc/sysconfig/frr
+    rm -f %{_sysconfdir}/watchfrr.*
 %endif
 
 if [ ! -e %{_sysconfdir}/vtysh.conf ]; then
-       touch %{_sysconfdir}/vtysh.conf
-       chmod 640 %{_sysconfdir}/vtysh.conf
+    touch %{_sysconfdir}/vtysh.conf
+    chmod 640 %{_sysconfdir}/vtysh.conf
+%if 0%{?frr_user:1}
 %if 0%{?vty_group:1}
-    chown frr:%{vty_group} %{_sysconfdir}/vtysh.conf*
+    chown %{frr_user}:%{vty_group} %{_sysconfdir}/vtysh.conf*
+%endif
 %endif
 fi
 
 %postun
 if [ "$1" -ge 1 ]; then
-       # Find out which daemons need to be restarted.
-       for daemon in %all_daemons ; do
-               if [ -f /var/lock/subsys/${daemon} ]; then
-                       eval restart_${daemon}=yes
-               else
-                       eval restart_${daemon}=no
-               fi
-       done
-       # Rename restart flags for daemons handled specially.
-       running_zebra="$restart_zebra"
-       restart_zebra=no
-       %if %{with_watchfrr}
-               running_watchfrr="$restart_watchfrr"
-               restart_watchfrr=no
-       %endif
-       
-       %if "%{initsystem}" == "systemd"
-               ##
-               ## Systemd Version
-               ##
-               # No watchfrr for systemd version
-               #
-               # Stop all daemons other than zebra.
-               for daemon in %all_daemons ; do
-                       eval restart=\$restart_${daemon}
-                       [ "$restart" = yes ] && \
-                               %systemd_postun ${daemon}.service
-               done
-               # Restart zebra.
-               [ "$running_zebra" = yes ] && \
-                       %systemd_postun_with_restart $daemon.service
-               # Start all daemons other than zebra.
-               for daemon in %all_daemons ; do
-                       eval restart=\$restart_${daemon}
-                       [ "$restart" = yes ] && \
-                               %systemd_post ${daemon}.service
-               done
-       %else
-               ##
-               ## init.d Version
-               ##
-               %if %{with_watchfrr}
-                       # Stop watchfrr first.
-                       [ "$running_watchfrr" = yes ] && \
-                               /etc/rc.d/init.d/watchfrr stop >/dev/null 2>&1
-               %endif
-               # Stop all daemons other than zebra and watchfrr.
-               for daemon in %all_daemons ; do
-                       eval restart=\$restart_${daemon}
-                       [ "$restart" = yes ] && \
-                               /etc/rc.d/init.d/${daemon} stop >/dev/null 2>&1
-               done
-               # Restart zebra.
-               [ "$running_zebra" = yes ] && \
-                       /etc/rc.d/init.d/zebra restart >/dev/null 2>&1
-               # Start all daemons other than zebra and watchfrr.
-               for daemon in %all_daemons ; do
-                       eval restart=\$restart_${daemon}
-                       [ "$restart" = yes ] && \
-                               /etc/rc.d/init.d/${daemon} start >/dev/null 2>&1
-               done
-               %if %{with_watchfrr}
-                       # Start watchfrr last.
-                       # Avoid postun scriptlet error if watchfrr is not running.
-                       [ "$running_watchfrr" = yes ] && \
-                               /etc/rc.d/init.d/watchfrr start >/dev/null 2>&1 || :
-               %endif
-       %endif
+    #
+    # Upgrade from older version
+    #
+    %if "%{initsystem}" == "systemd"
+        ##
+        ## Systemd Version
+        ##
+        %systemd_postun frr.service
+    %else
+        ##
+        ## init.d Version
+        ##
+        /etc/rc.d/init.d/frr restart >/dev/null 2>&1
+    %endif
+    :
 fi
 
 %preun
 %if "%{initsystem}" == "systemd"
-       ##
-       ## Systemd Version
-       ##
-       if [ "$1" = "0" ]; then
-               for daemon in %all_daemons ; do
-                       %systemd_preun ${daemon}.service
-               done
-       fi
+    ##
+    ## Systemd Version
+    ##
+    if [ "$1" = "0" ]; then
+        for daemon in %all_daemons ; do
+            if [ x"${daemon}" != x"" ] ; then
+                %systemd_preun frr.service
+            fi
+        done
+    fi
 %else
-       ##
-       ## init.d Version
-       ##
-       if [ "$1" = "0" ]; then
-               for daemon in %all_daemons ; do
-                       /etc/rc.d/init.d/${daemon} stop  >/dev/null 2>&1
-                       /sbin/chkconfig --del ${daemon}
-               done
-       fi
+    ##
+    ## init.d Version
+    ##
+    if [ "$1" = "0" ]; then
+        /etc/rc.d/init.d/frr stop  >/dev/null 2>&1
+        /sbin/chkconfig --del frr
+    fi
 %endif
 /sbin/install-info --delete %{_infodir}/frr.info.gz %{_infodir}/dir
 
@@ -506,46 +485,33 @@ rm -rf %{buildroot}
 %{_sbindir}/ospfd
 %{_sbindir}/ripd
 %{_sbindir}/bgpd
-%{_sbindir}/ssd
-%{_sbindir}/frr
-%{_sbindir}/frr-reload.py
-%{_sbindir}/frr-reload.pyc
-%{_sbindir}/frr-reload.pyo
+%exclude %{_sbindir}/ssd
 %if %{with_watchfrr}
-       %{_sbindir}/watchfrr
+    %{_sbindir}/watchfrr
 %endif
 %{_sbindir}/ripngd
 %{_sbindir}/ospf6d
-%{_sbindir}/pimd
+%if %{with_pimd}
+    %{_sbindir}/pimd
+%endif
 %{_sbindir}/isisd
 %if %{with_ldpd}
-%{_sbindir}/ldpd
+    %{_sbindir}/ldpd
 %endif
 %if %{with_shared}
-%attr(755,root,root) %{_libdir}/lib*.so
-%attr(755,root,root) %{_libdir}/lib*.so.*
+%{_libdir}/lib*.so
+%{_libdir}/lib*.so.0
+%attr(755,root,root) %{_libdir}/lib*.so.0.*
 %endif
 %{_bindir}/*
-%config /etc/frr/[!v]*
+%config(noreplace) /etc/frr/[!v]*.conf*
+%config(noreplace) %attr(750,%frr_user,%frr_user) /etc/frr/daemons
 %if "%{initsystem}" == "systemd"
-       %config %{_unitdir}/frr.service
+    %config %{_unitdir}/frr.service
+    %{_sbindir}/frr
 %else
-       %config /etc/rc.d/init.d/zebra
-       %if %{with_watchfrr}
-               %config /etc/rc.d/init.d/watchfrr
-       %endif
-       %config /etc/rc.d/init.d/ripd
-       %config /etc/rc.d/init.d/ospfd
-       %config /etc/rc.d/init.d/bgpd
-       %config /etc/rc.d/init.d/ripngd
-       %config /etc/rc.d/init.d/ospf6d
-       %config /etc/rc.d/init.d/isisd
-       %config /etc/rc.d/init.d/pimd
-       %if %{with_ldpd}
-               %config /etc/rc.d/init.d/ldpd
-       %endif
-%endif
-%config(noreplace) /etc/default/frr
+    %config /etc/rc.d/init.d/frr
+%endif
 %config(noreplace) /etc/pam.d/frr
 %config(noreplace) %attr(640,root,root) /etc/logrotate.d/*
 
@@ -553,6 +519,12 @@ rm -rf %{buildroot}
 %defattr(-,root,root)
 %doc tools
 
+%files pythontools
+%defattr(-,root,root)
+%{_sbindir}/frr-reload.py
+%{_sbindir}/frr-reload.pyc
+%{_sbindir}/frr-reload.pyo
+
 %files devel
 %defattr(-,root,root)
 %if %{with_ospfclient}
@@ -570,7 +542,14 @@ rm -rf %{buildroot}
 %endif
 
 %changelog
-* Fri Jan  6 2017 Martin Winter <mwinter@opensourcerouting.org> - %{version}
+* Mon Apr 17 2017 Martin Winter <mwinter@opensourcerouting.org> - %{version}
+- new subpackage frr-pythontools with python 2.7 restart script
+- remove PIMd from CentOS/RedHat 6 RPM packages (won't work - too old)
+- converted to single frr init script (not per daemon) based on debian init script
+- created systemd service file for systemd based systems (which uses init script) 
+- Various other RPM package fixes for FRR 2.0
+
+* Fri Jan  6 2017 Martin Winter <mwinter@opensourcerouting.org>
 - Renamed to frr for FRRouting fork of Quagga
 
 * Thu Feb 11 2016 Paul Jakma <paul@jakma.org>