diff options
author | Toomas Soome <tsoome@me.com> | 2018-06-03 10:26:18 +0300 |
---|---|---|
committer | Hans Rosenfeld <hans.rosenfeld@joyent.com> | 2018-06-04 10:34:56 +0200 |
commit | a19d2449c7801a22d6c8370a965dab3d16c77925 (patch) | |
tree | 58d018d0fb9a86d14e36084e524ff2b56a4ac181 /usr/src | |
parent | 6cfa0a7079eb1baa0a742f1e4def7cdabc8dcdab (diff) | |
download | illumos-gate-a19d2449c7801a22d6c8370a965dab3d16c77925.tar.gz |
9538 rcapd make install fails due to race in subdirs (fix isaexec)
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Yuri Pankov <yuripv@yuripv.net>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/rcap/rcapd/Makefile | 91 | ||||
-rw-r--r-- | usr/src/cmd/rcap/rcapd/Makefile.ins | 34 | ||||
-rw-r--r-- | usr/src/cmd/rcap/rcapd/Makefile.rcapd | 106 | ||||
-rw-r--r-- | usr/src/cmd/rcap/rcapd/amd64/Makefile | 33 | ||||
-rw-r--r-- | usr/src/cmd/rcap/rcapd/i386/Makefile | 32 | ||||
-rw-r--r-- | usr/src/cmd/rcap/rcapd/sparc/Makefile | 32 | ||||
-rw-r--r-- | usr/src/cmd/rcap/rcapd/sparcv9/Makefile | 33 | ||||
-rw-r--r-- | usr/src/pkg/manifests/service-resource-cap.mf | 4 |
8 files changed, 68 insertions, 297 deletions
diff --git a/usr/src/cmd/rcap/rcapd/Makefile b/usr/src/cmd/rcap/rcapd/Makefile index 36d36882f9..77f4d6812e 100644 --- a/usr/src/cmd/rcap/rcapd/Makefile +++ b/usr/src/cmd/rcap/rcapd/Makefile @@ -19,45 +19,88 @@ # CDDL HEADER END # # -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -MANIFEST = rcap.xml +include ../../Makefile.cmd +include ../../Makefile.cmd.64 -include ../../Makefile.cmd +.KEEP_STATE: + +PROG = rcapd +ROOTUSRLIBRCAP = $(ROOT)/usr/lib/rcap +ROOTUSRLIBRCAPPROG = $(ROOTUSRLIBRCAP)/$(PROG) -ROOTMANIFESTDIR = $(ROOTSVCSYSTEM) +COMMON_DIR= ../common +MANIFEST = rcap.xml +ROOTMANIFESTDIR = $(ROOTSVCSYSTEM) $(ROOTSVCSYSTEM)/rcap.xml := FILEMODE = 0444 -.KEEP_STATE: -SUBDIRS = $(MACH) -$(BUILD64)SUBDIRS += $(MACH64) +SRCS = rcapd_main.c \ + rcapd_collection.c \ + rcapd_collection_project.c \ + rcapd_collection_zone.c \ + rcapd_mapping.c \ + rcapd_rfd.c \ + rcapd_scanner.c \ + rcapd_stat.c \ + utils.c + +LINTSRCS = rcapd_main.c \ + rcapd_collection.c \ + rcapd_collection_project.c \ + rcapd_collection_zone.c \ + rcapd_mapping.c \ + rcapd_rfd.c \ + rcapd_scanner.c \ + $(COMMON_DIR)/rcapd_stat.c \ + $(COMMON_DIR)/utils.c + +$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG +CPPFLAGS += -DDEBUG_MSG +CPPFLAGS += -I$(COMMON_DIR) +LDLIBS += -lkstat -lproc -lproject -lzonecfg -lumem -lscf +LDLIBS += $(EXTRA_LDLIBS) + +LINTFLAGS64 += -u + +OBJS = $(SRCS:%.c=%.o) rcapd_conf.o + +POFILES = $(OBJS:%.o=%.po) +POFILE = $(PROG).po + +CLOBBERFILES += $(POFILES) $(POFILE) + +include ../Makefile.com + +.NO_PARALLEL: +.PARALLEL: $(OBJS) -MSGSUBDIRS= $(MACH) +all: $(PROG) -all := TARGET = all -clean := TARGET = clean -clobber := TARGET = clobber -install := TARGET = install -lint := TARGET = lint -_msg := TARGET = _msg +install: all $(ROOTUSRLIBRCAPPROG) $(ROOTUSRLIBRCAP) $(ROOTMANIFEST) -include Makefile.ins +$(PROG): $(OBJS) + $(LINK.c) $(OBJS) -o $@ $(LDLIBS) + $(POST_PROCESS) -all clean clobber lint: $(SUBDIRS) +check: $(CHKMANIFEST) -install: all $(SUBDIRS) $(ROOTMANIFEST) $(ISAEXEC) - -$(RM) $(ROOTUSRLIBRCAPPROG) - $(LN) $(ISAEXEC) $(ROOTUSRLIBRCAPPROG) +clean: + $(RM) $(OBJS) + $(RM) rcapd_conf.c -check: $(CHKMANIFEST) +lint: + $(LINT.c) $(LINTSRCS) $(LDLIBS) -_msg: $(MSGSUBDIRS) +$(POFILE): $(POFILES) + $(RM) $@ + $(CAT) $(POFILES) > $@ -$(SUBDIRS): FRC - @cd $@; pwd; VERSION='$(VERSION)' $(MAKE) $(TARGET) +$(ROOTUSRLIBRCAP)/%: $(ROOTUSRLIBRCAP) % + $(INS.file) -FRC: +include ../../Makefile.targ diff --git a/usr/src/cmd/rcap/rcapd/Makefile.ins b/usr/src/cmd/rcap/rcapd/Makefile.ins deleted file mode 100644 index 97c85e98d8..0000000000 --- a/usr/src/cmd/rcap/rcapd/Makefile.ins +++ /dev/null @@ -1,34 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# Copyright 2018 Toomas Soome <tsoome@me.com> -# - -PROG = rcapd -ROOTUSRLIBRCAP = $(ROOT)/usr/lib/rcap -ROOTUSRLIBRCAP32 = $(ROOTUSRLIBRCAP)/$(MACH32) -ROOTUSRLIBRCAP64 = $(ROOTUSRLIBRCAP)/$(MACH64) -ROOTUSRLIBRCAPPROG = $(ROOTUSRLIBRCAP)/$(PROG) -ROOTUSRLIBRCAPPROG32 = $(ROOTUSRLIBRCAP32)/$(PROG) -ROOTUSRLIBRCAPPROG64 = $(ROOTUSRLIBRCAP64)/$(PROG) diff --git a/usr/src/cmd/rcap/rcapd/Makefile.rcapd b/usr/src/cmd/rcap/rcapd/Makefile.rcapd deleted file mode 100644 index 975ff1388a..0000000000 --- a/usr/src/cmd/rcap/rcapd/Makefile.rcapd +++ /dev/null @@ -1,106 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -.KEEP_STATE: -.SUFFIXES: - -# -# subdirs must define COMMON_DIR and include Makefile.com -# - -# For PROG and ROOT* variables -include ../Makefile.ins - -SRCS = rcapd_main.c \ - rcapd_collection.c \ - rcapd_collection_project.c \ - rcapd_collection_zone.c \ - rcapd_mapping.c \ - rcapd_rfd.c \ - rcapd_scanner.c \ - rcapd_stat.c \ - utils.c - -LINTSRCS = ../rcapd_main.c \ - ../rcapd_collection.c \ - ../rcapd_collection_project.c \ - ../rcapd_collection_zone.c \ - ../rcapd_mapping.c \ - ../rcapd_rfd.c \ - ../rcapd_scanner.c \ - $(COMMON_DIR)/rcapd_stat.c \ - $(COMMON_DIR)/utils.c - -$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG -CPPFLAGS += -DDEBUG_MSG -CPPFLAGS += -I$(COMMON_DIR) -LDLIBS += -lkstat -lproc -lproject -lzonecfg -lumem -lscf -LDLIBS += $(EXTRA_LDLIBS) - -LINTFLAGS += -u -LINTFLAGS64 += -u - -OBJS = $(SRCS:%.c=%.o) rcapd_conf.o - -POFILES = $(OBJS:%.o=%.po) -POFILE = $(PROG).po - -CLOBBERFILES += $(POFILES) $(POFILE) - -.NO_PARALLEL: -.PARALLEL: $(OBJS) - -all: $(PROG) - -$(PROG): $(OBJS) - $(LINK.c) $(OBJS) -o $@ $(LDLIBS) - $(POST_PROCESS) - -%.o: ../%.c - $(COMPILE.c) $< -%.po: ../%.c - $(COMPILE.cpp) $< > $<.i - $(BUILD.po) - - -clean: - $(RM) $(OBJS) - $(RM) rcapd_conf.c - -lint: - $(LINT.c) $(LINTSRCS) $(LDLIBS) - -$(POFILE): $(POFILES) - $(RM) $@ - $(CAT) $(POFILES) > $@ - -$(ROOTUSRLIBRCAP)/%: $(ROOTUSRLIBRCAP) % - $(INS.file) -$(ROOTUSRLIBRCAP32)/%: $(ROOTUSRLIBRCAP32) % - $(INS.file) -$(ROOTUSRLIBRCAP64)/%: $(ROOTUSRLIBRCAP64) % - $(INS.file) - -include ../../../Makefile.targ diff --git a/usr/src/cmd/rcap/rcapd/amd64/Makefile b/usr/src/cmd/rcap/rcapd/amd64/Makefile deleted file mode 100644 index 217cce4e25..0000000000 --- a/usr/src/cmd/rcap/rcapd/amd64/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -include ../../../Makefile.cmd -include ../../../Makefile.cmd.64 -COMMON_DIR= ../../common # for Makefile.com -include ../Makefile.rcapd -include ../../Makefile.com - -install: all $(ROOTUSRLIBRCAPPROG64) $(ROOTUSRLIBRCAP) diff --git a/usr/src/cmd/rcap/rcapd/i386/Makefile b/usr/src/cmd/rcap/rcapd/i386/Makefile deleted file mode 100644 index 1cb37d65f8..0000000000 --- a/usr/src/cmd/rcap/rcapd/i386/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -include ../../../Makefile.cmd -COMMON_DIR= ../../common # for Makefile.com -include ../Makefile.rcapd -include ../../Makefile.com - -install: all $(ROOTUSRLIBRCAPPROG32) $(ROOTUSRLIBRCAP) diff --git a/usr/src/cmd/rcap/rcapd/sparc/Makefile b/usr/src/cmd/rcap/rcapd/sparc/Makefile deleted file mode 100644 index 1cb37d65f8..0000000000 --- a/usr/src/cmd/rcap/rcapd/sparc/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -include ../../../Makefile.cmd -COMMON_DIR= ../../common # for Makefile.com -include ../Makefile.rcapd -include ../../Makefile.com - -install: all $(ROOTUSRLIBRCAPPROG32) $(ROOTUSRLIBRCAP) diff --git a/usr/src/cmd/rcap/rcapd/sparcv9/Makefile b/usr/src/cmd/rcap/rcapd/sparcv9/Makefile deleted file mode 100644 index aedc9bb793..0000000000 --- a/usr/src/cmd/rcap/rcapd/sparcv9/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -include ../../../Makefile.cmd -include ../../../Makefile.cmd.64 -COMMON_DIR= ../../common # for Makefile.com -include ../Makefile.rcapd -include ../../Makefile.com - -install: all $(ROOTUSRLIBRCAPPROG64) $(ROOTUSRLIBRCAP) diff --git a/usr/src/pkg/manifests/service-resource-cap.mf b/usr/src/pkg/manifests/service-resource-cap.mf index 49302f476e..24e7396a78 100644 --- a/usr/src/pkg/manifests/service-resource-cap.mf +++ b/usr/src/pkg/manifests/service-resource-cap.mf @@ -43,13 +43,11 @@ dir path=usr/share/man/man1 dir path=usr/share/man/man1m file path=lib/svc/manifest/system/rcap.xml group=sys mode=0444 file path=usr/bin/rcapstat mode=0555 -file path=usr/lib/rcap/$(ARCH32)/rcapd mode=0555 -file path=usr/lib/rcap/$(ARCH64)/rcapd mode=0555 +file path=usr/lib/rcap/rcapd mode=0555 file path=usr/sbin/rcapadm mode=0555 file path=usr/share/man/man1/rcapstat.1 file path=usr/share/man/man1m/rcapadm.1m file path=usr/share/man/man1m/rcapd.1m -hardlink path=usr/lib/rcap/rcapd target=../isaexec legacy pkg=SUNWrcapr desc="Solaris Resource Capping Daemon (Root)" \ name="Solaris Resource Capping Daemon (Root)" legacy pkg=SUNWrcapu desc="Solaris Resource Capping Daemon (Usr)" \ |