Hello community, here is the log from the commit of package open-isns for openSUSE:Leap:15.2 checked in at 2020-03-13 10:56:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/open-isns (Old) and /work/SRC/openSUSE:Leap:15.2/.open-isns.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "open-isns" Fri Mar 13 10:56:31 2020 rev:15 rq:782193 version:0.100 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/open-isns/open-isns.changes 2020-01-15 15:36:26.806986608 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.open-isns.new.3160/open-isns.changes 2020-03-13 10:56:35.492401155 +0100 @@ -1,0 +2,18 @@ +Wed Mar 04 18:36:22 UTC 2020 - [email protected] + +- Update to version 0.100 (jre#SLE-7751): + * Updated ChangeLog with latest fixes + * Create and use pythong unittest framework + * Ignore SO lib + * Handle restarting test harness server correctly + * Fix mdebug.c so it compiles when enabled. + * Running make twice should not rebuild everything + * Change isns_portal_string() to use static mem + * Adding python compiled files + * fixed issues with old openssl usage + * Added debugging, moved .cvsignore to .gitignore + Replacing the upstream tarball, and adding upstream patches: + * open-isns-fix-586-time.patch + * open-isns-updates.diff.bz2 + +------------------------------------------------------------------- Old: ---- open-isns-0.98.tar.gz New: ---- _service _servicedata open-isns-0.100.tar.xz open-isns-fix-586-time.patch open-isns-updates.diff.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ open-isns.spec ++++++ --- /var/tmp/diff_new_pack.2U3Zd0/_old 2020-03-13 10:56:35.780401361 +0100 +++ /var/tmp/diff_new_pack.2U3Zd0/_new 2020-03-13 10:56:35.780401361 +0100 @@ -1,7 +1,7 @@ # # spec file for package open-isns # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 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 @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -20,11 +20,13 @@ Summary: Partial Implementation of iSNS iSCSI registration License: LGPL-2.1+ Group: System/Kernel -Version: 0.98 +Version: 0.100 Release: 0 -Source: %{name}-%{version}.tar.gz -Url: https://github.com/open-iscsi/%{name} +Source: %{name}-%{version}.tar.xz +URL: https://github.com/open-iscsi/%{name} Source1: %{name}-firewall.service +Patch1: %{name}-updates.diff.bz2 +Patch2: %{name}-fix-586-time.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -40,7 +42,7 @@ which supplies directory services for iSCSI initiators and targets. The iSNS protocol is specified in -[RFC 4171](http://tools.ietf.org/html/rfc4171) and its purpose is to +[RFC 4171](https://tools.ietf.org/html/rfc4171) and its purpose is to make easier to discover, manage, and configure iSCSI devices. With iSNS, iSCSI targets can be registered to a central iSNS server and initiators can be configured to discover the targets by asking the @@ -56,11 +58,13 @@ %prep %setup -n %{name}-%{version} +%patch1 -p1 +%patch2 -p1 %build autoconf autoheader -%configure --prefix=%{_prefix} +%configure make OPTFLAGS="%{optflags}" %install @@ -95,7 +99,8 @@ %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/isns/isnsdd.conf %attr(0644,root,root) %config /etc/sysconfig/SuSEfirewall2.d/services/isns %{_sbindir}/rcisnsd -%doc COPYING HACKING README TODO +%license COPYING +%doc HACKING README TODO %doc %{_mandir}/man8/isnsd.8%{?ext_man} %doc %{_mandir}/man8/isnsadm.8%{?ext_man} %doc %{_mandir}/man8/isnsdd.8%{?ext_man} ++++++ _service ++++++ <services> <service name="tar_scm" mode="disabled"> <param name="scm">git</param> <param name="url">https://github.com/open-iscsi/open-isns.git</param> <param name="subdir"></param> <param name="filename">open-isns</param> <param name="versionformat">0.100</param> <param name="revision">v0.100</param> <param name="changesgenerate">enable</param> </service> <service name="recompress" mode="disabled"> <param name="file">open-isns*.tar</param> <param name="compression">xz</param> </service> <service name="set_version" mode="disabled"/> </services> ++++++ _servicedata ++++++ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/open-iscsi/open-isns.git</param> <param name="changesrevision">0ad95d07e4d272fed2af2c614b37c6e64c8945b2</param></service></servicedata>++++++ open-isns-fix-586-time.patch ++++++ diff -aurp a/configure.ac b/configure.ac --- a/configure.ac 2020-01-23 13:02:36.000000000 -0800 +++ b/configure.ac 2020-02-01 10:14:08.853538750 -0800 @@ -17,7 +17,7 @@ AC_PATH_PROG(SH, sh) dnl C Compiler features AC_C_INLINE if test "$GCC" = "yes"; then - CFLAGS="-Wall -Werror -Wextra $CFLAGS" + CFLAGS="-Wall -Wextra $CFLAGS" CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" fi Only in ./open-isns-0.100: .configure.ac.swp diff -aurp a/isnsdd.c b/isnsdd.c --- a/isnsdd.c 2020-01-23 13:02:36.000000000 -0800 +++ b/isnsdd.c 2020-02-01 10:14:04.277547782 -0800 @@ -401,7 +401,7 @@ check_portal_registration(__attribute__( continue; last_modified = isns_object_last_modified(obj); - if (last_modified + 2 * interval > now) { + if ((time_t)(last_modified + 2 * interval) > now) { good_portals++; continue; } ++++++ open-isns-updates.diff.bz2 ++++++ diff --git a/client.c b/client.c index 848787718623..fda26be3f6f9 100644 --- a/client.c +++ b/client.c @@ -122,22 +122,17 @@ isns_client_get_local_address(const isns_client_t *clnt, /* * Create a security context */ +#ifdef WITH_SECURITY static isns_security_t * __create_security_context(const char *name, const char *auth_key, const char *server_key) { -#ifdef WITH_SECURITY isns_security_t *ctx; isns_principal_t *princ; -#endif /* WITH_SECURITY */ if (!isns_config.ic_security) return NULL; -#ifndef WITH_SECURITY - isns_error("Cannot create security context: security disabled at build time\n"); - return NULL; -#else /* WITH_SECURITY */ ctx = isns_create_dsa_context(); if (ctx == NULL) isns_fatal("Unable to create security context\n"); @@ -174,8 +169,19 @@ __create_security_context(const char *name, const char *auth_key, } return ctx; -#endif /* WITH_SECURITY */ } +#else /* WITH_SECURITY */ +static isns_security_t * +__create_security_context(__attribute__((unused))const char *name, + __attribute__((unused))const char *auth_key, + __attribute__((unused))const char *server_key) +{ + if (!isns_config.ic_security) + return NULL; + isns_error("Cannot create security context: security disabled at build time\n"); + return NULL; +} +#endif /* WITH_SECURITY */ /* * Create the default security context diff --git a/db-policy.c b/db-policy.c index b1c46e22980d..d4a0cba432e2 100644 --- a/db-policy.c +++ b/db-policy.c @@ -52,11 +52,11 @@ __isns_db_keystore_lookup(isns_db_keystore_t *store, /* * Load a DSA key from the DB store */ +#ifdef WITH_SECURITY static EVP_PKEY * __isns_db_keystore_find(isns_keystore_t *store_base, const char *name, size_t namelen) { -#ifdef WITH_SECURITY isns_db_keystore_t *store = (isns_db_keystore_t *) store_base; isns_object_t *obj; const void *key_data; @@ -71,10 +71,16 @@ __isns_db_keystore_find(isns_keystore_t *store_base, return NULL; return isns_dsa_decode_public(key_data, key_size); -#else +} +#else /* WITH_SECURITY */ +static EVP_PKEY * +__isns_db_keystore_find(__attribute__((unused))isns_keystore_t *store_base, + __attribute__((unused))const char *name, + __attribute__((unused))size_t namelen) +{ return NULL; -#endif } +#endif /* WITH_SECURITY */ /* * Retrieve policy from database diff --git a/include/libisns/.gitignore b/include/libisns/.gitignore new file mode 100644 index 000000000000..a3757fdb1d3a --- /dev/null +++ b/include/libisns/.gitignore @@ -0,0 +1 @@ +paths.h diff --git a/include/libisns/util.h b/include/libisns/util.h index 417448026afb..e5ed037f0aab 100644 --- a/include/libisns/util.h +++ b/include/libisns/util.h @@ -14,6 +14,7 @@ #include <string.h> // for strdup #include <signal.h> #include <libisns/types.h> +#include <stdlib.h> #define array_num_elements(a) (sizeof(a) / sizeof((a)[0])) diff --git a/isnsadm.c b/isnsadm.c index 7a9600731e55..94c705e2a3b8 100644 --- a/isnsadm.c +++ b/isnsadm.c @@ -1162,7 +1162,7 @@ generate_key_callback(void) } isns_attr_t * -load_key_callback(const char *pathname) +load_key_callback(__attribute__((unused))const char *pathname) { isns_fatal("Authentication disabled in this build\n"); return NULL; diff --git a/pki.c b/pki.c index 486d9bb00057..57ea66489a91 100644 --- a/pki.c +++ b/pki.c @@ -9,12 +9,13 @@ #include <unistd.h> #include <limits.h> #include "config.h" +#include <fcntl.h> +#include <assert.h> #ifdef WITH_SECURITY #include <openssl/pem.h> #include <openssl/err.h> #include <openssl/evp.h> #endif -#include <fcntl.h> #include <libisns/isns.h> #include "security.h" #include <libisns/util.h> @@ -431,17 +432,43 @@ isns_dsa_load_params(const char *filename) return dsa; } +/* + * write one 'status' character to stdout + */ +static void +write_status_byte(int ch) +{ + static int stdout_fd = 1; /* fileno(stdout) */ + char buf[2]; + int res; + + /* + * We don't actually care about the return value here, since + * we are just dumping a status byte to stdout, but + * some linux distrubutions set the warn_unused_result attribute + * for the write() API, so we might as well use the return value + * to make sure the write command isn't broken. + */ + assert(ch); + buf[0] = ch; + buf[1] = '\0'; + res = write(stdout_fd, buf, 1); + assert(res == 1); +} + static int isns_dsa_param_gen_callback(int stage, __attribute__((unused))int index, __attribute__((unused))void *dummy) { if (stage == 0) - write(1, "+", 1); + write_status_byte('+'); else if (stage == 1) - write(1, ".", 1); + write_status_byte('.'); else if (stage == 2) - write(1, "/", 1); + write_status_byte('/'); + + /* as a callback, we must return a value, so just return success */ return 0; } @@ -478,7 +505,7 @@ isns_dsa_init_params(const char *filename) dsa = DSA_generate_parameters(dsa_key_bits, NULL, 0, NULL, NULL, isns_dsa_param_gen_callback, NULL); #endif - write(1, "\n", 1); + write_status_byte('\n'); if (dsa == NULL) { isns_dsasig_report_errors("Error generating DSA parameters", diff --git a/security.c b/security.c index 673a26effd2a..68eb7795b464 100644 --- a/security.c +++ b/security.c @@ -408,32 +408,34 @@ isns_security_init(void) } isns_keystore_t * -isns_create_keystore(const char *spec) +isns_create_keystore(__attribute__((unused))const char *spec) { isns_no_security(); return NULL; } void -isns_security_set_keystore(isns_security_t *ctx, - isns_keystore_t *ks) +isns_security_set_keystore(__attribute__((unused))isns_security_t *ctx, + __attribute__((unused))isns_keystore_t *ks) { isns_no_security(); } void -isns_principal_free(isns_principal_t *peer) +isns_principal_free(__attribute__((unused))isns_principal_t *peer) { } isns_principal_t * -isns_get_principal(isns_security_t *ctx, const char *spi, size_t spi_len) +isns_get_principal(__attribute__((unused))isns_security_t *ctx, + __attribute__((unused))const char *spi, + __attribute__((unused))size_t spi_len) { return NULL; } const char * -isns_principal_name(const isns_principal_t *princ) +isns_principal_name(__attribute__((unused))const isns_principal_t *princ) { return NULL; } diff --git a/socket.c b/socket.c index da9f5dcea05d..a76d593e17e4 100644 --- a/socket.c +++ b/socket.c @@ -322,8 +322,9 @@ failed: } #else /* WITH_SECURITY */ static int -isns_pdu_authenticate(isns_security_t *sec, - struct isns_partial_msg *msg, buf_t *bp) +isns_pdu_authenticate(__attribute__((unused))isns_security_t *sec, + __attribute__((unused))struct isns_partial_msg *msg, + __attribute__((unused))buf_t *bp) { return 0; }
