public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: linux-man@vger.kernel.org, Petr Vorel <pvorel@suse.cz>,
	Stefan Puiu <stefan.puiu@gmail.com>, Jakub Wilk <jwilk@jwilk.net>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>,
	Marcos Fouces <marcos@debian.org>
Subject: Re: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")
Date: Wed, 2 Aug 2023 23:45:59 +0200	[thread overview]
Message-ID: <088bcbfb-aafa-7b49-604a-d92fef8ca46e@kernel.org> (raw)
In-Reply-To: <18ebd939-3a57-756a-e70b-785be43690f3@kernel.org>


[-- Attachment #1.1: Type: text/plain, Size: 5998 bytes --]

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@gmail.com> wrote:
>>>>> On 9/7/22 22:53, Jakub Wilk wrote:
>>>>>> * Petr Vorel <pvorel@suse.cz>, 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@kernel.org>
> 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@kernel.org>
> 
> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-08-02 21:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06  9:41 Revert 70ac1c478 ("src.mk, All pages: Move man* to man/") Petr Vorel
2022-09-06 11:19 ` Alejandro Colomar
2022-09-06 11:57   ` Alejandro Colomar
2022-09-06 11:58     ` Alejandro Colomar
2022-09-06 16:09   ` Petr Vorel
2022-09-07 20:53 ` Jakub Wilk
2022-09-07 22:11   ` Alejandro Colomar
2022-09-08 12:42     ` Stefan Puiu
2022-09-09  8:46       ` Petr Vorel
2022-09-15 13:40         ` Alex Colomar
2022-09-15 13:48           ` Petr Vorel
2023-08-02 21:38           ` Alejandro Colomar
2023-08-02 21:45             ` Alejandro Colomar [this message]
2024-03-26  1:28         ` Move man* to man/ (was: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")) Alejandro Colomar
2024-04-26 12:43           ` Ping: " Alejandro Colomar
2024-04-26 18:03             ` Petr Vorel
2024-04-26 20:19               ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=088bcbfb-aafa-7b49-604a-d92fef8ca46e@kernel.org \
    --to=alx@kernel.org \
    --cc=jwilk@jwilk.net \
    --cc=linux-man@vger.kernel.org \
    --cc=marcos@debian.org \
    --cc=mtk.manpages@gmail.com \
    --cc=pvorel@suse.cz \
    --cc=stefan.puiu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox