Hello community,
here is the log from the commit of package yast2
checked in at Thu Aug 10 18:19:57 CEST 2006.
--------
--- yast2/yast2.changes 2006-08-04 16:36:18.000000000 +0200
+++ yast2/yast2.changes 2006-08-10 15:26:46.000000000 +0200
@@ -1,0 +2,23 @@
+Thu Aug 10 15:25:59 CEST 2006 - locilka@suse.cz
+
+- Moved (x)inetd agent from yast2-inetd to yast2
+- 2.13.74
+
+-------------------------------------------------------------------
+Wed Aug 9 15:37:45 CEST 2006 - jsrain@suse.cz
+
+- fixed recognizing pegasos, cell and maple boot requirements (PPC)
+ (#192957)
+
+-------------------------------------------------------------------
+Wed Aug 9 14:19:23 CEST 2006 - kmachalkova@suse.cz
+
+- Added new Address::CheckMAC() and Address::ValidMAC() functions.
+- 2.13.73
+
+-------------------------------------------------------------------
+Mon Aug 7 11:07:31 CEST 2006 - locilka@suse.cz
+
+- Added new IP::IPv4ToBits() and IP::BitsToIPv4() functions.
+
+-------------------------------------------------------------------
Old:
----
yast2-2.13.72.tar.bz2
New:
----
yast2-2.13.74.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.s1t05O/_old 2006-08-10 18:19:50.000000000 +0200
+++ /var/tmp/diff_new_pack.s1t05O/_new 2006-08-10 18:19:50.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2 (Version 2.13.72)
+# spec file for package yast2 (Version 2.13.74)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2
-Version: 2.13.72
+Version: 2.13.74
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-2.13.72.tar.bz2
+Source0: yast2-2.13.74.tar.bz2
prefix: /usr
Patch: yast2.xversion.patch
BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-pkg-bindings yast2-testsuite
@@ -33,6 +33,8 @@
Requires: SuSEfirewall2
# moved cfg_security.scr
Conflicts: yast2-security <= 2.13.2
+# moved ag_netd, cfg_netd.scr, cfg_xinetd.scr
+Conflicts: yast2-inetd <= 2.13.4
Provides: yast2-lib-sequencer
Obsoletes: yast2-lib-sequencer
Provides: yast2-lib-wizard yast2-lib-wizard-devel yast2-trans-wizard
@@ -96,7 +98,7 @@
Steffen Winterfeldt
%prep
-%setup -n yast2-2.13.72
+%setup -n yast2-2.13.74
%if %sles_version
%else
%patch0
@@ -200,6 +202,17 @@
%doc %{prefix}/share/doc/packages/yast2/wizard
%changelog -n yast2
+* Thu Aug 10 2006 - locilka@suse.cz
+- Moved (x)inetd agent from yast2-inetd to yast2
+- 2.13.74
+* Wed Aug 09 2006 - jsrain@suse.cz
+- fixed recognizing pegasos, cell and maple boot requirements (PPC)
+ (#192957)
+* Wed Aug 09 2006 - kmachalkova@suse.cz
+- Added new Address::CheckMAC() and Address::ValidMAC() functions.
+- 2.13.73
+* Mon Aug 07 2006 - locilka@suse.cz
+- Added new IP::IPv4ToBits() and IP::BitsToIPv4() functions.
* Fri Aug 04 2006 - jsrain@suse.cz
- added mode X-version-specific paths
- 2.13.72
++++++ yast2-2.13.72.tar.bz2 -> yast2-2.13.74.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.13.72/MAINTAINER new/yast2-2.13.74/MAINTAINER
--- old/yast2-2.13.72/MAINTAINER 2006-06-26 08:19:51.000000000 +0200
+++ new/yast2-2.13.74/MAINTAINER 2006-08-09 12:30:51.000000000 +0200
@@ -1 +1 @@
-Stanislav Visnovsky
+Jiri Srain
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.13.72/VERSION new/yast2-2.13.74/VERSION
--- old/yast2-2.13.72/VERSION 2006-08-04 16:25:49.000000000 +0200
+++ new/yast2-2.13.74/VERSION 2006-08-10 15:22:00.000000000 +0200
@@ -1 +1 @@
-2.13.72
+2.13.74
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.13.72/configure new/yast2-2.13.74/configure
--- old/yast2-2.13.72/configure 2006-08-04 16:33:13.000000000 +0200
+++ new/yast2-2.13.74/configure 2006-08-10 17:57:34.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for yast2 2.13.72.
+# Generated by GNU Autoconf 2.59 for yast2 2.13.74.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -269,8 +269,8 @@
# Identity of this package.
PACKAGE_NAME='yast2'
PACKAGE_TARNAME='yast2'
-PACKAGE_VERSION='2.13.72'
-PACKAGE_STRING='yast2 2.13.72'
+PACKAGE_VERSION='2.13.74'
+PACKAGE_STRING='yast2 2.13.74'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -728,7 +728,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2 2.13.72 to adapt to many kinds of systems.
+\`configure' configures yast2 2.13.74 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -795,7 +795,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2 2.13.72:";;
+ short | recursive ) echo "Configuration of yast2 2.13.74:";;
esac
cat <<\_ACEOF
@@ -908,7 +908,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-yast2 configure 2.13.72
+yast2 configure 2.13.74
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -922,7 +922,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2 $as_me 2.13.72, which was
+It was created by yast2 $as_me 2.13.74, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1652,7 +1652,7 @@
# Define the identity of the package.
PACKAGE='yast2'
- VERSION='2.13.72'
+ VERSION='2.13.74'
cat >>confdefs.h <<_ACEOF
@@ -1863,9 +1863,9 @@
-VERSION="2.13.72"
+VERSION="2.13.74"
RPMNAME="yast2"
-MAINTAINER="Stanislav Visnovsky "
+MAINTAINER="Jiri Srain "
pkgconfigdir=\${libdir}/pkgconfig
pkgconfigdatadir=\${datadir}/pkgconfig
@@ -2797,7 +2797,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by yast2 $as_me 2.13.72, which was
+This file was extended by yast2 $as_me 2.13.74, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -2852,7 +2852,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2 config.status 2.13.72
+yast2 config.status 2.13.74
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.13.72/configure.in new/yast2-2.13.74/configure.in
--- old/yast2-2.13.72/configure.in 2006-08-04 16:33:03.000000000 +0200
+++ new/yast2-2.13.74/configure.in 2006-08-10 17:57:28.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2
dnl
-dnl -- This file is generated by y2autoconf 2.13.18 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.13.19 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2, 2.13.72, http://bugs.opensuse.org/, yast2)
+AC_INIT(yast2, 2.13.74, http://bugs.opensuse.org/, yast2)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,9 +17,9 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.13.72"
+VERSION="2.13.74"
RPMNAME="yast2"
-MAINTAINER="Stanislav Visnovsky "
+MAINTAINER="Jiri Srain "
dnl pkgconfig honors lib64
pkgconfigdir=\${libdir}/pkgconfig
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.13.72/library/agents/Makefile.am new/yast2-2.13.74/library/agents/Makefile.am
--- old/yast2-2.13.72/library/agents/Makefile.am 2006-06-26 08:17:38.000000000 +0200
+++ new/yast2-2.13.74/library/agents/Makefile.am 2006-08-10 16:22:49.000000000 +0200
@@ -1,5 +1,6 @@
# Makefile.am for yast2/library/agents
-# $Id: Makefile.am 12865 2003-11-28 13:51:26Z msvec $
+# $Id: Makefile.am 32304 2006-08-10 14:24:24Z locilka $
+agent_SCRIPTS = ag_netd
scrconf_DATA = $(wildcard *.scr)
-EXTRA_DIST = $(scrconf_DATA)
+EXTRA_DIST = $(agent_SCRIPTS) $(scrconf_DATA)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.13.72/library/agents/Makefile.in new/yast2-2.13.74/library/agents/Makefile.in
--- old/yast2-2.13.72/library/agents/Makefile.in 2006-08-04 16:33:17.000000000 +0200
+++ new/yast2-2.13.74/library/agents/Makefile.in 2006-08-10 17:57:35.000000000 +0200
@@ -15,7 +15,8 @@
@SET_MAKE@
# Makefile.am for yast2/library/agents
-# $Id: Makefile.am 12865 2003-11-28 13:51:26Z msvec $
+# $Id: Makefile.am 32304 2006-08-10 14:24:24Z locilka $
+
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@@ -48,6 +49,9 @@
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(agentdir)" "$(DESTDIR)$(scrconfdir)"
+agentSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(agent_SCRIPTS)
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -56,7 +60,6 @@
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(scrconfdir)"
scrconfDATA_INSTALL = $(INSTALL_DATA)
DATA = $(scrconf_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -166,8 +169,9 @@
ydatadir = @ydatadir@
yncludedir = @yncludedir@
ystartupdir = @ystartupdir@
+agent_SCRIPTS = ag_netd
scrconf_DATA = $(wildcard *.scr)
-EXTRA_DIST = $(scrconf_DATA)
+EXTRA_DIST = $(agent_SCRIPTS) $(scrconf_DATA)
all: all-am
.SUFFIXES:
@@ -200,6 +204,25 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-agentSCRIPTS: $(agent_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(agentdir)" || $(mkdir_p) "$(DESTDIR)$(agentdir)"
+ @list='$(agent_SCRIPTS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f $$d$$p; then \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " $(agentSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(agentdir)/$$f'"; \
+ $(agentSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(agentdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-agentSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(agent_SCRIPTS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " rm -f '$(DESTDIR)$(agentdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(agentdir)/$$f"; \
+ done
uninstall-info-am:
install-scrconfDATA: $(scrconf_DATA)
@$(NORMAL_INSTALL)
@@ -254,9 +277,9 @@
done
check-am: all-am
check: check-am
-all-am: Makefile $(DATA)
+all-am: Makefile $(SCRIPTS) $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(scrconfdir)"; do \
+ for dir in "$(DESTDIR)$(agentdir)" "$(DESTDIR)$(scrconfdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
@@ -301,7 +324,7 @@
info-am:
-install-data-am: install-scrconfDATA
+install-data-am: install-agentSCRIPTS install-scrconfDATA
install-exec-am:
@@ -327,16 +350,18 @@
ps-am:
-uninstall-am: uninstall-info-am uninstall-scrconfDATA
+uninstall-am: uninstall-agentSCRIPTS uninstall-info-am \
+ uninstall-scrconfDATA
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
- install-scrconfDATA install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
- uninstall-am uninstall-info-am uninstall-scrconfDATA
+ install install-agentSCRIPTS install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-scrconfDATA install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-agentSCRIPTS uninstall-am \
+ uninstall-info-am uninstall-scrconfDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.13.72/library/agents/ag_netd new/yast2-2.13.74/library/agents/ag_netd
--- old/yast2-2.13.72/library/agents/ag_netd 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-2.13.74/library/agents/ag_netd 2006-08-10 16:08:34.000000000 +0200
@@ -0,0 +1,806 @@
+#!/usr/bin/perl -w
+#
+# $Id: ag_netd 32302 2006-08-10 14:10:05Z locilka $
+# Author: Martin Vidner
+#
+
+use ycp;
+use strict;
+use File::Basename;
+
+my $debug = defined ($ARGV[0]) && $ARGV[0] =~ "^-.*d";
+
+sub DEBUG
+{
+ print STDERR @_ if $debug;
+}
+DEBUG "DEBUG\n";
+
+# Testsuite hack:
+# Automake invokes dejagnu with an absolute srcdir :(
+# This will replace the current directory in file names by "./"
+# Turn it off by -n
+my $strip = ! (defined ($ARGV[0]) && $ARGV[0] =~ "^-.*n");
+my $pwd;
+if ($strip)
+{
+ DEBUG "STRIP\n";
+ # must use symlinks like make does
+ # pwd alone calls /bin/pwd, we want the bash builtin
+ $pwd = `bash -c pwd -L`;
+ chomp $pwd;
+ DEBUG "PWD: '$pwd'\n";
+}
+sub strip_pwd ($)
+{
+ DEBUG "STRIP0: $_[0]\n";
+ $_[0] =~ s{^$pwd/}{./}o if $strip;
+ DEBUG "STRIP1: $_[0]\n";
+ return $_[0];
+}
+
+my @services;
+# where new services are added
+my $dir_with_includes = "";
+my $base_file = "";
+# used for a warning about unsupported options
+my $message = "";
+
+package ycp;
+sub to_bool ($)
+{
+ my $b = shift;
+ return $b? \ "true" : \ "false";
+}
+
+
+package linefile;
+# a handle, a name and line number
+use IO::File;
+
+sub new ($$)
+{
+ my $class = shift;
+ my ($name, $mode) = @_;
+ my $f = { "name" => $name,
+ "lineno" => 0,
+ "fh" => new IO::File ($name, $mode) };
+ return bless ($f, $class);
+}
+
+
+package netd;
+# base of inetd and xinetd
+use ycp;
+
+# makes a hash (keyed by file names) of hashes (keyed by line numbers)
+# of changed services
+# exception: line -1 is a _list_ of new services
+sub get_changed (@)
+{
+ my %ch = ();
+ foreach my $s (@_)
+ {
+ next if (!$s->{changed});
+ if (defined ($s->{iid}) && $s->{iid} =~ m/(\d+):(.*)/)
+ {
+ my ($line, $file) = ($1, $2);
+ $ch{$file}->{$line} = $s;
+ }
+ else
+ {
+ y2debug "new $s->{service}";
+ # Bug 26999: if we have encountered an "includedir",
+ # create the new services there. The file name is
+ # the "script" or "service" field.
+ my $fname = filename_for_new_service ($s);
+ push (@{$ch{$fname}->{-1}}, $s);
+ }
+ }
+ return %ch;
+}
+
+sub filename_for_new_service ($)
+{
+ my $s = shift;
+ if ($dir_with_includes)
+ {
+ my $script = $s->{script} || $s->{service};
+ return $dir_with_includes ."/".$script;
+ }
+ else
+ {
+ # no includes, use the main file
+ return $base_file;
+ }
+}
+
+sub parse_file ($)
+{
+ my $class = shift;
+ ::DEBUG ("$class\n");
+ my $filename = ::strip_pwd (shift);
+
+ use Errno qw(ENOENT);
+
+ my $file = new linefile ($filename, "r");
+ if (! $file->{fh})
+ {
+# return 1 if ($! == ENOENT); # ok if it is not there
+ y2error ("$file->{name}: $!");
+ return 0;
+ }
+
+ while (1)
+ {
+ my $service = $class->parse_service ($file);
+ last if !defined ($service);
+ if ($service->{is_defaults})
+ {
+ if ($service->{enabled} || $service->{disabled})
+ {
+ # TODO rework, must be translated!
+ $message = "Enabling and disabling services\n"
+ . "in the \"defaults\" section is ignored.";
+ }
+ }
+ else
+ {
+ push (@services, $service);
+ }
+# ::DEBUG ("tick\n");
+ }
+
+ $file->{fh}->close;
+ return 1;
+}
+
+sub include_dir ($)
+{
+ my $class = shift;
+ ::DEBUG ("$class\n");
+ my $dirname = shift;
+ $dir_with_includes = $dirname; # for creating new services
+ use IO::Dir;
+ my $dir = new IO::Dir ($dirname);
+ my @files;
+ if (defined $dir)
+ {
+ while (defined ($_ = $dir->read ()))
+ {
+ push (@files, $_) unless m/\./ || m/~$/;
+ }
+ $dir->close ();
+ }
+ else
+ {
+ y2error "Cannot include dir '$dirname'";
+ }
+
+ foreach (sort @files)
+ {
+ $class->parse_file ("$dirname/$_");
+ }
+}
+
+sub write_file ()
+{
+ use IO::File;
+ my $class = shift;
+
+ my $ret = 1;
+ my %changed_services = get_changed (@services);
+ while (my ($filename, $lines) = each %changed_services)
+ {
+ # TODO guard against changed files
+ my $ofilename = "$filename.tmp";
+ # if we are creating a new file, $if->{fh} will be undef,
+ # which is taken care of below
+ my $if = new linefile ($filename, "r");
+ my $OF = new IO::File (">$ofilename");
+ if (! $OF)
+ {
+ y2error ("Opening '$ofilename' for writing: $!");
+ $ret = 0;
+ next; # continue with the next file
+ }
+
+ my @new_services = defined ($lines->{-1}) ? @{$lines->{-1}} : ();
+ delete $lines->{-1};
+
+ # copy the file, replacing services at specified lines by
+ # changed ones
+ my @linenos = sort keys %{$lines};
+ y2debug "@linenos";
+
+ # Be careful here not to read the line that starts the changed service
+ # because then we would have to "unget" it in both implementations
+ # of parse_service.
+ # Therefore we don't use the traditional "while(<>) {...}" loop.
+ # Loop rewritten to fix missing consecutive modified services (#24379).
+ $if->{lineno} = 0;
+ while (1)
+ {
+ # now $lineno is the line number of the contents of $_
+ # and $_ or its replacement has been output
+
+ if (defined ($linenos[0]) && $if->{lineno}+1 == $linenos[0])
+ {
+ # got there
+ my $service = $lines->{shift @linenos};
+ # this writes the new data,
+ # "replace" copies the unknown data
+ $class->write_service ($OF, $service)
+ unless $service->{deleted};
+ $class->parse_service ($if); #discard the old data
+ }
+ else
+ {
+ # read a line, allowing for a non-existent file
+ if ($if->{fh})
+ {
+ $_ = $if->{fh}->getline;
+ }
+ else
+ {
+ $_ = undef;
+ }
+
+ if (!defined $_)
+ {
+ # On eof, the branch with parse_service will not be taken
+ # because that would mean we think there are services
+ # past eof. Even in that case, parse_service will simply
+ # return and @linenos will be exhausted and we get here.
+ last;
+ }
+ ++$if->{lineno};
+ y2debug ($if->{name}, $if->{lineno}, "copy");
+
+ print $OF $_;
+ }
+ }
+
+ # can we add new services?
+ foreach my $service (@new_services)
+ {
+ y2debug "NEW $service->{service}";
+ $class->write_service ($OF, $service)
+ unless $service->{deleted};
+ }
+
+ rename ($ofilename, $filename);
+ }
+ return $ret;
+}
+
+sub services_by_package ()
+{
+ my $class = shift;
+
+ open (OUT, ">/dev/fd/3");
+ foreach my $s (@services)
+ {
+ # Get the program name - used to see whether a service is installed.
+ # Assumedly multiple packages providing the same service will differ
+ # in the program name.
+ my $program = $s->{server};
+ if ($program =~ m:/tcpd$:)
+ {
+ my @args = split (/\s+/, $s->{server_args});
+ $program = shift (@args);
+ }
+ $program =~ s:^.*/::;
+
+ # originally used TABs as delimiters,
+ # but awk then misses an empty protocol
+ print OUT "$s->{service},$s->{protocol},$program\n";
+ }
+ close (OUT);
+}
+
+
+package inetd;
+@inetd::ISA = qw(netd);
+use ycp;
+
+# parses the next service, returns it or undef on EOF
+# does not attempt to read the next service!
+sub parse_service ($)
+{
+ my $class = shift;
+ ::DEBUG ("$class\n");
+ y2debug ("parse_service");
+
+ my $file = shift;
+
+ my $service = undef;
+ my $comment = "";
+ my $reclineno = 0; # line at which a record (including comment) starts
+ while (defined ($_ = $file->{fh}->getline))
+ {
+ ++$file->{lineno};
+ y2debug ($file->{name}, $file->{lineno}, "parse");
+
+ chomp;
+ next if /^$/;
+ $reclineno ||= $file->{lineno};
+
+ # Try parsing also commented out lines
+ my $enabled = 1;
+ # TODO
+ # spaces before #
+
+ if (s/^#//)
+ {
+ $enabled = 0;
+ }
+ # leave $c intact for comment
+ my $c = $_;
+ s/^\s+//;
+
+ # TODO test a truncated line
+ my @fields = split (/\s+/);
+ my ($service_ver, $socket_type, $protocol, $wait_max, $user_group,
+ $server, @server_args) = @fields;
+ if (!defined ($server) ||
+ $socket_type !~ /dgram|stream|raw|rdm|seqpacket/)
+ {
+ if (!$enabled)
+ {
+ # tried to parse a disabled service, did not work out
+ $comment .= "$c\n";
+ }
+ else
+ {
+ # TODO error? it is a damaged entry
+ }
+ next;
+ }
+ # the second variable of these pairs can be undef
+ my ($service_name, $rpc_version) = split (/\//, $service_ver);
+ $rpc_version ||= "";
+ my ($wait, $nmax) = split (/\./, $wait_max);
+ # "" is wrong, but the ycp code works around it
+ # convert to numbers
+ my $max = $nmax? \$nmax : "";
+ my ($user, $group) = split (/[.:]/, $user_group);
+ $group ||= "";
+
+ # convert to booleans
+ $enabled = ycp::to_bool ($enabled);
+ $wait = ycp::to_bool ($wait eq "wait");
+
+ $service =
+ {
+ "iid" => "$reclineno:$file->{name}",
+ "script" => File::Basename::basename ($file->{name}),
+
+ "enabled" => $enabled,
+ "comment" => $comment,
+ "service" => $service_name,
+ "rpc_version" => $rpc_version,
+ "socket_type" => $socket_type,
+ "protocol" => $protocol,
+ "wait" => $wait,
+ "max" => $max,
+ "user" => $user,
+ "group" => $group,
+ "server" => $server,
+ "server_args" => join (" ", @server_args),
+ };
+ last;
+ }
+ return $service;
+}
+
+sub write_service ($$)
+{
+ my $class = shift;
+ ::DEBUG ("$class\n");
+ y2debug ("write_service");
+
+ my $f = shift;
+ my $s = shift;
+
+ foreach (split (/\n/, $s->{comment}))
+ {
+ print $f "#$_\n";
+ }
+
+ if (! $s->{enabled})
+ {
+ print $f "# ";
+ }
+
+ print $f $s->{service};
+ print $f "/". $s->{rpc_version} if $s->{rpc_version};
+ print $f " ";
+
+ print $f $s->{socket_type}. " ";
+ print $f $s->{protocol}. " ";
+
+ print $f ($s->{wait}? "wait":"nowait");
+ print $f ".". $s->{max} if $s->{max};
+ print $f " ";
+
+ print $f $s->{user};
+ print $f ".". $s->{group} if $s->{group};
+ print $f " ";
+
+ print $f $s->{server};
+ print $f " ". $s->{server_args} if $s->{server_args};
+ print $f "\n";
+}
+
+
+package xinetd;
+@xinetd::ISA = qw(netd);
+use ycp;
+
+sub parse_service ($)
+{
+ my $class = shift;
+ ::DEBUG ("$class\n");
+ y2debug ("parse_service");
+
+ my $file = shift;
+ my $service = undef;
+ my $comment = "";
+ my $comment_inside = ""; # usually commented out attributes
+ my $reclineno = 0; # line at which a record (including comment) starts
+ my $state = "init"; # "brace", "inside"
+ my $in_defaults = 0;
+ my $unparsed = "";
+ while ($file && $file->{fh} && defined ($_ = $file->{fh}->getline))
+ {
+ ++$file->{lineno};
+ y2debug ($file->{name}, $file->{lineno}, "parse");
+
+ chomp;
+ next if /^\s*$/;
+ $reclineno ||= $file->{lineno};
+
+ if (s/^\s*#//)
+ {
+ if ($state eq "inside")
+ {
+ $comment_inside .= "$_\n";
+ }
+ else
+ {
+ $comment .= "$_\n";
+ }
+ }
+ else
+ {
+ if ($state eq "init")
+ {
+ if (/^\s*include\s+(\S+)/)
+ {
+ $class->parse_file ($1);
+ $reclineno = 0;
+ }
+ elsif (/^\s*includedir\s+(\S+)/)
+ {
+ $class->include_dir ($1);
+ # Bug 24270:
+ # the include directive must not belong
+ # to the following service
+ $reclineno = 0;
+ }
+ elsif (/^\s*service\s+(\S+)/)
+ {
+ $service =
+ {
+ "service" => $1,
+ "iid" => "$reclineno:$file->{name}",
+ "script" => File::Basename::basename ($file->{name}),
+ # default values:
+ "enabled" => ycp::to_bool (1),
+ "rpc_version" => "",
+ "socket_type" => "MISSING", # mandatory
+ "protocol" => "",
+ "wait" => ycp::to_bool (0), # mandatory
+ "user" => "",
+ "group" => "",
+ "server" => "",
+ "server_args" => "",
+ };
+ $state = "brace";
+ $in_defaults = 0;
+ }
+ elsif (/^\s*defaults\s*$/)
+ {
+ $service =
+ {
+ "is_defaults" => 1,
+ };
+ $state = "brace";
+ $in_defaults = 1;
+ }
+ else
+ {
+ y2error ("Expecting \"service\" at ".
+ "$file->{name}:$file->{lineno}");
+ }
+ }
+ elsif ($state eq "brace")
+ {
+ if (/^\s*\{\s*$/)
+ {
+ $state = "inside";
+ }
+ else
+ {
+ y2error ("An opening brace ({) should follow a ".
+ "\"service $service->{service}\" line. Seen $_.");
+ # continue.
+ }
+ }
+ elsif ($state eq "inside")
+ {
+ if (/^\s*\}\s*$/)
+ {
+ # wrap up
+ $service->{comment} = $comment;
+ $service->{comment_inside} = $comment_inside;
+ $service->{unparsed} = $unparsed;
+ last;
+ }
+ elsif (m{^\s*(\S+)\s*=\s*(.*?)\s*$})
+ {
+ my ($attribute, $value) = ($1, $2);
+ if ($in_defaults)
+ {
+ if ($attribute =~ m{enabled|disabled})
+ {
+ $service->{$attribute} .= "$value ";
+ }
+ else
+ {
+ $unparsed .= "$_\n";
+ }
+ }
+ else
+ {
+ # "disable" != "disabled"
+ if ($attribute eq "disable")
+ {
+ $service->{enabled} = ycp::to_bool($value eq "no");
+ }
+ elsif ($attribute =~ m{rpc_version|
+ socket_type|
+ protocol|
+ wait| # bool
+ user|
+ group|
+ server|
+ server_args
+ }x)
+ {
+ if ($attribute eq "wait")
+ {
+ $value = ycp::to_bool ($value eq "yes");
+ }
+ $service->{$attribute} = $value;
+ }
+ else
+ {
+ $unparsed .= "$_\n";
+ }
+ }
+ }
+ else
+ {
+ $unparsed .= "$_\n";
+ }
+ }
+ else
+ {
+ y2internal ("Unknown state $state.");
+ $state = "inside"; # recover from the error
+ }
+ }
+ }
+ return $service;
+}
+
+sub write_item ($$$;$)
+{
+ my ($f, $s, $attribute, $value) = @_;
+ $value ||= $s->{$attribute};
+ # there's #define FIELD_WIDTH 15 in itox.c
+ printf $f "\t%-15s = %s\n", $attribute, $value;
+}
+
+sub write_opt_item ($$$)
+{
+ my ($f, $s, $attribute) = @_;
+ write_item ($f, $s, $attribute) if $s->{$attribute};
+}
+
+sub write_service ($$)
+{
+ my $class = shift;
+ ::DEBUG ("$class\n");
+ y2debug ("write_service");
+
+ my $f = shift;
+ my $s = shift;
+
+ foreach (split (/\n/, $s->{comment} || ""))
+ {
+ print $f "#$_\n";
+ }
+
+ print $f "service $s->{service}\n";
+ print $f "{\n";
+
+ foreach (split (/\n/, $s->{comment_inside} || ""))
+ {
+ print $f "#$_\n";
+ }
+
+ if (! $s->{enabled})
+ {
+ write_item $f, $s, "disable", "yes";
+ }
+ if ($s->{rpc_version})
+ {
+ $s->{type} ||= ""; # prevent undef
+ $s->{type} .= " RPC" if ($s->{type} !~ /RPC/);
+ write_item $f, $s, "rpc_version";
+ }
+ write_item $f, $s, "socket_type";
+ write_opt_item $f, $s, "protocol";
+ write_item $f, $s, "wait", ($s->{wait}? "yes":"no");
+
+ write_opt_item $f, $s, "user";
+ write_opt_item $f, $s, "group";
+ write_opt_item $f, $s, "server";
+ write_opt_item $f, $s, "server_args";
+
+ write_opt_item $f, $s, "type";
+ print $f $s->{unparsed} || "";
+ print $f "}\n";
+}
+
+
+package main;
+#
+# MAIN cycle
+#
+
+my $netd;
+# if reading fails, defaulting to no services
+@services = ();
+
+while ( <STDIN> )
+{
+ chomp;
+ y2debug ("Got: ", $_);
+ if (/^nil$/)
+ {
+ print "nil\n";
+ next;
+ }
+
+ my ($command, @arguments) = ycp::ParseTerm ($_);
+ if ($command =~ "Netd|Inetd|Xinetd")
+ {
+ # reply to the client (this actually gets eaten by the ScriptingAgent)
+ ycp::Return (undef);
+ print "\n";
+ $netd = ($command eq "Xinetd")? "xinetd": "inetd";
+ my $fn = shift @arguments || "/etc/$netd.conf";
+
+ $base_file = strip_pwd ($fn);
+
+ # parsing is done before Read (.services)
+ # so that we can re-read the config if a new package is installed
+ next;
+ }
+ # else it should be a regular command
+ my $path = "";
+ my $pathref = shift @arguments;
+ if (defined $pathref)
+ {
+ if (ref($pathref) eq "SCALAR" && $$pathref =~ /^\./)
+ {
+ $path = $$pathref;
+ }
+ # 'result (nil)' is a standard command
+ elsif ($command ne "result")
+ {
+ y2error ("The first argument is not a path. ('$pathref')");
+ }
+ }
+ my $argument = shift @arguments;
+ y2warning ("Superfluous command arguments ignored") if (@arguments > 0);
+
+
+ if ($command eq "Dir")
+ {
+ if ($path eq ".")
+ {
+ ycp::Return (["message", "services"]);
+ }
+ elsif ($path eq ".services")
+ {
+ my @snames = map { $_->{service} } @services;
+ ycp::Return ([ sort @snames ], 1);
+ }
+ else
+ {
+ ycp::Return ([]);
+ }
+ }
+
+ elsif ($command eq "Write")
+ {
+ my $result = 1;
+ if ($path eq ".services" && ref ($argument) eq "ARRAY")
+ {
+ @services = @{$argument};
+ $result = $netd->write_file ();
+ }
+ else
+ {
+ y2error ("Wrong path $path or argument: ", ref ($argument));
+ $result = 0;
+ }
+ ycp::Return (ycp::to_bool ($result));
+ }
+
+ elsif ($command eq "Read")
+ {
+ if ($path eq ".services")
+ {
+ # must clear before re-reading
+ # but not in parse_file, that would break includedir
+ @services = ();
+ $netd->parse_file ($base_file);
+ ycp::Return (\@services, 1);
+ }
+ elsif ($path eq ".message")
+ {
+ ycp::Return ($message, 1);
+ $message = "";
+ }
+ else
+ {
+ y2error ("Unrecognized path! '$path'");
+ ycp::Return (undef);
+ }
+ }
+
+ # A special hack - write known services/protocols to fd3
+ # Used for gathering a list of all available services by package
+ elsif ($command eq "Execute")
+ {
+ if ($path eq ".sbp")
+ {
+ $netd->services_by_package ();
+ ycp::Return ("true");
+ }
+ else
+ {
+ y2error ("Unrecognized path! '$path'");
+ ycp::Return (undef);
+ }
+ }
+
+ elsif ($command eq "result")
+ {
+ exit;
+ }
+
+ # Unknown command
+ else
+ {
+ y2error ("Unknown instruction $command or argument: ", ref ($argument));
+ ycp::Return (undef);
+ }
+ print "\n";
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.13.72/library/agents/etc_inetd.scr new/yast2-2.13.74/library/agents/etc_inetd.scr
--- old/yast2-2.13.72/library/agents/etc_inetd.scr 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-2.13.74/library/agents/etc_inetd.scr 2006-08-10 15:18:20.000000000 +0200
@@ -0,0 +1,4 @@
+.etc.inetd_conf
+`ag_netd (
+ `Netd ("/etc/inetd.conf")
+)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.13.72/library/agents/etc_xinetd.scr new/yast2-2.13.74/library/agents/etc_xinetd.scr
--- old/yast2-2.13.72/library/agents/etc_xinetd.scr 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-2.13.74/library/agents/etc_xinetd.scr 2006-08-10 15:18:28.000000000 +0200
@@ -0,0 +1,4 @@
+.etc.xinetd_conf
+`ag_netd (
+ `Xinetd ("/etc/xinetd.conf")
+)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.13.72/library/modules/Arch.ycp new/yast2-2.13.74/library/modules/Arch.ycp
--- old/yast2-2.13.72/library/modules/Arch.ycp 2006-06-26 08:19:24.000000000 +0200
+++ new/yast2-2.13.74/library/modules/Arch.ycp 2006-08-09 16:28:05.000000000 +0200
@@ -5,7 +5,7 @@
* Authors: Klaus Kaempf
* Flags: Stable
*
- * $Id: Arch.ycp 31257 2006-06-01 15:54:23Z locilka $
+ * $Id: Arch.ycp 32280 2006-08-09 13:41:27Z jsrain $
*/
{
@@ -220,6 +220,36 @@
{
_board_compatible = "wintel";
}
+ // hwinfo expects CHRP/PReP/iSeries/MacRISC* in /proc/cpuinfo
+ // there is no standard for the board identification
+ // Cell and Maple based boards have no CHRP in /proc/cpuinfo
+ if (ppc () && _board_compatible == nil)
+ {
+ map device_type = (map) SCR::Execute (.target.bash_output,
+ "echo `cat /proc/device-tree/device_type`" , $[]);
+ map model = (map) SCR::Execute (.target.bash_output,
+ "echo `cat /proc/device-tree/model`" , $[]);
+ string board = model["stdout"]:"";
+ y2milestone("model %1 , device_type %2\n", model, device_type);
+ // catch remaining IBM boards
+ if (device_type["stdout"]:"" == "chrp")
+ {
+ _board_compatible = "CHRP";
+ }
+ else
+ {
+ // Maple has its own way of pretenting OF1275 compliance
+ if (board == "Momentum,Maple-D" || board == "Momentum,Maple-L"
+ || board == "Momentum,Maple")
+ {
+ _board_compatible = "CHRP";
+ }
+ if (board == "Pegasos2")
+ {
+ _board_compatible = "Pegasos";
+ }
+ }
+ }
// avoid future re-probing if probing failed
// also avoid passing nil outside the module
if (board_compatible == nil)
@@ -277,6 +307,13 @@
}
/**
+ * true for all "Pegasos" ppc boards
+ */
+global boolean board_pegasos () {
+ return ppc () && board_compatible () == "Pegasos";
+}
+
+/**
* true for all "Windows/Intel" compliant boards (x86 based)
*/
global boolean board_wintel () {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.13.72/library/modules/Version.ycp new/yast2-2.13.74/library/modules/Version.ycp
--- old/yast2-2.13.72/library/modules/Version.ycp 2006-08-04 16:33:52.000000000 +0200
+++ new/yast2-2.13.74/library/modules/Version.ycp 2006-08-10 17:57:46.000000000 +0200
@@ -20,7 +20,7 @@
/**
* Version of the yast2 package
*/
-global string yast2 = "2.13.72";
+global string yast2 = "2.13.74";
/* EOF */
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.13.72/library/types/src/Address.ycp new/yast2-2.13.74/library/types/src/Address.ycp
--- old/yast2-2.13.72/library/types/src/Address.ycp 2006-06-26 08:19:13.000000000 +0200
+++ new/yast2-2.13.74/library/types/src/Address.ycp 2006-08-09 16:28:05.000000000 +0200
@@ -5,7 +5,7 @@
* Authors: Michal Svec
* Flags: Stable
*
- * $Id: Address.ycp 31242 2006-06-01 12:59:16Z locilka $
+ * $Id: Address.ycp 32271 2006-08-09 13:03:53Z kmachalkova $
*
* Address is a hostname (either FQ or simple, or IP address)
*/
@@ -21,6 +21,7 @@
global string ValidChars = Hostname::ValidChars+IP::ValidChars;
global string ValidChars4 = Hostname::ValidChars+IP::ValidChars4;
global string ValidChars6 = Hostname::ValidChars+IP::ValidChars6;
+global string ValidCharsMAC = "0123456789abcdefABCDEF:";
/**
* Return a description of a valid address (ip4 or name)
@@ -57,5 +58,30 @@
return Check4(address) || Check6(address);
}
+/**
+ * Describe a valid MAC address
+ * @return string description of a valid MAC address
+ */
+global define string ValidMAC() ``{
+ //describe valid MAC address
+ return _("A valid MAC address consists of six pairs of hexadecimal
+digits separated by colon.");
+}
+
+/**
+ * Check syntax of MAC address
+ * @param address MAC address
+ * @return true if correct
+ */
+global define boolean CheckMAC(string address) ``{
+ if (address == nil || address == "")
+ return false;
+
+ string regexp = "[0-9a-fA-F]{2,2}";
+ regexp = sformat ("(%1:){5,5}%1", regexp);
+
+ return regexpmatch(address, regexp);
+}
+
/* EOF */
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-2.13.72/library/types/src/IP.ycp new/yast2-2.13.74/library/types/src/IP.ycp
--- old/yast2-2.13.72/library/types/src/IP.ycp 2006-06-26 08:19:13.000000000 +0200
+++ new/yast2-2.13.74/library/types/src/IP.ycp 2006-08-07 11:09:14.000000000 +0200
@@ -5,7 +5,7 @@
* Authors: Michal Svec
* Flags: Stable
*
- * $Id: IP.ycp 31242 2006-06-01 12:59:16Z locilka $
+ * $Id: IP.ycp 32181 2006-08-07 09:10:47Z locilka $
*/
{
@@ -151,5 +151,87 @@
return ToString((i | ~m) & 0xffffffff);
}
+// helper list, each bit has its decimal representation
+list <integer> bit_weight_row = [128, 64, 32, 16, 8, 4, 2, 1];
+
+/**
+ * Converts IPv4 into its 32 bit binary representation.
+ *
+ * @param string ipv4
+ * @return string binary
+ *
+ * @see BitsToIPv4()
+ *
+ * @example
+ * IPv4ToBits("80.25.135.2") -> "01010000000110011000011100000010"
+ * IPv4ToBits("172.24.233.211") -> "10101100000110001110100111010011"
+ */
+global string IPv4ToBits (string ipv4) {
+ if (!Check4(ipv4)) {
+ y2error("Not a valid IPv4: %1", ipv4);
+ return nil;
+ }
+
+ string ret = "";
+ foreach (string ipv4_part, splitstring(ipv4, "."), {
+ integer ipv4_part_i = tointeger(ipv4_part);
+ foreach (integer try_i, bit_weight_row, {
+ if ((ipv4_part_i / try_i) > 0) {
+ ipv4_part_i = ipv4_part_i % try_i;
+ ret = ret + "1";
+ } else {
+ ret = ret + "0";
+ }
+ });
+ });
+
+ return ret;
+}
+
+/**
+ * Converts 32 bit binary number to its IPv4 repserentation.
+ *
+ * @param string binary
+ * @return string ipv4
+ *
+ * @see IPv4ToBits()
+ *
+ * @example
+ * BitsToIPv4("10111100000110001110001100000101") -> "188.24.227.5"
+ * BitsToIPv4("00110101000110001110001001100101") -> "53.24.226.101"
+ */
+global string BitsToIPv4 (string bits) {
+ if (size(bits) != 32) {
+ y2error("Not a valid IPv4 in Bits: %1", bits);
+ return nil;
+ }
+ if (!regexpmatch(bits, "^[01]+$")) {
+ y2error("Not a valid IPv4 in Bits: %1", bits);
+ return nil;
+ }
+
+ string ipv4 = "";
+ integer position = 0;
+ while (position < 32) {
+ integer ip_part = 0;
+ string eight_bits = substring (bits, position, 8);
+
+ integer counter = -1;
+ while (counter < 8) {
+ counter = counter + 1;
+ string one_bit = substring (eight_bits, counter, 1);
+
+ if (one_bit == "1") {
+ ip_part = ip_part + bit_weight_row[counter]:0;
+ }
+ };
+
+ ipv4 = ipv4 + (ipv4 != "" ? ".":"") + tostring(ip_part);
+ position = position + 8;
+ }
+
+ return ipv4;
+}
+
/* EOF */
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...