Bug#731340:

2017-05-02 Thread Dylan
tags 833007 + patch
thanks

Hi,

Please find attached a patch which also partially fix #731340 (in CC).
This patch will emit the tag for many packages. I did not update
t/tests/*/tags according to this new tag. I am waiting for some
reviews of the patch to do the job.

Best regards,
Dylan
From 38cab176a195a51cdc1803495851287d2ec52089 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dylan=20A=C3=AFssi?= 
Date: Tue, 2 May 2017 22:49:36 +0200
Subject: [PATCH] c/upstream-metadata: Add a check
 upstream-metadata-file-is-missing

---
 checks/upstream-metadata.desc | 7 +++
 checks/upstream-metadata.pm   | 6 +-
 t/tests/upstream-metadata-is-missing/desc | 7 +++
 t/tests/upstream-metadata-is-missing/tags | 2 ++
 4 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 t/tests/upstream-metadata-is-missing/desc
 create mode 100644 t/tests/upstream-metadata-is-missing/tags

diff --git a/checks/upstream-metadata.desc b/checks/upstream-metadata.desc
index 5f3c2c5..6c69b41 100644
--- a/checks/upstream-metadata.desc
+++ b/checks/upstream-metadata.desc
@@ -18,3 +18,10 @@ Certainty: certain
 Ref: http://dep.debian.net/deps/dep12/
 Info: The DEP 12 metadata file is not well formed.  The formatting
  need to be adjusted to match the YAML specification.
+
+Tag: upstream-metadata-file-is-missing
+Severity: pedantic
+Certainty: certain
+Ref: http://dep.debian.net/deps/dep12/
+Info: This source package is not Debian-native but it does not have a
+ debian/upstream/metadata file.
diff --git a/checks/upstream-metadata.pm b/checks/upstream-metadata.pm
index 08798db..8011bd5 100644
--- a/checks/upstream-metadata.pm
+++ b/checks/upstream-metadata.pm
@@ -30,7 +30,11 @@ use YAML::XS;
 sub run {
 my (undef, undef, $info) = @_;
 my $yamlfile = $info->index_resolved_path('debian/upstream/metadata');
-return if not $yamlfile;
+
+if (not $yamlfile) {
+tag 'upstream-metadata-file-is-missing' unless ($info->native);
+return;
+}
 
 if ($yamlfile->is_open_ok) {
 my $yaml;
diff --git a/t/tests/upstream-metadata-is-missing/desc b/t/tests/upstream-metadata-is-missing/desc
new file mode 100644
index 000..df7f36e
--- /dev/null
+++ b/t/tests/upstream-metadata-is-missing/desc
@@ -0,0 +1,7 @@
+Testname: upstream-metadata-is-missing
+Type: non-native
+Version: 1.0-1
+Description: Tests for missing upstream metadata file
+Skeleton: pedantic
+Options: --pedantic
+Test-For: upstream-metadata-file-is-missing
diff --git a/t/tests/upstream-metadata-is-missing/tags b/t/tests/upstream-metadata-is-missing/tags
new file mode 100644
index 000..45e6185
--- /dev/null
+++ b/t/tests/upstream-metadata-is-missing/tags
@@ -0,0 +1,2 @@
+P: upstream-metadata-is-missing source: debian-watch-may-check-gpg-signature
+P: upstream-metadata-is-missing source: upstream-metadata-file-is-missing
-- 
2.1.4



Bug#731340: Testing YAML syntax

2016-02-15 Thread Andreas Tille
Hi,

I just realised that in bug #731340 a YAML syntax check was just
proposed but it seems it not made it into lintian yet.  I'm not sure how 
this solution might compare to the one of #813904 but it might be worth
checking.  Petter, sorry that I forgot about #731340.

It would be really cool if lintian could provide a yaml check where we
now have even two proposed solutions for.  We get more and more such
yaml files and checking the UDD importer from time to time for broken
syntax turned out as not really efficient.

Kind regards

   Andreas.

-- 
http://fam-tille.de



Bug#731340: [lintian] News of upstream metadata patch

2014-09-11 Thread Simon Kainz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512



Am 2014-09-09 um 18:51 schrieb Niels Thykier:
 On 2014-09-09 09:31, Simon Kainz wrote:
 Hello,
 
 yes, sorry, i frogot about that. I'll restructure the check to
 run without  autodie and Test::* and would then ask for your
 help concerning the lintian data part.
 
 Sorry for the delay.
 
 Bye,
 
 Simon
 
 Hi Simon,
 
 The use of autodie is perfectly fine, just remember to add a use 
 autodie; in the top of the file.
 
 IRT to using data files, have you read the tutorial[1]?  It is
 quite likely that you are one of the first to read it.  If it is
 not helpful, please let us know so we can improve it.
 
Thanks, this tutorial is great! I'll polish my check(s) and will add
some testcases as well as the lintian data part as well.

I'll give you a git path when i'm finished.

Bye,
Simon


 ~Niels
 
 [1] 
 https://lintian.debian.org/library-api/Lintian/Tutorial/WritingChecks.html#Using_static_data_files

 
 
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBCgAGBQJUEdYsAAoJEBy08PeN7K/pWswQAKX5mTMLiUBwwrStAtG8Uw5b
P1Lx0C9xXKLFZ2yDVkP6nSSWSiUXS9ES5LNtddKRyx6udCBvN1FY4UVSdrd82cSu
VJ+ch50R4QXyQ0HeuVL1xsUNSFeuo0n/s+aJ3EkbG6SD/sdzBKVSmG523BnShMTn
BLazm/XiqvTnSYVahpsbK6I6CqFB29zfZfh6026PYXdBpRxcNNTd0d7LOJCUA0Zy
35f3Pb/9fnwKg5vgFgW3C+4Pft8CNwHTxUwi/wCd0debnTE5MggK6gSGJP47eHB8
mHGVEGLtGd0RSsI6HMqg2nUElCtCCU853wPNWZdS5+Eb4eQPHLFkG2cmnfqaleMX
IT5ENn3FOr1qQmAavayefUKktow4O93vw761su+Cv/TIJw15qTPmbkSWPJnc434M
E4m8cbXBwOSblhbRDW8cPpNmbPERR3K7+68gYyuhdl5vkHx2l4X/hzIrjeRrgRP2
lhsPDn5cPrF0LRQEeKzVPlMUknD8wOUqxROIIlU89mcVbCnXwMRuhPZB4i/OGnHz
AE77p+CLLtGA4p8LUXIBpG6M6q7/JNI+Sv0QIP909gXkD9XdYbPtXlRlfdRGJp4a
Q/2Wa2zwgQnsy/z7ZkO+fHAMXzAtmqtzyY+ic6YQRSc8o5QDpsb9sPSNGumfMmwI
Aq5KK/HTdvP/4YcD88hD
=w7DD
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#731340: [lintian] News of upstream metadata patch

2014-09-09 Thread Simon Kainz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Am 2014-09-07 18:54, schrieb bastien ROUCARIES:
 Hi,
 
 Any news of the patch ? Icould do the lintian data part if needed.
 
 Bastien
 
Hello,

yes, sorry, i frogot about that. I'll restructure the check to run
without  autodie and Test::* and would then ask for your help
concerning the lintian data part.

Sorry for the delay.

Bye,

Simon


- -- 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCgAGBQJUDqzlAAoJEBy08PeN7K/pih8P/3WVMOjG6Fmcdcg3zOdCHB7b
XC3MufslaA53Na7tVi3B8kxwA7+hpQ09DVi+/+3uJbukkKYppgqJtLviAvg1+bl/
cCYBQyxl1ei/fhd+05TN8BkRap+nUViUWaQ9FwcvbH6lVUgsO0EhLSmPFsLMw8Cv
RWAVy9l+V12kip5EKexFqV5k90GT0Jqz+NgYOeFnl0Anz1ywm1XsaUbjCA5dN56F
sDBLoIR2UZGBsLL2+cIJcRB0S2skl4a+G5gsnIqR4Ot0JR+RXZSJcSqIT4Y1fcSM
oWox7MTOBhsR92wDlS1IOmZPvf+OmzB6AmhV7+UnWPqpZgxhxE2wC7uPDqF8u6M0
3Rt/fMhZMaXVgvbvfj3JGRkYsrkg6aT2Ytrdc4UqmclSCjPenVnKYRtHhAKSy8kA
CtGjaUJzxIky/u0LbQv/l5WlkZ+Kup86oQYhygkf1RfnI8WyhKD9/8Y16iwfvmEI
SpwZHZg7T4Nah7VAHkhCIv3aUcoejBYaRCWfUMVBEHZGr123k0PTDVeRmCcw+nFL
z6rZ40lEzn8JGG7pfSZvIxwv+IJL/JeWKLGjgj5R5pvGaVIo4o5m6aTYrT3oYHIU
FMD1rX/dVvFbpJXwKR0y6Iou9Z3VrtsE91zWhsZiZ/H/Sqh0se0iXbC3U9SBzb5B
sTxCy0DexOfAtsAdjt0c
=ECp5
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#731340: [lintian] News of upstream metadata patch

2014-09-09 Thread Niels Thykier
On 2014-09-09 09:31, Simon Kainz wrote:
 Hello,
 
 yes, sorry, i frogot about that. I'll restructure the check to run
 without  autodie and Test::* and would then ask for your help
 concerning the lintian data part.
 
 Sorry for the delay.
 
 Bye,
 
 Simon

Hi Simon,

The use of autodie is perfectly fine, just remember to add a use
autodie; in the top of the file.

IRT to using data files, have you read the tutorial[1]?  It is quite
likely that you are one of the first to read it.  If it is not helpful,
please let us know so we can improve it.

~Niels

[1]
https://lintian.debian.org/library-api/Lintian/Tutorial/WritingChecks.html#Using_static_data_files


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#731340: [lintian] News of upstream metadata patch

2014-09-07 Thread bastien ROUCARIES
Hi,

Any news of the patch ? Icould do the lintian data part if needed.

Bastien


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#731340: lintian: [new check] Check if debian/upstream files are valid YAML

2014-07-07 Thread Simon Kainz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Am 2014-07-05 11:03, schrieb Niels Thykier:
 On 2013-12-04 14:04, Simon Kainz wrote:
 Package: lintian Version: 2.5.10.4 Severity: wishlist Tags:
 patch
 
 
 After processing some debian/upstream whic hcontained
 broken/invalid YAML data, i created the following check together
 with ti...@debian.org:
 
 if debian/upstream is not avail -  pedantic warning Invalid
 YAML - normal warning YAML with
 invalid field -  normal warning
 
 Please see my attached file.
 
 Would be nice if this could be integrated into lintian.
 
 [...]
 
 
 Hi Simon,
 
 Thanks for taking the time to write a patch and sorry for the long
 delay in getting back to you. We already commented on your patch a
 while ago, but unfortunately, you were never added to the recipient
 list of those mails ...
 
 Our primary concern with your patch is that it relies on
 Test::YAML and Test::More, which are modules only used for
 testing code (e.g. build time tests).
 
 Beyond that, there are two additional improvements worth
 considering: * Adding a test case for your new checks / tags *
 Moving the (contents of) @allowed_fields into a data file.
 
 ~Niels
 
 
Hi Nils,

Thanks for your reply! I'll try to get rid of the Test::*
dependencies.  Test cases should be no problem, i'll dig my way though
lintian source to copy/paste/learn from some bits.

Concerning moving allowed_fields data into a data file: Is there
some kind of infrastructure/guideline for this? I saw
/usr/share/lintian/data and though about putting the allowd_fields
data in there. Is the the right way?


Regards,

Simon




- -- 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCgAGBQJTuoFMAAoJEBy08PeN7K/p4GIP/1wCsq3aALCH1TtbvWZiFP3O
LTJfqyEcn43dFZFr73oJXzhbbIuf14pTNnVl8C5V73mVnPTC2vNdCmb3L7GrcmV0
1fUc3q5l6NbZtvFL9CKmWAoXyrIwmTTTAdm5Ol91JkT+6crjIc8Evp6rwUnUi4Ph
TEruBgT2vCXaG4vRDfPrjEWDwp4X0xhebvmx7Q+D4SNYaJbKRPPBr1AvRTsqbJHu
xFSU54qZBRijcyT6sHIt9xS97QN2PcOu39MI97bWutaqbJIG7OlR/WfqpATSjvMm
vxATx2TfHzUGA/Dky9FsT7la3//tR2gEIORs09kcFtDDMi8Yn9AyC6d3hiJmIUSL
6O5vo7nuQzAkWapItZY0MIZrzWWL7tAT9b7wHEKAP2keplxfA2mI0hJh/KmsTyKh
CXnFu+boje+2elkD+31SKnSeMF6QnxTMmMb9j8iHwHHl9a4Goq03ZSsqlfoZ1FcJ
Am6Fes8JQOKsytBUmVlOigOd6qc3stgrcfWN4DkvnWnPkz2fUyydjcKN/m8G8pOd
XPiPHGWNwlEOZm/Tjd9PWeSStvUTJDWJS8rdEV1E5RZWAbFluzhne0EVUjGBrslR
RuvJhC34+Lep6dLAj3uqxsRkcOaH8tyUIkOwrapTNfCLvdUvoD1/jUgAFrjq6629
qlJLmEW7wQPLbGUEhFAZ
=Mck9
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#731340: lintian: [new check] Check if debian/upstream files are valid YAML

2014-07-05 Thread Niels Thykier
On 2013-12-04 14:04, Simon Kainz wrote:
 Package: lintian
 Version: 2.5.10.4
 Severity: wishlist
 Tags: patch
 
 
 After processing some debian/upstream whic hcontained broken/invalid YAML 
 data,
 i created the following check together with ti...@debian.org:
 
 if debian/upstream is not avail -  pedantic warning
 Invalid YAML - normal warning
 YAML with invalid field -  normal warning
 
 Please see my attached file.
 
 Would be nice if this could be integrated into lintian.
 
 [...]
 

Hi Simon,

Thanks for taking the time to write a patch and sorry for the long delay
in getting back to you.
  We already commented on your patch a while ago, but unfortunately, you
were never added to the recipient list of those mails ...

Our primary concern with your patch is that it relies on Test::YAML
and Test::More, which are modules only used for testing code (e.g.
build time tests).

Beyond that, there are two additional improvements worth considering:
 * Adding a test case for your new checks / tags
 * Moving the (contents of) @allowed_fields into a data file.

~Niels


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#731340: Nthykier any comments ?

2013-12-28 Thread bastien ROUCARIES
Package: lintian
Version: 2.5.19
control: tags -1 + moreinfo

Ok some comments:
-  @allowed_fields should be get from data (could do)
- is it ok to load test:More test::YAML?
- lack of testsuite (could do)

Bastien


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#731340: Nthykier any comments ?

2013-12-28 Thread Niels Thykier
On 2013-12-28 17:34, bastien ROUCARIES wrote:
 Package: lintian
 Version: 2.5.19
 control: tags -1 + moreinfo
 
 Ok some comments:
 -  @allowed_fields should be get from data (could do)
 - is it ok to load test:More test::YAML?

In the Lintian testsuite, sure - in a Lintian check, I'd say no.

 - lack of testsuite (could do)
 
 Bastien
 

Also note that check attached apparently presumes that autodie is loaded
but does not load it.

~Niels


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#731340: lintian: [new check] Check if debian/upstream files are valid YAML

2013-12-04 Thread Simon Kainz
Package: lintian
Version: 2.5.10.4
Severity: wishlist
Tags: patch


After processing some debian/upstream whic hcontained broken/invalid YAML data,
i created the following check together with ti...@debian.org:

if debian/upstream is not avail -  pedantic warning
Invalid YAML - normal warning
YAML with invalid field -  normal warning

Please see my attached file.

Would be nice if this could be integrated into lintian.






-- System Information:
Debian Release: 7.2
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lintian depends on:
ii  binutils   2.22-8
ii  bzip2  1.0.6-4
ii  diffstat   1.55-3
ii  file   5.11-2
ii  gettext0.18.1.1-9
ii  hardening-includes 2.2
ii  intltool-debian0.35.0+20060710.1
ii  libapt-pkg-perl0.1.26+b1
ii  libarchive-zip-perl1.30-6
ii  libc-bin   2.13-38
ii  libclass-accessor-perl 0.34-1
ii  libclone-perl  0.31-1+b2
ii  libdpkg-perl   1.16.12
ii  libemail-valid-perl0.190-1
ii  libipc-run-perl0.92-1
ii  libparse-debianchangelog-perl  1.2.0-1
ii  libtimedate-perl   1.2000-1
ii  liburi-perl1.60-1
ii  locales2.13-38
ii  man-db 2.6.2-1
ii  patchutils 0.3.2-1.1
ii  perl [libdigest-sha-perl]  5.14.2-21+deb7u1

lintian recommends no packages.

Versions of packages lintian suggests:
pn  binutils-multiarch none
ii  dpkg-dev   1.16.12
ii  libhtml-parser-perl3.69-2
pn  libperlio-gzip-perlnone
ii  libtext-template-perl  1.45-2
ii  man-db 2.6.2-1
ii  xz-utils [lzma]5.1.1alpha+20120614-2


lintian-upstream-metadata.tar.gz
Description: GNU Zip compressed data