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

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 781d491d0c65145e6553bcf40c931229de5f2872 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..adcc975 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_$subpackage.lang:"
+    cat sssd_$subpackage.lang
+done
+
 %files
 %defattr(-,root,root,-)
 %doc COPYING

From c17b0d9c80b8fb481c5c2acc6db7c78330de1cf5 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 adcc975..4ccc878 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 37da43e558e51a8d26628a7c57725af4bff4cf97 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 4ccc878..d2bcfa4 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 f071dcc5983c5257864e1f776e7fb3574a432614 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 d2bcfa4..0551ef3 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_$subpackage.lang:"
     cat sssd_$subpackage.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 ea7f5606c4ce26383fb0335a262144f3b314e145 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 0551ef3..3c7971f 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_$subpackage.lang:"
     cat sssd_$subpackage.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 4f0a0737707c2f183944df080f95e87344976a5c 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 3c7971f..71f5339 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 ed78e913f9a12ba720c97bf5b997df7e91291429 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 71f5339..093ea7a 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 40d4ceb927c08a299568dbc090f29a80dbfa6542 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 | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 093ea7a..9df08bd 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -744,7 +744,8 @@ 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 \
+                  winbind_idmap
 do
     touch sssd_$subpackage.lang
 done
@@ -792,6 +793,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 +814,8 @@ 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 \
+                  winbind_idmap
 do
     echo "sssd_$subpackage.lang:"
     cat sssd_$subpackage.lang
@@ -1167,7 +1172,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 f51bc12e7b07a8276d52fc1ebcf8c43b6a24bd7d 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 9df08bd..f41414a 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -865,6 +865,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
@@ -883,10 +885,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}
@@ -921,6 +919,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