Comments (3)
Hi @GMishx,
I've looked into this issue. Currently we are using scancode-wrapper.cc file to construct the command to execute runscanonfiles.py
. I checked the permissions of both scripts, and I noticed a change in the user
and group
for the .cache
directory.
This indicates that the fossy
user is attempting to create a directory that needs root
access. I'm unsure about the ideal solution for this. Any insights would be greatly appreciated. Please take a look.
Thank you!
from fossology.
Hi @xsuchy / @GMishx / @dvjsharma ,
Setting the following environment variable SCANCODE_CACHE='/home/fossy/.cache
fixed the scan code issue for us.
or enforcing in the below.
https://github.com/fossology/fossology/blob/4.4.0/src/scancode/agent/scancode_wrapper.cc#L73
from fossology.
Thank you @kannan-seenivasan.
I discovered a similar solution during my research. The Scancode toolkit already contains a related issue that closely mirrors ours, where the calling users are not the same (#2355 & #357). To tackle this, they have introduced options and environment variables. Please see CHANGELOG.rst.
I tested the solution by adding the SCANCODE_CACHE
environment variable at the container level in the docker-compose.yml
file, and it worked perfectly. There was no need to modify scancode_wrapper.cc
since the issue did not exist in the local installation (which was also tested). However, even if we were to update it, I believe using the --cache-dir
option would be a more suitable approach.
I've submitted a PR to update the docker-compose.yml
, which will resolve this issue and #2667. I will make the necessary modifications as advised.
EDIT: It was discussed in community meeting to set the environment variable before calling the runscanonfiles.py
file, not in the docker-compose.yml
file. Additionally it was decided to store cache at /usr/local/share/fossology/scancode/agent/
. I have updated the PR accordingly.
EDIT: It was suggested to set the environment variable inside runscanonfiles.py
and not to hardcode the part, but get it inside the script itself (using __file__
).
CC @GMishx
from fossology.
Related Issues (20)
- Which is the most recent version of Postgres available for use (14/15/16...)? HOT 4
- Scancode copyright findings are ignored in ReadmeOSS, SPDX, REST API; user copyright findings are ignored in REST API HOT 7
- Reimport of an exported SPDX RDF report is not working (since version 4.2.1.45) HOT 4
- Importing an RDF report can fail with "shortname already in use" when matching with SPDX ID HOT 4
- Uploading a new file to Fossology server via API v2 HOT 6
- SPDX Report generation for files with candidate license failed
- "Require uploadType" error with API v1 HOT 4
- Upgrade the User & Group APIs to Version 2 HOT 1
- Upgrade the Folder & License APIs to Version 2 HOT 2
- Alert mechanism via API
- Call to a member function getId() on null in lib/php/Report/ReportUtils.php HOT 3
- As a User I would like to filter out files by extension on the search box. HOT 2
- The database upgrade failed from version 9.6 to a higher version
- Upgrade the Jobs & Report based APIs to Version 2 HOT 1
- cp2foss does not work from 4.3.0-rc1
- [API ERROR] calling Upload api throws 405 NOT ALLOWED HOT 2
- DB upgrade from < 4.3 to >= 4.3: Possible loss of edited results or main license
- Docker image build failed while upgrading from bullseye to bookworm
- Search functionality for Software Heritage Page and search and filter functionality of file browser page is not working
- scancode fails HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fossology.