hwdata: Update from individual file downloads to using a tarball source version 0.389

Message ID 20241110130619.2608696-1-adolf.belka@ipfire.org
State New
Headers
Series hwdata: Update from individual file downloads to using a tarball source version 0.389 |

Commit Message

Adolf Belka Nov. 10, 2024, 1:06 p.m. UTC
  - This patch uses https://github.com/vcrhonek/hwdata/ to obtain the pci.ids & usb.ids
   files. Arch Linux uses this source and they have been providing the updates for
   around 8 years.
- Updated lfs to use the new source tarball
- Updated rootfile to only install the pci.ids & usb.ids files
- This will make it easier to identify when there have been updates of the .ids files
   as there will be a new source tarball created.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 config/rootfiles/common/hwdata |  6 +++++
 lfs/hwdata                     | 42 ++++++++++++++++++++++++++--------
 2 files changed, 38 insertions(+), 10 deletions(-)
  

Comments

Michael Tremer Nov. 18, 2024, 8:06 p.m. UTC | #1
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>

> On 10 Nov 2024, at 13:06, Adolf Belka <adolf.belka@ipfire.org> wrote:
> 
> - This patch uses https://github.com/vcrhonek/hwdata/ to obtain the pci.ids & usb.ids
>   files. Arch Linux uses this source and they have been providing the updates for
>   around 8 years.
> - Updated lfs to use the new source tarball
> - Updated rootfile to only install the pci.ids & usb.ids files
> - This will make it easier to identify when there have been updates of the .ids files
>   as there will be a new source tarball created.
> 
> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
> ---
> config/rootfiles/common/hwdata |  6 +++++
> lfs/hwdata                     | 42 ++++++++++++++++++++++++++--------
> 2 files changed, 38 insertions(+), 10 deletions(-)
> 
> diff --git a/config/rootfiles/common/hwdata b/config/rootfiles/common/hwdata
> index db268e887..1bca4a725 100644
> --- a/config/rootfiles/common/hwdata
> +++ b/config/rootfiles/common/hwdata
> @@ -1,3 +1,9 @@
> +#usr/lib/modprobe.d
> +#usr/lib/modprobe.d/dist-blacklist.conf
> #usr/share/hwdata
> +#usr/share/hwdata/iab.txt
> +#usr/share/hwdata/oui.txt
> usr/share/hwdata/pci.ids
> +#usr/share/hwdata/pnp.ids
> usr/share/hwdata/usb.ids
> +#usr/share/pkgconfig/hwdata.pc
> diff --git a/lfs/hwdata b/lfs/hwdata
> index 0ac9f1855..decf9b582 100644
> --- a/lfs/hwdata
> +++ b/lfs/hwdata
> @@ -24,27 +24,46 @@
> 
> include Config
> 
> -VER        = ipfire
> +VER        = 0.389
> 
> -THISAPP    = hwdata
> +THISAPP    = hwdata-$(VER)
> +DL_FILE    = $(THISAPP).tar.gz
> +DL_FROM    = $(URL_IPFIRE)
> +DIR_APP    = $(DIR_SRC)/$(THISAPP)
> TARGET     = $(DIR_INFO)/$(THISAPP)
> 
> -# https://pci-ids.ucw.cz/v2.2/pci.ids
> -# http://www.linux-usb.org/usb.ids
> +# https://github.com/vcrhonek/hwdata/releases?page=1
> 
> ###############################################################################
> # Top-level Rules
> ###############################################################################
> 
> -objects =
> +objects = $(DL_FILE)
> +
> +$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
> +
> +$(DL_FILE)_BLAKE2 = 967c107836e2cb6129d6432d116bae1ef57c8bf9212f5b052085029dc4dc7134b89237291ebec192d5031de6ff98338a253a1cdeed0a43a85c5ff37dd3d15b5c
> 
> install : $(TARGET)
> 
> -check :
> +check : $(patsubst %,$(DIR_CHK)/%,$(objects))
> +
> +download :$(patsubst %,$(DIR_DL)/%,$(objects))
> +
> +b2 : $(subst %,%_BLAKE2,$(objects))
> +
> +###############################################################################
> +# Downloading, checking, b2sum
> +###############################################################################
> +
> +$(patsubst %,$(DIR_CHK)/%,$(objects)) :
> + @$(CHECK)
> 
> -download :
> +$(patsubst %,$(DIR_DL)/%,$(objects)) :
> + @$(LOAD)
> 
> -b2 :
> +$(subst %,%_BLAKE2,$(objects)) :
> + @$(B2SUM)
> 
> ###############################################################################
> # Installation Details
> @@ -52,6 +71,9 @@ b2 :
> 
> $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
> @$(PREBUILD)
> - -mkdir -p -m 755 /usr/share/hwdata
> - install -m 644 $(DIR_SRC)/src/hwdata/*.ids /usr/share/hwdata
> + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
> + $(UPDATE_AUTOMAKE)
> + cd $(DIR_APP) && ./configure \
> + --prefix=/usr
> + cd $(DIR_APP) && make install
> @$(POSTBUILD)
> -- 
> 2.47.0
>
  

Patch

diff --git a/config/rootfiles/common/hwdata b/config/rootfiles/common/hwdata
index db268e887..1bca4a725 100644
--- a/config/rootfiles/common/hwdata
+++ b/config/rootfiles/common/hwdata
@@ -1,3 +1,9 @@ 
+#usr/lib/modprobe.d
+#usr/lib/modprobe.d/dist-blacklist.conf
 #usr/share/hwdata
+#usr/share/hwdata/iab.txt
+#usr/share/hwdata/oui.txt
 usr/share/hwdata/pci.ids
+#usr/share/hwdata/pnp.ids
 usr/share/hwdata/usb.ids
+#usr/share/pkgconfig/hwdata.pc
diff --git a/lfs/hwdata b/lfs/hwdata
index 0ac9f1855..decf9b582 100644
--- a/lfs/hwdata
+++ b/lfs/hwdata
@@ -24,27 +24,46 @@ 
 
 include Config
 
-VER        = ipfire
+VER        = 0.389
 
-THISAPP    = hwdata
+THISAPP    = hwdata-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 
-# https://pci-ids.ucw.cz/v2.2/pci.ids
-# http://www.linux-usb.org/usb.ids
+# https://github.com/vcrhonek/hwdata/releases?page=1
 
 ###############################################################################
 # Top-level Rules
 ###############################################################################
 
-objects =
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_BLAKE2 = 967c107836e2cb6129d6432d116bae1ef57c8bf9212f5b052085029dc4dc7134b89237291ebec192d5031de6ff98338a253a1cdeed0a43a85c5ff37dd3d15b5c
 
 install : $(TARGET)
 
-check :
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+b2 : $(subst %,%_BLAKE2,$(objects))
+
+###############################################################################
+# Downloading, checking, b2sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+	@$(CHECK)
 
-download :
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+	@$(LOAD)
 
-b2 :
+$(subst %,%_BLAKE2,$(objects)) :
+	@$(B2SUM)
 
 ###############################################################################
 # Installation Details
@@ -52,6 +71,9 @@  b2 :
 
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	@$(PREBUILD)
-	-mkdir -p -m 755 /usr/share/hwdata
-	install -m 644 $(DIR_SRC)/src/hwdata/*.ids /usr/share/hwdata
+	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+	$(UPDATE_AUTOMAKE)
+	cd $(DIR_APP) && ./configure \
+				--prefix=/usr
+	cd $(DIR_APP) && make install
 	@$(POSTBUILD)