Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +Put options common to more than one mode into a subsection of its own.
+
+# ENVIRONMENT
+Describe environment variables affecting program execution.
+
+# EXIT STATUS
+Describe exit codes of the command.
+
+# EXAMPLES
+Add at least one example for each major functionality of the command.
+
+```
+rpmcmd --do-this package-1.0-1.noarch.rpm
+```
+
+# SEE ALSO

Oh, I didn't realize you meant adding `FILES` and putting "see rpm(8)" *in 
there* :smile: That's indeed unnecessary, `SEE ALSO` is good enough for that, 
especially once we have the `rpm-config` split as you mentioned.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984760773
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists
+- Do not emphasize separators like ",", "=", "[]", "|"
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS

Part of the problem here is the ambiguity between a template and a guideline 
doc. And, I'm not entirely convinced how this all should be presented, really. 
The overall issue is that we have these subcommand like modes in pretty much 
all our commands, and that just doesn't fit the general man-page format that 
well. :thinking: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984763411
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +*rpmcmd* [options] [_ARGUMENT_] ...
+
+# DESCRIPTION
+Describe what *rpmcmd* command does in detail.
+
+Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists

Yep, and I did mean `--compress=method` in the option's description. But then 
again, it's easier to directly list the possible values at this level, I guess.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984766250
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +Typographic conventions:
+- Put option aliases on separate lines
+- Put option arguments with pre-determined values into <> (see below)
+
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>

... and it's actually even better with the `<` and `>` after all, since it 
indicates that it's still a multi-choice list (like you mentioned in the other 
comments).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984930223
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen

You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/3639

-- Commit Summary --

  * Add a template man page with style guidance

-- File Changes --

M docs/README.md (3)
A docs/man/rpm-man-template.scd (70)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/3639.patch
https://github.com/rpm-software-management/rpm/pull/3639.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai pushed 1 commit.

9e21491d635ee69431dc9415efa55ef0543214a0  fixup! Add a template man page with 
style guidance

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639/files/7566c337c899e816ec912ba8df59cf32ecb82ee5..9e21491d635ee69431dc9415efa55ef0543214a0
You are receiving this because you are subscribed to this thread.

Message ID: 

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +*rpmcmd* [options] [_ARGUMENT_] ...
+
+# DESCRIPTION
+Describe what *rpmcmd* command does in detail.
+
+Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists

Or just `--compress=method` since that's what we've settled on for placeholders 
in SYNOPSIS :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984905911
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +*rpmcmd* [options] [_ARGUMENT_] ...
+
+# DESCRIPTION
+Describe what *rpmcmd* command does in detail.
+
+Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists

And yeah, with options that take an actual list of arguments (as opposed to a 
fixed handful of values), using a placeholder would be preferred.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984906809
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +# OPTIONS
+Describe common options and in this section.
+
+Typographic conventions:
+- Put option aliases on separate lines
+
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* <_ARG_>,
+*--output*=<_ARG_>
+   Use file _ARG_ for output.
+
+*--compress*=<*gzip*|*zstd*>
+   Use of *gzip* and *zstd* to compress.

I'd maybe replace "and" with "or" here, otherwise it reads like "use both" 
:smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#pullrequestreview-2666766315
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm is unable to find existing group (>= 4.19.x regression) (Issue #3594)

2025-03-07 Thread Florian Festi
Closed #3594 as completed via 75de02219100f381a84769d74eb58985975d49c5.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3594#event-16631891548
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Is %clean obsolete in a --build-in-place world? (Discussion #3644)

2025-03-07 Thread Daan De Meyer
So the docs mention that %clean is obsolete because all outputs should be 
placed with %builddir. But when --build-in-place is used, %builddir is the 
source directory, which we don't want to pollute, so is it still valid to use 
%clean for that use case?

Also, assuming the above is correct, how should cleanup of files generated by 
rpm's own macros be handled? For example, `%__debug_install_post` writes 
debugsourcefiles.list among other files to %builddir, but whose responsibility 
is it to clean that file up? Should every spec add it to their %clean 
implementation if they support --build-in-place, or can this cleanup be handled 
within rpm somehow?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/3644
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists
+- Do not emphasize separators like ",", "=", "[]", "|"
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS

Ack. In that case, I wonder if this should be made clear in the template. The 
thing is, it's a *template* alright, so it's meant to contain the skeleton for 
writing an actual man page but then, it does contain placeholder content too, 
obviously, and that's sometimes not that obvious :sweat_smile: But I guess 
let's just leave it like this.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984740155
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
dmnks left a comment (rpm-software-management/rpm#3639)

> Perhaps I should try to convert one of the existing, shorter manuals to 
> follow some of the new rules in here to see how it'd look like...

Yep, that would be useful indeed as I'm sure we'd find various little things 
here and there that doesn't come to mind right now. But we can also just merge 
this now and update the template as needed later.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#issuecomment-2705972611
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
dmnks left a comment (rpm-software-management/rpm#3639)

Oh, one more thing I realized when falling asleep last night :smile: is that 
the template should also include an example for tables (which is something we 
tend to use quite often).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#issuecomment-2705974705
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists
+- Do not emphasize separators like ",", "=", "[]", "|"
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS

Hmm, otoh maybe the MODE in the titles is just reduntant, it "breaks" the link 
between these descriptions and the section name:
```
*rpm* {*-q*|*--query*} [select-options] [query-options] [_PACKAGE_FILE_ ...] 
[_PACKAGE_NAME_ ...]
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984941368
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +*rpmcmd* [options] [_ARGUMENT_] ...
+
+# DESCRIPTION
+Describe what *rpmcmd* command does in detail.
+
+Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists

Oh yup, the synopsis should have something like --compress=method and the 
 list only in the detailed description of that option.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984751638
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +*rpmcmd* [options] [_ARGUMENT_] ...
+
+# DESCRIPTION
+Describe what *rpmcmd* command does in detail.
+
+Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists

Oh right, now it makes sense, it's meant for option *arguments*, thanks for 
clarifying that :smile: 

So yep, the `` syntax does indeed feel natural and is somewhat 
familiar. But I'm not sure it makes sense to use with non-choice options since 
option arguments are always mandatory by definition (unless we supported 
something like `--compress` as well as `--compress=zstd`). And as for making 
option args distinct, we already do, by using underline.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984727049
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +*rpmcmd* [options] [_ARGUMENT_] ...
+
+# DESCRIPTION
+Describe what *rpmcmd* command does in detail.
+
+Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists

I guess it depends on how many methods there are. Thinking about it now, 
listing more than a handful this would suck :sweat_smile: 

There's the question of how to indicating this style of option argument over 
generic free-form option arguments. Maybe the `<>` would work for this - you'd 
have either
`--compress=<_method_>` with the variants listed below, or 
`--compress=<*m1*|*m2*|...>`
and regular user arguments would then be like they are now, `--output=_FILE_`

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984784571
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +*rpmcmd* [options] [_ARGUMENT_] ...
+
+# DESCRIPTION
+Describe what *rpmcmd* command does in detail.
+
+Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists

I pushed the above idea as a another fixup, it seem pretty nice for this. And 
it gave me that second bullet for the option conventions list :laughing: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984829625
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +*rpmcmd* [options] [_ARGUMENT_] ...
+
+# DESCRIPTION
+Describe what *rpmcmd* command does in detail.
+
+Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists

Oh scratch that - the synopsis shouldn't have such details, it's just [options] 
there. The <> kind of detail belongs in the detailed description.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984753766
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai pushed 1 commit.

80fd134a7369a915427425cc0729bd256b59fab3  fixup! Add a template man page with 
style guidance

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639/files/367e3dfbdfde9c8d59f59507a33c7b1522ea457f..80fd134a7369a915427425cc0729bd256b59fab3
You are receiving this because you are subscribed to this thread.

Message ID: 

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] RFE: support the common macro manipulation options in rpmuncompress (Issue #3646)

2025-03-07 Thread Panu Matilainen
pmatilai created an issue (rpm-software-management/rpm#3646)

rpmuncompress relies heavily on macros, so it should have all the normal 
--define/--macros etc flags available.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3646
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] RFE: add an API for exporting current macro context to a macro file (Issue #3645)

2025-03-07 Thread Panu Matilainen
pmatilai created an issue (rpm-software-management/rpm#3645)

We should have a way to export our macro context state. There's already 
rpmDumpMacroTable() but the format it produces is not readable as a macro file, 
so we need a different function for that. It'll need to weed out at least 
builtins, maybe something else too so a "flags" argument seems in order. 
Something like

```
int rpmExportMacros(rpmMacroContext mc, int flags, FILE *fp);
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3645
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +- Put option aliases on separate lines
+- Put option arguments with pre-determined values into <> (see below)
+
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>
+   Use specified compression, where __method_> is one of the following

Typo (double `__`)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#pullrequestreview-2667022065
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists
+- Do not emphasize separators like ",", "=", "[]", "|"
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS

Poked around this and realized rpm(8) and rpmbuild(8) at least already follow a 
relatively neat pattern here. We don't need to reinvent the wheel, maybe just 
fine-tune a bit. The following assumes operational modes, where that's not the 
case it's all simple anyhow and dont need these subsections:

The `DESCRIPTION` gives an overall description of what the command does and 
deals with, and lists the available modes. (this is already the case)

The `# OPTIONS` section lists options that are common between two or more 
modes, using subsections if needed. And then we have `# FOO MODE OPTIONS` to 
separate from the more generic ones. For example the main rpm(8) page would 
have:

```
# OPTIONS
## General options
...
## Select options

# INSTALL AND UPGRADE MODE OPTIONS
Describe the install mode invocation syntax and operation
- describe
- all 
- the
- install
- options

# QUERY MODE OPTIONS
Describe the query mode operation and invocation
- describe
- all 
- the
- query
- options
...

That's quite close to what we already have, the main difference is grouping the 
non-mode options under the same OPTIONS umbrella and talking about MODE OPTIONS 
for the rest. Thoughts?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984935858
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai pushed 1 commit.

e70a17b27dc6311d86249d7860a133cb5eb761e7  Add a template man page with style 
guidance

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639/files/ce5662e7a56b64da0f7221619a19517ecbc8f9a8..e70a17b27dc6311d86249d7860a133cb5eb761e7
You are receiving this because you are subscribed to this thread.

Message ID: 

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +*rpmcmd* [options] [_ARGUMENT_] ...
+
+# DESCRIPTION
+Describe what *rpmcmd* command does in detail.
+
+Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists

Oh, yup. That's a good point (it's still a pre-determined list, just not 
specified directly here). I'm fine with that :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984926571
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists
+- Do not emphasize separators like ",", "=", "[]", "|"
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS

Likewise :laughing:

The extra nesting level removed is what we have now. And it seems somehow wrong 
that the main modes and these other selectors are listed on the same level. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984951510
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists
+- Do not emphasize separators like ",", "=", "[]", "|"
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS

I also think that there should be a section named just OPTIONS for some reason, 
so dunno.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984948117
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists
+- Do not emphasize separators like ",", "=", "[]", "|"
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS

Indeed, that makes the most sense, +1.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984945078
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Check architecture before building (PR #3647)

2025-03-07 Thread Florian Festi
fd32a43 moved the architecture check after building. This decision needs to me 
made beforehand to not build on unsupported architectures. 1296ea9 also made it 
impossible to change the supported / excluded architectures later.

Move this particular check back and add a test case using ExclusiveArch

Resolves: #3569
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/3647

-- Commit Summary --

  * Check architecture before building

-- File Changes --

M build/parsePreamble.cc (5)
M build/parseSpec.cc (5)
A tests/data/SPECS/test-exclusivearch.spec (24)
M tests/rpmbuild.at (13)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/3647.patch
https://github.com/rpm-software-management/rpm/pull/3647.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3647
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists
+- Do not emphasize separators like ",", "=", "[]", "|"
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS

I'm also thinking that the we should somehow separate by *mode* at the top 
level, e.g:

```
# INSTALL MODE
...
# QUERY MODE
...
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984957026
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists
+- Do not emphasize separators like ",", "=", "[]", "|"
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS

One possible improvement (or not): Remove the extra nesting level, i.e:

```
# GENERAL OPTIONS
- list
- common
- options

# SELECT OPTIONS
- list
- selection
- options

# INSTALL AND UPGRADE MODE OPTIONS
Describe the install mode invocation syntax and operation
- describe
- all 
- the
- install
- options

# QUERY MODE OPTIONS
Describe the query mode operation and invocation
- describe
- all 
- the
- query
- options
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984947044
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists
+- Do not emphasize separators like ",", "=", "[]", "|"
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS

> Hmm, otoh maybe the MODE in the titles is just reduntant, it "breaks" the 
> link between these descriptions and the section name:
> 
> ```
> *rpm* {*-q*|*--query*} [select-options] [query-options] [_PACKAGE_FILE_ ...] 
> [_PACKAGE_NAME_ ...]
> ```

Oh, I missed this comment. It partially explains why not use "mode", okay then 
:smile: Yep, I kinda agree, although I'm still not sure if calling modes as 
"options" is the best idea...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984958488
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists
+- Do not emphasize separators like ",", "=", "[]", "|"
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS

Argh, nevermind. I misunderstood your point :sweat_smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984960715
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists
+- Do not emphasize separators like ",", "=", "[]", "|"
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS

i.e. we still want to have a section for each mode's *options*, of course.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984961490
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists
+- Do not emphasize separators like ",", "=", "[]", "|"
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS

Technically, on popt level, they are options of course, but that's more of an 
implementation detail it seems.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984959182
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>
+   Use specified compression, where __method_> is one of the following
+   (when there are too many to list directly in the option)
+   - bzip2

I think these should also show how the individual options are to be described, 
i.e. whether it's separate paragraphs or a list, something like:

```
- *bzip2*: blah blah
- *gzip*: blah blah
...
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#pullrequestreview-2667260278
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Use stderr for %dump (PR #3648)

2025-03-07 Thread Florian Festi
439a601439 dropped the code using stderr if no file descriptor is passed. The 
%dump macro code doesn't pass a file descriptor ever. This led to a 
segfault.

Omit test case as it spits out a long list of macros that are susceptible the 
change.

Resolves: #3588
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/3648

-- Commit Summary --

  * Use stderr for %dump

-- File Changes --

M rpmio/macro.cc (1)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/3648.patch
https://github.com/rpm-software-management/rpm/pull/3648.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3648
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>
+   Use specified compression, where <_method_> is one of the following
+   (when there are too many to list directly in the option)
+   - *bzip2*: bzip2 compression

Maybe such a multi-line example should still be included here, though.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1985112687
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>
+   Use specified compression, where <_method_> is one of the following
+   (when there are too many to list directly in the option)
+   - *bzip2*: bzip2 compression

Like this:

```
   •   xz: xz compression
   •   zstd: zstd compression blah blah blah blah blah blah  blah  blah
   blah blah blah
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1985113331
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>
+   Use specified compression, where <_method_> is one of the following
+   (when there are too many to list directly in the option)
+   - *bzip2*: bzip2 compression

Yeah scdoc handles this just fine, the indentation is kept on the bullet level

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1985112300
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix buildsys specific %prep section not accepted (PR #3636)

2025-03-07 Thread Michal Domonkos
@dmnks approved this pull request.





-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3636#pullrequestreview-2664700619
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>
+   Use specified compression, where <_method_> is one of the following
+   (when there are too many to list directly in the option)
+   - *bzip2*: bzip2 compression

This is better but I still wonder: What if you need to write a couple of 
paragraphs to describe the argument? If so, the formatting breaks as soon as 
the line exceeds the terminal width...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#pullrequestreview-2667335681
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>
+   Use specified compression, where <_method_> is one of the following
+   (when there are too many to list directly in the option)
+   - *bzip2*: bzip2 compression

Oh, this is precisely described in scdoc(5) actually:

```
You  may  also  extend long entries onto another line by giving it the same 
indent level, plus two spaces. They will be rendered as a single list entry.

   - Item 1 is pretty long so let's
 break it up onto two lines
   - Item 2 is shorter
- But its children can go on
  for a while
```

So that seems like the way to handle this.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1985109666
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Florian Festi
@ffesti commented on this pull request.



> +Typographic conventions:
+- Put option aliases on separate lines
+- Put option arguments with pre-determined values into <> (see below)
+
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>

Shouldn't the options be bold as they are fixed names? So `- *bzip2*`?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1985059424
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai pushed 1 commit.

99ff2eea1891de5ca5494fc315054992feac3b14  fixup! Add a template man page with 
style guidance

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639/files/3c20aa58de9a0aa9d319fecf7b5d5eee05353884..99ff2eea1891de5ca5494fc315054992feac3b14
You are receiving this because you are subscribed to this thread.

Message ID: 

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Use files instead of redirects in test case (PR #3649)

2025-03-07 Thread Florian Festi
This is more readable and more reliable in the context of the test suite.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/3649

-- Commit Summary --

  * Use files instead of redirects in test case

-- File Changes --

M tests/rpmbuild.at (10)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/3649.patch
https://github.com/rpm-software-management/rpm/pull/3649.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3649
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +- Put the short variant first when listing option aliases
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Do not emphasize separators like ",", "=", "[]", "<>", "|" etc
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS
+Describe common options and in this section.
+
+Typographic conventions:
+- Put option aliases on separate lines
+- Put option arguments with pre-determined values into <> (see below)
+
+*-d*

Yup. So many details, but by deity our own examples should be right, these are 
nits that *should* be picked to th bone :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1985174214
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Use files instead of redirects in test case (PR #3649)

2025-03-07 Thread Panu Matilainen
Merged #3649 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3649#event-16633627455
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Use files instead of redirects in test case (PR #3649)

2025-03-07 Thread Panu Matilainen
pmatilai left a comment (rpm-software-management/rpm#3649)

Thanks for the quick fix.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3649#issuecomment-2706634225
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +*rpmcmd* [options] [_ARGUMENT_] ...
+
+# DESCRIPTION
+Describe what *rpmcmd* command does in detail.
+
+Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists

I turned it into this now for now and updated the examples:
- Put mandatory elements into <>
- Put optional elements into [] brackets

Obviously that's not what our man pages do now, so they'd need to be converted 
(what a fun friday job :laughing: ) if we went with this. Note *if*, this is 
certainly up to discussion. It does seem like "the clear and correct" way to do 
it, but it's also a fair bit of work...



-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984569752
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
pmatilai left a comment (rpm-software-management/rpm#3639)

Perhaps I should try to convert one of the existing, shorter manuals to follow 
some of the new rules in here to see how it'd look like...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#issuecomment-2705716121
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +Put options common to more than one mode into a subsection of its own.
+
+# ENVIRONMENT
+Describe environment variables affecting program execution.
+
+# EXIT STATUS
+Describe exit codes of the command.
+
+# EXAMPLES
+Add at least one example for each major functionality of the command.
+
+```
+rpmcmd --do-this package-1.0-1.noarch.rpm
+```
+
+# SEE ALSO

Yup. The thing is, I don't think we have any commands that have files that are 
specific to individual commands. Well okay, rpmsign classifies. But dunno if 
the "see rpm(8)" makes sense at this point, when its likely repeated in the see 
also-section.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984749327
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +Put options common to more than one mode into a subsection of its own.
+
+# ENVIRONMENT
+Describe environment variables affecting program execution.
+
+# EXIT STATUS
+Describe exit codes of the command.
+
+# EXAMPLES
+Add at least one example for each major functionality of the command.
+
+```
+rpmcmd --do-this package-1.0-1.noarch.rpm
+```
+
+# SEE ALSO

Probably yeah, but I kinda intentionally left it out because for most rpm 
commands it'd be repeating the huge rpmrc + macro configuration section from 
rpm(8). I see at least rpmbuild FILES section just referring to "See rpm(8)" 
but that's not terribly helpful. Maybe we should split that stuff into 
rpm-config(7) so it can be easily referenced from anywhere?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984489499
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai pushed 1 commit.

7566c337c899e816ec912ba8df59cf32ecb82ee5  fixup! Add a template man page with 
style guidance

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639/files/80fd134a7369a915427425cc0729bd256b59fab3..7566c337c899e816ec912ba8df59cf32ecb82ee5
You are receiving this because you are subscribed to this thread.

Message ID: 

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +Typographic conventions:
+- Put option aliases on separate lines
+- Put option arguments with pre-determined values into <> (see below)
+
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>

Yup, the for `<>` is really to disambiguate from all the other forms, and to be 
consistent in both the above variants.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984947695
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai pushed 1 commit.

19c73e4f3029c2ae560d65ae8a47886ee3ae5e4a  fixup! Move most rpm command man 
pages to section 1

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639/files/9e21491d635ee69431dc9415efa55ef0543214a0..19c73e4f3029c2ae560d65ae8a47886ee3ae5e4a
You are receiving this because you are subscribed to this thread.

Message ID: 

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>
+   Use specified compression, where __method_> is one of the following
+   (when there are too many to list directly in the option)
+   - bzip2

But I agree, it should include sample descriptions.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1985088171
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm is unable to find existing group (>= 4.19.x regression) (Issue #3594)

2025-03-07 Thread Florian Festi
Closed #3594 as completed via #3641.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3594#event-16631891521
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +Typographic conventions:
+- Put option aliases on separate lines
+- Put option arguments with pre-determined values into <> (see below)
+
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>

Indeed. I think I had then in bold in some local variant while experimenting 
with other forms, but lost in translation. Thanks for spotting.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1985085442
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>
+   Use specified compression, where __method_> is one of the following
+   (when there are too many to list directly in the option)
+   - bzip2

Yeah I originally tried to do a table here as an example here, but the 
descriptions were just too dull to live:
- *bzip* | bzip compression
- *gzip* | gzip compression

etc :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1985087166
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>
+   Use specified compression, where __method_> is one of the following
+   (when there are too many to list directly in the option)
+   - bzip2

Added.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1985098758
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai pushed 1 commit.

3c20aa58de9a0aa9d319fecf7b5d5eee05353884  fixup! Add a template man page with 
style guidance

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639/files/19c73e4f3029c2ae560d65ae8a47886ee3ae5e4a..3c20aa58de9a0aa9d319fecf7b5d5eee05353884
You are receiving this because you are subscribed to this thread.

Message ID: 

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +- Put option aliases on separate lines
+- Put option arguments with pre-determined values into <> (see below)
+
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>
+   Use specified compression, where __method_> is one of the following

Fixed now.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1985099154
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Architecture applicability check performed very late by rpm 4.20.0 (Issue #3569)

2025-03-07 Thread Panu Matilainen
Closed #3569 as completed via b3398aed94adedbf698a509ca05e386e531da6ff.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3569#event-16632953369
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Check architecture before building (PR #3647)

2025-03-07 Thread Panu Matilainen
Merged #3647 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3647#event-16632953086
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Architecture applicability check performed very late by rpm 4.20.0 (Issue #3569)

2025-03-07 Thread Panu Matilainen
Closed #3569 as completed via #3647.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3569#event-16632953327
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +*rpmcmd* [options] [_ARGUMENT_] ...
+
+# DESCRIPTION
+Describe what *rpmcmd* command does in detail.
+
+Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists

> The --compress=method form may give the impression that "method" is a 
> verbatim value... argh 

Yep, this is why I think the `` notation is useful - for pre-determined 
option arguments specifically.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984919181
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +Typographic conventions:
+- Put option aliases on separate lines
+- Put option arguments with pre-determined values into <> (see below)
+
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>

Hmm, and how about:
`*--compress*=_method_`

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#pullrequestreview-2667021299
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +Typographic conventions:
+- Put option aliases on separate lines
+- Put option arguments with pre-determined values into <> (see below)
+
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>

Anyway, that's already bike shedding I guess :smile: Not that important, 
really. This works too.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984924010
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai pushed 1 commit.

ce5662e7a56b64da0f7221619a19517ecbc8f9a8  fixup! Add a template man page with 
style guidance

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639/files/99ff2eea1891de5ca5494fc315054992feac3b14..ce5662e7a56b64da0f7221619a19517ecbc8f9a8
You are receiving this because you are subscribed to this thread.

Message ID: 

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +- Put the short variant first when listing option aliases
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Do not emphasize separators like ",", "=", "[]", "<>", "|" etc
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS
+Describe common options and in this section.
+
+Typographic conventions:
+- Put option aliases on separate lines
+- Put option arguments with pre-determined values into <> (see below)
+
+*-d*

Oh, this is missing a comma after `-d` :smile: Got lost in all the noise.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#pullrequestreview-2667385548
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +Put options common to more than one mode into a subsection of its own.
+
+# ENVIRONMENT
+Describe environment variables affecting program execution.
+
+# EXIT STATUS
+Describe exit codes of the command.
+
+# EXAMPLES
+Add at least one example for each major functionality of the command.
+
+```
+rpmcmd --do-this package-1.0-1.noarch.rpm
+```
+
+# SEE ALSO

Indeed. And as for `FILES`, this would be only meant for file stuff that's 
specific to the command, not the general rpm config (even if the program does 
load it behind the scenes). But not sure either.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984743066
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix empty password field in passwd/group causing entry to be ignored (PR #3641)

2025-03-07 Thread Florian Festi
Merged #3641 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3641#event-16631891314
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Panu Matilainen
@pmatilai commented on this pull request.



> +
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>
+   Use specified compression, where <_method_> is one of the following
+   (when there are too many to list directly in the option)
+   - *bzip2*: bzip2 compression

Multiline example added

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1985116761
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +
+*-d*
+*--do-this*
+   Do Y instead of default action.
+
+*-o* _ARG_,
+*--output*=_ARG_
+   Use file _ARG_ for output.
+
+*--format*=<*aa*|*bb*>
+   Use format *aa* or *bb* for output.
+
+*--compress*=<_method_>
+   Use specified compression, where <_method_> is one of the following
+   (when there are too many to list directly in the option)
+   - *bzip2*: bzip2 compression

(Amusingly, copy&pasting the man page text here breaks the formatting :smile:)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1985110663
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] rpmuncompress vs --define __tar

2025-03-07 Thread Jean Delvare
Hi Panu,

On Fri, 7 Mar 2025 08:45:20 +0200, Panu Matilainen wrote:
> On 3/7/25 8:41 AM, Panu Matilainen wrote:
> > On Thu, Mar 06, 2025 at 01:16:05PM +0100, Jean Delvare wrote:  
> >> This comes as a surprise to me, I would expect my __tar definition to
> >> be honored by rpmuncompress the same way it was honored before that
> >> helper binary was introduced. Is this a bug?  
> > 
> > I can certainly see how that change breaks this kind of usage, but is 
> > this kind of usage supported to begin with? I don't know.

Why not? rpmuncompress is an implementation detail, the end user
shouldn't be affected by that. So any macro which makes sense to
rpmbuild (and I would argue that %__tar, %__patch, %__unzip and the like
do qualify) should also be honored by rpmuncompress.

> > Fixing it would be tricky anyhow, we have no way to pass the entire 
> > macro context to another program. And that's what we'd need to do - it's 
> > not enough to pass just the macros rpmuncompress directly references, 
> > because those macros could rely on something else defined this way.  
> 
> And as it always happens, right after hitting send...
> 
> We could solve this by adding an export function for the macro context. 
> Then rpmbuild could dump the entire macro context into a temporary macro 
> file and pass that as --macros=/tmp/ to all the relevant commands, 
> including at least rpmuncompress.

Sounds like a great idea. Considering that rpmuncompress makes explicit
use of rpm macros, I would definitely expect it to inherit the macro
context from its parent (rpmbuild), so that it resolves macros to the
same values rpmbuild itself would.

Thanks,
-- 
Jean Delvare
SUSE L3 Support
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] rpmuncompress vs --define __tar

2025-03-07 Thread Jean Delvare
Hi Michael,

On Thu, 6 Mar 2025 16:16:37 +0100, Michael Schroeder wrote:
> On Thu, Mar 06, 2025 at 01:16:05PM +0100, Jean Delvare wrote:
> > This comes as a surprise to me, I would expect my __tar definition to
> > be honored by rpmuncompress the same way it was honored before that
> > helper binary was introduced. Is this a bug?
> > (...)
> 
> A somewhat related question would be: Should rpmuncompress support a
> "--define" option?

I'm not sure. Depends on the purpose of rpmuncompress.

If it is supposed to be a general purpose, standalone binary (and the
description of the commit introducing this helper binary suggests this
was the intention), then indeed a --define option would be welcome, so
that the user can change the definition of %__tar and all other macros
used by rpmuncompress.

OTOH, rpmuncompress is currently installed under /usr/lib/rpm, NOT
/usr/bin. This would typically indicate an internal helper with no
guarantee that the users can use it directly for their own purpose. In
that case, you normally only implement the command line options that
are needed internally, so it would only make sense to implement a
--define option if rpmbuild needs it.

But well that's only my 2 cents as a random user, I'm not involved in
rpm development in any way.

-- 
Jean Delvare
SUSE L3 Support
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] rpmuncompress idea of macros can differ from that of rpmbuild (Issue #3643)

2025-03-07 Thread Panu Matilainen
pmatilai created an issue (rpm-software-management/rpm#3643)

rpm >= 4.18 uses an external rpmuncompress to handle source decompression and 
unpacking during build. It was split out of the internal %setup pseudo-macro to 
allow direct use in specs, but this causes an issue that we didn't consider at 
the time: rpmuncompress relies on macros to do its business, and since it runs 
as a new executable, it doesn't inherit the macro context from rpmbuild. So, if 
you override eg `%__tar` from rpmbuild command line to an alternative path, 
rpmuncompress will still use the system default. Similarly, if a platform macro 
were to speficy some alternate locations for tools, rpmuncompress would not see 
them because it only knows how to load the default macro set.

Originally reported on rpm-maint by Jean Delvare:  
https://lists.rpm.org/pipermail/rpm-maint/2025-March/031464.html

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3643
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] rpmuncompress vs --define __tar

2025-03-07 Thread Panu Matilainen

On 3/7/25 10:54 AM, Jean Delvare wrote:

Hi Panu,

On Fri, 7 Mar 2025 08:45:20 +0200, Panu Matilainen wrote:

On 3/7/25 8:41 AM, Panu Matilainen wrote:

On Thu, Mar 06, 2025 at 01:16:05PM +0100, Jean Delvare wrote:

This comes as a surprise to me, I would expect my __tar definition to
be honored by rpmuncompress the same way it was honored before that
helper binary was introduced. Is this a bug?


I can certainly see how that change breaks this kind of usage, but is
this kind of usage supported to begin with? I don't know.


Why not? rpmuncompress is an implementation detail, the end user
shouldn't be affected by that. So any macro which makes sense to
rpmbuild (and I would argue that %__tar, %__patch, %__unzip and the like
do qualify) should also be honored by rpmuncompress.


I meant the degree of which overriding arbitrary bits and pieces from 
the command line is supported to begin with. Obviously *some*, otherwise 
the option shouldn't be there at all. But also, somewhere in there 
exists a line where we would have to say "not supported" even though a 
thing happens to be exposed as a macro you technically can override from 
the cli, because all manner of weird internals are exposed that way. The 
command helper paths certainly seem on the "innocent" side of it all, 
but they are also an "implementation detail".


It's basically just a question I need to ask myself whenever these kind 
of things come up.



Fixing it would be tricky anyhow, we have no way to pass the entire
macro context to another program. And that's what we'd need to do - it's
not enough to pass just the macros rpmuncompress directly references,
because those macros could rely on something else defined this way.


And as it always happens, right after hitting send...

We could solve this by adding an export function for the macro context.
Then rpmbuild could dump the entire macro context into a temporary macro
file and pass that as --macros=/tmp/ to all the relevant commands,
including at least rpmuncompress.


Sounds like a great idea. Considering that rpmuncompress makes explicit
use of rpm macros, I would definitely expect it to inherit the macro
context from its parent (rpmbuild), so that it resolves macros to the
same values rpmbuild itself would.


Yeah, there is a correctness issue there, whether it's a command line 
override or not. Actually, just passing a custom --macros to rpmbuild 
will have the same effect.


Created a ticket for this now: 
https://github.com/rpm-software-management/rpm/issues/3643


Thanks for reporting!

- Panu -



Thanks,


___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +*rpmcmd* [options] [_ARGUMENT_] ...
+
+# DESCRIPTION
+Describe what *rpmcmd* command does in detail.
+
+Put distinct operational modes to their own subsections.
+
+Typographic conventions:
+- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists

It seems like the common way to avoid listing all available choices is to use a 
placeholder, much like the one in SYNOPSIS for general options, e.g. 
`--compress=method` and then list the supported values for `method`.

That said, I do like listing the options with `<` and `>` directly (unless 
there's a lot of them), too :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984735627
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add a template man page with style guidance (PR #3639)

2025-03-07 Thread Michal Domonkos
@dmnks commented on this pull request.



> +- Use bold for literal values such as command name and options:
+*cmd* does X, with option *--do-this* does Y instead
+- Use underline uppercase to denote user arguments: _ARGUMENT_
+- Use underline for literal file names: _hello-1.0-1.noarch.rpm_
+- Put an empty line before a new section/option/etc
+- Put text immediately below a section/option/etc (ie without an empty line)
+- Put optional elements into [] brackets
+- Put one-of-many choices into  lists
+- Do not emphasize separators like ",", "=", "[]", "|"
+
+When in doubt, consult *man-pages*(7).
+
+# OPTIONS
+Describe common options and in this section.
+
+Typographic conventions:

> Dupes removed. I ended up putting the "put short variant first" in the 
> general section because we actually want that consitency everywhere, eg `rpm 
> {-i|--install} ...` too.

+1, the unwritten rule in most man pages I've seen is "short variant first", 
indeed.

> The single bullet in this list does seem a bit lonely, but I keep expecting 
> more option-spefic material to come up so left it there for now.

Yep :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3639#discussion_r1984732828
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpmsign --delsign / --addsign regression can corrupt packages in rpm >= 4.18.1 (Issue #3469)

2025-03-07 Thread Dominic Delabruere
ddelabru left a comment (rpm-software-management/rpm#3469)

> The root cause is RH signing server placing file signatures outside the 
> immutable region of the signature header

The signing server produces raw IMA file signatures. Release engineers then 
insert these signatures into the RPM header on the client end, most likely 
using the [rpm-head-signing](https://github.com/fedora-iot/rpm-head-signing) 
Python package.

I am trying to pinpoint the source of this incorrect behavior in 
rpm-head-signing. My understanding of the header structure is somewhat limited, 
but this is what I have been able to glean so far: rpm-head-signing calls rpm's 
`headerPut()` function via a C extension to perform the actual header signature 
and IMA signature insertion; for header signatures it applies the 
`HEADERPUT_DEFAULT` flag, but for IMA file signatures it uses 
`HEADERPUT_APPEND` instead. My understanding of the `headerPut()` function from 
a cursory reading of its implementation is that when the `HEADERPUT_APPEND` 
flag is passed, it should append to an existing tag of the same tag number, 
within its existing region, if that tag is already present in the header. I 
think this in itself is correct behavior for inserting the IMA signatures, but 
I am looking for clues in the surrounding header-manipulation code of 
`rpm-head-signing` to pinpoint what is causing these tags to be written outside 
the immutable region.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3469#issuecomment-2706997817
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint