diff options
author | Sandro Tosi <morph@debian.org> | 2022-06-03 16:21:05 +0200 |
---|---|---|
committer | Sandro Tosi <morph@debian.org> | 2022-06-03 16:21:05 +0200 |
commit | 9ebdfbcc9955f7b79b03dcdf1dcedb0d555c9cc1 (patch) | |
tree | 7c73623aed7a4e4b53a9e18a355304298c0bd154 | |
parent | 9994c4f88e2290df2b7d2044b397a897927e4893 (diff) | |
parent | 1c42aac9d2ddfc58d944806c1445d435d81fb434 (diff) |
python-easywebdav (1.2.0-9) unstable; urgency=medium
[ Ondřej Nový ]
* Bump Standards-Version to 4.4.1.
* d/control: Update Maintainer field with new Debian Python Team
contact address.
* d/control: Update Vcs-* fields with new Debian Python Team Salsa
layout.
[ Debian Janitor ]
* Set upstream metadata fields: Bug-Database, Repository, Repository-
Browse.
* Bump debhelper from old 12 to 13.
* Set upstream metadata fields: Bug-Submit.
* Update standards version to 4.5.1, no changes needed.
[dgit import unpatched python-easywebdav 1.2.0-9]
-rw-r--r-- | debian/changelog | 99 | ||||
-rw-r--r-- | debian/control | 32 | ||||
-rw-r--r-- | debian/copyright | 41 | ||||
-rw-r--r-- | debian/copyright_hints | 30 | ||||
-rw-r--r-- | debian/gbp.conf | 5 | ||||
-rw-r--r-- | debian/patches/python3.patch | 23 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rwxr-xr-x | debian/rules | 10 | ||||
-rw-r--r-- | debian/source/format | 1 | ||||
-rwxr-xr-x | debian/tests/authorized | 3 | ||||
-rw-r--r-- | debian/tests/control | 3 | ||||
-rwxr-xr-x | debian/tests/testclient | 59 | ||||
-rwxr-xr-x | debian/tests/testclient.py | 73 | ||||
-rw-r--r-- | debian/upstream/metadata | 4 | ||||
-rw-r--r-- | debian/watch | 5 |
15 files changed, 389 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..1fcf90b --- /dev/null +++ b/debian/changelog @@ -0,0 +1,99 @@ +python-easywebdav (1.2.0-9) unstable; urgency=medium + + [ Ondřej Nový ] + * Bump Standards-Version to 4.4.1. + * d/control: Update Maintainer field with new Debian Python Team + contact address. + * d/control: Update Vcs-* fields with new Debian Python Team Salsa + layout. + + [ Debian Janitor ] + * Set upstream metadata fields: Bug-Database, Repository, Repository- + Browse. + * Bump debhelper from old 12 to 13. + * Set upstream metadata fields: Bug-Submit. + * Update standards version to 4.5.1, no changes needed. + + -- Sandro Tosi <morph@debian.org> Fri, 03 Jun 2022 10:21:05 -0400 + +python-easywebdav (1.2.0-8) unstable; urgency=medium + + * Upload to unstable. + * autopkgtest: more meaningful printout + + -- IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> Tue, 24 Sep 2019 10:18:52 +0200 + +python-easywebdav (1.2.0-7~exp1) experimental; urgency=medium + + * Fixing autopkgtest + * More verbose output + * Make sure 'lsof' is available + + -- IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> Mon, 23 Sep 2019 11:45:23 +0200 + +python-easywebdav (1.2.0-6) unstable; urgency=medium + + * Provide a functional test for autopkgtest + * Update d/watch to use pypi rather than github + * Declare that building this package doesn't require "root" powers + * Drop d/README.source + * It contains only trivial (and outdated) information + * Drop d/git-tuneclone.sh script + * Bump dh compat to 12 + * Bump standards version to 4.4.0 + + -- IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> Wed, 18 Sep 2019 13:30:59 +0200 + +python-easywebdav (1.2.0-5) unstable; urgency=medium + + * Team upload. + * Convert git repository from git-dpm to gbp layout + * Use debhelper-compat instead of debian/compat. + * Drop Python 2 support. + + -- Ondřej Nový <onovy@debian.org> Sun, 04 Aug 2019 20:59:31 +0200 + +python-easywebdav (1.2.0-4) unstable; urgency=medium + + [ Ondřej Nový ] + * d/control: Set Vcs-* to salsa.debian.org + * d/copyright: Use https protocol in Format field + + [ IOhannes m zmölnig (Debian/GNU) ] + * Switched build-system to dh + * Dropped .install scripts (automatically handled by dh/pybuild) + * Enabled generic python tests for DebCI + * Bumped standards version to 4.1.4 + + -- IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> Wed, 18 Apr 2018 16:59:30 +0200 + +python-easywebdav (1.2.0-3) unstable; urgency=medium + + [ Stefano Rivera ] + * git-dpm tag config + + [ IOhannes m zmölnig ] + * Provide fallback for "basestring" under python3 + (Closes: #815656) + * Updated debian/copyright + * Updated Vcs-* stanzas + * Added debian/git-tuneclone.sh script + * Documented in debian/README.source + * Basic documentation for git-dpm (debian/README.source) + * Bumped standards version to 3.9.7 + + -- IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> Tue, 23 Feb 2016 14:52:46 +0100 + +python-easywebdav (1.2.0-2) unstable; urgency=medium + + * Fixing Vcs-* stanza + * Added debian/copyright_hints + * Regenerated debian/control + + -- IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> Tue, 25 Aug 2015 23:18:49 +0200 + +python-easywebdav (1.2.0-1) unstable; urgency=medium + + * Initial release. (Closes: #790872) + + -- IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> Mon, 06 Jul 2015 22:06:49 +0200 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..5f4e290 --- /dev/null +++ b/debian/control @@ -0,0 +1,32 @@ +Source: python-easywebdav +Section: python +Priority: optional +Maintainer: Debian Python Team <team+python@tracker.debian.org> +Uploaders: IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> +Build-Depends: + debhelper-compat (= 13), + dh-buildinfo, + devscripts, + dh-python, + python3-all, + python3-setuptools, + python3-requests, +Rules-Requires-Root: no +Homepage: https://github.com/amnong/easywebdav +Vcs-Git: https://salsa.debian.org/python-team/packages/python-easywebdav.git +Vcs-Browser: https://salsa.debian.org/python-team/packages/python-easywebdav +Standards-Version: 4.5.1 + +Package: python3-easywebdav +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, +Description: straight-forward WebDAV client module (Python 3 interface) + EasyWebDAV is an easy to use WebDAV client implementation for Python. + It features: + - Basic authentication + - Creating directories, removing directories and files + - Uploading and downloading files + - Directory listing + - Support for client side SSL certificates + . + This package provides the Python 3.x module. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..7e6e0b7 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: easywebdav +Source: https://pypi.python.org/pypi/easywebdav/ + +Files: * +Copyright: 2012-2014 Amnon Grossman <amnong@gmail.com> +License: ISC + +Files: debian/* +Copyright: 2015-2016 IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> +License: GPL-2+ + +License: ISC + Permission to use, copy, modify, and/or distribute this software for any purpose + with or without fee is hereby granted, provided that the above copyright notice + and this permission notice appear in all copies. + . + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF + THIS SOFTWARE. + +License: GPL-2+ + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + . + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + . + On Debian systems, the complete text of the GNU General Public License + (GPL) version 2 can be found in "/usr/share/common-licenses/GPL-2". + . + You should have received a copy of the GNU General Public License along + with this program. If not, see <http://www.gnu.org/licenses/>. diff --git a/debian/copyright_hints b/debian/copyright_hints new file mode 100644 index 0000000..6b25e8a --- /dev/null +++ b/debian/copyright_hints @@ -0,0 +1,30 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: FIXME +Upstream-Contact: FIXME +Source: FIXME +Disclaimer: Autogenerated by CDBS + +Files: PKG-INFO + debian/.git-dpm + debian/README.source + debian/compat + debian/control + debian/control.in + debian/gbp.conf + debian/git-tuneclone.sh + debian/patches/python3.patch + debian/patches/series + debian/python-easywebdav.install + debian/python3-easywebdav.install + debian/rules + debian/source/format + debian/watch + easywebdav/__init__.py + easywebdav/__version__.py + easywebdav/client.py + setup.cfg + setup.py +Copyright: *No copyright* +License: UNKNOWN + FIXME + diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..a7281f9 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,5 @@ +# Configuration file for git-buildpackage and friends + +[DEFAULT] +pristine-tar = True +sign-tags = True diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch new file mode 100644 index 0000000..6966cb6 --- /dev/null +++ b/debian/patches/python3.patch @@ -0,0 +1,23 @@ +From ef5b89ad558e006654cfa51f2394088b4f113267 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= + <zmoelnig@umlautQ.umlaeute.mur.at> +Date: Tue, 23 Feb 2016 14:49:32 +0100 +Subject: Provide fallback for "basestring" under python3 + +Patch-Name: python3.patch +--- + easywebdav/client.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/easywebdav/client.py b/easywebdav/client.py +index 4003198..a8fb219 100644 +--- a/easywebdav/client.py ++++ b/easywebdav/client.py +@@ -12,6 +12,7 @@ if py_majversion == '2': + else: + from http.client import responses as HTTP_CODES + from urllib.parse import urlparse ++ basestring = str + + DOWNLOAD_CHUNK_SIZE_BYTES = 1 * 1024 * 1024 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..a2fba86 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +python3.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..4562401 --- /dev/null +++ b/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +export PYBUILD_NAME=easywebdav +%: + dh $@ --buildsystem=pybuild --with python3 + +override_dh_clean: + dh_clean + rm -rf $(CURDIR)/*.egg-info/ + rm -rf $(CURDIR)/build diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/tests/authorized b/debian/tests/authorized new file mode 100755 index 0000000..7bce6c6 --- /dev/null +++ b/debian/tests/authorized @@ -0,0 +1,3 @@ +#!/bin/bash + +${0%/*}/testclient foo diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..166130a --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,3 @@ +Tests: testclient, authorized +Depends: @, python3-webdav, openssl, lsof +Restrictions: skippable diff --git a/debian/tests/testclient b/debian/tests/testclient new file mode 100755 index 0000000..b9423da --- /dev/null +++ b/debian/tests/testclient @@ -0,0 +1,59 @@ +#!/bin/bash + +DATAFILE=$(mktemp) +DAVDIR=$(mktemp -d) +testclient=${0%/*}/testclient.py +numbytes=512 + +U=$1 +P=$2 + +if [ "x${P}" = "x" ]; then + P=$(openssl rand -base64 8) +fi + +openssl rand -out "${DATAFILE}" ${numbytes} +ls -l "${DATAFILE}" + + +echo "Starting WebDAV server in ${DAVDIR}" + +if [ "x${U}" = "x" ]; then + python3 -m pywebdav -l ERROR -P 0 -D "${DAVDIR}" -n 2>&1 & + SERVER_PID=$! +else + python3 -m pywebdav -l ERROR -P 0 -D "${DAVDIR}" -u "${U}" -p "${P}" 2>&1 & + SERVER_PID=$! +fi + +#echo "server running as PID ${SERVER_PID}" +sleep 1 + +port=$(lsof -p ${SERVER_PID} 2>/dev/null | egrep "TCP localhost:.*LISTEN" | sed -e 's|.*TCP localhost:||' -e 's| .*||') +echo "connecting to port:${port}" + +if [ "x${port}" = "x" ]; then + echo "unable to find listening port of WebDAV-server running as ${SERVER_PID}" + echo "skipping test." + lsof -p ${SERVER_PID} 2>/dev/null | egrep "TCP.*LISTEN" + exit 77 +fi + +if [ "x${U}" = "x" ]; then + ${testclient} -P "${port}" "${DATAFILE}" +else + ${testclient} -P "${port}" -u "${U}" -p "${P}" "${DATAFILE}" +fi +RETVAL=$? + +kill $SERVER_PID +RETKILL=$? + +rm -vrf "${DATAFILE}" "${DAVDIR}" + +if [ "x${RETKILL}" != "x0" ]; then + echo "server killing failed with ${RETKILL}, skipping test" + exit 77 +fi + +exit $RETVAL diff --git a/debian/tests/testclient.py b/debian/tests/testclient.py new file mode 100755 index 0000000..e28d669 --- /dev/null +++ b/debian/tests/testclient.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +import sys +import tempfile +import filecmp + +import easywebdav +host="localhost" +port=8008 + + +def config(): + import argparse + parser = argparse.ArgumentParser() + parser.add_argument( + "--port", "-P", + type=int, default=port, + help="port the WebDAV-server listens on") + parser.add_argument( + "--user", "-u", + type=str, default=None, + help="user to authenticate as (if any)") + parser.add_argument( + "--password", "-p", + type=str, default=None, + help="password to authenticate with (if any)") + parser.add_argument( + "file", + nargs='?', default=__file__, + help="file to up/download") + + return parser.parse_args() + + +def runtest(port, localfile, user=None, password=None): + c = easywebdav.connect(host, port, username=user, password=password) + print("easywebdav: connect to '%s:%s' as '%s'" % (host, port, user)) + dirnum=0 + dirname="tmp" + while c.exists(dirname): + dirnum += 1 + dirname = "tmp.%s" % dirnum + print("easywebdav: exists '%s'" % (dirname,)) + c.mkdir(dirname) + print("easywebdav: mkdir '%s'" % (dirname,)) + filename = "file" + tmpfile = tempfile.NamedTemporaryFile() + + # create a directory, upload <localfile> to it, download it + c.upload(localfile, dirname + "/" + filename) + print("easywebdav: upload '%s' to '%s'" % (localfile, dirname + "/" + filename)) + c.cd(dirname) + print("easywebdav: cd '%s'" % (dirname)) + c.download(filename, tmpfile) + print("easywebdav: download '%s' to '%s'" % (filename, tmpfile.name,)) + # and remove all traces on the webserver + c.delete(filename) + print("easywebdav: delete '%s'" % (filename,)) + c.cd("..") + print("easywebdav: cd ..") + c.rmdir(dirname) + print("easywebdav: rmdir '%s'" % (dirname,)) + + # then compare the two files + tmpfile.flush() + x = filecmp.cmp(localfile, tmpfile.name, shallow=False) + if not x: + raise Exception("'%s' and '%s' do not match" % (localfile, tmpfile.name)) + + +if __name__ == "__main__": + cfg = config() + #print(cfg) or sys.exit() + runtest(cfg.port, cfg.file, cfg.user, cfg.password) diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..2c46d45 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,4 @@ +Bug-Database: https://github.com/amnong/easywebdav/issues +Bug-Submit: https://github.com/amnong/easywebdav/issues/new +Repository: https://github.com/amnong/easywebdav.git +Repository-Browse: https://github.com/amnong/easywebdav diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..8a5163e --- /dev/null +++ b/debian/watch @@ -0,0 +1,5 @@ +# process this file with uscan(1) +version=4 +opts=dversionmangle=s/[~+](dfsg|ds|repack)([.]?[0-9]*)?$//,uversionmangle=s/(rc|a|b|c)/~$1/ \ +https://pypi.python.org/packages/source/e/easywebdav/ \ + easywebdav-([\d\.]+)@ARCHIVE_EXT@ debian uupdate |