diff --git a/devel/Vagrantfile b/devel/Vagrantfile index ce146e5..db051e2 100644 --- a/devel/Vagrantfile +++ b/devel/Vagrantfile @@ -4,17 +4,6 @@ ENV['LC_ALL'] = 'C' Vagrant.configure(2) do |config| - # enable package local caching to speed up "vagrant up" -# if Vagrant.has_plugin?("vagrant-sshfs") - config.cache.synced_folder_opts = { - type: :sshfs - } -# end - - if Vagrant.has_plugin?("vagrant-cachier") - config.cache.scope = :box - end - # don't mind about insecure ssh key config.ssh.insert_key = false @@ -25,11 +14,10 @@ Vagrant.configure(2) do |config| lv.default_prefix = 'paf_pkg' end - config.vm.synced_folder '.', '/vagrant', type: 'rsync', disable: true + config.vm.synced_folder '..', '/vagrant', type: 'rsync' config.vm.define 'deb' do |debvm| debvm.vm.box = 'debian/stretch64' - debvm.vm.synced_folder '..', '/vagrant', type: 'rsync' debvm.vm.provision 'DEB builder', type: 'shell', path:'deb-builder.bash' debvm.vm.post_up_message = <<-HEREDOC If no error appeared, you can get the package using the following command: diff --git a/devel/rpm-builder.bash b/devel/rpm-builder.bash index 1e0b4c9..83a327a 100755 --- a/devel/rpm-builder.bash +++ b/devel/rpm-builder.bash @@ -4,10 +4,13 @@ set -o errexit set -o nounset set -o pipefail -yum --nogpgcheck --quiet -y -e 0 install git rpmdevtools perl-Module-Build resource-agents +yum --nogpgcheck --quiet -y -e 0 install git rpmdevtools perl-Module-Build resource-agents rpmlint rpmdev-setuptree -git clone --quiet https://github.com/ClusterLabs/PAF.git /root/PAF -echo silent > /etc/rpmdevtools/curlrc -spectool -R -g /root/PAF/resource-agents-paf.spec -rpmbuild --quiet -ba /root/PAF/resource-agents-paf.spec + +rpmlint /vagrant/resource-agents-paf.spec +cd /vagrant +TAG=$(awk '/^%global _tag/{print $NF}' /vagrant/resource-agents-paf.spec) +git archive --prefix="PAF-${TAG}/" --format=tar.gz v${TAG} > /root/rpmbuild/SOURCES/v${TAG}.tar.gz +rpmbuild --quiet -ba /vagrant/resource-agents-paf.spec +rpmlint /root/rpmbuild/RPMS/noarch/resource-agents-paf-*.noarch.rpm