core-extra/packaging/rpm/core.spec.in

437 lines
16 KiB
RPMSpec
Raw Normal View History

%define version @PACKAGE_VERSION@
%define lib_version @GENERIC_RELEASE@
%define python_version %(%{__python} -c "import sys; print '%s.%s' % (sys.version_info[0], sys.version_info[1])")%{nil}
%if 0%{?fedora} >= 17
%define with_kernel_modules_extra 1
%else
%define with_kernel_modules_extra 0
%endif
Name: core
Summary: Common Open Research Emulator for use with network namespaces
License: BSD
Prefix: /usr
Release: 1%{?dist}
Source: core-%{version}.tar.gz
URL: http://www.nrl.navy.mil/itd/ncs/products/core
Version: %{version}
%description
The Common Open Research Emulator provides Python modules and a GUI for
building virtual networks using Linux network namespace containers and bridging.
%package daemon
Summary: Common Open Research Emulator daemon back-end
Group: System Tools
Requires: bash bridge-utils ebtables iproute libev python net-tools
%if 0%{?el6}
Requires: procps
%else
Requires: procps-ng
%endif
%if %{with_kernel_modules_extra}
Requires: kernel-modules-extra
%endif
%if 0%{?fedora} >= 25
Requires: iproute-tc
%endif
BuildRequires: make automake autoconf libev-devel python-devel bridge-utils ebtables iproute net-tools ImageMagick help2man
%if 0%{?el6}
BuildRequires: procps
%else
BuildRequires: procps-ng
%endif
%if 0%{?fedora} >= 25
BuildRequires: iproute-tc
%endif
Provides: core-daemon
# python-sphinx
%description daemon
The Common Open Research Emulator provides Python modules for building virtual
networks using Linux network namespace containers and bridging.
%package gui
Summary: Common Open Research Emulator GUI front-end
Group: System Tools
Requires: tcl tk xterm
BuildArch: noarch
BuildRequires: make automake autoconf
Provides: core-gui
%description gui
The Common Open Research Emulator canvas-based Tcl/Tk GUI for easily drawing
virtual network topologies.
%prep
%setup -q
%build
./bootstrap.sh
# not using --disable-gui/--disable-daemon, because RPM expects both to be
# installed by this build process
# assume Fedora, using systemd startup script
CFLAGS="-fno-strict-aliasing $RPM_OPT_FLAGS" %configure --with-startup=systemd
make -j4
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
%clean
rm -rf $RPM_BUILD_ROOT
%post
%post daemon
# don't run EMANE with realtime option under Fedora
sed -i 's/emane_realtime = True/emane_realtime = False/' /etc/core/core.conf
%preun daemon
if [ "$1" -eq 0 ]; then
systemctl stop core-daemon.service > /dev/null 2>&1 || true
if [ -x @SBINDIR@/core-cleanup ]; then
@SBINDIR@/core-cleanup > /dev/null 2>&1 || true
fi
fi
%postun
%files gui
%{_bindir}/core-gui
%dir @CORE_LIB_DIR@
%dir @CORE_LIB_DIR@/addons
@CORE_LIB_DIR@/addons/ipsecservice.tcl
@CORE_LIB_DIR@/annotations.tcl
@CORE_LIB_DIR@/api.tcl
@CORE_LIB_DIR@/canvas.tcl
@CORE_LIB_DIR@/cfgparse.tcl
@CORE_LIB_DIR@/core-bsd-cleanup.sh
@CORE_LIB_DIR@/core.tcl
@CORE_LIB_DIR@/debug.tcl
@CORE_LIB_DIR@/editor.tcl
@CORE_LIB_DIR@/exceptions.tcl
@CORE_LIB_DIR@/exec.tcl
@CORE_LIB_DIR@/filemgmt.tcl
@CORE_LIB_DIR@/gpgui.tcl
@CORE_LIB_DIR@/graph_partitioning.tcl
@CORE_LIB_DIR@/help.tcl
%{_datadir}/applications/core-gui.desktop
%{_datadir}/pixmaps/core-gui.xpm
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/icons
%dir %{_datadir}/%{name}/icons/normal
%{_datadir}/%{name}/icons/normal/antenna.gif
%{_datadir}/%{name}/icons/normal/ap.gif
%{_datadir}/%{name}/icons/normal/core-icon.png
%{_datadir}/%{name}/icons/normal/core-icon.xbm
%{_datadir}/%{name}/icons/normal/core-logo-275x75.gif
%{_datadir}/%{name}/icons/normal/document-properties.gif
%{_datadir}/%{name}/icons/normal/gps-diagram.xbm
%{_datadir}/%{name}/icons/normal/host.gif
%{_datadir}/%{name}/icons/normal/hub.gif
%{_datadir}/%{name}/icons/normal/lanswitch.gif
%{_datadir}/%{name}/icons/normal/mdr.gif
%{_datadir}/%{name}/icons/normal/oval.gif
%{_datadir}/%{name}/icons/normal/pc.gif
%{_datadir}/%{name}/icons/normal/rj45.gif
%{_datadir}/%{name}/icons/normal/router_black.gif
%{_datadir}/%{name}/icons/normal/router.gif
%{_datadir}/%{name}/icons/normal/router_green.gif
%{_datadir}/%{name}/icons/normal/router_purple.gif
%{_datadir}/%{name}/icons/normal/router_red.gif
%{_datadir}/%{name}/icons/normal/router_yellow.gif
%{_datadir}/%{name}/icons/normal/simple.xbm
%{_datadir}/%{name}/icons/normal/text.gif
%{_datadir}/%{name}/icons/normal/thumb-unknown.gif
%{_datadir}/%{name}/icons/normal/tunnel.gif
%{_datadir}/%{name}/icons/normal/wlan.gif
%{_datadir}/%{name}/icons/normal/xen.gif
%dir %{_datadir}/%{name}/icons/svg
%{_datadir}/%{name}/icons/svg/ap.svg
%{_datadir}/%{name}/icons/svg/cel.svg
%{_datadir}/%{name}/icons/svg/hub.svg
%{_datadir}/%{name}/icons/svg/lanswitch.svg
%{_datadir}/%{name}/icons/svg/mdr.svg
%{_datadir}/%{name}/icons/svg/otr.svg
%{_datadir}/%{name}/icons/svg/rj45.svg
%{_datadir}/%{name}/icons/svg/router_black.svg
%{_datadir}/%{name}/icons/svg/router_green.svg
%{_datadir}/%{name}/icons/svg/router_purple.svg
%{_datadir}/%{name}/icons/svg/router_red.svg
%{_datadir}/%{name}/icons/svg/router.svg
%{_datadir}/%{name}/icons/svg/router_yellow.svg
%{_datadir}/%{name}/icons/svg/start.svg
%{_datadir}/%{name}/icons/svg/tunnel.svg
%{_datadir}/%{name}/icons/svg/vlan.svg
%{_datadir}/%{name}/icons/svg/xen.svg
%dir %{_datadir}/%{name}/icons/tiny
%{_datadir}/%{name}/icons/tiny/ap.gif
%{_datadir}/%{name}/icons/tiny/arrow.down.gif
%{_datadir}/%{name}/icons/tiny/arrow.gif
%{_datadir}/%{name}/icons/tiny/arrow.up.gif
%{_datadir}/%{name}/icons/tiny/blank.gif
%{_datadir}/%{name}/icons/tiny/button.play.gif
%{_datadir}/%{name}/icons/tiny/button.stop.gif
%{_datadir}/%{name}/icons/tiny/cel.gif
%{_datadir}/%{name}/icons/tiny/delete.gif
%{_datadir}/%{name}/icons/tiny/document-new.gif
%{_datadir}/%{name}/icons/tiny/document-properties.gif
%{_datadir}/%{name}/icons/tiny/document-save.gif
%{_datadir}/%{name}/icons/tiny/edit-delete.gif
%{_datadir}/%{name}/icons/tiny/eraser.gif
%{_datadir}/%{name}/icons/tiny/fileopen.gif
%{_datadir}/%{name}/icons/tiny/folder.gif
%{_datadir}/%{name}/icons/tiny/host.gif
%{_datadir}/%{name}/icons/tiny/hub.gif
%{_datadir}/%{name}/icons/tiny/lanswitch.gif
%{_datadir}/%{name}/icons/tiny/link.gif
%{_datadir}/%{name}/icons/tiny/marker.gif
%{_datadir}/%{name}/icons/tiny/mdr.gif
%{_datadir}/%{name}/icons/tiny/mobility.gif
%{_datadir}/%{name}/icons/tiny/moboff.gif
%{_datadir}/%{name}/icons/tiny/observe.gif
%{_datadir}/%{name}/icons/tiny/oval.gif
%{_datadir}/%{name}/icons/tiny/pc.gif
%{_datadir}/%{name}/icons/tiny/ping.gif
%{_datadir}/%{name}/icons/tiny/plot.gif
%{_datadir}/%{name}/icons/tiny/rectangle.gif
%{_datadir}/%{name}/icons/tiny/rj45.gif
%{_datadir}/%{name}/icons/tiny/router_black.gif
%{_datadir}/%{name}/icons/tiny/router.gif
%{_datadir}/%{name}/icons/tiny/router_green.gif
%{_datadir}/%{name}/icons/tiny/router_purple.gif
%{_datadir}/%{name}/icons/tiny/router_red.gif
%{_datadir}/%{name}/icons/tiny/router_yellow.gif
%{_datadir}/%{name}/icons/tiny/run.gif
%{_datadir}/%{name}/icons/tiny/script_pause.gif
%{_datadir}/%{name}/icons/tiny/script_play.gif
%{_datadir}/%{name}/icons/tiny/script_stop.gif
%{_datadir}/%{name}/icons/tiny/select.gif
%{_datadir}/%{name}/icons/tiny/start.gif
%{_datadir}/%{name}/icons/tiny/stock_connect.gif
%{_datadir}/%{name}/icons/tiny/stock_disconnect.gif
%{_datadir}/%{name}/icons/tiny/stop.gif
%{_datadir}/%{name}/icons/tiny/text.gif
%{_datadir}/%{name}/icons/tiny/trace.gif
%{_datadir}/%{name}/icons/tiny/tunnel.gif
%{_datadir}/%{name}/icons/tiny/twonode.gif
%{_datadir}/%{name}/icons/tiny/view-refresh.gif
%{_datadir}/%{name}/icons/tiny/wlan.gif
%{_datadir}/%{name}/icons/tiny/xen.gif
@CORE_LIB_DIR@/initgui.tcl
@CORE_LIB_DIR@/ipv4.tcl
@CORE_LIB_DIR@/ipv6.tcl
@CORE_LIB_DIR@/linkcfg.tcl
@CORE_LIB_DIR@/mobility.tcl
@CORE_LIB_DIR@/nodecfg.tcl
@CORE_LIB_DIR@/nodes.tcl
@CORE_LIB_DIR@/ns2imunes.tcl
@CORE_LIB_DIR@/plugins.tcl
@CORE_LIB_DIR@/services.tcl
@CORE_LIB_DIR@/tooltips.tcl
@CORE_LIB_DIR@/topogen.tcl
@CORE_LIB_DIR@/traffic.tcl
@CORE_LIB_DIR@/util.tcl
@CORE_LIB_DIR@/version.tcl
@CORE_LIB_DIR@/widget.tcl
@CORE_LIB_DIR@/wlanscript.tcl
@CORE_LIB_DIR@/wlan.tcl
%dir %{_datadir}/%{name}/examples
%dir %{_datadir}/%{name}/examples/configs
%{_datadir}/%{name}/examples/configs/sample10-kitchen-sink.imn
%{_datadir}/%{name}/examples/configs/sample1-bg.gif
%{_datadir}/%{name}/examples/configs/sample1.imn
%{_datadir}/%{name}/examples/configs/sample1.scen
%{_datadir}/%{name}/examples/configs/sample2-ssh.imn
%{_datadir}/%{name}/examples/configs/sample3-bgp.imn
%{_datadir}/%{name}/examples/configs/sample4-bg.jpg
%{_datadir}/%{name}/examples/configs/sample4-nrlsmf.imn
%{_datadir}/%{name}/examples/configs/sample4.scen
%{_datadir}/%{name}/examples/configs/sample5-mgen.imn
%{_datadir}/%{name}/examples/configs/sample6-emane-rfpipe.imn
%{_datadir}/%{name}/examples/configs/sample7-emane-ieee80211abg.imn
%{_datadir}/%{name}/examples/configs/sample8-ipsec-service.imn
%{_datadir}/%{name}/examples/configs/sample9-vpn.imn
%doc %{_mandir}/man1/core-gui.1.gz
%files daemon
%config @CORE_CONF_DIR@/core.conf
%config @CORE_CONF_DIR@/perflogserver.conf
%config @CORE_CONF_DIR@/xen.conf
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/examples
%{_datadir}/%{name}/examples/controlnet_updown
%dir %{_datadir}/%{name}/examples/corens3
%{_datadir}/%{name}/examples/corens3/ns3lte.py*
%{_datadir}/%{name}/examples/corens3/ns3wifi.py*
%{_datadir}/%{name}/examples/corens3/ns3wifirandomwalk.py*
%{_datadir}/%{name}/examples/corens3/ns3wimax.py*
2015-12-29 15:43:47 +00:00
%{_datadir}/%{name}/examples/emanemanifest2core.py*
%{_datadir}/%{name}/examples/emanemodel2core.py*
%{_datadir}/%{name}/examples/findcore.py*
%dir %{_datadir}/%{name}/examples/hooks
%{_datadir}/%{name}/examples/hooks/configuration_hook.sh
%{_datadir}/%{name}/examples/hooks/datacollect_hook.sh
%{_datadir}/%{name}/examples/hooks/perflogserver.py*
%{_datadir}/%{name}/examples/hooks/perflogstart.sh
%{_datadir}/%{name}/examples/hooks/perflogstop.sh
%{_datadir}/%{name}/examples/hooks/sessiondatacollect.sh
%{_datadir}/%{name}/examples/hooks/timesyncstart.sh
%{_datadir}/%{name}/examples/hooks/timesyncstop.sh
%dir %{_datadir}/%{name}/examples/myservices
%{_datadir}/%{name}/examples/myservices/__init__.py*
%{_datadir}/%{name}/examples/myservices/README.txt
%{_datadir}/%{name}/examples/myservices/sample.py*
%dir %{_datadir}/%{name}/examples/netns
%{_datadir}/%{name}/examples/netns/basicrange.py*
2015-12-29 15:43:47 +00:00
%{_datadir}/%{name}/examples/netns/daemonnodes.py*
%{_datadir}/%{name}/examples/netns/distributed.py*
%{_datadir}/%{name}/examples/netns/emane80211.py*
%{_datadir}/%{name}/examples/netns/howmanynodes.py*
%{_datadir}/%{name}/examples/netns/iperf-performance-chain.py*
%{_datadir}/%{name}/examples/netns/iperf-performance.sh
%{_datadir}/%{name}/examples/netns/ospfmanetmdrtest.py*
%{_datadir}/%{name}/examples/netns/switch.py*
%{_datadir}/%{name}/examples/netns/switchtest.py*
%{_datadir}/%{name}/examples/netns/twonodes.sh
%{_datadir}/%{name}/examples/netns/wlanemanetests.py*
%{_datadir}/%{name}/examples/netns/wlantest.py*
%dir %{_datadir}/%{name}/examples/services
%{_datadir}/%{name}/examples/services/sampleFirewall
%{_datadir}/%{name}/examples/services/sampleIPsec
%{_datadir}/%{name}/examples/services/sampleVPNClient
%{_datadir}/%{name}/examples/services/sampleVPNServer
%{_datadir}/%{name}/examples/stopsession.py*
%doc %{_mandir}/man1/core-cleanup.1.gz
%doc %{_mandir}/man1/core-daemon.1.gz
%doc %{_mandir}/man1/core-manage.1.gz
%doc %{_mandir}/man1/coresendmsg.1.gz
%doc %{_mandir}/man1/core-xen-cleanup.1.gz
%doc %{_mandir}/man1/netns.1.gz
%doc %{_mandir}/man1/vcmd.1.gz
%doc %{_mandir}/man1/vnoded.1.gz
/etc/logrotate.d/core-daemon
/etc/systemd/system/core-daemon.service
%{python_sitearch}/core_python_netns-1.0-py%{python_version}.egg-info
%{python_sitearch}/netns.so
%{python_sitearch}/vcmd.so
%dir %{python_sitelib}/core
%{python_sitelib}/core/sdt.py*
%{python_sitelib}/core/service.py*
%{python_sitelib}/core/coreserver.py*
%dir %{python_sitelib}/core/addons
%{python_sitelib}/core/addons/__init__.py*
%dir %{python_sitelib}/core/api
%{python_sitelib}/core/api/coreapi.py*
%{python_sitelib}/core/api/data.py*
%{python_sitelib}/core/api/__init__.py*
%{python_sitelib}/core/broker.py*
%dir %{python_sitelib}/core/bsd
%{python_sitelib}/core/bsd/__init__.py*
%{python_sitelib}/core/bsd/netgraph.py*
%{python_sitelib}/core/bsd/nodes.py*
%{python_sitelib}/core/bsd/vnet.py*
%{python_sitelib}/core/bsd/vnode.py*
%{python_sitelib}/core/conf.py*
%{python_sitelib}/core/constants.py*
%{python_sitelib}/core/coreobj.py*
%dir %{python_sitelib}/core/emane
%{python_sitelib}/core/emane/bypass.py*
%{python_sitelib}/core/emane/commeffect.py*
%{python_sitelib}/core/emane/emane.py*
%{python_sitelib}/core/emane/ieee80211abg.py*
%{python_sitelib}/core/emane/__init__.py*
%{python_sitelib}/core/emane/nodes.py*
%{python_sitelib}/core/emane/rfpipe.py*
%{python_sitelib}/core/emane/tdma.py*
%{python_sitelib}/core/emane/universal.py*
%{python_sitelib}/core/__init__.py*
%{python_sitelib}/core/location.py*
%dir %{python_sitelib}/core/misc
%{python_sitelib}/core/misc/event.py*
%{python_sitelib}/core/misc/__init__.py*
%{python_sitelib}/core/misc/ipaddr.py*
%{python_sitelib}/core/misc/LatLongUTMconversion.py*
%{python_sitelib}/core/misc/quagga.py*
%{python_sitelib}/core/misc/utils.py*
%{python_sitelib}/core/misc/utm.py*
%{python_sitelib}/core/misc/xmldeployment.py*
%{python_sitelib}/core/misc/xmlparser.py*
%{python_sitelib}/core/misc/xmlparser0.py*
%{python_sitelib}/core/misc/xmlparser1.py*
%{python_sitelib}/core/misc/xmlsession.py*
%{python_sitelib}/core/misc/xmlutils.py*
%{python_sitelib}/core/misc/xmlwriter.py*
%{python_sitelib}/core/misc/xmlwriter0.py*
%{python_sitelib}/core/misc/xmlwriter1.py*
%{python_sitelib}/core/mobility.py*
%dir %{python_sitelib}/core/netns
%{python_sitelib}/core/netns/__init__.py*
%{python_sitelib}/core/netns/nodes.py*
%{python_sitelib}/core/netns/vif.py*
%{python_sitelib}/core/netns/vnet.py*
%{python_sitelib}/core/netns/vnodeclient.py*
%{python_sitelib}/core/netns/vnode.py*
%dir %{python_sitelib}/corens3
%{python_sitelib}/corens3/constants.py*
%{python_sitelib}/corens3/__init__.py*
%{python_sitelib}/corens3/obj.py*
%{python_sitelib}/corens3_python-@COREDPY_VERSION@-py%{python_version}.egg-info
%dir %{python_sitelib}/core/phys
%{python_sitelib}/core/phys/__init__.py*
%{python_sitelib}/core/phys/pnodes.py*
%{python_sitelib}/core_python-@COREDPY_VERSION@-py%{python_version}.egg-info
%dir %{python_sitelib}/core/services
%{python_sitelib}/core/services/bird.py*
%{python_sitelib}/core/services/__init__.py*
%{python_sitelib}/core/services/dockersvc.py*
%{python_sitelib}/core/services/nrl.py*
%{python_sitelib}/core/services/quagga.py*
%{python_sitelib}/core/services/security.py*
2015-12-29 15:43:47 +00:00
%{python_sitelib}/core/services/startup.py*
%{python_sitelib}/core/services/ucarp.py*
%{python_sitelib}/core/services/utility.py*
%{python_sitelib}/core/services/xorp.py*
%{python_sitelib}/core/session.py*
%dir %{python_sitelib}/core/xen
%{python_sitelib}/core/xen/__init__.py*
%{python_sitelib}/core/xen/xenconfig.py*
%{python_sitelib}/core/xen/xen.py*
%{_sbindir}/core-cleanup
%{_sbindir}/core-daemon
%{_sbindir}/core-manage
%{_sbindir}/coresendmsg
%{_sbindir}/core-xen-cleanup
%{_sbindir}/netns
%{_sbindir}/vcmd
%{_sbindir}/vnoded
%changelog
* Fri Sep 01 2017 CORE Developers <core-dev@nrl.navy.mil> - 5.0
- Added Ryu SD and Open vSwitch services, code cleanup and refactoring
* Fri Jun 5 2015 CORE Developers <core-dev@pf.itd.nrl.navy.mil> - 4.8
2015-05-22 01:56:52 +01:00
- Support for NRL Network Modeling Framework (NMF) XML representation, bugfixes
* Wed Aug 6 2014 Jeff Ahrenholz <core-dev@pf.itd.nrl.navy.mil> - 4.7
- EMANE 0.9.1, asymmetric links, bugfixes
* Thu Aug 22 2013 Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> - 4.6
- cored now core-daemon, core now core-gui for CORE 4.6 release
* Wed Apr 3 2013 Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> - 4.5
- split into gui and daemon RPMs for CORE 4.5 release
* Tue Sep 4 2012 Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> - 4.4
- update files list for CORE 4.4 release, removed info file
* Tue Feb 7 2012 Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> - 4.3
- update files list for CORE 4.3 release, freshen dependencies
* Tue Aug 16 2011 Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> - 4.2
- update for CORE 4.2 release; use dir variables, more arch independent
* Mon Dec 13 2010 Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> - 4.1
- update for CORE 4.1 release; added calls to ldconfig and removal of pyc files
* Wed Aug 4 2010 Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> - 4.0
- update for CORE 4.0 release for Python and network namespaces
* Thu Sep 10 2009 Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> - 3.5
- update for CORE 3.5 release to include init script
* Fri May 29 2009 Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> - 3.4
- initial spec file for CORE 3.4 release