Re: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")

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

 



On 2023-08-02 23:38, Alejandro Colomar wrote:
> Hi all,
> 
> On 2022-09-15 15:40, Alex Colomar wrote:
>> Hi all,
>>
>> On 9/9/22 10:46, Petr Vorel wrote:
>>>> On Thu, Sep 8, 2022 at 1:28 AM Alejandro Colomar <alx.manpages@xxxxxxxxx> wrote:
>>>>> On 9/7/22 22:53, Jakub Wilk wrote:
>>>>>> * Petr Vorel <pvorel@xxxxxxx>, 2022-09-06 11:41:
>>>>>>> Although I agree that number of man* is quite high and single man
>>>>>>> directory looks nicer, from practical reasons I'd prefer to revert
>>>>>>> this commit.
>>>
>>>>>> I don't like the new layout either.
>>>
>>>>> Thank you both for sharing your opinion.  I'll revert it, then.  Let me
>>>>> a few weeks before doing that, since I'm in the middle of some other big
>>>>> changes (about lint-c), so to not have to stash and fix conflicts at
>>>>> that scale.  If in the meantime someone finds the new layout nice,
>>>>> please speak up :)
>>>
>>>> I think one other aspect to consider is that it makes history
>>>> searching harder. If you type 'git log <file>', by default you only
>>>> get the history to the last move. You need 'git log --follow' to see
>>>> the whole history. Then if you want to do a 'git blame' on an old
>>>> version of the file, pre-move, I think you need to find the old path
>>>> and use that. If the maintainer's opinion of where a file should be
>>>> changes often, that makes it more fun :).
>>>
>>> Yes, I have experience from other projects that moving around does not help.
>>> But here simple revert is working well:
>>> $ git revert 70ac1c4785fc1e158ab2349a962dba2526bf4fbc
>>> git is smart: new changes in unshare.2 (8f4ed6463) and fanotify_mark.2
>>> (c06943bee) didn't cause a conflict. But still, if you decide on revert, I'd do
>>> it early (don't put new commits before it)
>>>
>>> $ git log man2/_exit.2 # shows previous history
>>>
>>
>> Reverted (before any other patches).
> 
> I'm packaging 6.05 for Debian, and I found issues.  The problem is
> present due a combination of the patch below and not having a man/
> dir.
> 
> Since we support any kind of dirs within $(MANDIR), and not just
> man*, `make check` happily checks any file whose name resembles a
> manual page.  This is useful for linting random projects that put
> their pages together with their sources, in an unorganized
> directory structure.  Most projects do this.
> 
> In the Debian manpages packaging, this finds patches in .pc/, which
> are placed there by quilt(1).
> 
> I see several different solutions to make gbp-buildpackage(1) work:
> 
> -  My preferred one would be to move (again) the pages to a man/
>    dir in the root of the project and define `MANDIR:=$(srcdir)/man`.
>    Then, `make check` would just ignore .pc/ in the root of the repo.

Hmm, a new one occurs to me:  $(FIND) $(MANDIR)/* -type f

That would ignore dot dirs, and would workaround the problem for now.

So, we can forget about this for now.  :)

> 
> -  Revert the patch below.  I don't like it, since then we wouldn't
>    be able to use our build system to lint other project's manual
>    pages, which is an interesting feature.
> 
> -  Revert the patch in the Debian packaging.  However, other
>    distributors may have similar problems.
> 
> -  Completely disable `make check` (via override_dh_auto_test) in
>    Debian packaging.  I don't like this.  I think distros running
>    `make check` is useful to detect regressions.
> 
> What do you think?
> 
> Thanks,
> Alex
> 
> ---
> 
> commit 11e3443c0c6812460402382857e6af9c83938e47
> Author: Alejandro Colomar <alx@xxxxxxxxxx>
> Date:   Sat Apr 29 19:29:50 2023 +0200
> 
>     *.mk: Allow non-standard source MANDIRS
>     
>     Some projects don't store their source manual pages in a directory
>     structure resembling $MANPATH.  Allow such a directory structure so that
>     we can for example lint groff's source manual pages:
>     
>     $ make check lint MANDIR=~/src/gnu/groff;
>     
>     Signed-off-by: Alejandro Colomar <alx@xxxxxxxxxx>
> 
> diff --git a/share/mk/build/_.mk b/share/mk/build/_.mk
> index 6cc820073..2f8ae0bcb 100644
> --- a/share/mk/build/_.mk
> +++ b/share/mk/build/_.mk
> @@ -23,12 +23,12 @@ MKDIR := mkdir -p
>  RM    := rm
>  
>  
> -NONSO_MAN := $(shell $(FIND) $(MANDIR)/man*/ -type f \
> +NONSO_MAN := $(shell $(FIND) $(MANDIR)/ -type f \
>                 | $(GREP) '$(MANEXT)' \
>                 | $(XARGS) $(GREP) -l '^\.TH ' \
>                 | $(SORT) \
>                 | $(SED) 's,:,\\:,g')
> -NONSO_MDOC := $(shell $(FIND) $(MANDIR)/man*/ -type f \
> +NONSO_MDOC := $(shell $(FIND) $(MANDIR)/ -type f \
>                 | $(GREP) '$(MANEXT)' \
>                 | $(XARGS) $(GREP) -l '^\.Dt ' \
>                 | $(SORT) \
> diff --git a/share/mk/build/src.mk b/share/mk/build/src.mk
> index 4da142a74..86d024e2f 100644
> --- a/share/mk/build/src.mk
> +++ b/share/mk/build/src.mk
> @@ -57,7 +57,7 @@ LD  := $(CC) $(CFLAGS)
>  _SRCPAGEDIRS   := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.d/,$(NONSO_MAN))
>  
>  _UNITS_src_src := $(patsubst $(MANDIR)/%,$(_MANDIR)/%,$(shell \
> -               $(FIND) $(MANDIR)/man*/ -type f \
> +               $(FIND) $(MANDIR)/ -type f \
>                 | $(GREP) '$(MANEXT)' \
>                 | $(XARGS) $(GREP) -H '^\.\\" SRC BEGIN ' \
>                 | $(SED) 's,:\.\\" SRC BEGIN (,.d/,' \
> diff --git a/share/mk/src.mk b/share/mk/src.mk
> index 76deb8230..169bf7e6d 100644
> --- a/share/mk/src.mk
> +++ b/share/mk/src.mk
> @@ -15,7 +15,7 @@ MANDIR := $(srcdir)
>  MANEXT := \.[0-9]\w*\(\.man\)\?\(\.in\)\?$
>  
>  
> -MANPAGES := $(shell $(FIND) $(MANDIR)/man*/ -type f \
> +MANPAGES := $(shell $(FIND) $(MANDIR)/ -type f \
>                 | $(GREP) '$(MANEXT)' \
>                 | $(SORT) \
>                 | $(SED) 's,:,\\:,g')
> 
> 

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux