Skip to content

Commit

Permalink
Do not get source from gh in rpm builder
Browse files Browse the repository at this point in the history
  • Loading branch information
ioguix committed Mar 9, 2020
1 parent 2e3c910 commit a7461ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
14 changes: 1 addition & 13 deletions devel/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand Down
13 changes: 8 additions & 5 deletions devel/rpm-builder.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a7461ba

Please sign in to comment.