[OpenWrt-Devel] [PATCH] [packages] Davfs2: added new package version 1.5

Daniel Petre daniel.petre at gmail.com
Tue Aug 5 13:28:52 EDT 2014



On 05/08/14 19:09, Federico Di Marco wrote:
> No, not even tried. On ar71xx platform the final .ipk package size is
> less than 43KB, is that too big ?!?!?

not that bad for a 8 Mb flash router but still pulls some extra libs..
thanks for the package, i was preparing one myself :)

>
> -rw-r--r--    1 root     root         42487 Aug  5 16:03
> davfs2_1.5.0-1_ar71xx.ipk
>
> P.S. please reply also to me and not only to mailing list, thank you.
>
> On Tue, Aug 5, 2014 at 16:58:25 CEST 2014 Daniel Petre daniel.petre at
> gmail.com wrote:
>
> Hi Federico,
> did you try configuring davfs2 with --disable-largefile to see if
> packaged size drops?
>
> On Tue, Aug 5, 2014 at 4:47 PM, Federico Di Marco <fededim at gmail.com> wrote:
>> From: Federico Di Marco <fededim at gmail.com>
>>
>> Body of explanation:
>> A new package has been added in packages feed under net/davfs2
>> directory, porting a simple tool to mount a WebDAV resource as a
>> regular file system (please see
>> https://savannah.nongnu.org/projects/davfs2/ ) to OpenWRT. There was
>> also a previous ticket requesting the porting of this tool
>> (https://dev.openwrt.org/ticket/12843)
>>
>> The patch consists of the following files:
>> - Makefile: standard makefile of OpenWRT packages which downloads from
>> the source code and compiles it into a package using the
>> uClibc++.
>> - files/davfs2.conf: configuration file for davfs2
>> - patches/010-main_code_fix.patch: minor fixes to allow the source
>> code to compile under uClibc (remove rpmatch function not present in
>> uclibc and other small corrections)
>>
>>
>> Sign-off:
>> Developer's Certificate of Origin 1.1
>>
>> By making a contribution to this project, I certify that:
>>
>> (a) The contribution was created in whole or in part by me and I
>>      have the right to submit it under the open source license
>>      indicated in the file; or
>>
>> (b) The contribution is based upon previous work that, to the best
>>      of my knowledge, is covered under an appropriate open source
>>      license and I have the right under that license to submit that
>>      work with modifications, whether created in whole or in part
>>      by me, under the same open source license (unless I am
>>      permitted to submit under a different license), as indicated
>>      in the file; or
>>
>> (c) The contribution was provided directly to me by some other
>>      person who certified (a), (b) or (c) and I have not modified
>>      it.
>>
>> (d) I understand and agree that this project and the contribution
>>      are public and that a record of the contribution (including all
>>      personal information I submit with it, including my sign-off) is
>>      maintained indefinitely and may be redistributed consistent with
>>      this project or the open source license(s) involved.
>>
>> Signed-off-by: Federico Di Marco <fededim at gmail.com>
>>
>> ---
>>
>> Diff output (according to https://dev.openwrt.org/wiki/SubmittingPatches/Diff)
>>
>>
>> diff -uprN packages/net/davfs2/files/davfs2.conf
>> mypackages/net/davfs2/files/davfs2.conf
>> --- packages/net/davfs2/files/davfs2.conf 1970-01-01 01:00:00.000000000 +0100
>> +++ mypackages/net/davfs2/files/davfs2.conf 2014-08-05 16:32:10.767885118 +0200
>> @@ -0,0 +1,9 @@
>> +#
>> +# davfs2 configuration file
>> +# please see http://linux.die.net/man/5/davfs2.conf for details
>> +#
>> +
>> +dav_user nobody
>> +dav_group nogroup
>> +cache_dir /tmp/davfs2
>> +cache_size 4
>> diff -uprN packages/net/davfs2/Makefile mypackages/net/davfs2/Makefile
>> --- packages/net/davfs2/Makefile 1970-01-01 01:00:00.000000000 +0100
>> +++ mypackages/net/davfs2/Makefile 2014-08-05 16:32:10.767885118 +0200
>> @@ -0,0 +1,74 @@
>> +#
>> +# Copyright (C) 2006-2011 OpenWrt.org
>> +#
>> +# This is free software, licensed under the GNU General Public License v2.
>> +# See /LICENSE for more information.
>> +#
>> +
>> +include $(TOPDIR)/rules.mk
>> +
>> +PKG_NAME:=davfs2
>> +PKG_VERSION:=1.5.0
>> +PKG_RELEASE:=1
>> +
>> +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
>> +PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/davfs2/
>> +#PKG_MD5SUM:=0892fbf993407c6b5a16f96e23299b62
>> +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
>> +PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
>> +PKG_CAT :=zcat
>> +
>> +include $(INCLUDE_DIR)/package.mk
>> +
>> +define Package/davfs2
>> +  SECTION:=net
>> +  CATEGORY:=Network
>> +  SUBMENU:=Filesystem
>> +  DEPENDS=+libopenssl +libneon +libiconv +libintl +libexpat +kmod-fuse
>> +  TITLE:=Mount a WebDAV resource as a regular file system.
>> +  URL:=http://savannah.nongnu.org/projects/davfs2/
>> +endef
>> +
>> +
>> +define Package/davfs2/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.
>> +
>> +davfs2 is designed to fully integrate into the filesystem semantics
>> of Unix-like systems (mount, umount, etc.).
>> +davfs2 makes mounting by unprivileged users as easy and secure as possible.
>> +
>> +davfs2 does extensive caching to make the file system responsive, to
>> avoid unnecessary network traffic and
>> +to prevent data loss, and to cope for slow or unreliable connections.
>> +
>> +davfs2 will work with most WebDAV servers needing little or no configuration.
>> +
>> +endef
>> +
>> +
>> +define Package/davfs2/conffiles
>> +/etc/davfs2/davfs2.conf
>> +endef
>> +
>> +TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
>> +
>> +CONFIGURE_VARS += \
>> +#        CXXFLAGS="-nostdinc++"  \
>> +       LDFLAGS="$(TARGET_LDFLAGS) -L$(TOOLCHAIN_DIR)/usr/lib
>> -L$(TOOLCHAIN_DIR)/lib" \
>> +# LIBS="-lgcc -lc -luClibc++ -lgcc_s"
>> +
>> +
>> +define Build/Configure
>> +  $(call Build/Configure/Default,--with-neon="$(STAGING_DIR)/usr")
>> +endef
>> +
>> +define Package/davfs2/install
>> + $(INSTALL_DIR) $(1)/usr/sbin
>> + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mount.davfs $(1)/usr/sbin/
>> + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/umount.davfs $(1)/usr/sbin/
>> + $(INSTALL_DIR) $(1)/etc
>> + $(INSTALL_DIR) $(1)/etc/davfs2
>> + $(INSTALL_DATA) files/$(PKG_NAME).conf $(1)/etc/davfs2
>> +endef
>> +
>> +$(eval $(call BuildPackage,davfs2))
>> diff -uprN packages/net/davfs2/patches/010-main_code_fix.patch
>> mypackages/net/davfs2/patches/010-main_code_fix.patch
>> --- packages/net/davfs2/patches/010-main_code_fix.patch 1970-01-01
>> 01:00:00.000000000 +0100
>> +++ mypackages/net/davfs2/patches/010-main_code_fix.patch 2014-08-05
>> 16:32:10.763885018 +0200
>> @@ -0,0 +1,33 @@
>> +--- a/src/cache.c
>> ++++ b/src/cache.c
>> +@@ -55,7 +55,7 @@
>> + #ifdef HAVE_SYS_TYPES_H
>> + #include <sys/types.h>
>> + #endif
>> +-#include <sys/xattr.h>
>> ++#include <linux/xattr.h>
>> +
>> + #include <ne_alloc.h>
>> + #include <ne_string.h>
>> +--- a/src/webdav.c
>> ++++ b/src/webdav.c
>> +@@ -2056,7 +2056,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);
>> +     }
>> +--- a/src/webdav.h
>> ++++ b/src/webdav.h
>> +@@ -244,7 +244,7 @@ dav_put(const char *path, const char *ca
>> +    If quota information is not
>> +    available, an error is returned and available and used are not changed. */
>> + int
>> +-dav_quota(const char *path, off_t *total, off_t *used);
>> ++dav_quota(const char *path, off64_t *total, off64_t *used);
>> +
>> +
>> + /* Sets or resets the execute property of file path.
>> diff -uprN packages/net/davfs2/patches/series
>> mypackages/net/davfs2/patches/series
>> --- packages/net/davfs2/patches/series 1970-01-01 01:00:00.000000000 +0100
>> +++ mypackages/net/davfs2/patches/series 2014-08-05 16:32:10.767885118 +0200
>> @@ -0,0 +1 @@
>> +010-main_code_fix.patch
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list