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

bump to stretch, ensure ssl-dev is installed #2131

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clundquist-stripe
Copy link

Related issue

Description

wheezy GPG keys have expired, and building for AMD64 no longer works.
This bumps the amd64 docker image to match the arm64 (ARM) one for the most part.
I'm unclear why node is needed for the arm64 build. Building amd64 worked without it.

This also adds the --platform flag to slightly better support Apple M1 Rossetta and cross compiling.

Logs example

Current master:

debs git:(master) DOCKER_DEFAULT_PLATFORM=linux/amd64 ./generate_debian_package.sh -j 8 -b v4.3.9 -t manager -a amd64 --dev
Sending build context to Docker daemon  9.216kB
Step 1/12 : FROM debian:7
 ---> 10fcec6d95c4
Step 2/12 : ENV DEBIAN_FRONTEND noninteractive
 ---> Using cache
 ---> a3236893fc94
Step 3/12 : RUN echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > /etc/apt/sources.list &&     echo "deb-src http://archive.debian.org/debian/ wheezy contrib main non-free" >> /etc/apt/sources.list &&     apt-get update && apt-get install -y apt-utils &&     apt-get install -y --force-yes     curl gcc make sudo wget expect gnupg perl-base=5.14.2-21+deb7u3 perl     libc-bin=2.13-38+deb7u10 libc6=2.13-38+deb7u10 libc6-dev build-essential     cdbs devscripts equivs automake autoconf libtool libaudit-dev selinux-basics     libdb5.1=5.1.29-5 libdb5.1-dev libssl1.0.0=1.0.1e-2+deb7u20 procps gawk libsigsegv2
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
 ---> Running in eba3ee1803c7
Get:1 http://archive.debian.org wheezy Release.gpg [2373 B]
Get:2 http://archive.debian.org wheezy Release [191 kB]
Ign http://archive.debian.org wheezy Release
Get:3 http://archive.debian.org wheezy/contrib Sources [55.8 kB]
Get:4 http://archive.debian.org wheezy/main Sources [7533 kB]
Get:5 http://archive.debian.org wheezy/non-free Sources [112 kB]
Get:6 http://archive.debian.org wheezy/contrib amd64 Packages [50.5 kB]
Get:7 http://archive.debian.org wheezy/main amd64 Packages [7634 kB]
Get:8 http://archive.debian.org wheezy/non-free amd64 Packages [100 kB]
Fetched 15.7 MB in 4s (3391 kB/s)
Reading package lists...
W: GPG error: http://archive.debian.org wheezy Release: The following signatures were invalid: KEYEXPIRED 1587841717 KEYEXPIRED 1668891673 KEYEXPIRED 1557241909
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  libapt-inst1.5
The following NEW packages will be installed:
  apt-utils libapt-inst1.5
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 545 kB of archives.
After this operation, 2049 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  libapt-inst1.5 apt-utils
E: There are problems and -y was used without --force-yes
The command '/bin/sh -c echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > /etc/apt/sources.list &&     echo "deb-src http://archive.debian.org/debian/ wheezy contrib main non-free" >> /etc/apt/sources.list &&     apt-get update && apt-get install -y apt-utils &&     apt-get install -y --force-yes     curl gcc make sudo wget expect gnupg perl-base=5.14.2-21+deb7u3 perl     libc-bin=2.13-38+deb7u10 libc6=2.13-38+deb7u10 libc6-dev build-essential     cdbs devscripts equivs automake autoconf libtool libaudit-dev selinux-basics     libdb5.1=5.1.29-5 libdb5.1-dev libssl1.0.0=1.0.1e-2+deb7u20 procps gawk libsigsegv2' returned a non-zero code: 100

note: W: GPG error: http://archive.debian.org wheezy Release: The following signatures were invalid: KEYEXPIRED 1587841717 KEYEXPIRED 1668891673 KEYEXPIRED 1557241909

Tests

  • Build the package in any supported platform
    • Linux
    • Windows
    • macOS
    • Solaris
    • AIX
    • HP-UX
  • Package installation
  • Package upgrade
  • Package downgrade
  • Package remove
  • Package install/remove/install
  • Change added to CHANGELOG.md
  • Tests for Linux RPM
    • Build the package for x86_64
    • Build the package for i386
    • Build the package for armhf
    • Build the package for aarch64
    • %files section is correctly updated if necessary
  • Tests for Linux deb
    • Build the package for x86_64
    • Build the package for i386
    • Build the package for armhf
    • Build the package for aarch64
    • Package install/remove/install
    • Package install/purge/install
    • Check file permissions after installing the package
  • Tests for macOS
    • Test the package from macOS Sierra to Mojave
  • Tests for Solaris
    • Test the package on Solaris 10
    • Test the package on Solaris 11
    • Check file permissions on Solaris 11 template
  • Tests for IBM AIX
    • %files section is correctly updated if necessary
    • Check the changes from IBM AIX 5 to 7

Copy link
Member

@rauldpm rauldpm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for your contribution.

  • Regarding the changes referring to the AMD64 Dockerfile, they seem correct to me since for consistency with the other Dockerfiles the package should be built in the same system (Debian Stretch) and therefore, the dependency changes should be consistent.
  • Regarding specifying the platform flag, I ask you for consistency either all Dockerfiles use --platform or use the format architecture/debian:stretch
  • Regarding the libssl1.0-dev package we must validate if it is really necessary, according to the documentation, the libssl-dev package should be installed

In any case, it is necessary to share a full build output of an ARM64 and AMD64 package build with the new Dockerfiles in order to be accepted.

Regarding the node package, it is used in the construction of the Wazuh API, which has already been deprecated, I will ask the team why this package is still present and we will create an issue if it should be removed.

@@ -1,18 +1,19 @@
FROM debian:7
FROM --platform=linux/amd64 debian:stretch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, please use the flag --platform or use the format architecture/debian:stretch in all Debian Dockerfiles

autoconf libtool libaudit-dev selinux-basics \
libdb5.3 libdb5.3 libssl1.0.2 libssl1.0-dev gawk libsigsegv2

# Add Debian's source repository and, Install NodeJS 12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this comment

@rauldpm rauldpm marked this pull request as draft March 29, 2023 12:38
@rauldpm rauldpm requested review from rauldpm and removed request for rauldpm April 26, 2023 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants