Skip to content

Conversation

@yubiuser
Copy link
Member

Dummy PR to trigger the test suite for #5001

@yubiuser
Copy link
Member Author

yubiuser commented Nov 18, 2022

To pass the tests this needs

  1. adjustment of dev-supportedos.pi-hole.net
  2. Merge of Don't install which #5028
  3. Rebase of the adjustments of the changes to the installer in basic-install with openSUSE support #5001

Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
@PromoFaux PromoFaux changed the title openSUSE Test suit openSUSE Test suite Nov 20, 2022
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Dockerfile Outdated
@@ -0,0 +1,26 @@
FROM opensuse/leap:15.4
RUN zypper install -y --no-recommends git dbus-1 systemd-sysvinit
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we need to add # hadolint ignore=DL3037 here, but I think the zypper clean should be used.

Copy link
Member Author

Choose a reason for hiding this comment

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

clean is a good idea, but I don' think we should pin the versions installed.
If a newer version breaks anything I'd like to know.

Copy link
Member

Choose a reason for hiding this comment

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

I don' think we should pin the versions installed

I don't think this too. That's why I suggested to include # hadolint ignore=DL3037, to silence this check.

Copy link
Member

Choose a reason for hiding this comment

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

Apparently the command didn't work.

Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
PKG_COUNT="${PKG_MANAGER} lu | egrep '(.i686|.x86|.noarch|.arm|.src)' | wc -l || true"
INSTALLER_DEPS=(git dialog iproute2 newt procps which ca-certificates)
PIHOLE_DEPS=(cronie curl findutils sudo unzip libidn2 psmisc libcap-ng0 netcat-openbsd jq)
PIHOLE_WEB_DEPS=(lighttpd php8 php8-fastcgi php8-cli php8-pdo php8-intl php8-openssl php8-sqlite)
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure there are PHP8 packages to openSUSE Leap?

Copy link
Member Author

Choose a reason for hiding this comment

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

The following 25 NEW packages are going to be installed:\n  cron cronie jq libbrotlienc1 libbsd0 libdbi3 libicu-suse65_1 libicu65_1-ledata libjq1 libonig4 lighttpd mailx netcat-openbsd php8 php8-cli php8-fastcgi php8-intl php8-openssl php8-pdo php8-sqlite 

This part was just copied from #5001

Copy link
Member

Choose a reason for hiding this comment

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

https://software.opensuse.org/package/php8?locale=en

php8

Interpreter for the PHP scripting language version 8

PHP is a server-side HTML embedded scripting language designed primarily for web development but also used as a general-purpose programming language. This package contains the base files for all subpackages and must be installed in order to use PHP. Additionally, extension modules and server modules (e.g. for Apache) may be installed.

There is no official package available for openSUSE Leap 15.4

Copy link
Member Author

Choose a reason for hiding this comment

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

Interesting, my local container says otherwise

1c9a8e950408:/ # php -v
PHP 8.0.25 (cli) (built: Oct 31 2022 12:00:00) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.25, Copyright (c) Zend Technologies

Copy link
Member

Choose a reason for hiding this comment

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

What image are you using? What architecture?
Maybe there is a package difference between different architectures.

Copy link
Member Author

Choose a reason for hiding this comment

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

FROM opensuse/leap:15.4

It's a x86_64 system

Copy link
Member

Choose a reason for hiding this comment

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

I'm testing on a Raspberry Pi. Maybe the difference is there.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if there will be someone running openSUSE on a Raspberry Pi.

Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
@yubiuser
Copy link
Member Author

Added code from #4924 and adjusted tests.

# Then check if dnf or yum is the package manager
if is_command dnf ; then
PKG_MANAGER="dnf"
else
Copy link
Member

Choose a reason for hiding this comment

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

replacing this else with an elif might potentially leave PKG_MANAGER unset.

Copy link
Member

@rdwebdesign rdwebdesign Dec 13, 2022

Choose a reason for hiding this comment

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

I think the best code should be:

        if is_command dnf ; then
            PKG_MANAGER="dnf"
        elif is_command zypper ; then
            PKG_MANAGER="zypper"
        else
            PKG_MANAGER="yum"
        fi

Or, if you don't want to use else:

        PKG_MANAGER="yum"
        if is_command dnf ; then
            PKG_MANAGER="dnf"
        elif is_command zypper ; then
            PKG_MANAGER="zypper"
        fi

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch.

Copy link

Choose a reason for hiding this comment

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

Makes sense.

@github-actions github-actions bot added the PR: Merge Conflict Issue blocking check and merge of code label Dec 19, 2022
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@yubiuser
Copy link
Member Author

Superseded by #5083. It was easier to make a new one then to clean up this big PR.

@yubiuser yubiuser closed this Dec 22, 2022
@yubiuser yubiuser deleted the openSUSE branch December 22, 2022 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Merge Conflict Issue blocking check and merge of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants