Here is the correct patch; previous one was missing the .nodes file
Handle the case of udev managing /dev by adding udev/makedev.d rules for nodes that have to be in /dev. It should make vzdev more bullet-proof: wherever udev is installed or not, we have the needed /dev nodes. Signed-off-by: Kir Kolyshkin <k...@openvz.org> --- addons/vz-MAKEDEV/40-vz-misc.nodes | 9 +++++++++ addons/vz-MAKEDEV/Makefile | 8 ++++---- addons/vz-MAKEDEV/vz-MAKEDEV.spec.in | 9 +++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 addons/vz-MAKEDEV/40-vz-misc.nodes diff --git a/addons/vz-MAKEDEV/40-vz-misc.nodes b/addons/vz-MAKEDEV/40-vz-misc.nodes new file mode 100644 index 0000000..8b49c26 --- /dev/null +++ b/addons/vz-MAKEDEV/40-vz-misc.nodes @@ -0,0 +1,9 @@ +console +core +full +null +ptyp +random +ttyp +urandom +zero diff --git a/addons/vz-MAKEDEV/Makefile b/addons/vz-MAKEDEV/Makefile index bd8f6b2..7defab3 100644 --- a/addons/vz-MAKEDEV/Makefile +++ b/addons/vz-MAKEDEV/Makefile @@ -4,22 +4,22 @@ NAME=vz-MAKEDEV DESTDIR=. SRCDIR:=$(shell rpm --eval '%{_sourcedir}') -SRCTAR=MAKEDEV-3.3.13-1.tar.gz +SOURCES=MAKEDEV-3.3.13-1.tar.gz 40-vz-misc.nodes SRPMDIR:=$(shell rpm --eval '%{_srcrpmdir}') RPMDIR:=$(shell rpm --eval '%{_rpmdir}') rpms: sed -e "s/@@VERSION@@/$(VERSION)/" < $(NAME).spec.in > $(NAME).spec SRCRPM=`rpm --define='dist %{nil}' -q --queryformat='%{name}-%{version}-%{release}.src.rpm\n' --specfile $(NAME).spec | head -1`; \ - cp $(SRCTAR) $(SRCDIR); \ + cp $(SOURCES) $(SRCDIR); \ rpmbuild --define='dist %{nil}' -bs $(NAME).spec; \ - rm $(SRCDIR)/$(SRCTAR); \ + rm $(SRCDIR)/$(SOURCES); \ mv $(SRPMDIR)/$${SRCRPM} $(DESTDIR) addons: sed -e "s/@@VERSION@@/$(VERSION)/" < $(NAME).spec.in > $(NAME).spec; \ RPMS=`rpm -q --specfile $(NAME).spec`; \ - cp $(SRCTAR) $(SRCDIR); \ + cp $(SOURCES) $(SRCDIR); \ rpmbuild -bb $(NAME).spec; \ for file in $${RPMS}; do \ mv $(RPMDIR)/*/$${file}*.rpm $(DESTDIR); \ diff --git a/addons/vz-MAKEDEV/vz-MAKEDEV.spec.in b/addons/vz-MAKEDEV/vz-MAKEDEV.spec.in index b559743..821b59f 100644 --- a/addons/vz-MAKEDEV/vz-MAKEDEV.spec.in +++ b/addons/vz-MAKEDEV/vz-MAKEDEV.spec.in @@ -6,6 +6,7 @@ Release: @@VERSION@@%{?dist} Group: System Environment/Base License: GPL Source: MAKEDEV-%{version}-%{rel}.tar.gz +Source1: 40-vz-misc.nodes Summary: A program used for creating device files in /dev. BuildRoot: %{_tmppath}/%{name}-root BuildConflicts: rpm < 4.0.3-0.71, rpm-build < 4.0.3-0.71 @@ -153,6 +154,10 @@ rm -f $RPM_BUILD_ROOT/dev/{ramdisk,ram0} install -d -m 755 $RPM_BUILD_ROOT/dev/pts install -d -m 755 $RPM_BUILD_ROOT/dev/shm +# Install udev files +install -d -m 755 $RPM_BUILD_ROOT/etc/udev/makedev.d +install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/udev/makedev.d + %clean rm -fr $RPM_BUILD_ROOT @@ -255,8 +260,12 @@ fi /dev/fd %dir /dev/pts %dir /dev/shm +/etc/udev/makedev.d/40-vz-misc.nodes %changelog +* Wed Dec 17 2008 Kir Kolyshkin <k...@openvz.org> +- add a udev/makedev.d file to help udev-based distros + * Wed Oct 5 2005 Kir Kolyshkin <kir-at-sw.ru> 3.3.13-1.3.swsoft - renamed package dev to vzdev in order to not trigger udev install (bug #50) -- 1.5.6.5 _______________________________________________ Users mailing list Users@openvz.org https://openvz.org/mailman/listinfo/users