[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freeipmi-devel] Patch to .spec for building on SLES
From: |
Levi Pearson |
Subject: |
[Freeipmi-devel] Patch to .spec for building on SLES |
Date: |
Thu, 02 Aug 2007 11:04:55 -0600 |
Here's a message and patch from Troy Telford, one of the LNXI system
software engineers in charge of maintaining our HiPer package
repository:
Attatched is the patch I made to the freeipmi .specfile.
The problem is pretty simple: on Red Hat distros, the macro
%{_initrddir}
evaluates to /etc/rc.d/init.d
On SuSE distros, it evaluates to /etc/init.d/
So, this means on SuSE distros (and others, I'm sure), when it tries to
move
files from /etc/init.d to %{_initrddir}, it refuses to do anything and
exits
with an error. (As both the source and destination are the same file).
This patch adds a simple conditional to check if %{_initrddir} !
= /etc/init.d
before doing anything.
---
diff --git a/freeipmi/SPECS/freeipmi.spec b/freeipmi/SPECS/freeipmi.spec
index d2a9019..e3a5fe2 100644
--- a/freeipmi/SPECS/freeipmi.spec
+++ b/freeipmi/SPECS/freeipmi.spec
@@ -75,8 +80,11 @@ mkdir -p $RPM_BUILD_ROOT
DESTDIR="$RPM_BUILD_ROOT" make install
# fix coherance problems with associated script filenames
mkdir -p $RPM_BUILD_ROOT/%{_initrddir}/
+if [[ "%{_sysconfdir}/init.d" != "%{_initrddir}" ]]
+then
mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/freeipmi-bmc-watchdog
$RPM_BUILD_ROOT/%{_initrddir}/freeipmi-bmc-watchdog
mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/freeipmi-ipmidetectd
$RPM_BUILD_ROOT/%{_initrddir}/freeipmi-ipmidetectd
+fi
rm -f %{buildroot}%{_infodir}/dir
# kludge to get around rpmlint complaining about 0 length semephore
file
echo freeipmi > %{buildroot}/var/lib/freeipmi/ipckey
@@ -246,6 +254,8 @@ fi
%{_mandir}/man8/ipmidetectd.8*
%changelog
+* Wed Aug 01 2007 Troy Telford <address@hidden> 0.4.beta0
+- Some package cleanup so it builds on SLES
* Wed Jun 13 2007 Phil Knirsch <address@hidden> 0.4.beta0-1
- Some package cleanup and split of configuration and initscript
* Fri Feb 28 2007 Albert Chu <address@hidden> 0.4.beta0-1
--
1.5.0
- [Freeipmi-devel] Patch to .spec for building on SLES,
Levi Pearson <=