openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
April 2015
- 1 participants
- 1958 discussions
Hello community,
here is the log from the commit of package libreoffice for openSUSE:Factory checked in at 2015-04-06 00:25:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libreoffice (Old)
and /work/SRC/openSUSE:Factory/.libreoffice.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libreoffice"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libreoffice/libreoffice.changes 2015-03-30 19:31:39.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libreoffice.new/libreoffice.changes 2015-04-06 00:25:09.000000000 +0200
@@ -1,0 +2,19 @@
+Thu Apr 2 17:11:50 UTC 2015 - tchvatal(a)suse.com
+
+- Version bump to 4.4.2:
+ * 2nd bugfix update for the 4.4 series
+
+-------------------------------------------------------------------
+Mon Mar 30 14:31:03 UTC 2015 - andras.timar(a)collabora.com
+
+- BuildRequires: libodfgen-devel >= 0.1
+
+-------------------------------------------------------------------
+Mon Mar 30 14:20:04 UTC 2015 - andras.timar(a)collabora.com
+
+- added version numbers to some BuildRequires lines
+- build does not require python3-lxml
+- build requires librevenge-devel >= 0.0.1
+- vlc media backend is broken, don't use it. Only gstreamer should be used.
+
+-------------------------------------------------------------------
Old:
----
libreoffice-4.4.1.2.tar.xz
libreoffice-help-4.4.1.2.tar.xz
libreoffice-translations-4.4.1.2.tar.xz
New:
----
libreoffice-4.4.2.2.tar.xz
libreoffice-help-4.4.2.2.tar.xz
libreoffice-translations-4.4.2.2.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libreoffice.spec ++++++
--- /var/tmp/diff_new_pack.vKnedh/_old 2015-04-06 00:25:18.000000000 +0200
+++ /var/tmp/diff_new_pack.vKnedh/_new 2015-04-06 00:25:18.000000000 +0200
@@ -23,10 +23,10 @@
%define numbertext_version 0.9.5
# Urls
%define external_url http://dev-www.libreoffice.org/src/
-%define tarball_url http://download.documentfoundation.org/libreoffice/src/4.4.1
+%define tarball_url http://download.documentfoundation.org/libreoffice/src/4.4.2
# This is used due to the need for beta releases
Name: libreoffice
-Version: 4.4.1.2
+Version: 4.4.2.2
Release: 0
Summary: A Free Office Suite (Framework)
License: Apache-2.0 and Artistic-1.0 and BSD-3-Clause and BSD-4-Clause and GPL-2.0+ and LPPL-1.3c and LGPL-2.1+ and LGPL-3.0 and MPL-1.1 and MIT and SUSE-Public-Domain and W3C
@@ -108,7 +108,7 @@
BuildRequires: glu-devel
BuildRequires: gnome-vfs2-devel
BuildRequires: gperf
-BuildRequires: graphite2-devel
+BuildRequires: graphite2-devel >= 0.9.3
BuildRequires: gstreamer-plugins-base-devel
BuildRequires: gtk2-devel
BuildRequires: gtk3-devel
@@ -123,15 +123,15 @@
BuildRequires: libabw-devel
BuildRequires: libbase
BuildRequires: libcdr-devel
-BuildRequires: libcmis-devel
+BuildRequires: libcmis-devel >= 0.5.0
BuildRequires: libcppunit-devel
-BuildRequires: libe-book-devel
+BuildRequires: libe-book-devel >= 0.1.1
# Fonts are needed for tests
BuildRequires: liberation-fonts
-BuildRequires: libetonyek-devel
+BuildRequires: libetonyek-devel >= 0.1.1
BuildRequires: libexif
BuildRequires: libexpat-devel
-BuildRequires: libexttextcat-devel
+BuildRequires: libexttextcat-devel >= 3.1.1
BuildRequires: libfbembed-devel
BuildRequires: libfonts
BuildRequires: libformula
@@ -144,15 +144,16 @@
BuildRequires: liblcms2-devel
BuildRequires: libloader
BuildRequires: libmspub-devel
-BuildRequires: libmwaw-devel
+BuildRequires: libmwaw-devel >= 0.3.4
BuildRequires: libmysqlclient-devel
BuildRequires: libmysqlcppconn-devel >= 1.0.6
-BuildRequires: libodfgen-devel
+BuildRequires: libodfgen-devel >= 0.1
BuildRequires: liborcus-devel >= 0.7.0
BuildRequires: libpagemaker-devel
BuildRequires: libpoppler-devel
BuildRequires: libredland-devel
BuildRequires: librepository
+BuildRequires: librevenge-devel >= 0.0.1
BuildRequires: librsvg-devel
BuildRequires: libserializer
BuildRequires: libtool
@@ -164,11 +165,11 @@
BuildRequires: libxslt-devel
BuildRequires: lpsolve-devel
BuildRequires: make
-BuildRequires: mdds-devel >= 0.8.0
-BuildRequires: mozilla-nspr-devel
-BuildRequires: mozilla-nss-devel
+BuildRequires: mdds-devel >= 0.11.2
+BuildRequires: mozilla-nspr-devel >= 4.8
+BuildRequires: mozilla-nss-devel >= 3.9.3
BuildRequires: mythes-devel
-BuildRequires: neon-devel
+BuildRequires: neon-devel >= 0.26.0
BuildRequires: npapi-sdk
BuildRequires: openCOLLADA-devel
BuildRequires: openldap2-devel
@@ -181,7 +182,6 @@
BuildRequires: postgresql-devel
BuildRequires: procps
BuildRequires: python3-devel
-BuildRequires: python3-lxml
BuildRequires: python3-xml
BuildRequires: recode
BuildRequires: rhino
@@ -191,7 +191,6 @@
BuildRequires: unixODBC-devel
BuildRequires: unzip
BuildRequires: vigra-devel
-BuildRequires: vlc-devel
BuildRequires: xml-commons-apis
BuildRequires: xorg-x11
BuildRequires: xorg-x11-fonts
@@ -958,7 +957,7 @@
--enable-ext-mariadb-connector \
--enable-scripting-beanshell \
--enable-scripting-javascript \
- --enable-vlc \
+ --disable-vlc \
--enable-neon \
--with-system-ucpp \
--disable-ccache \
++++++ libreoffice-4.4.1.2.tar.xz -> libreoffice-4.4.2.2.tar.xz ++++++
/work/SRC/openSUSE:Factory/libreoffice/libreoffice-4.4.1.2.tar.xz /work/SRC/openSUSE:Factory/.libreoffice.new/libreoffice-4.4.2.2.tar.xz differ: char 26, line 1
++++++ libreoffice-help-4.4.1.2.tar.xz -> libreoffice-help-4.4.2.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libreoffice-4.4.1.2/ChangeLog-helpcontent2 new/libreoffice-4.4.2.2/ChangeLog-helpcontent2
--- old/libreoffice-4.4.1.2/ChangeLog-helpcontent2 2015-02-20 18:45:18.000000000 +0100
+++ new/libreoffice-4.4.2.2/ChangeLog-helpcontent2 2015-03-26 13:01:59.000000000 +0100
@@ -1,14 +1,20 @@
-2015-02-20 Christian Lohmaier <lohmaier+LibreOffice(a)googlemail.com> [a9f719640e6e9761df12773e5356e38447ccc528]
+2015-03-26 Christian Lohmaier <lohmaier+LibreOffice(a)googlemail.com> [5c70ceedbc43c5b3e0ec78422f283e74d3005b13]
-Version 4.4.1.2, tag libreoffice-4.4.1.2
+Version 4.4.2.2, tag libreoffice-4.4.2.2-buildfix1
-Change-Id: I471afb78c9fb83d99dd955d3236fecb158be47bd
+Change-Id: I498c8e00666e6927bf4079288e6abcaac1d15b35
-2015-02-09 Christian Lohmaier <lohmaier+LibreOffice(a)googlemail.com> [98d2f02af203585336aa6b4df10fbbfb0dfe7293]
+2015-03-26 Christian Lohmaier <lohmaier+LibreOffice(a)googlemail.com> [728a9b8769584b7e3d1573d3b85810145b161001]
-Branch libreoffice-4-4-1
+Version 4.4.2.2, tag libreoffice-4.4.2.2
-This is 'libreoffice-4-4-1' - the stable branch for the 4.4.1 release.
+Change-Id: I2fd0db5c6d608ba465377d3949d8389fa25d4880
+
+2015-03-10 Christian Lohmaier <lohmaier+LibreOffice(a)googlemail.com> [c4d8b59448b9f201c64a18d3d4a57eef6707d3f2]
+
+Branch libreoffice-4-4-2
+
+This is 'libreoffice-4-4-2' - the stable branch for the 4.4.2 release.
Only very safe changes, reviewed by three people are allowed.
If you want to commit more complicated fix for the next 4.4.x release,
@@ -16,7 +22,7 @@
If you want to build something cool, unstable, and risky, use master.
-Change-Id: Icae8bcfad546623d89cc845c9456169965be50a3
+Change-Id: Idaf449eeca15cbece6e82ca537368a34a0c14311
2014-11-30 Stanislav Horacek <stanislav.horacek(a)gmail.com> [40967add67da1353dae0f1f9cc31475f4650381c]
++++++ libreoffice-translations-4.4.1.2.tar.xz -> libreoffice-translations-4.4.2.2.tar.xz ++++++
/work/SRC/openSUSE:Factory/libreoffice/libreoffice-translations-4.4.1.2.tar.xz /work/SRC/openSUSE:Factory/.libreoffice.new/libreoffice-translations-4.4.2.2.tar.xz differ: char 27, line 1
1
0
Hello community,
here is the log from the commit of package yp-tools for openSUSE:Factory checked in at 2015-04-06 00:24:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yp-tools (Old)
and /work/SRC/openSUSE:Factory/.yp-tools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yp-tools"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yp-tools/yp-tools.changes 2014-12-21 12:03:06.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yp-tools.new/yp-tools.changes 2015-04-06 00:24:56.000000000 +0200
@@ -1,0 +2,13 @@
+Thu Mar 26 15:48:11 CET 2015 - kukuk(a)suse.de
+
+- Revert changes from Dec 4th and 6th, most of them were wrong.
+
+- Update to version 3.3:
+ - fix some linking issues
+ - add yp_dump_binding
+ - Fix file descriptor leak in libnis
+ - Fix wrong fallback for binding files in libnis
+ - Fix link order
+ - Implement locking for multithreaded applications
+
+-------------------------------------------------------------------
Old:
----
yp-tools-3.0.1.tar.bz2
New:
----
yp-tools-3.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yp-tools.spec ++++++
--- /var/tmp/diff_new_pack.P0MGC7/_old 2015-04-06 00:24:57.000000000 +0200
+++ /var/tmp/diff_new_pack.P0MGC7/_new 2015-04-06 00:24:57.000000000 +0200
@@ -21,15 +21,15 @@
%global __requires_exclude libc.so.6\\(GLIBC_PRIVATE\\)
Name: yp-tools
-Version: 3.0.1
+Version: 3.3
Release: 0
Summary: Network Information Service (YP) client utilities
License: GPL-2.0 and LGPL-2.1
Group: Productivity/Networking/NIS
-Source: http://linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2
-Url: http://linux-nis.org/
+Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2
+Url: http://www.linux-nis.org/
BuildRequires: fdupes
-BuildRequires: pkg-config
+BuildRequires: pkgconfig
%if 0%{?suse_version} >= 1310
BuildRequires: pkgconfig(libtirpc)
%else
@@ -43,12 +43,12 @@
test NIS configurations.
%package -n libnis1
-Summary: Library with IPv6-enabled NIS functions
+Summary: Library with IPv6 enabled NIS functions
License: LGPL-2.1
Group: System/Libraries
%description -n libnis1
-This library provides the NIS functions in a IPv6-enabled version.
+This library provides IPv6 enabled NIS functions.
%package -n libnss_nis6-2
Summary: NSS plugin for glibc replacing nss_nis
@@ -70,7 +70,7 @@
%description -n libnis-devel
This package contains the include files and libraries needed to
-develop applications using the IPv6-ready NIS functions. This
+develop applications using the IPv6 ready NIS functions. This
includes support for the ypbind v3 protocol, too.
%prep
@@ -108,12 +108,30 @@
%dir %{_localstatedir}/yp
%config(noreplace) %{_localstatedir}/yp/nicknames
%{_bindir}/nisdomainname
-%{_bindir}/yp*
-%{_prefix}/lib/yp/
-%{_mandir}/man1/*.1*
-%{_mandir}/man5/*.5*
-%{_mandir}/man8/*.8*
-%{_sbindir}/yp*
+%{_bindir}/ypcat
+%{_bindir}/ypchfn
+%{_bindir}/ypchsh
+%{_bindir}/ypdomainname
+%{_bindir}/ypmatch
+%{_bindir}/yppasswd
+%{_bindir}/ypwhich
+%dir %{_prefix}/lib/yp
+%{_prefix}/lib/yp/match_printcap
+%doc %{_mandir}/man1/ypcat.1.gz
+%doc %{_mandir}/man1/ypchfn.1.gz
+%doc %{_mandir}/man1/ypchsh.1.gz
+%doc %{_mandir}/man1/ypmatch.1.gz
+%doc %{_mandir}/man1/yppasswd.1.gz
+%doc %{_mandir}/man1/ypwhich.1.gz
+%doc %{_mandir}/man5/nicknames.5.gz
+%doc %{_mandir}/man8/yppoll.8.gz
+%doc %{_mandir}/man8/ypset.8.gz
+%doc %{_mandir}/man8/ypdomainname.8.gz
+%doc %{_mandir}/man8/nisdomainname.8.gz
+%doc %{_mandir}/man8/yp_dump_binding.8.gz
+%{_sbindir}/yppoll
+%{_sbindir}/ypset
+%{_sbindir}/yp_dump_binding
%files -n libnis1
%defattr(-,root,root)
@@ -125,7 +143,10 @@
%files -n libnis-devel
%defattr(-,root,root)
-%{_includedir}/libnis/
+%dir %{_includedir}/libnis
+%dir %{_includedir}/libnis/rpcsvc
+%{_includedir}/libnis/rpcsvc/*.h
+%{_includedir}/libnis/rpcsvc/*.x
%{_libdir}/pkgconfig/libnis.pc
%{_libdir}/libnis.so
++++++ yp-tools-3.0.1.tar.bz2 -> yp-tools-3.3.tar.bz2 ++++++
++++ 1900 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/yp-tools-3.0.1/ChangeLog new/yp-tools-3.3/ChangeLog
--- old/yp-tools-3.0.1/ChangeLog 2014-11-03 16:23:19.000000000 +0100
+++ new/yp-tools-3.3/ChangeLog 2014-12-05 16:10:54.000000000 +0100
@@ -1,3 +1,41 @@
+2014-12-05 Thorsten Kukuk <kukuk(a)thkukuk.de>
+
+ * release version 3.3
+
+ * nss_nis6/Makefile.am: link nss_nis6 against tirpc
+ * src/Makefile.am: link everything against tirpc
+
+ * src/yp_dump_binding.c: Add -p and -v parameters
+ * man/yp_dump_binding.8.in: Document -p and -v parameters
+
+ * lib/do_ypcall.c: Use clnt_create_timed
+ * lib/yp_all_host.c: Likewise.
+
+2014-12-03 Thorsten Kukuk <kukuk(a)thkukuk.de>
+
+ * man/yppoll.8.in: Add missing description.
+
+ * man/yp_dump_binding.8.in: New.
+
+ * src/yp_dump_binding.c: New program to show binding information.
+
+ * lib/do_ypcall.c (yp_bind_file): Fix file descriptor leak,
+ fix path for ypbind v2 binding file.
+
+ * src/Makefile.am (sbin_PROGRAMS): Add yp_dump_binding.
+
+2014-12-02 Thorsten Kukuk <kukuk(a)thkukuk.de>
+
+ * release version 3.1
+
+ * lib/Makefile.am: Bump minor version number.
+ * lib/do_ypcall.c: Use pthread functions for locks.
+ * lib/yp_get_default_domain.c: Likewise.
+
+ * nss_nis6/libc-lock.h: Add defines to use standard pthread functions.
+
+ * src/Makefile.am: Change order of libraries for linking.
+
2014-11-03 Thorsten Kukuk <kukuk(a)thkukuk.de>
* release version 3.0.1
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/yp-tools-3.0.1/NEWS new/yp-tools-3.3/NEWS
--- old/yp-tools-3.0.1/NEWS 2014-11-03 16:23:49.000000000 +0100
+++ new/yp-tools-3.3/NEWS 2014-12-05 12:44:32.000000000 +0100
@@ -4,6 +4,20 @@
Please send bug reports, questions and suggestions to <kukuk(a)linux-nis.org>.
+Version 3.3
+* Extend yp_dump_binding
+* Fix some link issues
+
+Version 3.2
+* Add yp_dump_binding application
+* Fix file descriptor leak in libnis
+* Fix reading fallback binding files in libnis
+* Adjust/add manual pages
+
+Version 3.1
+* Fix link order
+* Implement locking for multithreaded applications
+
Version 3.0.1
* libnis: use a much short timeout for initial RPC calls
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/yp-tools-3.0.1/configure.ac new/yp-tools-3.3/configure.ac
--- old/yp-tools-3.0.1/configure.ac 2014-11-03 16:23:06.000000000 +0100
+++ new/yp-tools-3.3/configure.ac 2014-12-05 12:44:16.000000000 +0100
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(yp-tools, 3.0.1, kukuk(a)linux-nis.org)
+AC_INIT(yp-tools, 3.3, kukuk(a)linux-nis.org)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/ypcat.c])
AM_CONFIG_HEADER(config.h)
@@ -98,6 +98,6 @@
AC_OUTPUT([Makefile lib/Makefile src/Makefile man/Makefile
etc/Makefile po/Makefile.in nss_nis6/Makefile libnis.pc
- man/domainname.8 man/nicknames.5
+ man/domainname.8 man/nicknames.5 man/yp_dump_binding.8
man/ypcat.1 man/ypmatch.1 man/yppasswd.1 man/yppoll.8
man/ypset.8 man/yptest.8 man/ypwhich.1])
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/yp-tools-3.0.1/lib/Makefile.am new/yp-tools-3.3/lib/Makefile.am
--- old/yp-tools-3.0.1/lib/Makefile.am 2014-11-03 16:25:43.000000000 +0100
+++ new/yp-tools-3.3/lib/Makefile.am 2014-12-03 14:24:03.000000000 +0100
@@ -24,7 +24,7 @@
noinst_LIBRARIES = libyptools.a
lib_LTLIBRARIES = libnis.la
-libnis_la_LDFLAGS = -version-info 1:1:0 \
+libnis_la_LDFLAGS = -version-info 2:1:1 \
-Wl,--version-script=$(srcdir)/libnis.map
libnis_la_LIBADD = @TIRPC_LIBS@
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/yp-tools-3.0.1/lib/do_ypcall.c new/yp-tools-3.3/lib/do_ypcall.c
--- old/yp-tools-3.0.1/lib/do_ypcall.c 2014-10-29 15:28:02.000000000 +0100
+++ new/yp-tools-3.3/lib/do_ypcall.c 2014-12-05 16:08:34.000000000 +0100
@@ -17,11 +17,13 @@
#include "config.h"
#endif
-#include <errno.h>
#include <fcntl.h>
+#include <errno.h>
+#include <libintl.h>
#include <string.h>
#include <unistd.h>
-#include <libintl.h>
+#include <assert.h>
+#include <pthread.h>
#include <arpa/inet.h>
#include <rpcsvc/yp_prot.h>
@@ -44,7 +46,7 @@
static const struct timeval RPCTIMEOUT = {25, 0};
static const struct timeval UDPTIMEOUT = {5, 0};
static int const MAXTRIES = 2;
-// XXX __libc_lock_define_initialized (static, ypbindlist_lock)
+static pthread_mutex_t ypbindlist_lock = PTHREAD_MUTEX_INITIALIZER;
static dom_binding *ypbindlist = NULL;
static const char *
@@ -69,7 +71,10 @@
strncpy (ysd->dom_domain, domain, YPMAXDOMAIN);
ysd->dom_domain[YPMAXDOMAIN] = '\0';
- ysd->dom_client = clnt_create (ysd->server, YPPROG, YPVERS, "udp");
+ ysd->dom_client = clnt_create_timed (ysd->server, YPPROG, YPVERS,
+ "udp", NULL);
+ if (ysd->dom_client == NULL)
+ clnt_pcreateerror ("yp_bind_client_create_v3");
}
static void
@@ -80,7 +85,10 @@
strncpy (ysd->dom_domain, domain, YPMAXDOMAIN);
ysd->dom_domain[YPMAXDOMAIN] = '\0';
- ysd->dom_client = clnt_create (ysd->server, YPPROG, YPVERS, "udp");
+ ysd->dom_client = clnt_create_timed (ysd->server, YPPROG, YPVERS,
+ "udp", NULL);
+ if (ysd->dom_client == NULL)
+ clnt_pcreateerror ("yp_bind_client_create_v2");
}
static void
@@ -105,16 +113,19 @@
if (!status)
{
xdr_free ((xdrproc_t)xdr_ypbind3_binding, &ypb3);
+ fclose (in);
goto version2;
}
yp_bind_client_create_v3 (domain, ysd, &ypb3);
xdr_free ((xdrproc_t)xdr_ypbind3_binding, &ypb3);
+ fclose (in);
}
else
{
int fd;
version2:
+ snprintf (path, sizeof (path), "%s/%s.%u", BINDINGDIR, domain, 2);
fd = open (path, O_RDONLY);
if (fd >= 0)
{
@@ -136,7 +147,7 @@
{
CLIENT *client;
- client = clnt_create ("localhost", YPBINDPROG, YPBINDVERS, "tcp");
+ client = clnt_create_timed ("localhost", YPBINDPROG, YPBINDVERS, "tcp", NULL);
if (client != NULL)
{
enum clnt_stat ret;
@@ -175,6 +186,8 @@
ysd->server = NULL;
yp_bind_client_create_v3 (domain, ysd, ypbr.ypbind_respbody.ypbind_bindinfo);
+ if (ysd->dom_client == NULL)
+ return YPERR_YPSERV;
}
else
{
@@ -182,7 +195,8 @@
try_v2:
/* Fallback to protocol v2 in error case */
- client = clnt_create ("localhost", YPBINDPROG, YPBINDVERS_2, "tcp");
+ client = clnt_create_timed ("localhost", YPBINDPROG, YPBINDVERS_2,
+ "tcp", NULL);
if (client == NULL)
return YPERR_YPBIND;
@@ -218,6 +232,8 @@
ysd->server = NULL;
yp_bind_client_create_v2 (domain, ysd, &ypbr);
+ if (ysd->dom_client == NULL)
+ return YPERR_YPSERV;
}
return YPERR_SUCCESS;
@@ -294,11 +310,9 @@
{
int status;
- // XXX __libc_lock_lock (ypbindlist_lock);
-
+ pthread_mutex_lock (&ypbindlist_lock);
status = __yp_bind (indomain, &ypbindlist);
-
- // XXX __libc_lock_unlock (ypbindlist_lock);
+ pthread_mutex_unlock (&ypbindlist_lock);
return status;
}
@@ -333,11 +347,9 @@
void
yp_unbind (const char *indomain)
{
- // XXX __libc_lock_lock (ypbindlist_lock);
-
+ pthread_mutex_lock (&ypbindlist_lock);
yp_unbind_locked (indomain);
-
- // XXX __libc_lock_unlock (ypbindlist_lock);
+ pthread_mutex_unlock (&ypbindlist_lock);
return;
}
@@ -349,6 +361,8 @@
{
enum clnt_stat result;
+ assert ((*ydb)->dom_client != NULL);
+
result = clnt_call ((*ydb)->dom_client, prog,
xargs, req, xres, resp, RPCTIMEOUT);
@@ -375,7 +389,7 @@
status = YPERR_YPERR;
- // XXX __libc_lock_lock (ypbindlist_lock);
+ pthread_mutex_lock (&ypbindlist_lock);
ydb = ypbindlist;
while (ydb != NULL)
{
@@ -388,7 +402,7 @@
resp, &ydb, 0);
if (status == YPERR_SUCCESS)
{
- // XXX __libc_lock_unlock (ypbindlist_lock);
+ pthread_mutex_unlock (&ypbindlist_lock);
errno = saved_errno;
return status;
}
@@ -401,7 +415,7 @@
}
ydb = ydb->dom_pnext;
}
- // XXX __libc_lock_unlock (ypbindlist_lock);
+ pthread_mutex_unlock (&ypbindlist_lock);
/* First try with cached data failed. Now try to get
current data from the system. */
@@ -536,10 +550,10 @@
try = 0;
res = YPERR_YPERR;
- // XXX __libc_lock_lock (ypbindlist_lock);
+ pthread_mutex_lock (&ypbindlist_lock);
while (try < MAXTRIES && res != YPERR_SUCCESS)
- {
+ {
if (__yp_bind (indomain, &ydb) != 0)
{
res = YPERR_DOMAIN;
@@ -552,7 +566,7 @@
__yp_unbind (ydb);
ydb = NULL;
- clnt = clnt_create (server, YPPROG, YPVERS, "tcp");
+ clnt = clnt_create_timed (server, YPPROG, YPVERS, "tcp", NULL);
if (clnt == NULL)
{
res = YPERR_PMAP;
@@ -589,7 +603,7 @@
}
out:
- // XXX __libc_lock_unlock (ypbindlist_lock);
+ pthread_mutex_unlock (&ypbindlist_lock);
if (server)
free (server);
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/yp-tools-3.0.1/lib/yp_all_host.c new/yp-tools-3.3/lib/yp_all_host.c
--- old/yp-tools-3.0.1/lib/yp_all_host.c 2014-10-25 00:20:42.000000000 +0200
+++ new/yp-tools-3.3/lib/yp_all_host.c 2014-12-05 16:07:56.000000000 +0100
@@ -111,7 +111,7 @@
res = YPERR_YPERR;
- clnt = clnt_create (hostname, YPPROG, YPVERS, "tcp");
+ clnt = clnt_create_timed (hostname, YPPROG, YPVERS, "tcp", NULL);
if (clnt == NULL)
return YPERR_PMAP;
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/yp-tools-3.0.1/lib/yp_get_default_domain.c new/yp-tools-3.3/lib/yp_get_default_domain.c
--- old/yp-tools-3.0.1/lib/yp_get_default_domain.c 2014-10-23 14:09:34.000000000 +0200
+++ new/yp-tools-3.3/lib/yp_get_default_domain.c 2014-12-02 14:18:32.000000000 +0100
@@ -19,11 +19,11 @@
#endif
#include <unistd.h>
+#include <pthread.h>
#include <rpcsvc/nis.h>
#include <rpcsvc/ypclnt.h>
-#define NIS_LOCK() /* XXX */
-#define NIS_UNLOCK() /* XXX */
+static pthread_mutex_t ypdomainname_lock = PTHREAD_MUTEX_INITIALIZER;
static char ypdomainname[NIS_MAXNAMELEN + 1];
@@ -33,7 +33,7 @@
int result = YPERR_SUCCESS;;
*outdomain = NULL;
- NIS_LOCK();
+ pthread_mutex_lock (&ypdomainname_lock);
if (ypdomainname[0] == '\0')
{
@@ -51,7 +51,7 @@
else
*outdomain = ypdomainname;
- NIS_UNLOCK();
+ pthread_mutex_unlock (&ypdomainname_lock);
return result;
}
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/yp-tools-3.0.1/man/Makefile.am new/yp-tools-3.3/man/Makefile.am
--- old/yp-tools-3.0.1/man/Makefile.am 2014-10-21 14:54:25.000000000 +0200
+++ new/yp-tools-3.3/man/Makefile.am 2014-12-03 13:44:34.000000000 +0100
@@ -1,14 +1,15 @@
#
-# Copyright (c) 1997, 1998, 1999, 2001, 2006, 2010 Thorsten Kukuk, Germany
+# Copyright (c) 1997-2014 Thorsten Kukuk, Germany
#
# Author: Thorsten Kukuk <kukuk(a)linux-nis.org>
#
CLEANFILES = *~ sedscript domainname.8 ypcat.1 ypmatch.1 yppasswd.1\
- yppoll.8 ypset.8 yptest.8 ypwhich.1 nicknames.5
+ yppoll.8 ypset.8 yptest.8 ypwhich.1 nicknames.5 yp_dump_binding.8
EXTRA_DIST = domainname.8.in nisdomainname.8 ypdomainname.8\
ypcat.1.in ypchfn.1 ypchsh.1 ypmatch.1.in yppasswd.1.in\
- yppoll.8.in ypset.8.in yptest.8.in ypwhich.1.in nicknames.5.in
+ yppoll.8.in ypset.8.in yptest.8.in ypwhich.1.in nicknames.5.in \
+ yp_dump_binding.8.in
man_MANS = ypcat.1 ypchfn.1 ypchsh.1 ypmatch.1 yppasswd.1 yppoll.8 ypset.8\
- ypwhich.1 nicknames.5 @MAN_DOMAINNAME@
+ ypwhich.1 nicknames.5 yp_dump_binding.8 @MAN_DOMAINNAME@
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/yp-tools-3.0.1/man/yp_dump_binding.8.in new/yp-tools-3.3/man/yp_dump_binding.8.in
--- old/yp-tools-3.0.1/man/yp_dump_binding.8.in 1970-01-01 01:00:00.000000000 +0100
+++ new/yp-tools-3.3/man/yp_dump_binding.8.in 2014-12-05 12:43:31.000000000 +0100
@@ -0,0 +1,65 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 2014 Thorsten Kukuk
+.\" This file is part of the yp-tools.
+.\" Author: Thorsten Kukuk <kukuk(a)linux-nis.org>
+.\"
+.\" This program is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License version 2 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, write to the Free Software Foundation,
+.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.\"
+.TH yp_dump_binding 8 "April 2014" "YP Tools @VERSION@"
+.SH NAME
+yp_dump_binding - dump binding files
+.SH SYNOPSIS
+.B yp_dump+binding
+[
+.BI \-d " domain"
+][
+.BI \-p " path"
+][
+.BI \-v " version"
+]
+.LP
+.SH DESCRIPTION
+.B yp_dump_binding
+prints the content of the binding files in
+.B /var/yp/binding
+for the corresponding
+.BR domainname (8).
+This tool is for debugging purpose.
+
+.SH OPTIONS
+.TP
+.BI \-d " domain"
+Specify a domain other than the default domainname as returned by
+.BR domainname (8).
+.TP
+.BI \-p " path"
+Specify an alternate path to the binding files.
+.TP
+.BI \-v " version"
+Display only the binding file of a specific protocol version. By
+default the files of all versions are shown.
+.SH "SEE ALSO"
+.BR domainname (8),
+.BR ypbind (8),
+.BR ypcat (8),
+.BR ypmatch (1),
+.BR ypserv (8),
+.BR ypset (8),
+.BR ypwhich (1)
+.LP
+.SH AUTHOR
+.B yp_dump_binding
+is part of the
+.B yp-tools
+package, which was written by Thorsten Kukuk <kukuk(a)linux-nis.org>.
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/yp-tools-3.0.1/man/yppoll.8.in new/yp-tools-3.3/man/yppoll.8.in
--- old/yp-tools-3.0.1/man/yppoll.8.in 2010-04-21 11:43:21.000000000 +0200
+++ new/yp-tools-3.3/man/yppoll.8.in 2014-12-03 14:12:03.000000000 +0100
@@ -1,5 +1,5 @@
.\" -*- nroff -*-
-.\" Copyright (C) 1998, 1999, 2001, 2007, 2010 Thorsten Kukuk
+.\" Copyright (C) 1998, 1999, 2001, 2007, 2010, 2014 Thorsten Kukuk
.\" This file is part of the yp-tools.
.\" Author: Thorsten Kukuk <kukuk(a)linux-nis.org>
.\"
@@ -31,6 +31,10 @@
.LP
.SH DESCRIPTION
.B yppoll
+queries
+.BR ypserv (8)
+which host the NIS master server for a named map is and what the order
+number of this map is.
.SH OPTIONS
.TP
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/yp-tools-3.0.1/nss_nis6/Makefile.am new/yp-tools-3.3/nss_nis6/Makefile.am
--- old/yp-tools-3.0.1/nss_nis6/Makefile.am 2014-10-30 10:31:35.000000000 +0100
+++ new/yp-tools-3.3/nss_nis6/Makefile.am 2014-12-05 11:53:37.000000000 +0100
@@ -21,7 +21,7 @@
libnss_nis6_la_LDFLAGS = -version-info 2:0:0 \
-Wl,--version-script=$(srcdir)/libnss_nis6.map
-libnss_nis6_la_LIBADD = ../lib/libnis.la
+libnss_nis6_la_LIBADD = ../lib/libnis.la @TIRPC_LIBS@
libnss_nis6_la_SOURCES = nis-alias.c nis-ethers.c nis-grp.c nis-hosts.c \
nis-initgroups.c nis-netgrp.c nis-network.c \
nis-proto.c nis-publickey.c nis-pwd.c nis-rpc.c \
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/yp-tools-3.0.1/nss_nis6/libc-lock.h new/yp-tools-3.3/nss_nis6/libc-lock.h
--- old/yp-tools-3.0.1/nss_nis6/libc-lock.h 2014-10-29 15:22:12.000000000 +0100
+++ new/yp-tools-3.3/nss_nis6/libc-lock.h 2014-12-02 15:36:03.000000000 +0100
@@ -1,140 +1,22 @@
-/* libc-internal interface for mutex locks. Stub version.
- Copyright (C) 1996-2014 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
#ifndef _LIBC_LOCK_H
#define _LIBC_LOCK_H 1
+#include <pthread.h>
+
+#define __libc_lock_define_initialized(CLASS,NAME) \
+ CLASS pthread_mutex_t NAME = PTHREAD_MUTEX_INITIALIZER;
-/* Define a lock variable NAME with storage class CLASS. The lock must be
- initialized with __libc_lock_init before it can be used (or define it
- with __libc_lock_define_initialized, below). Use `extern' for CLASS to
- declare a lock defined in another module. In public structure
- definitions you must use a pointer to the lock structure (i.e., NAME
- begins with a `*'), because its storage size will not be known outside
- of libc. */
-#define __libc_lock_define(CLASS,NAME)
-#define __libc_lock_define_recursive(CLASS,NAME)
-#define __rtld_lock_define_recursive(CLASS,NAME)
-#define __libc_rwlock_define(CLASS,NAME)
-
-/* Define an initialized lock variable NAME with storage class CLASS. */
-#define __libc_lock_define_initialized(CLASS,NAME)
-#define __libc_rwlock_define_initialized(CLASS,NAME)
-
-/* Define an initialized recursive lock variable NAME with storage
- class CLASS. */
-#define __libc_lock_define_initialized_recursive(CLASS,NAME)
-#define __rtld_lock_define_initialized_recursive(CLASS,NAME)
-
-/* Initialize the named lock variable, leaving it in a consistent, unlocked
- state. */
-#define __libc_lock_init(NAME)
-#define __rtld_lock_initialize(NAME)
-#define __libc_rwlock_init(NAME)
-
-/* Same as last but this time we initialize a recursive mutex. */
-#define __libc_lock_init_recursive(NAME)
-
-/* Finalize the named lock variable, which must be locked. It cannot be
- used again until __libc_lock_init is called again on it. This must be
- called on a lock variable before the containing storage is reused. */
-#define __libc_lock_fini(NAME)
-#define __libc_rwlock_fini(NAME)
-
-/* Finalize recursive named lock. */
-#define __libc_lock_fini_recursive(NAME)
-
-/* Lock the named lock variable. */
-#define __libc_lock_lock(NAME)
-#define __libc_rwlock_rdlock(NAME)
-#define __libc_rwlock_wrlock(NAME)
-
-/* Lock the recursive named lock variable. */
-#define __libc_lock_lock_recursive(NAME)
-#define __rtld_lock_lock_recursive(NAME)
-
-/* Try to lock the named lock variable. */
-#define __libc_lock_trylock(NAME) 0
-#define __libc_rwlock_tryrdlock(NAME) 0
-#define __libc_rwlock_trywrlock(NAME) 0
-
-/* Try to lock the recursive named lock variable. */
-#define __libc_lock_trylock_recursive(NAME) 0
-
-/* Unlock the named lock variable. */
-#define __libc_lock_unlock(NAME)
-#define __libc_rwlock_unlock(NAME)
-
-/* Unlock the recursive named lock variable. */
-#define __libc_lock_unlock_recursive(NAME)
-#define __rtld_lock_unlock_recursive(NAME)
+#define __libc_once_define(CLASS, NAME) \
+ CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT;
+#define __libc_lock_lock(NAME) \
+ pthread_mutex_lock (&(NAME))
-/* Define once control variable. */
-#define __libc_once_define(CLASS, NAME) CLASS int NAME = 0
+#define __libc_lock_unlock(NAME) \
+ pthread_mutex_unlock (&(NAME))
/* Call handler iff the first call. */
#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \
- do { \
- if ((ONCE_CONTROL) == 0) { \
- INIT_FUNCTION (); \
- (ONCE_CONTROL) = 1; \
- } \
- } while (0)
-
-/* Get once control variable. */
-#define __libc_once_get(ONCE_CONTROL) \
- ((ONCE_CONTROL) == 1)
-
-/* Start a critical region with a cleanup function */
-#define __libc_cleanup_region_start(DOIT, FCT, ARG) \
-{ \
- typeof (***(FCT)) *__save_FCT = (DOIT) ? (FCT) : 0; \
- typeof (ARG) __save_ARG = ARG; \
- /* close brace is in __libc_cleanup_region_end below. */
-
-/* End a critical region started with __libc_cleanup_region_start. */
-#define __libc_cleanup_region_end(DOIT) \
- if ((DOIT) && __save_FCT != 0) \
- (*__save_FCT)(__save_ARG); \
-}
-
-/* Sometimes we have to exit the block in the middle. */
-#define __libc_cleanup_end(DOIT) \
- if ((DOIT) && __save_FCT != 0) \
- (*__save_FCT)(__save_ARG); \
-
-#define __libc_cleanup_push(fct, arg) __libc_cleanup_region_start (1, fct, arg)
-#define __libc_cleanup_pop(execute) __libc_cleanup_region_end (execute)
-
-/* We need portable names for some of the functions. */
-#define __libc_mutex_unlock
-
-/* Type for key of thread specific data. */
-typedef int __libc_key_t;
-
-/* Create key for thread specific data. */
-#define __libc_key_create(KEY,DEST) ((void) (KEY), (void) (DEST), -1)
-
-/* Set thread-specific data associated with KEY to VAL. */
-#define __libc_setspecific(KEY,VAL) ((void) (KEY), (void) (VAL))
-
-/* Get thread-specific data associated with KEY. */
-#define __libc_getspecific(KEY) ((void) (KEY), (void *) 0)
+ pthread_once(&(ONCE_CONTROL), INIT_FUNCTION)
#endif /* bits/libc-lock.h */
Files old/yp-tools-3.0.1/po/de.gmo and new/yp-tools-3.3/po/de.gmo differ
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/yp-tools-3.0.1/po/de.po new/yp-tools-3.3/po/de.po
--- old/yp-tools-3.0.1/po/de.po 2014-11-03 16:26:04.000000000 +0100
+++ new/yp-tools-3.3/po/de.po 2014-12-05 12:44:41.000000000 +0100
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: yp-tools 2.5\n"
"Report-Msgid-Bugs-To: kukuk(a)linux-nis.org\n"
-"POT-Creation-Date: 2014-11-03 16:26+0100\n"
+"POT-Creation-Date: 2014-12-05 12:44+0100\n"
"PO-Revision-Date: 2004-06-21 14:24+02:00\n"
"Last-Translator: Thorsten Kukuk <kukuk(a)suse.de>\n"
"Language-Team: No Language-Team in the moment\n"
@@ -85,19 +85,19 @@
#: src/domainname.c:65 src/domainname.c:78 src/ypcat.c:72 src/ypmatch.c:70
#: src/yppasswd.c:103 src/yppasswd.c:114 src/yppasswd.c:126 src/yppoll.c:71
-#: src/ypset.c:69 src/yptest.c:81 src/ypwhich.c:85
+#: src/ypset.c:69 src/yptest.c:81 src/ypwhich.c:84
msgid " -?, --help Give this help list\n"
msgstr " -?, --help Gib diese Hilfe aus\n"
#: src/domainname.c:66 src/domainname.c:79 src/ypcat.c:73 src/ypmatch.c:71
#: src/yppasswd.c:104 src/yppasswd.c:115 src/yppasswd.c:127 src/yppoll.c:72
-#: src/ypset.c:70 src/yptest.c:82 src/ypwhich.c:86
+#: src/ypset.c:70 src/yptest.c:82 src/ypwhich.c:85
msgid " --usage Give a short usage message\n"
msgstr " --usage Gib eine kurze Aufruf Hilfe aus\n"
#: src/domainname.c:67 src/domainname.c:80 src/ypcat.c:74 src/ypmatch.c:72
#: src/yppasswd.c:105 src/yppasswd.c:116 src/yppasswd.c:128 src/yppoll.c:73
-#: src/ypset.c:71 src/yptest.c:83 src/ypwhich.c:87
+#: src/ypset.c:71 src/yptest.c:83 src/ypwhich.c:86
msgid " --version Print program version\n"
msgstr " --version Gib Programm Version Information aus\n"
@@ -109,7 +109,7 @@
msgstr "%s - Setze oder zeige den Namen der aktuellen NIS Domain an\n"
#: src/domainname.c:88 src/ypcat.c:83 src/ypmatch.c:82 src/yppasswd.c:142
-#: src/yppoll.c:83 src/ypset.c:81 src/yptest.c:92 src/ypwhich.c:97
+#: src/yppoll.c:83 src/ypset.c:81 src/yptest.c:92 src/ypwhich.c:96
#, c-format
msgid "Try `%s --help' or `%s --usage' for more information.\n"
msgstr "Versuche \"%s --help\" oder \"%s --usage\" f�r mehr Informationen.\n"
@@ -145,22 +145,22 @@
msgid " -k Display map keys\n"
msgstr " -k Gib Schl�ssel mit aus\n"
-#: src/ypcat.c:69 src/ypmatch.c:67 src/ypwhich.c:80
+#: src/ypcat.c:69 src/ypmatch.c:67 src/ypwhich.c:79
msgid " -t Inhibits map nickname translation\n"
msgstr " -t Verbietet die �bersetzung von Nicknames\n"
-#: src/ypcat.c:70 src/ypmatch.c:68 src/ypwhich.c:82
+#: src/ypcat.c:70 src/ypmatch.c:68 src/ypwhich.c:81
msgid " -x Display the map nickname translation table\n"
msgstr " -x Zeige die Nickname �bersetzungstabelle an\n"
# , c-format
#: src/ypcat.c:207 src/ypmatch.c:171 src/yppasswd.c:617 src/yppoll.c:159
-#: src/ypset.c:265 src/ypwhich.c:384
+#: src/ypset.c:265 src/ypwhich.c:383
#, c-format
msgid "%s: can't get local yp domain: %s\n"
msgstr "%s: Kann die lokale NIS Domain nicht bestimmen: %s\n"
-#: src/ypcat.c:230 src/ypmatch.c:203 src/ypwhich.c:418
+#: src/ypcat.c:230 src/ypmatch.c:203 src/ypwhich.c:417
#, c-format
msgid "No running ypbind\n"
msgstr "ypbind ist nicht am laufen\n"
@@ -807,7 +807,7 @@
#: src/ypwhich.c:65
#, fuzzy
-msgid "Usage: ypwhich [-d domain] [[-t] -m [mname]|[-n]|[-Vn] hostname] | -x\n"
+msgid "Usage: ypwhich [-d domain] [[-t] -m [mname]|[-Vn] hostname] | -x\n"
msgstr "Aufruf: ypwhich [-d domain] [[-t] -m [Mapname]|[-Vn] Rechner] | -x\n"
#: src/ypwhich.c:73
@@ -822,22 +822,17 @@
msgid " -m mname Find the master NIS server for the map 'mname'\n"
msgstr " -m mname Finden den NIS Master Server f�r die Map \"mname\"\n"
-#: src/ypwhich.c:79
-#, fuzzy
-msgid " -n Don't convert addresses to names\n"
-msgstr " -q Gib keine Meldungen aus\n"
-
-#: src/ypwhich.c:81
+#: src/ypwhich.c:80
#, fuzzy
msgid " -V n Version of ypbind, V3 is default\n"
msgstr " -V n Version des ypbinds Protokoll, V2 ist default\n"
-#: src/ypwhich.c:84
+#: src/ypwhich.c:83
msgid " --verbose Verbose output of result\n"
msgstr ""
# , c-format
-#: src/ypwhich.c:150 src/ypwhich.c:207
+#: src/ypwhich.c:149 src/ypwhich.c:206
#, fuzzy, c-format
msgid ""
"ypwhich: can't call ypbind on '%s'\n"
@@ -846,56 +841,60 @@
"Kann keine Verbindung aufbauen.\n"
"Grund: %s\n"
-#: src/ypwhich.c:167 src/ypwhich.c:221
+#: src/ypwhich.c:166 src/ypwhich.c:220
#, c-format
msgid ""
"Error for domain '%s' from ypbind on '%s':\n"
"\t%s\n"
msgstr ""
-#: src/ypwhich.c:262
+#: src/ypwhich.c:261
#, c-format
msgid "ERROR: taddr2host failed!\n"
msgstr ""
-#: src/ypwhich.c:268
+#: src/ypwhich.c:267
#, c-format
msgid "Error: no server information gotten from ypbind on '%s'\n"
msgstr ""
# , c-format
-#: src/ypwhich.c:390
+#: src/ypwhich.c:389
#, fuzzy, c-format
msgid "%s: no local yp domain set\n"
msgstr "%s: Kann die lokale NIS Domain nicht bestimmen: %s\n"
# , c-format
-#: src/ypwhich.c:422
+#: src/ypwhich.c:421
#, c-format
msgid "Can't find master for map \"%s\". Reason: %s\n"
msgstr "Kann Master Server der Map \"%s\" nicht finden. Grund: %s\n"
# , c-format
-#: src/ypwhich.c:446
+#: src/ypwhich.c:445
#, c-format
msgid "Can't find master for map %s. Reason: %s\n"
msgstr ""
"Kann Master Server der Map %s nicht finden.\n"
"Grund: %s\n"
-#: src/ypwhich.c:456
+#: src/ypwhich.c:455
#, c-format
msgid "No running ypbind.\n"
msgstr "ypbind ist nicht am laufen.\n"
# , c-format
-#: src/ypwhich.c:460
+#: src/ypwhich.c:459
#, c-format
msgid "Can't get map list for domain %s. Reason: %s\n"
msgstr ""
"Kann die Liste der Maps aus der Domain %s nicht bekommen.\n"
"Grund: %s\n"
+#, fuzzy
+#~ msgid " -n Don't convert addresses to names\n"
+#~ msgstr " -q Gib keine Meldungen aus\n"
+
# , c-format
#~ msgid "yptest: host %s unknown\n"
#~ msgstr "yptest: Rechner �%s� unbekannt\n"
Files old/yp-tools-3.0.1/po/sv.gmo and new/yp-tools-3.3/po/sv.gmo differ
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/yp-tools-3.0.1/po/sv.po new/yp-tools-3.3/po/sv.po
--- old/yp-tools-3.0.1/po/sv.po 2014-11-03 16:26:04.000000000 +0100
+++ new/yp-tools-3.3/po/sv.po 2014-12-05 12:44:41.000000000 +0100
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: yp-tools 2.9\n"
"Report-Msgid-Bugs-To: kukuk(a)linux-nis.org\n"
-"POT-Creation-Date: 2014-11-03 16:26+0100\n"
+"POT-Creation-Date: 2014-12-05 12:44+0100\n"
"PO-Revision-Date: 2006-11-12 17:34+0100\n"
"Last-Translator: Daniel Nylander <po(a)danielnylander.se>\n"
"Language-Team: Swedish <tp-sv(a)listor.tp-sv.se>\n"
@@ -83,19 +83,19 @@
#: src/domainname.c:65 src/domainname.c:78 src/ypcat.c:72 src/ypmatch.c:70
#: src/yppasswd.c:103 src/yppasswd.c:114 src/yppasswd.c:126 src/yppoll.c:71
-#: src/ypset.c:69 src/yptest.c:81 src/ypwhich.c:85
+#: src/ypset.c:69 src/yptest.c:81 src/ypwhich.c:84
msgid " -?, --help Give this help list\n"
msgstr " -?, --help Visa den här hjälplistan\n"
#: src/domainname.c:66 src/domainname.c:79 src/ypcat.c:73 src/ypmatch.c:71
#: src/yppasswd.c:104 src/yppasswd.c:115 src/yppasswd.c:127 src/yppoll.c:72
-#: src/ypset.c:70 src/yptest.c:82 src/ypwhich.c:86
+#: src/ypset.c:70 src/yptest.c:82 src/ypwhich.c:85
msgid " --usage Give a short usage message\n"
msgstr " --usage Visa ett kort användningsmeddelande\n"
#: src/domainname.c:67 src/domainname.c:80 src/ypcat.c:74 src/ypmatch.c:72
#: src/yppasswd.c:105 src/yppasswd.c:116 src/yppasswd.c:128 src/yppoll.c:73
-#: src/ypset.c:71 src/yptest.c:83 src/ypwhich.c:87
+#: src/ypset.c:71 src/yptest.c:83 src/ypwhich.c:86
msgid " --version Print program version\n"
msgstr " --version Skriv ut programversion\n"
@@ -109,7 +109,7 @@
"\n"
#: src/domainname.c:88 src/ypcat.c:83 src/ypmatch.c:82 src/yppasswd.c:142
-#: src/yppoll.c:83 src/ypset.c:81 src/yptest.c:92 src/ypwhich.c:97
+#: src/yppoll.c:83 src/ypset.c:81 src/yptest.c:92 src/ypwhich.c:96
#, c-format
msgid "Try `%s --help' or `%s --usage' for more information.\n"
msgstr "Prova \"%s --help\" eller \"%s --usage\" för mer information.\n"
@@ -146,21 +146,21 @@
msgstr " -k Visa kartnycklar\n"
# Inhibit = hindrar, hämmar?
-#: src/ypcat.c:69 src/ypmatch.c:67 src/ypwhich.c:80
+#: src/ypcat.c:69 src/ypmatch.c:67 src/ypwhich.c:79
msgid " -t Inhibits map nickname translation\n"
msgstr " -t Hindrar smeknamnsöversättning för kartan\n"
-#: src/ypcat.c:70 src/ypmatch.c:68 src/ypwhich.c:82
+#: src/ypcat.c:70 src/ypmatch.c:68 src/ypwhich.c:81
msgid " -x Display the map nickname translation table\n"
msgstr " -x Visa kartans översättningstabell för smeknamn\n"
#: src/ypcat.c:207 src/ypmatch.c:171 src/yppasswd.c:617 src/yppoll.c:159
-#: src/ypset.c:265 src/ypwhich.c:384
+#: src/ypset.c:265 src/ypwhich.c:383
#, c-format
msgid "%s: can't get local yp domain: %s\n"
msgstr "%s: kan inte få lokal yp-domän: %s\n"
-#: src/ypcat.c:230 src/ypmatch.c:203 src/ypwhich.c:418
+#: src/ypcat.c:230 src/ypmatch.c:203 src/ypwhich.c:417
#, c-format
msgid "No running ypbind\n"
msgstr "Ingen körande ypbind\n"
@@ -777,7 +777,7 @@
#: src/ypwhich.c:65
#, fuzzy
-msgid "Usage: ypwhich [-d domain] [[-t] -m [mname]|[-n]|[-Vn] hostname] | -x\n"
+msgid "Usage: ypwhich [-d domain] [[-t] -m [mname]|[-Vn] hostname] | -x\n"
msgstr "Användning: ypwhich [-d domän] [[-t] -m [knamn]|[-Vn] värdnamn] | -x\n"
#: src/ypwhich.c:73
@@ -792,69 +792,68 @@
msgid " -m mname Find the master NIS server for the map 'mname'\n"
msgstr " -m knamn Hitta NIS-masterservern för kartan \"knamn\"\n"
-#: src/ypwhich.c:79
-#, fuzzy
-msgid " -n Don't convert addresses to names\n"
-msgstr " -q Var tyst, skriv inte ut meddelanden\n"
-
-#: src/ypwhich.c:81
+#: src/ypwhich.c:80
#, fuzzy
msgid " -V n Version of ypbind, V3 is default\n"
msgstr " -V n Version av ypbind, V2 är standard\n"
-#: src/ypwhich.c:84
+#: src/ypwhich.c:83
msgid " --verbose Verbose output of result\n"
msgstr ""
-#: src/ypwhich.c:150 src/ypwhich.c:207
+#: src/ypwhich.c:149 src/ypwhich.c:206
#, fuzzy, c-format
msgid ""
"ypwhich: can't call ypbind on '%s'\n"
"\t"
msgstr "kan inte yp_bind: Anledning: %s\n"
-#: src/ypwhich.c:167 src/ypwhich.c:221
+#: src/ypwhich.c:166 src/ypwhich.c:220
#, c-format
msgid ""
"Error for domain '%s' from ypbind on '%s':\n"
"\t%s\n"
msgstr ""
-#: src/ypwhich.c:262
+#: src/ypwhich.c:261
#, c-format
msgid "ERROR: taddr2host failed!\n"
msgstr ""
-#: src/ypwhich.c:268
+#: src/ypwhich.c:267
#, c-format
msgid "Error: no server information gotten from ypbind on '%s'\n"
msgstr ""
-#: src/ypwhich.c:390
+#: src/ypwhich.c:389
#, fuzzy, c-format
msgid "%s: no local yp domain set\n"
msgstr "%s: kan inte få lokal yp-domän: %s\n"
-#: src/ypwhich.c:422
+#: src/ypwhich.c:421
#, c-format
msgid "Can't find master for map \"%s\". Reason: %s\n"
msgstr "Kan inte hitta master för kartan \"%s\". Anledning: %s\n"
-#: src/ypwhich.c:446
+#: src/ypwhich.c:445
#, c-format
msgid "Can't find master for map %s. Reason: %s\n"
msgstr "Kan inte hitta master för kartan %s. Anledning: %s\n"
-#: src/ypwhich.c:456
+#: src/ypwhich.c:455
#, c-format
msgid "No running ypbind.\n"
msgstr "Ingen körande ypbind.\n"
-#: src/ypwhich.c:460
+#: src/ypwhich.c:459
#, c-format
msgid "Can't get map list for domain %s. Reason: %s\n"
msgstr "Kan inte få kartlista för domänen %s. Anledning: %s\n"
+#, fuzzy
+#~ msgid " -n Don't convert addresses to names\n"
+#~ msgstr " -q Var tyst, skriv inte ut meddelanden\n"
+
#~ msgid "yptest: host %s unknown\n"
#~ msgstr "yptest: värden %s är okänd\n"
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/yp-tools-3.0.1/src/Makefile.am new/yp-tools-3.3/src/Makefile.am
--- old/yp-tools-3.0.1/src/Makefile.am 2014-10-29 15:28:02.000000000 +0100
+++ new/yp-tools-3.3/src/Makefile.am 2014-12-05 11:47:44.000000000 +0100
@@ -9,14 +9,14 @@
AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(srcdir) -I$(top_srcdir) \
-DLOCALEDIR=\"$(localedir)\"
AM_CFLAGS = @WARNFLAGS@ @TIRPC_CFLAGS@
-LDADD = ../lib/libnis.la
+LDADD = ../lib/libnis.la @TIRPC_LIBS@
CLEANFILES = *~ domainname
EXTRA_PROGRAMS = domainname
bin_PROGRAMS = ypwhich ypmatch ypcat yppasswd @DOMAINNAME@
-sbin_PROGRAMS = yppoll ypset
+sbin_PROGRAMS = yppoll ypset yp_dump_binding
noinst_PROGRAMS = yptest
yppasswd_SOURCES = yppasswd.c yppasswd_xdr.c
@@ -24,11 +24,10 @@
yppasswd_CFLAGS = -DPASSWD_PROG=\"${PASSWD_PROG}\" \
-DCHFN_PROG=\"${CHFN_PROG}\" -DCHSH_PROG=\"${CHSH_PROG}\"
domainname_LDADD = ../lib/yp_get_default_domain.lo ../lib/yperr_string.lo
-ypcat_LDADD = ${LDADD} ../lib/libyptools.a
-ypmatch_LDADD = ${LDADD} ../lib/libyptools.a
-ypwhich_LDADD = ${LDADD} ../lib/libyptools.a
-
-yptest_LDADD = ${LDADD} ../lib/yp_all_host.o
+ypcat_LDADD = ../lib/libyptools.a ${LDADD}
+ypmatch_LDADD = ../lib/libyptools.a ${LDADD}
+ypwhich_LDADD = ../lib/libyptools.a ${LDADD}
+yptest_LDADD = ../lib/yp_all_host.o ${LDADD}
install-exec-hook:
ln -f ${DESTDIR}${bindir}/yppasswd ${DESTDIR}${bindir}/ypchsh
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/yp-tools-3.0.1/src/yp_dump_binding.c new/yp-tools-3.3/src/yp_dump_binding.c
--- old/yp-tools-3.0.1/src/yp_dump_binding.c 1970-01-01 01:00:00.000000000 +0100
+++ new/yp-tools-3.3/src/yp_dump_binding.c 2014-12-03 16:06:47.000000000 +0100
@@ -0,0 +1,266 @@
+/* Copyright (C) 2014 Thorsten Kukuk
+ This file is part of the yp-tools.
+ Author: Thorsten Kukuk <kukuk(a)suse.de>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2 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, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <libintl.h>
+#include <locale.h>
+#include <getopt.h>
+#include <sys/stat.h>
+#include <arpa/inet.h>
+#include <rpcsvc/ypclnt.h>
+#include <rpcsvc/yp_prot.h>
+
+#ifndef _
+#define _(String) gettext (String)
+#endif
+
+#ifndef BINDINGDIR
+# define BINDINGDIR "/var/yp/binding"
+#endif
+
+/* Name and version of program. */
+/* Print the version information. */
+static void
+print_version (void)
+{
+ fprintf (stdout, "yp_dump_binding (%s) %s\n", PACKAGE, VERSION);
+ fprintf (stdout, gettext ("\
+Copyright (C) %s Thorsten Kukuk.\n\
+This is free software; see the source for copying conditions. There is NO\n\
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
+"), "2014");
+ /* fprintf (stdout, _("Written by %s.\n"), "Thorsten Kukuk"); */
+}
+
+static void
+print_usage (FILE *stream)
+{
+ fputs (_("Usage: yp_dump_binding [-d domain]\n"), stream);
+}
+
+static void
+print_help (void)
+{
+ print_usage (stdout);
+ fputs (_("yp_dump_binding - print the used NIS servers from binding directory\n\n"),
+ stdout);
+ fputs (_(" -d domain Use 'domain' instead of the default domain\n"),
+ stdout);
+ fputs (_(" -p path Use 'path' instead of the default binding directory\n"),
+ stdout);
+ fputs (_(" -v version Only dump binding information of this ypbind protocol version\n"),
+ stdout);
+ fputs (_(" -?, --help Give this help list\n"), stdout);
+ fputs (_(" --usage Give a short usage message\n"), stdout);
+ fputs (_(" --version Print program version\n"), stdout);
+}
+
+static void
+print_error (void)
+{
+ const char *program = "yp_dump_binding";
+ print_usage (stderr);
+ fprintf (stderr,
+ _("Try `%s --help' or `%s --usage' for more information.\n"),
+ program, program);
+}
+
+static void
+dump_nconf (struct netconfig *nconf, char *prefix)
+{
+ printf ("%snc_netid: %s\n", prefix, nconf->nc_netid);
+ printf ("%snc_semantics: %lu\n", prefix, nconf->nc_semantics);
+ printf ("%snc_flag: %lu\n", prefix, nconf->nc_flag);
+ printf ("%snc_protofmly: '%s'\n", prefix, nconf->nc_protofmly);
+ printf ("%snc_proto: '%s'\n", prefix, nconf->nc_proto);
+ printf ("%snc_device: '%s'\n", prefix, nconf->nc_device);
+ printf ("%snc_nlookups: %lu\n", prefix, nconf->nc_nlookups);
+}
+
+static void
+dump_binding (const char *dir, const char *domain, int version)
+{
+ char path[sizeof (dir) + strlen (domain) + 3 * sizeof (unsigned) + 3];
+
+ snprintf (path, sizeof (path), "%s/%s.%u", dir, domain, version);
+
+ if (version == 3)
+ {
+ FILE *in = fopen (path, "rce");
+ if (in != NULL)
+ {
+ struct ypbind3_binding ypb3;
+ bool_t status;
+
+ XDR xdrs;
+ xdrstdio_create (&xdrs, in, XDR_DECODE);
+ memset (&ypb3, 0, sizeof (ypb3));
+ status = xdr_ypbind3_binding (&xdrs, &ypb3);
+ xdr_destroy (&xdrs);
+
+ if (!status)
+ fprintf (stderr, _("Error reading %s\n"), path);
+ else
+ {
+ char buf[INET6_ADDRSTRLEN];
+
+ printf ("Dump of %s:\n", path);
+ printf ("\typbind_nconf:\n");
+ if (ypb3.ypbind_nconf)
+ dump_nconf (ypb3.ypbind_nconf, "\t\t");
+ else
+ printf ("\t\tNULL\n");
+
+ printf ("\typbind_svcaddr: %s:%i\n",
+ taddr2ipstr (ypb3.ypbind_nconf, ypb3.ypbind_svcaddr,
+ buf, sizeof (buf)),
+ taddr2port (ypb3.ypbind_nconf, ypb3.ypbind_svcaddr));
+
+ printf ("\typbind_servername: ");
+ if (ypb3.ypbind_servername)
+ printf ("%s\n", ypb3.ypbind_servername);
+ else
+ printf ("\tNULL\n");
+ printf ("\typbind_hi_vers: %lu\n", (u_long) ypb3.ypbind_hi_vers);
+ printf ("\typbind_lo_vers: %lu\n", (u_long) ypb3.ypbind_lo_vers);
+ }
+ xdr_free ((xdrproc_t)xdr_ypbind3_binding, &ypb3);
+ fclose (in);
+ }
+ else
+ fprintf (stderr, _("Error opening %s: %m\n"), path);
+ }
+ else
+ {
+ int fd;
+
+ fd = open (path, O_RDONLY);
+ if (fd >= 0)
+ {
+ struct ypbind2_resp ypbr;
+
+ if (pread (fd, &ypbr, sizeof (ypbr), 2) == sizeof (ypbr))
+ {
+ char straddr[INET_ADDRSTRLEN];
+ struct sockaddr_in sa;
+ sa.sin_family = AF_INET;
+ sa.sin_addr = ypbr.ypbind_respbody.ypbind_bindinfo.ypbind_binding_addr;
+ inet_ntop(sa.sin_family, &sa.sin_addr, straddr, sizeof(straddr));
+
+ printf ("Dump of %s:\n", path);
+ printf ("\tAddress: %s\n", straddr);
+ printf ("\tPort: %i\n", ntohs (ypbr.ypbind_respbody.ypbind_bindinfo.ypbind_binding_port));
+ }
+ else
+ fprintf (stderr, _("Error reading %s: %m\n"), path);
+
+ close (fd);
+ }
+ else
+ fprintf (stderr, _("Error opening %s: %m\n"), path);
+ }
+}
+
+int
+main (int argc, char **argv)
+{
+ char *bindingdir = BINDINGDIR;
+ char *domainname = NULL;
+ int vers = 0;
+
+ setlocale (LC_MESSAGES, "");
+ setlocale (LC_CTYPE, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+ while (1)
+ {
+ int c;
+ int option_index = 0;
+ static struct option long_options[] =
+ {
+ {"version", no_argument, NULL, '\255'},
+ {"usage", no_argument, NULL, '\254'},
+ {"help", no_argument, NULL, '?'},
+ {NULL, 0, NULL, '\0'}
+ };
+
+ c = getopt_long (argc, argv, "d:p:v:?", long_options, &option_index);
+ if (c == (-1))
+ break;
+ switch (c)
+ {
+ case 'd':
+ domainname = optarg;
+ break;
+ case 'p':
+ bindingdir = optarg;
+ break;
+ case 'v':
+ vers = atoi (optarg);
+ break;
+ case '?':
+ print_help ();
+ return 0;
+ case '\255':
+ print_version ();
+ return 0;
+ case '\254':
+ print_usage (stdout);
+ return 0;
+ default:
+ print_usage (stderr);
+ return 1;
+ }
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ if (argc > 1)
+ {
+ print_error ();
+ return 1;
+ }
+
+ if (domainname == NULL)
+ {
+ int error;
+
+ if ((error = yp_get_default_domain (&domainname)) != 0)
+ {
+ fprintf (stderr, _("%s: can't get local yp domain: %s\n"),
+ "yp_dump_binding", yperr_string (error));
+ return 1;
+ }
+ }
+
+ if (vers == 0 || vers == 1)
+ dump_binding (bindingdir, domainname, 1);
+ if (vers == 0 || vers == 2)
+ dump_binding (bindingdir, domainname, 2);
+ if (vers == 0 || vers == 3)
+ dump_binding (bindingdir, domainname, 3);
+
+ return 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/yp-tools-3.0.1/src/yptest.c new/yp-tools-3.3/src/yptest.c
--- old/yp-tools-3.0.1/src/yptest.c 2014-10-29 17:04:30.000000000 +0100
+++ new/yp-tools-3.3/src/yptest.c 2014-12-03 11:51:44.000000000 +0100
@@ -190,7 +190,7 @@
if (!be_quiet)
printf (_("Used NIS server: %s\n"), inet_ntoa (yp_r2.ypbind2_addr));
}
- else
+ else
{
if (yp_r3.ypbind_status != YPBIND_SUCC_VAL)
{
@@ -342,7 +342,7 @@
if (!be_quiet)
printf ("\nTest 2: ypbind\n");
-
+
if (!be_quiet)
printf (_("Use Protocol V1: "));
if (print_bindhost (domainname, hostname, 1))
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/yp-tools-3.0.1/src/ypwhich.c new/yp-tools-3.3/src/ypwhich.c
--- old/yp-tools-3.0.1/src/ypwhich.c 2014-10-28 10:01:08.000000000 +0100
+++ new/yp-tools-3.3/src/ypwhich.c 2014-12-02 15:49:08.000000000 +0100
@@ -62,7 +62,7 @@
static void
print_usage (FILE *stream)
{
- fputs (_("Usage: ypwhich [-d domain] [[-t] -m [mname]|[-n]|[-Vn] hostname] | -x\n"),
+ fputs (_("Usage: ypwhich [-d domain] [[-t] -m [mname]|[-Vn] hostname] | -x\n"),
stream);
}
@@ -76,7 +76,6 @@
stdout);
fputs (_(" -m mname Find the master NIS server for the map 'mname'\n"),
stdout);
- fputs (_(" -n Don't convert addresses to names\n"), stdout);
fputs (_(" -t Inhibits map nickname translation\n"), stdout);
fputs (_(" -V n Version of ypbind, V3 is default\n"), stdout);
fputs (_(" -x Display the map nickname translation table\n"),
1
0
Hello community,
here is the log from the commit of package zypper for openSUSE:Factory checked in at 2015-04-06 00:24:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/zypper (Old)
and /work/SRC/openSUSE:Factory/.zypper.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "zypper"
Changes:
--------
--- /work/SRC/openSUSE:Factory/zypper/zypper.changes 2015-03-16 06:58:10.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.zypper.new/zypper.changes 2015-04-06 00:24:50.000000000 +0200
@@ -1,0 +2,33 @@
+Thu Apr 2 01:13:18 CEST 2015 - ma(a)suse.de
+
+- Update zypper-po.tar.bz2
+
+-------------------------------------------------------------------
+Sun Mar 29 01:13:16 CET 2015 - ma(a)suse.de
+
+- Update zypper-po.tar.bz2
+
+-------------------------------------------------------------------
+Thu Mar 26 01:13:20 CET 2015 - ma(a)suse.de
+
+- Update zypper-po.tar.bz2
+
+-------------------------------------------------------------------
+Sun Mar 22 01:13:46 CET 2015 - ma(a)suse.de
+
+- Update zypper-po.tar.bz2
+
+-------------------------------------------------------------------
+Thu Mar 19 16:45:39 CET 2015 - ma(a)suse.de
+
+- suppress MediaChangeReport while testing multiple baseurls (bnc#899510)
+- allow repo:package to reinstall from a different repo (bnc#725867)
+- fix wrong description of --force-resolution defaults
+- version 1.11.24
+
+-------------------------------------------------------------------
+Thu Mar 12 01:13:36 CET 2015 - ma(a)suse.de
+
+- Update zypper-po.tar.bz2
+
+-------------------------------------------------------------------
@@ -5 +37,0 @@
-- Show locked packages in zypper summary (FATE#318326,FATE#318299)
Old:
----
zypper-1.11.23.tar.bz2
New:
----
zypper-1.11.24.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ zypper.spec ++++++
--- /var/tmp/diff_new_pack.jK1XO4/_old 2015-04-06 00:24:51.000000000 +0200
+++ /var/tmp/diff_new_pack.jK1XO4/_new 2015-04-06 00:24:51.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package zypper
#
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -22,7 +22,7 @@
BuildRequires: cmake >= 2.4.6
BuildRequires: gcc-c++ >= 4.7
BuildRequires: gettext-devel >= 0.15
-BuildRequires: libzypp-devel >= 14.37.0
+BuildRequires: libzypp-devel >= 14.38.0
BuildRequires: readline-devel >= 5.1
Requires: procps
%if 0%{?suse_version}
@@ -33,7 +33,7 @@
Summary: Command line software manager using libzypp
License: GPL-2.0+
Group: System/Packages
-Version: 1.11.23
+Version: 1.11.24
Release: 0
Source: %{name}-%{version}.tar.bz2
Source1: %{name}-rpmlintrc
@@ -88,7 +88,7 @@
BuildArch: noarch
%description aptitude
-provides aptitude compatibility using zypper
+provides compatibility to Debian's aptitude command using zypper
Authors:
--------
@@ -174,5 +174,7 @@
%files aptitude
%defattr(-,root,root)
%{_bindir}/aptitude
+%dir %{_sysconfdir}/zypp/apt-packagemap.d/
+%config(noreplace) %{_sysconfdir}/zypp/apt-packagemap.d/*
%changelog
++++++ zypper-1.11.23.tar.bz2 -> zypper-1.11.24.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/zypper/zypper-1.11.23.tar.bz2 /work/SRC/openSUSE:Factory/.zypper.new/zypper-1.11.24.tar.bz2 differ: char 11, line 1
1
0
Hello community,
here is the log from the commit of package libzypp for openSUSE:Factory checked in at 2015-04-06 00:24:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libzypp (Old)
and /work/SRC/openSUSE:Factory/.libzypp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes 2015-04-02 16:01:07.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes 2015-04-06 00:24:41.000000000 +0200
@@ -1,0 +2,8 @@
+Thu Apr 2 16:01:43 CEST 2015 - ma(a)suse.de
+
+- Fixes to build with gcc5
+- RepoProvideFile: Suppress MediaChangeReport while testing
+ multiple baseurls (bnc#899510)
+- version 14.38.1 (30)
+
+-------------------------------------------------------------------
Old:
----
libzypp-14.38.0.tar.bz2
New:
----
libzypp-14.38.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.8Myd4F/_old 2015-04-06 00:24:42.000000000 +0200
+++ /var/tmp/diff_new_pack.8Myd4F/_new 2015-04-06 00:24:42.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package libzypp
#
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%define force_gcc_46 0
Name: libzypp
-Version: 14.38.0
+Version: 14.38.1
Release: 0
Url: git://gitorious.org/opensuse/libzypp.git
Summary: Package, Patch, Pattern, and Product Management
++++++ libzypp-14.38.0.tar.bz2 -> libzypp-14.38.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.38.0/VERSION.cmake new/libzypp-14.38.1/VERSION.cmake
--- old/libzypp-14.38.0/VERSION.cmake 2015-03-19 16:46:37.000000000 +0100
+++ new/libzypp-14.38.1/VERSION.cmake 2015-04-02 16:03:52.000000000 +0200
@@ -61,8 +61,8 @@
SET(LIBZYPP_MAJOR "14")
SET(LIBZYPP_COMPATMINOR "30")
SET(LIBZYPP_MINOR "38")
-SET(LIBZYPP_PATCH "0")
+SET(LIBZYPP_PATCH "1")
#
-# LAST RELEASED: 14.38.0 (30)
+# LAST RELEASED: 14.38.1 (30)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.38.0/package/libzypp.changes new/libzypp-14.38.1/package/libzypp.changes
--- old/libzypp-14.38.0/package/libzypp.changes 2015-03-19 16:46:37.000000000 +0100
+++ new/libzypp-14.38.1/package/libzypp.changes 2015-04-02 16:03:52.000000000 +0200
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Thu Apr 2 16:01:43 CEST 2015 - ma(a)suse.de
+
+- Fixes to build with gcc5
+- RepoProvideFile: Suppress MediaChangeReport while testing
+ multiple baseurls (bnc#899510)
+- version 14.38.1 (30)
+
+-------------------------------------------------------------------
Thu Mar 19 16:44:39 CET 2015 - ma(a)suse.de
- Suppress MediaChangeReport while testing multiple baseurls (bnc#899510)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-14.38.0/zypp/target/TargetImpl.cc new/libzypp-14.38.1/zypp/target/TargetImpl.cc
--- old/libzypp-14.38.0/zypp/target/TargetImpl.cc 2015-01-07 13:05:00.000000000 +0100
+++ new/libzypp-14.38.1/zypp/target/TargetImpl.cc 2015-04-01 14:01:15.000000000 +0200
@@ -1059,7 +1059,7 @@
cmd << " > '" << tmpsolv.path() << "'";
- MIL << "Executing: " << cmd << endl;
+ MIL << "Executing: " << cmd.str() << endl;
ExternalProgram prog( cmd.str(), ExternalProgram::Stderr_To_Stdout );
cmd << endl;
1
0
Hello community,
here is the log from the commit of package ibus for openSUSE:Factory checked in at 2015-04-06 00:24:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ibus (Old)
and /work/SRC/openSUSE:Factory/.ibus.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ibus"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ibus/ibus.changes 2015-03-16 06:54:47.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ibus.new/ibus.changes 2015-04-06 00:24:34.000000000 +0200
@@ -1,0 +2,8 @@
+Sat Mar 28 09:30:59 UTC 2015 - ftake(a)geeko.jp
+
+- Fix boo#924696: settings of ibus engines are not saved
+ * Remove inappropriate %ghost from the dconf files
+- Disable appindicator for 13.1
+ * It requires Qt 5.3 to show icons specified by absolute path
+
+-------------------------------------------------------------------
@@ -4 +12 @@
-- Update to 1.5.9
+- Update to 1.5.10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ibus.spec ++++++
--- /var/tmp/diff_new_pack.gSfTCQ/_old 2015-04-06 00:24:34.000000000 +0200
+++ /var/tmp/diff_new_pack.gSfTCQ/_new 2015-04-06 00:24:34.000000000 +0200
@@ -260,6 +260,9 @@
%if %{with_wayland}
--enable-wayland \
%endif
+%if 0%{?suse_version} < 1320
+ --disable-appindicator \
+%endif
--enable-surrounding-text \
--libexecdir=%{_libdir}/ibus
@@ -366,11 +369,12 @@
%{_datadir}/pixmaps/ibus-keyboard.png
%{_libdir}/ibus
%{_datadir}/bash-completion/completions/ibus.bash
-%dir %config %{_sysconfdir}/dconf/db/ibus.d
-# These files are not config files. Users must not modify them.
-%ghost %{_sysconfdir}/dconf/db/ibus.d/00-upstream-settings
+# This file is generated by dconf update
%ghost %{_sysconfdir}/dconf/db/ibus
-%ghost %{_sysconfdir}/dconf/profile/ibus
+%dir %{_sysconfdir}/dconf/db/ibus.d
+# This file is not a config file. Users may not modify it.
+%{_sysconfdir}/dconf/db/ibus.d/00-upstream-settings
+%{_sysconfdir}/dconf/profile/ibus
%{_mandir}/man1/ibus.1.gz
%{_mandir}/man1/ibus-daemon.1.gz
%{_mandir}/man1/ibus-setup.1.gz
1
0
Hello community,
here is the log from the commit of package yast2-ruby-bindings for openSUSE:Factory checked in at 2015-04-06 00:24:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ruby-bindings (Old)
and /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-ruby-bindings"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ruby-bindings/yast2-ruby-bindings.changes 2015-03-16 09:40:49.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new/yast2-ruby-bindings.changes 2015-04-06 00:24:22.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Apr 1 15:38:04 UTC 2015 - ancor(a)suse.com
+
+- Added new RSpec argument matcher: path_matching
+- 3.1.31
+
+-------------------------------------------------------------------
Old:
----
yast2-ruby-bindings-3.1.30.tar.bz2
New:
----
yast2-ruby-bindings-3.1.31.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ruby-bindings.spec ++++++
--- /var/tmp/diff_new_pack.pLUwtg/_old 2015-04-06 00:24:23.000000000 +0200
+++ /var/tmp/diff_new_pack.pLUwtg/_new 2015-04-06 00:24:23.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-ruby-bindings
-Version: 3.1.30
+Version: 3.1.31
Release: 0
Url: https://github.com/yast/yast-ruby-bindings
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-ruby-bindings-3.1.30.tar.bz2 -> yast2-ruby-bindings-3.1.31.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.30/package/yast2-ruby-bindings.changes new/yast2-ruby-bindings-3.1.31/package/yast2-ruby-bindings.changes
--- old/yast2-ruby-bindings-3.1.30/package/yast2-ruby-bindings.changes 2015-03-05 18:25:14.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.31/package/yast2-ruby-bindings.changes 2015-04-02 12:55:15.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Apr 1 15:38:04 UTC 2015 - ancor(a)suse.com
+
+- Added new RSpec argument matcher: path_matching
+- 3.1.31
+
+-------------------------------------------------------------------
Thu Mar 5 15:15:07 UTC 2015 - mvidner(a)suse.com
- Fix building with yast2-core-3.1.16: use C++11 like core does
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.30/package/yast2-ruby-bindings.spec new/yast2-ruby-bindings-3.1.31/package/yast2-ruby-bindings.spec
--- old/yast2-ruby-bindings-3.1.30/package/yast2-ruby-bindings.spec 2015-03-05 18:25:14.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.31/package/yast2-ruby-bindings.spec 2015-04-02 12:55:15.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-ruby-bindings
-Version: 3.1.30
+Version: 3.1.31
Url: https://github.com/yast/yast-ruby-bindings
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.30/src/ruby/yast/rspec/matchers.rb new/yast2-ruby-bindings-3.1.31/src/ruby/yast/rspec/matchers.rb
--- old/yast2-ruby-bindings-3.1.30/src/ruby/yast/rspec/matchers.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.31/src/ruby/yast/rspec/matchers.rb 2015-04-02 12:55:15.000000000 +0200
@@ -0,0 +1,40 @@
+require "rspec"
+require "yast"
+
+module Yast
+ module RSpec
+ # RSpec extension to add YaST-specific matchers
+ module Matchers
+ # Matches arguments of type YaST::Path whose string representation matches
+ # the provided regular expression
+ #
+ # @example
+ # expect(Yast::SCR).to receive(:Read).with(path_matching(/^\.sysconfig\.nfs/))
+ def path_matching(match)
+ PathMatchingMatcher.new(match)
+ end
+
+ # @private
+ class PathMatchingMatcher
+ def initialize(expected)
+ @expected = Regexp.new(expected)
+ end
+
+ # RSpec 3 uses === while RSpec 2 uses ==
+ # Thus, implementing just == should work with both
+ def ==(other)
+ return false unless other.is_a?(Yast::Path)
+ other.to_s =~ @expected ? true : false
+ end
+
+ def description
+ "path_matching(#{(a)expected.inspect})"
+ end
+
+ def inspect
+ description
+ end
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.30/src/ruby/yast/rspec.rb new/yast2-ruby-bindings-3.1.31/src/ruby/yast/rspec.rb
--- old/yast2-ruby-bindings-3.1.30/src/ruby/yast/rspec.rb 2015-03-05 18:25:14.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.31/src/ruby/yast/rspec.rb 2015-04-02 12:55:15.000000000 +0200
@@ -1,7 +1,9 @@
require 'yast/rspec/scr'
require 'yast/rspec/shortcuts'
+require 'yast/rspec/matchers'
RSpec.configure do |c|
c.include Yast::RSpec::Shortcuts
c.include Yast::RSpec::SCR
+ c.include Yast::RSpec::Matchers
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.30/tests/ruby/rspec_matchers_spec.rb new/yast2-ruby-bindings-3.1.31/tests/ruby/rspec_matchers_spec.rb
--- old/yast2-ruby-bindings-3.1.30/tests/ruby/rspec_matchers_spec.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.31/tests/ruby/rspec_matchers_spec.rb 2015-04-02 12:55:15.000000000 +0200
@@ -0,0 +1,38 @@
+#!/usr/bin/env rspec
+
+require_relative "test_helper"
+
+require "yast/rspec"
+
+describe Yast::RSpec::Matchers do
+ describe "#path_matching" do
+ it "matches if the path is identical" do
+ path = Yast::Path.new(".etc")
+ expect(path).to receive(:+).with(path_matching('\.fstab'))
+ .and_return "success"
+
+ expect(path + path(".fstab")).to eq "success"
+ end
+
+ it "does not match if the argument is not a YaST Path" do
+ path = Yast::Path.new(".etc")
+ expect(path).to_not receive(:+).with(path_matching('\.fstab'))
+
+ path + ".fstab"
+ end
+
+ it "matches a simple regular expression" do
+ expect(Yast::SCR).to receive(:Read)
+ .with(path_matching(/target.*ir$/)).and_return "success"
+
+ expect(Yast::SCR.Read(path(".target.dir"))).to eq "success"
+ end
+
+ it "does not match if the regexp does not match" do
+ expect(Yast::SCR).to_not receive(:Read)
+ .with(path_matching(/target.*ir$/))
+
+ Yast::SCR.Read(path(".etc"))
+ end
+ end
+end
1
0
Hello community,
here is the log from the commit of package linuxrc for openSUSE:Factory checked in at 2015-04-06 00:24:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/linuxrc (Old)
and /work/SRC/openSUSE:Factory/.linuxrc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "linuxrc"
Changes:
--------
--- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes 2015-03-23 12:14:48.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.linuxrc.new/linuxrc.changes 2015-04-06 00:24:16.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Apr 2 10:51:21 CEST 2015 - snwint(a)suse.com
+
+- match mac addresses case-insensitive (bnc #924872)
+- 5.0.35
+
+-------------------------------------------------------------------
Old:
----
linuxrc-5.0.34.tar.xz
New:
----
linuxrc-5.0.35.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.ImPEWe/_old 2015-04-06 00:24:16.000000000 +0200
+++ /var/tmp/diff_new_pack.ImPEWe/_new 2015-04-06 00:24:16.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package linuxrc
#
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -25,7 +25,7 @@
Summary: SUSE Installation Program
License: GPL-3.0+
Group: System/Boot
-Version: 5.0.34
+Version: 5.0.35
Release: 0
Source: %{name}-%{version}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ linuxrc-5.0.34.tar.xz -> linuxrc-5.0.35.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.34/VERSION new/linuxrc-5.0.35/VERSION
--- old/linuxrc-5.0.34/VERSION 2015-03-18 16:32:48.000000000 +0100
+++ new/linuxrc-5.0.35/VERSION 2015-04-02 10:50:02.000000000 +0200
@@ -1 +1 @@
-5.0.34
+5.0.35
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.34/changelog new/linuxrc-5.0.35/changelog
--- old/linuxrc-5.0.34/changelog 2015-03-18 16:32:48.000000000 +0100
+++ new/linuxrc-5.0.35/changelog 2015-04-02 10:50:02.000000000 +0200
@@ -1,3 +1,6 @@
+2015-04-02: 5.0.35
+ - match mac addresses case-insensitive (bnc #924872)
+
2015-03-18: 5.0.34
- update copyright string
- verify also rpm signatures
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.34/net.c new/linuxrc-5.0.35/net.c
--- old/linuxrc-5.0.34/net.c 2015-03-18 16:32:48.000000000 +0100
+++ new/linuxrc-5.0.35/net.c 2015-04-02 10:50:02.000000000 +0200
@@ -1665,7 +1665,7 @@
for(sl = config.ethtool; sl; sl = sl->next) {
if(
(device && !fnmatch(sl->key, device, 0)) ||
- (hwaddr && !fnmatch(sl->key, hwaddr, 0))
+ (hwaddr && !fnmatch(sl->key, hwaddr, FNM_CASEFOLD))
) {
if(s) {
strprintf(&s, "%s %s", s, sl->value);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.34/util.c new/linuxrc-5.0.35/util.c
--- old/linuxrc-5.0.34/util.c 2015-03-18 16:32:48.000000000 +0100
+++ new/linuxrc-5.0.35/util.c 2015-04-02 10:50:02.000000000 +0200
@@ -3664,7 +3664,7 @@
if(
(device && !fnmatch(key, device, 0)) ||
- (hwaddr && !fnmatch(key, hwaddr, 0))
+ (hwaddr && !fnmatch(key, hwaddr, FNM_CASEFOLD))
) return 1;
return 0;
1
0
Hello community,
here is the log from the commit of package libkolab for openSUSE:Factory checked in at 2015-04-06 00:24:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libkolab (Old)
and /work/SRC/openSUSE:Factory/.libkolab.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libkolab"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libkolab/libkolab.changes 2014-12-16 14:51:00.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libkolab.new/libkolab.changes 2015-04-06 00:24:11.000000000 +0200
@@ -1,0 +2,27 @@
+Thu Apr 2 08:29:12 UTC 2015 - aj(a)ajaissle.de
+
+- Add upstream patch:
+ + libkolab-0.6.0_check_for_generic_tag.patch
+ Make libkolab compile with upstream kdepimlibs where GENERIC
+ tags are not yet included.
+
+-------------------------------------------------------------------
+Wed Apr 1 17:24:27 UTC 2015 - aj(a)ajaissle.de
+
+- New upstream release 0.6.0
+- Added upstream patches:
+ + 0001-Add-support-for-exceptions.patch
+ Add support to read/write exceptions to iCal
+ + 0002-Support-for-THISANDFUTURE.patch
+ Add support to convert ThisAndFuture from and to iCal
+ + 0003-Move-QT_DECLARE_METADATA-logic-to-cmake.patch
+ Fix double declaration of KCalCore::Duration when building with
+ libcalendaring >= 4.9.1
+- Add %bcond_with tests to enable %check section when required
+
+-------------------------------------------------------------------
+Sat Mar 28 12:53:59 UTC 2015 - aj(a)ajaissle.de
+
+- Convert %with_kde to %bcond_without kde
+
+-------------------------------------------------------------------
Old:
----
libkolab-0.5.3.tar.gz
New:
----
0001-Add-support-for-exceptions.patch
0002-Support-for-THISANDFUTURE.patch
0003-Move-QT_DECLARE_METADATA-logic-to-cmake.patch
libkolab-0.6.0.tar.gz
libkolab-0.6.0_check_for_generic_tag.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libkolab.spec ++++++
--- /var/tmp/diff_new_pack.ZG1wNs/_old 2015-04-06 00:24:11.000000000 +0200
+++ /var/tmp/diff_new_pack.ZG1wNs/_new 2015-04-06 00:24:11.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package libkolab
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,32 +15,42 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-%define with_kde 1
+
%if 0%{?suse_version} < 1230 || 0%{?suse_version} == 1315
-%define with_kde 0
+%define _without_kde 1
%endif
+%bcond_without kde
+%bcond_with tests
%define php_extdir %{_libdir}/php5/extensions
%define php_confdir %{_sysconfdir}/php5/conf.d
%define libname %{name}0
Name: libkolab
-Version: 0.5.3
+Version: 0.6.0
Release: 0
Summary: Conversions from/to KDE containers
License: LGPL-2.0+ and LGPL-3.0+ and AGPL-3.0+
Group: Development/Libraries/C and C++
Url: https://kolab.org/about/libkolab
Source: http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM 0001-Add-support-for-exceptions.patch
+Patch0001: 0001-Add-support-for-exceptions.patch
+# PATCH-FIX-UPSTREAM 0002-Support-for-THISANDFUTURE.patch
+Patch0002: 0002-Support-for-THISANDFUTURE.patch
+# PATCH-FIX-UPSTREAM 0003-Move-QT_DECLARE_METADATA-logic-to-cmake.patch
+Patch0003: 0003-Move-QT_DECLARE_METADATA-logic-to-cmake.patch
+# PATCH-FIX-UPSTREAM libkolab-0.6.0_check_for_generic_tag.patch
+Patch0100: libkolab-0.6.0_check_for_generic_tag.patch
BuildRequires: boost-devel
BuildRequires: cmake >= 2.6
-BuildRequires: libxerces-c-devel
BuildRequires: libkolabxml-devel >= 1.0
BuildRequires: libqt4-devel
+BuildRequires: libxerces-c-devel
BuildRequires: php-devel >= 5.3
BuildRequires: python-devel
BuildRequires: swig >= 2.0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%if 0%{?with_kde}
+%if %{with kde}
BuildRequires: libkdepimlibs4-devel >= 4.9
%else
BuildRequires: libcalendaring-devel
@@ -90,7 +100,7 @@
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
Requires: libXerces-c-devel
-%if 0%{?with_kde}
+%if %{with kde}
Requires: libkdepimlibs4-devel >= 4.9
%else
Requires: libcalendaring-devel
@@ -104,6 +114,10 @@
%prep
%setup -q
+%patch0001 -p1
+%patch0002 -p1
+%patch0003 -p1
+%patch0100 -p1
# Lower cmake requirements for SLE 11
%if 0%{?suse_version} < 1140
@@ -121,14 +135,18 @@
# TESTS: require X and most fail anyway
%cmake \
-DLibkolabxml_DIR=%{_libdir}/cmake/Libkolabxml \
-%if 0%{?with_kde}
+%if %{with kde}
-DUSE_LIBCALENDARING=FALSE \
%else
-DUSE_LIBCALENDARING=TRUE \
%endif
-DPHP_BINDINGS=TRUE -DPHP_INSTALL_DIR=%{php_extdir} \
-DPYTHON_BINDINGS=TRUE -DPYTHON_INSTALL_DIR=%{python_sitearch} \
+%if %{with tests}
+ -DBUILD_TESTS=TRUE \
+%else
-DBUILD_TESTS=FALSE \
+%endif
%if 0%{?suse_version} < 1310
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \
-DLIB_INSTALL_DIR=%{_lib} \
@@ -141,16 +159,16 @@
# cmake: with earlier releases, we have to change dir manually, as %%cmake_install is not available
%if 0%{?suse_version} < 1310
cd build/
-%{__make} DESTDIR=%{buildroot} install
+make DESTDIR=%{buildroot} install
%else
%cmake_install
%endif
-mkdir -p %{buildroot}/%{_datadir}/php5
-mv %{buildroot}/%{php_extdir}/*.php %{buildroot}/%{_datadir}/php5/.
+mkdir -p %{buildroot}%{_datadir}/php5
+mv %{buildroot}%{php_extdir}/*.php %{buildroot}%{_datadir}/php5/.
-mkdir -p %{buildroot}/%{php_confdir}
-cat >%{buildroot}/%{php_confdir}/kolab.ini <<EOF
+mkdir -p %{buildroot}%{php_confdir}
+cat >%{buildroot}%{php_confdir}/kolab.ini <<EOF
; Kolab libraries
extension=kolabcalendaring.so
extension=kolabicalendar.so
@@ -158,6 +176,23 @@
extension=kolabshared.so
EOF
+cat >%{buildroot}%{php_confdir}/kolabdummy.ini <<EOF
+; Kolab libraries
+extension=dummy.so
+EOF
+
+%if %{with tests}
+%check
+cd build/tests
+./benchmarktest || :
+./calendaringtest || :
+./formattest || :
+./freebusytest || :
+./icalendartest || :
+./kcalconversiontest || :
+./upgradetest || :
+%endif
+
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
@@ -170,6 +205,7 @@
%files -n php-%{libname}
%defattr(-,root,root)
%config(noreplace) %{php_confdir}/kolab.ini
+%config(noreplace) %{php_confdir}/kolabdummy.ini
%{_datadir}/php5/kolabcalendaring.php
%{php_extdir}/kolabcalendaring.so
%{_datadir}/php5/kolabicalendar.php
@@ -178,6 +214,8 @@
%{php_extdir}/kolabobject.so
%{_datadir}/php5/kolabshared.php
%{php_extdir}/kolabshared.so
+%{_datadir}/php5/dummy.php
+%{php_extdir}/dummy.so
%files -n python-%{libname}
%defattr(-,root,root)
++++++ 0001-Add-support-for-exceptions.patch ++++++
>From ad9c52c79a3b5de87bfa7a3f45e207e6d6ee1d4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sandro=20Knau=C3=9F?= <mail(a)sandroknauss.de>
Date: Wed, 18 Feb 2015 16:54:47 +0100
Subject: [PATCH 1/2] Add support for exceptions.
Read/Write Exceptions to iCal.
KOLAB: #4618
---
icalendar/icalendar.cpp | 34 +++++++++++++++--
tests/icalendartest.cpp | 53 ++++++++++++++++++++++++++-
tests/icalendartest.h | 3 ++
tests/testfiles/v3/event/errorswithsameid.ics | 45 +++++++++++++++++++++++
tests/testfiles/v3/event/exceptions.ics | 35 ++++++++++++++++++
5 files changed, 166 insertions(+), 4 deletions(-)
create mode 100644 tests/testfiles/v3/event/errorswithsameid.ics
create mode 100644 tests/testfiles/v3/event/exceptions.ics
diff --git a/icalendar/icalendar.cpp b/icalendar/icalendar.cpp
index be7c0e6..3ed41ae 100644
--- a/icalendar/icalendar.cpp
+++ b/icalendar/icalendar.cpp
@@ -39,13 +39,21 @@ std::string toICal(const std::vector<Event> &events)
KCalCore::Calendar::Ptr calendar(new KCalCore::MemoryCalendar(Kolab::Conversion::getTimeSpec(true, std::string())));
foreach (const Event &event, events) {
KCalCore::Event::Ptr kcalEvent = Conversion::toKCalCore(event);
- kcalEvent->setCreated(KDateTime::currentUtcDateTime()); //sets dtstamp
+ if (!kcalEvent->created().isValid()) {
+ kcalEvent->setCreated(KDateTime::currentUtcDateTime()); //sets dtstamp
+ }
calendar->addEvent(kcalEvent);
+ foreach(const Event &exception, event.exceptions()) {
+ KCalCore::Event::Ptr kcalException = Conversion::toKCalCore(exception);
+ if (!kcalException->created().isValid()) {
+ kcalException->setCreated(KDateTime::currentUtcDateTime()); //sets dtstamp
+ }
+ calendar->addEvent(kcalException);
+ }
}
KCalCore::ICalFormat format;
format.setApplication("libkolab", LIBKOLAB_LIB_VERSION_STRING);
// qDebug() << format.createScheduleMessage(calendar->events().first(), KCalCore::iTIPRequest);
-
return Conversion::toStdString(format.toString(calendar));
}
@@ -57,8 +65,28 @@ std::vector< Event > fromICalEvents(const std::string &input)
format.setApplication("libkolab", LIBKOLAB_LIB_VERSION_STRING);
format.fromString(calendar, Conversion::fromStdString(input));
std::vector<Event> events;
+ QMap< QString, int > uidMap;
foreach (const KCalCore::Event::Ptr &event, calendar->events()) {
- events.push_back(Conversion::fromKCalCore(*event));
+ Event e = Conversion::fromKCalCore(*event);
+ if (!e.recurrenceID().isValid()) {
+ if (uidMap.contains(event->uid())) {
+ e.setExceptions(events.at(uidMap[event->uid()]).exceptions());
+ events[uidMap[event->uid()]] = e;
+ } else {
+ events.push_back(e);
+ uidMap.insert(event->uid(), events.size()-1);
+ }
+ } else {
+ if (!uidMap.contains(event->uid())) {
+ Event e;
+ e.setUid("");
+ events.push_back(e);
+ uidMap.insert(event->uid(), events.size()-1);
+ }
+ std::vector<Event> exceptions = events.at( uidMap[event->uid()]).exceptions();
+ exceptions.push_back(e);
+ events.at(uidMap[event->uid()]).setExceptions(exceptions);
+ }
}
return events;
}
diff --git a/tests/icalendartest.cpp b/tests/icalendartest.cpp
index 1e13d65..b1dd60b 100644
--- a/tests/icalendartest.cpp
+++ b/tests/icalendartest.cpp
@@ -24,6 +24,8 @@
#include "icalendar/icalendar.h"
#include "testhelpers.h"
+#include "testutils.h"
+#include <kolabformat/kolabobject.h>
void ICalendarTest::testFromICalEvent()
{
@@ -32,11 +34,60 @@ void ICalendarTest::testFromICalEvent()
ev1.setStart(Kolab::cDateTime(2011,10,10,12,1,1,true));
ev1.setEnd(Kolab::cDateTime(2011,10,11,12,1,1,true));
events.push_back(ev1);
- events.push_back(ev1);
const std::vector<Kolab::Event> &result = Kolab::fromICalEvents(Kolab::toICal(events));
qDebug() << QString::fromStdString(Kolab::toICal(result));
}
+void ICalendarTest::testFromICalEventWithExceptions()
+{
+ QFile icalFile( getPath("v3/event/exceptions.ics") );
+ QVERIFY( icalFile.open( QFile::ReadOnly ) );
+ std::vector<Kolab::Event> events = Kolab::fromICalEvents(icalFile.readAll().constData());
+ QCOMPARE((int)events.size(), 1);
+ Kolab::Event out = events.at(0);
+ QCOMPARE((int)out.exceptions().size(), 2);
+}
+
+void ICalendarTest::testFromICalEventErrorsWithSameID()
+{
+ /* This is not a really usecase, it should make sure,
+ * that the underlying KCalCore strips out events with same uid/or recurrenceID.
+ * 2015/02/18: KCaclCore is only returns one event with one exception for the icalFile
+ * testdata/v3/event/errorswithsameid.ics
+ */
+ QFile icalFile( getPath("v3/event/errorswithsameid.ics") );
+ QVERIFY( icalFile.open( QFile::ReadOnly ) );
+ std::vector<Kolab::Event> events = Kolab::fromICalEvents(icalFile.readAll().constData());
+ QCOMPARE((int)events.size(), 1);
+ Kolab::Event out = events.at(0);
+ QCOMPARE((int)out.exceptions().size(), 1);
+}
+
+void ICalendarTest::testReadWriteForEventWithExceptions()
+{
+ std::vector<Kolab::Event> events;
+ Kolab::Event ev1;
+ ev1.setUid("uid");
+ ev1.setStart(Kolab::cDateTime(2011,10,10,12,1,1,true));
+ ev1.setEnd(Kolab::cDateTime(2011,10,11,12,1,1,true));
+ std::vector<Kolab::Event> exceptions;
+ Kolab::Event ex1;
+ ex1.setUid(ev1.uid());
+ ex1.setRecurrenceID(Kolab::cDateTime(2011,10,11,12,1,1,true), false);
+ exceptions.push_back(ex1);
+ ev1.setExceptions(exceptions);
+ Kolab::RecurrenceRule rrule;
+ rrule.setInterval(1);
+ rrule.setFrequency(Kolab::RecurrenceRule::Daily);
+ ev1.setRecurrenceRule(rrule);
+ events.push_back(ev1);
+ const std::vector<Kolab::Event> &result = Kolab::fromICalEvents(Kolab::toICal(events));
+ Kolab::Event out = result.at(0);
+ QCOMPARE((int)result.size(), 1);
+ QCOMPARE((int)out.exceptions().size(), 1);
+ QCOMPARE(out.exceptions().at(0).recurrenceID(), ex1.recurrenceID());
+}
+
void ICalendarTest::testToICal()
{
std::vector<Kolab::Event> events;
diff --git a/tests/icalendartest.h b/tests/icalendartest.h
index 4f82ecc..7e1f405 100644
--- a/tests/icalendartest.h
+++ b/tests/icalendartest.h
@@ -27,6 +27,9 @@ private slots:
// void testEventConflict_data();
void testToICal();
void testFromICalEvent();
+ void testFromICalEventWithExceptions();
+ void testReadWriteForEventWithExceptions();
+ void testFromICalEventErrorsWithSameID();
void testToITip();
void testToIMip();
diff --git a/tests/testfiles/v3/event/errorswithsameid.ics b/tests/testfiles/v3/event/errorswithsameid.ics
new file mode 100644
index 0000000..1aa12a3
--- /dev/null
+++ b/tests/testfiles/v3/event/errorswithsameid.ics
@@ -0,0 +1,45 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Test//
+CALSCALE:GREGORIAN
+BEGIN:VEVENT
+UID:D5A98F4AD36FE911EC7FB8F89209C4E3-FCBB6C4091F28CA0
+DTSTAMP;VALUE=DATE-TIME:20150216T000000Z
+CREATED;VALUE=DATE-TIME:20150216T000000Z
+LAST-MODIFIED;VALUE=DATE-TIME:20150216T000000Z
+RRULE:FREQ=DAILY;INTERVAL=1
+SUMMARY:Daily
+DTSTART;VALUE=DATE-TIME:20150101T010000Z
+DTEND;VALUE=DATE-TIME:20150101T020000Z
+END:VEVENT
+BEGIN:VEVENT
+UID:D5A98F4AD36FE911EC7FB8F89209C4E3-FCBB6C4091F28CA0
+DTSTAMP;VALUE=DATE-TIME:20150216T000000Z
+CREATED;VALUE=DATE-TIME:20150216T000000Z
+LAST-MODIFIED;VALUE=DATE-TIME:20150216T000000Z
+RECURRENCE-ID;VALUE=DATE-TIME;RANGE=THISANDFUTURE:20150103T000000Z
+SUMMARY:thisandfuture
+DTSTART;VALUE=DATE-TIME:20150103T020000Z
+DTEND;VALUE=DATE-TIME:20150103T030000Z
+END:VEVENT
+BEGIN:VEVENT
+UID:D5A98F4AD36FE911EC7FB8F89209C4E3-FCBB6C4091F28CA0
+DTSTAMP;VALUE=DATE-TIME:20150216T000000Z
+CREATED;VALUE=DATE-TIME:20150216T000000Z
+LAST-MODIFIED;VALUE=DATE-TIME:20150216T000000Z
+RRULE:FREQ=DAILY;INTERVAL=1
+SUMMARY:Invalid second incidence
+DTSTART;VALUE=DATE-TIME:20150101T050000Z
+DTEND;VALUE=DATE-TIME:20150101T060000Z
+END:VEVENT
+BEGIN:VEVENT
+UID:D5A98F4AD36FE911EC7FB8F89209C4E3-FCBB6C4091F28CA0
+DTSTAMP;VALUE=DATE-TIME:20150216T000000Z
+CREATED;VALUE=DATE-TIME:20150216T000000Z
+LAST-MODIFIED;VALUE=DATE-TIME:20150216T000000Z
+RECURRENCE-ID;VALUE=DATE-TIME:20150103T000000Z
+SUMMARY: same recurence id like the one with THISANDFUTURE
+DTSTART;VALUE=DATE-TIME:20150103T030000Z
+DTEND;VALUE=DATE-TIME:20150103T040000Z
+END:VEVENT
+END:VCALENDAR
\ No newline at end of file
diff --git a/tests/testfiles/v3/event/exceptions.ics b/tests/testfiles/v3/event/exceptions.ics
new file mode 100644
index 0000000..60776c6
--- /dev/null
+++ b/tests/testfiles/v3/event/exceptions.ics
@@ -0,0 +1,35 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Test//
+CALSCALE:GREGORIAN
+BEGIN:VEVENT
+UID:D5A98F4AD36FE911EC7FB8F89209C4E3-FCBB6C4091F28CA0
+DTSTAMP;VALUE=DATE-TIME:20150216T000000Z
+CREATED;VALUE=DATE-TIME:20150216T000000Z
+LAST-MODIFIED;VALUE=DATE-TIME:20150216T000000Z
+RRULE:FREQ=DAILY;INTERVAL=1
+SUMMARY:Daily
+DTSTART;VALUE=DATE-TIME:20150101T010000Z
+DTEND;VALUE=DATE-TIME:20150101T020000Z
+END:VEVENT
+BEGIN:VEVENT
+UID:D5A98F4AD36FE911EC7FB8F89209C4E3-FCBB6C4091F28CA0
+DTSTAMP;VALUE=DATE-TIME:20150216T000000Z
+CREATED;VALUE=DATE-TIME:20150216T000000Z
+LAST-MODIFIED;VALUE=DATE-TIME:20150216T000000Z
+RECURRENCE-ID;VALUE=DATE-TIME;RANGE=THISANDFUTURE:20150103T000000Z
+SUMMARY:thisandfuture
+DTSTART;VALUE=DATE-TIME:20150103T020000Z
+DTEND;VALUE=DATE-TIME:20150103T030000Z
+END:VEVENT
+BEGIN:VEVENT
+UID:D5A98F4AD36FE911EC7FB8F89209C4E3-FCBB6C4091F28CA0
+DTSTAMP;VALUE=DATE-TIME:20150216T000000Z
+CREATED;VALUE=DATE-TIME:20150216T000000Z
+LAST-MODIFIED;VALUE=DATE-TIME:20150216T000000Z
+RECURRENCE-ID;VALUE=DATE-TIME:20150104T000000Z
+SUMMARY: exception
+DTSTART;VALUE=DATE-TIME:20150104T030000Z
+DTEND;VALUE=DATE-TIME:20150104T040000Z
+END:VEVENT
+END:VCALENDAR
\ No newline at end of file
--
2.1.0
++++++ 0002-Support-for-THISANDFUTURE.patch ++++++
>From b756fa4ceef4b953859878f3c700ed45ecaed409 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sandro=20Knau=C3=9F?= <mail(a)sandroknauss.de>
Date: Wed, 18 Feb 2015 16:50:59 +0100
Subject: [PATCH 2/2] Support for THISANDFUTURE
convert ThisAndFuture from/to iCal.
KOLAB: 4654
---
conversion/kcalconversion.cpp | 7 ++++---
tests/icalendartest.cpp | 3 ++-
tests/kcalconversiontest.cpp | 20 ++++++++++++++++++--
3 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/conversion/kcalconversion.cpp b/conversion/kcalconversion.cpp
index a82b6a2..b06a5d0 100644
--- a/conversion/kcalconversion.cpp
+++ b/conversion/kcalconversion.cpp
@@ -661,7 +661,8 @@ void setTodoEvent(KCalCore::Incidence &i, const T &e)
i.setNonKDECustomProperty(CUSTOM_KOLAB_URL, fromStdString(e.url()));
}
if (e.recurrenceID().isValid()) {
- i.setRecurrenceId(toDate(e.recurrenceID())); //TODO THISANDFUTURE
+ i.setRecurrenceId(toDate(e.recurrenceID()));
+ i.setThisAndFuture(e.thisAndFuture());
}
setRecurrence(i, e);
foreach (const Kolab::Alarm a, e.alarms()) {
@@ -699,7 +700,7 @@ void setTodoEvent(KCalCore::Incidence &i, const T &e)
alarm->setSnoozeTime(toDuration(a.duration()));
alarm->setRepeatCount(a.numrepeat());
alarm->setEnabled(true);
- i.addAlarm(alarm);
+ i.addAlarm(alarm);
}
}
@@ -712,7 +713,7 @@ void getTodoEvent(T &i, const I &e)
i.setOrganizer(Kolab::ContactReference(Kolab::ContactReference::EmailReference, toStdString(e.organizer()->email()), toStdString(e.organizer()->name()))); //TODO handle uid too
}
i.setUrl(toStdString(e.nonKDECustomProperty(CUSTOM_KOLAB_URL)));
- i.setRecurrenceID(fromDate(e.recurrenceId()), false); //TODO THISANDFUTURE
+ i.setRecurrenceID(fromDate(e.recurrenceId()), e.thisAndFuture());
getRecurrence(i, e);
std::vector <Kolab::Alarm> alarms;
foreach (const KCalCore::Alarm::Ptr &a, e.alarms()) {
diff --git a/tests/icalendartest.cpp b/tests/icalendartest.cpp
index b1dd60b..bf55031 100644
--- a/tests/icalendartest.cpp
+++ b/tests/icalendartest.cpp
@@ -73,7 +73,7 @@ void ICalendarTest::testReadWriteForEventWithExceptions()
std::vector<Kolab::Event> exceptions;
Kolab::Event ex1;
ex1.setUid(ev1.uid());
- ex1.setRecurrenceID(Kolab::cDateTime(2011,10,11,12,1,1,true), false);
+ ex1.setRecurrenceID(Kolab::cDateTime(2011,10,11,12,1,1,true), true);
exceptions.push_back(ex1);
ev1.setExceptions(exceptions);
Kolab::RecurrenceRule rrule;
@@ -86,6 +86,7 @@ void ICalendarTest::testReadWriteForEventWithExceptions()
QCOMPARE((int)result.size(), 1);
QCOMPARE((int)out.exceptions().size(), 1);
QCOMPARE(out.exceptions().at(0).recurrenceID(), ex1.recurrenceID());
+ QCOMPARE(out.exceptions().at(0).thisAndFuture(), true);
}
void ICalendarTest::testToICal()
diff --git a/tests/kcalconversiontest.cpp b/tests/kcalconversiontest.cpp
index c62a8e0..e1d4ca9 100644
--- a/tests/kcalconversiontest.cpp
+++ b/tests/kcalconversiontest.cpp
@@ -162,7 +162,7 @@ void KCalConversionTest::testConversion_data()
kcal.setDtEnd(toDate(date2));
kcal.setTransparency(KCalCore::Event::Transparent);
- kcal.setRecurrenceId(toDate(date2)); //TODO THISANDFUTURE
+ kcal.setRecurrenceId(toDate(date2));
kcal.recurrence()->setDaily(3);
kcal.recurrence()->setDuration(5);
kcal.recurrence()->addRDateTime(toDate(date2));
@@ -231,7 +231,7 @@ void KCalConversionTest::testConversion_data()
rrule.setBymonth(intVector);
kolab.setRecurrenceRule(rrule);
- kolab.setRecurrenceID(date2, true);
+ kolab.setRecurrenceID(date2, false);
kolab.setRecurrenceDates(std::vector<Kolab::cDateTime>() << date2 << Kolab::cDateTime(date2.year(), date2.month(), date2.day()));
kolab.setExceptionDates(std::vector<Kolab::cDateTime>() << date3 << Kolab::cDateTime(date3.year(), date3.month(), date3.day()));
@@ -337,7 +337,21 @@ void KCalConversionTest::testConversion_data()
kolab.setSummary(std::string(QString("äöü%@$£é¤¼²°€Š�").toUtf8().constData()));
QTest::newRow("latin1+Unicode") << kcal << kolab;
+ }
+ {
+ KCalCore::Event kcal;
+ kcal.setUid("uid");
+ kcal.setCreated(toDate(date));
+ kcal.setLastModified(toDate(date));
+ kcal.setRecurrenceId(toDate(date));
+ kcal.setThisAndFuture(true);
+ Kolab::Event kolab;
+ kolab.setUid("uid");
+ kolab.setCreated(date);
+ kolab.setLastModified(date);
+ kolab.setRecurrenceID(date, true);
+ QTest::newRow("thisandfuture") << kcal << kolab;
}
}
@@ -361,6 +375,7 @@ void KCalConversionTest::testConversion()
QCOMPARE(e->transparency(), kcal.transparency());
QCOMPARE(*e->recurrence(), *kcal.recurrence());
QCOMPARE(e->recurrenceId(), kcal.recurrenceId());
+ QCOMPARE(e->thisAndFuture(), kcal.thisAndFuture());
QCOMPARE(e->recurrenceType(), kcal.recurrenceType());
QCOMPARE(e->summary(), kcal.summary());
QCOMPARE(e->description(), kcal.description());
@@ -396,6 +411,7 @@ void KCalConversionTest::testConversion()
QCOMPARE(b.recurrenceRule(), kolab.recurrenceRule());
QCOMPARE(b.recurrenceID(), kolab.recurrenceID());
+ QCOMPARE(b.thisAndFuture(), kolab.thisAndFuture());
QCOMPARE(b.recurrenceDates(), kolab.recurrenceDates());
QCOMPARE(b.exceptionDates(), kolab.exceptionDates());
--
2.1.0
++++++ 0003-Move-QT_DECLARE_METADATA-logic-to-cmake.patch ++++++
>From e397921e73de2926a8572dfed73d2730a3ae456e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sandro=20Knau=C3=9F?= <mail(a)sandroknauss.de>
Date: Thu, 19 Feb 2015 12:32:58 +0100
Subject: [PATCH 3/3] Move QT_DECLARE_METADATA logic to cmake
Because libcalendaring now also have versions that
Q_DECLARE_METATYPE(KCalCore::Duration) already we make it explicit once
within cmake and once inside libcalendaring.
---
CMakeLists.txt | 4 ++++
tests/testhelpers.h | 8 ++------
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a323b32..02783e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,6 +82,10 @@ if("${KdepimLibs_VERSION}" VERSION_GREATER "4.8.40" OR USE_LIBCALENDARING)
add_definitions(-DKDEPIMLIBS_VERSION_DEVEL)
endif()
+if ("${KdepimLibs_VERSION}" VERSION_GREATER "4.11.52")
+ add_definitions( -DLIBCALENDARING_DURATION_DECLARED)
+endif()
+
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden -fexceptions -UQT_NO_EXCEPTIONS -fPIC -g" )
# message("${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DQT_NO_DEBUG")
diff --git a/tests/testhelpers.h b/tests/testhelpers.h
index f0e3889..822f9bc 100644
--- a/tests/testhelpers.h
+++ b/tests/testhelpers.h
@@ -45,12 +45,8 @@ Q_DECLARE_METATYPE(KCalCore::Event);
Q_DECLARE_METATYPE(KCalCore::Todo);
Q_DECLARE_METATYPE(KCalCore::Journal);
-#if KDEPIMLIBS_VERSION_MAJOR <= 4
-#if KDEPIMLIBS_VERSION_MINOR <= 11
-#if KDEPIMLIBS_VERSION_PATCH < 52
-Q_DECLARE_METATYPE(KCalCore::Duration);
-#endif
-#endif
+#ifndef LIBCALENDARING_DURATION_DECLARED
+ Q_DECLARE_METATYPE(KCalCore::Duration);
#endif
namespace QTest {
--
2.1.0
++++++ libkolab-0.5.3.tar.gz -> libkolab-0.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolab-0.5.3/CMakeLists.txt new/libkolab-0.6.0/CMakeLists.txt
--- old/libkolab-0.5.3/CMakeLists.txt 2014-08-26 13:39:06.000000000 +0200
+++ new/libkolab-0.6.0/CMakeLists.txt 2015-02-01 18:23:05.000000000 +0100
@@ -31,9 +31,9 @@
# 0.1.1 (patch release for 0.1.0)
# 0.2 (0.2 development version towards 0.2.0)
set(Libkolab_VERSION_MAJOR 0)
-set(Libkolab_VERSION_MINOR 5)
+set(Libkolab_VERSION_MINOR 6)
# Enable the full x.y.z version only for release versions
-set(Libkolab_VERSION_PATCH 3)
+set(Libkolab_VERSION_PATCH 0)
set(Libkolab_VERSION ${Libkolab_VERSION_MAJOR}.${Libkolab_VERSION_MINOR}.${Libkolab_VERSION_PATCH} )
#set(Libkolab_VERSION ${Libkolab_VERSION_MAJOR}.${Libkolab_VERSION_MINOR} )
set(Libkolab_VERSION_STRING ${CMAKE_PROJECT_NAME}-${Libkolab_VERSION})
@@ -55,7 +55,7 @@
include(MacroLogFeature)
# Do the building
-find_package(Libkolabxml 1.0 REQUIRED)
+find_package(Libkolabxml 1.1 REQUIRED)
macro_log_feature(Libkolabxml_FOUND "Libkolabxml" "Kolab XML Format 3 serializing library" "http://git.kolab.org/libkolabxml/" TRUE "1.0" "Required for reading/writing Kolab XML Objects")
find_package(Qt4 4.6.0 REQUIRED)
@@ -91,7 +91,7 @@
set( KDE_LIBRARIES ${Libcalendaring_LIBRARIES} )
message("${Libcalendaring_INCLUDE_DIRS} ${Libcalendaring_LIBRARIES}")
else()
- set( KDE_INCLUDES ${KDEPIMLIBS_INCLUDE_DIRS} ${KDE4_INCLUDE_DIR})
+ set( KDE_INCLUDES ${KDEPIMLIBS_INCLUDE_DIRS} ${KDE4_INCLUDES} )
set( KDE_LIBRARIES
${KDEPIMLIBS_KCALCORE_LIBS}
${KDEPIMLIBS_KABC_LIBS}
@@ -119,6 +119,17 @@
configure_file(libkolab-version.h.cmake "${CMAKE_BINARY_DIR}/libkolab-version.h" @ONLY)
+set(CMAKE_REQUIRED_FLAGS ${CMAKE_CXX_FLAGS})
+set(CMAKE_REQUIRED_INCLUDES "/opt/devel/kolab/include/")
+# include(CheckIncludeFileCXX)
+# check_include_file_cxx(akonadi/tag.h HAVE_TAG_H)
+#check_include_file_cxx doesn't work for some reason, so we use find_path instead.
+#we have to make sure that we only search in KDE_INCLUDES though, to not accidentally include a system akonadi/tag.h
+#when we're searching for one in libcalendaring.
+find_path(HAVE_TAG_H akonadi/tag.h PATHS ${KDE_INCLUDES} NO_DEFAULT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH)
+find_path(HAVE_RELATION_H akonadi/relation.h PATHS ${KDE_INCLUDES} NO_DEFAULT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libkolab_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/libkolab_config.h)
+
add_subdirectory(kolabformatV2)
add_subdirectory(conversion)
add_subdirectory(calendaring)
@@ -180,6 +191,7 @@
kolabformat/errorhandler.h
kolabformat/xmlobject.h
kolabformat/mimeobject.h
+ ${CMAKE_CURRENT_BINARY_DIR}/libkolab_config.h
conversion/kcalconversion.h
conversion/kabcconversion.h
conversion/commonconversion.h
@@ -209,5 +221,6 @@
if(PHP_BINDINGS)
generatePHPBindings(kolabshared shared.i)
+ generatePHPBindings(dummy dummy.i)
add_subdirectory(kolabformat/php)
endif(PHP_BINDINGS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolab-0.5.3/calendaring/php/test.php new/libkolab-0.6.0/calendaring/php/test.php
--- old/libkolab-0.5.3/calendaring/php/test.php 2014-08-26 13:39:06.000000000 +0200
+++ new/libkolab-0.6.0/calendaring/php/test.php 2015-02-01 18:23:05.000000000 +0100
@@ -97,6 +97,79 @@
</icalendar>
EOF;
+$rdates = <<<EOF
+<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">
+ <vcalendar>
+ <properties>
+ <prodid>
+ <text>Roundcube-libkolab-0.9 Libkolabxml-1.1</text>
+ </prodid>
+ <version>
+ <text>2.0</text>
+ </version>
+ <x-kolab-version>
+ <text>3.1.0</text>
+ </x-kolab-version>
+ </properties>
+ <components>
+ <vevent>
+ <properties>
+ <uid>
+ <text>49961C572093EC3FC125799C004A200F-Lotus_Notes_Generated</text>
+ </uid>
+ <created>
+ <date-time>2014-02-28T12:57:42Z</date-time>
+ </created>
+ <dtstamp>
+ <date-time>2014-02-28T12:57:42Z</date-time>
+ </dtstamp>
+ <sequence>
+ <integer>0</integer>
+ </sequence>
+ <class>
+ <text>PUBLIC</text>
+ </class>
+ <dtstart>
+ <parameters>
+ <tzid>
+ <text>/kolab.org/Europe/Amsterdam</text>
+ </tzid>
+ </parameters>
+ <date-time>2012-03-30T04:00:00</date-time>
+ </dtstart>
+ <dtend>
+ <parameters>
+ <tzid>
+ <text>/kolab.org/Europe/Amsterdam</text>
+ </tzid>
+ </parameters>
+ <date-time>2012-03-30T20:00:00</date-time>
+ </dtend>
+ <transp>
+ <text>TRANSPARENT</text>
+ </transp>
+ <rdate>
+ <date>2012-03-30</date>
+ <date>2013-03-30</date>
+ <date>2014-03-30</date>
+ <date>2015-03-30</date>
+ <date>2016-03-30</date>
+ <date>2017-03-30</date>
+ <date>2018-03-30</date>
+ <date>2019-03-30</date>
+ <date>2020-03-30</date>
+ <date>2021-03-30</date>
+ </rdate>
+ <summary>
+ <text>Geburtstag Jane Doe (30.03.1969)</text>
+ </summary>
+ </properties>
+ </vevent>
+ </components>
+ </vcalendar>
+</icalendar>
+EOF;
+
$e = kolabformat::readEvent($xml, false);
$ec = new EventCal($e);
@@ -131,6 +204,33 @@
"EventCal::getLastOccurence"
);
+// test event with RDATE list
+
+$e = kolabformat::readEvent($rdates, false);
+$ec = new EventCal($e);
+
+$rstart = new cDateTime(2012,3,1, 0,0,0);
+$next = new cDateTime($ec->getNextOccurence($rstart));
+assertequal(
+ sprintf("%d-%02d-%02d %02d:%02d:%02d", $next->year(), $next->month(), $next->day(), $next->hour(), $next->minute(), $next->second()),
+ "2012-03-30 04:00:00",
+ "RDATE first recurrence"
+);
+
+$next = new cDateTime($ec->getNextOccurence($next));
+assertequal(
+ sprintf("%d-%02d-%02d %02d:%02d:%02d", $next->year(), $next->month(), $next->day(), $next->hour(), $next->minute(), $next->second()),
+ "2013-03-30 04:00:00",
+ "RDATE next recurrence"
+);
+
+$last = new cDateTime($ec->getLastOccurrence());
+assertequal(
+ sprintf("%d-%02d-%d %02d:%02d:%02d", $last->year(), $last->month(), $last->day(), $last->hour(), $last->minute(), $last->second()),
+ "2021-03-30 04:00:00",
+ "RDATE last occurence"
+);
+
// terminate with error status
exit($errors);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolab-0.5.3/conversion/timezoneconverter.cpp new/libkolab-0.6.0/conversion/timezoneconverter.cpp
--- old/libkolab-0.5.3/conversion/timezoneconverter.cpp 2014-08-26 13:39:06.000000000 +0200
+++ new/libkolab-0.6.0/conversion/timezoneconverter.cpp 2015-02-01 18:23:05.000000000 +0100
@@ -39,13 +39,15 @@
if (guessedTimezone.isEmpty()) {
guessedTimezone = fromGMTOffsetTimezone(tz);
}
- if (guessedTimezone.isEmpty()) {
- //slower but also finds outdated zones
- timezone = KSystemTimeZones::readZone(tz);
- if (timezone.isValid()) {
- return tz;
- }
- }
+// if (guessedTimezone.isEmpty()) {
+// //slower but also finds outdated zones
+// timezone = KSystemTimeZones::readZone(tz);
+// if (timezone.isValid()) {
+// //This thinks all kinds of shit is valid, including /etc/localtime. Let's verify again.
+// qDebug() << "found " << tz;
+// return tz;
+// }
+// }
Debug() << "Guessed timezone and found: " << guessedTimezone;
return guessedTimezone;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolab-0.5.3/dummy.i new/libkolab-0.6.0/dummy.i
--- old/libkolab-0.5.3/dummy.i 1970-01-01 01:00:00.000000000 +0100
+++ new/libkolab-0.6.0/dummy.i 2015-02-01 18:23:05.000000000 +0100
@@ -0,0 +1 @@
+/* This is a dummy plugin that does nothing. See https://issues.kolab.org/show_bug.cgi?id=2050 */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolab-0.5.3/kolabformat/kolabdefinitions.h new/libkolab-0.6.0/kolabformat/kolabdefinitions.h
--- old/libkolab-0.5.3/kolabformat/kolabdefinitions.h 2014-08-26 13:39:06.000000000 +0200
+++ new/libkolab-0.6.0/kolabformat/kolabdefinitions.h 2015-02-01 18:23:05.000000000 +0100
@@ -63,6 +63,7 @@
#define KOLAB_TYPE_DICT "application/x-vnd.kolab.configuration.dictionary"
#define KOLAB_TYPE_FREEBUSY "application/x-vnd.kolab.freebusy"
#define KOLAB_TYPE_FILE "application/x-vnd.kolab.file"
+#define KOLAB_TYPE_RELATION "application/x-vnd.kolab.configuration.relation"
enum Version {
KolabV2,
@@ -78,7 +79,8 @@
DistlistObject,
NoteObject,
DictionaryConfigurationObject,
- FreebusyObject
+ FreebusyObject,
+ RelationConfigurationObject
};
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolab-0.5.3/kolabformat/kolabobject.cpp new/libkolab-0.6.0/kolabformat/kolabobject.cpp
--- old/libkolab-0.5.3/kolabformat/kolabobject.cpp 2014-08-26 13:39:06.000000000 +0200
+++ new/libkolab-0.6.0/kolabformat/kolabobject.cpp 2015-02-01 18:23:05.000000000 +0100
@@ -51,6 +51,7 @@
static inline QString configurationKolabType() { return QString::fromLatin1(KOLAB_TYPE_CONFIGURATION); }
static inline QString dictKolabType() { return QString::fromLatin1(KOLAB_TYPE_DICT); }
static inline QString freebusyKolabType() { return QString::fromLatin1(KOLAB_TYPE_FREEBUSY); }
+static inline QString relationKolabType() { return QString::fromLatin1(KOLAB_TYPE_RELATION); }
static inline QString xCalMimeType() { return QString::fromLatin1(MIME_TYPE_XCAL); };
static inline QString xCardMimeType() { return QString::fromLatin1(MIME_TYPE_XCARD); };
@@ -61,6 +62,92 @@
return fromXML<KCalCore::Event::Ptr, KolabV2::Event>(xmlData, attachments);
}
+QString ownUrlDecode(QByteArray encodedParam)
+{
+ encodedParam.replace('+', ' ');
+ return QUrl::fromPercentEncoding(encodedParam);
+}
+
+RelationMember parseMemberUrl(const QString &string)
+{
+ if (string.startsWith("urn:uuid:")) {
+ RelationMember member;
+ member.gid = string.mid(9);
+ return member;
+ }
+ QUrl url(QUrl::fromEncoded(string.toLatin1()));
+ QList<QByteArray> path;
+ Q_FOREACH(const QByteArray &fragment, url.encodedPath().split('/')) {
+ path.append(ownUrlDecode(fragment).toUtf8());
+ }
+ // qDebug() << path;
+ bool isShared = false;
+ int start = path.indexOf("user");
+ if (start < 0) {
+ start = path.indexOf("shared");
+ isShared = true;
+ }
+ if (start < 0) {
+ Warning() << "Couldn't find \"user\" or \"shared\" in path: " << path;
+ return RelationMember();
+ }
+ path = path.mid(start + 1);
+ if (path.size() < 2) {
+ Warning() << "Incomplete path: " << path;
+ return RelationMember();
+ }
+ RelationMember member;
+ if (!isShared) {
+ member.user = path.takeFirst();
+ }
+ member.uid = path.takeLast().toLong();
+ member.mailbox = path;
+ member.messageId = ownUrlDecode(url.encodedQueryItemValue("message-id"));
+ member.subject = ownUrlDecode(url.encodedQueryItemValue("subject"));
+ member.date = ownUrlDecode(url.encodedQueryItemValue("date"));
+ // qDebug() << member.uid << member.mailbox;
+ return member;
+}
+
+static QByteArray join(const QList<QByteArray> &list, const QByteArray &c)
+{
+ QByteArray result;
+ Q_FOREACH (const QByteArray &a, list) {
+ result += a + c;
+ }
+ result.chop(c.size());
+ return result;
+}
+
+KOLAB_EXPORT QString generateMemberUrl(const RelationMember &member)
+{
+ if (!member.gid.isEmpty()) {
+ return QString("urn:uuid:%1").arg(member.gid);
+ }
+ QUrl url;
+ url.setScheme("imap");
+ QList<QByteArray> path;
+ path << "/";
+ if (!member.user.isEmpty()) {
+ path << "user";
+ path << QUrl::toPercentEncoding(member.user.toLatin1());
+ } else {
+ path << "shared";
+ }
+ Q_FOREACH(const QByteArray &mb, member.mailbox) {
+ path << QUrl::toPercentEncoding(mb);
+ }
+ path << QByteArray::number(member.uid);
+ url.setEncodedPath("/" + join(path, "/"));
+
+ QList<QPair<QByteArray, QByteArray> > queryItems;
+ queryItems.append(qMakePair(QString::fromLatin1("message-id").toLatin1(), QUrl::toPercentEncoding(member.messageId)));
+ queryItems.append(qMakePair(QString::fromLatin1("subject").toLatin1(), QUrl::toPercentEncoding(member.subject)));
+ queryItems.append(qMakePair(QString::fromLatin1("date").toLatin1(), QUrl::toPercentEncoding(member.date)));
+ url.setEncodedQueryItems(queryItems);
+
+ return QString::fromLatin1(url.toEncoded());
+}
//@cond PRIVATE
class KolabObjectReader::Private
@@ -77,7 +164,7 @@
ObjectType readKolabV2(const KMime::Message::Ptr &msg, Kolab::ObjectType objectType);
ObjectType readKolabV3(const KMime::Message::Ptr &msg, Kolab::ObjectType objectType);
-
+
KCalCore::Incidence::Ptr mIncidence;
KABC::Addressee mAddressee;
KABC::ContactGroup mContactGroup;
@@ -90,6 +177,14 @@
ObjectType mOverrideObjectType;
Version mOverrideVersion;
bool mDoOverrideVersion;
+
+#ifdef HAVE_RELATION_H
+ Akonadi::Relation mRelation;
+#endif
+#ifdef HAVE_TAG_H
+ Akonadi::Tag mTag;
+ QStringList mTagMembers;
+#endif
};
//@endcond
@@ -101,7 +196,7 @@
KolabObjectReader::KolabObjectReader(const KMime::Message::Ptr& msg)
: d( new KolabObjectReader::Private )
{
- d->mObjectType = parseMimeMessage(msg);
+ parseMimeMessage(msg);
}
KolabObjectReader::~KolabObjectReader()
@@ -138,6 +233,8 @@
return FreebusyObject;
} else if (type.contains(dictKolabType())) { //Previous versions appended the language to the type
return DictionaryConfigurationObject;
+ } else if (type == relationKolabType()) {
+ return RelationConfigurationObject;
}
Warning() << "Unknown object type: " << type;
return Kolab::InvalidObject;
@@ -162,6 +259,8 @@
return KOLAB_TYPE_NOTE;
case DictionaryConfigurationObject:
return KOLAB_TYPE_CONFIGURATION;
+ case RelationConfigurationObject:
+ return KOLAB_TYPE_RELATION;
default:
Critical() << "unknown type "<< type;
}
@@ -181,6 +280,7 @@
return MIME_TYPE_XCARD;
case NoteObject:
case DictionaryConfigurationObject:
+ case RelationConfigurationObject:
return MIME_TYPE_KOLAB;
default:
Critical() << "unknown type "<< type;
@@ -326,6 +426,44 @@
mFreebusy = fb;
}
break;
+#ifdef HAVE_TAG_H
+ case RelationConfigurationObject: {
+ const Kolab::Configuration &configuration = Kolab::readConfiguration(xml, false);
+ const Kolab::Relation &relation = configuration.relation();
+
+ if (relation.type() == "tag") {
+ mTag = Akonadi::Tag();
+ mTag.setName(Conversion::fromStdString(relation.name()));
+ mTag.setGid(Conversion::fromStdString(configuration.uid()).toLatin1());
+ mTag.setType(Akonadi::Tag::GENERIC);
+
+ mTagMembers.reserve(relation.members().size());
+ foreach (const std::string &member, relation.members()) {
+ mTagMembers << Conversion::fromStdString(member);
+ }
+ } else if (relation.type() == "generic") {
+#ifdef HAVE_RELATION_H
+ if (relation.members().size() == 2) {
+ mRelation = Akonadi::Relation();
+ mRelation.setRemoteId(Conversion::fromStdString(configuration.uid()).toLatin1());
+ mRelation.setType(Akonadi::Relation::GENERIC);
+
+ mTagMembers.reserve(relation.members().size());
+ foreach (const std::string &member, relation.members()) {
+ mTagMembers << Conversion::fromStdString(member);
+ }
+ } else {
+ Critical() << "generic relation had wrong number of members:" << relation.members().size();
+ printMessageDebugInfo(msg);
+ }
+#endif
+ } else {
+ Critical() << "unknown configuration object type" << relation.type();
+ printMessageDebugInfo(msg);
+ }
+ }
+ break;
+#endif
default:
Critical() << "no kolab object found ";
printMessageDebugInfo(msg);
@@ -452,6 +590,35 @@
return d->mFreebusy;
}
+#ifdef HAVE_TAG_H
+bool KolabObjectReader::isTag() const
+{
+ return !d->mTag.gid().isEmpty();
+}
+
+Akonadi::Tag KolabObjectReader::getTag() const
+{
+ return d->mTag;
+}
+
+QStringList KolabObjectReader::getTagMembers() const
+{
+ return d->mTagMembers;
+}
+#endif
+
+#ifdef HAVE_RELATION_H
+bool KolabObjectReader::isRelation() const
+{
+ return d->mRelation.isValid();
+}
+
+Akonadi::Relation KolabObjectReader::getRelation() const
+{
+ return d->mRelation;
+}
+#endif
+
//Normalize incidences before serializing them
KCalCore::Incidence::Ptr normalizeIncidence(KCalCore::Incidence::Ptr original)
@@ -630,9 +797,58 @@
return Mime::createMessage(Conversion::fromStdString(freebusy.uid()), xCalMimeType(), freebusyKolabType(), Conversion::fromStdString(v3String).toUtf8(), true, getProductId(productId));
}
+#ifdef HAVE_TAG_H
+KMime::Message::Ptr writeRelationHelper(const Kolab::Relation &relation, const QByteArray &uid, const QString &productId)
+{
+ Kolab::Configuration configuration(relation); //TODO preserve creation/lastModified date
+ configuration.setUid(uid.constData());
+ const std::string &v3String = Kolab::writeConfiguration(configuration, Conversion::toStdString(getProductId(productId)));
+ ErrorHandler::handleLibkolabxmlErrors();
+ return Mime::createMessage(Conversion::fromStdString(configuration.uid()), kolabMimeType(), relationKolabType(), Conversion::fromStdString(v3String).toUtf8(), true, getProductId(productId));
+}
+
+KMime::Message::Ptr KolabObjectWriter::writeTag(const Akonadi::Tag &tag, const QStringList &members, Version v, const QString &productId)
+{
+ ErrorHandler::clearErrors();
+ if (v != KolabV3) {
+ Critical() << "only v3 implementation available";
+ }
+
+ Kolab::Relation relation(Conversion::toStdString(tag.name()), "tag");
+ std::vector<std::string> m;
+ m.reserve(members.count());
+ foreach (const QString &member, members) {
+ m.push_back(Conversion::toStdString(member));
+ }
+ relation.setMembers(m);
+
+ return writeRelationHelper(relation, tag.gid(), productId);
+}
+#endif
+
+#ifdef HAVE_RELATION_H
+KMime::Message::Ptr KolabObjectWriter::writeRelation(const Akonadi::Relation &relation, const QStringList &items, Version v, const QString &productId)
+{
+ ErrorHandler::clearErrors();
+ if (v != KolabV3) {
+ Critical() << "only v3 implementation available";
+ }
+ if (items.size() != 2) {
+ Critical() << "Wrong number of members for generic relation.";
+ return KMime::Message::Ptr();
+ }
+ Kolab::Relation kolabRelation(std::string(), "generic");
+ std::vector<std::string> m;
+ m.reserve(2);
+ m.push_back(Conversion::toStdString(items.at(0)));
+ m.push_back(Conversion::toStdString(items.at(1)));
+ kolabRelation.setMembers(m);
+ return writeRelationHelper(kolabRelation, relation.remoteId(), productId);
+}
+#endif
}; //Namespace
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolab-0.5.3/kolabformat/kolabobject.h new/libkolab-0.6.0/kolabformat/kolabobject.h
--- old/libkolab-0.5.3/kolabformat/kolabobject.h 2014-08-26 13:39:06.000000000 +0200
+++ new/libkolab-0.6.0/kolabformat/kolabobject.h 2015-02-01 18:23:05.000000000 +0100
@@ -20,6 +20,15 @@
#include <kolab_export.h>
+#include <libkolab_config.h>
+
+#ifdef HAVE_TAG_H
+#include <akonadi/item.h>
+#include <akonadi/tag.h>
+#endif
+#ifdef HAVE_RELATION_H
+#include <akonadi/relation.h>
+#endif
#include <kabc/addressee.h>
#include <kabc/contactgroup.h>
#include <kcalcore/incidence.h>
@@ -37,6 +46,18 @@
KOLAB_EXPORT KCalCore::Event::Ptr readV2EventXML(const QByteArray &xmlData, QStringList &attachments);
+struct KOLAB_EXPORT RelationMember {
+ QString messageId;
+ QString subject;
+ QString date;
+ QList<QByteArray> mailbox;
+ QString user;
+ qint64 uid;
+ QString gid;
+};
+KOLAB_EXPORT RelationMember parseMemberUrl(const QString &url);
+KOLAB_EXPORT QString generateMemberUrl(const RelationMember &url);
+
/**
* Class to read Kolab Mime files
*
@@ -87,9 +108,20 @@
KMime::Message::Ptr getNote() const;
QStringList getDictionary(QString &lang) const;
Freebusy getFreebusy() const;
+#ifdef HAVE_TAG_H
+ bool isTag() const;
+ Akonadi::Tag getTag() const;
+ QStringList getTagMembers() const;
+#endif
+#ifdef HAVE_RELATION_H
+ bool isRelation() const;
+ Akonadi::Relation getRelation() const;
+#endif
private:
//@cond PRIVATE
+ KolabObjectReader(const KolabObjectReader &other);
+ KolabObjectReader &operator=(const KolabObjectReader &rhs);
class Private;
Private *const d;
//@endcond
@@ -111,6 +143,12 @@
static KMime::Message::Ptr writeNote(const KMime::Message::Ptr &, Version v = KolabV3, const QString &productId = QString());
static KMime::Message::Ptr writeDictionary(const QStringList &, const QString &lang, Version v = KolabV3, const QString &productId = QString());
static KMime::Message::Ptr writeFreebusy(const Kolab::Freebusy &, Version v = KolabV3, const QString &productId = QString());
+#ifdef HAVE_TAG_H
+ static KMime::Message::Ptr writeTag(const Akonadi::Tag &, const QStringList &items, Version v = KolabV3, const QString &productId = QString());
+#endif
+#ifdef HAVE_RELATION_H
+ static KMime::Message::Ptr writeRelation(const Akonadi::Relation &, const QStringList &items, Version v = KolabV3, const QString &productId = QString());
+#endif
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolab-0.5.3/libkolab_config.h.in new/libkolab-0.6.0/libkolab_config.h.in
--- old/libkolab-0.5.3/libkolab_config.h.in 1970-01-01 01:00:00.000000000 +0100
+++ new/libkolab-0.6.0/libkolab_config.h.in 2015-02-01 18:23:05.000000000 +0100
@@ -0,0 +1,6 @@
+/* This file is generated from libkolab_config.h.cmake. */
+
+/* Whether akonadi/tag.h exists. */
+#cmakedefine HAVE_TAG_H 1
+/* Whether akonadi/relation.h exists. */
+#cmakedefine HAVE_RELATION_H 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolab-0.5.3/tests/kcalconversiontest.cpp new/libkolab-0.6.0/tests/kcalconversiontest.cpp
--- old/libkolab-0.5.3/tests/kcalconversiontest.cpp 2014-08-26 13:39:06.000000000 +0200
+++ new/libkolab-0.6.0/tests/kcalconversiontest.cpp 2015-02-01 18:23:05.000000000 +0100
@@ -504,8 +504,6 @@
QTest::addColumn<KABC::Addressee>( "kcal" );
QTest::addColumn<Kolab::Contact>( "kolab" );
- Kolab::cDateTime date(2011,2,2,12,11,10,true);
- Kolab::cDateTime date2(2011,2,2,12,12,10,true);
{
KABC::Addressee kcal;
kcal.setUid("uid");
@@ -520,6 +518,20 @@
{
KABC::Addressee kcal;
kcal.setUid("uid");
+ kcal.setFormattedName("name");
+ kcal.setBirthday(QDateTime(QDate(2012,2,2)));
+
+ //Because QDateTime doesn't know date-only values we always end up with a date-time
+ Kolab::Contact kolab;
+ kolab.setUid("uid");
+ kolab.setName("name");
+ kolab.setBDay(Kolab::cDateTime(2012,2,2,0,0,0));
+
+ QTest::newRow("bday") << kcal << kolab;
+ }
+ {
+ KABC::Addressee kcal;
+ kcal.setUid("uid");
//The first address is always the preferred
kcal.setEmails(QStringList() << "email1(a)example.org" << "email2(a)example.org");
kcal.insertCustom("KOLAB", "EmailTypesemail1(a)example.org", "home,work");
@@ -554,12 +566,14 @@
foreach (const QString &mail, e.emails()) {
QCOMPARE(e.custom(QLatin1String("KOLAB"), QString::fromLatin1("EmailTypes%1").arg(mail)), kcal.custom(QLatin1String("KOLAB"), QString::fromLatin1("EmailTypes%1").arg(mail)));
}
+ QCOMPARE(e.birthday(), kcal.birthday());
const Kolab::Contact &b = fromKABC(kcal);
QCOMPARE(b.uid(), kolab.uid());
QCOMPARE(b.name(), kolab.name());
QCOMPARE(b.emailAddresses(), kolab.emailAddresses());
QCOMPARE(b.emailAddressPreferredIndex(), kolab.emailAddressPreferredIndex());
+ QCOMPARE(b.bDay(), kolab.bDay());
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolab-0.5.3/tests/kolabobjecttest.cpp new/libkolab-0.6.0/tests/kolabobjecttest.cpp
--- old/libkolab-0.5.3/tests/kolabobjecttest.cpp 2014-08-26 13:39:06.000000000 +0200
+++ new/libkolab-0.6.0/tests/kolabobjecttest.cpp 2015-02-01 18:23:05.000000000 +0100
@@ -80,6 +80,92 @@
QCOMPARE(Kolab::ErrorHandler::instance().error(), Kolab::ErrorHandler::Critical);
}
+void KolabObjectTest::parseRelationMembers()
+{
+ {
+ QString memberString("imap:///user/jan.aachen%40lhm.klab.cc/INBOX/20?message-id=%3Cf06aa3345a25005380b47547ad161d36%40lhm.klab.cc%3E&subject=Re%3A+test&date=Tue%2C+12+Aug+2014+20%3A42%3A59+%2B0200");
+ Kolab::RelationMember member = Kolab::parseMemberUrl(memberString);
+
+ QString result = Kolab::generateMemberUrl(member);
+ qDebug() << result;
+ result.replace(QLatin1String("%20"),QLatin1String("+"));
+ QCOMPARE(result, memberString);
+ }
+
+ //user namespace by uid
+ {
+
+ Kolab::RelationMember member;
+ member.uid = 20;
+ member.mailbox = QList<QByteArray>() << "INBOX";
+ member.user = "john.doe(a)example.org";
+ member.messageId = "messageid";
+ member.date = "date";
+ member.subject = "subject";
+ QString url = Kolab::generateMemberUrl(member);
+ qDebug() << url;
+ Kolab::RelationMember result = Kolab::parseMemberUrl(url);
+ QCOMPARE(result.uid, member.uid);
+ QCOMPARE(result.mailbox, member.mailbox);
+ QCOMPARE(result.user, member.user);
+ QCOMPARE(result.messageId, member.messageId);
+ QCOMPARE(result.date, member.date);
+ QCOMPARE(result.subject, member.subject);
+ }
+
+ //shared namespace by uid
+ {
+
+ Kolab::RelationMember member;
+ member.uid = 20;
+ member.mailbox = QList<QByteArray>() << "foo" << "bar";
+ member.messageId = "messageid";
+ member.date = "date";
+ member.subject = "subject";
+ QString url = Kolab::generateMemberUrl(member);
+ qDebug() << url;
+ Kolab::RelationMember result = Kolab::parseMemberUrl(url);
+ QCOMPARE(result.uid, member.uid);
+ QCOMPARE(result.mailbox, member.mailbox);
+ QVERIFY(result.user.isEmpty());
+ QCOMPARE(result.messageId, member.messageId);
+ QCOMPARE(result.date, member.date);
+ QCOMPARE(result.subject, member.subject);
+ }
+
+ //by uuid/gid
+ {
+
+ Kolab::RelationMember member;
+ member.gid = "fooobar";
+ QString url = Kolab::generateMemberUrl(member);
+ qDebug() << url;
+ Kolab::RelationMember result = Kolab::parseMemberUrl(url);
+ QCOMPARE(result.gid, member.gid);
+ }
+
+ // chars to en/decode
+ {
+
+ Kolab::RelationMember member;
+ member.uid = 20;
+ member.mailbox = QList<QByteArray>() << "spaces in folders" << "+^,:@";
+ member.user = "john.doe:^@example.org";
+ member.messageId = "messageid+^,:@";
+ member.date = "date+^,:@";
+ member.subject = "subject+^,:@";
+
+ QString url = Kolab::generateMemberUrl(member);
+ qDebug() << url;
+ Kolab::RelationMember result = Kolab::parseMemberUrl(url);
+ QCOMPARE(result.uid, member.uid);
+ QCOMPARE(result.mailbox, member.mailbox);
+ QCOMPARE(result.user, member.user);
+ QCOMPARE(result.messageId, member.messageId);
+ QCOMPARE(result.date, member.date);
+ QCOMPARE(result.subject, member.subject);
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolab-0.5.3/tests/kolabobjecttest.h new/libkolab-0.6.0/tests/kolabobjecttest.h
--- old/libkolab-0.5.3/tests/kolabobjecttest.h 2014-08-26 13:39:06.000000000 +0200
+++ new/libkolab-0.6.0/tests/kolabobjecttest.h 2015-02-01 18:23:05.000000000 +0100
@@ -27,6 +27,7 @@
void preserveUnicode();
void dontCrashWithEmptyOrganizer();
void dontCrashWithEmptyIncidence();
+ void parseRelationMembers();
};
#endif // KOLABOBJECTTEST_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolab-0.5.3/tests/testfiles/v3/contacts/distlist.vcf.mime new/libkolab-0.6.0/tests/testfiles/v3/contacts/distlist.vcf.mime
--- old/libkolab-0.5.3/tests/testfiles/v3/contacts/distlist.vcf.mime 2014-08-26 13:39:06.000000000 +0200
+++ new/libkolab-0.6.0/tests/testfiles/v3/contacts/distlist.vcf.mime 2015-02-01 18:23:05.000000000 +0100
@@ -1,5 +1,5 @@
Date: Mon, 23 Apr 2012 12:46:37 +0200
-X-Kolab-Type: application/x-vnd.kolab.contact.distlist
+X-Kolab-Type: application/x-vnd.kolab.distribution-list
X-Kolab-Mime-Version: 3.0
User-Agent: Libkolab-0.1.0
Content-Type: multipart/mixed; boundary="nextPart1365947.WmFcbPlLFA"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolab-0.5.3/tests/timezonetest.cpp new/libkolab-0.6.0/tests/timezonetest.cpp
--- old/libkolab-0.5.3/tests/timezonetest.cpp 2014-08-26 13:39:06.000000000 +0200
+++ new/libkolab-0.6.0/tests/timezonetest.cpp 2015-02-01 18:23:05.000000000 +0100
@@ -85,6 +85,9 @@
QTest::newRow( "13" ) << QString::fromLatin1("(GMT-11:00) Midway Island, Samoa");
QTest::newRow( "14" ) << QString::fromLatin1("W. Europe Standard Time");
QTest::newRow( "15" ) << QString::fromLatin1("(GMT+1.00) Sarajevo/Warsaw/Zagreb");
+ //Lotus notes uses it's own set of specifiers
+// QTest::newRow( "Lotus Notes" ) << QString::fromLatin1("W. Europe");
+// QTest::newRow( "Google UTC offset" ) << QString::fromLatin1("2013-10-23T04:00:00+02:00");
}
void TimezoneTest::testFromHardcodedList()
@@ -109,57 +112,65 @@
QCOMPARE(result->dtStart().timeZone().name(), KTimeZone(QLatin1String("Africa/Lagos")).name());
}
-void TimezoneTest::testKolabObjectReader()
-{
- const Kolab::Version version = Kolab::KolabV3;
- const Kolab::ObjectType type = Kolab::EventObject;
- QString icalFileName = TESTFILEDIR+QString::fromLatin1("timezone/windowsTimezone.ics"); //To compare
- QString mimeFileName = TESTFILEDIR+QString::fromLatin1("timezone/windowsTimezoneV3.mime"); //For parsing
-
- //Parse mime message
- bool ok = false;
- const KMime::Message::Ptr &msg = readMimeFile( mimeFileName, ok );
- QVERIFY(ok);
- Kolab::KolabObjectReader reader;
- Kolab::ObjectType t = reader.parseMimeMessage(msg);
- QCOMPARE(t, type);
- QCOMPARE(reader.getVersion(), version);
- QCOMPARE(Kolab::ErrorHandler::instance().error(), Kolab::ErrorHandler::Debug);
-
- KCalCore::Incidence::Ptr convertedIncidence = reader.getIncidence();
- kDebug() << "read incidence";
-
- //Parse ICalFile for comparison
- QFile icalFile( icalFileName );
- QVERIFY( icalFile.open( QFile::ReadOnly ) );
- KCalCore::ICalFormat format;
- KCalCore::Incidence::Ptr realIncidence( format.fromString( QString::fromUtf8( icalFile.readAll() ) ) );
-
- // fix up the converted incidence for comparisson
- normalizeIncidence(convertedIncidence);
- normalizeIncidence(realIncidence);
-
- // recurrence objects are created on demand, but KCalCore::Incidence::operator==() doesn't take that into account
- // so make sure both incidences have one
- realIncidence->recurrence();
- convertedIncidence->recurrence();
-
- realIncidence->setLastModified(convertedIncidence->lastModified());
-
- //The following test is just for debugging and not really relevant
- if ( *(realIncidence.data()) != *(convertedIncidence.data()) ) {
- showDiff(format.toString( realIncidence ), format.toString( convertedIncidence ));
- }
- QVERIFY( *(realIncidence.data()) == *(convertedIncidence.data()) );
-}
+// void TimezoneTest::testKolabObjectReader()
+// {
+// const Kolab::Version version = Kolab::KolabV3;
+// const Kolab::ObjectType type = Kolab::EventObject;
+// QString icalFileName = TESTFILEDIR+QString::fromLatin1("timezone/windowsTimezone.ics"); //To compare
+// QString mimeFileName = TESTFILEDIR+QString::fromLatin1("timezone/windowsTimezoneV3.mime"); //For parsing
+//
+// //Parse mime message
+// bool ok = false;
+// const KMime::Message::Ptr &msg = readMimeFile( mimeFileName, ok );
+// QVERIFY(ok);
+// Kolab::KolabObjectReader reader;
+// Kolab::ObjectType t = reader.parseMimeMessage(msg);
+// QCOMPARE(t, type);
+// QCOMPARE(reader.getVersion(), version);
+// QCOMPARE(Kolab::ErrorHandler::instance().error(), Kolab::ErrorHandler::Debug);
+//
+// KCalCore::Incidence::Ptr convertedIncidence = reader.getIncidence();
+// kDebug() << "read incidence";
+//
+// //Parse ICalFile for comparison
+// QFile icalFile( icalFileName );
+// QVERIFY( icalFile.open( QFile::ReadOnly ) );
+// KCalCore::ICalFormat format;
+// KCalCore::Incidence::Ptr realIncidence( format.fromString( QString::fromUtf8( icalFile.readAll() ) ) );
+//
+// // fix up the converted incidence for comparisson
+// normalizeIncidence(convertedIncidence);
+// normalizeIncidence(realIncidence);
+//
+// // recurrence objects are created on demand, but KCalCore::Incidence::operator==() doesn't take that into account
+// // so make sure both incidences have one
+// realIncidence->recurrence();
+// convertedIncidence->recurrence();
+//
+// realIncidence->setLastModified(convertedIncidence->lastModified());
+//
+// //The following test is just for debugging and not really relevant
+// if ( *(realIncidence.data()) != *(convertedIncidence.data()) ) {
+// showDiff(format.toString( realIncidence ), format.toString( convertedIncidence ));
+// }
+// QVERIFY( *(realIncidence.data()) == *(convertedIncidence.data()) );
+// }
void TimezoneTest::testFindLegacyTimezone()
{
const QString normalized = TimezoneConverter::normalizeTimezone("US/Pacific");
kDebug() << normalized;
+ QEXPECT_FAIL("", "Currently broken", Continue);
QVERIFY(!normalized.isEmpty());
}
+void TimezoneTest::testIgnoreInvalidTimezone()
+{
+ const QString normalized = TimezoneConverter::normalizeTimezone("FOOOOBAR");
+ kDebug() << normalized;
+ QVERIFY(normalized.isEmpty());
+}
+
void TimezoneTest::testTimezoneDaemonAvailable()
{
//With KDE it should be available and with libcalendaring it should return true
@@ -171,9 +182,35 @@
const Kolab::cDateTime expected(2013, 10, 23, 2, 0 ,0, true);
const KDateTime input(KDateTime::fromString("2013-10-23T04:00:00+02:00", KDateTime::RFC3339Date));
const Kolab::cDateTime result = Kolab::Conversion::fromDate(input);
+ QVERIFY(!Kolab::ErrorHandler::instance().errorOccured());
QCOMPARE(result, expected);
}
+void TimezoneTest::localTimezone()
+{
+ {
+ const Kolab::cDateTime result = Kolab::Conversion::fromDate(KDateTime(QDate(2013, 10, 10), QTime(2, 0, 0), KDateTime::LocalZone));
+ QVERIFY(!result.timezone().empty());
+ QVERIFY(!Kolab::ErrorHandler::instance().errorOccured());
+ }
+ {
+ const Kolab::cDateTime result = Kolab::Conversion::fromDate(KDateTime(QDate(2013, 10, 10), QTime(2, 0, 0), KDateTime::ClockTime));
+ QVERIFY(!Kolab::ErrorHandler::instance().errorOccured());
+ }
+ {
+ const Kolab::cDateTime result = Kolab::Conversion::fromDate(KDateTime(QDate(2013, 10, 10), QTime(2, 0, 0), KDateTime::TimeZone));
+ QVERIFY(result.timezone().empty());
+ QVERIFY(!Kolab::ErrorHandler::instance().errorOccured());
+ }
+ {
+ KDateTime dt(QDate(2013, 10, 10), QTime(2, 0, 0), KTimeZone("/etc/localzone"));
+ const Kolab::cDateTime result = Kolab::Conversion::fromDate(dt);
+ kDebug() << result.timezone();
+ QVERIFY(result.timezone().empty());
+ QVERIFY(!Kolab::ErrorHandler::instance().errorOccured());
+ }
+}
+
QTEST_MAIN( TimezoneTest )
#include "timezonetest.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolab-0.5.3/tests/timezonetest.h new/libkolab-0.6.0/tests/timezonetest.h
--- old/libkolab-0.5.3/tests/timezonetest.h 2014-08-26 13:39:06.000000000 +0200
+++ new/libkolab-0.6.0/tests/timezonetest.h 2015-02-01 18:23:05.000000000 +0100
@@ -32,10 +32,12 @@
void testFromHardcodedList_data();
void testFromHardcodedList();
void testKolabObjectWriter();
- void testKolabObjectReader();
+ // void testKolabObjectReader();
void testFindLegacyTimezone();
+ void testIgnoreInvalidTimezone();
void testTimezoneDaemonAvailable();
void testUTCOffset();
+ void localTimezone();
};
#endif // TIMEZONETEST_H
++++++ libkolab-0.6.0_check_for_generic_tag.patch ++++++
>From 34edc0a846b87570c06a5942b458adb720a34a9b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sandro=20Knau=C3=9F?= <mail(a)sandroknauss.de>
Date: Tue, 10 Feb 2015 10:59:18 +0100
Subject: Make libkolab compile with upstream kdepimlibs
Because GENERIC tags have not entered upstream, we have to test for
support. Our integration branch not supports a feature flag to indicate
the availability of that feature.
KOLAB: #4448
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 365edac..bd53e27 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,6 +78,11 @@ add_definitions( -DKDEPIMLIBS_VERSION_MAJOR=${KdepimLibs_VERSION_MAJOR} )
add_definitions( -DKDEPIMLIBS_VERSION_MINOR=${KdepimLibs_VERSION_MINOR} )
add_definitions( -DKDEPIMLIBS_VERSION_PATCH=${KdepimLibs_VERSION_PATCH} )
+#Tag::GENERIC is only available at the moment at the kolab/integration branches
+if (KDEPIMLIBS_HAS_GENERIC_TAG)
+ add_definitions( -DKDEPIMLIBS_HAS_GENERIC_TAG)
+endif()
+
if("${KdepimLibs_VERSION}" VERSION_GREATER "4.8.40" OR USE_LIBCALENDARING)
add_definitions(-DKDEPIMLIBS_VERSION_DEVEL)
endif()
diff --git a/kolabformat/kolabobject.cpp b/kolabformat/kolabobject.cpp
index 681b4a5..e5c404d 100644
--- a/kolabformat/kolabobject.cpp
+++ b/kolabformat/kolabobject.cpp
@@ -435,8 +435,11 @@ ObjectType KolabObjectReader::Private::readKolabV3(const KMime::Message::Ptr &ms
mTag = Akonadi::Tag();
mTag.setName(Conversion::fromStdString(relation.name()));
mTag.setGid(Conversion::fromStdString(configuration.uid()).toLatin1());
+#ifdef KDEPIMLIBS_HAS_GENERIC_TAG
mTag.setType(Akonadi::Tag::GENERIC);
-
+#else
+ mTag.setType(Akonadi::Tag::PLAIN);
+#endif
mTagMembers.reserve(relation.members().size());
foreach (const std::string &member, relation.members()) {
mTagMembers << Conversion::fromStdString(member);
--
cgit v0.10.2
1
0
Hello community,
here is the log from the commit of package bluez for openSUSE:Factory checked in at 2015-04-06 00:24:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bluez (Old)
and /work/SRC/openSUSE:Factory/.bluez.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bluez"
Changes:
--------
--- /work/SRC/openSUSE:Factory/bluez/bluez.changes 2015-02-10 20:15:38.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.bluez.new/bluez.changes 2015-04-06 00:24:04.000000000 +0200
@@ -1,0 +2,42 @@
+Wed Apr 1 10:35:59 UTC 2015 - seife+obs(a)b1-systems.com
+
+- update to version 5.30
+ The highlight of this release is the completion of the GATT D-Bus
+ APIs. We’ve now got both the client and server functionality in
+ place, however it’s still behind the -E (--experimental) command
+ line switch. The API is documented in doc/gatt-api.txt and there
+ are several test tools for it in the tree (even bluetoothctl has
+ support for it). Another new (and still experimental) D-Bus API
+ that debuts with this release is one for managing LE Advertising,
+ i.e. acting in peripheral role. The API is documented in
+ doc/advertising-api.txt.
+ Besides the new features, there are several fixes to AVCTP, AVDTP
+ & AVRCP. There’s also a fix for C++ compiler compatibility with
+ the library headers as well as a fix for device information not
+ being stored in certain corner cases.
+- add bluez-5.30-disable-broken-tests.diff to fix test suite
+- remove -fstack-reuse=none workaround
+- remove 20150312-PATCH_BlueZ_shared_gatt-client_Fix_invalid_read-56974.patch
+
+-------------------------------------------------------------------
+Mon Mar 23 14:41:38 UTC 2015 - rguenther(a)suse.com
+
+- Build the testsuite with -fstack-reuse=none to workaround broken
+ test setup. [bnc#923768]
+
+-------------------------------------------------------------------
+Thu Mar 12 12:03:30 UTC 2015 - seife+obs(a)b1-systems.com
+
+- update to version 5.29
+ This is a comparatively large release with over a month and 475
+ commits since 5.28. There have been lots of fixes to the Android
+ side. Our internal GATT library (used both by ‘normal’ BlueZ as
+ well as the Android version) received lots of updates for this
+ release. Other notable changes are a fix for AVCTP key repeat
+ timeout as well as added support for the Multi Profile
+ Specification (MPS).
+- add 20150312-PATCH_BlueZ_shared_gatt-client_Fix_invalid_read-56974.patch
+ from bluez-devel for fixing test case failure (will be included in
+ next bluez release)
+
+-------------------------------------------------------------------
Old:
----
bluez-5.28.tar.xz
New:
----
bluez-5.30-disable-broken-tests.diff
bluez-5.30.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bluez.spec ++++++
--- /var/tmp/diff_new_pack.Mmtyo5/_old 2015-04-06 00:24:05.000000000 +0200
+++ /var/tmp/diff_new_pack.Mmtyo5/_new 2015-04-06 00:24:05.000000000 +0200
@@ -24,7 +24,7 @@
BuildRequires: systemd-devel
BuildRequires: pkgconfig(dbus-1) >= 1.4
%{?systemd_requires}
-Version: 5.28
+Version: 5.30
Release: 0
Summary: Bluetooth Stack for Linux
License: GPL-2.0+
@@ -36,6 +36,8 @@
# fix some logitech HID devices, bnc#681049, bnc#850478 --seife+obs(a)b1-systems.com
Patch1: bluez-5.11-logitech-hid2hci.patch
Patch2: bluez-sdp-unix-path.patch
+# temporary fix untils bluez-5.31 comes along - reported upstream
+Patch100: bluez-5.30-disable-broken-tests.diff
BuildRequires: alsa-devel
BuildRequires: automake
BuildRequires: check-devel
@@ -111,6 +113,7 @@
%setup -q
%patch1 -p1
%patch2 -p1
+%patch100 -p1
mkdir dbus-apis
cp -a doc/*.txt dbus-apis/
# FIXME: Change the dbus service to be a real service, not systemd launched
++++++ bluez-5.30-disable-broken-tests.diff ++++++
diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index 95b42dd..b56b9d1 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -3416,6 +3416,7 @@ int main(int argc, char *argv[])
raw_pdu(0x12, 0x04, 0x00, 0x01, 0x02, 0x03),
raw_pdu(0x01, 0x12, 0x04, 0x00, 0x03));
+#if 0
define_test_client("/TP/GAW/CL/BV-05-C", test_client, service_db_1,
&test_long_write_1,
SERVICE_DATA_1_PDUS,
@@ -3671,6 +3672,7 @@ int main(int argc, char *argv[])
raw_pdu(0x01, 0x16, 0x07, 0x00, 0x0c),
raw_pdu(0x18, 0x00),
raw_pdu(0x19));
+#endif
define_test_server("/TP/GAW/SR/BV-05-C/small", test_server,
ts_small_db, NULL,
++++++ bluez-5.28.tar.xz -> bluez-5.30.tar.xz ++++++
++++ 45262 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package libkolabxml for openSUSE:Factory checked in at 2015-04-06 00:23:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libkolabxml (Old)
and /work/SRC/openSUSE:Factory/.libkolabxml.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libkolabxml"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libkolabxml/libkolabxml.changes 2014-12-16 14:50:55.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libkolabxml.new/libkolabxml.changes 2015-04-06 00:23:58.000000000 +0200
@@ -1,0 +2,21 @@
+Wed Apr 1 16:59:03 UTC 2015 - aj(a)ajaissle.de
+
+- New upstream release 1.1.0
+- Drop patch (upstream inclusion):
+ - libkolabxml-1.0.3_make_version_attribute_not_a_fixed_value.patch
+
+-------------------------------------------------------------------
+Sat Mar 28 12:23:16 UTC 2015 - aj(a)ajaissle.de
+
+- Add libkolabxml-1.0.3_make_version_attribute_not_a_fixed_value.patch:
+ Instead of a fixed value, we only use a default value.
+ Fixes problems where objects created with version string '3.0dev'
+ can not be fetched/displayed.
+- Convert %with_java to %bcond_without java
+
+-------------------------------------------------------------------
+Mon Mar 23 08:08:25 UTC 2015 - schwab(a)suse.de
+
+- Allow building without mono bindings
+
+-------------------------------------------------------------------
Old:
----
libkolabxml-1.0.3.tar.gz
New:
----
libkolabxml-1.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libkolabxml.spec ++++++
--- /var/tmp/diff_new_pack.92kwup/_old 2015-04-06 00:23:58.000000000 +0200
+++ /var/tmp/diff_new_pack.92kwup/_new 2015-04-06 00:23:58.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package libkolabxml
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,20 +15,18 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-%define with_java 1
-%define with_mono 1
-%if 0%{?suse_version} == 1315
-%define with_mono 0
-%endif
+
%if 0%{?suse_version} < 1220
-%define with_java 0
+%define _without_java 1
%endif
+%bcond_without java
+%bcond_without mono
%global php_extdir %{_libdir}/php5/extensions
%global php_confdir %{_sysconfdir}/php5/conf.d
%define libname %{name}1
Name: libkolabxml
-Version: 1.0.3
+Version: 1.1.0
Release: 0
Summary: Kolab XML Format Schema Definitions Library
License: LGPL-3.0+
@@ -42,14 +40,14 @@
BuildRequires: boost-devel
BuildRequires: cmake >= 2.6
BuildRequires: gcc-c++
-%if 0%{?with_java}
+%if %{with java}
BuildRequires: gcc-java
BuildRequires: java-openjdk
%endif
BuildRequires: libcurl-devel
BuildRequires: libqt4-devel
BuildRequires: libxerces-c-devel
-%if 0%{?with_mono}
+%if %{with mono}
BuildRequires: mono-devel
%endif
BuildRequires: php-devel >= 5.3
@@ -108,7 +106,6 @@
- Canonical storage format
- Supports Todos/Events/Journals/Contacts/Distribution Lists/Notes/Configurations
-%if 0%{?with_java}
%package -n java-%{libname}
Summary: Java bindings for %{name}
Group: Development/Languages/Java
@@ -128,9 +125,7 @@
- Supports Todos/Events/Journals/Contacts/Distribution Lists/Notes/Configurations
This package provides the java bindings for Libkolabxml
-%endif
-%if 0%{?with_mono}
%package -n mono-%{libname}
Summary: Mono (C#) bindings for %{name}
Group: Development/Languages/Mono
@@ -150,7 +145,6 @@
- Supports Todos/Events/Journals/Contacts/Distribution Lists/Notes/Configurations
This package provides the mono (C#) bindings for Libkolabxml
-%endif
%package -n php-%{libname}
Summary: PHP bindings for %{name}
@@ -216,12 +210,12 @@
# no-undefined does not work as the php bindings are "magic"
%cmake \
-DCMAKE_EXE_LINKER_FLAGS=-Wl,--as-needed -DCMAKE_MODULE_LINKER_FLAGS=-Wl,--as-needed -DCMAKE_SHARED_LINKER_FLAGS=-Wl,--as-needed \
-%if 0%{?with_java}
+%if %{with java}
-DJAVA_BINDINGS=TRUE -DJAVA_INSTALL_DIR=%{_jnidir} \
%endif
-DPHP_BINDINGS=TRUE -DPHP_INSTALL_DIR=%{php_extdir}\
-DPYTHON_BINDINGS=TRUE -DPYTHON_INSTALL_DIR=%{python_sitearch} \
-%if 0%{?with_mono}
+%if %{with mono}
-DCSHARP_BINDINGS=TRUE -DCSHARP_INSTALL_DIR=%{_libexecdir}/mono/ \
%endif
-DBUILD_TESTS=FALSE \
@@ -272,7 +266,7 @@
%{_datadir}/php5/kolabformat.php
%{php_extdir}/kolabformat.so
-%if 0%{?with_java}
+%if %{with java}
%files -n java-%{libname}
%defattr(-,root,root)
%doc COPYING
@@ -280,7 +274,7 @@
%{_libdir}/java/*
%endif
-%if 0%{?with_mono}
+%if %{with mono}
%files -n mono-%{libname}
%defattr(-,root,root)
%doc COPYING
++++++ libkolabxml-1.0.3.tar.gz -> libkolabxml-1.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/CMakeLists.txt new/libkolabxml-1.1.0/CMakeLists.txt
--- old/libkolabxml-1.0.3/CMakeLists.txt 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/CMakeLists.txt 2014-12-31 16:55:13.000000000 +0100
@@ -41,11 +41,11 @@
# 0.2 (0.2 development version)
set (Libkolabxml_VERSION_MAJOR 1)
-set (Libkolabxml_VERSION_MINOR 0)
+set (Libkolabxml_VERSION_MINOR 1)
# Enable the full x.y.z version only for release versions
-set (Libkolabxml_VERSION_PATCH 3)
-set (Libkolabxml_VERSION "${Libkolabxml_VERSION_MAJOR}.${Libkolabxml_VERSION_MINOR}.${Libkolabxml_VERSION_PATCH}" )
-#set (Libkolabxml_VERSION "${Libkolabxml_VERSION_MAJOR}.${Libkolabxml_VERSION_MINOR}" )
+set (Libkolabxml_VERSION_PATCH 0)
+#set (Libkolabxml_VERSION "${Libkolabxml_VERSION_MAJOR}.${Libkolabxml_VERSION_MINOR}.${Libkolabxml_VERSION_PATCH}" )
+set (Libkolabxml_VERSION "${Libkolabxml_VERSION_MAJOR}.${Libkolabxml_VERSION_MINOR}" )
set (Libkolabxml_VERSION_STRING ${CMAKE_PROJECT_NAME}-${Libkolabxml_VERSION})
set (KOLAB_FORMAT_VERSION "3.1.0")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/README new/libkolabxml-1.1.0/README
--- old/libkolabxml-1.0.3/README 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/README 2014-12-31 16:55:13.000000000 +0100
@@ -1,7 +1,10 @@
= About =
-Libkolabxml is the reference implementation of the Kolab XML Format as defined in http://wiki.kolab.org/User:Mollekopf/Drafts/KEP:17.
-It provides serialization/deserialization from/to in-memory representations for all Kolab Objects, including input validation.
+Libkolabxml is the reference implementation of the Kolab XML Format as
+defined in http://wiki.kolab.org/User:Mollekopf/Drafts/KEP:17.
+
+It provides serialization/deserialization from/to in-memory
+representations for all Kolab Objects, including input validation.
= Bindings =
@@ -15,60 +18,72 @@
Build with:
-$mkdir build
-$cd build
-$cmake ..
-$make
+$ mkdir build
+$ cd build
+$ cmake ..
+$ make
== CMake options ==
-Options can either be supplied on the commandline or edited in the cmake cache.
+Options can either be supplied on the commandline or edited in the
+cmake cache.
Library installation path:
-LIB_INSTALL_DIR=/usr/lib
+ LIB_INSTALL_DIR=/usr/lib
+
+Note that LIB_SUFFIX is honored since version 1.0.2
Set the installation prefix:
-CMAKE_INSTALL_PREFIX=/usr
+ CMAKE_INSTALL_PREFIX=/usr
Installation location for header files:
-INCLUDE_INSTALL_DIR=/usr/include
+ INCLUDE_INSTALL_DIR=/usr/include
-Building of bindings can be controlled using cmake configuration options:
-PYTHON_BINDINGS
-PHP_BINDINGS
-JAVA_BINDINGS
-CSHARP_BINDINGS
+Building of bindings can be controlled using cmake configuration
+options:
+
+ PYTHON_BINDINGS
+ PHP_BINDINGS
+ JAVA_BINDINGS
+ CSHARP_BINDINGS
The path to install the bindings:
-PYTHON_INSTALL_DIR
-PHP_INSTALL_DIR
-JAVA_INSTALL_DIR
-CSHARP_INSTALL_DIR
+
+ PYTHON_INSTALL_DIR
+ PHP_INSTALL_DIR
+ JAVA_INSTALL_DIR
+ CSHARP_INSTALL_DIR
=== Example ===
-Find libraries in lib64, install to /usr/lib64, build python and phpbindings:
+Find libraries in lib64, install to /usr/lib64, build python and
+phpbindings:
-$cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=/usr/lib64 -DPYTHON_BINDINGS=TRUE -DPYTHON_INSTALL_DIR=/usr/lib64/python$x.$y/site-packages/ -DPHP_BINDINGS=TRUE ..
+$ cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=/usr/lib64 \
+ -DPYTHON_BINDINGS=TRUE \
+ -DPYTHON_INSTALL_DIR=/usr/lib64/python$x.$y/site-packages/ \
+ -DPHP_BINDINGS=TRUE ..
== Requirements ==
Minimum requirements are:
--cmake 2.6
--boost >= 1.41
--xerces-c >= 3.0
--cxx >= 3.0 (http://www.codesynthesis.com/products/xsd/)
--libcurl
+
+ - cmake 2.6
+ - boost >= 1.41
+ - xerces-c >= 3.0
+ - cxx >= 3.0 (http://www.codesynthesis.com/products/xsd/)
+ - libcurl
For further features:
--SWIG >= 2.0
+
+ - SWIG >= 2.0
For building test (controlled by -DBUILD_TESTS=TRUE):
--Qt >= 4.7
+ - Qt >= 4.7
-For further information see src/DEVELOPMENT.
+For further information see src/DEVELOPMENT.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/cmake/modules/LibkolabxmlConfigVersion.cmake.in new/libkolabxml-1.1.0/cmake/modules/LibkolabxmlConfigVersion.cmake.in
--- old/libkolabxml-1.0.3/cmake/modules/LibkolabxmlConfigVersion.cmake.in 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/cmake/modules/LibkolabxmlConfigVersion.cmake.in 2014-12-31 16:55:13.000000000 +0100
@@ -3,9 +3,13 @@
# if the current version is >= requested version.
set(PACKAGE_VERSION @Libkolabxml_VERSION_MAJOR@.@Libkolabxml_VERSION_MINOR@.@Libkolabxml_VERSION_PATCH@)
+set(PACKAGE_VERSION_MAJOR @Libkolabxml_VERSION_MAJOR@)
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
set(PACKAGE_VERSION_COMPATIBLE FALSE)
+elseif(NOT "${PACKAGE_FIND_VERSION_MAJOR}" VERSION_EQUAL "${PACKAGE_VERSION_MAJOR}" )
+ #Major versions are incompatible and require an explicit switch
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
else("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/schemas/kolabformat.xsd new/libkolabxml-1.1.0/schemas/kolabformat.xsd
--- old/libkolabxml-1.0.3/schemas/kolabformat.xsd 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/schemas/kolabformat.xsd 2014-12-31 16:55:13.000000000 +0100
@@ -4,14 +4,10 @@
xmlns="http://kolab.org"
elementFormDefault="qualified">
+ <xs:complexType name="KolabBase">
+ <xs:attribute name="version" type="xs:string" default="3.0" />
+ </xs:complexType>
-
- <xs:complexType name="KolabBase">
- <xs:attribute name="version" type="xs:string" fixed="3.0" />
- </xs:complexType>
-
-
-
<xs:complexType name="attachmentPropType">
<xs:sequence>
<xs:element name="parameters">
@@ -102,6 +98,7 @@
<xs:enumeration value="dictionary"/>
<xs:enumeration value="categorycolor"/>
<xs:enumeration value="snippets"/>
+ <xs:enumeration value="relation"/>
<xs:enumeration value="file_driver"/>
</xs:restriction>
</xs:simpleType>
@@ -168,6 +165,14 @@
<!-- Snippets -->
<xs:element name="name" type="xs:string" minOccurs="0"/>
<xs:element name="snippet" type="Snippet" minOccurs="0" maxOccurs="unbounded"/>
+ <!-- Relation -->
+ <!-- xs:element name="name" type="xs:string" minOccurs="0"/ -->
+ <xs:element name="relationType" type="xs:string" minOccurs="0"/>
+ <xs:element name="color" type="xs:string" minOccurs="0"/>
+ <xs:element name="iconName" type="xs:string" minOccurs="0"/>
+ <xs:element name="priority" type="xs:integer" minOccurs="0"/>
+ <xs:element name="parent" type="xs:string" minOccurs="0"/>
+ <xs:element name="member" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<!-- FileDriver -->
<xs:element name="driver" type="xs:string" minOccurs="0"/>
<xs:element name="title" type="xs:string" minOccurs="0"/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/src/containers/kolabconfiguration.cpp new/libkolabxml-1.1.0/src/containers/kolabconfiguration.cpp
--- old/libkolabxml-1.0.3/src/containers/kolabconfiguration.cpp 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/src/containers/kolabconfiguration.cpp 2014-12-31 16:55:13.000000000 +0100
@@ -25,6 +25,7 @@
std::vector<CategoryColor> categoryColor;
Dictionary dictionary;
SnippetsCollection snippets;
+ Relation relation;
FileDriver fileDriver;
ConfigurationType type;
std::string uid;
@@ -58,6 +59,13 @@
d->type = TypeSnippet;
}
+Configuration::Configuration(const Relation &relation)
+: d(new Configuration::Private)
+{
+ d->relation = relation;
+ d->type = TypeRelation;
+}
+
Configuration::Configuration(const FileDriver &fileDriver)
: d(new Configuration::Private)
{
@@ -137,6 +145,11 @@
return d->snippets;
}
+Relation Configuration::relation() const
+{
+ return d->relation;
+}
+
FileDriver Configuration::fileDriver() const
{
return d->fileDriver;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/src/containers/kolabconfiguration.h new/libkolabxml-1.1.0/src/containers/kolabconfiguration.h
--- old/libkolabxml-1.0.3/src/containers/kolabconfiguration.h 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/src/containers/kolabconfiguration.h 2014-12-31 16:55:13.000000000 +0100
@@ -109,6 +109,47 @@
std::vector<Snippet> mSnippets;
};
+struct Relation {
+ Relation(){}
+ Relation(const std::string &name, const std::string &type): mName(name), mType(type) {}
+
+ bool operator==(const Relation &other) const {
+ return mName == other.mName &&
+ mType == other.mType &&
+ mColor == other.mColor &&
+ mIconName == other.mIconName &&
+ mParent == other.mParent &&
+ mMembers == other.mMembers;
+ }
+
+ std::string name() const { return mName; }
+ std::string type() const { return mType; }
+
+ void setColor(const std::string &color) { mColor = color; }
+ std::string color() const { return mColor; }
+
+ void setIconName(const std::string &icon) { mIconName = icon; }
+ std::string iconName() const { return mIconName; }
+
+ void setParent(const std::string &parent) { mParent = parent; }
+ std::string parent() const { return mParent; }
+
+ void setPriority(int priority) { mPriority = priority; }
+ int priority() const { return mPriority; }
+
+ void setMembers(const std::vector<std::string> &members) { mMembers = members; }
+ std::vector<std::string> members() const { return mMembers; }
+
+private:
+ std::string mName;
+ std::string mType;
+ std::string mColor;
+ std::string mIconName;
+ std::string mParent;
+ int mPriority;
+ std::vector<std::string> mMembers;
+};
+
struct FileDriver {
FileDriver(): mEnabled(false) {}
FileDriver(const std::string &driver, const std::string &title): mDriver(driver), mTitle(title), mEnabled(true) {}
@@ -160,6 +201,7 @@
Configuration(const std::vector<CategoryColor> &);
Configuration(const Dictionary &);
Configuration(const SnippetsCollection &);
+ Configuration(const Relation &);
Configuration(const FileDriver &);
Configuration(const Configuration &);
~Configuration();
@@ -181,12 +223,14 @@
TypeDictionary,
TypeCategoryColor,
TypeSnippet,
+ TypeRelation,
TypeFileDriver
};
ConfigurationType type() const;
std::vector<CategoryColor> categoryColor() const;
Dictionary dictionary() const;
SnippetsCollection snippets() const;
+ Relation relation() const;
FileDriver fileDriver() const;
private:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/src/csharp/CMakeLists.txt new/libkolabxml-1.1.0/src/csharp/CMakeLists.txt
--- old/libkolabxml-1.0.3/src/csharp/CMakeLists.txt 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/src/csharp/CMakeLists.txt 2014-12-31 16:55:13.000000000 +0100
@@ -34,6 +34,8 @@
${CMAKE_CURRENT_BINARY_DIR}/Event.cs
${CMAKE_CURRENT_BINARY_DIR}/File.cs
${CMAKE_CURRENT_BINARY_DIR}/FileDriver.cs
+ ${CMAKE_CURRENT_BINARY_DIR}/Freebusy.cs
+ ${CMAKE_CURRENT_BINARY_DIR}/FreebusyPeriod.cs
${CMAKE_CURRENT_BINARY_DIR}/Geo.cs
${CMAKE_CURRENT_BINARY_DIR}/Journal.cs
${CMAKE_CURRENT_BINARY_DIR}/Key.cs
@@ -41,17 +43,15 @@
${CMAKE_CURRENT_BINARY_DIR}/NameComponents.cs
${CMAKE_CURRENT_BINARY_DIR}/Note.cs
${CMAKE_CURRENT_BINARY_DIR}/PartStatus.cs
+ ${CMAKE_CURRENT_BINARY_DIR}/Period.cs
${CMAKE_CURRENT_BINARY_DIR}/RecurrenceRule.cs
${CMAKE_CURRENT_BINARY_DIR}/Related.cs
+ ${CMAKE_CURRENT_BINARY_DIR}/Relation.cs
${CMAKE_CURRENT_BINARY_DIR}/Relative.cs
${CMAKE_CURRENT_BINARY_DIR}/Role.cs
${CMAKE_CURRENT_BINARY_DIR}/Snippet.cs
${CMAKE_CURRENT_BINARY_DIR}/SnippetsCollection.cs
${CMAKE_CURRENT_BINARY_DIR}/Status.cs
- ${CMAKE_CURRENT_BINARY_DIR}/Snippet.cs
- ${CMAKE_CURRENT_BINARY_DIR}/SnippetsCollection.cs
- ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_Kolab__Freebusy.cs
- ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_std__vectorT_Kolab__Todo_t.cs
${CMAKE_CURRENT_BINARY_DIR}/Telephone.cs
${CMAKE_CURRENT_BINARY_DIR}/Todo.cs
${CMAKE_CURRENT_BINARY_DIR}/Url.cs
@@ -67,13 +67,16 @@
${CMAKE_CURRENT_BINARY_DIR}/vectordaypos.cs
${CMAKE_CURRENT_BINARY_DIR}/vectoremail.cs
${CMAKE_CURRENT_BINARY_DIR}/vectorevent.cs
+ ${CMAKE_CURRENT_BINARY_DIR}/vectorfreebusyperiod.cs
${CMAKE_CURRENT_BINARY_DIR}/vectorgeo.cs
${CMAKE_CURRENT_BINARY_DIR}/vectori.cs
${CMAKE_CURRENT_BINARY_DIR}/vectorkey.cs
+ ${CMAKE_CURRENT_BINARY_DIR}/vectorperiod.cs
${CMAKE_CURRENT_BINARY_DIR}/vectorrelated.cs
${CMAKE_CURRENT_BINARY_DIR}/vectors.cs
${CMAKE_CURRENT_BINARY_DIR}/vectorsnippet.cs
${CMAKE_CURRENT_BINARY_DIR}/vectortelephone.cs
+ ${CMAKE_CURRENT_BINARY_DIR}/vectortodo.cs
${CMAKE_CURRENT_BINARY_DIR}/vectorurl.cs
${CMAKE_CURRENT_BINARY_DIR}/Weekday.cs
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/src/java/CMakeLists.txt new/libkolabxml-1.1.0/src/java/CMakeLists.txt
--- old/libkolabxml-1.0.3/src/java/CMakeLists.txt 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/src/java/CMakeLists.txt 2014-12-31 16:55:13.000000000 +0100
@@ -23,7 +23,10 @@
${CMAKE_CURRENT_BINARY_DIR}/Duration.java
${CMAKE_CURRENT_BINARY_DIR}/ErrorSeverity.java
${CMAKE_CURRENT_BINARY_DIR}/Event.java
+ ${CMAKE_CURRENT_BINARY_DIR}/File.java
${CMAKE_CURRENT_BINARY_DIR}/FileDriver.java
+ ${CMAKE_CURRENT_BINARY_DIR}/Freebusy.java
+ ${CMAKE_CURRENT_BINARY_DIR}/FreebusyPeriod.java
${CMAKE_CURRENT_BINARY_DIR}/Geo.java
${CMAKE_CURRENT_BINARY_DIR}/Journal.java
${CMAKE_CURRENT_BINARY_DIR}/Key.java
@@ -33,14 +36,15 @@
${CMAKE_CURRENT_BINARY_DIR}/NameComponents.java
${CMAKE_CURRENT_BINARY_DIR}/Note.java
${CMAKE_CURRENT_BINARY_DIR}/PartStatus.java
+ ${CMAKE_CURRENT_BINARY_DIR}/Period.java
${CMAKE_CURRENT_BINARY_DIR}/RecurrenceRule.java
+ ${CMAKE_CURRENT_BINARY_DIR}/Relation.java
${CMAKE_CURRENT_BINARY_DIR}/Related.java
${CMAKE_CURRENT_BINARY_DIR}/Relative.java
${CMAKE_CURRENT_BINARY_DIR}/Role.java
${CMAKE_CURRENT_BINARY_DIR}/Status.java
${CMAKE_CURRENT_BINARY_DIR}/Snippet.java
${CMAKE_CURRENT_BINARY_DIR}/SnippetsCollection.java
- ${CMAKE_CURRENT_BINARY_DIR}/SWIGTYPE_p_Kolab__Freebusy.java
${CMAKE_CURRENT_BINARY_DIR}/Telephone.java
${CMAKE_CURRENT_BINARY_DIR}/Todo.java
${CMAKE_CURRENT_BINARY_DIR}/Url.java
@@ -54,13 +58,18 @@
${CMAKE_CURRENT_BINARY_DIR}/vectorcs.java
${CMAKE_CURRENT_BINARY_DIR}/vectordatetime.java
${CMAKE_CURRENT_BINARY_DIR}/vectordaypos.java
+ ${CMAKE_CURRENT_BINARY_DIR}/vectoremail.java
+ ${CMAKE_CURRENT_BINARY_DIR}/vectorevent.java
+ ${CMAKE_CURRENT_BINARY_DIR}/vectorfreebusyperiod.java
${CMAKE_CURRENT_BINARY_DIR}/vectorgeo.java
${CMAKE_CURRENT_BINARY_DIR}/vectori.java
${CMAKE_CURRENT_BINARY_DIR}/vectorkey.java
+ ${CMAKE_CURRENT_BINARY_DIR}/vectorperiod.java
${CMAKE_CURRENT_BINARY_DIR}/vectorrelated.java
${CMAKE_CURRENT_BINARY_DIR}/vectors.java
${CMAKE_CURRENT_BINARY_DIR}/vectorsnippet.java
${CMAKE_CURRENT_BINARY_DIR}/vectortelephone.java
+ ${CMAKE_CURRENT_BINARY_DIR}/vectortodo.java
${CMAKE_CURRENT_BINARY_DIR}/vectorurl.java
${CMAKE_CURRENT_BINARY_DIR}/Weekday.java
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/src/kolabconversions.h new/libkolabxml-1.1.0/src/kolabconversions.h
--- old/libkolabxml-1.0.3/src/kolabconversions.h 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/src/kolabconversions.h 2014-12-31 16:55:13.000000000 +0100
@@ -45,6 +45,13 @@
using namespace Kolab::Utils;
using namespace Kolab::Shared;
+template <typename T>
+std::vector<std::string> toStringList(const xsd::cxx::tree::sequence<T> &s)
+{
+ std::vector<std::string> d;
+ std::copy(s.begin(), s.end(), std::back_inserter(d));
+ return d;
+}
Kolab::Attachment toAttachment(KolabXSD::attachmentPropType aProp)
{
@@ -120,7 +127,7 @@
return colors;
}
-KolabXSD::Configuration::type_type getConfiguratinoType(Kolab::Configuration::ConfigurationType t)
+KolabXSD::Configuration::type_type getConfigurationType(Kolab::Configuration::ConfigurationType t)
{
switch (t) {
case Kolab::Configuration::TypeDictionary:
@@ -129,6 +136,8 @@
return KolabXSD::Configuration::type_type::categorycolor;
case Kolab::Configuration::TypeSnippet:
return KolabXSD::Configuration::type_type::snippets;
+ case Kolab::Configuration::TypeRelation:
+ return KolabXSD::Configuration::type_type::relation;
case Kolab::Configuration::TypeFileDriver:
return KolabXSD::Configuration::type_type::file_driver;
default:
@@ -161,7 +170,7 @@
// WARNING("missing last_modification_date, fallback to current timestamp");
lastModificationDate = fromDateTime(timestamp());
}
- KolabXSD::Configuration n(uid, getProductId(prod), created, lastModificationDate, getConfiguratinoType(configuration.type()));
+ KolabXSD::Configuration n(uid, getProductId(prod), created, lastModificationDate, getConfigurationType(configuration.type()));
switch (configuration.type()) {
case Kolab::Configuration::TypeDictionary: {
@@ -191,6 +200,29 @@
}
}
break;
+ case Kolab::Configuration::TypeRelation: {
+ const Kolab::Relation &relation = configuration.relation();
+ n.name(relation.name());
+ if (!relation.type().empty()) {
+ n.relationType(relation.type());
+ }
+ if (!relation.color().empty()) {
+ n.color(relation.color());
+ }
+ if (!relation.iconName().empty()) {
+ n.iconName(relation.iconName());
+ }
+ if (!relation.parent().empty()) {
+ n.parent(relation.parent());
+ }
+ if (!relation.priority() != 0) {
+ n.priority(fromInt<KolabXSD::Configuration::priority_type>(relation.priority()));
+ }
+ BOOST_FOREACH(const std::string &s, relation.members()) {
+ n.member().push_back(s);
+ }
+ }
+ break;
case Kolab::Configuration::TypeFileDriver: {
const Kolab::FileDriver &fileDriver = configuration.fileDriver();
n.driver(fileDriver.driver());
@@ -531,6 +563,31 @@
collection.setSnippets(snippets);
n = boost::shared_ptr<Kolab::Configuration>(new Kolab::Configuration(collection));
+ } else if (configuration->type() == KolabXSD::ConfigurationType::relation) {
+ std::string name;
+ if (configuration->name()) {
+ name = *configuration->name();
+ }
+ std::string type;
+ if (configuration->relationType()) {
+ type = *configuration->relationType();
+ }
+ Relation relation(name, type);
+ if (configuration->color()) {
+ relation.setColor(*configuration->color());
+ }
+ if (configuration->iconName()) {
+ relation.setIconName(*configuration->iconName());
+ }
+ if (configuration->parent()) {
+ relation.setParent(*configuration->parent());
+ }
+ if (configuration->priority()) {
+ relation.setPriority(convertToInt(*configuration->priority()));
+ }
+ relation.setMembers(toStringList(configuration->member()));
+
+ n = boost::shared_ptr<Kolab::Configuration>(new Kolab::Configuration(relation));
} else if (configuration->type() == KolabXSD::ConfigurationType::file_driver) {
std::string driver;
if (configuration->driver()) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/src/kolabformat.i new/libkolabxml-1.1.0/src/kolabformat.i
--- old/libkolabxml-1.0.3/src/kolabformat.i 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/src/kolabformat.i 2014-12-31 16:55:13.000000000 +0100
@@ -15,6 +15,7 @@
#include "containers/kolabnote.h"
#include "containers/kolabconfiguration.h"
#include "containers/kolabfile.h"
+ #include "containers/kolabfreebusy.h"
%}
%include "std_string.i"
@@ -39,12 +40,15 @@
%template(vectorevent) vector<Kolab::Event>;
%template(vectorrelated) vector<Kolab::Related>;
%template(vectortelephone) vector<Kolab::Telephone>;
+ %template(vectortodo) vector<Kolab::Todo>;
%template(vectoremail) vector<Kolab::Email>;
%template(vectordatetime) vector<Kolab::cDateTime>;
%template(vectorurl) vector<Kolab::Url>;
%template(vectorkey) vector<Kolab::Key>;
%template(vectorcategorycolor) vector<Kolab::CategoryColor>;
%template(vectorsnippet) vector<Kolab::Snippet>;
+ %template(vectorfreebusyperiod) vector<Kolab::FreebusyPeriod>;
+ %template(vectorperiod) vector<Kolab::Period>;
};
%rename(readKolabFile) Kolab::readFile;
@@ -60,3 +64,4 @@
%include "containers/kolabnote.h"
%include "containers/kolabconfiguration.h"
%include "containers/kolabfile.h"
+%include "containers/kolabfreebusy.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/src/objectvalidation.cpp new/libkolabxml-1.1.0/src/objectvalidation.cpp
--- old/libkolabxml-1.0.3/src/objectvalidation.cpp 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/src/objectvalidation.cpp 2014-12-31 16:55:13.000000000 +0100
@@ -31,7 +31,7 @@
static boost::unordered_set<std::string> initializeTzSet() {
boost::unordered_set<std::string> set;
- for (int i = 0; i < numOlsonTimezones; i++) {
+ for (unsigned int i = 0; i < numOlsonTimezones; i++) {
set.insert(olsonTimezones[i]);
}
return set;
@@ -110,32 +110,32 @@
ASSERTVALID(journal.start());
}
-void validate(const Contact& contact)
+void validate(const Contact& /* contact */)
{
}
-void validate(const DistList& distlist)
+void validate(const DistList& /* distlist */)
{
}
-void validate(const Freebusy& freebusy)
+void validate(const Freebusy& /* freebusy */)
{
}
-void validate(const Note& note)
+void validate(const Note& /* note */)
{
}
-void validate(const Configuration& configuration)
+void validate(const Configuration& /* configuration */)
{
}
-void validate(const File& file)
+void validate(const File& /* file */)
{
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/src/php/test.php new/libkolabxml-1.1.0/src/php/test.php
--- old/libkolabxml-1.0.3/src/php/test.php 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/src/php/test.php 2014-12-31 16:55:13.000000000 +0100
@@ -121,6 +121,52 @@
#print $xml;
assertcontains($xml, '<byday>2MO</byday><byday>-1FR</byday>', "Recurrence by weekday");
+$att1 = new Attendee(new ContactReference("john(a)kolab.org"));
+$att1->setPartStat(kolabformat::PartDelegated);
+$att2 = new Attendee(new ContactReference("jane(a)kolab.org"));
+$att1->setPartStat(kolabformat::PartNeedsAction);
+
+$vdelegatees = new vectorcontactref;
+$vdelegatees->push($att2->contact());
+$att1->setDelegatedTo($vdelegatees);
+
+$vdelegators = new vectorcontactref;
+$vdelegators->push($att1->contact());
+$att2->setDelegatedFrom($vdelegators);
+
+$attendees = new vectorattendee;
+$attendees->push($att1);
+$attendees->push($att2);
+$e1->setAttendees($attendees);
+
+$xml = kolabformat::writeEvent($e1);
+assertcontains($xml, '<delegated-to><cal-address>mailto:%3Cjane%40kolab.org%3E</cal-address>', "Delegated-To");
+assertcontains($xml, '<delegated-from><cal-address>mailto:%3Cjohn%40kolab.org%3E</cal-address>', "Delegated-From");
+
+$e2 = kolabformat::readEvent($xml, false);
+$attendees_ = $e2->attendees();
+assertequal($attendees_->size(), 2, "Event::attendees()");
+$att1_ = $attendees_->get(0);
+$att2_ = $attendees_->get(1);
+assertequal($att1_->contact()->email(), "john(a)kolab.org", "Attendee email");
+$vdelegatees_ = $att1_->delegatedTo();
+assertequal($vdelegatees_->size(), 1, "Attendee::delegatedTo()");
+assertequal($vdelegatees_->get(0)->email(), "jane(a)kolab.org", "Delegated-To email");
+
+
+/////// Test Todo
+
+$t = new Todo();
+$t->setCreated(new cDateTime(2014,3,14, 9,5,30, true));
+$due = new cDateTime(2014,5,20, 17,30,0);
+$t->setDue($due);
+$t->setStart(new cDateTime(2014,4,30, 8,0,0));
+$t->setSummary('Test Task');
+
+$xml = kolabformat::writeTodo($t);
+#print $xml;
+assertcontains($xml, '<due><date-time>2014-05-20T17:30:00</date-time></due>', "Todo::setDue() with date/time");
+assertcontains($xml, '<dtstart><date-time>2014-04-30T08:00:00</date-time></dtstart>', "Todo::setStart() with date/time");
/////// Test Contact
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/src/python/test.py new/libkolabxml-1.1.0/src/python/test.py
--- old/libkolabxml-1.0.3/src/python/test.py 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/src/python/test.py 2014-12-31 16:55:13.000000000 +0100
@@ -1,16 +1,77 @@
import kolabformat
-e = kolabformat.Event()
+import unittest
-ex = e.exceptionDates()
-ex.size()
-ex.push_back(kolabformat.cDateTime(1,1,1))
-ex.size()
-e.exceptionDates().size()
-e.setExceptionDates(ex)
-e.exceptionDates().size()
-
-string = kolabformat.writeEvent(e);
-print string;
-e1 = kolabformat.readEvent(string, False);
-string = kolabformat.writeEvent(e1);
-print string;
\ No newline at end of file
+class TestKolabformat(unittest.TestCase):
+
+ def test_event_basic(self):
+ e = kolabformat.Event()
+ e.setSummary("test")
+
+ start = kolabformat.cDateTime(2014,7,1, 12,30,0)
+ start.setTimezone("Europe/London")
+ e.setStart(start)
+
+ ex = e.exceptionDates()
+ ex.size()
+ ex.push_back(kolabformat.cDateTime(2014,7,5))
+ ex.size()
+ e.exceptionDates().size()
+ e.setExceptionDates(ex)
+ e.exceptionDates().size()
+
+ xml = kolabformat.writeEvent(e)
+ e1 = kolabformat.readEvent(xml, False)
+ xml1 = kolabformat.writeEvent(e1)
+ self.assertEqual(xml, xml1)
+
+ def test_event_delegated(self):
+ e = kolabformat.Event()
+ e.setSummary("test")
+ e.setStart(kolabformat.cDateTime(2014,7,1, 12,30,0))
+
+ att1 = kolabformat.Attendee(kolabformat.ContactReference("john(a)doe.org"))
+ att1.setRole(kolabformat.NonParticipant)
+ att1.setPartStat(kolabformat.PartDelegated)
+ att1.setDelegatedTo([kolabformat.ContactReference("jane(a)doe.org")])
+
+ att2 = kolabformat.Attendee(kolabformat.ContactReference("jane(a)doe.org"))
+ att2.setRole(kolabformat.Required)
+ att2.setPartStat(kolabformat.PartNeedsAction)
+ att2.setDelegatedFrom([kolabformat.ContactReference("john(a)doe.org")])
+
+ e.setAttendees([att1, att2])
+ self.assertEqual(len(att1.delegatedTo()), 1)
+ self.assertEqual(len(att2.delegatedFrom()), 1)
+
+ xml = kolabformat.writeEvent(e)
+ e1 = kolabformat.readEvent(xml, False)
+ # print xml
+
+ attendees_ = e1.attendees()
+ self.assertEqual(len(attendees_), 2)
+ self.assertEqual(len(attendees_[0].delegatedTo()), 1)
+ self.assertEqual(len(attendees_[1].delegatedFrom()), 1)
+
+ delegatees = attendees_[0].delegatedTo()
+ self.assertEqual(delegatees[0].email(), "jane(a)doe.org")
+
+ def test_todo_partstat(self):
+ t = kolabformat.Todo()
+ t.setSummary("test")
+ t.setPercentComplete(40)
+
+ att = kolabformat.Attendee(kolabformat.ContactReference("john(a)doe.org"))
+ att.setRole(kolabformat.Required)
+ att.setPartStat(kolabformat.PartInProcess)
+ t.setAttendees([att])
+
+ xml = kolabformat.writeTodo(t)
+ self.assertTrue("<text>IN-PROCESS</text>" in xml)
+
+ t1 = kolabformat.readTodo(xml, False)
+ attendees = t1.attendees()
+ self.assertEqual(attendees[0].partStat(), kolabformat.PartInProcess)
+
+
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/testfiles/testnote.xml new/libkolabxml-1.1.0/testfiles/testnote.xml
--- old/libkolabxml-1.0.3/testfiles/testnote.xml 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/testfiles/testnote.xml 1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<note version="3.0dev1" xmlns="http://kolab.org">
- <!-- Common fields -->
- <uid>uid</uid>
- <body></body>
- <categories></categories>
- <creation-date>2004-05-04T15:00:00Z</creation-date>
- <last-modification-date>2004-05-04T15:00:00Z</last-modification-date>
- <sensitivity>public</sensitivity>
- <inline-attachment></inline-attachment>
- <link-attachment></link-attachment>
- <product-id></product-id>
- <!-- Note specific fields -->
- <summary>summarytext</summary>
- <background-color>#000000</background-color>
- <foreground-color>#ffff00</foreground-color>
-</note>
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/tests/CMakeLists.txt new/libkolabxml-1.1.0/tests/CMakeLists.txt
--- old/libkolabxml-1.0.3/tests/CMakeLists.txt 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/tests/CMakeLists.txt 2014-12-31 16:55:13.000000000 +0100
@@ -26,14 +26,19 @@
add_test(conversiontest ${CMAKE_CURRENT_BINARY_DIR}/conversiontest)
QT4_AUTOMOC(parsingtest.cpp)
- add_executable(parsingtest parsingtest.cpp ${CMAKE_CURRENT_BINARY_DIR}/${CONVERSIONTEST_MOC})
+ add_executable(parsingtest parsingtest.cpp ${CMAKE_CURRENT_BINARY_DIR}/${PARSINGTEST_MOC})
target_link_libraries(parsingtest ${QT_QTTEST_LIBRARY} ${QT_QTCORE_LIBRARY} kolabxml ${XERCES_C})
add_test(parsingtest ${CMAKE_CURRENT_BINARY_DIR}/parsingtest)
QT4_AUTOMOC(validationtest.cpp)
- add_executable(validationtest validationtest.cpp ${CMAKE_CURRENT_BINARY_DIR}/${CONVERSIONTEST_MOC})
+ add_executable(validationtest validationtest.cpp ${CMAKE_CURRENT_BINARY_DIR}/${VALIDATIONTEST_MOC})
target_link_libraries(validationtest ${QT_QTTEST_LIBRARY} ${QT_QTCORE_LIBRARY} kolabxml ${XERCES_C})
add_test(validationtest ${CMAKE_CURRENT_BINARY_DIR}/validationtest)
+
+ QT4_AUTOMOC(kolabconversationtest.cpp)
+ add_executable(kolabconversationtest kolabconversationtest.cpp ${CMAKE_CURRENT_BINARY_DIR}/${KOLABCONVERSATIONTEST_MOC})
+ target_link_libraries(kolabconversationtest ${QT_QTTEST_LIBRARY} ${QT_QTCORE_LIBRARY} kolabxml ${XERCES_C})
+ add_test(kolabconversationtest ${CMAKE_CURRENT_BINARY_DIR}/kolabconversationtest)
else()
message(WARNING "Could not build tests because qt is missing")
endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/tests/bindingstest.cpp new/libkolabxml-1.1.0/tests/bindingstest.cpp
--- old/libkolabxml-1.0.3/tests/bindingstest.cpp 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/tests/bindingstest.cpp 2014-12-31 16:55:13.000000000 +0100
@@ -105,6 +105,35 @@
QCOMPARE(re.snippets(), snippets);
}
+void BindingsTest::relationConfigurationCompletness()
+{
+ Kolab::Relation relation("name1", "type1");
+ relation.setColor("color");
+ relation.setIconName("icon");
+ relation.setParent("parent");
+ relation.setPriority(3);
+ std::vector<std::string> members;
+ members.push_back("member1");
+ members.push_back("member2");
+ relation.setMembers(members);
+
+ Kolab::Configuration configuration(relation);
+ configuration.setUid("uid");
+ configuration.setCreated(Kolab::cDateTime(2006,1,6,12,0,0,true)); //UTC
+ configuration.setLastModified(Kolab::cDateTime(2006,1,6,12,0,0,true)); //UTC
+
+ const std::string &result = Kolab::writeConfiguration(configuration);
+ QCOMPARE(Kolab::error(), Kolab::NoError);
+// std::cout << result << std::endl;
+ const Kolab::Configuration &re = Kolab::readConfiguration(result, false);
+ QCOMPARE(Kolab::error(), Kolab::NoError);
+ QCOMPARE(re.uid(), configuration.uid());
+ QCOMPARE(re.created(), configuration.created());
+ QCOMPARE(re.lastModified(), configuration.lastModified());
+ QCOMPARE(re.type(), Kolab::Configuration::TypeRelation);
+ QCOMPARE(re.relation(), relation);
+}
+
void BindingsTest::fileDriverConfigurationCompletness()
{
Kolab::FileDriver fileDriver("driver", "title");
@@ -740,6 +769,23 @@
QCOMPARE(e.customProperties(), c.customProperties());
}
+void BindingsTest::dateOnlyDates()
+{
+ Kolab::Contact c;
+ c.setUid("1045b57d-ff7f-0000-d814-867b4d7f0000");
+ c.setName("name");
+ c.setBDay(Kolab::cDateTime(2001,12,10));
+ c.setAnniversary(Kolab::cDateTime(2001,3,2));
+
+ const std::string result = Kolab::writeContact(c);
+ QVERIFY(Kolab::error() == Kolab::NoError);
+// std::cout << result << endl;
+ Kolab::Contact e = Kolab::readContact(result, false);
+ QVERIFY(Kolab::error() == Kolab::NoError);
+ QCOMPARE(e.bDay(), c.bDay());
+ QCOMPARE(e.anniversary(), c.anniversary());
+}
+
void BindingsTest::distlistCompletness()
{
std::vector<std::string> stringlist;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/tests/bindingstest.h new/libkolabxml-1.1.0/tests/bindingstest.h
--- old/libkolabxml-1.0.3/tests/bindingstest.h 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/tests/bindingstest.h 2014-12-31 16:55:13.000000000 +0100
@@ -25,6 +25,7 @@
void categorycolorConfigurationCompletness();
void dictionaryConfigurationCompletness();
void snippetConfigurationCompletness();
+ void relationConfigurationCompletness();
void fileDriverConfigurationCompletness();
void noteCompletness();
void fileCompletness();
@@ -37,6 +38,7 @@
void freebusyCompletness();
void contactCompletness();
+ void dateOnlyDates();
void distlistCompletness();
void generateTimestampIfEmpty();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/tests/kolabconversationtest.cpp new/libkolabxml-1.1.0/tests/kolabconversationtest.cpp
--- old/libkolabxml-1.0.3/tests/kolabconversationtest.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/libkolabxml-1.1.0/tests/kolabconversationtest.cpp 2014-12-31 16:55:13.000000000 +0100
@@ -0,0 +1,47 @@
+/*
+ Copyright (C) 2014 Sandro Knauß <knauss(a)kolabsys.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#include "kolabconversationtest.h"
+
+#include <QTest>
+#include <QDebug>
+#include <iostream>
+
+#include "src/kolabconversions.h"
+
+void KolabConversationTest::configurationDeserialationTest()
+{
+ boost::shared_ptr <Kolab::Configuration> ptr = Kolab::KolabObjects::deserializeObject<Kolab::Configuration>(TEST_DATA_PATH "/testfiles/testConfiguration.xml", true);
+ QVERIFY(ptr);
+ QVERIFY(ptr->isValid());
+ QCOMPARE(ptr->type(), Kolab::Configuration::TypeRelation);
+
+}
+
+void KolabConversationTest::noteDeserialationTest()
+{
+ boost::shared_ptr <Kolab::Note> ptr = Kolab::KolabObjects::deserializeObject<Kolab::Note>(TEST_DATA_PATH "/testfiles/testNote.xml", true);
+ QVERIFY(ptr);
+ QVERIFY(ptr->isValid());
+ QCOMPARE(ptr->summary(), std::string("summarytext"));
+}
+
+
+QTEST_MAIN( KolabConversationTest )
+
+#include "kolabconversationtest.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/tests/kolabconversationtest.h new/libkolabxml-1.1.0/tests/kolabconversationtest.h
--- old/libkolabxml-1.0.3/tests/kolabconversationtest.h 1970-01-01 01:00:00.000000000 +0100
+++ new/libkolabxml-1.1.0/tests/kolabconversationtest.h 2014-12-31 16:55:13.000000000 +0100
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2014 Sandro Knauß <knauss(a)kolabsys.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+
+#ifndef KOLABCONVERSATIONTEST_H
+#define KOLABCONVERSATIONTEST_H
+
+#include <QObject>
+
+class KolabConversationTest: public QObject
+{
+ Q_OBJECT
+private slots:
+ void configurationDeserialationTest();
+ void noteDeserialationTest();
+};
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/tests/testfiles/testConfiguration.xml new/libkolabxml-1.1.0/tests/testfiles/testConfiguration.xml
--- old/libkolabxml-1.0.3/tests/testfiles/testConfiguration.xml 1970-01-01 01:00:00.000000000 +0100
+++ new/libkolabxml-1.1.0/tests/testfiles/testConfiguration.xml 2014-12-31 16:55:13.000000000 +0100
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<configuration xmlns="http://kolab.org" version="3.0dev1">
+ <uid>6194e99c-69c0-11e4-9911-080027fe5a4c</uid>
+ <prodid>Roundcube-libkolab-1.1 Libkolabxml-1.1</prodid>
+ <creation-date>2014-11-11T16:32:51Z</creation-date>
+ <last-modification-date>2014-11-11T16:32:51Z</last-modification-date>
+ <type>relation</type>
+</configuration>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/tests/testfiles/testNote.xml new/libkolabxml-1.1.0/tests/testfiles/testNote.xml
--- old/libkolabxml-1.0.3/tests/testfiles/testNote.xml 1970-01-01 01:00:00.000000000 +0100
+++ new/libkolabxml-1.1.0/tests/testfiles/testNote.xml 2014-12-31 16:55:13.000000000 +0100
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<note version="3.0dev1" xmlns="http://kolab.org">
+ <uid>uid</uid>
+ <prodid></prodid>
+ <creation-date>2014-11-11T16:32:51Z</creation-date>
+ <last-modification-date>2014-11-11T16:32:51Z</last-modification-date>
+ <classification>PUBLIC</classification>
+ <summary>summarytext</summary>
+ <color>#ffff00</color>
+</note>
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkolabxml-1.0.3/tztable.h new/libkolabxml-1.1.0/tztable.h
--- old/libkolabxml-1.0.3/tztable.h 2014-10-13 11:49:38.000000000 +0200
+++ new/libkolabxml-1.1.0/tztable.h 2014-12-31 16:55:13.000000000 +0100
@@ -420,5 +420,5 @@
"Africa/Harare"
};
-static const int numOlsonTimezones = sizeof olsonTimezones / sizeof *olsonTimezones;
+static const long unsigned int numOlsonTimezones = sizeof olsonTimezones / sizeof *olsonTimezones;
1
0