[tntnet] Initial import 821224

Martin Gansser martinkg at fedoraproject.org
Thu Jul 26 16:37:14 UTC 2012


commit 8cf94e395b20fda72a8845db927b4d270cedf4b6
Author: Martin Gansser <mgansser at alice.de>
Date:   Thu Jul 26 18:36:41 2012 +0200

    Initial import 821224

 .gitignore               |    1 +
 sources                  |    1 +
 tntnet-conf-fedora.patch |   13 ++++
 tntnet-gcc47_fixes.patch |   10 +++
 tntnet.service           |   15 ++++
 tntnet.spec              |  171 ++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 211 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..df94d3e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/tntnet-2.1.tar.gz
diff --git a/sources b/sources
index e69de29..a08f2d9 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a9c85aa6d624f7f88c48374f28730242  tntnet-2.1.tar.gz
diff --git a/tntnet-conf-fedora.patch b/tntnet-conf-fedora.patch
new file mode 100644
index 0000000..0e4b491
--- /dev/null
+++ b/tntnet-conf-fedora.patch
@@ -0,0 +1,13 @@
+--- tntnet-2.1/etc/tntnet/tntnet.conf.orig.in	2012-06-20 18:02:36.676631998 +0200
++++ tntnet-2.1/etc/tntnet/tntnet.conf.in	2012-06-20 18:02:52.295631168 +0200
+@@ -6,8 +6,8 @@
+ #SslListen  0.0.0.0 443 @sysconfdir@/tntnet/tntnet.pem
+ 
+ Daemon	    1
+-User	    www-data
+-Group	    www-data
++User	    tntnet
++Group	    tntnet
+ CompPath    @libdir@/tntnet
+ 
+ # set some limit to prevent DoS-attacks
diff --git a/tntnet-gcc47_fixes.patch b/tntnet-gcc47_fixes.patch
new file mode 100644
index 0000000..3aefcb0
--- /dev/null
+++ b/tntnet-gcc47_fixes.patch
@@ -0,0 +1,10 @@
+--- framework/defcomp/static.cpp        (revision 1363)
++++ framework/defcomp/static.cpp        (revision 1364)
+@@ -51,6 +51,7 @@
+ #include <netinet/in.h>
+ #include <netinet/tcp.h>
+ #include <sys/poll.h>
++#include <unistd.h>
+ #include <typeinfo>
+ #include <errno.h>
+ #endif
diff --git a/tntnet.service b/tntnet.service
new file mode 100644
index 0000000..89becd7
--- /dev/null
+++ b/tntnet.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=tntnet web application server
+ 
+[Service]
+Type=forking
+EnvironmentFile=/etc/tntnet/tntnet.conf
+EnvironmentFile=/etc/tntnet/tntnet.properties
+PIDFile=/var/run/tntnet.pid
+ExecStart=/usr/bin/tntnet
+ExecStop=/bin/kill -15 $MAINPID
+ExecReload=/bin/kill -HUP $MAINPID
+ 
+[Install]
+WantedBy=multi-user.target
+
diff --git a/tntnet.spec b/tntnet.spec
new file mode 100644
index 0000000..754b4c9
--- /dev/null
+++ b/tntnet.spec
@@ -0,0 +1,171 @@
+Name:             tntnet
+Version:          2.1
+Release:          12%{?dist}
+Summary:          A web application server for web applications
+
+# GPLv2+: framework/common/gcryptinit.c
+# zlib:   framework/common/unzip.h
+License:          LGPLv2+ and GPLv2+ and zlib
+URL:              http://www.tntnet.org/
+Source0:          http://www.tntnet.org/download/%{name}-%{version}.tar.gz
+# http://sourceforge.net/tracker/?func=detail&aid=3542704&group_id=119301&atid=684050
+Source1:          %{name}.service
+# http://sourceforge.net/tracker/?func=detail&aid=3542910&group_id=119301&atid=684050
+Patch0:           %{name}-gcc47_fixes.patch
+# http://sourceforge.net/tracker/?func=detail&aid=3542913&group_id=119301&atid=684050
+Patch1:           %{name}-conf-fedora.patch
+
+BuildRequires:    kernel-headers openssl-devel zlib-devel cxxtools-devel zip
+Requires(pre):    shadow-utils
+Requires(post):   systemd-units
+Requires(preun):  systemd-units
+Requires(postun): systemd-units
+
+%description
+%{summary}
+
+%package          devel
+Summary:          Development files for %{name}
+Group:            Development/Libraries
+Requires:         %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+Development files for %{name}
+
+%prep
+%setup -q
+%patch0 -p0
+%patch1 -p1
+
+%build
+%configure --disable-static
+make %{?_smp_mflags}
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
+
+# Systemd unit files
+# copy tntnet.service to unitdir /lib/systemd/system
+mkdir -p $RPM_BUILD_ROOT%{_unitdir}
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/
+install -Dpm 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/%{name}.service
+
+# Find and remove all la files
+find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
+
+# remove sysv init script
+rm  $RPM_BUILD_ROOT/etc/init.d/%{name}
+
+%pre
+getent group %{name} > /dev/null || groupadd -r %{name}
+getent passwd %{name} > /dev/null || \
+    useradd -r -g %{name} -d %{_localstatedir}/lib/%{name} -s /sbin/nologin \
+    -c "User" %{name}
+exit 0
+
+%post
+/sbin/ldconfig
+if [ $1 -eq 1 ] ; then 
+    # Initial installation 
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+
+%preun
+if [ $1 -eq 0 ] ; then
+    # Package removal, not upgrade
+    /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
+    /bin/systemctl stop %{name}.service > /dev/null 2>&1 || :
+fi
+
+%postun
+/sbin/ldconfig
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+    # Package upgrade, not uninstall
+    /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
+fi
+
+%files
+%defattr (-, root, root)
+%doc AUTHORS ChangeLog COPYING README
+%dir %{_sysconfdir}/tntnet
+%config(noreplace) %{_sysconfdir}/%{name}/*.conf
+%config(noreplace) %{_sysconfdir}/%{name}/*.properties
+%{_unitdir}/%{name}.service
+%{_bindir}/ecppc
+%{_bindir}/ecppl
+%{_bindir}/ecppll
+%{_bindir}/tntnet
+%{_libdir}/libtntnet*.so.*
+%{_libdir}/tntnet/
+%{_mandir}/man1/ecppc.1.gz
+%{_mandir}/man1/ecppl.1.gz
+%{_mandir}/man1/ecppll.1.gz
+%{_mandir}/man1/tntnet-config.1.gz
+%{_mandir}/man7/ecpp.7.gz
+%{_mandir}/man7/tntnet.conf.7.gz
+%{_mandir}/man7/tntnet.properties.7.gz
+%{_mandir}/man8/tntnet.8.gz
+
+%files devel
+%defattr (-, root, root)
+%{_bindir}/tntnet-config
+%{_libdir}/libtntnet*.so
+%{_includedir}/tnt/
+
+%changelog
+* Thu Jul 26 2012 Martin Gansser <linux4martin at gmx.de> - 2.1-12
+- spec file cleanup
+- changed changelog readability
+
+* Wed Jul 18 2012 Martin Gansser <linux4martin at gmx.de> - 2.1-11
+- added missing build requirement kernel-headers
+
+* Fri Jul 13 2012 Martin Gansser <linux4martin at gmx.de> - 2.1-10
+- added upstream link for gcc 4.7 patch
+- changed license type
+- make install preserve timestamps 
+
+* Thu Jul 3 2012 Martin Gansser <linux4martin at gmx.de> - 2.1-9
+- removed rm in install section
+- removed systemd readme file
+- added link to upstream systemd patch
+
+* Sun Jun 24 2012 Martin Gansser <linux4martin at gmx.de> - 2.1-8
+- removed group and user apache from tntnet.conf
+- added own group tntnet to tntnet.conf
+- added creation of users and groups in pre section
+
+* Thu Jun 21 2012 Martin Gansser <linux4martin at gmx.de> - 2.1-7
+- added systemd-fedora-readme
+
+* Wed Jun 20 2012 Martin Gansser <linux4martin at gmx.de> - 2.1-6
+- changed group and user for fedora to apache
+
+* Sun Jun 17 2012 Martin Gansser <linux4martin at gmx.de> - 2.1-5
+- fixed more missing slash in path
+- fixed missing system unit file
+
+* Sun Jun 17 2012 Martin Gansser <linux4martin at gmx.de> - 2.1-4
+- fixed missing slash in path
+
+* Sat Jun 16 2012 Martin Gansser <linux4martin at gmx.de> - 2.1-3
+- gcc-4.7 patch
+- added systemd service file
+- removed sysv init stuff
+- cleanup spec file 
+
+* Tue May 29 2012 Martin Gansser <linux4martin at gmx.de> - 2.1-2
+- removed license comment
+- removed empty files
+- fixed Requires and Group tag
+
+* Sun Apr 29 2012 Martin Gansser <linux4martin at gmx.de> - 2.1-1
+- new release
+
+* Mon Sep 19 2011 Sebastian Vahl <fedora at deadbabylon.de> - 2.0-2
+- cleanup spec a bit
+
+* Sun Sep 18 2011 Sebastian Vahl <fedora at deadbabylon.de> - 2.0-1
+- initial release
+


More information about the scm-commits mailing list