Hello community,
here is the log from the commit of package yast2-pam for openSUSE:Factory checked in at 2013-08-01 11:09:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-pam (Old)
and /work/SRC/openSUSE:Factory/.yast2-pam.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-pam"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-pam/yast2-pam.changes 2013-02-07 11:00:52.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-pam.new/yast2-pam.changes 2013-08-01 11:09:23.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Jul 31 08:36:33 UTC 2013 - yast-devel@opensuse.org
+
+- converted from YCP to Ruby by YCP Killer
+ (https://github.com/yast/ycp-killer)
+- version 3.0.0
+
+-------------------------------------------------------------------
Old:
----
yast2-pam-2.23.1.tar.bz2
New:
----
yast2-pam-3.0.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pam.spec ++++++
--- /var/tmp/diff_new_pack.bGHqr4/_old 2013-08-01 11:09:23.000000000 +0200
+++ /var/tmp/diff_new_pack.bGHqr4/_new 2013-08-01 11:09:23.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-pam
-Version: 2.23.1
+Version: 3.0.0
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -40,6 +40,8 @@
BuildArch: noarch
+Requires: yast2-ruby-bindings >= 1.0.0
+
Summary: YaST2 - PAM Agent
License: GPL-2.0
Group: System/YaST
++++++ yast2-pam-2.23.1.tar.bz2 -> yast2-pam-3.0.0.tar.bz2 ++++++
++++ 1669 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pam-2.23.1/Makefile.am new/yast2-pam-3.0.0/Makefile.am
--- old/yast2-pam-2.23.1/Makefile.am 2013-02-06 11:26:42.000000000 +0100
+++ new/yast2-pam-3.0.0/Makefile.am 2013-07-31 10:46:00.000000000 +0200
@@ -158,19 +158,14 @@
TAGVERSION = $(Y2TOOL) tagversion
-check-up-to-date check-cvs-up-to-date check-svn-up-to-date:
- if [ -d $(srcdir)/CVS ]; then \
- cd $(srcdir) && ! cvs -q -n up 2>/dev/null | grep '^[MCAR] ';\
- else \
- cd $(srcdir) && ! LC_ALL=C svn status --show-updates --quiet | grep -v '^Status against revision' ;\
+# check if there is no modified files and all commits were pushed
+check-up-to-date:
+ if [ `git status --short --branch | sed '/##[^[]*$/d;/^??/d' | wc -l` -gt 0 ]; then \
+ (echo "ERROR: Source is not commited and pushed. See `git status`"; false) \
fi
check-tagversion:
- @if [ -d $(srcdir)/CVS ]; then \
- cd $(srcdir) && cvs status -v VERSION | grep -w `$(TAGVERSION) -n` ;\
- else \
- cd $(srcdir) && svn cat `$(TAGVERSION) --echourl`/VERSION; \
- fi >/dev/null; \
+ cd $(srcdir) && $(TAGVERSION) --check >/dev/null; \
[ $$? = 0 ] || ( echo "ERROR: Please run 'tagversion' first"; false )
check-parse-old:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pam-2.23.1/Makefile.am.common new/yast2-pam-3.0.0/Makefile.am.common
--- old/yast2-pam-2.23.1/Makefile.am.common 2013-02-06 11:26:42.000000000 +0100
+++ new/yast2-pam-3.0.0/Makefile.am.common 2013-07-31 10:46:00.000000000 +0200
@@ -31,7 +31,7 @@
CHECK_SYNTAX = true
check-syntax: $(client_DATA) $(ycpchook) $(ybcfiles)
- @if test "$(client_DATA)"; then \
+ @if test "$(filter %.ycp,client_DATA)"; then \
if $(CHECK_SYNTAX); then \
TO_CHECK="$(filter %.ycp,$^)"; \
echo "Checking syntax of $${TO_CHECK}"; \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pam-2.23.1/VERSION new/yast2-pam-3.0.0/VERSION
--- old/yast2-pam-2.23.1/VERSION 2013-02-06 11:26:35.000000000 +0100
+++ new/yast2-pam-3.0.0/VERSION 2013-07-30 13:38:46.000000000 +0200
@@ -1 +1 @@
-2.23.1
+3.0.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pam-2.23.1/autodocs-ycp.ami new/yast2-pam-3.0.0/autodocs-ycp.ami
--- old/yast2-pam-2.23.1/autodocs-ycp.ami 2013-02-06 11:26:42.000000000 +0100
+++ new/yast2-pam-3.0.0/autodocs-ycp.ami 2013-07-31 10:46:00.000000000 +0200
@@ -8,6 +8,8 @@
# Optional - the default is $(srcdir)/../../src/*.ycp
# AUTODOCS_PM: Files that the perl autodocs is built from
# Optional - the default is $(srcdir)/../../src/*.pm
+# AUTODOCS_RB: Files that the ruby autodocs is built from (using yard)
+# Optional - the default is $(srcdir)/../../src/modules/*.rb) $(srcdir)/../../src/include/*/*.rb
# AUTODOCS_SUBDIR: To install the result to $(docdir)/SUBDIR/autodocs
# Optional - the default is no subdir, $(docdir)/autodocs
# AUTODOCS_STRIP: Strip it from filenames. The remaining / are replaced by __
@@ -15,18 +17,31 @@
htmldir = $(docdir)/$(AUTODOCS_SUBDIR)/autodocs
-html_DATA = index.html $(filter-out index.html, $(wildcard *.html))
-CLEANFILES = $(html_DATA) pod2htm*.tmp
+# use nobase_ prefix to keep the directory structure
+nobase_html_DATA = index.html $(filter-out index.html, $(wildcard *.html)) $(wildcard js/*) $(wildcard css/*) $(wildcard Yast/*)
+CLEANFILES = $(nobase_html_DATA) pod2htm*.tmp
AUTODOCS_YCP ?= $(wildcard $(srcdir)/../../src/*.ycp)
AUTODOCS_PM ?= $(wildcard $(srcdir)/../../src/*.pm)
+AUTODOCS_RB ?= $(wildcard $(srcdir)/../../src/modules/*.rb $(srcdir)/../../src/include/*/*.rb)
AUTODOCS_STRIP ?= $(srcdir)/../../src
-index.html: $(AUTODOCS_YCP) $(AUTODOCS_PM)
+# yard specific options
+YARD ?= yard
+# use markdown format by default
+YARD_OPTIONS ?= -o . -m markdown
+
+# yard specific clean
+clean-local:
+ rm -rf js css Yast .yardoc
+
+
+index.html: $(AUTODOCS_YCP) $(AUTODOCS_PM) $(AUTODOCS_RB)
#including *.pm, for the index
- ${YCPDOC} -d. -s$(AUTODOCS_STRIP) $(AUTODOCS_YCP)
+ if [ -n "$(AUTODOCS_YCP)" ]; then ${YCPDOC} -d. -s$(AUTODOCS_STRIP) $(AUTODOCS_YCP); fi
for i in $(AUTODOCS_PM); do \
b=$${i##$(AUTODOCS_STRIP)}; b=$${b#/}; b=$${b//\//__}; b=$${b%.pm}; \
pod2html --title=$$b --infile=$$i --outfile=$$b.html; \
echo "<a href='$$b.html'>$${b/__/::}</a>" > $$b.mod.html; \
done
+ if [ -n "$(AUTODOCS_RB)" ]; then $(YARD) doc --title "@RPMNAME@ -- Development Documentation" $(YARD_OPTIONS) $(AUTODOCS_RB); fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pam-2.23.1/configure.ac new/yast2-pam-3.0.0/configure.ac
--- old/yast2-pam-2.23.1/configure.ac 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pam-3.0.0/configure.ac 2013-07-31 10:46:00.000000000 +0200
@@ -0,0 +1,160 @@
+dnl configure.ac for yast2-pam
+dnl
+dnl -- This file is generated by y2autoconf 2.24.7 - DO NOT EDIT! --
+dnl (edit configure.ac.in or configure.in.in instead)
+
+AC_INIT(yast2-pam, 3.0.0, http://bugs.opensuse.org/, yast2-pam)
+dnl Check for presence of file 'RPMNAME'
+AC_CONFIG_SRCDIR([RPMNAME])
+
+dnl Checking host/target/build systems, for make, install etc.
+AC_CANONICAL_TARGET
+dnl Perform program name transformation
+AC_ARG_PROGRAM
+
+AC_PREFIX_DEFAULT(/usr)
+
+dnl long filenames; we use GNU Make extensions and that's ok
+AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
+
+dnl Important YaST2 variables
+VERSION="3.0.0"
+RPMNAME="yast2-pam"
+MAINTAINER="Jiri Suchomel "
+
+dnl pkgconfig honors lib64
+pkgconfigdir=\${libdir}/pkgconfig
+pkgconfigdatadir=\${datadir}/pkgconfig
+yast2dir=\${prefix}/share/YaST2
+
+ybindir=\${prefix}/lib/YaST2/bin
+# FIXME duplicates execcompdir
+ystartupdir=\${prefix}/lib/YaST2
+plugindir=\${libdir}/YaST2/plugin
+includedir=\${prefix}/include/YaST2
+potdir=\${docdir}/pot
+
+docdir=\${prefix}/share/doc/packages/$RPMNAME
+mandir=\${prefix}/share/man
+
+execcompdir=\${prefix}/lib/YaST2
+agentdir=${execcompdir}/servers_non_y2
+
+ydatadir=${yast2dir}/data
+imagedir=${yast2dir}/images
+themedir=${yast2dir}/theme
+localedir=${yast2dir}/locale
+clientdir=${yast2dir}/clients
+moduledir=${yast2dir}/modules
+yncludedir=${yast2dir}/include
+schemadir=${yast2dir}/schema
+scrconfdir=${yast2dir}/scrconf
+desktopdir=\${prefix}/share/applications/YaST2
+
+AC_SUBST(VERSION)
+AC_SUBST(RPMNAME)
+AC_SUBST(MAINTAINER)
+
+AC_SUBST(pkgconfigdir)
+AC_SUBST(pkgconfigdatadir)
+
+AC_SUBST(yast2dir)
+
+AC_SUBST(ybindir)
+AC_SUBST(ystartupdir)
+AC_SUBST(plugindir)
+AC_SUBST(includedir)
+AC_SUBST(potdir)
+AC_SUBST(execcompdir)
+
+AC_SUBST(docdir)
+AC_SUBST(mandir)
+
+AC_SUBST(ydatadir)
+AC_SUBST(imagedir)
+AC_SUBST(themedir)
+AC_SUBST(localedir)
+AC_SUBST(clientdir)
+AC_SUBST(moduledir)
+AC_SUBST(yncludedir)
+AC_SUBST(schemadir)
+AC_SUBST(scrconfdir)
+AC_SUBST(agentdir)
+AC_SUBST(desktopdir)
+
+fillupdir_d="/var/adm/fillup-templates"
+AC_ARG_WITH(fillupdir,
+ AS_HELP_STRING([--with-fillupdir=DIR],
+ [where to place fillup templates (default $fillupdir_d.]),
+ [ fillupdir="$withval" ],
+ [ fillupdir="$fillupdir_d" ])
+AC_SUBST(fillupdir)
+
+
+
+dnl Checks for programs.
+AC_PROG_INSTALL
+dnl The YCP interpreter checks whether dependent ybc files are older
+dnl so we must preserve their timestamps
+INSTALL="${INSTALL} -p"
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+
+dnl pkgconfig
+AC_ARG_VAR([PKG_CONFIG_PATH], [where to search for pkg-config files])
+dnl devtools
+dnl ...
+
+dnl no need for AC_ARG_VAR
+AC_PATH_PROG(XGETTEXT, xgettext)
+if test -z "$XGETTEXT" ; then
+ AC_MSG_ERROR(xgettext is missing; please install gettext-tools.)
+fi
+
+Y2DEVTOOLS_PREFIX=`pkg-config --print-errors --variable=prefix yast2-devtools`
+AC_SUBST(Y2DEVTOOLS_PREFIX)
+devtools_ybindir=`pkg-config --print-errors --variable=ybindir yast2-devtools`
+devtools_yast2dir=`pkg-config --print-errors --variable=yast2dir yast2-devtools`
+
+dnl producing pkg-config for others?
+AM_CONDITIONAL(CREATE_PKGCONFIG, test "x${CREATE_PKGCONFIG}" != x)
+AM_CONDITIONAL(CREATE_PKGCONFIG_NOARCH, test "x${CREATE_PKGCONFIG}" = xnoarch)
+
+dbdir=${devtools_yast2dir}/data/docbook
+STYLESHEET_HTML=${dbdir}/stylesheets/customize-html.xsl
+STYLESHEET_PDF=${dbdir}/stylesheets/customize-fo.xsl
+STYLESHEET_CSS=${dbdir}/css/yast2docs.css
+STYLESHEET_YDOC=${dbdir}/stylesheets/ydoc.xsl
+STYLESHEET_YCPDOC=${dbdir}/stylesheets/ycpdoc.xsl
+AC_SUBST(STYLESHEET_HTML)
+AC_SUBST(STYLESHEET_PDF)
+AC_SUBST(STYLESHEET_CSS)
+AC_SUBST(STYLESHEET_YDOC)
+AC_SUBST(STYLESHEET_YCPDOC)
+
+
+AC_PATH_PROG(YCPDOC, ycpdoc, false, $PATH:$devtools_ybindir)
+if test "$YCPDOC" = "false"; then
+ AC_MSG_ERROR([ycpdoc is not installed])
+fi
+AC_PATH_PROG(YCPMAKEDEP, ycpmakedep, false, $PATH:$devtools_ybindir)
+if test "$YCPMAKEDEP" = "false"; then
+ AC_MSG_ERROR([ycpmakedep is not installed])
+fi
+AC_PATH_PROG(YCPC, ycpc, false, $PATH:$bindir)
+if test "$YCPC" = "false"; then
+ AC_MSG_ERROR([ycpc is not installed])
+fi
+AC_CHECK_FILE($devtools_yast2dir/data/testsuite/Makefile.testsuite, [], [
+ AC_MSG_WARN([yast2-testsuite.rpm is not installed])
+])
+
+
+AC_CONFIG_FILES(Makefile agent-passwd/Makefile
+agents/Makefile
+doc/autodocs/Makefile
+doc/Makefile
+src/Makefile
+testsuite/Makefile)
+AC_OUTPUT
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pam-2.23.1/configure.in new/yast2-pam-3.0.0/configure.in
--- old/yast2-pam-2.23.1/configure.in 2013-02-06 11:26:42.000000000 +0100
+++ new/yast2-pam-3.0.0/configure.in 1970-01-01 01:00:00.000000000 +0100
@@ -1,160 +0,0 @@
-dnl configure.in for yast2-pam
-dnl
-dnl -- This file is generated by y2autoconf 2.23.2 - DO NOT EDIT! --
-dnl (edit configure.in.in instead)
-
-AC_INIT(yast2-pam, 2.23.1, http://bugs.opensuse.org/, yast2-pam)
-dnl Check for presence of file 'RPMNAME'
-AC_CONFIG_SRCDIR([RPMNAME])
-
-dnl Checking host/target/build systems, for make, install etc.
-AC_CANONICAL_TARGET
-dnl Perform program name transformation
-AC_ARG_PROGRAM
-
-AC_PREFIX_DEFAULT(/usr)
-
-dnl long filenames; we use GNU Make extensions and that's ok
-AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
-
-dnl Important YaST2 variables
-VERSION="2.23.1"
-RPMNAME="yast2-pam"
-MAINTAINER="Jiri Suchomel "
-
-dnl pkgconfig honors lib64
-pkgconfigdir=\${libdir}/pkgconfig
-pkgconfigdatadir=\${datadir}/pkgconfig
-yast2dir=\${prefix}/share/YaST2
-
-ybindir=\${prefix}/lib/YaST2/bin
-# FIXME duplicates execcompdir
-ystartupdir=\${prefix}/lib/YaST2
-plugindir=\${libdir}/YaST2/plugin
-includedir=\${prefix}/include/YaST2
-potdir=\${docdir}/pot
-
-docdir=\${prefix}/share/doc/packages/$RPMNAME
-mandir=\${prefix}/share/man
-
-execcompdir=\${prefix}/lib/YaST2
-agentdir=${execcompdir}/servers_non_y2
-
-ydatadir=${yast2dir}/data
-imagedir=${yast2dir}/images
-themedir=${yast2dir}/theme
-localedir=${yast2dir}/locale
-clientdir=${yast2dir}/clients
-moduledir=${yast2dir}/modules
-yncludedir=${yast2dir}/include
-schemadir=${yast2dir}/schema
-scrconfdir=${yast2dir}/scrconf
-desktopdir=\${prefix}/share/applications/YaST2
-
-AC_SUBST(VERSION)
-AC_SUBST(RPMNAME)
-AC_SUBST(MAINTAINER)
-
-AC_SUBST(pkgconfigdir)
-AC_SUBST(pkgconfigdatadir)
-
-AC_SUBST(yast2dir)
-
-AC_SUBST(ybindir)
-AC_SUBST(ystartupdir)
-AC_SUBST(plugindir)
-AC_SUBST(includedir)
-AC_SUBST(potdir)
-AC_SUBST(execcompdir)
-
-AC_SUBST(docdir)
-AC_SUBST(mandir)
-
-AC_SUBST(ydatadir)
-AC_SUBST(imagedir)
-AC_SUBST(themedir)
-AC_SUBST(localedir)
-AC_SUBST(clientdir)
-AC_SUBST(moduledir)
-AC_SUBST(yncludedir)
-AC_SUBST(schemadir)
-AC_SUBST(scrconfdir)
-AC_SUBST(agentdir)
-AC_SUBST(desktopdir)
-
-fillupdir_d="/var/adm/fillup-templates"
-AC_ARG_WITH(fillupdir,
- AS_HELP_STRING([--with-fillupdir=DIR],
- [where to place fillup templates (default $fillupdir_d.]),
- [ fillupdir="$withval" ],
- [ fillupdir="$fillupdir_d" ])
-AC_SUBST(fillupdir)
-
-
-
-dnl Checks for programs.
-AC_PROG_INSTALL
-dnl The YCP interpreter checks whether dependent ybc files are older
-dnl so we must preserve their timestamps
-INSTALL="${INSTALL} -p"
-AC_PROG_LN_S
-AC_PROG_MAKE_SET
-
-dnl pkgconfig
-AC_ARG_VAR([PKG_CONFIG_PATH], [where to search for pkg-config files])
-dnl devtools
-dnl ...
-
-dnl no need for AC_ARG_VAR
-AC_PATH_PROG(XGETTEXT, xgettext)
-if test -z "$XGETTEXT" ; then
- AC_MSG_ERROR(xgettext is missing; please install gettext-tools.)
-fi
-
-Y2DEVTOOLS_PREFIX=`pkg-config --print-errors --variable=prefix yast2-devtools`
-AC_SUBST(Y2DEVTOOLS_PREFIX)
-devtools_ybindir=`pkg-config --print-errors --variable=ybindir yast2-devtools`
-devtools_yast2dir=`pkg-config --print-errors --variable=yast2dir yast2-devtools`
-
-dnl producing pkg-config for others?
-AM_CONDITIONAL(CREATE_PKGCONFIG, test "x${CREATE_PKGCONFIG}" != x)
-AM_CONDITIONAL(CREATE_PKGCONFIG_NOARCH, test "x${CREATE_PKGCONFIG}" = xnoarch)
-
-dbdir=${devtools_yast2dir}/data/docbook
-STYLESHEET_HTML=${dbdir}/stylesheets/customize-html.xsl
-STYLESHEET_PDF=${dbdir}/stylesheets/customize-fo.xsl
-STYLESHEET_CSS=${dbdir}/css/yast2docs.css
-STYLESHEET_YDOC=${dbdir}/stylesheets/ydoc.xsl
-STYLESHEET_YCPDOC=${dbdir}/stylesheets/ycpdoc.xsl
-AC_SUBST(STYLESHEET_HTML)
-AC_SUBST(STYLESHEET_PDF)
-AC_SUBST(STYLESHEET_CSS)
-AC_SUBST(STYLESHEET_YDOC)
-AC_SUBST(STYLESHEET_YCPDOC)
-
-
-AC_PATH_PROG(YCPDOC, ycpdoc, false, $PATH:$devtools_ybindir)
-if test "$YCPDOC" = "false"; then
- AC_MSG_ERROR([ycpdoc is not installed])
-fi
-AC_PATH_PROG(YCPMAKEDEP, ycpmakedep, false, $PATH:$devtools_ybindir)
-if test "$YCPMAKEDEP" = "false"; then
- AC_MSG_ERROR([ycpmakedep is not installed])
-fi
-AC_PATH_PROG(YCPC, ycpc, false, $PATH:$bindir)
-if test "$YCPC" = "false"; then
- AC_MSG_ERROR([ycpc is not installed])
-fi
-AC_CHECK_FILE($devtools_yast2dir/data/testsuite/Makefile.testsuite, [], [
- AC_MSG_WARN([yast2-testsuite.rpm is not installed])
-])
-
-
-AC_CONFIG_FILES(Makefile agent-passwd/Makefile
-agents/Makefile
-doc/autodocs/Makefile
-doc/Makefile
-src/Makefile
-testsuite/Makefile)
-AC_OUTPUT
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pam-2.23.1/src/Autologin.ycp new/yast2-pam-3.0.0/src/Autologin.ycp
--- old/yast2-pam-2.23.1/src/Autologin.ycp 2013-01-22 11:46:43.000000000 +0100
+++ new/yast2-pam-3.0.0/src/Autologin.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,166 +0,0 @@
-/* ------------------------------------------------------------------------------
- * Copyright (c) 2006-2012 Novell, Inc. All Rights Reserved.
- *
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of version 2 of the GNU General Public License as published by the
- * Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, contact Novell, Inc.
- *
- * To contact Novell about this file by physical or electronic mail, you may find
- * current contact information at www.novell.com.
- * ------------------------------------------------------------------------------
- */
-
-/**
- * File: modules/Autologin.ycp
- * Package: yast2
- * Summary: Autologin read/write routines
- * Author: Jiri Suchomel
- * Flags: Stable
- *
- * $Id$
- */
-
-{
-
-module "Autologin";
-textdomain "pam";
-
-import "Package";
-import "Popup";
-
-/**
- * User to log in automaticaly
- */
-global string user = "";
-
-/**
- * Login without passwords?
- */
-global boolean pw_less = false;
-
-/**
- * Is autologin feature available?
- */
-global boolean available = true;
-
-/**
- * Is autogion used? Usualy true when user is not empty, but for the first
- * time (during installation), this can be true by default although user is ""
- * (depends on the control file)
- */
-global boolean used = false;
-
-/**
- * Autologin settings modified?
- */
-global boolean modified = false;
-
-/**
- * Read autologin settings
- * @return used?
- */
-global define boolean Read () {
-
- if (SCR::Read (.target.size, "/etc/sysconfig/displaymanager") == -1)
- {
- available = false;
- user = "";
- used = false;
- return false;
- }
-
- available = true;
- user = (string) SCR::Read (.sysconfig.displaymanager.DISPLAYMANAGER_AUTOLOGIN);
- pw_less = (string) SCR::Read (.sysconfig.displaymanager.DISPLAYMANAGER_PASSWORD_LESS_LOGIN) == "yes";
-
- if (user == nil || user == "")
- user = "";
-
- used = (user != "");
- return used;
-}
-
-
-/**
- * Write autologin settings
- * @param write_only when true, suseconfig script will not be run
- * @return written anything?
- */
-global define boolean Write (boolean write_only) {
-
- if (!available || !modified)
- return false;
-
- y2milestone ("writing user %1 for autologin; pw_less is %2", user, pw_less);
-
- SCR::Write (.sysconfig.displaymanager.DISPLAYMANAGER_AUTOLOGIN, user);
- SCR::Write (.sysconfig.displaymanager.DISPLAYMANAGER_PASSWORD_LESS_LOGIN,
- pw_less ? "yes" : "no" );
- SCR::Write(.sysconfig.displaymanager, nil);
-
- modified = false;
- return true;
-}
-
-/**
- * Disable autologin
- */
-global define void Disable () ``{
-
- user = "";
- pw_less = false;
- used = false;
- modified = true;
-}
-
-/**
- * Wrapper for setting the 'used' variable
- */
-global define void Use (boolean use) ``{
- if (used != use)
- {
- used = use;
- modified = true;
- }
-}
-
-/**
- * Disable autologin and write it (used probably for automatic
- * disabling without asking)
- * @param write_only when true, suseconfig script will not be run
- * @return written anything?
- */
-global define boolean DisableAndWrite (boolean write_only) ``{
-
- Disable ();
- return Write (write_only);
-}
-
-/**
- * Ask if autologin should be disabled (and disable it in such case)
- * @param new The reason for disabling autologin (e.g. new set of users)
- * @return Is autologin used?
- */
-global define boolean AskForDisabling (string new) ``{
-
- // popup text (%1 is user name, %2 is additional info,
- // like "Now LDAP was enabled")
- string question = sformat (_("The automatic login feature is enabled for user %1.
-%2
-Disable automatic login?"), user, new);
-
- if (used && Popup::YesNo (question))
- Disable ();
- return used;
-}
-
-/* EOF */
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pam-2.23.1/src/Makefile.am new/yast2-pam-3.0.0/src/Makefile.am
--- old/yast2-pam-2.23.1/src/Makefile.am 2013-02-06 11:26:35.000000000 +0100
+++ new/yast2-pam-3.0.0/src/Makefile.am 2013-07-30 13:38:46.000000000 +0200
@@ -1,10 +1,10 @@
-# Makefile.am for pam/src
+# Sources for pam
-module_DATA = \
- Pam.ycp \
- Autologin.ycp \
- Nsswitch.ycp
+module_DATA = \
+ modules/Pam.rb \
+ modules/Nsswitch.rb \
+ modules/Autologin.rb
EXTRA_DIST = $(module_DATA)
-include $(top_srcdir)/Makefile.am.common
+include $(top_srcdir)/Makefile.am.common
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pam-2.23.1/src/Nsswitch.ycp new/yast2-pam-3.0.0/src/Nsswitch.ycp
--- old/yast2-pam-2.23.1/src/Nsswitch.ycp 2013-01-22 11:46:43.000000000 +0100
+++ new/yast2-pam-3.0.0/src/Nsswitch.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,112 +0,0 @@
-/* ------------------------------------------------------------------------------
- * Copyright (c) 2006-2012 Novell, Inc. All Rights Reserved.
- *
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of version 2 of the GNU General Public License as published by the
- * Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, contact Novell, Inc.
- *
- * To contact Novell about this file by physical or electronic mail, you may find
- * current contact information at www.novell.com.
- * ------------------------------------------------------------------------------
- */
-
-/**
- * File: modules/Nsswitch.ycp
- * Module: yast2-pam
- * Summary: Configuration of /etc/nsswitch.conf
- * Authors: Jiri Suchomel
- * Flags: Stable
- *
- * $Id$
- */
-
-{
- module "Nsswitch";
-
- import "Message";
- import "Report";
-
- /**
- * Reads a database entry from nsswitch_conf and returns it as a list
- * @param db eg. "passwd"
- * @return eg. ["files", "nis"]
- */
- global define list<string> ReadDb (string db) ``{
- string db_s = (string) SCR::Read (add (.etc.nsswitch_conf, db));
- if (db_s == nil)
- {
- db_s = "";
- }
- return filter (string s, splitstring (db_s, " \t"), ``(s != ""));
- }
-
-
- /**
- * Writes a database entry as a list to nsswitch_conf
- * @param db eg. "passwd"
- * @param entries eg. ["files", "nis"]
- * @return success?
- */
- global define boolean WriteDb (string db, list<string> entries) ``{
- // if there are no entries, delete the key using nil
- string entry = mergestring (entries, " ");
- return SCR::Write (add (.etc.nsswitch_conf, db),
- entry == ""? nil: entry);
- }
- /**
- * Configures the name service switch for autofs
- * according to chosen settings
- * @param start autofs and service (ldap/nis) should be started
- * @param source for automounter data (ldap/nis)
- * @return success?
- */
- global define boolean WriteAutofs (boolean start, string source) ``{
-
- boolean ok = true;
-
- // nsswitch automount:
- // bracket options not allowed, order does not matter
- list<string> automount_l = ReadDb ("automount");
- boolean enabled = contains (automount_l, source);
- // enable it if it is not enabled yet and both services run
- if (start && !enabled)
- {
- automount_l = add (automount_l, source);
- ok = WriteDb ("automount", automount_l);
- ok = ok && SCR::Write (.etc.nsswitch_conf, nil);
- }
- // disable it if it is enabled and either service does not run
- else if (!start && enabled)
- {
- automount_l = filter (string s, automount_l, ``(s != source));
- ok = WriteDb ("automount", automount_l);
- ok = ok && SCR::Write (.etc.nsswitch_conf, nil);
- }
-
- if (!ok)
- {
- Report::Error (Message::ErrorWritingFile ("/etc/nsswitch.conf"));
- }
- return ok;
- }
-
- /**
- * Writes the edited files to the disk
- * @return true on success
- */
- global define boolean Write () {
-
- return SCR::Write (.etc.nsswitch_conf, nil);
- }
-
- // TODO Nis.ycp has also WriteNssUsers, but it uses WritePluses function
- // for adapting /etc/passwd...
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pam-2.23.1/src/Pam.ycp new/yast2-pam-3.0.0/src/Pam.ycp
--- old/yast2-pam-2.23.1/src/Pam.ycp 2013-01-22 11:46:43.000000000 +0100
+++ new/yast2-pam-3.0.0/src/Pam.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,111 +0,0 @@
-/* ------------------------------------------------------------------------------
- * Copyright (c) 2006-2012 Novell, Inc. All Rights Reserved.
- *
- *
- * This program is free software; you can redistribute it and/or modify it under
- * the terms of version 2 of the GNU General Public License as published by the
- * Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, contact Novell, Inc.
- *
- * To contact Novell about this file by physical or electronic mail, you may find
- * current contact information at www.novell.com.
- * ------------------------------------------------------------------------------
- */
-
-/**
- * File: modules/Pam.ycp
- * Package: yast2-pam
- * Summary: YaST intrerface for /etc/pam.d/* files
- * Authors: Jiri Suchomel
- * Flags: Unstable
- *
- * $Id$
- *
- */
-
-{
-
-module "Pam";
-
-/**
- * Query PAM configuration for status of given module
- * @param string PAM module (e.g. ldap, cracklib)
- * @return map keys are 'management groups' (e.g. auth), values
- * are lists of options
- */
-global map Query (string mod) {
-
- map ret = $[];
- map out = (map)SCR::Execute (.target.bash_output, "/usr/sbin/pam-config -q --" + mod);
- if (out["exit"]:0 != 0)
- {
- y2warning ("pam-config for %1 returned %2", mod, out);
- return ret;
- }
- foreach (string line, splitstring (out["stdout"]:"", "\n"), {
- list l = splitstring (line, ":");
- if (line == "" || size (l) < 2) return;
- string key = l[0]:"";
- ret[key] =
- filter (string o, splitstring (l[1]:"", " \t"), ``(o != ""));
- });
- return ret;
-}
-
-/**
- * Ask if given PAM module is enabled
- */
-global boolean Enabled (string mod) {
-
- return size (Query(mod)) > 0;
-}
-
-/**
- * Add options or new PAM module
- * @param string PAM module or option
- * @return success
- */
-global boolean Add (string mod) {
-
- map out = (map)SCR::Execute (.target.bash_output, "/usr/sbin/pam-config -a --" + mod);
- if (out["exit"]:0 != 0)
- {
- y2warning ("pam-config for %1 returned %2", mod, out);
- return false;
- }
- return true;
-}
-
-/**
- * Remove options or PAM module
- * @param string PAM module or option
- * @return success
- */
-global boolean Remove (string mod) {
-
- map out = (map)SCR::Execute (.target.bash_output, "/usr/sbin/pam-config -d --" + mod);
- if (out["exit"]:0 != 0)
- {
- y2warning ("pam-config for %1 returned %2", mod, out);
- return false;
- }
- return true;
-}
-
-/**
- * Add/Remove option or PAM module
- * @param string PAM module or option
- * @param boolean true for adding, false for removing
- * @return success
- */
-global boolean Set (string mod, boolean set) {
- return set ? Add (mod) : Remove (mod);
-}
-
-}//EOF
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pam-2.23.1/src/modules/Autologin.rb new/yast2-pam-3.0.0/src/modules/Autologin.rb
--- old/yast2-pam-2.23.1/src/modules/Autologin.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pam-3.0.0/src/modules/Autologin.rb 2013-07-30 13:38:46.000000000 +0200
@@ -0,0 +1,174 @@
+# encoding: utf-8
+
+# ------------------------------------------------------------------------------
+# Copyright (c) 2006-2012 Novell, Inc. All Rights Reserved.
+#
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of version 2 of the GNU General Public License as published by the
+# Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, contact Novell, Inc.
+#
+# To contact Novell about this file by physical or electronic mail, you may find
+# current contact information at www.novell.com.
+# ------------------------------------------------------------------------------
+
+# File: modules/Autologin.ycp
+# Package: yast2
+# Summary: Autologin read/write routines
+# Author: Jiri Suchomel
+# Flags: Stable
+#
+# $Id$
+require "yast"
+
+module Yast
+ class AutologinClass < Module
+ def main
+ textdomain "pam"
+
+ Yast.import "Package"
+ Yast.import "Popup"
+
+ # User to log in automaticaly
+ @user = ""
+
+ # Login without passwords?
+ @pw_less = false
+
+ # Is autologin feature available?
+ @available = true
+
+ # Is autogion used? Usualy true when user is not empty, but for the first
+ # time (during installation), this can be true by default although user is ""
+ # (depends on the control file)
+ @used = false
+
+ # Autologin settings modified?
+ @modified = false
+ end
+
+ # Read autologin settings
+ # @return used?
+ def Read
+ if SCR.Read(path(".target.size"), "/etc/sysconfig/displaymanager") == -1
+ @available = false
+ @user = ""
+ @used = false
+ return false
+ end
+
+ @available = true
+ @user = Convert.to_string(
+ SCR.Read(path(".sysconfig.displaymanager.DISPLAYMANAGER_AUTOLOGIN"))
+ )
+ @pw_less = Convert.to_string(
+ SCR.Read(
+ path(".sysconfig.displaymanager.DISPLAYMANAGER_PASSWORD_LESS_LOGIN")
+ )
+ ) == "yes"
+
+ @user = "" if @user == nil || @user == ""
+
+ @used = @user != ""
+ @used
+ end
+
+
+ # Write autologin settings
+ # @param [Boolean] write_only when true, suseconfig script will not be run
+ # @return written anything?
+ def Write(write_only)
+ return false if !@available || !@modified
+
+ Builtins.y2milestone(
+ "writing user %1 for autologin; pw_less is %2",
+ @user,
+ @pw_less
+ )
+
+ SCR.Write(
+ path(".sysconfig.displaymanager.DISPLAYMANAGER_AUTOLOGIN"),
+ @user
+ )
+ SCR.Write(
+ path(".sysconfig.displaymanager.DISPLAYMANAGER_PASSWORD_LESS_LOGIN"),
+ @pw_less ? "yes" : "no"
+ )
+ SCR.Write(path(".sysconfig.displaymanager"), nil)
+
+ @modified = false
+ true
+ end
+
+ # Disable autologin
+ def Disable
+ @user = ""
+ @pw_less = false
+ @used = false
+ @modified = true
+
+ nil
+ end
+
+ # Wrapper for setting the 'used' variable
+ def Use(use)
+ if @used != use
+ @used = use
+ @modified = true
+ end
+
+ nil
+ end
+
+ # Disable autologin and write it (used probably for automatic
+ # disabling without asking)
+ # @param [Boolean] write_only when true, suseconfig script will not be run
+ # @return written anything?
+ def DisableAndWrite(write_only)
+ Disable()
+ Write(write_only)
+ end
+
+ # Ask if autologin should be disabled (and disable it in such case)
+ # @param [String] new The reason for disabling autologin (e.g. new set of users)
+ # @return Is autologin used?
+ def AskForDisabling(new)
+ # popup text (%1 is user name, %2 is additional info,
+ # like "Now LDAP was enabled")
+ question = Builtins.sformat(
+ _(
+ "The automatic login feature is enabled for user %1.\n" +
+ "%2\n" +
+ "Disable automatic login?"
+ ),
+ @user,
+ new
+ )
+
+ Disable() if @used && Popup.YesNo(question)
+ @used
+ end
+
+ publish :variable => :user, :type => "string"
+ publish :variable => :pw_less, :type => "boolean"
+ publish :variable => :available, :type => "boolean"
+ publish :variable => :used, :type => "boolean"
+ publish :variable => :modified, :type => "boolean"
+ publish :function => :Read, :type => "boolean ()"
+ publish :function => :Write, :type => "boolean (boolean)"
+ publish :function => :Disable, :type => "void ()"
+ publish :function => :Use, :type => "void (boolean)"
+ publish :function => :DisableAndWrite, :type => "boolean (boolean)"
+ publish :function => :AskForDisabling, :type => "boolean (string)"
+ end
+
+ Autologin = AutologinClass.new
+ Autologin.main
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pam-2.23.1/src/modules/Nsswitch.rb new/yast2-pam-3.0.0/src/modules/Nsswitch.rb
--- old/yast2-pam-2.23.1/src/modules/Nsswitch.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pam-3.0.0/src/modules/Nsswitch.rb 2013-07-30 13:38:46.000000000 +0200
@@ -0,0 +1,106 @@
+# encoding: utf-8
+
+# ------------------------------------------------------------------------------
+# Copyright (c) 2006-2012 Novell, Inc. All Rights Reserved.
+#
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of version 2 of the GNU General Public License as published by the
+# Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, contact Novell, Inc.
+#
+# To contact Novell about this file by physical or electronic mail, you may find
+# current contact information at www.novell.com.
+# ------------------------------------------------------------------------------
+
+# File: modules/Nsswitch.ycp
+# Module: yast2-pam
+# Summary: Configuration of /etc/nsswitch.conf
+# Authors: Jiri Suchomel
+# Flags: Stable
+#
+# $Id$
+require "yast"
+
+module Yast
+ class NsswitchClass < Module
+ def main
+
+ Yast.import "Message"
+ Yast.import "Report"
+ end
+
+ # Reads a database entry from nsswitch_conf and returns it as a list
+ # @param [String] db eg. "passwd"
+ # @return eg. ["files", "nis"]
+ def ReadDb(db)
+ db_s = Convert.to_string(
+ SCR.Read(Builtins.add(path(".etc.nsswitch_conf"), db))
+ )
+ db_s = "" if db_s == nil
+ Builtins.filter(Builtins.splitstring(db_s, " \t")) { |s| s != "" }
+ end
+
+
+ # Writes a database entry as a list to nsswitch_conf
+ # @param [String] db eg. "passwd"
+ # @param [Array<String>] entries eg. ["files", "nis"]
+ # @return success?
+ def WriteDb(db, entries)
+ entries = deep_copy(entries)
+ # if there are no entries, delete the key using nil
+ entry = Builtins.mergestring(entries, " ")
+ SCR.Write(
+ Builtins.add(path(".etc.nsswitch_conf"), db),
+ entry == "" ? nil : entry
+ )
+ end
+ # Configures the name service switch for autofs
+ # according to chosen settings
+ # @param [Boolean] start autofs and service (ldap/nis) should be started
+ # @param [String] source for automounter data (ldap/nis)
+ # @return success?
+ def WriteAutofs(start, source)
+ ok = true
+
+ # nsswitch automount:
+ # bracket options not allowed, order does not matter
+ automount_l = ReadDb("automount")
+ enabled = Builtins.contains(automount_l, source)
+ # enable it if it is not enabled yet and both services run
+ if start && !enabled
+ automount_l = Builtins.add(automount_l, source)
+ ok = WriteDb("automount", automount_l)
+ ok = ok && SCR.Write(path(".etc.nsswitch_conf"), nil)
+ # disable it if it is enabled and either service does not run
+ elsif !start && enabled
+ automount_l = Builtins.filter(automount_l) { |s| s != source }
+ ok = WriteDb("automount", automount_l)
+ ok = ok && SCR.Write(path(".etc.nsswitch_conf"), nil)
+ end
+
+ Report.Error(Message.ErrorWritingFile("/etc/nsswitch.conf")) if !ok
+ ok
+ end
+
+ # Writes the edited files to the disk
+ # @return true on success
+ def Write
+ SCR.Write(path(".etc.nsswitch_conf"), nil)
+ end
+
+ publish :function => :ReadDb, :type => "list <string> (string)"
+ publish :function => :WriteDb, :type => "boolean (string, list <string>)"
+ publish :function => :WriteAutofs, :type => "boolean (boolean, string)"
+ publish :function => :Write, :type => "boolean ()"
+ end
+
+ Nsswitch = NsswitchClass.new
+ Nsswitch.main
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pam-2.23.1/src/modules/Pam.rb new/yast2-pam-3.0.0/src/modules/Pam.rb
--- old/yast2-pam-2.23.1/src/modules/Pam.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pam-3.0.0/src/modules/Pam.rb 2013-07-30 13:38:46.000000000 +0200
@@ -0,0 +1,127 @@
+# encoding: utf-8
+
+# ------------------------------------------------------------------------------
+# Copyright (c) 2006-2012 Novell, Inc. All Rights Reserved.
+#
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of version 2 of the GNU General Public License as published by the
+# Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, contact Novell, Inc.
+#
+# To contact Novell about this file by physical or electronic mail, you may find
+# current contact information at www.novell.com.
+# ------------------------------------------------------------------------------
+
+# File: modules/Pam.ycp
+# Package: yast2-pam
+# Summary: YaST intrerface for /etc/pam.d/* files
+# Authors: Jiri Suchomel
+# Flags: Unstable
+#
+# $Id$
+#
+require "yast"
+
+module Yast
+ class PamClass < Module
+ def main
+
+ end
+
+ # Query PAM configuration for status of given module
+ # @param string PAM module (e.g. ldap, cracklib)
+ # @return [Hash{String => Array}] keys are 'management groups' (e.g. auth), values
+ # are lists of options
+ def Query(mod)
+ ret = {}
+ out = Convert.to_map(
+ SCR.Execute(
+ path(".target.bash_output"),
+ Ops.add("/usr/sbin/pam-config -q --", mod)
+ )
+ )
+ if Ops.get_integer(out, "exit", 0) != 0
+ Builtins.y2warning("pam-config for %1 returned %2", mod, out)
+ return deep_copy(ret)
+ end
+ Builtins.foreach(
+ Builtins.splitstring(Ops.get_string(out, "stdout", ""), "\n")
+ ) do |line|
+ l = Builtins.splitstring(line, ":")
+ next if line == "" || Ops.less_than(Builtins.size(l), 2)
+ key = Ops.get_string(l, 0, "")
+ Ops.set(
+ ret,
+ key,
+ Builtins.filter(Builtins.splitstring(Ops.get_string(l, 1, ""), " \t")) do |o|
+ o != ""
+ end
+ )
+ end
+ deep_copy(ret)
+ end
+
+ # Ask if given PAM module is enabled
+ def Enabled(mod)
+ Ops.greater_than(Builtins.size(Query(mod)), 0)
+ end
+
+ # Add options or new PAM module
+ # @param string PAM module or option
+ # @return success
+ def Add(mod)
+ out = Convert.to_map(
+ SCR.Execute(
+ path(".target.bash_output"),
+ Ops.add("/usr/sbin/pam-config -a --", mod)
+ )
+ )
+ if Ops.get_integer(out, "exit", 0) != 0
+ Builtins.y2warning("pam-config for %1 returned %2", mod, out)
+ return false
+ end
+ true
+ end
+
+ # Remove options or PAM module
+ # @param string PAM module or option
+ # @return success
+ def Remove(mod)
+ out = Convert.to_map(
+ SCR.Execute(
+ path(".target.bash_output"),
+ Ops.add("/usr/sbin/pam-config -d --", mod)
+ )
+ )
+ if Ops.get_integer(out, "exit", 0) != 0
+ Builtins.y2warning("pam-config for %1 returned %2", mod, out)
+ return false
+ end
+ true
+ end
+
+ # Add/Remove option or PAM module
+ # @param string PAM module or option
+ # @param boolean true for adding, false for removing
+ # @return success
+ def Set(mod, set)
+ set ? Add(mod) : Remove(mod)
+ end
+
+ publish :function => :Query, :type => "map (string)"
+ publish :function => :Enabled, :type => "boolean (string)"
+ publish :function => :Add, :type => "boolean (string)"
+ publish :function => :Remove, :type => "boolean (string)"
+ publish :function => :Set, :type => "boolean (string, boolean)"
+ end
+
+ Pam = PamClass.new
+ Pam.main
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-pam-2.23.1/testsuite/Makefile.am new/yast2-pam-3.0.0/testsuite/Makefile.am
--- old/yast2-pam-2.23.1/testsuite/Makefile.am 2013-01-22 11:46:43.000000000 +0100
+++ new/yast2-pam-3.0.0/testsuite/Makefile.am 2013-07-30 13:38:46.000000000 +0200
@@ -5,7 +5,7 @@
#
AUTOMAKE_OPTIONS = dejagnu
-EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.ycp) $(wildcard tests/*.yh)
+EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.rb)
testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org