Bug#818962: [lintian] Proposed patches for php checks

2016-10-24 Thread Raphael Hertzog
Hi,

On Wed, 20 Apr 2016, Ondřej Surý wrote:
> I think the lintian should not allow dependency on phpX.Y-, but
> only on php- (people can still override that), because we want
> packages to transition between different PHP versions by default.
> 
> I'll review Mathieu's patches tomorrow and update them accordingly.

I don't think this ever happened. And lintian is still emitting those
wrong errors.

Can you take some time to ensure this is fixed in lintian?

Thank you!
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/



Bug#818962: [lintian] Proposed patches for php checks

2016-04-20 Thread Ondřej Surý
Hi Jakub and Mathieu,

I think the lintian should not allow dependency on phpX.Y-, but
only on php- (people can still override that), because we want
packages to transition between different PHP versions by default.

I'll review Mathieu's patches tomorrow and update them accordingly.

Cheers,
-- 
Ondřej Surý 
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server

On Wed, Apr 20, 2016, at 22:40, Jakub Wilk wrote:
> Hi Mathieu!
> 
> Thanks for the patches.
> 
> * Mathieu Parent , 2016-04-19, 12:10:
> > Info: Packages with PHP scripts must depend on a phpX-cli package such as
> >- php5-cli.  Note that a dependency on a php-cgi package (such as php5-cgi)
> >- is needlessly strict and forces the user to install a package that isn't
> >- needed.
> >+ php-cli or php7.0-cli.  Note that a dependency on a php-cgi package (such
> >+ as php-cgi or php7.0-cgi) is needlessly strict and forces the user to
> >+ install a package that isn't needed.
> 
> Hmm, that's not the description Ondřej proposed...
> Also, "php-cgi package (such as php-cgi ...)" sounds awkward.
> 
> >-php => /usr/bin, php(\d+), php$1-cli, 5, @NO_DEFAULT_DEPS@
> >+php => /usr/bin, php(\d+), php$1-cli, 5, php-cli
> 
> Shouldn't it be "php([\d.]+)" and s/5/7.0/?
> 
> >Subject: [PATCH 2/6] dh-php5 is replaced by dh-php, and php5-dev by php-dev
> >Subject: [PATCH 3/6] php-foo.ini is now in /etc/php/*/mods-available/
> 
> Applied!
> 
> >Subject: [PATCH 4/6] Updated checks.pot
> 
> We'll update checks.pot later...
> 
> >Subject: [PATCH 5/6] Fix refresh-debhelper-data (dists/sid/Contents-i386.gz 
> >is
> > no more)
> >Subject: [PATCH 6/6] Refresh debhelper data
> 
> Applied!
> 
> -- 
> Jakub Wilk



Bug#818962: [lintian] Proposed patches for php checks

2016-04-20 Thread Jakub Wilk

Hi Mathieu!

Thanks for the patches.

* Mathieu Parent , 2016-04-19, 12:10:

Info: Packages with PHP scripts must depend on a phpX-cli package such as
- php5-cli.  Note that a dependency on a php-cgi package (such as php5-cgi)
- is needlessly strict and forces the user to install a package that isn't
- needed.
+ php-cli or php7.0-cli.  Note that a dependency on a php-cgi package (such
+ as php-cgi or php7.0-cgi) is needlessly strict and forces the user to
+ install a package that isn't needed.


Hmm, that's not the description Ondřej proposed...
Also, "php-cgi package (such as php-cgi ...)" sounds awkward.


-php => /usr/bin, php(\d+), php$1-cli, 5, @NO_DEFAULT_DEPS@
+php => /usr/bin, php(\d+), php$1-cli, 5, php-cli


Shouldn't it be "php([\d.]+)" and s/5/7.0/?


Subject: [PATCH 2/6] dh-php5 is replaced by dh-php, and php5-dev by php-dev
Subject: [PATCH 3/6] php-foo.ini is now in /etc/php/*/mods-available/


Applied!


Subject: [PATCH 4/6] Updated checks.pot


We'll update checks.pot later...


Subject: [PATCH 5/6] Fix refresh-debhelper-data (dists/sid/Contents-i386.gz is
no more)
Subject: [PATCH 6/6] Refresh debhelper data


Applied!

--
Jakub Wilk



Bug#818962: [lintian] Proposed patches for php checks

2016-04-19 Thread Mathieu Parent
Control: tag -1 + patch confirmed

Hello,

See the attached patches (0001 to 0004).

Patches 5 and 6 are unrelated.

Regards
-- 
Mathieu
From 4231f1d6bcf8deaa785941b6ed8809aa2127dc79 Mon Sep 17 00:00:00 2001
From: Mathieu Parent 
Date: Thu, 3 Mar 2016 10:50:36 +0100
Subject: [PATCH 1/6] There is now a php-cli package

---
 checks/scripts.desc| 6 +++---
 data/scripts/versioned-interpreters| 2 +-
 t/tests/legacy-scripts/debian/debian/rules | 4 ++--
 t/tests/legacy-scripts/tags| 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/checks/scripts.desc b/checks/scripts.desc
index ddcc5ed..77590ec 100644
--- a/checks/scripts.desc
+++ b/checks/scripts.desc
@@ -221,9 +221,9 @@ Tag: php-script-but-no-phpX-cli-dep
 Severity: important
 Certainty: certain
 Info: Packages with PHP scripts must depend on a phpX-cli package such as
- php5-cli.  Note that a dependency on a php-cgi package (such as php5-cgi)
- is needlessly strict and forces the user to install a package that isn't
- needed.
+ php-cli or php7.0-cli.  Note that a dependency on a php-cgi package (such
+ as php-cgi or php7.0-cgi) is needlessly strict and forces the user to
+ install a package that isn't needed.
  .
  In some cases a weaker relationship, such as Suggests or Recommends, will
  be more appropriate.
diff --git a/data/scripts/versioned-interpreters b/data/scripts/versioned-interpreters
index fff44c2..05fb366 100644
--- a/data/scripts/versioned-interpreters
+++ b/data/scripts/versioned-interpreters
@@ -73,7 +73,7 @@ guile   => /usr/bin, guile-([\d.]+), guile-$1, 1.6 1.8,
 jruby   => /usr/bin, jruby([\d.]+), jruby$1, 1.0 1.1 1.2
 lua => /usr/bin, lua([\d.]+), lua$1, 40 50 5.1 5.2
 octave  => /usr/bin, octave([\d.]+), octave$1, 3.0 3.2
-php => /usr/bin, php(\d+), php$1-cli, 5, @NO_DEFAULT_DEPS@
+php => /usr/bin, php(\d+), php$1-cli, 5, php-cli
 pike=> /usr/bin, pike([\d.]+), pike$1 | pike$1-core, 7.6 7.8, @NO_DEFAULT_DEPS@
 python  => /usr/bin, python([\d.]+), python$1:any | python$1-minimal:any, 2.7, @SKIP_UNVERSIONED@
 ruby=> /usr/bin, ruby([\d.]+), ruby$1, 1.8 1.9, @SKIP_UNVERSIONED@
diff --git a/t/tests/legacy-scripts/debian/debian/rules b/t/tests/legacy-scripts/debian/debian/rules
index 25b6f9e..a615bd6 100755
--- a/t/tests/legacy-scripts/debian/debian/rules
+++ b/t/tests/legacy-scripts/debian/debian/rules
@@ -63,8 +63,8 @@ binary-indep:
 	install -m 755 init-lsb-other $(tmp)/etc/init.d/lsb-other
 
 	install -m 755 phpfoo $(tmp)/usr/share/scripts/
-	sed 's/php$$/php5/' phpfoo > $(tmp)/usr/share/scripts/php5foo
-	chmod 755 $(tmp)/usr/share/scripts/php5foo
+	sed 's/php$$/php7.0/' phpfoo > $(tmp)/usr/share/scripts/php7.0foo
+	chmod 755 $(tmp)/usr/share/scripts/php7.0foo
 
 	echo "#!/usr/bin/perl" >> $(tmp)/usr/share/scripts/foobar.in
 	chmod 644 $(tmp)/usr/share/scripts/foobar.in
diff --git a/t/tests/legacy-scripts/tags b/t/tests/legacy-scripts/tags
index 3f2854c..d229820 100644
--- a/t/tests/legacy-scripts/tags
+++ b/t/tests/legacy-scripts/tags
@@ -13,7 +13,7 @@ E: scripts: init.d-script-has-unterminated-lsb-section etc/init.d/lsb-broken:15
 E: scripts: missing-dep-for-interpreter jruby => jruby | jruby1.0 | jruby1.1 | jruby1.2 (usr/bin/jruby-broken)
 E: scripts: missing-dep-for-interpreter lefty => graphviz (usr/bin/lefty-foo)
 E: scripts: package-installs-python-bytecode usr/lib/python2.3/site-packages/test.pyc
-E: scripts: php-script-but-no-phpX-cli-dep usr/share/scripts/php5foo
+E: scripts: php-script-but-no-phpX-cli-dep usr/share/scripts/php7.0foo
 E: scripts: php-script-but-no-phpX-cli-dep usr/share/scripts/phpfoo
 E: scripts: python-script-but-no-python-dep usr/bin/py2foo
 E: scripts: python-script-but-no-python-dep usr/bin/pyfoo
-- 
2.6.2

From 9e3f413469c0533a34f397dae77ef5307e4735f9 Mon Sep 17 00:00:00 2001
From: Mathieu Parent 
Date: Thu, 3 Mar 2016 10:56:23 +0100
Subject: [PATCH 2/6] dh-php5 is replaced by dh-php, and php5-dev by php-dev

Note that php-dev currently depends on php7.0-dev
---
 checks/phppear.desc |  4 ++--
 checks/phppear.pm   | 18 +-
 data/debhelper/dh_addons|  2 +-
 data/debhelper/dh_commands  |  2 +-
 data/debhelper/dh_packages  |  2 +-
 data/debhelper/maint_commands   |  2 +-
 data/debhelper/miscDepends_commands |  2 +-
 t/tests/phppear-pear/tags   |  6 +++---
 t/tests/phppear-pearok/debian/debian/control.in |  2 +-
 9 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/checks/phppear.desc b/checks/phppear.desc
index ccf7a57..5f659b6 100644
--- a/checks/phppear.desc
+++ b/checks/phppear.desc
@@ -50,7 +50,7 @@ Tag: pecl-package-requires-build-dependency
 Severity: normal
 Certainty: possible
 Info: The package is a PECL package but its control file doesn't have
- php5-dev