[yaws/epel7] Rebase
Lubomir Rintel
lkundrak at fedoraproject.org
Thu Feb 13 19:23:41 UTC 2014
commit 08071fc430aa98501068c6c7b914ac36e9af7b07
Author: Lubomir Rintel <lkundrak at v3.sk>
Date: Thu Feb 13 20:11:51 2014 +0100
Rebase
.gitignore | 1 +
sources | 1 +
...ime.erl-to-the-list-of-modules-to-compile.patch | 30 ----
yaws-1.92-fhs.patch | 182 --------------------
yaws-1.98-conf.patch | 74 ++++++++
yaws-1.98-fhs.patch | 138 +++++++++++++++
yaws.spec | 29 ++--
7 files changed, 228 insertions(+), 227 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 3a60d9a..42b3552 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/yaws-1.89.tar.gz
+/yaws-1.98.tar.gz
diff --git a/sources b/sources
index e69de29..94d4114 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+de009e46209a6acd27713665b661e711 yaws-1.98.tar.gz
diff --git a/yaws-1.98-conf.patch b/yaws-1.98-conf.patch
new file mode 100644
index 0000000..f22e7c6
--- /dev/null
+++ b/yaws-1.98-conf.patch
@@ -0,0 +1,74 @@
+From a3c9edf6a82af97fb6f4b0c92199dec0a9aa4960 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak at v3.sk>
+Date: Thu, 13 Feb 2014 20:20:31 +0100
+Subject: [PATCH] Fix up default configuration
+
+No SSL example to make rpmlint happy and no reliance on build host hostname.
+---
+ scripts/gen-yaws-conf | 2 +-
+ scripts/regular-install | 4 ++--
+ scripts/yaws.conf.template | 24 ++++++++++++------------
+ 3 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/scripts/gen-yaws-conf b/scripts/gen-yaws-conf
+index c09cd20..81ac910 100755
+--- a/scripts/gen-yaws-conf
++++ b/scripts/gen-yaws-conf
+@@ -9,7 +9,7 @@ cat yaws.conf.template | \
+ ./Subst %yawsdir% "$YAWSDIR" | \
+ ./Subst %logdir% "$LOGDIR" | \
+ ./Subst %vardir% "$VARDIR" | \
+- ./Subst %host% `hostname` | \
++ ./Subst %host% baphomet | \
+ ./Subst %port% $PORT | \
+ ./Subst %docroot% "$DOCROOT" | \
+ ./Subst %certdir% "$CERTDIR" | \
+diff --git a/scripts/regular-install b/scripts/regular-install
+index 17a69e8..3b2a5e2 100755
+--- a/scripts/regular-install
++++ b/scripts/regular-install
+@@ -23,7 +23,7 @@ else
+ [ -d "${DESTDIR}${ETCDIR}/yaws" ] || mkdir "${DESTDIR}${ETCDIR}/yaws"
+ cp yaws.conf "$conffile"
+ fi
+-cp ../ssl/yaws-cert.pem "${DESTDIR}${ETCDIR}/yaws"
+-cp ../ssl/yaws-key.pem "${DESTDIR}${ETCDIR}/yaws"
++#cp ../ssl/yaws-cert.pem "${DESTDIR}${ETCDIR}/yaws"
++#cp ../ssl/yaws-key.pem "${DESTDIR}${ETCDIR}/yaws"
+
+ exit 0
+diff --git a/scripts/yaws.conf.template b/scripts/yaws.conf.template
+index 57e998e..4314891 100644
+--- a/scripts/yaws.conf.template
++++ b/scripts/yaws.conf.template
+@@ -136,15 +136,15 @@ keepalive_timeout = 30000
+
+ # Now an SSL server
+
+-<server %host%>
+- port = %sslport%
+- docroot = /tmp
+- listen = 0.0.0.0
+- dir_listings = true
+- auth_log = true
+- <ssl>
+- keyfile = %certdir%/yaws-key.pem
+- certfile = %certdir%/yaws-cert.pem
+- depth = 0
+- </ssl>
+-</server>
++#<server %host%>
++# port = %sslport%
++# docroot = /tmp
++# listen = 0.0.0.0
++# dir_listings = true
++# auth_log = true
++# <ssl>
++# keyfile = %certdir%/yaws-key.pem
++# certfile = %certdir%/yaws-cert.pem
++# depth = 0
++# </ssl>
++#</server>
+--
+1.8.3.1
+
diff --git a/yaws-1.98-fhs.patch b/yaws-1.98-fhs.patch
new file mode 100644
index 0000000..fdd643b
--- /dev/null
+++ b/yaws-1.98-fhs.patch
@@ -0,0 +1,138 @@
+From af16ac52d6d3f55859b46f5e7b01d5f30deb9522 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.
+[lkundrak at v3.sk: Rebased to 1.98, some issues addressed upstream, some not].
+---
+ Makefile | 2 +-
+ examples/src/Makefile | 2 +-
+ scripts/Makefile | 4 ++--
+ scripts/local-install | 5 +++--
+ scripts/yaws.conf.template | 2 +-
+ src/Makefile | 6 +++---
+ www/code/Makefile | 2 +-
+ www/shoppingcart/Makefile | 2 +-
+ 8 files changed, 13 insertions(+), 12 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 51648bc..48f98b6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -36,7 +36,7 @@ install: all
+ @echo "** executables went into ${prefix}/bin"
+ @echo "** library files went into ${LIBDIR}/yaws"
+ @echo "** var files went into ${VARDIR}"
+- @echo "** default docroot went into ${VARDIR}/yaws/www"
++ @echo "** default docroot went into ${VARDIR}/lib/yaws/www"
+ @echo
+ @echo "--------------------------------"
+
+diff --git a/examples/src/Makefile b/examples/src/Makefile
+index a4926a9..14efdf3 100644
+--- a/examples/src/Makefile
++++ b/examples/src/Makefile
+@@ -27,4 +27,4 @@ clean:
+ rm -f $(EBIN_FILES)
+
+ install: all
+- cp -f ../ebin/*.beam $(DESTDIR)$(VARDIR)/yaws/ebin
++ cp -f ../ebin/*.beam $(DESTDIR)$(VARDIR)/lib/yaws/ebin
+diff --git a/scripts/Makefile b/scripts/Makefile
+index 22044e9..5ca2f34 100644
+--- a/scripts/Makefile
++++ b/scripts/Makefile
+@@ -13,8 +13,8 @@ local_install: ../bin/yaws
+ VARDIR="${HOME}/var" ./local-install true
+
+ yaws.conf:
+- YAWSDIR='$(LIBDIR)/yaws' LOGDIR='$(PREFIX)/var/log/yaws' \
+- VARDIR='$(VARDIR)' PORT=80 DOCROOT='$(VARDIR)/yaws/www' \
++ YAWSDIR='$(LIBDIR)/yaws' LOGDIR='$(VARDIR)/log/yaws' \
++ VARDIR='$(VARDIR)' PORT=80 DOCROOT='$(VARDIR)/lib/yaws/www' \
+ CERTDIR='$(ETCDIR)/yaws' SSLPORT=443 ./gen-yaws-conf > $@
+
+ clean:
+diff --git a/scripts/local-install b/scripts/local-install
+index 23e163b..1a8c4e6 100755
+--- a/scripts/local-install
++++ b/scripts/local-install
+@@ -41,8 +41,9 @@ fi
+
+ topdir=`cd .. && pwd`
+ [ -d "${VARDIR}" ] || mkdir "${VARDIR}"
+-[ -d "${VARDIR}/yaws" ] || mkdir "${VARDIR}/yaws"
+-[ -d "${VARDIR}/yaws/ebin" ] || mkdir "${VARDIR}/yaws/ebin"
++[ -d "${VARDIR}/lib" ] || mkdir "${VARDIR}/lib"
++[ -d "${VARDIR}/lib/yaws" ] || mkdir "${VARDIR}/lib/yaws"
++[ -d "${VARDIR}/lib/yaws/ebin" ] || mkdir "${VARDIR}/lib/yaws/ebin"
+ YAWSDIR="$topdir" LOGDIR="$logdir" VARDIR="$VARDIR" PORT=8000 \
+ DOCROOT="${topdir}/www" CERTDIR="${topdir}/ssl" SSLPORT=4443 \
+ ./gen-yaws-conf > $tmpgen
+diff --git a/scripts/yaws.conf.template b/scripts/yaws.conf.template
+index d611996..57e998e 100644
+--- a/scripts/yaws.conf.template
++++ b/scripts/yaws.conf.template
+@@ -11,7 +11,7 @@ logdir = %logdir%
+ # beam code can be placed. The daemon will add these
+ # directories to its search path.
+ ebin_dir = %yawsdir%/examples/ebin
+-ebin_dir = %vardir%/yaws/ebin
++ebin_dir = %vardir%/lib/yaws/ebin
+
+ # This is a directory where application specific .hrl
+ # files can be placed. Application-specific .yaws code can
+diff --git a/src/Makefile b/src/Makefile
+index b0341ef..29780a7 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -105,7 +105,7 @@ install: all docsinstall
+ $(INSTALL) -d $(DESTDIR)$(LIBDIR)/yaws/ebin
+ $(INSTALL) -d $(DESTDIR)$(LIBDIR)/yaws/priv
+ $(INSTALL) -d $(DESTDIR)$(VARDIR)/log/yaws
+- $(INSTALL) -d $(DESTDIR)$(VARDIR)/yaws/ebin
++ $(INSTALL) -d $(DESTDIR)$(VARDIR)/lib/yaws/ebin
+ (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 - )
+@@ -113,8 +113,8 @@ install: all docsinstall
+ $(MAKE) IS_LOCAL_INSTALL=true gen_yaws_generated
+
+ docsinstall:
+- $(INSTALL) -d $(DESTDIR)$(VARDIR)/yaws/www
+- (cd ..; tar cf - www ) | (cd $(DESTDIR)$(VARDIR)/yaws; tar xf - )
++ $(INSTALL) -d $(DESTDIR)$(VARDIR)/lib/yaws/www
++ (cd ..; tar cf - www ) | (cd $(DESTDIR)$(VARDIR)/lib/yaws; tar xf - )
+
+ tags:
+ erl -noshell -pa ../ebin -s yaws_debug mktags
+diff --git a/www/code/Makefile b/www/code/Makefile
+index 17e600e..f267542 100644
+--- a/www/code/Makefile
++++ b/www/code/Makefile
+@@ -5,7 +5,7 @@ all: myappmod.beam
+ debug:
+
+ install: all
+- cp -f myappmod.beam $(DESTDIR)$(VARDIR)/yaws/ebin
++ cp -f myappmod.beam $(DESTDIR)$(VARDIR)/lib/yaws/ebin
+
+ clean:
+ $(RM) myappmod.beam
+diff --git a/www/shoppingcart/Makefile b/www/shoppingcart/Makefile
+index 580fb3f..063f313 100644
+--- a/www/shoppingcart/Makefile
++++ b/www/shoppingcart/Makefile
+@@ -5,7 +5,7 @@ all: shopcart.beam
+ debug:
+
+ install: all
+- cp -f shopcart.beam $(DESTDIR)$(VARDIR)/yaws/ebin
++ cp -f shopcart.beam $(DESTDIR)$(VARDIR)/lib/yaws/ebin
+
+ clean:
+ $(RM) -f shopcart.beam
+--
+1.8.3.1
+
diff --git a/yaws.spec b/yaws.spec
index f4eb640..64447e7 100644
--- a/yaws.spec
+++ b/yaws.spec
@@ -1,25 +1,22 @@
-# We're in fact noarch
-%global xdebug_package %{nil}
-
%bcond_without docs
Name: yaws
-Version: 1.92
-Release: 3%{?dist}
+Version: 1.98
+Release: 1%{?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
+License: BSD and ERPL 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
+Patch1: yaws-1.98-fhs.patch
+Patch2: yaws-1.98-conf.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: erlang-erts
@@ -33,6 +30,7 @@ BuildRequires: pam-devel
%if %{with docs}
BuildRequires: tex(latex)
BuildRequires: tex(dvips)
+BuildRequires: tex-epstopdf
BuildRequires: latex2html
%endif
@@ -69,6 +67,7 @@ This package contains a pkg-config configuration for %{name}.
%setup -q
%patch0 -p1 -b .sysvinit
%patch1 -p1 -b .fhs
+%patch2 -p1 -b .conf
# This requires egssapi which is not yet available
rm -f src/authmod_gssapi.erl
@@ -87,7 +86,7 @@ find . -name '*.dia' -delete
make %{?_smp_mflags} all
%if %{with docs}
# fails to build with smp_mflags sometimes
-make docs
+make docs EPSTOPDF=epstopdf
%endif
@@ -133,23 +132,20 @@ fi
%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
+%{_libdir}/yaws
+%exclude %{_libdir}/yaws/ebin/.empty
%if %{with docs}
-%doc doc/yaws.pdf
+%doc %{_docdir}/yaws/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,-)
@@ -157,6 +153,9 @@ fi
%changelog
+* Thu Feb 13 2014 Lubomir Rintel (GoodData) <lkundrak at v3.sk> - 1.98-1
+- Rebase
+
* 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
More information about the scm-commits
mailing list