Rewrite fusiondirectory-setup cli tool in PHP
Rewrite fusiondirectory-setup cli tool in PHP
Descriptive title for this enhancement
rewrite the fusiondirectory-setup in php
Actual behavior
actually fusiondirectory-setup is in perl but its difficult to support and in certains distributions like centos 8 support for perl is suboptimal
Expected behavior
be able to convert fusiondirectory-setup to an php porgram run by php-cli
Step by step description of new behaviour
- [First Step]
- [Second Step]
- [and so on...]
Benefits
be able to remove all perl dependancies, and use the ldap lib created in ldap-config-manager
Possible Drawbacks
replacement of perl libraries with core perl libraries
Restrictions
- we should use all core php libraries and avoid using external one
- If we use external one we should check that they run correctly on all the targte os : debian 9-10/ubuntu 16-18-20/centos 7-8
Link issues together to show that they're related. Learn more.
Activity
- bmortier changed milestone to %FusionDirectory 1.4
changed milestone to %FusionDirectory 1.4
- bmortier added PJ1802-0188 label
added PJ1802-0188 label
I do not think it’s realistic to convert the whole tool to PHP for %FusionDirectory 1.4 but we can start looking at what is still useful and what should be converted first.
Command list:
Should not be converted to PHP:
--migrate-winstations Migrating your winstations from FD < 1.1 --migrate-dhcp Migrating DHCP configurations for FD >= 1.0.17 --migrate-systems Migrating your systems from FD < 1.1 --delete-gosa-locks Delete lock tokens using old gosaLockEntry class --migrate-phones Migrating your phones from FD < 1.1
May be dropped after 1.5:
--update-cache Updating class.cache
Migrations we need to keep:
--migrate-interfaces Migrating your systems from FD < 1.4 --remove-supann-root Remove SupAnn root establishment from FD < 1.4 --migrate-users Migrating your users --check-ids Checking for duplicated uid or gid numbers
Filesystem related:
--check-config Checking FusionDirectory's config file --check-directories Checking FusionDirectory's directories --show-version Show FusionDirectory version from variables_common.inc
LDAP related:
--list-deprecated List deprecated attributes and objectclasses --check-deprecated List LDAP entries using deprecated attributes or objectclasses --ldif-deprecated # Print an LDIF removing deprecated attributes --check-ldap Checking your LDAP tree --show-config Show an LDAP dump of the FusionDirectory configuration --set-config-VAR=value Set the value in LDAP of a configuration field
Tools:
--update-locales Updating translations --list-vars List possible vars to give --set --set-VAR=value Set the variable VAR to value see --list-vars --write-vars Choose FusionDirectory Directories --install-plugins Installing FusionDirectory's plugins --encrypt-passwords Encrypt passwords in fusiondirectory.conf
Not commands:
--yes Always answer yes to yes/no questions --help Shows this help
Stuff related to deprecated schema items may fit well in ldap-config-manager
By Côme Chilliet on 2020-11-24T16:08:41 (imported from GitLab)
hello @cchilliet @jswaelens ,
my thinking right now is that we need to separated tools :
- fusionDirectory-setup
- fusiondirectory-migrate
in the fusiondirectory-setup i see the following command
Filesystem related:
--check-config Checking FusionDirectory's config file --check-directories Checking FusionDirectory's directories --show-version Show FusionDirectory version from variables_common.inc
LDAP related:
--check-ldap Checking your LDAP tree --show-config Show an LDAP dump of the FusionDirectory configuration --set-config-VAR=value Set the value in LDAP of a configuration field
Tools:
--update-cache Updating class.cache --update-locales Updating translations --list-vars List possible vars to give --set --set-VAR=value Set the variable VAR to value see --list-vars --write-vars Choose FusionDirectory Directories --install-plugins Installing FusionDirectory's plugins --encrypt-passwords Encrypt passwords in fusiondirectory.conf
Not commands:
--yes Always answer yes to yes/no questions --help Shows this help
in the fusiondirectory-migration i see the following command :
data migration :
--migrate-interfaces Migrating your systems from FD < 1.4 --remove-supann-root Remove SupAnn root establishment from FD < 1.4 --migrate-users Migrating your users --check-ids Checking for duplicated uid or gid numbers --list-deprecated List deprecated attributes and objectclasses --check-deprecated List LDAP entries using deprecated attributes or objectclasses --ldif-deprecated # Print an LDIF removing deprecated attributes
this as the added advantage that in case of migration we don't touch fusiondirectory-setup anymore and ease the packaging also as change in fusiondirectory-setup sometime need to refresh patch
Cheers
By bmortier on 2020-12-14T14:04:33 (imported from GitLab)
I think fusiondirectory-migration will be the easiest to write in PHP. The deprecated options are especially easy and adapted to interact with our new ldap library.
--migrate-interfaces Migrating your systems from FD < 1.4
The longest one it seems, should be migrated in half a day.
--remove-supann-root Remove SupAnn root establishment from FD < 1.4
Just a search and deletion, should be easy.
--migrate-users Migrating your users
Quite short, easy to migrate
--check-ids Checking for duplicated uid or gid numbers
Same.
By Côme Chilliet on 2020-12-14T14:04:33 (imported from GitLab)
The following options have been converted to PHP in the new fusiondirectory-migration tool in the MR:
--migrate-interfaces Migrating your systems from FD < 1.4 --remove-supann-root Remove SupAnn root establishment from FD < 1.4 --migrate-users Migrating your users --check-ids Checking for duplicated uid or gid numbers --list-deprecated List deprecated attributes and objectclasses --check-deprecated List LDAP entries using deprecated attributes or objectclasses
--ldif-deprecated
is still missing.The MR will need a decision on how/where we package
fusiondirectory-cli
andfusiondirectory-ldap
. Also, the code is for now incontrib/cli
, not sure where it should be.By Côme Chilliet on 2021-09-07T15:04:23 (imported from GitLab)
Decision on namespace and folders:
It has been decided to put the code for the tools in namespace
\FusionDirectory\Tools
, separated from\FusionDirectory\Cli
. The files should go intosrc/FusionDirectory/Tools
, to match the library repository organisations, and to prepare for the big rename of 1.5 (Whereinclude
should be moved tosrc/FusionDirectory/Core
andplugins
tosrc/FusionDirectory/Plugins
).By Côme Chilliet on 2021-09-09T14:44:44 (imported from GitLab)
Regarding the fusiondirectory-setup PHP version, current status:
- --check-config Checking FusionDirectory's config file
- --check-directories Checking FusionDirectory's directories
- --show-version Show FusionDirectory version from variables_common.inc
- --check-ldap Checking your LDAP tree
- --show-config Show an LDAP dump of the FusionDirectory configuration
- --set-config-VAR=value Set the value in LDAP of a configuration field
- --update-cache Updating class.cache
- --update-locales Updating translations
- --list-vars List possible vars to give --set
- --set-VAR=value Set the variable VAR to value see --list-vars
- --write-vars Choose FusionDirectory Directories
- --install-plugins Installing FusionDirectory's plugins
- --encrypt-passwords Encrypt passwords in fusiondirectory.conf
- --show-passwords
By Côme Chilliet on 2021-09-16T15:04:16 (imported from GitLab)
Edited by bmortierto reply to the mail response you send --update-locales is used to compile a locale file when people add and remove plugins, because there is only one locale file for each software and we need a compiled version
By bmortier on 2021-09-14T18:44:57 (imported from GitLab)
- Please register or sign in to reply
- bmortier added 1h of time spent at 2020-12-10
added 1h of time spent at 2020-12-10
By bmortier on 2020-12-10T10:53:47 (imported from GitLab)
- bmortier changed title from rewrite the fusiondirectory-setup in php to Rewrite fusiondirectory-setup cli tool in PHP
changed title from rewrite the fusiondirectory-setup in php to Rewrite fusiondirectory-setup cli tool in PHP
By Côme Chilliet on 2021-05-27T10:04:47 (imported from GitLab)
- bmortier added fusiondirectory-setup label
added fusiondirectory-setup label
- bmortier changed due date to September 06, 2021
changed due date to September 06, 2021
By bmortier on 2021-09-02T06:28:04 (imported from GitLab)
- bmortier created merge request !941 to address this issue
created merge request !941 to address this issue
By Côme Chilliet on 2021-09-06T13:23:23 (imported from GitLab)
- bmortier mentioned in merge request !941
mentioned in merge request !941
By Côme Chilliet on 2021-09-06T13:23:24 (imported from GitLab)
- bmortier added 1h of time spent
added 1h of time spent
By Côme Chilliet on 2021-09-06T15:02:39 (imported from GitLab)
- bmortier marked this issue as related to fusiondirectory-ldap#3 (closed)
marked this issue as related to fusiondirectory-ldap#3 (closed)
By Côme Chilliet on 2021-09-07T09:12:03 (imported from GitLab)
- bmortier marked this issue as related to fusiondirectory-cli#2 (closed)
marked this issue as related to fusiondirectory-cli#2 (closed)
By Côme Chilliet on 2021-09-07T14:27:02 (imported from GitLab)