[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: one package altering other package's postrm



> On the other hand, if the problem is that the upgrade causes a remove,
> and then some time later the user is going to tidy up by purging cron,

This is it; everything works fine when you switch packages back and forth;
It's only sometime later when you run a routine "aptitude purge ~c"
that this problem happens.

> then rather than simply removing the postrm, you could edit it, thus:
>
>   sed -e 's#rm .*/etc/cron.allow#: &#' /var/lib/dpkg/info/cron.postrm

I would do that; that's the least intrusive.

> although that still seems like a bad thing to be doing, but as long as
> you discuss it with the cron maintainer, and ensure that the pattern is
> going to match all versions
I guess "cron" is pretty much set in the stone nowadays; so this would
be low-maintenance.

> for downstreams
Never tought of/used downstreams (well Raspbian, but this is 99,9%
Debian) ... I'll think of it.
Ubuntu doesn't seems to do anything fancy here.

> Making the files be conffiles of a common package seems like a better
> way to go to me.

I built this package right now: https://github.com/systemd-cron/cron-base

And then I tried to merge in the bcron-run bits.
The folders in /etc are handled identically;
but /var/spool/cron/crontabs is owned by cron:cron ...
I don't know how to solve this easily.

There are various options:

- keep only support for
/etc/cron.allow|deny|d|hourly|daily|weekly|monthly in cron-base ;
  and duplicate code for /var/spool/cron/crontabs in cron &
  systemd-cron (both except a mode 1730 root:crontab folder)

- share cron-base between only cron & systemd-cron; but not bcron-run (ugly)

- split cron-base in cron-etc & cron-spool (ugly too); both made from
  the same source package;
  cron & systemd-cron would depend on cron-etc & cron-spool
  bcron-run would only depend on cron-etc

Are such tiny packages going to be accepted in the archive ?
At least they are arch:all ; so while trimming cron $numb_of_arch times,
this would globaly reduce archive size.

Alexandre Detiste

Ref: http://sources.debian.net/src/bcron/0.10-3/debian/bcron-run.postinst/


Reply to: