You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add tools to assemble DEB packages
* Move wazuh-indexer-performance-analyzer.service to common
* Enable assembly of DEB packages
* Enable full set of plugins
* Actually skip tar assembly
* Add installation of dependencies for DEB assembly
* Install dependencies using sudo
* Format files
* Refactor assemble script
@@ -38,60 +37,162 @@ bash scripts/build.sh -v 2.11.0 -s false -p linux -a {x64|arm64} -d {rpm|deb|tar
38
37
39
38
The generated package is sent to `artifacts/`
40
39
41
-
42
40
## Assemble
43
41
44
-
<!--
42
+
<!--
45
43
### TAR
46
-
### DEB
47
44
-->
48
45
46
+
### DEB
47
+
48
+
The script will:
49
+
50
+
- Extract the deb package using `ar` and `tar` tools.
51
+
52
+
> By default, `ar` and `tar` tools expect the package to be in `wazuh-indexer/artifacts/tmp/deb`. The script takes care of creating the required folder structure, copying also the min package and the Makefile.
53
+
54
+
Current folder loadout at this stage:
55
+
56
+
```
57
+
artifacts/
58
+
|-- dist
59
+
| |-- wazuh-indexer-min_4.9.0_amd64.deb
60
+
`-- tmp
61
+
`-- deb
62
+
|-- Makefile
63
+
|-- data.tar.gz
64
+
|-- debmake_install.sh
65
+
|-- etc
66
+
|-- usr
67
+
|-- var
68
+
`-- wazuh-indexer-min_4.9.0_amd64.deb
69
+
```
70
+
71
+
`usr`, `etc` and `var` folders contain `wazuh-indexer` files, extracted from `wazuh-indexer-min-*.deb`.
72
+
`Makefile` and the `debmake_install` are copied over from `wazuh-indexer/distribution/packages/src/deb`.
73
+
The `wazuh-indexer-performance-analyzer.service` file is also copied from the same folder. It is a dependency of the SPEC file.
74
+
75
+
- Install the plugins using the `opensearch-plugin` CLI tool.
76
+
- Set up configuration files.
77
+
78
+
> Included in `min-package`. Default files are overwritten.
79
+
80
+
- Bundle a DEB file with `debmake` and the `Makefile`.
81
+
82
+
> `debmake` and other dependencies can be installed using the provision.sh script. The
bash scripts/assemble.sh -v 2.11.0 -p linux -a x64 -d deb
145
+
```
146
+
49
147
### RPM
50
148
51
-
The `assemble.sh` script will use the output from the `build.sh` script and use it as a
52
-
base to bundle together a final package containing the plugins, the production configuration
149
+
The `assemble.sh` script will use the output from the `build.sh` script and use it as a
150
+
base to bundle together a final package containing the plugins, the production configuration
53
151
and the service files.
54
152
55
153
The script will:
56
154
57
155
- Extract the rpm package using `rpm2cpio` and `cpio` tools.
58
-
59
-
> By default, `rpm2cpio` and `cpio` tools expect the package to be in `wazuh-indexer/artifacts/tmp/rpm`. The script takes care of creating the required folder structure, copying also the min package and the SPEC file.
60
-
61
-
Current folder loadout at this stage:
62
-
```
63
-
/rpm/$ARCH
64
-
/etc
65
-
/usr
66
-
/var
67
-
wazuh-indexer-min-*.rpm
68
-
wazuh-indexer.rpm.spec
69
-
```
70
-
71
-
`usr`, `etc` and `var` folders contain `wazuh-indexer` files, extracted from `wazuh-indexer-min-*.rpm`.
72
-
`wazuh-indexer.rpm.spec` is copied over from `wazuh-indexer/distribution/packages/src/rpm/wazuh-indexer.rpm.spec`.
73
-
The `wazuh-indexer-performance-analyzer.service` file is also copied from the same folder. It is a dependency of the SPEC file.
156
+
157
+
> By default, `rpm2cpio` and `cpio` tools expect the package to be in `wazuh-indexer/artifacts/tmp/rpm`. The script takes care of creating the required folder structure, copying also the min package and the SPEC file.
158
+
159
+
Current folder loadout at this stage:
160
+
161
+
```
162
+
/rpm/$ARCH
163
+
/etc
164
+
/usr
165
+
/var
166
+
wazuh-indexer-min-*.rpm
167
+
wazuh-indexer.rpm.spec
168
+
```
169
+
170
+
`usr`, `etc` and `var` folders contain `wazuh-indexer` files, extracted from `wazuh-indexer-min-*.rpm`.
171
+
`wazuh-indexer.rpm.spec` is copied over from `wazuh-indexer/distribution/packages/src/rpm/wazuh-indexer.rpm.spec`.
172
+
The `wazuh-indexer-performance-analyzer.service` file is also copied from the same folder. It is a dependency of the SPEC file.
74
173
75
174
- Install the plugins using the `opensearch-plugin` CLI tool.
76
175
- Set up configuration files.
77
176
78
-
> Included in `min-package`. Default files are overwritten.
79
-
177
+
> Included in `min-package`. Default files are overwritten.
178
+
80
179
- Bundle an RPM file with `rpmbuild` and the SPEC file `wazuh-indexer.rpm.spec`.
81
-
- `rpmbuild` is part of the `rpm` OS package.
82
180
83
-
> `rpmbuild` is invoked from `wazuh-indexer/artifacts/tmp/rpm`. It creates the {BUILD,RPMS,SOURCES,SRPMS,SPECS,TMP} folders and applies the rules in the SPEC file. If successful, `rpmbuild` will generate the package in the `RPMS/` folder. The script will copy it to `wazuh-indexer/artifacts/dist` and clean: remove the `tmp\` folder and its contents.
181
+
-`rpmbuild` is part of the `rpm` OS package.
84
182
85
-
Current folder loadout at this stage:
86
-
```
87
-
/rpm/$ARCH
88
-
/{BUILD,RPMS,SOURCES,SRPMS,SPECS,TMP}
89
-
/etc
90
-
/usr
91
-
/var
92
-
wazuh-indexer-min-*.rpm
93
-
wazuh-indexer.rpm.spec
94
-
```
183
+
> `rpmbuild` is invoked from `wazuh-indexer/artifacts/tmp/rpm`. It creates the {BUILD,RPMS,SOURCES,SRPMS,SPECS,TMP} folders and applies the rules in the SPEC file. If successful, `rpmbuild` will generate the package in the `RPMS/` folder. The script will copy it to `wazuh-indexer/artifacts/dist` and clean: remove the `tmp\` folder and its contents.
0 commit comments