[packages/hardinfo] - use snapshot deom github, no releases since last decade

baggins baggins at pld-linux.org
Mon Apr 27 09:16:00 CEST 2020


commit 5279d98d9f59e33dd1fc01db32138f625d65f42b
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Apr 27 09:13:00 2020 +0200

    - use snapshot deom github, no releases since last decade

 format-security.patch | 11 +++++++++++
 hardinfo.spec         | 29 +++++++++++++++--------------
 hwdata.patch          | 18 ++++++++++++++----
 3 files changed, 40 insertions(+), 18 deletions(-)
---
diff --git a/hardinfo.spec b/hardinfo.spec
index eab158c..2d4a178 100644
--- a/hardinfo.spec
+++ b/hardinfo.spec
@@ -1,14 +1,16 @@
+%define		snap	20200427
 Summary:	Hardinfo - benchmark tool
 Summary(pl.UTF-8):	Hardinfo - narzędzie informujące o sprzęcie i jego wydajności
 Name:		hardinfo
-Version:	0.5.1
-Release:	3
+Version:	0.5.1.%{snap}
+Release:	1
 License:	GPL v2
 Group:		X11/Applications
-Source0:	http://download.berlios.de/hardinfo/%{name}-%{version}.tar.bz2
-# Source0-md5:	6fb38992e140f2fab16518ae1f38e188
+Source0:	https://github.com/lpereira/hardinfo/archive/master/%{name}-%{version}.tar.gz
+# Source0-md5:	9d7d9e00cb49579c4264b311a8232241
 URL:		http://hardinfo.berlios.de/web/HomePage
 Patch0:		hwdata.patch
+Patch1:		format-security.patch
 BuildRequires:	gtk+2-devel >= 2:2.6.0
 BuildRequires:	libsoup-devel >= 2.2.104-2
 BuildRequires:	pciutils
@@ -30,22 +32,20 @@ operacyjnym, wykonywać testy wydajnościowe i generować nadające się do
 druku raporty w formacie HTML lub czystym tekście.
 
 %prep
-%setup -q
+%setup -q -n %{name}-master
 %patch0 -p1
-
-# XXX: code requires -O0 here
-%{__sed} -i -re '/(md5|sha1)\.c/ s/-c/-O0 -c/' Makefile.in
+%patch1 -p1
 
 %build
-%configure
-%{__make} \
-	CCFLAGS="%{rpmcflags} -fPIC" \
-	CC="%{__cc} %{rpmldflags}" \
-	CCSLOW="%{__cc} %{rpmldflags}"
+mkdir -p build
+cd build
+%cmake ../
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} install \
+
+%{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
 %clean
@@ -62,3 +62,4 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/hardinfo/modules/network.so
 %{_datadir}/hardinfo
 %{_desktopdir}/hardinfo.desktop
+%{_mandir}/man1/hardinfo.1*
diff --git a/format-security.patch b/format-security.patch
new file mode 100644
index 0000000..e217dde
--- /dev/null
+++ b/format-security.patch
@@ -0,0 +1,11 @@
+--- hardinfo-master/modules/computer.c~	2020-02-10 17:36:35.000000000 +0100
++++ hardinfo-master/modules/computer.c	2020-04-27 09:11:36.756595011 +0200
+@@ -544,7 +544,7 @@
+     info_set_view_type(info, SHELL_VIEW_DETAIL);
+ 
+     info_add_group(info, _("Computer"),
+-        info_field_printf(_("Processor"),
++        info_field_printf(_("Processor"), "%s",
+             idle_free(module_call_method("devices::getProcessorNameAndDesc"))),
+         info_field_update(_("Memory"), 1000),
+         info_field_printf(_("Machine Type"), "%s",
diff --git a/hwdata.patch b/hwdata.patch
index 152fb9d..f55514c 100644
--- a/hwdata.patch
+++ b/hwdata.patch
@@ -1,6 +1,16 @@
---- hardinfo-0.5.1/devices.c~	2009-04-06 16:43:15.000000000 +0300
-+++ hardinfo-0.5.1/devices.c	2013-01-23 23:12:38.859124115 +0200
-@@ -423,7 +423,9 @@
+--- hardinfo/hardinfo/pci_util.c~	2020-04-27 08:59:19.000000000 +0200
++++ hardinfo/hardinfo/pci_util.c	2020-04-27 09:06:32.013271410 +0200
+@@ -46,6 +46,7 @@
+         }
+     }
+     char *file_search_order[] = {
++        g_strdup("/lib/hwdata/pci.ids"),
+         g_strdup("/usr/share/hwdata/pci.ids"),
+         g_strdup("/usr/share/misc/pci.ids"),
+         g_build_filename(g_get_user_config_dir(), "hardinfo", "pci.ids", NULL),
+--- hardinfo/modules/devices.c~	2020-04-27 08:59:19.000000000 +0200
++++ hardinfo/modules/devices.c	2020-04-27 09:08:10.833268282 +0200
+@@ -830,7 +830,9 @@
  
  void hi_module_init(void)
  {
@@ -9,5 +19,5 @@
 +    // but URL exists for that: http://pci-ids.ucw.cz/v2.2/pci.ids.gz
 +    if (!g_file_test("/lib/hwdata/pci.ids", G_FILE_TEST_EXISTS)) {
          static SyncEntry se = {
-              .fancy_name = "Update PCI ID listing",
+              .fancy_name = N_("Update PCI ID listing"),
               .name = "GetPCIIds",
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/hardinfo.git/commitdiff/5279d98d9f59e33dd1fc01db32138f625d65f42b



More information about the pld-cvs-commit mailing list