Bug#1069643: dh_installman: doesn't honor nodoc build profile

2024-04-22 Thread Niels Thykier

Fab Stz:

[...]


If dh_installman doesn't support nodoc as written in its manpage, then maybe
the manpage should be changed.

For instance this may have to be removed since I was mistaken by it.

"In compat 11 and later, it also supports the default searchdir plus --
sourcedir like dh_install(1) and has the advantage that it respects the nodoc
build profile (unlike dh_install(1))."

Regards
Fab




I am happy to consider patches for improving the documentation. But, I 
think your confusion is at a much more fundamental level. As I 
understand your email, you seem to be confusing `dh_installman` reacting 
to `nodoc` vs. `dh` skipping a hook target with `nodoc` which are two 
very different aspects.


The statement about `dh_installman` respecting `nodoc` above is still 
correct because it is whether `dh_installman` will react to `nodoc` and 
ignore missing documentation (manpages) in the `debian/.manpages` 
files.


Nothing you showed me in the mount-zip package is about whether 
`dh_installman` reacts to `nodoc`. That was 100% whether `dh` reacts to 
`nodoc` by skipping commands and hook targets. So if any docs should be 
changed, I would expect the change to be in `dh(1)` rather than 
`dh_installman(1)`.


Best regards,
Niels



Bug#1069643: dh_installman: doesn't honor nodoc build profile

2024-04-22 Thread Fab Stz
> I do not see anything in that commit that suggests that `dh_installman`
> does not honor `nodoc`. What I am getting is that you wish that `dh`
> would skip hook targets for any program that might react to `nodoc`
> similar to `nostrip`.
> 
> Assuming we agree on this being the ask, my answer that there is a
> difference here in that `dh_installman` (etc.) operates during a `nodoc`
> build. That is, I cannot omit the calls to `dh_installman` or
> `dh_installdoc` as they still have things to do (such as re-encode any
> manpage installed to UTF-8 or install the copyright file into the
> package). Therefore, I do not plan to extend the `dh` feature to `nodoc`
> as it cannot tell whether said hook target might still be useful under
> `nodoc` or not.
> 
> As an example based off mount-zip, it would not be unreasonable for you
> to unconditionally remove the manpage rather than installing the
> pre-built one in `execute_before_dh_installman` and then conditionally
> regenerate it as an alternative to conditionally removing it and
> conditionally regenerating it. We do not have a common baseline for this
> and therefore `dh` cannot "optimize" for either way.
> 
> Best regards,
> Niels
> 
> PS: Note that the semantics of `nodoc` are very poorly defined compared
> to `nostrip` or `nocheck`, which does not help either. Unlike the
> others, `nodoc` is just "skip problematic documentation" rather than
> "skip all documentation" (case in point being we still one copyright
> files, NEWS files, and changelogs)

If dh_installman doesn't support nodoc as written in its manpage, then maybe 
the manpage should be changed.

For instance this may have to be removed since I was mistaken by it.

"In compat 11 and later, it also supports the default searchdir plus --
sourcedir like dh_install(1) and has the advantage that it respects the nodoc
   build profile (unlike dh_install(1))."

Regards
Fab



Bug#1069643: dh_installman: doesn't honor nodoc build profile

2024-04-22 Thread Niels Thykier

Control: tags -1 moreinfo

On Mon, 22 Apr 2024 09:37:55 +0200 Fab Stz  wrote:

Package: debhelper
Version: 13.15.3
Severity: normal

Dear Maintainer,

According to dh_installman, it should honor the nodoc build profile.
However, it doesn't. As well as execute_before_dh_install.


[...]


Hi,

Could you please provide the URL the packaging in question where it does 
not work along with a bit more details of what you expected vs. what you 
see? Notably, `dh_installman` will allow documentation to be missing 
during `nodoc` but it will still operate on the documentation there is 
(that has been the way of handling `nodoc` from the start in `debhelper`).


Additionally, I am not sure what the `execute_before_dh_install` remark 
is about. The `execute_before_dh_install` hook targeted is not affected 
by `nodoc`. First off because it is `dh_install` and not one of the 
`dh_install{docs,man}` and secondly, most of the documentation commands 
still do something even under `nodoc` (unlike `dh_strip` with 
`nostrip`), so the commands are still run. Thirdly, even if it was to be 
affected, it would react to `DEB_BUILD_OPTIONS` and not the profile 
(which are not the same thing and that has been confusing people a lot 
at least with nocheck)


Best regards,
Niels



Bug#1069643: dh_installman: doesn't honor nodoc build profile

2024-04-22 Thread Fab Stz
Control: tags -1 - moreinfo

Le lundi 22 avril 2024 10:12:45 CEST, vous avez écrit :
> Control: tags -1 moreinfo
> 
> On Mon, 22 Apr 2024 09:37:55 +0200 Fab Stz  wrote:
> > Package: debhelper
> > Version: 13.15.3
> > Severity: normal
> > 
> > Dear Maintainer,
> > 
> > According to dh_installman, it should honor the nodoc build profile.
> > However, it doesn't. As well as execute_before_dh_install.
> > 
> > 
> > [...]
> 
> Hi,
> 
> Could you please provide the URL the packaging in question where it does
> not work along with a bit more details of what you expected vs. what you
> see? Notably, `dh_installman` will allow documentation to be missing
> during `nodoc` but it will still operate on the documentation there is
> (that has been the way of handling `nodoc` from the start in `debhelper`).
> 
> Additionally, I am not sure what the `execute_before_dh_install` remark
> is about. The `execute_before_dh_install` hook targeted is not affected
> by `nodoc`. First off because it is `dh_install` and not one of the
> `dh_install{docs,man}` and secondly, most of the documentation commands
> still do something even under `nodoc` (unlike `dh_strip` with
> `nostrip`), so the commands are still run. Thirdly, even if it was to be
> affected, it would react to `DEB_BUILD_OPTIONS` and not the profile
> (which are not the same thing and that has been confusing people a lot
> at least with nocheck)
> 
> Best regards,
> Niels

Hello Niels,

Oh sorry, I lost my initial mail and had to rewrite it and wasn't careful 
enough. I meant execute_before_dh_installman and not 
execute_before_dh_install.

Concerning your remark about DEB_BUILD_OPTIONS, it is populated automatically 
with the value of the DEB_BUILD_PROFILES as displayed in the output of dpkg-
buildpackage. At least for nocheck & nodoc.

You can try with https://salsa.debian.org/bastif/mount-zip
Latest commit includes execute_before_dh_installman

For now, as a workaround in that target, I added a test on whether build 
profile has "nodoc" set. But if you remove that "ifneq...", and build with 
"nodoc" it will still invoke both dh_installmal & 
execute_before_dh_installman. However, if one doesn't have pandoc installed 
(eg because the "nodoc" build profile doesn't require it as dependency), that 
target will fail because it is invoked, while I expected it to be skipped.

If you wish to check with that package, I suggest you also build with 
"nocheck", because there is a test that takes a lot of time.

Regards
Fab



Bug#1069643: dh_installman: doesn't honor nodoc build profile

2024-04-22 Thread Fab Stz
Package: debhelper
Version: 13.15.3
Severity: normal

Dear Maintainer,

According to dh_installman, it should honor the nodoc build profile.
However, it doesn't. As well as execute_before_dh_install.


-- System Information:
Debian Release: 12.5
  APT prefers stable-updates
  APT policy: (991, 'stable-updates'), (991, 'stable-security'), (991, 
'stable'), (990, 'proposed-updates'), (390, 'oldstable-security'), (390, 
'oldstable'), (389, 'oldstable-updates'), (380, 'oldoldstable'), (379, 
'oldoldstable-updates'), (370, 'oldoldstable'), (95, 'testing'), (94, 
'unstable'), (93, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-20-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr:en_US
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages debhelper depends on:
ii  autotools-dev20220109.1
ii  dh-autoreconf20
ii  dh-strip-nondeterminism  1.13.1-1
ii  dpkg 1.21.22
ii  dpkg-dev 1.21.22
ii  dwz  0.15-1
ii  file 1:5.44-3
ii  libdebhelper-perl13.11.4
ii  libdpkg-perl 1.21.22
ii  man-db   2.11.2-2
ii  perl 5.36.0-7+deb12u1
ii  po-debconf   1.0.21+nmu1

debhelper recommends no packages.

Versions of packages debhelper suggests:
pn  dh-make  

-- no debconf information