puppet 3.0.0.rc5 → 3.0.0.rc7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- data/LICENSE +1 -1
- data/README_DEVELOPER.md +209 -1
- data/README_HIERA.md +148 -0
- data/Rakefile +25 -27
- data/bin/extlookup2hiera +56 -0
- data/conf/auth.conf +34 -34
- data/examples/hiera/README.md +91 -0
- data/examples/hiera/etc/hiera.yaml +15 -0
- data/examples/hiera/etc/hieradb/common.yaml +3 -0
- data/examples/hiera/etc/hieradb/dc1.yaml +6 -0
- data/examples/hiera/etc/hieradb/development.yaml +2 -0
- data/examples/hiera/etc/puppet.conf +3 -0
- data/examples/hiera/modules/data/manifests/common.pp +3 -0
- data/examples/hiera/modules/ntp/manifests/config.pp +5 -0
- data/examples/hiera/modules/ntp/manifests/data.pp +3 -0
- data/examples/hiera/modules/ntp/templates/ntp.conf.erb +3 -0
- data/examples/hiera/modules/users/manifests/common.pp +3 -0
- data/examples/hiera/modules/users/manifests/dc1.pp +3 -0
- data/examples/hiera/modules/users/manifests/development.pp +3 -0
- data/examples/hiera/site.pp +3 -0
- data/ext/build_defaults.yaml +23 -0
- data/ext/debian/README.Debian +8 -0
- data/ext/debian/README.source +2 -0
- data/ext/debian/TODO.Debian +1 -0
- data/ext/debian/changelog.erb +1104 -0
- data/ext/debian/compat +1 -0
- data/ext/debian/control +143 -0
- data/ext/debian/copyright +361 -0
- data/ext/debian/docs +1 -0
- data/ext/debian/fileserver.conf +17 -0
- data/ext/debian/puppet-common.dirs +8 -0
- data/ext/debian/puppet-common.install +4 -0
- data/ext/debian/puppet-common.lintian-overrides +5 -0
- data/ext/debian/puppet-common.manpages +2 -0
- data/ext/debian/puppet-common.postinst +35 -0
- data/ext/debian/puppet-common.postrm +32 -0
- data/ext/debian/puppet-el.dirs +1 -0
- data/ext/debian/puppet-el.emacsen-install +25 -0
- data/ext/debian/puppet-el.emacsen-remove +11 -0
- data/ext/debian/puppet-el.emacsen-startup +9 -0
- data/ext/debian/puppet-el.install +1 -0
- data/ext/debian/puppet-testsuite.install +2 -0
- data/ext/debian/puppet-testsuite.lintian-overrides +4 -0
- data/ext/debian/puppet.conf +14 -0
- data/ext/debian/puppet.default +7 -0
- data/ext/debian/puppet.init +118 -0
- data/ext/debian/puppet.lintian-overrides +3 -0
- data/ext/debian/puppet.logrotate +11 -0
- data/ext/debian/puppet.manpages +32 -0
- data/ext/debian/puppet.postinst +20 -0
- data/ext/debian/puppet.postrm +20 -0
- data/ext/debian/puppet.preinst +20 -0
- data/ext/debian/puppetmaster-common.install +2 -0
- data/ext/debian/puppetmaster-common.manpages +2 -0
- data/ext/debian/puppetmaster-common.puppetqd.default +27 -0
- data/ext/debian/puppetmaster-common.puppetqd.init +84 -0
- data/ext/debian/puppetmaster-passenger.dirs +4 -0
- data/ext/debian/puppetmaster-passenger.postinst +66 -0
- data/ext/debian/puppetmaster-passenger.postrm +33 -0
- data/ext/debian/puppetmaster.README.debian +16 -0
- data/ext/debian/puppetmaster.default +38 -0
- data/ext/debian/puppetmaster.init +158 -0
- data/ext/debian/puppetmaster.lintian-overrides +3 -0
- data/ext/debian/puppetmaster.postinst +20 -0
- data/ext/debian/puppetmaster.postrm +5 -0
- data/ext/debian/puppetmaster.preinst +22 -0
- data/ext/debian/rules +128 -0
- data/ext/debian/source/format +1 -0
- data/ext/debian/source/options +1 -0
- data/ext/debian/vim-puppet.README.Debian +13 -0
- data/ext/debian/vim-puppet.dirs +3 -0
- data/ext/debian/vim-puppet.yaml +5 -0
- data/ext/debian/watch +2 -0
- data/ext/emacs/puppet-mode.el +1 -0
- data/ext/envpuppet +4 -0
- data/ext/envpuppet.bat +3 -2
- data/{conf → ext}/freebsd/puppetd +0 -0
- data/{conf → ext}/freebsd/puppetmasterd +0 -0
- data/{conf → ext}/gentoo/conf.d/puppet +0 -0
- data/{conf → ext}/gentoo/conf.d/puppetmaster +0 -0
- data/{conf → ext}/gentoo/init.d/puppet +0 -0
- data/{conf → ext}/gentoo/init.d/puppetmaster +0 -0
- data/{conf → ext}/gentoo/puppet/fileserver.conf +0 -0
- data/{conf → ext}/gentoo/puppet/puppet.conf +0 -0
- data/ext/ips/puppet-agent +49 -0
- data/ext/ips/puppet-master +44 -0
- data/ext/ips/puppet.conf +29 -0
- data/ext/ips/puppet.p5m.erb +12 -0
- data/ext/ips/puppetagent.xml +46 -0
- data/ext/ips/puppetmaster.xml +42 -0
- data/ext/ips/rules +19 -0
- data/ext/ips/transforms +34 -0
- data/{conf → ext}/osx/PackageInfo.plist +0 -0
- data/{conf → ext}/osx/createpackage.sh +1 -1
- data/ext/osx/file_mapping.yaml +33 -0
- data/ext/osx/preflight.erb +37 -0
- data/{tasks/rake/templates → ext/osx}/prototype.plist.erb +0 -0
- data/ext/packaging/README-Solaris.md +117 -0
- data/ext/packaging/README.md +89 -0
- data/ext/packaging/tasks/00_utils.rb +236 -0
- data/ext/packaging/tasks/10_setupvars.rake +62 -0
- data/ext/packaging/tasks/apple.rake +201 -0
- data/ext/packaging/tasks/clean.rake +5 -0
- data/ext/packaging/tasks/deb.rake +105 -0
- data/ext/packaging/tasks/gem.rake +52 -0
- data/ext/packaging/tasks/ips.rake +78 -0
- data/ext/packaging/tasks/mock.rake +88 -0
- data/ext/packaging/tasks/release.rake +20 -0
- data/ext/packaging/tasks/rpm.rake +39 -0
- data/ext/packaging/tasks/ship.rake +34 -0
- data/ext/packaging/tasks/sign.rake +76 -0
- data/ext/packaging/tasks/tar.rake +20 -0
- data/ext/project_data.yaml +25 -0
- data/ext/rack/files/apache2.conf +2 -1
- data/{conf → ext}/redhat/client.init +0 -0
- data/{conf → ext}/redhat/client.sysconfig +0 -0
- data/{conf → ext}/redhat/fileserver.conf +0 -0
- data/{conf → ext}/redhat/logrotate +0 -0
- data/{conf → ext}/redhat/puppet.conf +0 -0
- data/{conf/redhat/puppet.spec → ext/redhat/puppet.spec.erb} +140 -33
- data/{conf → ext}/redhat/queue.init +0 -0
- data/{conf → ext}/redhat/rundir-perms.patch +0 -0
- data/{conf → ext}/redhat/server.init +0 -0
- data/{conf → ext}/redhat/server.sysconfig +0 -0
- data/{conf → ext}/solaris/pkginfo +0 -0
- data/{conf → ext}/solaris/smf/puppetd.xml +0 -0
- data/{conf → ext}/solaris/smf/puppetmasterd.xml +0 -0
- data/{conf → ext}/solaris/smf/svc-puppetd +0 -0
- data/{conf → ext}/solaris/smf/svc-puppetmasterd +0 -0
- data/{conf → ext}/suse/client.init +0 -0
- data/{conf → ext}/suse/fileserver.conf +0 -0
- data/{conf → ext}/suse/logrotate +0 -0
- data/{conf → ext}/suse/puppet.conf +0 -0
- data/{conf → ext}/suse/puppet.spec +1 -1
- data/{conf → ext}/suse/server.init +0 -0
- data/ext/systemd/puppetagent.service +13 -0
- data/ext/systemd/puppetmaster.service +13 -0
- data/{conf → ext}/windows/eventlog/Rakefile +0 -0
- data/{conf → ext}/windows/eventlog/puppetres.dll +0 -0
- data/{conf → ext}/windows/eventlog/puppetres.mc +0 -0
- data/ext/windows/service/daemon.bat +6 -0
- data/ext/windows/service/daemon.rb +90 -0
- data/install.rb +22 -32
- data/lib/hiera/backend/puppet_backend.rb +102 -0
- data/lib/hiera/scope.rb +42 -0
- data/lib/hiera_puppet.rb +89 -0
- data/lib/puppet.rb +1 -1
- data/lib/puppet/agent.rb +2 -2
- data/lib/puppet/agent/locker.rb +12 -9
- data/lib/puppet/application.rb +10 -8
- data/lib/puppet/application/agent.rb +12 -8
- data/lib/puppet/application/apply.rb +2 -2
- data/lib/puppet/application/cert.rb +6 -6
- data/lib/puppet/application/certificate.rb +1 -4
- data/lib/puppet/application/describe.rb +1 -1
- data/lib/puppet/application/device.rb +5 -2
- data/lib/puppet/application/doc.rb +1 -1
- data/lib/puppet/application/face_base.rb +3 -13
- data/lib/puppet/application/filebucket.rb +1 -1
- data/lib/puppet/application/inspect.rb +1 -1
- data/lib/puppet/application/kick.rb +4 -2
- data/lib/puppet/application/master.rb +2 -2
- data/lib/puppet/application/queue.rb +3 -1
- data/lib/puppet/application/resource.rb +1 -1
- data/lib/puppet/configurer.rb +11 -7
- data/lib/puppet/configurer/downloader.rb +1 -4
- data/lib/puppet/daemon.rb +4 -4
- data/lib/puppet/defaults.rb +64 -60
- data/lib/puppet/external/dot.rb +1 -1
- data/lib/puppet/external/pson/common.rb +15 -0
- data/lib/puppet/external/pson/pure.rb +0 -62
- data/lib/puppet/external/pson/pure/generator.rb +1 -1
- data/lib/puppet/external/pson/pure/parser.rb +2 -2
- data/lib/puppet/face/ca.rb +19 -14
- data/lib/puppet/face/config.rb +2 -2
- data/lib/puppet/face/facts.rb +1 -1
- data/lib/puppet/face/help/action.erb +0 -1
- data/lib/puppet/face/help/face.erb +0 -1
- data/lib/puppet/face/help/man.erb +3 -6
- data/lib/puppet/face/module/install.rb +1 -1
- data/lib/puppet/face/module/list.rb +1 -1
- data/lib/puppet/face/module/uninstall.rb +1 -1
- data/lib/puppet/face/node.rb +1 -1
- data/lib/puppet/face/node/clean.rb +30 -25
- data/lib/puppet/feature/base.rb +0 -3
- data/lib/puppet/feature/rails.rb +2 -1
- data/lib/puppet/file_serving/terminus_selector.rb +1 -1
- data/lib/puppet/indirector/catalog/active_record.rb +5 -0
- data/lib/puppet/indirector/catalog/static_compiler.rb +2 -3
- data/lib/puppet/indirector/certificate/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/certificate_request/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/certificate_revocation_list/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/face.rb +3 -3
- data/lib/puppet/indirector/facts/active_record.rb +5 -0
- data/lib/puppet/indirector/facts/facter.rb +1 -4
- data/lib/puppet/indirector/facts/inventory_active_record.rb +6 -0
- data/lib/puppet/indirector/file_bucket_file/file.rb +2 -1
- data/lib/puppet/indirector/indirection.rb +2 -2
- data/lib/puppet/indirector/key/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/node/active_record.rb +5 -0
- data/lib/puppet/indirector/request.rb +4 -0
- data/lib/puppet/indirector/resource/active_record.rb +5 -0
- data/lib/puppet/network/authentication.rb +30 -0
- data/lib/puppet/network/http.rb +0 -13
- data/lib/puppet/network/http/connection.rb +10 -2
- data/lib/puppet/network/http/handler.rb +8 -0
- data/lib/puppet/network/http/mongrel/rest.rb +5 -0
- data/lib/puppet/network/http/rack/rest.rb +7 -0
- data/lib/puppet/network/http/webrick.rb +3 -6
- data/lib/puppet/network/http/webrick/rest.rb +4 -0
- data/lib/puppet/network/server.rb +9 -33
- data/lib/puppet/node.rb +1 -1
- data/lib/puppet/node/facts.rb +0 -1
- data/lib/puppet/parser/compiler.rb +1 -1
- data/lib/puppet/parser/functions.rb +12 -1
- data/lib/puppet/parser/functions/hiera.rb +8 -0
- data/lib/puppet/parser/functions/hiera_array.rb +8 -0
- data/lib/puppet/parser/functions/hiera_hash.rb +8 -0
- data/lib/puppet/parser/functions/hiera_include.rb +11 -0
- data/lib/puppet/parser/functions/shellquote.rb +21 -29
- data/lib/puppet/parser/lexer.rb +2 -1
- data/lib/puppet/parser/scope.rb +8 -0
- data/lib/puppet/provider/exec/windows.rb +1 -1
- data/lib/puppet/provider/group/groupadd.rb +2 -3
- data/lib/puppet/provider/package/pkg.rb +37 -10
- data/lib/puppet/provider/service/daemontools.rb +1 -1
- data/lib/puppet/provider/service/launchd.rb +1 -1
- data/lib/puppet/provider/service/redhat.rb +1 -1
- data/lib/puppet/provider/service/runit.rb +1 -1
- data/lib/puppet/provider/user/useradd.rb +8 -3
- data/lib/puppet/provider/user/windows_adsi.rb +11 -0
- data/lib/puppet/provider/zfs/zfs.rb +29 -2
- data/lib/puppet/provider/zone/solaris.rb +144 -39
- data/lib/puppet/provider/zpool/zpool.rb +7 -10
- data/lib/puppet/settings.rb +50 -86
- data/lib/puppet/settings/duration_setting.rb +34 -0
- data/lib/puppet/settings/terminus_setting.rb +16 -0
- data/lib/puppet/ssl/base.rb +49 -9
- data/lib/puppet/ssl/certificate.rb +13 -9
- data/lib/puppet/ssl/certificate_authority.rb +4 -0
- data/lib/puppet/ssl/certificate_authority/interface.rb +10 -17
- data/lib/puppet/ssl/certificate_factory.rb +4 -21
- data/lib/puppet/ssl/certificate_request.rb +1 -10
- data/lib/puppet/ssl/certificate_revocation_list.rb +1 -3
- data/lib/puppet/ssl/digest.rb +20 -0
- data/lib/puppet/ssl/host.rb +31 -6
- data/lib/puppet/test/test_helper.rb +1 -1
- data/lib/puppet/transaction/report.rb +2 -1
- data/lib/puppet/type.rb +1 -1
- data/lib/puppet/type/augeas.rb +1 -1
- data/lib/puppet/type/cron.rb +1 -1
- data/lib/puppet/type/exec.rb +7 -8
- data/lib/puppet/type/file.rb +1 -1
- data/lib/puppet/type/file/content.rb +2 -2
- data/lib/puppet/type/file/ensure.rb +1 -1
- data/lib/puppet/type/file/mode.rb +1 -1
- data/lib/puppet/type/file/selcontext.rb +6 -2
- data/lib/puppet/type/file/source.rb +1 -1
- data/lib/puppet/type/schedule.rb +1 -1
- data/lib/puppet/type/scheduled_task.rb +1 -1
- data/lib/puppet/type/tidy.rb +1 -1
- data/lib/puppet/type/zone.rb +126 -253
- data/lib/puppet/util.rb +10 -23
- data/lib/puppet/util/adsi.rb +22 -14
- data/lib/puppet/util/log/destinations.rb +7 -0
- data/lib/puppet/util/log/rate_limited_logger.rb +40 -0
- data/lib/puppet/util/metric.rb +2 -2
- data/lib/puppet/util/monkey_patches.rb +8 -0
- data/lib/puppet/util/platform.rb +7 -0
- data/lib/puppet/util/selinux.rb +31 -36
- data/lib/puppet/util/windows/error.rb +1 -1
- data/lib/puppet/util/windows/process.rb +3 -3
- data/lib/puppet/util/windows/security.rb +7 -7
- data/lib/puppet/util/windows/user.rb +65 -2
- data/lib/puppet/util/zaml.rb +90 -46
- data/lib/puppet/version.rb +1 -1
- data/spec/fixtures/hiera.yaml +9 -0
- data/spec/fixtures/manifests/site.pp +0 -0
- data/spec/integration/defaults_spec.rb +25 -11
- data/spec/integration/faces/ca_spec.rb +11 -16
- data/spec/integration/network/server/webrick_spec.rb +14 -27
- data/spec/integration/node_spec.rb +4 -1
- data/spec/integration/parser/functions/require_spec.rb +3 -3
- data/spec/integration/parser/undef_param_spec.rb +88 -0
- data/spec/integration/provider/mount_spec.rb +4 -1
- data/spec/integration/ssl/certificate_authority_spec.rb +18 -0
- data/spec/lib/puppet_spec/files.rb +3 -3
- data/spec/lib/puppet_spec/settings.rb +0 -1
- data/spec/shared_contexts/platform.rb +8 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/unit/agent/locker_spec.rb +8 -2
- data/spec/unit/application/agent_spec.rb +29 -7
- data/spec/unit/application/apply_spec.rb +1 -1
- data/spec/unit/application/device_spec.rb +18 -1
- data/spec/unit/application/face_base_spec.rb +16 -2
- data/spec/unit/application/kick_spec.rb +8 -0
- data/spec/unit/application/queue_spec.rb +5 -0
- data/spec/unit/application_spec.rb +13 -23
- data/spec/unit/configurer/downloader_spec.rb +2 -11
- data/spec/unit/configurer_spec.rb +6 -0
- data/spec/unit/face/node_spec.rb +1 -1
- data/spec/unit/hiera/backend/puppet_backend_spec.rb +140 -0
- data/spec/unit/hiera/scope_spec.rb +62 -0
- data/spec/unit/hiera_puppet_spec.rb +111 -0
- data/spec/unit/indirector/catalog/active_record_spec.rb +4 -0
- data/spec/unit/indirector/catalog/static_compiler_spec.rb +194 -0
- data/spec/unit/indirector/certificate/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/certificate_request/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/certificate_revocation_list/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/facts/active_record_spec.rb +37 -26
- data/spec/unit/indirector/facts/inventory_active_record_spec.rb +5 -0
- data/spec/unit/indirector/hiera_spec.rb +2 -1
- data/spec/unit/indirector/key/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/node/active_record_spec.rb +7 -0
- data/spec/unit/indirector/request_spec.rb +22 -0
- data/spec/unit/indirector/resource/active_record_spec.rb +5 -0
- data/spec/unit/module_tool/application_spec.rb +1 -1
- data/spec/unit/network/authentication_spec.rb +86 -0
- data/spec/unit/network/http/connection_spec.rb +21 -0
- data/spec/unit/network/http/handler_spec.rb +12 -0
- data/spec/unit/network/http/rack/rest_spec.rb +7 -0
- data/spec/unit/network/http/webrick_spec.rb +11 -26
- data/spec/unit/network/server_spec.rb +79 -192
- data/spec/unit/node/facts_spec.rb +2 -2
- data/spec/unit/parser/ast/vardef_spec.rb +4 -4
- data/spec/unit/parser/files_spec.rb +3 -0
- data/spec/unit/parser/functions/defined_spec.rb +5 -5
- data/spec/unit/parser/functions/fqdn_rand_spec.rb +1 -1
- data/spec/unit/parser/functions/hiera_array_spec.rb +23 -0
- data/spec/unit/parser/functions/hiera_hash_spec.rb +19 -0
- data/spec/unit/parser/functions/hiera_include_spec.rb +19 -0
- data/spec/unit/parser/functions/hiera_spec.rb +21 -0
- data/spec/unit/parser/functions/include_spec.rb +3 -3
- data/spec/unit/parser/functions/realize_spec.rb +3 -3
- data/spec/unit/parser/functions/require_spec.rb +5 -5
- data/spec/unit/parser/functions/shellquote_spec.rb +0 -4
- data/spec/unit/parser/functions_spec.rb +6 -10
- data/spec/unit/parser/lexer_spec.rb +13 -0
- data/spec/unit/parser/scope_spec.rb +16 -1
- data/spec/unit/provider/exec/posix_spec.rb +7 -6
- data/spec/unit/provider/group/groupadd_spec.rb +36 -30
- data/spec/unit/provider/package/pkg_spec.rb +16 -2
- data/spec/unit/provider/service/redhat_spec.rb +2 -2
- data/spec/unit/provider/sshkey/parsed_spec.rb +4 -0
- data/spec/unit/provider/user/user_role_add_spec.rb +125 -126
- data/spec/unit/provider/user/useradd_spec.rb +147 -118
- data/spec/unit/provider/user/windows_adsi_spec.rb +22 -0
- data/spec/unit/provider/zone/solaris_spec.rb +126 -7
- data/spec/unit/provider/zpool/zpool_spec.rb +4 -3
- data/spec/unit/puppet_spec.rb +7 -0
- data/spec/unit/settings/duration_setting_spec.rb +45 -0
- data/spec/unit/settings/terminus_setting_spec.rb +28 -0
- data/spec/unit/settings_spec.rb +21 -23
- data/spec/unit/ssl/base_spec.rb +68 -19
- data/spec/unit/ssl/certificate_authority/interface_spec.rb +19 -30
- data/spec/unit/ssl/certificate_authority_spec.rb +3 -2
- data/spec/unit/ssl/certificate_factory_spec.rb +15 -6
- data/spec/unit/ssl/certificate_request_spec.rb +80 -113
- data/spec/unit/ssl/certificate_revocation_list_spec.rb +1 -1
- data/spec/unit/ssl/certificate_spec.rb +26 -2
- data/spec/unit/ssl/digest_spec.rb +35 -0
- data/spec/unit/ssl/host_spec.rb +73 -27
- data/spec/unit/ssl/key_spec.rb +0 -4
- data/spec/unit/type/exec_spec.rb +1 -1
- data/spec/unit/type/file_spec.rb +2 -1
- data/spec/unit/type/scheduled_task_spec.rb +2 -2
- data/spec/unit/type/zone_spec.rb +52 -10
- data/spec/unit/util/adsi_spec.rb +19 -0
- data/spec/unit/util/checksums_spec.rb +2 -3
- data/spec/unit/util/execution_spec.rb +1 -1
- data/spec/unit/util/log/destinations_spec.rb +1 -0
- data/spec/unit/util/log/rate_limited_logger_spec.rb +51 -0
- data/spec/unit/util/logging_spec.rb +6 -6
- data/spec/unit/util/selinux_spec.rb +24 -32
- data/spec/unit/util/zaml_spec.rb +94 -6
- data/spec/unit/util_spec.rb +17 -0
- data/spec/watchr.rb +2 -6
- data/tasks/{rake/manpages.rake → manpages.rake} +0 -0
- data/tasks/{rake/parser.rake → parser.rake} +0 -0
- metadata +1003 -119
- data/CHANGELOG +0 -9233
- data/conf/osx/preflight +0 -24
- data/lib/puppet/network/http/mongrel.rb +0 -35
- data/lib/puppet/util/config_timeout.rb +0 -24
- data/spec/unit/network/http/mongrel/rest_spec.rb +0 -257
- data/spec/unit/network/http/mongrel_spec.rb +0 -91
- data/spec/unit/network/http_spec.rb +0 -31
- data/spec/unit/util/config_timeout_spec.rb +0 -57
- data/tasks/rake/apple.rake +0 -176
- data/tasks/rake/changelog.rake +0 -15
- data/tasks/rake/ci.rake +0 -22
- data/tasks/rake/dailybuild.rake +0 -9
- data/tasks/rake/gem.rake +0 -63
- data/tasks/rake/git_workflow.rake +0 -134
- data/tasks/rake/metrics.rake +0 -14
- data/tasks/rake/sign.rake +0 -14
- data/tasks/rake/testbranch.rake +0 -16
- data/tasks/rake/yard.rake +0 -11
@@ -0,0 +1,88 @@
|
|
1
|
+
|
2
|
+
def mock(mock_config, srpm)
|
3
|
+
check_tool('mock')
|
4
|
+
sh "mock -r #{mock_config} #{srpm}"
|
5
|
+
end
|
6
|
+
|
7
|
+
def srpm_file
|
8
|
+
srpm = Dir["pkg/srpm/*.rpm"][0]
|
9
|
+
check_file(srpm)
|
10
|
+
srpm
|
11
|
+
end
|
12
|
+
|
13
|
+
def mock_el_family(mock_config)
|
14
|
+
family = mock_config.split('-')[0]
|
15
|
+
family = 'el' if family == 'pl'
|
16
|
+
family
|
17
|
+
end
|
18
|
+
|
19
|
+
def mock_el_ver(mock_config)
|
20
|
+
version = mock_config.split('-')[1]
|
21
|
+
version = "f#{version}" if mock_config.split('-')[0] == 'fedora'
|
22
|
+
version
|
23
|
+
end
|
24
|
+
|
25
|
+
def build_rpm_with_mock(is_rc, subdir)
|
26
|
+
if is_rc
|
27
|
+
mocks = @rc_mocks
|
28
|
+
else
|
29
|
+
mocks = @final_mocks
|
30
|
+
end
|
31
|
+
|
32
|
+
mocks.split(' ').each do |mock_config|
|
33
|
+
family = mock_el_family(mock_config)
|
34
|
+
version = mock_el_ver(mock_config)
|
35
|
+
arch = mock_config.split('-')[2]
|
36
|
+
result = "/var/lib/mock/#{mock_config}/result/*.rpm"
|
37
|
+
|
38
|
+
mock(mock_config, srpm_file)
|
39
|
+
|
40
|
+
Dir[result].each do |rpm|
|
41
|
+
rpm.strip!
|
42
|
+
unless ENV['RC_OVERRIDE'] == '1'
|
43
|
+
if is_rc == FALSE and rpm =~ /[0-9]+rc[0-9]+\./
|
44
|
+
puts "It looks like you might be trying to ship an RC to the production repos. Leaving rpm in #{result}. Pass RC_OVERRIDE=1 to override."
|
45
|
+
next
|
46
|
+
elsif is_rc and rpm !~ /[0-9]+rc[0-9]+\./
|
47
|
+
puts "It looks like you might be trying to ship a production release to the development repos. Leaving rpm in #{result}. Pass RC_OVERRIDE=1 to override."
|
48
|
+
next
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
case rpm
|
53
|
+
when /debuginfo/
|
54
|
+
rm_rf(rpm)
|
55
|
+
when /src\.rpm/
|
56
|
+
cp_pr(rpm, "pkg/#{family}/#{version}/#{subdir}/SRPMS")
|
57
|
+
when /i.?86/
|
58
|
+
cp_pr(rpm, "pkg/#{family}/#{version}/#{subdir}/i386")
|
59
|
+
when /x86_64/
|
60
|
+
cp_pr(rpm, "pkg/#{family}/#{version}/#{subdir}/x86_64")
|
61
|
+
when /noarch/
|
62
|
+
cp_pr(rpm, "pkg/#{family}/#{version}/#{subdir}/i386")
|
63
|
+
ln("pkg/#{family}/#{version}/#{subdir}/i386/#{File.basename rpm}", "pkg/#{family}/#{version}/#{subdir}/x86_64/")
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
|
70
|
+
namespace :pl do
|
71
|
+
task :setup_el_dirs do
|
72
|
+
%x{mkdir -p pkg/el/{5,6}/{products,devel,dependencies}/{SRPMS,i386,x86_64}}
|
73
|
+
%x{mkdir -p pkg/fedora/{f15,f16,f17}/{products,devel,dependencies}/{SRPMS,i386,x86_64}}
|
74
|
+
end
|
75
|
+
|
76
|
+
desc "Use specified mocks to make final rpms, keyed to PL infrastructure, pass MOCK to specifiy config"
|
77
|
+
task :mock_final => [ "package:srpm", "pl:setup_el_dirs" ] do
|
78
|
+
subdir = ENV['subdir'] || 'products'
|
79
|
+
build_rpm_with_mock(FALSE, subdir)
|
80
|
+
end
|
81
|
+
|
82
|
+
desc "Use specified mocks to make RC rpms, keyed to PL infrastructure, pass MOCK to specify config"
|
83
|
+
task :mock_rc => [ "package:srpm", "pl:setup_el_dirs" ] do
|
84
|
+
subdir = 'devel'
|
85
|
+
build_rpm_with_mock(TRUE, subdir)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
namespace :package do
|
2
|
+
desc "Update the version in #{@version_file} to current and commit."
|
3
|
+
task :versionbump do
|
4
|
+
old_version = get_version_file_version
|
5
|
+
contents = IO.read(@version_file)
|
6
|
+
new_version = '"' + @version.to_s.strip + '"'
|
7
|
+
if contents.match("VERSION = #{old_version}")
|
8
|
+
contents.gsub!("VERSION = #{old_version}", "VERSION = #{new_version}")
|
9
|
+
elsif contents.match("#{@name.upcase}VERSION = #{old_version}")
|
10
|
+
contents.gsub!("#{@name.upcase}VERSION = #{old_version}", "#{@name.upcase}VERSION = #{new_version}")
|
11
|
+
else
|
12
|
+
contents.gsub!(old_version, @version)
|
13
|
+
end
|
14
|
+
file = File.open(@version_file, 'w')
|
15
|
+
file.write contents
|
16
|
+
file.close
|
17
|
+
git_commit_file(@version_file)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
@@ -0,0 +1,39 @@
|
|
1
|
+
def build_rpm(buildarg = "-bs")
|
2
|
+
check_tool('rpmbuild')
|
3
|
+
temp = get_temp
|
4
|
+
rpm_define = "--define \"%dist .el5\" --define \"%_topdir #{temp}\" "
|
5
|
+
rpm_old_version = '--define "_source_filedigest_algorithm 1" --define "_binary_filedigest_algorithm 1" \
|
6
|
+
--define "_binary_payload w9.gzdio" --define "_source_payload w9.gzdio" \
|
7
|
+
--define "_default_patch_fuzz 2"'
|
8
|
+
args = rpm_define + ' ' + rpm_old_version
|
9
|
+
mkdir_pr temp, 'pkg/rpm', 'pkg/srpm', "#{temp}/SOURCES", "#{temp}/SPECS"
|
10
|
+
if @sign_tar
|
11
|
+
Rake::Task["pl:sign_tar"].invoke
|
12
|
+
cp_p "pkg/#{@name}-#{@version}.tar.gz.asc", "#{temp}/SOURCES"
|
13
|
+
end
|
14
|
+
cp_p "pkg/#{@name}-#{@version}.tar.gz", "#{temp}/SOURCES"
|
15
|
+
erb "ext/redhat/#{@name}.spec.erb", "#{temp}/SPECS/#{@name}.spec"
|
16
|
+
sh "rpmbuild #{args} #{buildarg} --nodeps #{temp}/SPECS/#{@name}.spec"
|
17
|
+
mv FileList["#{temp}/SRPMS/*.rpm"], "pkg/srpm"
|
18
|
+
mv FileList["#{temp}/RPMS/*/*.rpm"], "pkg/rpm"
|
19
|
+
rm_rf temp
|
20
|
+
puts
|
21
|
+
output = FileList['pkg/*/*.rpm']
|
22
|
+
puts "Wrote:"
|
23
|
+
output.each do | line |
|
24
|
+
puts line
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
namespace :package do
|
29
|
+
desc "Create srpm from this git repository (unsigned)"
|
30
|
+
task :srpm => :tar do
|
31
|
+
build_rpm("-bs")
|
32
|
+
end
|
33
|
+
|
34
|
+
desc "Create .rpm from this git repository (unsigned)"
|
35
|
+
task :rpm => :tar do
|
36
|
+
build_rpm("-ba")
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
namespace :pl do
|
2
|
+
desc "Ship mocked rpms to #{@yum_host}"
|
3
|
+
task :ship_rpms do
|
4
|
+
rsync_to('pkg/el', @yum_host, @yum_repo_path)
|
5
|
+
rsync_to('pkg/fedora', @yum_host, @yum_repo_path)
|
6
|
+
end
|
7
|
+
|
8
|
+
desc "Update remote rpm repodata on #{@yum_host}"
|
9
|
+
task :update_yum_repo do
|
10
|
+
remote_ssh_cmd(@yum_host, '/var/lib/gems/1.8/gems/rake-0.9.2.2/bin/rake -f /opt/repository/Rakefile mk_repo')
|
11
|
+
end
|
12
|
+
|
13
|
+
desc "Ship cow-built debs to #{@apt_host}"
|
14
|
+
task :ship_debs do
|
15
|
+
rsync_to('pkg/deb/', @apt_host, @apt_repo_path)
|
16
|
+
end
|
17
|
+
|
18
|
+
desc "Update remote ips repository on #{@ips_host}"
|
19
|
+
task :update_ips_repo do
|
20
|
+
rsync_to('pkg/ips/pkgs', @ips_host, @ips_store)
|
21
|
+
remote_ssh_cmd(@ips_host, "pkgrecv -s #{@ips_store}/pkgs/#{@name}@#{@ipsversion}.p5p -d #{@ips_repo} \\*")
|
22
|
+
remote_ssh_cmd(@ips_host, "pkgrepo refresh -s #{@ips_repo}")
|
23
|
+
remote_ssh_cmd(@ips_host, "/usr/sbin/svcadm restart svc:/application/pkg/server")
|
24
|
+
end
|
25
|
+
|
26
|
+
if @build_gem == TRUE or @build_gem == 'true' or @build_gem == 'TRUE'
|
27
|
+
desc "Ship built gem to rubygems"
|
28
|
+
task :ship_gem do
|
29
|
+
ship_gem("pkg/#{@name}-#{@gemversion}.gem")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
|
@@ -0,0 +1,76 @@
|
|
1
|
+
def sign_el5(rpm)
|
2
|
+
%x{rpm --define '%_gpg_name #{@gpg_name}' --define '%__gpg_sign_cmd %{__gpg} gpg --force-v3-sigs --digest-algo=sha1 --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning -u %{_gpg_name} -sbo %{__signature_filename} %{__plaintext_filename}' --addsign #{rpm} > /dev/null}
|
3
|
+
end
|
4
|
+
|
5
|
+
def sign_modern(rpm)
|
6
|
+
%x{rpm --define '%_gpg_name #{@gpg_name}' --addsign #{rpm} > /dev/null}
|
7
|
+
end
|
8
|
+
|
9
|
+
def rpm_has_sig(rpm)
|
10
|
+
%x{rpm -Kv #{rpm} | grep "#{@gpg_key.downcase}" &> /dev/null}
|
11
|
+
$?.success?
|
12
|
+
end
|
13
|
+
|
14
|
+
def sign_deb_changes(file)
|
15
|
+
%x{debsign --re-sign -k#{@gpg_key} #{file}}
|
16
|
+
end
|
17
|
+
|
18
|
+
# requires atleast a self signed prvate key and certificate pair
|
19
|
+
def sign_ips(pkg)
|
20
|
+
%x{pkgsign -s pkg/ips/repo/ -k #{@privatekey_pem} -c #{@certificate_pem} #{@name}@#{@ipsversion}}
|
21
|
+
%x{rm -f #{pkg}}
|
22
|
+
%x{pkgrecv -s pkg/ips/repo -a -d #{pkg} #{@name}@#{@ipsversion}}
|
23
|
+
end
|
24
|
+
|
25
|
+
namespace :pl do
|
26
|
+
desc "Sign the tarball, defaults to PL key, pass GPG_KEY to override or edit build_defaults"
|
27
|
+
task :sign_tar do
|
28
|
+
unless File.exist? "pkg/#{@name}-#{@version}.tar.gz"
|
29
|
+
STDERR.puts "No tarball exists. Try rake package:tar?"
|
30
|
+
exit 1
|
31
|
+
end
|
32
|
+
gpg_sign_file "pkg/#{@name}-#{@version}.tar.gz"
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "Sign mocked rpms, Defaults to PL Key, pass KEY to override"
|
36
|
+
task :sign_rpms do
|
37
|
+
el5_rpms = Dir["pkg/el/5/**/*.rpm"].join(' ')
|
38
|
+
modern_rpms = (Dir["pkg/el/6/**/*.rpm"] + Dir["pkg/fedora/**/*.rpm"]).join(' ')
|
39
|
+
puts "Signing el5 rpms..."
|
40
|
+
sign_el5 el5_rpms
|
41
|
+
puts "Signing el6 and fedora rpms..."
|
42
|
+
sign_modern modern_rpms
|
43
|
+
end
|
44
|
+
|
45
|
+
desc "Sign ips package, Defaults to PL Key, pass KEY to override"
|
46
|
+
task :sign_ips do
|
47
|
+
ips_pkgs = Dir["pkg/ips/pkgs/*.p5p"].join(' ')
|
48
|
+
puts "Signing ips packages..."
|
49
|
+
sign_ips ips_pkgs
|
50
|
+
end
|
51
|
+
|
52
|
+
desc "Check if all rpms are signed"
|
53
|
+
task :check_rpm_sigs do
|
54
|
+
signed = TRUE
|
55
|
+
rpms = Dir["pkg/el/5/**/*.rpm"] + Dir["pkg/el/6/**/*.rpm"] + Dir["pkg/fedora/**/*.rpm"]
|
56
|
+
print 'Checking rpm signatures'
|
57
|
+
rpms.each do |rpm|
|
58
|
+
if rpm_has_sig rpm
|
59
|
+
print '.'
|
60
|
+
else
|
61
|
+
puts "#{rpm} is unsigned."
|
62
|
+
signed = FALSE
|
63
|
+
end
|
64
|
+
end
|
65
|
+
exit 1 unless signed
|
66
|
+
puts "All rpms signed"
|
67
|
+
end
|
68
|
+
|
69
|
+
desc "Sign generated debian changes files. Defaults to PL Key, pass KEY to override"
|
70
|
+
task :sign_deb_changes do
|
71
|
+
restart_keychain
|
72
|
+
sign_deb_changes("pkg/deb/*/*.changes") unless Dir["pkg/deb/*/*.changes"].empty?
|
73
|
+
sign_deb_changes("pkg/deb/*.changes") unless Dir["pkg/deb/*.changes"].empty?
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
namespace :package do
|
2
|
+
desc "Create a source tar archive"
|
3
|
+
task :tar => [ :clean ] do
|
4
|
+
tar = ENV['TAR'] || 'tar'
|
5
|
+
workdir = "pkg/#{@name}-#{@version}"
|
6
|
+
mkdir_p(workdir)
|
7
|
+
FileList[@files.split(' ')].each do |f|
|
8
|
+
cp_pr(f, workdir)
|
9
|
+
end
|
10
|
+
erb("#{workdir}/ext/redhat/#{@name}.spec.erb", "#{workdir}/ext/redhat/#{@name}.spec")
|
11
|
+
erb("#{workdir}/ext/debian/changelog.erb", "#{workdir}/ext/debian/changelog")
|
12
|
+
rm_rf(FileList["#{workdir}/ext/debian/*.erb", "#{workdir}/ext/redhat/*.erb"])
|
13
|
+
cd "pkg" do
|
14
|
+
sh "#{tar} --exclude=.gitignore --exclude=ext/#{@packaging_repo} -zcf #{@name}-#{@version}.tar.gz #{@name}-#{@version}"
|
15
|
+
end
|
16
|
+
rm_rf(workdir)
|
17
|
+
puts
|
18
|
+
puts "Wrote #{`pwd`.strip}/pkg/#{@name}-#{@version}.tar.gz"
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
---
|
2
|
+
project: 'puppet'
|
3
|
+
author: 'Puppet Labs'
|
4
|
+
email: 'info@puppetlabs.com'
|
5
|
+
homepage: 'https://github.com/puppetlabs/puppet'
|
6
|
+
summary: 'Puppet, an automated configuration management tool'
|
7
|
+
description: 'Puppet, an automated configuration management tool'
|
8
|
+
version_file: 'lib/puppet/version.rb'
|
9
|
+
# files and gem_files are space separated lists
|
10
|
+
files: '[A-Z]* install.rb bin lib conf man examples ext tasks spec'
|
11
|
+
# The gem specification bits only work on Puppet >= 3.0rc, NOT 2.7.x and earlier
|
12
|
+
gem_files: '[A-Z]* install.rb bin lib conf man examples ext tasks spec'
|
13
|
+
gem_test_files: 'spec/**/*'
|
14
|
+
gem_executables: 'puppet'
|
15
|
+
gem_default_executables: 'puppet'
|
16
|
+
gem_forge_project: 'puppet'
|
17
|
+
gem_runtime_dependencies:
|
18
|
+
facter: '>= 1.6.11'
|
19
|
+
hiera: '>= 1.0.0rc'
|
20
|
+
gem_rdoc_options:
|
21
|
+
- --title
|
22
|
+
- "Puppet - Configuration Management"
|
23
|
+
- --main
|
24
|
+
- README.md
|
25
|
+
- --line-numbers
|
data/ext/rack/files/apache2.conf
CHANGED
@@ -24,7 +24,8 @@ Listen 8140
|
|
24
24
|
SSLCARevocationFile /etc/puppet/ssl/ca/ca_crl.pem
|
25
25
|
SSLVerifyClient optional
|
26
26
|
SSLVerifyDepth 1
|
27
|
-
|
27
|
+
# The `ExportCertData` option is needed for agent certificate expiration warnings
|
28
|
+
SSLOptions +StdEnvVars +ExportCertData
|
28
29
|
|
29
30
|
# This header needs to be set if using a loadbalancer or proxy
|
30
31
|
RequestHeader unset X-Forwarded-For
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -9,27 +9,34 @@
|
|
9
9
|
%global puppet_libdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]')
|
10
10
|
%endif
|
11
11
|
|
12
|
-
%
|
12
|
+
%if 0%{?fedora} >= 17
|
13
|
+
%global _with_systemd 1
|
14
|
+
%else
|
15
|
+
%global _with_systemd 0
|
16
|
+
%endif
|
17
|
+
|
18
|
+
# VERSION is subbed out during rake srpm process
|
19
|
+
%global realversion <%= @version %>
|
20
|
+
%global rpmversion <%= @rpmversion %>
|
21
|
+
|
22
|
+
%global confdir ext/redhat
|
13
23
|
|
14
24
|
Name: puppet
|
15
|
-
Version:
|
16
|
-
Release:
|
17
|
-
#Release: 1%{?dist}
|
25
|
+
Version: %{rpmversion}
|
26
|
+
Release: <%= @rpmrelease -%>%{?dist}
|
18
27
|
Vendor: %{?_host_vendor}
|
19
28
|
Summary: A network tool for managing many disparate systems
|
20
29
|
License: ASL 2.0
|
21
30
|
URL: http://puppetlabs.com
|
22
|
-
|
23
|
-
Source0: http://puppetlabs.com/downloads/%{name}/%{name}-%{version}rc5.tar.gz
|
24
|
-
#Source1: http://puppetlabs.com/downloads/%{name}/%{name}-%{version}.tar.gz.asc
|
25
|
-
Source1: http://puppetlabs.com/downloads/%{name}/%{name}-%{version}rc5.tar.gz.asc
|
31
|
+
Source0: http://puppetlabs.com/downloads/%{name}/%{name}-%{realversion}.tar.gz
|
26
32
|
|
27
33
|
Group: System Environment/Base
|
28
34
|
|
29
35
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
30
36
|
|
31
|
-
BuildRequires: facter
|
32
|
-
|
37
|
+
BuildRequires: facter < 1:2.0
|
38
|
+
# Puppet 3.x drops ruby 1.8.5 support and adds ruby 1.9 support
|
39
|
+
BuildRequires: ruby >= 1.8.7
|
33
40
|
|
34
41
|
BuildArch: noarch
|
35
42
|
Requires: ruby(abi) >= 1.8
|
@@ -45,16 +52,26 @@ Requires: ruby-shadow
|
|
45
52
|
%endif
|
46
53
|
|
47
54
|
Requires: facter >= 1.6.11
|
48
|
-
|
55
|
+
# Puppet 3.x drops ruby 1.8.5 support and adds ruby 1.9 support
|
56
|
+
# Ruby 1.8.7 available for el5 at: yum.puppetlabs.com/el/5/devel/$ARCH
|
57
|
+
Requires: ruby >= 1.8.7
|
49
58
|
Requires: hiera >= 1.0.0
|
50
|
-
|
59
|
+
Obsoletes: hiera-puppet < 1.0.0
|
60
|
+
Provides: hiera-puppet >= 1.0.0
|
51
61
|
%{!?_without_augeas:Requires: ruby-augeas}
|
52
62
|
|
53
|
-
|
54
|
-
Requires
|
55
|
-
|
56
|
-
|
57
|
-
|
63
|
+
# Required for %%pre
|
64
|
+
Requires: shadow-utils
|
65
|
+
|
66
|
+
%if 0%{?_with_systemd}
|
67
|
+
# Required for %%post, %%preun, %%postun
|
68
|
+
Requires: systemd
|
69
|
+
%else
|
70
|
+
# Required for %%post and %%preun
|
71
|
+
Requires: chkconfig
|
72
|
+
# Required for %%preun and %%postun
|
73
|
+
Requires: initscripts
|
74
|
+
%endif
|
58
75
|
|
59
76
|
%description
|
60
77
|
Puppet lets you centrally manage every important aspect of your system using a
|
@@ -66,19 +83,17 @@ along with obviously discrete elements like packages, services, and files.
|
|
66
83
|
Group: System Environment/Base
|
67
84
|
Summary: Server for the puppet system management tool
|
68
85
|
Requires: puppet = %{version}-%{release}
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
Requires(postun): initscripts
|
86
|
+
# chkconfig (%%post, %%preun) and initscripts (%%preun %%postun) are required for non systemd
|
87
|
+
# and systemd (%%post, %%preun, and %%postun) are required for systems with systemd as default
|
88
|
+
# They come along transitively with puppet-%{version}-%{release}.
|
73
89
|
|
74
90
|
%description server
|
75
91
|
Provides the central puppet server daemon which provides manifests to clients.
|
76
92
|
The server can also function as a certificate authority and file server.
|
77
93
|
|
78
94
|
%prep
|
79
|
-
|
80
|
-
|
81
|
-
patch -s -p1 < conf/redhat/rundir-perms.patch
|
95
|
+
%setup -q -n %{name}-%{realversion}
|
96
|
+
patch -s -p1 < ext/redhat/rundir-perms.patch
|
82
97
|
|
83
98
|
|
84
99
|
%build
|
@@ -107,12 +122,24 @@ install -d -m0755 %{buildroot}%{_sysconfdir}/puppet/manifests
|
|
107
122
|
install -d -m0755 %{buildroot}%{_datadir}/%{name}/modules
|
108
123
|
install -d -m0755 %{buildroot}%{_localstatedir}/lib/puppet
|
109
124
|
install -d -m0755 %{buildroot}%{_localstatedir}/run/puppet
|
125
|
+
|
126
|
+
# As per redhat bz #495096
|
110
127
|
install -d -m0750 %{buildroot}%{_localstatedir}/log/puppet
|
128
|
+
|
129
|
+
%if 0%{?_with_systemd}
|
130
|
+
# Systemd for fedora >= 17
|
131
|
+
%{__install} -d -m0755 %{buildroot}%{_unitdir}
|
132
|
+
install -Dp -m0644 ext/systemd/puppetagent.service %{buildroot}%{_unitdir}/puppetagent.service
|
133
|
+
install -Dp -m0644 ext/systemd/puppetmaster.service %{buildroot}%{_unitdir}/puppetmaster.service
|
134
|
+
%else
|
135
|
+
# Otherwise init.d for fedora < 17 or el 5, 6
|
111
136
|
install -Dp -m0644 %{confdir}/client.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppet
|
112
137
|
install -Dp -m0755 %{confdir}/client.init %{buildroot}%{_initrddir}/puppet
|
113
138
|
install -Dp -m0644 %{confdir}/server.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppetmaster
|
114
139
|
install -Dp -m0755 %{confdir}/server.init %{buildroot}%{_initrddir}/puppetmaster
|
115
140
|
install -Dp -m0755 %{confdir}/queue.init %{buildroot}%{_initrddir}/puppetqueue
|
141
|
+
%endif
|
142
|
+
|
116
143
|
install -Dp -m0644 %{confdir}/fileserver.conf %{buildroot}%{_sysconfdir}/puppet/fileserver.conf
|
117
144
|
install -Dp -m0644 %{confdir}/puppet.conf %{buildroot}%{_sysconfdir}/puppet/puppet.conf
|
118
145
|
install -Dp -m0644 %{confdir}/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/puppet
|
@@ -122,6 +149,14 @@ install -d %{buildroot}%{_datadir}/%{name}
|
|
122
149
|
cp -a ext/ %{buildroot}%{_datadir}/%{name}
|
123
150
|
# emacs and vim bits are installed elsewhere
|
124
151
|
rm -rf %{buildroot}%{_datadir}/%{name}/ext/{emacs,vim}
|
152
|
+
# remove misc packaging artifacts not applicable to rpms
|
153
|
+
rm -rf %{buildroot}%{_datadir}/%{name}/ext/{gentoo,freebsd,solaris,suse,windows,osx,ips,debian}
|
154
|
+
rm -f %{buildroot}%{_datadir}/%{name}/ext/redhat/*.init
|
155
|
+
rm -f %{buildroot}%{_datadir}/%{name}/ext/{build_defaults.yaml,project_data.yaml}
|
156
|
+
|
157
|
+
# Rpmlint fixup
|
158
|
+
chmod 755 %{buildroot}%{_datadir}/%{name}/ext/regexp_nodes/regexp_nodes.rb
|
159
|
+
chmod 755 %{buildroot}%{_datadir}/%{name}/ext/puppet-load.rb
|
125
160
|
|
126
161
|
# Install emacs mode files
|
127
162
|
emacsdir=%{buildroot}%{_datadir}/emacs/site-lisp
|
@@ -146,16 +181,21 @@ mkdir -p %{buildroot}%{_sysconfdir}/%{name}/modules
|
|
146
181
|
|
147
182
|
%files
|
148
183
|
%defattr(-, root, root, 0755)
|
149
|
-
%doc
|
184
|
+
%doc LICENSE README.md examples
|
150
185
|
%{_bindir}/puppet
|
186
|
+
%{_bindir}/extlookup2hiera
|
151
187
|
%{puppet_libdir}/*
|
188
|
+
%if 0%{?_with_systemd}
|
189
|
+
%{_unitdir}/puppetagent.service
|
190
|
+
%else
|
152
191
|
%{_initrddir}/puppet
|
192
|
+
%config(noreplace) %{_sysconfdir}/sysconfig/puppet
|
193
|
+
%endif
|
153
194
|
%dir %{_sysconfdir}/puppet
|
154
195
|
%dir %{_sysconfdir}/%{name}/modules
|
155
196
|
%if 0%{?fedora} >= 15
|
156
197
|
%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
|
157
198
|
%endif
|
158
|
-
%config(noreplace) %{_sysconfdir}/sysconfig/puppet
|
159
199
|
%config(noreplace) %{_sysconfdir}/puppet/puppet.conf
|
160
200
|
%config(noreplace) %{_sysconfdir}/puppet/auth.conf
|
161
201
|
%config(noreplace) %{_sysconfdir}/logrotate.d/puppet
|
@@ -206,11 +246,15 @@ mkdir -p %{buildroot}%{_sysconfdir}/%{name}/modules
|
|
206
246
|
|
207
247
|
%files server
|
208
248
|
%defattr(-, root, root, 0755)
|
249
|
+
%if 0%{?_with_systemd}
|
250
|
+
%{_unitdir}/puppetmaster.service
|
251
|
+
%else
|
209
252
|
%{_initrddir}/puppetmaster
|
210
253
|
%{_initrddir}/puppetqueue
|
254
|
+
%config(noreplace) %{_sysconfdir}/sysconfig/puppetmaster
|
255
|
+
%endif
|
211
256
|
%config(noreplace) %{_sysconfdir}/puppet/fileserver.conf
|
212
257
|
%dir %{_sysconfdir}/puppet/manifests
|
213
|
-
%config(noreplace) %{_sysconfdir}/sysconfig/puppetmaster
|
214
258
|
%{_mandir}/man8/puppet-ca.8.gz
|
215
259
|
%{_mandir}/man8/puppet-master.8.gz
|
216
260
|
|
@@ -228,6 +272,19 @@ fi
|
|
228
272
|
exit 0
|
229
273
|
|
230
274
|
%post
|
275
|
+
%if 0%{?_with_systemd}
|
276
|
+
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
277
|
+
if [ "$1" -ge 1 ]; then
|
278
|
+
# The pidfile changed from 0.25.x to 2.6.x, handle upgrades without leaving
|
279
|
+
# the old process running.
|
280
|
+
oldpid="%{_localstatedir}/run/puppet/puppetd.pid"
|
281
|
+
newpid="%{_localstatedir}/run/puppet/agent.pid"
|
282
|
+
if [ -s "$oldpid" -a ! -s "$newpid" ]; then
|
283
|
+
(kill $(< "$oldpid") && rm -f "$oldpid" && \
|
284
|
+
/bin/systemctl start puppetagent.service) >/dev/null 2>&1 || :
|
285
|
+
fi
|
286
|
+
fi
|
287
|
+
%else
|
231
288
|
/sbin/chkconfig --add puppet || :
|
232
289
|
if [ "$1" -ge 1 ]; then
|
233
290
|
# The pidfile changed from 0.25.x to 2.6.x, handle upgrades without leaving
|
@@ -239,8 +296,22 @@ if [ "$1" -ge 1 ]; then
|
|
239
296
|
/sbin/service puppet start) >/dev/null 2>&1 || :
|
240
297
|
fi
|
241
298
|
fi
|
299
|
+
%endif
|
242
300
|
|
243
301
|
%post server
|
302
|
+
%if 0%{?_with_systemd}
|
303
|
+
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
304
|
+
if [ "$1" -ge 1 ]; then
|
305
|
+
# The pidfile changed from 0.25.x to 2.6.x, handle upgrades without leaving
|
306
|
+
# the old process running.
|
307
|
+
oldpid="%{_localstatedir}/run/puppet/puppetmasterd.pid"
|
308
|
+
newpid="%{_localstatedir}/run/puppet/master.pid"
|
309
|
+
if [ -s "$oldpid" -a ! -s "$newpid" ]; then
|
310
|
+
(kill $(< "$oldpid") && rm -f "$oldpid" && \
|
311
|
+
/bin/systemctl start puppetmaster.service) > /dev/null 2>&1 || :
|
312
|
+
fi
|
313
|
+
fi
|
314
|
+
%else
|
244
315
|
/sbin/chkconfig --add puppetmaster || :
|
245
316
|
if [ "$1" -ge 1 ]; then
|
246
317
|
# The pidfile changed from 0.25.x to 2.6.x, handle upgrades without leaving
|
@@ -252,33 +323,69 @@ if [ "$1" -ge 1 ]; then
|
|
252
323
|
/sbin/service puppetmaster start) >/dev/null 2>&1 || :
|
253
324
|
fi
|
254
325
|
fi
|
326
|
+
%endif
|
255
327
|
|
256
328
|
%preun
|
329
|
+
%if 0%{?_with_systemd}
|
330
|
+
if [ "$1" -eq 0 ] ; then
|
331
|
+
# Package removal, not upgrade
|
332
|
+
/bin/systemctl --no-reload disable puppetagent.service > /dev/null 2>&1 || :
|
333
|
+
/bin/systemctl stop puppetagent.service > /dev/null 2>&1 || :
|
334
|
+
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
335
|
+
fi
|
336
|
+
%else
|
257
337
|
if [ "$1" = 0 ] ; then
|
258
|
-
|
259
|
-
|
338
|
+
/sbin/service puppet stop > /dev/null 2>&1
|
339
|
+
/sbin/chkconfig --del puppet || :
|
260
340
|
fi
|
341
|
+
%endif
|
261
342
|
|
262
343
|
%preun server
|
344
|
+
%if 0%{?_with_systemd}
|
345
|
+
if [ $1 -eq 0 ] ; then
|
346
|
+
# Package removal, not upgrade
|
347
|
+
/bin/systemctl --no-reload disable puppetmaster.service > /dev/null 2>&1 || :
|
348
|
+
/bin/systemctl stop puppetmaster.service > /dev/null 2>&1 || :
|
349
|
+
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
350
|
+
fi
|
351
|
+
%else
|
263
352
|
if [ "$1" = 0 ] ; then
|
264
|
-
|
265
|
-
|
353
|
+
/sbin/service puppetmaster stop > /dev/null 2>&1
|
354
|
+
/sbin/chkconfig --del puppetmaster || :
|
266
355
|
fi
|
356
|
+
%endif
|
267
357
|
|
268
358
|
%postun
|
359
|
+
%if 0%{?_with_systemd}
|
360
|
+
if [ $1 -ge 1 ] ; then
|
361
|
+
# Package upgrade, not uninstall
|
362
|
+
/bin/systemctl try-restart puppetagent.service >/dev/null 2>&1 || :
|
363
|
+
fi
|
364
|
+
%else
|
269
365
|
if [ "$1" -ge 1 ]; then
|
270
|
-
|
366
|
+
/sbin/service puppet condrestart >/dev/null 2>&1 || :
|
271
367
|
fi
|
368
|
+
%endif
|
272
369
|
|
273
370
|
%postun server
|
371
|
+
%if 0%{?_with_systemd}
|
372
|
+
if [ $1 -ge 1 ] ; then
|
373
|
+
# Package upgrade, not uninstall
|
374
|
+
/bin/systemctl try-restart puppetmaster.service >/dev/null 2>&1 || :
|
375
|
+
fi
|
376
|
+
%else
|
274
377
|
if [ "$1" -ge 1 ]; then
|
275
|
-
|
378
|
+
/sbin/service puppetmaster condrestart >/dev/null 2>&1 || :
|
276
379
|
fi
|
380
|
+
%endif
|
277
381
|
|
278
382
|
%clean
|
279
383
|
rm -rf %{buildroot}
|
280
384
|
|
281
385
|
%changelog
|
386
|
+
* <%= Time.now.strftime("%a %b %d %Y") %> Puppet Labs Release <info@puppetlabs.com> - <%= @rpmversion %>-<%= @rpmrelease %>
|
387
|
+
- Build for <%= @version %>
|
388
|
+
|
282
389
|
* Wed Aug 29 2012 Moses Mendoza <moses@puppetlabs.com> - 3.0.0-0.1rc5
|
283
390
|
- Update for 3.0.0 rc5
|
284
391
|
|