diff --git a/pkgs/os-specific/linux/davfs2/davfs2-install.patch b/pkgs/os-specific/linux/davfs2/davfs2-install.patch new file mode 100644 index 00000000000..93e9b09a914 --- /dev/null +++ b/pkgs/os-specific/linux/davfs2/davfs2-install.patch @@ -0,0 +1,49 @@ +diff -rc davfs2-1.4.1/src/Makefile.in davfs2-1.4.1-new/src/Makefile.in +*** davfs2-1.4.1/src/Makefile.in 2009-06-13 18:31:22.000000000 +0200 +--- davfs2-1.4.1-new/src/Makefile.in 2009-09-22 09:12:09.523154536 +0200 +*************** +*** 489,500 **** + + + install-exec-hook: +! chmod u+s $(DESTDIR)$(sbindir)/mount.davfs; \ +! if test "$(sbindir)" != "$(ssbindir)"; then \ +! $(mkinstalldirs) $(DESTDIR)$(ssbindir); \ +! $(LN_S) -f $(DESTDIR)$(sbindir)/mount.davfs $(DESTDIR)$(ssbindir)/mount.davfs; \ +! $(LN_S) -f $(DESTDIR)$(sbindir)/umount.davfs $(DESTDIR)$(ssbindir)/umount.davfs; \ +! fi + + uninstall-hook: + if test "$(sbindir)" != "$(ssbindir)"; then \ +--- 489,495 ---- + + + install-exec-hook: +! chmod u+s $(DESTDIR)$(sbindir)/mount.davfs; + + uninstall-hook: + if test "$(sbindir)" != "$(ssbindir)"; then \ +diff -rc davfs2-1.4.1/src/mount_davfs.c davfs2-1.4.1-new/src/mount_davfs.c +*** davfs2-1.4.1/src/mount_davfs.c 2009-06-12 11:54:58.000000000 +0200 +--- davfs2-1.4.1-new/src/mount_davfs.c 2009-09-22 09:45:21.462726033 +0200 +*************** +*** 2327,2335 **** + } + if (st.st_uid != geteuid()) + error(EXIT_FAILURE, 0, _("file %s has wrong owner"), filename); +! if ((st.st_mode & + (S_IXUSR | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX)) != 0) +! error(EXIT_FAILURE, 0, _("file %s has wrong permissions"), filename); + + FILE *file = fopen(filename, "r"); + if (!file) { +--- 2327,2335 ---- + } + if (st.st_uid != geteuid()) + error(EXIT_FAILURE, 0, _("file %s has wrong owner"), filename); +! /* if ((st.st_mode & + (S_IXUSR | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX)) != 0) +! error(EXIT_FAILURE, 0, _("file %s has wrong permissions"), filename); */ + + FILE *file = fopen(filename, "r"); + if (!file) { diff --git a/pkgs/os-specific/linux/davfs2/default.nix b/pkgs/os-specific/linux/davfs2/default.nix new file mode 100644 index 00000000000..b4acc96f208 --- /dev/null +++ b/pkgs/os-specific/linux/davfs2/default.nix @@ -0,0 +1,20 @@ +{stdenv, fetchurl, neon, zlib}: + +stdenv.mkDerivation rec { + name = "davfs2-1.4.1"; + + src = fetchurl { + url = "http://www.very-clever.com/download/nongnu/davfs2/${name}.tar.gz"; + sha256 = "0fqq331rd3ylzfhdsbbj0b2znn3d0js0kxcv3w54dl9g2cs8fqhn"; + }; + + buildInputs = [ neon zlib ]; + patches = [ ./davfs2-install.patch ]; + + meta = { + description = "Web Distributed Authoring and Versioning (WebDAV), an extension to the HTTP-protocol, allows authoring of resources on a remote web server. davfs2 provides the ability to access such resources like a typical filesystem, allowing for use by standard applications with no built-in support for WebDAV."; + + license = "GPLv3+"; + homepage = http://savannah.nongnu.org/projects/davfs2; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 72a742402e9..57e25962e2c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4971,6 +4971,11 @@ let inherit fetchurl stdenv zlib; }; + davfs2 = import ../os-specific/linux/davfs2 { + inherit fetchurl stdenv zlib; + neon = neon028; + }; + devicemapper = import ../os-specific/linux/device-mapper { inherit fetchurl stdenv; };