diff --git a/pkgs/servers/http/myserver/TESTS.patch b/pkgs/servers/http/myserver/TESTS.patch deleted file mode 100644 index 2308d811fc6d..000000000000 --- a/pkgs/servers/http/myserver/TESTS.patch +++ /dev/null @@ -1,23 +0,0 @@ -This patch fixes the incorrect use of Automake's $(TESTS) in the -top-level `Makefile.am'. - ---- myserver-0.9/Makefile.in 2009-08-10 19:00:59.000000000 +0200 -+++ myserver-0.9/Makefile.in 2009-08-19 17:30:06.000000000 +0200 -@@ -243,14 +243,14 @@ target_vendor = @target_vendor@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --@BUILD_TESTS_TRUE@TESTS = tests -+@BUILD_TESTS_TRUE@test_dir = tests - @BUILD_DOC_TRUE@DOCS = documentation - am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-pthread-check.m4 \ - $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/libxml.m4 $(top_srcdir)/m4/cppunit.m4 \ - $(top_srcdir)/configure.in - --SUBDIRS = src include $(CONTROL) $(CGI_LIB) binaries $(DOCS) $(TESTS) -+SUBDIRS = src include $(CONTROL) $(CGI_LIB) binaries $(DOCS) $(test_dir) - EXTRA_DIST = stdafx.h stdafx.cpp doxygen SConstruct - all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - diff --git a/pkgs/servers/http/myserver/default.nix b/pkgs/servers/http/myserver/default.nix index 3fbe1ea79ecd..45e7f33681f0 100644 --- a/pkgs/servers/http/myserver/default.nix +++ b/pkgs/servers/http/myserver/default.nix @@ -1,18 +1,18 @@ { fetchurl, stdenv, libgcrypt, libevent, libidn, gnutls -, libxml2, zlib, texinfo, cppunit }: +, libxml2, zlib, texinfo, cppunit, xz }: -let version = "0.9"; in +let version = "0.9.2"; in stdenv.mkDerivation rec { name = "myserver-${version}"; src = fetchurl { - url = "mirror://gnu/myserver/${version}/${name}.tar.bz2"; - sha256 = "1fhqgxfyhw6kygbicddpn2575mp8ybck3yffscbw26xmjkpm7nxy"; + url = "mirror://gnu/myserver/${version}/${name}.tar.xz"; + sha256 = "110001ssyrvmvqrkxbz09a5m945ahh478v1l7aq31gh1l9j0cf6n"; }; - patches = [ ./prefix.patch ./TESTS.patch ]; + patches = [ ./tests-in-chroot.patch ]; - buildInputs = [ libgcrypt libevent libidn gnutls libxml2 zlib texinfo ] + buildInputs = [ libgcrypt libevent libidn gnutls libxml2 zlib texinfo xz ] ++ stdenv.lib.optional doCheck cppunit; doCheck = true; diff --git a/pkgs/servers/http/myserver/prefix.patch b/pkgs/servers/http/myserver/prefix.patch deleted file mode 100644 index c04f72b42ee2..000000000000 --- a/pkgs/servers/http/myserver/prefix.patch +++ /dev/null @@ -1,85 +0,0 @@ -Don't attempt to create directories outside of $(prefix). - ---- myserver-0.9/binaries/logs/Makefile.in 2009-08-10 19:00:38.000000000 +0200 -+++ myserver-0.9/binaries/logs/Makefile.in 2009-08-19 17:40:20.000000000 +0200 -@@ -370,7 +370,7 @@ uninstall-am: - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - - install : -- $(INSTALL) -d $(DESTDIR)/var/log/myserver -+ true - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. - ---- myserver-0.9/binaries/web/cgi-bin/Makefile.in 2009-08-10 19:00:40.000000000 +0200 -+++ myserver-0.9/binaries/web/cgi-bin/Makefile.in 2009-08-19 20:39:01.000000000 +0200 -@@ -211,7 +211,7 @@ target_vendor = @target_vendor@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --myserverdatadir = $(DESTDIR)/var/web/cgi-bin -+myserverdatadir = $(DESTDIR)$(prefix)/var/web/cgi-bin - dist_myserverdata_DATA = counter.html default.html counter.readme - all: all-am - ---- myserver-0.9/binaries/web/cgi-src/math_sum/Makefile.in 2009-08-10 19:00:40.000000000 +0200 -+++ myserver-0.9/binaries/web/cgi-src/math_sum/Makefile.in 2009-08-20 17:28:19.000000000 +0200 -@@ -545,7 +545,7 @@ math_sum.mscgi : $(libmath_sum_a_OBJECTS - $(CXX) $(libmath_sum_a_OBJECTS) ../../../../src/libmyserver.a $(libmath_sum_a_LIBADD) $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) -o math_sum.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS) - - install : math_sum.mscgi -- $(INSTALL) -D 'math_sum.mscgi' '$(DESTDIR)/var/web/cgi-bin/math_sum.mscgi' -+ $(INSTALL) -D 'math_sum.mscgi' '$(DESTDIR)$(prefix)/var/web/cgi-bin/math_sum.mscgi' - - clean : - rm -f math_sum.mscgi - ---- myserver-0.9/binaries/web/cgi-src/post/Makefile.in 2009-08-10 19:00:40.000000000 +0200 -+++ myserver-0.9/binaries/web/cgi-src/post/Makefile.in 2009-08-20 17:33:47.000000000 +0200 -@@ -545,7 +545,7 @@ post.mscgi : $(libpost_a_OBJECTS) $(libp - $(CXX) $(libpost_a_OBJECTS) ../../../../src/libmyserver.a $(libpost_a_LIBADD) $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) -o post.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS) - - install : post.mscgi -- $(INSTALL) -D 'post.mscgi' '$(DESTDIR)/var/web/cgi-bin/post.mscgi' -+ $(INSTALL) -D 'post.mscgi' '$(DESTDIR)$(prefix)/var/web/cgi-bin/post.mscgi' - - clean : - rm -f post.mscgi - ---- myserver-0.9/binaries/web/Makefile.in 2009-08-10 19:00:39.000000000 +0200 -+++ myserver-0.9/binaries/web/Makefile.in 2009-08-20 22:37:43.000000000 +0200 -@@ -253,7 +253,7 @@ top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ - @BUILD_MSCGI_TRUE@CGI_SRC = cgi-src - SUBDIRS = cgi-bin $(CGI_SRC) --myserverdatadir = $(DESTDIR)/var/web -+myserverdatadir = $(DESTDIR)$(prefix)/var/web - dist_myserverdata_DATA = logo.png goto.png default.html link.html - all: all-recursive - ---- myserver-0.9/binaries/certificates/Makefile.in 2009-08-10 19:00:38.000000000 +0200 -+++ myserver-0.9/binaries/certificates/Makefile.in 2009-08-21 11:18:31.000000000 +0200 -@@ -371,8 +371,8 @@ uninstall-am: - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - - install : -- $(INSTALL) -d '$(DESTDIR)/etc/myserver/certificates' -- $(INSTALL) 'how_create_certificates.txt' '$(DESTDIR)/etc/myserver/certificates/how_create_certificates.txt' -+ $(INSTALL) -d '$(DESTDIR)$(prefix)/etc/myserver/certificates' -+ $(INSTALL) 'how_create_certificates.txt' '$(DESTDIR)$(prefix)/etc/myserver/certificates/how_create_certificates.txt' - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. - ---- myserver-0.9/binaries/Makefile.in 2009-08-10 19:00:38.000000000 +0200 -+++ myserver-0.9/binaries/Makefile.in 2009-08-21 11:59:43.000000000 +0200 -@@ -230,7 +230,7 @@ SUBDIRS = languages logs system web cert - EXTRA_DIST = myserver-daemon MIMEtypes.default.xml myserver.default.xml \ - virtualhosts.default.xml - --configdir = $(DESTDIR)/etc/myserver -+configdir = $(DESTDIR)$(prefix)/etc/myserver - all: all-recursive - - .SUFFIXES: diff --git a/pkgs/servers/http/myserver/tests-in-chroot.patch b/pkgs/servers/http/myserver/tests-in-chroot.patch new file mode 100644 index 000000000000..83d1adf7c5b6 --- /dev/null +++ b/pkgs/servers/http/myserver/tests-in-chroot.patch @@ -0,0 +1,35 @@ +Some of the tests can't be run in a chroot: + + - `test_homedir' wants to access /etc/passwd. + - `test_socket' would want /etc/hosts. + +--- myserver-0.9.2/tests/test_homedir.cpp 2010-02-14 21:04:14.000000000 +0100 ++++ myserver-0.9.2/tests/test_homedir.cpp 2010-02-16 11:22:23.000000000 +0100 +@@ -58,6 +58,7 @@ public: + * if it doesn't handle this differently. */ + username.assign ("root"); + #endif ++#if 0 + string dir; + + CPPUNIT_ASSERT_EQUAL (homeDir->getHomeDir (username, dir), 0); +@@ -65,6 +66,7 @@ public: + CPPUNIT_ASSERT (dir.length ()); + + homeDir->clear (); ++#endif + } + + }; + +--- myserver-0.9.2/tests/test_socket.cpp 2010-02-14 21:04:14.000000000 +0100 ++++ myserver-0.9.2/tests/test_socket.cpp 2010-02-16 11:31:00.000000000 +0100 +@@ -178,7 +178,7 @@ static DEFINE_THREAD (testRecvClient, pP + { + int ret; + Socket *obj2 = new Socket; +- char host[] = "localhost"; ++ char host[] = "127.0.0.1"; + + ret = obj2->socket (AF_INET, SOCK_STREAM, 0); + CPPUNIT_ASSERT (ret != -1); diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 317f1f80b5a1..c7ba46c3a699 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5456,7 +5456,7 @@ let myserver = import ../servers/http/myserver { inherit fetchurl stdenv libgcrypt libevent libidn gnutls libxml2 - zlib texinfo cppunit; + zlib texinfo cppunit xz; }; nginx = builderDefsPackage (import ../servers/http/nginx) {