elastic / logstash

Logstash - transport and process your logs, events, or other data
https://www.elastic.co/products/logstash
Other
14.17k stars 3.49k forks source link

Delete batch files from deb (and rpm) packages #2844

Open Mister-X- opened 9 years ago

Mister-X- commented 9 years ago

I noticed on my Linux system, when using the package that it is also installing .bat files (for Windows) along with the bash scripts to run the script.

Here is a patch that should take care of removing them before building the package (untested):

diff --git a/pkg/build.sh b/pkg/build.sh
index 8ad876b..0d56ab4 100755
--- a/pkg/build.sh
+++ b/pkg/build.sh
@@ -41,6 +41,9 @@ fi

 tar -C $destdir/$prefix --strip-components 1 -zxpf $tar

+# Delete batch files
+rm -f $destdir/opt/logstash/bin/*.bat
+
 case $os@$release in
  centos@*|fedora@*|el6@*|sl6@*)
     mkdir -p $destdir/etc/logrotate.d
jordansissel commented 9 years ago

Sorry, I've been meaning to purge the pkg/ directory of unused things. We dont' use pkg/build.sh anymore.

The code for this is in rakelib/artifacts.rake, I think

jordansissel commented 7 years ago

Checked on this tonight to confirm if it is still occurring, and it is:

% rpm2cpio logstash-5.3.2.rpm | cpio -it | grep usr/share/logstash/bin/.*bat
./usr/share/logstash/bin/logstash-plugin.bat
./usr/share/logstash/bin/logstash.bat
./usr/share/logstash/bin/setup.bat