diff mbox

[v2] package/pseudo: update version

Message ID 20161127011202.6938-1-gael.portay@savoirfairelinux.com
State Changes Requested
Headers show

Commit Message

Gaël PORTAY Nov. 27, 2016, 1:12 a.m. UTC
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.hash    | 2 +-
 package/pseudo/pseudo.mk      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Thomas Petazzoni Nov. 27, 2016, 10:19 p.m. UTC | #1
Hello,

On Sat, 26 Nov 2016 20:12:02 -0500, 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.
> 
> Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>

Now that we no longer use pseudo, and have gotten back to fakeroot
instead, we don't need to apply this patch to the master branch. But of
course, it doesn't apply to the next branch, because this branch
doesn't have all the previous updates to the pseudo package.

Generally speaking, pseudo is now an "orphan" host package, which we
generally don't like in Buildroot, since it means it is never tested.
What should we do about it? Remove it until it gets used again in the
future?

I've added Arnout, Yann and Peter in Cc so we can have a discussion
about this.

Thanks,

Thomas
Peter Korsgaard Nov. 27, 2016, 10:25 p.m. UTC | #2
On Sun, Nov 27, 2016 at 11:19 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
>
> Generally speaking, pseudo is now an "orphan" host package, which we
> generally don't like in Buildroot, since it means it is never tested.
> What should we do about it? Remove it until it gets used again in the
> future?
>
> I've added Arnout, Yann and Peter in Cc so we can have a discussion
> about this.

Unless we have any real reason to move to pseudo instead of fakeroot
in the (near) future, then I think we should simply get rid of the
package - But I wasn't sure, which is why I didn't revert the patches
adding the package for now.

Do we know of such reasons?
Gaël PORTAY Nov. 27, 2016, 10:58 p.m. UTC | #3
Hi Thomas,

On Sun, Nov 27, 2016 at 11:19:18PM +0100, Thomas Petazzoni wrote:
> Now that we no longer use pseudo, and have gotten back to fakeroot
> instead, we don't need to apply this patch to the master branch. But of
> course, it doesn't apply to the next branch, because this branch
> doesn't have all the previous updates to the pseudo package.
> 

Okay. It seems my patch came too late... Too bad, I would like this patch merged
before the revert.

> Generally speaking, pseudo is now an "orphan" host package, which we
> generally don't like in Buildroot, since it means it is never tested.
> What should we do about it? Remove it until it gets used again in the
> future?

The main point of this patch is to add the -S argument to tell the server to
shutdown (and wait for its completion (bump)). But this part no longer applies
because the wrapper script has gone (master, next). So we should drop this patch
and the package as well.

(In case of we decide latter to come back to pseudo, we should remember to add
the -S argument to the wrapper script.)
Arnout Vandecappelle Nov. 28, 2016, 10:40 a.m. UTC | #4
On 27-11-16 23:19, Thomas Petazzoni wrote:
> Hello,
> 
> On Sat, 26 Nov 2016 20:12:02 -0500, 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.
>>
>> Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
> 
> Now that we no longer use pseudo, and have gotten back to fakeroot
> instead, we don't need to apply this patch to the master branch. But of
> course, it doesn't apply to the next branch, because this branch
> doesn't have all the previous updates to the pseudo package.

 It also doesn't apply to the master branch anymore because the wrapper has been
removed there. I think that's unfortunate, but understandable because Peter just
did reverts rather than cooking up an entirely new patch to switch back from
pseudo to fakeroot.


> Generally speaking, pseudo is now an "orphan" host package, which we
> generally don't like in Buildroot, since it means it is never tested.
> What should we do about it? Remove it until it gets used again in the
> future?
> 
> I've added Arnout, Yann and Peter in Cc so we can have a discussion
> about this.

 I think that to re-add pseudo, it doesn't make sense to revert the reverts,
because that gives us some intermediate states that are known to be broken. So
it makes more sense to me to remove the pseudo package as well now in master,
and re-introduce a completely working pseudo package later.

 Therefore, this patch should become Changes Requested or Rejected.

 Gael, Yann, can you summarize (in a new thread) the reasons to switch to
pseudo? What possibilities does it give either to the user or to the BR
developers, which aren't possible now?

 Regards,
 Arnout
Gaël PORTAY Nov. 28, 2016, 9:12 p.m. UTC | #5
All,

On Mon, Nov 28, 2016 at 11:40:57AM +0100, Arnout Vandecappelle wrote:
>  Gael, Yann, can you summarize (in a new thread) the reasons to switch to
> pseudo? What possibilities does it give either to the user or to the BR
> developers, which aren't possible now?
> 

I am not sure I am the one who can tell why we should move to pseudo. I was just
helping because pseudo breaks my build (and of course, because I like to bring
by contributions).

BTW, if think Yann has already sent a mail why he think BR should move to
pseudo.

If I remember well the main two reasons are:
 * fakeroot looks like it is not supported anymore (no release since two years)
 * pseudo `works' with SELinux (*)

(Maybe I am wrong.)

*: fakeroot is now working with SELinux since the workaround
http://lists.busybox.net/pipermail/buildroot/2016-November/178238.html
diff mbox

Patch

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.hash b/package/pseudo/pseudo.hash
index 1553a29..55a33d3 100644
--- a/package/pseudo/pseudo.hash
+++ b/package/pseudo/pseudo.hash
@@ -1,2 +1,2 @@ 
 # Locally computed
-sha256  7d4b767302f118fa1c3f89b551cf3f3f2aa92721dab86ff62f0600a394b8a81a  pseudo-45eca34c754d416a38bee90fb2d3c110a0b6cc5f.tar.gz
+sha256  164da6aa243166b6b6a89fabd514578e14f69515286ef747912610c317f87194  pseudo-d6eb2df3fe63b765f35d62332add4d0e4e9c6a39.tar.gz
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