Skip to contentSkip to conversation

hwdata: bump to version 0.308

PATCH New Carlos Santos 2 participants 2 messages Jan 26, 2018 – Jan 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 hwdata: bump to version 0.308

The hwdata collection is hosted at GitHub now and provides additional databases, besides pci.ids and usb.ids:

- Individual Address Block (IAB) and Organizationally Unique Identifier (OUI) databases, from IEEE Registration Authority
- PNP ID database (from Microsoft)

Install only pci.ids and usb.ids by default, to keep compatibility with previous versions.

In the future we can make other packages (pciutils, lshw) use the common files instead of installing their own copies, thus saving some storage space.

---
Changes v1->v2:
- Ensure that $(TARGET_DIR)/usr/share/hwdata exists before installing the files there.
Changes v2->v3:
- Fix commit title ("bump", not "bumb").

---
 package/hwdata/Config.in   | 45 ++++++++++++++++++++++++++++++++++++++++++---
 package/hwdata/hwdata.hash |  7 ++++---
 package/hwdata/hwdata.mk   | 21 ++++++++++++++-------
 3 files changed, 60 insertions(+), 13 deletions(-)
package/hwdata/Config.in +42 -3
index 8424238e1b..63bb2216da 100644
@@ -1,6 +1,45 @@
 config BR2_PACKAGE_HWDATA
 	bool "hwdata"
 	help
-	  Various hardware identification and configuration data,
-	  such as the pci.ids database, or the XFree86/xorg Cards
-	  database.
+	  Various hardware identification and configuration data
+
+	  - Individual Address Block (IAB) and Organizationally Unique
+	    Identifier (OUI) databases, from IEEE Registration Authority
+	  - PCI ID database
+	  - PNP ID database (from Microsoft)
+	  - USB ID database
+
+	  https://github.com/vcrhonek/hwdata
+
+if BR2_PACKAGE_HWDATA
+
+config BR2_PACKAGE_HWDATA_ANY
+	bool
+
+config BR2_PACKAGE_HWDATA_IAB_OUI_TXT
+	bool "install iab.txt and oui.txt"
+	select BR2_PACKAGE_HWDATA_ANY
+	help
+	  Install iab.txt and oui.txt
+
+config BR2_PACKAGE_HWDATA_PCI_IDS
+	bool "install pci.ids"
+	default y
+	select BR2_PACKAGE_HWDATA_ANY
+	help
+	  Install pci.ids
+
+config BR2_PACKAGE_HWDATA_PNP_IDS
+	bool "install pnp.ids"
+	select BR2_PACKAGE_HWDATA_ANY
+	help
+	  Install pnp.ids
+
+config BR2_PACKAGE_HWDATA_USB_IDS
+	bool "install usb.ids"
+	default y
+	select BR2_PACKAGE_HWDATA_ANY
+	help
+	  Install usb.ids
+
+endif
package/hwdata/hwdata.hash +4 -3
index b3c83ebb74..dba1be31e0 100644
@@ -1,3 +1,4 @@
-# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/h/hwdata/hwdata_0.267-1.dsc
-sha256	d77f2b3f3d6e278be669141ffa5dac01b64cab02f7b2c744bbabc500a45263f4	hwdata_0.267.orig.tar.gz
-sha256	055d2f168de9333562a04f6a230c43dc19c4975882935d8b2f0ab17f64f57275	hwdata_0.267-1.diff.gz
+# Locally calculated
+sha256 986d919c20a0c7f8b669a63830f6d2f4cb5c4cddcfc944c5e2ae05c2e9e5ec9f  hwdata-v0.308.tar.gz
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
+sha256 21d0406f93e884a050426ebc21931839a45d56bfcbcbfdda7686d583f36f107f  LICENSE
package/hwdata/hwdata.mk +14 -7
index 4ad8d42939..a23a282725 100644
@@ -4,16 +4,23 @@
 #
 ################################################################################
 
-HWDATA_VERSION = 0.267
-HWDATA_SOURCE = hwdata_$(HWDATA_VERSION).orig.tar.gz
-HWDATA_PATCH = hwdata_$(HWDATA_VERSION)-1.diff.gz
-HWDATA_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/h/hwdata
-HWDATA_LICENSE = GPL-2.0+ or XFree86 1.0 license
+HWDATA_VERSION = v0.308
+HWDATA_SITE = $(call github,vcrhonek,hwdata,$(HWDATA_VERSION))
+HWDATA_LICENSE = GPL-2.0+, BSD-3-Clause, XFree86 1.0
 HWDATA_LICENSE_FILES = COPYING LICENSE
 
+ifeq ($(BR2_PACKAGE_HWDATA):$(BR2_PACKAGE_HWDATA_ANY),y:)
+$(error No hwdata database selected. Select at least one database)
+endif
+
 define HWDATA_INSTALL_TARGET_CMDS
-	$(INSTALL) -D -m 644 $(@D)/pci.ids $(TARGET_DIR)/usr/share/hwdata/pci.ids
-	$(INSTALL) -D -m 644 $(@D)/usb.ids $(TARGET_DIR)/usr/share/hwdata/usb.ids
+	$(INSTALL) -d -m 755 $(TARGET_DIR)/usr/share/hwdata
+	$(INSTALL) -D -m 644 \
+		$(if $(BR2_PACKAGE_HWDATA_IAB_OUI_TXT),$(@D)/iab.txt $(@D)/oui.txt,) \
+		$(if $(BR2_PACKAGE_HWDATA_PCI_IDS),$(@D)/pci.ids,) \
+		$(if $(BR2_PACKAGE_HWDATA_PNP_IDS),$(@D)/pnp.ids,) \
+		$(if $(BR2_PACKAGE_HWDATA_USB_IDS),$(@D)/usb.ids,) \
+		$(TARGET_DIR)/usr/share/hwdata
 endef
 
 $(eval $(generic-package))
Signature · 1 line
2.14.3
#1 lore raw

PATCH v3 1/1 hwdata: bump to version 0.308

Quoted 105 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Carlos" == Carlos Santos <[email protected]> writes:

The hwdata collection is hosted at GitHub now and provides additional databases, besides pci.ids and usb.ids:

- Individual Address Block (IAB) and Organizationally Unique Identifier (OUI) databases, from IEEE Registration Authority
- PNP ID database (from Microsoft)

Install only pci.ids and usb.ids by default, to keep compatibility with previous versions.

In the future we can make other packages (pciutils, lshw) use the common files instead of installing their own copies, thus saving some storage space.

---
Changes v1->v2:
- Ensure that $(TARGET_DIR)/usr/share/hwdata exists before installing the files there.
Changes v2->v3:
- Fix commit title ("bump", not "bumb").

---
 package/hwdata/Config.in   | 45 ++++++++++++++++++++++++++++++++++++++++++---
 package/hwdata/hwdata.hash |  7 ++++---
 package/hwdata/hwdata.mk   | 21 ++++++++++++++-------
 3 files changed, 60 insertions(+), 13 deletions(-)
package/hwdata/Config.in +42 -3
index 8424238e1b..63bb2216da 100644
@@ -1,6 +1,45 @@
 config BR2_PACKAGE_HWDATA
 	bool "hwdata"
 	help
-	  Various hardware identification and configuration data,
-	  such as the pci.ids database, or the XFree86/xorg Cards
-	  database.
+	  Various hardware identification and configuration data
+
+	  - Individual Address Block (IAB) and Organizationally Unique
+	    Identifier (OUI) databases, from IEEE Registration Authority
+	  - PCI ID database
+	  - PNP ID database (from Microsoft)
+	  - USB ID database
+
+	  https://github.com/vcrhonek/hwdata
+
+if BR2_PACKAGE_HWDATA
+
+config BR2_PACKAGE_HWDATA_ANY
+	bool
+
+config BR2_PACKAGE_HWDATA_IAB_OUI_TXT
+	bool "install iab.txt and oui.txt"
+	select BR2_PACKAGE_HWDATA_ANY
+	help
+	  Install iab.txt and oui.txt
+
+config BR2_PACKAGE_HWDATA_PCI_IDS
+	bool "install pci.ids"
+	default y
+	select BR2_PACKAGE_HWDATA_ANY
+	help
+	  Install pci.ids
+
+config BR2_PACKAGE_HWDATA_PNP_IDS
+	bool "install pnp.ids"
+	select BR2_PACKAGE_HWDATA_ANY
+	help
+	  Install pnp.ids
+
+config BR2_PACKAGE_HWDATA_USB_IDS
+	bool "install usb.ids"
+	default y
+	select BR2_PACKAGE_HWDATA_ANY
+	help
+	  Install usb.ids
+
+endif
package/hwdata/hwdata.hash +4 -3
index b3c83ebb74..dba1be31e0 100644
@@ -1,3 +1,4 @@
-# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/h/hwdata/hwdata_0.267-1.dsc
-sha256	d77f2b3f3d6e278be669141ffa5dac01b64cab02f7b2c744bbabc500a45263f4	hwdata_0.267.orig.tar.gz
-sha256	055d2f168de9333562a04f6a230c43dc19c4975882935d8b2f0ab17f64f57275	hwdata_0.267-1.diff.gz
+# Locally calculated
+sha256 986d919c20a0c7f8b669a63830f6d2f4cb5c4cddcfc944c5e2ae05c2e9e5ec9f  hwdata-v0.308.tar.gz
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
+sha256 21d0406f93e884a050426ebc21931839a45d56bfcbcbfdda7686d583f36f107f  LICENSE
package/hwdata/hwdata.mk +0 -3
index 4ad8d42939..a23a282725 100644
@@ -4,16 +4,23 @@
 #
 ################################################################################
 
-HWDATA_VERSION = 0.267
-HWDATA_SOURCE = hwdata_$(HWDATA_VERSION).orig.tar.gz
-HWDATA_PATCH = hwdata_$(HWDATA_VERSION)-1.diff.gz

package/hwdata/hwdata.mk line 14

Quoted 10 lines
package/hwdata/hwdata.mk +6 -2
-HWDATA_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/h/hwdata
-HWDATA_LICENSE = GPL-2.0+ or XFree86 1.0 license
+HWDATA_VERSION = v0.308
+HWDATA_SITE = $(call github,vcrhonek,hwdata,$(HWDATA_VERSION))
+HWDATA_LICENSE = GPL-2.0+, BSD-3-Clause, XFree86 1.0
 HWDATA_LICENSE_FILES = COPYING LICENSE
 
+ifeq ($(BR2_PACKAGE_HWDATA):$(BR2_PACKAGE_HWDATA_ANY),y:)
+$(error No hwdata database selected. Select at least one database)
+endif

Having this as a build time error is not really nice when we could simply skip the install step instead, so I've reworked it to do that. The BR2_PACKAGE_HWDATA_ANY symbol also isn't really needed as we anyway need to construct the list of files to be installed, so we can just check if it is empty.

package/hwdata/hwdata.mk line 23

Quoted 11 lines
package/hwdata/hwdata.mk +8 -2
+
 define HWDATA_INSTALL_TARGET_CMDS
-	$(INSTALL) -D -m 644 $(@D)/pci.ids $(TARGET_DIR)/usr/share/hwdata/pci.ids
-	$(INSTALL) -D -m 644 $(@D)/usb.ids $(TARGET_DIR)/usr/share/hwdata/usb.ids
+	$(INSTALL) -d -m 755 $(TARGET_DIR)/usr/share/hwdata
+	$(INSTALL) -D -m 644 \
+		$(if $(BR2_PACKAGE_HWDATA_IAB_OUI_TXT),$(@D)/iab.txt $(@D)/oui.txt,) \
+		$(if $(BR2_PACKAGE_HWDATA_PCI_IDS),$(@D)/pci.ids,) \
+		$(if $(BR2_PACKAGE_HWDATA_PNP_IDS),$(@D)/pnp.ids,) \
+		$(if $(BR2_PACKAGE_HWDATA_USB_IDS),$(@D)/usb.ids,) \
+		$(TARGET_DIR)/usr/share/hwdata

install -D is really for installing single files, so I've reworked this to use install -t instead.

Minor nit, but the extra comma in $(if ) isn't needed then the else part is empty, so I've dropped those.

Committed with these fixes, thanks.

Signature · 1 line
Bye, Peter Korsgaard