Makefile invokes find with nonportable, non-POSIX -not option #10795

Closed
opened 2025-11-02 09:18:21 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @riastradh on GitHub (May 6, 2023).

Description

The Makefile runs find ... -not ... to derive GO_SOURCES:

GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" -not -path modules/options/bindata.go -not -path modules/public/bindata.go -not -path modules/templates/bindata.go)

On some platforms such as NetBSD, the -not option is not supported. The portable and standard POSIX way to do this is with with !: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html

Gitea Version

ef92459e18

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

make

Database

None

Originally created by @riastradh on GitHub (May 6, 2023). ### Description The Makefile runs `find ... -not ...` to derive GO_SOURCES: ``` GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" -not -path modules/options/bindata.go -not -path modules/public/bindata.go -not -path modules/templates/bindata.go) ``` On some platforms such as NetBSD, the `-not` option is not supported. The portable and standard POSIX way to do this is with with `!`: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html ### Gitea Version ef92459e183f3f3437d4e458dc75a350e4f34871 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? make ### Database None
GiteaMirror added the type/bug label 2025-11-02 09:18:21 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10795