All of lore.kernel.org
 help / color / mirror / Atom feed
* Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")
@ 2022-09-06  9:41 Petr Vorel
  2022-09-06 11:19 ` Alejandro Colomar
  2022-09-07 20:53 ` Jakub Wilk
  0 siblings, 2 replies; 14+ messages in thread
From: Petr Vorel @ 2022-09-06  9:41 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man, Michael Kerrisk

Hi Alejandro,

yesterday you merged this commit (without sending it to ML):
70ac1c478 ("src.mk, All pages: Move man* to man/")

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.
Because saving one extra cd is IMHO more important.

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")
  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 16:09   ` Petr Vorel
  2022-09-07 20:53 ` Jakub Wilk
  1 sibling, 2 replies; 14+ messages in thread
From: Alejandro Colomar @ 2022-09-06 11:19 UTC (permalink / raw)
  To: Petr Vorel; +Cc: linux-man, Michael Kerrisk


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

Hi Petr,

On 9/6/22 11:41, Petr Vorel wrote:
> Hi Alejandro,
> 
> yesterday you merged this commit (without sending it to ML):
> 70ac1c478 ("src.mk, All pages: Move man* to man/")
> 

It's good to know that someone realized immediately after my patch.  I 
wanted to know how much it would really hurt others' habits, and a 
discussion about it would probably have been too artificial.  That's why 
I did it without prior discussion.

> 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.
> Because saving one extra cd is IMHO more important.

I rarely cd.  I edit pages from the root of the repo with (in my 
example, I'll pretend to edit membarrier(2)):

(previous to subsections):
vi m[TAB]2[TAB]memb[TAB]

(after subsections were introduced, but before this change):
vi m[TAB]2/memb[TAB]

(after this patch):
vi m[TAB]m[TAB]2/memb[TAB]


I agree it's two more keystrokes, and it took me so long to decide to 
change it because two keystrokes all the time are not the most friendly 
thing in the world, but I think I could live with them.

Do you still think I should revert it?

I guess I'll receive a lot more emails like that in the following days, 
so I'll wait a little bit more before considering reverting it, but 
yeah, I may do it; I'm still unsure about what to do.

Kind regards,

Alex


-- 
Alejandro Colomar
<http://www.alejandro-colomar.es/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")
  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
  1 sibling, 1 reply; 14+ messages in thread
From: Alejandro Colomar @ 2022-09-06 11:57 UTC (permalink / raw)
  To: Petr Vorel; +Cc: linux-man, Michael Kerrisk


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

On 9/6/22 13:19, Alejandro Colomar wrote:
> I rarely cd.  I edit pages from the root of the repo with (in my 
> example, I'll pretend to edit membarrier(2)):
> 
> (previous to subsections):
> vi m[TAB]2[TAB]memb[TAB]
> 
> (after subsections were introduced, but before this change):
> vi m[TAB]2/memb[TAB]
> 
> (after this patch):
> vi m[TAB]m[TAB]2/memb[TAB]

Sorry, it's really

vi m[TAB]/m[TAB]2/memb[TAB]

due to the Announce and lsm files.  So 3 extra keystrokes.

> 
> 
> I agree it's two more keystrokes, and it took me so long to decide to 
> change it because two keystrokes all the time are not the most friendly 
> thing in the world, but I think I could live with them.
> 
-- 
Alejandro Colomar
<http://www.alejandro-colomar.es/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")
  2022-09-06 11:57   ` Alejandro Colomar
@ 2022-09-06 11:58     ` Alejandro Colomar
  0 siblings, 0 replies; 14+ messages in thread
From: Alejandro Colomar @ 2022-09-06 11:58 UTC (permalink / raw)
  To: Petr Vorel; +Cc: linux-man, Michael Kerrisk


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



On 9/6/22 13:57, Alejandro Colomar wrote:
> On 9/6/22 13:19, Alejandro Colomar wrote:
>> I rarely cd.  I edit pages from the root of the repo with (in my 
>> example, I'll pretend to edit membarrier(2)):
>>
>> (previous to subsections):
>> vi m[TAB]2[TAB]memb[TAB]
>>
>> (after subsections were introduced, but before this change):
>> vi m[TAB]2/memb[TAB]
>>
>> (after this patch):
>> vi m[TAB]m[TAB]2/memb[TAB]
> 
> Sorry, it's really
> 
> vi m[TAB]/m[TAB]2/memb[TAB]
> 
> due to the Announce and lsm files.  So 3 extra keystrokes.

Ahh, no, I can remove a keystroke:

vi m[TAB]/[TAB]2/memb[TAB]

so 2 again.

> 
>>
>>
>> I agree it's two more keystrokes, and it took me so long to decide to 
>> change it because two keystrokes all the time are not the most 
>> friendly thing in the world, but I think I could live with them.
>>

-- 
Alejandro Colomar
<http://www.alejandro-colomar.es/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")
  2022-09-06 11:19 ` Alejandro Colomar
  2022-09-06 11:57   ` Alejandro Colomar
@ 2022-09-06 16:09   ` Petr Vorel
  1 sibling, 0 replies; 14+ messages in thread
From: Petr Vorel @ 2022-09-06 16:09 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man, Michael Kerrisk

Hi Alejandro,

thanks a lot for your feedback.

> Hi Petr,

> On 9/6/22 11:41, Petr Vorel wrote:
> > Hi Alejandro,

> > yesterday you merged this commit (without sending it to ML):
> > 70ac1c478 ("src.mk, All pages: Move man* to man/")


> It's good to know that someone realized immediately after my patch.  I
> wanted to know how much it would really hurt others' habits, and a
> discussion about it would probably have been too artificial.  That's why I
> did it without prior discussion.

> > 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.
> > Because saving one extra cd is IMHO more important.

> I rarely cd.  I edit pages from the root of the repo with (in my example,
> I'll pretend to edit membarrier(2)):
I also rarely cd. Both cd and editing from the git root directory use using tab
autocompletion as you note below.

> (previous to subsections):
> vi m[TAB]2[TAB]memb[TAB]

> (after subsections were introduced, but before this change):
> vi m[TAB]2/memb[TAB]

> (after this patch):
> vi m[TAB]m[TAB]2/memb[TAB]


> I agree it's two more keystrokes, and it took me so long to decide to change
> it because two keystrokes all the time are not the most friendly thing in
> the world, but I think I could live with them.

> Do you still think I should revert it?
I'd wait for more feedback, maybe others will like it.
Sure, I can live with it if I'm alone who even noticed :).

> I guess I'll receive a lot more emails like that in the following days, so
> I'll wait a little bit more before considering reverting it, but yeah, I may
> do it; I'm still unsure about what to do.
No matter how you finally decide, the most important lesson is that tree wide
changes, although they look trivial are safer to post to ML to get feedback
before (and obviously anything which looks controversial).

Kind regards,
Petr

> Kind regards,

> Alex

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")
  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-07 20:53 ` Jakub Wilk
  2022-09-07 22:11   ` Alejandro Colomar
  1 sibling, 1 reply; 14+ messages in thread
From: Jakub Wilk @ 2022-09-07 20:53 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: Petr Vorel, linux-man, Michael Kerrisk

* 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.

-- 
Jakub Wilk

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")
  2022-09-07 20:53 ` Jakub Wilk
@ 2022-09-07 22:11   ` Alejandro Colomar
  2022-09-08 12:42     ` Stefan Puiu
  0 siblings, 1 reply; 14+ messages in thread
From: Alejandro Colomar @ 2022-09-07 22:11 UTC (permalink / raw)
  To: Jakub Wilk; +Cc: Petr Vorel, linux-man, Michael Kerrisk


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

Hi Jakub

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 :)

Cheers,

Alex


> 

-- 
<http://www.alejandro-colomar.es/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")
  2022-09-07 22:11   ` Alejandro Colomar
@ 2022-09-08 12:42     ` Stefan Puiu
  2022-09-09  8:46       ` Petr Vorel
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Puiu @ 2022-09-08 12:42 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: Jakub Wilk, Petr Vorel, lnx-man, Michael Kerrisk

Hi Alex,

On Thu, Sep 8, 2022 at 1:28 AM Alejandro Colomar <alx.manpages@gmail.com> wrote:
>
> Hi Jakub
>
> 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 :).

Just my 2 cents,
Stefan.

>
> Cheers,
>
> Alex
>
>
> >
>
> --
> <http://www.alejandro-colomar.es/>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")
  2022-09-08 12:42     ` Stefan Puiu
@ 2022-09-09  8:46       ` Petr Vorel
  2022-09-15 13:40         ` Alex Colomar
  2024-03-26  1:28         ` Move man* to man/ (was: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")) Alejandro Colomar
  0 siblings, 2 replies; 14+ messages in thread
From: Petr Vorel @ 2022-09-09  8:46 UTC (permalink / raw)
  To: Stefan Puiu; +Cc: Alejandro Colomar, Jakub Wilk, lnx-man, Michael Kerrisk

> Hi Alex,

> On Thu, Sep 8, 2022 at 1:28 AM Alejandro Colomar <alx.manpages@gmail.com> wrote:

> > Hi Jakub

> > 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


Kind regards,
Petr

> Just my 2 cents,
> Stefan.


> > Cheers,

> > Alex

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")
  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
  2024-03-26  1:28         ` Move man* to man/ (was: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")) Alejandro Colomar
  1 sibling, 2 replies; 14+ messages in thread
From: Alex Colomar @ 2022-09-15 13:40 UTC (permalink / raw)
  To: Petr Vorel, Stefan Puiu; +Cc: Jakub Wilk, lnx-man, Michael Kerrisk


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

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).

Cheers,

Alex


-- 
<http://www.alejandro-colomar.es/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")
  2022-09-15 13:40         ` Alex Colomar
@ 2022-09-15 13:48           ` Petr Vorel
  2023-08-02 21:38           ` Alejandro Colomar
  1 sibling, 0 replies; 14+ messages in thread
From: Petr Vorel @ 2022-09-15 13:48 UTC (permalink / raw)
  To: Alex Colomar; +Cc: Stefan Puiu, Jakub Wilk, lnx-man, Michael Kerrisk

> 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).

Thanks!

Kind regards,
Petr

> Cheers,

> Alex

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")
  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
  1 sibling, 1 reply; 14+ messages in thread
From: Alejandro Colomar @ 2023-08-02 21:38 UTC (permalink / raw)
  To: linux-man, Petr Vorel, Stefan Puiu, Jakub Wilk
  Cc: Michael Kerrisk, Marcos Fouces


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

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.

-  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 --]

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")
  2023-08-02 21:38           ` Alejandro Colomar
@ 2023-08-02 21:45             ` Alejandro Colomar
  0 siblings, 0 replies; 14+ messages in thread
From: Alejandro Colomar @ 2023-08-02 21:45 UTC (permalink / raw)
  To: linux-man, Petr Vorel, Stefan Puiu, Jakub Wilk
  Cc: Michael Kerrisk, Marcos Fouces


[-- 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 --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Move man* to man/ (was: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/"))
  2022-09-09  8:46       ` Petr Vorel
  2022-09-15 13:40         ` Alex Colomar
@ 2024-03-26  1:28         ` Alejandro Colomar
  1 sibling, 0 replies; 14+ messages in thread
From: Alejandro Colomar @ 2024-03-26  1:28 UTC (permalink / raw)
  To: Petr Vorel, Stefan Puiu, Jakub Wilk, lnx-man

[-- Attachment #1: Type: text/plain, Size: 2133 bytes --]

Hi,

I'm thinking of adding some features to the build system that would need
having a clean man/ directory.  The main one is building several books
for other projects, one per language, where languages correspond to
every directory within man/ that doesn't match man*.  Currently, I'm
workarounding this by running the build system several times, for each
language dir, but it could be much simpler, I think.

For not having a regression in the number of characters one needs to
type to edit the manual pages, I thought of adding symlinks in the root
of the repository, so it would look like this:

	$ ls -l man*
	lrwxrwxrwx  1 alx alx    9 Mar 26 02:26 man1 -> man/man1/
	lrwxrwxrwx  1 alx alx    9 Mar 26 02:26 man2 -> man/man2/
	lrwxrwxrwx  1 alx alx   13 Mar 26 02:25 man2type -> man/man2type/
	lrwxrwxrwx  1 alx alx    9 Mar 26 02:26 man3 -> man/man3/
	lrwxrwxrwx  1 alx alx   14 Mar 26 02:26 man3const -> man/man3const/
	lrwxrwxrwx  1 alx alx   13 Mar 26 02:26 man3head -> man/man3head/
	lrwxrwxrwx  1 alx alx   13 Mar 26 02:26 man3type -> man/man3type/
	lrwxrwxrwx  1 alx alx    9 Mar 26 02:26 man4 -> man/man4/
	lrwxrwxrwx  1 alx alx    9 Mar 26 02:26 man5 -> man/man5/
	lrwxrwxrwx  1 alx alx    9 Mar 26 02:26 man6 -> man/man6/
	lrwxrwxrwx  1 alx alx    9 Mar 26 02:26 man7 -> man/man7/
	lrwxrwxrwx  1 alx alx    9 Mar 26 02:26 man8 -> man/man8/

	man:
	total 120
	drwxrwxr-x 2 alx alx  4096 Mar 26 02:24 man1
	drwxrwxr-x 2 alx alx 20480 Mar 26 02:24 man2
	drwxrwxr-x 2 alx alx  4096 Mar 26 02:24 man2type
	drwxrwxr-x 2 alx alx 57344 Mar 26 02:24 man3
	drwxrwxr-x 2 alx alx  4096 Mar 26 02:24 man3const
	drwxrwxr-x 2 alx alx  4096 Mar 26 02:24 man3head
	drwxrwxr-x 2 alx alx  4096 Mar 26 02:24 man3type
	drwxrwxr-x 2 alx alx  4096 Mar 26 02:24 man4
	drwxrwxr-x 2 alx alx  4096 Mar 26 02:24 man5
	drwxrwxr-x 2 alx alx  4096 Mar 26 02:24 man6
	drwxrwxr-x 2 alx alx  4096 Mar 26 02:24 man7
	drwxrwxr-x 2 alx alx  4096 Mar 26 02:24 man8

What do you think about it?

Cheers,
Alex


-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-03-26  1:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2024-03-26  1:28         ` Move man* to man/ (was: Revert 70ac1c478 ("src.mk, All pages: Move man* to man/")) Alejandro Colomar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.