Project

General

Profile

« Previous | Next » 

Revision 4f515d75

Added by Dominic Cleal over 10 years ago

fixes #4030 - build via librarian-puppet

View differences:

.gitignore
.idea
pkg/
foreman_installer/pkg/
foreman_installer/generate_answers.rb
foreman_installer/LICENSE
foreman_installer/README.md
VERSION
_build
.tmp/
.librarian/
Puppetfile.lock
modules/*
.ruby-*
.gitmodules
[submodule "tftp"]
path = modules/tftp
url = https://github.com/theforeman/puppet-tftp.git
[submodule "apache"]
path = modules/apache
url = https://github.com/stbenjam/puppetlabs-apache.git
[submodule "foreman"]
path = modules/foreman
url = https://github.com/theforeman/puppet-foreman.git
[submodule "foreman_proxy"]
path = modules/foreman_proxy
url = https://github.com/theforeman/puppet-foreman_proxy.git
[submodule "puppet"]
path = modules/puppet
url = https://github.com/theforeman/puppet-puppet.git
[submodule "xinetd"]
path = modules/xinetd
url = https://github.com/puppetlabs/puppetlabs-xinetd.git
[submodule "git"]
path = modules/git
url = https://github.com/theforeman/puppet-git.git
[submodule "dhcp"]
path = modules/dhcp
url = https://github.com/theforeman/puppet-dhcp
[submodule "dns"]
path = modules/dns
url = https://github.com/theforeman/puppet-dns
[submodule "concat_native"]
path = modules/concat_native
url = https://github.com/theforeman/puppet-concat.git
[submodule "mysql"]
path = modules/mysql
url = https://github.com/puppetlabs/puppetlabs-mysql.git
[submodule "postgresql"]
path = modules/postgresql
url = https://github.com/puppetlabs/puppet-postgresql.git
[submodule "stdlib"]
path = modules/stdlib
url = https://github.com/puppetlabs/puppetlabs-stdlib.git
[submodule "concat"]
path = modules/concat
url = https://github.com/ripienaar/puppet-concat.git
Puppetfile
forge 'http://forge.puppetlabs.com'
# Temporary for Apache 2.4 support (post-0.11.0)
mod 'apache', :git => 'https://github.com/puppetlabs/puppetlabs-apache'
# Temporary for Amazon Linux support (https://github.com/puppetlabs/puppetlabs-xinetd/issues/32)
mod 'xinetd', :git => 'https://github.com/puppetlabs/puppetlabs-xinetd'
mod 'foreman', :git => 'https://github.com/theforeman/puppet-foreman'
mod 'foreman_proxy', :git => 'https://github.com/theforeman/puppet-foreman_proxy'
mod 'puppet', :git => 'https://github.com/theforeman/puppet-puppet'
Rakefile
sh 'sed -i "s#\(.*CONFIG_FILE\).*#\1 = \"%s\"#" %s' % ["#{SYSCONFDIR}/foreman/foreman-installer.yaml", t.name]
end
file "#{BUILDDIR}/options.asciidoc" do |t|
['/usr/share/gems/bin/kafo-export-params',
'/usr/lib/ruby/gems/1.8/bin/kafo-export-params',
'/usr/bin/kafo-export-params',
ENV['KAFO_EXPORTER'] || 'kafo-export-params'].each do |exporter|
if File.executable? exporter
sh "#{exporter} -c config/foreman-installer.yaml -f asciidoc > #{BUILDDIR}/options.asciidoc"
end
end
file "#{BUILDDIR}/options.asciidoc" => "#{BUILDDIR}/modules" do |t|
ENV['PATH'].split(':').push(
'/usr/share/gems/bin',
'/usr/lib/ruby/gems/1.8/bin',
'/usr/bin',
ENV['KAFO_EXPORTER']).each do |exporter|
if File.executable? "#{exporter}/kafo-export-params"
sh "#{exporter}/kafo-export-params -c config/foreman-installer.yaml -f asciidoc > #{BUILDDIR}/options.asciidoc"
end
end
end
file "#{BUILDDIR}/foreman-installer.8.asciidoc" =>
......
end
end
file "#{BUILDDIR}/modules" do |t|
if Dir["modules/*"].empty?
sh "librarian-puppet install --verbose --path #{BUILDDIR}/modules"
else
cp_r "modules/", BUILDDIR
end
end
task :build => [
BUILDDIR,
'VERSION',
"#{BUILDDIR}/foreman-installer.yaml",
"#{BUILDDIR}/foreman-installer",
"#{BUILDDIR}/foreman-installer.8",
"#{BUILDDIR}/modules",
]
task :install => :build do |t|
mkdir_p "#{DATADIR}/foreman-installer"
cp_r Dir.glob('{checks,config,modules,VERSION,README.md,LICENSE}'), "#{DATADIR}/foreman-installer"
cp_r Dir.glob('{checks,config,VERSION,README.md,LICENSE}'), "#{DATADIR}/foreman-installer"
cp_r "#{BUILDDIR}/modules", "#{DATADIR}/foreman-installer"
mkdir_p "#{SYSCONFDIR}/foreman"
cp "#{BUILDDIR}/foreman-installer.yaml", "#{SYSCONFDIR}/foreman/"
config/foreman-installer.yaml
:answer_file: ./config/answers.yaml
:installer_dir: .
# Uncomment if you want to load puppet modules from a specific path, $pwd/modules is used by default
:modules_dir: ./modules
:modules_dir: ./_build/modules
## Kafo tuning, customization of core functionality
:name: Foreman
# :no_prefix: false
# :mapping:
:order:
:order:
- foreman
- foreman_proxy
- puppet
modules/apache
Subproject commit c9fef6c882cb57c059920cf347b92e1ed77ac2e6
modules/concat
Subproject commit 04356974f72b90a1d0f57346a00e95a717924e43
modules/concat_native
Subproject commit 517fdffbd3793e79b431635a8f1b3897e5498566
modules/dhcp
Subproject commit 3ecc8b2d4e924aab8cff983eb87f739b51459f4f
modules/dns
Subproject commit 06f8dec8f257f7d92336a28e573b8c7729dccd72
modules/foreman
Subproject commit 24369213b771b2cc96a4642cb3444a615007dfca
modules/foreman_proxy
Subproject commit b157cc1af1fa3249f4e8e95c4ba5e18338b0a2b5
modules/git
Subproject commit 0ff5eb535369c61f484d50317c9ba6d7505e308e
modules/mysql
Subproject commit e667d52c91f10d3ef6191860635efa741675345a
modules/postgresql
Subproject commit 7bd0d82fc2229d877452921e1e2a0b77e8387700
modules/puppet
Subproject commit 488e069c1687605e909b9920e94d21990ac58232
modules/stdlib
Subproject commit 224b8f9a191f635b03ee900a9bf87bfdb0f1a6ed
modules/tftp
Subproject commit 19369d219ba81b90e1ff3d7b01cf185f8f3bd4bb
modules/xinetd
Subproject commit 3a640d8418090431ac469bfdb02a7d06a35c597f
release
#!/bin/bash
#!/bin/bash -e
#
# simple script to create a release without tito
# it works in-place, so take care!
......
git describe $VERSION >/dev/null || echo "WARNING! There is no such tag: $VERSION!"
type librarian-puppet >/dev/null 2>&1 || gem install librarian-puppet --no-ri --no-rdoc
ruby -rpuppet -etrue >/dev/null 2>&1 || gem install puppet --no-ri --no-rdoc
RPMBUILD=$(pwd)/pkg/rpmbuild
TEMPDIR=$(mktemp -d)
trap "rm -rf $TEMPDIR" EXIT
......
pushd $TEMPDIR
rm -rf `find -name ".git*"`
pushd $PROJECT-$VERSION
librarian-puppet install --verbose
popd
tar c $PROJECT-$VERSION | gzip -9 > $RPMBUILD/SOURCES/$PROJECT-$VERSION.tar.gz
cd $PROJECT-$VERSION
rpmbuild -bs $PROJECT.spec --define "dist $DIST" --define "_topdir $RPMBUILD"
update_submodules
#! /bin/bash
#
# Simple script which updates all git submodules
git submodule foreach git pull origin master

Also available in: Unified diff