|
Home > Archive > Debian Developers > March 2004 > Policy on Account creation and deletion?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Policy on Account creation and deletion?
|
|
| Marc Haber 2004-03-13, 3:33 am |
| Hi,
some packages dynamically create system accounts during installation.
This has been increasingly popular since nowadays you don't like to
run unrelated subsystems with the same privileges.
I didn't find any policy documentation how a package should handle
this, and I'd like to have this discusses for future reference.
(1) Account Name
This has been discussed in the past, with no real consensus being
reached. It is clear that we should use a namespace that doesn't clash
with names that our users my use on their systems since we might
remove an account that the local administrator manually created.
Possibilities include _foo, foo_, Debian-foo and foo-Debian, with the
only package I am aware of that already does this being exim4 (using
Debian-exim, and receiving gazillion of bug reports "this account name
is ugly").
(2) Creation
Most packages create their account in postinst. exim4 uses getent to
determin whether the account already exists (this has shown to be
unreliable, see #237657), and bind9 touches a file in /var/run and
tries to chown the file to the account name before creating the
account (with a comment basically saying that there is no other way to
detect account existence).
I am wondering what a package should do if the account already exists:
* use this account verbatim?
This might be undesireable as the account might be in use for
something else.
* delete and recreate the account using the package's settings?
This might overwrite a change done by the local admin, and it
might break unrelated local subsystems using this account.
* fail
This is the safest method, but probably undesireable as well.
(3) Deletion
I think that the account should be deleted when the package is
uninstalled. dpkg documentation says that the only difference between
remove and purge is that remove doesn't delete conffiles while purge
does. This can be interpreted as a requirement to remove the account
even on remove, which might lead to files becoming unowned.
So, it might be necessary to chown all files owned by the package
account to root:root when removing, and to chown them back to the
newly created package account on installation. This can create a
significant amount of work in the maintainer scripts.
Other people say that an account should - once created - never be
automatically removed to block the uid from being recycled because of
file ownership purposes. While these people surely have a point, I
think this is a violation since our users depend on leaving the system
in its original state after purge.
=46or the record: exim4 does remove its user in postrm on purge, bind9
leaves the user on the system.
Thanks for your opinions.
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Henrique de Moraes Holschuh 2004-03-14, 8:34 am |
| On Sat, 13 Mar 2004, Marc Haber wrote:
> Most packages create their account in postinst. exim4 uses getent to
> determin whether the account already exists (this has shown to be
> unreliable, see #237657), and bind9 touches a file in /var/run and
If getent is unreliable, the system is hosed. An account exists if
getent passwd <accountname> can get to it. OTOH, doing getent passwd | grep
(enumerating all the accounts) is something you REALLY should not be doing.
> I am wondering what a package should do if the account already exists:
> * use this account verbatim?
If it is a system account, yes. If it is not, well, I think we should
bang out with an error, and my packages do just that. But that's IMHO.
> (3) Deletion
> I think that the account should be deleted when the package is
> uninstalled. dpkg documentation says that the only difference between
> remove and purge is that remove doesn't delete conffiles while purge
> does. This can be interpreted as a requirement to remove the account
> even on remove, which might lead to files becoming unowned.
IMHO, we should go with the spirit of the thing. If you need the account
there to keep the conffiles in a sane state, then don't remove it on package
removal. Otherwise, do as you wish.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Matthias Urlichs 2004-03-14, 8:34 am |
| Hi, Marc Haber wrote:
> Hi,
>
> some packages dynamically create system accounts during installation. This
> has been increasingly popular since nowadays you don't like to run
> unrelated subsystems with the same privileges.
>
> I didn't find any policy documentation how a package should handle this,
> and I'd like to have this discusses for future reference.
>
> (1) Account Name
> This has been discussed in the past, with no real consensus being reached.
> It is clear that we should use a namespace that doesn't clash with names
> that our users my use on their systems since we might remove an account
> that the local administrator manually created. Possibilities include _foo,
> foo_, Debian-foo and foo-Debian, with the only package I am aware of that
> already does this being exim4 (using Debian-exim, and receiving gazillion
> of bug reports "this account name is ugly").
>
> (2) Creation
> Most packages create their account in postinst. exim4 uses getent to
> determin whether the account already exists (this has shown to be
> unreliable, see #237657), and bind9 touches a file in /var/run and tries
> to chown the file to the account name before creating the account (with a
> comment basically saying that there is no other way to detect account
> existence).
>
Sure there is.
# id smurf
uid=501(smurf) gid=501(smurf) groups=501(smurf),40(src),100(users),200
(urlichs),230(sbuild)
# id fhzruiqhfiuqw
id: fhzruiqhfiuqw: No such user
# echo $?
1
Q.E.D.
> * use this account verbatim?
> This might be undesireable as the account might be in use for
> something else.
Idea: check the account's home directory; ask if it's "wrong".
> (3) Deletion
> I think that the account should be deleted when the package is
> uninstalled.
I'd do it on purge.
> dpkg documentation says that the only difference between
> remove and purge is that remove doesn't delete conffiles while purge does.
Deleting an /etc/passwd entry would fall under that restriction, I'd say.
> For the record: exim4 does remove its user in postrm on purge, bind9
> leaves the user on the system.
>
IMHO both are valid.
--
Matthias Urlichs
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Roland Bauerschmidt 2004-03-14, 3:35 pm |
| Marc Haber wrote:
> I am wondering what a package should do if the account already exists:
> * use this account verbatim?
> This might be undesireable as the account might be in use for
> something else.
As somebody else already pointed out, I think that the account should be
used as is if its UID is in the system user range. Adduser also supports
this. Consider the following example:
euler:~# adduser foobar
[...]
euler:~# adduser --system foobar
adduser: The user `foobar' already exists.
euler:~# echo $?
1
euler:~#
If the user foobar was created with --system before, the second call
wouldn't have failed:
euler:~# adduser --system foobar
Adding system user foobar...
Adding new user foobar (105) with group nogroup.
Creating home directory /home/foobar.
euler:~# adduser --system foobar
User foobar does already exist. Exiting...
euler:~# echo $?
0
euler:~#
I hope this helps, Roland
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Brian May 2004-03-14, 6:33 pm |
| >>>>> "Marc" == Marc Haber <mh+debian-devel@zugschlus.de> writes:
Marc> (3) Deletion I think that the account should be deleted when
Marc> the package is uninstalled. dpkg documentation says that the
Marc> only difference between remove and purge is that remove
Marc> doesn't delete conffiles while purge does. This can be
Marc> interpreted as a requirement to remove the account even on
Marc> remove, which might lead to files becoming unowned.
If you do delete the user, don't blindly delete the home directory
associated with that user, eg. by providing deluser the --remove-home
flag, you don't know where the entry in /etc/passwd might point, and
might accidently delete the wrong thing (or the entire file system in
fact, if the home directory was stupidly set to "/").
--
Brian May <bam@debian.org>
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Marc Haber 2004-03-15, 3:33 am |
| On Sat, 13 Mar 2004 09:22:30 +0100, Marc Haber
<mh+debian-devel@zugschlus.de> wrote:
>Most packages create their account in postinst. exim4 uses getent to
>determin whether the account already exists (this has shown to be
>unreliable, see #237657),
#237657 has now been remotely debugged (thanks to the submitter, you
have been most helpful!), and the problem seen does not have to do
with getent.
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Marc Haber 2004-03-15, 3:33 am |
| On Sun, 14 Mar 2004 20:50:33 +0100, Roland Bauerschmidt
<rb@debian.org> wrote:
>As somebody else already pointed out, I think that the account should be
>used as is if its UID is in the system user range. Adduser also supports
>this.
[snip]
>I hope this helps
It does, but prompts additional questions. The discussion here has
pointed out that there might be situations (home directory wrong, UID
not in the system user range) where the system should give warnings,
errors and should ask whether to continue. This is a common task, and
I think that code doing so should be available for use for multiple
packages.
What do you think how this should be solved?
- additional code in adduser (--maintainer-script-interactive)?
- a dedicated package (adduser-maintainer-script)?
- a debhelper tool generating the appropriate code for the maintainer=20
scripts?
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Marc Haber 2004-03-15, 3:33 am |
| On Sun, 14 Mar 2004 09:42:57 -0300, Henrique de Moraes Holschuh
<hmh@debian.org> wrote:
>On Sat, 13 Mar 2004, Marc Haber wrote:
>
>If it is a system account, yes. If it is not, well, I think we should
>bang out with an error, and my packages do just that. But that's IMHO.
YHO sounds reasonable. Only question to leave is how you'd determine a
system account. uid < 1000?
>
>IMHO, we should go with the spirit of the thing. If you need the =
account
>there to keep the conffiles in a sane state, then don't remove it on =
package
>removal. Otherwise, do as you wish.
Conffiles would include spool and log files here, right? So you'd
recommend deleting the account during the remove/purge state that
doesn't leave files owned by the account on the system?
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Marc Haber 2004-03-15, 3:33 am |
| On Sun, 14 Mar 2004 11:21:54 +0100, Matthias Urlichs
<smurf@smurf.noris.de> wrote:
>Hi, Marc Haber wrote:
(with a[color=darkred]
>Sure there is.
># id smurf
>uid=3D501(smurf) gid=3D501(smurf) =
groups=3D501(smurf),40(src),100(users),2
00(urlichs),230(sbuild)
># id fhzruiqhfiuqw
>id: fhzruiqhfiuqw: No such user
># echo $?
>1
>
>Q.E.D.
So who is going to file the bug against bind9?
>
>Idea: check the account's home directory; ask if it's "wrong".
What should I ask then?
does.[color=darkred]
>
>Deleting an /etc/passwd entry would fall under that restriction, I'd =
say.
What restriction do you mean?
>IMHO both are valid.
Can you elaborate please? Under which circumstances is exim4 right,
and under which other circumstances is bind9 right?
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Marc Haber 2004-03-15, 3:33 am |
| On Mon, 15 Mar 2004 09:38:57 +1100, Brian May <bam@debian.org> wrote:
> Marc> (3) Deletion I think that the account should be deleted when
> Marc> the package is uninstalled. dpkg documentation says that the
> Marc> only difference between remove and purge is that remove
> Marc> doesn't delete conffiles while purge does. This can be
> Marc> interpreted as a requirement to remove the account even on
> Marc> remove, which might lead to files becoming unowned.
>
>If you do delete the user, don't blindly delete the home directory
>associated with that user, eg. by providing deluser the --remove-home
>flag, you don't know where the entry in /etc/passwd might point, and
>might accidently delete the wrong thing (or the entire file system in
>fact, if the home directory was stupidly set to "/").
So you think about the case where somebody stupid has changed the home
directory of the account to some insane value? It might be a good idea
then to have the postrm script check the home directory before
invoking deluser?
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Florian Weimer 2004-03-15, 11:34 am |
| Marc Haber wrote:
> (1) Account Name
> This has been discussed in the past, with no real consensus being
> reached. It is clear that we should use a namespace that doesn't clash
> with names that our users my use on their systems since we might
> remove an account that the local administrator manually created.
> Possibilities include _foo, foo_, Debian-foo and foo-Debian, with the
> only package I am aware of that already does this being exim4 (using
> Debian-exim, and receiving gazillion of bug reports "this account name
> is ugly").
I wouldn't use names which are unusual (longer than 8 or 9 character,
consisting of unusual characters).
I'm still surprised that your user name causes so little problems.
--
Current mail filters: many dial-up/DSL/cable modem hosts, and the
following domains: atlas.cz, bigpond.com, freenet.de, hotmail.com,
libero.it, netscape.net, postino.it, tiscali.co.uk, tiscali.cz,
tiscali.it, voila.fr, wanadoo.fr, yahoo.com.
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Daniel Ruoso 2004-03-15, 11:35 am |
| I was thinking in something just like that while I was reading this
thread. Actually I started thinking this could be a new feature of the
debian package, in this way, dpkg would check if the user exists, and
create it or not.
But I think a debhelper script would be much nicer, but there are other
problem... what if I do need that user to exists during the postinst? It
makes me think that having a debian-specific system users manager would
be nicer.
This "System users manager" could map which packages creates each users
and maybe even not allow a package delete a user created by another
package...
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Matt Zimmerman 2004-03-15, 12:35 pm |
| On Mon, Mar 15, 2004 at 09:16:20AM +0100, Marc Haber wrote:
> On Sun, 14 Mar 2004 09:42:57 -0300, Henrique de Moraes Holschuh
> <hmh@debian.org> wrote:
>
> YHO sounds reasonable. Only question to leave is how you'd determine a
> system account. uid < 1000?
The range is configurable in adduser; thus, you would need to query adduser
for this information (if there is not currently an interface, one would need
to be added in order for this to be possible).
--
- mdz
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Marc Haber 2004-03-15, 2:35 pm |
| On Mon, 15 Mar 2004 08:51:55 -0800, Matt Zimmerman <mdz@debian.org>
wrote:
>The range is configurable in adduser; thus, you would need to query =
adduser
>for this information (if there is not currently an interface, one would =
need
>to be added in order for this to be possible).
Maybe it would be a good idea to implement this as an adduser
extension?
Is adduser our documented interface to create accounts? Or do we have
to cater for other packages that might interfere here?
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Matt Zimmerman 2004-03-15, 2:35 pm |
| On Mon, Mar 15, 2004 at 06:57:25PM +0100, Marc Haber wrote:
> Is adduser our documented interface to create accounts? Or do we have
> to cater for other packages that might interfere here?
Policy 9.2.2.
--
- mdz
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Marc Haber 2004-03-15, 5:35 pm |
| On Mon, 15 Mar 2004 10:29:57 -0800, Matt Zimmerman <mdz@debian.org>
wrote:
>On Mon, Mar 15, 2004 at 06:57:25PM +0100, Marc Haber wrote:
>
>Policy 9.2.2.
That does document the UID ranges, but not the program recommended to
create accounts.
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Marc Haber 2004-03-15, 6:34 pm |
| On Mon, 15 Mar 2004 13:14:12 -0300, Daniel Ruoso <daniel@ruoso.com>
wrote:
>I was thinking in something just like that while I was reading this
>thread. Actually I started thinking this could be a new feature of the
>debian package, in this way, dpkg would check if the user exists, and
>create it or not.
If you take a look at dpkg's bug list, you can easily see why
everybody works hard to avoid suggesting things that are solved by
changes to dpkg.
Anyway, there are not so many packages that create their own accounts.
>But I think a debhelper script would be much nicer, but there are other
>problem... what if I do need that user to exists during the postinst?
I can't follow you here. Are you concerned about the order of
debhelper-generated code in the maintainer script?
>It
>makes me think that having a debian-specific system users manager would
>be nicer.
>
>This "System users manager" could map which packages creates each users
>and maybe even not allow a package delete a user created by another
>package...
That sounds like overengineering to me.
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Matt Zimmerman 2004-03-15, 6:34 pm |
| On Mon, Mar 15, 2004 at 11:24:38PM +0100, Marc Haber wrote:
> On Mon, 15 Mar 2004 10:29:57 -0800, Matt Zimmerman <mdz@debian.org>
> wrote:
>
> That does document the UID ranges, but not the program recommended to
> create accounts.
Check again.
--
- mdz
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Brian May 2004-03-15, 8:34 pm |
| >>>>> "Marc" == Marc Haber <mh+debian-devel@zugschlus.de> writes:
Marc> So you think about the case where somebody stupid has
Marc> changed the home directory of the account to some insane
Marc> value? It might be a good idea then to have the postrm
Marc> script check the home directory before invoking deluser?
Better just to use two function calls.
eg.
instead of:
deluser --remove-home xyz
use:
deluser xyz
rm -rf /var/lib/xyz
That way it will delete the directory that the package initially
configured and only the directory that the package initially
configured. If an administrator later decides, due to operational
requirements or whatever that a home directory of /usr/local/xyz is
better, you still want the purge operation to remove /var/lib/xyz, not
/usr/local/xyz. (obviously this might result in dangling and/or reused
UIDs, but I consider this the administrators responsibility to find
and fix.)
Now some people are going to say that using "rm -rf" in a maintainer
script like this is bad, but at least the above illustrates my point.
--
Brian May <bam@debian.org>
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Marc Haber 2004-03-16, 11:38 am |
| On Mon, 15 Mar 2004 14:39:47 -0800, Matt Zimmerman <mdz@debian.org>
wrote:
>On Mon, Mar 15, 2004 at 11:24:38PM +0100, Marc Haber wrote:
>
>Check again.
Ok, found it. Thanks for pointing me _again_.
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Marc Haber 2004-03-16, 11:38 am |
| On Tue, 16 Mar 2004 09:18:29 +1100, Brian May <bam@debian.org> wrote:
>That way it will delete the directory that the package initially
>configured and only the directory that the package initially
>configured. If an administrator later decides, due to operational
>requirements or whatever that a home directory of /usr/local/xyz is
>better, you still want the purge operation to remove /var/lib/xyz, not
>/usr/local/xyz. (obviously this might result in dangling and/or reused
>UIDs, but I consider this the administrators responsibility to find
>and fix.)
You're right. Thanks for that reasoning.
Any ideas how one could implement shared variables in maintainer
scripts? There are things like the account name that need to be
present in postinst and postrm, and I am notorious for changing one
while leaving the other. Is there any recommended hack to do variable
substitution in maintainer scripts at build time?
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Wouter Verhelst 2004-03-16, 11:38 am |
| On Tue, Mar 16, 2004 at 04:01:09PM +0100, Marc Haber wrote:
> Any ideas how one could implement shared variables in maintainer
> scripts? There are things like the account name that need to be
> present in postinst and postrm, and I am notorious for changing one
> while leaving the other. Is there any recommended hack to do variable
> substitution in maintainer scripts at build time?
The autoconf/debhelper way?
for file in postrm prerm postinst preinst
do
sed -ie "s/USERNAME_TO_BE_FILLED_HERE/$username/g" debian/$file
done
--
Wouter Verhelst
Debian GNU/Linux -- http://www.debian.org
Nederlandstalige Linux-documentatie -- http://nl.linux.org
"Stop breathing down my neck." "My breathing is merely a simulation."
"So is my neck, stop it anyway!"
-- Voyager's EMH versus the Prometheus' EMH, stardate 51462.
| |
| Frank Küster 2004-03-16, 1:38 pm |
| Wouter Verhelst <wouter@grep.be> schrieb:
> On Tue, Mar 16, 2004 at 04:01:09PM +0100, Marc Haber wrote:
>
> The autoconf/debhelper way?
>
> for file in postrm prerm postinst preinst
> do
> sed -ie "s/USERNAME_TO_BE_FILLED_HERE/$username/g" debian/$file
> done
Or the eperl way. Have a look at Davide Salvetti's auctex package.
Regards, Frank
--=20
Frank K=FCster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie
| |
| Marc Haber 2004-03-16, 1:38 pm |
| On Tue, 16 Mar 2004 16:34:49 +0100, Wouter Verhelst <wouter@grep.be>
wrote:
>for file in postrm prerm postinst preinst
>do
> sed -ie "s/USERNAME_TO_BE_FILLED_HERE/$username/g" debian/$file
>done
That doesn't backport, since woody's sed doesn't know about -i.
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Stefan Hornburg 2004-03-16, 6:38 pm |
| On Tue, 16 Mar 2004 19:20:11 +0100
Marc Haber <mh+debian-devel@zugschlus.de> wrote:
> On Tue, 16 Mar 2004 16:34:49 +0100, Wouter Verhelst <wouter@grep.be>
> wrote:
>
> That doesn't backport, since woody's sed doesn't know about -i.
Then use PERL instead.
Racke
--
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Florent Rougon 2004-03-16, 6:38 pm |
| Marc Haber <mh+debian-devel@zugschlus.de> wrote:
>
> That doesn't backport, since woody's sed doesn't know about -i.
Well, nothing prevents you to have a preinst.in, postinst.in or whatever
may please you. And it is better (itempotency, clarity, etc.).
--
Florent
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Florent Rougon 2004-03-17, 9:43 am |
| Brian May <bam@debian.org> wrote:
> rm -rf /var/lib/xyz
[...]
> Now some people are going to say that using "rm -rf" in a maintainer
> script like this is bad, but at least the above illustrates my point.
For my education, what is the problem exactly in this specific case (in
particular: one should note there is no environment variable expansion
in the directory name)? Fear that the maintainer's cat or a cosmic ray
inserts a space, semicolon or newline after one of the "/" characters?
Thanks.
--
Florent
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Andreas Metzler 2004-03-17, 9:43 am |
| On Wed, Mar 17, 2004 at 11:54:31AM +0100, Florent Rougon wrote:
> Brian May <bam@debian.org> wrote:
[color=darkred]
> [...]
>
> For my education, what is the problem exactly in this specific case (in
> particular: one should note there is no environment variable expansion
> in the directory name)? Fear that the maintainer's cat or a cosmic ray
> inserts a space, semicolon or newline after one of the "/" characters?
Fear of deleting stuf that not the maintainer but the user put there.
cu andreas
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Florent Rougon 2004-03-17, 9:43 am |
| Andreas Metzler <ametzler@logic.univie.ac.at> wrote:
> Fear of deleting stuf that not the maintainer but the user put there.
Ah, like .bak files or similar perhaps. Surely not a good admin pratice
to place them there, but I can understand the idea. Thanks.
--
Florent
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Marc Haber 2004-03-17, 4:39 pm |
| On Wed, 17 Mar 2004 13:31:29 +0100, Florent Rougon <f.rougon@free.fr>
wrote:
>Andreas Metzler <ametzler@logic.univie.ac.at> wrote:
>
>Ah, like .bak files or similar perhaps. Surely not a good admin pratice
>to place them there, but I can understand the idea. Thanks.
I'd consider it a feature to see .bak files from ages ago vanish when
the package they have been created for is purged.
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Florent Rougon 2004-03-17, 4:40 pm |
| Marc Haber <mh+debian-devel@zugschlus.de> wrote:
> I'd consider it a feature to see .bak files from ages ago vanish when
> the package they have been created for is purged.
Yeah, I think the argument here was, tu put it bluntly, that every shit
touched by the admin is sacred. Where "shit" means in this context admin
stuff placed in the packaging system's realm, as opposed to stuff under
/{var,usr}/local, /home, etc.
Anyway, I don't think there's a clearcut right or wrong way here, since
the base assumption was that the admin didn't follow good, established
practice for managing his filesystem.
Also, I'm not sure now that Andreas was thinking about the same thing as
I (the wording of my question was a bit ambiguous). I was talking about
the general case of an "rm -rf /path" where /path is absolute and does
not contain any variable expansion; it might be, due to the context of
the discussion, that Andreas was thinking about the home directory of
some user (like your Debian-exim) used for a specific program---where
the admin might have deemed clever to put files related to the program
in question.
--
Florent
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Marc Haber 2004-03-17, 4:40 pm |
| On Mon, 15 Mar 2004 09:19:00 +0100, Marc Haber
<mh+debian-devel@zugschlus.de> wrote:
>- a debhelper tool generating the appropriate code for the maintainer=20
> scripts?
Actually, that idea isn't new. #118787 contains dh_adduser which does
exactly what is proposed here. Unfortunately, debhelper's maintainer
didn't take the patch yet because he finds the configuration file
format too complex :-(
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Andreas Metzler 2004-03-17, 4:40 pm |
| On Wed, Mar 17, 2004 at 04:47:46PM +0100, Florent Rougon wrote:
[...]
> Also, I'm not sure now that Andreas was thinking about the same thing as
> I (the wording of my question was a bit ambiguous). I was talking about
> the general case of an "rm -rf /path" where /path is absolute and does
> not contain any variable expansion;
Yes, I was.
> it might be, due to the context of the discussion, that Andreas was
> thinking about the home directory of some user (like your
> Debian-exim) used for a specific program---where the admin might
> have deemed clever to put files related to the program in question.
No, this was just a genernal note about the danger of
"rm -rf /some/path", I agree that this is not clear-cut.
cu andreas
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Colin Watson 2004-03-17, 4:40 pm |
| On Wed, Mar 17, 2004 at 04:47:46PM +0100, Florent Rougon wrote:
> Marc Haber <mh+debian-devel@zugschlus.de> wrote:
>
> Yeah, I think the argument here was, tu put it bluntly, that every shit
> touched by the admin is sacred. Where "shit" means in this context admin
> stuff placed in the packaging system's realm, as opposed to stuff under
> /{var,usr}/local, /home, etc.
>
> Anyway, I don't think there's a clearcut right or wrong way here, since
> the base assumption was that the admin didn't follow good, established
> practice for managing his filesystem.
It's a good, established practice (although perhaps becoming obsolete in
favour of better revision control systems) for admins to keep /etc in
RCS, which creates ,v files in the current directory and stores history
there. While the case mentioned wasn't in /etc, I think we should take
account of practices like these while considering 'rm -rf'.
--
Colin Watson [cjwatson@flatline.org.uk]
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Jamin W. Collins 2004-03-17, 4:40 pm |
| On Wed, Mar 17, 2004 at 04:47:46PM +0100, Florent Rougon wrote:
> Marc Haber <mh+debian-devel@zugschlus.de> wrote:
>
>
> Yeah, I think the argument here was, tu put it bluntly, that every shit
> touched by the admin is sacred. Where "shit" means in this context admin
> stuff placed in the packaging system's realm, as opposed to stuff under
> /{var,usr}/local, /home, etc.
>
> Anyway, I don't think there's a clearcut right or wrong way here, since
> the base assumption was that the admin didn't follow good, established
> practice for managing his filesystem.
The point here is that it is his (or her) filesystem. They have the
right to place files anywhere they want. While there are guidelines,
they may have good reason (not that it's required) to place files inside
the "packaging system's realm" as you put it.
> Also, I'm not sure now that Andreas was thinking about the same thing as
> I (the wording of my question was a bit ambiguous). I was talking about
> the general case of an "rm -rf /path" where /path is absolute and does
> not contain any variable expansion;
Using "rm -rf" to remove a path during a package purge is normally a bad
practice (I might even hazard to say always). It has the potential for
blindly removing files that do not belong to the package in question.
--
Jamin W. Collins
This is the typical unix way of doing things: you string together lots
of very specific tools to accomplish larger tasks. -- Vineet Kumar
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Matthias Urlichs 2004-03-20, 2:35 pm |
| Hi, Marc Haber wrote:
> Matthias Urlichs:
>
> So who is going to file the bug against bind9?
>
Checking user existence by way of chown isn't a bug.
>
> What restriction do you mean?
>
Deleting a conffile. If you think of /etc/passwd as a subdirectory with
one line per file, each of these files/lines/whatever can be thought of as
being some package's conffile.
>
> Can you elaborate please? Under which circumstances is exim4 right, and
> under which other circumstances is bind9 right?
I don't know. Personally I see no big overriding reason for removing the
user entry, but then I don't see a big reason for keeping it either.
--
Matthias Urlichs
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Marc Haber 2004-03-23, 5:35 pm |
| On Tue, 16 Mar 2004 16:01:09 +0100, Marc Haber
<mh+debian-devel@zugschlus.de> wrote:
>On Tue, 16 Mar 2004 09:18:29 +1100, Brian May <bam@debian.org> wrote:
>
>You're right. Thanks for that reasoning.
See Bug #239876.
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Marc Haber 2004-03-23, 5:35 pm |
| On Mon, 15 Mar 2004 16:33:35 +0100, Florian Weimer <fw@deneb.enyo.de>
wrote:
>Marc Haber wrote:
>
>I wouldn't use names which are unusual (longer than 8 or 9 character,
>consisting of unusual characters).
Can you say what you would use?
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Marc Haber 2004-03-23, 6:34 pm |
| On Tue, 16 Mar 2004 16:34:49 +0100, Wouter Verhelst <wouter@grep.be>
wrote:
>On Tue, Mar 16, 2004 at 04:01:09PM +0100, Marc Haber wrote:
>
>The autoconf/debhelper way?
>
>for file in postrm prerm postinst preinst
>do
> sed -ie "s/USERNAME_TO_BE_FILLED_HERE/$username/g" debian/$file
>done
The debhelper way, yes. But, IMO, in debhelper proper. See #239659. I
hope Joey will agree this time.
Greetings
Marc, not very lucky with debhelper wishlist bugs
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
| |
| Brian May 2004-03-23, 8:34 pm |
| >>>>> "Marc" == Marc Haber <mh+debian-devel@zugschlus.de> writes:
Marc> See Bug #239876.
Is that ID correct?
There is no record of Bug #239876. Try the search page instead.
--
Brian May <bam@debian.org>
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Marc Haber 2004-03-24, 4:34 am |
| On Wed, 24 Mar 2004 11:19:18 +1100, Brian May <bam@debian.org> wrote:
> Marc> See Bug #239876.
>
>Is that ID correct?
No, it's #239376. Sorry.
Greetings
Marc
--=20
-------------------------------------- !! No courtesy copies, please !! =
-----
Marc Haber | " Questions are the | Mailadresse im =
Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32=
15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31=
29
|
|
|
|
|