Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packaging: Remove windows bin files from the tar distribution #30596

Merged
merged 4 commits into from
Jun 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions distribution/archives/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand All @@ -86,9 +78,6 @@ CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, boolean os
}

with noticeFile
from('../src') {
include 'bin/*.exe'
}
into('modules') {
with modulesFiles
}
Expand Down
21 changes: 19 additions & 2 deletions distribution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -279,22 +280,38 @@ 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) {
from project(':distribution').buildOssBin
} else {
from project(':distribution').buildDefaultBin
}
if (distributionType != 'zip') {
exclude '*.bat'
}
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/migration/migrate_7_0/packaging.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
12 changes: 0 additions & 12 deletions x-pack/qa/vagrant/src/test/resources/packaging/utils/xpack.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down