Репозитории ALT
5.1: | 141-alt12.M51.2 |
4.1: | 118-alt1.M41.2 |
4.0: | 108-alt2.M40.1 |
+updates: | 108-alt2.M40.1 |
3.0: | 0.70-alt1 |
+updates: | 0.70-alt2 |
Группа :: Система/Настройка/Оборудование
Пакет: udev
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
# -*- mode: rpm-spec; coding: utf-8 -*-
%define version 0.70
%define source_version 070
%define release alt2
# if we want use system-wide sysfs or udev local copy
# Note udev-0.50 requires a recent version of sysfs,
%def_with system_sysfs
# if we want to build against the included version of klibc or not.
# Watch out for where the linux symlink is in the klibc part of the tarball,
# it probably is not where you want it to be.
%def_without klibc
%if_with klibc
# if we want to build against klibc, we MUST specify an exact kernel version
# and flavour to build with
%define kernel_version 2.6.9
%define kernel_flavour std26-up
%endif
# if we want to have logging support in or not.
# Note, it is not recommend if you use klibc to enable logging.
%def_with syslog
# if we want to enable debugging support in udev. If it is enabled, lots of
# stuff will get sent to the debug syslog.
%def_with debug
Name: udev
Version: %version
Release: %release
Summary: udev - an userspace implementation of devfs
Summary(ru_RU.UTF-8): udev - я█я┌п╬ п╡я▀п╫п╣я│п╣п╫п╫п╟я▐ п╦п╥ я▐п╢я─п╟ я─п╣п╟п╩п╦п╥п╟я├п╦я▐ devfs
License: GPL
Group: System/Configuration/Hardware
Url: http://kernel.org/pub/linux/utils/kernel/hotplug/
BuildRequires: kernel-headers-std26-up
%if_with system_sysfs
BuildRequires: libsysfs-devel > 0.4.0-alt2
%endif
Source0: %name-%source_version.tar.bz2
Source2: udev-00-lsb.rules
Source3: udev.rules
Source5: udev.dvb-scripts.bz2
Source10: drive-names.sh
Source12: cd-names.sh
Source13: cd-names.conf
Source14: udevd.init
Patch4: udev-0.46-alt-compile_warnings.patch
# Mdk patches
Patch11: udev-053_ide-devfs.sh.patch
Patch20: udev044_clean_klibc_deps.patch.bz2
Patch23: udev-044-includes.patch.bz2
Requires: udev_static-addon
%description
Starting with the 2.5 kernel, all physical and virtual devices in a
system are visible to userspace in a hierarchal fashion through
sysfs. /sbin/hotplug provides a notification to userspace when any
device is added or removed from the system. Using these two features,
a userspace implementation of a dynamic /dev is now possible that can
provide a very flexible device naming policy.
%description -l ru_RU.UTF-8
п²п╟я┤п╦п╫п╟я▐ я│ я▐п╢я─п╟ 2.5, п╡я│п╣ я─п╣п╟п╩я▄п╫я▀п╣ п╦ п╡п╦я─я┌я┐п╟п╩я▄п╫я▀п╣ я┐я│я┌я─п╬п╧я│я┌п╡п╟ п╡ я│п╦я│я┌п╣п╪п╣
п╦п╪п╣я▌я┌ п╦п╣я─п╟я─я┘п╦я┤п╣я│п╨п╬п╣ п╬я┌п╬п╠я─п╟п╤п╣п╫п╦п╣ п╡ sysfs, п╢п╬я│я┌я┐п©п╫п╬п╣ п╬п╠я▀я┤п╫я▀п╪ п©я─п╬пЁя─п╟п╪п╪п╟п╪.
/sbin/hotplug п╦п╫я└п╬я─п╪п╦я─я┐п╣я┌ п©я─п╬пЁя─п╟п╪п╪я▀ п╬ я┌п╬п╪, я┤я┌п╬ я┐я│я┌я─п╬п╧я│я┌п╡п╬ п©п╬п╢п╨п╩я▌я┤п╣п╫п╬
п╦п╩п╦ я┐п╢п╟п╩п╣п╫п╬ п╦п╥ я│п╦я│я┌п╣п╪я▀. п п╬п╪п╠п╦п╫п╟я├п╦я▐ я█я┌п╦я┘ п╢п╡я┐я┘ п©п╬п╢я│п╦я│я┌п╣п╪ п╢п╣п╩п╟п╣я┌ п╡п╬п╥п╪п╬п╤п╫я▀п╪
я│п╬п╥п╢п╟п╫п╦п╣ п╢п╦п╫п╟п╪п╦я┤п╣я│п╨п╬пЁп╬ /dev, п╨п╬я┌п╬я─я▀п╧ п╠я▀ п╢п╬п©я┐я│п╨п╟п╩ п╬я┤п╣п╫я▄ пЁп╦п╠п╨я┐я▌ я│п╦я│я┌п╣п╪я┐
п©я─п╟п╡п╦п╩ п╫п╟п╦п╪п╣п╫п╬п╡п╟п╫п╦я▐ я┐я│я┌я─п╬п╧я│я┌п╡.
%prep
%setup -q -n %name-%source_version
find -type f | xargs chmod u+rw
# ALT Patches
%patch4 -p1 -b .compile_warnings
# Mdk Patches
%patch11 -p1 -b .ide
%patch20 -p1 -b .clean_klibc_deps
%patch23 -p1 -b .includes
%if_with chassis_id
%__subst 's!/usr/local/bin/!/etc/udev/rules.d/!g ' extras/chassis_id/table.c
%__subst 's!/usr/local/bin/chassis_id!/sbin/chassis_id!' extras/chassis_id/README
%__subst 's!/usr/local/bin!/etc/udev/rules.d!' extras/chassis_id/README
%endif
%build
# udev doesn't support parallel build yet
NPROCS=1
export NPROCS
%make_build \
%if_with klibc
USE_KLIBC=true KERNEL_DIR=/usr/include/linux-%version-%flavour/ \
%endif
USE_LOG=%{?_with_syslog:true}%{!?_with_syslog:false} \
%if_with system_sysfs
SYS_SYSFS=-lsysfs \
%endif
DEBUG=%{?_with_debug:true}%{!?_with_debug:false} \
udevdir=/dev
for i in extras/scsi_id extras/ata_id extras/edd_id extras/cdrom_id extras/firmware extras/floppy extras/volume_id/ extras/run_directory/;do \
%make_build udevdir=/dev EXTRAS=$i
done
%install
%__make DESTDIR=%buildroot \
SYS_SYSFS=%{?_with_system_sysfs:true}%{!?_with_system_sysfs:false} \
initdir=%_initdir \
install
# Make /dev default for udev_root and udev_db
%__subst 's/^\(udev_root=\).*/\1"\/dev"/g' %buildroot%_sysconfdir/udev/udev.conf
%__subst 's/^\(udev_db=\)"?.*\([^\/]+\)"?$/\1"\/dev\/\2"/g' %buildroot%_sysconfdir/udev/udev.conf
cat >>%buildroot%_sysconfdir/udev/udev.conf <<EOF
# Whether to mount a tmpfs filesystem to \$udev_root
udev_tmpfs="1"
# tmpfs options. Note that size shouldn't be less than several
# megabytes due to insane format of current udev database
# (in /dev/.udevdb)
tmpfs_options="size=5m"
# Brave souls might want to try this
#tmpfs_options="size=5m,helper=/sbin/modules_lookup"
EOF
%__mkdir_p %buildroot%_initdir
rm -f %buildroot%_initdir/udev
install -m 0755 %SOURCE14 %buildroot%_initdir/udevd
%__mkdir_p %buildroot%_sysconfdir/udev/devices
for i in extras/scsi_id extras/ata_id extras/edd_id extras/cdrom_id extras/firmware extras/floppy extras/volume_id/ extras/run_directory/;do \
%make udevdir=/dev EXTRAS=$i DESTDIR=%buildroot install
done
rm -f %buildroot%_sysconfdir/udev/udev.permissions
rm -f %buildroot%_sysconfdir/udev/udev.rules.devfs
rm -f %buildroot%_sysconfdir/udev/permissions.d/50-udev.permissions
rm -f %buildroot%_sysconfdir/udev/rules.d/50-udev.rules
install -m 644 %SOURCE2 %buildroot%_sysconfdir/udev/rules.d/00-lsb.rules
install -m 644 %SOURCE3 %buildroot%_sysconfdir/udev/rules.d/50-alt.rules
install -d %buildroot%_sysconfdir/udev/scripts
install -m 755 extras/ide-devfs.sh %buildroot%_sysconfdir/udev/scripts/
install -m 755 extras/scsi-devfs.sh %buildroot%_sysconfdir/udev/scripts/
install -m 755 extras/start_udev %buildroot%_sysconfdir/udev/scripts/
install -m 755 extras/scsi_id/gen_scsi_id_udev_rules.sh %buildroot%_sysconfdir/udev/scripts/
install -m 755 extras/run_directory/udev_run_devd %buildroot/sbin/
install -m 755 extras/run_directory/udev_run_hotplugd %buildroot/sbin/
# add DVB support (lamikr):
echo 'KERNEL=="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", NAME="%c"' > %buildroot/%_sysconfdir/udev/rules.d/06-dvb.rules
bzcat %SOURCE5 > %buildroot%_sysconfdir/udev/scripts/dvb.sh
chmod 0755 %buildroot%_sysconfdir/udev/scripts/dvb.sh
# ide-names.sh
install -m 0755 %SOURCE10 %buildroot%_sysconfdir/udev/scripts/
# cd-names
install -m 0755 %SOURCE12 %buildroot%_sysconfdir/udev/scripts/
install -m 0644 %SOURCE13 %buildroot%_sysconfdir/udev/
install -d %buildroot/%_sysconfdir/dev.d/default
%post
%post_service udevd
%preun
%preun_service udevd
%clean
%files
%doc COPYING README TODO ChangeLog RELEASE-NOTES
%doc docs/overview docs/udev_vs_devfs
%doc docs/writing_udev_rules/* HOWTO-udev_for_dev
%_sysconfdir/dev.d
%attr(0755,root,root) %_initdir/udevd
%dir %_sysconfdir/udev
%config(noreplace) %_sysconfdir/udev/*.conf
%dir %_sysconfdir/udev/rules.d
%config %_sysconfdir/udev/rules.d/*
%dir %_sysconfdir/udev/scripts
%_sysconfdir/udev/scripts/*
%dir %_sysconfdir/udev/devices
%config %_sysconfdir/scsi_id.config
/sbin/*
%_sbindir/udevmonitor
%_bindir/*
%attr(-,root,man) %_man8dir/*
%changelog
…
Полный changelog можно просмотреть здесь
%define version 0.70
%define source_version 070
%define release alt2
# if we want use system-wide sysfs or udev local copy
# Note udev-0.50 requires a recent version of sysfs,
%def_with system_sysfs
# if we want to build against the included version of klibc or not.
# Watch out for where the linux symlink is in the klibc part of the tarball,
# it probably is not where you want it to be.
%def_without klibc
%if_with klibc
# if we want to build against klibc, we MUST specify an exact kernel version
# and flavour to build with
%define kernel_version 2.6.9
%define kernel_flavour std26-up
%endif
# if we want to have logging support in or not.
# Note, it is not recommend if you use klibc to enable logging.
%def_with syslog
# if we want to enable debugging support in udev. If it is enabled, lots of
# stuff will get sent to the debug syslog.
%def_with debug
Name: udev
Version: %version
Release: %release
Summary: udev - an userspace implementation of devfs
Summary(ru_RU.UTF-8): udev - я█я┌п╬ п╡я▀п╫п╣я│п╣п╫п╫п╟я▐ п╦п╥ я▐п╢я─п╟ я─п╣п╟п╩п╦п╥п╟я├п╦я▐ devfs
License: GPL
Group: System/Configuration/Hardware
Url: http://kernel.org/pub/linux/utils/kernel/hotplug/
BuildRequires: kernel-headers-std26-up
%if_with system_sysfs
BuildRequires: libsysfs-devel > 0.4.0-alt2
%endif
Source0: %name-%source_version.tar.bz2
Source2: udev-00-lsb.rules
Source3: udev.rules
Source5: udev.dvb-scripts.bz2
Source10: drive-names.sh
Source12: cd-names.sh
Source13: cd-names.conf
Source14: udevd.init
Patch4: udev-0.46-alt-compile_warnings.patch
# Mdk patches
Patch11: udev-053_ide-devfs.sh.patch
Patch20: udev044_clean_klibc_deps.patch.bz2
Patch23: udev-044-includes.patch.bz2
Requires: udev_static-addon
%description
Starting with the 2.5 kernel, all physical and virtual devices in a
system are visible to userspace in a hierarchal fashion through
sysfs. /sbin/hotplug provides a notification to userspace when any
device is added or removed from the system. Using these two features,
a userspace implementation of a dynamic /dev is now possible that can
provide a very flexible device naming policy.
%description -l ru_RU.UTF-8
п²п╟я┤п╦п╫п╟я▐ я│ я▐п╢я─п╟ 2.5, п╡я│п╣ я─п╣п╟п╩я▄п╫я▀п╣ п╦ п╡п╦я─я┌я┐п╟п╩я▄п╫я▀п╣ я┐я│я┌я─п╬п╧я│я┌п╡п╟ п╡ я│п╦я│я┌п╣п╪п╣
п╦п╪п╣я▌я┌ п╦п╣я─п╟я─я┘п╦я┤п╣я│п╨п╬п╣ п╬я┌п╬п╠я─п╟п╤п╣п╫п╦п╣ п╡ sysfs, п╢п╬я│я┌я┐п©п╫п╬п╣ п╬п╠я▀я┤п╫я▀п╪ п©я─п╬пЁя─п╟п╪п╪п╟п╪.
/sbin/hotplug п╦п╫я└п╬я─п╪п╦я─я┐п╣я┌ п©я─п╬пЁя─п╟п╪п╪я▀ п╬ я┌п╬п╪, я┤я┌п╬ я┐я│я┌я─п╬п╧я│я┌п╡п╬ п©п╬п╢п╨п╩я▌я┤п╣п╫п╬
п╦п╩п╦ я┐п╢п╟п╩п╣п╫п╬ п╦п╥ я│п╦я│я┌п╣п╪я▀. п п╬п╪п╠п╦п╫п╟я├п╦я▐ я█я┌п╦я┘ п╢п╡я┐я┘ п©п╬п╢я│п╦я│я┌п╣п╪ п╢п╣п╩п╟п╣я┌ п╡п╬п╥п╪п╬п╤п╫я▀п╪
я│п╬п╥п╢п╟п╫п╦п╣ п╢п╦п╫п╟п╪п╦я┤п╣я│п╨п╬пЁп╬ /dev, п╨п╬я┌п╬я─я▀п╧ п╠я▀ п╢п╬п©я┐я│п╨п╟п╩ п╬я┤п╣п╫я▄ пЁп╦п╠п╨я┐я▌ я│п╦я│я┌п╣п╪я┐
п©я─п╟п╡п╦п╩ п╫п╟п╦п╪п╣п╫п╬п╡п╟п╫п╦я▐ я┐я│я┌я─п╬п╧я│я┌п╡.
%prep
%setup -q -n %name-%source_version
find -type f | xargs chmod u+rw
# ALT Patches
%patch4 -p1 -b .compile_warnings
# Mdk Patches
%patch11 -p1 -b .ide
%patch20 -p1 -b .clean_klibc_deps
%patch23 -p1 -b .includes
%if_with chassis_id
%__subst 's!/usr/local/bin/!/etc/udev/rules.d/!g ' extras/chassis_id/table.c
%__subst 's!/usr/local/bin/chassis_id!/sbin/chassis_id!' extras/chassis_id/README
%__subst 's!/usr/local/bin!/etc/udev/rules.d!' extras/chassis_id/README
%endif
%build
# udev doesn't support parallel build yet
NPROCS=1
export NPROCS
%make_build \
%if_with klibc
USE_KLIBC=true KERNEL_DIR=/usr/include/linux-%version-%flavour/ \
%endif
USE_LOG=%{?_with_syslog:true}%{!?_with_syslog:false} \
%if_with system_sysfs
SYS_SYSFS=-lsysfs \
%endif
DEBUG=%{?_with_debug:true}%{!?_with_debug:false} \
udevdir=/dev
for i in extras/scsi_id extras/ata_id extras/edd_id extras/cdrom_id extras/firmware extras/floppy extras/volume_id/ extras/run_directory/;do \
%make_build udevdir=/dev EXTRAS=$i
done
%install
%__make DESTDIR=%buildroot \
SYS_SYSFS=%{?_with_system_sysfs:true}%{!?_with_system_sysfs:false} \
initdir=%_initdir \
install
# Make /dev default for udev_root and udev_db
%__subst 's/^\(udev_root=\).*/\1"\/dev"/g' %buildroot%_sysconfdir/udev/udev.conf
%__subst 's/^\(udev_db=\)"?.*\([^\/]+\)"?$/\1"\/dev\/\2"/g' %buildroot%_sysconfdir/udev/udev.conf
cat >>%buildroot%_sysconfdir/udev/udev.conf <<EOF
# Whether to mount a tmpfs filesystem to \$udev_root
udev_tmpfs="1"
# tmpfs options. Note that size shouldn't be less than several
# megabytes due to insane format of current udev database
# (in /dev/.udevdb)
tmpfs_options="size=5m"
# Brave souls might want to try this
#tmpfs_options="size=5m,helper=/sbin/modules_lookup"
EOF
%__mkdir_p %buildroot%_initdir
rm -f %buildroot%_initdir/udev
install -m 0755 %SOURCE14 %buildroot%_initdir/udevd
%__mkdir_p %buildroot%_sysconfdir/udev/devices
for i in extras/scsi_id extras/ata_id extras/edd_id extras/cdrom_id extras/firmware extras/floppy extras/volume_id/ extras/run_directory/;do \
%make udevdir=/dev EXTRAS=$i DESTDIR=%buildroot install
done
rm -f %buildroot%_sysconfdir/udev/udev.permissions
rm -f %buildroot%_sysconfdir/udev/udev.rules.devfs
rm -f %buildroot%_sysconfdir/udev/permissions.d/50-udev.permissions
rm -f %buildroot%_sysconfdir/udev/rules.d/50-udev.rules
install -m 644 %SOURCE2 %buildroot%_sysconfdir/udev/rules.d/00-lsb.rules
install -m 644 %SOURCE3 %buildroot%_sysconfdir/udev/rules.d/50-alt.rules
install -d %buildroot%_sysconfdir/udev/scripts
install -m 755 extras/ide-devfs.sh %buildroot%_sysconfdir/udev/scripts/
install -m 755 extras/scsi-devfs.sh %buildroot%_sysconfdir/udev/scripts/
install -m 755 extras/start_udev %buildroot%_sysconfdir/udev/scripts/
install -m 755 extras/scsi_id/gen_scsi_id_udev_rules.sh %buildroot%_sysconfdir/udev/scripts/
install -m 755 extras/run_directory/udev_run_devd %buildroot/sbin/
install -m 755 extras/run_directory/udev_run_hotplugd %buildroot/sbin/
# add DVB support (lamikr):
echo 'KERNEL=="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", NAME="%c"' > %buildroot/%_sysconfdir/udev/rules.d/06-dvb.rules
bzcat %SOURCE5 > %buildroot%_sysconfdir/udev/scripts/dvb.sh
chmod 0755 %buildroot%_sysconfdir/udev/scripts/dvb.sh
# ide-names.sh
install -m 0755 %SOURCE10 %buildroot%_sysconfdir/udev/scripts/
# cd-names
install -m 0755 %SOURCE12 %buildroot%_sysconfdir/udev/scripts/
install -m 0644 %SOURCE13 %buildroot%_sysconfdir/udev/
install -d %buildroot/%_sysconfdir/dev.d/default
%post
%post_service udevd
%preun
%preun_service udevd
%clean
%files
%doc COPYING README TODO ChangeLog RELEASE-NOTES
%doc docs/overview docs/udev_vs_devfs
%doc docs/writing_udev_rules/* HOWTO-udev_for_dev
%_sysconfdir/dev.d
%attr(0755,root,root) %_initdir/udevd
%dir %_sysconfdir/udev
%config(noreplace) %_sysconfdir/udev/*.conf
%dir %_sysconfdir/udev/rules.d
%config %_sysconfdir/udev/rules.d/*
%dir %_sysconfdir/udev/scripts
%_sysconfdir/udev/scripts/*
%dir %_sysconfdir/udev/devices
%config %_sysconfdir/scsi_id.config
/sbin/*
%_sbindir/udevmonitor
%_bindir/*
%attr(-,root,man) %_man8dir/*
%changelog
…
Полный changelog можно просмотреть здесь