Skip to content

fish: fix postrm script interpreter#29774

Open
dhrm1k wants to merge 1 commit into
openwrt:masterfrom
dhrm1k:fish-postrm-shebang
Open

fish: fix postrm script interpreter#29774
dhrm1k wants to merge 1 commit into
openwrt:masterfrom
dhrm1k:fish-postrm-shebang

Conversation

@dhrm1k

@dhrm1k dhrm1k commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Add the missing shell interpreter line to the fish postrm script so apk can
run the generated post-deinstall hook when fish is removed.

Without the shebang, apk:

fish-4.1.2-r2.post-deinstall: execve: Exec format error

Fixes: #29348

📦 Package Details

Maintainer: Curtis Jiang @jqqqqqqqqqq

Description:
Fix the fish package removal hook by adding the missing #!/bin/sh line to
the generated postrm script.


🧪 Run Testing Details

  • OpenWrt Version: 25.12.4
  • OpenWrt Target/Subtarget: bcm53xx/generic
  • OpenWrt Device: asus rt ac68u

Tested with:

apk add fish
apk del fish

Before this change, apk del fish reported execve: Exec format error while
running the fish post-deinstall hook.


✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • Not applicable, this PR does not add or modify an upstream source patch.

Comment thread utils/fish/Makefile Outdated
@dhrm1k dhrm1k force-pushed the fish-postrm-shebang branch from b6e67fa to 3706fe0 Compare June 21, 2026 04:24
@dhrm1k

dhrm1k commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

CI is failing.
pull_request_target workflow refuses to check out fork PR code.

My previous PRs did not hit this, Did it change recently?

Add the missing shell interpreter line to the postrm script.

This lets apk run the generated post-deinstall hook when fish is removed.

Bump PKG_RELEASE for the package script change.

Fixes: openwrt#29348
Signed-off-by: Dharmik Parmar <dharmikparmar2004@yahoo.com>
@BKPepe BKPepe force-pushed the fish-postrm-shebang branch from 3706fe0 to 1246187 Compare June 25, 2026 17:56
@dhrm1k

dhrm1k commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

I noticed this same apk-side failure in another package too (arp-scan-database).

It looks like the common pattern is that apk executes the generated maintainer
hook directly, so if the generated postrm / postinst script does not start
with something like #!/bin/sh, it fails with execve: Exec format error.

Will it be helpful if I look into a few more of these, or will it be considered
spamming?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fish: post-deinstall ERROR

2 participants