Skip to content

Commit

Permalink
Minor improvements into the code, added Copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
okynos committed Jan 11, 2022
1 parent 5424b5a commit 3b023f4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
12 changes: 2 additions & 10 deletions indexer/rpm/builder.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Wazuh package builder
# Copyright (C) 2015-2021, Wazuh Inc.
# Copyright (C) 2015-2022, Wazuh Inc.
#
# This program is a free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
Expand All @@ -16,8 +16,6 @@ release=$2
directory_base=$3
version="4.3.0"
rpmbuild="rpmbuild"
use_local_specs=$4
packages_branch=$5

if [ -z "${release}" ]; then
release="1"
Expand All @@ -38,13 +36,7 @@ mkdir ${build_dir}/${pkg_name}


# Including spec file
if [ "${use_local_specs}" = "no" ]; then
curl -sL https://github.com/wazuh/wazuh-packages/tarball/${packages_branch} | tar zx
specs_path=$(find ./wazuh* -type d -name "SPECS" -path "*indexer/rpm*")
else
specs_path="/specs"
fi
cp ${specs_path}/${target}.spec ${rpm_build_dir}/SPECS/${pkg_name}.spec
cp /root/${target}.spec ${rpm_build_dir}/SPECS/${pkg_name}.spec

# Generating source tar.gz
cd ${build_dir} && tar czf "${rpm_build_dir}/SOURCES/${pkg_name}.tar.gz" "${pkg_name}"
Expand Down
21 changes: 14 additions & 7 deletions indexer/rpm/wazuh-indexer.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Wazuh package SPEC
# Copyright (C) 2015-2022, Wazuh Inc.
#
# This program is a free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License (version 2) as published by the FSF - Free Software
# Foundation.
Summary: Wazuh helps you to gain security visibility into your infrastructure by monitoring hosts at an operating system and application level. It provides the following capabilities: log analysis, file integrity monitoring, intrusions detection and policy and compliance monitoring
Name: wazuh-indexer
Version: 4.3.0
Expand Down Expand Up @@ -117,6 +124,12 @@ rm -fr %{buildroot}

# -----------------------------------------------------------------------------

%changelog
* Mon Jan 10 2022 support <[email protected]> - 4.3.0
- More info: https://documentation.wazuh.com/current/release-notes/

# -----------------------------------------------------------------------------

%files
%defattr(-, %{USER}, %{GROUP})
%dir %attr(750, %{USER}, %{GROUP}) %{CONFIG_DIR}
Expand Down Expand Up @@ -1013,10 +1026,4 @@ rm -fr %{buildroot}
%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/jdk.zipfs.jmod
%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/jdk.aot.jmod
%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/jdk.jconsole.jmod
%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/java.instrument.jmod

# -----------------------------------------------------------------------------

%changelog
* Mon Nov 01 2021 support <[email protected]> - 4.3.0
- More info: https://documentation.wazuh.com/current/release-notes/
%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/java.instrument.jmod

0 comments on commit 3b023f4

Please sign in to comment.