This attached patch and spec file should allow devallocator to build on
all architectures.
Dan
--- dev_allocator/conf/dev_allocation.rhat 2006-02-02 20:21:55.000000000 -0500
+++ dev_allocator/conf/dev_allocation 2006-05-25 13:50:25.000000000 -0400
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright 2005 Trusted Computer Solutions, Inc
-# Copyright (C) 2005 Hewlett-Packard Development Company, L.P.
-#
-# Name: dev_allocation - setup user allocatable devices
-#
-
-# Tags
-# chkconfig: 2345 85 21
-# description: perform actions needed for user allocatable devices
-
-# source function library
-. /etc/rc.d/init.d/functions
-
-RETVAL=0
-
-start() {
- #
- # set configured devices into the unallocated state
- #
- DEVS=`/usr/bin/dev_allocator -l | /bin/sed 1d | /bin/awk '{print $1}'`
-
- for DEV in ${DEVS}
- do
- /usr/bin/dev_allocator -u ${DEV}
- done
-
- touch /var/lock/subsys/dev_allocation
-}
-
-case "$1" in
- start)
- start
- ;;
- stop)
- rm -f /var/lock/subsys/dev_allocation
- ;;
- *)
- echo $"Usage: $0 {start|stop}"
- exit 1
-esac
-
-exit $RETVAL
--- dev_allocator/conf/Makefile.rhat 2006-02-13 18:44:38.000000000 -0500
+++ dev_allocator/conf/Makefile 2006-05-25 13:50:25.000000000 -0400
@@ -6,7 +6,7 @@
mkdir -p ${ROOT}/etc/rc.d/init.d
mkdir -p ${ROOT}/usr/share/devallocation/classes
mkdir -p ${ROOT}/etc/devallocation
- cp -f ../conf/dev_allocation ${ROOT}/etc/rc.d/init.d/
- cp -f ../conf/classes/* ${ROOT}/usr/share/devallocation/classes
- cp -f ../conf/supported_device_classes.conf ${ROOT}/etc/devallocation/
+ install -m 755 ../conf/devallocator ${ROOT}/etc/rc.d/init.d/
+ install -m 755 ../conf/classes/* ${ROOT}/usr/share/devallocation/classes
+ install -m 644 ../conf/supported_device_classes.conf ${ROOT}/etc/devallocation/
--- /dev/null 2006-05-24 22:45:32.182209000 -0400
+++ dev_allocator/conf/devallocator 2006-05-25 13:50:25.000000000 -0400
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+#
+# Copyright 2005 Trusted Computer Solutions, Inc
+# Copyright (C) 2005 Hewlett-Packard Development Company, L.P.
+#
+# Name: devallocator - setup user allocatable devices
+#
+
+# Tags
+# chkconfig: 2345 85 21
+# description: perform actions needed for user allocatable devices
+
+# source function library
+. /etc/rc.d/init.d/functions
+
+RETVAL=0
+
+stop() {
+ rm -f /var/lock/subsys/devallocator
+}
+
+start() {
+ #
+ # set configured devices into the unallocated state
+ #
+ DEVS=`/usr/bin/dev_allocator -l | /bin/sed 1d | /bin/awk '{print $1}'`
+
+ for DEV in ${DEVS}
+ do
+ /usr/bin/dev_allocator -u ${DEV}
+ done
+
+ touch /var/lock/subsys/devallocator
+}
+
+case "$1" in
+ restart)
+ stop
+ start
+ ;;
+
+ start)
+ start
+ ;;
+
+ status)
+ if [ -f /var/lock/subsys/devallocator ]; then
+ echo $"$0 started
+"
+ else
+ echo $"$0 stopped"
+ fi
+ ;;
+
+ stop)
+ stop
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop}"
+ exit 1
+esac
+
+exit $RETVAL
--- dev_allocator/lib/Makefile~ 2006-02-13 18:44:38.000000000 -0500
+++ dev_allocator/lib/Makefile 2006-06-13 09:30:25.000000000 -0400
@@ -1,6 +1,7 @@
# If ROOT was not defined on the command-line, then define it now:
ROOT ?= $(shell pwd)/../root
export ROOT
+LIBDIR ?= $(ROOT)/usr/lib
# This version number should match the one in the RPM spec file
# This is the major version number
@@ -46,10 +47,10 @@
mkdir -p ${ROOT}/usr/include
mkdir -p ${ROOT}/usr/include/selinux
mkdir -p ${ROOT}/etc/selinux/mls
- cp -f $(LIBV) ${ROOT}/usr/lib
- cp -fd $(LIBM) ${ROOT}/usr/lib
- cd $(ROOT)/usr/lib && ln -sf $(LIBV) $(TARGET)
- cp -f $(LIBA) ${ROOT}/usr/lib
+ cp -f $(LIBV) ${LIBDIR}
+ cp -fd $(LIBM) ${LIBDIR}
+ cd ${LIBDIR} && ln -sf $(LIBV) $(TARGET)
+ cp -f $(LIBA) ${LIBDIR}
cp -f $(HEADERS) $(ROOT)/usr/include/selinux/
clean:
--- dev_allocator/classes/Makefile~ 2006-01-31 13:09:06.000000000 -0500
+++ dev_allocator/classes/Makefile 2006-06-13 09:37:49.000000000 -0400
@@ -1,8 +1,8 @@
# If ROOT was not defined on the command-line, then define it now:
ROOT ?= $(shell pwd)/../root
export ROOT
-
-LIBDIR = $(ROOT)/usr/lib/devallocation
+LIBDIR ?= $(ROOT)/usr/lib
+DEVLIBDIR = $(LIBDIR)/devallocation
LIBMAJORVERSION = 0
LIBMINORVERSION = 2
@@ -55,12 +55,12 @@
$(CC) $(CFLAGS) -fPIC -c -o $@ $<
install: all
- test -d $(LIBDIR) || install -m 755 -d $(LIBDIR)
- install -m 755 $(LIBCDROMV) $(LIBDIR)
- install -m 755 $(LIBFDV) $(LIBDIR)
- install -m 755 $(LIBSNDV) $(LIBDIR)
- install -m 755 $(LIBGENERICV) $(LIBDIR)
- install -m 755 $(LIBNOACTIONV) $(LIBDIR)
+ test -d $(DEVLIBDIR) || install -m 755 -d $(DEVLIBDIR)
+ install -m 755 $(LIBCDROMV) $(DEVLIBDIR)
+ install -m 755 $(LIBFDV) $(DEVLIBDIR)
+ install -m 755 $(LIBSNDV) $(DEVLIBDIR)
+ install -m 755 $(LIBGENERICV) $(DEVLIBDIR)
+ install -m 755 $(LIBNOACTIONV) $(DEVLIBDIR)
clean:
rm -f *.o lib*.so*
%define devallocver 0.5-5
Summary: MLS Utilities
Name: devallocator
Version: 0.5.5
Release: 2
License: GPL
Group: System Environment/Base
Source:
http://prdownloads.sourceforge.net/devallocator/dev_allocator-%{devallocver}.tgz
Patch: devallocator-rhat.patch
URL: http://www.TrustedCS.com
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(pre): /sbin/chkconfig
Requires(post):/sbin/chkconfig
BuildRequires: libxml2-devel libselinux-devel audit-libs-devel
%description
TCS application to manage the allocation and unallocation of devices.
The TCS device allocation library provides an interface for
applications to utilize the Device Allocation services.
%package devel
Summary: TCS Device Allocation API
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
Requires: devallocator = %{version}-%{release}
%description devel
The TCS Device Allocation API provides an interface for
applications to utilize the Device Allocation services.
%prep
%setup -q -n dev_allocator
%patch -p1 -b .rhat
%build
make
%install
rm -rf %{buildroot}
make LIBDIR="%{buildroot}%{_libdir}" ROOT="%{buildroot}" install
rm -rf %{buildroot}/%{_libdir}/libdevallocation.a
%clean
rm -rf %{buildroot}
%preun
if [ "$1" = "0" ]; then
/sbin/chkconfig --del devallocator
fi
%post
/sbin/ldconfig
/sbin/chkconfig --add devallocator
%postun -p /sbin/ldconfig
%files devel
%defattr(-,root,root)
%{_includedir}/selinux/devallocation.h
/%{_libdir}/libdevallocation.so
%files
%defattr(-,root,root)
%attr(4755,root,root) %{_bindir}/dev_allocator
%{_sbindir}/dev_allocator_config
/etc/rc.d/init.d/devallocator
%dir /etc/devallocation
%config(noreplace) /etc/devallocation/supported_device_classes.conf
/%{_libdir}/libdevallocation.so.*
%dir /%{_libdir}/devallocation
/%{_libdir}/devallocation/*
%dir /usr/share/devallocation
/usr/share/devallocation/*
%doc /usr/share/man/man1/*.1.gz
%changelog
* Thu Jun 8 2006 Dan Walsh <[EMAIL PROTECTED]> 0.5.4-2
- More Fixes to spec file
* Mon May 15 2006 Dan Walsh <[EMAIL PROTECTED]> 0.5.4-1
- Fixes to spec file
* Fri Oct 14 2005 Cory Olmo <[EMAIL PROTECTED]> 0.4-1
- Switched license to GPL
* Tue Aug 23 2005 Cory Olmo <[EMAIL PROTECTED]> 0.3-1
- Added support for floppy devices
* Wed Jun 29 2005 Cory Olmo <[EMAIL PROTECTED]> 0.2-1
- Bug fixes for handling initial unallocation of devices
* Fri May 27 2005 Cory Olmo <[EMAIL PROTECTED]> 0.1-1
- Initial version
--
redhat-lspp mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/redhat-lspp