Week 4
Meeting 7
(June 29th, 2021)
In this seventh meeting question related to installing the FOSSology were discussed.
Attendees
Week 4 Progress
- CMake configuration files have been refactored to make each agent as a separate sub-project.
- VERSION files can be generated now during configure step
- Version parsing logic implemented.
- VERSION and COMMIT_HASH added to every executables.
- Installing part is complete except
cli
. - Symbolic Links are installing and working fine.
- Version, Symbolic Links,
VERSION
file generation,version.php
generation are now more modular and called via a single function for each agent - Most dependencies are now moved to single configuration file.
- Vendor directory generation and installing are now working.
- To test the current progress, follow the instructions here
Discussions
- There are two types of replacements CMake can configure file with.
@VARIABLE@
and${VARIABLE}
. Since in PHP$variable
is used, it may create problem for CMake replacements. So may I replace them?- Yeah sure, go ahead. It will be more robust.
- The replacement of
$VARIABLE
can be stopped by using@ONLY
option inconfigure_file(...)
command.
- How to generate vendor directory?
- The code for generating vendor directory is in
src/Makefile
. - Before executing code for the generation, make sure to copy
composer.json
andcomposer.lock
to the target directory. - There is also a patch that FOSSology needs to function as intended. Make sure to run that patch to check and apply.
- For now, we generate vendor while building, but it would be nice if it can be generated in the build step.
- The code for generating vendor directory is in
- Currently I am generating the VERSION file in configure step itself. Should I move it to the build or install step?
- Yeah, please move it to the build step. As in configure step the data might be outdated.
- Is there any configuration for Release that we can use to install or test? (Michael)
- Yeah, there are 4 inbuilt configurations for various levels of optimization and can be applied to tests and installation.
- Is the VERSION file is generated for each agent or whole project at once? Because in the latter case, the VERSION file can be generated as the last step. (Sarita)
- No agent has a VERSION file along with the main VERSION file for FOSSology.
- How I can build and install a single agent or component? (Sarita)
-
There are two ways you can build and install a specific agent or component only.
-
The first one is quite simple. Just change your directory to the specific agent's directory and run all the usual commands for building and installing.
-
The second one is a bit for typing work. This can be used directly from the top-level directory. After configuring the CMake, you can run the following command to install the specific component.
# for Unix Makefiles
make list_install_component # this will list all the available components
cmake -DCOMPONENT=<component-name> -P cmake_install.cmake -
I am writing a macro that will let us install a component by simply running
make install component
.
-
Conclusion and Further Plans
- Implement generation of vendor directory.
- Move VERSION file generation to build step.
Meeting 8
(July 2nd, 2021)
In this eighth meeting questions related to post install generation were asked. This was a short meeting.
Attendees
Discussions
- Why all the symbolic links in cli points to
fo_wrapper
script?- The
fo_wrapper
script calls the PHP script on the symbolic link that called the fo_wrapper. It also initializes any requirement before calling the scripts.
- The
- How to generate all the other configuration in
/usr/local/etc/fossology
directory?- You can find the input files for all these configurations in the
install/defcon
directory.
- You can find the input files for all these configurations in the
- What are
OBSOLETEFILES
inwww/ui/Makefile
?- They are kept for compatibility purposes. Although they have been removed in the current versions of FOSSology, if a user installs a new version on top of an older instance, then we should explicitly remove those files.
- I have created a separate folder for generating vendor directory. Is that okay?
- Yeah, it should be fine, But it would be better to rename it to something else. Or even better if moved to www itself. Since these files are used by www.
Conclusion and Further Plans
- Move
vendor
scripts towww
directory. - Implement installing for FOSSology cli.
- Implement installing configuration scripts.
- Finish installation for testing