Skip to content

Commit

Permalink
Merge branch 'SLE-12-GA' into openSUSE-13_2
Browse files Browse the repository at this point in the history
Conflicts:
	Rakefile
	package/yast2-core.spec
  • Loading branch information
mvidner committed Dec 4, 2014
2 parents f998f21 + 8f7af3a commit c0b6fea
Show file tree
Hide file tree
Showing 14 changed files with 119 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -10,6 +10,7 @@ Makefile
Makefile.in
/Makefile.am
Makefile.am.common
compile
config.h
config.cache
config.guess
Expand Down
17 changes: 17 additions & 0 deletions .travis.yml
@@ -0,0 +1,17 @@
language: cpp
compiler:
- gcc
before_install:
- wget https://raw.githubusercontent.com/yast/yast-devtools/SLE-12-GA/travis-tools/travis_setup.sh
- sh ./travis_setup.sh -p "docbook-xsl xsltproc yast2-devtools bison flex libboost-dev pkg-config expect dejagnu libxcrypt-dev doxygen language-pack-en language-pack-cs automake"
script:
- make -f Makefile.cvs
- make -j 4
- sudo make install
# some tests fail in Ubuntu 12.04, disable tests temporarily to avoid false errors :-(
# - make check
# debugging: this test fails for some reason, looks like a strange locale related problem... :-(
# - (cd libycp; export LC_ALL=C; make check)
# - diff -u libycp/testsuite/tmp.out.Builtin_VIII libycp/testsuite/tests/builtin/Builtin_VIII.out
# - locale

2 changes: 1 addition & 1 deletion agent-any/src/AnyAgent.cc
Expand Up @@ -740,7 +740,7 @@ AnyAgent::readFile (const YCPValue & arg)
{
const char *s = ss.c_str();
// Check modify time if we can use cache
if (stat (s, &buf) != 0)
if (stat (targetPath(s).c_str(), &buf) != 0)
{
mtime = 0; // error case: reset mtime
if (errno == ENOENT)
Expand Down
2 changes: 1 addition & 1 deletion base/Makefile.am
Expand Up @@ -2,6 +2,6 @@
# Makefile.am for core/base
#

SUBDIRS = src tools
SUBDIRS = src tools testsuite

EXTRA_DIST = test-helper.exp
8 changes: 4 additions & 4 deletions base/src/Makefile.am
Expand Up @@ -9,11 +9,11 @@ y2base_SOURCES = y2base.cc
YAST2CORE = \
../../wfm/src/libpy2wfm.la \
../../scr/src/libpy2scr.la \
../../libycp/src/libycp.la \
../../libycp/src/libycpvalues.la \
../../liby2/src/liby2.la \
../../debugger/liby2debug.la \
../../libscr/src/libscr.la
../../debugger/liby2debug.la \
../../libscr/src/libscr.la \
../../libycp/src/libycpvalues.la \
../../libycp/src/libycp.la


y2base_DEPENDENCIES = $(YAST2CORE)
Expand Down
2 changes: 2 additions & 0 deletions base/testsuite/.gitignore
@@ -0,0 +1,2 @@
*.log
*.trs
9 changes: 9 additions & 0 deletions base/testsuite/Makefile.am
@@ -0,0 +1,9 @@
ITESTS = \
target_root.ycp

EXTRA_DIST = $(ITESTS) y2base.sh

check-local:
for t in $(ITESTS); do \
./y2base.sh $$t || { cat $${t%.*}.log; exit 1; }; \
done
1 change: 1 addition & 0 deletions base/testsuite/data/toplevel/target_root
@@ -0,0 +1 @@
BOOT_IMAGE=fbdev ro root=801
41 changes: 41 additions & 0 deletions base/testsuite/target_root.ycp
@@ -0,0 +1,41 @@
{
any with_scr_root(string root, any () action) {
string component = sformat("chroot=%1:scr", root);
boolean check_version = false;
integer handle = WFM::SCROpen(component, check_version);
WFM::SCRSetDefault(handle);

any result = action();

WFM::SCRSetDefault(0);
WFM::SCRClose(handle);
return result;
}

boolean test_anyagent() {
SCR::RegisterAgent(
.tested,
`ag_anyagent(
`Description (
`File ("/toplevel/target_root"),
"#\n", // Comment
true, // read-only
`List (
`String ("^ \n"),
" "
)
)
)
);

any read = SCR::Read(.tested);

any expected = ["BOOT_IMAGE=fbdev", "ro", "root=801"];
y2milestone ("Expected: %1", expected);
y2milestone ("Read: %1", read);
return read == expected;
}

string root = sformat("%1/data", WFM::Args(0));
return with_scr_root(root, test_anyagent);
}
18 changes: 18 additions & 0 deletions base/testsuite/y2base.sh
@@ -0,0 +1,18 @@
#!/bin/sh
ROOT=../..
LIBS=src/.libs
AG_ANY_DIR=$ROOT/agent-any/$LIBS
# The agent is looked for not in $Y2DIR but in $Y2DIR/plugin so create 'plugin'
ln -snf . $AG_ANY_DIR/plugin
export Y2DIR=$AG_ANY_DIR
export LD_LIBRARY_PATH="\
$ROOT/liby2util-r/$LIBS:\
$ROOT/libycp/$LIBS:\
$ROOT/liby2/$LIBS:\
$ROOT/libscr/$LIBS:\
$ROOT/wfm/$LIBS:\
$ROOT/scr/$LIBS\
"
# ignore incompatible ruby-bindings while developing
export Y2DISABLELANGUAGEPLUGINS=1
../$LIBS/y2base -l ${1%.*}.log ./$1 -S "($(pwd))" testsuite
8 changes: 7 additions & 1 deletion configure.in.in
Expand Up @@ -72,11 +72,17 @@ dnl Y2CORE_CFLAGS="-std=c++0x"
AC_MSG_RESULT([older than c++0x])
;;
esac

AC_SUBST(Y2CORE_CFLAGS) dnl included in {C,CXX}FLAGS in YAST2-CHECKS-PROGRAM

AC_CHECK_HEADERS(xcrypt.h)

AC_CHECK_LIB(owcrypt, crypt_gensalt_rn,
[CRYPTO_LIBS="-lowcrypt -lcrypt"],
[CRYPTO_LIBS="-lcrypt"])
AC_CHECK_LIB(xcrypt, crypt_gensalt_rn,
[CRYPTO_LIBS="-lxcrypt"],
[CRYPTO_LIBS="-lcrypt"])
)
AC_SUBST(CRYPTO_LIBS)

AX_CHECK_DOCBOOK
Expand Down
6 changes: 6 additions & 0 deletions libycp/src/y2crypt.cc
Expand Up @@ -21,8 +21,14 @@
#include <sys/stat.h>
#include <fcntl.h>

#include "config.h"

extern "C" {
#ifdef HAVE_XCRYPT_H
#include <xcrypt.h>
#else
#include <crypt.h>
#endif
}

#include "y2log.h"
Expand Down
10 changes: 10 additions & 0 deletions package/yast2-core.changes
@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Nov 25 09:59:49 UTC 2014 - mvidner@suse.com

- ag_any: respect target root also when the file
does not exist in the original root (boo#903747).
If applied at installation time as a DUD, it fixes
"Internal error... in SaveModulesToLoad" during
an upgrade to oS 13.2.
- 3.1.12.1

-------------------------------------------------------------------
Wed Oct 8 12:02:35 UTC 2014 - mvidner@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-core.spec
Expand Up @@ -18,7 +18,7 @@


Name: yast2-core
Version: 3.1.12
Version: 3.1.12.1
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down

0 comments on commit c0b6fea

Please sign in to comment.