maplibre / maplibre-native

MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms.
https://maplibre.org
BSD 2-Clause "Simplified" License
914 stars 278 forks source link

unnecessary execute permission on generated iOS style headers. #2466

Open michaelkirk opened 1 month ago

michaelkirk commented 1 month ago

Describe the bug

Several files in the distributed xcframework have unnecessary execute permissions.

MapLibre.xcframework/ios-arm64/MapLibre.framework/Headers/MLNFillExtrusionStyleLayer.h
MapLibre.xcframework/ios-arm64/MapLibre.framework/Headers/MLNLineStyleLayer.h
MapLibre.xcframework/ios-arm64/MapLibre.framework/Headers/MLNHeatmapStyleLayer.h
MapLibre.xcframework/ios-arm64/MapLibre.framework/Headers/MLNRasterStyleLayer.h
MapLibre.xcframework/ios-arm64/MapLibre.framework/Headers/MLNBackgroundStyleLayer.h
MapLibre.xcframework/ios-arm64/MapLibre.framework/Headers/MLNSymbolStyleLayer.h
MapLibre.xcframework/ios-arm64/MapLibre.framework/Headers/MLNLight.h
MapLibre.xcframework/ios-arm64/MapLibre.framework/Headers/MapLibre.h
MapLibre.xcframework/ios-arm64/MapLibre.framework/Headers/MLNFillStyleLayer.h
MapLibre.xcframework/ios-arm64/MapLibre.framework/Headers/MLNCircleStyleLayer.h
MapLibre.xcframework/ios-arm64/MapLibre.framework/Headers/MLNHillshadeStyleLayer.h

To Reproduce

wget https://github.com/maplibre/maplibre-native/releases/download/ios-v6.4.2/MapLibre.dynamic.xcframework.zip

unzip MapLibre.dynamic.xcframework.zip

find MapLibre.xcframework/ios-arm64/MapLibre.framework/Headers -perm -u=x -type f

Expected behavior

Headers should not have execute permission.

Platform information (please complete the following information):

Additional context The affected files are all prefixed with:

// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`

I was not able to track down the make darwin-style-code task. It seems like it was renamed to make style-code in c5992d58f1270f110960b326e2ae2d756d57d6ff and then platform/ios/Makefile was removed altogether in 9eb6197cdf8c0cd7da2d162f371d81e13e53c40b / #2168

louwers commented 1 month ago

Interesting.

The MapLibre.h is generated by Bazel.

That comment needs to be updated, we now run that script with Bazel.

michaelkirk commented 1 month ago

The MapLibre.h is generated by Bazel.

Ah you're right! That one (and only that one) is lacking the comment:

// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`

Which makes sense I suppose.

louwers commented 1 month ago

I am asking the Bazel pro's what might be going on here.

writeFileSync should not normally write files with execute permissions.

Looks like https://github.com/bazelbuild/bazel/issues/6530

louwers commented 1 month ago

Looks like an upstream issue.

If I don't get a reply I can patch the released XCFramework.