Репозиторий Sisyphus
Последнее обновление: 8 декабря 2019 | Пакетов: 17493 | Посещений: 16024240
en ru br
Репозитории ALT
S:6.11.1-alt1
5.1: 0.24.8-alt1
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: puppet

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define        pkgname        puppet
%define        confdir        ext/redhat

Name:          %pkgname
Version:       6.11.1
Release:       alt1
Summary:       A network tool for managing many disparate systems
Group:         System/Servers
License:       Apache-2.0
Url:           https://puppet.com/
Vcs:           https://github.com/puppetlabs/puppet.git
BuildArch:     noarch

Source:        %name-%version.tar
Source1:       client.init
Source2:       puppet.service
Source3:       puppet-nm-dispatcher
BuildRequires(pre): rpm-build-ruby
BuildRequires: gem(yard)

%gem_replace_version CFPropertyList ~> 3.0
%add_findreq_skiplist %ruby_gemslibdir/*
Requires:      shadow-change


%description
Puppet lets you centrally manage every important aspect of your
system using a cross-platform specification language that manages
all the separate elements normally aggregated in different files,
like users, cron jobs, and hosts, along with obviously discrete
elements like packages, services, and files.


%package       -n gem-%pkgname
Summary:       Core library code for %gemname gem
Group:         Development/Documentation
BuildArch:     noarch

%description   -n gem-%pkgname
%summary.


%package       -n gem-%pkgname-doc
Summary:       Documentation for %gemname gem
Group:         Development/Documentation
BuildArch:     noarch

%description   -n gem-%pkgname-doc
%summary.


%prep
%setup -n %name-%version

%build
%ruby_build --ignore=full_catalog,acceptance

%install
%ruby_install

# SysVInit files

install -Dp -m0644 %confdir/client.sysconfig %buildroot%_sysconfdir/sysconfig/puppet
install -Dp -m0755 %SOURCE1 %buildroot%_initrddir/puppet
# Systemd files
install -Dp -m0644 %SOURCE2 %buildroot%_unitdir/puppet.service
ln -s %_unitdir/puppet.service %buildroot%_unitdir/puppetagent.service

install -Dp -m0644 %confdir/logrotate %buildroot%_sysconfdir/logrotate.d/puppet
install -Dp -m0644 conf/fileserver.conf %buildroot%_sysconfdir/puppet/fileserver.conf

# Create other configuration directories

mkdir -p %buildroot%_sysconfdir/puppet/ssl/{public_keys,certificate_requests,certs,ca/requests,ca/private,ca/signed,private,private_keys}
mkdir -p %buildroot%_sysconfdir/puppet/{code,modules,environments/production/manifests}

# Setup tmpfiles.d config

mkdir -p %buildroot%_tmpfilesdir
echo "D /run/%name 0755 _%name %name -" > \
   %buildroot%_tmpfilesdir/%name.conf

# Create puppet modules directory for puppet module tool

mkdir -p %buildroot%_sysconfdir/%name/modules

# Create service directory

mkdir -p %buildroot{%_localstatedir,%_logdir,%_var/run,%_cachedir}/puppet

# Install NetworkManager dispatcher

install -Dpv %SOURCE3 \
   %buildroot%_sysconfdir/NetworkManager/dispatcher.d/98-%{name}

# Add puppetdb example configuration to puppet.conf

cat >> %buildroot%_sysconfdir/puppet/puppet.conf << END.
# Example of puppetdb integration
#[master]
#storeconfigs = true
#storeconfigs_backend = puppetdb
#report = true
#reports = puppetdb
END.

# link to gem library code base

ln -s %ruby_gemlibdir %buildroot%_datadir/%pkgname


%pre
%_sbindir/groupadd -r -f puppet
%_sbindir/useradd -r -n -g puppet -d %_localstatedir/puppet -s /dev/null -c Puppet _puppet >/dev/null 2>&1 ||:

%post
%post_service puppet

%preun
%preun_service puppet

%files
%_bindir/puppet
%_initdir/puppet
%_unitdir/puppet.service
%_unitdir/puppetagent.service
%config(noreplace) %_tmpfilesdir/%name.conf
%dir %_sysconfdir/puppet
%attr(0771,_puppet,puppet) %dir %_sysconfdir/puppet/ssl
%attr(0755,_puppet,puppet) %dir %_sysconfdir/puppet/ssl/public_keys
%attr(0755,_puppet,puppet) %dir %_sysconfdir/puppet/ssl/certificate_requests
%attr(0755,_puppet,puppet) %dir %_sysconfdir/puppet/ssl/certs
%attr(0755,_puppet,puppet) %dir %_sysconfdir/puppet/ssl/ca
%attr(0755,_puppet,puppet) %dir %_sysconfdir/puppet/ssl/ca/requests
%attr(0750,_puppet,puppet) %dir %_sysconfdir/puppet/ssl/ca/private
%attr(0755,_puppet,puppet) %dir %_sysconfdir/puppet/ssl/ca/signed
%attr(0750,_puppet,puppet) %dir %_sysconfdir/puppet/ssl/private
%attr(0750,_puppet,puppet) %dir %_sysconfdir/puppet/ssl/private_keys
%dir %_sysconfdir/puppet/environments
%dir %_sysconfdir/puppet/environments/production
%dir %_sysconfdir/puppet/environments/production/manifests
%dir %_sysconfdir/puppet/code
%dir %_sysconfdir/puppet/modules
%config(noreplace) %_sysconfdir/puppet/puppet.conf
%config(noreplace) %_sysconfdir/sysconfig/puppet
%config(noreplace) %_sysconfdir/logrotate.d/puppet
%config(noreplace) %_sysconfdir/puppet/fileserver.conf
%_sysconfdir/NetworkManager/dispatcher.d/98-%{name}
%attr(1770,_puppet,puppet) %dir %_localstatedir/puppet
%_localstatedir/puppet/
%attr(1770,_puppet,puppet) %dir %_logdir/puppet
%attr(1770,_puppet,puppet) %dir %_var/run/puppet
%doc %_man8dir/*
%doc %_man5dir/puppet.conf.5*
%dir %_datadir/puppet
%dir %_logdir/puppet
%dir %_cachedir/puppet
%dir %_localstatedir//puppet
%dir %_var/run/puppet

%files         -n gem-%pkgname
%ruby_gemspec
%ruby_gemlibdir

%files         -n gem-%pkgname-doc
%ruby_gemdocdir

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin