[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 04/04: Add support for new build profiles



This is an automated email from the git hooks/post-receive script.

jwilk pushed a commit to branch master
in repository lintian.

commit f5d90cbded48722c39a868f288a4b3561b78eb7d
Author: Jakub Wilk <jwilk@debian.org>
Date:   Fri Sep 30 13:03:16 2016 +0200

    Add support for new build profiles
    
    The following build profiles have been added[*]:
    
        nogolang
        nojava
        noperl
        nopython
        noudeb
        pkg.<srcpkg>.<anything>
    
    [*] https://wiki.debian.org/BuildProfileSpec?action=diff&rev1=99&rev2=100
---
 checks/control-file.desc                                  | 15 +++++++++++++--
 checks/control-file.pm                                    |  3 ++-
 checks/fields.desc                                        | 15 +++++++++++++--
 checks/fields.pm                                          |  3 ++-
 data/fields/build-profiles                                |  5 +++++
 debian/changelog                                          |  6 +++++-
 .../debian/debian/control.in                              |  5 +++--
 7 files changed, 43 insertions(+), 9 deletions(-)

diff --git a/checks/control-file.desc b/checks/control-file.desc
index 3a1c537..f8989e3 100644
--- a/checks/control-file.desc
+++ b/checks/control-file.desc
@@ -249,8 +249,19 @@ Tag: invalid-profile-name-in-build-profiles-field
 Severity: important
 Certainty: possible
 Info: The restriction formula in Build-Profiles field includes an unknown build
- profile. The only allowed build profiles are "stage1", "stage2", "nocheck",
- "nodoc", "nobiarch" and "cross".
+ profile. The only allowed build profiles are
+ "cross",
+ "nobiarch",
+ "nocheck",
+ "nodoc",
+ "nogolang",
+ "nojava",
+ "noperl",
+ "nopython",
+ "noudeb",
+ "stage1",
+ "stage2"
+ and "pkg.<i>srcpkg</i>.<i>anything</i>".
 Ref: https://wiki.debian.org/BuildProfileSpec#Registered_profile_names
 
 Tag: multiline-architecture-field
diff --git a/checks/control-file.pm b/checks/control-file.pm
index da8fec5..9ade7ec 100644
--- a/checks/control-file.pm
+++ b/checks/control-file.pm
@@ -347,7 +347,8 @@ sub run {
                     $profile =~ s/^!//;
                     tag 'invalid-profile-name-in-build-profiles-field',
                       $profile, $bin
-                      unless $KNOWN_BUILD_PROFILES->known($profile);
+                      unless $KNOWN_BUILD_PROFILES->known($profile)
+                      or $profile =~ /^pkg\.[a-z0-9][a-z0-9+.-]+\../;
                 }
             }
         }
diff --git a/checks/fields.desc b/checks/fields.desc
index 3faaff0..263177b 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -659,8 +659,19 @@ Tag: invalid-profile-name-in-source-relation
 Severity: important
 Certainty: possible
 Info: The restriction formula in the source relation includes an unknown build
- profile. The only allowed build profiles are "stage1", "stage2", "nocheck",
- "nodoc", "nobiarch" and "cross".
+ profile. The only allowed build profiles are
+ "cross",
+ "nobiarch",
+ "nocheck",
+ "nodoc",
+ "nogolang",
+ "nojava",
+ "noperl",
+ "nopython",
+ "noudeb",
+ "stage1",
+ "stage2"
+ and "pkg.<i>srcpkg</i>.<i>anything</i>".
 Ref: https://wiki.debian.org/BuildProfileSpec#Registered_profile_names
 
 Tag: restriction-formula-without-versioned-dpkg-dev-dependency
diff --git a/checks/fields.pm b/checks/fields.pm
index 328f0f9..3cc006e 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -1000,7 +1000,8 @@ sub run {
                                 $prof =~ s/^!//;
                                 tag 'invalid-profile-name-in-source-relation',
                                   "$prof [$field: $part_d_orig]"
-                                  unless $KNOWN_BUILD_PROFILES->known($prof);
+                                  unless $KNOWN_BUILD_PROFILES->known($prof)
+                                  or $prof =~ /^pkg\.[a-z0-9][a-z0-9+.-]+\../;
                             }
                         }
 
diff --git a/data/fields/build-profiles b/data/fields/build-profiles
index c6c3175..80cad7d 100644
--- a/data/fields/build-profiles
+++ b/data/fields/build-profiles
@@ -2,5 +2,10 @@ cross
 nobiarch
 nocheck
 nodoc
+nogolang
+nojava
+noperl
+nopython
+noudeb
 stage1
 stage2
diff --git a/debian/changelog b/debian/changelog
index d43c877..5e0e502 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,15 +14,17 @@ lintian (2.5.48) UNRELEASED; urgency=low
     + [JW] Relax Build-Profiles syntax check to allow (almost) any
       characters in profile names.  Thanks to Ximin Luo for the bug report.
       (Closes: #839086)
+    + [JW] Add support for pkg.<srcpkg>.<anything> build profiles.
   * checks/debhelper.pm:
     + [JW] Ignore comments in debian/rules.
     + [JW] Fix parsing rule targets in lines containing multiple colons.
       Thanks to Andreas Beckmann for the bug report.  (Closes: #838246)
     + [CL] Check for .maintscript files that include
       "maint-script-parameters".  (Closes: #838195)
-  * checks/fields.desc:
+  * checks/fields.{desc,pm}:
     + [JW] Fix typo.
     + [JW] Add references to tags related to build profiles.
+    + [JW] Add support for pkg.<srcpkg>.<anything> build profiles.
   * checks/testsuite.pm:
     + [JW] Apply patch from Sean Whitton to recognise autopkgtest-pkg-elpa
       as a valid value for the Testsuite field.  (Closes: #837801)
@@ -30,6 +32,8 @@ lintian (2.5.48) UNRELEASED; urgency=low
   * collection/hardening-info:
     + [NT] Removed.
 
+  * data/fields/build-profiles:
+    + [JW] Add new profiles: nogolang, nojava, noperl, nopython, noudeb.
   * data/fields/obsolete-packages:
     + [NT] Apply patch from Otto Kekäläinen to assist with the transition
       to the "default-mysql-*" packages.  (Closes: #838603)
diff --git a/t/tests/fields-build-profiles-general/debian/debian/control.in b/t/tests/fields-build-profiles-general/debian/debian/control.in
index fe186fc..0f4f377 100644
--- a/t/tests/fields-build-profiles-general/debian/debian/control.in
+++ b/t/tests/fields-build-profiles-general/debian/debian/control.in
@@ -4,7 +4,8 @@ Section: devel
 Maintainer: {$author}
 Standards-Version: {$standards_version}
 Build-Depends: {$build_depends},
- big <stage1>, bpfail1 <foobar>, bpcomplicated <stage1 nocheck> <cross>
+ big <stage1>, bpfail1 <foobar>,
+ bpcomplicated <stage1 nocheck> <cross> <!pkg.{$source}.foo>
 
 Package: {$source}-wrong-syntax
 Architecture: {$architecture}
@@ -21,7 +22,7 @@ Description: {$description} (wrong syntax)
 Package: {$source}-unknown-profile
 Architecture: {$architecture}
 Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
-Build-Profiles: <!stage1 !nocheck> <!unknown>
+Build-Profiles: <!stage1 !nocheck> <!unknown> <pkg.{$source}.foo>
 Description: {$description} (unknown profile)
  Check for unknown profile names
  .

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: