puppet-agent-1.8.3-r2.ebuild 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. sys-libs/glibc
  29. >=sys-libs/readline-6.0
  30. <sys-libs/readline-7.0
  31. selinux? (
  32. sys-libs/libselinux[ruby]
  33. sec-policy/selinux-puppet
  34. )
  35. puppetdb? ( >=dev-ruby/puppetdb-termini-3.1.0 )"
  36. S=${WORKDIR}
  37. QA_PREBUILT="
  38. /opt/puppetlabs/puppet
  39. /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/2.1.0/x86_64-linux/*
  40. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/mathn/*
  41. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/io/*
  42. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/dl/*
  43. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/racc/*
  44. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/enc/*
  45. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/json/ext/*
  46. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/rbconfig/*
  47. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/digest/*
  48. /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/*
  49. /opt/puppetlabs/puppet/lib/engines/*
  50. /opt/puppetlabs/puppet/lib/virt-what/*
  51. /opt/puppetlabs/puppet/lib/*
  52. /opt/puppetlabs/puppet/bin/*"
  53. pkg_setup() {
  54. enewgroup puppet
  55. enewuser puppet -1 -1 /var/run/puppet puppet
  56. }
  57. src_install() {
  58. # conf.d
  59. doconfd etc/default/puppet
  60. doconfd etc/default/mcollective
  61. doconfd etc/default/pxp-agent
  62. # logrotate.d
  63. insinto /etc/logrotate.d
  64. doins etc/logrotate.d/mcollective
  65. doins etc/logrotate.d/pxp-agent
  66. # puppet itself
  67. insinto /etc/puppetlabs
  68. doins -r etc/puppetlabs/*
  69. # logdir for systemd
  70. dodir var/log/puppetlabs/puppet/
  71. fperms 0750 var/log/puppetlabs/puppet/
  72. # the rest
  73. insinto /opt
  74. dodir opt/puppetlabs/puppet/cache
  75. doins -r opt/*
  76. fperms 0750 /opt/puppetlabs/puppet/cache
  77. # init
  78. newinitd "${FILESDIR}/puppet.initd" puppet
  79. newinitd "${FILESDIR}/mcollective.initd" mcollective
  80. systemd_dounit lib/systemd/system/puppet.service
  81. systemd_dounit lib/systemd/system/mcollective.service
  82. systemd_dounit lib/systemd/system/pxp-agent.service
  83. systemd_newtmpfilesd "${FILESDIR}/puppet-agent.conf.tmpfilesd" puppet-agent.conf
  84. # symlinks
  85. chmod 0755 -R "${D}/opt/puppetlabs/puppet/bin/"
  86. chmod 0755 "${D}//opt/puppetlabs/puppet/lib/virt-what/virt-what-cpuid-helper"
  87. dosym /opt/puppetlabs/bin/facter /usr/bin/facter
  88. dosym /opt/puppetlabs/bin/hiera /usr/bin/hiera
  89. dosym /opt/puppetlabs/bin/mco /usr/bin/mco
  90. dosym /opt/puppetlabs/bin/puppet /usr/bin/puppet
  91. dosym /opt/puppetlabs/puppet/bin/mcollectived /usr/sbin/mcollectived
  92. dosym /opt/puppetlabs/puppet/bin/virt-what /usr/bin/virt-what
  93. dosym /opt/puppetlabs/puppet/bin/augparse /usr/bin/augparse
  94. dosym /opt/puppetlabs/puppet/bin/augtool /usr/bin/augtool
  95. dosym /opt/puppetlabs/puppet/bin/extlookup2hiera /usr/bin/extlookup2hiera
  96. }