From 7247ea5ec174aff6777e1d611a179521fa4a8fc2 Mon Sep 17 00:00:00 2001 From: Alexey Tikhonov Date: Sat, 6 Apr 2024 11:47:06 +0200 Subject: [PATCH] SPEC: don't package man pages and translations --- contrib/sssd.spec.in | 149 +++++-------------------------------------- 1 file changed, 16 insertions(+), 133 deletions(-) diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index cc6bd604fb5..be6954353ed 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -562,6 +562,7 @@ autoreconf -ivf --with-ssh-known-hosts-proxy \ %endif --without-selinux \ + --without-manpages \ %{nil} %make_build all docs runstatedir=%{_rundir} @@ -578,9 +579,6 @@ unset CK_TIMEOUT_MULTIPLIER %make_install -# Prepare language files -/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT sssd - # Copy default logrotate file mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d install -m644 src/examples/logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/sssd @@ -621,93 +619,8 @@ find $RPM_BUILD_ROOT -name "*.la" -exec rm -f {} \; # Suppress developer-only documentation rm -Rf ${RPM_BUILD_ROOT}/%{_docdir}/%{name} -# Older versions of rpmbuild can only handle one -f option -# So we need to append to the sssd*.lang file -for file in `find $RPM_BUILD_ROOT/%{python3_sitelib} -maxdepth 1 -name "*.egg-info" 2> /dev/null` -do - echo %{python3_sitelib}/`basename $file` >> python3_sssdconfig.lang -done - -touch sssd.lang -for subpackage in sssd_ldap sssd_krb5 sssd_ipa sssd_ad sssd_proxy sssd_tools \ - sssd_client sssd_dbus sssd_nfs_idmap sssd_winbind_idmap \ - libsss_certmap sssd_kcm -do - touch $subpackage.lang -done - -for man in `find $RPM_BUILD_ROOT/%{_mandir}/??/man?/ -type f | sed -e "s#$RPM_BUILD_ROOT/%{_mandir}/##"` -do - lang=`echo $man | cut -c 1-2` - case `basename $man` in - sss_cache*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd.lang - ;; - sss_ssh*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd.lang - ;; - sss_rpcidmapd*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_nfs_idmap.lang - ;; - sss_*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_tools.lang - ;; - sssctl*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_tools.lang - ;; - sssd_krb5_*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_client.lang - ;; - pam_sss*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_client.lang - ;; - sssd-ldap*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_ldap.lang - ;; - sssd-krb5*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_krb5.lang - ;; - sssd-ipa*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_ipa.lang - ;; - sssd-ad*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_ad.lang - ;; - sssd-proxy*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_proxy.lang - ;; - sssd-ifp*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_dbus.lang - ;; - sssd-kcm*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_kcm.lang - ;; - idmap_sss*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_winbind_idmap.lang - ;; - sss-certmap*) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> libsss_certmap.lang - ;; - *) - echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd.lang - ;; - esac -done - -# Print these to the rpmbuild log -echo "sssd.lang:" -cat sssd.lang - -echo "python3_sssdconfig.lang:" -cat python3_sssdconfig.lang - -for subpackage in sssd_ldap sssd_krb5 sssd_ipa sssd_ad sssd_proxy sssd_tools \ - sssd_client sssd_dbus sssd_nfs_idmap sssd_winbind_idmap \ - libsss_certmap sssd_kcm -do - echo "$subpackage.lang:" - cat $subpackage.lang -done +rm -Rf ${RPM_BUILD_ROOT}/usr/share/locale/* +rm -Rf ${RPM_BUILD_ROOT}/%{python3_sitelib}/SSSDConfig-*egg-info %if %{use_sysusers} install -D -p -m 0644 contrib/sssd.sysusers %{buildroot}%{_sysusersdir}/sssd.conf @@ -716,7 +629,7 @@ install -D -p -m 0644 contrib/sssd.sysusers %{buildroot}%{_sysusersdir}/sssd.con %files %license COPYING -%files common -f sssd.lang +%files common %license COPYING %doc src/examples/sssd-example.conf %{_sbindir}/sssd @@ -782,17 +695,6 @@ install -D -p -m 0644 contrib/sssd.sysusers %{buildroot}%{_sysusersdir}/sssd.con %{_libdir}/%{name}/conf/sssd.conf %{_datadir}/sssd/cfg_rules.ini -%{_mandir}/man1/sss_ssh_authorizedkeys.1* -%{_mandir}/man1/sss_ssh_knownhosts.1* -%if %{build_ssh_known_hosts_proxy} -%{_mandir}/man1/sss_ssh_knownhostsproxy.1* -%endif -%{_mandir}/man5/sssd.conf.5* -%{_mandir}/man5/sssd-simple.5* -%{_mandir}/man5/sssd-sudo.5* -%{_mandir}/man5/sssd-session-recording.5* -%{_mandir}/man8/sssd.8* -%{_mandir}/man8/sss_cache.8* %if %{use_sysusers} %{_sysusersdir}/sssd.conf %endif @@ -803,11 +705,9 @@ install -D -p -m 0644 contrib/sssd.sysusers %{buildroot}%{_sysusersdir}/sssd.con %{_datadir}/polkit-1/rules.d/* %endif -%files ldap -f sssd_ldap.lang +%files ldap %license COPYING %{_libdir}/%{name}/libsss_ldap.so -%{_mandir}/man5/sssd-ldap.5* -%{_mandir}/man5/sssd-ldap-attributes.5* %files krb5-common %license COPYING @@ -815,10 +715,9 @@ install -D -p -m 0644 contrib/sssd.sysusers %{buildroot}%{_sysusersdir}/sssd.con %attr(0750,root,%{sssd_user}) %caps(%{child_capabilities}) %{_libexecdir}/%{servicename}/ldap_child %attr(0750,root,%{sssd_user}) %caps(%{child_capabilities}) %{_libexecdir}/%{servicename}/krb5_child -%files krb5 -f sssd_krb5.lang +%files krb5 %license COPYING %{_libdir}/%{name}/libsss_krb5.so -%{_mandir}/man5/sssd-krb5.5* %config(noreplace) %{_sysconfdir}/krb5.conf.d/enable_sssd_conf_dir %dir %{_datadir}/sssd/krb5-snippets %{_datadir}/sssd/krb5-snippets/enable_sssd_conf_dir @@ -827,32 +726,29 @@ install -D -p -m 0644 contrib/sssd.sysusers %{buildroot}%{_sysusersdir}/sssd.con %license COPYING %{_libexecdir}/%{servicename}/sssd_pac -%files ipa -f sssd_ipa.lang +%files ipa %license COPYING %attr(770,%{sssd_user},%{sssd_user}) %dir %{keytabdir} %{_libdir}/%{name}/libsss_ipa.so -%{_mandir}/man5/sssd-ipa.5* -%files ad -f sssd_ad.lang +%files ad %license COPYING %{_libdir}/%{name}/libsss_ad.so %{_libexecdir}/%{servicename}/gpo_child -%{_mandir}/man5/sssd-ad.5* %files proxy %license COPYING %{_libexecdir}/%{servicename}/proxy_child %{_libdir}/%{name}/libsss_proxy.so -%files dbus -f sssd_dbus.lang +%files dbus %license COPYING %{_libexecdir}/%{servicename}/sssd_ifp -%{_mandir}/man5/sssd-ifp.5* # InfoPipe DBus plumbing %{_datadir}/dbus-1/system.d/org.freedesktop.sssd.infopipe.conf %{_datadir}/dbus-1/system-services/org.freedesktop.sssd.infopipe.service -%files client -f sssd_client.lang +%files client %license src/sss_client/COPYING src/sss_client/COPYING.LESSER %{_libdir}/libnss_sss.so.2 %if %{build_subid} @@ -869,10 +765,6 @@ install -D -p -m 0644 contrib/sssd.sysusers %{buildroot}%{_sysusersdir}/sssd.con %dir %{_libdir}/%{name} %dir %{_libdir}/%{name}/modules %{_libdir}/%{name}/modules/sssd_krb5_localauth_plugin.so -%{_mandir}/man8/pam_sss.8* -%{_mandir}/man8/pam_sss_gss.8* -%{_mandir}/man8/sssd_krb5_locator_plugin.8* -%{_mandir}/man8/sssd_krb5_localauth_plugin.8* %files -n libsss_sudo %license src/sss_client/COPYING @@ -883,7 +775,7 @@ install -D -p -m 0644 contrib/sssd.sysusers %{buildroot}%{_sysusersdir}/sssd.con %dir %{_libdir}/%{name}/modules %{_libdir}/%{name}/modules/libsss_autofs.so -%files tools -f sssd_tools.lang +%files tools %license COPYING %{_sbindir}/sss_obfuscate %{_sbindir}/sss_override @@ -892,13 +784,8 @@ install -D -p -m 0644 contrib/sssd.sysusers %{buildroot}%{_sysusersdir}/sssd.con %{_sbindir}/sssctl %{_libexecdir}/%{servicename}/sss_analyze %{python3_sitelib}/sssd/ -%{_mandir}/man8/sss_obfuscate.8* -%{_mandir}/man8/sss_override.8* -%{_mandir}/man8/sss_debuglevel.8* -%{_mandir}/man8/sss_seed.8* -%{_mandir}/man8/sssctl.8* -%files -n python3-sssdconfig -f python3_sssdconfig.lang +%files -n python3-sssdconfig %dir %{python3_sitelib}/SSSDConfig %{python3_sitelib}/SSSDConfig/*.py* %dir %{python3_sitelib}/SSSDConfig/__pycache__ @@ -949,19 +836,16 @@ install -D -p -m 0644 contrib/sssd.sysusers %{buildroot}%{_sysusersdir}/sssd.con %files -n python3-libipa_hbac %{python3_sitearch}/pyhbac.so -%files winbind-idmap -f sssd_winbind_idmap.lang +%files winbind-idmap %dir %{_libdir}/samba/idmap %{_libdir}/samba/idmap/sss.so -%{_mandir}/man8/idmap_sss.8* -%files nfs-idmap -f sssd_nfs_idmap.lang -%{_mandir}/man5/sss_rpcidmapd.5* +%files nfs-idmap %{_libdir}/libnfsidmap/sss.so -%files -n libsss_certmap -f libsss_certmap.lang +%files -n libsss_certmap %license src/sss_client/COPYING src/sss_client/COPYING.LESSER %{_libdir}/libsss_certmap.so.* -%{_mandir}/man5/sss-certmap.5* %files -n libsss_certmap-devel %doc certmap_doc/html @@ -969,12 +853,11 @@ install -D -p -m 0644 contrib/sssd.sysusers %{buildroot}%{_sysusersdir}/sssd.con %{_libdir}/libsss_certmap.so %{_libdir}/pkgconfig/sss_certmap.pc -%files kcm -f sssd_kcm.lang +%files kcm %{_libexecdir}/%{servicename}/sssd_kcm %config(noreplace) %{_sysconfdir}/krb5.conf.d/kcm_default_ccache %dir %{_datadir}/sssd-kcm %{_datadir}/sssd-kcm/kcm_default_ccache -%{_mandir}/man8/sssd-kcm.8* %files idp %{_libexecdir}/%{servicename}/oidc_child