Default module installation

118 views
Skip to first unread message

Stéphane Martarello

unread,
Jan 11, 2021, 7:37:24 AM1/11/21
to SimpleSAMLphp
Hello,
I have an issue with the default modules, I am using simplesamlphp via composer in my PHP project and when I run "composer install", only few modules are installed with simplesamlphp:

Screenshot from 2021-01-11 13-13-59.png

I need to run "composer install" twice to have all the modules:

2.png


In my project, simplesamlphp is included in the composer.json:
"simplesamlphp/simplesamlphp": "v1.18.8",

The first time I run "composer install", I have this kind of output for ADFS:

  - Installing simplesamlphp/simplesamlphp-module-adfs (v0.9.6): Reading /home/www-data/.composer/cache/files/simplesamlphp/simplesamlphp-module-adfs/b1f87d28bc17bf4940d30f45cba7fe09472e1cde.zip from cache
Loading from cache
 Extracting archiveExecuting command (CWD): unzip -qq  './modules/adfs/c74e3e701e43e117bd84446847027284' -d '/data/ckls/vendor/composer/ffb70363'
    REASON: Required by the root package: Install command rule (install simplesamlphp/simplesamlphp-module-adfs v0.9.6)

The second installation generate this output:
 - Installing simplesamlphp/simplesamlphp-module-adfs (v0.9.6): Reading /home/www-data/.composer/cache/files/simplesamlphp/simplesamlphp-module-adfs/b1f87d28bc17bf4940d30f45cba7fe09472e1cde.zip from cache
Loading from cache
 Extracting archiveExecuting command (CWD): unzip -qq  '/data/ckls/vendor/simplesamlphp/simplesamlphp/modules/adfs/76a1b6e2e0e2727e36416710cd36390b' -d '/data/ckls/vendor/composer/b1e2a752'
    REASON: Required by the root package: Install command rule (install simplesamlphp/simplesamlphp-module-adfs v0.9.6)

What is wrong in my way to install simplesamlphp ?

thanks,
Stéphane

pat...@cirrusidentity.com

unread,
Jan 11, 2021, 1:45:30 PM1/11/21
to SimpleSAMLphp
Most modules are external packages to SSP and only a few are included in the main SSP module.
The external modules require the composer plugin simplesamlphp/composer-module-installer to be available when composer runs.  On your first run
that plugin is not available so composer doesn't know how to install the external SSP modules/packages. On your second run it is available, and composer is able to install those packages.
At least that's my theory :)

- Patrick

Stéphane Martarello

unread,
Jan 19, 2021, 9:00:41 AM1/19/21
to SimpleSAMLphp
Thanks Patrick for your idea, but it's not related to the  simplesamlphp/composer-module-installer dependency. 
simplesamlphp has in its dependencies (composer.lock), the modules: adfs, cas, authfacebook.
When we try to install simplesamlphp, the process tries to install the dependencies, in this case the modules, at this stage simplesamlphp is not yet install, but to install the modules we look for the simplesamlphp location in the "vendor" directory and it is not found, so the modules are installed at the root level.
it's a chicken and egg problem.
simplesamlphp depends of the modules but the module installation depends of simplesamlphp location.

Stéphane
Reply all
Reply to author
Forward
0 new messages