diff --git a/distribution/archives/build.gradle b/distribution/archives/build.gradle index 9fa06021236a2..2fbe5a308dc04 100644 --- a/distribution/archives/build.gradle +++ b/distribution/archives/build.gradle @@ -18,7 +18,6 @@ */ import org.apache.tools.ant.taskdefs.condition.Os -import org.apache.tools.ant.filters.FixCrLfFilter import org.elasticsearch.gradle.BuildPlugin import org.elasticsearch.gradle.EmptyDirTask import org.elasticsearch.gradle.LoggedExec @@ -57,13 +56,6 @@ CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, boolean os } into('bin') { with binFiles(distributionType, oss) - with copySpec { - from('../src/bin') { - include '*.bat' - filter(FixCrLfFilter, eol: FixCrLfFilter.CrLf.newInstance('crlf')) - } - MavenFilteringHack.filter(it, expansionsForDistribution(distributionType, oss)) - } } into('') { from { @@ -86,9 +78,6 @@ CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, boolean os } with noticeFile - from('../src') { - include 'bin/*.exe' - } into('modules') { with modulesFiles } diff --git a/distribution/build.gradle b/distribution/build.gradle index 266cb8f8b270a..f9e20523d8758 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -21,6 +21,7 @@ import org.elasticsearch.gradle.ConcatFilesTask import org.elasticsearch.gradle.MavenFilteringHack import org.elasticsearch.gradle.NoticeTask import org.elasticsearch.gradle.test.RunTask +import org.apache.tools.ant.filters.FixCrLfFilter import java.nio.file.Path @@ -279,15 +280,28 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) { binFiles = { distributionType, oss -> copySpec { + // non-windows files, for all distributions with copySpec { - // main bin files, processed with distribution specific substitutions - // everything except windows files from '../src/bin' exclude '*.exe' exclude '*.bat' eachFile { it.setMode(0755) } MavenFilteringHack.filter(it, expansionsForDistribution(distributionType, oss)) } + // windows files, only for zip + if (distributionType == 'zip') { + with copySpec { + from '../src/bin' + include '*.bat' + filter(FixCrLfFilter, eol: FixCrLfFilter.CrLf.newInstance('crlf')) + MavenFilteringHack.filter(it, expansionsForDistribution(distributionType, oss)) + } + with copySpec { + from '../src/bin' + include '*.exe' + } + } + // module provided bin files with copySpec { eachFile { it.setMode(0755) } if (oss) { @@ -295,6 +309,9 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) { } else { from project(':distribution').buildDefaultBin } + if (distributionType != 'zip') { + exclude '*.bat' + } } } } diff --git a/docs/reference/migration/migrate_7_0/packaging.asciidoc b/docs/reference/migration/migrate_7_0/packaging.asciidoc index 4070d6807332d..934522db7162f 100644 --- a/docs/reference/migration/migrate_7_0/packaging.asciidoc +++ b/docs/reference/migration/migrate_7_0/packaging.asciidoc @@ -8,3 +8,8 @@ The systemd service file `/usr/lib/systemd/system/elasticsearch.service` was previously marked as a configuration file in rpm and deb packages. Overrides to the systemd elasticsearch service should be made in `/etc/systemd/system/elasticsearch.service.d/override.conf`. + +==== tar package no longer includes windows specific files + +The tar package previously included files in the `bin` directory meant only +for windows. These files have been removed. Use the `zip` package instead. diff --git a/x-pack/qa/vagrant/src/test/resources/packaging/utils/xpack.bash b/x-pack/qa/vagrant/src/test/resources/packaging/utils/xpack.bash index 95ab2a08d3e57..3bea4adf1a4c6 100644 --- a/x-pack/qa/vagrant/src/test/resources/packaging/utils/xpack.bash +++ b/x-pack/qa/vagrant/src/test/resources/packaging/utils/xpack.bash @@ -15,30 +15,18 @@ verify_xpack_installation() { #assert_file "$ESHOME/bin" d $user $group 755 local binaryFiles=( 'elasticsearch-certgen' - 'elasticsearch-certgen.bat' 'elasticsearch-certutil' - 'elasticsearch-certutil.bat' 'elasticsearch-croneval' - 'elasticsearch-croneval.bat' 'elasticsearch-migrate' - 'elasticsearch-migrate.bat' 'elasticsearch-saml-metadata' - 'elasticsearch-saml-metadata.bat' 'elasticsearch-setup-passwords' - 'elasticsearch-setup-passwords.bat' 'elasticsearch-sql-cli' - 'elasticsearch-sql-cli.bat' "elasticsearch-sql-cli-$(cat version).jar" # This jar is executable so we pitch it in bin so folks will find it 'elasticsearch-syskeygen' - 'elasticsearch-syskeygen.bat' 'elasticsearch-users' - 'elasticsearch-users.bat' 'x-pack-env' - 'x-pack-env.bat' 'x-pack-security-env' - 'x-pack-security-env.bat' 'x-pack-watcher-env' - 'x-pack-watcher-env.bat' ) local binaryFilesCount=5 # start with oss distro number