changeset 13127:d52cd594258b

6976049 libfmevent should be delivered in /lib/fm instead of /usr/lib/fm
author Antonello Cruz <Antonello.Cruz@Sun.COM>
date Mon, 16 Aug 2010 08:39:24 -0700
parents 80cabdfb1113
children 4fa15249a57b
files usr/src/Targetdirs usr/src/lib/fm/libfmevent/Makefile usr/src/lib/fm/libfmevent/Makefile.com usr/src/pkg/manifests/service-fault-management.mf
diffstat 4 files changed, 90 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/Targetdirs	Mon Aug 16 11:02:56 2010 +0530
+++ b/usr/src/Targetdirs	Mon Aug 16 08:39:24 2010 -0700
@@ -162,6 +162,7 @@
 	/lib \
 	/lib/crypto \
 	/lib/inet \
+	/lib/fm \
 	/lib/secure \
 	/lib/svc \
 	/lib/svc/bin \
@@ -445,6 +446,7 @@
 	$($(MACH64)_DIRS64) \
 	/lib/$(MACH64) \
 	/lib/crypto/$(MACH64) \
+	/lib/fm/$(MACH64) \
 	/lib/secure/$(MACH64) \
 	/usr/bin/$(MACH64) \
 	/usr/ccs/bin/$(MACH64)  \
@@ -1054,6 +1056,10 @@
 $(ROOT)/usr/lib/nss_files.so.1:=	REALPATH=../../lib/nss_files.so.1
 $(ROOT)/usr/lib/nss_nis.so.1:=		REALPATH=../../lib/nss_nis.so.1
 $(ROOT)/usr/lib/nss_user.so.1:=		REALPATH=../../lib/nss_user.so.1
+$(ROOT)/usr/lib/fm/libfmevent.so.1:=    REALPATH=../../../lib/fm/libfmevent.so.1
+$(ROOT)/usr/lib/fm/libfmevent.so:=      REALPATH=../../../lib/fm/libfmevent.so.1
+$(ROOT)/usr/lib/fm/llib-lfmevent.ln:=   REALPATH=../../../lib/fm/llib-lfmevent.ln
+$(ROOT)/usr/lib/fm/llib-lfmevent:=      REALPATH=../../../lib/fm/llib-lfmevent
 
 $(ROOT)/lib/$(MACH64)/libposix4.so.1:= \
 	REALPATH=librt.so.1
@@ -1405,6 +1411,12 @@
 	REALPATH=../../../lib/$(MACH64)/nss_nis.so.1
 $(ROOT)/usr/lib/$(MACH64)/nss_user.so.1:= \
 	REALPATH=../../../lib/$(MACH64)/nss_user.so.1
+$(ROOT)/usr/lib/fm/$(MACH64)/libfmevent.so.1:= \
+	REALPATH=../../../../lib/fm/$(MACH64)/libfmevent.so.1
+$(ROOT)/usr/lib/fm/$(MACH64)/libfmevent.so:= \
+	REALPATH=../../../../lib/fm/$(MACH64)/libfmevent.so.1
+$(ROOT)/usr/lib/fm/$(MACH64)/llib-lfmevent.ln:= \
+	REALPATH=../../../../lib/fm/$(MACH64)/llib-lfmevent.ln
 
 i386_SYM.USRLIB= \
 	/usr/lib/libfdisk.so \
@@ -1643,7 +1655,11 @@
 	/usr/lib/nss_dns.so.1 \
 	/usr/lib/nss_files.so.1 \
 	/usr/lib/nss_nis.so.1 \
-	/usr/lib/nss_user.so.1
+	/usr/lib/nss_user.so.1 \
+	/usr/lib/fm/libfmevent.so \
+	/usr/lib/fm/libfmevent.so.1 \
+	/usr/lib/fm/llib-lfmevent \
+	/usr/lib/fm/llib-lfmevent.ln
 
 sparcv9_SYM.USRLIB64= 
 
@@ -1826,7 +1842,10 @@
 	/usr/lib/$(MACH64)/nss_dns.so.1 \
 	/usr/lib/$(MACH64)/nss_files.so.1 \
 	/usr/lib/$(MACH64)/nss_nis.so.1 \
-	/usr/lib/$(MACH64)/nss_user.so.1
+	/usr/lib/$(MACH64)/nss_user.so.1 \
+	/usr/lib/fm/$(MACH64)/libfmevent.so \
+	/usr/lib/fm/$(MACH64)/libfmevent.so.1 \
+	/usr/lib/fm/$(MACH64)/llib-lfmevent.ln
 
 #
 # usr/src/Makefile uses INS.dir for any member of ROOTDIRS, the fact
--- a/usr/src/lib/fm/libfmevent/Makefile	Mon Aug 16 11:02:56 2010 +0530
+++ b/usr/src/lib/fm/libfmevent/Makefile	Mon Aug 16 08:39:24 2010 -0700
@@ -23,7 +23,17 @@
 #
 
 include ../../Makefile.lib
-include ../Makefile.lib
+
+# This library must install in /lib since it is a dependency of
+# svc.startd and may be required in early boot.  Thus we cannot
+# include ../Makefile.lib - instead we set ROOTFMHDRDIR and
+# ROOTFMHDRS and redefine ROOTLIBDIR and ROOTLIBDIR64 accordingly
+
+ROOTFMHDRDIR = $(ROOTHDRDIR)/fm
+ROOTFMHDRS   = $(FMHDRS:%=$(ROOTFMHDRDIR)/%)
+
+ROOTLIBDIR=     $(ROOTFS_LIBDIR)/fm
+ROOTLIBDIR64=   $(ROOTFS_LIBDIR)/fm/$(MACH64)
 
 FMHDRS = libfmevent.h libfmevent_ruleset.h
 HDRDIR = common
--- a/usr/src/lib/fm/libfmevent/Makefile.com	Mon Aug 16 11:02:56 2010 +0530
+++ b/usr/src/lib/fm/libfmevent/Makefile.com	Mon Aug 16 08:39:24 2010 -0700
@@ -34,7 +34,17 @@
 OBJECTS = $(LIBSRCS:%.c=%.o)
 
 include ../../../Makefile.lib
-include ../../Makefile.lib
+
+# This library must install in /lib/fm since it is a dependency of
+# svc.startd and may be required in early boot.  Thus we cannot
+# include ../Makefile.lib - instead we set ROOTFMHDRDIR and
+# ROOTFMHDRS and redefine ROOTLIBDIR and ROOTLIBDIR64 accordingly
+
+ROOTFMHDRDIR = $(ROOTHDRDIR)/fm
+ROOTFMHDRS   = $(FMHDRS:%=$(ROOTFMHDRDIR)/%)
+
+ROOTLIBDIR=     $(ROOTFS_LIBDIR)/fm
+ROOTLIBDIR64=   $(ROOTFS_LIBDIR)/fm/$(MACH64)
 
 SRCS = $(LIBSRCS:%.c=../common/%.c)
 LIBS = $(DYNLIB) $(LINTLIB)
@@ -48,8 +58,15 @@
 
 CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
 CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
-$(DYNLIB) := LDLIBS += -lumem -lnvpair -luutil -lsysevent -L$(ROOTLIBDIR) \
-	-ltopo -lc
+
+FMLIBDIR=usr/lib/fm
+$(BUILD64)FMLIBDIR64=usr/lib/fm/$(MACH64)
+
+$(DYNLIB) := LDLIBS += -lumem -lnvpair -luutil -lsysevent \
+	-L$(ROOT)/$(FMLIBDIR) -ltopo -lc
+
+$(BUILD64)$(DYNLIB) := LDLIBS64 += -lumem -lnvpair -luutil -lsysevent \
+	-L$(ROOT)/$(FMLIBDIR64) -ltopo -lc
 
 LINTFLAGS = -msux
 LINTFLAGS64 = -msux -m64
--- a/usr/src/pkg/manifests/service-fault-management.mf	Mon Aug 16 11:02:56 2010 +0530
+++ b/usr/src/pkg/manifests/service-fault-management.mf	Mon Aug 16 08:39:24 2010 -0700
@@ -57,12 +57,18 @@
 dir path=kernel/drv group=sys
 dir path=kernel/drv/$(ARCH64) group=sys
 #
+# lib dirs:
+#
+dir path=lib/fm variant.opensolaris.zone=__NODEFAULT
+dir path=lib/fm/$(ARCH64) variant.opensolaris.zone=__NODEFAULT
+#
 # Our service manifests are common to global and non-global zones
 #
 dir path=lib/svc/manifest/system group=sys \
     variant.opensolaris.zone=__NODEFAULT
 dir path=lib/svc/manifest/system/fm group=sys \
     variant.opensolaris.zone=__NODEFAULT
+
 #
 # usr dirs:
 #	- most are common to both global and non-global zones
@@ -257,6 +263,17 @@
 file path=kernel/drv/$(ARCH64)/fm group=sys
 $(i386_ONLY)file path=kernel/drv/fm group=sys
 file path=kernel/drv/fm.conf group=sys
+
+#
+# Some libraries need to be in lib for install
+#
+file path=lib/fm/$(ARCH64)/libfmevent.so.1 \
+    variant.opensolaris.zone=__NODEFAULT
+file path=lib/fm/$(ARCH64)/llib-lfmevent.ln \
+    variant.opensolaris.zone=__NODEFAULT
+file path=lib/fm/libfmevent.so.1 variant.opensolaris.zone=__NODEFAULT
+file path=lib/fm/llib-lfmevent variant.opensolaris.zone=__NODEFAULT
+file path=lib/fm/llib-lfmevent.ln variant.opensolaris.zone=__NODEFAULT
 #
 # Service manifests are common to both global and non-global zones
 #
@@ -303,8 +320,6 @@
     variant.opensolaris.zone=__NODEFAULT
 file path=usr/lib/fm/$(ARCH64)/libfmd_snmp.so.1 \
     variant.opensolaris.zone=__NODEFAULT
-file path=usr/lib/fm/$(ARCH64)/libfmevent.so.1 \
-    variant.opensolaris.zone=__NODEFAULT
 file path=usr/lib/fm/$(ARCH64)/libfmnotify.so.1 \
     variant.opensolaris.zone=__NODEFAULT
 $(sparc_ONLY)file path=usr/lib/fm/$(ARCH64)/libldom.so.1
@@ -329,8 +344,6 @@
     variant.opensolaris.zone=__NODEFAULT
 file path=usr/lib/fm/$(ARCH64)/llib-lfmd_snmp.ln \
     variant.opensolaris.zone=__NODEFAULT
-file path=usr/lib/fm/$(ARCH64)/llib-lfmevent.ln \
-    variant.opensolaris.zone=__NODEFAULT
 file path=usr/lib/fm/$(ARCH64)/llib-lfmnotify.ln \
     variant.opensolaris.zone=__NODEFAULT
 $(sparc_ONLY)file path=usr/lib/fm/$(ARCH64)/llib-lldom.ln
@@ -513,7 +526,6 @@
 file path=usr/lib/fm/libfmd_log.so.1 variant.opensolaris.zone=__NODEFAULT
 file path=usr/lib/fm/libfmd_msg.so.1 variant.opensolaris.zone=__NODEFAULT
 file path=usr/lib/fm/libfmd_snmp.so.1 variant.opensolaris.zone=__NODEFAULT
-file path=usr/lib/fm/libfmevent.so.1 variant.opensolaris.zone=__NODEFAULT
 file path=usr/lib/fm/libfmnotify.so.1 variant.opensolaris.zone=__NODEFAULT
 $(sparc_ONLY)file path=usr/lib/fm/libldom.so.1
 $(sparc_ONLY)file path=usr/lib/fm/libmdesc.so.1
@@ -536,8 +548,6 @@
 file path=usr/lib/fm/llib-lfmd_msg.ln variant.opensolaris.zone=__NODEFAULT
 file path=usr/lib/fm/llib-lfmd_snmp variant.opensolaris.zone=__NODEFAULT
 file path=usr/lib/fm/llib-lfmd_snmp.ln variant.opensolaris.zone=__NODEFAULT
-file path=usr/lib/fm/llib-lfmevent variant.opensolaris.zone=__NODEFAULT
-file path=usr/lib/fm/llib-lfmevent.ln variant.opensolaris.zone=__NODEFAULT
 file path=usr/lib/fm/llib-lfmnotify variant.opensolaris.zone=__NODEFAULT
 file path=usr/lib/fm/llib-lfmnotify.ln variant.opensolaris.zone=__NODEFAULT
 $(sparc_ONLY)file path=usr/lib/fm/llib-lldom
@@ -851,6 +861,15 @@
     name="Fault Management Daemon and Utilities (Root)"
 license cr_Sun license=cr_Sun
 license lic_CDDL license=lic_CDDL
+
+#
+# libraries .so symlinks in lib
+#
+link path=lib/fm/$(ARCH64)/libfmevent.so target=./libfmevent.so.1 \
+    variant.opensolaris.zone=__NODEFAULT
+link path=lib/fm/libfmevent.so target=libfmevent.so.1 \
+    variant.opensolaris.zone=__NODEFAULT
+
 #
 #	64-bit .so symlinks
 #
@@ -868,7 +887,11 @@
     variant.opensolaris.zone=__NODEFAULT
 link path=usr/lib/fm/$(ARCH64)/libfmd_snmp.so target=./libfmd_snmp.so.1 \
     variant.opensolaris.zone=__NODEFAULT
-link path=usr/lib/fm/$(ARCH64)/libfmevent.so target=./libfmevent.so.1 \
+link path=usr/lib/fm/$(ARCH64)/libfmevent.so \
+    target=../../../../lib/fm/$(ARCH64)/libfmevent.so.1 \
+    variant.opensolaris.zone=__NODEFAULT
+link path=usr/lib/fm/$(ARCH64)/libfmevent.so.1 \
+    target=../../../../lib/fm/$(ARCH64)/libfmevent.so.1 \
     variant.opensolaris.zone=__NODEFAULT
 link path=usr/lib/fm/$(ARCH64)/libfmnotify.so target=./libfmnotify.so.1 \
     variant.opensolaris.zone=__NODEFAULT
@@ -877,6 +900,8 @@
 link path=usr/lib/fm/$(ARCH64)/libseslog.so target=./libseslog.so.1
 link path=usr/lib/fm/$(ARCH64)/libtopo.so target=libtopo.so.1 \
     variant.opensolaris.zone=__NODEFAULT
+link path=usr/lib/fm/$(ARCH64)/llib-lfmevent.ln \
+    target=../../../../lib/fm/$(ARCH64)/llib-lfmevent.ln
 #
 #	32-bit .so symlinks
 #
@@ -894,7 +919,9 @@
     variant.opensolaris.zone=__NODEFAULT
 link path=usr/lib/fm/libfmd_snmp.so target=libfmd_snmp.so.1 \
     variant.opensolaris.zone=__NODEFAULT
-link path=usr/lib/fm/libfmevent.so target=libfmevent.so.1 \
+link path=usr/lib/fm/libfmevent.so target=../../../lib/fm/libfmevent.so.1 \
+    variant.opensolaris.zone=__NODEFAULT
+link path=usr/lib/fm/libfmevent.so.1 target=../../../lib/fm/libfmevent.so.1 \
     variant.opensolaris.zone=__NODEFAULT
 link path=usr/lib/fm/libfmnotify.so target=libfmnotify.so.1 \
     variant.opensolaris.zone=__NODEFAULT
@@ -903,6 +930,8 @@
 link path=usr/lib/fm/libseslog.so target=libseslog.so.1
 link path=usr/lib/fm/libtopo.so target=libtopo.so.1 \
     variant.opensolaris.zone=__NODEFAULT
+link path=usr/lib/fm/llib-lfmevent target=../../../lib/fm/llib-lfmevent
+link path=usr/lib/fm/llib-lfmevent.ln target=../../../lib/fm/llib-lfmevent.ln
 #
 # symlinks for fmd plugins for particular platforms
 #