puppet-agent-1.8.2.ebuild 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils systemd unpacker user
  5. DESCRIPTION="general puppet client utils along with mcollective hiera and facter"
  6. HOMEPAGE="https://puppetlabs.com/"
  7. SRC_BASE="http://apt.puppetlabs.com/pool/xenial/PC1/${PN:0:1}/${PN}/${PN}_${PV}-1xenial"
  8. SRC_URI="
  9. amd64? ( ${SRC_BASE}_amd64.deb )
  10. x86? ( ${SRC_BASE}_i386.deb )
  11. "
  12. LICENSE="Apache-2.0"
  13. SLOT="0"
  14. KEYWORDS="amd64 x86"
  15. IUSE="puppetdb selinux"
  16. RESTRICT="strip"
  17. CDEPEND="!app-admin/augeas
  18. !app-admin/mcollective
  19. !app-admin/puppet
  20. !dev-ruby/hiera
  21. !dev-ruby/facter
  22. !app-emulation/virt-what"
  23. DEPEND="
  24. ${CDEPEND}"
  25. RDEPEND="${CDEPEND}
  26. app-portage/eix
  27. sys-apps/dmidecode
  28. selinux? (
  29. sys-libs/libselinux[ruby]
  30. sec-policy/selinux-puppet
  31. )
  32. puppetdb? ( >=dev-ruby/puppetdb-termini-3.1.0 )"
  33. S=${WORKDIR}
  34. QA_PREBUILT="
  35. /opt/puppetlabs/puppet
  36. /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/2.1.0/x86_64-linux/*
  37. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/mathn/*
  38. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/io/*
  39. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/dl/*
  40. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/racc/*
  41. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/enc/*
  42. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/json/ext/*
  43. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/rbconfig/*
  44. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/digest/*
  45. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/*
  46. /opt/puppetlabs/puppet/lib/engines/*
  47. /opt/puppetlabs/puppet/lib/virt-what/*
  48. /opt/puppetlabs/puppet/lib/*
  49. /opt/puppetlabs/puppet/bin/*"
  50. pkg_setup() {
  51. enewgroup puppet
  52. enewuser puppet -1 -1 /var/run/puppet puppet
  53. }
  54. src_install() {
  55. # conf.d
  56. doconfd etc/default/puppet
  57. doconfd etc/default/mcollective
  58. doconfd etc/default/pxp-agent
  59. # logrotate.d
  60. insinto /etc/logrotate.d
  61. doins etc/logrotate.d/mcollective
  62. doins etc/logrotate.d/pxp-agent
  63. # puppet itself
  64. insinto /etc/puppetlabs
  65. doins -r etc/puppetlabs/*
  66. # logdir for systemd
  67. dodir var/log/puppetlabs/puppet/
  68. fperms 0750 var/log/puppetlabs/puppet/
  69. # the rest
  70. insinto /opt
  71. dodir opt/puppetlabs/puppet/cache
  72. doins -r opt/*
  73. fperms 0750 /opt/puppetlabs/puppet/cache
  74. # init
  75. newinitd "${FILESDIR}/puppet.initd" puppet
  76. newinitd "${FILESDIR}/mcollective.initd" mcollective
  77. systemd_dounit lib/systemd/system/puppet.service
  78. systemd_dounit lib/systemd/system/mcollective.service
  79. systemd_dounit lib/systemd/system/pxp-agent.service
  80. systemd_newtmpfilesd "${FILESDIR}/puppet-agent.conf.tmpfilesd" puppet-agent.conf
  81. # symlinks
  82. chmod 0755 -R "${D}/opt/puppetlabs/puppet/bin/"
  83. chmod 0755 "${D}//opt/puppetlabs/puppet/lib/virt-what/virt-what-cpuid-helper"
  84. dosym /opt/puppetlabs/bin/facter /usr/bin/facter
  85. dosym /opt/puppetlabs/bin/hiera /usr/bin/hiera
  86. dosym /opt/puppetlabs/bin/mco /usr/bin/mco
  87. dosym /opt/puppetlabs/bin/puppet /usr/bin/puppet
  88. dosym /opt/puppetlabs/puppet/bin/mcollectived /usr/sbin/mcollectived
  89. dosym /opt/puppetlabs/puppet/bin/virt-what /usr/bin/virt-what
  90. dosym /opt/puppetlabs/puppet/bin/augparse /usr/bin/augparse
  91. dosym /opt/puppetlabs/puppet/bin/augtool /usr/bin/augtool
  92. dosym /opt/puppetlabs/puppet/bin/extlookup2hiera /usr/bin/extlookup2hiera
  93. }