From fee79c271a29834b2dfa70c127a894d1a7b0ec03 Mon Sep 17 00:00:00 2001 From: wu-leilei Date: Fri, 13 Jan 2023 17:15:39 +0800 Subject: [PATCH] remove unuse buildrequires git packages --- pki-core.spec | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/pki-core.spec b/pki-core.spec index 5e940b6..38a6d05 100644 --- a/pki-core.spec +++ b/pki-core.spec @@ -1,14 +1,9 @@ %define package_option() %bcond_with %1 -%define debug_package %{nil} %define _unpackaged_files_terminate_build 0 -%define java_devel java-18-openjdk-devel -%define java_headless java-18-openjdk-headless -%define java_home /usr/lib/jvm/jre-18-openjdk - Name: pki-core Version: 11.0.0 -Release: 2 +Release: 5 Summary: The PKI Core Package License: GPLv2 and LGPLv2 URL: http://www.dogtagpki.org/ @@ -17,7 +12,7 @@ Source1: https://github.com/cpuguy83/go-md2man/archive/v1.0.10.tar.g Patch0001: 0001-Disable-access-to-external-entities-when-parsing-XML.patch -BuildRequires: git make cmake >= 2.8.9-1 gcc-c++ zip java-latest-openjdk-devel java-latest-openjdk-headless +BuildRequires: make cmake >= 2.8.9-1 gcc-c++ zip java-latest-openjdk-devel java-latest-openjdk-headless BuildRequires: ldapjdk >= 4.21.0 apache-commons-cli apache-commons-codec apache-commons-io BuildRequires: apache-commons-lang jakarta-commons-httpclient glassfish-jaxb-api slf4j BuildRequires: slf4j-jdk14 nspr-devel nss-devel >= 3.36.1 python3-lxml python3-sphinx @@ -32,7 +27,7 @@ BuildRequires: python3 python3-devel python3-cryptography python3-lxml pyt BuildRequires: python3-nss python3-requests >= 2.6.0 systemd-units tomcat >= 1:9.0.7 BuildRequires: junit jpackage-utils >= 0:1.7.5-10 jss >= 4.6.0 tomcatjss >= 7.4.1 BuildRequires: apr-devel apr-util-devel cyrus-sasl-devel httpd-devel >= 2.4.2 pcre-devel -BuildRequires: systemd zlib zlib-devel nss-tools openssl golang +BuildRequires: systemd zlib zlib-devel nss-tools openssl golang chrpath %description Dogtag PKI is a designed enterprise software system manage enterprise Public Key Infrastructure deployments. @@ -211,6 +206,9 @@ The PKI console is a Java application used to manage the PKI server. tar -xf %{SOURCE1} %build +openjdk_latest_version=`rpm -qi java-latest-openjdk-headless | grep Version | cut -b 15-16` +java_home=/usr/lib/jvm/jre-${openjdk_latest_version}-openjdk + tomcat_version=`/usr/sbin/tomcat version | sed -n 's/Server number: *\([0-9]\+\.[0-9]\+\).*/\1/p'` if [ $tomcat_version == "9.0" ]; then app_server=tomcat-9.0 @@ -227,7 +225,7 @@ cd build %cmake \ --no-warn-unused-cli -DVERSION=%{version}-%{release} \ - -DVAR_INSTALL_DIR:PATH=/var -DJAVA_HOME=%{java_home} \ + -DVAR_INSTALL_DIR:PATH=/var -DJAVA_HOME=${java_home} \ -DJAVA_LIB_INSTALL_DIR=%{_jnidir} -DSYSTEMD_LIB_INSTALL_DIR=%{_unitdir} \ -DAPP_SERVER=$app_server \ -DJAXRS_API_JAR=/usr/share/java/jboss-jaxrs-2.0-api.jar \ @@ -257,6 +255,12 @@ cd build ln -sf /usr/share/java/jboss-annotations-1.2-api/jboss-annotations-api_1.2_spec.jar\ %{buildroot}%{_datadir}/pki/server/common/lib/jboss-annotations-api_1.2_spec.jar +chrpath -d %{buildroot}/%{_bindir}/tpsclient +chrpath -d %{buildroot}/%{_libdir}/tps/libtokendb.so +chrpath -d %{buildroot}/%{_libdir}/tps/libtps.so +mkdir -p %{buildroot}/etc/ld.so.conf.d +echo "%{_libdir}/tps" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf + %pretrans -n pki-base -p function test(a) if posix.stat(a) then @@ -317,6 +321,12 @@ then systemctl daemon-reload fi +%post -n pki-tps +/sbin/ldconfig + +%postun -n pki-tps +/sbin/ldconfig + %files -n pki-symkey %doc base/symkey/LICENSE %{_jnidir}/symkey.jar @@ -429,6 +439,7 @@ fi %{_datadir}/pki/tps/{applets/,conf/,setup/,webapps/} %{_bindir}/tpsclient %{_libdir}/tps/{libtps.so,libtokendb.so} +%config(noreplace) /etc/ld.so.conf.d/* %files -n pki-help %{_javadocdir}/pki/ @@ -444,6 +455,15 @@ fi %endif %changelog +* Thu Dec 01 2022 xu_ping - 11.0.0-5 +- remove unuse buildrequires git packages + +* Wed Nov 23 2022 wulei - 11.0.0-4 +- Rectify the pki-core compilation failure caused by the openjdk-latest upgrade + +* Wed Aug 24 2022 wangkai - 11.0.0-3 +- Remove rpath and enable debuginfo + * Fri Jul 15 2022 yinyongkang - 11.0.0-2 - Type:CVE - ID:CVE-2022-2414