# EDIT IN SVN NOT IN SOURCE PACKAGE (NO PATCH ALLOWED). %define lib_major 0.12 %define lib_minor 7 %define lib_name %mklibname %{name} %{lib_major} %define develname %mklibname %name -d %define build_diet 1 Name: ldetect Version: %{lib_major}.%{lib_minor} Release: %mkrel 1 Summary: Light hardware detection tool Source: %{name}-%{version}.tar.xz Group: System/Kernel and hardware URL: http://www.mandrivalinux.com BuildRequires: usbutils BuildRequires: pciutils-devel BuildRequires: zlib-devel BuildRequires: kmod-devel %if %{build_diet} BuildRequires: dietlibc-devel %endif License: GPL %package -n %{lib_name} Summary: Light hardware detection library Requires: ldetect-lst common-licenses Requires: pciids # (tv) fix upgrade ordering (libpci3 needs to be updaded from 3.0 to 3.1 before ldetect is upgraded): # (tv) and require a lib w/o double free: Requires: %{mklibname pci 3} >= 3.1.4-3mdv2010.0 Group: System/Libraries %package -n %develname Summary: Development package for ldetect Requires: %{lib_name} = %{version} Provides: ldetect-devel = %version, libldetect-devel = %version Group: Development/C %description The hardware device lists provided by this package are used as a lookup table to get hardware auto-detection. %description -n %develname see %name %description -n %{lib_name} see %name %prep %setup -q %build %if %{build_diet} %make CFLAGS="-Os -D_BSD_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE" CC="diet gcc" libldetect.a cp libldetect.a libldetect-diet.a make clean %endif %make %install rm -rf $RPM_BUILD_ROOT %makeinstall %if %{build_diet} install -d $RPM_BUILD_ROOT%{_prefix}/lib/dietlibc/lib-%{_arch} install libldetect-diet.a $RPM_BUILD_ROOT%{_prefix}/lib/dietlibc/lib-%{_arch}/libldetect.a %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc AUTHORS %_bindir/* %files -n %{lib_name} %defattr(-,root,root) %_libdir/*.so.* %files -n %develname %defattr(-,root,root) %doc ChangeLog %_includedir/* %_libdir/*.a %if %{build_diet} %{_prefix}/lib/dietlibc/lib-%{_arch}/libldetect.a %endif %_libdir/*.so %changelog * Fri Apr 05 2013 tv <tv> 0.12.7-1.mga3 + Revision: 408205 - do not fake Xen blk & net controllers on dom0 (mga#9546) * Sun Mar 31 2013 tv <tv> 0.12.6-1.mga3 + Revision: 406803 - add support for detecting Xen blk & net controllers (mga#9546) * Mon Jan 14 2013 tv <tv> 0.12.5-2.mga3 + Revision: 388105 - dynamically resize memory when reaching max devices limit (mga#8320) * Sat Jan 12 2013 umeabot <umeabot> 0.12.4-2.mga3 + Revision: 356731 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Tue Dec 11 2012 tv <tv> 0.12.4-1.mga3 + Revision: 329645 - bump max devices number per bus from 100 to 300 (mga#8320) * Fri Dec 07 2012 tv <tv> 0.12.3-4.mga3 + Revision: 327756 - rebuild with new kmod * Thu Dec 06 2012 tv <tv> 0.12.3-3.mga3 + Revision: 327334 - rebuild with new kmod * Tue Oct 02 2012 tv <tv> 0.12.3-2.mga3 + Revision: 302091 - rebuild with new kmod (#5833) * Wed Sep 12 2012 tv <tv> 0.12.3-1.mga3 + Revision: 292720 - make ldetect 3x faster * Thu Aug 30 2012 tv <tv> 0.12.2-1.mga3 + Revision: 285763 - fix retrieving info about USB devices with kernel-3.5+ (mga#7248) - generate PCI classes info using ids from pcutils header instead of deprecated kernel header (Andrey Bondrov) * Mon Mar 19 2012 tmb <tmb> 0.12.1-5.mga2 + Revision: 224461 - rebuild with new kmod * Sat Mar 03 2012 tmb <tmb> 0.12.1-4.mga2 + Revision: 217221 - rebuild for new kmod * Mon Feb 27 2012 tv <tv> 0.12.1-3.mga2 + Revision: 215503 - rebuild with latest dietlibc * Sat Feb 18 2012 tv <tv> 0.12.1-2.mga2 + Revision: 210472 - rebuild for new kmod * Thu Jan 19 2012 tv <tv> 0.12.1-1.mga2 + Revision: 198077 - do not ignore /etc/modprobe.d/* - fix reading freed memory * Fri Jan 13 2012 tv <tv> 0.12.0-1.mga2 + Revision: 195782 - switch from libmodprobe to new libkmod * Mon Jan 09 2012 tv <tv> 0.11.6-1.mga2 + Revision: 194232 - plug last (small) memleaks * Sun Jan 08 2012 tmb <tmb> 0.11.5-2.mga2 + Revision: 193220 - rebuild for missing signature * Sun Jan 08 2012 tv <tv> 0.11.5-1.mga2 + Revision: 193026 - fix double free - fix segfaulting when calling usb_probe() more than once * Fri Jan 06 2012 tv <tv> 0.11.4-3.mga2 + Revision: 191985 + rebuild (emptylog) * Thu Jan 05 2012 tv <tv> 0.11.4-2.mga2 + Revision: 191943 + rebuild (emptylog) * Thu Jan 05 2012 tv <tv> 0.11.4-1.mga2 + Revision: 191911 - fix building with dietlibc - plug some memleaks - sync with names with usbutils-005 (thus fixing more memleaks) * Mon Nov 21 2011 tv <tv> 0.11.3-1.mga2 + Revision: 170596 - make sure to behave properly on errors in libmodprobe (#3309) - use saner API?\194?\160for quieting libmodprobe - switch back to dynamically linking against libmodprobe * Wed Nov 09 2011 tv <tv> 0.11.2-10.mga2 + Revision: 165867 - rebuild aainst new libpci * Tue Oct 18 2011 tv <tv> 0.11.2-9.mga2 + Revision: 156342 - switch from bzip2 to xz compressed tarballs - adapt to new module-init-tools-3.16's API - add new API for drakx's stage1 in order to find unknown PCI devices - don't exit(1) on systems without pci (eg: ARM) (rtp) - link statically with modprobe.so * Mon Oct 17 2011 tv <tv> 0.11.1-8.mga2 + Revision: 155889 - rebuild with latest libmodprobe * Wed Oct 05 2011 tv <tv> 0.11.1-7.mga2 + Revision: 152025 - use newly libified module-init-tools-3.16 + fwang <fwang> - fix build with latest modprobe - rebuild for new modprobe + misc <misc> - simplify BuildRequires ( and place them one per line for readability ) * Fri May 06 2011 tv <tv> 0.11.1-5.mga1 + Revision: 95552 - (get_pci_description) new API for drakx's stage1 in order to find unknown PCI devices - simplify no-pci patch (ARM) by removing inversion bit that is nono (see pciutils's lib/init.c:pci_init()) + rtp <rtp> - don't exit on systems without pci bus (for instance on arm). [ usb support broken on newer kernel as usbfs is now gone ] * Mon Jan 17 2011 pterjan <pterjan> 0.11.1-4.mga1 + Revision: 21402 - Drop plenty of old stuff - imported package ldetect * Fri Dec 03 2010 Oden Eriksson <oeriksson@mandriva.com> 0.11.1-4mdv2011.0 + Revision: 606398 - rebuild + Shlomi Fish <shlomif@mandriva.org> - Add a missing a, a full stop and a hyphen to the description. * Tue Dec 01 2009 Thierry Vignaud <tv@mandriva.org> 0.11.1-3mdv2010.1 + Revision: 472329 - do not crash if there're more than 100 PCI devices - further use libpci in order to check for PCIe capability - adjust comment * Thu Oct 08 2009 Thierry Vignaud <tv@mandriva.org> 0.11.0-3mdv2010.0 + Revision: 456029 - make sure to require a recent enough libpci3 (#54258) * Thu Oct 01 2009 Thierry Vignaud <tv@mandriva.org> 0.11.0-2mdv2010.0 + Revision: 452017 - reduce memory footprint * Wed Sep 30 2009 Thierry Vignaud <tv@mandriva.org> 0.10.0-2mdv2010.0 + Revision: 451794 - do not display random revisions for USB devices - retrieve PCI capabilities in order to better identify PCI Express devices * Mon Sep 28 2009 Thierry Vignaud <tv@mandriva.org> 0.9.1-2mdv2010.0 + Revision: 450498 - fix inverted test for choosing between '8139cp' & '8139too' drivers (#53349) * Wed Sep 23 2009 Thierry Vignaud <tv@mandriva.org> 0.9.0-2mdv2010.0 + Revision: 448049 - display PCI revision (#42576) - try harder to fetch the right driver between '8139cp' & '8139too' according to PCI revision * Wed Sep 23 2009 Pascal Terjan <pterjan@mandriva.org> 0.8.6-1mdv2010.0 + Revision: 447799 - Parse only once usb.ids (avoids displaying Duplicate errors) * Mon Sep 14 2009 Thierry Vignaud <tv@mandriva.org> 0.8.5-5mdv2010.0 + Revision: 440371 - do not display any warning when driver field is empty in /proc/bus/usb/devices (#53412) - fix freed memory usage in criteria_from_dmidecode and entries_matching_criteria - fix const warnings in dmi.c * Tue Sep 01 2009 Thierry Vignaud <tv@mandriva.org> 0.8.4-4mdv2010.0 + Revision: 423612 + rebuild (emptylog) * Tue Sep 01 2009 Thierry Vignaud <tv@mandriva.org> 0.8.4-3mdv2010.0 + Revision: 423610 - fix upgrade ordering (libpci3 needs to be updaded from 3.0 to 3.1 before ldetect is upgraded) (#53347) * Wed Jul 08 2009 Thierry Vignaud <tv@mandriva.org> 0.8.4-2mdv2010.0 + Revision: 393575 - rebuild with latest pciutils * Thu Jun 25 2009 Pascal Terjan <pterjan@mandriva.org> 0.8.4-1mdv2010.0 + Revision: 389144 - fix freed memory usage in usb_probe and pci_probe - use usb.ids to fill unknown strings * Mon Apr 20 2009 Pascal Terjan <pterjan@mandriva.org> 0.8.3-1mdv2009.1 + Revision: 368404 - fix parsing of /proc/bus/usb/device I: lines and use the class of the first interface used by a driver instead of the first interface (or first one like before when none is used). That fixed presenting something as usb_storage even if the device is ignored by usb_storage driver and handled on another interface by option driver - ignore usb interfaces not active * Mon Apr 06 2009 Christophe Fergeau <cfergeau@mandriva.com> 0.8.2-1mdv2009.1 + Revision: 364338 - 0.8.2: * don't use strchrnul which is not available in dietlibc * fix memory corruption in hid parsing * Fri Apr 03 2009 Christophe Fergeau <cfergeau@mandriva.com> 0.8.1-1mdv2009.1 + Revision: 363841 - 0.8.1: - enumerate hid bus - fixes some memory leaks * Sun Mar 29 2009 Olivier Blin <oblin@mandriva.com> 0.8.0-2mdv2009.1 + Revision: 362052 - 0.8.0 - do not use random string as device description - use /sys/bus/usb/devices instead of /sys/class/usb_device (disabled in recent kernel) to find modalias (this breaks ABI because we now need to keep port number) * Tue Feb 10 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 0.7.27-2mdv2009.1 + Revision: 339097 - rebuild for new pciutils-3.1.2 * Thu Feb 05 2009 Luiz Fernando Capitulino <lcapitulino@mandriva.com> 0.7.27-1mdv2009.1 + Revision: 337816 - 0.7.27 * Wed Aug 06 2008 Thierry Vignaud <tv@mandriva.org> 0.7.26-3mdv2009.0 + Revision: 264770 - rebuild early 2009.0 package (before pixel changes) * Tue Jun 10 2008 Oden Eriksson <oeriksson@mandriva.com> 0.7.26-2mdv2009.0 + Revision: 217574 - rebuilt against dietlibc-devel-0.32 * Tue Jun 10 2008 Thierry Vignaud <tv@mandriva.org> 0.7.26-1mdv2009.0 + Revision: 217498 - adapt to pciutils-3.x API + Pixel <pixel@mandriva.com> - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers * Thu Apr 03 2008 Olivier Blin <oblin@mandriva.com> 0.7.25-1mdv2008.1 + Revision: 192070 - 0.7.25 - correctly use usbdev busnum and devnum when finding USB device in sysfs to get its modalias (#38721) * Thu Mar 20 2008 Pixel <pixel@mandriva.com> 0.7.24-1mdv2008.1 + Revision: 189156 - 0.7.23: - lspcidrake.c: when faking probe (ie -p, -u, --dmidecode), do not do real probe * Fri Feb 29 2008 Olivier Blin <oblin@mandriva.com> 0.7.23-1mdv2008.1 + Revision: 176792 - 0.7.23 - fix segfault on x86_64 * Thu Feb 28 2008 Olivier Blin <oblin@mandriva.com> 0.7.22-1mdv2008.1 + Revision: 176427 - 0.7.22 - really use modules.alias file from kernel or ldetect-lst * Wed Feb 27 2008 Olivier Blin <oblin@mandriva.com> 0.7.21-1mdv2008.1 + Revision: 175899 - build dietlibc version with -D_BSD_SOURCE -D_FILE_OFFSET_BITS=64 to be able to use dirent - 0.7.21 - add back /bin/gzip support, and prefer it if available (and be 6 hundredths of second faster...) - do not ignore subsequent modaliases if resolving one fails - find modules from USB modaliases as well (#38158, useful when module is a dkms one, or during install where modules are not autoloaded, this could allow to remove most modules from usbtable) * Wed Jan 02 2008 Thierry Vignaud <tv@mandriva.org> 0.7.20-2mdv2008.1 + Revision: 140638 - rebuild with latest libpci - kill re-definition of %%buildroot on Pixel's request + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Fri Sep 28 2007 Olivier Blin <oblin@mandriva.com> 0.7.20-1mdv2008.0 + Revision: 93761 - 0.7.20 - fix modalias fd leak (thanks to Anssi for the report * Wed Sep 19 2007 Olivier Blin <oblin@mandriva.com> 0.7.19-1mdv2008.0 + Revision: 90895 - 0.7.19 - replace '-' characters from USB drivers with '_' to be compliant with modnames from modaliases (partially fixes #33029) * Tue Sep 11 2007 Olivier Blin <oblin@mandriva.com> 0.7.18-1mdv2008.0 + Revision: 84471 - 0.7.18 - use ldetect-lst aliases from /lib/module-init-tools/, not from /usr - do not read modules.dep (lspcidrake is now twice faster) * Sun Sep 09 2007 Olivier Blin <oblin@mandriva.com> 0.7.17-1mdv2008.0 + Revision: 83427 - 0.7.17 - use module aliases from first match only * Fri Sep 07 2007 Olivier Blin <oblin@mandriva.com> 0.7.16-1mdv2008.0 + Revision: 81779 - 0.7.16 - fallback on ldetect-lst's dkms-modules.alias if no alias is found (to find modules available in dkms packages) - use ldetect's preferred-modules.alias file before other aliases files * Mon Aug 27 2007 Thierry Vignaud <tv@mandriva.org> 0.7.15-1mdv2008.0 + Revision: 71969 - fix soname * Mon Aug 27 2007 Thierry Vignaud <tv@mandriva.org> 0.7.14-2mdv2008.0 + Revision: 71947 - use gcc instead of ld again * Mon Aug 27 2007 Thierry Vignaud <tv@mandriva.org> 0.7.13-2mdv2008.0 + Revision: 71906 - fix overwriting pcitable results from modaliases - use visibility in order to enforce exported ABI and to reduce code size * Wed Aug 22 2007 Olivier Blin <oblin@mandriva.com> 0.7.12-2mdv2008.0 + Revision: 69163 - 0.7.12 - prefer ldetect-lst's modules.alias if more recent (to detect modular IDE controllers when run from old kernels) * Mon Aug 20 2007 Olivier Blin <oblin@mandriva.com> 0.7.11-2mdv2008.0 + Revision: 67451 - 0.7.11: revert '_' characters substitution * Mon Aug 20 2007 Thierry Vignaud <tv@mandriva.org> 0.7.10-2mdv2008.0 + Revision: 67220 - rebuild * Thu Aug 16 2007 Thierry Vignaud <tv@mandriva.org> 0.7.10-1mdv2008.0 + Revision: 64349 - fallback to ldetect-lst's modules.alias if kernel's modules.alias cannot be found (eg: installer) - plug some minor memory leaks * Thu Aug 16 2007 Thierry Vignaud <tv@mandriva.org> 0.7.9-2mdv2008.0 + Revision: 64325 - fix zlib conversion which introduced a crash (#32590) * Wed Aug 15 2007 Olivier Blin <oblin@mandriva.com> 0.7.8-2mdv2008.0 + Revision: 63560 - build dietlibc library with -Os - 0.7.8: use zlib to read gzipped files instead of piping gzip command * Tue Aug 14 2007 Olivier Blin <oblin@mandriva.com> 0.7.7-2mdv2008.0 + Revision: 63353 - add dietlibc static library * Tue Aug 14 2007 Olivier Blin <oblin@mandriva.com> 0.7.7-1mdv2008.0 + Revision: 63215 - package static library - buildrequire mdoprobe-devel - 0.7.7 - remove old 8139too/gdth hardcoded rules (already in modules.alias) - replace '_' characters with '-' to be compliant with pcitable and list_modules.pm * Mon Aug 13 2007 Thierry Vignaud <tv@mandriva.org> 0.7.6-2mdv2008.0 + Revision: 62691 - rebuild with shared modprobe library * Tue Aug 07 2007 Thierry Vignaud <tv@mandriva.org> 0.7.6-1mdv2008.0 + Revision: 59871 - better error managment: o exit() is not nice error managment in a library o print fatal error on stderr (pixel) - don't free before printing (pixel) * Mon Aug 06 2007 Thierry Vignaud <tv@mandriva.org> 0.7.5-1mdv2008.0 + Revision: 59402 - handle pcitable without description field * Mon Aug 06 2007 Thierry Vignaud <tv@mandriva.org> 0.7.4-1mdv2008.0 + Revision: 59342 - kill most quirks since they are obsolete now that we resolve modaliases (which bring in wildcard support) * Mon Aug 06 2007 Thierry Vignaud <tv@mandriva.org> 0.7.3-4mdv2008.0 + Revision: 59266 - versionnate module-init-tools-devel buildrequires - fix buildrequires - reuse modprobe code in order to resolve modaliases - rebuild with latest pciutils * Tue Jun 26 2007 Thierry Vignaud <tv@mandriva.org> 0.7.2-2mdv2008.0 + Revision: 44545 - new devel library policy * Mon May 14 2007 Thierry Vignaud <tv@mandriva.org> 0.7.2-1.1mdv2008.0 + Revision: 26722 - don't link with zlib since it's not needed * Mon May 07 2007 Pixel <pixel@mandriva.com> 0.7.1-1mdv2008.0 + Revision: 23997 - new release, 0.7.1 (build with zlib which is needed by libpci) + Per Ãyvind Karlsen <peroyvind@mandriva.org> - add zlib to buildrequires (see #30672, source needs to be patched in svn too..) * Fri Mar 09 2007 Thierry Vignaud <tvignaud@mandriva.com> 0.7.0-5mdv2007.1 + Revision: 138796 - require pciids instead of /usr/share/pci.ids * Thu Mar 08 2007 Thierry Vignaud <tvignaud@mandriva.com> 0.7.0-4mdv2007.1 + Revision: 138469 - ldetect engine now requires pci.ids - fix conflict on x86_64 * Wed Feb 28 2007 Pixel <pixel@mandriva.com> 0.7.0-3mdv2007.1 + Revision: 127029 - add explicit conflict on previous lib * Mon Feb 26 2007 Thierry Vignaud <tvignaud@mandriva.com> 0.7.0-2mdv2007.1 + Revision: 126045 - versionnate provides * Mon Feb 26 2007 Thierry Vignaud <tvignaud@mandriva.com> 0.7.0-1mdv2007.1 + Revision: 125975 - switch to pciutils as PCI enumerating backend - use pciutils in order to get device descriptions from /usr/share/pci.ids - export pci_domain and class (PCI class as reported by pciutils) - bump major due to ABI changes * Wed Jan 10 2007 Thierry Vignaud <tvignaud@mandriva.com> 0.6.7-1mdv2007.1 + Revision: 107141 - fix warnings on parsing /proc/bus/usb/devices with kernel-2.6.20 * Mon Nov 06 2006 Thierry Vignaud <tvignaud@mandriva.com> 0.6.6-1mdv2007.0 + Revision: 76952 - Import ldetect * Mon Nov 06 2006 Thierry Vignaud <tvignaud@mandriva.com> 0.6.6-1mdv2007.1 - fix parsing /proc/bus/usb/devices with large "parent device" field (veryy rare case) * Thu Jul 13 2006 Olivier Blin <oblin@mandriva.com> 0.6.5-1mdv2007.0 - dmidecode >= 2.7 support - fix freeing a reference to a constant string (fredl) * Thu Jan 05 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.6.4-1mdk - add support for pci domains * Sat Aug 06 2005 Thierry Vignaud <tvignaud@mandriva.com> 0.6.3-1mdk - prevent spurious warnings for strange USB interfaces * Tue May 17 2005 Thierry Vignaud <tvignaud@mandriva.com> 0.6.2-1mdk - do not try to run dmidecode when not root * Thu Mar 31 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.6.1-1mdk - fix SATA detection of latest NVidia controllers * Mon Mar 14 2005 Pixel <pixel@mandrakesoft.com> 0.6.0-1mdk - add dmitable parsing and use - libldetect.so instead of libldetect.a - libification * Thu Feb 17 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.5.5-1mdk - handle a few more special cases (gdth, snd-vx222, 8139too, and agp bridges) - detect new VIA SATA controllers like kernel does * Tue Dec 07 2004 Pixel <pixel@mandrakesoft.com> 0.5.4-1mdk - all PCI_CLASS_BRIDGE_CARDBUS cards are yenta_socket (says kudzu) * Fri Oct 29 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.5.3-1mdk - keep existing description string if already reported by USB devices when usbtable description is empty (eg: freebox) * Fri Jun 18 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.5.2-1mdk - display driver reported by the kernel rather than "unknown"