From 7b283931a080365544fd55e8668e71d3cb548f98 Mon Sep 17 00:00:00 2001 From: Thiago Brito Date: Thu, 7 Jul 2022 20:58:05 -0300 Subject: [PATCH] Set default debconf slapd/no_configuration to true The debian packaging for openldap by default initializes the ldap DB unless debconf tells otherwise. This patch will set the default value of the debconf so the installation doesn't trigger this initialization and generate garbage on the database (entries related to an admin user on dc=nodomain). TEST PLAN PASS Build new ISO and install, verify slapcat for entries on DB PASS Bootstrap with no errors PASS Restore backup Story: 2009303 Task: 45752 Signed-off-by: Thiago Brito Change-Id: I60786a6b9f46619b328cf00d6bdbdf0cc95c9c35 --- ...bconf-slapd-no_configuration-to-true.patch | 30 +++++++++++++++++++ ldap/openldap/debian/deb_patches/series | 1 + 2 files changed, 31 insertions(+) create mode 100644 ldap/openldap/debian/deb_patches/0003-Chg-default-debconf-slapd-no_configuration-to-true.patch diff --git a/ldap/openldap/debian/deb_patches/0003-Chg-default-debconf-slapd-no_configuration-to-true.patch b/ldap/openldap/debian/deb_patches/0003-Chg-default-debconf-slapd-no_configuration-to-true.patch new file mode 100644 index 000000000..db95ad960 --- /dev/null +++ b/ldap/openldap/debian/deb_patches/0003-Chg-default-debconf-slapd-no_configuration-to-true.patch @@ -0,0 +1,30 @@ +From 7e1514545f00f90c4b20a20f8cc5eee824804a32 Mon Sep 17 00:00:00 2001 +From: Thiago Brito +Date: Thu, 7 Jul 2022 20:53:58 -0300 +Subject: [PATCH] Chg default debconf slapd/no_configuration to true + +This is needed so we let StarlingX initialize the LDAP database. + +Signed-off-by: Thiago Brito +--- + debian/slapd.templates | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/debian/slapd.templates b/debian/slapd.templates +index 444613c..31850c6 100644 +--- a/debian/slapd.templates ++++ b/debian/slapd.templates +@@ -1,8 +1,8 @@ + Template: slapd/no_configuration + Type: boolean +-Default: false ++Default: true + _Description: Omit OpenLDAP server configuration? +- If you enable this option, no initial configuration or database will be ++ If you disable this option, an initial configuration or database will be + created for you. + + Template: slapd/dump_database +-- +2.25.1 + diff --git a/ldap/openldap/debian/deb_patches/series b/ldap/openldap/debian/deb_patches/series index c48760188..656fc2d19 100644 --- a/ldap/openldap/debian/deb_patches/series +++ b/ldap/openldap/debian/deb_patches/series @@ -1,3 +1,4 @@ debian-disable-unit-tests.patch 0001-Change-pid-file-and-args-file-location.patch 0002-Support-building-ppolicy-check-password-library.patch +0003-Chg-default-debconf-slapd-no_configuration-to-true.patch