build_inf.sh: change the protocal for github repo
[pti/rtp.git] / meta-stx / recipes-support / puppet / puppet_4.8.2.bb
1 #
2 ## Copyright (C) 2019 Wind River Systems, Inc.
3 #
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
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15
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"
20
21 SRC_URI = " \
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 \
29 "
30 SRC_URI[md5sum] = "095ef8bddd94dd1ee0562a3c816ab05f"
31 SRC_URI[sha256sum] = "fc71ca0be64b4b1282e0064b8fbf115c547cb87ca6b209da56e1b9569567404a"
32
33 inherit ruby update-rc.d systemd
34 inherit openssl10
35
36 DEPENDS += " \
37         ruby \
38         facter \
39         libffi \
40 "
41
42 RDEPENDS_${PN} += " \
43         ruby \
44         facter \
45         ruby-shadow \
46         bash \
47 "
48
49 RUBY_INSTALL_GEMS = "puppet-${PV}.gem"
50
51 INITSCRIPT_NAME = "${BPN}"
52 INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
53
54 SYSTEMD_AUTO_ENABLE = "enable"
55 SYSTEMD_PACKAGES = "${PN}"
56 SYSTEMD_SERVICE_${PN} = "${BPN}.service"
57
58 do_install_append() {
59     install -d ${D}${sysconfdir}/puppet
60     install -d ${D}${sysconfdir}/puppet/manifests
61     install -d ${D}${sysconfdir}/puppet/modules
62
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/
67
68     install -d ${D}${systemd_unitdir}/system
69     install -m 0644 ${WORKDIR}/${BPN}/${PV}/puppet.service ${D}${systemd_unitdir}/system
70
71     install -d ${D}${sysconfdir}/init.d
72     install -m 0755 ${WORKDIR}/${BPN}/${PV}/puppet.init ${D}${sysconfdir}/init.d/puppet
73
74     # Install puppet environment and moudlepath
75
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
79 }