diff --git a/0001-add-dependent-package-to-lib.patch b/0001-add-dependent-package-to-lib.patch new file mode 100644 index 0000000000000000000000000000000000000000..85dd42e3134f06d8b8001ad8b91f025e3ce0511f --- /dev/null +++ b/0001-add-dependent-package-to-lib.patch @@ -0,0 +1,47 @@ +From bf2fc65a5941554c6d76d766ee78e0cac060a1d6 Mon Sep 17 00:00:00 2001 +From: tmp +Date: Mon, 13 Sep 2021 17:28:27 +0800 +Subject: [PATCH] add dependent package to lib + +--- + backend/pom.xml | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/backend/pom.xml b/backend/pom.xml +index 996f4e8..6b77fdd 100644 +--- a/backend/pom.xml ++++ b/backend/pom.xml +@@ -47,6 +47,30 @@ + true + + ++ ++ ++ org.apache.maven.plugins ++ maven-dependency-plugin ++ ++ ++ copy ++ ++ copy ++ ++ package ++ ++ ++ ++ org.apache.sshd ++ sshd-core ++ ${sshd-core.version} ++ ${project.build.directory}/lib ++ ++ ++ ++ ++ ++ + + + +-- +2.27.0 + diff --git a/ovirt-engine.spec b/ovirt-engine.spec index b6469a810c10b7fe8fc5ee1dda0caaa51d825386..9bfd551b39b708a24ce63bf351f45b75813f349b 100644 --- a/ovirt-engine.spec +++ b/ovirt-engine.spec @@ -161,7 +161,7 @@ getent passwd %1 >/dev/null || useradd -r -u %2 -g %3 -c %5 -s /sbin/nologin -d Name: ovirt-engine Version: 4.4.7.7 -Release: 1 +Release: 2 Summary: Management server for Open Virtualization Group: %{ovirt_product_group} License: Apache 2.0 @@ -173,6 +173,7 @@ Source2: xalan-2.7.1.jbossorg-2.jar # version=`grep jsass libsass-maven-plugin-0.2.8-libsass_3.4.4.pom` -A 1| grep "version"|awk -F ">" '{print $2}' | awk -F "<" '{print $1}'` # sed -i "s/$version/5.10.3/g" libsass-maven-plugin-0.2.8-libsass_3.4.4.pom Source3: libsass-maven-plugin-0.2.8-libsass_3.4.4.pom +Patch1: 0001-add-dependent-package-to-lib.patch BuildArch: noarch BuildRequires: assertj-core >= 2.2.0 @@ -321,7 +322,6 @@ Requires: %{name} = %{version}-%{release} Requires: %{name}-extensions-api >= 1.0.0 Requires: aopalliance >= 1.0 Requires: curl -Requires: ebay-cors-filter Requires: httpd Requires: java-11-openjdk-headless >= %{openjdk_version} Requires: logrotate @@ -616,6 +616,7 @@ Setup imageio service. %prep %setup -c -q +%patch1 -p1 mvn install:install-file -DgroupId=io.reactive.rxjava2 -DartifactId=rxjava -Dversion=2.2.4 -Dpackaging=jar -Dfile=%{SOURCE1} mvn install:install-file -DgroupId=xalan -DartifactId=xalan -Dversion=2.7.1.jbossorg-2 -Dpackaging=jar -Dfile=%{SOURCE2} mkdir -p ~/.m2/repository/com/github/warmuuh/libsass-maven-plugin/0.2.8-libsass_3.4.4 @@ -624,6 +625,17 @@ sed -i 's/require=\"10240\";/require=\"1024\";/g' Makefile sed -i 's/MAVEN_OPTS=\"/MAVEN_OPTS=\"-Xmx16384m -Xms16384m /g' Makefile sed -i 's/$(BUILD_FLAGS) \\/-Dgwt.compiler.localWorkers=2 $(BUILD_FLAGS) \\/g' Makefile sed -i '/s validity is {validity_in_days} days./d' packaging/setup/ovirt_engine_setup/engine_common/pki_utils.py +sed -i "s/'fedora'/'fedora', 'openeuler'/g" packaging/setup/ovirt_engine_setup/util.py + +cat <> 10-wsgi-python3.conf + + LoadModule wsgi_module modules/mod_wsgi_python3.so + +EOT + +cat <> gg-sso.conf +SSO_CALLBACK_PREFIX_CHECK=false +EOT %build # Set the location of the JDK that will be used for compilation: @@ -634,17 +646,6 @@ popd make %{make_common_opts} -#pushd frontend/webadmin/modules/webadmin/ -# export MAVEN_OPTS="-Xms16384m -Xmx16384m" -# mvn package -DskipTests -P gwt-admin -P all-user-agents -P all-langs -Dgwt.compiler.localWorkers=2 -#popd -#pushd frontend/webadmin/modules/webadmin/target -# mvn install:install-file -DgroupId=org.ovirt.engine.ui -DartifactId=webadmin -Dversion=4.4.7.7 -Dpackaging=war -Dfile=./webadmin-4.4.7.7.war -#popd -#pushd ear -# mvn package -DskipTests -P gwt-admin -P all-user-agents -P all-langs -#popd - %install rm -fr "%{buildroot}" make %{make_common_opts} install DESTDIR="%{buildroot}" @@ -890,6 +891,14 @@ perl -i -pe 's/^SHA1-Digest: [^\n]+\n//g' "%{buildroot}%{engine_ear}/META-INF/MA %endif +install -dm 755 "%{buildroot}%{_sysconfdir}/httpd/conf.modules.d" +cp 10-wsgi-python3.conf %{buildroot}%{_sysconfdir}/httpd/conf.modules.d +cp gg-sso.conf %{buildroot}%{engine_etc}/engine.conf.d/ + +install -dm 755 "%{buildroot}%{engine_data}/modules/common/org/apache/sshd/main" +cp backend/target/lib/sshd-core-2.6.0.jar %{buildroot}%{engine_data}/modules/common/org/apache/sshd/main +sed -i 's/sshd-core/sshd-core-2.6.0/g' %{buildroot}%{engine_data}/modules/common/org/apache/sshd/main/module.xml + %preun if [ "$1" -eq 0 ]; then # @@ -1073,7 +1082,7 @@ fi %files setup %license LICENSE %dir %{engine_rpm_state_dir} - +%config %{_sysconfdir}/httpd/conf.modules.d/10-wsgi-python3.conf %files setup-plugin-ovirt-engine %license LICENSE @@ -1241,5 +1250,8 @@ fi %{engine_data}/setup/bin/ovirt-engine-health %changelog +* Tue Sep 14 2021 Ge Wang - 4.4.7.7-2 +- Fix access denied and setup error due to sshd-core version mismatch and distribution nonrecognition + * Mon Jul 19 2021 Python_Bot - 4.4.7.7-1 - Init package