JPackage jpackage-utils compatibility for CentOS 5.x
A possible workaround for the error message "Missing Dependency: /usr/bin/rebuild-security-providers is needed by package"
This is a workaround for the error "Missing Dependency: /usr/bin/rebuild-security-providers is needed by package" as presented by Rob Myers.
Build the RPM
Install rpm build to create the 'noarch' binary RPM.
# yum install rpm-build
Set up a rpm build environment for a non-root user to build the rpm.
$ echo "%_topdir $HOME/rpmbuild" >> .rpmmacros
$ mkdir -p rpmbuild/{SRPMS,RPMS,SPECS,BUILD,SOURCES}
Build the rpm using the sample spec file :
$ rpmbuild -ba jpackage-utils-compat-el5.spec
The 'noarch' binary RPM is:
md5: 9e96c5ec0e95381625b593b1d65c35dc rpmbuild/RPMS/noarch/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm
sha1: 25d89ecbcbdbbb067ea717aa3a319e66ef64cbe6 rpmbuild/RPMS/noarch/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm
Install
Install the binary RPM on the target machine:
# rpm -Uvh http://plone.lucidsolutions.co.nz/linux/centos/images/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm
Links
http://www.zarb.org/pipermail/jpackage-discuss/2008-July/012751.html
/usr/bin/rebuild-security-providers bug 260161
References
spec file
Name: jpackage-utils-compat-el5
Version: 0.0.1
Release: 1%{?dist}%{?repo}
Epoch: 0
Summary: Compatibility For RHEL5 and JPackage
License: GPL
URL: http://rmyers.fedorapeople.org/jpackage-utils-compat-el5
Group: Utilities
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
Requires: /bin/bash
%description
Compatibility for JPackage Utils between RHEL5 and the JPackage Project.
%prep
# no setup
%build
# no building
%install
rm -rf $RPM_BUILD_ROOT
install -dm 755 ${RPM_BUILD_ROOT}%{_bindir}
install -dm 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/java/security
install -dm 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/java/security/security.d
pushd ${RPM_BUILD_ROOT}%{_bindir}
cat > rebuild-security-providers << EOF
#!/bin/bash
# Rebuild the list of security providers in classpath.security
secfiles="/usr/lib/security/classpath.security /usr/lib64/security/classpath.security"
for secfile in \$secfiles; do
# check if this classpath.security file exists
[ -f "\$secfile" ] || continue
sed -i '/^security\.provider\./d' "\$secfile"
count=0
for provider in \$(ls /etc/java/security/security.d)
do
count=\$((count + 1))
echo "security.provider.\${count}=\${provider#*-}" >> "\$secfile"
done
done
EOF
popd
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_bindir}/rebuild-security-providers
%{_sysconfdir}/java/security
%{_sysconfdir}/java/security/security.d
%changelog
* Thu Jul 3 2008 Rob Myers <rob.myers at gtri.gatech.edu> - 0:0.0.1-1%{?dist}%{?repo}
- initial release
yum update error message
--> Processing Dependency: /usr/bin/rebuild-security-providers for package: java-1.4.2-gcj-compat --> Finished Dependency Resolution java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64 from installed has depsolving problems --> Missing Dependency: /usr/bin/rebuild-security-providers is needed by package java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64 (installed) Error: Missing Dependency: /usr/bin/rebuild-security-providers is needed by package java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64 (installed)

