Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-cloud / recipes-support / puppet / puppet_4.8.2.bb
1
2 SUMMARY = "Open source Puppet is a configuration management system"
3 HOMEPAGE = "https://puppetlabs.com/puppet/puppet-open-source"
4 LICENSE = "Apache-2.0"
5 LIC_FILES_CHKSUM = "file://LICENSE;md5=7c9045ec00cc0d6b6e0e09ee811da4a0"
6
7 SRC_URI = " \
8     https://downloads.puppetlabs.com/puppet/puppet-${PV}.tar.gz \
9     file://${BPN}/${PV}/add_puppet_gemspec.patch \
10     file://${BPN}/${PV}/puppet-updates-for-poky-stx.patch \
11     file://${BPN}/${PV}/puppet-poky-dnf.patch \
12     file://${BPN}/${PV}/puppet.conf \
13     file://${BPN}/${PV}/puppet.init \
14     file://${BPN}/${PV}/puppet.service \
15 "
16 SRC_URI[md5sum] = "095ef8bddd94dd1ee0562a3c816ab05f"
17 SRC_URI[sha256sum] = "fc71ca0be64b4b1282e0064b8fbf115c547cb87ca6b209da56e1b9569567404a"
18
19 inherit ruby update-rc.d systemd
20 inherit openssl10
21
22 DEPENDS += " \
23         ruby \
24         facter \
25         libffi \
26 "
27
28 RDEPENDS_${PN} += " \
29         ruby \
30         facter \
31         ruby-shadow \
32         bash \
33 "
34
35 RUBY_INSTALL_GEMS = "puppet-${PV}.gem"
36
37 INITSCRIPT_NAME = "${BPN}"
38 INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
39
40 SYSTEMD_AUTO_ENABLE = "enable"
41 SYSTEMD_PACKAGES = "${PN}"
42 SYSTEMD_SERVICE_${PN} = "${BPN}.service"
43
44 do_install_append() {
45     install -d ${D}${sysconfdir}/puppet
46     install -d ${D}${sysconfdir}/puppet/manifests
47     install -d ${D}${sysconfdir}/puppet/modules
48
49     install -m 655 ${S}/conf/auth.conf ${D}${sysconfdir}/puppet/
50     install -m 655 ${S}/conf/fileserver.conf ${D}${sysconfdir}/puppet/
51     install -m 655 ${S}/conf/environment.conf ${D}${sysconfdir}/puppet/
52     install -m 655 ${WORKDIR}/${BPN}/${PV}/puppet.conf ${D}${sysconfdir}/puppet/
53
54     install -d ${D}${systemd_unitdir}/system
55     install -m 0644 ${WORKDIR}/${BPN}/${PV}/puppet.service ${D}${systemd_unitdir}/system
56
57     install -d ${D}${sysconfdir}/init.d
58     install -m 0755 ${WORKDIR}/${BPN}/${PV}/puppet.init ${D}${sysconfdir}/init.d/puppet
59
60     # Install puppet environment and moudlepath
61
62     install -m 0755 -d ${D}/${sysconfdir}/puppetlabs/code/environments/production
63     echo "modulepath = /usr/share/puppet/modules:/usr/share/openstack-puppet/modules" >  \
64         ${D}/${sysconfdir}/puppetlabs/code/environments/production/environment.conf
65 }