FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 07-20-2010, 09:16 PM
Tony Yarusso
 
Default Debconf help

So I'm taking my first stab at implementing debconf in a package, and
having some hangups. Currently I have it such that running
dpkg-reconfigure on my package will work just fine, but the questions
are not asked during initial installation. There are two questions -
one with a "low" priority and the other with "high"; neither are asked
when installing. Anyone care to enlighten me as to what I'm doing
wrong?

The package can be found in my PPA (tonyyarusso/ppa),
https://edge.launchpad.net/~tonyyarusso/+archive/ppa/+sourcepub/1241047/+listing-archive-extra

I'd also be open to any other criticisms / improvements you have to
offer - I know it still has a long way to go to meet your normal
standards. For the time being I'm not expecting to get it up to snuff
for inclusion in the archives, rather just working, although that may be
a longer-term goal.

--
Tony Yarusso
Technical Team
___
Nagios Enterprises, LLC
Email: tyarusso@nagios.com
Web: www.nagios.com


--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
 
Old 07-22-2010, 12:05 AM
Max Bowsher
 
Default Debconf help

On 20/07/10 22:16, Tony Yarusso wrote:
> So I'm taking my first stab at implementing debconf in a package, and
> having some hangups. Currently I have it such that running
> dpkg-reconfigure on my package will work just fine, but the questions
> are not asked during initial installation. There are two questions -
> one with a "low" priority and the other with "high"; neither are asked
> when installing. Anyone care to enlighten me as to what I'm doing
> wrong?
>
> The package can be found in my PPA (tonyyarusso/ppa),
> https://edge.launchpad.net/~tonyyarusso/+archive/ppa/+sourcepub/1241047/+listing-archive-extra

Perhaps your local debconf is configured to only ask you critical
questions. I took your source package, and was correctly asked the high
question but not the low question on initial installation (as my debconf
priority is set to high).

> I'd also be open to any other criticisms / improvements you have to
> offer - I know it still has a long way to go to meet your normal
> standards. For the time being I'm not expecting to get it up to snuff
> for inclusion in the archives, rather just working, although that may be
> a longer-term goal.

Random other things I noticed whilst looking at your source package:

* Do not call db_go after every db_input - instead, call db_go only
after a batch of several db_input. This allows debconf frontends capable
of presenting multiple questions on-screen simultaneously to do so.

* Do not use "Depends: debconf", dh_installdebconf will add the correct
form of debconf dependency via ${miscepends}.

* Do not use service to invoke initscripts from package maintainer
scripts. Instead follow Debian policy:
http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.3.3.2


Max.

--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
 
Old 07-22-2010, 07:34 PM
Tony Yarusso
 
Default Debconf help

On Thu, 2010-07-22 at 01:05 +0100, Max Bowsher wrote:
> Perhaps your local debconf is configured to only ask you critical
> questions. I took your source package, and was correctly asked the high
> question but not the low question on initial installation (as my debconf
> priority is set to high).

A reasonable guess. Turns out it was actually because earlier versions
of my package didn't remove cleanly, so the settings were still marked
as seen in the debconf database - manually removing them made everything
fine thereafter.

> Random other things I noticed whilst looking at your source package:
>
> * Do not call db_go after every db_input - instead, call db_go only
> after a batch of several db_input. This allows debconf frontends capable
> of presenting multiple questions on-screen simultaneously to do so.

Aaah, that makes sense. I'd heard both ways, but not why.

> * Do not use "Depends: debconf", dh_installdebconf will add the correct
> form of debconf dependency via ${miscepends}.

Good catch - thanks.

> * Do not use service to invoke initscripts from package maintainer
> scripts. Instead follow Debian policy:
> http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.3.3.2

Okay. I was sort of under the impression that service was replacing
invoke-rc.d, although without any evidence. Just out of curiosity,
what's the difference between them?

--
Tony Yarusso
Technical Team
___
Nagios Enterprises, LLC
Email: tyarusso@nagios.com
Web: www.nagios.com


--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
 
Old 07-22-2010, 07:59 PM
Stefan Potyra
 
Default Debconf help

Hi,

Am Thursday 22 July 2010 21:34:19 schrieb Tony Yarusso:
[..]
>
> > * Do not use service to invoke initscripts from package maintainer
> > scripts. Instead follow Debian policy:
> > http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.3.3.2
>
> Okay. I was sort of under the impression that service was replacing
> invoke-rc.d, although without any evidence. Just out of curiosity,
> what's the difference between them?

afaict: service is used to start upstart services, invoke-rc.d starts SysV
init scripts.

To my knowledge, the best option is to use dh_installinit -R for the
init-script, as it will generate the correct code for SysV or upstart (given
you use the debhelper token in the maintainer scripts).

Oh, just saw another thing while taking a glimpse:
sed -i 's/#includedir /etc/sudoers.d/includedir
/etc/sudoers.d/' /etc/sudoers

Please don't modify settings of a different package apart from the official
interface (that is exactly what sudoers.d is for).

HTH,
Stefan.
--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
 
Old 07-22-2010, 08:12 PM
Tony Yarusso
 
Default Debconf help

On Thu, 2010-07-22 at 21:59 +0200, Stefan Potyra wrote:
> Oh, just saw another thing while taking a glimpse:
> sed -i 's/#includedir /etc/sudoers.d/includedir
> /etc/sudoers.d/' /etc/sudoers
>
> Please don't modify settings of a different package apart from the official
> interface (that is exactly what sudoers.d is for).

How am I supposed to use sudoers.d if it's disabled? Or will that
actually work, and the commented-out option is only if you want a
different includedir?
--
Tony Yarusso
Technical Team
___
Nagios Enterprises, LLC
Email: tyarusso@nagios.com
Web: www.nagios.com


--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
 
Old 07-22-2010, 08:29 PM
Max Bowsher
 
Default Debconf help

On 22/07/10 21:12, Tony Yarusso wrote:
> On Thu, 2010-07-22 at 21:59 +0200, Stefan Potyra wrote:
>> Oh, just saw another thing while taking a glimpse:
>> sed -i 's/#includedir /etc/sudoers.d/includedir
>> /etc/sudoers.d/' /etc/sudoers

What? Are you attempting to 'uncomment' the directive? man sudoers says
that the # sign is part of the syntax of the directive, not a comment.

But, also...

>> Please don't modify settings of a different package apart from the official
>> interface (that is exactly what sudoers.d is for).
>
> How am I supposed to use sudoers.d if it's disabled? Or will that
> actually work, and the commented-out option is only if you want a
> different includedir?

The file /etc/sudoers.d/README explains why the #includedir directive is
sometimes present, sometimes not.

Debian/Ubuntu have a fairly strong philosophy that you must never
clobber the local sysadmin's interventions it /etc/. As explained in
that README file, the choice was made for the sudo package to *not*
auto-add it to existing sudoers files on upgrade - you shouldn't attempt
to second-guess the sudo maintainers choices about their package's own
config files.


Max.

--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
 

Thread Tools




All times are GMT. The time now is 07:21 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org