Skip to content

Commit 74985f7

Browse files
authored
chore: Add rpmspec formatting to preambles (#246)
1 parent c024b2b commit 74985f7

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

pages/terra/SRPM.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Callout } from "nextra/components";
99

1010
We provide SPRM macros to ease packaging and better integrate into our workflow. Please use these macros when possible when contributing to Terra.
1111

12-
These are provided in the `anda-srpm-macros` package. If you use them, make sure to add `anda-srpm-macros` as a `BuildRequires:` in the spec file.
12+
These are provided in the `anda-srpm-macros` package. If you use them, make sure to add `anda-srpm-macros` as a `BuildRequires:{:rpmspec}` in the spec file.
1313

1414
You may need to refer to the [miscellaneous packaging guidelines](./policy#miscellaneous-packaging-guidelines) for non-macro related Terra guidelines.
1515

@@ -222,7 +222,7 @@ OR:
222222
The above would create a `LICENSE.modules` file which can then be packaged using `%license LICENSE.modules`.
223223

224224
#### %npm_license_summary
225-
Outputs a summary of the bundled licenses. Useful for determining what to put in the `License:` section for Node modules.
225+
Outputs a summary of the bundled licenses. Useful for determining what to put in the `License:{:rpmspec}` section for Node modules.
226226

227227
Expands to: `%{__npm_license_checker} --summary`
228228

@@ -453,7 +453,7 @@ These macros assist with the general packaging of applications that use [Electro
453453
### %electronmeta
454454
Set up all basic requirements including build macros for building an Electron app.
455455

456-
Does <u>not</u> install the JavaScript package managers used for builds (e.g., `nodejs-npm`, `bun`, `pnpm`, `yarnpkg`, `yarnpkg-berry`). These must still be specified in the `BuildRequires:` manually.
456+
Does <u>not</u> install the JavaScript package managers used for builds (e.g., `nodejs-npm`, `bun`, `pnpm`, `yarnpkg`, `yarnpkg-berry`). These must still be specified in the `BuildRequires:{:rpmspec}` manually.
457457

458458
Available flags:
459459
- `-a` will pull in additional build dependencies often needed particularly when building with NPM.
@@ -474,19 +474,19 @@ Rundown of what all `%electronmeta` does:
474474
- Defines `%__requires_excludes` based on architecture to prevent Electron projects' cross-platform builds from causing false dependency positives from RPM.
475475
- Sets `%debug_package` to `%{nil}` to prevent stripping of bundled libraries and/or build failures due to not enough data to strip.
476476
- Sets the build and runtime dependencies.
477-
- Sets the `ExclusiveArch` field to only the architectures Electron supports.
477+
- Sets the `ExclusiveArch:{:rpmspec}` field to only the architectures Electron supports.
478478
- Defines a `%bcond` for whether or not Electron is bundled for other macros.
479479
- Defines the bundled dependencies as bundled. NOTE: This only defines Electron's bundled dependencies, not any Node modules the app may also bundle.
480480

481481
This ensures packagers do not need to manually set these for every Electron app's spec, hopefully eliminating depsolver problems and helping reduce common build issues.
482482

483483
Like other meta macros (e.g., `%forgemeta` from Fedora), you MUST be mindful of where in the spec this macro should be placed.
484-
- MUST always come after `Name:` is defined and before the `%prep` section.
485-
- SHOULD come before the `License:` field if using [`%{electron_license}`](#electron_license).
484+
- MUST always come after `Name:{:rpmspec}` is defined and before the `%prep` section.
485+
- SHOULD come before the `License:{:rpmspec}` field if using [`%{electron_license}`](#electron_license).
486486
- MAY need to come before the sources if an upstream provides sources named after the Electron architecture.
487487
- MAY be used under preambles but before `%prep` if not using `%{electron_license}`.
488488

489-
The safest location is under `Name:` and above other preambles. When in doubt, place the macro here.
489+
The safest location is under `Name:{:rpmspec}` and above other preambles. When in doubt, place the macro here.
490490

491491
Example usage:
492492
```rpmspec
@@ -511,9 +511,9 @@ However, at this time Terra only supports x86_64, AArch64, and 32-bit x86.
511511
### %electron_license
512512
The license for bundled Electron.
513513
NOT set by default in `%electronmeta` because you cannot set the license field twice.
514-
MAY be used in combination with manually adding the other relevant licenses (if this is done, a proper license tag would be `License: XXX-x.x AND %{electron_license}`.
514+
MAY be used in combination with manually adding the other relevant licenses (if this is done, a proper license tag would be `License: XXX-x.x AND %{electron_license}{:rpmspec}`.
515515

516-
[`%electronmeta`](#electronmeta) SHOULD be used BEFORE the `License:` preamble but AFTER `Name:` if using this macro.
516+
[`%electronmeta`](#electronmeta) SHOULD be used BEFORE the `License:{:rpmspec}` preamble but AFTER `Name:` if using this macro.
517517

518518
### Electron Build Macros
519519
These are macros used to build Electron apps using JavaScript package managers and builders such as [Electron Builder](https://www.electron.build), [Electron Forge](https://www.electronforge.io), and [Electron Vite](https://electron-vite.github.io).

0 commit comments

Comments
 (0)