diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6f20ecf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/lshw-B.02.17.tar.gz diff --git a/.lshw.metadata b/.lshw.metadata new file mode 100644 index 0000000..5411cf4 --- /dev/null +++ b/.lshw.metadata @@ -0,0 +1 @@ +3560506670da931f2305e202d4775db385d88732 SOURCES/lshw-B.02.17.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/lshw-B.02.17-scan-fat-mem-bug.patch b/SOURCES/lshw-B.02.17-scan-fat-mem-bug.patch new file mode 100644 index 0000000..feed00e --- /dev/null +++ b/SOURCES/lshw-B.02.17-scan-fat-mem-bug.patch @@ -0,0 +1,20 @@ +------------------------------------------------------------------------ +r2528 | lyonel | 2013-08-24 18:12:05 +0200 (l�., 24 aug. 2013) | 2 lines + +fix #632: ensure that FAT superblock is at least 1 sector long + + +Index: src/core/fat.cc +=================================================================== +--- src/core/fat.cc (revisjon 2527) ++++ src/core/fat.cc (revisjon 2528) +@@ -81,6 +81,7 @@ + uint8_t dummy2[164]; + uint8_t pmagic[2]; + } __attribute__((__packed__)) fat32; ++ char sector[512]; // to make sure the whole struct is at least 512 bytes long + } __attribute__((__packed__)) type; + } __attribute__((__packed__)); + + +------------------------------------------------------------------------ diff --git a/SOURCES/lshw-gui b/SOURCES/lshw-gui new file mode 100644 index 0000000..2b57589 --- /dev/null +++ b/SOURCES/lshw-gui @@ -0,0 +1,5 @@ +#! /bin/bash + +exec /usr/bin/pkexec /usr/sbin/gtk-lshw + + diff --git a/SOURCES/lshw.desktop b/SOURCES/lshw.desktop new file mode 100644 index 0000000..56b7867 --- /dev/null +++ b/SOURCES/lshw.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Hardware Lister +Comment=Browse hardware on host computer +StartupNotify=true +Exec=/usr/bin/lshw-gui +Icon=lshw-logo +Terminal=false +Type=Application +Categories=GTK;System; diff --git a/SOURCES/no_smbios_unsupp.patch b/SOURCES/no_smbios_unsupp.patch new file mode 100644 index 0000000..ceb6196 --- /dev/null +++ b/SOURCES/no_smbios_unsupp.patch @@ -0,0 +1,16 @@ +diff --git a/src/core/dmi.cc b/src/core/dmi.cc +index 46197a3..3061f03 100644 +--- a/src/core/dmi.cc ++++ b/src/core/dmi.cc +@@ -1752,8 +1753,8 @@ bool scan_dmi(hwNode & n) + u16 dmimaj = 0, dmimin = 0; + currentcpu = 0; + +-#if defined(__arm__) || defined (__hppa__) +- return false; // SMBIOS not supported on PA-RISC and ARM machines ++#if defined(__arm__) || defined (__hppa__) || defined (__s390x__) || defined (__powerpc__) ++ return false; // SMBIOS not supported on PA-RISC, S/390, ARM and PowerPC machines + #endif + + if (sizeof(u8) != 1 || sizeof(u16) != 2 || sizeof(u32) != 4) + diff --git a/SOURCES/org.ezix.lshw.gui.policy b/SOURCES/org.ezix.lshw.gui.policy new file mode 100644 index 0000000..8f8ab29 --- /dev/null +++ b/SOURCES/org.ezix.lshw.gui.policy @@ -0,0 +1,20 @@ + + + + lshw + http://ezix.org/project/wiki/HardwareLiSter + + Hardware Lister (lshw) - list hardware information + Authentication is required to run lshw-gui + lshw-logo + + no + no + auth_admin_keep + + /usr/sbin/gtk-lshw + true + + diff --git a/SPECS/lshw.spec b/SPECS/lshw.spec new file mode 100644 index 0000000..46f7f1f --- /dev/null +++ b/SPECS/lshw.spec @@ -0,0 +1,118 @@ +Summary: Hardware lister +Name: lshw +Version: B.02.17 +Release: 2%{?dist} +License: GPLv2 +Group: Applications/System +URL: http://ezix.org/project/wiki/HardwareLiSter +Source0: http://www.ezix.org/software/files/lshw-%{version}.tar.gz +Source1: lshw.desktop +Source2: org.ezix.lshw.gui.policy +Source3: lshw-gui +Patch0: lshw-B.02.17-scan-fat-mem-bug.patch +Patch1: no_smbios_unsupp.patch +BuildRequires: sqlite-devel +Requires: hwdata + +%description +lshw is a small tool to provide detailed informaton on the hardware +configuration of the machine. It can report exact memory configuration, +firmware version, mainboard configuration, CPU version and speed, cache +configuration, bus speed, etc. on DMI-capable x86 systems and on some +PowerPC machines (PowerMac G4 is known to work). + +Information can be output in plain text, XML or HTML. + +%package gui +Summary: Graphical hardware lister +Group: Applications/System +Requires: polkit +Requires: %{name} = %{version}-%{release} +BuildRequires: gtk2-devel >= 2.4 +BuildRequires: desktop-file-utils + +%description gui +Graphical frontend for the hardware lister (lshw) tool. +If desired, hardware information can be saved to file in +plain, XML or HTML format. + +%prep +%setup -q +%patch0 -p0 +%patch1 -p1 + +%build +%{__make} %{?_smp_mflags} SBINDIR="%{_sbindir}" RPM_OPT_FLAGS="%{optflags}" SQLITE=1 gui + +# Replace copyrighted icons +pushd src +%{__make} nologo + +%install +%{__make} install \ + DESTDIR="%{buildroot}" \ + PREFIX="%{_prefix}" \ + SBINDIR="%{_sbindir}" \ + MANDIR="%{_mandir}" \ + SQLITE=1 \ + STRIP="/bin/true" \ + INSTALL="%{__install} -p" + +%{__make} install-gui \ + DESTDIR="%{buildroot}" \ + PREFIX="%{_prefix}" \ + SBINDIR="%{_sbindir}" \ + MANDIR="%{_mandir}" \ + SQLITE=1 \ + STRIP="/bin/true" \ + INSTALL="%{__install} -p" + +%{__ln_s} -f gtk-lshw %{buildroot}%{_sbindir}/lshw-gui + +# don't package these copies, use the ones from hwdata instead +%{__rm} -f %{buildroot}%{_datadir}/%{name}/pci.ids +%{__rm} -f %{buildroot}%{_datadir}/%{name}/usb.ids +# don't package these copies, they're not actually used by the app, +# and even if they were, should use the hwdata versions +%{__rm} -f %{buildroot}%{_datadir}/%{name}/oui.txt +%{__rm} -f %{buildroot}%{_datadir}/%{name}/manuf.txt + +# desktop icon +%{__install} -D -m 0644 -p ./src/gui/artwork/logo.svg \ + %{buildroot}%{_datadir}/pixmaps/%{name}-logo.svg +desktop-file-install %{?vendortag:--vendor fedora} \ + --dir %{buildroot}%{_datadir}/applications %{SOURCE1} + +# PolicyKit +%{__install} -D -m 0644 %{SOURCE2} \ + %{buildroot}%{_datadir}/polkit-1/actions/org.ezix.lshw.gui.policy +%{__install} -D -m 0755 %{SOURCE3} %{buildroot}%{_bindir}/lshw-gui + +# translations seems borken, remove for now +#find_lang %{name} +rm -rf %{buildroot}%{_datadir}/locale/fr/ + +#files -f %{name}.lang +%files +%doc COPYING README docs/* +%doc %{_mandir}/man1/lshw.1* +%{_sbindir}/%{name} + +%files gui +%doc COPYING +%{_bindir}/%{name}-gui +%{_sbindir}/gtk-%{name} +%{_sbindir}/%{name}-gui +%{_datadir}/%{name} +%{_datadir}/pixmaps/%{name}-logo.svg +%{_datadir}/applications/*%{name}.desktop +%{_datadir}/polkit-1/actions/org.ezix.lshw.gui.policy + +%changelog +* Mon Dec 15 2014 Petr Oros - B.02.17-2 +- Resolves: #1174195 +- Don't look for SMBIOS structures on PowerPC and s390x systems + +* Mon Nov 3 2014 Petr Oros - B.02.17-1 +- Resolves: #1101590 +- Initial package.