diff --git a/app-admin/rex/Manifest b/app-admin/rex/Manifest new file mode 100644 index 00000000..b471e010 --- /dev/null +++ b/app-admin/rex/Manifest @@ -0,0 +1 @@ +DIST Rex-1.13.2.tar.gz 349355 BLAKE2B 49a3d2eacb16550dfc0649e93360b501dfc754d538ee65da8fb227791c5e6ce893067b1feea7f6254c579be3e8ae0bed88e68074faffd552f42bebf6cc2eb1be SHA512 6f7c677b117c9629e5a7a431cea2825bdb77d9eb5a5f005e5ab396ccd7552580ac7c1df6dd4e5cfd02e6ce46937b5a64c18dcf590a134e0f5fcd424bb45e5249 diff --git a/app-admin/rex/files/adjust_patches/0001-LibVirt-Initial-support-for-virtio-scsi-virtual-driv.patch b/app-admin/rex/files/adjust_patches/0001-LibVirt-Initial-support-for-virtio-scsi-virtual-driv.patch new file mode 100644 index 00000000..e241443e --- /dev/null +++ b/app-admin/rex/files/adjust_patches/0001-LibVirt-Initial-support-for-virtio-scsi-virtual-driv.patch @@ -0,0 +1,72 @@ +From a2e15c2fdc17d9257afe66f54d57e2ebb7f53784 Mon Sep 17 00:00:00 2001 +From: Ali Polatel +Date: Thu, 11 Apr 2019 14:49:14 +0200 +Subject: [PATCH 1/2] LibVirt: Initial support for virtio-scsi virtual drives + (read: ssd trim) + +1. Honour `driver_cache` and `driver_discard` keys in storage disk config. +2. Add a SCSI controller if any of the storage disks have SCSI as the target bus. + +The SCSI model defaults to `virtio-scsi` and may be overriden by the +`scsi_model` parameter. + +The second change is also a bug fix since without a SCSI controller +configuration a VM with a virtual disk attached to a SCSI bus won't +boot. +--- + lib/Rex/Virtualization/LibVirt/create.pm | 22 +++++++++++++++++++--- + 1 file changed, 19 insertions(+), 3 deletions(-) + +diff --git a/lib/Rex/Virtualization/LibVirt/create.pm b/lib/Rex/Virtualization/LibVirt/create.pm +index 4f0776fa..956f73d9 100644 +--- a/lib/Rex/Virtualization/LibVirt/create.pm ++++ b/lib/Rex/Virtualization/LibVirt/create.pm +@@ -329,11 +329,15 @@ sub _set_storage_defaults { + function => "0x0", + }; + } +- elsif ( $store->{"bus"} eq "ide" && !exists $store->{"address"} ) { ++ elsif ( ++ ( $store->{"bus"} =~ /\Aide|scsi\Z/ && !exists $store->{"address"} ) ) ++ { ++ # The scsi conditional for the bus works around this error during virsh define: ++ # error: internal error: SCSI controller only supports 1 bus + $store->{"address"} = { + type => "drive", + controller => 0, +- bus => 1, ++ bus => $store->{"bus"} eq "scsi" ? 0 : 1, + unit => 0, + }; + } +@@ -444,7 +448,14 @@ __DATA__ + + <% for my $disk (@{$::storage}) { %> + +- ++ {driver_cache}) { %> ++ cache="<%= $disk->{driver_cache} %>" ++ <% } %> ++ <% if(exists $disk->{driver_discard}) { %> ++ discard="<%= $disk->{driver_discard} %>" ++ <% } %> ++ /> + <% if ($disk->{type} eq "file") { %> + + <% } elsif ($disk->{file} eq "block") { %> +@@ -460,6 +471,11 @@ __DATA__ + +
+ ++ <% if (grep { exists($_->{bus}) && $_->{bus} =~ /scsi/ } @{$::storage}) { %> ++ '> ++
++ ++ <% } %> + <% for my $netdev (@{$::network}) { %> + + <% if(exists $netdev->{mac}) { %> +-- +2.28.0 + diff --git a/app-admin/rex/files/adjust_patches/0002-t-issue-948.t-Fixing-whitespace-detection-in-test.patch b/app-admin/rex/files/adjust_patches/0002-t-issue-948.t-Fixing-whitespace-detection-in-test.patch new file mode 100644 index 00000000..b5702bea --- /dev/null +++ b/app-admin/rex/files/adjust_patches/0002-t-issue-948.t-Fixing-whitespace-detection-in-test.patch @@ -0,0 +1,25 @@ +From 9ccb48425932078f8fe3336576aa4498f895fb6d Mon Sep 17 00:00:00 2001 +From: Chris Travers +Date: Fri, 12 Feb 2021 10:19:01 +0100 +Subject: [PATCH 2/2] t/issue/948.t: Fixing whitespace detection in test + +--- + t/issue/948.t | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/t/issue/948.t b/t/issue/948.t +index 5460058c..4e4468ae 100644 +--- a/t/issue/948.t ++++ b/t/issue/948.t +@@ -26,7 +26,7 @@ sub Rex::Commands::File::file { + my ( $name, %params ) = @_; + + my $fmt = get_image_format(); +- like $params{content}, qr||, ++ like $params{content}, qr||, + "Found file content for $fmt format."; + $count_file++; + } +-- +2.28.0 + diff --git a/app-admin/rex/files/adjust_patches/0003-Shell.pm-add-iDRAC-4.00.00.00-support.patch b/app-admin/rex/files/adjust_patches/0003-Shell.pm-add-iDRAC-4.00.00.00-support.patch new file mode 100644 index 00000000..c5952bf4 --- /dev/null +++ b/app-admin/rex/files/adjust_patches/0003-Shell.pm-add-iDRAC-4.00.00.00-support.patch @@ -0,0 +1,24 @@ +From 0e0711c19c3d7518b591a0575fccf93cc69b9a7e Mon Sep 17 00:00:00 2001 +From: "Maxine E. Aubrey" +Date: Tue, 17 Mar 2020 11:36:28 +0100 +Subject: [PATCH] Shell.pm: add iDRAC 4.00.00.00 support + +--- + lib/Rex/Interface/Shell.pm | 1 + + 1 files changed, 1 insertions(+) + +diff --git a/lib/Rex/Interface/Shell.pm b/lib/Rex/Interface/Shell.pm +index c11416d5..d9480910 100644 +--- a/lib/Rex/Interface/Shell.pm ++++ b/lib/Rex/Interface/Shell.pm +@@ -19,6 +19,7 @@ my %SHELL_PROVIDER = ( + bash => "Rex::Interface::Shell::Bash", + csh => "Rex::Interface::Shell::Csh", + idrac => "Rex::Interface::Shell::Idrac", ++ idrac4 => "Rex::Interface::Shell::Idrac4", + ksh => "Rex::Interface::Shell::Ksh", + sh => "Rex::Interface::Shell::Sh", + tcsh => "Rex::Interface::Shell::Tcsh", +-- +2.28.0 + diff --git a/app-admin/rex/files/adjust_patches/0004-Shell.pm-add-iLO-support.patch b/app-admin/rex/files/adjust_patches/0004-Shell.pm-add-iLO-support.patch new file mode 100644 index 00000000..906d5aec --- /dev/null +++ b/app-admin/rex/files/adjust_patches/0004-Shell.pm-add-iLO-support.patch @@ -0,0 +1,25 @@ +From 0ed1472c8581960d58ce10f8015bbf93742a7d1e Mon Sep 17 00:00:00 2001 +From: "Max E. Aubrey" +Date: Mon, 15 Jul 2019 10:07:32 +0200 +Subject: [PATCH] Shell.pm: add iLO support + +--- + lib/Rex/Interface/Shell.pm | 1 + + 1 files changed, 1 insertions(+) + +diff --git a/lib/Rex/Interface/Shell.pm b/lib/Rex/Interface/Shell.pm +index c11416d5..c10d78bc 100644 +--- a/lib/Rex/Interface/Shell.pm ++++ b/lib/Rex/Interface/Shell.pm +@@ -19,6 +19,7 @@ my %SHELL_PROVIDER = ( + bash => "Rex::Interface::Shell::Bash", + csh => "Rex::Interface::Shell::Csh", + idrac => "Rex::Interface::Shell::Idrac", + idrac4 => "Rex::Interface::Shell::Idrac4", ++ ilo => "Rex::Interface::Shell::Ilo", + ksh => "Rex::Interface::Shell::Ksh", + sh => "Rex::Interface::Shell::Sh", + tcsh => "Rex::Interface::Shell::Tcsh", +-- +2.28.0 + diff --git a/app-admin/rex/files/adjust_patches/0005-Allow-uploading-files-even-when-permissions-cannot-b.patch b/app-admin/rex/files/adjust_patches/0005-Allow-uploading-files-even-when-permissions-cannot-b.patch new file mode 100644 index 00000000..af2a9622 --- /dev/null +++ b/app-admin/rex/files/adjust_patches/0005-Allow-uploading-files-even-when-permissions-cannot-b.patch @@ -0,0 +1,35 @@ +From 7cf37a10fd9c4899164fb72c8631118b252acd74 Mon Sep 17 00:00:00 2001 +From: Oleksii Kliukin +Date: Thu, 18 Jun 2020 23:36:42 +0200 +Subject: [PATCH 1/2] Allow uploading files even when permissions cannot be + set. + +By default, the "file" function uses sftp to upload the target file to +the server. During the upload, the Net::SFTP::Foreign runs chmod +unconditionally, failing if the target file is not owned by the ssh +user, unless that user is a root. This commit changes that behavior by +passing an optional "best_effort" flag that instructs sftp to continue +even if setting permissions has failed. + +As a result, an unprivileged user will be able to use Rex scenarios that +call the "file" function without getting permission denied errors. +--- + lib/Rex/Interface/Fs/OpenSSH.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/Rex/Interface/Fs/OpenSSH.pm b/lib/Rex/Interface/Fs/OpenSSH.pm +index 01eea665..b9ddaa84 100644 +--- a/lib/Rex/Interface/Fs/OpenSSH.pm ++++ b/lib/Rex/Interface/Fs/OpenSSH.pm +@@ -142,7 +142,7 @@ sub upload { + Rex::Commands::profiler()->start("upload: $source -> $target"); + + my $sftp = Rex::get_sftp(); +- unless ( $sftp->put( $source, $target ) ) { ++ unless ( $sftp->put( $source, $target, best_effort => 1) ) { + Rex::Logger::debug("upload: $target is not writable"); + + Rex::Commands::profiler()->end("upload: $source -> $target"); +-- +2.28.0 + diff --git a/app-admin/rex/files/adjust_patches/0006-Only-apply-best-effort-option-if-sudo-is-not-availab.patch b/app-admin/rex/files/adjust_patches/0006-Only-apply-best-effort-option-if-sudo-is-not-availab.patch new file mode 100644 index 00000000..fac9c20c --- /dev/null +++ b/app-admin/rex/files/adjust_patches/0006-Only-apply-best-effort-option-if-sudo-is-not-availab.patch @@ -0,0 +1,54 @@ +From 1935065ea0005c63fe2b4c19c5184ac61a0c7c7a Mon Sep 17 00:00:00 2001 +From: Chris Traverswq +Date: Wed, 15 Jul 2020 09:51:10 +0200 +Subject: [PATCH 2/2] Only apply best effort option if sudo is not available. + +This ensures the current behavior continues for ops but best effort +for writeable files allows other teams to apply changes. + +Also began some initial POD for the OpenSSH module in functions touched. +--- + lib/Rex/Interface/Fs/OpenSSH.pm | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +diff --git a/lib/Rex/Interface/Fs/OpenSSH.pm b/lib/Rex/Interface/Fs/OpenSSH.pm +index b9ddaa84..80784e30 100644 +--- a/lib/Rex/Interface/Fs/OpenSSH.pm ++++ b/lib/Rex/Interface/Fs/OpenSSH.pm +@@ -136,13 +136,32 @@ sub stat { + return %ret; + } + ++=pod ++ ++=head3 OpenSSH->upload($source, $target) ++ ++Uploads an item from source to target. ++ ++If sudo is enabled for the connection will set permissions etc too. ++Otherwise will only attempt to set permissions, and continue successfully ++if not. ++ ++=cut ++ + sub upload { + my ( $self, $source, $target ) = @_; + + Rex::Commands::profiler()->start("upload: $source -> $target"); + + my $sftp = Rex::get_sftp(); +- unless ( $sftp->put( $source, $target, best_effort => 1) ) { ++ ++ # If we are not sudo, we need to fall back to best effort on ++ # file upload. The %best_effort hash will evaluate be expanded ++ # to best_effort => 1 if and and only if is_sudo returns false. ++ ++ my %best_effort = (); ++ $best_effort{best_effort} = 1 unless Rex::is_sudo(); ++ unless ( $sftp->put( $source, $target, %best_effort) ) { + Rex::Logger::debug("upload: $target is not writable"); + + Rex::Commands::profiler()->end("upload: $source -> $target"); +-- +2.28.0 + diff --git a/app-admin/rex/metadata.xml b/app-admin/rex/metadata.xml new file mode 100644 index 00000000..477ce59d --- /dev/null +++ b/app-admin/rex/metadata.xml @@ -0,0 +1,353 @@ + + + + + ops@adjust.com + + + RexOps/Rex + Rex + Rex + Rex::Args + Rex::Args::Integer + Rex::Args::Single + Rex::Args::String + Rex::Batch + Rex::Box + Rex::Box::Amazon + Rex::Box::Base + Rex::Box::Docker + Rex::Box::KVM + Rex::Box::VBox + Rex::CLI + Rex::CMDB + Rex::CMDB::Base + Rex::CMDB::YAML + Rex::Cloud + Rex::Cloud::Amazon + Rex::Cloud::Base + Rex::Cloud::Jiffybox + Rex::Cloud::OpenStack + Rex::Commands + Rex::Commands::Augeas + Rex::Commands::Box + Rex::Commands::Cloud + Rex::Commands::Cron + Rex::Commands::DB + Rex::Commands::Download + Rex::Commands::File + Rex::Commands::Fs + Rex::Commands::Gather + Rex::Commands::Host + Rex::Commands::Inventory + Rex::Commands::Iptables + Rex::Commands::JobControl + Rex::Commands::Kernel + Rex::Commands::LVM + Rex::Commands::MD5 + Rex::Commands::Mkfs + Rex::Commands::Network + Rex::Commands::Notify + Rex::Commands::Partition + Rex::Commands::Pkg + Rex::Commands::PkgConf + Rex::Commands::Process + Rex::Commands::Rsync + Rex::Commands::Run + Rex::Commands::SCM + Rex::Commands::Service + Rex::Commands::SimpleCheck + Rex::Commands::Sync + Rex::Commands::Sysctl + Rex::Commands::Tail + Rex::Commands::Upload + Rex::Commands::User + Rex::Commands::Virtualization + Rex::Config + Rex::Constants + Rex::Cron + Rex::Cron::Base + Rex::Cron::FreeBSD + Rex::Cron::Linux + Rex::Cron::SunOS + Rex::Exporter + Rex::FS::File + Rex::File::Parser::Data + Rex::File::Parser::Ini + Rex::Fork::Manager + Rex::Fork::Task + Rex::Group + Rex::Group::Entry::Server + Rex::Group::Lookup::Command + Rex::Group::Lookup::DBI + Rex::Group::Lookup::File + Rex::Group::Lookup::INI + Rex::Group::Lookup::XML + Rex::Group::Lookup::YAML + Rex::Hardware + Rex::Hardware::Host + Rex::Hardware::Kernel + Rex::Hardware::Memory + Rex::Hardware::Network + Rex::Hardware::Network::Darwin + Rex::Hardware::Network::FreeBSD + Rex::Hardware::Network::Linux + Rex::Hardware::Network::NetBSD + Rex::Hardware::Network::OpenBSD + Rex::Hardware::Network::Solaris + Rex::Hardware::Swap + Rex::Hardware::VirtInfo + Rex::Helper::Array + Rex::Helper::DBI + Rex::Helper::Encode + Rex::Helper::File::Spec + Rex::Helper::File::Stat + Rex::Helper::File::Stat::Unix + Rex::Helper::File::Stat::Win32 + Rex::Helper::Hash + Rex::Helper::INI + Rex::Helper::IP + Rex::Helper::Misc + Rex::Helper::Path + Rex::Helper::Rexfile::ParamLookup + Rex::Helper::Run + Rex::Helper::SSH2 + Rex::Helper::SSH2::Expect + Rex::Helper::System + Rex::Helper::URI + Rex::Helper::UserAgent + Rex::Hook + Rex::Interface::Cache + Rex::Interface::Cache::Base + Rex::Interface::Cache::YAML + Rex::Interface::Connection + Rex::Interface::Connection::Base + Rex::Interface::Connection::Fake + Rex::Interface::Connection::HTTP + Rex::Interface::Connection::HTTPS + Rex::Interface::Connection::Local + Rex::Interface::Connection::OpenSSH + Rex::Interface::Connection::SSH + Rex::Interface::Exec + Rex::Interface::Exec::Base + Rex::Interface::Exec::HTTP + Rex::Interface::Exec::IOReader + Rex::Interface::Exec::Local + Rex::Interface::Exec::OpenSSH + Rex::Interface::Exec::SSH + Rex::Interface::Exec::Sudo + Rex::Interface::Executor + Rex::Interface::Executor::Base + Rex::Interface::Executor::Default + Rex::Interface::File + Rex::Interface::File::Base + Rex::Interface::File::HTTP + Rex::Interface::File::Local + Rex::Interface::File::OpenSSH + Rex::Interface::File::SSH + Rex::Interface::File::Sudo + Rex::Interface::Fs + Rex::Interface::Fs::Base + Rex::Interface::Fs::HTTP + Rex::Interface::Fs::Local + Rex::Interface::Fs::OpenSSH + Rex::Interface::Fs::SSH + Rex::Interface::Fs::Sudo + Rex::Interface::Shell + Rex::Interface::Shell::Ash + Rex::Interface::Shell::Base + Rex::Interface::Shell::Bash + Rex::Interface::Shell::Csh + Rex::Interface::Shell::Default + Rex::Interface::Shell::Idrac + Rex::Interface::Shell::Ksh + Rex::Interface::Shell::Sh + Rex::Interface::Shell::Tcsh + Rex::Interface::Shell::Zsh + Rex::Inventory + Rex::Inventory::Bios + Rex::Inventory::DMIDecode + Rex::Inventory::DMIDecode::BaseBoard + Rex::Inventory::DMIDecode::Bios + Rex::Inventory::DMIDecode::CPU + Rex::Inventory::DMIDecode::Memory + Rex::Inventory::DMIDecode::MemoryArray + Rex::Inventory::DMIDecode::Section + Rex::Inventory::DMIDecode::SystemInformation + Rex::Inventory::HP::ACU + Rex::Inventory::Hal + Rex::Inventory::Hal::Object + Rex::Inventory::Hal::Object::Net + Rex::Inventory::Hal::Object::Storage + Rex::Inventory::Hal::Object::Volume + Rex::Inventory::Proc + Rex::Inventory::Proc::Cpuinfo + Rex::Inventory::SMBios + Rex::Inventory::SMBios::BaseBoard + Rex::Inventory::SMBios::Bios + Rex::Inventory::SMBios::CPU + Rex::Inventory::SMBios::Memory + Rex::Inventory::SMBios::MemoryArray + Rex::Inventory::SMBios::Section + Rex::Inventory::SMBios::SystemInformation + Rex::Logger + Rex::Notify + Rex::Output + Rex::Output::Base + Rex::Output::JUnit + Rex::Pkg + Rex::Pkg::ALT + Rex::Pkg::Arch + Rex::Pkg::Base + Rex::Pkg::Debian + Rex::Pkg::FreeBSD + Rex::Pkg::Gentoo + Rex::Pkg::Mageia + Rex::Pkg::NetBSD + Rex::Pkg::OpenBSD + Rex::Pkg::OpenWrt + Rex::Pkg::Redhat + Rex::Pkg::SuSE + Rex::Pkg::SunOS + Rex::Pkg::SunOS::OpenCSW + Rex::Pkg::SunOS::pkg + Rex::Pkg::Ubuntu + Rex::Pkg::VoidLinux + Rex::PkgConf + Rex::PkgConf::Base + Rex::PkgConf::Debian + Rex::Profiler + Rex::Report + Rex::Report::Base + Rex::Report::YAML + Rex::Require + Rex::Resource + Rex::Resource::Common + Rex::Resource::firewall + Rex::Resource::firewall::Provider::base + Rex::Resource::firewall::Provider::iptables + Rex::Resource::firewall::Provider::ufw + Rex::RunList + Rex::SCM::Git + Rex::SCM::Subversion + Rex::Service + Rex::Service::ALT + Rex::Service::ALT::systemd + Rex::Service::Arch::systemd + Rex::Service::Base + Rex::Service::Debian + Rex::Service::Debian::systemd + Rex::Service::FreeBSD + Rex::Service::Gentoo + Rex::Service::Gentoo::systemd + Rex::Service::Mageia + Rex::Service::Mageia::systemd + Rex::Service::NetBSD + Rex::Service::OpenBSD + Rex::Service::OpenWrt + Rex::Service::Redhat + Rex::Service::Redhat::systemd + Rex::Service::SuSE + Rex::Service::SuSE::systemd + Rex::Service::SunOS + Rex::Service::SunOS::svcadm + Rex::Service::Ubuntu + Rex::Service::VoidLinux + Rex::Shared::Var + Rex::Shared::Var::Array + Rex::Shared::Var::Common + Rex::Shared::Var::Hash + Rex::Shared::Var::Scalar + Rex::Sudo::File + Rex::Task + Rex::TaskList + Rex::TaskList::Base + Rex::TaskList::Parallel_ForkManager + Rex::Template + Rex::Template::NG + Rex::Test + Rex::Test::Base + Rex::Test::Base::has_content + Rex::Test::Base::has_cron + Rex::Test::Base::has_cron_env + Rex::Test::Base::has_dir + Rex::Test::Base::has_file + Rex::Test::Base::has_file_content + Rex::Test::Base::has_output + Rex::Test::Base::has_output_matching + Rex::Test::Base::has_package + Rex::Test::Base::has_service_running + Rex::Test::Base::has_service_stopped + Rex::Test::Base::has_stat + Rex::Transaction + Rex::User + Rex::User::Base + Rex::User::FreeBSD + Rex::User::Linux + Rex::User::NetBSD + Rex::User::OpenBSD + Rex::User::OpenWrt + Rex::User::SunOS + Rex::Value + Rex::Virtualization + Rex::Virtualization::Base + Rex::Virtualization::Docker + Rex::Virtualization::Docker::create + Rex::Virtualization::Docker::daemon + Rex::Virtualization::Docker::delete + Rex::Virtualization::Docker::destroy + Rex::Virtualization::Docker::guestinfo + Rex::Virtualization::Docker::images + Rex::Virtualization::Docker::import + Rex::Virtualization::Docker::info + Rex::Virtualization::Docker::list + Rex::Virtualization::Docker::reboot + Rex::Virtualization::Docker::shutdown + Rex::Virtualization::Docker::start + Rex::Virtualization::Docker::status + Rex::Virtualization::LibVirt + Rex::Virtualization::LibVirt::blklist + Rex::Virtualization::LibVirt::clone + Rex::Virtualization::LibVirt::create + Rex::Virtualization::LibVirt::delete + Rex::Virtualization::LibVirt::destroy + Rex::Virtualization::LibVirt::dumpxml + Rex::Virtualization::LibVirt::guestinfo + Rex::Virtualization::LibVirt::hypervisor + Rex::Virtualization::LibVirt::iflist + Rex::Virtualization::LibVirt::import + Rex::Virtualization::LibVirt::info + Rex::Virtualization::LibVirt::list + Rex::Virtualization::LibVirt::option + Rex::Virtualization::LibVirt::reboot + Rex::Virtualization::LibVirt::shutdown + Rex::Virtualization::LibVirt::start + Rex::Virtualization::LibVirt::status + Rex::Virtualization::LibVirt::vncdisplay + Rex::Virtualization::Lxc + Rex::Virtualization::Lxc::attach + Rex::Virtualization::Lxc::copy + Rex::Virtualization::Lxc::create + Rex::Virtualization::Lxc::destroy + Rex::Virtualization::Lxc::info + Rex::Virtualization::Lxc::list + Rex::Virtualization::Lxc::start + Rex::Virtualization::Lxc::stop + Rex::Virtualization::VBox + Rex::Virtualization::VBox::bridge + Rex::Virtualization::VBox::create + Rex::Virtualization::VBox::delete + Rex::Virtualization::VBox::destroy + Rex::Virtualization::VBox::forward_port + Rex::Virtualization::VBox::guestinfo + Rex::Virtualization::VBox::import + Rex::Virtualization::VBox::info + Rex::Virtualization::VBox::list + Rex::Virtualization::VBox::option + Rex::Virtualization::VBox::reboot + Rex::Virtualization::VBox::share_folder + Rex::Virtualization::VBox::shutdown + Rex::Virtualization::VBox::start + Rex::Virtualization::VBox::status + + diff --git a/app-admin/rex/rex-1.13.2.ebuild b/app-admin/rex/rex-1.13.2.ebuild new file mode 100644 index 00000000..511eb0b1 --- /dev/null +++ b/app-admin/rex/rex-1.13.2.ebuild @@ -0,0 +1,212 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +if [[ ${PV} == 9999 ]]; then + GITHUB_USER=RexOps + GITHUB_REPO=Rex + EGIT_REPO_URI="https://github.com/${GITHUB_USER}/${GITHUB_REPO}.git" + EGIT_BRANCH="master" + EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}-git" + VCS_ECLASS="git-r3" +else + # This is intentional to stop perl-module.eclass doing magic things when it + # shouldn't. Like making ${S} contain "Rex" when the git clone has "rex" + # Also prevents perl-module.eclass provisioning SRC_URI + DIST_AUTHOR=FERKI + DIST_NAME=Rex + KEYWORDS="~amd64 ~x86" +fi +inherit bash-completion-r1 perl-module ${VCS_ECLASS} + +DESCRIPTION="(R)?ex, the friendly automation framework" + +SLOT="0" +IUSE="minimal test" +RESTRICT="!test? ( test )" + +DZIL_DEPENDS=" + dev-perl/Dist-Zilla + dev-perl/Dist-Zilla-Plugin-CheckExtraTests + dev-perl/Dist-Zilla-Plugin-ContributorsFile + dev-perl/Dist-Zilla-Plugin-Git + dev-perl/Dist-Zilla-Plugin-Git-Contributors + dev-perl/Dist-Zilla-Plugin-MakeMaker-Awesome + dev-perl/Dist-Zilla-Plugin-Meta-Contributors + dev-perl/Dist-Zilla-Plugin-MetaProvides-Package + dev-perl/Dist-Zilla-Plugin-NextVersion-Semantic + dev-perl/Dist-Zilla-Plugin-OSPrereqs + dev-perl/Dist-Zilla-Plugin-OurPkgVersion + dev-perl/Dist-Zilla-Plugin-Run + dev-perl/Software-License +" +RDEPEND=" + !minimal? ( + dev-perl/DBI + dev-perl/Expect + dev-perl/IPC-Shareable + dev-perl/XML-LibXML + ) + virtual/perl-Carp + virtual/perl-Data-Dumper + dev-perl/Data-Validate-IP + dev-perl/Devel-Caller + dev-perl/Digest-HMAC + virtual/perl-Digest-MD5 + virtual/perl-Exporter + virtual/perl-File-Spec + dev-perl/HTTP-Message + dev-perl/Hash-Merge + virtual/perl-IO + dev-perl/IO-String + dev-perl/IO-Tty + dev-perl/JSON-MaybeXS + dev-perl/List-MoreUtils + virtual/perl-MIME-Base64 + dev-perl/Net-OpenSSH + dev-perl/Net-SFTP-Foreign + virtual/perl-Scalar-List-Utils + dev-perl/Parallel-ForkManager + dev-perl/Sort-Naturally + dev-perl/String-Escape + virtual/perl-Storable + dev-perl/TermReadKey + virtual/perl-Test-Simple + dev-perl/Text-Glob + virtual/perl-Text-Tabs+Wrap + virtual/perl-Time-HiRes + dev-perl/URI + dev-perl/XML-Simple + dev-perl/libwww-perl + dev-perl/YAML + virtual/perl-version +" + +BDEPEND=" + ${RDEPEND} + >=virtual/perl-CPAN-Meta-Requirements-2.120.620 + >=virtual/perl-ExtUtils-MakeMaker-7.110.100 + >=dev-perl/File-ShareDir-Install-0.60.0 + virtual/perl-Module-Metadata + test? ( + virtual/perl-File-Temp + dev-perl/Test-Deep + dev-perl/Test-Output + dev-perl/Test-UseAllModules + virtual/perl-autodie + ) +" + +PATCHES=( + "${FILESDIR}"/adjust_patches/0001-LibVirt-Initial-support-for-virtio-scsi-virtual-driv.patch + "${FILESDIR}"/adjust_patches/0002-t-issue-948.t-Fixing-whitespace-detection-in-test.patch + "${FILESDIR}"/adjust_patches/0003-Shell.pm-add-iDRAC-4.00.00.00-support.patch + "${FILESDIR}"/adjust_patches/0004-Shell.pm-add-iLO-support.patch + "${FILESDIR}"/adjust_patches/0005-Allow-uploading-files-even-when-permissions-cannot-b.patch + "${FILESDIR}"/adjust_patches/0006-Only-apply-best-effort-option-if-sudo-is-not-availab.patch +) + +[[ ${PV} == 9999 ]] && BDEPEND+=" ${DZIL_DEPENDS}" + +src_unpack() { + if [[ $PV == 9999 ]]; then + "${VCS_ECLASS}"_src_unpack + mkdir -p "${S}" || die "Can't make ${S}" + else + default + fi +} + +dzil_src_prep() { + einfo "Patching dist.ini" + + # This block of sed invocations removes all plugins that aren't + # useful for users to have on Gentoo, because all of them are + # conditional and subjective style checks, which don't indicate + # a real issue for users, and paying the price of their dependencies is undesired. + + # The {N;d} trick adds the [n]ext line after the match to the pattern-space + # so that the final [d]elete deletes the next line too. Can be expanded for each + # line, ie: {N;N;N;d} deletes 3 lines after the match as well as the match. + sed -e '/^\[Test::Kwalitee\]/d' \ + -e '/^\[Test::Perl::Critic\]/d' \ + -e '/^\[PodSyntaxTests\]/d' \ + -e '/^Test::Kwalitee =/d' \ + -e '/^Test::PerlTidy =/d' \ + -e '/^Test::Pod =/d' \ + -e '/^\[Test::CPAN::Changes\]/{N;d}' \ + -e '/^\[OptionalFeature/,/^$/d' \ + -e '/^\[Test::MinimumVersion\]/{N;d}' \ + -i dist.ini || die "Can't patch dist.ini" +} +dzil_env_setup() { + # NextRelease noise :( + mkdir -p ~/.dzil/ + local user="$(whoami)" + local host="$(hostname)" + printf '[%%User]\nname = %s\nemail = %s' "${user}" "${user}@${host}" >> ~/.dzil/config.ini + +} +dzil_to_distdir() { + local dzil_root dest has_missing modname dzil_version + dzil_root="$1" + dest="$2" + + cd "${dzil_root}" || die "Can't enter git workdir '${dzil_root}'"; + + dzil_src_prep + dzil_env_setup + + dzil_version="$(dzil version)" || die "Error invoking 'dzil version'" + einfo "Generating CPAN dist with ${dzil_version}" + + has_missing="" + + einfo "Checking dzil authordeps" + while IFS= read -d $'\n' -r modname; do + if [[ -z "${has_missing}" ]]; then + has_missing=1 + eerror "'dzil authordeps' indicates missing build dependencies" + eerror "These will prevent building, please report a bug" + eerror "Missing:" + fi + eerror " ${modname}" + done < <( dzil authordeps --missing --versions ) + + [[ -z "${has_missing}" ]] || die "Satisfy all missing authordeps first" + + einfo "Checking dzil build deps" + while IFS= read -d $'\n' -r modname; do + if [[ -z "${has_missing}" ]]; then + has_missing=1 + ewarn "'dzil listdeps' indicates missing build dependencies" + ewarn "These may prevent building, please report a bug if they do" + ewarn "Missing:" + fi + ewarn " ${modname}" + done < <( dzil listdeps --missing --versions --author ) + + einfo "Generating release" + dzil build --notgz --in "${dest}" || die "Unable to build CPAN dist in '${dest}'" +} + +src_prepare() { + if [[ ${PV} == 9999 ]]; then + # Uses git sources in WORKDIR/rex-git + # to generate a CPAN-style tree in ${S} + # before letting perl-module.eclass do the rest + dzil_to_distdir "${EGIT_CHECKOUT_DIR}" "${S}" + fi + cd "${S}" || die "Can't enter build dir" + perl-module_src_prepare +} + +src_install() { + newbashcomp "share/${PN}-tab-completion.bash" "${PN}" + + insinto /usr/share/zsh/site-functions + newins "share/${PN}-tab-completion.zsh" "_${PN}" + + perl-module_src_install +} diff --git a/dev-perl/Rex-Interface-Shell-Idrac4/Manifest b/dev-perl/Rex-Interface-Shell-Idrac4/Manifest new file mode 100644 index 00000000..ba7e2b39 --- /dev/null +++ b/dev-perl/Rex-Interface-Shell-Idrac4/Manifest @@ -0,0 +1 @@ +DIST Rex-Interface-Shell-Idrac4-v0.1.0.tar.gz 19097 BLAKE2B be1f9d17a719ced820470c3c769aa82dd258ac9ffd143ab4bf26f2cff5437482f90f30d9df0f1b3f5e7c34356c087479864b59f97c288b250c2ea39095937025 SHA512 dbd056020ed5673127f4a3401788fe1ebb18551d92338037be105aac3dae0f4a4a1f4f28bd58776dccb6adcc8af8201aadf2089bc3dffbda1665312c600fcfc7 diff --git a/dev-perl/Rex-Interface-Shell-Idrac4/Rex-Interface-Shell-Idrac4-0.1.0.ebuild b/dev-perl/Rex-Interface-Shell-Idrac4/Rex-Interface-Shell-Idrac4-0.1.0.ebuild new file mode 100644 index 00000000..38c4aba3 --- /dev/null +++ b/dev-perl/Rex-Interface-Shell-Idrac4/Rex-Interface-Shell-Idrac4-0.1.0.ebuild @@ -0,0 +1,18 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DIST_AUTHOR="ALIP" +DIST_VERSION="v${PV}" +inherit perl-module + +DESCRIPTION="Rex module to support Idrac4" + +LICENSE="|| ( Artistic GPL-1+ )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="app-admin/rex" +DEPEND="${RDEPEND}" diff --git a/dev-perl/Rex-Interface-Shell-Idrac4/metadata.xml b/dev-perl/Rex-Interface-Shell-Idrac4/metadata.xml new file mode 100644 index 00000000..4269d8fb --- /dev/null +++ b/dev-perl/Rex-Interface-Shell-Idrac4/metadata.xml @@ -0,0 +1,10 @@ + + + + + ops@adjust.com + + + Rex::Interface::Shell::Idrac4 - Rex module to support Idrac4 + + diff --git a/dev-perl/Rex-Interface-Shell-Ilo/Manifest b/dev-perl/Rex-Interface-Shell-Ilo/Manifest new file mode 100644 index 00000000..c04f8ac2 --- /dev/null +++ b/dev-perl/Rex-Interface-Shell-Ilo/Manifest @@ -0,0 +1 @@ +DIST Rex-Interface-Shell-Ilo-v0.1.0.tar.gz 19102 BLAKE2B 3f762c2ef8a00a7091cdee22fc0bf92e1689576962de4b4aa3a2fdaf1330a91f443f29e9f9a1adac5b361301de519b6be8dd24af8b6a454175ba78c2b1804564 SHA512 17c8bc95eed4b889b2615219759ecf1ef842c82656aa76f05c53a0c96c2dbe1a16d26432ecb74f9bc4e506cf8852f23d44c26d39514a7d6774f05dc4b3342c84 diff --git a/dev-perl/Rex-Interface-Shell-Ilo/Rex-Interface-Shell-Ilo-0.1.0.ebuild b/dev-perl/Rex-Interface-Shell-Ilo/Rex-Interface-Shell-Ilo-0.1.0.ebuild new file mode 100644 index 00000000..f237152e --- /dev/null +++ b/dev-perl/Rex-Interface-Shell-Ilo/Rex-Interface-Shell-Ilo-0.1.0.ebuild @@ -0,0 +1,18 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DIST_AUTHOR="ALIP" +DIST_VERSION="v${PV}" +inherit perl-module + +DESCRIPTION="Rex module to support iLO" + +LICENSE="|| ( Artistic GPL-1+ )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="app-admin/rex" +DEPEND="${RDEPEND}" diff --git a/dev-perl/Rex-Interface-Shell-Ilo/metadata.xml b/dev-perl/Rex-Interface-Shell-Ilo/metadata.xml new file mode 100644 index 00000000..2229e0a0 --- /dev/null +++ b/dev-perl/Rex-Interface-Shell-Ilo/metadata.xml @@ -0,0 +1,10 @@ + + + + + ops@adjust.com + + + Rex::Interface::Shell::iLO - Rex module to support iLO + +