dracut/0074-dracut.spec-create-compat-symlink-instead-of-ghost.patch
2012-01-26 16:43:20 +01:00

45 lines
1.4 KiB
Diff

From e4d85a77aad660b7877a3af091921e73865bfce6 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 26 Jan 2012 16:39:09 +0100
Subject: [PATCH] dracut.spec: create compat symlink, instead of %ghost
---
dracut.spec | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/dracut.spec b/dracut.spec
index 4eb3ba3..10556d0 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -197,25 +197,19 @@ rm $RPM_BUILD_ROOT%{_bindir}/lsinitrd
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
install -m 0644 dracut.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/dracut_log
-# create the ghosts
-mkdir -p $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT/sbin
-ln -s ../bin/dracut $RPM_BUILD_ROOT%{_sbindir}/dracut
-ln -s ../usr/bin/dracut $RPM_BUILD_ROOT/sbin/dracut
+# create compat symlink
+mkdir -p $RPM_BUILD_ROOT/sbin
+ln -s /usr/bin/dracut $RPM_BUILD_ROOT/sbin/dracut
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p <lua>
-posix.symlink("../bin/dracut", "%{_sbindir}/dracut")
-posix.symlink("../usr/bin/dracut", "/sbin/dracut")
-return 0
-
%files
%defattr(-,root,root,0755)
%doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg
%{_bindir}/dracut
-%ghost /sbin/dracut
-%ghost %{_sbindir}/dracut
+# compat symlink
+/sbin/dracut
%if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
%{_bindir}/mkinitrd
%{_bindir}/lsinitrd