2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-05-02 13:07:46 +00:00

Merge pull request #8 from VersatusHPC/fix/rebuild-genesis-base

Build xCAT-genesis-base in EL10
This commit is contained in:
Daniel Hilst
2026-04-17 11:11:09 -03:00
committed by GitHub
31 changed files with 1683 additions and 151 deletions

View File

@@ -2,26 +2,26 @@
xCAT is a toolkit for deployment and administration of clusters of all sizes.
# Sunsetting xCAT and transitioning to Confluent
# The xCAT sunset was only a quick eclipse
Dear xCAT Community,
As noted in our previous updates and during the informal BoF sessions at SC23 and SC24, the consortium has been focused on both completing the final work for xCAT and preparing for the transition to its successor.
The xCAT sunset has changed course. VersatusHPC has been invited to join the xCAT Consortium, and future development will move toward direct upstream contributions coordinated with the Consortium and its existing member companies.
As committed, we delivered Enterprise Linux 9 (EL9) support in the xCAT 2.17 release. This represents the final planned enablement for xCAT.
That matters most for Enterprise Linux 10 (EL10). EL10 support is coming to xCAT, restoring a future operating-system path for sites that still rely on xCAT. This is an important change from the previous sunset guidance, where the lack of an EL10 path was one of the strongest reasons to move away from xCAT.
xCAT is now officially being sunsetted. The consortium will not provide support beyond existing platforms, and Enterprise Linux 10 (EL10) will not be supported. Active development and all new feature work have transitioned fully to **Confluent**, which we recognise as the official successor to xCAT.
The xCAT Consortium continues to recommend **Confluent** as the long-term successor to xCAT, and that remains the Consortium position. Users planning new cluster-management deployments should evaluate Confluent and its xCAT comparison documentation.
While xCAT will remain in maintenance mode, with community pull requests still welcome and reviewed, there will be no new features or support for future operating systems.
At the same time, xCAT is no longer sunsetted. The Consortium and participating companies will continue updating xCAT while there is community and user demand for it.
In summary:
- xCAT has delivered its final milestone with EL9 support.
- No EL10 or future OS enablement will be added.
- Community contributions are still accepted and reviewed.
- All development effort is now focused on **Confluent**, the successor to xCAT.
- xCAT development is continuing upstream through the Consortium and participating companies.
- Enterprise Linux 10 support is coming.
- Confluent remains the Consortium-recommended successor and migration path.
- xCAT updates will continue while there is community and user demand.
We want to sincerely thank the community for the years of contributions, support, and participation in shaping xCAT. We now look forward to continuing that journey with you in the **Confluent community**, where the future of open, vendor-agnostic cluster management will continue to grow.
We want to thank the xCAT Consortium and community for keeping this project moving. The sun went behind the moon for a moment, but xCAT is still here.
For more information on **Confluent** and how to get started, please visit the **Confluent**: [Project Page](https://github.com/xcat2/confluent), [Documentation](https://xcat2.github.io/confluent-docs/) or [Confluent vs xCAT comparison](https://xcat2.github.io/confluent-docs/miscellaneous/confluentvxcat/).
@@ -49,4 +49,3 @@ xCAT is made available under the EPL license: https://opensource.org/licenses/ec
# Developers
Want to help? Check out the [developers guide](http://xcat-docs.readthedocs.io/en/latest/developers)!

View File

@@ -5,12 +5,48 @@ use warnings;
use feature 'say';
use Data::Dumper;
use File::Copy ();
use File::Slurper qw(read_text write_text);
use Parallel::ForkManager;
use Getopt::Long qw(GetOptions);
sub install_deps {
system(<<"EOF");
set -x
source /etc/os-release
case "\$ID" in
rhel)
subscription-manager repos --enable codeready-builder-for-rhel-10-\$(arch)-rpms
;;
*)
dnf config-manager --set-enabled crb
;;
esac
dnf install -y perl-generators https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
dnf install -y \$(/usr/lib/rpm/perl.req $0)
dnf install -y tar mock nginx createrepo podman rpmdevtools
systemctl enable --now nginx
rpmdev-setuptree
EOF
$? >> 8;
}
BEGIN {
exit(install_deps())
if grep { "--install_deps" eq $_ } @ARGV;
}
use Carp;
use Cwd qw();
use Data::Dumper;
use File::Copy qw(cp);
use File::Path qw(make_path remove_tree);
use File::Slurper qw(read_text write_text);
use FindBin qw($Bin);
use Getopt::Long qw(GetOptions);
use Parallel::ForkManager;
use Pod::Usage qw(pod2usage);
use autodie;
use autodie qw(cp);
my $SOURCES = "$ENV{HOME}/rpmbuild/SOURCES";
my $VERSION = read_text("Version");
@@ -22,6 +58,30 @@ chomp($VERSION);
chomp($RELEASE);
chomp($GITINFO);
sub os_release {
my %os;
open my $fh, '<', '/etc/os-release' or die "Cannot open /etc/os-release: $!";
while (<$fh>) {
chomp;
next if /^\s*#/ || !/=/;
my ($k, $v) = split /=/, $_, 2;
$v =~ s/^["'](.*)["']$/$1/; # strip surrounding quotes
$os{$k} = $v;
}
return %os; # usage: my %os = os_release();
}
sub arch {
my $arch = `uname -m`;
chomp $arch;
return $arch;
}
my $ARCH = arch();
my %OS = os_release();
my $DISTRO = $OS{ID};
my @PACKAGES = qw(
perl-xCAT
@@ -29,61 +89,68 @@ my @PACKAGES = qw(
xCAT-buildkit
xCAT-client
xCAT-confluent
xCAT-genesis-base
xCAT-genesis-scripts
xCAT-openbmc-py
xCAT-probe
xCAT-rmc
xCAT-server
xCAT-test
xCAT-vlan);
xCAT-vlan
);
my @TARGETS = qw(
rhel+epel-8-x86_64
rhel+epel-9-x86_64
rhel+epel-10-x86_64);
my @TARGETS = (
"$DISTRO+epel-8-$ARCH",
"$DISTRO+epel-9-$ARCH",
"$DISTRO+epel-10-$ARCH",
);
my %opts = (
targets => \@TARGETS,
packages => \@PACKAGES,
nproc => int(`nproc --all`),
force => 0,
verbose => 0,
xcat_dep_path => "$PWD/../xcat-dep/",
configure_nginx => 0,
force => 0,
help => 0,
nginx_port => 8080,
nproc => int(`nproc --all`),
packages => \@PACKAGES,
repo_mode => "file",
targets => \@TARGETS,
verbose => 0,
xcat_dep_path => "$PWD/../xcat-dep/",
);
GetOptions(
"target=s@" => \$opts{targets},
"package=s@" => \$opts{packages},
"nproc=i" => \$opts{nproc},
"verbose" => \$opts{verbose},
"force" => \$opts{force},
"xcat_dep_path=s" => \$opts{xcat_dep_path},
"configure_nginx" => \$opts{configure_nginx},
"force" => \$opts{force},
"help" => \$opts{help},
"nginx_port" => \$opts{nginx_port},
"nproc=i" => \$opts{nproc},
"package=s@" => \$opts{packages},
"repo-mode=s" => \$opts{repo_mode},
"target=s@" => \$opts{targets},
"verbose" => \$opts{verbose},
"xcat_dep_path=s" => \$opts{xcat_dep_path},
"setup_local_repos" => \$opts{setup_local_repos},
) or usage();
sub usage {
my (%args) = @_;
my $verbose = $args{verbose} // 1;
my $exitval = $args{exitval} // 2;
my $message = $args{message};
pod2usage(
-verbose => $verbose,
-exitval => $exitval,
(defined($message) && length($message) ? (-message => "$message\n") : ()),
);
}
sub sh {
my ($cmd) = @_;
say "Running: $cmd"
if $opts{verbose};
open my $fh, "-|", "bash -lc '$cmd'" or die "cannot run $cmd: $!";
while (my $line = <$fh>) {
print $line
if $opts{verbose};
}
close $fh;
return $? >> 8;
}
# cp $src, $dst copies $src to $dst or aborts with an error message
sub cp {
my ($src, $dst) = @_;
File::Copy::copy($src, $dst) or die "copy $src, $dst failed: $!";
system($cmd);
$? >> 8;
}
# sed { s/foo/bar/ } $filepath applies s/foo/bar/ to the file at $filepath
@@ -96,6 +163,30 @@ sub sed (&$) {
write_text($path, $content);
}
sub is_in {
my $needle = shift;
for (@_) {
return 1 if $_ eq $needle;
}
0;
}
sub genesis_tarch_from_targetarch {
my ($targetarch) = @_;
return 'ppc64' if $targetarch eq 'ppc64le';
return 'x86' if $targetarch =~ /^i[3-6]86$/;
return $targetarch;
}
sub targetarch_from_target {
my ($target) = @_;
return $ARCH unless defined $target && length $target;
my @parts = split /-/, $target;
my $arch = $parts[-1];
$arch =~ s/^\s+|\s+$//g;
return lc $arch;
}
# product(\@A, \@B) returns the catersian product of \@A and \@B
sub product {
my ($a, $b) = @_;
@@ -105,6 +196,27 @@ sub product {
} @$a
}
sub setup_repo {
my (%opts) = @_;
my $id = $opts{-id} or confess "-id is required";
my $name = $opts{-name} // $id;
my $url = $opts{-baseurl} or confess "-url is required";
my $gpgkey = $opts{-gpgkey};
my $gpgcheck = $gpgkey ? 1 : 0 ;
my $gpgkey_line =
$gpgkey
? "gpgkey=$gpgkey"
: "# gpgkey=";
write_text("/etc/yum.repos.d/$id.repo", <<"EOF");
[$id]
name=$name
baseurl=$url
$gpgkey_line
gpgcheck=$gpgcheck
EOF
$? >> 0;
}
sub createmockconfig {
my ($pkg, $target) = @_;
my $chroot = "$pkg-$target";
@@ -115,12 +227,36 @@ sub createmockconfig {
$contents =~ s/config_opts\['root'\]\s+=.*/config_opts['root'] = \"$chroot\"/;
if ($pkg eq "perl-xCAT") {
# perl-generators is required for having perl(xCAT::...) symbols
# exported by the RPM
# exported by the RPM
$contents .= "config_opts['chroot_additional_packages'] = 'perl-generators'\n";
}
write_text($cfgfile, $contents);
}
sub buildsources_genesis_base($) {
my ($target) = @_;
die "Assertion failed! No directory xCAT-genesis-builder in the current directory"
unless -d "./xCAT-genesis-builder";
my $staging_parent = "/tmp/xcat-genesis-base-build-support.$$";
my $staging_root = "$staging_parent/xCAT-genesis-base-build-support";
my $support_tarball = "$SOURCES/xCAT-genesis-base-build-support.tar.bz2";
remove_tree($staging_parent) if -e $staging_parent;
make_path("$staging_root/dracut_105");
sh(qq(cp -a "xCAT-genesis-builder/dracut_105" "$staging_root/"))
and die "Error copying dracut_105 sources";
cp "xCAT-genesis-builder/80-net-name-slot.rules",
"$staging_root/80-net-name-slot.rules";
unlink $support_tarball if -f $support_tarball;
sh(qq(tar -cjf "$support_tarball" -C "$staging_parent" xCAT-genesis-base-build-support))
and die "Error creating $support_tarball";
remove_tree($staging_parent);
}
sub buildsources {
my ($pkg, $target) = @_;
@@ -130,7 +266,7 @@ sub buildsources {
cp "xCAT-genesis-scripts/usr/bin/$f", "$pkg/postscripts/$f";
sed { s/xcat.genesis.$f/$f/ } "${pkg}/postscripts/$f";
}
qx {bash -c '
sh(<<"EOF");
cd xCAT
tar --exclude upflag -czf $SOURCES/postscripts.tar.gz postscripts LICENSE.html
tar -czf $SOURCES/prescripts.tar.gz prescripts
@@ -140,19 +276,46 @@ sub buildsources {
cp xcat.conf $SOURCES
cp xcat.conf.apach24 $SOURCES
cp xCATMN $SOURCES
'};
EOF
} elsif ($pkg eq "xCAT-genesis-scripts") {
sh qq(tar -cjf "$SOURCES/$pkg.tar.bz2" $pkg);
} elsif ($pkg eq "xCAT-genesis-base") {
buildsources_genesis_base($target);
} elsif ($pkg eq "xCATsn") {
sh(<<"EOF");
tar -czf "$SOURCES/$pkg-$VERSION.tar.gz" $pkg
tar -czf "$SOURCES/license.tar.gz" -C $pkg LICENSE.html
tar -czf "$SOURCES/etc.tar.gz" -C xCAT etc
cp $pkg/xcat.conf $SOURCES
cp $pkg/xcat.conf.apach24 $SOURCES
cp $pkg/xCATSN $SOURCES
EOF
# xCATsn.spec consumes templates from xCAT shared templates payload.
sh qq(tar -czf "$SOURCES/templates.tar.gz" xCAT/templates) unless -f "$SOURCES/templates.tar.gz";
} else {
`tar -czf "$SOURCES/$pkg-$VERSION.tar.gz" $pkg`;
sh qq(tar -czf "$SOURCES/$pkg-$VERSION.tar.gz" $pkg);
}
}
sub buildspkgs {
my ($pkg, $target) = @_;
my $chroot = "$pkg-$target";
my $diskcache = "dist/$target/srpms/$pkg-$VERSION-$RELEASE.src.rpm";
my $chroot = "$pkg-$target";
my $targetarch = targetarch_from_target($target);
my $genesis_tarch = genesis_tarch_from_targetarch($targetarch);
my $diskcache = (
$pkg eq 'xCAT-genesis-scripts' || $pkg eq 'xCAT-genesis-base'
) ? "dist/$target/srpms/$pkg-$genesis_tarch-$VERSION-$RELEASE.src.rpm"
: "dist/$target/srpms/$pkg-$VERSION-$RELEASE.src.rpm";
return if -f $diskcache and not $opts{force};
my $dir = sub {
return "xCAT-genesis-builder"
if $pkg eq "xCAT-genesis-base";
$pkg;
}->();
my @opts;
push @opts, "--quiet" unless $opts{verbose};
@@ -166,7 +329,7 @@ mock -r $chroot \\
--define "release $RELEASE" \\
--define "gitinfo $GITINFO" \\
--buildsrpm \\
--spec $pkg/$pkg.spec \\
--spec $dir/$pkg.spec \\
--sources $SOURCES \\
--resultdir "dist/$target/srpms/"
EOF
@@ -177,16 +340,37 @@ sub buildpkgs {
my $optsref = \%opts;
my $chroot = "$pkg-$target";
my $targetarch = (split /-/, $target, 3)[2];
my $arch = $pkg eq "xCAT" ? $targetarch : "noarch";
my @native_pkgs = qw(
xCAT
xCAT-genesis-scripts
);
my $diskcache = "dist/$target/rpms/$pkg-$VERSION-$RELEASE.$arch.rpm";
# get x86_64 from rhel+epel-9-x86_64
my $targetarch = targetarch_from_target($target);
# xCAT genesis packages include the translated target arch in their file names.
my $arch = is_in($pkg, @native_pkgs) ? $targetarch : "noarch";
my $genesis_tarch = genesis_tarch_from_targetarch($targetarch);
my $diskcache = (
$pkg eq 'xCAT-genesis-scripts' || $pkg eq 'xCAT-genesis-base'
) ? "dist/$target/rpms/$pkg-$genesis_tarch-$VERSION-$RELEASE.noarch.rpm"
: "dist/$target/rpms/$pkg-$VERSION-$RELEASE.$arch.rpm";
return if -f $diskcache and not $opts{force};
my @opts;
push @opts, "--quiet" unless $opts{verbose};
say "Building $diskcache";
my $spkgname = sub {
return "${pkg}-${genesis_tarch}-${VERSION}-${RELEASE}.src.rpm"
if $pkg eq 'xCAT-genesis-scripts';
return "xCAT-genesis-base-${genesis_tarch}-${VERSION}-${RELEASE}.src.rpm"
if $pkg eq 'xCAT-genesis-base';
return "$pkg-${VERSION}-${RELEASE}.src.rpm";
}->();
say "Building $pkg $diskcache";
sh(<<"EOF");
mock -r $chroot \\
@@ -196,7 +380,7 @@ mock -r $chroot \\
--define "release $RELEASE" \\
--define "gitinfo $GITINFO" \\
--resultdir "dist/$target/rpms/" \\
--rebuild dist/$target/srpms/$pkg-${VERSION}-${RELEASE}.src.rpm
--rebuild dist/$target/srpms/$spkgname
EOF
}
@@ -209,7 +393,27 @@ sub buildall {
}
sub configure_nginx {
my $xcat_dep_path = $opts{xcat_dep_path};
my %os = os_release();
my $version = $os{VERSION_ID};
my $xcat_dep_path;
if ($version > 10) {
setup_repo
-id => "VersatusHPC",
-baseurl => "https://mirror.versatushpc.com.br/versatushpc/rpm/el10/";
$xcat_dep_path = $opts{xcat_dep_path};
confess "Missing xcat-dep folder in $xcat_dep_path: No such file or directory"
unless -d $xcat_dep_path;
} elsif ($version =~ /^9/) {
$xcat_dep_path = "https://mirror.versatushpc.com.br/xcat/yum/xcat-dep/rh9/";
} elsif ($version =~ /^8/) {
$xcat_dep_path = "https://mirror.versatushpc.com.br/xcat/yum/xcat-dep/rh8/";
} else {
confess "Unexpected OS version $version";
}
confess "xcat-dep path still undef, this is likely to be a bug"
unless defined $xcat_dep_path;
my $port = $opts{nginx_port};
my $conf = <<"EOF";
server {
@@ -223,7 +427,7 @@ EOF
my $fullpath = "$PWD/dist/$target/rpms";
$conf .= <<"EOF";
location /$target/ {
alias $fullpath/;
alias $fullpath/;
autoindex on;
index off;
allow all;
@@ -233,7 +437,7 @@ EOF
# TODO:I need one xcat-dep for each target
$conf .= <<"EOF";
location /xcat-dep/ {
alias $xcat_dep_path;
alias $xcat_dep_path;
autoindex on;
index off;
allow all;
@@ -242,8 +446,55 @@ EOF
EOF
write_text("/etc/nginx/conf.d/xcat-repos.conf", $conf);
`systemctl restart nginx`;
$? >> 8;
}
sub repo_mode {
my $mode = lc($opts{repo_mode} // "file");
return $mode;
}
sub xcat_dep_file_repo_baseurl {
my ($version, $arch) = @_;
my $xcat_dep_path = $opts{xcat_dep_path};
confess "Missing xcat-dep path: --xcat_dep_path is empty"
unless defined $xcat_dep_path && length $xcat_dep_path;
$xcat_dep_path =~ s{/+$}{};
my $repo_path = "$xcat_dep_path/el$version/$arch";
confess "Missing xcat-dep repository path in $repo_path: No such directory"
unless -d $repo_path;
return "file://$repo_path";
}
sub setup_local_repos {
my ($target) = @_;
$target //= $opts{targets}->[0]
or die "A target must be provided for setup_local_repos";
my $mode = repo_mode();
my $core_baseurl = (
$mode eq "file"
? "file://$PWD/dist/$target/rpms"
: "http://127.0.0.1:$opts{nginx_port}/$target"
);
my $exit = setup_repo
-id => "xcat-core-local",
-baseurl => $core_baseurl;
return $exit if $exit;
my %os = os_release();
my $version = int $os{VERSION_ID};
my $arch = $ARCH;
my $xcat_dep_baseurl = (
$mode eq "file"
? xcat_dep_file_repo_baseurl($version, $arch)
: "http://127.0.0.1:$opts{nginx_port}/xcat-dep/el$version/$arch"
);
$exit = setup_repo
-id => "xcat-dep",
-baseurl => $xcat_dep_baseurl;
}
sub update_repo {
my ($target) = @_;
say "Creating repository dist/$target/rpms";
@@ -252,36 +503,14 @@ sub update_repo {
}
sub usage {
my ($errmsg) = @_;
say STDERR "Usage: $0 [--package=<pkg1>] [--target=<tgt1>] [--package=<pgk2>] [--target=<tgt2>] ...";
say STDERR "";
say STDERR " RPM builder script";
say STDERR " .. build xCAT RPMs for these targets:";
say STDERR map { " $_\n" } @TARGETS;
say STDERR "";
say STDERR " Options:";
say STDERR "";
say STDERR " --target <tgt> .................. build only these targets";
say STDERR " --package <pkg> ................. build only these packages";
say STDERR " --force ......................... override built RPMS";
say STDERR " --configure_nginx ............... update nginx configuration";
say STDERR " --nginx_port=8080 ............... change the nginx port in";
say STDERR " (use with --configure_nginx)";
say STDERR " --nproc <N> ..................... run up to N jobs in parallel";
say STDERR " --xcat_dep_path=../xcat-dep ..... path to xcat-dep repositories";
say STDERR "";
say STDERR " If no --target or --package is given all combinations are built";
say STDERR "";
say STDERR " See test/README.md for more information";
say STDERR $errmsg if $errmsg;
exit -1;
}
sub main {
return usage() if $opts{help};
return configure_nginx() if $opts{configure_nginx};
usage(verbose => 2, exitval => 0) if $opts{help};
my $mode = repo_mode();
return usage(message => "Invalid --repo-mode '$opts{repo_mode}'. Allowed values: file, http")
unless $mode eq "file" || $mode eq "http";
return exit(configure_nginx()) if $opts{configure_nginx};
return exit(setup_local_repos()) if $opts{setup_local_repos};
my @rpms = product($opts{packages}, $opts{targets});
my $pm = Parallel::ForkManager->new($opts{nproc});
@@ -306,9 +535,130 @@ sub main {
}
$pm->wait_all_children;
configure_nginx();
# Default run builds artifacts only.
# Repo setup/nginx configuration are explicit actions.
exit(0);
}
main();
__END__;
=head1 NAME
buildrpms.pl - Build xCAT RPM packages with mock
=head1 SYNOPSIS
perl buildrpms.pl [options]
=head1 DESCRIPTION
Build xCAT packages (SRPM and RPM) for one or more targets using mock.
By default, this script only performs package builds and repository metadata
updates under C<dist/>. It does not configure nginx or yum repositories unless
explicitly requested.
=head1 OPTIONS
=over 4
=item B<--help>
Show usage text and exit.
=item B<--install_deps>
Install host build dependencies, mock, nginx, and supporting tools.
This option is handled before normal option parsing.
=item B<--target>=I<TARGET>
Build for the specified target. Repeatable. Example:
C<rocky+epel-10-ppc64le>.
=item B<--package>=I<PACKAGE>
Build only selected package(s). Repeatable.
=item B<--nproc>=I<N>
Number of parallel workers used by C<Parallel::ForkManager>.
Default: all host CPUs.
=item B<--force>
Rebuild artifacts even if output files already exist.
=item B<--verbose>
Print executed shell commands.
=item B<--xcat_dep_path>=I<PATH>
Path to the local C<xcat-dep> tree. Default: C<../xcat-dep/>.
Used by nginx configuration and file-based repo setup.
=item B<--repo-mode>=I<file|http>
Repository mode used by C<--setup_local_repos>. Default: C<file>.
C<file>:
configure C<xcat-core-local> and C<xcat-dep> using C<file://> URLs.
No nginx configuration is required.
C<http>:
configure local repos as C<http://127.0.0.1:E<lt>nginx_portE<gt>/...>.
Use C<--configure_nginx> to generate and apply nginx configuration first.
=item B<--configure_nginx>
Generate C</etc/nginx/conf.d/xcat-repos.conf> and restart nginx.
This is an explicit action and does not run during the default build flow.
=item B<--nginx_port>=I<PORT>
nginx listen port used by C<--configure_nginx> and C<--repo-mode=http>.
Default: C<8080>.
=item B<--setup_local_repos>
Write C</etc/yum.repos.d/xcat-core-local.repo> and
C</etc/yum.repos.d/xcat-dep.repo> for the selected mode.
This is an explicit action and does not run during the default build flow.
=back
=head1 DEFAULT FLOW
When no explicit repo/nginx options are passed, the script:
=over 4
=item 1.
Builds all selected package/target combinations.
=item 2.
Runs C<createrepo --update> for each selected target under C<dist/>.
=item 3.
Exits without modifying nginx or yum repo files.
=back
=head1 KNOWN ERRORS
=over 4
=item 1.
Error: GPG error during mock cache creation/update.
Cause: out-dated C<distribution-gpg-keys> on the host machine.
Solution: run C<dnf update -y distribution-gpg-keys> on the host.
=back

View File

@@ -0,0 +1,9 @@
Dracut modules for EL10
Notes:
* For now `ubuntu` is just a symlink to EL module, we
may or may not need to diverge later.
* These files were copied from ../ so we can adapt they
without breaking old behavior

View File

@@ -0,0 +1,60 @@
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
if [ $reason = "PREINIT" -o $reason = "PREINIT6" ]; then
ip link set $interface up
tries=50
while ! (ip link show $interface|grep LOWER_UP > /dev/null 2>&1); do
sleep 0.1
if [ $tries = 0 ]; then
break
fi
tries=$((tries-1))
done
elif [ $reason = "BOUND" ]; then
if [ ! -z "$old_ip_address" ]; then
ip addr del dev $interface $old_ip_address/$old_subnet_mask
fi
for oldip in `ip -o addr show dev $interface|awk '{print $4}'`; do
ip addr del dev $interface $oldip
done
if [ ! -z "$new_ip_address" -a ! -z "$new_subnet_mask" ]; then
ip addr add dev $interface $new_ip_address/$new_subnet_mask
fi
if [ ! -z "$new_host_name" ]; then
hostname $new_host_name
lldptool -T -i $interface -V 5 enableTx=yes >& /dev/null
fi
if [ ! -z "$new_domain_name" ]; then
echo search $new_domain_name >> /etc/resolv.conf
fi
for ns in $new_domain_name_servers; do
echo nameserver $ns >> /etc/resolv.conf
done
for ntp in $new_ntp_servers; do
echo server $ntp iburst >> /etc/ntp.conf
done
for gw in $new_routers; do
ip route add default via $gw
done
if [ ! -z "$new_tcode" -a -r "/usr/share/zoneinfo/posix/$new_tcode" ]; then
cp "/usr/share/zoneinfo/posix/$new_tcode" /etc/localtime
rm -rf /usr/share/zoneinfo #free up ramdisk
fi
elif [ $reason = "BOUND6" ]; then
if [ ! -z "$old_ip6_address" ]; then
ip addr del dev $interface $old_ip6_address/$old_ip6_prefixlen
fi
if [ ! -z "$new_ip6_address" ]; then
ip addr add dev $interface $new_ip6_address/$new_ip6_prefixlen
fi
elif [ $reason = "RELEASE" ]; then
if [ ! -z "$old_ip_address" ]; then
ip addr del dev $interface $old_ip_address/$old_subnet_mask
fi
elif [ $reason = "RELEASE6" ]; then
if [ ! -z "$old_ip6_address" ]; then
ip addr del dev $interface $old_ip6_address/$old_ip6_prefixlen
fi
fi
exit 0

View File

@@ -0,0 +1,2 @@
option tcode code 101 = text;
request subnet-mask, routers, domain-name, domain-search, domain-name-servers, host-name, ntp-servers, interface-mtu, tcode, log-servers;

View File

@@ -0,0 +1,668 @@
#!/bin/bash
check() {
return 0;
}
depends() {
echo ""
}
installkernel() {
local modules_dep modfile modname
if [[ -n "${kernel:-}" && -r "/lib/modules/$kernel/modules.dep" ]]; then
modules_dep="/lib/modules/$kernel/modules.dep"
elif [[ -n "${KERNELVERSION:-}" && -r "/lib/modules/$KERNELVERSION/modules.dep" ]]; then
modules_dep="/lib/modules/$KERNELVERSION/modules.dep"
else
modules_dep=$(ls -1 /lib/modules/*/modules.dep 2>/dev/null | head -n 1)
fi
[[ -r "$modules_dep" ]] || return 0
while IFS= read -r modfile; do
modfile=${modfile%%:*}
modname=${modfile##*/}
modname=${modname%.ko*}
instmods "$modname"
done < "$modules_dep"
}
_dracut_install_opt() {
local src="$1"
local dst=$2;
if [[ -z "$dst" ]]; then
test -e "$src" && dracut_install "$src"
else
test -e "$src" && dracut_install "$src" "$dst"
fi
}
install() {
dracut_install wget openssl tar mstflint ipmitool cpio gzip lsmod ethtool modprobe touch echo cut wc bash
dracut_install netstat # broadcom update requires
dracut_install uniq # mellanox update requires
dracut_install grep ip hostname /usr/bin/awk egrep grep dirname expr
dracut_install mount.nfs sshd vi reboot lspci parted screen mkfs mkfs.ext4 mkfs.xfs xfs_db
#dracut_install libvirtd /usr/share/libvirt/cpu_map.xml /usr/bin/qemu-img /usr/libexec/qemu-kvm
dracut_install mkswap df ifenslave ssh-keygen scp clear
dracut_install dhclient lldpad
dracut_install /lib64/libnss_dns.so.2
dracut_install poweroff hwclock date /usr/share/terminfo/x/xterm /usr/share/terminfo/s/screen /etc/nsswitch.conf /etc/services
dracut_install /sbin/rsyslogd /etc/protocols umount /bin/rpm /usr/lib/rpm/rpmrc
#dracut_install chmod /sbin/route /sbin/ifconfig /usr/bin/whoami /usr/bin/head /usr/bin/tail basename /etc/redhat-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
dracut_install chmod ip /usr/bin/whoami /usr/bin/head /usr/bin/tail basename /etc/redhat-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
dracut_install efibootmgr dmidecode #uxspi prereqs, but will use dmidecode to improve decision on loading ipmi_si
dracut_install lldptool
dracut_install /usr/share/zoneinfo/posix/Zulu
dracut_install /usr/share/zoneinfo/posix/GMT-0
dracut_install /usr/share/zoneinfo/posix/Europe/Istanbul
dracut_install /usr/share/zoneinfo/posix/Europe/San_Marino
dracut_install /usr/share/zoneinfo/posix/Europe/Jersey
dracut_install /usr/share/zoneinfo/posix/Europe/Bucharest
dracut_install /usr/share/zoneinfo/posix/Europe/Gibraltar
dracut_install /usr/share/zoneinfo/posix/Europe/Uzhgorod
dracut_install /usr/share/zoneinfo/posix/Europe/Moscow
dracut_install /usr/share/zoneinfo/posix/Europe/Brussels
dracut_install /usr/share/zoneinfo/posix/Europe/Nicosia
dracut_install /usr/share/zoneinfo/posix/Europe/Zurich
dracut_install /usr/share/zoneinfo/posix/Europe/Berlin
dracut_install /usr/share/zoneinfo/posix/Europe/Guernsey
dracut_install /usr/share/zoneinfo/posix/Europe/Budapest
dracut_install /usr/share/zoneinfo/posix/Europe/Kiev
dracut_install /usr/share/zoneinfo/posix/Europe/Podgorica
dracut_install /usr/share/zoneinfo/posix/Europe/Isle_of_Man
dracut_install /usr/share/zoneinfo/posix/Europe/Mariehamn
dracut_install /usr/share/zoneinfo/posix/Europe/Belgrade
dracut_install /usr/share/zoneinfo/posix/Europe/Belfast
dracut_install /usr/share/zoneinfo/posix/Europe/Ljubljana
dracut_install /usr/share/zoneinfo/posix/Europe/Chisinau
dracut_install /usr/share/zoneinfo/posix/Europe/Andorra
dracut_install /usr/share/zoneinfo/posix/Europe/Athens
dracut_install /usr/share/zoneinfo/posix/Europe/Stockholm
dracut_install /usr/share/zoneinfo/posix/Europe/Vienna
dracut_install /usr/share/zoneinfo/posix/Europe/Lisbon
dracut_install /usr/share/zoneinfo/posix/Europe/London
dracut_install /usr/share/zoneinfo/posix/Europe/Paris
dracut_install /usr/share/zoneinfo/posix/Europe/Oslo
dracut_install /usr/share/zoneinfo/posix/Europe/Zagreb
dracut_install /usr/share/zoneinfo/posix/Europe/Helsinki
dracut_install /usr/share/zoneinfo/posix/Europe/Warsaw
dracut_install /usr/share/zoneinfo/posix/Europe/Copenhagen
dracut_install /usr/share/zoneinfo/posix/Europe/Riga
dracut_install /usr/share/zoneinfo/posix/Europe/Vaduz
dracut_install /usr/share/zoneinfo/posix/Europe/Vilnius
dracut_install /usr/share/zoneinfo/posix/Europe/Volgograd
dracut_install /usr/share/zoneinfo/posix/Europe/Amsterdam
dracut_install /usr/share/zoneinfo/posix/Europe/Tiraspol
dracut_install /usr/share/zoneinfo/posix/Europe/Tallinn
dracut_install /usr/share/zoneinfo/posix/Europe/Kaliningrad
dracut_install /usr/share/zoneinfo/posix/Europe/Malta
dracut_install /usr/share/zoneinfo/posix/Europe/Sarajevo
dracut_install /usr/share/zoneinfo/posix/Europe/Madrid
dracut_install /usr/share/zoneinfo/posix/Europe/Zaporozhye
dracut_install /usr/share/zoneinfo/posix/Europe/Simferopol
dracut_install /usr/share/zoneinfo/posix/Europe/Sofia
dracut_install /usr/share/zoneinfo/posix/Europe/Skopje
dracut_install /usr/share/zoneinfo/posix/Europe/Monaco
dracut_install /usr/share/zoneinfo/posix/Europe/Rome
dracut_install /usr/share/zoneinfo/posix/Europe/Prague
dracut_install /usr/share/zoneinfo/posix/Europe/Luxembourg
dracut_install /usr/share/zoneinfo/posix/Europe/Minsk
dracut_install /usr/share/zoneinfo/posix/Europe/Vatican
dracut_install /usr/share/zoneinfo/posix/Europe/Dublin
dracut_install /usr/share/zoneinfo/posix/Europe/Samara
dracut_install /usr/share/zoneinfo/posix/Europe/Tirane
dracut_install /usr/share/zoneinfo/posix/Europe/Bratislava
dracut_install /usr/share/zoneinfo/posix/Greenwich
dracut_install /usr/share/zoneinfo/posix/US/Indiana-Starke
dracut_install /usr/share/zoneinfo/posix/US/Alaska
dracut_install /usr/share/zoneinfo/posix/US/Michigan
dracut_install /usr/share/zoneinfo/posix/US/Aleutian
dracut_install /usr/share/zoneinfo/posix/US/Hawaii
dracut_install /usr/share/zoneinfo/posix/US/Central
dracut_install /usr/share/zoneinfo/posix/US/Eastern
dracut_install /usr/share/zoneinfo/posix/US/Pacific
dracut_install /usr/share/zoneinfo/posix/US/Samoa
dracut_install /usr/share/zoneinfo/posix/US/Mountain
dracut_install /usr/share/zoneinfo/posix/US/Arizona
dracut_install /usr/share/zoneinfo/posix/US/East-Indiana
dracut_install /usr/share/zoneinfo/posix/EST
dracut_install /usr/share/zoneinfo/posix/HST
dracut_install /usr/share/zoneinfo/posix/Eire
dracut_install /usr/share/zoneinfo/posix/America/Cancun
dracut_install /usr/share/zoneinfo/posix/America/Santo_Domingo
dracut_install /usr/share/zoneinfo/posix/America/Jujuy
dracut_install /usr/share/zoneinfo/posix/America/Guatemala
dracut_install /usr/share/zoneinfo/posix/America/Monterrey
dracut_install /usr/share/zoneinfo/posix/America/Ensenada
dracut_install /usr/share/zoneinfo/posix/America/Dawson_Creek
dracut_install /usr/share/zoneinfo/posix/America/Mendoza
dracut_install /usr/share/zoneinfo/posix/America/Coral_Harbour
dracut_install /usr/share/zoneinfo/posix/America/Martinique
dracut_install /usr/share/zoneinfo/posix/America/Cordoba
dracut_install /usr/share/zoneinfo/posix/America/Recife
dracut_install /usr/share/zoneinfo/posix/America/Cayman
dracut_install /usr/share/zoneinfo/posix/America/Shiprock
dracut_install /usr/share/zoneinfo/posix/America/Tortola
dracut_install /usr/share/zoneinfo/posix/America/Lima
dracut_install /usr/share/zoneinfo/posix/America/Antigua
dracut_install /usr/share/zoneinfo/posix/America/Blanc-Sablon
dracut_install /usr/share/zoneinfo/posix/America/Nipigon
dracut_install /usr/share/zoneinfo/posix/America/Nome
dracut_install /usr/share/zoneinfo/posix/America/Montserrat
dracut_install /usr/share/zoneinfo/posix/America/Atka
dracut_install /usr/share/zoneinfo/posix/America/St_Thomas
dracut_install /usr/share/zoneinfo/posix/America/Halifax
dracut_install /usr/share/zoneinfo/posix/America/Montreal
dracut_install /usr/share/zoneinfo/posix/America/Curacao
dracut_install /usr/share/zoneinfo/posix/America/Cuiaba
dracut_install /usr/share/zoneinfo/posix/America/Winnipeg
dracut_install /usr/share/zoneinfo/posix/America/North_Dakota/New_Salem
dracut_install /usr/share/zoneinfo/posix/America/North_Dakota/Center
dracut_install /usr/share/zoneinfo/posix/America/Panama
dracut_install /usr/share/zoneinfo/posix/America/Rosario
dracut_install /usr/share/zoneinfo/posix/America/Anguilla
dracut_install /usr/share/zoneinfo/posix/America/Ojinaga
dracut_install /usr/share/zoneinfo/posix/America/Guyana
dracut_install /usr/share/zoneinfo/posix/America/Eirunepe
dracut_install /usr/share/zoneinfo/posix/America/Grand_Turk
dracut_install /usr/share/zoneinfo/posix/America/Rio_Branco
dracut_install /usr/share/zoneinfo/posix/America/Santa_Isabel
dracut_install /usr/share/zoneinfo/posix/America/Scoresbysund
dracut_install /usr/share/zoneinfo/posix/America/Adak
dracut_install /usr/share/zoneinfo/posix/America/Menominee
dracut_install /usr/share/zoneinfo/posix/America/Resolute
dracut_install /usr/share/zoneinfo/posix/America/Guadeloupe
dracut_install /usr/share/zoneinfo/posix/America/Indianapolis
dracut_install /usr/share/zoneinfo/posix/America/Vancouver
dracut_install /usr/share/zoneinfo/posix/America/Glace_Bay
dracut_install /usr/share/zoneinfo/posix/America/Buenos_Aires
dracut_install /usr/share/zoneinfo/posix/America/Virgin
dracut_install /usr/share/zoneinfo/posix/America/Belem
dracut_install /usr/share/zoneinfo/posix/America/Catamarca
dracut_install /usr/share/zoneinfo/posix/America/Bahia
dracut_install /usr/share/zoneinfo/posix/America/Fort_Wayne
dracut_install /usr/share/zoneinfo/posix/America/Hermosillo
dracut_install /usr/share/zoneinfo/posix/America/Rankin_Inlet
dracut_install /usr/share/zoneinfo/posix/America/Mexico_City
dracut_install /usr/share/zoneinfo/posix/America/Belize
dracut_install /usr/share/zoneinfo/posix/America/Maceio
dracut_install /usr/share/zoneinfo/posix/America/Dominica
dracut_install /usr/share/zoneinfo/posix/America/Swift_Current
dracut_install /usr/share/zoneinfo/posix/America/St_Johns
dracut_install /usr/share/zoneinfo/posix/America/St_Barthelemy
dracut_install /usr/share/zoneinfo/posix/America/Yellowknife
dracut_install /usr/share/zoneinfo/posix/America/Costa_Rica
dracut_install /usr/share/zoneinfo/posix/America/Pangnirtung
dracut_install /usr/share/zoneinfo/posix/America/Bogota
dracut_install /usr/share/zoneinfo/posix/America/Port-au-Prince
dracut_install /usr/share/zoneinfo/posix/America/Phoenix
dracut_install /usr/share/zoneinfo/posix/America/Port_of_Spain
dracut_install /usr/share/zoneinfo/posix/America/Matamoros
dracut_install /usr/share/zoneinfo/posix/America/Puerto_Rico
dracut_install /usr/share/zoneinfo/posix/America/Detroit
dracut_install /usr/share/zoneinfo/posix/America/Edmonton
dracut_install /usr/share/zoneinfo/posix/America/Toronto
dracut_install /usr/share/zoneinfo/posix/America/Cambridge_Bay
dracut_install /usr/share/zoneinfo/posix/America/Godthab
dracut_install /usr/share/zoneinfo/posix/America/Atikokan
dracut_install /usr/share/zoneinfo/posix/America/Juneau
dracut_install /usr/share/zoneinfo/posix/America/Managua
dracut_install /usr/share/zoneinfo/posix/America/Anchorage
dracut_install /usr/share/zoneinfo/posix/America/Merida
dracut_install /usr/share/zoneinfo/posix/America/Thunder_Bay
dracut_install /usr/share/zoneinfo/posix/America/Porto_Velho
dracut_install /usr/share/zoneinfo/posix/America/Argentina/Jujuy
dracut_install /usr/share/zoneinfo/posix/America/Argentina/La_Rioja
dracut_install /usr/share/zoneinfo/posix/America/Argentina/Mendoza
dracut_install /usr/share/zoneinfo/posix/America/Argentina/Cordoba
dracut_install /usr/share/zoneinfo/posix/America/Argentina/Ushuaia
dracut_install /usr/share/zoneinfo/posix/America/Argentina/Rio_Gallegos
dracut_install /usr/share/zoneinfo/posix/America/Argentina/Buenos_Aires
dracut_install /usr/share/zoneinfo/posix/America/Argentina/San_Juan
dracut_install /usr/share/zoneinfo/posix/America/Argentina/Catamarca
dracut_install /usr/share/zoneinfo/posix/America/Argentina/San_Luis
dracut_install /usr/share/zoneinfo/posix/America/Argentina/ComodRivadavia
dracut_install /usr/share/zoneinfo/posix/America/Argentina/Salta
dracut_install /usr/share/zoneinfo/posix/America/Argentina/Tucuman
dracut_install /usr/share/zoneinfo/posix/America/Iqaluit
dracut_install /usr/share/zoneinfo/posix/America/Chicago
dracut_install /usr/share/zoneinfo/posix/America/Miquelon
dracut_install /usr/share/zoneinfo/posix/America/Havana
dracut_install /usr/share/zoneinfo/posix/America/Guayaquil
dracut_install /usr/share/zoneinfo/posix/America/St_Vincent
dracut_install /usr/share/zoneinfo/posix/America/St_Lucia
dracut_install /usr/share/zoneinfo/posix/America/Boise
dracut_install /usr/share/zoneinfo/posix/America/Yakutat
dracut_install /usr/share/zoneinfo/posix/America/Santarem
dracut_install /usr/share/zoneinfo/posix/America/Campo_Grande
dracut_install /usr/share/zoneinfo/posix/America/Santiago
dracut_install /usr/share/zoneinfo/posix/America/Porto_Acre
dracut_install /usr/share/zoneinfo/posix/America/Sao_Paulo
dracut_install /usr/share/zoneinfo/posix/America/Thule
dracut_install /usr/share/zoneinfo/posix/America/New_York
dracut_install /usr/share/zoneinfo/posix/America/Nassau
dracut_install /usr/share/zoneinfo/posix/America/Dawson
dracut_install /usr/share/zoneinfo/posix/America/Louisville
dracut_install /usr/share/zoneinfo/posix/America/Asuncion
dracut_install /usr/share/zoneinfo/posix/America/Inuvik
dracut_install /usr/share/zoneinfo/posix/America/Paramaribo
dracut_install /usr/share/zoneinfo/posix/America/Chihuahua
dracut_install /usr/share/zoneinfo/posix/America/Mazatlan
dracut_install /usr/share/zoneinfo/posix/America/Grenada
dracut_install /usr/share/zoneinfo/posix/America/Denver
dracut_install /usr/share/zoneinfo/posix/America/Los_Angeles
dracut_install /usr/share/zoneinfo/posix/America/Marigot
dracut_install /usr/share/zoneinfo/posix/America/Manaus
dracut_install /usr/share/zoneinfo/posix/America/Regina
dracut_install /usr/share/zoneinfo/posix/America/Barbados
dracut_install /usr/share/zoneinfo/posix/America/Noronha
dracut_install /usr/share/zoneinfo/posix/America/Montevideo
dracut_install /usr/share/zoneinfo/posix/America/Caracas
dracut_install /usr/share/zoneinfo/posix/America/Rainy_River
dracut_install /usr/share/zoneinfo/posix/America/La_Paz
dracut_install /usr/share/zoneinfo/posix/America/Jamaica
dracut_install /usr/share/zoneinfo/posix/America/Moncton
dracut_install /usr/share/zoneinfo/posix/America/Whitehorse
dracut_install /usr/share/zoneinfo/posix/America/Fortaleza
dracut_install /usr/share/zoneinfo/posix/America/Kentucky/Monticello
dracut_install /usr/share/zoneinfo/posix/America/Kentucky/Louisville
dracut_install /usr/share/zoneinfo/posix/America/Indiana/Marengo
dracut_install /usr/share/zoneinfo/posix/America/Indiana/Indianapolis
dracut_install /usr/share/zoneinfo/posix/America/Indiana/Knox
dracut_install /usr/share/zoneinfo/posix/America/Indiana/Tell_City
dracut_install /usr/share/zoneinfo/posix/America/Indiana/Petersburg
dracut_install /usr/share/zoneinfo/posix/America/Indiana/Winamac
dracut_install /usr/share/zoneinfo/posix/America/Indiana/Vincennes
dracut_install /usr/share/zoneinfo/posix/America/Indiana/Vevay
dracut_install /usr/share/zoneinfo/posix/America/Danmarkshavn
dracut_install /usr/share/zoneinfo/posix/America/St_Kitts
dracut_install /usr/share/zoneinfo/posix/America/Aruba
dracut_install /usr/share/zoneinfo/posix/America/Boa_Vista
dracut_install /usr/share/zoneinfo/posix/America/Bahia_Banderas
dracut_install /usr/share/zoneinfo/posix/America/Tegucigalpa
dracut_install /usr/share/zoneinfo/posix/America/Araguaina
dracut_install /usr/share/zoneinfo/posix/America/El_Salvador
dracut_install /usr/share/zoneinfo/posix/America/Cayenne
dracut_install /usr/share/zoneinfo/posix/America/Tijuana
dracut_install /usr/share/zoneinfo/posix/America/Knox_IN
dracut_install /usr/share/zoneinfo/posix/America/Goose_Bay
dracut_install /usr/share/zoneinfo/posix/EET
dracut_install /usr/share/zoneinfo/posix/EST5EDT
dracut_install /usr/share/zoneinfo/posix/MST
dracut_install /usr/share/zoneinfo/posix/Iceland
dracut_install /usr/share/zoneinfo/posix/Atlantic/Faeroe
dracut_install /usr/share/zoneinfo/posix/Atlantic/Stanley
dracut_install /usr/share/zoneinfo/posix/Atlantic/Reykjavik
dracut_install /usr/share/zoneinfo/posix/Atlantic/St_Helena
dracut_install /usr/share/zoneinfo/posix/Atlantic/Faroe
dracut_install /usr/share/zoneinfo/posix/Atlantic/South_Georgia
dracut_install /usr/share/zoneinfo/posix/Atlantic/Jan_Mayen
dracut_install /usr/share/zoneinfo/posix/Atlantic/Azores
dracut_install /usr/share/zoneinfo/posix/Atlantic/Cape_Verde
dracut_install /usr/share/zoneinfo/posix/Atlantic/Madeira
dracut_install /usr/share/zoneinfo/posix/Atlantic/Bermuda
dracut_install /usr/share/zoneinfo/posix/Atlantic/Canary
dracut_install /usr/share/zoneinfo/posix/GMT0
dracut_install /usr/share/zoneinfo/posix/Poland
dracut_install /usr/share/zoneinfo/posix/Indian/Chagos
dracut_install /usr/share/zoneinfo/posix/Indian/Maldives
dracut_install /usr/share/zoneinfo/posix/Indian/Comoro
dracut_install /usr/share/zoneinfo/posix/Indian/Mauritius
dracut_install /usr/share/zoneinfo/posix/Indian/Mayotte
dracut_install /usr/share/zoneinfo/posix/Indian/Christmas
dracut_install /usr/share/zoneinfo/posix/Indian/Antananarivo
dracut_install /usr/share/zoneinfo/posix/Indian/Kerguelen
dracut_install /usr/share/zoneinfo/posix/Indian/Mahe
dracut_install /usr/share/zoneinfo/posix/Indian/Cocos
dracut_install /usr/share/zoneinfo/posix/Indian/Reunion
dracut_install /usr/share/zoneinfo/posix/Mexico/BajaNorte
dracut_install /usr/share/zoneinfo/posix/Mexico/BajaSur
dracut_install /usr/share/zoneinfo/posix/Mexico/General
dracut_install /usr/share/zoneinfo/posix/Turkey
dracut_install /usr/share/zoneinfo/posix/Egypt
dracut_install /usr/share/zoneinfo/posix/Hongkong
dracut_install /usr/share/zoneinfo/posix/GB
dracut_install /usr/share/zoneinfo/posix/GMT+0
dracut_install /usr/share/zoneinfo/posix/ROK
dracut_install /usr/share/zoneinfo/posix/Antarctica/Mawson
dracut_install /usr/share/zoneinfo/posix/Antarctica/Macquarie
dracut_install /usr/share/zoneinfo/posix/Antarctica/South_Pole
dracut_install /usr/share/zoneinfo/posix/Antarctica/Rothera
dracut_install /usr/share/zoneinfo/posix/Antarctica/Davis
dracut_install /usr/share/zoneinfo/posix/Antarctica/DumontDUrville
dracut_install /usr/share/zoneinfo/posix/Antarctica/McMurdo
dracut_install /usr/share/zoneinfo/posix/Antarctica/Casey
dracut_install /usr/share/zoneinfo/posix/Antarctica/Vostok
dracut_install /usr/share/zoneinfo/posix/Antarctica/Palmer
dracut_install /usr/share/zoneinfo/posix/Antarctica/Syowa
dracut_install /usr/share/zoneinfo/posix/Universal
dracut_install /usr/share/zoneinfo/posix/CET
dracut_install /usr/share/zoneinfo/posix/WET
dracut_install /usr/share/zoneinfo/posix/Navajo
dracut_install /usr/share/zoneinfo/posix/UTC
dracut_install /usr/share/zoneinfo/posix/Pacific/Enderbury
dracut_install /usr/share/zoneinfo/posix/Pacific/Johnston
dracut_install /usr/share/zoneinfo/posix/Pacific/Pago_Pago
dracut_install /usr/share/zoneinfo/posix/Pacific/Saipan
dracut_install /usr/share/zoneinfo/posix/Pacific/Norfolk
dracut_install /usr/share/zoneinfo/posix/Pacific/Chuuk
dracut_install /usr/share/zoneinfo/posix/Pacific/Galapagos
dracut_install /usr/share/zoneinfo/posix/Pacific/Palau
dracut_install /usr/share/zoneinfo/posix/Pacific/Tarawa
dracut_install /usr/share/zoneinfo/posix/Pacific/Fakaofo
dracut_install /usr/share/zoneinfo/posix/Pacific/Rarotonga
dracut_install /usr/share/zoneinfo/posix/Pacific/Wake
dracut_install /usr/share/zoneinfo/posix/Pacific/Kosrae
dracut_install /usr/share/zoneinfo/posix/Pacific/Tahiti
dracut_install /usr/share/zoneinfo/posix/Pacific/Fiji
dracut_install /usr/share/zoneinfo/posix/Pacific/Ponape
dracut_install /usr/share/zoneinfo/posix/Pacific/Tongatapu
dracut_install /usr/share/zoneinfo/posix/Pacific/Efate
dracut_install /usr/share/zoneinfo/posix/Pacific/Honolulu
dracut_install /usr/share/zoneinfo/posix/Pacific/Niue
dracut_install /usr/share/zoneinfo/posix/Pacific/Kwajalein
dracut_install /usr/share/zoneinfo/posix/Pacific/Guam
dracut_install /usr/share/zoneinfo/posix/Pacific/Funafuti
dracut_install /usr/share/zoneinfo/posix/Pacific/Majuro
dracut_install /usr/share/zoneinfo/posix/Pacific/Midway
dracut_install /usr/share/zoneinfo/posix/Pacific/Nauru
dracut_install /usr/share/zoneinfo/posix/Pacific/Samoa
dracut_install /usr/share/zoneinfo/posix/Pacific/Marquesas
dracut_install /usr/share/zoneinfo/posix/Pacific/Kiritimati
dracut_install /usr/share/zoneinfo/posix/Pacific/Noumea
dracut_install /usr/share/zoneinfo/posix/Pacific/Truk
dracut_install /usr/share/zoneinfo/posix/Pacific/Guadalcanal
dracut_install /usr/share/zoneinfo/posix/Pacific/Pohnpei
dracut_install /usr/share/zoneinfo/posix/Pacific/Pitcairn
dracut_install /usr/share/zoneinfo/posix/Pacific/Port_Moresby
dracut_install /usr/share/zoneinfo/posix/Pacific/Yap
dracut_install /usr/share/zoneinfo/posix/Pacific/Easter
dracut_install /usr/share/zoneinfo/posix/Pacific/Wallis
dracut_install /usr/share/zoneinfo/posix/Pacific/Apia
dracut_install /usr/share/zoneinfo/posix/Pacific/Auckland
dracut_install /usr/share/zoneinfo/posix/Pacific/Gambier
dracut_install /usr/share/zoneinfo/posix/Pacific/Chatham
dracut_install /usr/share/zoneinfo/posix/Japan
dracut_install /usr/share/zoneinfo/posix/Libya
dracut_install /usr/share/zoneinfo/posix/ROC
dracut_install /usr/share/zoneinfo/posix/Iran
dracut_install /usr/share/zoneinfo/posix/Brazil/West
dracut_install /usr/share/zoneinfo/posix/Brazil/East
dracut_install /usr/share/zoneinfo/posix/Brazil/Acre
dracut_install /usr/share/zoneinfo/posix/Brazil/DeNoronha
dracut_install /usr/share/zoneinfo/posix/Arctic/Longyearbyen
dracut_install /usr/share/zoneinfo/posix/Portugal
dracut_install /usr/share/zoneinfo/posix/MET
dracut_install /usr/share/zoneinfo/posix/W-SU
dracut_install /usr/share/zoneinfo/posix/Kwajalein
dracut_install /usr/share/zoneinfo/posix/CST6CDT
dracut_install /usr/share/zoneinfo/posix/GB-Eire
dracut_install /usr/share/zoneinfo/posix/Australia/Melbourne
dracut_install /usr/share/zoneinfo/posix/Australia/Broken_Hill
dracut_install /usr/share/zoneinfo/posix/Australia/Queensland
dracut_install /usr/share/zoneinfo/posix/Australia/South
dracut_install /usr/share/zoneinfo/posix/Australia/Eucla
dracut_install /usr/share/zoneinfo/posix/Australia/Yancowinna
dracut_install /usr/share/zoneinfo/posix/Australia/Lord_Howe
dracut_install /usr/share/zoneinfo/posix/Australia/Hobart
dracut_install /usr/share/zoneinfo/posix/Australia/NSW
dracut_install /usr/share/zoneinfo/posix/Australia/West
dracut_install /usr/share/zoneinfo/posix/Australia/LHI
dracut_install /usr/share/zoneinfo/posix/Australia/Perth
dracut_install /usr/share/zoneinfo/posix/Australia/ACT
dracut_install /usr/share/zoneinfo/posix/Australia/Darwin
dracut_install /usr/share/zoneinfo/posix/Australia/Lindeman
dracut_install /usr/share/zoneinfo/posix/Australia/Sydney
dracut_install /usr/share/zoneinfo/posix/Australia/North
dracut_install /usr/share/zoneinfo/posix/Australia/Canberra
dracut_install /usr/share/zoneinfo/posix/Australia/Adelaide
dracut_install /usr/share/zoneinfo/posix/Australia/Brisbane
dracut_install /usr/share/zoneinfo/posix/Australia/Victoria
dracut_install /usr/share/zoneinfo/posix/Australia/Tasmania
dracut_install /usr/share/zoneinfo/posix/Australia/Currie
dracut_install /usr/share/zoneinfo/posix/UCT
dracut_install /usr/share/zoneinfo/posix/Cuba
dracut_install /usr/share/zoneinfo/posix/Singapore
dracut_install /usr/share/zoneinfo/posix/GMT
dracut_install /usr/share/zoneinfo/posix/NZ-CHAT
dracut_install /usr/share/zoneinfo/posix/Asia/Istanbul
dracut_install /usr/share/zoneinfo/posix/Asia/Kuwait
dracut_install /usr/share/zoneinfo/posix/Asia/Saigon
dracut_install /usr/share/zoneinfo/posix/Asia/Urumqi
dracut_install /usr/share/zoneinfo/posix/Asia/Brunei
dracut_install /usr/share/zoneinfo/posix/Asia/Ujung_Pandang
dracut_install /usr/share/zoneinfo/posix/Asia/Muscat
dracut_install /usr/share/zoneinfo/posix/Asia/Kashgar
dracut_install /usr/share/zoneinfo/posix/Asia/Kamchatka
dracut_install /usr/share/zoneinfo/posix/Asia/Manila
dracut_install /usr/share/zoneinfo/posix/Asia/Vladivostok
dracut_install /usr/share/zoneinfo/posix/Asia/Jayapura
dracut_install /usr/share/zoneinfo/posix/Asia/Magadan
dracut_install /usr/share/zoneinfo/posix/Asia/Almaty
dracut_install /usr/share/zoneinfo/posix/Asia/Qyzylorda
dracut_install /usr/share/zoneinfo/posix/Asia/Anadyr
dracut_install /usr/share/zoneinfo/posix/Asia/Nicosia
dracut_install /usr/share/zoneinfo/posix/Asia/Kathmandu
dracut_install /usr/share/zoneinfo/posix/Asia/Qatar
dracut_install /usr/share/zoneinfo/posix/Asia/Jerusalem
dracut_install /usr/share/zoneinfo/posix/Asia/Yakutsk
dracut_install /usr/share/zoneinfo/posix/Asia/Karachi
dracut_install /usr/share/zoneinfo/posix/Asia/Samarkand
dracut_install /usr/share/zoneinfo/posix/Asia/Kolkata
dracut_install /usr/share/zoneinfo/posix/Asia/Ulaanbaatar
dracut_install /usr/share/zoneinfo/posix/Asia/Irkutsk
dracut_install /usr/share/zoneinfo/posix/Asia/Baku
dracut_install /usr/share/zoneinfo/posix/Asia/Gaza
dracut_install /usr/share/zoneinfo/posix/Asia/Seoul
dracut_install /usr/share/zoneinfo/posix/Asia/Chungking
dracut_install /usr/share/zoneinfo/posix/Asia/Amman
dracut_install /usr/share/zoneinfo/posix/Asia/Kuala_Lumpur
dracut_install /usr/share/zoneinfo/posix/Asia/Aqtobe
dracut_install /usr/share/zoneinfo/posix/Asia/Katmandu
dracut_install /usr/share/zoneinfo/posix/Asia/Tashkent
dracut_install /usr/share/zoneinfo/posix/Asia/Oral
dracut_install /usr/share/zoneinfo/posix/Asia/Dhaka
dracut_install /usr/share/zoneinfo/posix/Asia/Hovd
dracut_install /usr/share/zoneinfo/posix/Asia/Makassar
dracut_install /usr/share/zoneinfo/posix/Asia/Bangkok
dracut_install /usr/share/zoneinfo/posix/Asia/Tokyo
dracut_install /usr/share/zoneinfo/posix/Asia/Macao
dracut_install /usr/share/zoneinfo/posix/Asia/Riyadh
dracut_install /usr/share/zoneinfo/posix/Asia/Rangoon
dracut_install /usr/share/zoneinfo/posix/Asia/Jakarta
dracut_install /usr/share/zoneinfo/posix/Asia/Aden
dracut_install /usr/share/zoneinfo/posix/Asia/Calcutta
dracut_install /usr/share/zoneinfo/posix/Asia/Ashkhabad
dracut_install /usr/share/zoneinfo/posix/Asia/Beirut
dracut_install /usr/share/zoneinfo/posix/Asia/Harbin
dracut_install /usr/share/zoneinfo/posix/Asia/Novosibirsk
dracut_install /usr/share/zoneinfo/posix/Asia/Omsk
dracut_install /usr/share/zoneinfo/posix/Asia/Aqtau
dracut_install /usr/share/zoneinfo/posix/Asia/Bahrain
dracut_install /usr/share/zoneinfo/posix/Asia/Dili
dracut_install /usr/share/zoneinfo/posix/Asia/Pontianak
dracut_install /usr/share/zoneinfo/posix/Asia/Singapore
dracut_install /usr/share/zoneinfo/posix/Asia/Baghdad
dracut_install /usr/share/zoneinfo/posix/Asia/Novokuznetsk
dracut_install /usr/share/zoneinfo/posix/Asia/Dubai
dracut_install /usr/share/zoneinfo/posix/Asia/Dushanbe
dracut_install /usr/share/zoneinfo/posix/Asia/Damascus
dracut_install /usr/share/zoneinfo/posix/Asia/Krasnoyarsk
dracut_install /usr/share/zoneinfo/posix/Asia/Tbilisi
dracut_install /usr/share/zoneinfo/posix/Asia/Yerevan
dracut_install /usr/share/zoneinfo/posix/Asia/Pyongyang
dracut_install /usr/share/zoneinfo/posix/Asia/Bishkek
dracut_install /usr/share/zoneinfo/posix/Asia/Colombo
dracut_install /usr/share/zoneinfo/posix/Asia/Yekaterinburg
dracut_install /usr/share/zoneinfo/posix/Asia/Chongqing
dracut_install /usr/share/zoneinfo/posix/Asia/Ho_Chi_Minh
dracut_install /usr/share/zoneinfo/posix/Asia/Hong_Kong
dracut_install /usr/share/zoneinfo/posix/Asia/Thimbu
dracut_install /usr/share/zoneinfo/posix/Asia/Thimphu
dracut_install /usr/share/zoneinfo/posix/Asia/Ashgabat
dracut_install /usr/share/zoneinfo/posix/Asia/Shanghai
dracut_install /usr/share/zoneinfo/posix/Asia/Tehran
dracut_install /usr/share/zoneinfo/posix/Asia/Tel_Aviv
dracut_install /usr/share/zoneinfo/posix/Asia/Taipei
dracut_install /usr/share/zoneinfo/posix/Asia/Kabul
dracut_install /usr/share/zoneinfo/posix/Asia/Macau
dracut_install /usr/share/zoneinfo/posix/Asia/Choibalsan
dracut_install /usr/share/zoneinfo/posix/Asia/Vientiane
dracut_install /usr/share/zoneinfo/posix/Asia/Dacca
dracut_install /usr/share/zoneinfo/posix/Asia/Kuching
dracut_install /usr/share/zoneinfo/posix/Asia/Phnom_Penh
dracut_install /usr/share/zoneinfo/posix/Asia/Ulan_Bator
dracut_install /usr/share/zoneinfo/posix/Asia/Sakhalin
dracut_install /usr/share/zoneinfo/posix/MST7MDT
dracut_install /usr/share/zoneinfo/posix/Canada/Atlantic
dracut_install /usr/share/zoneinfo/posix/Canada/Central
dracut_install /usr/share/zoneinfo/posix/Canada/Eastern
dracut_install /usr/share/zoneinfo/posix/Canada/Yukon
dracut_install /usr/share/zoneinfo/posix/Canada/Pacific
dracut_install /usr/share/zoneinfo/posix/Canada/Saskatchewan
dracut_install /usr/share/zoneinfo/posix/Canada/Mountain
dracut_install /usr/share/zoneinfo/posix/Canada/Newfoundland
dracut_install /usr/share/zoneinfo/posix/Israel
dracut_install /usr/share/zoneinfo/posix/Africa/Lagos
dracut_install /usr/share/zoneinfo/posix/Africa/Kigali
dracut_install /usr/share/zoneinfo/posix/Africa/Lome
dracut_install /usr/share/zoneinfo/posix/Africa/Niamey
dracut_install /usr/share/zoneinfo/posix/Africa/Conakry
dracut_install /usr/share/zoneinfo/posix/Africa/Asmera
dracut_install /usr/share/zoneinfo/posix/Africa/Banjul
dracut_install /usr/share/zoneinfo/posix/Africa/Abidjan
dracut_install /usr/share/zoneinfo/posix/Africa/Bujumbura
dracut_install /usr/share/zoneinfo/posix/Africa/Luanda
dracut_install /usr/share/zoneinfo/posix/Africa/Kampala
dracut_install /usr/share/zoneinfo/posix/Africa/Ouagadougou
dracut_install /usr/share/zoneinfo/posix/Africa/Libreville
dracut_install /usr/share/zoneinfo/posix/Africa/Lubumbashi
dracut_install /usr/share/zoneinfo/posix/Africa/Dakar
dracut_install /usr/share/zoneinfo/posix/Africa/Bamako
dracut_install /usr/share/zoneinfo/posix/Africa/Nairobi
dracut_install /usr/share/zoneinfo/posix/Africa/Bangui
dracut_install /usr/share/zoneinfo/posix/Africa/Johannesburg
dracut_install /usr/share/zoneinfo/posix/Africa/Accra
dracut_install /usr/share/zoneinfo/posix/Africa/Bissau
dracut_install /usr/share/zoneinfo/posix/Africa/Timbuktu
dracut_install /usr/share/zoneinfo/posix/Africa/Nouakchott
dracut_install /usr/share/zoneinfo/posix/Africa/Maputo
dracut_install /usr/share/zoneinfo/posix/Africa/Ndjamena
dracut_install /usr/share/zoneinfo/posix/Africa/Maseru
dracut_install /usr/share/zoneinfo/posix/Africa/Tripoli
dracut_install /usr/share/zoneinfo/posix/Africa/Blantyre
dracut_install /usr/share/zoneinfo/posix/Africa/Gaborone
dracut_install /usr/share/zoneinfo/posix/Africa/Addis_Ababa
dracut_install /usr/share/zoneinfo/posix/Africa/Porto-Novo
dracut_install /usr/share/zoneinfo/posix/Africa/Kinshasa
dracut_install /usr/share/zoneinfo/posix/Africa/Dar_es_Salaam
dracut_install /usr/share/zoneinfo/posix/Africa/Douala
dracut_install /usr/share/zoneinfo/posix/Africa/Mogadishu
dracut_install /usr/share/zoneinfo/posix/Africa/Monrovia
dracut_install /usr/share/zoneinfo/posix/Africa/Mbabane
dracut_install /usr/share/zoneinfo/posix/Africa/Algiers
dracut_install /usr/share/zoneinfo/posix/Africa/Lusaka
dracut_install /usr/share/zoneinfo/posix/Africa/Khartoum
dracut_install /usr/share/zoneinfo/posix/Africa/Asmara
dracut_install /usr/share/zoneinfo/posix/Africa/Tunis
dracut_install /usr/share/zoneinfo/posix/Africa/Casablanca
dracut_install /usr/share/zoneinfo/posix/Africa/Sao_Tome
dracut_install /usr/share/zoneinfo/posix/Africa/Ceuta
dracut_install /usr/share/zoneinfo/posix/Africa/El_Aaiun
dracut_install /usr/share/zoneinfo/posix/Africa/Harare
dracut_install /usr/share/zoneinfo/posix/Africa/Freetown
dracut_install /usr/share/zoneinfo/posix/Africa/Windhoek
dracut_install /usr/share/zoneinfo/posix/Africa/Djibouti
dracut_install /usr/share/zoneinfo/posix/Africa/Malabo
dracut_install /usr/share/zoneinfo/posix/Africa/Cairo
dracut_install /usr/share/zoneinfo/posix/Africa/Brazzaville
dracut_install /usr/share/zoneinfo/posix/Etc/Zulu
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-0
dracut_install /usr/share/zoneinfo/posix/Etc/Greenwich
dracut_install /usr/share/zoneinfo/posix/Etc/GMT+6
dracut_install /usr/share/zoneinfo/posix/Etc/GMT+9
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-9
dracut_install /usr/share/zoneinfo/posix/Etc/GMT+5
dracut_install /usr/share/zoneinfo/posix/Etc/GMT0
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-10
dracut_install /usr/share/zoneinfo/posix/Etc/GMT+0
dracut_install /usr/share/zoneinfo/posix/Etc/Universal
dracut_install /usr/share/zoneinfo/posix/Etc/GMT+12
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-5
dracut_install /usr/share/zoneinfo/posix/Etc/GMT+2
dracut_install /usr/share/zoneinfo/posix/Etc/UTC
dracut_install /usr/share/zoneinfo/posix/Etc/GMT+8
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-11
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-4
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-12
dracut_install /usr/share/zoneinfo/posix/Etc/GMT+11
dracut_install /usr/share/zoneinfo/posix/Etc/GMT+3
dracut_install /usr/share/zoneinfo/posix/Etc/GMT+4
dracut_install /usr/share/zoneinfo/posix/Etc/GMT+1
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-14
dracut_install /usr/share/zoneinfo/posix/Etc/UCT
dracut_install /usr/share/zoneinfo/posix/Etc/GMT+7
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-6
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-2
dracut_install /usr/share/zoneinfo/posix/Etc/GMT
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-3
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-8
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-7
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-13
dracut_install /usr/share/zoneinfo/posix/Etc/GMT-1
dracut_install /usr/share/zoneinfo/posix/Etc/GMT+10
dracut_install /usr/share/zoneinfo/posix/PST8PDT
dracut_install /usr/share/zoneinfo/posix/Jamaica
dracut_install /usr/share/zoneinfo/posix/NZ
dracut_install /usr/share/zoneinfo/posix/PRC
dracut_install /usr/share/zoneinfo/posix/Chile/EasterIsland
dracut_install /usr/share/zoneinfo/posix/Chile/Continental
inst "$moddir/xcatroot" "/sbin/xcatroot"
inst "$moddir/dhclient.conf" "/etc/dhclient.conf"
# dhclient executes this helper, so it must stay executable in initramfs.
inst_script "$moddir/dhclient-script" "/sbin/dhclient-script"
inst "$moddir/rsyslog.conf" "/etc/rsyslog.conf"
dracut_install chronyc chronyd rpcbind systemd-tmpfiles
dracut_install /etc/ssh
dracut_install /etc/chrony.conf
_dracut_install_opt /etc/chrony.keys
dracut_install /run/rpcbind
_dracut_install_opt /etc/systemd/system.conf
dracut_install /sbin/rpc.statd /usr/sbin/sm-notify /etc/netconfig rpcbind /etc/host.conf /usr/sbin/rpc.idmapd
dracut_install ps free find #debug
inst_dir /var/lib/nfs
inst_dir /var/lib/nfs/statd/sm
inst_dir /var/lib/nfs/statd/sm.bak
inst_dir /var/lib/nfs/rpc_pipefs/nfs
inst "/bin/bash" "/bin/sh"
inst "/usr/share/terminfo/l/linux"
inst "/usr/share/terminfo/v/vt100"
inst_hook cmdline 10 "$moddir/xcat-cmdline.sh"
dracut_install /lib64/rsyslog/lmtcpclt.so
dracut_install /lib64/rsyslog/omtesting.so
dracut_install /lib64/rsyslog/lmnetstrms.so
dracut_install /lib64/rsyslog/imfile.so
dracut_install /lib64/rsyslog/imklog.so
dracut_install /lib64/rsyslog/lmzlibw.so
dracut_install /lib64/rsyslog/immark.so
dracut_install /lib64/rsyslog/imudp.so
dracut_install /lib64/rsyslog/lmregexp.so
dracut_install /lib64/rsyslog/lmtcpsrv.so
dracut_install /lib64/rsyslog/lmnsd_ptcp.so
dracut_install /lib64/rsyslog/imtcp.so
dracut_install /lib64/rsyslog/lmnet.so
dracut_install /lib64/rsyslog/imuxsock.so
dracut_install /usr/lib64/libnfsidmap/nsswitch.so
dracut_install killall logger nc nslookup bc chown chroot dd expr kill mkdosfs parted rsync shutdown sort ssh-keygen tr blockdev findfs insmod kexec lvm mdadm mke2fs pivot_root sshd swapon tune2fs pvcreate lvremove vgremove vgcreate lvcreate lvscan lvchange vgchange pvdisplay lvdisplay vgdisplay blkid dmsetup sfdisk # for sysclone
dracut_install /lib/udev/rules.d/10-dm.rules
dracut_install /lib/udev/rules.d/11-dm-lvm.rules
dracut_install /lib/udev/rules.d/13-dm-disk.rules
dracut_install /lib/udev/rules.d/95-dm-notify.rules
# The DB files for lspci
dracut_install /usr/share/hwdata/pci.ids
# The DB files for udevadm
dracut_install /etc/udev/hwdb.bin
}

View File

@@ -0,0 +1,4 @@
$ModLoad imuxsock
$ModLoad immark
$MarkMessagePeriod 1200
*.* /var/log/xcat.genesis

View File

@@ -0,0 +1,90 @@
#!/bin/bash
root=1
rootok=1
netroot=xcat
clear
echo PS1="'"'[xCAT Genesis running on \H \w]\$ '"'" > /.bashrc
echo PS1="'"'[xCAT Genesis running on \H \w]\$ '"'" > /.bash_profile
mkdir -p /etc/ssh
mkdir -p /var/tmp/
mkdir -p /var/empty/sshd
sed -i '/^root:x/d' /etc/passwd
cat >>/etc/passwd <<"__ENDL"
root:x:0:0::/:/bin/bash
sshd:x:30:30:SSH User:/var/empty/sshd:/sbin/nologin
rpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:/sbin/nologin
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
qemu:x:107:107:qemu user:/:/sbin/nologin
chrony:x:995:991::/var/lib/chrony:/sbin/nologin
__ENDL
# Fedora 20 ppc64 uses /lib/dracut/hooks/initqueue/finished
# CentOS 7 probably uses /lib/dracut/hooks/initqueue/finished also
if [ -d "/initqueue-finished" ]; then
echo '[ -e $NEWROOT/proc ]' > /initqueue-finished/xcatroot.sh
else
#echo 'if [ -e /proc ]; then /bin/doxcat; fi' > /lib/dracut/hooks/initqueue/finished/xcatroot.sh
echo '[ -e /proc ]' > /lib/dracut/hooks/initqueue/finished/xcatroot.sh
fi
mkdir /dev/cgroup
mount -t cgroup -o cpu,memory,devices cgroup /dev/cgroup
# Fedora 20 ppc64 does not udevd
# CentOS 7 probably does not have udevd either
if [ -f "/sbin/udevd" ]; then
udevd --daemon
else
/usr/lib/systemd/systemd-udevd --daemon
fi
udevadm trigger
mkdir -p /var/lib/dhclient/
mkdir -p /var/log
ip link set lo up
echo '127.0.0.1 localhost' >> /etc/hosts
if grep -q console=ttyS /proc/cmdline; then
while :; do sleep 1; screen -S console -ln screen -x doxcat </dev/tty1 &>/dev/tty1; clear &>/dev/tty1 ; done &
fi
while :; do screen -ln < /dev/tty2 &> /dev/tty2 ; done &
# The section below is just for System P LE hardware discovery
# Need to wait for NIC initialization
sleep 20
ARCH="$(uname -m)"
if [[ ${ARCH} =~ ppc64 ]]; then
# load all network driver modules listed in /lib/modules/<kernel>/modules.dep file
KERVER=`uname -r`
for line in `cat /lib/modules/$KERVER/modules.dep | awk -F: '{print \$1}' | sed -e "s/\(.*\)\.ko.*/\1/"`; do
if [[ $line =~ "kernel/drivers/net" ]]; then
modprobe `basename $line`
fi
done
# Check if running on a VM, and load "virtio_pci" module
cat /proc/cpuinfo | grep "machine" | grep "emulated"
if [ $? -eq 0 ]; then
modprobe virtio_pci
fi
waittime=2
ALL_NICS=$(ip link show | grep -v "^ " | awk '{print $2}' | sed -e 's/:$//' | grep -v lo)
for tmp in $ALL_NICS; do
tmp_data="$(ip link show "$tmp" | grep -v "^ " | grep "UP")"
if [ "$tmp_data" == "" ]; then
ip link set "$tmp" up
fi
tmp_data="UP"
waittime=$((waittime+1))
done
# wait 2+number_of_nics seconds for all the LINKed NICs to be UP
sleep $waittime
elif [[ ${ARCH} =~ x86_64 ]]; then
# load all network driver modules listed in /lib/modules/<kernel>/modules.dep file
KERVER=`uname -r`
# Xen guests require xen-netfront for the paravirtual NIC.
modprobe xen-netfront 2>/dev/null || :
for line in `cat /lib/modules/$KERVER/modules.dep |grep -vE 'tunnel|ieee|ifb|bond|dummy|fjes|hv_netvsc|ntb_netdev|hdlc_fr|dlci'| awk -F: '{print \$1}' | sed -e "s/\(.*\)\.ko.*/\1/"`; do
if [[ $line =~ "kernel/drivers/net" ]]; then
modprobe `basename $line`
fi
done
fi
while :; do screen -dr doxcat || screen -S doxcat -L -ln doxcat; done

View File

@@ -0,0 +1,8 @@
#!/bin/sh
echo "Starting xCAT mini-environment"
NEWROOT=$3
XCATMASTER=$XCAT
while :
do
/bin/sh
done

View File

@@ -0,0 +1 @@
el

View File

@@ -10,7 +10,8 @@ dracut_install mkswap df vconfig ifenslave ssh-keygen scp clear dhclient lldpad
dracut_install /lib64/libnss_dns-2.12.so /lib64/libnss_dns.so.2
dracut_install poweroff hwclock date /usr/share/terminfo/x/xterm /usr/share/terminfo/s/screen /etc/nsswitch.conf /etc/services
dracut_install /sbin/rsyslogd /etc/protocols umount /bin/rpm /usr/lib/rpm/rpmrc
dracut_install chmod /sbin/route /sbin/ifconfig /usr/bin/whoami /usr/bin/head /usr/bin/tail basename /etc/redhat-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
#dracut_install chmod /sbin/route /sbin/ifconfig /usr/bin/whoami /usr/bin/head /usr/bin/tail basename /etc/redhat-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
dracut_install chmod ip /usr/bin/whoami /usr/bin/head /usr/bin/tail basename /etc/redhat-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
dracut_install efibootmgr lldptool dmidecode #uxspi prereqs, but will use dmidecode to improve decision on loading ipmi_si
dracut_install /usr/share/zoneinfo/posix/Zulu
dracut_install /usr/share/zoneinfo/posix/GMT-0

View File

@@ -29,7 +29,8 @@ else
dracut_install /usr/lib/libldap-2.4.so.2 /usr/lib/liblber-2.4.so.2 /usr/lib64/libsasl2.so.2 #uxspi has incurred these...
dracut_install /lib/libc.so.6
fi
dracut_install chmod /lib/ld-linux.so.2 /sbin/route /sbin/ifconfig /usr/bin/head /etc/debian_version /etc/lsb-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
#dracut_install chmod /lib/ld-linux.so.2 /sbin/route /sbin/ifconfig /usr/bin/head /etc/debian_version /etc/lsb-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
dracut_install chmod /lib/ld-linux.so.2 ip /usr/bin/head /etc/debian_version /etc/lsb-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
dracut_install /usr/share/zoneinfo/posix/Zulu
dracut_install /usr/share/zoneinfo/posix/GMT-0
dracut_install /usr/share/zoneinfo/posix/Europe/Istanbul

View File

@@ -1,6 +1,5 @@
%global version %(rpm -q xCAT --qf "%{VERSION}" 2>/dev/null | grep -Po '[0-9\.]+' || echo "2.17.0")
Version: %{version}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
%ifarch i386 i586 i686 x86
%define tarch x86
%endif
@@ -31,8 +30,51 @@ License: Various (see individual packages for details)
Vendor: IBM Corp.
Summary: xCAT Genesis netboot image
URL: https://xcat.org/
Source1: xCAT-genesis-base-%{tarch}.tar.bz2
Source0: xCAT-genesis-base-build-support.tar.bz2
Conflicts: xCAT-genesis-scripts-%{tarch} < 1:2.13.10
BuildRequires: bc
BuildRequires: bind-utils
BuildRequires: chrony
BuildRequires: cpio
BuildRequires: dhcp-client
BuildRequires: e2fsprogs
BuildRequires: hostname
%if "%{_target_cpu}" == "x86_64"
BuildRequires: dmidecode
BuildRequires: efibootmgr
%endif
BuildRequires: dosfstools
BuildRequires: dracut
BuildRequires: dracut-network
BuildRequires: ethtool
BuildRequires: gawk
BuildRequires: ipmitool
BuildRequires: iproute
BuildRequires: kexec-tools
BuildRequires: kernel-core
BuildRequires: lldpad
BuildRequires: lvm2
BuildRequires: mdadm
BuildRequires: mstflint
BuildRequires: net-tools
BuildRequires: nfs-utils
BuildRequires: nmap-ncat
BuildRequires: openssh-clients
BuildRequires: openssh-server
BuildRequires: parted
BuildRequires: pciutils
BuildRequires: perl
BuildRequires: perl-interpreter
BuildRequires: procps-ng
BuildRequires: psmisc
BuildRequires: rsync
BuildRequires: rsyslog
BuildRequires: screen
BuildRequires: usbutils
BuildRequires: util-linux
BuildRequires: vim-minimal
BuildRequires: wget
BuildRequires: xfsprogs
Buildroot: %{_localstatedir}/tmp/xCAT-genesis
Packager: IBM Corp.
@@ -41,23 +83,121 @@ Packager: IBM Corp.
xCAT genesis (Genesis Enhanced Netboot Environment for System Information and Servicing) is a small, embedded-like environment for xCAT's use in discovery and management actions when interaction with an OS is infeasible.
This package comprises the base platform with most of the xCAT specific behavior left to xCAT-genesis-scripts package.
Built in environment "%dist" on %{_arch}.
%Prep
%prep
%setup -q -n xCAT-genesis-base-build-support
%Build
%build
%Install
set -euxo pipefail
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
cd $RPM_BUILD_ROOT
tar jxf %{SOURCE1}
cd -
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/genesis/%{tarch}
GENESIS_TMPDIR=$(mktemp -d %{_tmppath}/xcat-genesis.%{tarch}.XXXXXX)
GENESIS_ROOT=$GENESIS_TMPDIR/%{prefix}/share/xcat/netboot/genesis/%{tarch}
GENESIS_FS=$GENESIS_ROOT/fs
DRACUT_IMAGE=$GENESIS_TMPDIR/genesis.rfs
cleanup() {
rm -rf "$GENESIS_TMPDIR"
rm -rf "$DRACUTMODDIR"
}
trap cleanup EXIT
if [ -d /usr/share/dracut/modules.d ]; then
DRACUT_PARENT=/usr/share/dracut/modules.d
else
DRACUT_PARENT=/usr/lib/dracut/modules.d
fi
DRACUTMODDIR=$DRACUT_PARENT/97xcat
rm -rf "$DRACUTMODDIR"
mkdir -p "$DRACUTMODDIR"
cp -a "%{_builddir}/xCAT-genesis-base-build-support/dracut_105/el/." "$DRACUTMODDIR/"
chmod 0755 "$DRACUTMODDIR/module-setup.sh" "$DRACUTMODDIR/xcatroot" "$DRACUTMODDIR/dhclient-script"
if [ "%{_target_cpu}" != "x86_64" ]; then
sed -i '/efibootmgr dmidecode/d' "$DRACUTMODDIR/module-setup.sh"
fi
KERNELVERSION=$(ls -1 /lib/modules | sort -V | tail -n 1)
test -n "$KERNELVERSION"
mkdir -p "$GENESIS_FS/etc/ssh"
mkdir -p /run/rpcbind
dracut --compress gzip -m "xcat base" --no-early-microcode -N -f "$DRACUT_IMAGE" "$KERNELVERSION"
(
cd "$GENESIS_FS"
zcat "$DRACUT_IMAGE" | cpio -dumi
)
%if 0%{?rhel} > 0 && 0%{?rhel} <= 9
# EL9 upgrade safety depends on this remaining a real directory.
if [ ! -d "$GENESIS_FS/usr/lib/dracut/hooks" ] || [ -L "$GENESIS_FS/usr/lib/dracut/hooks" ]; then
echo "EL%{?rhel} genesis payload has invalid usr/lib/dracut/hooks layout" >&2
exit 1
fi
%endif
for script in \
"$GENESIS_FS/sbin/dhclient-script" \
"$GENESIS_FS/usr/sbin/dhclient-script" \
"$GENESIS_FS/sbin/xcatroot"
do
if [ -f "$script" ]; then
chmod 0755 "$script"
fi
done
for perl_dir in \
/usr/share/perl5 \
/usr/lib64/perl5 \
/usr/local/lib64/perl5 \
/usr/local/share/perl5 \
/usr/share/ntp/lib
do
if [ -d "$perl_dir" ]; then
mkdir -p "$GENESIS_FS$perl_dir"
cp -a "$perl_dir/." "$GENESIS_FS$perl_dir/"
fi
done
mkdir -p "$GENESIS_FS/lib/udev/rules.d"
if [ -e /lib/udev/rules.d/80-net-name-slot.rules ]; then
cp /lib/udev/rules.d/80-net-name-slot.rules "$GENESIS_FS/lib/udev/rules.d/"
else
cp "%{_builddir}/xCAT-genesis-base-build-support/80-net-name-slot.rules" \
"$GENESIS_FS/lib/udev/rules.d/"
fi
KERNEL_IMAGE=/boot/vmlinuz-$KERNELVERSION
if [ ! -e "$KERNEL_IMAGE" ]; then
for candidate in \
"/usr/lib/modules/$KERNELVERSION/vmlinuz" \
"/lib/modules/$KERNELVERSION/vmlinuz" \
"$(find /usr/lib/modules/$KERNELVERSION -maxdepth 2 -name 'vmlinuz*' 2>/dev/null | head -n 1)" \
"$(find /lib/modules/$KERNELVERSION -maxdepth 2 -name 'vmlinuz*' 2>/dev/null | head -n 1)" \
"$(ls -1 /boot/vmlinuz-* 2>/dev/null | sort -V | tail -n 1)"
do
if [ -n "$candidate" ] && [ -e "$candidate" ]; then
KERNEL_IMAGE="$candidate"
break
fi
done
fi
test -n "$KERNEL_IMAGE"
test -e "$KERNEL_IMAGE"
cp "$KERNEL_IMAGE" "$GENESIS_ROOT/kernel"
find "$GENESIS_TMPDIR" -type c -delete
cp -a "$GENESIS_TMPDIR/%{prefix}/." "$RPM_BUILD_ROOT/%{prefix}/"
%pretrans -p <lua>
-- Lua block of code for removing a directory recursively
-- The Lua function remove_directory_deep should be called
-- with a directory name or, in a spec file, also with
-- with a directory name in a spec file, also with
-- a rpm macro defined to a directory name. This function
-- is a possible lua equivalent of the shell command "rm -rf"
-- using the lua posix extension embedded in rpm
@@ -138,7 +278,7 @@ remove_directory_deep("/opt/xcat/share/xcat/netboot/genesis/%{tarch}/fs/var/run"
if [ "$1" == "2" ]; then #only on upgrade, as on install it's probably not going to work...
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
. /etc/profile.d/xcat.sh
#mknb %{tarch}
mknb %{tarch}
echo "If you are installing/updating xCAT-genesis-base separately, not as part of installing/updating all of xCAT, run 'mknb <arch>' manually"
mkdir -p /etc/xcat
touch /etc/xcat/genesis-base-updated

View File

@@ -789,7 +789,34 @@ start_udevd() {
ifconfig_loopback() {
logmsg
logmsg ifconfig_loopback
ifconfig lo 127.0.0.1
#ifconfig lo 127.0.0.1
ip link set lo up
ip addr replace 127.0.0.1/8 dev lo
}
#
################################################################################
#
# Convert netmask to prefix length (e.g. 255.255.255.0 -> 24)
mask2prefix() {
nbits=0
old_ifs=$IFS
IFS=.
for dec in $1 ; do
case $dec in
255) nbits=$((nbits+8));;
254) nbits=$((nbits+7));;
252) nbits=$((nbits+6));;
248) nbits=$((nbits+5));;
240) nbits=$((nbits+4));;
224) nbits=$((nbits+3));;
192) nbits=$((nbits+2));;
128) nbits=$((nbits+1));;
0);;
*) IFS=$old_ifs; return 1;;
esac
done
IFS=$old_ifs
echo "$nbits"
}
#
################################################################################
@@ -920,7 +947,23 @@ start_network() {
if [ ! -z $IPADDR ]; then
# configure interface and add default gateway
ifconfig $DEVICE $IPADDR netmask $NETMASK broadcast $BROADCAST
#ifconfig $DEVICE $IPADDR netmask $NETMASK broadcast $BROADCAST
if [ -z "$NETMASK" ]; then
logmsg
logmsg "Invalid netmask: $NETMASK"
shellout
fi
numbits=$(mask2prefix $NETMASK)
if [ $? != 0 -o -z "$numbits" ]; then
logmsg
logmsg "Invalid netmask: $NETMASK"
shellout
fi
if [ -n "$BROADCAST" ]; then
ip link set $DEVICE up && ip addr replace $IPADDR/$numbits brd $BROADCAST dev $DEVICE
else
ip link set $DEVICE up && ip addr replace $IPADDR/$numbits dev $DEVICE
fi
if [ $? != 0 ]; then
logmsg
logmsg "I couldn't configure the network interface using your pre-boot settings:"
@@ -933,10 +976,12 @@ start_network() {
fi
if [ ! -z $GATEWAY ]; then
route add default gw $GATEWAY
#route add default gw $GATEWAY
ip route add default via $GATEWAY
if [ $? != 0 ]; then
logmsg
logmsg "The command \"route add default gw $GATEWAY\" failed."
#logmsg "The command \"route add default gw $GATEWAY\" failed."
logmsg "The command \"ip route add default via $GATEWAY\" failed."
logmsg "Check your pre-boot network settings."
logmsg
shellout

View File

@@ -4,7 +4,7 @@
%ifarch x86_64
%define tarch x86_64
%endif
%ifarch ppc ppc64
%ifarch ppc ppc64 ppc64le
%define tarch ppc64
%endif
%ifarch aarch64
@@ -32,7 +32,7 @@ Vendor: IBM Corp.
Summary: xCAT Genesis netboot image - Core content
URL: https://xcat.org/
Source1: xCAT-genesis-scripts.tar.bz2
Requires: xCAT-genesis-base-%{tarch} >= 2:2.13.10
Requires: xCAT-genesis-base-%{tarch} = 2:%{version}-%{release}
Buildroot: %{_localstatedir}/tmp/xCAT-genesis
Packager: IBM Corp.

View File

@@ -2392,7 +2392,11 @@ sub copycd
my @ret = xCAT::SvrUtils->update_tables_with_mgt_image($distname, $arch, $path, $osdistroname);
my @ret = xCAT::SvrUtils->update_tables_with_diskless_image($distname, $arch, undef, "netboot", $path, $osdistroname);
# @FIXME: (2.19+) dhcp-client is pulled by genimage but not provided by OS repositories. Because
# of that we provide it as an xCAT dependency in xCAT 2.18 unified repository and copy it
# to /install/dhcp_packages/ during post install, and append to the pkgdir of the netboot image below.
# Remove this in 2.19+ and use a supported DHCP implementation.
my @ret = xCAT::SvrUtils->update_tables_with_diskless_image($distname, $arch, undef, "netboot", "$path,/install/dhcp_pkgs/", $osdistroname);
#if ($ret[0] != 0) {
#$callback->({data => "Error when updating the osimage tables for stateless: " . $ret[1]});

View File

@@ -25,6 +25,39 @@ my $service = "named";
my $ddns_key_path = "/etc/xcat/ddns.key";
# Net::DNS >= 1.36 removed support for sign_tsig($keyname, $secret) and now
# expects a keyfile. Keep the keyfile in sync with the xcat_key secret.
sub ensure_ddns_key_file {
my ($ctx) = @_;
return unless (Net::DNS->VERSION >= 1.36);
return unless ($ctx && $ctx->{privkey});
my $algorithm = $ctx->{tsig_algorithm} || "hmac-sha256";
my $contents =
"key \"xcat_key\" {\n"
. "\talgorithm $algorithm;\n"
. "\tsecret \"" . $ctx->{privkey} . "\";\n"
. "};\n\n";
if (open(my $existing_fh, "<", $ddns_key_path)) {
local $/;
my $existing = <$existing_fh>;
close($existing_fh);
return if defined($existing) && $existing eq $contents;
}
my $fh;
unless (open($fh, ">", $ddns_key_path)) {
my $rsp = {};
$rsp->{data}->[0] = "Cannot open $ddns_key_path: $!";
xCAT::MsgUtils->message("E", $rsp, $callback);
return;
}
print $fh $contents;
close($fh);
}
# is this ubuntu ?
if ($distro =~ /ubuntu.*/i || $distro =~ /debian.*/i) {
$service = "bind9";
@@ -1196,7 +1229,7 @@ sub update_namedconf {
$i++;
$line = $currnamed[$i];
push @candidate, $line;
if ($line =~ /key xcat_key/) {
if ($line =~ /key\s+\"?xcat_key\"?\b/) {
$needreplace = 0;
}
} while ($line !~ /^\};/); #skip the old file zone
@@ -1241,8 +1274,9 @@ sub update_namedconf {
} while ($line !~ /^\};/);
}
} elsif ($line =~ /^key xcat_key/) {
} elsif ($line =~ /^key\s+\"?xcat_key\"?\b/) {
$gotkey = 1;
my $algorithmnow;
if ($ctx->{privkey}) {
#for now, assume the field is correct
@@ -1251,20 +1285,29 @@ sub update_namedconf {
do {
$i++;
$line = $currnamed[$i];
if ($line =~ /^\s*algorithm\s+([^;\s]+)\s*;/) {
$algorithmnow = $1;
}
push @newnamed, $line;
} while ($line !~ /^\};/);
} else {
push @newnamed, $line;
while ($line !~ /^\};/) { #skip the old file zone
if ($line =~ /secret \"([^"]*)\"/) {
if ($line =~ /^\s*algorithm\s+([^;\s]+)\s*;/) {
$algorithmnow = $1;
} elsif ($line =~ /secret \"([^"]*)\"/) {
my $passtab = xCAT::Table->new("passwd", -create => 1);
$passtab->setAttribs({ key => "omapi", username => "xcat_key" }, { password => $1 });
$ctx->{privkey} = $1;
}
$i++;
$line = $currnamed[$i];
push @newnamed, $line;
}
}
if ($algorithmnow) {
$ctx->{tsig_algorithm} = $algorithmnow;
}
} elsif ($line !~ /generated by xCAT/) {
push @newnamed, $line;
}
@@ -1363,15 +1406,13 @@ sub update_namedconf {
$ctx->{privkey} = encode_base64(genpassword(32));
chomp($ctx->{privkey});
}
my $contents = "key \"xcat_key\" {\n". "\talgorithm hmac-sha256;\n". "\tsecret \"" . $ctx->{privkey} . "\";\n". "};\n\n";
if (Net::DNS->VERSION >= 1.36) {
open(my $fh, '>', $ddns_key_path) or die "Cannot open $ddns_key_path";
print $fh $contents;
close $fh;
}
$ctx->{tsig_algorithm} ||= "hmac-sha256";
my $contents = "key \"xcat_key\" {\n" . "\talgorithm " . $ctx->{tsig_algorithm} . ";\n" . "\tsecret \"" . $ctx->{privkey} . "\";\n" . "};\n\n";
push @newnamed, $contents;
ensure_ddns_key_file($ctx);
$ctx->{restartneeded} = 1;
} else {
ensure_ddns_key_file($ctx);
}
}

View File

@@ -379,7 +379,9 @@ sub findme {
if ($nodechain !~ /osimage=/) {
$nodechain = $nodechain . ",osimage=$param{'osimage'}";
} else {
$nodechain =~ s/osimage=\w+/osimage=$param{'osimage'}/;
# Replace the full osimage token up to chain separator.
# Using \w+ corrupts image names containing '.' or '-'.
$nodechain =~ s/osimage=[^,;]+/osimage=$param{'osimage'}/;
}
}
} # end if $param{'osimage'}

View File

@@ -2014,6 +2014,11 @@ sub mknb
}
if ($run_mknb) {
foreach (qw(ppc64 x86_64)) {
my $genesis_base_pkg = "xCAT-genesis-base-$_";
if (system("rpm -q $genesis_base_pkg >/dev/null 2>&1") != 0) {
xCAT::MsgUtils->message('I', "Skipping '$cmd $_' because $genesis_base_pkg is not installed.");
next;
}
system("$cmd $_");
if ($? != 0) {
my $rc = $? >> 8;

View File

@@ -0,0 +1,31 @@
@minimal-environment
initscripts
chrony
kernel
net-tools
nfs-utils
openssh-server
rsync
tar
util-linux
wget
python3
tar
bzip2
bc
dracut
dracut-network
rsyslog
hostname
e2fsprogs
ethtool
parted
openssl
dhclient
openssh-clients
bash
vim-minimal
rpm
iputils
perl-interpreter

View File

@@ -0,0 +1 @@
../rh/compute.rhels9.ppc64le.exlist

View File

@@ -0,0 +1 @@
../rh/compute.rhels10.ppc64le.pkglist

View File

@@ -0,0 +1 @@
../rh/compute.rhels9.ppc64le.postinstall

View File

@@ -0,0 +1 @@
../rh/service.rhels9.ppc64le.exlist

View File

@@ -0,0 +1 @@
../rh/service.rhels9.ppc64le.otherpkgs.pkglist

View File

@@ -0,0 +1 @@
../rh/service.rhels9.ppc64le.pkglist

View File

@@ -0,0 +1 @@
../rh/service.rhels9.ppc64le.postinstall

View File

@@ -52,7 +52,9 @@ Obsoletes: atftp-xcat
#
# PCM does not use or ship grub2-xcat
%if %nots390x
Requires: grub2-xcat >= 2.02-0.76.el7.1.snap201905160255 perl-Net-HTTPS-NB perl-HTTP-Async
Requires: grub2-xcat >= 2.02-0.76.el7.1.snap201905160255
Requires: perl-Net-HTTPS-NB >= 0.14-3
Requires: perl-HTTP-Async >= 0.30-3
%endif
%endif
%endif
@@ -127,6 +129,23 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT
%ifos linux
cp -a share/xcat/install/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/install/
cp -a share/xcat/netboot/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/
# Preserve netboot dracut aliases as symlinks so rpm upgrades do not fail when
# replacing older xCAT-server packages that already own these paths as symlinks.
for _required_symlink in \
SL/dracut_033 \
alma/dracut alma/dracut_033 alma/dracut_047 \
centos/dracut centos/dracut_033 centos/dracut_047 \
fedora/dracut_047 \
ol/dracut ol/dracut_033 ol/dracut_047 \
rocky/dracut rocky/dracut_033 rocky/dracut_047 rocky/dracut_105
do
_target="$RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/${_required_symlink}"
if [ ! -L "$_target" ]; then
echo "ERROR: expected symlink missing or dereferenced: $_target" >&2
exit 1
fi
done
%else
cp -hpR share/xcat/install/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/install/
cp -hpR share/xcat/netboot/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot/
@@ -441,6 +460,16 @@ if [ -d $RPM_INSTALL_PREFIX0/share/xcat/devicetype/EthSwitch/Juniper ]; then
rm -rf $RPM_INSTALL_PREFIX0/share/xcat/devicetype/EthSwitch/Juniper
fi
# Newer xCAT-server payloads replace legacy dracut symlinks with real
# directories/files in several distro trees. Remove the old symlinks up front
# so RPM can upgrade the package cleanly.
for distro in SL alma centos fedora ol rocky; do
if [ -d "$RPM_INSTALL_PREFIX0/share/xcat/netboot/$distro" ]; then
find "$RPM_INSTALL_PREFIX0/share/xcat/netboot/$distro" \
-maxdepth 2 -type l -name 'dracut*' -exec rm -f {} +
fi
done
%post
%ifos linux
ln -sf $RPM_INSTALL_PREFIX0/sbin/xcatd /usr/sbin/xcatd
@@ -507,6 +536,16 @@ then
cp /etc/%httpconfigdir/conf.orig/xcat-ws.conf.apache24 /etc/apache2/conf.d/xcat-ws.conf
fi
# @FIXME: (for v2.19+) Remove this and use the supported dhcp
%ifos linux
# In EL10 dhcp-client is not provided by the O.S repositories anymore
# so we download it to a directory which is appended to netboot
# pkgdir during copycds, s.t. genimage <netboot> succeds without
# need for human intervention. At the moment of writing the dhcp-client
# is provided by xCAT 2.18 unified repository as a dependency.
dnf download --destdir=/install/dhcp_pkgs/ dhcp-client
%endif
exit 0
%preun
@@ -527,4 +566,3 @@ if [ $1 == 0 ]; then #This means only on -e
fi
%endif

View File

@@ -53,7 +53,7 @@ my $NORUN = 0;
my $RUN = 1;
#----------global logs attributes---------------
my $running_log_fd = undef
my $running_log_fd = undef;
my $running_log_name = undef;
my $failed_log_name = undef;
my $performance_log_name = undef;

View File

@@ -35,13 +35,32 @@ Requires: xCAT-server = 4:%{version}-%{release}
%define s390x %(if [ "$s390x" = "1" ];then echo 1; else echo 0; fi)
%define nots390x %(if [ "$s390x" = "1" ];then echo 0; else echo 1; fi)
# Match xCAT-genesis-scripts package naming by build architecture.
%ifarch i386 i586 i686 x86
%define genesistarch x86
%endif
%ifarch x86_64
%define genesistarch x86_64
%endif
%ifarch ppc ppc64 ppc64le
%define genesistarch ppc64
%endif
%ifarch aarch64
%define genesistarch aarch64
%endif
# Define a different location for various httpd configs in s390x mode
%define httpconfigdir %(if [ "$s390x" = "1" ];then echo "xcathttpdsave"; else echo "xcat"; fi)
%if %nots390x
Requires: xCAT-probe = 4:%{version}-%{release}
Requires: xCAT-genesis-scripts-%{genesistarch} = 1:%{version}-%{release}
%ifarch x86_64
Requires: xCAT-genesis-scripts-ppc64 = 1:%{version}-%{release}
%endif
%ifarch ppc ppc64 ppc64le
Requires: xCAT-genesis-scripts-x86_64 = 1:%{version}-%{release}
Requires: xCAT-genesis-scripts-ppc64 = 1:%{version}-%{release}
%endif
%endif
Requires: rsync
@@ -57,36 +76,33 @@ Requires: /usr/sbin/dhcpd
Requires: /usr/bin/ssh
%if %nots390x
Requires: /usr/sbin/in.tftpd
Requires: xCAT-buildkit
Requires: xCAT-buildkit = 4:%{version}-%{release}
# Stty is only needed for rcons on ppc64 nodes, but for mixed clusters require it on both x and p
Requires: perl-IO-Stty
Requires: perl-IO-Stty >= 0.04-5
%endif
%endif
%ifos linux
Requires: goconserver >= 0.3.3
Requires: goconserver >= 0.3.3-snap202011021058
%endif
#support mixed cluster
%if %nots390x
Requires: elilo-xcat xnba-undi
Requires: elilo-xcat >= 3.14-6
%endif
%ifarch i386 i586 i686 x86 x86_64
Requires: syslinux
Requires: ipmitool-xcat >= 1.8.17-1
Requires: xnba-undi >= 1.21.1-1
Requires: syslinux-xcat >= 6.03-1
Requires: ipmitool-xcat >= 1.8.18-4
%endif
%ifos linux
%ifarch ppc ppc64 ppc64le
Requires: ipmitool-xcat >= 1.8.17-1
%endif
%endif
%if %notpcm
# PCM does not need or ship syslinux-xcat
%if %nots390x
Requires: syslinux-xcat
# Mixed-arch management nodes also need the x86 PXE stack kept current.
Requires: xnba-undi >= 1.21.1-1
Requires: syslinux-xcat >= 6.03-1
Requires: ipmitool-xcat >= 1.8.18-4
%endif
%endif

View File

@@ -14,14 +14,27 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
Source1: xcat.conf
Source2: license.tar.gz
Source3: xCATSN
Source4: etc.tar.gz
Source5: templates.tar.gz
Source6: xcat.conf.apach24
Requires: perl-DBD-SQLite
Requires: xCAT-client = 4:%{version}-%{release}
Requires: xCAT-server = 4:%{version}-%{release}
Requires: xCAT-probe = 4:%{version}-%{release}
# Match xCAT-genesis-scripts package naming by build architecture.
%ifarch i386 i586 i686 x86
Requires: xCAT-genesis-scripts-x86 = 1:%{version}-%{release}
%endif
%ifarch x86_64
Requires: xCAT-genesis-scripts-x86_64 = 1:%{version}-%{release}
Requires: xCAT-genesis-scripts-ppc64 = 1:%{version}-%{release}
%endif
%ifarch ppc ppc64 ppc64le
Requires: xCAT-genesis-scripts-ppc64 = 1:%{version}-%{release}
%endif
%ifarch aarch64
Requires: xCAT-genesis-scripts-aarch64 = 1:%{version}-%{release}
%endif
Conflicts: xCAT
@@ -52,11 +65,12 @@ Requires: goconserver >= 0.3.3
#support mixed cluster
%ifnarch s390x
Requires: elilo-xcat xnba-undi
Requires: elilo-xcat
%endif
%ifarch i386 i586 i686 x86 x86_64
Requires: syslinux
Requires: xnba-undi
Requires: syslinux-xcat
Requires: ipmitool-xcat >= 1.8.17-1
%endif
%ifos linux
@@ -65,11 +79,6 @@ Requires: ipmitool-xcat >= 1.8.17-1
%endif
%endif
%if %notpcm
# PCM does not need or ship syslinux-xcat
Requires: syslinux-xcat
%endif
%description
xCAT supports management of very large sized cluster by creating a Hierarchical
Cluster and the concept of xCAT Service Nodes. The xCAT Management Node can
@@ -79,6 +88,7 @@ set of compute node. xCATsn package provides xCAT service node support.
%prep
%ifos linux
tar zxf %{SOURCE2}
tar zxf %{SOURCE4}
%else
cp %{SOURCE2} /opt/freeware/src/packages/BUILD
gunzip -f license.tar.gz