Skip to content

Commit

Permalink
add notice about minimal certificate key length
Browse files Browse the repository at this point in the history
also drop sysv init style 'rc' file for openSUSE >= 16

Signed-off-by: Klaus Kämpf <[email protected]>
  • Loading branch information
kkaempf committed Jan 23, 2025
1 parent d62a968 commit 429e500
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions package/openwsman.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ BuildArch: noarch
This package provides HTML documentation for the OpenWSMAN Ruby
bindings.

%endif # not rhel7
# - endif not rhel7
%endif

%package perl
%if 0%{?fedora}
Expand Down Expand Up @@ -447,31 +448,39 @@ rm -f %{buildroot}/%{_libdir}/%{name}/plugins/*.la
rm -f %{buildroot}/%{_libdir}/%{name}/authenticators/*.la
[ -d %{buildroot}/%{ruby_sitelib} ] && rm -f %{buildroot}/%{ruby_sitelib}/openwsmanplugin.rb
[ -d %{buildroot}/%{ruby_vendorlib} ] && rm -f %{buildroot}/%{ruby_vendorlib}/openwsmanplugin.rb

%if 0%{?has_systemd}
install -D -m 644 %{S:4} %{buildroot}/%{_unitdir}/%{name}.service
%if 0%{?suse_version} < 1600
# rcopenwsman
ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}
%endif
%else
# no systemd, assume sysv style init
mkdir -p %{buildroot}/%{_sysconfdir}/init.d
install -m 755 build/etc/init/openwsmand.sh %{buildroot}/%{_sysconfdir}/init.d/openwsmand
ln -sf %{_sysconfdir}/init.d/openwsmand %{buildroot}/%{_sbindir}/rcopenwsmand
%endif

%if 0%{?has_firewalld}
mkdir -p %{buildroot}/%{_prefix}/lib/firewalld/services
install -D -m 644 %{S:5} %{buildroot}/%{_prefix}/lib/firewalld/services/%{name}.xml
%else
install -D -m 644 %{S:3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
%endif

#install -m 644 etc/%{name}.conf %{buildroot}/%{_sysconfdir}/%{name}
#install -m 644 etc/openwsman_client.conf %{buildroot}/%{_sysconfdir}/%{name}
#install -m 644 etc/ssleay.cnf %{buildroot}/%{_sysconfdir}/%{name}
#install -m 644 %{pamfile} %{buildroot}/%{_sysconfdir}/pam.d/%{name}

%if 0%{?suse_version} > 1500
mkdir -p %{buildroot}%{_pam_vendordir}
mv %{buildroot}/%{_sysconfdir}/pam.d/%{name} %{buildroot}/%{_pam_vendordir}
# for reproducible build:
strip-nondeterminism %{buildroot}/%{_javadir}/*jar
%endif

%if 0%{?rhel_version} == 700
rm -f %{buildroot}/%{_bindir}/winrs
%endif
Expand Down Expand Up @@ -499,6 +508,7 @@ done
for i in pam.d/%{name} ; do
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||:
done
echo Server certificates length must be 2048 bits or more. Check and recreate certificates if needed.
%endif

%post server
Expand Down Expand Up @@ -601,7 +611,8 @@ rm -f /var/log/wsmand.log
%defattr(-,root,root)
%dir %{_docdir}/%{name}-ruby-docs
%{_docdir}/%{name}-ruby-docs
%endif # not rhel-7
# - endif not rhel-7
%endif

%files perl
%defattr(-,root,root)
Expand Down Expand Up @@ -635,7 +646,9 @@ rm -f /var/log/wsmand.log
%endif
%if 0%{?has_systemd}
%{_unitdir}/%{name}.service
%if 0%{?suse_version} < 1600
%{_sbindir}/rc%{name}
%endif
%else
%attr(0755,root,root) %{_sysconfdir}/init.d/openwsmand
%{_sbindir}/rc%{name}d
Expand Down

0 comments on commit 429e500

Please sign in to comment.