Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document ways to declare sources and patches #3405

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions docs/manual/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,26 @@ Short (< 70 characters) summary of the package.

Used to declare source(s) used to build the package. All sources will
will be packaged into source rpms.
Arbitrary number of sources may be declared, for example:
Arbitrary number of sources may be declared. A numbered source is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep the numbered syntax as the recommended, happy-path style here, and only mention the fact that unnumbered declarations are also possible in a separate paragraph below the examples.

I also don't like mixing the numbered and unnumbered styles in the examples. It makes the syntax look more complicated than it really is.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, because the unnumbered declarations are less intuitive, since the macros created to reference the sources are always numbered.

indexed by the given integer, while an unnumbered source is indexed by
the next available integer.
For example, these sources:

```
Source0: mysoft-1.0.tar.gz
Source1: mysoft-data-1.0.zip
Source: mysoft-1.0.tar.gz
Source02: mysoft-data-1.0.zip
Source: next.txt
Source05: five.txt
```

get indices 0, 2, 3, and 5. For clarity, mixing numbered and unnumbered
sources in one specfile is not recommended.

#### Patch

Used to declare patches applied on top of sources. All patches declared
will be packaged into source rpms.
will be packaged into source rpms. Just like sources, patches can be
numbered or unnumbered and are indexed in the same way.

#### Icon

Expand Down Expand Up @@ -472,6 +481,18 @@ software).

### Sub-sections

#### `%sourcelist`

List of sources, one per row. Handled like unnumbered Source tags. For
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use "line" instead of "row" here, just to be consistent with the rest of the file.

clarity, mixing Source tags and `%sourcelist` in one specfile is not
recommended.

#### `%patchlist`

List of patches, one per row. Handled like unnumbered Patch tags. For
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

clarity, mixing Patch tags and `%patchlist` in one specfile is not
recommended.

#### `%package [-n]<name>`

`%package <name>` starts a preamble section for a new sub-package.
Expand Down
Loading