From 081f91d5abfe10a02c3fbaf7cbff09d510b57ecd Mon Sep 17 00:00:00 2001 From: Enrico Olivelli Date: Tue, 31 Aug 2021 14:41:43 +0200 Subject: [PATCH] Source tarball: apply executable file permissions to shell scripts (fixes #10917) (#11858) The source tarball cannot be built because some .sh files are missing executable file permissions, see #10917 ### Modifications: copy the Source Assembly descriptor from the main Maven ASF repo to src add exclusions for "data" and "logs" set 755 permissions on every .sh file in "src" Tests: the build of the docker images and the C client uses the src tarball, so there is minimal test coverage. Apart from this the only way to test this patch is to try to build Pulsar from the generated source tarball * Source tarball: apply executable file permissions to shell scripts * Fix license header * add more .sh files * Fix docker build Co-authored-by: Enrico Olivelli --- pom.xml | 14 +--- src/assembly-source-package.xml | 113 ++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+), 11 deletions(-) create mode 100644 src/assembly-source-package.xml diff --git a/pom.xml b/pom.xml index d852b1aea181b9..b6d1eace4fef05 100644 --- a/pom.xml +++ b/pom.xml @@ -1623,13 +1623,6 @@ flexible messaging model and an intuitive client API. maven-assembly-plugin ${maven-assembly-plugin.version} false - - - org.apache.apache.resources - apache-source-release-assembly-descriptor - 1.0.6 - - source-release-assembly-tar-gz @@ -1640,10 +1633,9 @@ flexible messaging model and an intuitive client API. ${skipSourceReleaseAssembly} true - - - ${sourceReleaseAssemblyDescriptor} - + + src/assembly-source-package.xml + apache-pulsar-${project.version}-src false diff --git a/src/assembly-source-package.xml b/src/assembly-source-package.xml new file mode 100644 index 00000000000000..2677299357f3f2 --- /dev/null +++ b/src/assembly-source-package.xml @@ -0,0 +1,113 @@ + + + + + source-release + + tar.gz + + + + + . + + true + + + src/*.sh + pulsar-client-cpp/docker/*.sh + docker/pulsar/scripts/*.sh + + + data/** + logs/** + + + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*] + + + + + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.idea(/.*)?] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?out(/.*)?] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?] + + + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser] + + + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup] + %regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties] + + + + + ${project.build.directory}/maven-shared-archive-resources/META-INF + + + + src + /src + + *.sh + + 0755 + + + pulsar-client-cpp/docker + /pulsar-client-cpp/docker + + *.sh + + 0755 + + + docker/pulsar/scripts + /docker/pulsar/scripts + + *.sh + + 0755 + + + \ No newline at end of file