aboutcode-org / scancode-toolkit

:mag: ScanCode detects licenses, copyrights, dependencies by "scanning code" ... to discover and inventory open source and third-party packages used in your code. Sponsored by NLnet project https://nlnet.nl/project/vulnerabilitydatabase, the Google Summer of Code, Azure credits, nexB and others generous sponsors!
https://aboutcode.org/scancode/
2.15k stars 552 forks source link

Add support for Scoop buckets #2787

Open pombredanne opened 2 years ago

pombredanne commented 2 years ago

See https://github.com/ScoopInstaller

karan-vaishnav commented 2 years ago

May I work on this issue? If yes, then please provide me all the details regarding it.

pombredanne commented 2 years ago

@karan-vaishnav Thanks... first step would be to research and document what are the package data and manifest formats used in there. Eventually we want to have manifests parsers in the "packagedcode" module.

karan-vaishnav commented 2 years ago

@pombredanne can you please share the reference docs for me to understand ?

pombredanne commented 2 years ago

@karan-vaishnav you would need to research how things work at https://github.com/ScoopInstaller What is the package manifest format? Is there a registry? an API? And for the scancode side, play with and read the code in packagedcode

karan-vaishnav commented 2 years ago

https://docs.google.com/document/d/1bJLuOnO6MJizhJ7fq5HxnN1imCtaO4T0EYm-yVGTkJU/edit?usp=sharing

@pombredanne I'm done with my research on how things work at https://github.com/ScoopInstaller. Please check through this link and tell me the changes required, I'll correct them. Also, does this file work? Or do I need to make a readme file or anything else?

pombredanne commented 2 years ago

@karan-vaishnav this is awesome! Do you mind top copy this content here in the issue as a comment using markdown? This way we can discuss in a single place.

karan-vaishnav commented 2 years ago

okay sure.

karan-vaishnav commented 2 years ago

Scoop

Installation

Run the following command from your PowerShell to install scoop to its default location (C:\Users\\scoop)

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

or shorter

iwr -useb get.scoop.sh | iex

Once installed, run scoop help for instructions. The default setup is configured so all user installed programs and Scoop itself live in C:\Users\\scoop. Globally installed programs (--global) live in C:\ProgramData\scoop. These settings can be changed through environment variables

Install Scoop to a Custom Directory by changing SCOOP

$env:SCOOP='D:\Applications\Scoop' [Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User')

run the installer

Configure Scoop to install global programs to a Custom Directory by changing SCOOP_GLOBAL

$env:SCOOP_GLOBAL='F:\GlobalScoopApps' [Environment]::SetEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine')

run the installer

Configure Scoop to store downloads to a Custom Directory by changing SCOOP_CACHE

$env:SCOOP_CACHE='F:\ScoopCache' [Environment]::SetEnvironmentVariable('SCOOP_CACHE', $env:SCOOP_CACHE, 'Machine')

run the installer

Configure Scoop to use a GitHub API token during searching and checkver by setting SCOOP_CHECKVER_TOKEN

$env:SCOOP_CHECKVER_TOKEN='' [Environment]::SetEnvironmentVariable('SCOOP_CHECKVER_TOKEN', $env:SCOOP_CHECKVER_TOKEN, 'Machine')

search for an app

Manifest Formate:-

schema.json

https://github.com/ScoopInstaller/Scoop/blob/master/schema.json

Definitions Architecture autoupdateArch Autoupdate Checkver Installer Uninstaller licenseIdentifiers License Properties Psmodule Shortcuts Suggest Uninstaller required

Scoop Format Manifest Tests

Here is the Format Manifest Test link: https://github.com/ScoopInstaller/Scoop/blob/master/test/Scoop-Format-Manifest.Tests.ps1

Scoop Manifest Tests

Here is the Manifest Test link: https://github.com/ScoopInstaller/Scoop/blob/master/test/Scoop-Manifest.Tests.ps1

Is there a registry?

Yes, there is a registry which is shown in our local storage.

API?

According to my research I couldn’t find any API. because it is running over command prompt, there is no need for an API.

@pombredanne please check this out now!