summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/udev
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/udev')
-rw-r--r--t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/clean5
-rw-r--r--t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/dirs15
-rw-r--r--t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/install61
-rw-r--r--t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/manpages0
-rwxr-xr-xt/recipes/checks/udev/files-foo-in-bar/build-spec/debian/rules18
-rw-r--r--t/recipes/checks/udev/files-foo-in-bar/build-spec/fill-values3
-rw-r--r--t/recipes/checks/udev/files-foo-in-bar/build-spec/orig/bar1
-rw-r--r--t/recipes/checks/udev/files-foo-in-bar/build-spec/orig/bar.pod18
-rw-r--r--t/recipes/checks/udev/files-foo-in-bar/eval/desc2
-rw-r--r--t/recipes/checks/udev/files-foo-in-bar/eval/hints1
-rw-r--r--t/recipes/checks/udev/files-foo-in-bar/eval/post-test2
-rw-r--r--t/recipes/checks/udev/udev-rules/build-spec/debian/rules13
-rw-r--r--t/recipes/checks/udev/udev-rules/build-spec/debian/udev-rules.dirs2
-rw-r--r--t/recipes/checks/udev/udev-rules/build-spec/debian/udev-rules.metadata.xml22
-rw-r--r--t/recipes/checks/udev/udev-rules/build-spec/debian/udev-rules.udev25
-rw-r--r--t/recipes/checks/udev/udev-rules/build-spec/fill-values3
-rw-r--r--t/recipes/checks/udev/udev-rules/eval/desc2
-rw-r--r--t/recipes/checks/udev/udev-rules/eval/hints5
18 files changed, 198 insertions, 0 deletions
diff --git a/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/clean b/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/clean
new file mode 100644
index 0000000..be4ae72
--- /dev/null
+++ b/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/clean
@@ -0,0 +1,5 @@
+bar.1*
+Bar.pm
+bar.png
+perllocal.pod
+preferences
diff --git a/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/dirs b/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/dirs
new file mode 100644
index 0000000..e8759c9
--- /dev/null
+++ b/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/dirs
@@ -0,0 +1,15 @@
+etc/apt/preferences.d
+etc/apt
+etc/init
+bin/foo
+mnt/foo
+tmp/foo
+usr/bin/foo
+usr/foo
+usr/lib/debug
+usr/local/foo
+usr/lib/site-python/foo
+usr/share/doc/files-foo-in-bar/examples/examples
+var/foo
+var/lock/foo
+var/run/foo
diff --git a/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/install b/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/install
new file mode 100644
index 0000000..ba46865
--- /dev/null
+++ b/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/install
@@ -0,0 +1,61 @@
+bar bin/foo
+bar emul
+bar etc/apt/preferences.d
+bar etc/apt/sources.list.d
+bar etc/apt/trusted.gpg.d
+bar etc/gconf/schemas/
+bar etc/init
+bar etc/rc.boot
+bar etc/rc.d
+bar etc/udev/rules.d
+bar lib32
+bar lib64
+bar libx32
+bar mnt/foo
+bar run/foo
+bar srv/foo
+bar tmp/foo
+bar usr/bin/foo
+bar usr/foo
+bar usr/lib/debug/
+bar usr/lib32
+bar usr/lib64
+bar usr/libexec
+bar usr/libx32
+bar usr/lib/perl/
+bar usr/lib/python2.7/
+bar usr/lib/sgml
+bar usr/lib/site-python/foo
+bar usr/local/foo
+bar usr/share
+bar usr/share/doc
+bar usr/share/doc/files-foo-in-bar/.xvpics/
+bar usr/share/doc/files-foo-in-bar/.thumbnails/
+bar usr/share/doc/files-foo-in-bar/examples/examples
+bar usr/share/mime/foo/
+bar usr/share/mime/packages/
+bar usr/share/perl/
+bar usr/share/vim/vimcurrent/
+bar usr/share/vim/vim73/
+bar usr/X11R6/bin
+bar usr/X11R6/lib/X11/fonts/
+bar var/foo
+bar var/lock/foo
+bar var/run/foo
+bar var/www/foo
+bar home/johndoe
+bar root
+bar etc/opt
+bar var/cache/pbuilder/build
+bar var/lib/sbuild
+bar var/lib/buildd
+bar build/dir/foo
+bar tmp/buildd/dir/foo
+bar etc/dhcp3
+
+Bar.pm usr/lib/perl5/Foo
+bar.png usr/lib/files-foo-in-bar
+
+perllocal.pod usr/lib/perl-foo
+.packlist usr/lib/perl5
+preferences etc/apt
diff --git a/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/manpages b/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/manpages
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/manpages
diff --git a/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/rules b/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/rules
new file mode 100755
index 0000000..69a61df
--- /dev/null
+++ b/t/recipes/checks/udev/files-foo-in-bar/build-spec/debian/rules
@@ -0,0 +1,18 @@
+#!/usr/bin/make -f
+%:
+ dh $@
+
+override_dh_auto_build:
+ pod2man --section 1 bar.pod > bar.1
+ gzip -n --best bar.1
+ cp bar Bar.pm
+ cp bar bar.png
+ cp bar perllocal.pod
+ touch .packlist
+ touch preferences
+
+override_dh_auto_install:
+ dh_install bar.1.gz usr/X11R6/man/man1/
+
+# skip
+override_dh_usrlocal override_dh_gconf:
diff --git a/t/recipes/checks/udev/files-foo-in-bar/build-spec/fill-values b/t/recipes/checks/udev/files-foo-in-bar/build-spec/fill-values
new file mode 100644
index 0000000..17ea927
--- /dev/null
+++ b/t/recipes/checks/udev/files-foo-in-bar/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: upload-native
+Testname: files-foo-in-bar
+Description: Test tags about files or dirs in given paths
diff --git a/t/recipes/checks/udev/files-foo-in-bar/build-spec/orig/bar b/t/recipes/checks/udev/files-foo-in-bar/build-spec/orig/bar
new file mode 100644
index 0000000..980a0d5
--- /dev/null
+++ b/t/recipes/checks/udev/files-foo-in-bar/build-spec/orig/bar
@@ -0,0 +1 @@
+Hello World!
diff --git a/t/recipes/checks/udev/files-foo-in-bar/build-spec/orig/bar.pod b/t/recipes/checks/udev/files-foo-in-bar/build-spec/orig/bar.pod
new file mode 100644
index 0000000..4144a36
--- /dev/null
+++ b/t/recipes/checks/udev/files-foo-in-bar/build-spec/orig/bar.pod
@@ -0,0 +1,18 @@
+
+=head1 NAME
+
+bar - does stuff
+
+=head1 SYNOPSIS
+
+bar
+
+=head1 DESCRIPTION
+
+Does nothing.
+
+=head1 AUTHOR
+
+Niels Thykier <niels@thykier.net>
+
+=cut
diff --git a/t/recipes/checks/udev/files-foo-in-bar/eval/desc b/t/recipes/checks/udev/files-foo-in-bar/eval/desc
new file mode 100644
index 0000000..6bb0fe5
--- /dev/null
+++ b/t/recipes/checks/udev/files-foo-in-bar/eval/desc
@@ -0,0 +1,2 @@
+Testname: files-foo-in-bar
+Check: udev
diff --git a/t/recipes/checks/udev/files-foo-in-bar/eval/hints b/t/recipes/checks/udev/files-foo-in-bar/eval/hints
new file mode 100644
index 0000000..c39ad40
--- /dev/null
+++ b/t/recipes/checks/udev/files-foo-in-bar/eval/hints
@@ -0,0 +1 @@
+files-foo-in-bar (binary): udev-rule-in-etc [etc/udev/rules.d/bar]
diff --git a/t/recipes/checks/udev/files-foo-in-bar/eval/post-test b/t/recipes/checks/udev/files-foo-in-bar/eval/post-test
new file mode 100644
index 0000000..5af7ea2
--- /dev/null
+++ b/t/recipes/checks/udev/files-foo-in-bar/eval/post-test
@@ -0,0 +1,2 @@
+# Ignore all duplicate-files tags
+/[^ ]* \([^)]*\): duplicate-files .*/ d
diff --git a/t/recipes/checks/udev/udev-rules/build-spec/debian/rules b/t/recipes/checks/udev/udev-rules/build-spec/debian/rules
new file mode 100644
index 0000000..0b8c364
--- /dev/null
+++ b/t/recipes/checks/udev/udev-rules/build-spec/debian/rules
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+
+DESTDIR = debian/$(shell dh_listpackages)
+APPSYNC_DIR=$(DESTDIR)/usr/share/metainfo/
+UDEV_DIR=$(DESTDIR)/usr/lib/udev/rules.d/
+
+%:
+ dh $@
+
+override_dh_install:
+ dh_install
+ install -m 0644 debian/udev-rules.metadata.xml $(APPSYNC_DIR)
+ ln -s dangling $(UDEV_DIR)/60-dangling-symlink.rules
diff --git a/t/recipes/checks/udev/udev-rules/build-spec/debian/udev-rules.dirs b/t/recipes/checks/udev/udev-rules/build-spec/debian/udev-rules.dirs
new file mode 100644
index 0000000..9268383
--- /dev/null
+++ b/t/recipes/checks/udev/udev-rules/build-spec/debian/udev-rules.dirs
@@ -0,0 +1,2 @@
+usr/lib/udev/rules.d
+usr/share/metainfo
diff --git a/t/recipes/checks/udev/udev-rules/build-spec/debian/udev-rules.metadata.xml b/t/recipes/checks/udev/udev-rules/build-spec/debian/udev-rules.metadata.xml
new file mode 100644
index 0000000..2564e98
--- /dev/null
+++ b/t/recipes/checks/udev/udev-rules/build-spec/debian/udev-rules.metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component>
+ <id>udev-rules</id>
+ <metadata_license>MIT</metadata_license>
+ <name>lintian udev-rules test</name>
+ <summary>Test udev related checks in lintian</summary>
+ <description>
+ <p>
+ This is a test package designed to exercise some feature or tag
+ of Lintian. It is part of the Lintian test suite and may do
+ very odd things. It should not be installed like a regular
+ package. It may be an empty package.
+ </p>
+ </description>
+ <provides>
+ <modalias>usb:v0000p0001d*</modalias>
+ <modalias>usb:v0000p0002d*</modalias>
+ <modalias>usb:v0000p0003d*</modalias>
+ <modalias>usb:v0000p0004d*</modalias>
+ <modalias>usb:v0000p000Ad*</modalias>
+ </provides>
+</component>
diff --git a/t/recipes/checks/udev/udev-rules/build-spec/debian/udev-rules.udev b/t/recipes/checks/udev/udev-rules/build-spec/debian/udev-rules.udev
new file mode 100644
index 0000000..e35482d
--- /dev/null
+++ b/t/recipes/checks/udev/udev-rules/build-spec/debian/udev-rules.udev
@@ -0,0 +1,25 @@
+SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0001", \
+ MODE="0666"
+
+SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0002", \
+ MODE="0660", GROUP="plugdev"
+
+SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0003", \
+ TAG+="uaccess"
+
+SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0004", \
+ MODE="0660", GROUP="plugdev", TAG+="uaccess"
+
+ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="0005", \
+ MODE="0660", GROUP="plugdev", TAG+="uaccess"
+
+SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0000", ATTR{idProduct}=="000a", \
+ ID_TEST_DEVICE="1"
+
+SUBSYSTEM!="usb", GOTO="target"
+ENV{DEVTYPE}!="usb_device", GOTO="target"
+ATTR{idVendor}=="0000", ATTR{idProduct}=="0000", RUN+="missing-subsystem-false-positive"
+LABEL="target"
+
+# Ensure we trigger this one after a GOTO
+ATTR{idVendor}=="0000", ATTR{idProduct}=="0000", RUN+="missing-subsystem"
diff --git a/t/recipes/checks/udev/udev-rules/build-spec/fill-values b/t/recipes/checks/udev/udev-rules/build-spec/fill-values
new file mode 100644
index 0000000..6463c54
--- /dev/null
+++ b/t/recipes/checks/udev/udev-rules/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: upload-native
+Testname: udev-rules
+Description: Check udev rules for mistakes
diff --git a/t/recipes/checks/udev/udev-rules/eval/desc b/t/recipes/checks/udev/udev-rules/eval/desc
new file mode 100644
index 0000000..7330125
--- /dev/null
+++ b/t/recipes/checks/udev/udev-rules/eval/desc
@@ -0,0 +1,2 @@
+Testname: udev-rules
+Check: udev
diff --git a/t/recipes/checks/udev/udev-rules/eval/hints b/t/recipes/checks/udev/udev-rules/eval/hints
new file mode 100644
index 0000000..e83c0b2
--- /dev/null
+++ b/t/recipes/checks/udev/udev-rules/eval/hints
@@ -0,0 +1,5 @@
+udev-rules (binary): udev-rule-unreadable [usr/lib/udev/rules.d/60-dangling-symlink.rules]
+udev-rules (binary): udev-rule-missing-uaccess user accessible device missing TAG+="uaccess" [usr/lib/udev/rules.d/60-udev-rules.rules:5]
+udev-rules (binary): udev-rule-missing-uaccess user accessible device missing TAG+="uaccess" [usr/lib/udev/rules.d/60-udev-rules.rules:2]
+udev-rules (binary): udev-rule-missing-subsystem vendor/product matching missing SUBSYSTEM specifier [usr/lib/udev/rules.d/60-udev-rules.rules:25]
+udev-rules (binary): udev-rule-missing-subsystem vendor/product matching missing SUBSYSTEM specifier [usr/lib/udev/rules.d/60-udev-rules.rules:14]