21613616 oracle-solaris_provider builds should come from the github repo we publish (fix mismerge)
authorShawn Ferry <shawn.ferry@oracle.com>
Thu, 11 Feb 2016 16:08:54 -0500
changeset 5443 51abc0fb79b7
parent 5442 f02b645d5dcb
child 5444 9f72ce29e7f4
21613616 oracle-solaris_provider builds should come from the github repo we publish (fix mismerge)
components/ruby/puppet-modules/oracle-solaris_providers/Makefile
--- a/components/ruby/puppet-modules/oracle-solaris_providers/Makefile	Thu Feb 11 14:03:19 2016 -0800
+++ b/components/ruby/puppet-modules/oracle-solaris_providers/Makefile	Thu Feb 11 16:08:54 2016 -0500
@@ -20,66 +20,49 @@
 #
 # Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 #
-include ../../../make-rules/shared-macros.mk
+include ../../../../make-rules/shared-macros.mk
+
+
+GIT_REPO= https://github.com/oraclesolaris/puppet-solaris_providers
+GIT_BRANCH= v1.0.2
+GIT_COMMIT_ID= c4b6092
+GIT_HASH=  sha256:12b9c1a169e95494dc2c8463fecafcdf4875642bc0970a2a59fdbc4cfa09df50
 
-COMPONENT_NAME=		puppet
-COMPONENT_VERSION=	3.6.2
-COMPONENT_PROJECT_URL=	http://puppetlabs.com/
-COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
-COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
-COMPONENT_ARCHIVE_HASH=	\
-    sha256:9114c63108c58e39db84937cb8f7e1add3dcbaa08fd730f631de6a7f64a3c360
-COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)downloads/puppet/$(COMPONENT_ARCHIVE)
+COMPONENT_NAME=		puppet-solaris_providers
+COMPONENT_VERSION=	1.0.2
+COMPONENT_PROJECT_URL=	https://github.com/oraclesolaris/puppet-solaris_providers
+# github releases provide direct archive downloads
+COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/archive/$(GIT_BRANCH).tar.gz
+# Construct our own SRC instead of using the default with GIT_COMMIT_ID
+# archive from github strips leading v from release for vN named release tags
+COMPONENT_SRC=$(COMPONENT_NAME)-$(shell echo $(GIT_BRANCH) | sed -e 's/v//')
 COMPONENT_BUGDB=	utility/puppet
 
 TPNO=			18128
 
 include $(WS_MAKE_RULES)/prep.mk
-include $(WS_MAKE_RULES)/install.rb.mk
+include $(WS_MAKE_RULES)/puppetmodule.mk
 include $(WS_MAKE_RULES)/ips.mk
 
-# puppet requires facter and hiera as part of the install phase 
-COMPONENT_INSTALL_ENV	+= RUBYLIB="$(COMPONENT_DIR)/../facter/build/$(MACH64)/lib:$(COMPONENT_DIR)/../hiera/build/$(MACH64)/lib"
 
-../facter/build/%/.installed:
-	(cd ../facter ; $(GMAKE) install)
-
-../hiera/build/%/.installed:
-	(cd ../hiera ; $(GMAKE) install)
-
-# set the bindir to /usr/sbin
-INSTALL_RB_BINDIR_OPTION =	--bindir=$(USRSBINDIR)
-
-# --sbindir option not supported by Puppet install.rb
-INSTALL_RB_SBINDIR_OPTION =
+MODULE_NAME =	solaris_providers
 
 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
 
-# common targets
-build:		$(BUILD_64)
-	# Ruby extension for auditing
-	(cd ext; $(RUBY) extconf.rb; $(GMAKE))
-
-# make sure facter and hiera are installed first
-install:	../facter/build/$(MACH64)/.installed ../hiera/build/$(MACH64)/.installed $(INSTALL_64)
+# generate manifest for files supplied from git repo on demand
+oracle-solaris_providers-github.frag: install
+	$(PKGSEND) generate $(PROTO_DIR)/etc/puppet/modules/ | \
+		$(GSED) -e 's/\(file\|dir\).*path=/\1 path=/' | \
+		$(PKGFMT) > oracle-solaris_providers-github.frag
 
-clean::
-	@if [ -f ext/Makefile ]; then \
-		(cd ext; $(GMAKE) clean; $(RM) Makefile) \
-	fi
+# common targets
+build: $(BUILD_NO_ARCH)
 
-# puppet requires the installation of the following rubygems to run
-# the unittests:  rspec rspec-expectations mocha rack rgen
-# Disable the tests until these rubygems are available.
+install:	$(INSTALL_NO_ARCH)
+
 test:		$(NO_TESTS)
 
 system-test:    $(NO_TESTS)
 
-
-REQUIRED_PACKAGES += runtime/ruby-19
-REQUIRED_PACKAGES += shell/ksh93
-REQUIRED_PACKAGES += system/core-os
-REQUIRED_PACKAGES += system/library
-REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
-REQUIRED_PACKAGES += system/library/math
-REQUIRED_PACKAGES += system/network
+PKG_PROTO_DIRS += files
+REQUIRED_PACKAGES += system/management/puppet