Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package octave-forge-sockets for
openSUSE:Factory checked in at 2021-01-19 16:02:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/octave-forge-sockets (Old)
and /work/SRC/openSUSE:Factory/.octave-forge-sockets.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "octave-forge-sockets"
Tue Jan 19 16:02:11 2021 rev:2 rq:864092 version:1.2.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/octave-forge-sockets/octave-forge-sockets.changes
2015-06-16 15:13:48.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.octave-forge-sockets.new.28504/octave-forge-sockets.changes
2021-01-19 16:02:39.979422767 +0100
@@ -1,0 +2,7 @@
+Sat Jan 9 12:05:00 UTC 2021 - Atri Bhattacharya <[email protected]>
+
+- Update to version 1.2.1:
+ * Updates for Octave 6 compatability
+ * Change minimum Octave version to 3.6
+
+-------------------------------------------------------------------
Old:
----
sockets-1.2.0.tar.gz
New:
----
sockets-1.2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ octave-forge-sockets.spec ++++++
--- /var/tmp/diff_new_pack.jEE0s0/_old 2021-01-19 16:02:40.811424025 +0100
+++ /var/tmp/diff_new_pack.jEE0s0/_new 2021-01-19 16:02:40.815424031 +0100
@@ -1,7 +1,7 @@
#
# spec file for package octave-forge-sockets
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,23 +12,23 @@
# 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/
#
%define octpkg sockets
Name: octave-forge-%{octpkg}
-Version: 1.2.0
+Version: 1.2.1
Release: 0
Summary: Socket Octave functions for networking
-License: GPL-3.0+
+License: GPL-3.0-or-later
Group: Productivity/Scientific/Math
-Url: http://octave.sourceforge.net
+URL: http://octave.sourceforge.net
Source0:
http://downloads.sourceforge.net/octave/%{octpkg}-%{version}.tar.gz
BuildRequires: gcc-c++
BuildRequires: hdf5-devel
BuildRequires: octave-devel
-Requires: octave-cli >= 3.2.0
+Requires: octave-cli >= 3.6.0
%description
Socket functions for networking.
++++++ sockets-1.2.0.tar.gz -> sockets-1.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/octave-sockets-1.2.0/DESCRIPTION
new/sockets-1.2.1/DESCRIPTION
--- old/octave-sockets-1.2.0/DESCRIPTION 2015-01-30 15:27:56.000000000
+0100
+++ new/sockets-1.2.1/DESCRIPTION 2020-11-10 18:56:31.000000000 +0100
@@ -1,11 +1,11 @@
Name: sockets
-Version: 1.2.0
-Date: 2014-12-03
+Version: 1.2.1
+Date: 2020-11-10
Author: John Swensen <[email protected]>
-Maintainer: Paul Dreik <[email protected]>
+Maintainer: Octave-Forge community <[email protected]>
Title: Sockets
Description: Socket functions for networking from within octave.
Categories: Sockets
-Depends: octave (>= 3.2.0)
+Depends: octave (>= 3.6.0)
License: GPLv3+
Url: http://octave.sourceforge.net
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/octave-sockets-1.2.0/Makefile
new/sockets-1.2.1/Makefile
--- old/octave-sockets-1.2.0/Makefile 1970-01-01 01:00:00.000000000 +0100
+++ new/sockets-1.2.1/Makefile 2020-11-10 18:56:31.000000000 +0100
@@ -0,0 +1,250 @@
+## Copyright 2015-2016 Carn?? Draug
+## Copyright 2015-2016 Oliver Heimlich
+## Copyright 2017 Julien Bect <[email protected]>
+## Copyright 2017 Olaf Till <[email protected]>
+## Copyright 2020 John Donoghue <[email protected]>
+##
+## Copying and distribution of this file, with or without modification,
+## are permitted in any medium without royalty provided the copyright
+## notice and this notice are preserved. This file is offered as-is,
+## without any warranty.
+
+TOPDIR := $(shell pwd)
+
+## Some basic tools (can be overriden using environment variables)
+SED ?= sed
+TAR ?= tar
+GREP ?= grep
+CUT ?= cut
+TR ?= tr
+TEXI2PDF ?= texi2pdf -q
+
+## Note the use of ':=' (immediate set) and not just '=' (lazy set).
+## http://stackoverflow.com/a/448939/1609556
+package := $(shell $(GREP) "^Name: " DESCRIPTION | $(CUT) -f2 -d" " | \
+$(TR) '[:upper:]' '[:lower:]')
+version := $(shell $(GREP) "^Version: " DESCRIPTION | $(CUT) -f2 -d" ")
+
+## These are the paths that will be created for the releases.
+target_dir := target
+release_dir := $(target_dir)/$(package)-$(version)
+release_tarball := $(target_dir)/$(package)-$(version).tar.gz
+html_dir := $(target_dir)/$(package)-html
+html_tarball := $(target_dir)/$(package)-html.tar.gz
+## Using $(realpath ...) avoids problems with symlinks due to bug
+## #50994 in Octaves scripts/pkg/private/install.m. But at least the
+## release directory above is needed in the relative form, for 'git
+## archive --format=tar --prefix=$(release_dir).
+real_target_dir := $(realpath .)/$(target_dir)
+installation_dir := $(real_target_dir)/.installation
+package_list := $(installation_dir)/.octave_packages
+install_stamp := $(installation_dir)/.install_stamp
+
+## These can be set by environment variables which allow to easily
+## test with different Octave versions.
+ifndef OCTAVE
+OCTAVE := octave
+endif
+OCTAVE := $(OCTAVE) --no-gui --silent --norc
+MKOCTFILE ?= mkoctfile
+
+## Command used to set permissions before creating tarballs
+FIX_PERMISSIONS ?= chmod -R a+rX,u+w,go-w,ug-s
+
+HG := hg
+HG_CMD = $(HG) --config alias.$(1)=$(1) --config defaults.$(1)= $(1)
+HG_ID := $(shell $(call HG_CMD,identify) --id | sed -e 's/+//' )
+HG_TIMESTAMP := $(firstword $(shell $(call HG_CMD,log) --rev $(HG_ID)
--template '{date|hgdate}'))
+
+
+## Detect which VCS is used
+vcs := $(if $(wildcard .hg),hg,$(if $(wildcard .git),git,unknown))
+ifeq ($(vcs),hg)
+release_dir_dep := .hg/dirstate
+endif
+ifeq ($(vcs),git)
+release_dir_dep := .git/index
+endif
+
+TAR_REPRODUCIBLE_OPTIONS := --sort=name --mtime="@$(HG_TIMESTAMP)" --owner=0
--group=0 --numeric-owner
+TAR_OPTIONS := --format=ustar $(TAR_REPRODUCIBLE_OPTIONS)
+
+## .PHONY indicates targets that are not filenames
+## (https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html)
+.PHONY: help
+
+## make will display the command before runnning them. Use @command
+## to not display it (makes specially sense for echo).
+help:
+ @echo "Targets:"
+ @echo " dist - Create $(release_tarball) for release."
+ @echo " html - Create $(html_tarball) for release."
+ @echo " release - Create both of the above and show md5sums."
+ @echo " install - Install the package in $(installation_dir), where
it is not visible in a normal Octave session."
+ @echo " check - Execute package tests."
+ @echo " doctest - Test the help texts with the doctest package."
+ @echo " run - Run Octave with the package installed in
$(installation_dir) in the path."
+ @echo " clean - Remove everything made with this Makefile."
+
+
+##
+## Recipes for release tarballs (package + html)
+##
+
+.PHONY: release dist html clean-tarballs clean-unpacked-release
+
+## To make a release, build the distribution and html tarballs.
+release: dist html
+ md5sum $(release_tarball) $(html_tarball)
+ @echo "Upload @ https://sourceforge.net/p/octave/package-releases/new/"
+ @echo " and note the changeset the release corresponds to"
+
+## dist and html targets are only PHONY/alias targets to the release
+## and html tarballs.
+dist: $(release_tarball)
+html: $(html_tarball)
+
+## An implicit rule with a recipe to build the tarballs correctly.
+%.tar.gz: %
+ $(TAR) -cf - $(TAR_OPTIONS) -C "$(target_dir)/" "$(notdir $<)" | gzip
-9n > "$@"
+
+clean-tarballs:
+ @echo "## Cleaning release tarballs (package + html)..."
+ -$(RM) $(release_tarball) $(html_tarball)
+ @echo
+
+## Create the unpacked package.
+##
+## Notes:
+## * having ".hg/dirstate" (or ".git/index") as a prerequesite means it is
+## only rebuilt if we are at a different commit.
+## * the variable RM usually defaults to "rm -f"
+## * having this recipe separate from the one that makes the tarball
+## makes it easy to have packages in alternative formats (such as zip)
+## * note that if a commands needs to be run in a specific directory,
+## the command to "cd" needs to be on the same line. Each line restores
+## the original working directory.
+$(release_dir): $(release_dir_dep)
+ -$(RM) -r "$@"
+ifeq (${vcs},hg)
+ hg archive --exclude ".hg*" --type files "$@"
+endif
+ifeq (${vcs},git)
+ git archive --format=tar --prefix="$@/" HEAD | $(TAR) -x
+ $(RM) "$@/.gitignore"
+endif
+## Don't fall back to run the supposed necessary contents of
+## 'bootstrap' here. Users are better off if they provide
+## 'bootstrap'. Administrators, checking build reproducibility, can
+## put in the missing 'bootstrap' file if they feel they know its
+## necessary contents.
+ifneq (,$(wildcard src/bootstrap))
+ cd "$@/src" && ./bootstrap && $(RM) -r "autom4te.cache"
+endif
+## Uncomment this if your src/Makefile.in has these targets for
+## pre-building something for the release (e.g. documentation).
+# cd "$@/src" && ./configure && $(MAKE) prebuild && \
+# $(MAKE) clean && $(RM) Makefile
+##
+ ${FIX_PERMISSIONS} "$@"
+
+run_in_place = $(OCTAVE) --eval ' pkg ("local_list", "$(package_list)"); ' \
+ --eval ' pkg ("load", "$(package)"); '
+
+html_options = --eval 'options = get_html_options ("octave-forge");'
+## Uncomment this for package documentation.
+#html_options = --eval 'options = get_html_options ("octave-forge");' \
+# --eval 'options.package_doc = "$(package).texi";'
+$(html_dir): $(install_stamp)
+ $(RM) -r "$@";
+ $(run_in_place) \
+ --eval ' pkg load generate_html; ' \
+ $(html_options) \
+ --eval ' generate_package_html ("$(package)", "$@", options); ';
+ $(FIX_PERMISSIONS) "$@";
+
+clean-unpacked-release:
+ @echo "## Cleaning unpacked release tarballs (package + html)..."
+ -$(RM) -r $(release_dir) $(html_dir)
+ @echo
+
+##
+## Recipes for installing the package.
+##
+
+.PHONY: install clean-install
+
+octave_install_commands = \
+' llist_path = pkg ("local_list"); \
+ mkdir ("$(installation_dir)"); \
+ load (llist_path); \
+ local_packages(cellfun (@ (x) strcmp ("$(package)", x.name),
local_packages)) = []; \
+ save ("$(package_list)", "local_packages"); \
+ pkg ("local_list", "$(package_list)"); \
+ pkg ("prefix", "$(installation_dir)", "$(installation_dir)"); \
+ pkg ("install", "-local", "-verbose", "$(release_tarball)"); '
+
+## Install unconditionally. Maybe useful for testing installation with
+## different versions of Octave.
+install: $(release_tarball)
+ @echo "Installing package under $(installation_dir) ..."
+ $(OCTAVE) --eval $(octave_install_commands)
+ touch $(install_stamp)
+
+## Install only if installation (under target/...) is not current.
+$(install_stamp): $(release_tarball)
+ @echo "Installing package under $(installation_dir) ..."
+ $(OCTAVE) --eval $(octave_install_commands)
+ touch $(install_stamp)
+
+clean-install:
+ @echo "## Cleaning installation under $(installation_dir) ..."
+ -$(RM) -r $(installation_dir)
+ @echo
+
+
+##
+## Recipes for testing purposes
+##
+
+.PHONY: run doctest check
+
+## Start an Octave session with the package directories on the path for
+## interactice test of development sources.
+run: $(install_stamp)
+ $(run_in_place) --persist
+
+## Test example blocks in the documentation. Needs doctest package
+## https://octave.sourceforge.io/doctest/index.html
+doctest: $(install_stamp)
+ $(run_in_place) --eval 'pkg load doctest;'
\
+ --eval "targets = pkg('list', '$(package)'){1}.dir;" \
+ --eval "doctest (targets);"
+
+
+## Test package.
+octave_test_commands = \
+' pkgs = pkg("list", "$(package)"); \
+ dirs = {pkgs{1}.dir}; \
+ __run_test_suite__ (dirs, {}); '
+## the following works, too, but provides no overall summary output as
+## __run_test_suite__ does:
+##
+## else cellfun (@runtests, horzcat (cellfun (@ (dir) ostrsplit (([~, dirs]
= system (sprintf ("find %s -type d", dir))), "\n\r", true), dirs,
"UniformOutput", false){:})); endif '
+check: $(install_stamp)
+ $(run_in_place) --eval $(octave_test_commands)
+
+
+##
+## CLEAN
+##
+
+.PHONY: clean
+
+clean: clean-tarballs clean-unpacked-release clean-install
+ test -e $(target_dir)/fntests.log && rm -f $(target_dir)/fntests.log ||
true
+ @echo "## Removing target directory (if empty)..."
+ test -e $(target_dir) && rmdir $(target_dir) || true
+ @echo
+ @echo "## Cleaning done"
+ @echo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/octave-sockets-1.2.0/NEWS new/sockets-1.2.1/NEWS
--- old/octave-sockets-1.2.0/NEWS 2015-01-30 15:27:56.000000000 +0100
+++ new/sockets-1.2.1/NEWS 2020-11-10 18:56:31.000000000 +0100
@@ -1,3 +1,10 @@
+Summary of important user-visible changes for sockets 1.2.1:
+-------------------------------------------------------------------
+
+ ** Updates for Octave 6 compatability
+
+ ** Change minimum Octave version to 3.6
+
Summary of important user-visible changes for sockets 1.2.0:
-------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/octave-sockets-1.2.0/src/Makefile
new/sockets-1.2.1/src/Makefile
--- old/octave-sockets-1.2.0/src/Makefile 2015-01-30 15:27:56.000000000
+0100
+++ new/sockets-1.2.1/src/Makefile 2020-11-10 18:56:31.000000000 +0100
@@ -8,12 +8,15 @@
SRC := $(OCT:.oct=.cc)
MKOCTFILE ?= mkoctfile -Wall
+OCTAVE_CONFIG ?= octave-config
OCTAVE ?= octave
+CANONICAL_HOST_TYPE := $(shell $(OCTAVE_CONFIG) -p CANONICAL_HOST_TYPE))
+
#The following is necessary to get the sockets package working in Windows.
#It has been tried on Win7 and XP, in Octave 3.8.0 using mxe-octave (mingw)
EXTRALIBS :=
-ifeq ($(OS),Windows_NT)
+ifneq (,$(findstring mingw,$(CANONICAL_HOST_TYPE)))
EXTRALIBS := -lws2_32
endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/octave-sockets-1.2.0/src/socket.cc
new/sockets-1.2.1/src/socket.cc
--- old/octave-sockets-1.2.0/src/socket.cc 2015-01-30 15:27:56.000000000
+0100
+++ new/sockets-1.2.1/src/socket.cc 2020-11-10 18:56:31.000000000 +0100
@@ -19,7 +19,6 @@
// Octave Includes
#include <octave/oct.h>
#include <octave/parse.h>
-#include <octave/toplev.h>
#include <octave/cmd-hist.h>
#include <octave/symtab.h>
#include <octave/variables.h>
@@ -175,37 +174,39 @@
const octave_idx_type nargin = args.length ();
if (nargin > 0)
{
- domain = args(0).int_value ();
- if (error_state)
+ if (! args(0).is_real_scalar ())
{
error ("socket: DOMAIN must be a scalar integer");
return octave_value ();
}
+ domain = args(0).int_value ();
}
if (nargin > 1)
{
- type = args(1).int_value ();
- if (error_state)
+ if (! args(0).is_real_scalar ())
{
error ("socket: TYPE must be a scalar integer");
return octave_value ();
}
+
+ type = args(1).int_value ();
}
if (nargin > 2)
{
- protocol = args(2).int_value ();
- if (error_state)
+ if (! args(0).is_real_scalar ())
{
error ("socket: PROTOCOL must be a scalar integer");
return octave_value ();
}
- else if (protocol != 0)
- {
- error ("socket: for now, PROTOCOL must always be 0 (zero)");
- return octave_value ();
- }
+
+ protocol = args(2).int_value ();
+ if (protocol != 0)
+ {
+ error ("socket: for now, PROTOCOL must always be 0 (zero)");
+ return octave_value ();
+ }
}
// Create the new socket
@@ -222,11 +223,13 @@
*/
int get_socket(const octave_value& arg)
{
- const int fd = arg.int_value();
- if (error_state)
+ if (! arg.is_real_scalar ())
{
return -1;
}
+
+ const int fd = arg.int_value();
+
return fd;
}
@@ -276,7 +279,7 @@
// Determine the socket on which to operate
const int s = get_socket (args(0));
- if (error_state)
+ if (s == -1)
{
error ("connect: S must be a valid socket");
return octave_value ();
@@ -284,20 +287,26 @@
// Extract information about the server to connect to.
const octave_scalar_map struct_serverInfo = args(1).scalar_map_value ();
- if (error_state)
+ if (struct_serverInfo.nfields () == 0)
{
error ("connect: SERVERINFO must be a struct");
return octave_value ();
}
- const std::string addr = struct_serverInfo.getfield ("addr").string_value ();
- const int port = struct_serverInfo.getfield ("port").int_value ();
- if (error_state)
+ if(! (struct_serverInfo.contains ("addr") && struct_serverInfo.contains
("port")))
{
error ("connect: SERVERINFO must have a string and integer in fields
\"addr\" and \"port\"");
return octave_value ();
}
- else if (addr.empty ())
+
+ if(! (struct_serverInfo.getfield ("addr").is_string() &&
struct_serverInfo.getfield ("port").is_real_scalar()))
+ {
+ error ("connect: SERVERINFO must have a string and integer in fields
\"addr\" and \"port\"");
+ return octave_value ();
+ }
+ const std::string addr = struct_serverInfo.getfield ("addr").string_value ();
+ const int port = struct_serverInfo.getfield ("port").int_value ();
+ if (addr.empty ())
{
error ("connect: SERVERINFO addr is an empty string");
return octave_value ();
@@ -348,7 +357,7 @@
int retval = -1;
const int s = get_socket (args(0));
- if (! error_state)
+ if (s != -1)
{
close_octavesocket(s);
retval = 0;
@@ -385,12 +394,12 @@
return octave_value ();
}
- const std::string addr = args(0).string_value ();
- if (error_state)
+ if (! args(0).is_string ())
{
error ("gethostbyname: HOSTNAME must be a string");
return octave_value ();
}
+ const std::string addr = args(0).string_value ();
string_vector host_list;
struct hostent* hostInfo = gethostbyname (addr.c_str ());
@@ -432,17 +441,18 @@
int flags = 0;
if (nargin > 2)
{
- flags = args(2).int_value ();
- if (error_state)
+ if (! args(2).is_real_scalar ())
{
error ("send: FLAGS must be a scalar integer");
return octave_value ();
- }
+ }
+
+ flags = args(2).int_value ();
}
// Determine the socket on which to operate
const int s = get_socket (args(0));
- if (error_state)
+ if (s == -1)
{
error ("send: s must be a valid socket");
return octave_value ();
@@ -514,24 +524,31 @@
if (nargin > 2)
{
- flags = args(2).int_value ();
- if (error_state)
+ if (! args(2).is_real_scalar ())
{
error ("recv: FLAGS must be a scalar integer");
return octave_value ();
}
+
+ flags = args(2).int_value ();
}
// Determine the socket on which to operate
const int s = get_socket (args(0));
- if (error_state)
+ if (s == -1)
{
error ("recv: S must be a valid socket");
return octave_value ();
}
+ if (! args(1).is_real_scalar ())
+ {
+ error ("recv: LEN must be a non-negative integer");
+ return octave_value (-1);
+ }
+
const long len = args(1).int_value ();
- if (error_state || len < 0)
+ if (len < 0)
{
error ("recv: LEN must be a non-negative integer");
return octave_value(-1);
@@ -588,19 +605,20 @@
// Determine the socket on which to operate
const int s = get_socket (args(0));
- if (error_state)
+ if (s == -1)
{
error ("bind: S must be a valid socket");
return octave_value ();
}
- const long port = args(1).int_value ();
- if (error_state)
+ if (! args(1).is_real_scalar ())
{
error ("bind: PORT must be a scalar integer");
- return octave_value ();
+ return octave_value (-1);
}
+ const long port = args(1).int_value ();
+
struct sockaddr_in serverInfo;
serverInfo.sin_family = AF_INET;
serverInfo.sin_port = htons (port);
@@ -639,19 +657,20 @@
// Determine the socket on which to operate
const int s = get_socket (args(0));
- if (error_state)
+ if (s == -1)
{
error ("listen: S must be a valid socket");
return octave_value ();
}
- const int backlog = args(1).int_value ();
- if (error_state)
+ if (! args(1).is_real_scalar ())
{
error ("listen: BACKLOG must be an integer scalar");
- return octave_value ();
+ return octave_value (-1);
}
+ const int backlog = args(1).int_value ();
+
const int retval = ::listen (s, backlog);
if (retval == -1)
error ("listen failed with error %i (%s)", errno, strerror(errno));
@@ -686,7 +705,7 @@
// Determine the socket on which to operate
const int s = get_socket (args(0));
- if (error_state)
+ if (s == -1)
{
error ("accept: S must be a valid socket");
return octave_value ();