2 ## Copyright (C) 2019 Wind River Systems, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 SUMMARY = "Open source Puppet is a configuration management system"
17 HOMEPAGE = "https://puppetlabs.com/puppet/puppet-open-source"
18 LICENSE = "Apache-2.0"
19 LIC_FILES_CHKSUM = "file://LICENSE;md5=7c9045ec00cc0d6b6e0e09ee811da4a0"
22 https://downloads.puppetlabs.com/puppet/puppet-${PV}.tar.gz \
23 file://${BPN}/${PV}/add_puppet_gemspec.patch \
24 file://${BPN}/${PV}/puppet-updates-for-poky-stx.patch \
25 file://${BPN}/${PV}/puppet-poky-dnf.patch \
26 file://${BPN}/${PV}/puppet.conf \
27 file://${BPN}/${PV}/puppet.init \
28 file://${BPN}/${PV}/puppet.service \
30 SRC_URI[md5sum] = "095ef8bddd94dd1ee0562a3c816ab05f"
31 SRC_URI[sha256sum] = "fc71ca0be64b4b1282e0064b8fbf115c547cb87ca6b209da56e1b9569567404a"
33 inherit ruby update-rc.d systemd
49 RUBY_INSTALL_GEMS = "puppet-${PV}.gem"
51 INITSCRIPT_NAME = "${BPN}"
52 INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
54 SYSTEMD_AUTO_ENABLE = "enable"
55 SYSTEMD_PACKAGES = "${PN}"
56 SYSTEMD_SERVICE_${PN} = "${BPN}.service"
59 install -d ${D}${sysconfdir}/puppet
60 install -d ${D}${sysconfdir}/puppet/manifests
61 install -d ${D}${sysconfdir}/puppet/modules
63 install -m 655 ${S}/conf/auth.conf ${D}${sysconfdir}/puppet/
64 install -m 655 ${S}/conf/fileserver.conf ${D}${sysconfdir}/puppet/
65 install -m 655 ${S}/conf/environment.conf ${D}${sysconfdir}/puppet/
66 install -m 655 ${WORKDIR}/${BPN}/${PV}/puppet.conf ${D}${sysconfdir}/puppet/
68 install -d ${D}${systemd_unitdir}/system
69 install -m 0644 ${WORKDIR}/${BPN}/${PV}/puppet.service ${D}${systemd_unitdir}/system
71 install -d ${D}${sysconfdir}/init.d
72 install -m 0755 ${WORKDIR}/${BPN}/${PV}/puppet.init ${D}${sysconfdir}/init.d/puppet
74 # Install puppet environment and moudlepath
76 install -m 0755 -d ${D}/${sysconfdir}/puppetlabs/code/environments/production
77 echo "modulepath = /usr/share/puppet/modules:/usr/share/openstack-puppet/modules" > \
78 ${D}/${sysconfdir}/puppetlabs/code/environments/production/environment.conf