summaryrefslogtreecommitdiffstats
path: root/perl-install/timezone.pm
Commit message (Expand)AuthorAgeFilesLines
* - less arguments in ntp_server, $prefix no more passed to function argsDaouda Lo2004-02-041-1/+1
* use $::prefixPascal Rigaux2004-01-061-10/+9
* misc perl_checker cleanupsThierry Vignaud2003-10-201-1/+1
* syntax fixThierry Vignaud2003-10-131-1/+1
* only list one tz for chinas (hp release)Thierry Vignaud2003-10-131-1/+1
* update stratum 2 ntp serversPascal Rigaux2003-09-011-3/+87
* - cleanupPascal Rigaux2003-07-301-36/+38
* perl_checker adaptations + fixesPascal Rigaux2003-04-241-2/+2
* new perl_checker compliancePascal Rigaux2003-04-171-1/+2
* use output_p() instead of output() for /etc/ntp/step-tickersPascal Rigaux2003-02-231-1/+1
* language/country selection change:Guillaume Cottenceau2003-02-081-74/+65
* use "if any" instead of "if grep", and various other occurences of "any", "ev...Pascal Rigaux2003-01-071-1/+1
* (sexProb): drop (unused!)Pascal Rigaux2002-12-131-17/+0
* do not use "local *F", use "my $F" or output() insteadPascal Rigaux2002-12-031-4/+3
* perl_checker adaptationsPascal Rigaux2002-11-271-2/+1
* use $::prefix in timezone::readPascal Rigaux2002-08-081-2/+1
* timezone::read now returns a hashPascal Rigaux2002-08-081-4/+2
* Help "perl -cw" not reporting any warningPascal Rigaux2002-07-251-2/+3
* remove duplicate entry in ntp_serversGuillaume Cottenceau2002-06-071-1/+0
* added Italy (time.ien.it) inYves Duret2002-01-201-0/+1
* use new mkdir_p, rm_rf and cp_af from MDK::CommonPascal Rigaux2001-09-161-2/+1
* Asia/Taipei for Traditional ChinesePascal Rigaux2001-09-081-1/+2
* (ntp_server): fix (step-tickers was empty)Pascal Rigaux2001-09-061-2/+3
* (ntp_server): also set /etc/ntp/step-tickersPascal Rigaux2001-09-031-0/+1
* update ntp servers listPascal Rigaux2001-08-021-38/+1
* move to MDK::Common, bool->to_boolPascal Rigaux2001-07-241-1/+1
* generalize the use of chomp_ as the functional alternative to chomp (and work...Pascal Rigaux2001-07-241-2/+2
* (configureTimezone): propose a list of NTP serversPascal Rigaux2001-07-031-0/+76
* (ntp_server): fixPascal Rigaux2001-07-031-0/+1
* add ntp handlingPascal Rigaux2001-07-031-1/+21
* (%l2t): fix for fuzzyChoicePascal Rigaux2001-03-241-2/+2
* - add many timezonesPascal Rigaux2001-03-141-3/+28
* add step summary. remove steps configureTimezone and configurePrinterPascal Rigaux2001-02-101-4/+5
* configureTimezone doesn't take parameter /etc/sysconfig/clockPascal Rigaux2001-02-091-3/+3
* no_commentPascal Rigaux2000-09-141-1/+1
* no_commentPascal Rigaux2000-07-311-0/+2
* no_commentPascal Rigaux2000-04-251-3/+3
* no_commentPascal Rigaux2000-03-141-1/+0
* no_commentPascal Rigaux2000-01-241-0/+3
* no_commentPascal Rigaux2000-01-121-0/+1
* no_commentPascal Rigaux2000-01-101-0/+1
* no_commentPascal Rigaux2000-01-061-1/+3
* no_commentPascal Rigaux2000-01-041-0/+1
* *** empty log message ***Pascal Rigaux2000-01-041-0/+1
* no_commentPascal Rigaux2000-01-041-1/+3
* no_commentPascal Rigaux1999-12-271-1/+1
* no_commentPascal Rigaux1999-12-241-0/+17
* no_commentPascal Rigaux1999-12-151-0/+1
* no_commentPascal Rigaux1999-12-141-2/+2
* *** empty log message ***Francois Pons1999-09-281-0/+7
="hl opt">(\%modules_removed_from_stage1); my %images = ( pcmcia => 'fs/cdrom|loopback disk/cdrom|raw|pcmcia bus/pcmcia', cdrom => 'fs/cdrom|loopback disk/cdrom|raw|scsi', network => 'bus/usb|usb_keyboard|pcmcia disk/raw|usb', network_drivers => 'fs/network|loopback network/main|pcmcia|usb|raw|gigabit', all => 'fs/cdrom disk/cdrom|raw bus/usb|usb_keyboard disk/usb|scsi fs/loopback|local bus/pcmcia disk/pcmcia|sata|hardware_raid fs/network network/main|pcmcia|usb|raw|gigabit bus/firewire disk/firewire', ); my $verbose = $ARGV[0] eq '-v' && shift; my ($f, @para) = @ARGV; $::{$f}->(@para); sub image2modules { my ($image) = @_; my $l = $images{$image}; my @modules = if_($image !~ /drivers/, @modules_always_on_stage1); push @modules, map { category2modules($_) } split(' ', $l); @modules = difference2(\@modules, \@modules_removed_from_stage1); if ($image !~ /all/) { @modules = difference2(\@modules, \@modules_only_for_all_img); } @modules; } sub remove_unneeded_modules { my ($kern_ver) = @_; #- need creating a first time the modules.dep for all modules #- it will be redone in make_modules_dep when unneeded modules are removed make_modules_dep($kern_ver); load_dependencies("all.kernels/$kern_ver/modules.dep"); my $ext = module_extension($kern_ver); my @all = list_modules::all_modules(); my @all_with_deps = map { dependencies_closure($_) } @all; my %wanted_modules = map {; "$_.$ext" => 1 } @all_with_deps; foreach (all("all.kernels/$kern_ver/modules")) { $wanted_modules{$_} or unlink "all.kernels/$kern_ver/modules/$_"; } } sub make_modules_per_image { my ($kern_ver) = @_; make_modules_dep($kern_ver); load_dependencies("all.kernels/$kern_ver/modules.dep"); my $ext = module_extension($kern_ver); foreach my $image (keys %images) { my @modules_with_deps = uniq(map { dependencies_closure($_) } image2modules($image)); my @l = map { "$_.$ext" } @modules_with_deps; my $dir = "all.kernels/$kern_ver/modules"; @l = grep { -e "$dir/$_" } @l; if ($image =~ /all/) { system("cd $dir ; tar cf ../${image}_modules.tar @l") == 0 or die "tar failed\n"; } else { my $gi_base_dir = chomp_(`pwd`) . '/..'; system("cd $dir ; $gi_base_dir/mdk-stage1/mar/mar -c ../${image}_modules.mar @l") == 0 or die "mar failed\n"; } } } sub make_modules_dep { my ($kern_ver) = @_; my @l = kernel_is_26($kern_ver) ? cat_("all.kernels/$kern_ver/lib/modules/$kern_ver/modules.dep") : `/sbin/depmod-24 -F all.kernels/$kern_ver/boot/System.map-$kern_ver -e *.o | perl -pe 's/\\\n//'`; @l = map { if (/(\S+):\s+(.*)/) { my ($module, @deps) = map { m!.*/(.*)\.k?o(\.gz)$! && $1 } $1, split(' ', $2); if (member($module, 'plip', 'ppa', 'imm')) { @deps = map { $_ eq 'parport' ? 'parport_pc' : $_ } @deps; } elsif ($module eq 'vfat') { push @deps, 'nls_cp437', 'nls_iso8859-1'; } if_(@deps, join(' ', "$module:", @deps)); } else { (); } } @l; output("all.kernels/$kern_ver/modules.dep", map { "$_\n" } @l); } sub make_modules_description { my ($kern_ver) = @_; my $ext = module_extension($kern_ver); my $dir = "all.kernels/$kern_ver/modules"; my @l; if (kernel_is_26(`uname -r`)) { #- modinfo behaves differently depending on the build kernel used my $name; @l = map { $name = $1 if m!^filename:\s*(.*)\.$ext!; if_($name && /^description:\s*(.*)/, "$name\t$1"); } `cd $dir ; /sbin/modinfo *.$ext`; } else { @l = map { if_(/(.*?)\.$ext "(.*)"/, "$1\t$2\n"); } `cd $dir ; /sbin/modinfo-24 -f '%{filename} %{description}\n' *.$ext`; } output("modules.description", @l); } sub pci_modules4stage1 { my ($category) = @_; my @modules = difference2([ category2modules($category) ], \@modules_removed_from_stage1); print "$_\n" foreach uniq(map { dependencies_closure($_) } @modules); } sub check() { my $error; my %listed; while (my ($t1, $l) = each %list_modules::l) { while (my ($t2, $l) = each %$l) { ref $l or die "bad $l in $t1/$t2"; foreach (@$l) { $listed{$_} = "$t1/$t2"; } } } my %module2category; my %deprecated_modules = %listed; my $not_listed = sub { my ($msg, $verbose, @l) = @_; my %not_listed; foreach (@l) { my ($mod) = m|([^/]*)\.k?o(\.gz)?$| or next; delete $deprecated_modules{$mod}; next if $listed{$mod}; s|.*?mdk(BOOT)?/||; s|kernel/||; s|drivers/||; s|3rdparty/||; $_ = dirname $_; $_ = dirname $_ if $mod eq basename($_); $module2category{$mod} = $_; push @{$not_listed{$_}}, $mod; } if ($verbose) { print "$msg $_: ", join(" ", @{$not_listed{$_}}), "\n" foreach sort keys %not_listed; } }; $not_listed->('NOT LISTED', 1, `cd all.kernels/2.6* ; find -name "*.k?o" -o -name "*.k?o.gz"`); $not_listed->('not listed', $verbose, `rpm -qpl /RPMS/kernel-2.6*`); if (%deprecated_modules) { my %per_cat; push @{$per_cat{$listed{$_}}}, $_ foreach keys %deprecated_modules; foreach my $cat (sort keys %per_cat) { print "bad/old modules ($cat) : ", join(" ", sort @{$per_cat{$cat}}), "\n"; } } { require '/usr/bin/merge2pcitable.pl'; my $pcitable = read_pcitable("/usr/share/ldetect-lst/pcitable"); my $usbtable = read_pcitable("/usr/share/ldetect-lst/usbtable"); my @l1 = uniq grep { !/:/ && $_ ne 'unknown' } map { $_->[0] } values %$pcitable; if (my @l = difference2(\@l1, [ keys %listed ])) { my %not_listed; push @{$not_listed{$module2category{$_}}}, $_ foreach @l; if (my $l = delete $not_listed{''}) { print "bad/old pcitable modules : ", join(" ", @$l), "\n"; } print STDERR "PCITABLE MODULES NOT LISTED $_: ", join(" ", @{$not_listed{$_}}), "\n" foreach sort keys %not_listed; #$error = 1; } my @l2 = uniq grep { !/:/ && $_ ne 'unknown' } map { $_->[0] } values %$usbtable; if (my @l = difference2(\@l2, [ keys %listed ])) { my %not_listed; push @{$not_listed{$module2category{$_}}}, $_ foreach @l; if ($verbose) { print "usbtable modules not listed $_: ", join(" ", @{$not_listed{$_}}), "\n" foreach sort keys %not_listed; } } } exit $error; }