Re: does /var/games have to be deleted on purge? (if it's empty..)

2010-01-11 Thread Don Armstrong
On Wed, 06 Jan 2010, Bernhard R. Link wrote:
 Your data in in $HOME.

Not all data is in $HOME. I have lots of data which is in /srv,
/var/www, or other places, some of which is tightly coupled with a
specific set of packages.

 On other words: as a quick test: if I only use a program as user and
 purge the package and my $HOME (and perhaps /tmp by reboot), there
 should be nothing left and especially when I reinstall it everything
 should be as after the first installation.

There are lots of cases where packages legitimately fail this test.
Any change to this policy needs to account for the corner cases where
users have created or modified user data which should be preserved.

If the data was not created by the package during installation or has
been subsequently modified by the user and is likely to be of some
degree of importance, it should not be removed, even on purge, without
the specific direction of the administrator.

That said, to the extent possible, packages should remove data which
was created by the package during installation which has not been
modified by the end user or is unlikely to be of any importance.


Don Armstrong

-- 
EQUAL RIGHTS FOR WOMEN
Don't be teased or humiliated. See their look of surprise when you
step right up to a urinal and use it with a smile. Get Dr. Mary Evers'
EQUAL-NOW Adapter (pat. appld. for) -- purse size, fool proof,
sanitary -- comes in nine lovely, feminine, psychedelic patterns --
requires no fitting, no prescriptions.
 -- Robert A Heinlein _I Will Fear No Evil_ p470.

http://www.donarmstrong.com  http://rzlab.ucr.edu


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2010-01-11 Thread Bill Allombert
On Mon, Jan 11, 2010 at 12:34:09AM -0800, Don Armstrong wrote:
 On Wed, 06 Jan 2010, Bernhard R. Link wrote:
  Your data in in $HOME.
 
 Not all data is in $HOME. I have lots of data which is in /srv,
 /var/www, or other places, some of which is tightly coupled with a
 specific set of packages.

I think we should move to a situation where all important user-generated data 
iseither in $HOME or /srv and let /var for system data.

Cheers,
-- 
Bill. ballo...@debian.org

Imagine a large red swirl here. 


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2010-01-11 Thread Russ Allbery
Bill Allombert bill.allomb...@math.u-bordeaux1.fr writes:
 On Mon, Jan 11, 2010 at 12:34:09AM -0800, Don Armstrong wrote:
 On Wed, 06 Jan 2010, Bernhard R. Link wrote:

 Your data in in $HOME.

 Not all data is in $HOME. I have lots of data which is in /srv,
 /var/www, or other places, some of which is tightly coupled with a
 specific set of packages.

 I think we should move to a situation where all important user-generated
 data iseither in $HOME or /srv and let /var for system data.

I mostly agree in general, but I don't know what, for instance, should be
done about database servers that have a default database location.  That
really should be in /srv under this principle, but since we can't assume
any particular file structure in /srv, we'd need to ask the user during
installation where to put the default database location.  And then it's
not clear what to do if they don't answer.

-- 
Russ Allbery (r...@debian.org)   http://www.eyrie.org/~eagle/


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2010-01-06 Thread Joerg Jaspert

 * Whether it makes sense given Debian semantics or not, users just don't
   expect removing packages to, from their perspective, destroy data.
   Other distributions don't seem to do this.
 We are talking about purging, not removal, thus I consider this argument 
 invalid. I expect purge to remove all traces of a package from the system. 

So when I purge OpenOffice.org from my system it should then delete all
the documents created with it? They are about the same category: Created
with the software packaged here, but not related to it otherwise, its my
data.

-- 
bye, Joerg
Dessen NOC erklaerte uns aber, dass das Mailproblem nicht an ihnen liegen
koennte der ihr Router habe gar keinen Port 25. Der habe nur 16 Ports.
Also kann Mails nichts mit Port 25 zu tun haben.
-- Ulli Horlacher in a38sqm$16csa...@id-124594.news.dfncis.de


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2010-01-06 Thread Bernhard R. Link
* Joerg Jaspert jo...@debian.org [100106 09:48]:
  * Whether it makes sense given Debian semantics or not, users just don't
expect removing packages to, from their perspective, destroy data.
Other distributions don't seem to do this.
  We are talking about purging, not removal, thus I consider this argument
  invalid. I expect purge to remove all traces of a package from the system.

 So when I purge OpenOffice.org from my system it should then delete all
 the documents created with it? They are about the same category: Created
 with the software packaged here, but not related to it otherwise, its my
 data.

Your data in in $HOME. Purging should not change there anything. But I
totally expect it to remove all system wide settings of Openoffice like
global printer settings and all modifications to system directories
not done by myself (where done by myself can include doing by the
program as safe-as, but only when I control the location and not if the
program does it and especially not if it does not even show me where it
happens).

On other words: as a quick test: if I only use a program as user and
purge the package and my $HOME (and perhaps /tmp by reboot), there
should be nothing left and especially when I reinstall it everything
should be as after the first installation.

Hochachtungsvoll,
Bernhard R. Link


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2010-01-05 Thread Guillem Jover
Hi!

On Mon, 2010-01-04 at 17:39:48 -0800, Russ Allbery wrote:
 Don Armstrong d...@debian.org writes:
  On Mon, 04 Jan 2010, Holger Levsen wrote:
  On Montag, 4. Januar 2010, Russ Allbery wrote:
  * It's sometimes necessary to purge a package and reinstall it to
fix some weird problem, or if not necessary at least expedient.
For example, if one accidentally deletes a configuration file,
one of the faster ways to get the original configuration file
shipped with the package back is to purge and reinstall the
package. It saves unpacking the package somewhere and manually
copying out the configuration file.
 
  For this, you actually should be using --force-confmiss.
 
 Is there some way to pass that flag through apt-get or aptitude?  By the
 time I've resorted to aptitude download to get the *.deb to run dpkg on,
 it's usually easier to have just done aptitude purge, aptitude install.

Here's several alternatives:

  $ aptitude reinstall -odpkg::options::=--force-confmiss pkg

or:

  $ apt-get install --reinstall -odpkg::options::=--force-confmiss pkg

or:

  $ aptitude download pkg
  $ dpkg --force-confmiss -i pkg_*.deb

regards,
guillem


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2010-01-04 Thread Holger Levsen
Hi,

On Montag, 4. Januar 2010, Russ Allbery wrote:
  and what the requirements of a package are around preserving or
  removing its data other than log files and configuration files on
  purge?  If so, that would be the relevant place to talk about whether
  or not directories like /var/games should be removed when empty (and
  similarly /var/games/package, /var/lib/package, etc.).
 
  I think policy is currently vague about this since perhaps such
   a decision ought to be made on a case by case basis? I can certainly
   see the difference in preservation of data and state information for a
   RDBMS package as being different from that of a game which is different
   still from a clock program.  Can we be certain that the distribution is
   best served by a one size fits all policy here?
 That's a good point.  Maybe we should defer this to devref.  The Kerberos
 KDC prompts, for instance, and I think the LDAP server does as well, since
 losing that data can be a significant problem. 

Well, I think about changing my mind here. In the past, piuparts has indeed 
ignored eg the non-removal of the ldap database on purge. But now I wonder, 
why should this be done. Unix has a tradition to allow you to shot into your 
foot and if you do a purge of a package, then IMHO a purge should do what a 
purge should do. If you dont have backups and do purge, you might loose some 
important data. But thats the same with rm -rf / or such. 

So what should be the criteria for a package to behave differently on purge? 

 But I would expect most 
 games to delete their high score files and whatnot on purge.

Actually I'd expect a purge to have the same results for any package.

 We do seem to be pseudo-enforcing some rules around this via bug filings
 based on puiparts and the puiparts results presented on the QA pages.
 Those rules should probably at least be documented in the devref.

Absolutly.


cheers,
Holger


signature.asc
Description: This is a digitally signed message part.


Re: does /var/games have to be deleted on purge? (if it's empty..)

2010-01-04 Thread Russ Allbery
Holger Levsen hol...@layer-acht.org writes:

 Well, I think about changing my mind here. In the past, piuparts has
 indeed ignored eg the non-removal of the ldap database on purge. But now
 I wonder, why should this be done. Unix has a tradition to allow you to
 shot into your foot and if you do a purge of a package, then IMHO a
 purge should do what a purge should do. If you dont have backups and do
 purge, you might loose some important data. But thats the same with rm
 -rf / or such.

 So what should be the criteria for a package to behave differently on
 purge?

There are several arguments that say that such data shouldn't be deleted
on purge.  I don't know how persuasive they are.

* The data is not created by the package, in the sense that it's not
  created automatically by package installation.  It's created by the
  user's use of the package and is the user's data.  It's not clear that
  the mysql-server package, for instance, owns all the data in the default
  database location and has the right to be purging it.

* It's sometimes necessary to purge a package and reinstall it to fix some
  weird problem, or if not necessary at least expedient.  For example, if
  one accidentally deletes a configuration file, one of the faster ways to
  get the original configuration file shipped with the package back is to
  purge and reinstall the package.  It saves unpacking the package
  somewhere and manually copying out the configuration file.  If purging
  the package deletes databases, this removes that tactic as an option.

* Whether it makes sense given Debian semantics or not, users just don't
  expect removing packages to, from their perspective, destroy data.
  Other distributions don't seem to do this.

-- 
Russ Allbery (r...@debian.org)   http://www.eyrie.org/~eagle/


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2010-01-04 Thread Holger Levsen
Hi,

On Montag, 4. Januar 2010, Russ Allbery wrote:
 There are several arguments that say that such data shouldn't be deleted
 on purge.  I don't know how persuasive they are.

I'll answer them in reverse order :-)

 * Whether it makes sense given Debian semantics or not, users just don't
   expect removing packages to, from their perspective, destroy data.
   Other distributions don't seem to do this.

We are talking about purging, not removal, thus I consider this argument 
invalid. I expect purge to remove all traces of a package from the system. 

 * It's sometimes necessary to purge a package and reinstall it to fix some
   weird problem, or if not necessary at least expedient.  For example, if
   one accidentally deletes a configuration file, one of the faster ways to
   get the original configuration file shipped with the package back is to
   purge and reinstall the package.  It saves unpacking the package
   somewhere and manually copying out the configuration file.  If purging
   the package deletes databases, this removes that tactic as an option.

Having a working backup+restore in place is probably a way better tactic :-) I 
don't see how such a workaround should justify keeping cruft on millions of 
properly administrated systems.

 * The data is not created by the package, in the sense that it's not
   created automatically by package installation.  It's created by the
   user's use of the package and is the user's data.  It's not clear that
   the mysql-server package, for instance, owns all the data in the default
   database location and has the right to be purging it.

Basically see my answers to previous two arguments. IMHO purging should do 
what it's designed to do. If a package has data worth saving, IMHO one 
shouldnt use purge or use a backup.


regards,
Holger


signature.asc
Description: This is a digitally signed message part.


Re: does /var/games have to be deleted on purge? (if it's empty..)

2010-01-04 Thread Don Armstrong
On Mon, 04 Jan 2010, Holger Levsen wrote:
 On Montag, 4. Januar 2010, Russ Allbery wrote:
  * It's sometimes necessary to purge a package and reinstall it to
fix some weird problem, or if not necessary at least expedient.
For example, if one accidentally deletes a configuration file,
one of the faster ways to get the original configuration file
shipped with the package back is to purge and reinstall the
package. It saves unpacking the package somewhere and manually
copying out the configuration file.

For this, you actually should be using --force-confmiss.

 Basically see my answers to previous two arguments. IMHO purging
 should do what it's designed to do.

This entire discussion is about what purging should be designed to do.

There are lots of examples of data which is has significant user
contribution but is coupled to varying degrees to a package (or even
multiple packages).

Consider data in /var/www, for example, or collections of mysql
databases created by versions of mysql which have been partially
replaced by subsequent versions of mysql. Or ldap databases which were
created by openldap, but are now being used by some other ldap
replacement (or some custom scripts).

Purge should clean up detrius, but there is always a balance between
completely cleaning out the detrius and destroying user data which may
be wanted.


Don Armstrong

-- 
Everyone has to die. And in a hundred years nobody's going to inquire
just how most people died. The best thing is to do it in the way that
strikes your fancy most.
 -- Kenzaburō Ōe _Silent Cry_ p5

http://www.donarmstrong.com  http://rzlab.ucr.edu


--
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2010-01-04 Thread Russ Allbery
Don Armstrong d...@debian.org writes:
 On Mon, 04 Jan 2010, Holger Levsen wrote:
 On Montag, 4. Januar 2010, Russ Allbery wrote:

 * It's sometimes necessary to purge a package and reinstall it to
   fix some weird problem, or if not necessary at least expedient.
   For example, if one accidentally deletes a configuration file,
   one of the faster ways to get the original configuration file
   shipped with the package back is to purge and reinstall the
   package. It saves unpacking the package somewhere and manually
   copying out the configuration file.

 For this, you actually should be using --force-confmiss.

Is there some way to pass that flag through apt-get or aptitude?  By the
time I've resorted to aptitude download to get the *.deb to run dpkg on,
it's usually easier to have just done aptitude purge, aptitude install.

I bring this up not because it's the only method (I know it's not), but
because it's really common, and I even use it myself because I don't
usually remember other methods or they take a bit more thought.  I've seen
lots of Debian users do this, people who are going to be rather surprised
if that suddenly causes their data to be removed, and I'm not sure we can
reach all of those people to communicate this significant of a behavior
change.

-- 
Russ Allbery (r...@debian.org)   http://www.eyrie.org/~eagle/


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2010-01-03 Thread Russ Allbery
Responding to a message from last April that had been sitting in my
to-process queue.

Holger Levsen hol...@layer-acht.org writes:
 On Montag, 6. April 2009, Russ Allbery wrote:

 I don't see much real benefit in going out of our way to remove
 /var/games and it looks like it would be a bit annoying (at the least,
 require adding purge code to all games that put files in /var/games
 that would usually never be triggered).  My inclination would be to say
 that this behavior is fine and perhaps we should officially bless it
 somewhere.

 I've come to agree with this. :-) Now, where to bless it?

I was going to look to see where to patch Policy to talk about this, but
after looking through Policy to see where one would put that information,
I couldn't find anywhere in Policy that specifies which files should be
removed on package purge.  There are specific requirements around
configuration files and log files, but other than that Policy seems to
take for granted that anyone reading it understands what purging means.

Should we add a section to Policy somewhere that explains the package
states and what the requirements of a package are around preserving or
removing its data other than log files and configuration files on purge?
If so, that would be the relevant place to talk about whether or not
directories like /var/games should be removed when empty (and similarly
/var/games/package, /var/lib/package, etc.).

-- 
Russ Allbery (r...@debian.org)   http://www.eyrie.org/~eagle/


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2010-01-03 Thread Manoj Srivastava
On Sun, Jan 03 2010, Russ Allbery wrote:


 Should we add a section to Policy somewhere that explains the package
 states

I think that patch of mine that added the pretty pictures of
 transitions  and states had some language about package states, taken
 from dpkg.

 and what the requirements of a package are around preserving or
 removing its data other than log files and configuration files on
 purge?  If so, that would be the relevant place to talk about whether
 or not directories like /var/games should be removed when empty (and
 similarly /var/games/package, /var/lib/package, etc.).

I think policy is currently vague about this since perhaps such
 a decision ought to be made on a case by case basis? I can certainly
 see the difference in preservation of data and state information for a
 RDBMS package as being different from that of a game which is different
 still from a clock program.  Can we be certain that the distribution is
 best served by a one size fits all policy here?

manoj
-- 
Virginia law forbids bathtubs in the house; tubs must be kept in the
yard.
Manoj Srivastava sriva...@acm.org http://www.golden-gryphon.com/  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2010-01-03 Thread Russ Allbery
Manoj Srivastava sriva...@ieee.org writes:
 On Sun, Jan 03 2010, Russ Allbery wrote:

 and what the requirements of a package are around preserving or
 removing its data other than log files and configuration files on
 purge?  If so, that would be the relevant place to talk about whether
 or not directories like /var/games should be removed when empty (and
 similarly /var/games/package, /var/lib/package, etc.).

 I think policy is currently vague about this since perhaps such
  a decision ought to be made on a case by case basis? I can certainly
  see the difference in preservation of data and state information for a
  RDBMS package as being different from that of a game which is different
  still from a clock program.  Can we be certain that the distribution is
  best served by a one size fits all policy here?

That's a good point.  Maybe we should defer this to devref.  The Kerberos
KDC prompts, for instance, and I think the LDAP server does as well, since
losing that data can be a significant problem.  But I would expect most
games to delete their high score files and whatnot on purge.

We do seem to be pseudo-enforcing some rules around this via bug filings
based on puiparts and the puiparts results presented on the QA pages.
Those rules should probably at least be documented in the devref.

-- 
Russ Allbery (r...@debian.org)   http://www.eyrie.org/~eagle/


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-09 Thread Holger Levsen
Hi,

On Montag, 6. April 2009, Russ Allbery wrote:
 I don't see much real benefit in going out of our way to remove /var/games
 and it looks like it would be a bit annoying (at the least, require adding
 purge code to all games that put files in /var/games that would usually
 never be triggered).  My inclination would be to say that this behavior is
 fine and perhaps we should officially bless it somewhere.

I've come to agree with this. :-) Now, where to bless it?


regards,
Holger


signature.asc
Description: This is a digitally signed message part.


Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-09 Thread Goswin von Brederlow
Holger Levsen hol...@layer-acht.org writes:

 Hi,

 while testing the archive with piuparts I found a failure reported by 
 piuparts, that after purge /var/games existed on the system while it wasnt 
 there before installing+purging the package. 

 See http://piuparts.debian.org/squeeze/fail/slashem-common_0.0.7E7F3-1.3.log 
 (at the end..)

 http://www.pathname.com/fhs/pub/fhs-2.3.html#VARGAMESVARIABLEGAMEDATA says 
 that /var/games is an optional directory, which must be present if the 
 corresponding subsystem (here: a game) is present. 

 Thus I would conclude that it has to be removed on purge if there are no 
 other 
 games installed. Right? Or should I make piuparts ignore the /var/games 
 directory if present after purge?


 regards,
   Holger

 http://piuparts.debian.org/squeeze/fail/armagetronad-dedicated_0.2.8.2.1-10.log
  
 is definitly buggy, as it not only leaves /var/games on the system but 
 also /var/games/armagetronad :-)

And I think there is your problem.

If the package had removed all files then dpkg would have removed the
dir automatically.

MfG
Goswin


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-08 Thread Julien Cristau
On Wed, 2009-04-08 at 02:30 +0200, Holger Levsen wrote:
 Or is RC too much? Or fine now? 

Anything  normal would be too much IMO.

Cheers,
Julien


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-08 Thread Bill Allombert
On Wed, Apr 08, 2009 at 02:30:23AM +0200, Holger Levsen wrote:
 Hi,
 
 On Dienstag, 7. April 2009, Paul Wise wrote:
  A single rmdir in every game using /var/games isn't that hard,
  especially since they have to remove the files from there.
 
 I agree and plan to file RC bugs on this. 
 
 (There have been 24781 binary packages been successfully tested in sid and 
 squeeze atm, 369 have failures, of which eleven packages keep /var/games 
 around, of which 4 also keep other files in /var/games/* - seven more RC bugs 
 sound reasonable to me. Plus potentially a few more in packages not tested.)
 
 Or is RC too much? Or fine now? 

Unless policy is changed to make clear that /var/games can be removed 
at any time, and thus that package cannot just ship /var/games in the
deb and expect it to be available when running the postinst, or at any
latter time, I have to object with this bug reports because this 
introduces a race condition. 

Cheers,
-- 
Bill. ballo...@debian.org

Imagine a large red swirl here. 


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-08 Thread Holger Levsen
Hi,

On Mittwoch, 8. April 2009, Paul Wise wrote:
 How about this:

 Game a gets installed and ships /var/games
 Game b gets installed and ships /var/games
 Game a gets purged and removes /var/games
 User starts game b and gets a high score
 Game b tries to save the high score but fails because /var/games doesn't
 exist

Uhm, I thought it was obvious that /var/games may only be deleted if it's 
empty...


regards,
Holger


signature.asc
Description: This is a digitally signed message part.


Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-08 Thread Paul Wise
On Wed, Apr 8, 2009 at 7:51 PM, Holger Levsen hol...@layer-acht.org wrote:

 On Mittwoch, 8. April 2009, Bill Allombert wrote:
 Unless policy is changed to make clear that /var/games can be removed
 at any time, and thus that package cannot just ship /var/games in the
 deb and expect it to be available when running the postinst, or at any
 latter time, I have to object with this bug reports because this
 introduces a race condition.

 I dont understand, can you please explain what race condition you mean?

How about this:

Game a gets installed and ships /var/games
Game b gets installed and ships /var/games
Game a gets purged and removes /var/games
User starts game b and gets a high score
Game b tries to save the high score but fails because /var/games doesn't exist

-- 
bye,
pabs

http://wiki.debian.org/PaulWise
http://synfig.org/User:PaulWise
http://bonedaddy.net/pabs3/


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-08 Thread Julien Cristau
On Wed, 2009-04-08 at 14:17 +0200, Holger Levsen wrote:
 Hi,
 
 On Mittwoch, 8. April 2009, Paul Wise wrote:
  How about this:
 
  Game a gets installed and ships /var/games
  Game b gets installed and ships /var/games
  Game a gets purged and removes /var/games
  User starts game b and gets a high score
  Game b tries to save the high score but fails because /var/games doesn't
  exist
 
 Uhm, I thought it was obvious that /var/games may only be deleted if it's 
 empty...

And it is empty until you try and play game b.  Which might be after
purging game a, which removed /var/games.  Hilarity ensues.  So either
game a must not remove /var/games, or game b must ship
with /var/games/.b-placeholder to make sure that /var/games isn't empty
while b is installed.  The former seems saner to me.

Cheers,
Julien


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-08 Thread Holger Levsen
Hi,

On Mittwoch, 8. April 2009, Adeodato Simó wrote:
 Additionally, what happens if package A and B both ship an empty
 /var/games (they both write their score files directly there, rather
 than a subdirectory), get both installed, then B gets purged and its
 postinst removes /var/games, and then A runs and tries to write to
 /var/games a score file, but the directory does no longer exist nor has
 the game write permission to create it. Is there or is there going to be
 a policy mandating that packages should not ship /var/games without
 shipping /var/games/name?

Isn't the right approach for these packages to register the files they rely on 
in /var/games/ with dpkg?


regards,
Holger


signature.asc
Description: This is a digitally signed message part.


Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-08 Thread Adeodato Simó
+ Russ Allbery (Mon, 06 Apr 2009 11:33:41 -0700):

 I don't see much real benefit in going out of our way to remove /var/games
 and it looks like it would be a bit annoying (at the least, require adding
 purge code to all games that put files in /var/games that would usually
 never be triggered).  My inclination would be to say that this behavior is
 fine and perhaps we should officially bless it somewhere.

I agree with this. We’re trying to move away (eg. with triggers) from
stuff that has to be propagated to every maintainer scripts, and I
really don’t see how removing an empty /var/games is such a big benefit
that would make it worth our time to enforce rmdir’s everywhere.

Additionally, what happens if package A and B both ship an empty
/var/games (they both write their score files directly there, rather
than a subdirectory), get both installed, then B gets purged and its
postinst removes /var/games, and then A runs and tries to write to
/var/games a score file, but the directory does no longer exist nor has
the game write permission to create it. Is there or is there going to be
a policy mandating that packages should not ship /var/games without
shipping /var/games/name?

Thanks,

-- 
- Are you sure we're good?
- Always.
-- Rory and Lorelai


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-08 Thread Holger Levsen
Hi Bill,

On Mittwoch, 8. April 2009, Bill Allombert wrote:
 Unless policy is changed to make clear that /var/games can be removed
 at any time, and thus that package cannot just ship /var/games in the
 deb and expect it to be available when running the postinst, or at any
 latter time, I have to object with this bug reports because this
 introduces a race condition.

I dont understand, can you please explain what race condition you mean?


regards,
Holger

P.S.: Thanks for all your CC:s but I'm subscribed to -qa@ :-)


signature.asc
Description: This is a digitally signed message part.


Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-08 Thread Bill Allombert
On Wed, Apr 08, 2009 at 01:51:25PM +0200, Holger Levsen wrote:
 Hi Bill,
 
 On Mittwoch, 8. April 2009, Bill Allombert wrote:
  Unless policy is changed to make clear that /var/games can be removed
  at any time, and thus that package cannot just ship /var/games in the
  deb and expect it to be available when running the postinst, or at any
  latter time, I have to object with this bug reports because this
  introduces a race condition.
 
 I dont understand, can you please explain what race condition you mean?

One scenario among others:

Package A ships with /var/games in the deb, Package B remove /var/games
in the purge postrm.
Package A is unpacked: /var/games is created
Package B is purged: /var/games is removed
Package A is configured: postinst do 'touch /var/games/foo.hiscore'
which fails.

Cheers,
-- 
Bill. ballo...@debian.org

Imagine a large red swirl here. 


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-08 Thread Bill Allombert
On Wed, Apr 08, 2009 at 02:04:13PM +0200, Adeodato Simó wrote:
 + Russ Allbery (Mon, 06 Apr 2009 11:33:41 -0700):
 
  I don't see much real benefit in going out of our way to remove /var/games
  and it looks like it would be a bit annoying (at the least, require adding
  purge code to all games that put files in /var/games that would usually
  never be triggered).  My inclination would be to say that this behavior is
  fine and perhaps we should officially bless it somewhere.
 
 I agree with this. We’re trying to move away (eg. with triggers) from
 stuff that has to be propagated to every maintainer scripts, and I
 really don’t see how removing an empty /var/games is such a big benefit
 that would make it worth our time to enforce rmdir’s everywhere.
 
 Additionally, what happens if package A and B both ship an empty
 /var/games (they both write their score files directly there, rather
 than a subdirectory), get both installed, then B gets purged and its
 postinst removes /var/games, and then A runs and tries to write to
 /var/games a score file, but the directory does no longer exist nor has
 the game write permission to create it. Is there or is there going to be
 a policy mandating that packages should not ship /var/games without
 shipping /var/games/name?

The restriction I see is that A would need root priviledges to creat a file
in /var/games because policy says:

 The permissions on `/var/games' are mode 755, owner `root' and group
 `root'.

But that is not absolutly impossible.

Cheers,
-- 
Bill. ballo...@debian.org

Imagine a large red swirl here. 


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-08 Thread Andrew McMillan
On Wed, 2009-04-08 at 14:17 +0200, Holger Levsen wrote:
 Hi,
 
 On Mittwoch, 8. April 2009, Paul Wise wrote:
  How about this:
 
  Game a gets installed and ships /var/games
  Game b gets installed and ships /var/games
  Game a gets purged and removes /var/games
  User starts game b and gets a high score
  Game b tries to save the high score but fails because /var/games doesn't
  exist
 
 Uhm, I thought it was obvious that /var/games may only be deleted if it's 
 empty...

But Paul is describing a situation where it is empty (Game b installed
it, but has not yet written a high score into it), but the simple rmdir
logic will delete it.  == very bad.

Cheers,
Andrew.


andrew (AT) morphoss (DOT) com+64(272)DEBIAN
   You have no real enemies.




-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-08 Thread Andrew McMillan
On Wed, 2009-04-08 at 14:04 +0200, Adeodato Simó wrote:
 + Russ Allbery (Mon, 06 Apr 2009 11:33:41 -0700):
 
  I don't see much real benefit in going out of our way to remove /var/games
  and it looks like it would be a bit annoying (at the least, require adding
  purge code to all games that put files in /var/games that would usually
  never be triggered).  My inclination would be to say that this behavior is
  fine and perhaps we should officially bless it somewhere.
 
 I agree with this. We’re trying to move away (eg. with triggers) from
 stuff that has to be propagated to every maintainer scripts, and I
 really don’t see how removing an empty /var/games is such a big benefit
 that would make it worth our time to enforce rmdir’s everywhere.

/me too, for what it's worth.


 Additionally, what happens if package A and B both ship an empty
 /var/games (they both write their score files directly there, rather
 than a subdirectory), get both installed, then B gets purged and its
 postinst removes /var/games, and then A runs and tries to write to
 /var/games a score file, but the directory does no longer exist nor has
 the game write permission to create it. Is there or is there going to be
 a policy mandating that packages should not ship /var/games without
 shipping /var/games/name?


I think the suggestion was shorthand for purge behaviour something along
the lines of:

rm /var/games/myscorefiles.*
rmdir --ignore-fail-on-non-empty /var/games

So that if the rmdir failed it was just kind of 'well, we tried'
behaviour.


Really, though, I don't think that sort of attitude is what we should
ideally be enshrining in policy and I would rather bless the existence
of /var/games than impose a more rigorous procedure for deleting it in a
tasteful and elegant way.

Cheers,
Andrew.


andrew (AT) morphoss (DOT) com+64(272)DEBIAN
   Time to be aggressive.  Go after a tattooed Virgo.




-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-07 Thread Holger Levsen
Hi Russ,

On Montag, 6. April 2009, Russ Allbery wrote:
 We'd then have a similar problem with any other /var directory that holds
 files mostly created at runtime and only deleted on purge, such as
 /var/log, except that the rest are always in existence.

According to the FHS the other 4 directories in the same category 
as /var/games are /var/account, /var/crash, /var/mail and /var/yp.

 I don't see much real benefit in going out of our way to remove /var/games

less cruft on disk, better overview when doing ls /var, but yeah... that's 
not really much :)

 and it looks like it would be a bit annoying (at the least, require adding
 purge code to all games that put files in /var/games that would usually
 never be triggered).

Sounds like a job for debhelper/cdbs to me...

 My inclination would be to say that this behavior is 
 fine and perhaps we should officially bless it somewhere.

I'd appreciate that, I like to follow documented procedures when adding 
checks/ignores to piuparts and then run it on the archive ;)


regards,
Holger




signature.asc
Description: This is a digitally signed message part.


Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-07 Thread Paul Wise
On Tue, Apr 7, 2009 at 2:33 AM, Russ Allbery r...@debian.org wrote:

 I don't see much real benefit in going out of our way to remove /var/games
 and it looks like it would be a bit annoying (at the least, require adding
 purge code to all games that put files in /var/games that would usually
 never be triggered).  My inclination would be to say that this behavior is
 fine and perhaps we should officially bless it somewhere.

A single rmdir in every game using /var/games isn't that hard,
especially since they have to remove the files from there.

-- 
bye,
pabs

http://wiki.debian.org/PaulWise


--
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-07 Thread Holger Levsen
Hi,

On Dienstag, 7. April 2009, Paul Wise wrote:
 A single rmdir in every game using /var/games isn't that hard,
 especially since they have to remove the files from there.

I agree and plan to file RC bugs on this. 

(There have been 24781 binary packages been successfully tested in sid and 
squeeze atm, 369 have failures, of which eleven packages keep /var/games 
around, of which 4 also keep other files in /var/games/* - seven more RC bugs 
sound reasonable to me. Plus potentially a few more in packages not tested.)

Or is RC too much? Or fine now? 


regards,
Holger


signature.asc
Description: This is a digitally signed message part.


Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-06 Thread Bill Allombert
On Mon, Apr 06, 2009 at 01:05:33PM +0200, Holger Levsen wrote:
 Hi,
 
 while testing the archive with piuparts I found a failure reported by 
 piuparts, that after purge /var/games existed on the system while it wasnt 
 there before installing+purging the package. 
 
 See http://piuparts.debian.org/squeeze/fail/slashem-common_0.0.7E7F3-1.3.log 
 (at the end..)
 
 http://www.pathname.com/fhs/pub/fhs-2.3.html#VARGAMESVARIABLEGAMEDATA says 
 that /var/games is an optional directory, which must be present if the 
 corresponding subsystem (here: a game) is present. 

Not that the FHS definition of optional does not says that it should 
added/removed when games are added/removed, rather than a 

 Thus I would conclude that it has to be removed on purge if there are no 
 other 
 games installed. Right? Or should I make piuparts ignore the /var/games 
 directory if present after purge?

The only mention of /var/games in debian policy is:

 The permissions on `/var/games' are mode 755, owner `root' and group
 `root'.

Which kinda imply that /var/games is always present.

So I would not find a system with an empty /var/games buggy.

I think it might be problematic to remove it on purge in some corner cases:
1) package A create an empty /var/games directory.
2) package B is purged and remove /var/games.
3) package A try to register an highscore in /var/games/A.hiscore and fails
because /var/games was removed.

This is a corner case because this assume that A is set suid-root, which is 
unusual.

So my conclusion is that policy is unclear, and that a policy proposal
clarifying the situation should be made prior reporting the bugs.

Cheers,
-- 
Bill. ballo...@debian.org

Imagine a large red swirl here. 


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-06 Thread Sven Joachim
On 2009-04-06 19:59 +0200, Russ Allbery wrote:

 Holger Levsen hol...@layer-acht.org writes:

 while testing the archive with piuparts I found a failure reported by
 piuparts, that after purge /var/games existed on the system while it
 wasnt there before installing+purging the package.

 See http://piuparts.debian.org/squeeze/fail/slashem-common_0.0.7E7F3-1.3.log 
 (at the end..)

 I'm curious why it wasn't removed.  /var/games is normally shipped in each
 of the packages that provides files in /var/games, so dpkg would normally
 remove it automatically once the last game was removed from the system.

But not if the game actually writes highscore files there.  Those are
only removed on purge, at which point dpkg has already forgotten that
/var/games belonged to the package.

 It seems to have left it unowned, which implies to me that either some
 package created it in a maintainer script rather than just including the
 directory in the deb or you're running into the bug that I ran into with
 openafs where dpkg lost track of the owner of a directory (I can't find
 the bug number at the moment).

For /var/games and subdirectories this does not really hold due to the
additional files written there at runtime.

Sven


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-06 Thread Russ Allbery
Holger Levsen hol...@layer-acht.org writes:

 while testing the archive with piuparts I found a failure reported by
 piuparts, that after purge /var/games existed on the system while it
 wasnt there before installing+purging the package.

 See http://piuparts.debian.org/squeeze/fail/slashem-common_0.0.7E7F3-1.3.log 
 (at the end..)

I'm curious why it wasn't removed.  /var/games is normally shipped in each
of the packages that provides files in /var/games, so dpkg would normally
remove it automatically once the last game was removed from the system.

It seems to have left it unowned, which implies to me that either some
package created it in a maintainer script rather than just including the
directory in the deb or you're running into the bug that I ran into with
openafs where dpkg lost track of the owner of a directory (I can't find
the bug number at the moment).

-- 
Russ Allbery (r...@debian.org)   http://www.eyrie.org/~eagle/


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: does /var/games have to be deleted on purge? (if it's empty..)

2009-04-06 Thread Russ Allbery
Sven Joachim svenj...@gmx.de writes:
 On 2009-04-06 19:59 +0200, Russ Allbery wrote:

 I'm curious why it wasn't removed.  /var/games is normally shipped in
 each of the packages that provides files in /var/games, so dpkg would
 normally remove it automatically once the last game was removed from
 the system.

 But not if the game actually writes highscore files there.  Those are
 only removed on purge, at which point dpkg has already forgotten that
 /var/games belonged to the package.

Oh, aha, yes.  That explains it.

We'd then have a similar problem with any other /var directory that holds
files mostly created at runtime and only deleted on purge, such as
/var/log, except that the rest are always in existence.

I don't see much real benefit in going out of our way to remove /var/games
and it looks like it would be a bit annoying (at the least, require adding
purge code to all games that put files in /var/games that would usually
never be triggered).  My inclination would be to say that this behavior is
fine and perhaps we should officially bless it somewhere.

-- 
Russ Allbery (r...@debian.org)   http://www.eyrie.org/~eagle/


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org