Message ID | 20161125212248.3540-1-gael.portay@savoirfairelinux.com |
---|---|
State | Superseded |
Headers | show |
On 25-11-16 22:22, Gaël PORTAY wrote: > Brings in fix about shutdown synchronization with the server. > > See commit message: > If you're running pseudo in docker, a script that creates a pseudo > daemon can exit, causing docker to kill pseudo before it's done writing > the database. > > Since the client sending the shutdown request doesn't have its socket > closed explicitly by the server, we can just read from the socket in > the client to create a delay until the actual exit, which can take > a while if there's an in-memory DB. > > Furthermore, the patch add the -S argument that tells the server to > shutdown and waits for its completion. Does this work? From the man page, I understand that the -S option can't be combined with starting a program. > > Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com> > --- > package/pseudo/pseudo-wrapper | 2 +- > package/pseudo/pseudo.mk | 2 +- Did you test this? You didn't update the hash file... Regards, Arnout > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/package/pseudo/pseudo-wrapper b/package/pseudo/pseudo-wrapper > index 9c8dbdb..ad66431 100644 > --- a/package/pseudo/pseudo-wrapper > +++ b/package/pseudo/pseudo-wrapper > @@ -16,4 +16,4 @@ if [ -n "${BASE_DIR}" ]; then > export PSEUDO_LOCALSTATEDIR="${BASE_DIR}/build/.pseudodb" > fi > > -exec "${0%/*}/pseudo" "${@}" > +exec "${0%/*}/pseudo" -S "${@}" > diff --git a/package/pseudo/pseudo.mk b/package/pseudo/pseudo.mk > index aa2a9c7..58b9c79 100644 > --- a/package/pseudo/pseudo.mk > +++ b/package/pseudo/pseudo.mk > @@ -4,7 +4,7 @@ > # > ################################################################################ > > -PSEUDO_VERSION = 45eca34c754d416a38bee90fb2d3c110a0b6cc5f > +PSEUDO_VERSION = d6eb2df3fe63b765f35d62332add4d0e4e9c6a39 > PSEUDO_SITE = https://git.yoctoproject.org/git/pseudo > PSEUDO_SITE_METHOD = git > >
Hello, On Sat, 26 Nov 2016 11:50:45 +0100, Arnout Vandecappelle wrote: > > package/pseudo/pseudo-wrapper | 2 +- > > package/pseudo/pseudo.mk | 2 +- > > Did you test this? You didn't update the hash file... Hash files are not checked for git downloads, so it can work without updating the hash. Since the git download helper was fixed to generate reproducible archives, we haven't (yet) enabled hash checking for git downloads. Best regards, Thomas
On 26-11-16 15:02, Thomas Petazzoni wrote: > Hello, > > On Sat, 26 Nov 2016 11:50:45 +0100, Arnout Vandecappelle wrote: > >>> package/pseudo/pseudo-wrapper | 2 +- >>> package/pseudo/pseudo.mk | 2 +- >> >> Did you test this? You didn't update the hash file... > > Hash files are not checked for git downloads, so it can work without > updating the hash. Since the git download helper was fixed to generate > reproducible archives, we haven't (yet) enabled hash checking for > git downloads. Ah, I never noticed that... Regards, Arnout
Hi Armout, On Sat, Nov 26, 2016 at 11:50:45AM +0100, Arnout Vandecappelle wrote: > > Does this work? From the man page, I understand that the -S option can't be > combined with starting a program. > Yes this is working fine. Maybe the man page should be updated :) The -S options can be used with or without scripts. See http://git.yoctoproject.org/cgit/cgit.cgi/pseudo/tree/pseudo.c if you want, * at line 337 (when pseudo is invoked without script) and * at line 412 (when pseudo is invoked with a script (our case)).
diff --git a/package/pseudo/pseudo-wrapper b/package/pseudo/pseudo-wrapper index 9c8dbdb..ad66431 100644 --- a/package/pseudo/pseudo-wrapper +++ b/package/pseudo/pseudo-wrapper @@ -16,4 +16,4 @@ if [ -n "${BASE_DIR}" ]; then export PSEUDO_LOCALSTATEDIR="${BASE_DIR}/build/.pseudodb" fi -exec "${0%/*}/pseudo" "${@}" +exec "${0%/*}/pseudo" -S "${@}" diff --git a/package/pseudo/pseudo.mk b/package/pseudo/pseudo.mk index aa2a9c7..58b9c79 100644 --- a/package/pseudo/pseudo.mk +++ b/package/pseudo/pseudo.mk @@ -4,7 +4,7 @@ # ################################################################################ -PSEUDO_VERSION = 45eca34c754d416a38bee90fb2d3c110a0b6cc5f +PSEUDO_VERSION = d6eb2df3fe63b765f35d62332add4d0e4e9c6a39 PSEUDO_SITE = https://git.yoctoproject.org/git/pseudo PSEUDO_SITE_METHOD = git
Brings in fix about shutdown synchronization with the server. See commit message: If you're running pseudo in docker, a script that creates a pseudo daemon can exit, causing docker to kill pseudo before it's done writing the database. Since the client sending the shutdown request doesn't have its socket closed explicitly by the server, we can just read from the socket in the client to create a delay until the actual exit, which can take a while if there's an in-memory DB. Furthermore, the patch add the -S argument that tells the server to shutdown and waits for its completion. Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com> --- package/pseudo/pseudo-wrapper | 2 +- package/pseudo/pseudo.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)