mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Christian Melki <christian.melki@t2data.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 1/7] hwdata: New package.
Date: Sat,  8 Jan 2022 19:45:12 +0100	[thread overview]
Message-ID: <20220108184518.3774572-2-christian.melki@t2data.com> (raw)
In-Reply-To: <20220108184518.3774572-1-christian.melki@t2data.com>

Introduce the hwdata package.
It's a maintained set of the classic .ids files provided
by several packages (usbutils, pciutils etc).
It uses /usr/share/ for now, as a smaller changeset for
the introduction. After this has settled, one can move
packages collectively to /usr/share/hwdata.

This means:
* Packages need to stop providing their own
set of these files.

* Packages now select hwdata as a dependency.

* Packages need to stop updating these files. It's done
by updating the hwdata package.

* Packages can't assume that other packages can read compressed
variants of the text database.

hwdata will probably be replaced by systemd-hwdb in the long run.

Signed-off-by: Christian Melki <christian.melki@t2data.com>
---
 rules/hwdata.in   | 47 ++++++++++++++++++++++++++
 rules/hwdata.make | 84 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 131 insertions(+)
 create mode 100644 rules/hwdata.in
 create mode 100644 rules/hwdata.make

diff --git a/rules/hwdata.in b/rules/hwdata.in
new file mode 100644
index 000000000..c4e624b7f
--- /dev/null
+++ b/rules/hwdata.in
@@ -0,0 +1,47 @@
+## SECTION=shell_and_console
+
+menuconfig HWDATA
+	tristate
+	prompt "hwdata                        "
+	help
+	  Hwdata package.
+	  This package contains identity files for pci and usb etc.
+	  Various packages that have not been ported to systemd's binary
+	  hwdb may use this instead.
+
+if HWDATA
+
+config HWDATA_PCI
+	bool
+	prompt "hwdata PCI"
+	help
+	  The hwdata PCI (Vendor and product id) data set.
+
+config HWDATA_USB
+	bool
+	prompt "hwdata USB"
+	help
+	  The hwdata USB (Vendor and product id) data set.
+
+config HWDATA_PNP
+	bool
+	prompt "hwdata PNP"
+	help
+	  The hwdata PNP (Vendor names and vendor acronyms)
+	  data set.
+
+config HWDATA_OUI
+	bool
+	prompt "hwdata OUI"
+	help
+	  The hwdata OUI (IEEE Organizationally Unique Identifier)
+	  data set.
+
+config HWDATA_IAB
+	bool
+	prompt "hwdata IAB"
+	help
+	  The hwdata IAB (IEEE Individual Address Block)
+	  data set.
+
+endif
diff --git a/rules/hwdata.make b/rules/hwdata.make
new file mode 100644
index 000000000..5d09b6c81
--- /dev/null
+++ b/rules/hwdata.make
@@ -0,0 +1,84 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2021 by Christian Melki
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_HWDATA) += hwdata
+
+#
+# Paths and names
+#
+HWDATA_VERSION		:= 0.355
+HWDATA_MD5		:= ee30c73571b9392a7b2d77619a6842a5
+HWDATA			:= hwdata-$(HWDATA_VERSION)
+HWDATA_SUFFIX		:= tar.gz
+HWDATA_URL		:= https://github.com/vcrhonek/hwdata/archive/refs/tags/v$(HWDATA_VERSION).$(HWDATA_SUFFIX)
+HWDATA_SOURCE		:= $(SRCDIR)/$(HWDATA).$(HWDATA_SUFFIX)
+HWDATA_DIR		:= $(BUILDDIR)/$(HWDATA)
+HWDATA_LICENSE		:= GPL-2.0-or-later OR XFree86-1.0
+HWDATA_LICENSE_FILES	:= \
+	file://LICENSE;md5=1556547711e8246992b999edd9445a57 \
+	file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+HWDATA_PATH		:= PATH=$(CROSS_PATH)
+HWDATA_ENV		:= $(CROSS_ENV)
+
+# Package is not really using autoconf, so skip normal cross declaration.
+# Only text files are processed. Just prefix setting here.
+HWDATA_CONF_TOOL	:= autoconf
+HWDATA_CONF_OPT		:= \
+	--prefix=/usr
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/hwdata.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, hwdata)
+	@$(call install_fixup, hwdata,PRIORITY,optional)
+	@$(call install_fixup, hwdata,SECTION,base)
+	@$(call install_fixup, hwdata,AUTHOR,"Christian Melki <christian.melki@t2data.com>")
+	@$(call install_fixup, hwdata,DESCRIPTION,missing)
+
+ifdef PTXCONF_HWDATA_PCI
+	@$(call install_copy, hwdata, 0, 0, 0644, \
+		$(HWDATA_PKGDIR)/usr/share/hwdata/pci.ids, /usr/share/pci.ids)
+endif
+
+ifdef PTXCONF_HWDATA_USB
+	@$(call install_copy, hwdata, 0, 0, 0644, \
+		$(HWDATA_PKGDIR)/usr/share/hwdata/usb.ids, /usr/share/usb.ids)
+endif
+
+ifdef PTXCONF_HWDATA_PNP
+	@$(call install_copy, hwdata, 0, 0, 0644, \
+		$(HWDATA_PKGDIR)/usr/share/hwdata/pnp.ids, /usr/share/pnp.ids)
+endif
+
+ifdef PTXCONF_HWDATA_OUI
+	@$(call install_copy, hwdata, 0, 0, 0644, \
+		$(HWDATA_PKGDIR)/usr/share/hwdata/oui.txt, /usr/share/oui.txt)
+endif
+
+ifdef PTXCONF_HWDATA_IAB
+	@$(call install_copy, hwdata, 0, 0, 0644, \
+		$(HWDATA_PKGDIR)/usr/share/hwdata/iab.txt, /usr/share/iab.txt)
+endif
+
+	@$(call install_finish, hwdata)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


  reply	other threads:[~2022-01-08 18:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-08 18:45 [ptxdist] [PATCH 0/7] Hwdata introduction Christian Melki
2022-01-08 18:45 ` Christian Melki [this message]
2022-01-21  7:19   ` [ptxdist] [APPLIED] hwdata: New package Michael Olbrich
2022-01-08 18:45 ` [ptxdist] [PATCH 2/7] usbutils: Version bump 007 -> 014 Christian Melki
2022-01-21  7:19   ` [ptxdist] [APPLIED] " Michael Olbrich
2022-01-08 18:45 ` [ptxdist] [PATCH 3/7] pciutils: Update to accomodate for hwdata package Christian Melki
2022-01-21  7:19   ` [ptxdist] [APPLIED] " Michael Olbrich
2022-01-08 18:45 ` [ptxdist] [PATCH 4/7] usbip: " Christian Melki
2022-01-21  7:19   ` [ptxdist] [APPLIED] " Michael Olbrich
2022-01-08 18:45 ` [ptxdist] [PATCH 5/7] libpciaccess: " Christian Melki
2022-01-21  7:19   ` [ptxdist] [APPLIED] " Michael Olbrich
2022-01-08 18:45 ` [ptxdist] [PATCH 6/7] lshw: Version bump. B.02.14 -> B.02.19.2 + accomodation " Christian Melki
2022-01-21  7:19   ` [ptxdist] [APPLIED] " Michael Olbrich
2022-01-08 18:45 ` [ptxdist] [PATCH 7/7] udev: Update to accomodate " Christian Melki
2022-01-21  7:19   ` [ptxdist] [APPLIED] " Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220108184518.3774572-2-christian.melki@t2data.com \
    --to=christian.melki@t2data.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox