Laurent CoustetandLaurent Coustet edf3552720 feat(rpm): add script_requires to require script interpreters (#1151)
rpmbuild runs script.req on the executable files of a package, so a
package that ships a "#!/bin/bash" script requires /bin/bash without
any work from the packager. nfpm has no such generator, so the
interpreter of every script must be listed by hand, which is
error-prone.

Add the opt-in rpm.script_requires option. Like script.req with the
exeonly flag of script.attr, it reads the "#!" line of each executable
file and requires its interpreter, and the absolute program run by
env, flagged RPMSENSE_FIND_REQUIRES like the dependencies rpmbuild
generates. Documentation files, symlinks, directories and ghosts are
skipped. The mode checked is the one in the package, so file_info.mode
is honored and the option also works when building on Windows.

The generated spec sets AutoReqProv: no, so the requires are written
to it explicitly and rpmbuild --rebuild keeps them.

Add unit tests, a scriptrequires acceptance stage that reads the
requires back with rpm, and an executable script to the srpm rebuild
acceptance test.

Co-authored-by: Laurent Coustet <laurent.coustet@bluemind.net>
2026-10-28 16:45:58 +00:00
2026-06-20 20:52:02 -03:00
2024-01-01 22:22:51 -03:00
2021-07-07 10:20:34 -07:00
2026-03-23 12:52:49 -03:00
2026-04-17 23:48:05 -03:00
2022-02-03 09:20:21 -03:00
2025-03-23 17:31:10 -03:00
2018-02-03 17:11:21 -02:00
2026-09-10 06:05:38 +00:00
2023-05-18 14:18:54 -03:00
2026-06-20 20:52:02 -03:00

GoReleaser Logo

Release Software License GitHub Actions Codecov branch Go Report Card Go Doc Powered By: GoReleaser

Why

While fpm is great, for me, it is a bummer that it depends on ruby, tar and other software.

I wanted something that could be used as a binary and/or as a library and that was really simple.

So I created nFPM: a simpler, 0-dependency, as-little-assumptions-as-possible alternative to fpm.

Getting started

Special thanks 🙏

Thanks to the fpm authors for fpm, which inspires nfpm a lot.

Community

You have questions, need support and or just want to talk about GoReleaser/nFPM?

Here are ways to get in touch with the GoReleaser community:

Join Discord Follow Twitter GitHub Discussions

Donate

Donations are very much appreciated! You can donate/sponsor on the main goreleaser opencollective! It's easy and will surely help the developers at least buy some ☕️ or 🍺!


Our Sponsors

Diamond
SerpApi

Gold
Mercedes-Benz Group GitHub SecureOSS Fund

Silver
N-iX Ltd

Bronze
conet cloud Encore Comet Gitea

And many more!

See the full list here.

S
Description
NFPM is Not FPM - a simple deb, rpm and apk packager written in Go
Readme MIT
7.2 MiB
1 Stars 1 Watchers 0 Forks
Languages
Go 99.5%
HTML 0.2%
Shell 0.2%