apache / pulsar

Apache Pulsar - distributed pub-sub messaging system
https://pulsar.apache.org/
Apache License 2.0
14.12k stars 3.57k forks source link

Build/packaging: source tarballs on Apache mirror are missing executable mode for some shell scrips (e.g. rename-netty-native-libs.sh). #11833

Closed zbentley closed 2 years ago

zbentley commented 3 years ago

Some shellscripts required to build Pulsar are executable in master, but are not marked as executable in the source tarballs available on apache.org.

One such example is src/rename-netty-native-libs.sh, which is executable in master. However, if I download a source tarball from https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=pulsar/pulsar-2.8.0/apache-pulsar-2.8.0-src.tar.gz or https://archive.apache.org/dist/pulsar/pulsar-2.8.0/apache-pulsar-2.8.0-src.tar.gz, I get:

∴ ll src
total 60K
drwxr-xr-x 15 zac.bentley staff  480 Jan 22  2020 .
drwxr-xr-x 64 zac.bentley staff 2.0K Jan 22  2020 ..
-rw-r--r--  1 zac.bentley staff 4.3K Jan 22  2020 check-binary-license
-rw-r--r--  1 zac.bentley staff 1.5K Jan 22  2020 findbugs-exclude.xml
-rw-r--r--  1 zac.bentley staff 1.2K Jan 22  2020 gen-swagger.sh
-rw-r--r--  1 zac.bentley staff 1.2K Jan 22  2020 get-project-version.py
-rw-r--r--  1 zac.bentley staff 3.0K Jan 22  2020 idea-code-style.xml
-rw-r--r--  1 zac.bentley staff  755 Jan 22  2020 license-header.txt
-rw-r--r--  1 zac.bentley staff 4.3K Jan 22  2020 pulsar-io-gen
-rw-r--r--  1 zac.bentley staff 2.2K Jan 22  2020 rename-netty-native-libs.cmd
-rw-r--r--  1 zac.bentley staff 1.9K Jan 22  2020 rename-netty-native-libs.sh
-rw-r--r--  1 zac.bentley staff 1.4K Jan 22  2020 set-project-version.sh
-rw-r--r--  1 zac.bentley staff 1.6K Jan 22  2020 settings.xml
-rw-r--r--  1 zac.bentley staff  994 Jan 22  2020 sign-release.sh
-rw-r--r--  1 zac.bentley staff 1.7K Jan 22  2020 stage-release.sh

As a result, mvn package fails until I run chmod +x src/rename-netty-native-libs.sh.

This is complicating attempts to package Pulsar for Homebrew on OSX (see discussion here).

zbentley commented 3 years ago

There may be other shell scripts affected by being not executable; however, rename-netty-native-libs.sh is the only one that needs a chmod for mvn -X clean package -DskipTests -Pcore-modules (my minimal build) to succeed. It might be worth auditing the pom.xml files in this repo to make sure that either a) all shellscripts invoked are executable or b) all of them are invoked with an explicit interpreter, e.g. /bin/sh.