b72f295252 fix(arch): preserve special mode bits in tar and .MTREE (#1193)
* fix(archlinux): mask type bits from tar and .MTREE modes

A contents entry of type: tree records Go's fs.FileMode for walked
directories, which keeps the fs.ModeDir type bit set. The arch packager
wrote that raw value into both the tar header and the .MTREE, producing
dir modes like 20000000755. pacman compares the full st_mode on install
and warns "directory permissions differ" on every shared directory even
though the printed modes match, since it only prints the low 0o7777 bits.

Mask the mode with 0o7777 like deb already does and like apk (#1113) and
rpm (#1060) were fixed to do, preserving the setuid/setgid/sticky bits.

Fixes #1170

* fix(arch): preserve special mode bits in tar and .MTREE

Map Go's fs.ModeSetuid, fs.ModeSetgid and fs.ModeSticky to 0o4000, 0o2000
and 0o1000, and drop type flags such as fs.ModeDir, at every place the
arch packager writes a mode.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 43bc573e-2f55-468c-b8ee-626f73b45f4b
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* test(arch): skip walked file modes on windows

Windows does not keep Unix permission bits on walked files, so the
type: tree expectations do not hold there.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 22ba5e02-24ee-4f35-9aff-e1652a041809
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Amal Saidov <amalsaidov@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 43bc573e-2f55-468c-b8ee-626f73b45f4b
Copilot-Session: 22ba5e02-24ee-4f35-9aff-e1652a041809
2026-11-21 17:54:15 +00:00
2026-11-11 02:25:17 +00:00
2026-11-11 02:25:17 +00:00
2026-06-20 20:52:02 -03:00
2026-11-15 17:12:36 +00: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-11-11 02:25:17 +00:00
2023-05-18 14:18:54 -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.5 MiB
1 Stars 1 Watchers 0 Forks
Languages
Go 99.7%
HTML 0.2%
Shell 0.1%