X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 96C79DC0841 for ; Mon, 13 Jul 2015 20:14:56 +0000 (UTC) Received: from mail128-16.atl41.mandrillapp.com (mail128-16.atl41.mandrillapp.com [198.2.128.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 5C841DC03D8 for ; Mon, 13 Jul 2015 20:14:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=mandrill; d=mail128-16.atl41.mandrillapp.com; h=From:Sender:Subject:Message-Id:To:Date:MIME-Version:Content-Type:Content-Transfer-Encoding; i=harningt@mail128-16.atl41.mandrillapp.com; bh=8uhUmEEd9AueL9ag9m5lNLCxvEQ=; b=N+E2fRCKySLHSvtjk65pilxEHaBZVzGUvr1ugMXPJRHrAd+ozuJKpffu9YxE5gzgWF3lSmCimpqP xl/ltD7irW6gtbbzYuxLxnNIhS6s4HZ+91gvGg2iChZbKJnAy+REsBLlyv3oyRbiGxTGTW2wm8Vj 2nsJgTfM5YPi98UCR4U= DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=mail128-16.atl41.mandrillapp.com; b=RhTmXpa55NKDi5iYCeNX8y+M4Hu9S5Z2GjhK+owv598awnR5OhLUDq9qclXCIhY2DevgKNHTcTHV rCkoCH7FnNUIPoKAxtKhC8IYpcWEKlCRnbz/JbdUGX2arzTCIpHTNSh7lbagr2+tcmwUawiDbjqk xshJ/UFoGUiHPUepoGk=; Received: from pmta01.mandrill.prod.atl01.rsglab.com (127.0.0.1) by mail128-16.atl41.mandrillapp.com id hkge401mquko for ; Mon, 13 Jul 2015 20:14:55 +0000 (envelope-from ) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; i=@mandrillapp.com; q=dns/txt; s=mandrill; t=1436818495; h=From : Sender : Subject : Message-Id : To : Date : MIME-Version : Content-Type : Content-Transfer-Encoding : From : Subject : Date : X-Mandrill-User : List-Unsubscribe; bh=6TyfynIRYJUEjmQdWqRMY8KLczK1c7juLTjmiDk/UiI=; b=KkEM0Bs7RZjdgwro+xUh0yc5bFmwMw9ktySI3GoSBM2axkvry9K9QV9pXfmZBdGXLJZR5p kLxy21TlxlRCzzLtCLJOoYnUdsbxFOuYOuRtpCltx6Nr0BRfi0bCPLIge+GXioaXmhl4phuD MeA375bsVE0Ut/1qGvkAMGd9chco8= From: Thomas Harning Jr Sender: Thomas Harning Jr Subject: [alpine-aports] [PATCH] testing/davfs2: new aport Received: from [184.18.77.220] by mandrillapp.com id 17fe9c4847384c45b01529cbc8702df9; Mon, 13 Jul 2015 20:14:55 +0000 X-Mailer: git-send-email 2.4.5 Message-Id: <1436818473-1738-1-git-send-email-harningt@gmail.com> To: X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30683667.17fe9c4847384c45b01529cbc8702df9 X-Mandrill-User: md_30683667 Date: Mon, 13 Jul 2015 20:14:55 +0000 X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP http://savannah.nongnu.org/projects/davfs2 Linux FUSE (or coda) driver that allows you to mount a WebDAV resource I based this build off of the Gentoo ebuild and the OpenWRT build files/patches https://github.com/openwrt/packages/tree/master/net/davfs2 Had to modify one of the patches to add iconv.h to automake tests due to HAVE_ICONV_H being used but HAVE_ICONV was defined with 'iconv' rules and both definitions being used. Regarding maintainership - I could possibly keep up with the project and keep it up-to-date. --- testing/davfs2/010-main_code_fix.patch | 35 ++++++ testing/davfs2/100-musl-compat.patch | 194 +++++++++++++++++++++++++++++++++ testing/davfs2/APKBUILD | 71 ++++++++++++ testing/davfs2/davfs2.pre-install | 6 + 4 files changed, 306 insertions(+) create mode 100644 testing/davfs2/010-main_code_fix.patch create mode 100644 testing/davfs2/100-musl-compat.patch create mode 100644 testing/davfs2/APKBUILD create mode 100755 testing/davfs2/davfs2.pre-install diff --git a/testing/davfs2/010-main_code_fix.patch b/testing/davfs2/010-main_code_fix.patch new file mode 100644 index 0000000..aa36fdf --- /dev/null +++ b/testing/davfs2/010-main_code_fix.patch @@ -0,0 +1,35 @@ +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -32,8 +32,8 @@ mount_davfs_SOURCES = cache.c dav_coda.c + kernel_interface.h mount_davfs.h webdav.h + umount_davfs_SOURCES = umount_davfs.c defaults.h + +-AM_CFLAGS = -Wall -Werror=format-security \ +- -fstack-protector --param=ssp-buffer-size=4 ++AM_CFLAGS = -Wall -Werror=format-security ++# -fstack-protector --param=ssp-buffer-size=4 -- removed ssp not supported in openwrt + DEFS = -DPROGRAM_NAME=\"mount.davfs\" \ + -DDAV_SYS_CONF_DIR=\"$(pkgsysconfdir)\" \ + -DDAV_LOCALSTATE_DIR=\"$(dav_localstatedir)\" \ +--- a/src/cache.c ++++ b/src/cache.c +@@ -58,7 +58,7 @@ + #ifdef HAVE_SYS_TYPES_H + #include + #endif +-#include ++#include + + #include + #include +--- a/src/webdav.c ++++ b/src/webdav.c +@@ -2033,7 +2033,7 @@ ssl_verify(void *userdata, int failures, + len = getline(&s, &n, stdin); + if (len < 0) + abort(); +- if (rpmatch(s) > 0) ++ if ((s[0]=='y' || s[0]=='Y') > 0) + ret = 0; + free(s); + } diff --git a/testing/davfs2/100-musl-compat.patch b/testing/davfs2/100-musl-compat.patch new file mode 100644 index 0000000..9663822 --- /dev/null +++ b/testing/davfs2/100-musl-compat.patch @@ -0,0 +1,194 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -42,7 +42,7 @@ DAV_CHECK_NEON + # Checks for header files. + AC_HEADER_DIRENT + AC_HEADER_STDC +-AC_CHECK_HEADERS([fcntl.h libintl.h langinfo.h limits.h locale.h mntent.h stddef.h stdint.h stdlib.h string.h sys/file.h sys/mount.h sys/time.h syslog.h termios.h unistd.h utime.h]) ++AC_CHECK_HEADERS([error.h fcntl.h iconv.h libintl.h langinfo.h limits.h locale.h mntent.h stddef.h stdint.h stdlib.h string.h sys/file.h sys/mount.h sys/time.h sys/select.h sys/types.h syslog.h termios.h unistd.h utime.h]) + + # Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST +@@ -78,7 +78,7 @@ AC_FUNC_SELECT_ARGTYPES + AC_FUNC_STRFTIME + AC_FUNC_STAT + AC_FUNC_UTIME_NULL +-AC_CHECK_FUNCS([endpwent ftruncate getmntent memset mkdir nl_langinfo rpmatch select setlocale strcasecmp strchr strdup strerror strpbrk strrchr strstr strtol strtoull utime]) ++AC_CHECK_FUNCS([endpwent ftruncate getmntent memset mkdir nl_langinfo rpmatch select setlocale strcasecmp strchr strdup strerror strpbrk strrchr strstr strtol strtoull utime canonicalize_file_name fopencookie]) + + # Misc. + DAV_DEFAULTS +--- a/src/cache.c ++++ b/src/cache.c +@@ -19,12 +19,12 @@ + + + #include "config.h" ++#include "compat.h" + + #ifdef HAVE_DIRENT_H + #include + #endif + #include +-#include + #ifdef HAVE_FCNTL_H + #include + #endif +--- a/src/dav_fuse.c ++++ b/src/dav_fuse.c +@@ -47,6 +47,9 @@ + #ifdef HAVE_SYS_STAT_H + #include + #endif ++#ifdef HAVE_SYS_SELECT_H ++#include ++#endif + + #include "defaults.h" + #include "mount_davfs.h" +--- a/src/kernel_interface.c ++++ b/src/kernel_interface.c +@@ -19,8 +19,8 @@ + + + #include "config.h" ++#include "compat.h" + +-#include + #ifdef HAVE_FCNTL_H + #include + #endif +@@ -51,6 +51,9 @@ + #ifdef HAVE_SYS_STAT_H + #include + #endif ++#ifdef HAVE_SYS_TYPES_H ++#include ++#endif + #include + + #include "defaults.h" +--- a/src/mount_davfs.c ++++ b/src/mount_davfs.c +@@ -19,10 +19,10 @@ + + + #include "config.h" ++#include "compat.h" + + #include + #include +-#include + #ifdef HAVE_FCNTL_H + #include + #endif +--- a/src/umount_davfs.c ++++ b/src/umount_davfs.c +@@ -19,8 +19,8 @@ + + + #include "config.h" ++#include "compat.h" + +-#include + #include + #include + #ifdef HAVE_LIBINTL_H +--- a/src/webdav.c ++++ b/src/webdav.c +@@ -19,9 +19,9 @@ + + + #include "config.h" ++#include "compat.h" + + #include +-#include + #ifdef HAVE_FCNTL_H + #include + #endif +@@ -368,6 +368,7 @@ dav_init_webdav(const dav_args *args) + error(EXIT_FAILURE, errno, _("socket library initialization failed")); + + if (args->neon_debug & ~NE_DBG_HTTPPLAIN) { ++#ifdef HAVE_FOPENCOOKIE + char *buf = malloc(log_bufsize); + cookie_io_functions_t *log_func = malloc(sizeof(cookie_io_functions_t)); + if (!log_func) abort(); +@@ -380,6 +381,9 @@ dav_init_webdav(const dav_args *args) + error(EXIT_FAILURE, errno, + _("can't open stream to log neon-messages")); + ne_debug_init(log_stream, args->neon_debug); ++#else ++ error(EXIT_FAILURE, 0, "neon debugging unsupported"); ++#endif + } + + session = ne_session_create(args->scheme, args->host, args->port); +--- /dev/null ++++ b/src/compat.h +@@ -0,0 +1,64 @@ ++#ifndef _COMPAT_H ++#define _COMPAT_H ++ ++#ifndef _PATH_MOUNTED ++# define _PATH_MOUNTED "/proc/mounts" ++#endif ++ ++#ifndef _PATH_MNTTAB ++# define _PATH_MNTTAB "/etc/fstab" ++#endif ++ ++#ifdef HAVE_ERROR_H ++# include ++#else ++# include ++# include ++# include ++# include ++static void error_at_line(int status, int errnum, const char *filename, ++ unsigned int linenum, const char *format, ...) ++{ ++ va_list ap; ++ ++ fflush(stdout); ++ ++ if (filename != NULL) ++ fprintf(stderr, "%s:%u: ", filename, linenum); ++ ++ va_start(ap, format); ++ vfprintf(stderr, format, ap); ++ va_end(ap); ++ ++ if (errnum != 0) ++ fprintf(stderr, ": %s", strerror(errnum)); ++ ++ fprintf(stderr, "\n"); ++ ++ if (status != 0) ++ exit(status); ++} ++ ++#define error(status, errnum, format...) \ ++ error_at_line(status, errnum, NULL, 0, format) ++ ++#endif /* HAVE_ERROR_H */ ++ ++#ifndef HAVE_CANONICALIZE_FILE_NAME ++#include ++#include ++#include ++static char * canonicalize_file_name(const char *path) ++{ ++ char buf[PATH_MAX] = { }; ++ ++ snprintf(buf, sizeof(buf) - 1, "%s", path); ++ ++ if (!realpath(path, buf)) ++ return NULL; ++ ++ return strdup(buf); ++} ++#endif ++ ++#endif /* _COMPAT_H */ diff --git a/testing/davfs2/APKBUILD b/testing/davfs2/APKBUILD new file mode 100644 index 0000000..e0f531c --- /dev/null +++ b/testing/davfs2/APKBUILD @@ -0,0 +1,71 @@ +# Contributor: Thomas Harning Jr. +# Maintainer: +pkgname=davfs2 +pkgver=1.5.2 +pkgrel=0 +pkgdesc="Linux FUSE (or coda) driver that allows you to mount a WebDAV resource" +url="http://savannah.nongnu.org/projects/davfs2" + +options="suid" + +pkggroups="davfs2" + +arch="all" +license="GPL3" +depends="libxml2 neon zlib" +depends_dev="libxml2-dev neon-dev zlib-dev" +makedepends="$depends_dev" +install="$pkgname.pre-install" +subpackages="$pkgname-doc" +source="http://mirror.lihnidos.org/GNU/savannah/davfs2/${pkgname}-${pkgver}.tar.gz + 010-main_code_fix.patch + 100-musl-compat.patch +" + +_builddir="$srcdir"/$pkgname-$pkgver +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + aclocal -I config \ + && autoheader \ + && automake --add-missing --force-missing --copy \ + && autoconf || return 1 + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + dav_user=nobody \ + --enable-largefile \ + || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install || return 1 + install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING + install -o root -g davfs2 -m 1774 -d "$pkgdir"/var/run/mount.davfs +} + +md5sums="376bc9346454135cba78afacbcb23f86 davfs2-1.5.2.tar.gz +15495a67412345c70e6b211fa8067350 010-main_code_fix.patch +48ee49fc56364a18f33c5def5b3a859f 100-musl-compat.patch" +sha256sums="be34a19ab57a6ea77ecb82083e9e4c1882e12b2de64257de567ad5ee7a17b358 davfs2-1.5.2.tar.gz +e546987cc6083ba2637206aab63e65d054c94bcb315db5ee5bf3774944dd7718 010-main_code_fix.patch +1ddddfde1110c155b1e0d2756a3310e13a35f6bd6e9a26ac8e3940b2fb5f0d20 100-musl-compat.patch" +sha512sums="c912049e23b76bda19c2ae2d07bc2b1da7ed9bf82b338c57c0f9fb8a3144cbbb52a0e8f8c2f8996342c7aa434470d062996c30bbbe0f1c6623c81af6414fbb45 davfs2-1.5.2.tar.gz +99ced4c7183540653b5eb3b9fc6afd06b3d959134c41c2c3a7d65460d6fe9766c9d7f2b774f3064f5e4fd86992fbf500c3e4386a0d814834eb40fb55041bc396 010-main_code_fix.patch +44ce904db9e4efc48efdb74b791c2a5d135baa1272385906f85ea99fbf3254b010d6d1b4701091f784deebc0d2ebb3ca16a68c768e4af184b2504f31b7a65b3b 100-musl-compat.patch" diff --git a/testing/davfs2/davfs2.pre-install b/testing/davfs2/davfs2.pre-install new file mode 100755 index 0000000..062477c --- /dev/null +++ b/testing/davfs2/davfs2.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +if ! getent group davfs2 >/dev/null; then + addgroup -S davfs2 +fi +exit 0 -- 2.4.5 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---