net/syncthing and @extraunexec

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

net/syncthing and @extraunexec

Michael McConville-3
Hi, everyone.

I was recently discussing this with edd@, who suggested that I pull in
ports@ and Marc.

Syncthing is a daemon that lets you sync data between devices. By
default, both metadata and user data are stored in /var/syncthing.
However, when you update or delete the package, pkg_add tells you the
following:

> --- -syncthing-0.13.9 -------------------
> You should also run rm -rf /var/syncthing/{.,}*

For many or most users, this will delete their data and their device
associations.

Here are the relevant PLIST lines:

> @sample ${VARBASE}/syncthing/
> @extraunexec rm -rf ${VARBASE}/syncthing/{.,}*

The porting docs describe @extraunexec as being for "system files
created by the package at runtime". While this is a somewhat accurate
description of /var/syncthing, I don't think that @extraunexec is
intended for user data or for program data that is effectively long-term
config data (e.g. Syncthing associations between devices).

I couldn't find any indication in the Syncthing docs that any metadata
needs to be deleted when updating. However, I could have easily missed
something.

Input appreciated.

Thanks for your time,
Mike

Reply | Threaded
Open this post in threaded view
|

Re: net/syncthing and @extraunexec

Marc Espie-2
On Tue, Aug 09, 2016 at 02:45:46PM -0400, Michael McConville wrote:

> Hi, everyone.
>
> I was recently discussing this with edd@, who suggested that I pull in
> ports@ and Marc.
>
> Syncthing is a daemon that lets you sync data between devices. By
> default, both metadata and user data are stored in /var/syncthing.
> However, when you update or delete the package, pkg_add tells you the
> following:
>
> > --- -syncthing-0.13.9 -------------------
> > You should also run rm -rf /var/syncthing/{.,}*
>
> For many or most users, this will delete their data and their device
> associations.
>
> Here are the relevant PLIST lines:
>
> > @sample ${VARBASE}/syncthing/
> > @extraunexec rm -rf ${VARBASE}/syncthing/{.,}*
>
> The porting docs describe @extraunexec as being for "system files
> created by the package at runtime". While this is a somewhat accurate
> description of /var/syncthing, I don't think that @extraunexec is
> intended for user data or for program data that is effectively long-term
> config data (e.g. Syncthing associations between devices).
>
> I couldn't find any indication in the Syncthing docs that any metadata
> needs to be deleted when updating. However, I could have easily missed
> something.
>
> Input appreciated.
>
> Thanks for your time,
> Mike

That's the expected behavior. We're talking pkg_delete vs pkg_delete -c.
pkg_delete does tell you that you also need to remove this to wipe the
package completely.

Reply | Threaded
Open this post in threaded view
|

Re: net/syncthing and @extraunexec

Michael McConville-3
Marc Espie wrote:

> On Tue, Aug 09, 2016 at 02:45:46PM -0400, Michael McConville wrote:
> > Syncthing is a daemon that lets you sync data between devices. By
> > default, both metadata and user data are stored in /var/syncthing.
> > However, when you update or delete the package, pkg_add tells you
> > the following:
> >
> > > --- -syncthing-0.13.9 -------------------
> > > You should also run rm -rf /var/syncthing/{.,}*
> >
> > For many or most users, this will delete their data and their device
> > associations.
>
> That's the expected behavior. We're talking pkg_delete vs pkg_delete
> -c. pkg_delete does tell you that you also need to remove this to wipe
> the package completely.

Isn't that a pretty serious usability problem, though? It tells the user
"you should run this command" without context or warning. Of course, the
user is still capable of discerning that their data will be deleted.
However, someone who's moving too quickly or doesn't recognize the regex
could lose a lot of data.

Reply | Threaded
Open this post in threaded view
|

Re: net/syncthing and @extraunexec

Erling Westenvik-2
On Tue, Aug 09, 2016 at 03:05:47PM -0400, Michael McConville wrote:

> Marc Espie wrote:
> > On Tue, Aug 09, 2016 at 02:45:46PM -0400, Michael McConville wrote:
> > > Syncthing is a daemon that lets you sync data between devices. By
> > > default, both metadata and user data are stored in /var/syncthing.
> > > However, when you update or delete the package, pkg_add tells you
> > > the following:
> > >
> > > > --- -syncthing-0.13.9 -------------------
> > > > You should also run rm -rf /var/syncthing/{.,}*
> > >
> > > For many or most users, this will delete their data and their device
> > > associations.
> >
> > That's the expected behavior. We're talking pkg_delete vs pkg_delete
> > -c. pkg_delete does tell you that you also need to remove this to wipe
> > the package completely.
>
> Isn't that a pretty serious usability problem, though? It tells the user
> "you should run this command" without context or warning. Of course, the
> user is still capable of discerning that their data will be deleted.
> However, someone who's moving too quickly or doesn't recognize the regex
> could lose a lot of data.

Messages like that constitute a long time unsolved puzzle to me. I've
gotten used to that quite a few packages give such warnings during
pkg_add -u after updating my current, but fear of getting yelled at for
being stupid has prevented me from ever asking. (Fortunately my fear of
deleting important stuff also has prevented me from actually starting to
rm -rf just like that.)

--
Erling Westenvik

Reply | Threaded
Open this post in threaded view
|

Re: net/syncthing and @extraunexec

Antoine Jacoutot-7
In reply to this post by Marc Espie-2
On Tue, Aug 09, 2016 at 08:55:54PM +0200, Marc Espie wrote:

> On Tue, Aug 09, 2016 at 02:45:46PM -0400, Michael McConville wrote:
> > Hi, everyone.
> >
> > I was recently discussing this with edd@, who suggested that I pull in
> > ports@ and Marc.
> >
> > Syncthing is a daemon that lets you sync data between devices. By
> > default, both metadata and user data are stored in /var/syncthing.
> > However, when you update or delete the package, pkg_add tells you the
> > following:
> >
> > > --- -syncthing-0.13.9 -------------------
> > > You should also run rm -rf /var/syncthing/{.,}*
> >
> > For many or most users, this will delete their data and their device
> > associations.
> >
> > Here are the relevant PLIST lines:
> >
> > > @sample ${VARBASE}/syncthing/
> > > @extraunexec rm -rf ${VARBASE}/syncthing/{.,}*
> >
> > The porting docs describe @extraunexec as being for "system files
> > created by the package at runtime". While this is a somewhat accurate
> > description of /var/syncthing, I don't think that @extraunexec is
> > intended for user data or for program data that is effectively long-term
> > config data (e.g. Syncthing associations between devices).
> >
> > I couldn't find any indication in the Syncthing docs that any metadata
> > needs to be deleted when updating. However, I could have easily missed
> > something.
> >
> > Input appreciated.
> >
> > Thanks for your time,
> > Mike
>
> That's the expected behavior. We're talking pkg_delete vs pkg_delete -c.
> pkg_delete does tell you that you also need to remove this to wipe the
> package completely.

The problem is that these messages are displayed at update time.
I assume because from pkg_add's point of view it's a delete+add.
IMHO UNMESSAGE and @extraunexec stuffs should not be displayed at update time.

--
Antoine

Reply | Threaded
Open this post in threaded view
|

Re: net/syncthing and @extraunexec

Edd Barrett-3
On Wed, Aug 10, 2016 at 12:14:13AM +0200, Antoine Jacoutot wrote:
> The problem is that these messages are displayed at update time.
> I assume because from pkg_add's point of view it's a delete+add.

This was my working theory also.

> IMHO UNMESSAGE and @extraunexec stuffs should not be displayed at update time.

Seems sensible.

--
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk

Reply | Threaded
Open this post in threaded view
|

Re: net/syncthing and @extraunexec

Marc Espie-2
In reply to this post by Antoine Jacoutot-7
On Wed, Aug 10, 2016 at 12:14:13AM +0200, Antoine Jacoutot wrote:
> The problem is that these messages are displayed at update time.
> I assume because from pkg_add's point of view it's a delete+add.
> IMHO UNMESSAGE and @extraunexec stuffs should not be displayed at update time.

UNMESSAGE is already not displayed when it doesn't change (like MESSAGE).
Sporadic things like package version do not belong in there.