~ubuntu-branches/ubuntu/natty/aptdaemon/natty-security

« back to all changes in this revision

Viewing changes to debian/patches/01_relax_lintian_checks.patch

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2011-04-05 16:31:37 UTC
  • mfrom: (1.1.46 upstream)
  • Revision ID: james.westby@ubuntu.com-20110405163137-43hk29tzgs9y0saa
Tags: 0.41+bzr614-0ubuntu1
* New bzr bugfix snapshot:
  - fix i18n crash (LP: #724735)
  - Allow to specify package names with an architecture 
    (for multiarch)
  - Client: Exit the transaction processing if there has been an 
    error
  - Make the run method of the GTK2 progress dialog deferable
    (LP: #626798)
* debian/patches/01_relax_lintian_checks.patch:
  - add lp:~mvo/aptdaemon/relax-lintian-checks as distro patch
    until upstream (LP: #712377)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
=== modified file 'aptdaemon/worker.py'
 
2
--- a/aptdaemon/worker.py       2011-04-05 07:21:10 +0000
 
3
+++ b/aptdaemon/worker.py       2011-04-05 13:45:43 +0000
 
4
@@ -1063,7 +1063,13 @@
 
5
             if pid == 0:
 
6
                 mainloop.quit()
 
7
                 os.seteuid(uid)
 
8
-                os.execl("/usr/bin/lintian", "-F", path)
 
9
+                tags_path = os.path.join(
 
10
+                    apt_pkg.config["Dir"], "usr", "share",
 
11
+                    "aptdaemon", "lintian-checks")
 
12
+                os.execl("/usr/bin/lintian", 
 
13
+                         "--check",
 
14
+                         "--tags-from-file", "%s" % tags_path,
 
15
+                         path)
 
16
                 os._exit(0)
 
17
             else:
 
18
                 output_fd = os.fdopen(master)
 
19
@@ -1074,7 +1080,13 @@
 
20
                 finally:
 
21
                     output_fd.close()
 
22
                 pid, status = os.waitpid(pid, 0)
 
23
-                if status != 0:
 
24
+                # 0 mean all good
 
25
+                # 1 means polcy viloation
 
26
+                # 2 means internal lintian error
 
27
+                logging.debug("lintian returned status %i" % (status))
 
28
+                # we don't want to fail on anything other than lintian
 
29
+                # explictely telling us that something is wrong
 
30
+                if os.WEXITSTATUS(status) == 1:
 
31
                     raise TransactionFailed(ERROR_INVALID_PACKAGE_FILE,
 
32
                                             "Lintian check results for %s:"
 
33
                                             "\n%s" % (path, output))
 
34
 
 
35
=== added file 'data/lintian-checks'
 
36
--- a/data/lintian-checks       1970-01-01 00:00:00 +0000
 
37
+++ b/data/lintian-checks       2011-04-05 13:45:43 +0000
 
38
@@ -0,0 +1,52 @@
 
39
+# custom checks for aptdaemon
 
40
+bad-package-name
 
41
+bad-relation
 
42
+bad-version-number
 
43
+binary-in-etc
 
44
+build-info-in-binary-control-file-section
 
45
+control-file-has-bad-owner
 
46
+control-file-has-bad-permissions
 
47
+control-interpreter-in-usr-local
 
48
+debian-control-file-uses-obsolete-national-encoding
 
49
+debian-control-with-duplicate-fields
 
50
+dir-or-file-in-mnt
 
51
+dir-or-file-in-srv
 
52
+dir-or-file-in-tmp
 
53
+file-in-usr-marked-as-conffile
 
54
+forbidden-postrm-interpreter
 
55
+maintainer-address-is-on-localhost
 
56
+maintainer-address-malformed
 
57
+maintainer-address-missing
 
58
+maintainer-name-missing
 
59
+maintainer-script-removes-device-files
 
60
+malformed-deb-archive
 
61
+missing-dependency-on-perlapi
 
62
+no-architecture-field
 
63
+no-maintainer-field
 
64
+no-package-name
 
65
+no-source-field
 
66
+no-version-field
 
67
+not-allowed-control-file
 
68
+old-style-copyright-file
 
69
+package-contains-ancient-file
 
70
+package-has-no-description
 
71
+package-not-lowercase
 
72
+package-uses-local-diversion
 
73
+source-field-does-not-match-pkg-name
 
74
+symlink-has-too-many-up-segments
 
75
+too-many-architectures
 
76
+uploader-address-is-on-localhost
 
77
+uploader-address-malformed
 
78
+uploader-name-missing
 
79
+
 
80
+# non fatal
 
81
+arch-dependent-file-in-usr-share
 
82
+arch-independent-package-contains-binary-or-object
 
83
+binary-with-bad-dynamic-table
 
84
+control-interpreter-without-depends
 
85
+dir-or-file-in-var-www
 
86
+missing-dependency-on-libc
 
87
+non-etc-file-marked-as-conffile
 
88
+package-contains-info-dir-file
 
89
+preinst-interpreter-without-predepends
 
90
+wrong-file-owner-uid-or-gid
 
91
 
 
92
=== modified file 'setup.py'
 
93
--- a/setup.py  2011-01-13 11:39:51 +0000
 
94
+++ b/setup.py  2011-04-05 14:04:40 +0000
 
95
@@ -38,6 +38,8 @@
 
96
                    ["data/org.debian.apt.service"]),
 
97
                   ("share/man/man1",
 
98
                    ["doc/aptd.1", "doc/aptdcon.1"]),
 
99
+                  ("share/aptdaemon",
 
100
+                   ["data/lintian-checks"]),
 
101
                   ("share/man/man7",
 
102
                    ["doc/org.debian.apt.7",
 
103
                     "doc/org.debian.apt.transaction.7"])],