사이트링크1  
사이트링크2  

 

[작업내용]

  • 실행할 프로그램은 fosslight_scanner 으로 의존 프로그램중 fosslight_source 를 수정 적용할 예정
  • 해당 라이브러리 프로그램의 소스 파일 저장 절차는 생략
  • 수정 저장한 경로는 "C:\GitHub\fosslight_source_scanner-main" 로 지정

 

[작업환경]

  • OS+Lang Ver : Windows 11 Pro + Python3.8
  • OS+Lang Ver : WSL 2.5.9.0 + Ubuntu 24.04 + Python3.12

 

[수행 절차 Windows]

  1. python 가상 환경 생성
    C:\python>"C:\Program Files\Python38\python.exe" -m venv py38_env
     
  2. 가상 환경 활성화
    C:\python>py38_env\Scripts\activate
     
  3. program download 및 install
    C:\python>pip3 install fosslight_scanner
     
  4. 기존 설치된 fosslight_source 프로그램 삭제
    C:\python>pip3 uninstall fosslight_source
     
  5. 로컬 경로에 저장한 수정된 fosslight_source 프로그램 설치
    C:\python>pip3 install -e C:\Users\tobesoft\Documents\qc_works\sbom\FOSSLight\FOSSLight_Hub\GitHub\fosslight_source_scanner-main
     
  6. 정상 설치되었는지 확인
    C:\python>python -c "import fosslight_source; print(fosslight_source.__file__)"
     
  7. 수정된 source scanner 를 실행
    C:\python>fosslight source -p C:\Repositories\WORK00 -o C:\Users\imgood\Documents\FOSSLight_Scanner/WORK00_250715/ -f excel -c 12

 

[수행 절차 WSL Ubuntu]

  1. WSL 실행
    C:\Users\guest> wsl -d ubuntu
     
  2. python 버전 확인
    최신 WSL2 Ubuntu 에서는 Python 3.12.3 버전이 기본 설치되어 있다.
    확인 방법 : guest@DESKTOP-9ATMV:~/python3 --version
     
  3. python 가상 환경 생성
    guest@DESKTOP-9ATMV:~/python3.12 -m venv py312env 
     
  4. 가상 환경 활성화
    guest@DESKTOP-9ATMV:~/source py312env/bin/activate
     
  5. github에서 project download
    guest@DESKTOP-9ATMV:~/git clone https://github.com/fosslight/fosslight_source_scanner.git
     
  6. fosslight_scanner 프로그램 설치
    guest@DESKTOP-9ATMV:~/pip3 install -e fosslight_scanner
     
  7. fosslight_source 프로그램 삭제
    guest@DESKTOP-9ATMV:~/pip3 uninstall fosslight_source
     
  8. 로컬 경로에 저장한 수정된 fosslight_source 프로그램 설치
    guest@DESKTOP-9ATMV:~/pip3 install -e fosslight_source_scanner
     
  9. 정상 설치되었는지 확인
    guest@DESKTOP-9ATMV:~/python -c "import fosslight_source; print(fosslight_source.__file__)"
  10. 수정된 source scanner 를 실행
    guest@DESKTOP-9ATMV:~/fosslight all -p /mnt/d/test_project -o /mnt/d/test_project/sbom -f spdx-json -c 12