Re: again, ports that stop daemons

2011-12-28 Thread Łukasz Wąsikowski
W dniu 2011-12-09 22:25, Doug Barton pisze:

 I previously described what I thought was a pretty good way to handle
 this question that addressed the needs expressed by all of the posters
 on the previous thread, but my suggestion didn't get any responses.
 Since this has come up again, it would be helpful (to me at least) if
 people would think about my idea, and if nothing else tell me why I'm
 wrong. :)

+1 to the idea.

-- 
best regards,
Lukasz Wasikowski
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: again, ports that stop daemons

2011-12-11 Thread Matthew Seaman
On 11/12/2011 07:19, Jason Hellenthal wrote:
 If end-user is upgrading a package they should be prepared to take
 any neccesary action to start the services again after final actions
 are complete. Desperate services could have a periodic script that
 could handle the checks for these services and I strongly advise
 against taking any action whatsoever on starting or restarting or
 reloading.

Like this?

http://www.infracaninophile.co.uk/articles/hotchpotch.html#status-rc

Not that I entirely disagree with having a mechanism available to
restart daemons on update, but yes, it should definitely be optional and
configurable and the docco should explain very clearly that *it will not
work properly in all cases*.

There are too many corner cases where you've got to worry about the
order in which services are restarted, plus things like needing to
restart a completely different service when certain ports get upgraded.
 Consider what needs to happen if you update a commonly used shlib to
fix an important problem but without there being an ABI bump...

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: again, ports that stop daemons

2011-12-10 Thread Jason Hellenthal


On Fri, Dec 09, 2011 at 01:25:25PM -0800, Doug Barton wrote:
 On 12/09/2011 13:18, Baptiste Daroussin wrote:
  On Sat, Dec 03, 2011 at 01:09:09AM +0200, Andriy Gapon wrote:
  on 02/12/2011 21:55 Baptiste Daroussin said the following:
  On Fri, Dec 02, 2011 at 08:38:05PM +0100, Torfinn Ingolfsen wrote:
  On Fri, Dec 2, 2011 at 1:13 PM, Andriy Gapon a...@freebsd.org wrote:
 
  Or that they simply quit doing that and instead print a message like 
  Port X is
  deinstalled but it may have some processes running, please do Y and/or 
  Z to find
  them and/or stop them.
 
  I prefer this suggestion.
 
  I also would prefer this.
 
 
  BTW, this part of my suggestion was inspired by the following:
  http://en.opensuse.org/SDB:Zypper_usage_11.3#Check_processes
 
  Not sure how that feature is implemented though.
 
  FYI, since a few minutes, pkgng handle rc scripts, disabled by default 
  because I
  still consider this feature dangerous.
  to activate it is:
  HANDLE_RC_SCRIPTS=yes in pkg.conf
 
 I previously described what I thought was a pretty good way to handle
 this question that addressed the needs expressed by all of the posters
 on the previous thread, but my suggestion didn't get any responses.
 Since this has come up again, it would be helpful (to me at least) if
 people would think about my idea, and if nothing else tell me why I'm
 wrong. :)
 
 Quoting:
 
 Speaking only for myself I hate the idea of stopping/starting services
 automatically. However this feature is often requested, and is something
 that is provided by many other package systems. If we have people who
 are willing to do the work I think it's worth discussing how to do it
 properly.
 
 The way that I envision it working
 would be a 3-knob system. One knob to always restart the services, one
 to never do it; and then asking on a per-port basis, which should be the
 default. I can imagine portmaster detecting this option in the pre-build
 phase similarly to how it detects and warns about IS_INTERACTIVE now,
 and giving the user a menu of options for how to handle it. I'm happy to
 add more details if people are interested.
 
 Where this actually becomes interesting is not in the ports
 build/install process, which is pretty easy to deal with, but with
 package installs/deinstalls. I definitely think it's doable, what we
 probably want to do is put a knob for this in the port's Makefile, and
 handle the stop/start for both the port and the package with a little
 script that can be included in the package, and run with @exec and @unexec.
 
 

Personally I think this is a little overboard... not your idea but the fact of 
trying to determine a function of restarting services for the user. If end-user 
is upgrading a package they should be prepared to take any neccesary action to 
start the services again after final actions are complete. Desperate services 
could have a periodic script that could handle the checks for these services 
and I strongly advise against taking any action whatsoever on starting or 
restarting or reloading. Stop the service if need be but never assume 
anything about starting a service without strict user interaction.

If at all likelyness that this happens then I have one request... One simple 
knob that defaults to ``NO'' for restarting or starting or reloading. I think 
this is at least reasonable.


pgpJw7e8whopf.pgp
Description: PGP signature


Re: again, ports that stop daemons

2011-12-09 Thread Doug Barton
On 12/09/2011 13:18, Baptiste Daroussin wrote:
 On Sat, Dec 03, 2011 at 01:09:09AM +0200, Andriy Gapon wrote:
 on 02/12/2011 21:55 Baptiste Daroussin said the following:
 On Fri, Dec 02, 2011 at 08:38:05PM +0100, Torfinn Ingolfsen wrote:
 On Fri, Dec 2, 2011 at 1:13 PM, Andriy Gapon a...@freebsd.org wrote:

 Or that they simply quit doing that and instead print a message like 
 Port X is
 deinstalled but it may have some processes running, please do Y and/or Z 
 to find
 them and/or stop them.

 I prefer this suggestion.

 I also would prefer this.


 BTW, this part of my suggestion was inspired by the following:
 http://en.opensuse.org/SDB:Zypper_usage_11.3#Check_processes

 Not sure how that feature is implemented though.

 FYI, since a few minutes, pkgng handle rc scripts, disabled by default 
 because I
 still consider this feature dangerous.
 to activate it is:
 HANDLE_RC_SCRIPTS=yes in pkg.conf

I previously described what I thought was a pretty good way to handle
this question that addressed the needs expressed by all of the posters
on the previous thread, but my suggestion didn't get any responses.
Since this has come up again, it would be helpful (to me at least) if
people would think about my idea, and if nothing else tell me why I'm
wrong. :)

Quoting:

Speaking only for myself I hate the idea of stopping/starting services
automatically. However this feature is often requested, and is something
that is provided by many other package systems. If we have people who
are willing to do the work I think it's worth discussing how to do it
properly.

The way that I envision it working
would be a 3-knob system. One knob to always restart the services, one
to never do it; and then asking on a per-port basis, which should be the
default. I can imagine portmaster detecting this option in the pre-build
phase similarly to how it detects and warns about IS_INTERACTIVE now,
and giving the user a menu of options for how to handle it. I'm happy to
add more details if people are interested.

Where this actually becomes interesting is not in the ports
build/install process, which is pretty easy to deal with, but with
package installs/deinstalls. I definitely think it's doable, what we
probably want to do is put a knob for this in the port's Makefile, and
handle the stop/start for both the port and the package with a little
script that can be included in the package, and run with @exec and @unexec.



-- 

[^L]

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: again, ports that stop daemons

2011-12-09 Thread Baptiste Daroussin
On Fri, Dec 09, 2011 at 01:25:25PM -0800, Doug Barton wrote:
 On 12/09/2011 13:18, Baptiste Daroussin wrote:
  On Sat, Dec 03, 2011 at 01:09:09AM +0200, Andriy Gapon wrote:
  on 02/12/2011 21:55 Baptiste Daroussin said the following:
  On Fri, Dec 02, 2011 at 08:38:05PM +0100, Torfinn Ingolfsen wrote:
  On Fri, Dec 2, 2011 at 1:13 PM, Andriy Gapon a...@freebsd.org wrote:
 
  Or that they simply quit doing that and instead print a message like 
  Port X is
  deinstalled but it may have some processes running, please do Y and/or 
  Z to find
  them and/or stop them.
 
  I prefer this suggestion.
 
  I also would prefer this.
 
 
  BTW, this part of my suggestion was inspired by the following:
  http://en.opensuse.org/SDB:Zypper_usage_11.3#Check_processes
 
  Not sure how that feature is implemented though.
 
  FYI, since a few minutes, pkgng handle rc scripts, disabled by default 
  because I
  still consider this feature dangerous.
  to activate it is:
  HANDLE_RC_SCRIPTS=yes in pkg.conf
 
 I previously described what I thought was a pretty good way to handle
 this question that addressed the needs expressed by all of the posters
 on the previous thread, but my suggestion didn't get any responses.
 Since this has come up again, it would be helpful (to me at least) if
 people would think about my idea, and if nothing else tell me why I'm
 wrong. :)

And I previously read what you already said, but thanks, for providing your
opinion again that help to see how our implementation matches user idea
 
 Quoting:
 
 Speaking only for myself I hate the idea of stopping/starting services
 automatically. However this feature is often requested, and is something
 that is provided by many other package systems. If we have people who
 are willing to do the work I think it's worth discussing how to do it
 properly.

Completly agree that is why it is also deactivated by default.

 
 The way that I envision it working
 would be a 3-knob system. One knob to always restart the services, one
 to never do it; and then asking on a per-port basis, which should be the
 default. I can imagine portmaster detecting this option in the pre-build
 phase similarly to how it detects and warns about IS_INTERACTIVE now,
 and giving the user a menu of options for how to handle it. I'm happy to
 add more details if people are interested.
 
 Where this actually becomes interesting is not in the ports
 build/install process, which is pretty easy to deal with, but with
 package installs/deinstalls. I definitely think it's doable, what we
 probably want to do is put a knob for this in the port's Makefile, and
 handle the stop/start for both the port and the package with a little
 script that can be included in the package, and run with @exec and @unexec.
 

I really do think this a package management feature, not a port feature, the way
this is now done, in pkgng is mostly what you have says, except for the
interactive one. the way it is handle in pkgng can work both for binary package
and for source upgrade (here goes portmaster :)) transparently, it will handle
all the rc scripts without forgetting one, not relying on what can be set or
forgotten by the maintainer.

I hate interactive packages, that is why I didn't add the interactive way, but
patches are welcome to add interactive rc script management in pkgng :).

regards,
Bapt


pgpgMkE4kg8VP.pgp
Description: PGP signature


Re: again, ports that stop daemons

2011-12-03 Thread Chris Rees
On 2 December 2011 23:09, Andriy Gapon a...@freebsd.org wrote:
 on 02/12/2011 21:55 Baptiste Daroussin said the following:
 On Fri, Dec 02, 2011 at 08:38:05PM +0100, Torfinn Ingolfsen wrote:
 On Fri, Dec 2, 2011 at 1:13 PM, Andriy Gapon a...@freebsd.org wrote:

 Or that they simply quit doing that and instead print a message like Port 
 X is
 deinstalled but it may have some processes running, please do Y and/or Z 
 to find
 them and/or stop them.

 I prefer this suggestion.

 I also would prefer this.


 BTW, this part of my suggestion was inspired by the following:
 http://en.opensuse.org/SDB:Zypper_usage_11.3#Check_processes

 Not sure how that feature is implemented though.

A little service magic would do;

[ service blargh status 2/dev/null ]  echo DON'T FORGET TO STOP
THIS SERVICE!!!

I'll prepare a patch, as long as there's some chance of it going in ;)

Chris
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: again, ports that stop daemons

2011-12-03 Thread Chris Rees
On 3 Dec 2011 08:38, Chris Rees cr...@freebsd.org wrote:

 On 2 December 2011 23:09, Andriy Gapon a...@freebsd.org wrote:
  on 02/12/2011 21:55 Baptiste Daroussin said the following:
  On Fri, Dec 02, 2011 at 08:38:05PM +0100, Torfinn Ingolfsen wrote:
  On Fri, Dec 2, 2011 at 1:13 PM, Andriy Gapon a...@freebsd.org wrote:
 
  Or that they simply quit doing that and instead print a message like
Port X is
  deinstalled but it may have some processes running, please do Y
and/or Z to find
  them and/or stop them.
 
  I prefer this suggestion.
 
  I also would prefer this.
 
 
  BTW, this part of my suggestion was inspired by the following:
  http://en.opensuse.org/SDB:Zypper_usage_11.3#Check_processes
 
  Not sure how that feature is implemented though.

 A little service magic would do;

 [ service blargh status 2/dev/null ]  echo DON'T FORGET TO STOP
 THIS SERVICE!!!

Ahem, sorry, forget the square brackets... d'oh

 I'll prepare a patch, as long as there's some chance of it going in ;)

 Chris
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: again, ports that stop daemons

2011-12-03 Thread Matthew Seaman
On 03/12/2011 08:38, Chris Rees wrote:
 A little service magic would do;
 
 [ service blargh status 2/dev/null ]  echo DON'T FORGET TO STOP
 THIS SERVICE!!!
 
 I'll prepare a patch, as long as there's some chance of it going in ;)

Of course, there's always the problem that the service may be being
deleted entirely, or may radically change the way it manages start/stop
of its daemons, so you get left with a bunch of old daemons still
running and no foolproof way of identifying and stopping them.

It's all down to ports not having an 'update' target per se, and
conceptually turning that into 'deinstall, install' -- you can't tell
that any particular 'deinstall' invocation is intended to be closely
followed by a new install or not.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: again, ports that stop daemons

2011-12-03 Thread Andriy Gapon
on 03/12/2011 10:55 Matthew Seaman said the following:
 On 03/12/2011 08:38, Chris Rees wrote:
 A little service magic would do;

 [ service blargh status 2/dev/null ]  echo DON'T FORGET TO STOP
 THIS SERVICE!!!

 I'll prepare a patch, as long as there's some chance of it going in ;)
 
 Of course, there's always the problem that the service may be being
 deleted entirely, or may radically change the way it manages start/stop
 of its daemons, so you get left with a bunch of old daemons still
 running and no foolproof way of identifying and stopping them.
 
 It's all down to ports not having an 'update' target per se, and
 conceptually turning that into 'deinstall, install' -- you can't tell
 that any particular 'deinstall' invocation is intended to be closely
 followed by a new install or not.

You speak theoretically and you are right.  But can anyone tell me (including
port's maintainer) why for example smartd has to do that?
It has only one daemon which is trivially identifiable and which can not do any
possible harm while running (although it may let harm happen when _not_ 
running).


-- 
Andriy Gapon
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


again, ports that stop daemons

2011-12-02 Thread Andriy Gapon

Can I again suggest that ports that stop their daemons on deinstall should
(MUST) try to (re-)start them upon install?

Or that they simply quit doing that and instead print a message like Port X is
deinstalled but it may have some processes running, please do Y and/or Z to find
them and/or stop them.

We've seen some much better solutions being proposed (configurable behavior,
etc), but their implementation would take some time and the current status quo
is a real PITA.

Thank you very much for your attention.
-- 
Andriy Gapon
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: again, ports that stop daemons

2011-12-02 Thread Baptiste Daroussin
On Fri, Dec 02, 2011 at 08:38:05PM +0100, Torfinn Ingolfsen wrote:
 On Fri, Dec 2, 2011 at 1:13 PM, Andriy Gapon a...@freebsd.org wrote:
 
  Or that they simply quit doing that and instead print a message like Port 
  X is
  deinstalled but it may have some processes running, please do Y and/or Z to 
  find
  them and/or stop them.
 
 I prefer this suggestion.

I also would prefer this.

regards,
Bapt


pgp2Jk5IiCTD6.pgp
Description: PGP signature


Re: again, ports that stop daemons

2011-12-02 Thread Andriy Gapon
on 02/12/2011 21:55 Baptiste Daroussin said the following:
 On Fri, Dec 02, 2011 at 08:38:05PM +0100, Torfinn Ingolfsen wrote:
 On Fri, Dec 2, 2011 at 1:13 PM, Andriy Gapon a...@freebsd.org wrote:

 Or that they simply quit doing that and instead print a message like Port 
 X is
 deinstalled but it may have some processes running, please do Y and/or Z to 
 find
 them and/or stop them.

 I prefer this suggestion.
 
 I also would prefer this.


BTW, this part of my suggestion was inspired by the following:
http://en.opensuse.org/SDB:Zypper_usage_11.3#Check_processes

Not sure how that feature is implemented though.

-- 
Andriy Gapon
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org