specfile: clean %files, drop defattr macros
- %defattr is not needed since Fedora 14 - permissions are taken from installed files (removed chmod and added install where possible) - %attr was left only on places, where non-root owner is needed - removed slashes between: %{buildroot}%{_somedir} - files reordered by type - merged "%dir dir" and "dir/files*"
This commit is contained in:
parent
05cb2507b0
commit
b6085c259f
140
openldap.spec
140
openldap.spec
@ -282,7 +282,7 @@ rm -rf %{buildroot}
|
|||||||
libtool='%{_bindir}/libtool'
|
libtool='%{_bindir}/libtool'
|
||||||
export tagname=CC
|
export tagname=CC
|
||||||
|
|
||||||
mkdir -p %{buildroot}/%{_libdir}/
|
mkdir -p %{buildroot}%{_libdir}/
|
||||||
|
|
||||||
# install servers
|
# install servers
|
||||||
pushd openldap-%{version}/build-servers
|
pushd openldap-%{version}/build-servers
|
||||||
@ -300,7 +300,7 @@ make install DESTDIR=%{buildroot} \
|
|||||||
LIBTOOL="$libtool" \
|
LIBTOOL="$libtool" \
|
||||||
STRIP=""
|
STRIP=""
|
||||||
install -m 644 %SOURCE100 \
|
install -m 644 %SOURCE100 \
|
||||||
%{buildroot}/%{evolution_connector_prefix}/
|
%{buildroot}%{evolution_connector_prefix}/
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# install clients
|
# install clients
|
||||||
@ -316,67 +316,72 @@ mkdir -p %{buildroot}%{_sysconfdir}/openldap/cacerts
|
|||||||
mkdir -p %{buildroot}%{_sysconfdir}/pki/tls/certs
|
mkdir -p %{buildroot}%{_sysconfdir}/pki/tls/certs
|
||||||
|
|
||||||
# setup data and runtime directories
|
# setup data and runtime directories
|
||||||
mkdir -p %{buildroot}/var/lib/ldap
|
mkdir -p %{buildroot}%{_sharedstatedir}
|
||||||
|
mkdir -p %{buildroot}%{_localstatedir}
|
||||||
|
install -m 0700 -d %{buildroot}%{_sharedstatedir}/ldap
|
||||||
|
install -m 0755 -d %{buildroot}%{_localstatedir}/run/openldap
|
||||||
|
|
||||||
# setup autocreation of runtime directories on tmpfs
|
# setup autocreation of runtime directories on tmpfs
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
|
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
|
||||||
install -m 644 %SOURCE3 %{buildroot}%{_sysconfdir}/tmpfiles.d/slapd.conf
|
install -m 0644 %SOURCE3 %{buildroot}%{_sysconfdir}/tmpfiles.d/slapd.conf
|
||||||
|
|
||||||
# setup maintainance scripts
|
# setup maintainance scripts
|
||||||
mkdir -p %{buildroot}%{_libexecdir}/slapd
|
mkdir -p %{buildroot}%{_libexecdir}
|
||||||
|
install -m 0755 -d %{buildroot}%{_libexecdir}/slapd
|
||||||
install -m 0644 %SOURCE50 %{buildroot}%{_libexecdir}/slapd/functions
|
install -m 0644 %SOURCE50 %{buildroot}%{_libexecdir}/slapd/functions
|
||||||
install -m 0755 %SOURCE51 %{buildroot}%{_libexecdir}/slapd/convert-config.sh
|
install -m 0755 %SOURCE51 %{buildroot}%{_libexecdir}/slapd/convert-config.sh
|
||||||
install -m 0755 %SOURCE52 %{buildroot}%{_libexecdir}/slapd/check-config.sh
|
install -m 0755 %SOURCE52 %{buildroot}%{_libexecdir}/slapd/check-config.sh
|
||||||
install -m 0755 %SOURCE53 %{buildroot}%{_libexecdir}/slapd/upgrade-db.sh
|
install -m 0755 %SOURCE53 %{buildroot}%{_libexecdir}/slapd/upgrade-db.sh
|
||||||
|
|
||||||
# remove build root from config files and manual pages
|
# remove build root from config files and manual pages
|
||||||
perl -pi -e "s|%{buildroot}||g" %{buildroot}/%{_sysconfdir}/openldap/*.conf
|
perl -pi -e "s|%{buildroot}||g" %{buildroot}%{_sysconfdir}/openldap/*.conf
|
||||||
perl -pi -e "s|%{buildroot}||g" %{buildroot}%{_mandir}/*/*.*
|
perl -pi -e "s|%{buildroot}||g" %{buildroot}%{_mandir}/*/*.*
|
||||||
|
|
||||||
# we don't need the default files -- RPM handles changes
|
# we don't need the default files -- RPM handles changes
|
||||||
rm -f %{buildroot}/%{_sysconfdir}/openldap/*.default
|
rm -f %{buildroot}%{_sysconfdir}/openldap/*.default
|
||||||
rm -f %{buildroot}/%{_sysconfdir}/openldap/schema/*.default
|
rm -f %{buildroot}%{_sysconfdir}/openldap/schema/*.default
|
||||||
|
|
||||||
# install an init script for the servers
|
# install an init script for the servers
|
||||||
mkdir -p %{buildroot}%{_unitdir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}/
|
install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}/slapd.service
|
||||||
|
|
||||||
# install syconfig/ldap
|
# install syconfig/ldap
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
||||||
install -m 644 %SOURCE2 %{buildroot}%{_sysconfdir}/sysconfig/slapd
|
install -m 644 %SOURCE2 %{buildroot}%{_sysconfdir}/sysconfig/slapd
|
||||||
|
|
||||||
# move slapd out of _libdir
|
# move slapd out of _libdir
|
||||||
mv %{buildroot}/%{_libdir}/slapd %{buildroot}/%{_sbindir}/
|
mv %{buildroot}%{_libdir}/slapd %{buildroot}%{_sbindir}/
|
||||||
|
|
||||||
# setup tools as symlinks to slapd
|
# setup tools as symlinks to slapd
|
||||||
rm -f %{buildroot}/%{_sbindir}/slap{acl,add,auth,cat,dn,index,passwd,test,schema}
|
rm -f %{buildroot}%{_sbindir}/slap{acl,add,auth,cat,dn,index,passwd,test,schema}
|
||||||
rm -f %{buildroot}/%{_libdir}/slap{acl,add,auth,cat,dn,index,passwd,test,schema}
|
rm -f %{buildroot}%{_libdir}/slap{acl,add,auth,cat,dn,index,passwd,test,schema}
|
||||||
for X in acl add auth cat dn index passwd test schema; do ln -s slapd %{buildroot}/%{_sbindir}/slap$X ; done
|
for X in acl add auth cat dn index passwd test schema; do ln -s slapd %{buildroot}%{_sbindir}/slap$X ; done
|
||||||
|
|
||||||
# tweak permissions on the libraries to make sure they're correct
|
# tweak permissions on the libraries to make sure they're correct
|
||||||
chmod 755 %{buildroot}/%{_libdir}/lib*.so*
|
chmod 0755 %{buildroot}%{_libdir}/lib*.so*
|
||||||
chmod 644 %{buildroot}/%{_libdir}/lib*.*a
|
chmod 0644 %{buildroot}%{_libdir}/lib*.*a
|
||||||
|
|
||||||
# slapd.conf(5) is obsoleted since 2.3, see slapd-config(5)
|
# slapd.conf(5) is obsoleted since 2.3, see slapd-config(5)
|
||||||
# new configuration will be generated in %post
|
# new configuration will be generated in %%post
|
||||||
mkdir -p %{buildroot}/%{_datadir}/openldap-servers
|
mkdir -p %{buildroot}%{_datadir}
|
||||||
mkdir %{buildroot}/%{_sysconfdir}/openldap/slapd.d
|
install -m 0755 -d %{buildroot}%{_datadir}/openldap-servers
|
||||||
rm -f %{buildroot}/%{_sysconfdir}/openldap/slapd.conf
|
install -m 0644 %SOURCE4 %{buildroot}%{_datadir}/openldap-servers/slapd.conf.obsolete
|
||||||
install -m 644 %SOURCE4 %{buildroot}/%{_datadir}/openldap-servers/slapd.conf.obsolete
|
install -m 0700 -d %{buildroot}%{_sysconfdir}/openldap/slapd.d
|
||||||
|
rm -f %{buildroot}%{_sysconfdir}/openldap/slapd.conf
|
||||||
|
|
||||||
# move doc files out of _sysconfdir
|
# move doc files out of _sysconfdir
|
||||||
mv %{buildroot}%{_sysconfdir}/openldap/schema/README README.schema
|
mv %{buildroot}%{_sysconfdir}/openldap/schema/README README.schema
|
||||||
mv %{buildroot}%{_sysconfdir}/openldap/DB_CONFIG.example %{buildroot}/%{_datadir}/openldap-servers/DB_CONFIG.example
|
mv %{buildroot}%{_sysconfdir}/openldap/DB_CONFIG.example %{buildroot}%{_datadir}/openldap-servers/DB_CONFIG.example
|
||||||
chmod 0644 openldap-%{version}/servers/slapd/back-sql/rdbms_depend/timesten/*.sh
|
chmod 0644 openldap-%{version}/servers/slapd/back-sql/rdbms_depend/timesten/*.sh
|
||||||
chmod 0644 %{buildroot}/%{_datadir}/openldap-servers/DB_CONFIG.example
|
chmod 0644 %{buildroot}%{_datadir}/openldap-servers/DB_CONFIG.example
|
||||||
|
|
||||||
# remove files which we don't want packaged
|
# remove files which we don't want packaged
|
||||||
rm -f %{buildroot}/%{_libdir}/*.la
|
rm -f %{buildroot}%{_libdir}/*.la
|
||||||
rm -f %{buildroot}/%{_libdir}/*.a
|
rm -f %{buildroot}%{_libdir}/*.a
|
||||||
rm -f %{buildroot}/%{evolution_connector_libdir}/*.la
|
rm -f %{buildroot}%{evolution_connector_libdir}/*.la
|
||||||
rm -f %{buildroot}/%{evolution_connector_libdir}/*.so*
|
rm -f %{buildroot}%{evolution_connector_libdir}/*.so*
|
||||||
rm -f %{buildroot}/%{_libdir}/openldap/*.a
|
rm -f %{buildroot}%{_libdir}/openldap/*.a
|
||||||
rm -f %{buildroot}/%{_libdir}/openldap/*.so
|
rm -f %{buildroot}%{_libdir}/openldap/*.so
|
||||||
|
|
||||||
rm -f %{buildroot}%{_localstatedir}/openldap-data/DB_CONFIG.example
|
rm -f %{buildroot}%{_localstatedir}/openldap-data/DB_CONFIG.example
|
||||||
rmdir %{buildroot}%{_localstatedir}/openldap-data
|
rmdir %{buildroot}%{_localstatedir}/openldap-data
|
||||||
@ -540,73 +545,60 @@ exit 0
|
|||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc openldap-%{version}/ANNOUNCEMENT
|
%doc openldap-%{version}/ANNOUNCEMENT
|
||||||
%doc openldap-%{version}/CHANGES
|
%doc openldap-%{version}/CHANGES
|
||||||
%doc openldap-%{version}/COPYRIGHT
|
%doc openldap-%{version}/COPYRIGHT
|
||||||
%doc openldap-%{version}/LICENSE
|
%doc openldap-%{version}/LICENSE
|
||||||
%doc openldap-%{version}/README
|
%doc openldap-%{version}/README
|
||||||
%attr(0755,root,root) %dir %{_sysconfdir}/openldap
|
%dir %{_sysconfdir}/openldap
|
||||||
%attr(0755,root,root) %dir %{_sysconfdir}/openldap/cacerts
|
%dir %{_sysconfdir}/openldap/cacerts
|
||||||
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/openldap/ldap*.conf
|
%config(noreplace) %{_sysconfdir}/openldap/ldap.conf
|
||||||
%attr(0755,root,root) %{_libdir}/liblber-2.4*.so.*
|
%{_libdir}/liblber-2.4*.so.*
|
||||||
%attr(0755,root,root) %{_libdir}/libldap-2.4*.so.*
|
%{_libdir}/libldap-2.4*.so.*
|
||||||
%attr(0755,root,root) %{_libdir}/libldap_r-2.4*.so.*
|
%{_libdir}/libldap_r-2.4*.so.*
|
||||||
%attr(0644,root,root) %{_mandir}/man5/ldif.5*
|
%{_mandir}/man5/ldif.5*
|
||||||
%attr(0644,root,root) %{_mandir}/man5/ldap.conf.5*
|
%{_mandir}/man5/ldap.conf.5*
|
||||||
|
|
||||||
%files servers
|
%files servers
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc openldap-%{version}/contrib/slapd-modules/smbk5pwd/README.smbk5pwd
|
%doc openldap-%{version}/contrib/slapd-modules/smbk5pwd/README.smbk5pwd
|
||||||
%doc openldap-%{version}/doc/guide/admin/*.html
|
%doc openldap-%{version}/doc/guide/admin/*.html
|
||||||
%doc openldap-%{version}/doc/guide/admin/*.png
|
%doc openldap-%{version}/doc/guide/admin/*.png
|
||||||
%doc README.schema
|
%doc README.schema
|
||||||
%attr(0640,root,ldap) %ghost %config(noreplace) %{_sysconfdir}/pki/tls/certs/slapd.pem
|
%config(noreplace) %dir %attr(0750,ldap,ldap) %{_sysconfdir}/openldap/slapd.d
|
||||||
%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/slapd
|
%config(noreplace) %{_sysconfdir}/openldap/schema
|
||||||
%attr(0750,ldap,ldap) %dir %config(noreplace) %{_sysconfdir}/openldap/slapd.d
|
%config(noreplace) %{_sysconfdir}/sysconfig/slapd
|
||||||
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/ldap
|
%config(noreplace) %{_sysconfdir}/tmpfiles.d/slapd.conf
|
||||||
%attr(0755,root,root) %dir %config(noreplace) %{_sysconfdir}/openldap/schema
|
%config(noreplace) %ghost %attr(0640,root,ldap) %{_sysconfdir}/pki/tls/certs/slapd.pem
|
||||||
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/openldap/schema/*.schema*
|
%dir %attr(0700,ldap,ldap) %{_sharedstatedir}/ldap
|
||||||
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/openldap/schema/*.ldif
|
%dir %attr(-,ldap,ldap) %{_localstatedir}/run/openldap
|
||||||
%attr(0755,root,root) %{_sbindir}/sl*
|
%{_unitdir}/slapd.service
|
||||||
%attr(0644,root,root) %{_mandir}/man8/*
|
%{_datadir}/openldap-servers/
|
||||||
%attr(0644,root,root) %{_mandir}/man5/slapd*.5*
|
%{_libdir}/openldap/[^b]*
|
||||||
%attr(0644,root,root) %{_mandir}/man5/slapo-*.5*
|
%{_libexecdir}/slapd/
|
||||||
%attr(0700,ldap,ldap) %dir /var/lib/ldap
|
%{_sbindir}/sl*
|
||||||
%attr(0755,ldap,ldap) %dir /var/run/openldap
|
%{_mandir}/man8/*
|
||||||
%{_sysconfdir}/tmpfiles.d
|
%{_mandir}/man5/slapd*.5*
|
||||||
%attr(0755,root,root) %dir %{_libdir}/openldap
|
%{_mandir}/man5/slapo-*.5*
|
||||||
%attr(0755,root,root) %{_libdir}/openldap/[^b]*
|
|
||||||
%attr(0755,root,root) %dir %{_datadir}/openldap-servers
|
|
||||||
%attr(0644,root,root) %{_datadir}/openldap-servers/*
|
|
||||||
# obsolete configuration
|
# obsolete configuration
|
||||||
%attr(0640,ldap,ldap) %ghost %config(noreplace,missingok) %{_sysconfdir}/openldap/slapd.conf
|
%ghost %config(noreplace,missingok) %attr(0640,ldap,ldap) %{_sysconfdir}/openldap/slapd.conf
|
||||||
%attr(0640,ldap,ldap) %ghost %config(noreplace,missingok) %{_sysconfdir}/openldap/slapd.conf.bak
|
%ghost %config(noreplace,missingok) %attr(0640,ldap,ldap) %{_sysconfdir}/openldap/slapd.conf.bak
|
||||||
|
|
||||||
%files servers-sql
|
%files servers-sql
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc openldap-%{version}/servers/slapd/back-sql/docs/*
|
%doc openldap-%{version}/servers/slapd/back-sql/docs/*
|
||||||
%doc openldap-%{version}/servers/slapd/back-sql/rdbms_depend
|
%doc openldap-%{version}/servers/slapd/back-sql/rdbms_depend
|
||||||
%attr(0755,root,root) %{_libdir}/openldap/back_sql*.so.*
|
%{_libdir}/openldap/back_sql*.so.*
|
||||||
%attr(0755,root,root) %{_libdir}/openldap/back_sql.la
|
%{_libdir}/openldap/back_sql.la
|
||||||
|
|
||||||
%files clients
|
%files clients
|
||||||
%defattr(-,root,root)
|
%{_bindir}/*
|
||||||
%attr(0755,root,root) %{_bindir}/*
|
%{_mandir}/man1/*
|
||||||
%attr(0644,root,root) %{_mandir}/man1/*
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc openldap-%{version}/doc/drafts openldap-%{version}/doc/rfc
|
%doc openldap-%{version}/doc/drafts openldap-%{version}/doc/rfc
|
||||||
%attr(0755,root,root) %{_libdir}/libl*.so
|
%{_libdir}/libl*.so
|
||||||
%attr(0644,root,root) %{_includedir}/*
|
%{_includedir}/*
|
||||||
%attr(0644,root,root) %{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
%attr(0755,root,root) %dir %{evolution_connector_prefix}
|
%{evolution_connector_prefix}/
|
||||||
%attr(0644,root,root) %{evolution_connector_prefix}/README*
|
|
||||||
%attr(0755,root,root) %dir %{evolution_connector_includedir}
|
|
||||||
%attr(0644,root,root) %{evolution_connector_includedir}/*.h
|
|
||||||
%attr(0755,root,root) %dir %{evolution_connector_libdir}
|
|
||||||
%attr(0644,root,root) %{evolution_connector_libdir}/*.a
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Oct 06 2011 Jan Vcelak <jvcelak@redhat.com> 2.4.26-5
|
* Thu Oct 06 2011 Jan Vcelak <jvcelak@redhat.com> 2.4.26-5
|
||||||
|
Loading…
Reference in New Issue
Block a user