Пакет module-init-tools: Specfile

Name: module-init-tools
Version: 3.16
Release: alt14

Summary: Kernel module management utilities
License: GPL
Group: System/Kernel and hardware
URL: http://www.kerneltools.org
ExclusiveOS: Linux
ExclusiveArch: %ix86 x86_64

Source0: %name-%version.tar
Patch0:  mit-klibc-support.patch
Patch1:  mit-ignore-all-commands.patch
Patch2:  mit-compress-xz.patch
Patch3:  mit-ignore-install.patch
Patch4:  mit-depmod-alias-valid.patch

Conflicts: modutils < 2.4.27-alt8
Conflicts: etcnet < 0.8.5
Conflicts: mkinitrd < 1:2.9.11-alt1
Conflicts: lm_sensors < 2.10.2-alt1

%define _unpackaged_files_terminate_build 1
%global __find_requires %_libdir/klibc/klibc-find-requires %__find_requires

BuildRequires: klibc-devel docbook-utils glibc-devel-static zlib-devel liblzma-devel

%description
The module-init-tools package includes various programs needed for
automatic loading and unloading of modules under 2.6.x kernels, as
well as other module management programs.

%package initramfs
Summary: Module management utilities for use in initramfs images
Group: System/Kernel and hardware
PreReq: mkinitrd-initramfs

%description initramfs
This package contains a special version of kernel module management
utilities intended for use in initramfs images generated by mkinitrd.
This version is linked with klibc instead of glibc.

%package compat
Summary: Script for migration from modutils to module-init-tools
Group: System/Kernel and hardware
PreReq: %name = %version-%release

%description compat
This package contains a script which converts configuration files
for old modutils (/etc/modules.conf) to the new format used by
module-init-tools.

%prep
%setup
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

# remove pregenerated man pages - they will be recreated from SGML source
rm -f *.[58]

%build
%define _optlevel s
%add_optflags -fno-asynchronous-unwind-tables
%autoreconf
%configure \
	CC="klcc -shared" \
	CPPFLAGS="-DCONFIG_NO_BACKWARDS_COMPAT -DKLIBC"
%make_build modprobe

%install
install -pD -m 0755 {build,%buildroot/lib/mkinitrd/%name/sbin}/modprobe

%files initramfs
/lib/mkinitrd/%name

%changelog
* Thu Apr 24 2014 Led <led@altlinux.ru> 3.16-alt14
- rebuild with klibc-2.0.3-alt3

* Fri Apr 11 2014 Led <led@altlinux.ru> 3.16-alt13
- rebuild with klibc-2.0.3-alt2

* Mon Nov 18 2013 Led <led@altlinux.ru> 3.16-alt12
- rebuild with klibc-2.0.2-alt4

* Sat Dec 15 2012 Led <led@altlinux.ru> 3.16-alt11
- rebuild with klibc-2.0.2-alt2
- cleaned up spec
- added optflags for smaller size

* Fri Nov 23 2012 Led <led@altlinux.ru> 3.16-alt10
- rebuild with klibc-2.0.2-alt1

* Thu Nov 22 2012 Led <led@altlinux.ru> 3.16-alt9
- Rebuilt with klibc-1.5.25-alt1

* Sun Nov 18 2012 Led <led@altlinux.ru> 3.16-alt8
- Rebuilt with klibc-1.5.18-alt3

* Wed Oct 17 2012 Michael Shigorin <mike@altlinux.org> 3.16-alt7
- Rebuilt with klibc-1.5.18-alt2
  (3.16-alt4 actually meant "klibc-1.5.18-alt1.1").

* Fri Aug 03 2012 Alexey Gladkov <legion@altlinux.ru> 3.16-alt6
- All files are replaced by kmod except the module-init-tools-initramfs.

* Fri Apr 27 2012 Dmitry V. Levin <ldv@altlinux.org> 3.16-alt5
- /etc/modprobe.d/install.conf: fixed potential deadlock.

* Mon Mar 12 2012 Michael Shigorin <mike@altlinux.org> 3.16-alt4
- Rebuilt with klibc-1.5.18-alt2.

* Wed Feb 01 2012 Alexey Gladkov <legion@altlinux.ru> 3.16-alt3
- Add viafb to blacklist (ALT#26699).

* Fri Sep 30 2011 Valery Inozemtsev <shrek@altlinux.ru> 3.16-alt2
- fixed lzma typo

* Fri Jun 17 2011 Alexey Gladkov <legion@altlinux.ru> 3.16-alt1
- New version 3.16.
- Add lzma support.
- modprobe: --ignore-all-commands option deprecated.

* Mon May 24 2010 Dmitry V. Levin <ldv@altlinux.org> 3.5-alt6
- Rebuilt with klibc-1.5.18-alt1.

* Sun Apr 04 2010 Dmitry V. Levin <ldv@altlinux.org> 3.5-alt5
- Rebuilt with klibc-1.5.17-alt2.

* Tue Nov 10 2009 Valery Inozemtsev <shrek@altlinux.ru> 3.5-alt4
- rebuild with latest klibc

* Fri Jul 24 2009 Valery Inozemtsev <shrek@altlinux.ru> 3.5-alt3
- shared build modprobe for initramfs

* Mon May 18 2009 Valery Inozemtsev <shrek@altlinux.ru> 3.5-alt2
- build with klibc instead of dietlibc (Kirill A. Shutemov)

* Thu Nov 27 2008 Valery Inozemtsev <shrek@altlinux.ru> 3.5-alt1
- build for sisyphus

* Mon Nov 24 2008 Sergey Vlasov <vsu@altlinux.ru> 3.5-alt0.1
- New upstream release: 3.5
- Add /sbin/modindex utility to the package (silicium@).
- modindex: Fix segmentation fault on unknown option (silicium@).

* Sat Nov 08 2008 Valery Inozemtsev <shrek@altlinux.ru> 3.4.1-alt2
- /etc/modprobe.d/isapnp: load rtc-cmos to alias in module

* Sun Sep 28 2008 Valery Inozemtsev <shrek@altlinux.ru> 3.4.1-alt1
- 3.4.1
- /etc/modprobe.d/isapnp: updated rtc alias
- /etc/modprobe.d/blacklist-framebuffer: added new modules
- /etc/modprobe.d/blacklist-watchdog: added iTCO_wdt

* Mon Apr 23 2007 Sergey Vlasov <vsu@altlinux.ru> 3.3-alt0.5.pre6
- /etc/modprobe.d/aliases: Add "alias nfs4 nfs" (#11203).
- /etc/modprobe.d/blacklist-edac: Blacklist EDAC drivers by default
  (buggy, and at least amd76x_edac conflicts with amd-k7-agp).

* Fri Mar 09 2007 Sergey Vlasov <vsu@altlinux.ru> 3.3-alt0.4.pre6
- /etc/modprobe.d/blacklist-net: Disable autoloading of the ipv6 module and
  other modules for rarely used network protocols.  If some of these
  protocols are really needed, the administrator can either remove the
  blacklist lines for them, or add the required modules to /etc/modules
  (which is not affected by blacklist if proper module names are used).

* Tue Feb 13 2007 Sergey Vlasov <vsu@altlinux.ru> 3.3-alt0.3.pre6
- /etc/modprobe.d/install: Add install and remove commands for binfmt_misc
  to automatically mount and umount /proc/sys/fs/binfmt_misc (fixes wine
  initscript failure to register its binfmt handler).  In the old modutils
  package these commands were built into modprobe.

* Sat Feb 03 2007 Sergey Vlasov <vsu@altlinux.ru> 3.3-alt0.2.pre6
- Updated to v3.3-pre6 (b0c1e293dc962368117875c3684cee6362a79238).
- Require dietlibc >= 0.30-alt3 for build due to the -fno-stack-protector fix
  in the diet wrapper.
- Removed no longer needed -fno-stack-protector hack from spec file.
- modprobe: Read /etc/modprobe.d/* even if /etc/modprobe.conf exists.
  Avoids failure if /etc/modprobe.conf is created locally; adding a default
  modprobe.conf file with "include /etc/modprobe.d" does not work if
  /etc/modprobe.conf existed before package installation for some reason.
- depmod: Read /etc/depmod.d/* even if /etc/depmod.conf exists (for the same
  reason as the above modprobe change).
- Removed /etc/depmod.conf and /etc/modprobe.conf from the package (no
  longer needed after the above modifications of depmod and modprobe).
- modprobe: Apply blacklist to all aliases, including defined in config
  (allows blacklisting of aliases defined in default config files by adding
  separate files instead of changing configs installed by the package).

* Tue Jan 30 2007 Sergey Vlasov <vsu@altlinux.ru> 3.3-alt0.1.pre4
- Initial build for ALT Linux as a standalone package.
- Changes from upstream module-init-tools-3.3-pre4 release:
  + modprobe: fix $CMDLINE_OPTS passing to subordinate modules
  + modprobe: fix format string bug in do_command()
  + depmod: check alias names in modules for validity
  + depmod: release module file data after use
  + depmod, modprobe: ignore hidden files, editor backups (*~) and RPM backups
    (*.rpm*) when reading configs
  + modprobe: add --ignore-all-commands option
  + generate-modprobe.conf: fix temporary file creation
  + generate-modprobe.conf: extend set of ignored lines to match ALT modutils
  + generate-modprobe.conf: add --full-config=FILE option
  + generate-modprobe.conf: search for old modprobe only in /sbin/modprobe.old
  + generate-modprobe.conf: convert "probeall" to a sequence of "alias" lines
- Added default modprobe config files based on the Ubuntu package
  (module-init-tools_3.3-pre3-1ubuntu1) with several fixes.
- Added nonempty /etc/depmod.conf and /etc/modprobe.conf to avoid problems.
- Added modules(5) man page (moved from the old modutils package, originally
  from Debian).
- Placed generate-modprobe.conf into a separate "compat" subpackage.
- Added conflicts for old releases of etcnet, lm_sensors, mkinitrd, modutils
  which are incompatible with this package.
- Added module-init-tools-initramfs subpackage which contains an additional
  modprobe binary built with dietlibc for use in initramfs images generated
  by mkinitrd.