Dead-lock in replaced package scripts

2013-11-12 Thread Ondřej Surý
Hi,

I am searching for a solution for this scenario:

nsd3 (<= 4.0.0), e.g. from 3.2.x postrm script _remove_ "nsd" user
nsd3 (>= 4.0.0) is just a dummy package with hard depends on nsd (>=
4.0.0)
nsd (>= 4.0.0) creates "nsd" user in postinst and remove "nsd" user in
postrm

If nsd3 package is upgraded along nsd package then everything is good.

Now there's a rare situation where:

nsd3 3.2.x has been removed, but not purged (e.g. postrm hasn't been
run)
nsd 4.0.0 is installed
nsd3 3.2.x is purged

Now the "nsd" user has been removed in nsd3.postinst, but it is still
needed by nsd (>= 4.0.0) package. Any ideas how to fix that? Or should I
just cross the fingers and hope nobody would do such thing?

O.
-- 
Ondřej Surý 
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1384258570.14536.46360853.0cc1b...@webmail.messagingengine.com



Re: Dead-lock in replaced package scripts

2013-11-12 Thread Neil Williams
On Tue, 12 Nov 2013 13:16:10 +0100
Ondřej Surý  wrote:

> Hi,
> 
> I am searching for a solution for this scenario:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=621833

Generally, I avoid even trying to remove system users during package
removal. Remove the files for that user but not the user itself. (What
harm does it do to leave the user defined?)

> Now the "nsd" user has been removed in nsd3.postinst, but it is still
> needed by nsd (>= 4.0.0) package. Any ideas how to fix that? Or
> should I just cross the fingers and hope nobody would do such thing?

The old postinst sounds broken. Does the user removal succeed? If the
user is currently active, it should fail - which could give you a way
to prevent removal, assuming that the old postinst will handle that
cleanly.

Expected user intervention for this would be to reinstall the newer
version of the package - the maintainer scrips should be able to cope
in this situation by putting the system user back if the old package
removed it. The application may need to also complain loudly if the
required user does not exist, so that someone can tell what needs to be
done to fix it.

-- 


Neil Williams
=
http://www.linux.codehelp.co.uk/



signature.asc
Description: PGP signature


Re: Dead-lock in replaced package scripts

2013-11-12 Thread Peter Palfrader
On Tue, 12 Nov 2013, Ondřej Surý wrote:

> Now the "nsd" user has been removed in nsd3.postinst, but it is still
> needed by nsd (>= 4.0.0) package. Any ideas how to fix that? Or should I
> just cross the fingers and hope nobody would do such thing?

You probably shouldn't ever remove users.

Cheers,
-- 
   |  .''`.   ** Debian **
  Peter Palfrader  | : :' :  The  universal
 http://www.palfrader.org/ | `. `'  Operating System
   |   `-http://www.debian.org/


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131112125556.gp...@anguilla.noreply.org



Re: Dead-lock in replaced package scripts

2013-11-12 Thread Ondřej Surý
On Tue, Nov 12, 2013, at 13:55, Peter Palfrader wrote:
> On Tue, 12 Nov 2013, Ondřej Surý wrote:
> 
> > Now the "nsd" user has been removed in nsd3.postinst, but it is still
> > needed by nsd (>= 4.0.0) package. Any ideas how to fix that? Or should I
> > just cross the fingers and hope nobody would do such thing?
> 
> You probably shouldn't ever remove users.

That's very nice answer, but not very helpful, since it doesn't address
my question.

O.
-- 
Ondřej Surý 
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1384262553.8893.46386409.7574c...@webmail.messagingengine.com



Re: Dead-lock in replaced package scripts

2013-11-12 Thread Raphael Hertzog
Hi,

On Tue, 12 Nov 2013, Ondřej Surý wrote:
> On Tue, Nov 12, 2013, at 13:55, Peter Palfrader wrote:
> > On Tue, 12 Nov 2013, Ondřej Surý wrote:
> > 
> > > Now the "nsd" user has been removed in nsd3.postinst, but it is still
> > > needed by nsd (>= 4.0.0) package. Any ideas how to fix that? Or should I
> > > just cross the fingers and hope nobody would do such thing?
> > 
> > You probably shouldn't ever remove users.
> 
> That's very nice answer, but not very helpful, since it doesn't address
> my question.

You don't have many options.

You can check the status of the nsd3 package when you install/upgrade nsd
and emit a warning pointing to some README.Debian that explains how to
clean up the situation (or you can do it automatically, it's not very
clean but should be rather straightforward).

Or you can add a dependency on nsd3 (>= 4) to nsd for the time of a
release cycle, thus forcing the user to keep a dummy package around.

In any case, I would still fix the nsd package to not remove the user on
postrm...

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131112133723.gb27...@x230-buxy.home.ouaza.com



Re: Dead-lock in replaced package scripts

2013-11-12 Thread Tollef Fog Heen
]] Ondřej Surý 

> Now the "nsd" user has been removed in nsd3.postinst, but it is still
> needed by nsd (>= 4.0.0) package. Any ideas how to fix that? Or should I
> just cross the fingers and hope nobody would do such thing?

As others have said: stop removing the user, but also, rm the old postrm
script (with suitable checks).  It's not pretty, but it's sometimes
necessary.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87fvr1aghc@qurzaw.varnish-software.com



Re: Dead-lock in replaced package scripts

2013-11-12 Thread Jonathan Dowland
On Tue, Nov 12, 2013 at 12:52:35PM +, Neil Williams wrote:
> Generally, I avoid even trying to remove system users during package
> removal. Remove the files for that user but not the user itself. (What
> harm does it do to leave the user defined?)

This seems very sensible and pragmatic, but your parenthetical reminds
me of Russ's recent thread here about system accounts with login shells.
Perhaps in situations like these switching the shell to /bin/false might
not be a bad compromise.


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131112144631.ga19...@bryant.redmars.org



Re: Dead-lock in replaced package scripts

2013-11-12 Thread Ondřej Surý
On Tue, Nov 12, 2013, at 14:37, Tollef Fog Heen wrote:
> ]] Ondřej Surý 
> 
> > Now the "nsd" user has been removed in nsd3.postinst, but it is still
> > needed by nsd (>= 4.0.0) package. Any ideas how to fix that? Or should I
> > just cross the fingers and hope nobody would do such thing?
> 
> As others have said: stop removing the user

I will, but the harm has been already done at the time I become the nsd*
maintainer.

> but also, rm the old postrm script (with suitable checks). 

I'll use:

sed -i -e '/deluser --quiet nsd/ d' /var/lib/dpkg/info/nsd3.postrm

instead, but thanks for the hint. That helped me to break from
'/var/lib/dpkg/info is sacred' mindset.

> It's not pretty, but it's sometimes necessary.

On Tue, Nov 12, 2013, at 14:37, Raphael Hertzog wrote:
> You can check the status of the nsd3 package when you install/upgrade nsd
> and emit a warning pointing to some README.Debian that explains how to
> clean up the situation (or you can do it automatically, it's not very
> clean but should be rather straightforward).
> 
> Or you can add a dependency on nsd3 (>= 4) to nsd for the time of a
> release cycle, thus forcing the user to keep a dummy package around.

That would create a dependency loop (since nsd3 needs to depend on nsd
(>= 4)).

> In any case, I would still fix the nsd package to not remove the user on
> postrm...

Already done in 4.0.0-3 (that is almost finished and waiting for a
solution for this).

Thanks to you both, this helped me to find the correct solution to
remedy the problem.

Ondrej
-- 
Ondřej Surý 
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1384273948.22526.46487449.337a2...@webmail.messagingengine.com



Bug#729432: ITP: php-sabre-event -- lightweight library for event management

2013-11-12 Thread David Prévot
Package: wnpp
Severity: wishlist
Owner: David Prévot 

* Package name: php-sabre-event
  Version : 1.0.0
  Upstream Author : Evert Pot 
* URL : https://github.com/evert/sabre-vobject
* License : BSD-3-clause
  Programming Lang: PHP
  Description : lightweight library for event management

 sabre/event’s design is inspired by Node.js's EventEmitter.
 .
 It provides some features like prioritization, and the ability to stop
 the event chain, like JavaScript’s preventDefault.


It’s a dependency of the upcoming php-sabredav 1.9 branch that will
replace the current 1.8 branch in experimental (the 1.7 branch will stay
in unstable as long as owncloud depends on it).

I intend to handle its packaging inside the PHP PEAR (and Composer)
team.

Regards

David


signature.asc
Description: Digital signature


Bug#729433: ITP: php-sabre-http -- library to ease the work with HTTP protocol

2013-11-12 Thread David Prévot
Package: wnpp
Severity: wishlist
Owner: David Prévot 
Control: block -1 by 729432

* Package name: php-sabre-http
  Version : 2.0.0~alpha5
  Upstream Author : Evert Pot 
* URL : https://github.com/evert/sabre-vobject
* License : BSD-3-clause
  Programming Lang: PHP
  Description : library to ease the work with HTTP protocol

 sabre/http provides a toolkit to ease the work with HTTP protocol.
 .
 This library is a wrapper around the following PHP constructs:
 .
 For Input:
  * $_GET
  * $_POST
  * $_SERVER
  * php://input or $HTTP_RAW_POST_DATA.
 For output:
  * php://output or echo.
  * header()
 .
 It provides a Request object, and a Response object. The objects are
 extensible and easily mockable.


It’s a dependency of the upcoming php-sabredav 1.9 branch that will
replace the current 1.8 branch in experimental (the 1.7 branch will stay
in unstable as long as owncloud depends on it).

I intend to handle its packaging inside the PHP PEAR (and Composer)
team.

Regards

David


signature.asc
Description: Digital signature


Re: Dead-lock in replaced package scripts

2013-11-12 Thread James McCoy
On Tue, Nov 12, 2013 at 05:32:28PM +0100, Ondřej Surý wrote:
> On Tue, Nov 12, 2013, at 14:37, Tollef Fog Heen wrote:
> > ]] Ondřej Surý 
> > 
> > > Now the "nsd" user has been removed in nsd3.postinst, but it is still
> > > needed by nsd (>= 4.0.0) package. Any ideas how to fix that? Or should I
> > > just cross the fingers and hope nobody would do such thing?
> > 
> > As others have said: stop removing the user
> 
> I will, but the harm has been already done at the time I become the nsd*
> maintainer.
> 
> > but also, rm the old postrm script (with suitable checks). 
> 
> I'll use:
> 
> sed -i -e '/deluser --quiet nsd/ d' /var/lib/dpkg/info/nsd3.postrm
> 
> instead, but thanks for the hint. That helped me to break from
> '/var/lib/dpkg/info is sacred' mindset.

It's the hard-coding of the path that should be avoided.  Instead, use
“dpkg-query --control-path nsd3 postrm” to get the path.

Cheers,
-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy 


signature.asc
Description: Digital signature


Bug#729441: ITA: newlib -- Newlib is a C library intended for use on embedded systems

2013-11-12 Thread Agustin Henze
Package: wnpp
Severity: wishlist
Owner: Agustin Henze 
X-Debbugs-CC: debian-devel@lists.debian.org, debian-cr...@lists.debian.org

Hi all, I'm adopting this package and I'll upload the new upstream release
(2.0.0) with big changes in the packaging. The main change is that it'll only
generate 2 binaries.

* libnewlib-dev: This package contains the newlib headers.

* libnewlib-arm-none-eabi: This package contains the newlib library compiled
for Cortex-A*, Cortex-R4/R5/R7 and Cortex-M0/M0+/M3/M4 targets.

That's because I use and can test daily those targets. If someone can help for
still maintain the old binaries packages (libnewlib0, newlib-spu,
newlib-m68hc1x, newlib-source) is welcome. I'll working in collab-maint[0] when
alioth back online again.

[0] git://anonscm.debian.org/collab-maint/newlib.git

-- 
TiN



signature.asc
Description: OpenPGP digital signature