!11 [sync] PR-10: 升级otopi至1.10.0版本

From: @openeuler-sync-bot 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
This commit is contained in:
openeuler-ci-bot 2022-04-24 02:41:54 +00:00 committed by Gitee
commit 9a8d3e3224
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 22 additions and 139 deletions

BIN
otopi-1.10.0.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -2,20 +2,13 @@
# otopi -- plugable installer # otopi -- plugable installer
# #
%global package_version 1.9.4 %global package_version 1.10.0
%global package_maven_version 1.9.4
%global _use_maven 1
%global _use_repolib 0
%global maven2brewrepodir %{_javadir}/repository.jboss.com/maven2-brew/dummy
%global _configure ../configure
%global src_java_dir src/java
Summary: oVirt Task Oriented Pluggable Installer/Implementation (%{name}) Summary: oVirt Task Oriented Pluggable Installer/Implementation (%{name})
Name: otopi Name: otopi
Version: 1.9.4 Version: 1.10.0
Release: 2 Release: 1
License: LGPLv2+ License: LGPLv2+
URL: http://www.ovirt.org URL: http://www.ovirt.org
Source0: http://resources.ovirt.org/pub/src/%{name}/%{name}-%{package_version}.tar.gz Source0: http://resources.ovirt.org/pub/src/%{name}/%{name}-%{package_version}.tar.gz
@ -23,24 +16,9 @@ Group: Development/Libraries
BuildArch: noarch BuildArch: noarch
BuildRequires: apache-commons-logging
BuildRequires: java-devel
BuildRequires: junit
BuildRequires: gettext >= 0.18.2 BuildRequires: gettext >= 0.18.2
BuildRequires: javapackages-tools
BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: gcc
%if %{_use_maven}
BuildRequires: maven-compiler-plugin
BuildRequires: maven-enforcer-plugin
BuildRequires: maven-install-plugin
BuildRequires: maven-jar-plugin
BuildRequires: maven-source-plugin
BuildRequires: maven-surefire-provider-junit
BuildRequires: maven-local
%endif
%description %description
Standalone plugin based installation framework to be used to setup Standalone plugin based installation framework to be used to setup
@ -48,54 +26,29 @@ system components. The plugin nature provides simplicity to
add new installation functionality without the complexity of the state add new installation functionality without the complexity of the state
and transaction management. and transaction management.
%package -n python%{python3_pkgversion}-%{name} %package -n python%{python3_pkgversion}-%{name}
Summary: %{summary} Summary: %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}
Requires: python%{python3_pkgversion} >= 3.6.0 Requires: python%{python3_pkgversion} >= 3.6.0
Requires: python%{python3_pkgversion}-dateutil Requires: python%{python3_pkgversion}-dateutil
Requires: python%{python3_pkgversion}-distro
Requires: %{name}-common = %{version}-%{release} Requires: %{name}-common = %{version}-%{release}
Provides: %{name} = %{version}-%{release} Provides: %{name} = %{version}-%{release}
Obsoletes: %{name} < %{version}-%{release} Obsoletes: python%{python3_pkgversion}-%{name}-devtools
%description -n python%{python3_pkgversion}-%{name} %description -n python%{python3_pkgversion}-%{name}
%{summary}. %{summary}.
Python %{python3_pkgversion} version. Python %{python3_pkgversion} version.
%package -n python%{python3_pkgversion}-otopi-devtools
Summary: %{name} development tools
Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release}
%description -n python%{python3_pkgversion}-otopi-devtools
Development tools for %{name}.
Python %{python3_pkgversion} version.
%package common %package common
Summary: Commong files for %{name} Summary: Common files for %{name}
Obsoletes: %{name}-java
%description common %description common
%{summary} %{summary}
%package java
Summary: %{name} java support
Requires: %{name} = %{version}-%{release}
Requires: java-headless
Requires: apache-commons-logging
%description java
java libraries.
%if %{_use_maven}
%package javadoc
Summary: Javadocs for %{name}
Group: Documentation
%description javadoc
This package contains the API documentation for %{name}.
%endif
%package debug-plugins %package debug-plugins
Summary: %{name} debug plugins Summary: %{name} debug plugins
@ -104,85 +57,22 @@ Requires: %{name} = %{version}-%{release}
%description debug-plugins %description debug-plugins
Debug plugins for %{name}. Debug plugins for %{name}.
%if 0%{?_use_repolib:1}
%package repolib
Summary: %{name} maven repo
%description repolib
%{name} maven repo
%endif
%prep %prep
%setup -q -n %{name}-%{package_version} %setup -q -n %{name}-%{package_version}
%pom_remove_plugin :maven-javadoc-plugin src/java/pom.xml.in
%pom_remove_plugin :nexus-staging-maven-plugin src/java/pom.xml.in
mkdir py3
%build %build
%if %{_use_maven}
%global conf --disable-java-sdk-compile
%else
%global conf COMMONS_LOGGING_JAR=$(build-classpath commons-logging) JUNIT_JAR=$((build-classpath junit4 || build-classpath junit) | sed '/^$/d')
%endif
pushd py3
# Build python but don't touch java
%configure PYTHON="%{__python3}" \ %configure PYTHON="%{__python3}" \
--docdir="%{_docdir}/%{name}-%{version}" \ --docdir="%{_docdir}/%{name}-%{version}" \
--disable-python-syntax-check \ --disable-python-syntax-check \
--disable-java-sdk-compile \
--with-local-version="%{name}-%{version}-%{release}" \ --with-local-version="%{name}-%{version}-%{release}" \
%{?conf} %{?conf}
make %{?_smp_mflags} make %{?_smp_mflags}
popd
# This takes care of codegen for java and building java
# We don't really care about which version of python is used to generate
# java code since the generated code is not depending on interpreter version.
./configure \
--docdir="%{_docdir}/%{name}-%{version}" \
--disable-python-syntax-check \
--enable-java-sdk \
--with-local-version="%{name}-%{version}-%{release}" \
%{?conf}
make %{?_smp_mflags}
%if %{_use_maven}
pushd %{src_java_dir}
%mvn_build
popd
%endif
%install %install
make %{?_smp_mflags} install DESTDIR="%{buildroot}"
make -C py3 %{?_smp_mflags} install DESTDIR="%{buildroot}"
# Point to otopi2 binaries by default
%if %{_use_maven}
pushd %{src_java_dir}
%mvn_install
popd
%else
install -d "%{buildroot}%{_javadir}/%{name}"
install -m 644 target/%{name}-%{package_maven_version}.jar "%{buildroot}%{_javadir}/%{name}"
ln -s %{name}-%{package_maven_version}.jar "%{buildroot}%{_javadir}/%{name}/%{name}.jar"
cat > %{src_java_dir}/.mfiles << __EOF__
%{_javadir}/%{name}/
__EOF__
%endif
%if %{_use_repolib}
install -d "%{buildroot}%{maven2brewrepodir}"
cp "%{buildroot}%{_javadir}/%{name}/%{name}.jar" "%{buildroot}%{maven2brewrepodir}/%{name}-%{package_maven_version}.jar"
cp %{src_java_dir}/pom.xml "%{buildroot}%{maven2brewrepodir}/%{name}-%{package_maven_version}.pom"
%endif
install -d -m 755 "%{buildroot}%{_sysconfdir}/%{name}.conf.d" install -d -m 755 "%{buildroot}%{_sysconfdir}/%{name}.conf.d"
%find_lang %{name} %find_lang %{name}
@ -191,17 +81,18 @@ install -d -m 755 "%{buildroot}%{_sysconfdir}/%{name}.conf.d"
%doc AUTHORS %doc AUTHORS
%license COPYING %license COPYING
%license LICENSE %license LICENSE
%doc README %doc README.md
%doc README.API %doc README.API
%doc README.config-query %doc README.config-query
%doc README.debug-plugins %doc README.debug-plugins
%doc README.dialog %doc README.dialog
%doc README.environment %doc README.environment
%exclude %{python3_sitelib}/%{name}/codegen/
%{python3_sitelib}/%{name}/ %{python3_sitelib}/%{name}/
%files common -f %{name}.lang %files common -f %{name}.lang
%doc AUTHORS
%license COPYING
%license LICENSE
%dir %{_datadir}/%{name} %dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/plugins %dir %{_datadir}/%{name}/plugins
%dir %{_sysconfdir}/%{name}.conf.d %dir %{_sysconfdir}/%{name}.conf.d
@ -213,28 +104,20 @@ install -d -m 755 "%{buildroot}%{_sysconfdir}/%{name}.conf.d"
%{_datadir}/%{name}/%{name}-functions %{_datadir}/%{name}/%{name}-functions
%exclude %{_datadir}/%{name}/plugins/%{name}/debug/ %exclude %{_datadir}/%{name}/plugins/%{name}/debug/
%files java -f %{src_java_dir}/.mfiles
%if %{_use_maven}
%files javadoc -f %{src_java_dir}/.mfiles-javadoc
%endif
%files -n python%{python3_pkgversion}-otopi-devtools
%{python3_sitelib}/%{name}/codegen/
%files debug-plugins %files debug-plugins
%{_datadir}/%{name}/plugins/%{name}/debug/ %{_datadir}/%{name}/plugins/%{name}/debug/
%license COPYING
%if %{_use_repolib} %license LICENSE
%files repolib %doc AUTHORS
%{maven2brewrepodir}/ %doc README.debug-plugins
%endif
%changelog %changelog
* Sun Apr 24 2022 wangdi <wangdi@kylinos.cn> - 1.10.0-1
- Bump package version to 1.10.0, to support python version 3.8 or higher
* Sat Sep 04 2021 huanghaitao <huanghaitao8@huawei.com> - 1.9.4-2 * Sat Sep 04 2021 huanghaitao <huanghaitao8@huawei.com> - 1.9.4-2
- Fix otopi package missing error,provides by python3-otopi - Fix otopi package missing error,provides by python3-otopi
* Mon Jul 05 2021 lijunwei <lijunwei@kylinos.cn> - 1.9.4-1 * Mon Jul 05 2021 lijunwei <lijunwei@kylinos.cn> - 1.9.4-1
- Init package - Init package