aboutcode-org / aboutcode-org/scancode-toolkit

Add support for FreeBSD Ports and packages

オープン
#1,073 コメント 6 件 リアクション 0 件 担当者 1 名 @steven-esser が担当を希望しています GitHub で見る
new feature package scan package-formats
主要言語
Python
スター
2.6k
フォーク
791
平均マージ
1日 12時間
マージ済み PR(30日)
5

説明

Ports are the packages for FreeBSD. They area built from sources and also available as pre-built binaries.

- The main site is at: https://www.freebsd.org/ports/
- The doc is at https://www.freebsd.org/doc/handbook/ports.html
- Source are in SVN at https://svnweb.freebsd.org/ports/head/
- And binaries at http://pkg.freebsd.org/

An example of a "port" would be this on the source side:
https://svnweb.freebsd.org/ports/head/sysutils/dmidecode/

The main source-side "metafile" is the Makefile:
https://svnweb.freebsd.org/ports/head/sysutils/dmidecode/Makefile?view=markup

The binaries are there (by architectures and releases):
https://pkg.freebsd.org/FreeBSD:10:amd64/release_1/All/

The index https://pkg.freebsd.org/FreeBSD:10:amd64/release_3/packagesite.txz may be of seom interest in the future and contains a packagesite.yaml which has one valid YAML doc in flowstyle per line, each being package data.

Note: the field "origin" contains a path back to the SVN ports tree
e.g. with origin="x11/xrefresh" we can go to https://svnweb.freebsd.org/ports/head/x11/xrefresh/

For dmidecode as an example package, the tarball:

https://pkg.freebsd.org/FreeBSD:10:amd64/release_1/All/dmidecode-2.12.txz

would contain this +COMPACT_MANIFEST file as a YAML file (same strcuture as each line in the packagesite.yaml above):
```
"name": "dmidecode",
"origin": "sysutils/dmidecode",
"version": "2.12",
"name": "dmidecode",
"origin": "sysutils/dmidecode",
"version": "2.12",
"arch": "freebsd:10:x86:64",
"maintainer": "anders@FreeBSD.org",
"prefix": "/usr/local",
"www": "http://www.nongnu.org/dmidecode/",
"flatsize": 188874,
"comment": "Tool for dumping DMI (SMBIOS) contents in human-readable format",
"licenselogic": "single",
"licenses": [
"GPLv2"
],
"desc": "Dmidecode is a tool or dumping a computer's DMI (some say SMBIOS) table\ncontents in a human-readable format. The output contains a description of the\nsystem's hardware components, as well as other useful pieces of information\nsuch as serial numbers and BIOS revision.\n\nWWW: http://www.nongnu.org/dmidecode/",
"categories": [
"sysutils"
]
"arch": "freebsd:10:x86:64",
"maintainer": "anders@FreeBSD.org",
"prefix": "/usr/local",
"www": "http://www.nongnu.org/dmidecode/",
"flatsize": 188874,
"comment": "Tool for dumping DMI (SMBIOS) contents in human-readable format",
"licenselogic": "single",
"licenses": [
"GPLv2"
],
"desc": "Dmidecode is a tool or dumping a computer's DMI (some say SMBIOS) table\ncontents in a human-readable format. The output contains a description of the\nsystem's hardware components, as well as other useful pieces of information\nsuch as serial numbers and BIOS revision.\n\nWWW: http://www.nongnu.org/dmidecode/",
"categories": [
"sysutils"
]
}
```

Based on this we should be able to write a package manifest parser to read/report this metadata. For now we should IMHO focus only on the +COMPACT_MANIFEST.

We may need to map the FreeBSD license "codes" to proper keys, as a bonus.

Some possible fields mapping:
- "name": "dmidecode",
- "origin": "sysutils/dmidecode", ==> can be used to infer the source URL for the package
- "version": "2.12",
- "arch": "freebsd:10:x86:64", ==> can may be used to infer the binary URL for the package such as https://pkg.freebsd.org/freebsd:10:x86:64/latest/All/dmidecode-2.12.txz
- "maintainer": "anders@FreeBSD.org", ==> a Party
- "prefix": "/usr/local", ==> useless for now
- "www": "http://www.nongnu.org/dmidecode/", ==> homepage
- "flatsize": 188874, ==> not useful
- "comment": "Tool for dumping DMI (SMBIOS) contents in human-readable format", ==> first line of description
- "licenselogic": "single", ==> these two would be the asserted
- "licenses": [
"GPLv2"
],
- "desc": "Dmidecode is a tool or dumping a computer's DMI (some say SMBIOS) table\ncontents in a human-readable format. The output contains a description of the\nsystem's hardware components, as well as other useful pieces of information\nsuch as serial numbers and BIOS revision.\n\nWWW: http://www.nongnu.org/dmidecode/", ==> rest of description
- "categories": [ ==> keywords
"sysutils"
]

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。