software/0000755000567100000120000000000011205635233012370 5ustar jcameronwheelsoftware/config.info.uk_UA0000664000567100000120000000026511205635233015522 0ustar jcameronwheelpackage_system= ,1,rpm-RPM,pkgadd-Solaris,hpux-HPUX,freebsd-FreeBSD,slackware-Slackware,debian-Debian,aix-AIX,emerge-Gentoo line2= ,11 software/config.info.tr0000644000567100000120000000017211205635233015136 0ustar jcameronwheelpackage_system=Paket ynetim sistemi,1,rpm-RPM,pkgadd-Solaris,hpux-HPUX,freebsd-FreeBSD,slackware-Slackware,debian-Debian software/file_info.cgi0000755000567100000120000000412511205635233015013 0ustar jcameronwheel#!/usr/local/bin/perl # file_info.cgi # Display information about a file owned by the package management system require './software-lib.pl'; &ReadParse(); $f = $in{'file'}; &ui_print_header(undef, $text{'file_title'}, "", "file_info"); $f =~ s/\/$//; if ($f !~ /^\//) { # if the filename is not absolute, look for it foreach $p (split(/:/, $ENV{'PATH'})) { last if (&installed_file("$p/$f")); } } else { # absolute path.. must exist in DB &installed_file($f); } if (!%file) { print "",&text('file_notfound', "$f"),"

\n"; } else { # display file info $nc = "width=10% nowrap"; print &ui_table_start($text{'file_title'}, "width=100%", 4); print &ui_table_row($text{'file_path'}, "".&html_escape($file{'path'})."", 3); print &ui_table_row($text{'file_type'}, $type_map[$file{'type'}]); if ($file{'type'} != 3 && $file{'type'} != 4) { print &ui_table_row($text{'file_perms'}, $file{'mode'}); print &ui_table_row($text{'file_owner'}, $file{'user'}); print &ui_table_row($text{'file_group'}, $file{'group'}); if ($file{'type'} == 0) { print &ui_table_row($text{'file_size'}, $file{'size'}); } } else { print &ui_table_row($text{'file_link'}, "".&html_escape($file{'link'})."", 3); } print &ui_table_end(); # Show packages containing the file (usually only one) print &ui_columns_start([ $text{'file_pack'}, $text{'file_class'}, $text{'file_desc'} ], 100); @pkgs = split(/\s+/, $file{'packages'}); @vers = split(/\s+/, $file{'versions'}); $n = &list_packages(@pkgs); for($j=0; $j<@pkgs; $j++) { for($i=0; $i<$n; $i++) { next if ($vers[$i] && $packages{$i,'version'} ne $vers[$j] || $packages{$i,'name'} ne $pkgs[$j]); local @cols; push(@cols, "$pkgs[$j]"); $c = $packages{$i,'class'}; push(@cols, $c || $text{'file_none'}); push(@cols, $packages{$i,'desc'}); print &ui_columns_row(\@cols); } } print &ui_columns_end(); } &ui_print_footer("", $text{'index_return'}); software/software-lib.pl0000755000567100000120000001531411205635233015332 0ustar jcameronwheel# software-lib.pl # A generalized system for package management on solaris, linux, etc.. BEGIN { push(@INC, ".."); }; use WebminCore; &init_config(); $heiropen_file = "$module_config_directory/heiropen"; # Use the appropriate function set for whatever package management system # we are using. do "$config{package_system}-lib.pl"; if ($config{'update_system'} eq '*') { # User specifically doesn't want any $update_system = undef; } elsif ($config{'update_system'}) { # User-specified system $update_system = $config{'update_system'}; } else { # Guess which update system we are using if (&has_command($config{'apt_mode'} ? "aptitude" : "apt-get")) { $update_system = "apt"; } elsif (&has_command("yum") && -r "/etc/yum.conf") { $update_system = "yum"; } elsif (&has_command("up2date") && &has_command("rhn_check")) { $update_system = "rhn"; } elsif (-x "/opt/csw/bin/pkg-get" || &has_command("pkg-get") || -x "/opt/csw/bin/pkgutil" || &has_command("pkgutil")) { $update_system = "csw"; } elsif (&has_command("urpmi")) { $update_system = "urpmi"; } elsif (&has_command("emerge")) { $update_system = "emerge"; } elsif (&has_command("cupdate")) { # not done yet! } } if ($update_system) { do $update_system."-lib.pl"; $has_update_system = 1; } # uncompress_if_needed(file, disposable) # If some file needs to be uncompressed or ungzipped, do it and return the # new temp file path. Otherwise, return the original path. sub uncompress_if_needed { return $_[0] if (&is_readonly_mode()); # don't even bother open(PFILE, $_[0]); read(PFILE, $two, 2); close(PFILE); if ($two eq "\037\235") { if (!&has_command("uncompress")) { &unlink_file($_[0]) if ($_[1]); &error($text{'soft_euncompress'}); } local $temp = $_[0] =~ /\/([^\/]+)\.Z/i ? &tempname("$1") : &tempname(); local $out = `uncompress -c $_[0] 2>&1 >$temp`; unlink($_[0]) if ($_[1]); if ($?) { unlink($temp); &error(&text('soft_euncmsg', $out)); } return $temp; } elsif ($two eq "\037\213") { if (!&has_command("gunzip")) { unlink($_[0]) if ($_[1]); &error($text{'soft_egzip'}); } local $temp = $_[0] =~ /\/([^\/]+)\.gz/i ? &tempname("$1") : &tempname(); local $out = `gunzip -c $_[0] 2>&1 >$temp`; unlink($_[0]) if ($_[1]); if ($?) { unlink($temp); &error(&text('soft_egzmsg', $out)); } return $temp; } return $_[0]; } # show_package_info(package, version, [no-installed-message]) sub show_package_info { @pinfo = &package_info($_[0], $_[1]); return () if (!@pinfo); print &ui_subheading(&text('do_success', $_[0])) if (!$_[2]); print &ui_table_start($text{'edit_details'}, "width=100%", 4, [ "width=20%", undef, "width=20%", undef ]); # Package description if ($pinfo[2]) { $desc = &html_escape(&entities_to_ascii($pinfo[2])); $desc =~ s/\r?\n/ 
/g; print &ui_table_row($text{'edit_desc'}, "$desc", 3); } # Name print &ui_table_row($text{'edit_pack'}, &html_escape($pinfo[0])); # Class, if any print &ui_table_row($text{'edit_class'}, $pinfo[1] ? &html_escape($pinfo[1]) : $text{'edit_none'}); # Version number print &ui_table_row($text{'edit_ver'}, &html_escape($pinfo[4])); # Vendor print &ui_table_row($text{'edit_vend'}, &html_escape(&entities_to_ascii($pinfo[5]))); # Architecture print &ui_table_row($text{'edit_arch'}, &html_escape($pinfo[3])); # Install date print &ui_table_row($text{'edit_inst'}, &html_escape($pinfo[6])); print &ui_table_end(); return @pinfo; } @type_map = ( $text{'soft_reg'}, $text{'soft_dir'}, $text{'soft_spec'}, $text{'soft_sym'}, $text{'soft_hard'}, $text{'soft_edit'} ); # get_heiropen() # Returns an array of open categories sub get_heiropen { open(HEIROPEN, $heiropen_file); local @heiropen = ; chop(@heiropen); close(HEIROPEN); return @heiropen; } # save_heiropen(&heir) sub save_heiropen { &open_tempfile(HEIR, ">$heiropen_file"); foreach $h (@{$_[0]}) { &print_tempfile(HEIR, $h,"\n"); } &close_tempfile(HEIR); } # missing_install_link(package, description, return, return-desc) # Returns HTML for installing some package that is missing, from the # appropriate update system for this OS. Returns undef if automatic installation # is not possible for some reason. # Supported package names are : # apache # sendmail # postfix # squid # procmail # samba # mysql # postgresql # clamav # spamassassin sub missing_install_link { local ($name, $desc, $return, $returndesc) = @_; return undef if (!defined(&update_system_resolve)); return undef if (!&foreign_check($module_name)); local $pkg = &update_system_resolve($name); return undef if (!$pkg); local ($cpkg) = caller(); local $caller = eval '$'.$cpkg.'::module_name'; return &text('missing_link', $desc, "../$module_name/install_pack.cgi?source=3&update=".&urlize($pkg)."&return=".&urlize($return)."&returndesc=".&urlize($returndesc)."&caller=".&urlize($caller), $text{$update_system."_name"}); } # update_system_button(field-name, label) # Returns HTML for a button that opens the update system search window sub update_system_button { local ($name, $label) = @_; if (defined(&update_system_available) || defined(&update_system_search)) { return ""; } return undef; } # compare_versions(ver1, ver2) # Returns -1 if ver1 is older than ver2, 1 if newer, 0 if same sub compare_versions { local @sp1 = split(/[\.\-]/, $_[0]); local @sp2 = split(/[\.\-]/, $_[1]); for(my $i=0; $i<@sp1 || $i<@sp2; $i++) { local $v1 = $sp1[$i]; local $v2 = $sp2[$i]; local $comp; if ($v1 =~ /^\d+$/ && $v2 =~ /^\d+$/) { $comp = $v1 <=> $v2; } else { $comp = $v1 cmp $v2; } return $comp if ($comp); } return 0; } # check_package_system() # Returns an error message if some command needed by the selected package # management system is missing. sub check_package_system { local $err; if (defined(&validate_package_system)) { $err = &validate_package_system(); } if (defined(&list_package_system_commands)) { foreach my $c (&list_package_system_commands()) { if (!&has_command($c)) { $err ||= &text('index_epackagecmd', &package_system(), "$c"); } } } return $err; } # check_update_system() # Returns an error message if some command needed by the selected update # system is missing. sub check_update_system { return undef if (!$update_system); local $err; if (defined(&validate_update_system)) { $err = &validate_update_system(); } if (defined(&list_update_system_commands)) { foreach my $c (&list_update_system_commands()) { if (!&has_command($c)) { $err ||= &text('index_eupdatecmd', $text{$update_system.'_name'} || uc($update_system), "$c"); } } } return $err; } 1; software/config-openmamba-linux0000664000567100000120000000006011205635233016650 0ustar jcameronwheelpackage_system=rpm update_system=apt apt_mode=0 software/yum-lib.pl0000775000567100000120000001004511205635233014310 0ustar jcameronwheel# yum-lib.pl # Functions for installing packages with yum $yum_config = $config{'yum_config'} || "/etc/yum.conf"; sub list_update_system_commands { return ("yum"); } # update_system_install([package], [&in]) # Install some package with yum sub update_system_install { local $update = $_[0] || $in{'update'}; local $in = $_[1]; local $enable; if ($in->{'enablerepo'}) { $enable = "enablerepo=".quotemeta($in->{'enablerepo'}); } local (@rv, @newpacks); print "",&text('yum_install', "yum $enable -y install $update"),"

\n"; print "

";
&additional_log('exec', undef, "yum $enable -y install $update");
local $qm = join(" ", map { quotemeta($_) } split(/\s+/, $update));
&open_execute_command(CMD, "yum $enable -y install $qm ) {
	s/\r|\n//g;
	if (/^\[(update|install|deps):\s+(\S+)\s+/) {
		push(@rv, $2);
		}
	elsif (/^(Installed|Dependency Installed|Updated|Dependency Updated):\s+(.*)/) {
		local @pkgs = split(/\s+/, $2);
		foreach my $p (@pkgs) {
			if ($p !~ /:/ && $p =~ /^(\S+)\.(\S+)$/) {
				my $pname = $1;
				if ($p =~ /[^0-9\.\-\_i]/) {
					push(@rv, $pname);
					}
				}
			}
		}
	if (!/ETA/ && !/\%\s+done\s+\d+\/\d+\s*$/) {
		print &html_escape($_."\n");
		}
	}
close(CMD);
print "
\n"; if ($?) { print "$text{'yum_failed'}

\n"; return ( ); } else { print "$text{'yum_ok'}

\n"; return &unique(@rv); } } # show_update_system_opts() # Returns HTML for enabling a repository, if any are disabled sub show_update_system_opts { local @pinfo = &package_info("yum"); if (&compare_versions($pinfo[4], "2.1.10") > 0) { local $conf = &get_yum_config(); local @ena; foreach my $r (@$conf) { if ($r->{'values'}->{'enabled'} eq '0') { push(@ena, $r->{'name'}); } } if (@ena) { return $text{'yum_enable'}." ". &ui_select("enablerepo", "", [ [ "", $text{'yum_none'} ], map { [ $_ ] } @ena ]); } } return undef; } # update_system_form() # Shows a form for updating all packages on the system sub update_system_form { print &ui_subheading($text{'yum_form'}); print &ui_form_start("yum_upgrade.cgi"); print &ui_form_end([ [ undef, $text{'yum_apply'} ] ]); } # update_system_resolve(name) # Converts a standard package name like apache, sendmail or squid into # the name used by YUM. sub update_system_resolve { local ($name) = @_; return $name eq "apache" ? "httpd" : $name eq "dhcpd" ? "dhcp" : $name eq "mysql" ? "mysql mysql-server mysql-devel" : $name eq "openssh" ? "openssh openssh-server" : $name eq "postgresql" ? "postgresql postgresql-libs postgresql-server" : $name eq "openldap" ? "openldap-servers openldap-clients" : $name; } # update_system_available() # Returns a list of package names and versions that are available from YUM sub update_system_available { local @rv; local %done; &open_execute_command(PKG, "yum list", 1, 1); while() { next if (/^Setting\s+up/i); if (/^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/ || /^(\S+)\.(\S+)\s+(\S+)\s+(\S+)\s*$/) { local $name = $1; if ($done{$name}) { # Seen twice - assume second is better $done{$name}->{'version'} = $3; $done{$name}->{'source'} = $4; if ($done{$name}->{'version'} =~ s/^(\S+)://) { $done{$name}->{'epoch'} = $1; } else { $done{$name}->{'epoch'} = undef; } } else { # First occurrance local $pkg = { 'name' => $1, 'arch' => $2, 'version' => $3, 'source' => $4 }; if ($pkg->{'version'} =~ s/^(\S+)://) { $pkg->{'epoch'} = $1; } push(@rv, $pkg); $done{$pkg->{'name'}} = $pkg; } } } close(PKG); return @rv; } # get_yum_config() # Returns entries from the YUM config file, as a list of hash references sub get_yum_config { local @rv; local $sect; open(CONF, $yum_config); while() { s/\r|\n//g; s/^\s*#.*$//; if (/^\s*\[(.*)\]/) { # Start of a section $sect = { 'name' => $1, 'values' => { } }; push(@rv, $sect); } elsif (/^\s*(\S+)\s*=\s*(.*)/ && $sect) { # Value in a section $sect->{'values'}->{lc($1)} = $2; } } close(CONF); return \@rv; } 1; software/config-mandrake-linux0000644000567100000120000000003611205635233016474 0ustar jcameronwheelpackage_system=rpm apt_mode=0 software/log_parser.pl0000775000567100000120000000250411205635233015070 0ustar jcameronwheel# log_parser.pl # Functions for parsing this module's logs do 'software-lib.pl'; # parse_webmin_log(user, script, action, type, object, ¶ms) # Converts logged information from this module into human-readable form sub parse_webmin_log { local ($user, $script, $action, $type, $object, $p, $long) = @_; if ($action eq 'install') { return &text("log_install_package", "$object"); } elsif ($action eq 'apt') { local @p = split(/\0/, $p->{'packages'}); return &text($long || @p < 2 ? "log_${type}_apt_l" : "log_${type}_apt", "".join(" ",@p)."", scalar(@p)); } elsif ($action eq 'rhn') { local @p = @{$p->{'packages'}}; return &text($long || @p < 2 ? "log_${type}_rhn_l" : "log_${type}_rhn", "".join(" ",@p)."", scalar(@p)); } elsif ($action eq "yum") { local @p = @{$p->{'packages'}}; return &text($long || @p < 2 ? "log_${type}_yum_l" : "log_${type}_yum", "".join(" ",@p)."", scalar(@p)); } elsif ($action eq "urpmi") { return $text{'log_urpmi_'.$type}; } elsif ($action eq 'delete') { return &text('log_delete', "$object"); } elsif ($action eq 'deletes') { local @p = split(/\0/, $p->{'packs'}); if ($long) { return &text('log_deletes_l', "".join(" ", @p).""); } else { return &text('log_deletes', scalar(@p)); } } else { return undef; } } software/config-suse-linux0000644000567100000120000000003611205635233015671 0ustar jcameronwheelpackage_system=rpm apt_mode=0 software/edit_pack.cgi0000755000567100000120000000234211205635233015003 0ustar jcameronwheel#!/usr/local/bin/perl # edit_pack.cgi # Displays the details of an existing package, with links to uninstall and # other options require './software-lib.pl'; &ReadParse(); @pinfo = &package_info($in{'package'}, $in{'version'}); $pinfo[0] || &error($text{'edit_egone'}); &ui_print_header(undef, $text{'edit_title'}, "", "edit_pack"); @pinfo = &show_package_info($in{'package'}, $in{'version'}, 1); print "\n"; # Show button to list files, if supported if (!$pinfo[8]) { print &ui_form_start("list_pack.cgi"); print &ui_hidden("package", $pinfo[0]); print &ui_hidden("version", $pinfo[4]); print &ui_hidden("search", $in{'search'}); print "\n"; print &ui_form_end(); } # Show button to un-install (if possible) if (!$pinfo[7]) { print &ui_form_start("delete_pack.cgi"); print &ui_hidden("package", $pinfo[0]); print &ui_hidden("version", $pinfo[4]); print &ui_hidden("search", $in{'search'}); print "\n"; print &ui_form_end(); } print "
",&ui_submit($text{'edit_list'}),"",&ui_submit($text{'edit_uninst'}),"
\n"; if ($in{'search'}) { &ui_print_footer("search.cgi?search=$in{'search'}", $text{'search_return'}); } else { &ui_print_footer("tree.cgi#$pinfo[1]", $text{'index_treturn'}); } software/delete_file.cgi.bak0000775000567100000120000000026011205635233016054 0ustar jcameronwheel#!/usr/local/bin/perl # delete_file.cgi # Delete a downloaded package that is no longer needed require './software-lib.pl'; &ReadParse(); unlink($in{'file'}); &redirect(""); software/config-slackware-linux0000644000567100000120000000004411205635233016665 0ustar jcameronwheelpackage_system=slackware apt_mode=0 software/config-freebsd0000644000567100000120000000004211205635233015164 0ustar jcameronwheelpackage_system=freebsd apt_mode=0 software/yum_upgrade.cgi0000775000567100000120000000160211205635233015401 0ustar jcameronwheel#!/usr/local/bin/perl # yum_upgrade.cgi # Upgrade all packages require './software-lib.pl'; &ReadParse(); &ui_print_unbuffered_header(undef, $text{'yum_upgrade'}, ""); &clean_environment(); $cmd = "yum -y update"; print "",&text('yum_upgradedesc', "$cmd"),"

\n"; print "

";
&additional_log("exec", undef, $cmd);
open(CMD, "$cmd 2>&1 ) {
	if (/^\[(update|install):\s+(\S+)\s+/) {
		push(@packs, $2);
		}
	if (!/ETA/ && !/\%\s+done\s+\d+\/\d+\s*$/) {
		print &html_escape($_);
		}
	}
close(CMD);
&reset_environment();
print "
\n"; if ($?) { print "$text{'yum_upgradefailed'}

\n"; } else { print "$text{'yum_upgradeok'}

\n"; foreach $p (@packs) { local @pinfo = &show_package_info($p); } &webmin_log("yum", "upgrade", undef, { 'packages' => \@packs }) if (@packs); } &ui_print_footer("", $text{'index_return'}); software/config-unixware0000644000567100000120000000004111205635233015413 0ustar jcameronwheelpackage_system=pkgadd apt_mode=0 software/config.info.zh_TW.Big50000644000567100000120000000016511205635233016333 0ustar jcameronwheelpackage_system=M޲ztO,1,rpm-RPM,pkgadd-Solaris,hpux-HPUX,freebsd-FreeBSD,slackware-Slackware,debian-Debian software/urpmi-lib.pl0000775000567100000120000000413011205635233014630 0ustar jcameronwheel# urpmi-lib.pl # Functions for installing packages with Mandrake urpmi sub list_update_system_commands { return ("urpmi"); } # update_system_install([package]) # Install some package with urpmi sub update_system_install { local $update = $_[0] || $in{'update'}; local (@rv, @newpacks); local $cmd = "urpmi --force --auto --media main"; print "",&text('urpmi_install', "$cmd $update"),"

\n"; print "

";
&additional_log('exec', undef, "$cmd $update");
local $qm = join(" ", map { quotemeta($_) } split(/\s+/, $update));
&open_execute_command(CMD, "$cmd $qm ) {
	s/\r|\n//g;
	if (/installing\s+(\S+)\s+from/) {
		# Found a package
		local $pkg = $1;
		$pkg =~ s/\-\d.*//;	# remove version
		push(@rv, $pkg);
		}
	print &html_escape($_."\n");
	}
close(CMD);
print "
\n"; if ($?) { print "$text{'urpmi_failed'}

\n"; return ( ); } else { print "$text{'urpmi_ok'}

\n"; return &unique(@rv); } } # update_system_form() # Shows a form for updating all packages on the system sub update_system_form { print &ui_subheading($text{'urpmi_form'}); print &ui_form_start("urpmi_upgrade.cgi"); print &ui_submit($text{'urpmi_update'}, "update"),"
\n"; print &ui_submit($text{'urpmi_upgrade'}, "upgrade"),"
\n"; print &ui_form_end(); } # update_system_resolve(name) # Converts a standard package name like apache, sendmail or squid into # the name used by YUM. sub update_system_resolve { local ($name) = @_; return $name eq "apache" ? "apache2" : $name eq "dhcpd" ? "dhcp-server" : $name eq "mysql" ? "MySQL MySQL-client MySQL-common" : $name eq "postgresql" ? "postgresql postgresql-server" : $name; } # update_system_available() # Returns a list of package names and versions that are available from URPMI sub update_system_available { local @rv; local %done; &open_execute_command(PKG, "urpmq -f --list", 1, 1); while() { if (/^(\S+)\-(\d[^\-]*)\-([^\.]+)\.(\S+)/) { next if ($done{$1,$2}++); push(@rv, { 'name' => $1, 'version' => $2, 'release' => $3, 'arch' => $4 }); } } close(PKG); return @rv; } software/delete_packs.cgi0000755000567100000120000000354411205635233015510 0ustar jcameronwheel#!/usr/local/bin/perl # delete_packs.cgi # Ask if the user wants to delete multiple packages, and if so do it # XXX logging require './software-lib.pl'; &ReadParse(); &error_setup($text{'deletes_err'}); foreach $d (split(/\0/, $in{'del'})) { local ($p, $v) = split(/\s/, $d); local @pinfo; (@pinfo = &package_info($p, $v)) || &error(&text('delete_epack', $p)); push(@packs, $p); push(@vers, $v); push(@infos, \@pinfo); } @packs || &error($text{'deletes_enone'}); &ui_print_header(undef, $text{'deletes_title'}, "", "delete"); if ($in{'sure'}) { # do the deletion print "

\n"; if (defined(&delete_packages)) { # Can just use one function print &text('deletes_desc', "".join(" ", @packs).""), "

\n"; $error = &delete_packages(\@packs, \%in, \@vers); if ($error) { print "",&text('deletes_failed2', $error),"

\n"; } else { print "$text{'deletes_success2'}

\n"; } } else { # Need to use a loop for($i=0; $i<@packs; $i++) { $error = &delete_package($packs[$i], \%in, $vers[$i]); if ($error) { print "",&text('deletes_failed1', "$packs[$i]", $error),"
\n"; } else { print &text('deletes_success1', "$packs[$i]"),"
\n"; } } } &webmin_log("deletes", "package", undef, { 'packs' => \@packs }); } else { # Ask if the user is sure.. print "

\n"; print &text('deletes_rusure', "".join(" ", @packs).""), "

\n"; print &ui_form_start("delete_packs.cgi", "post"); foreach $d (split(/\0/, $in{'del'})) { print &ui_hidden("del", $d); } print &ui_hidden("sure", 1); print &ui_hidden("search", $in{'search'}); print &ui_submit($text{'deletes_ok'}); if (defined(&delete_options)) { &delete_options($packs[0]); } print &ui_form_end(),"

\n"; } &ui_print_footer("search.cgi?search=$in{'search'}", $text{'search_return'}); software/config.info.ru_RU0000664000567100000120000000026311205635233015550 0ustar jcameronwheelpackage_system= ,1,rpm-RPM,pkgadd-Solaris,hpux-HPUX,freebsd-FreeBSD,slackware-Slackware,debian-Debian,aix-AIX,emerge-Gentoo line2= ,11 software/slackware-lib.pl0000755000567100000120000001514511205635233015456 0ustar jcameronwheel# slackware-lib.pl # Functions for slackware package management $package_dir = "/var/log/packages"; %class_map = ( 'a', 'Base Linux system', 'ap', 'Applications', 'd', 'Program development', 'des', 'Crypt library', 'e', 'GNU Emacs', 'f', 'FAQs and documentation', 'gtk', 'GTK+ and GNOME programs', 'k', 'Linux kernel source', 'kde', 'KDE desktop and programs', 'n', 'Networking', 't', 'TeX', 'tcl', 'TcL/Tk', 'xap', 'X applications', 'xd', 'X server development', 'xv', 'XView programs', 'y', 'Games' ); use POSIX; chop($system_arch = `uname -m`); sub validate_package_system { return -d &translate_filename($package_dir) ? undef : &text('slack_edir', "$package_dir"); } # list_packages([package]*) # Fills the array %packages with a list of all packages sub list_packages { local ($i, $f, @list); opendir(DIR, &translate_filename($package_dir)); local @list = @_ ? @_ : grep { !/^\./ } readdir(DIR); $i = 0; foreach $f (@list) { $packages{$i,'name'} = $f; $packages{$i,'class'} = $text{'slack_unclass'}; &open_tempfile(PKG, "$package_dir/$f"); while() { if (/^PACKAGE LOCATION:\s+disk([a-z]+)\d+/i) { $packages{$i,'class'} = $class_map{$1}; } elsif (/^PACKAGE DESCRIPTION:/i) { local $desc = ; $desc =~ s/^\S+:\s+//; $desc =~ s/\n//; $packages{$i,'desc'} = $desc; } } close(PKG); $i++; } closedir(DIR); return $i; } # package_info(package) # Returns an array of package information in the order # name, class, description, arch, version, vendor, installtime sub package_info { local @rv = ( $_[0], $text{'slack_unclass'}, $text{'slack_unknown'}, $system_arch, $text{'slack_unknown'}, "Slackware" ); local @st = stat(&translate_filename("$package_dir/$_[0]")); $rv[6] = ctime($st[9]); &open_readfile(PKG, "$package_dir/$_[0]"); while() { if (/^PACKAGE LOCATION:\s+disk([a-z]+)\d+/i) { $rv[1] = $class_map{$1}; } elsif (/^PACKAGE DESCRIPTION:/i) { $rv[2] = ""; while() { last if (/^FILE LIST/i); s/^\S+: *//; if (!$rv[2] && /([0-9][0-9\.]*)/) { $rv[4] = $1; } $rv[2] .= $_; } $rv[2] =~ s/\s+$//; } } close(PKG); return @rv; } # check_files(package) # Fills in the %files array with information about the files belonging # to some package. Values in %files are path type user group mode size error sub check_files { local $i = 0; local $file; &open_readfile(PKG, "$package_dir/$_[0]"); while() { last if (/^FILE LIST:/i); } while($file = ) { $file =~ s/\r|\n//g; next if ($file eq "./"); $file = '/'.$file; local $real = &translate_filename($file); $files{$i,'path'} = $file; local @st = stat($real); if (@st) { $files{$i,'type'} = -l $real ? 3 : -d $real ? 1 : 0; $files{$i,'user'} = getpwuid($st[4]); $files{$i,'group'} = getgrgid($st[5]); $files{$i,'mode'} = sprintf "%o", $st[2] & 07777; $files{$i,'size'} = $st[7]; $files{$i,'link'} = readlink($file); } else { $files{$i,'type'} = $file =~ /\// ? 1 : 0; $files{$i,'user'} = $files{$i,'group'} = $files{$i,'mode'} = $files{$i,'size'} = $text{'slack_unknown'}; $files{$i,'error'} = $text{'slack_missing'}; } $i++; } return $i; } # package_files(package) # Returns a list of all files in some package sub package_files { local ($pkg) = @_; local @rv; &open_readfile(PKG, "$package_dir/$_[0]"); while() { last if (/^FILE LIST:/i); } while(my $file = ) { $file =~ s/\r|\n//g; next if ($file eq "./"); $file = '/'.$file; push(@rv, $file); } close(PKG); return @rv; } # installed_file(file) # Given a filename, fills %file with details of the given file and returns 1. # If the file is not known to the package system, returns 0 # Usable values in %file are path type user group mode size packages sub installed_file { local ($f, $file, @pkgin); opendir(DIR, &translate_filename($package_dir)); while($f = readdir(DIR)) { next if ($f =~ /^\./); &open_readfile(PKG, "$package_dir/$f"); while() { last if (/^FILE LIST:/); } while($file = ) { next if ($file eq "./"); $file =~ s/[\/\r\n]+$//; $file = '/'.$file; if ($_[0] eq $file) { # found it! push(@pkgin, $f); last; } } close(PKG); } closedir(DIR); if (@pkgin) { local $real = &translate_filename($_[0]); local @st = stat($real); $file{'path'} = $_[0]; $file{'type'} = -l $real ? 3 : -d $real ? 1 : 0; $file{'user'} = getpwuid($st[4]); $file{'group'} = getgrgid($st[5]); $file{'mode'} = sprintf "%o", $st[2] & 07777; $file{'size'} = $st[7]; $file{'link'} = readlink($real); $file{'packages'} = join(" ", @pkgin); return 1; } else { return 0; } } # is_package(file) sub is_package { local $count; local $qm = quotemeta($_[0]); &open_execute_command(TAR, "gunzip -c $qm | tar tf - 2>&1", 1, 1); while() { $count++ if (/^[^\/\s]\S+/); } close(TAR); return $count < 2 ? 0 : 1; } # file_packages(file) # Returns a list of all packages in the given file, in the form # package description sub file_packages { if ($_[0] !~ /^(.*)\/(([^\/]+)(\.tgz|\.tar\.gz))$/) { return "$_[0] $text{'slack_unknown'}"; } local ($dir, $file, $base) = ($1, $2, $3); local $diskfile; opendir(DIR, &translate_filename($dir)); while($f = readdir(DIR)) { if ($f =~ /^disk\S+\d+$/ || $f eq 'package_descriptions') { # found the slackware disk file $diskfile = "$dir/$f"; last; } } closedir(DIR); return "$base $text{'slack_unknown'}" if (!$diskfile); # read the disk file local $desc; &open_readfile(DISK, $diskfile); while() { if (/^$base:\s*(.*)/) { $desc = $1; last; } } close(DISK); return $desc ? "$base $desc" : "$base $text{'slack_unknown'}"; } # install_options(file, package) # Outputs HTML for choosing install options sub install_options { print &ui_table_row($text{'slack_root'}, &ui_textbox("root", "/", 50)." ". &file_chooser_button("root", 1), 3); } # install_package(file, package) # Installs the package in the given file, with options from %in sub install_package { local $in = $_[2] ? $_[2] : \%in; return $text{'slack_eroot'} if (!-d $in->{'root'}); $ENV{'ROOT'} = $in->{'root'}; local $out; local $qm = quotemeta($_[0]); if (&has_command("upgradepkg") && -r &translate_filename("$package_dir/$_[1]")) { # Try to upgrade properly $out = &backquote_logged("upgradepkg $qm 2>&1"); } else { # Just install $out = &backquote_logged("installpkg $qm 2>&1"); } if ($?) { return "
$out
"; } return undef; } # delete_package(package) # Totally remove some package sub delete_package { local $qm = quotemeta($_[0]); local $out = &backquote_logged("removepkg $qm 2>&1"); if ($?) { return "
$out
"; } return undef; } sub package_system { return $text{'slack_manager'}; } sub package_help { return "installpkg removepkg"; } 1; software/config-open-linux0000644000567100000120000000003611205635233015653 0ustar jcameronwheelpackage_system=rpm apt_mode=0 software/rhn_check.cgi0000775000567100000120000000353611205635233015014 0ustar jcameronwheel#!/usr/local/bin/perl # rhn_check.cgi # Save redhat network checking options require './software-lib.pl'; &ReadParse(); &foreign_require("init", "init-lib.pl"); &error_setup($text{'rhn_err'}); $conf = &read_up2date_config(); # Validate inputs $in{'interval'} =~ /^\d+$/ || &error($text{'rhn_einterval'}); $in{'interval'} >= 120 || &error($text{'rhn_einterval2'}); !$in{'proxy_on'} && $in{'proxy'} eq '' || $in{'proxy'} =~ /^http:\/\/\S+$/ || &error($text{'rhn_eproxy'}); @skip = split(/\s+/, $in{'skip'}); # Save and apply &save_up2date_config($conf, "enableProxy", $in{'proxy_on'}); &save_up2date_config($conf, $conf->{'pkgProxy[comment]'} ? "pkgProxy" : "httpProxy", $in{'proxy'}); &save_up2date_config($conf, "pkgSkipList", join(";", @skip).";"); &flush_file_lines(); &read_env_file($rhn_sysconfig, \%rhnsd); $rhnsd{'INTERVAL'} = $in{'interval'}; &write_env_file($rhn_sysconfig, \%rhnsd); if ($in{'auto'}) { &init::enable_at_boot("rhnsd"); } else { &init::disable_at_boot("rhnsd"); } local $init = &init::action_filename("rhnsd"); &system_logged("$init stop >/dev/null 2>&1"); if ($in{'auto'}) { &system_logged("$init start >/dev/null 2>&1"); } if ($in{'now'}) { # Run rhn_check now .. &ui_print_unbuffered_header(undef, $text{'rhn_check'}, ""); print "",&text('rhn_checkdesc', "up2date -u"),"

\n"; print "

";
	&additional_log('exec', undef, "rhn_check");
	open(CMD, "up2date -u 2>&1 |");
	while() {
		while(s/^[^\015]+\015([^\012])/$1/) { }
		if (/\/([^\/\s]+)\-([^\-]+)\-([^\-]+)\.rpm/i) {
			push(@packs, $1);
			}
		print;
		}
	close(CMD);
	print "
\n"; @packs || print "$text{'rhn_nocheck'}

\n"; foreach $p (@packs) { local @pinfo = &show_package_info($p); } &webmin_log("rhn", "check", undef, { 'packages' => \@packs }) if (@packs); &ui_print_footer("", $text{'index_return'}); } else { &redirect(""); } software/debian-lib.pl0000755000567100000120000001321411205635233014717 0ustar jcameronwheel# debian-lib.pl # Functions for debian DPKG package management sub list_package_system_commands { return ("dpkg"); } # list_packages([package]*) # Fills the array %packages with a list of all packages sub list_packages { local $i = 0; local $arg = @_ ? join(" ", map { quotemeta($_) } @_) : ""; &open_execute_command(PKGINFO, "COLUMNS=200 dpkg --list $arg", 1, 1); while() { next if (/^\|/ || /^\+/); if (/^[uirph]i..(\S+)\s+(\S+)\s+(.*)/) { $packages{$i,'name'} = $1; $packages{$i,'class'} = &alphabet_name($1); $packages{$i,'version'} = $2; $packages{$i,'desc'} = $3; if ($packages{$i,'version'} =~ /^(\d+):(.*)$/) { $packages{$i,'epoch'} = $1; $packages{$i,'version'} = $2; } $i++; } } close(PKGINFO); return $i; } sub alphabet_name { return lc($_[0]) =~ /^[a-e]/ ? "A-E" : lc($_[0]) =~ /^[f-j]/ ? "F-J" : lc($_[0]) =~ /^[k-o]/ ? "K-O" : lc($_[0]) =~ /^[p-t]/ ? "P-T" : lc($_[0]) =~ /^[u-z]/ ? "U-Z" : "Other"; } # package_info(package) # Returns an array of package information in the order # name, class, description, arch, version, vendor, installtime sub package_info { local $qm = quotemeta($_[0]); # First check if it is really installed, and not just known to the package # system in some way local $out = &backquote_command("dpkg --list $qm 2>&1", 1); local @lines = split(/\r?\n/, $out); if ($lines[$#lines] !~ /^.[ih]/) { return ( ); } # Get full status local $out = &backquote_command("dpkg --print-avail $qm 2>&1", 1); return () if ($? || $out =~ /Package .* is not available/i); local @rv = ( $_[0], &alphabet_name($_[0]) ); push(@rv, $out =~ /Description:\s+([\0-\177]*\S)/i ? $1 : $text{'debian_unknown'}); push(@rv, $out =~ /Architecture:\s+(\S+)/i ? $1 : $text{'debian_unknown'}); push(@rv, $out =~ /Version:\s+(\S+)/i ? $1 : $text{'debian_unknown'}); push(@rv, $out =~ /Maintainer:\s+(.*)/i ? &html_escape($1) : $text{'debian_unknown'}); push(@rv, $text{'debian_unknown'}); return @rv; } # check_files(package) # Fills in the %files array with information about the files belonging # to some package. Values in %files are path type user group mode size error sub check_files { local $i = 0; local $file; local $qm = quotemeta($_[0]); &open_execute_command(PKGINFO, "dpkg --listfiles $qm", 1, 1); while($file = ) { $file =~ s/\r|\n//g; next if ($file !~ /^\/[^\.]/); local @st = stat($file); $files{$i,'path'} = $file; $files{$i,'type'} = -l $file ? 3 : -d $file ? 1 : 0; $files{$i,'user'} = getpwuid($st[4]); $files{$i,'group'} = getgrgid($st[5]); $files{$i,'mode'} = sprintf "%o", $st[2] & 07777; $files{$i,'size'} = $st[7]; $files{$i,'link'} = readlink($file); $i++; } return $i; } # package_files(package) # Returns a list of all files in some package sub package_files { local ($pkg) = @_; local $qn = quotemeta($pkg); local @rv; &open_execute_command(RPM, "dpkg --listfiles $qn", 1, 1); while() { s/\r|\n//g; push(@rv, $_); } close(RPM); return @rv; } # installed_file(file) # Given a filename, fills %file with details of the given file and returns 1. # If the file is not known to the package system, returns 0 # Usable values in %file are path type user group mode size packages sub installed_file { local $qm = quotemeta($_[0]); local $out = &backquote_command("dpkg --search $qm 2>&1", 1); return 0 if ($out =~ /not found/i); $out =~ s/:\s+\S+\n$//; local @pkgin = split(/[\s,]+/, $out); local $real = &translate_filename($_[0]); local @st = stat($real); $file{'path'} = $_[0]; $file{'type'} = -l $real ? 3 : -d $real ? 1 : 0; $file{'user'} = getpwuid($st[4]); $file{'group'} = getgrgid($st[5]); $file{'mode'} = sprintf "%o", $st[2] & 07777; $file{'size'} = $st[7]; $file{'link'} = readlink($real); $file{'packages'} = join(" ", @pkgin); return 1; } # is_package(file) sub is_package { local $qm = quotemeta($_[0]); local $out = &backquote_command("dpkg --info $qm 2>&1", 1); return $? || $out !~ /Package:/ ? 0 : 1; } # file_packages(file) # Returns a list of all packages in the given file, in the form # package description sub file_packages { local $qm = quotemeta($_[0]); local $out = &backquote_command("dpkg --info $qm 2>&1", 1); local $name; if ($out =~ /Package:\s+(\S+)/i && ($name=$1) && $out =~ /Description:\s+(.*)/i) { return ( "$name $1" ); } return (); } # install_options(file, package) # Outputs HTML for choosing install options sub install_options { print &ui_table_row($text{'debian_depends'}, &ui_yesno_radio("depends", 0)); print &ui_table_row($text{'debian_conflicts'}, &ui_yesno_radio("conflicts", 0)); print &ui_table_row($text{'debian_overwrite'}, &ui_yesno_radio("overwrite", 0)); print &ui_table_row($text{'debian_downgrade'}, &ui_yesno_radio("downgrade", 0)); } # install_package(file, package) # Installs the package in the given file, with options from %in sub install_package { local $in = $_[2] ? $_[2] : \%in; local $args = ($in->{'depends'} ? " --force-depends" : ""). ($in->{'conflicts'} ? " --force-conflicts" : ""). ($in->{'overwrite'} ? " --force-overwrite" : ""). ($in->{'downgrade'} ? " --force-downgrade" : ""); local $qm = quotemeta($_[0]); $ENV{'DEBIAN_FRONTEND'} = 'noninteractive'; local $out = &backquote_logged("dpkg --install $args $qm 2>&1 $out"; } return undef; } # delete_package(package) # Totally remove some package sub delete_package { local $qm = quotemeta($_[0]); $ENV{'DEBIAN_FRONTEND'} = 'noninteractive'; local $out = &backquote_logged("dpkg --remove $qm 2>&1 $out"; } return undef; } sub package_system { return $text{'debian_manager'}; } sub package_help { return "dpkg"; } 1; software/config-debian-linux0000644000567100000120000000006311205635233016134 0ustar jcameronwheelpackage_system=debian update_system=apt apt_mode=0 software/config.info.ja_JP.UTF-80000644000567100000120000000065411205635233016303 0ustar jcameronwheelpackage_system=パッケージ管理システム,4,rpm-RPM,pkgadd-Solaris,hpux-HPUX,freebsd-FreeBSD,slackware-Slackware,debian-Debian,aix-AIX,emerge-Gentoo,cygwin-Cygwin,msi-Microsoft Installer update_system=パッケージアップデートシステム,1,-自動判別,apt-APT,yum-YUM,rhn-Redhat Network,csw-Blastwave,urpmi-URPMI,emerge-Emerge apt_mode=APT のインストールに使うコマンド,1,0-apt-get,1-aptitute software/module.info0000644000567100000120000000216211205635233014533 0ustar jcameronwheeldesc_ko_KR.euc=Ʈ Ű risk=high desc_ru_SU= desc_zh_TW.Big5=nM desc_pl=Pakiety oprogramowania desc_de=Softwarepakete name=PackageAdmin desc_zh_CN= desc_pt=Pacotes de Software category=system desc_tr=Yazlm Paketleri os_support=solaris coherent-linux redhat-linux mandrake-linux suse-linux united-linux hpux open-linux openserver unixware freebsd/3.0-* slackware-linux/4.0-* debian-linux/2.0-* turbo-linux openbsd corel-linux cobalt-linux netbsd msc-linux aix gentoo-linux trustix-linux openmamba-linux cygwin windows desc=Software Packages desc_es=Paquetes de Software desc_sv=Programpaket desc_fr=Composants Logiciels desc_ja_JP.euc=եȥ ѥå desc_hu=Szoftver csomagok desc_ru_RU= desc_ca=Paquets de Programari desc_cz=Softwarov balky longdesc=Manage software packages on your system, and install new packages. desc_ms=Pakej Perisian readonly=1 desc_zh_TW.UTF-8=軟體套件 desc_zh_CN.UTF-8=软件包 desc_ja_JP.UTF-8=ソフトウェア パッケージ desc_ko_KR.UTF-8=소프트웨어 패키지 desc_nl=Software pakketten desc_ru.UTF-8=Менеджер ПО version=1.472 software/openbsd-lib.pl0000755000567100000120000001131411205635233015126 0ustar jcameronwheel# openbsd-lib.pl # Functions for OpenBSD package management use POSIX; chop($system_arch = `uname -m`); $package_dir = "/var/db/pkg"; sub list_package_system_commands { return ("pkg_info", "pkg_add"); } # list_packages([package]*) # Fills the array %packages with a list of all packages sub list_packages { local $i = 0; local $arg = @_ ? join(" ", map { quotemeta($_) } @_) : "-a"; &open_execute_command(PKGINFO, "pkg_info -I $arg", 1, 1); while() { if (/^(\S+)\s+(.*)/) { $packages{$i,'name'} = $1; $packages{$i,'class'} = ""; $packages{$i,'desc'} = $2; $i++; } } close(PKGINFO); return $i; } # package_info(package) # Returns an array of package information in the order # name, class, description, arch, version, vendor, installtime sub package_info { local $qm = quotemeta($_[0]); local $out = &backquote_command("pkg_info $_[0] 2>&1", 1); return () if ($?); local @rv = ( $_[0] ); push(@rv, ""); push(@rv, $out =~ /Description:\n([\0-\177]*\S)/i ? $1 : $text{'bsd_unknown'}); push(@rv, $system_arch); push(@rv, $_[0] =~ /-([^\-]+)$/ ? $1 : $text{'bsd_unknown'}); push(@rv, "OpenBSD"); local @st = stat(&translate_filename("$package_dir/$_[0]")); push(@rv, @st ? ctime($st[9]) : $text{'bsd_unknown'}); return @rv; } # check_files(package) # Fills in the %files array with information about the files belonging # to some package. Values in %files are path type user group mode size error sub check_files { local $i = 0; local $file; local $qm = quotemeta($_[0]); &open_execute_command(PKGINFO, "pkg_info -L $qm", 1, 1); while($file = ) { $file =~ s/\r|\n//g; next if ($file !~ /^\//); local $real = &translate_filename($file); local @st = stat($real); $files{$i,'path'} = $file; $files{$i,'type'} = -l $real ? 3 : -d $real ? 1 : 0; $files{$i,'user'} = getpwuid($st[4]); $files{$i,'group'} = getgrgid($st[5]); $files{$i,'mode'} = sprintf "%o", $st[2] & 07777; $files{$i,'size'} = $st[7]; $files{$i,'link'} = readlink($real); $i++; } return $i; } # installed_file(file) # Given a filename, fills %file with details of the given file and returns 1. # If the file is not known to the package system, returns 0 # Usable values in %file are path type user group mode size packages sub installed_file { local (%packages, $file, $i, @pkgin); local $n = &list_packages(); for($i=0; $i<$n; $i++) { &open_execute_command(PKGINFO, "pkg_info -L $packages{$i,'name'}", 1,1); while($file = ) { $file =~ s/\r|\n//g; if ($file eq $_[0]) { # found it push(@pkgin, $packages{$i,'name'}); } } close(PKGINFO); } if (@pkgin) { local $real = &translate_filename($_[0]); local @st = stat($real); $file{'path'} = $_[0]; $file{'type'} = -l $real ? 3 : -d $real ? 1 : 0; $file{'user'} = getpwuid($st[4]); $file{'group'} = getgrgid($st[5]); $file{'mode'} = sprintf "%o", $st[2] & 07777; $file{'size'} = $st[7]; $file{'link'} = readlink($real); $file{'packages'} = join(" ", @pkgin); return 1; } else { return 0; } } # is_package(file) sub is_package { local ($desc, $contents); local $qm = quotemeta($_[0]); &open_execute_command(TAR, "gunzip -c $qm | tar tf -", 1, 1); while() { $desc++ if (/^\+DESC/); $contents++ if (/^\+CONTENTS/); } close(TAR); return $desc && $contents; } # file_packages(file) # Returns a list of all packages in the given file, in the form # package description sub file_packages { local $temp = &transname(); &make_dir($temp, 0700); local $qm = quotemeta($_[0]); &execute_command("cd $temp && gunzip -c $qm | tar xf - +CONTENTS +COMMENT"); local ($comment, $name); &open_readfile(COMMENT, "$temp/+COMMENT"); ($comment = ) =~ s/\r|\n//g; close(COMMENT); &open_readfile(CONTENTS, "$temp/+CONTENTS"); while() { $name = $1 if (/^\@name\s+(\S+)/); } close(CONTENTS); &unlink_file($temp); return ( "$name $comment" ); } # install_options(file, package) # Outputs HTML for choosing install options sub install_options { print &ui_table_row($text{'bsd_scripts'}, &ui_radio("scripts", 0, [ [ 0, $text{'yes'} ], [ 1, $text{'no'} ] ])); print &ui_table_row($text{'bsd_force'}, &ui_yesno_radio("force", 1)); } # install_package(file, package) # Installs the package in the given file, with options from %in sub install_package { local $in = $_[2] ? $_[2] : \%in; local $args = ($in->{"scripts"} ? " -I" : ""). ($in->{"force"} ? " -f" : ""); local $out = &backquote_logged("pkg_add $args $_[0] 2>&1"); if ($?) { return "

$out
"; } return undef; } # delete_package(package) # Totally remove some package sub delete_package { local $out = &backquote_logged("pkg_delete $_[0] 2>&1"); if ($?) { return "
$out
"; } return undef; } sub package_system { return &text('bsd_manager', "OpenBSD"); } sub package_help { return "pkg_add pkg_info pkg_delete"; } 1; software/rpmfind.cgi0000775000567100000120000000421711205635233014524 0ustar jcameronwheel#!/usr/local/bin/perl # rpmfind.cgi # Display a search window for rpmfind.net require './software-lib.pl'; &ReadParse(); $rpmfind_host = "rpmfind.net"; $rpmfind_port = 80; $rpmfind_page = "/linux/rpm2html/search.php?query="; &header(); print < function sel(m) { window.opener.ifield.value = m; window.close(); return false; } EOF # Search form print &ui_form_start("rpmfind.cgi"); print &ui_submit($text{'rpm_search'}); print &ui_textbox("search", $in{'search'}, 20); print &ui_form_end(); if ($in{'search'}) { # Call the rpmfind.net website to get matches print &ui_hr(); $out = ""; &http_download($rpmfind_host, $rpmfind_port, $rpmfind_page.&urlize($in{'search'}), \$out); while($out =~ /]*>.*?]*>([^<]*)<\/td>.*?]*>([^<]*)<\/td>.*?((ftp|http|https):[^>]+\.rpm).*?<\/tr>([\000-\377]*)/i) { local $pkg = { 'url' => $3, 'dist' => $2, 'desc' => $1 }; $out = $5; $pkg->{'source'}++ if ($pkg->{'url'} =~ /\.src\.rpm$/ || $pkg->{'url'} =~ /\.srpm$/); if ($pkg->{'url'} =~ /\/(([^\/]+)-([^\-\/]+)-([^-\/]+).([^-\/]+)\.rpm)$/) { $pkg->{'file'} = $1; $pkg->{'prefix'} = $2; $pkg->{'version'} = $3; $pkg->{'release'} = $4; $pkg->{'arch'} = $5; if ($pkg->{'version'} =~ /^(\d+)\.([0-9\.]+)$/){ local ($v1 = $1, $v2 = $2); $v2 =~ s/\.//g; $pkg->{'version'} = "$v1.$v2"; } } elsif ($pkg->{'file'} =~ /\/([^\/]+)$/) { $pkg->{'file'} = $1; } push(@rv, $pkg); } # Show the search results @rv = grep { !$_->{'source'} } @rv; @rv = sort { local $vc = $b->{'version'} <=> $a->{'version'}; local $rc = $b->{'version'} <=> $a->{'version'}; return $vc ? $vc : $rc } @rv; if (@rv) { print "\n"; print &ui_columns_start([ $text{'rpm_findrpm'}, $text{'rpm_finddistro'}, $text{'rpm_finddesc'} ], 100); foreach $r (@rv) { print &ui_columns_row([ "". "$r->{'file'}", $r->{'dist'}, $r->{'desc'} ]); } print &ui_columns_end(); } else { print "$text{'rpm_none'}

\n"; } } &ui_print_footer(); software/config.info.ko_KR.UTF-80000664000567100000120000000063111205635233016322 0ustar jcameronwheelpackage_system=패키지 관리 시스템,4,rpm-RPM,pkgadd-Solaris,hpux-HPUX,freebsd-FreeBSD,slackware-Slackware,debian-Debian,aix-AIX,emerge-Gentoo,cygwin-Cygwin,msi-Microsoft Installer apt_mode=APT 설치를 위해 사용할 명령,1,0-apt-get,1-aptitute update_system=패키지 업데이트 시스템,1,-자동 감지,apt-APT,yum-YUM,rhn-Redhat 네트워크,csw-Blastwave,urpmi-URPMI,emerge-Emerge software/images/0000755000567100000120000000000011205635233013635 5ustar jcameronwheelsoftware/images/close.gif0000644000567100000120000000016011205635233015426 0ustar jcameronwheelGIF89a̙fff!,Aqbk"phyZ:V SЙv05g<%|vh;software/images/open.gif0000644000567100000120000000015311205635233015264 0ustar jcameronwheelGIF89a̙fff!,<qbk"phyvR٢oδ\xy9¡mX)U B=G;software/images/pack.gif0000644000567100000120000000017311205635233015243 0ustar jcameronwheelGIF89afff!,Lj(S7MuZXV:' ⡵/*~O Ģ/8Dr46=(BRrzi.R;software/images/icon.gif0000644000567100000120000000045111205635233015254 0ustar jcameronwheelGIF89a00fff!,00 T؋TNly U V8-α40fPyaN@(+q&,i*Q0TJfqe7Y c:ܬDl%Ww6gx嘗XY7vD94yXyBj'jH) ׊kۉ[#v%|kW 9@]m}'Imw]]=^G=]N3LanJ~ݎO_oOn`}ĉ;software/images/smallicon.gif0000664000567100000120000000031511205635233016306 0ustar jcameronwheelGIF87aMMM333fff@@@,IȌͻ)h]X 亝s[ٱLWo;`<\h&E' Pn)'`XXZÄ ҝ+i9$e|R0~N!yMdM(qke(GGt;software/closeall.cgi0000755000567100000120000000020611205635233014653 0ustar jcameronwheel#!/usr/local/bin/perl # closeall.cgi # Empty the open list require './software-lib.pl'; &save_heiropen([ ]); &redirect("tree.cgi"); software/rhn.cgi0000775000567100000120000000241111205635233013646 0ustar jcameronwheel#!/usr/local/bin/perl # rhn.cgi # Display a list of packages available for download from RHN require './software-lib.pl'; $bgcolor = defined($gconfig{'cs_page'}) ? $gconfig{'cs_page'} : "ffffff"; $link = defined($gconfig{'cs_link'}) ? $gconfig{'cs_link'} : "0000ee"; $text = defined($gconfig{'cs_text'}) ? $gconfig{'cs_text'} : "000000"; &PrintHeader(); print < $text{'rhn_title'} EOF $out = `up2date -l 2>&1`; if ($out =~ /Error Message:/i) { print "

$out
\n"; } else { print "
\n"; foreach (split(/\n/, $out)) { if ($dashes && /^(\S+)\s+(\S+)\s+(\S+)/) { if (!$count++) { print " ", "\n"; } print "\n"; print "\n"; print "\n"; print "\n"; } elsif (/^----/) { last if ($dashes); $dashes++; } } print "
$text{'rhn_pack'}", "$text{'rhn_version'}
$1$2 - $3
\n"; if (!$count) { print "$text{'rhn_nonefound'}

\n"; } } print "\n"; software/config.info.ko_KR.euc0000644000567100000120000000056511205635233016277 0ustar jcameronwheelpackage_system=Ű ý,4,rpm-RPM,pkgadd-Solaris,hpux-HPUX,freebsd-FreeBSD,slackware-Slackware,debian-Debian,aix-AIX,emerge-Gentoo,cygwin-Cygwin,msi-Microsoft Installer update_system=Ű Ʈ ý,1,-ڵ ,apt-APT,yum-YUM,rhn-Redhat Ʈũ,csw-Blastwave,urpmi-URPMI,emerge-Emerge apt_mode=APT ġ ,1,0-apt-get,1-aptitute software/find.cgi0000775000567100000120000000323711205635233014006 0ustar jcameronwheel#!/usr/local/bin/perl # Show a form in a popup window for selecting a package from the update system $trust_unknown_referers = 1; require './software-lib.pl'; &ReadParse(); &popup_header($text{'find_title'}); print < function sel(m) { window.opener.ifield.value = m; window.close(); return false; } EOF # Show form for searching print &ui_form_start("find.cgi"); print &ui_submit($text{'find_search'}),"\n"; print &ui_textbox("search", $in{'search'}, 20),"\n"; print &ui_form_end(); # Show results, if any $search = $in{'search'}; if (defined($search)) { if (!$search) { # List them all @avail = &update_system_available(); } elsif (defined(&update_system_search)) { # Call the search function @avail = &update_system_search($search); } else { # Scan through list manually @avail = &update_system_available(); @avail = grep { $_->{'name'} =~ /\Q$search\E/i || $_->{'desc'} =~ /\Q$search\E/i } @avail; } @avail = sort { lc($a->{'name'}) cmp lc($b->{'name'}) } @avail; if (@avail) { foreach $a (@avail) { $hasdesc++ if ($a->{'desc'}); $hasver++ if ($a->{'version'}); } print &ui_columns_start( [ $text{'find_name'}, $hasver ? ($text{'find_version'}) : ( ), $hasdesc ? ($text{'find_desc'}) : ( ) ], "100%"); foreach $a (@avail) { $sel = $a->{'select'} || $a->{'name'}; $epoch = $a->{'epoch'} ? "$a->{'epoch'}:" : ""; print &ui_columns_row( [ "$a->{'name'}", $hasver ? ($epoch.$a->{'version'}) : ( ), $hasdesc ? ($a->{'desc'}) : ( ) ]); } print &ui_columns_end(); } else { print "$text{'find_none'}

\n"; } } &popup_footer(); software/config.info0000644000567100000120000000062011205635233014510 0ustar jcameronwheelpackage_system=Package management system,1,rpm-RPM,pkgadd-Solaris,hpux-HPUX,freebsd-FreeBSD,slackware-Slackware,debian-Debian,aix-AIX,emerge-Gentoo,cygwin-Cygwin,msi-Microsoft Installer update_system=Package update system,1,-Detect automatically,apt-APT,yum-YUM,rhn-Redhat Network,csw-Blastwave CSW,urpmi-URPMI,emerge-Emerge,*-None apt_mode=Command to use for APT installs,1,0-apt-get,1-aptitute software/open.cgi0000755000567100000120000000035211205635233014020 0ustar jcameronwheel#!/usr/local/bin/perl # open.cgi # Add some class to the open list require './software-lib.pl'; &ReadParse(); @heiropen = &get_heiropen(); push(@heiropen, $in{'what'}); &save_heiropen(\@heiropen); &redirect("tree.cgi#$in{'what'}"); software/search.cgi0000755000567100000120000000436511205635233014334 0ustar jcameronwheel#!/usr/local/bin/perl # search.cgi # Display a list of packages where the name or description matches some string require './software-lib.pl'; &ReadParse(); $in{'search'} || &error($text{'search_esearch'}); if (defined(&package_search)) { # Use system-specific search function $n = &package_search($in{'search'}); @match = ( 0 .. $n-1 ) if ($n); } else { # Search manually through entire list $n = &list_packages(); $s = $in{'search'}; for($i=0; $i<$n; $i++) { if ($packages{$i,'name'} =~ /\Q$s\E/i || $packages{$i,'desc'} =~ /\Q$s\E/i) { push(@match, $i); } } } if (@match == 1 && $in{'goto'}) { $p = $packages{$match[0],'name'}; $v = $packages{$match[0],'version'}; &redirect("edit_pack.cgi?package=".&urlize($p)."&version=".&urlize($v)); exit; } &ui_print_header(undef, $text{'search_title'}, "", "search"); if (@match) { @match = sort { lc($packages{$a,'name'}) cmp lc($packages{$b,'name'}) } @match; print "",&text('search_match', "$s"),"

\n"; print &ui_form_start("delete_packs.cgi", "post"); print &ui_hidden("search", $in{'search'}); @tds = ( "width=5" ); @links = ( &select_all_link("del", 0), &select_invert_link("del", 0) ); print &ui_links_row(\@links); print &ui_columns_start([ "", $text{'search_pack'}, $text{'search_class'}, $text{'search_desc'} ], 100, 0, \@tds); foreach $i (@match) { local @cols; push(@cols, "".&html_escape( $packages{$i,'name'}.($packages{$i,'version'} ? " $packages{$i,'version'}" : "")).""); $c = $packages{$i,'class'}; push(@cols, $c ? &html_escape($c) : $text{'search_none'}); push(@cols, &html_escape($packages{$i,'desc'})); if ($packages{$i,'nouninstall'}) { print &ui_columns_row([ "", @cols ], \@tds); } else { print &ui_checked_columns_row(\@cols, \@tds, "del", $packages{$i,'name'}." ".$packages{$i,'version'}); } } print &ui_columns_end(); print &ui_links_row(\@links); print &ui_form_end([ [ undef, $text{'search_delete'} ] ]); } else { print "",&text('search_nomatch', "$s"),"

\n"; } &ui_print_footer("", $text{'index_return'}); software/config-redhat-linux0000644000567100000120000000006011205635233016156 0ustar jcameronwheelpackage_system=rpm update_system=yum apt_mode=0 software/config.info.nl0000644000567100000120000000063711205635233015130 0ustar jcameronwheelpackage_system=Pakket management systeem,1,rpm-RPM,pkgadd-Solaris,hpux-HPUX,freebsd-FreeBSD,slackware-Slackware,debian-Debian,aix-AIX,emerge-Gentoo,cygwin-Cygwin,msi-Microsoft Installer update_system=Pakket update syteem,1,-Detecteer automatisch,apt-APT,yum-YUM,rhn-Redhat Netwerk,cws-Blastwave CSW,urpmi-URPMI,emerge-Emerge,*-Geen apt_mode=Opdracht om te gebruiken voor APT installaties,1,0-apt-get,1-aptitude software/config-openserver0000644000567100000120000000004111205635233015741 0ustar jcameronwheelpackage_system=pkgadd apt_mode=0 software/emerge-lib.pl0000775000567100000120000001717311205635233014753 0ustar jcameronwheel# emerge-lib.pl # Functions for gentoo package management chop($system_arch = `uname -m`); $pkg_dir = "/var/db/pkg"; $portage_bin = "/usr/lib/portage/bin"; $ENV{'TERM'} = "dumb"; $package_list_binary = $package_list_command = "$portage_bin/pkglist"; if (!-x $package_list_binary) { $package_list_binary = &has_command("qlist"); $package_list_command = $package_list_binary." --nocolor -Iv"; } sub list_package_system_commands { return ( $package_list_binary ); } sub list_update_system_commands { return ("emerge"); } # list_packages([package]*) # Fills the array %packages with all or listed packages sub list_packages { local $i = 0; &open_execute_command(LIST, $package_list_command, 1, 1); while() { if (/^([^\/]+)\/([^0-9]+)-(\d\S+)$/ && !@_ || &indexof($2, @_) >= 0) { $packages{$i,'name'} = $2; $packages{$i,'class'} = $1; $packages{$i,'version'} = $3; &open_readfile(BUILD, "$pkg_dir/$1/$2-$3/$2-$3.ebuild"); while() { if (/DESCRIPTION="([^"]+)"/ || /DESCRIPTION='([^']+)'/) { $packages{$i,'desc'} = $1; last; } } close(BUILD); $i++; } } return $i; } # package_search(string, [allavailable]) # Searches the package database for packages matching some string and puts # them into %packages sub package_search { local $n = 0; local $qm = quotemeta($_[0]); &open_execute_command(SEARCH, "emerge search $qm", 1, 1); while() { s/\r|\n//g; s/\033[^m]+m//g; if (/^\*\s+([^\/]+)\/(\S+)/) { $packages{$n,'name'} = $2; $packages{$n,'class'} = $1; $packages{$n,'missing'} = 0; } elsif (/version\s+Available:\s+(\S+)/i) { $packages{$n,'version'} = $1; } elsif (/version\s+Installed:\s+\[\s+Not/i && !$_[1]) { $packages{$n,'missing'} = 1; } elsif (/\s+Description:\s*(.*)/i) { $packages{$n,'desc'} = $1; local $nl = ; chop($nl); if ($nl =~ /\S/) { $packages{$n,'desc'} .= " " if ($packages{$n,'desc'}); $packages{$n,'desc'} .= $nl; } $n++ if (!$packages{$n,'missing'} || $_[1]); } } close(SEARCH); return $n; } # package_info(package) # Returns an array of package information in the order # name, class, description, arch, version, vendor, installtime sub package_info { local %packages; local $n = &list_packages($_[0]); $n || return (); local @st = stat("$pkg_dir/$packages{0,'class'}/$packages{0,'name'}-$packages{0,'version'}"); return ( $packages{0,'name'}, $packages{0,'class'}, $packages{0,'desc'}, $system_arch, $packages{0,'version'}, "Gentoo", &make_date($st[9]) ); } # is_package(file) # Check if some file is a package file sub is_package { local $qm = quotemeta($_[0]); local $out = &backquote_command("emerge --pretend $qm 2>&1", 1); return $? ? 0 : 1; } # file_packages(file) # Returns a list of all packages in the given file, in the form # package description sub file_packages { local @rv; local $qm = quotemeta($_[0]); &open_execute_command(EMERGE, "emerge --pretend $qm", 1, 1); while() { s/\r|\n//g; s/\033[^m]+m//g; if (/\s+[NRU]\s+\]\s+([^\/]+)\/([^0-9]+)\-(\d\S+)/) { push(@rv, $2); } } close(EMERGE); return @rv; } # install_options(file, package) # Outputs HTML for choosing install options for some package sub install_options { print &ui_table_row($text{'emerge_noreplace'}, &ui_radio("noreplace", 0, [ [ 0, $text{'yes'} ], [ 1, $text{'no'} ] ])); print &ui_table_row($text{'emerge_onlydeps'}, &ui_yesno_radio("onlydeps", 0)); } $show_install_progress = 1; # install_package(file, package, [&inputs], [show]) # Install the given package from the given file, using options from %in sub install_package { local $file = $_[0]; local $in = $_[2] ? $_[2] : \%in; local $cmd = "emerge"; $cmd .= " --noreplace" if ($in{'noreplace'}); $cmd .= " --onlydeps" if ($in{'onlydeps'}); $cmd .= " ".quotemeta($_[1]); if ($_[3]) { &open_execute_command(OUT, "$cmd 2>&1", 1); while() { print &html_escape($_); } close(OUT); return $? ? "Emerge error" : undef; } else { local $out; &open_execute_command(OUT, "$cmd 2>&1 | tail -10", 1); while() { $out .= $_; } close(OUT); return $? ? "

$out
" : undef; } } # check_files(package) # Fills in the %files array with information about the files belonging # to some package. Values in %files are path type user group size error sub check_files { local $i = 0; local (@files, %filesmap); local %packages; &list_packages($_[0]); &open_readfile(CONTENTS, "$pkg_dir/$packages{0,'class'}/$packages{0,'name'}-$packages{0,'version'}/CONTENTS"); while() { s/\r|\n//g; local @l = split(/\s+/); $files{$i,'path'} = $l[1]; $files{$i,'type'} = $l[0] eq 'dir' ? 1 : $l[0] eq 'sym' ? 3 : 0; local $real = &translate_filename($l[1]); local @st = stat($real); $files{$i,'user'} = getpwuid($st[4]); $files{$i,'group'} = getgrgid($st[5]); $files{$i,'size'} = $st[7]; if (!-e $l[1]) { $files{$i,'error'} = "Does not exist"; } elsif ($l[0] eq 'sym') { $files{$i,'link'} = $l[3]; local $lnk = readlink($real); $files{$i,'error'} = "Incorrect link" if ($l[3] ne $lnk); } elsif ($l[0] eq 'obj') { push(@files, $l[1]); $filesmap{$l[1]} = $i; $files{$i,'md5'} = $l[2]; } $i++; } close(CONTENTS); if (&has_command("md5sum")) { &open_execute_command(MD5, "md5sum ".join(" ", @files), 1, 1); while() { local ($md, $fn) = split(/\s+/); local $n = $filesmap{$fn}; if ($md ne $files{$n,'md5'}) { $files{$n,'error'} = "Checksum failed"; } } close(MD5); } return $i; } # installed_file(file) # Given a filename, fills %file with details of the given file and returns 1. # If the file is not known to the package system, returns 0 # Usable values in %file are path type user group mode size packages sub installed_file { local ($cf, $type, @packs); local $real_dir = &translate_filename($pkg_dir); while($cf = <$real_dir/*/*/CONTENTS>) { open(FILE, $cf); while() { local @l = split(/\s+/); if ($l[1] eq $_[0]) { # Found it! $cf =~ /\/([^0-9\/]+)-(\d[^\s\/]+)\/CONTENTS$/; push(@packs, $1); $type = $l[0] if (!$type); } } close(FILE); } return 0 if (!@packs); local $real = &translate_filename($_[0]); local @st = stat($real); $file{'packages'} = join(' ', @packs); $file{'path'} = $_[0]; $file{'user'} = getpwuid($st[4]); $file{'group'} = getgrgid($st[5]); $file{'mode'} = sprintf "%o", $st[2] & 07777; $file{'size'} = $st[7]; $file{'link'} = readlink($real); $file{'type'} = $type eq 'dir' ? 1 : $type eq 'sym' ? 3 : 0; return 1; } # delete_package(package, [&options]) # Attempt to remove some package sub delete_package { local $out = &backquote_logged("emerge -u ".quotemeta($_[0])." 2>&1"); return $? ? "
$out
" : undef; } sub package_system { return "Gentoo Ebuild"; } sub package_help { return "emerge"; } $has_update_system = 1; # update_system_input() # Returns HTML for entering a package to install sub update_system_input { return "$text{'emerge_input'} "; } # update_system_install([package]) # Install some package with emerge sub update_system_install { local $update = $_[0] || $in{'update'}; local $cmd = "emerge ".quotemeta($update); local @rv; print "",&text('emerge_install', "$cmd"),"

\n"; print "

\n";
&additional_log('exec', undef, $cmd);
&open_execute_command(CMD, "$cmd 2>&1 ) {
	print &html_escape($_);
	if (/^\>\>\>\s+([^\/]+)\/([^0-9]+)-(\d\S+)\s+merged\./i) {
		push(@rv, $2);
		}
	}
close(CMD);
print "
\n"; if ($?) { print "$text{'emerge_failed'}

\n"; } else { print "$text{'emerge_ok'}

\n"; } return @rv; } 1; software/delete_pack.cgi0000755000567100000120000000271611205635233015325 0ustar jcameronwheel#!/usr/local/bin/perl # delete_pack.cgi # Ask if the user wants to delete a package, and if so do it require './software-lib.pl'; &ReadParse(); $p = $in{'package'}; $v = $in{'version'}; &error_setup(&text('delete_err', $p)); (@pinfo = &package_info($p, $v)) || &error(&text('delete_epack', $p)); if ($in{'sure'}) { # do the deletion &list_packages($p); if ($error = &delete_package($p, \%in, $v)) { &error($error); } &webmin_log("delete", "package", $p, { 'desc' => $packages{0,'desc'} }); if ($in{'search'}) { &redirect("search.cgi?search=$in{'search'}"); } else { &redirect(""); } } else { &ui_print_header(undef, $text{'delete_title'}, "", "delete"); # Sum up files $n = &check_files($p, $v); $sz = 0; for($i=0; $i<$n; $i++) { if ($files{$i,'type'} == 0) { $sz += $files{$i,'size'}; } } print "

\n"; if ($n) { print &text('delete_rusure', "$p", $n, $sz),"
\n"; } else { print &text('delete_rusure2', "$p"),"
\n"; } # Ask if the user is sure.. print &ui_form_start("delete_pack.cgi"); print &ui_hidden("package", $p); print &ui_hidden("version", $v); print &ui_hidden("sure", 1); print &ui_hidden("search", $in{'search'}); print &ui_submit($text{'delete_ok'}),"

\n"; if (defined(&delete_options)) { &delete_options($p); } print &ui_form_end(),"

\n"; &ui_print_footer( "edit_pack.cgi?search=$in{'search'}&package=".&urlize($p). "&version=".&urlize($v), $text{'edit_return'}); } software/install_pack.cgi0000775000567100000120000001043011205635233015523 0ustar jcameronwheel#!/usr/local/bin/perl # install_pack.cgi # Install a package from some source require './software-lib.pl'; if ($ENV{REQUEST_METHOD} eq "POST") { &ReadParse(\%getin, "GET"); &ReadParseMime(undef, \&read_parse_mime_callback, [ $getin{'id'} ]); } else { &ReadParse(); $no_upload = 1; } &error_setup($text{'install_err'}); if ($in{source} >= 2) { &ui_print_unbuffered_header(undef, $text{'install_title'}, "", "install"); } else { &ui_print_header(undef, $text{'install_title'}, "", "install"); } if ($in{source} == 0) { # installing from local file (or maybe directory) if (!$in{'local'}) { &install_error($text{'install_elocal'}); } if (!-r $in{'local'} && !-d $in{'local'} && $in{'local'} !~ /\*|\?/) { &install_error(&text('install_elocal2', $in{'local'})); } $source = $in{'local'}; $pfile = $in{'local'}; $need_unlink = 0; } elsif ($in{source} == 1) { # installing from upload .. store file in temp location if ($no_upload) { &install_error($text{'install_eupload'}); } $in{'upload_filename'} =~ /([^\/\\]+$)/; $pfile = &tempname("$1"); &open_tempfile(PFILE, ">$pfile", 0, 1); &print_tempfile(PFILE, $in{'upload'}); &close_tempfile(PFILE); $source = $in{'upload_filename'}; $need_unlink = 1; } elsif ($in{source} == 2) { # installing from URL.. store downloaded file in temp location $in{'url'} = &convert_osdn_url($in{'url'}); $in{'url'} =~ /\/([^\/]+)\/*$/; $pfile = &tempname("$1"); local $error; $progress_callback_url = $in{'url'}; if ($in{'url'} =~ /^(http|https):\/\/([^\/]+)(\/.*)$/) { # Make a HTTP request $ssl = $1 eq 'https'; $host = $2; $page = $3; $port = $ssl ? 443 : 80; if ($host =~ /^(.*):(\d+)$/) { $host = $1; $port = $2; } &http_download($host, $port, $page, $pfile, \$error, \&progress_callback, $ssl); } elsif ($in{'url'} =~ /^ftp:\/\/([^\/]+)(:21)?(\/.*)$/) { $host = $1; $file = $3; &ftp_download($host, $file, $pfile, \$error, \&progress_callback); } else { &install_error(&text('install_eurl', $in{'url'})); } &install_error($error) if ($error); $source = $in{'url'}; $need_unlink = 1; } elsif ($in{'source'} == 3) { # installing from some update system &clean_environment(); @packs = &update_system_install($in{'update'}, \%in); &reset_environment(); print &ui_hr() if (@packs); foreach $p (@packs) { local @pinfo = &show_package_info($p); } &webmin_log($config{'update_system'}, "install", undef, { 'packages' => \@packs } ) if (@packs); if ($in{'caller'} && &foreign_check("webmin")) { # Software installed - refresh installed flag cache &foreign_require("webmin", "webmin-lib.pl"); ($inst, $changed) = &webmin::build_installed_modules(0, $in{'caller'}); if (@$changed && defined(&theme_post_change_modules)) { &theme_post_change_modules(); } } if ($in{'return'}) { &ui_print_footer($in{'return'}, $in{'returndesc'}); } else { &ui_print_footer("", $text{'index_return'}); } exit; } # Check validity if (!&is_package($pfile)) { if (-d $pfile) { &install_error(&text('install_edir', &package_system())); } else { # attempt to uncompress local $unc = &uncompress_if_needed($pfile, $need_unlink); if ($unc ne $pfile) { # uncompressed ok.. if (!&is_package($unc)) { &unlink_file($unc); &install_error(&text('install_ezip', &package_system())); } $pfile = $unc; } else { # uncompress failed.. give up #unlink($pfile) if ($need_unlink); &install_error(&text('install_efile', &package_system())); } } } # ask for package to install and install options @rv = &file_packages($pfile); print &ui_form_start("do_install.cgi"); print &ui_hidden("file", $pfile); print &ui_hidden("need_unlink", $need_unlink); print &ui_table_start($text{'install_header'}, undef, 4); # Packages to install $plist = ""; foreach (@rv) { ($p, $d) = split(/\s+/, $_, 2); if ($d) { $plist .= &html_escape($d)," (",&html_escape($p),")
\n"; } else { $plist .= &html_escape($p),"
\n"; } } print &ui_table_row($text{'install_packs'}, $plist, 3); # Type-specific options &install_options($pfile, $p); print &ui_table_end(); print &ui_form_end([ [ undef, $text{'install_ok'} ] ]); &ui_print_footer("", $text{'index_return'}); sub install_error { print "
$main::whatfailed : $_[0]

\n"; &ui_print_footer("", $text{'index_return'}); exit; } software/config.info.ru_SU0000644000567100000120000000026311205635233015547 0ustar jcameronwheelline2= ,11 package_system= ,1,rpm-RPM,pkgadd-Solaris,hpux-HPUX,freebsd-FreeBSD,slackware-Slackware,debian-Debian,aix-AIX,emerge-Gentoo software/config-coherent-linux0000664000567100000120000000003611205635233016523 0ustar jcameronwheelpackage_system=rpm apt_mode=0 software/config.info.es0000644000567100000120000000056411205635233015125 0ustar jcameronwheelline2=Configuración del sistema,11 package_system=Sistema de gestión de Paquetes,4,rpm-RPM,pkgadd-Solaris,hpux-HPUX,freebsd-FreeBSD,slackware-Slackware,debian-Debian,aix-AIX,emerge-Gentoo,cygwin-Cygwin update_system=Sistema de actualización de Paquetes,1,-Detectar automáticamente,apt-APT,yum-YUM,rhm-Red Redhat,csw-Blastwave,urpmi-URPMI,emerge-Emerge software/config-aix0000664000567100000120000000003611205635233014340 0ustar jcameronwheelpackage_system=aix apt_mode=0 software/config-united-linux0000644000567100000120000000003611205635233016202 0ustar jcameronwheelpackage_system=rpm apt_mode=0 software/do_install.cgi0000775000567100000120000000507711205635233015222 0ustar jcameronwheel#!/usr/local/bin/perl # do_install.cgi # Do the actual installation of a package from a file require './software-lib.pl'; &ReadParse(); &error_setup(&text('do_err', $in{'package'})); if ($show_install_progress) { &ui_print_unbuffered_header(undef, $text{'do_title'}, ""); } else { &ui_print_header(undef, $text{'do_title'}, ""); } @packages = &file_packages($in{'file'}); if (defined(&install_packages) && @packages > 1) { # Can install everything in one hit &clean_environment(); $error = &install_packages($in{'file'}, \%in); &reset_environment(); if ($error) { &install_error($error); } if ($in{'need_unlink'}) { &unlink_file($in{'file'}); } foreach $p (@packages) { # Display package details ($package, $desc) = split(/\s+/, $p, 2); @pinfo = &show_package_info($package); # Display new files @grid = ( ); $n = &check_files($package); for($i=0; $i<$n; $i++) { push(@grid, &html_escape($files{$i,'path'})); } print &ui_grid_table(\@grid, 2, 100, undef, undef, $text{'do_files'}); &list_packages($package); &webmin_log('install', 'package', $package, { 'desc' => $packages{0,'desc'}, 'class' => $packages{0,'class'} }); } } else { # Must install and show one by one foreach $p (@packages) { # attempt to install print &ui_hr() if ($p ne $packages[0]); ($package, $desc) = split(/\s+/, $p, 2); &clean_environment(); if ($show_install_progress) { print "

\n";
			$error = &install_package(
				$in{'file'}, &html_escape($package), \%in, 1);
			print "
\n"; } else { $error = &install_package( $in{'file'}, &html_escape($package), \%in); } &reset_environment(); if ($error) { &install_error($error); } if ($in{'need_unlink'}) { &unlink_file($in{'file'}); } # display information @pinfo = &show_package_info($package); # Show files in package, if possible $n = &check_files($package); if ($n) { @grid = ( ); for($i=0; $i<$n; $i++) { push(@grid, &html_escape($files{$i,'path'})); } print &ui_grid_table(\@grid, 2, 100, undef, undef, $text{'do_files'}); } &list_packages($package); &webmin_log('install', 'package', $package, { 'desc' => $packages{0,'desc'}, 'class' => $packages{0,'class'} }); } } &ui_print_footer("", $text{'index_return'}); sub install_error { print "",&text('do_efailed', $error),"

\n"; print $text{'do_efailedmsg1'},"

\n"; if ($in{'need_unlink'}) { print &text('do_efailedmsg2', "delete_file.cgi?file=". &urlize($in{'file'})),"

\n"; } print &ui_hr(); &ui_print_footer("", $text{'index_return'}); exit; } software/config-netbsd0000644000567100000120000000004211205635233015031 0ustar jcameronwheelpackage_system=freebsd apt_mode=0 software/pkgadd-lib.pl.bak0000664000567100000120000001460211205635233015464 0ustar jcameronwheel# pkgadd-lib.pl # Functions for solaris package management &foreign_require("proc", "proc-lib.pl"); # list_packages([package]*) # Fills the array %packages with a list of all packages sub list_packages { local($_, $list, $i); $i = 0; $list = join(' ', @_); open(PKGINFO, "pkginfo $list |"); while() { last if (/The following software/i); if (/^(\S+)\s+(\S+)\s+(.*)$/) { $packages{$i,'name'} = $2; $packages{$i,'class'} = $1; $packages{$i,'desc'} = $3; $i++; } } close(PKGINFO); return $i; } # package_info(package) # Returns an array of package information in the order # name, class, description, arch, version, vendor, installtime sub package_info { local($out, @rv); $out = `pkginfo -l $_[0] 2>&1`; if ($out =~ /^ERROR:/) { return (); } push(@rv, $_[0]); push(@rv, $out =~ /CATEGORY:\s+(.*)\n/ ? $1 : ""); push(@rv, $out =~ /DESC:\s+(.*)\n/ ? $1 : $out =~ /NAME:\s+(.*)\n/ ? $1 : $_[0]); push(@rv, $out =~ /ARCH:\s+(.*)\n/ ? $1 : $text{'pkgadd_unknown'}); push(@rv, $out =~ /VERSION:\s+(.*)\n/ ? $1 : $text{'pkgadd_unknown'}); push(@rv, $out =~ /VENDOR:\s+(.*)\n/ ? $1 : $text{'pkgadd_unknown'}); push(@rv, $out =~ /INSTDATE:\s+(.*)\n/ ? $1 : $text{'pkgadd_unknown'}); return @rv; } # is_package(file) # Tests if some file is a valid package file sub is_package { local ($ph, $ppid) = &foreign_call("proc", "pty_process_exec", "pkgadd -d $_[0]"); $rv = &wait_for($ph, 'ERROR', 'Select package|more choices'); close($ph); return $rv; } # file_packages(file) # Returns a list of all packages in the given file, in the form # package description sub file_packages { local ($ph, $ppid) = &foreign_call("proc", "pty_process_exec", "pkgadd -d $_[0]"); &wait_for($ph, 'available:'); while($rv = &wait_for($ph, 'Select package', '\r?\n\s+(\d+)\s+(\S+)\s+(.*)\r?\n', 'more choices.*:')) { if ($rv == 1) { push(@rv, "$matches[2] $matches[3]"); } else { &sysprint($ph, "\n"); } } close($ph); return @rv; } # install_options(file, package) # Outputs HTML for choosing install options sub install_options { print " ",&hlink("$text{'pkgadd_root'}","root"),"\n"; print "\n"; print &file_chooser_button("root", 1); print " \n"; } # install_package(file, package) # Installs the package in the given file, with options from %in sub install_package { local(@opts, %seen, $wf, $rv, $old_input); local $in = $_[2] ? $_[2] : \%in; if ($in->{'root'} =~ /^\/.+/) { if (!(-d $in->{'root'})) { &error(&text('pkgadd_eroot', $in->{'root'})); } @opts = ("-R", $in->{'root'}); } local ($ph, $ppid) = &foreign_call("proc", "pty_process_exec_logged", "pkgadd -d $_[0] ".join(" ",@opts)." $_[1]); while(1) { $wf = &wait_for($ph, '(.*) \[\S+\]', 'Installation of \S+ failed', 'Installation of \S+ was successful', 'No changes were made to the system'); if ($wf == 0) { # some question which should not have appeared before if ($seen{$matches[1]}++) { $rv = "

$old_input$wait_for_input
"; last; } &sysprint($ph, "y\n"); } elsif ($wf == 1 || $wf == 3) { # failed for some reason.. give up $rv = "
$old_input$wait_for_input
"; last; } elsif ($wf == 2) { # done ok! $rv = undef; last; } $old_input = $wait_for_input; } close($ph); return $rv; } # check_files(package) # Fills in the %files array with information about the files belonging # to some package. Values in %files are path type user group mode size error sub check_files { local($i, %errs, $curr, $line, %file); undef(%files); $chk = `pkgchk -n $_[0] 2>&1`; while($chk =~ /^(\S+): (\S+)\n((\s+.*\n)+)([\0-\177]*)$/) { if ($1 eq "ERROR") { $errs{$2} = $3; } $chk = $5; } open(CHK, "pkgchk -l $_[0] 2>&1 |"); FILES: for($i=0; 1; $i++) { # read one package $curr = ""; while(1) { if (!($line = )) { last FILES; } if ($line =~ /Current status/) { $line = ; last; } $curr .= $line; } # extract information &parse_pkgchk($curr); foreach $k (keys %file) { $files{$i,$k} = $file{$k}; } $files{$i,'error'} = $errs{$files{$i,'path'}}; } close(CHK); return $i; } # installed_file(file) # Given a filename, fills %file with details of the given file and returns 1. # If the file is not known to the package system, returns 0 # Usable values in %file are path type user group mode size packages sub installed_file { $temp = &tempname(); open(TEMP, "> $temp"); print TEMP "$_[0]\n"; close(TEMP); $out = `pkgchk -l -i $temp 2>&1`; unlink($temp); if ($out =~ /\S/) { &parse_pkgchk($out); return 1; } else { return 0; } } # delete_package(package) # Totally remove some package sub delete_package { local($ph, $pth, $ppid, $wf, %seen, $old_input); local ($ph, $ppid) = &foreign_call("proc", "pty_process_exec_logged", "pkgrm", $_[0]); if (&wait_for($ph, 'remove this package', 'ERROR')) { return "package does not exist"; } &sysprint($ph, "y\n"); while(1) { $wf = &wait_for($ph, '(.*) \[\S+\]', 'Removal of \S+ failed', 'Removal of \S+ was successful'); if ($wf == 0) { # some question which should not have appeared before if ($seen{$matches[1]}++) { $rv = "
$old_input$wait_for_input
"; last; } &sysprint($ph, "y\n"); } elsif ($wf == 1) { # failed for some reason.. give up $rv = "
$old_input$wait_for_input
"; last; } elsif ($wf == 2) { # done ok! $rv = undef; last; } $old_input = $wait_for_input; } close($ph); return $rv; } # parse_pkgchk(output) # Parse output about one file from pkgchk into the array %file sub parse_pkgchk { undef(%file); if ($_[0] =~ /Pathname:\s+(.*)/) { $file{'path'} = $1; } if ($_[0] =~ /Type:\s+(.*)/) { $file{'type'} = $1 eq "regular file" ? 0 : $1 eq "directory" ? 1 : $1 eq "special file" ? 2 : $1 eq "symbolic link" ? 3 : $1 eq "linked file" ? 4 : $1 eq "volatile file" ? 5 : $1 eq "editted file" ? 5 : $1 eq "edited file" ? 5 : -1; } if ($_[0] =~ /Source of link:\s+(\S+)/) { $file{'link'} = $1; } if ($_[0] =~ /Expected owner:\s+(\S+)/) { $file{'user'} = $1; } if ($_[0] =~ /Expected group:\s+(\S+)/) { $file{'group'} = $1; } if ($_[0] =~ /Expected mode:\s+(\S+)/) { $file{'mode'} = $1; } if ($_[0] =~ /size \(bytes\):\s+(\d+)/) { $file{'size'} = $1; } if ($_[0] =~ /following packages:\n(((\s+.*\n)|\n)+)/) { $file{'packages'} = join(' ', split(/\s+/, $1)); } } sub package_system { return $text{'pkgadd_manager'}; } sub package_help { return "pkgadd pkginfo pkgchk pkgrm"; } 1; software/config.info.de0000644000567100000120000000022111205635233015074 0ustar jcameronwheelpackage_system=System Paket-Management,1,rpm-RPM,pkgadd-Solaris,hpux-HPUX,freebsd-FreeBSD,slackware-Slackware,debian-Debian,aix-AIX,emerge-Gentoosoftware/help/0000755000567100000120000000000011205635233013320 5ustar jcameronwheelsoftware/help/search.fr.html0000644000567100000120000000032311205635233016057 0ustar jcameronwheel
Recherche de composants
Affiche la liste de tout les composants qui correspondent une recherche depuis la page principale. Cliquez sur le nom d'un composant pour avoir plus de dtails.
software/help/intro.ca.html0000644000567100000120000000417411205635233015731 0ustar jcameronwheel
Paquets de Programari

Introducci als Paquets

Un paquet de programari s una collecci de fitxers que constitueixen un programa. Aquest fitxers es poden combinar en un fitxer de paquet per a la seva distribuci o descrrega, per extreure'ls i collocar-los on toca quan s'instalLa el paquet.

Un sistema gestor de paquets automatitza la major part de la feina d'installar i suprimir programes. Com que els paquets normalment venen precompilats, no t'has de preocupar de fitxers Makefile scripts configure per installar-los. Com que el sistema de gesti de paquets pren nota de tots els paquets, pot esborrar tota petja d'un programa en desinstallar-lo.

Paquets Installats

Els paquets s'organitzen en classes i subclasses, com ara Sistema o X11/Utilitats. A la part de dalt de la pgina principal hi ha un arbre de carpetes i paquets, en el qual cada carpeta representa una classe. Per obrir una carpeta, fes.hi simplement clic. Per veure ms informaci sobre un paquet, fes clic sobre el seu nom.

Sota l'arbre de paquets hi ha un formulari per buscar a la base de dades de paquets. Aquest busca paquets els nom dels quals coincideixi amb aquell text que introdueixis.

Installa un Installa un Nou Paquet

Sota el bot de recreca de paquets, hi ha un formulari per installar un paquet nou. Pots installar-lo a partir d'un fitxer del sistema, un fitxer de l'ordinador sobre el qual tens obert el teu fullejador, o b des d'un URL FTP o HTTP. En aquest darrer cas, el Webmin contactar el servidor FTP o lloc Web i descarregar el fitxer del paquet. Si el teu sistema est darrere d'un tallafocs, assegura't que tens els servidors proxy configurats correctament al mdul Configuraci de Webmin.

Identifica un Fitxer

Al peu de la pgina principal hi ha un formulari per identificar un fitxer del sistema. Pots introduir-hi un camp complet com /etc/inetd.conf, o b una ordre com elm. Webmin povar de trobar el fitxer al sistema gestor de paquets, i mostrar la informaci del fitxer i els paquets que el fan servir.


software/help/noscripts.zh_TW.UTF-8.html0000664000567100000120000000024511205635233020071 0ustar jcameronwheel
是否執行命令殼指令稿?
當選擇這個選項後, 任何套件中的前置或後置安奘指令稿都會在安裝程序中被執行.
software/help/replacepkgs.zh_TW.UTF-8.html0000664000567100000120000000024111205635233020341 0ustar jcameronwheel
是否要蓋寫套件?
如果選擇了這個選項, 這個套件將會被重新安裝, 即使這個套件已經安裝於您的系統上.
software/help/replacefiles.zh_TW.UTF-8.html0000664000567100000120000000033111205635233020477 0ustar jcameronwheel
是否要蓋寫檔案?
如果有選取這個選項, 即使套件所包含的檔案與已經安裝的套件檔案相衝突, 這個套件也會被安裝; 而且檔案會被新的安裝所蓋寫.
software/help/oldpackage.es.html0000644000567100000120000000043511205635233016710 0ustar jcameronwheel
Sustituyo nueva versin por la vieja?
A menos que se seleccione esta opcin, el intento de actualizar cualquier paquete ya instalado a una versin ms vieja fallar. Esta opcin slo funcionar cuando tambin se selecciona Actualizar paquete?.
software/help/aix_preview.ca.html0000644000567100000120000000162411205635233017115 0ustar jcameronwheel
Noms VISTA PRVIA (NO s'efectuar l'operaci d'installaci)
Indica si vols veure prviament la installaci dels productes i actualitzacions de programari seleccionats. Una previsualitzaci identifica els requeriments per tal que la installaci del programari tingui xit.

S diu al sistema que mostri la informaci sobre les necessitats d'espai, si el programari ha passat la comprovaci de preinstallaci, i una llista dels productes i installacions de programari que s'installaran. Aquesta informaci pot contenir tamb una llista dels productes i actualitzacions de programari que no es poden installar per falta de requisits. El valor per defecte d'aquesta opci s NO.

Seleccionant tamb S a l'opci "Sortida DETALLADA", es mostrar el llistat de programari i actualitzacions en l'ordre d'installaci.

NO diu al sistema que executi la installaci.
software/help/replacefiles.sv.html0000644000567100000120000000036211205635233017274 0ustar jcameronwheel
Skriva ver filer?
Om man vljer detta kommer paketet att installeras ven om det innehller filer som redan finns i ett annat installerat paket. Filerna ifrga kommer att skrivas ver med de nya under installationen.
software/help/aix_extend.es.html0000644000567100000120000000223511205635233016746 0ustar jcameronwheel
EXTENDER los sistemas de ficheros si se necesita espacio ?
Indica si desea que el sistema agrande los sistemas de ficheros si se necesita ms espacio durante el procesamiento.

S indica al sistema que agrande los sistemas de ficheros lo necesario. Una vez el sistema de ficheros se ha agrandado, no se puede reducir, deber eliminar el sistema de ficheros entero. Si dispone de suficiente espacio en disco duro, elija S. Para previsualizar la cantidad de espacio necesario, diga S a la opcin " Slo PREVISUALIZAR ?".

NO le indica al sistema que NO agrande los sistemas de ficheros. Si dispone de espacio en disco limitad, elija NO. Si elige NO y el sistea se queda sin espacio en disco durante el procesamiento, se mostrar un mensaje del sistema. El mensaje indica cunto espacio en disco es necesario y qu fichero del sistema necesita dicho espacio. El sistema no instalar el producto que necesite el espacio adicional, pero continuar el proceso de instalacin de otros productos. En algunos caso se podra marcar una actualizacin como ROTA se no hay suficiente espacio en disco y el proceso de limpieza no se puede completar.
software/help/intro.zh_TW.Big5.html0000644000567100000120000000250411205635233017161 0ustar jcameronwheel
nM

@ӳnMO@ǯSw{ɮ׶X. oɮ׳QX@ӮMɮפ֥HGΤU, Ӧbnwˮ, oɮ׷|QѶ}ébTm.

@ӳnM޲ztη|۰ʦw˩ΧR{. ]M󪺵{q`OwsĶGiɮ, ҥHbw˹L{zݭn Makefiles P configure ROZ. ӥBM޲ztη|lܩҦM, ҥH]iHw@ӵ{.

wgw˪M

ҦnM󳣷|̾ڨOPlO[Hz, Ҧp System X11/Utilities . bDݬOҦM󪺼ƪC, 䤤C@ӸƧܤ@O. n}Ҥ@ӸƧ, unIYi; n˵@ӮM󪺬T, unIM󪺦W٧Yi.

bMCUO@ӷjMMƮw. o|MW٩λŦXzwrM.

wˤ@ӷsM

bMjMsUϥΤwwˤ@ӷsM. ziHqzaɮרtΤWɮ, zstΤWɮש FTP/HTTP URL wˤ. b̫᭱p, Webmin N|suҫw FTP/HTTP AHoҫwɮ. pGztΩmb, нTwzb Webmin պAT]wNzAT.

bDݪiHΩ{ztΤWSwɮ. zJ@ӵ|Ҧp /etc/inetd.conf άO@ӫOҦp elm. Webmin |ձqM޲ztΤMɮ, æCXϥΥM.


software/help/replacefiles.pl.html0000664000567100000120000000036311205635233017262 0ustar jcameronwheel
Nadpisywa pliki?
Jeli zaznaczono t opcj, pakiet zostanie zainstalowany nawet wtedy, gdy zawiera pliki kolidujce z ju zainstalowanym pakietem. Istniejce pliki zostan nadpisane przez nowe podczas instalacji.
software/help/aix_auto.ca.html0000644000567100000120000000227011205635233016402 0ustar jcameronwheel
Installa AUTOMTICAMENT el programari necessari
Indica si vols installar automticament el programari necessari. El programari necessari s aquell programari que un altre producte necessita per funcionar.

S li diu al sistema que installi automticament qualsevol programari que sigui necessari per a productes de programari que vulguis installar. Per a actualitzacions seleccionades, S tamb li diu al sistema que installi qualsevol actualitzaci corresponent que trobi al mitj d'installaci.

Si estableixes l'opci "REESCRIU les versions iguals o ms noves" a S, has de posar l'opci Installa AUTOMTICAMENT el programari necessari a NO.

Per veure una llista dels productes i requisits de programari que s'installaran, estableix l'opci "Noms VISTA PRVIA" a S.

NO li diu al sistema que NO installi els programari necessari per als produxtes de programari que seleccionis per installar. Si tries NO i el sistema es troba a faltar programari durant la installaci d'un producte, es cancellar la installaci d'aquest producte. El sistema llista el programari necessari, i llavors continua installant la resta de productes.
software/help/root.zh_TW.Big5.html0000644000567100000120000000015411205635233017010 0ustar jcameronwheel
ڥؿ
Ҧw˳|Noӥؿ. nܧoӳ]w, DzDzb@.
software/help/ignoresize.ca.html0000644000567100000120000000064711205635233016755 0ustar jcameronwheel
Comprova les mides dels sistemes de fitxers
Per defecte, quan se selecciona S, RPM comprovar l'espai lliure a tots els sistemes de fitxers muntats a l'hora d'installar un paquet, per assegurar que hi cabr. No obstant, si tens alguns sistemes de fitxers muntats a partir de servidors NFS, pots seleccionar No, de manera que el paquet es pugui installar de totes maneres.