[yaws/epel7] Revert "Retire yaws - dead upstream"
Lubomir Rintel
lkundrak at fedoraproject.org
Thu Feb 13 19:23:36 UTC 2014
commit 5f133c5c873287a284d0b4eba690d72be2789f52
Author: Lubomir Rintel <lkundrak at v3.sk>
Date: Thu Feb 13 19:18:30 2014 +0100
Revert "Retire yaws - dead upstream"
This reverts commit 5f2aeb84600ec6ddaca33fe28ef122beea59dd03.
dead.package | 1 -
...ime.erl-to-the-list-of-modules-to-compile.patch | 30 +++
yaws-1.92-fhs.patch | 182 ++++++++++++++++++
yaws-1.92-sysvinit.patch | 52 +++++
yaws.logrotate | 11 +
yaws.spec | 197 ++++++++++++++++++++
6 files changed, 472 insertions(+), 1 deletions(-)
---
diff --git a/sources b/sources
new file mode 100644
index 0000000..e69de29
diff --git a/yaws-0003-Add-yaws_dime.erl-to-the-list-of-modules-to-compile.patch b/yaws-0003-Add-yaws_dime.erl-to-the-list-of-modules-to-compile.patch
new file mode 100644
index 0000000..f939075
--- /dev/null
+++ b/yaws-0003-Add-yaws_dime.erl-to-the-list-of-modules-to-compile.patch
@@ -0,0 +1,30 @@
+From 28b2a40b5aedeea9c04d1dac2a2f663ea750de3c Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Wed, 17 Nov 2010 18:20:23 +0300
+Subject: [PATCH 3/3] Add yaws_dime.erl to the list of modules to compile
+
+This module is used in yaws_rpc, yaws_soap_lib and
+yaws_soap_srv modules but it wasn't compiled. So it's
+quite likely that application will fails with 'undef'
+error.
+
+Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
+---
+ src/Makefile | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index bd06406..11c412a 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -55,6 +55,7 @@ MODULES=yaws \
+ yaws_sup_restarts \
+ yaws_stats \
+ yaws_multipart \
++ yaws_dime \
+ $(BITSMODS)
+
+
+--
+1.7.3.2
+
diff --git a/yaws-1.92-fhs.patch b/yaws-1.92-fhs.patch
new file mode 100644
index 0000000..dc89660
--- /dev/null
+++ b/yaws-1.92-fhs.patch
@@ -0,0 +1,182 @@
+From 644b4d1b59bade953c8c503a0bcd8a550d205155 Mon Sep 17 00:00:00 2001
+From: Filip Andres <filip.andres at gooddata.com>
+Date: Tue, 3 Jan 2012 13:43:17 +0100
+Subject: [PATCH] Install into FHS-compliant hierarchy -- basically move /var/yaws into /var/lib/yaws and ensure logs stay in /var/log. Also, use /usr/lib64 on 64-bit.
+
+---
+ Makefile | 6 +++---
+ c_src/Makefile | 10 +++++-----
+ doc/Makefile | 2 --
+ include.mk.in | 4 +++-
+ scripts/Install | 11 ++++++-----
+ scripts/Makefile | 2 +-
+ scripts/regular-install | 2 +-
+ src/Makefile | 16 ++++++++--------
+ 8 files changed, 27 insertions(+), 26 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c6802b4..f216538 100644
+--- a/Makefile
++++ b/Makefile
+@@ -27,13 +27,13 @@ install: all
+ then ( cd $$d && $(MAKE) $@ ) || exit 1 ; \
+ fi ; \
+ done
+- $(INSTALL) -d $(DESTDIR)$(PREFIX)/lib/pkgconfig
+- $(INSTALL) -m 644 $(PKGCONFIG_FILES) $(DESTDIR)$(PREFIX)/lib/pkgconfig
++ $(INSTALL) -d $(DESTDIR)$(SYSLIBDIR)/pkgconfig
++ $(INSTALL) -m 644 $(PKGCONFIG_FILES) $(DESTDIR)$(SYSLIBDIR)/pkgconfig
+ @echo "-------------------------------"
+ @echo
+ @echo "** etc files went into ${ETCDIR}"
+ @echo "** executables went into ${prefix}/bin"
+- @echo "** library files went into ${prefix}/lib/yaws"
++ @echo "** library files went into ${LIBDIR}/yaws"
+ @echo "** var files went into ${VARDIR}"
+ @echo "** default docroot went into ${VARDIR}/yaws/www"
+ @echo
+diff --git a/c_src/Makefile b/c_src/Makefile
+index 3b16599..4b053cf 100644
+--- a/c_src/Makefile
++++ b/c_src/Makefile
+@@ -34,12 +34,12 @@ clean:
+ -rm -f $(PRIV_FILES) setuid_drv.$(OBJ) epam.$(OBJ) yaws_sendfile_drv.$(OBJ) hashtable.$(OBJ)
+
+ install: $(PRIV_FILES)
+- $(INSTALL) -d $(DESTDIR)$(PREFIX)/lib/yaws/priv/lib
+- $(INSTALL) $(PRIV_FILES) $(DESTDIR)$(PREFIX)/lib/yaws/priv/lib
++ $(INSTALL) -d $(DESTDIR)$(LIBDIR)/yaws/priv/lib
++ $(INSTALL) $(PRIV_FILES) $(DESTDIR)$(LIBDIR)/yaws/priv/lib
+ ifndef WIN32
+- if [ `id -u` = "0" -a -d $(DESTDIR)$(PREFIX)/lib/yaws/priv/epam ]; then \
+- chown root $(DESTDIR)$(PREFIX)/lib/yaws/priv/epam; \
+- chmod a+s $(DESTDIR)$(PREFIX)/lib/yaws/priv/epam; \
++ if [ `id -u` = "0" -a -d $(DESTDIR)$(LIBDIR)/yaws/priv/epam ]; then \
++ chown root $(DESTDIR)$(LIBDIR)/yaws/priv/epam; \
++ chmod a+s $(DESTDIR)$(LIBDIR)/yaws/priv/epam; \
+ fi
+ endif
+
+diff --git a/doc/Makefile b/doc/Makefile
+index 391dc5b..5fdf374 100644
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -43,6 +43,4 @@ clean:
+ rm -f *.ps *.dvi *.log *.aux *.pdf *.toc *.beam 2> /dev/null || true
+
+ install:
+- -install -d $(DESTDIR)$(PREFIX)/share/doc/yaws
+- -cp yaws.pdf $(DESTDIR)$(PREFIX)/share/doc/yaws
+
+diff --git a/include.mk.in b/include.mk.in
+index 69b8726..34f6d7d 100644
+--- a/include.mk.in
++++ b/include.mk.in
+@@ -2,9 +2,11 @@
+
+
+ PREFIX = @prefix@
++LIBDIR = @libdir@/erlang/lib
++SYSLIBDIR = @libdir@
+ prefix = ${PREFIX}
+ ETCDIR = @sysconfdir@
+-VARDIR = @localstatedir@
++VARDIR = @localstatedir@/lib
+
+ DVILATEX = @DVILATEX@
+ PDFLATEX = @PDFLATEX@
+diff --git a/scripts/Install b/scripts/Install
+index a0d58fc..870bf51 100755
+--- a/scripts/Install
++++ b/scripts/Install
+@@ -8,7 +8,8 @@ werl=$3
+ etcdir=$4
+ vardir=$5
+ bindir=$6
+-destdir=$7
++libdir=$7
++destdir=$8
+
+ #bindir=`dirname $erl` ; bindir=`dirname $bindir`/lib/erlang/bin
+
+@@ -20,10 +21,10 @@ v=${vardir}
+
+ install -d ${destdir}${prefix}/bin
+ install -d ${destdir}${prefix}/etc
+-install -d ${destdir}${vardir}/log/yaws
++install -d ${destdir}/var/log/yaws
+
+ cat yaws.template | \
+- ./Subst %yawsdir% ${prefix}/lib/yaws | \
++ ./Subst %yawsdir% ${libdir}/yaws | \
+ ./Subst %vardir% ${vardir} | \
+ ./Subst %erl% "${erl}" | \
+ ./Subst %run_erl% "${bindir}/run_erl" | \
+@@ -32,8 +33,8 @@ cat yaws.template | \
+
+ chmod +x ${destdir}${prefix}/bin/yaws
+
+-install -d ${destdir}${prefix}/lib/yaws/examples/ebin
+-install -d ${destdir}${prefix}/lib/yaws/examples/include
++install -d ${destdir}${libdir}/yaws/examples/ebin
++install -d ${destdir}${libdir}/yaws/examples/include
+
+ ## seems gentoo don't like to be installed in /usr/local/etc
+ ## since /sbin/runscript still reads /etc/conf.d
+diff --git a/scripts/Makefile b/scripts/Makefile
+index 31f62f5..b31e4b7 100644
+--- a/scripts/Makefile
++++ b/scripts/Makefile
+@@ -13,7 +13,7 @@ local_install: ../bin/yaws
+ VARDIR="${HOME}/var" ./local-install true
+
+ yaws.conf:
+- YAWSDIR='$(PREFIX)/lib/yaws' LOGDIR='$(PREFIX)/var/log/yaws' \
++ YAWSDIR='$(LIBDIR)/yaws' LOGDIR='/var/log/yaws' \
+ VARDIR='$(VARDIR)' PORT=80 DOCROOT='$(VARDIR)/yaws/www' \
+ CERTDIR='$(ETCDIR)/yaws' SSLPORT=443 ./gen-yaws-conf > $@
+
+diff --git a/scripts/regular-install b/scripts/regular-install
+index 2286380..837343f 100755
+--- a/scripts/regular-install
++++ b/scripts/regular-install
+@@ -8,7 +8,7 @@ rm -rf /tmp/yaws 2>/dev/null
+ set -e
+
+ ./Install "${PREFIX}" "${ERL}" "${WERL}" "${ETCDIR}/" \
+- "${VARDIR}/" "${ERLBINDIR}/" "${DESTDIR}"
++ "${VARDIR}/" "${ERLBINDIR}/" "${LIBDIR}" "${DESTDIR}"
+
+ conffile="${DESTDIR}${ETCDIR}/yaws/yaws.conf"
+ if [ -f "$conffile" ]; then
+diff --git a/src/Makefile b/src/Makefile
+index 03caf1a..634c37f 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -111,15 +111,15 @@ clean:
+ mime_types.erl yaws_configure.hrl mime_type_c.beam
+
+ install: regen all docsinstall
+- $(INSTALL) -d $(DESTDIR)$(PREFIX)/lib/yaws/examples/ebin
+- $(INSTALL) -d $(DESTDIR)$(PREFIX)/lib/yaws/examples/include
+- $(INSTALL) -d $(DESTDIR)$(PREFIX)/lib/yaws/ebin
+- $(INSTALL) -d $(DESTDIR)$(PREFIX)/lib/yaws/priv
+- $(INSTALL) -d $(DESTDIR)$(VARDIR)/log/yaws
++ $(INSTALL) -d $(DESTDIR)$(LIBDIR)/yaws/examples/ebin
++ $(INSTALL) -d $(DESTDIR)$(LIBDIR)/yaws/examples/include
++ $(INSTALL) -d $(DESTDIR)$(LIBDIR)/yaws/ebin
++ $(INSTALL) -d $(DESTDIR)$(LIBDIR)/yaws/priv
++ $(INSTALL) -d $(DESTDIR)/var/log/yaws
+ $(INSTALL) -d $(DESTDIR)$(VARDIR)/yaws/ebin
+- (cd ..; tar cf - ebin ) | (cd $(DESTDIR)$(PREFIX)/lib/yaws; tar xf - )
+- (cd ..; tar cf - include ) | (cd $(DESTDIR)$(PREFIX)/lib/yaws; tar xf - )
+- (cd ..; tar cf - priv/*.xsd ) | (cd $(DESTDIR)$(PREFIX)/lib/yaws; tar xf - )
++ (cd ..; tar cf - ebin ) | (cd $(DESTDIR)$(LIBDIR)/yaws; tar xf - )
++ (cd ..; tar cf - include ) | (cd $(DESTDIR)$(LIBDIR)/yaws; tar xf - )
++ (cd ..; tar cf - priv/*.xsd ) | (cd $(DESTDIR)$(LIBDIR)/yaws; tar xf - )
+
+ docsinstall:
+ $(INSTALL) -d $(DESTDIR)$(VARDIR)/yaws/www
+--
+1.7.4.1
+
diff --git a/yaws-1.92-sysvinit.patch b/yaws-1.92-sysvinit.patch
new file mode 100644
index 0000000..b14ec68
--- /dev/null
+++ b/yaws-1.92-sysvinit.patch
@@ -0,0 +1,52 @@
+From c831a206727b904e4100d180e2967e7f5132f309 Mon Sep 17 00:00:00 2001
+From: Filip Andres <filip.andres at gooddata.com>
+Date: Tue, 3 Jan 2012 13:41:50 +0100
+Subject: [PATCH] Do not enable the service by default.
+ More robustly determine if we're running.
+
+---
+ scripts/redhat/yaws.init.d | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/scripts/redhat/yaws.init.d b/scripts/redhat/yaws.init.d
+index 4b7a911..09d51cb 100755
+--- a/scripts/redhat/yaws.init.d
++++ b/scripts/redhat/yaws.init.d
+@@ -4,7 +4,7 @@
+ #
+ # config: /etc/yaws.conf
+ #
+-# chkconfig: 2345 65 35
++# chkconfig: - 65 35
+ # description: yaws - Erlang enabled http server
+ # use "/sbin/chkconfig --add yaws" to install
+
+@@ -21,6 +21,7 @@ prog=yaws
+ yawsid=default
+ #yawsid_opts="--id $yawsid"
+ conf="--conf %etcdir%yaws/yaws.conf"
++[ "$HOME" ] || HOME=/root
+
+ start() {
+ echo -n $"Starting $prog: "
+@@ -62,7 +63,7 @@ case "$1" in
+ stop
+ ;;
+ status)
+- $yaws -S
++ [ -f ${HOME}/.yaws/yaws/default/CTL ] && $yaws -S
+ RETVAL=$?
+ ;;
+ restart)
+@@ -70,7 +71,7 @@ case "$1" in
+ start
+ ;;
+ condrestart)
+- if [ -f /tmp/yaws.ctl ] ; then
++ if [ -f ${HOME}/.yaws/yaws/default/CTL ] && $yaws -S >/dev/null 2>&1 ; then
+ stop
+ start
+ fi
+--
+1.7.4.1
+
diff --git a/yaws.logrotate b/yaws.logrotate
new file mode 100644
index 0000000..4dc3e32
--- /dev/null
+++ b/yaws.logrotate
@@ -0,0 +1,11 @@
+/var/log/yaws/*.log /var/log/yaws/*.access {
+ weekly
+ rotate 2
+ missingok
+ sharedscripts
+ notifempty
+ sharedscripts
+ postrotate
+ /sbin/service yaws reload >/dev/null 2>&1 || :
+ endscript
+}
diff --git a/yaws.spec b/yaws.spec
new file mode 100644
index 0000000..f4eb640
--- /dev/null
+++ b/yaws.spec
@@ -0,0 +1,197 @@
+# We're in fact noarch
+%global xdebug_package %{nil}
+
+%bcond_without docs
+
+Name: yaws
+Version: 1.92
+Release: 3%{?dist}
+Summary: Web server for dynamic content written in Erlang
+Group: System Environment/Daemons
+# BSD: see LICENSE
+# ERPL: json.erl, benchmarks/bench.erl, benchmarks/bench.hrl,
+# benchmarks/all.erl, haxe.erl
+# LGPLv2: test/ibrowse
+# Copyright only: priv/soap.xsd, priv/wsdl.xsd
+# W3C: priv/envelope.xsd
+License: BSD and ERPL and LGPLv2 and Copyright only and W3C
+URL: http://yaws.hyber.org/
+Source0: http://yaws.hyber.org/download/%{name}-%{version}.tar.gz
+Source1: yaws.logrotate
+Patch0: yaws-1.92-sysvinit.patch
+Patch1: yaws-1.92-fhs.patch
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
+BuildRequires: erlang-erts
+BuildRequires: erlang-erlsom
+BuildRequires: erlang-kernel
+BuildRequires: erlang-mnesia
+BuildRequires: erlang-sasl
+BuildRequires: erlang-ssl
+BuildRequires: erlang-stdlib
+BuildRequires: pam-devel
+%if %{with docs}
+BuildRequires: tex(latex)
+BuildRequires: tex(dvips)
+BuildRequires: latex2html
+%endif
+
+Requires: erlang >= R13B
+Requires: erlang-erlsom
+Requires: erlang-ibrowse
+Requires: erlang-xmlrpc
+Requires: logrotate
+Requires(post): chkconfig
+Requires(preun): chkconfig
+
+
+%description
+HTTP 1.0 and HTTP 1.1 web server capable of both static content page
+delivery and dynamic content generation using embedded Erlang code in the
+HTML pages. It provides virtual hosting capabilities and implements
+HTTP tracing and other debugging functionality such as interactive
+interpreter environment. Performance can be boosted with built-in support
+for RAM caching and streaming capabilities of dynamically generated
+content. Among security features are SSL and support for WWW-Authenticated
+pages.
+
+
+%package devel
+Summary: Development Files for %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+This package contains a pkg-config configuration for %{name}.
+
+
+%prep
+%setup -q
+%patch0 -p1 -b .sysvinit
+%patch1 -p1 -b .fhs
+
+# This requires egssapi which is not yet available
+rm -f src/authmod_gssapi.erl
+
+# Weird file name in Change Log is latin1-encoded
+iconv -f iso8859-1 -t utf8 ChangeLog >ChangeLog.utf8
+touch -r ChangeLog ChangeLog.utf8
+mv ChangeLog.utf8 ChangeLog
+
+# These are corrupted
+find . -name '*.dia' -delete
+
+
+%build
+%configure
+make %{?_smp_mflags} all
+%if %{with docs}
+# fails to build with smp_mflags sometimes
+make docs
+%endif
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+# Move init script to correct location
+install -d $RPM_BUILD_ROOT%{_initrddir}
+mv $RPM_BUILD_ROOT%{_sysconfdir}/init.d/yaws \
+ $RPM_BUILD_ROOT%{_initrddir}/yaws
+rmdir $RPM_BUILD_ROOT%{_sysconfdir}/init.d
+
+# Logrotate configuration
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
+install -p -m0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/yaws
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%post
+/sbin/chkconfig --add yaws
+
+
+%preun
+if [ $1 = 0 ]
+then
+ /sbin/service yaws stop >/dev/null 2>&1
+ /sbin/chkconfig --del yaws
+fi
+
+
+%postun
+if [ $1 -ge 1 ]
+then
+ /sbin/service yaws condrestart >/dev/null 2>&1 || :
+fi
+
+
+%files
+%defattr(-,root,root,-)
+%{_initrddir}/yaws
+%dir %{_sysconfdir}/yaws
+%config(noreplace) %{_sysconfdir}/yaws/yaws-cert.pem
+%config(noreplace) %{_sysconfdir}/yaws/yaws-key.pem
+%config(noreplace) %{_sysconfdir}/yaws/yaws.conf
+%config(noreplace) %{_sysconfdir}/logrotate.d/yaws
+%dir %{_localstatedir}/log/%{name}
+%{_localstatedir}/lib/yaws
+%{_bindir}/yaws
+%{_libdir}/erlang/lib/yaws
+%exclude %{_libdir}/erlang/lib/yaws/ebin/.empty
+%if %{with docs}
+%doc doc/yaws.pdf
+%endif
+%doc %{_datadir}/man/man1/yaws.1*
+%doc %{_datadir}/man/man5/yaws.conf.5*
+%doc %{_datadir}/man/man5/yaws_api.5*
+%doc README LICENSE ChangeLog
+%exclude %{_libdir}/erlang/lib/yaws/examples
+
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/pkgconfig/yaws.pc
+
+
+%changelog
+* Sun Jul 22 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.92-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.92-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Tue Jan 03 2012 Lubomir Rintel (GoodData) <lkundrak at v3.sk> - 1.92-1
+- Update
+
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.89-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Thu Nov 18 2010 Peter Lemenkov <lemenkov at gmail.com> - 1.89-3
+- Make building docs conditional
+- Added one more module to package
+- Added missing runtime dependency - erlang-xmlrpc
+
+* Thu Oct 21 2010 Lubomir Rintel (GoodData) <lkundrak at v3.sk> - 1.89-2
+- Require newer Erlang (Peter Lemenkov)
+- Exclude examples/ and src/
+
+* Wed Oct 20 2010 Lubomir Rintel (GoodData) <lkundrak at v3.sk> - 1.89-1
+- Rebase to 1.89
+- No longer required patch for compiling using system-wide erlsom (Peter Lemenkov)
+- Ver. 1.89 now requires erlang-ibrowse library (Peter Lemenkov)
+- Shorten the dependency chain (Peter Lemenkov)
+
+* Mon Sep 13 2010 Lubomir Rintel (GoodData) <lkundrak at v3.sk> - 1.88-1
+- Rebase to 1.88
+- Look for erlsom in system-wide location (Peter Lemenkov)
+- Drop authmod_gssapi, dependencies not satisfied
+
+* Sat Nov 21 2009 Lubomir Rintel (Good Data) <lkundrak at v3.sk> - 1.85-2
+- Install to erlang lib directory, make arch dependent
+- Install the source code
+
+* Mon Nov 02 2009 Lubomir Rintel (Good Data) <lkundrak at v3.sk> - 1.85-1
+- Initial packaging, partly based on Hans Ulrich Niedermann's package
More information about the scm-commits
mailing list