URL: https://github.com/SSSD/sssd/pull/191
Author: lslebodn
 Title: #191: Few spec file fixes
Action: opened

PR body:
"""
Mostly related to https://pagure.io/SSSD/sssd/issue/3327
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/191/head:pr191
git checkout pr191
From b7c4ae044dfdf036f38e41757f23916b7b51cc53 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Fri, 10 Mar 2017 13:06:42 +0100
Subject: [PATCH 1/9] SPEC: Update processing of translation in %install

---
 contrib/sssd.spec.in | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 5bd2beb..e3573d4 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -744,11 +744,9 @@ done
 %endif
 
 touch sssd.lang
-touch sssd_tools.lang
-touch sssd_client.lang
-for provider in ldap krb5 ipa ad proxy
+for subpackage in ldap krb5 ipa ad proxy tools client
 do
-    touch sssd_$provider.lang
+    touch sssd_$subpackage.lang
 done
 
 for man in `find $RPM_BUILD_ROOT/%{_mandir}/??/man?/ -type f | sed -e "s#$RPM_BUILD_ROOT/%{_mandir}/##"`
@@ -788,6 +786,24 @@ do
     esac
 done
 
+# Print these to the rpmbuild log
+echo "sssd.lang:"
+cat sssd.lang
+
+echo "python2_sssdconfig.lang:"
+cat python2_sssdconfig.lang
+
+%if (0%{?with_python3} == 1)
+echo "python3_sssdconfig.lang:"
+cat python3_sssdconfig.lang
+%endif
+
+for subpackage in ldap krb5 ipa ad proxy tools client
+do
+    echo "sssd_$provider.lang:"
+    cat sssd_$provider.lang
+done
+
 %files
 %defattr(-,root,root,-)
 %doc COPYING

From f18c8a0bbf9ed6b93519033f2d90bcec781df310 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Fri, 10 Mar 2017 12:49:40 +0100
Subject: [PATCH 2/9] SPEC: Move systemd service sssd-ifp.service to right
 package

Explanation

Resolves:
https://pagure.io/SSSD/sssd/issue/XXXX
---
 contrib/sssd.spec.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index e3573d4..29f89e5 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -817,7 +817,6 @@ done
 %{_unitdir}/sssd.service
 %{_unitdir}/sssd-autofs.socket
 %{_unitdir}/sssd-autofs.service
-%{_unitdir}/sssd-ifp.service
 %{_unitdir}/sssd-nss.socket
 %{_unitdir}/sssd-nss.service
 %{_unitdir}/sssd-pac.socket
@@ -976,6 +975,9 @@ done
 %doc COPYING
 %{_libexecdir}/%{servicename}/sssd_ifp
 %{_mandir}/man5/sssd-ifp.5*
+%if (0%{?use_systemd} == 1)
+%{_unitdir}/sssd-ifp.service
+%endif
 # InfoPipe DBus plumbing
 %{_sysconfdir}/dbus-1/system.d/org.freedesktop.sssd.infopipe.conf
 %{_datadir}/dbus-1/system-services/org.freedesktop.sssd.infopipe.service

From a06628b956b02da7137992510363be008e6b52c4 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Fri, 10 Mar 2017 12:55:39 +0100
Subject: [PATCH 3/9] SPEC: Add missing scriptlets for package sssd-dbus

---
 contrib/sssd.spec.in | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 29f89e5..4fb6e38 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -1210,6 +1210,15 @@ getent passwd sssd >/dev/null || useradd -r -g sssd -d / -s /sbin/nologin -c "Us
 %systemd_postun_with_restart sssd-sudo.socket
 %systemd_postun_with_restart sssd-sudo.service
 
+%post dbus
+%systemd_post sssd-ifp.service
+
+%preun dbus
+%systemd_preun sssd-ifp.service
+
+%postun dbus
+%systemd_postun_with_restart sssd-ifp.service
+
 %else
 # sysv
 %post common

From 095cd602ef7745c6f8b227bd2f9d0f3b76308f49 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Fri, 10 Mar 2017 13:13:35 +0100
Subject: [PATCH 4/9] SPEC: Use correct package for translated sssd-ifp man
 page

Resolves:
https://pagure.io/SSSD/sssd/issue/3327
---
 contrib/sssd.spec.in | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 4fb6e38..9d0f9c5 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -744,7 +744,7 @@ done
 %endif
 
 touch sssd.lang
-for subpackage in ldap krb5 ipa ad proxy tools client
+for subpackage in ldap krb5 ipa ad proxy tools client dbus
 do
     touch sssd_$subpackage.lang
 done
@@ -780,6 +780,9 @@ do
         sssd-proxy*)
             echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_proxy.lang
             ;;
+        sssd-ifp*)
+            echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_dbus.lang
+            ;;
         *)
             echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd.lang
             ;;
@@ -798,7 +801,7 @@ echo "python3_sssdconfig.lang:"
 cat python3_sssdconfig.lang
 %endif
 
-for subpackage in ldap krb5 ipa ad proxy tools client
+for subpackage in ldap krb5 ipa ad proxy tools client dbus
 do
     echo "sssd_$provider.lang:"
     cat sssd_$provider.lang
@@ -970,7 +973,7 @@ done
 %attr(4750,root,sssd) %{_libexecdir}/%{servicename}/proxy_child
 %{_libdir}/%{name}/libsss_proxy.so
 
-%files dbus
+%files dbus -f sssd_dbus.lang
 %defattr(-,root,root,-)
 %doc COPYING
 %{_libexecdir}/%{servicename}/sssd_ifp

From fe770ad4236767de4f18c68e5eaf47480072f2ad Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Fri, 10 Mar 2017 12:48:22 +0100
Subject: [PATCH 5/9] SPEC: Move man page for sss_rpcidmapd to the right
 package

Patch also fixes location of translated manual pages

Resolves:
https://pagure.io/SSSD/sssd/issue/3327
---
 contrib/sssd.spec.in | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 9d0f9c5..f799bd6 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -744,7 +744,7 @@ done
 %endif
 
 touch sssd.lang
-for subpackage in ldap krb5 ipa ad proxy tools client dbus
+for subpackage in ldap krb5 ipa ad proxy tools client dbus nfs_idmap
 do
     touch sssd_$subpackage.lang
 done
@@ -756,6 +756,9 @@ do
         sss_cache*)
             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
             ;;
@@ -801,7 +804,7 @@ echo "python3_sssdconfig.lang:"
 cat python3_sssdconfig.lang
 %endif
 
-for subpackage in ldap krb5 ipa ad proxy tools client dbus
+for subpackage in ldap krb5 ipa ad proxy tools client dbus nfs_idmap
 do
     echo "sssd_$provider.lang:"
     cat sssd_$provider.lang
@@ -910,7 +913,6 @@ done
 %{_mandir}/man5/sssd-simple.5*
 %{_mandir}/man5/sssd-sudo.5*
 %{_mandir}/man5/sssd-secrets.5*
-%{_mandir}/man5/sss_rpcidmapd.5*
 %{_mandir}/man8/sssd.8*
 %{_mandir}/man8/sss_cache.8*
 %if (0%{?enable_systemtap} == 1)
@@ -1164,7 +1166,8 @@ done
 %{_libdir}/samba/idmap/sss.so
 %{_mandir}/man8/idmap_sss.8*
 
-%files nfs-idmap
+%files nfs-idmap -f sssd_nfs_idmap.lang
+%{_mandir}/man5/sss_rpcidmapd.5*
 %{_libdir}/libnfsidmap/sss.so
 
 %pre common

From 8ab156691aee3fdb24e91a73c18f5152ae146742 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Fri, 10 Mar 2017 12:51:23 +0100
Subject: [PATCH 6/9] SPEC: Use correct package for translated sss_ssh* man
 pages

Resolves:
https://pagure.io/SSSD/sssd/issue/3327
---
 contrib/sssd.spec.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index f799bd6..34b692f 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -756,6 +756,9 @@ do
         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
             ;;

From 7b2363308ba78c5b3ecc3de337846fa41ae3d50b Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Fri, 10 Mar 2017 13:23:23 +0100
Subject: [PATCH 7/9] SPEC: Use correct package for translated sssctl man pages

Resolves:
https://pagure.io/SSSD/sssd/issue/3327
---
 contrib/sssd.spec.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 34b692f..9ed5e0d 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -765,6 +765,9 @@ do
         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
             ;;

From a240e3eb0a08c02f8f4fdf55868f6358defa1d14 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Fri, 10 Mar 2017 13:30:43 +0100
Subject: [PATCH 8/9] SPEC: Use correct package for translated idmap_sss man
 pages

Resolves:
https://pagure.io/SSSD/sssd/issue/3327
---
 contrib/sssd.spec.in | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 9ed5e0d..e0d37cd 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -744,7 +744,7 @@ done
 %endif
 
 touch sssd.lang
-for subpackage in ldap krb5 ipa ad proxy tools client dbus nfs_idmap
+for subpackage in ldap krb5 ipa ad proxy tools client dbus nfs_idmap sssd_winbind_idmap
 do
     touch sssd_$subpackage.lang
 done
@@ -792,6 +792,9 @@ do
         sssd-ifp*)
             echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_dbus.lang
             ;;
+        idmap_sss*)
+            echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_winbind_idmap.lang
+            ;;
         *)
             echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd.lang
             ;;
@@ -810,7 +813,7 @@ echo "python3_sssdconfig.lang:"
 cat python3_sssdconfig.lang
 %endif
 
-for subpackage in ldap krb5 ipa ad proxy tools client dbus nfs_idmap
+for subpackage in ldap krb5 ipa ad proxy tools client dbus nfs_idmap sssd_winbind_idmap
 do
     echo "sssd_$provider.lang:"
     cat sssd_$provider.lang
@@ -1167,7 +1170,7 @@ done
 %{_libdir}/%{name}/modules/libwbclient.so
 %{_libdir}/pkgconfig/wbclient_sssd.pc
 
-%files winbind-idmap
+%files winbind-idmap -f sssd_winbind_idmap.lang
 %dir %{_libdir}/samba/idmap
 %{_libdir}/samba/idmap/sss.so
 %{_mandir}/man8/idmap_sss.8*

From 738ebe1675377d2539d53b746154f22c6154336f Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Fri, 10 Mar 2017 13:34:37 +0100
Subject: [PATCH 9/9] SPEC: Move files provider files within package

It is a cosmetic change to group similar files together
(e.g. man pages).

The same order is in fedora downstream spec file.
It simplify comparison of changes between spec files.
---
 contrib/sssd.spec.in | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index e0d37cd..a2712b0 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -863,6 +863,8 @@ done
 %endif
 
 %dir %{_libdir}/%{name}
+# The files provider is intentionally packaged in -common
+%{_libdir}/%{name}/libsss_files.so
 %{_libdir}/%{name}/libsss_simple.so
 
 #Internal shared libraries
@@ -881,10 +883,6 @@ done
 %{_sbindir}/sss_cache
 %{_libexecdir}/%{servicename}/sss_signal
 
-# The files provider is intentionally packaged in -common
-%{_libdir}/%{name}/libsss_files.so
-%{_mandir}/man5/sssd-files.5*
-
 %dir %{sssdstatedir}
 %dir %{_localstatedir}/cache/krb5rcache
 %attr(700,sssd,sssd) %dir %{dbpath}
@@ -919,6 +917,7 @@ done
 %{_mandir}/man1/sss_ssh_authorizedkeys.1*
 %{_mandir}/man1/sss_ssh_knownhostsproxy.1*
 %{_mandir}/man5/sssd.conf.5*
+%{_mandir}/man5/sssd-files.5*
 %{_mandir}/man5/sssd-simple.5*
 %{_mandir}/man5/sssd-sudo.5*
 %{_mandir}/man5/sssd-secrets.5*
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to