Package: release.debian.org Severity: normal Tags: buster User: release.debian.org@packages.debian.org Usertags: pu Hi, First of all, thanks for all your work on keeping Debian sane! The Python implementation in the confget package had an upstream bug in parsing values containing an equal sign, as explained in https://bugs.debian.org/959887 and fixed in confget/2.3.4-1 in unstable and testing. Attached is a debdiff updating the buster package of confget with two patches, one of them introducing a test for this and another one fixing the bug in the Python implementation. Here's the changelog entry, just in case: confget (2.2.0-4+deb10u1) buster; urgency=medium * Fix the Python module's handling of values containing "=": - add the test-ini-eq patch to add a test for such values - add the python-value-eq patch to fix the problem - Closes: #959887 -- Peter Pentchev <roam@debian.org> Wed, 06 May 2020 19:12:09 +0300 Also available at https://gitlab.com/confget/confget/-/tree/debian/buster Thanks in advance, and keep up the great work! -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (990, 'testing'), (500, 'testing-debug') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.5.0-2-amd64 (SMP w/8 CPU cores) Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8), LANGUAGE=bg_BG.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru confget-2.2.0/debian/changelog confget-2.2.0/debian/changelog --- confget-2.2.0/debian/changelog 2019-02-27 00:44:26.000000000 +0200 +++ confget-2.2.0/debian/changelog 2020-05-06 19:12:09.000000000 +0300 @@ -1,3 +1,12 @@ +confget (2.2.0-4+deb10u1) buster; urgency=medium + + * Fix the Python module's handling of values containing "=": + - add the test-ini-eq patch to add a test for such values + - add the python-value-eq patch to fix the problem + - Closes: #959887 + + -- Peter Pentchev <roam@debian.org> Wed, 06 May 2020 19:12:09 +0300 + confget (2.2.0-4) unstable; urgency=medium * Use the test-name autopkgtest feature. diff -Nru confget-2.2.0/debian/patches/python-value-eq.patch confget-2.2.0/debian/patches/python-value-eq.patch --- confget-2.2.0/debian/patches/python-value-eq.patch 1970-01-01 02:00:00.000000000 +0200 +++ confget-2.2.0/debian/patches/python-value-eq.patch 2020-05-06 19:10:56.000000000 +0300 @@ -0,0 +1,17 @@ +Description: python: fix processing of values containing "=". +Bug-Debian: https://bugs.debian.org/959887 +Origin: upstream; https://gitlab.com/confget/confget/-/commit/41b3a97b3d14a2b2f4365cc3fb4e5ea2497fe58c +Author: Peter Pentchev <roam@ringlet.net> +Last-Update: 2020-05-06 + +--- a/python/confget/backend/ini.py ++++ b/python/confget/backend/ini.py +@@ -141,7 +141,7 @@ + regex=re.compile(r''' + ^ + \s* +- (?P<name> \S+ ) ++ (?P<name> [^\s=]+ ) + \s* = \s* + (?P<value> .*? ) + \s* diff -Nru confget-2.2.0/debian/patches/series confget-2.2.0/debian/patches/series --- confget-2.2.0/debian/patches/series 2019-02-27 00:44:26.000000000 +0200 +++ confget-2.2.0/debian/patches/series 2020-05-06 19:08:23.000000000 +0300 @@ -1,2 +1,4 @@ python-no-executable.patch test-too-many-pypy.patch +test-ini-eq.patch +python-value-eq.patch diff -Nru confget-2.2.0/debian/patches/test-ini-eq.patch confget-2.2.0/debian/patches/test-ini-eq.patch --- confget-2.2.0/debian/patches/test-ini-eq.patch 1970-01-01 02:00:00.000000000 +0200 +++ confget-2.2.0/debian/patches/test-ini-eq.patch 2020-05-06 19:08:23.000000000 +0300 @@ -0,0 +1,78 @@ +Description: Add a test for INI files with values containing "=". +Origin: upstream; https://gitlab.com/confget/confget/-/commit/48c7942c59ec67ea0d9e670d8ef18d12054356d3 +Author: Peter Pentchev <roam@ringlet.net> +Last-Update: 2020-05-06 + +--- a/t/01-get-values.t ++++ b/t/01-get-values.t +@@ -27,13 +27,18 @@ + [ -z "$CONFGET" ] && CONFGET='./confget' + [ -z "$TESTDIR" ] && TESTDIR='t' + +-echo '1..18' ++echo '1..19' + + + if [ ! -f "$TESTDIR/t1.ini" ]; then + echo "Bail out! No test file $TESTDIR/t1.ini" + exit 255 + fi ++ ++if [ ! -f "$TESTDIR/t4.ini" ]; then ++ echo "Bail out! No test file $TESTDIR/t4.ini" ++ exit 255 ++fi + v=`$CONFGET '-f' "$TESTDIR/t1.ini" '-s' 'a' 'key1' ` + res="$?" + if [ "$v" = 'value1' ]; then echo 'ok 1'; else echo "not ok 1 v is '$v'"; fi +@@ -88,3 +93,6 @@ + v=`env Q1='key4&key5=%09%09%20val%27ue5&key6' Q2='' QUERY_STRING='key1=value1&key2=%3Dvalue2%26&key3=%09%09%20val%27ue3' $CONFGET -t http_get '-s' 'Q2' 'key66' ` + res="$?" + if [ "$v" = '' ]; then echo 'ok 18'; else echo "not ok 18 v is '$v'"; fi ++v=`$CONFGET '-f' "$TESTDIR/t4.ini" '-s' 'x' 'key8' ` ++res="$?" ++if [ "$v" = 'key9=key10=key11' ]; then echo 'ok 19'; else echo "not ok 19 v is '$v'"; fi +--- a/t/defs/tests/01-get-values.json ++++ b/t/defs/tests/01-get-values.json +@@ -288,6 +288,22 @@ + }, + "setenv": true, + "stdin": null ++ }, ++ { ++ "args": { ++ "filename": "t4.ini", ++ "section": "x" ++ }, ++ "keys": [ ++ "key8" ++ ], ++ "xform": "", ++ "backend": "ini", ++ "output": { ++ "exact": "key9=key10=key11" ++ }, ++ "setenv": false, ++ "stdin": null + } + ] + } +--- /dev/null ++++ b/t/t4.ini +@@ -0,0 +1,16 @@ ++# Just a test file. Or something. ++# This file is hereby placed into the public domain. ++# ++# Test if confget can properly override "default" values with ++# ones specified in a named section. ++ ++both=default ++defonly=default ++ ++[a] ++aonly=b ++both=a ++aonly=a ++ ++[x] ++key8=key9=key10=key11
Attachment:
signature.asc
Description: PGP signature