Hello community, here is the log from the commit of package conman for openSUSE:Factory checked in at 2018-07-21 10:24:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/conman (Old) and /work/SRC/openSUSE:Factory/.conman.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "conman" Sat Jul 21 10:24:59 2018 rev:9 rq:624089 version:0.2.8 Changes: -------- --- /work/SRC/openSUSE:Factory/conman/conman.changes 2018-03-09 10:46:58.017876421 +0100 +++ /work/SRC/openSUSE:Factory/.conman.new/conman.changes 2018-07-21 10:25:00.862960475 +0200 @@ -1,0 +2,12 @@ +Wed Jul 18 13:08:03 UTC 2018 - [email protected] + +- If-connect-fails-let-other-side-accept-connection-and-come-back.patch: + Make sure conmand connects to a newly created UNIX socket with + minimal delay. The implementation uses inotify, however this triggers + when the other side bind()s to the socket, however a connection is + not possible until the other side calls listen(). + Thus if the connection fails, reset the poll() timeout to return to + connect() as soon as possible (bsc#1101647). +- Support %license in a backward compatible way. + +------------------------------------------------------------------- New: ---- If-connect-fails-let-other-side-accept-connection-and-come-back.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ conman.spec ++++++ --- /var/tmp/diff_new_pack.V8obY8/_old 2018-07-21 10:25:01.558960306 +0200 +++ /var/tmp/diff_new_pack.V8obY8/_new 2018-07-21 10:25:01.558960306 +0200 @@ -48,7 +48,7 @@ Release: 0 Summary: The Console Manager -License: GPL-3.0+ +License: GPL-3.0-or-later Group: System/Console Url: http://dun.github.io/conman/ @@ -69,6 +69,7 @@ %endif Patch1: conman-suse-fix-expect-scripts.patch +Patch2: If-connect-fails-let-other-side-accept-connection-and-come-back.patch # 8/15/14 [email protected] - include prereq %if 0%{?sles_version} || 0%{?suse_version} @@ -93,6 +94,7 @@ %prep %setup -q -n %{name}-%{name}-%{version} %patch1 -p1 +%patch2 -p1 %build %configure --with-tcp-wrappers \ @@ -219,12 +221,18 @@ %{restart_on_update conman} %endif +%if 0%{?sle_version} > 120200 || 0%{?suse_version} > 1320 +%define files_license %license +%else +%define files_license %doc +%endif + %files %defattr(-,root,root,-) %doc AUTHORS %doc DISCLAIMER* %doc FAQ -%doc COPYING +%files_license COPYING %doc NEWS %doc README %doc PLATFORMS ++++++ If-connect-fails-let-other-side-accept-connection-and-come-back.patch ++++++ From: Egbert Eich <[email protected]> Date: Wed Jul 18 11:26:07 2018 +0200 Subject: If connect fails let other side accept connection and come back Patch-mainline: Not yet Git-commit: 1fc96affadb267bb03058293e9d31af95cfd6f2d References: bsc# The UNIX socket code uses inotify to get notified when a socket it monitors appears. The inotify is triggered when the other side does bind(). However, we are not able to connect until the other side calls listen(). Therefore, we need to let the other side continue if the connect fails and should come back at the earliest time to attempt a connect() again. For this we just reset the poll() delay. Signed-off-by: Egbert Eich <[email protected]> --- server-unixsock.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/server-unixsock.c b/server-unixsock.c index 152bd31..7302acf 100644 --- a/server-unixsock.c +++ b/server-unixsock.c @@ -46,8 +46,10 @@ static size_t max_unixsock_dev_strlen(void); +static int connect_unixsock_obj_int(obj_t *unixsock, int reset_delay); static int connect_unixsock_obj(obj_t *unixsock); static int disconnect_unixsock_obj(obj_t *unixsock); +static int open_unixsock_obj_reset_delay(obj_t *unixsock); static void reset_unixsock_delay(obj_t *unixsock); extern tpoll_t tp_global; /* defined in server.c */ @@ -147,7 +149,7 @@ obj_t * create_unixsock_obj(server_conf_t *conf, char *name, char *dev, list_append(conf->objs, unixsock); rv = inevent_add(unixsock->aux.unixsock.dev, - (inevent_cb_f) open_unixsock_obj, unixsock); + (inevent_cb_f) open_unixsock_obj_reset_delay, unixsock); if (rv < 0) { log_msg(LOG_INFO, "Console [%s] unable to register device \"%s\" for inotify events", @@ -157,7 +159,7 @@ obj_t * create_unixsock_obj(server_conf_t *conf, char *name, char *dev, } -int open_unixsock_obj(obj_t *unixsock) +static int open_unixsock_obj_int(obj_t *unixsock, int reset_delay) { /* (Re)opens the specified 'unixsock' obj. * Returns 0 if the console is successfully opened; o/w, returns -1. @@ -171,11 +173,18 @@ int open_unixsock_obj(obj_t *unixsock) rc = disconnect_unixsock_obj(unixsock); } else { - rc = connect_unixsock_obj(unixsock); + rc = connect_unixsock_obj_int(unixsock, reset_delay); } return(rc); } +int open_unixsock_obj(obj_t *unixsock) { + return open_unixsock_obj_int(unixsock, 0); +} + +int open_unixsock_obj_reset_delay(obj_t *unixsock) { + return open_unixsock_obj_int(unixsock, 1); +} static size_t max_unixsock_dev_strlen(void) { @@ -193,7 +202,7 @@ static size_t max_unixsock_dev_strlen(void) } -static int connect_unixsock_obj(obj_t *unixsock) +static int connect_unixsock_obj_int(obj_t *unixsock, int reset_delay) { /* Opens a connection to the specified (unixsock) obj. * Returns 0 if the connection is successfully completed; o/w, returns -1. @@ -257,6 +266,8 @@ static int connect_unixsock_obj(obj_t *unixsock) (struct sockaddr *) &saddr, sizeof(saddr)) < 0) { log_msg(LOG_INFO, "Console [%s] cannot connect to device \"%s\": %s", unixsock->name, auxp->dev, strerror(errno)); + if (reset_delay) + reset_unixsock_delay(unixsock); return(disconnect_unixsock_obj(unixsock)); } /* Write-locking the unix domain socket appears ineffective. But since @@ -284,6 +295,9 @@ static int connect_unixsock_obj(obj_t *unixsock) return(0); } +static int connect_unixsock_obj(obj_t *unixsock) { + return connect_unixsock_obj_int(unixsock, 0); +} static int disconnect_unixsock_obj(obj_t *unixsock) {
