- Updated 'check' section in Makefile and usb.ids check script
authorVitezslav Crhonek <vcrhonek@redhat.com>
Wed, 26 Oct 2016 11:08:15 +0000 (13:08 +0200)
committerVitezslav Crhonek <vcrhonek@redhat.com>
Wed, 26 Oct 2016 11:11:56 +0000 (13:11 +0200)
- Added source Dockerfile for hwdata-check image

Signed-off-by: Vitezslav Crhonek <vcrhonek@redhat.com>
Dockerfile [new file with mode: 0644]
Makefile
check-usb-ids.sh

diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..ca2e2e8
--- /dev/null
@@ -0,0 +1,3 @@
+FROM fedora:22
+MAINTAINER Vitezslav Crhonek <vcrhonek@redhat.com>
+RUN dnf install -y usbutils python-hwdata && rm -rf /var/cache/yum
index 05ec8cb72741e6db76722427900616665160d46b..7fff7aafc44f30ac603f92a7d2dfe22f45aa611b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,9 @@ CVSTAG = $(NAME)-r$(subst .,-,$(VERSION))
 
 IDFILES = pci.ids usb.ids oui.txt iab.txt pnp.ids
 
+# usb.ids is not in UTF-8
+UTF_IDFILES = pci.ids oui.txt iab.txt pnp.ids
+
 .PHONY: all install tag force-tag check commit create-archive archive srpm-x \
     clean clog download
 
@@ -55,7 +58,7 @@ check:
        @[ -x /sbin/lspci ] && /sbin/lspci -i pci.ids > /dev/null || { echo "FAILURE: /sbin/lspci -i pci.ids"; exit 1; } && echo "OK: /sbin/lspci -i pci.ids"
        @./check-pci-ids.py || { echo "FAILURE: ./check-pci-ids.py"; exit 1; } && echo "OK: ./check-pci-ids.py"
        @./check-usb-ids.sh
-       @for file in $(IDFILES); do \
+       @for file in $(UTF_IDFILES); do \
            text=`LANG=C file $$file`; \
            expected="$$file: UTF-8 Unicode text"; \
            if [[ "$$text" != "$$expected" ]]; then \
index b9f81d3a4417195b6bd119b2ca77359a28b6a0fd..f9f2170756eb48256f18074e6900d68ad13d3878 100755 (executable)
@@ -18,8 +18,8 @@ echo "Listing usb devices:"
 sudo docker run -t --privileged --rm=true \
     -v `pwd`/usb.ids:/usr/share/hwdata/usb.ids:ro \
     -v "$tmpdir:/mnt/out" \
-    miminar/hwdata-check \
-    /bin/bash -c 'lsusb 2>/mnt/out/err.out' || :
+    vcrhonek/hwdata-check \
+    /bin/bash -c 'lsusb 2>/mnt/out/err.out; python /usr/share/doc/python-hwdata/example.py 2>>/mnt/out/err.out' || :
 if [[ `cat $tmpdir/err.out | wc -l` -gt 0 ]]; then
     echo "ERRORS:"
     nl $tmpdir/err.out