Browse Source

- Updated 'check' section in Makefile and usb.ids check script
- Added source Dockerfile for hwdata-check image

Signed-off-by: Vitezslav Crhonek <vcrhonek@redhat.com>

Vitezslav Crhonek 7 years ago
parent
commit
d2caca5083
3 changed files with 9 additions and 3 deletions
  1. 3 0
      Dockerfile
  2. 4 1
      Makefile
  3. 2 2
      check-usb-ids.sh

+ 3 - 0
Dockerfile

@@ -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

+ 4 - 1
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 \

+ 2 - 2
check-usb-ids.sh

@@ -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