-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add package building tools #63
Conversation
Maybe you could add documentation on how to use it. |
I experienced the following problem: I built:
./generate_base.sh --dashboard-path /tmp/linux-x64-2.4.1.zip --security-path /tmp/security-dashboards-2.4.1.0.zip --app-url https://packages-dev.wazuh.com/pre-release/ui/dashboard/wazuh-4.4.0-1.zip --version 4.4.0
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/
Sending build context to Docker daemon 106.8MB
Step 1/10 : FROM rockylinux:8.5
---> 210996f98b85
Step 2/10 : RUN yum clean all && yum update -y
---> Using cache
---> 69dbfda95993
Step 3/10 : RUN yum install -y curl tar findutils git xz gcc make bc sed gzip autoconf automake libtool python3-devel python3-pip jq unzip
---> Using cache
---> 29dec080f368
Step 4/10 : RUN git clone https://github.com/google/brotli.git
---> Using cache
---> 007e02c64422
Step 5/10 : RUN cd brotli && chmod +x ./bootstrap && ./bootstrap && ./configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib64/brotli --libdir=/usr/lib64/brotli --datarootdir=/usr/share --mandir=/usr/share/man/man1 --docdir=/usr/share/doc && make && make install
---> Using cache
---> 5033c0b43f8c
Step 6/10 : ADD builder.sh /usr/local/bin/builder
---> Using cache
---> 5c03c888deec
Step 7/10 : ADD opensearch-dashboards.tar.gz /opt
---> Using cache
---> 22f900b17b8d
Step 8/10 : ADD security-dashboards.zip /opt
---> Using cache
---> d5e7dc29c913
Step 9/10 : RUN chmod +x /usr/local/bin/builder
---> Using cache
---> f84574423c8f
Step 10/10 : ENTRYPOINT ["/usr/local/bin/builder"]
---> Using cache
---> 43bf6b36ca2c
Successfully built 43bf6b36ca2c
Successfully tagged dashboard_base_builder:latest
/usr/local/bin/builder: line 60: cd: /opt/wazuh-dashboard-base: Not a directory I think the problem is located at this line: https://github.com/wazuh/wazuh-dashboard/pull/63/files#diff-27b565659462834488d30c45b7280780dc69ce02667763dcfaa75743257c7f7dR59, the |
Having problems build a deb package: Command used: ./build_package.sh \
--build-base yes
--security-path /home/alex/wazuh/packages/security-dashboards-2.4.1.0.zip \
--app-url https://packages-dev.wazuh.com/pre-release/ui/dashboard/wazuh-4.4.0-1.zip \
--version 4.4.0 Result: mk-build-deps: warning: debian/changelog(l1): version '-1' is invalid: upstream version cannot be empty
LINE: wazuh-dashboard (-1) unstable; urgency=low
dh_testdir
dh_testroot
dh_prep
dh_testdir
dh_testroot
dh_install
dh_installdocs
dh_installchangelogs
dh_installchangelogs: warning: debian/changelog(l1): version 'unknown' is invalid: version number does not start with digit
LINE: wazuh-dashboard-build-deps (unknown) unstable; urgency=low
Can't locate object method "is_valid" via package "unknown" (perhaps you forgot to load "unknown"?) at /usr/share/perl5/Debian/Debhelper/Dh_Lib.pm line 1044.
make: *** [debian/rules:24: binary-indep] Error 255
Error in the build process: exit status 2
dpkg: error: cannot access archive 'wazuh-dashboard-build-deps_unknown_all.deb': No such file or directory
mk-build-deps: dpkg --unpack failed
zsh: command not found: --security-path
zsh: command not found: --app-url |
I commented on this with @Tostti , and he checked this is working. I have reviewed and it seems was a problem by using a zipped Wazuh dashboard instead a $ ./generate_base.sh --dashboard-path ~/wazuh/tmp/opensearch-dashboards-2.4.1-linux-x64.tar.gz --security-path ~/wazuh/tmp/security-dashboards-2.4.1.0.zip --app-url https://packages-dev.wazuh.com/pre-release/ui/dashboard/wazuh-4.4.0-1.zip --version 4.4.0
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/
Sending build context to Docker daemon 107.3MB
Step 1/10 : FROM rockylinux:8.5
---> 210996f98b85
Step 2/10 : RUN yum clean all && yum update -y
---> Using cache
---> 69dbfda95993
Step 3/10 : RUN yum install -y curl tar findutils git xz gcc make bc sed gzip autoconf automake libtool python3-devel python3-pip jq unzip
---> Using cache
---> 29dec080f368
Step 4/10 : RUN git clone https://github.com/google/brotli.git
---> Using cache
---> 007e02c64422
Step 5/10 : RUN cd brotli && chmod +x ./bootstrap && ./bootstrap && ./configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib64/brotli --libdir=/usr/lib64/brotli --datarootdir=/usr/share --mandir=/usr/share/man/man1 --docdir=/usr/share/doc && make && make install
---> Using cache
---> 5033c0b43f8c
Step 6/10 : ADD builder.sh /usr/local/bin/builder
---> Using cache
---> 5c03c888deec
Step 7/10 : ADD opensearch-dashboards.tar.gz /opt
---> 869e577e8f7b
Step 8/10 : ADD security-dashboards.zip /opt
---> 3fa0125f8a3f
Step 9/10 : RUN chmod +x /usr/local/bin/builder
---> Running in 2e99e65a04de
Removing intermediate container 2e99e65a04de
---> 1b5871d37243
Step 10/10 : ENTRYPOINT ["/usr/local/bin/builder"]
---> Running in 691ac44f01af
Removing intermediate container 691ac44f01af
---> 170fe1bc6a35
Successfully built 170fe1bc6a35
Successfully tagged dashboard_base_builder:latest
Archive: wazuh-4.4.0-1.zip
inflating: opensearch-dashboards/wazuh/package.json
Attempting to transfer from file:/opt/security-dashboards.zip
Transferring 1185795 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Plugin installation complete
Base file wazuh-dashboard-base-4.4.0-1-linux-x64.tar.xz added to /tmp/src/wazuh-dashboard/dev-tools/build-packages/base/output. The base package seems to be built correctly. |
@AlexRuiz7 I think the error is that you are not specifying any |
Tests
Generate .deb package
Generate .rpm package
|
Superseded by #71 |
Description
This PR aims to add the necessary tools to build
rpm
anddeb
packages.Issues Resolved
#58
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr