openldap-2.4.39-blfs_paths-1.patch 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. Submitted By: Armin K. <krejzi at email dot com>
  2. Date: 2012-04-06
  3. Initial Package Version: 2.4.30
  4. Upstream Status: BLFS Specific
  5. Origin: Self
  6. Description: Patch changes various installation options, such as ldap database path,
  7. configuration file options, slapd install location, etc.
  8. --- openldap.orig/doc/man/man5/slapd-bdb.5 2012-02-29 18:37:09.000000000 +0100
  9. +++ openldap/doc/man/man5/slapd-bdb.5 2012-04-06 00:18:54.171136608 +0200
  10. @@ -131,7 +131,7 @@
  11. associated indexes live.
  12. A separate directory must be specified for each database.
  13. The default is
  14. -.BR LOCALSTATEDIR/openldap\-data .
  15. +.BR LOCALSTATEDIR/lib/openldap .
  16. .TP
  17. .B dirtyread
  18. Allow reads of modified but not yet committed data.
  19. --- openldap.orig/doc/man/man5/slapd.conf.5 2012-02-29 18:37:09.000000000 +0100
  20. +++ openldap/doc/man/man5/slapd.conf.5 2012-04-06 00:18:54.174136671 +0200
  21. @@ -1987,7 +1987,7 @@
  22. # The database directory MUST exist prior to
  23. # running slapd AND should only be accessible
  24. # by the slapd/tools. Mode 0700 recommended.
  25. -directory LOCALSTATEDIR/openldap\-data
  26. +directory LOCALSTATEDIR/lib/openldap
  27. # Indices to maintain
  28. index objectClass eq
  29. index cn,sn,mail pres,eq,approx,sub
  30. --- openldap.orig/doc/man/man5/slapd-config.5 2012-02-29 18:37:09.000000000 +0100
  31. +++ openldap/doc/man/man5/slapd-config.5 2012-04-06 00:18:54.194137078 +0200
  32. @@ -2029,7 +2029,7 @@
  33. # The database directory MUST exist prior to
  34. # running slapd AND should only be accessible
  35. # by the slapd/tools. Mode 0700 recommended.
  36. -olcDbDirectory: LOCALSTATEDIR/openldap\-data
  37. +olcDbDirectory: LOCALSTATEDIR/lib/openldap
  38. # Indices to maintain
  39. olcDbIndex: objectClass eq
  40. olcDbIndex: cn,sn,mail pres,eq,approx,sub
  41. --- openldap.orig/include/ldap_defaults.h 2012-02-29 18:37:09.000000000 +0100
  42. +++ openldap/include/ldap_defaults.h 2012-04-06 00:18:54.200137199 +0200
  43. @@ -39,7 +39,7 @@
  44. #define LDAP_ENV_PREFIX "LDAP"
  45. /* default ldapi:// socket */
  46. -#define LDAPI_SOCK LDAP_RUNDIR LDAP_DIRSEP "run" LDAP_DIRSEP "ldapi"
  47. +#define LDAPI_SOCK LDAP_RUNDIR LDAP_DIRSEP "run" LDAP_DIRSEP "openldap" LDAP_DIRSEP "ldapi"
  48. /*
  49. * SLAPD DEFINITIONS
  50. @@ -47,7 +47,7 @@
  51. /* location of the default slapd config file */
  52. #define SLAPD_DEFAULT_CONFIGFILE LDAP_SYSCONFDIR LDAP_DIRSEP "slapd.conf"
  53. #define SLAPD_DEFAULT_CONFIGDIR LDAP_SYSCONFDIR LDAP_DIRSEP "slapd.d"
  54. -#define SLAPD_DEFAULT_DB_DIR LDAP_RUNDIR LDAP_DIRSEP "openldap-data"
  55. +#define SLAPD_DEFAULT_DB_DIR LDAP_RUNDIR LDAP_DIRSEP "lib" LDAP_DIRSEP "openldap"
  56. #define SLAPD_DEFAULT_DB_MODE 0600
  57. #define SLAPD_DEFAULT_UCDATA LDAP_DATADIR LDAP_DIRSEP "ucdata"
  58. /* default max deref depth for aliases */
  59. --- openldap.orig/libraries/liblber/Makefile.in 2012-02-29 18:37:09.000000000 +0100
  60. +++ openldap/libraries/liblber/Makefile.in 2012-04-06 00:18:54.204137280 +0200
  61. @@ -48,6 +48,6 @@
  62. install-local: FORCE
  63. -$(MKDIR) $(DESTDIR)$(libdir)
  64. - $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
  65. + $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(libdir)
  66. $(LTFINISH) $(DESTDIR)$(libdir)
  67. --- openldap.orig/libraries/libldap/Makefile.in 2012-02-29 18:37:09.000000000 +0100
  68. +++ openldap/libraries/libldap/Makefile.in 2012-04-06 00:18:54.204137280 +0200
  69. @@ -68,7 +68,7 @@
  70. install-local: $(CFFILES) FORCE
  71. -$(MKDIR) $(DESTDIR)$(libdir)
  72. - $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
  73. + $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(libdir)
  74. $(LTFINISH) $(DESTDIR)$(libdir)
  75. -$(MKDIR) $(DESTDIR)$(sysconfdir)
  76. @for i in $(CFFILES); do \
  77. --- openldap.orig/libraries/libldap_r/Makefile.in 2012-02-29 18:37:09.000000000 +0100
  78. +++ openldap/libraries/libldap_r/Makefile.in 2012-04-06 00:18:54.208137362 +0200
  79. @@ -83,6 +83,6 @@
  80. install-local: $(CFFILES) FORCE
  81. -$(MKDIR) $(DESTDIR)$(libdir)
  82. - $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
  83. + $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(libdir)
  84. $(LTFINISH) $(DESTDIR)$(libdir)
  85. --- openldap.orig/servers/slapd/Makefile.in 2012-02-29 18:37:09.000000000 +0100
  86. +++ openldap/servers/slapd/Makefile.in 2012-04-06 00:18:54.208137362 +0200
  87. @@ -370,10 +370,10 @@
  88. install-conf install-db-config install-schema install-tools
  89. install-slapd: FORCE
  90. - -$(MKDIR) $(DESTDIR)$(libexecdir)
  91. + -$(MKDIR) $(DESTDIR)$(sbindir)
  92. -$(MKDIR) $(DESTDIR)$(localstatedir)/run
  93. $(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 \
  94. - slapd$(EXEEXT) $(DESTDIR)$(libexecdir)
  95. + slapd$(EXEEXT) $(DESTDIR)$(sbindir)
  96. @for i in $(SUBDIRS); do \
  97. if test -d $$i && test -f $$i/Makefile ; then \
  98. echo; echo " cd $$i; $(MAKE) $(MFLAGS) install"; \
  99. @@ -439,9 +439,9 @@
  100. install-db-config: FORCE
  101. @-$(MKDIR) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir)
  102. - @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/openldap-data
  103. + @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/lib/openldap
  104. $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
  105. - $(DESTDIR)$(localstatedir)/openldap-data/DB_CONFIG.example
  106. + $(DESTDIR)$(localstatedir)/lib/openldap/DB_CONFIG.example
  107. $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
  108. $(DESTDIR)$(sysconfdir)/DB_CONFIG.example
  109. @@ -449,6 +449,6 @@
  110. -$(MKDIR) $(DESTDIR)$(sbindir)
  111. for i in $(SLAPTOOLS); do \
  112. $(RM) $(DESTDIR)$(sbindir)/$$i$(EXEEXT); \
  113. - $(LN_S) -f $(DESTDIR)$(libexecdir)/slapd$(EXEEXT) $(DESTDIR)$(sbindir)/$$i$(EXEEXT); \
  114. + $(LN_S) -f $(DESTDIR)$(sbindir)/slapd$(EXEEXT) $(DESTDIR)$(sbindir)/$$i$(EXEEXT); \
  115. done
  116. --- openldap.orig/servers/slapd/slapd.conf 2012-02-29 18:37:09.000000000 +0100
  117. +++ openldap/servers/slapd/slapd.conf 2012-04-06 00:21:12.891992222 +0200
  118. @@ -10,14 +10,12 @@
  119. # service AND an understanding of referrals.
  120. #referral ldap://root.openldap.org
  121. -pidfile %LOCALSTATEDIR%/run/slapd.pid
  122. -argsfile %LOCALSTATEDIR%/run/slapd.args
  123. +pidfile %LOCALSTATEDIR%/run/openldap/slapd.pid
  124. +argsfile %LOCALSTATEDIR%/run/openldap/slapd.args
  125. # Load dynamic backend modules:
  126. -# modulepath %MODULEDIR%
  127. -# moduleload back_bdb.la
  128. -# moduleload back_hdb.la
  129. -# moduleload back_ldap.la
  130. +modulepath %MODULEDIR%
  131. +moduleload back_bdb
  132. # Sample security restrictions
  133. # Require integrity protection (prevent hijacking)
  134. @@ -46,20 +44,26 @@
  135. #
  136. # rootdn can always read and write EVERYTHING!
  137. +# Specific Backend Directives for bdb:
  138. +backend bdb
  139. +
  140. #######################################################################
  141. # BDB database definitions
  142. #######################################################################
  143. database bdb
  144. suffix "dc=my-domain,dc=com"
  145. -rootdn "cn=Manager,dc=my-domain,dc=com"
  146. +#rootdn "cn=Manager,dc=my-domain,dc=com"
  147. +
  148. # Cleartext passwords, especially for the rootdn, should
  149. # be avoid. See slappasswd(8) and slapd.conf(5) for details.
  150. # Use of strong authentication encouraged.
  151. -rootpw secret
  152. +#rootpw secret
  153. +
  154. # The database directory MUST exist prior to running slapd AND
  155. # should only be accessible by the slapd and slap tools.
  156. # Mode 700 recommended.
  157. -directory %LOCALSTATEDIR%/openldap-data
  158. +directory %LOCALSTATEDIR%/lib/openldap
  159. +
  160. # Indices to maintain
  161. index objectClass eq
  162. --- openldap.orig/servers/slapd/slapi/Makefile.in 2012-02-29 18:37:09.000000000 +0100
  163. +++ openldap/servers/slapd/slapi/Makefile.in 2012-04-06 00:18:54.210137403 +0200
  164. @@ -46,6 +46,6 @@
  165. install-local: FORCE
  166. if test "$(BUILD_MOD)" = "yes"; then \
  167. $(MKDIR) $(DESTDIR)$(libdir); \
  168. - $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir); \
  169. + $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(libdir); \
  170. fi