Compare commits

...
This repository has been archived on 2026-09-10. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.

15 commits

Author SHA1 Message Date
Miro Hrončok
bb5dbe4c87 Orphaned for 6+ weeks 2021-06-18 01:07:31 +02:00
Fedora Release Engineering
7b04363651 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 22:52:59 +00:00
Fedora Release Engineering
125ae6e3da - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 13:31:30 +00:00
Fedora Release Engineering
93c9fb630c - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-31 02:53:58 +00:00
Fedora Release Engineering
e22f2bff64 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-27 02:45:14 +00:00
Fedora Release Engineering
0b940e513c - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-03 11:03:33 +00:00
f4e91508bb Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:53 +01:00
Fedora Release Engineering
25fe694314 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 08:23:41 +00:00
Fedora Release Engineering
aacc143abb - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-09 20:16:37 +00:00
Fedora Release Engineering
3b24e7eea3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 21:09:22 +00:00
Vít Ondruch
ac0dc82759 Drop registration plugins for Vagrant 1.9.1 compatibility. 2017-02-24 14:49:07 +01:00
Fedora Release Engineering
355f69cbbf - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 16:54:28 +00:00
Fedora Release Engineering
781259a2f0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-05 02:31:34 +00:00
Dennis Gilmore
e729b7db70 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-19 01:47:21 +00:00
Michael Adam
ef313d55d9 Add missing dependency for lxc-extra.
BUG: https://bugzilla.redhat.com/show_bug.cgi?id=1193438
2015-02-18 10:34:42 +01:00
6 changed files with 1 additions and 289 deletions

1
.gitignore vendored
View file

@ -1 +0,0 @@
/vagrant-lxc-1.1.0.gem

View file

@ -1,63 +0,0 @@
#!/usr/bin/env ruby
# Create the vagrant-lxc sudo-wrapper from the template.
# Roughly taken from lib/vagrant-lxc/command/sudoers.rb
#
# Michael Adam <obnox@samba.org>
require 'tempfile'
require "vagrant/util/template_renderer"
class CreateWrapper
class << self
def run!(argv)
raise "Argument missing" unless(argv)
template_root = argv.shift
wrapper_dst = "./vagrant-lxc-wrapper"
wrapper_tmp = create_wrapper!(template_root)
system "cp #{wrapper_tmp} #{wrapper_dst}"
puts "#{wrapper_dst} created"
end
private
# This requires vagrant 1.5.2+
# https://github.com/mitchellh/vagrant/commit/3371c3716278071680af9b526ba19235c79c64cb
def create_wrapper!(template_root)
wrapper = Tempfile.new('lxc-wrapper').tap do |file|
template = Vagrant::Util::TemplateRenderer.new(
'sudoers.rb',
#:template_root => Vagrant::LXC.source_root.join('templates').to_s,
#:template_root => "/usr/share/vagrant/gems/gems/vagrant-lxc-1.1.0/templates",
:template_root => template_root,
:cmd_paths => build_cmd_paths_hash,
#:pipework_regex => "#{ENV['HOME']}/\.vagrant\.d/gems/gems/vagrant-lxc.+/scripts/pipework"
:pipework_regex => "/usr/share/vagrant/gems/gems/vagrant-lxc.+/scripts/pipework"
)
file.puts template.render
end
wrapper.close
wrapper.path
end
# for fedora, we know that all these commands
# are found in /usr/bin ...
def build_cmd_paths_hash
{}.tap do |hash|
%w( which cat mkdir cp chown chmod rm tar chown ip ifconfig brctl ).each do |cmd|
#hash[cmd] = `which #{cmd}`.strip
hash[cmd] = "/usr/bin/#{cmd}"
end
#hash['lxc_bin'] = Pathname(`which lxc-create`.strip).parent.to_s
hash['lxc_bin'] = "/usr/bin"
end
end
end
end
CreateWrapper.run!(ARGV)

1
dead.package Normal file
View file

@ -0,0 +1 @@
Orphaned for 6+ weeks

View file

@ -1 +0,0 @@
7ecfc9d962fecd6aac8c3880ed0a00c3 vagrant-lxc-1.1.0.gem

View file

@ -1,77 +0,0 @@
From 43f3351bb2d2c2e80c68bc5c0368c8b5c7f2f9ce Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox@samba.org>
Date: Mon, 26 Jan 2015 16:35:34 +0100
Subject: [PATCH] Make vagrant-lxc-wrapper sudo mechanism useful for system
installed vagrant (on fedora)
- different path for wrapper
- uses vagrant group instead of per-user sudo
- prefixes PATH with /usr/bin
- use system path for piperwork script
...
---
lib/vagrant-lxc.rb | 3 ++-
lib/vagrant-lxc/command/sudoers.rb | 6 ++++--
templates/sudoers.rb.erb | 4 ++--
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/lib/vagrant-lxc.rb b/lib/vagrant-lxc.rb
index 825eb18..1128549 100644
--- a/lib/vagrant-lxc.rb
+++ b/lib/vagrant-lxc.rb
@@ -8,7 +8,8 @@ module Vagrant
end
def self.sudo_wrapper_path
- "/usr/local/bin/vagrant-lxc-wrapper"
+ #"/usr/local/bin/vagrant-lxc-wrapper"
+ "/usr/share/vagrant/gems/gems/vagrant-lxc-1.1.0/scripts/vagrant-lxc-wrapper"
end
end
end
diff --git a/lib/vagrant-lxc/command/sudoers.rb b/lib/vagrant-lxc/command/sudoers.rb
index fcb2099..d75861b 100644
--- a/lib/vagrant-lxc/command/sudoers.rb
+++ b/lib/vagrant-lxc/command/sudoers.rb
@@ -48,7 +48,8 @@ module Vagrant
'sudoers.rb',
:template_root => Vagrant::LXC.source_root.join('templates').to_s,
:cmd_paths => build_cmd_paths_hash,
- :pipework_regex => "#{ENV['HOME']}/\.vagrant\.d/gems/gems/vagrant-lxc.+/scripts/pipework"
+ #:pipework_regex => "#{ENV['HOME']}/\.vagrant\.d/gems/gems/vagrant-lxc.+/scripts/pipework"
+ :pipework_regex => "/usr/share/vagrant/gems/gems/vagrant-lxc.+/scripts/pipework"
)
file.puts template.render
end
@@ -59,7 +60,8 @@ module Vagrant
def create_sudoers!(user, command)
sudoers = Tempfile.new('vagrant-lxc-sudoers').tap do |file|
file.puts "# Automatically created by vagrant-lxc"
- file.puts "#{user} ALL=(root) NOPASSWD: #{command}"
+ #file.puts "#{user} ALL=(root) NOPASSWD: #{command}"
+ file.puts "%vagrant ALL=(root) NOPASSWD: #{command}"
end
sudoers.close
sudoers.path
diff --git a/templates/sudoers.rb.erb b/templates/sudoers.rb.erb
index 94db7f7..d7977bc 100644
--- a/templates/sudoers.rb.erb
+++ b/templates/sudoers.rb.erb
@@ -1,4 +1,4 @@
-#!/opt/vagrant/embedded/bin/ruby
+#!/usr/bin/env ruby
# Automatically created by vagrant-lxc
class Whitelist
@@ -31,7 +31,7 @@ class Whitelist
def run!(argv)
begin
- command, args = `which #{argv.shift}`.chomp, argv || []
+ command, args = `PATH=/usr/bin:$PATH which #{argv.shift}`.chomp, argv || []
check!(command, args)
system "#{command} #{args.join(" ")}"
--
2.1.0

View file

@ -1,147 +0,0 @@
%global vagrant_plugin_name vagrant-lxc
Name: %{vagrant_plugin_name}
Version: 1.1.0
Release: 6%{?dist}
Summary: LXC provider for vagrant
Group: Development/Languages
License: MIT
URL: https://github.com/fgrehm/vagrant-lxc
Source0: https://rubygems.org/gems/%{vagrant_plugin_name}-%{version}.gem
# script needed to generate the vagrant-lxc sudo wrapper script from template.
# part of this srpm
Source1: create_wrapper.rb
Patch1: vagrant-lxc-sudo-wrapper.patch
Requires(pre): shadow-utils
Requires(posttrans): vagrant
Requires(preun): vagrant
Requires: ruby(release)
Requires: ruby(rubygems)
Requires: lxc
Requires: vagrant
BuildRequires: vagrant
BuildRequires: rubygem(rspec) < 3
BuildArch: noarch
%description
LXC provider for vagrant.
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
gem unpack %{SOURCE0}
%setup -q -D -T -n %{vagrant_plugin_name}-%{version}
%patch1 -p1
gem spec %{SOURCE0} -l --ruby > %{vagrant_plugin_name}.gemspec
%build
gem build %{vagrant_plugin_name}.gemspec
%vagrant_plugin_install
%install
mkdir -p %{buildroot}%{vagrant_plugin_dir}
cp -a .%{vagrant_plugin_dir}/* \
%{buildroot}%{vagrant_plugin_dir}/
ruby -I /usr/share/vagrant/lib %{SOURCE1} %{buildroot}%{vagrant_plugin_instdir}/templates
install -m 0555 ./vagrant-lxc-wrapper %{buildroot}%{vagrant_plugin_instdir}/scripts/vagrant-lxc-wrapper
echo "%vagrant ALL=(root) NOPASSWD: %{vagrant_plugin_instdir}/scripts/vagrant-lxc-wrapper" > ./sudoers_file
mkdir -p %{buildroot}%{_sysconfdir}/sudoers.d
install -m 0440 ./sudoers_file %{buildroot}%{_sysconfdir}/sudoers.d/vagrant-lxc
# TODO: enable check.
# currently rubygem-hitimes is missing, but
# Problems building under f21 and newer:
# https://bugzilla.redhat.com/show_bug.cgi?id=1068980
#
#%check
#pushd .%{vagrant_plugin_instdir}
#sed -i '/git/ s/^/#/' Gemfile
#
#bundle exec rspec2 spec
#popd
%pre
getent group vagrant >/dev/null || groupadd -r vagrant
%posttrans
%vagrant_plugin_register %{vagrant_plugin_name}
%preun
%vagrant_plugin_unregister %{vagrant_plugin_name}
%files
%dir %{vagrant_plugin_instdir}
%license %{vagrant_plugin_instdir}/LICENSE.txt
%doc %{vagrant_plugin_instdir}/README.md
%{vagrant_plugin_libdir}
%{vagrant_plugin_instdir}/locales
%exclude %{vagrant_plugin_cache}
%exclude %{vagrant_plugin_instdir}/.gitignore
%{vagrant_plugin_spec}
%attr(440, root, root) %{_sysconfdir}/sudoers.d/vagrant-lxc
%exclude %{vagrant_plugin_instdir}/.rspec
%exclude %{vagrant_plugin_instdir}/.travis.yml
%exclude %{vagrant_plugin_instdir}/.vimrc
%{vagrant_plugin_instdir}/Gemfile.lock
%dir %{vagrant_plugin_instdir}/scripts
%{vagrant_plugin_instdir}/scripts/lxc-template
%{vagrant_plugin_instdir}/scripts/pipework
%attr(555, root, root) %{vagrant_plugin_instdir}/scripts/vagrant-lxc-wrapper
%dir %{vagrant_plugin_instdir}/templates
%{vagrant_plugin_instdir}/templates/sudoers.rb.erb
%files doc
%doc %{vagrant_plugin_docdir}
%doc %{vagrant_plugin_instdir}/CHANGELOG.md
%doc %{vagrant_plugin_instdir}/BOXES.md
%doc %{vagrant_plugin_instdir}/CONTRIBUTING.md
%{vagrant_plugin_instdir}/Rakefile
%{vagrant_plugin_instdir}/Gemfile
%{vagrant_plugin_instdir}/vagrant-lxc.gemspec
%{vagrant_plugin_instdir}/spec
%exclude %{vagrant_plugin_instdir}/spec/support/.gitkeep
%{vagrant_plugin_instdir}/Guardfile
%dir %{vagrant_plugin_instdir}/tasks
%{vagrant_plugin_instdir}/tasks/spec.rake
%{vagrant_plugin_instdir}/vagrant-spec.config.rb
%changelog
* Thu Jan 29 2015 Michael Adam <madam@redhat.com> - 1.1.0-6
- Make some non-standard perms explicit in the files section.
- Own directories that we create.
* Tue Jan 27 2015 Michael Adam <madam@redhat.com> - 1.1.0-5
- Cleanup specfile.
* Mon Jan 26 2015 Michael Adam <madam@redhat.com> - 1.1.0-4
- Ship precreated sudo-wrapper and sudoers file.
* Mon Jan 26 2015 Michael Adam <madam@redhat.com> - 1.1.0-3
- Capitalize summary and description.
- Fix sudo wrapper and "vagrant lxc sudoers" mechansim from upstream.
* Mon Jan 26 2015 Michael Adam <madam@redhat.com> - 1.1.0-2
- Move some files from -doc to main package.
* Sat Jan 24 2015 Michael Adam <madam@redhat.com> - 1.1.0-1
- Initial package for Fedora