Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 654113 Details for
Bug 850232
Introduce new systemd-rpm macros in nss-pam-ldapd spec file
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch replaces scriptlets with new systemd macros pro F18+ and RHEL7+
new-systemd-macros.patch (text/plain), 3.40 KB, created by
Václav Pavlín
on 2012-11-29 10:05:54 UTC
(
hide
)
Description:
Patch replaces scriptlets with new systemd macros pro F18+ and RHEL7+
Filename:
MIME Type:
Creator:
Václav Pavlín
Created:
2012-11-29 10:05:54 UTC
Size:
3.40 KB
patch
obsolete
>diff --git a/nss-pam-ldapd.spec b/nss-pam-ldapd.spec >index e4bb529..c759b97 100644 >--- a/nss-pam-ldapd.spec >+++ b/nss-pam-ldapd.spec >@@ -1,3 +1,9 @@ >+%if 0%{?fedora} > 17 || 0%{?rhel} > 6 >+%global systemd_macros 1 >+%else >+%global systemd_macros 0 >+%endif >+ > %if 0%{?fedora} > 15 || 0%{?rhel} > 6 > %global systemd 1 > %global sysvinit 0 >@@ -14,7 +20,7 @@ > > Name: nss-pam-ldapd > Version: 0.7.17 >-Release: 1%{?dist} >+Release: 2%{?dist} > Summary: An nsswitch module which uses directory servers > Group: System Environment/Base > License: LGPLv2+ >@@ -58,6 +64,12 @@ Requires(preun): systemd-units > Requires(postun): systemd-units > Requires(post): systemd-sysv > %endif >+%if %{systemd_macros} >+BuildRequires: systemd-units >+Requires(post): systemd >+Requires(preun): systemd >+Requires(postun): systemd >+%endif > > %description > The nss-pam-ldapd daemon, nslcd, uses a directory server to look up name >@@ -88,7 +100,7 @@ mkdir -p $RPM_BUILD_ROOT/{%{_initddir},%{_libdir},lib/systemd/system} > install -p -m755 %{SOURCE2} $RPM_BUILD_ROOT/%{_initddir}/nslcd > %endif > %if %{systemd} >-install -p -m755 %{SOURCE4} $RPM_BUILD_ROOT/lib/systemd/system/ >+install -p -m755 %{SOURCE4} $RPM_BUILD_ROOT/%{_libdir}/systemd/system/ > %endif > %if 0%{?fedora} > 13 || 0%{?rhel} > 5 > # Follow glibc's convention and provide a .so symlink so that people who know >@@ -131,7 +143,7 @@ rm -rf $RPM_BUILD_ROOT > %attr(0755,root,root) %{_initddir}/nslcd > %endif > %if %{systemd} >-%config(noreplace) /lib/systemd/system/* >+%config(noreplace) %{_libdir}/systemd/system/* > %endif > %attr(0755,nslcd,root) /var/run/nslcd > %if 0%{?fedora} > 13 || 0%{?rhel} > 5 >@@ -150,6 +162,9 @@ getent passwd nslcd > /dev/null || \ > > %post > # The usual stuff. >+%if %{systemd_macros} >+%systemd_post nslcd.service >+%endif > %if %{sysvinit} > /sbin/chkconfig --add nslcd > %endif >@@ -205,6 +220,7 @@ fi > # configured to use LDAP as a naming service, enable the daemon, but don't > # start it since we can never know if that's a safe thing to do. If this > # is an upgrade, leave the user's runlevel selections alone. >+%if ! %{systemd_macros} > if [ "$1" -eq "1" ]; then > if grep -E -q '^USELDAP=yes$' /etc/sysconfig/authconfig 2> /dev/null ; then > %if %{sysvinit} >@@ -215,6 +231,7 @@ if [ "$1" -eq "1" ]; then > %endif > fi > fi >+%endif > # Earlier versions of 0.7.6 of this package would have included both 'gid > # nslcd' (a group which doesn't exist) and 'gid ldap' (which we ensure exists). > # If we detect both, fix the configuration. >@@ -230,6 +247,9 @@ fi > exit 0 > > %preun >+%if %{systemd_macros} >+%systemd_preun nslcd.service >+%else > if [ "$1" -eq "0" ]; then > %if %{sysvinit} > /sbin/service nslcd stop >/dev/null 2>&1 >@@ -240,10 +260,14 @@ if [ "$1" -eq "0" ]; then > /bin/systemctl stop nslcd.service > /dev/null 2>&1 || : > %endif > fi >+%endif > exit 0 > > %postun > /sbin/ldconfig >+%if %{systemd_macros} >+%systemd_postun_with_restart nslcd.service >+%else > %if %{sysvinit} > if [ "$1" -ge "1" ]; then > /etc/rc.d/init.d/nslcd condrestart >/dev/null 2>&1 >@@ -255,6 +279,7 @@ if [ "$1" -ge "1" ]; then > /bin/systemctl try-restart nslcd.service >/dev/null 2>&1 > fi > %endif >+%endif > exit 0 > > %if %{systemd} >@@ -271,6 +296,10 @@ exit 0 > %endif > > %changelog >+* Tue Nov 27 2012 Václav PavlÃn <vpavlin@redhat.com> - 0.7.17-2 >+- New systemd macros added for F18+ and RHEL7+ (#850232) >+- Used _libdir macro instead of hardcoded /lib path >+ > * Sun Sep 09 2012 Jakub Hrozek <jhrozek@redhat.com> 0.7.17-1 > - new upstream release 0.7.17 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 850232
: 654113