#710970 Please include extended dh_ucf script

#710970#5
Date:
2013-06-03 19:43:56 UTC
From:
To:
Hi,

I want to use the dh_ucf script with the 'aide' package. That requires
the changes contained in the attached patch against the master branch.

The changes include

* support directories
* support '--debconf-ok' ucf option
* support '--three-way' ucf option
* check for errors at code generation time
* reduced size of generated code for multiple config files

Please consider to include the changes in the debhelper package.

Thanks

Hannes

#710970#10
Date:
2013-06-23 17:05:43 UTC
From:
To:
Hannes von Haugwitz wrote:

I don't think any debhelper autoscripts define shell functions, and so I
am wary of adding that here. A for loop would have the same effect.

I am also somewhat doubtful of the utility of optimising the space used
by the maintainer script snippets. How many files are being registered
with ucf to make this matter? Does ucf scale to that many files? What if
they all got changed, does the admin have to wade through hundreds of
ucf prompts?

It does not seem appropriate to add individual ucf options to dh_ucf.
One way that would work better would be to take all options after -- as
options for ucf.

I also wonder if there's any reason not to make --three-way the default,
either in ucf itself, or in dh_ucf.

#710970#15
Date:
2013-07-14 08:43:48 UTC
From:
To:
Hello,

What is wrong with shell functions? A for loop wouldn't help here, but
one could hack a while loop analogous to the dh_usrlocal script. However
I think shell functions are the cleaner approach.

The aide package currently registers 157 configuration files with ucf.

The current dh_ucf script would generate 936 postinst lines and 2198
postrm lines. My approach only generates 479 postinst lines and 486
postrm lines.

Please let me know which approach do you prefer (shell functions, while
loops or the current one).

Yes, but the same would apply if the files would have been managed by
dpkg itself.

Both points make sense. I'll update the script to enable '--three-way'
by default and change the synopsis to 'dh_ucf [debhelper options] [-n]
[-- params]'.

Best regards

Hannes

#710970#20
Date:
2016-02-27 11:48:10 UTC
From:
To:
Dear Debhelper Maintainers,

Apart from the above two points what else do I have to do to get the
patch accepted?

Best regards

Hannes

#710970#25
Date:
2017-04-12 10:49:00 UTC
From:
To:
Hannes von Haugwitz:

Hi Hannes,

Sorry that this bug has fallen between the chairs in between debhelper
changing maintainer. :)

Those two points would be great to have implemented.  I think the
concern with the shell function comes in several variants:

 * The shell function is afterwards available to the maintainer,
   effectively making it a part of the API/ABI.

 * It can clash with another maintainer defined function.
   (Less likely and trivially solved by using a proper namespace
    for debhelper provided functions)

 * The autoscripts should have trivial logic as updates it takes a
   long time to roll out patches to autoscripts.  This is easier to
   do if the complex logic is outsourced to a different tool called
   from the scripts[1].  Defining a function has probably been the
   rule of thumb for something that is getting too complex.


I am willing to try this if we name space the function.  Let me know
when you have an updated patch. :)

Thanks,
~Niels

[1] This has its own issues like very few packages can actually provide
such programs.  Nonetheless, that was one of the design goals.

#710970#32
Date:
2022-08-11 07:57:52 UTC
From:
To:
Hi Niels,

Sorry for the long delay.

Looks like I still owe you an updated patch.

Are you still interested the enhancements?

Best regards

Hannes

#710970#37
Date:
2022-08-14 11:16:15 UTC
From:
To:
Hannes von Haugwitz:

Hi Hannes,

Yes, I would still be interested in the improvements if you still feel
it would be worth your time and effort to do them. :)

Thanks,
~Niels

#710970#42
Date:
2023-12-18 13:28:30 UTC
From:
To:
Hello,

Originally I created the bug/patch to ease the maintenance of the
numerous rule files in the aide package. Meanwhile Marc (one of the aide
maintainers) has developed some ucf helper functions for the same
purpose. These functions are now provided by the ucf package
[ucf_helper_functions] and are used directly in the aide-common
postinst file (see [aide-common.postinst]).

Principally I'm still willing to update the dh_ucf patch, but I think it
does not make sense to provide the same functionality in two different
packages (debhelper and ucf).

How do we want to proceed now?

@Marc @Manoj What is your opinion as the maintainers of the other
involved packages?

Best regards

Hannes

[ucf_helper_functions] https://salsa.debian.org/srivasta/ucf/-/blob/master/ucf_helper_functions.sh
[aide-common.postinst[ https://salsa.debian.org/debian/aide/-/blob/master/debian/aide-common.postinst