[Pkg-ocaml-maint-commits] [dose3] 01/02: patcj lexing-debin-fields: debian field name syntaxe conforming to policy
Ralf Treinen
treinen at moszumanska.debian.org
Sat Jan 30 14:55:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
treinen pushed a commit to branch master
in repository dose3.
commit 3ebce3fa515702b4c481e056b32e8a2fae33ed95
Author: Ralf Treinen <treinen at pps.univ-paris-diderot.fr>
Date: Sat Jan 30 15:25:36 2016 +0100
patcj lexing-debin-fields: debian field name syntaxe conforming to policy
---
debian/changelog | 4 ++-
debian/patches/lexing-debian-fields | 62 +++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 66 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 31a90b2..49fc382 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,10 @@ dose3 (4.1-4) UNRELEASED; urgency=medium
* fix name of dose-deb-coinstall in package description of dose-extra
(closes: #812203)
+ * patch lexing-debian-fields: syntax of debian fields according to
+ debian policy. Patch taken from upstream. (closes: #811569)
- -- treinen <treinen at debian.org> Fri, 29 Jan 2016 18:31:35 +0100
+ -- Ralf Treinen <treinen at debian.org> Sat, 30 Jan 2016 15:22:27 +0100
dose3 (4.1-3) unstable; urgency=medium
diff --git a/debian/patches/lexing-debian-fields b/debian/patches/lexing-debian-fields
new file mode 100644
index 0000000..b7648d0
--- /dev/null
+++ b/debian/patches/lexing-debian-fields
@@ -0,0 +1,62 @@
+Author: Pietro Abate <pietro.abate at pps.univ-paris-diderot.fr>
+Description: Parsing Debian field names: accept any characters that are
+ authorized by Debian Policy
+Debian-bug: 811569
+Upstream-commit: 24d2fa5f924e2159b3e395adfbbf5bcde4ee7e91
+
+Index: dose3/common/format822_lexer.mll
+===================================================================
+--- dose3.orig/common/format822_lexer.mll 2016-01-30 15:10:19.296935779 +0100
++++ dose3/common/format822_lexer.mll 2016-01-30 15:10:19.296935779 +0100
+@@ -12,6 +12,17 @@
+ (* library, see the COPYING file for more information. *)
+ (*****************************************************************************)
+
++(*
++Debian Policy : https://www.debian.org/doc/debian-policy/ch-controlfields.html
++
++Each paragraph consists of a series of data fields. Each field consists of the
++field name followed by a colon and then the data/value associated with that
++field. The field name is composed of US-ASCII characters excluding control
++characters, space, and colon (i.e., characters in the ranges 33-57 and 59-126,
++inclusive). Field names must not begin with the comment character, #, nor with
++the hyphen character, -.
++*)
++
+ {
+ open Format822_parser
+
+@@ -29,19 +40,20 @@
+ let letter = lower_letter | upper_letter
+ let digit = [ '0' - '9' ]
+ let blank = [ ' ' '\t' ]
+-let ident = (letter | digit | '-')+
++let ident = ( [ '!' - '9'] | [';' - '~' ] )+
++let identnosharphypen = ( '!' | '"' | [ '$' - ',' ] | [ '.' - '9'] | [';' - '~' ] )
++(* conform to the Debian Policy *)
++let fieldname = (identnosharphypen ident)
+
+ rule token_822 = parse
+- | "-----BEGIN PGP SIGNED MESSAGE-----" { PGPHEAD }
+- | "-----BEGIN PGP SIGNATURE-----" { pgpsignature lexbuf }
+- | (ident as field) ':' blank*
+- ([^'\n']* as rest) { FIELD(field, (get_range lexbuf, rest)) }
+- | blank ([^'\n']* as rest) { CONT(get_range lexbuf, rest) }
+-(* | '#' [^'\n']* ('\n'|eof) { token_822 lexbuf } *)
+- | blank* '\n' { Lexing.new_line lexbuf; BLANKLINE }
+- | eof { EOF }
+- | _ as c { raise_error lexbuf c }
++ | "-----BEGIN PGP SIGNED MESSAGE-----" { PGPHEAD }
++ | "-----BEGIN PGP SIGNATURE-----" { pgpsignature lexbuf }
++ | '#' [^'\n']* ('\n'|eof) { token_822 lexbuf }
++ | (fieldname as field) ':' blank* ([^'\n']* as rest) { FIELD(field, (get_range lexbuf, rest)) }
++ | blank ([^'\n']* as rest) { CONT(get_range lexbuf, rest) }
++ | blank* '\n' { Lexing.new_line lexbuf; BLANKLINE }
++ | eof { EOF }
++ | _ as c { raise_error lexbuf c }
+ and pgpsignature = parse
+- | "-----END PGP SIGNATURE-----" { token_822 lexbuf }
+- | _ { pgpsignature lexbuf }
+-
++ | "-----END PGP SIGNATURE-----" { token_822 lexbuf }
++ | _ { pgpsignature lexbuf }
diff --git a/debian/patches/series b/debian/patches/series
index 2278e84..8d854d2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ disable_dot
fix_ftbfs_on_bytecode_arch
fix_META
cudf_max_int
+lexing-debian-fields
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/dose3.git
More information about the Pkg-ocaml-maint-commits
mailing list