diff -Nru python-easywebdav-1.2.0/debian/changelog python-easywebdav-1.2.0/debian/changelog --- python-easywebdav-1.2.0/debian/changelog 2019-08-04 18:59:31.000000000 +0000 +++ python-easywebdav-1.2.0/debian/changelog 2019-09-24 08:18:52.000000000 +0000 @@ -1,3 +1,31 @@ +python-easywebdav (1.2.0-8) unstable; urgency=medium + + * Upload to unstable. + * autopkgtest: more meaningful printout + + -- IOhannes m zmölnig (Debian/GNU) 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) 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) Wed, 18 Sep 2019 13:30:59 +0200 + python-easywebdav (1.2.0-5) unstable; urgency=medium * Team upload. diff -Nru python-easywebdav-1.2.0/debian/control python-easywebdav-1.2.0/debian/control --- python-easywebdav-1.2.0/debian/control 2019-08-04 18:57:32.000000000 +0000 +++ python-easywebdav-1.2.0/debian/control 2019-09-24 08:18:52.000000000 +0000 @@ -4,18 +4,18 @@ Maintainer: Debian Python Modules Team Uploaders: IOhannes m zmölnig (Debian/GNU) Build-Depends: - debhelper-compat (= 9), + debhelper-compat (= 12), dh-buildinfo, devscripts, dh-python, python3-all, python3-setuptools, python3-requests, -Testsuite: autopkgtest-pkg-python -Standards-Version: 4.1.4 +Rules-Requires-Root: no Homepage: https://github.com/amnong/easywebdav Vcs-Git: https://salsa.debian.org/python-team/modules/python-easywebdav.git Vcs-Browser: https://salsa.debian.org/python-team/modules/python-easywebdav +Standards-Version: 4.4.0 Package: python3-easywebdav Architecture: all diff -Nru python-easywebdav-1.2.0/debian/git-tuneclone.sh python-easywebdav-1.2.0/debian/git-tuneclone.sh --- python-easywebdav-1.2.0/debian/git-tuneclone.sh 2019-08-04 18:09:14.000000000 +0000 +++ python-easywebdav-1.2.0/debian/git-tuneclone.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -#!/bin/sh - -## script to initialize a cloned repository -## with per (local) repository settings. - -# - ignore quilt's .pc/ directory -# - enable the "--follow-tags" mode for pushing - -error() { - echo "$@" 1>&2 -} - -NAME=$(dpkg-parsechangelog -S Source) - -if [ "x${NAME}" = "x" ]; then - error "unable to determine package name" - error "make sure you run this script within a source package dir" - exit 1 -fi - -if [ ! -d ".git" ]; then - error "it seems like this source package is not under git control" - exit 1 -fi - -echo "tuning git-repository for ${NAME}" -git config push.followTags true && echo "enabled push.followTags" - -GITEXCLUDE=".git/info/exclude" -egrep "^/?\.pc/?$" "${GITEXCLUDE}" >/dev/null 2>&1 \ - || (echo "/.pc/" >> "${GITEXCLUDE}" && echo "ignoring /.pc/") - -for branch in pristine-tar upstream master; do - git checkout "${branch}" -done diff -Nru python-easywebdav-1.2.0/debian/README.source python-easywebdav-1.2.0/debian/README.source --- python-easywebdav-1.2.0/debian/README.source 2019-08-04 18:09:14.000000000 +0000 +++ python-easywebdav-1.2.0/debian/README.source 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -git-dpm -------- - -As per python modules team policy, this package uses git-dpm for managing -patches. -See - - https://python-modules.alioth.debian.org/policy.html#git-procedures - - https://wiki.debian.org/PackagingWithGit/GitDpm - -Short walkthrough: -~~~ -git-dpm checkout-patched -vim files -git commit -a -git-dpm update-patches -~~~ - -git-tuneclone.sh ----------------- - -This package comes with a script 'debian/git-tuneclone.sh'. -Running it after a fresh clone of the packaging repository -will fine-tune your local copy, namely: -- make git ignore any .pc/ directory (created by quilt) -- enable the "-follow-tags" when running 'git-push', so it's harder - to forget to push packaging tags along with the branches. -- do an initial checkout of the 3 packaging branches (master, pristine-tar, - upstream) -The script only needs to run once (though running it multiple times shouldn't -matter). -You are of course free to *not* run the script, if you prefer. - - -- IOhannes m zmölnig (Debian/GNU) Tue, 11 Nov 2015 11:11:03 +0100 - diff -Nru python-easywebdav-1.2.0/debian/tests/authorized python-easywebdav-1.2.0/debian/tests/authorized --- python-easywebdav-1.2.0/debian/tests/authorized 1970-01-01 00:00:00.000000000 +0000 +++ python-easywebdav-1.2.0/debian/tests/authorized 2019-09-24 08:18:52.000000000 +0000 @@ -0,0 +1,3 @@ +#!/bin/bash + +${0%/*}/testclient foo diff -Nru python-easywebdav-1.2.0/debian/tests/control python-easywebdav-1.2.0/debian/tests/control --- python-easywebdav-1.2.0/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ python-easywebdav-1.2.0/debian/tests/control 2019-09-24 08:18:52.000000000 +0000 @@ -0,0 +1,3 @@ +Tests: testclient, authorized +Depends: @, python3-webdav, openssl, lsof +Restrictions: skippable diff -Nru python-easywebdav-1.2.0/debian/tests/testclient python-easywebdav-1.2.0/debian/tests/testclient --- python-easywebdav-1.2.0/debian/tests/testclient 1970-01-01 00:00:00.000000000 +0000 +++ python-easywebdav-1.2.0/debian/tests/testclient 2019-09-24 08:18:52.000000000 +0000 @@ -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 -Nru python-easywebdav-1.2.0/debian/tests/testclient.py python-easywebdav-1.2.0/debian/tests/testclient.py --- python-easywebdav-1.2.0/debian/tests/testclient.py 1970-01-01 00:00:00.000000000 +0000 +++ python-easywebdav-1.2.0/debian/tests/testclient.py 2019-09-24 08:18:52.000000000 +0000 @@ -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 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 -Nru python-easywebdav-1.2.0/debian/watch python-easywebdav-1.2.0/debian/watch --- python-easywebdav-1.2.0/debian/watch 2019-08-04 18:09:14.000000000 +0000 +++ python-easywebdav-1.2.0/debian/watch 2019-09-24 08:18:52.000000000 +0000 @@ -1,4 +1,5 @@ # process this file with uscan(1) -version=3 -opts=dversionmangle=s/~dfsg(\.[0-9]*)?$//,filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/easywebdav-$1\.tar\.gz/ \ - https://github.com/amnong/easywebdav/tags .*/v?(\d\S*)\.tar\.gz +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