-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
6 Add support for RPM-based distros for docker and rootfs images (#127)
* Add minimal support for RPM distros #6 Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com> * Relax scancode-toolkit version requirements Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com> * Install scancode-toolkit[packages] for rpm support #6 Signed-off-by: Thomas Druez <tdruez@nexb.com> * Require newest RPM plugin and its deps Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com> * Update documentation for all OSes open is a macOS'ism Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com> * Require newest RPM plugin and its deps Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com> * Update documentation for all OSes open is a macOS'ism Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com> * Remove explicit dependency on rpm-inspector-rpm This is not needed as it comes with scancode-tk Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com> * Add changelog entry for RPM support #6 Signed-off-by: Thomas Druez <tdruez@nexb.com> Co-authored-by: Philippe Ombredanne <pombredanne@nexb.com>
- Loading branch information
1 parent
f04bd74
commit cff490e
Showing
6 changed files
with
94 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,50 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# http://nexb.com and https://github.com/nexB/scancode.io | ||
# The ScanCode.io software is licensed under the Apache License version 2.0. | ||
# Data generated with ScanCode.io is provided as-is without warranties. | ||
# ScanCode is a trademark of nexB Inc. | ||
# | ||
# You may not use this software except in compliance with the License. | ||
# You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0 | ||
# Unless required by applicable law or agreed to in writing, software distributed | ||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations under the License. | ||
# | ||
# Data Generated with ScanCode.io is provided on an "AS IS" BASIS, WITHOUT WARRANTIES | ||
# OR CONDITIONS OF ANY KIND, either express or implied. No content created from | ||
# ScanCode.io should be considered or used as legal advice. Consult an Attorney | ||
# for any legal advice. | ||
# | ||
# ScanCode.io is a free software code scanning tool from nexB Inc. and others. | ||
# Visit https://github.com/nexB/scancode.io for support and download. | ||
|
||
|
||
FROM python:3.9 | ||
|
||
# Force unbuffered stdout and stderr (e.g. they are flushed to terminal immediately) | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# Requirements as per https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html | ||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
bzip2 \ | ||
xz-utils \ | ||
zlib1g \ | ||
libxml2-dev \ | ||
libxslt1-dev \ | ||
libgomp1 \ | ||
libsqlite3-0 \ | ||
libgcrypt20 \ | ||
libpopt0 \ | ||
libzstd1 \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
RUN mkdir /opt/scancodeio/ | ||
RUN mkdir -p /var/scancodeio/static/ | ||
RUN mkdir -p /var/scancodeio/workspace/ | ||
WORKDIR /opt/scancodeio/ | ||
COPY etc/requirements/base.txt /opt/scancodeio/ | ||
RUN pip install -r base.txt | ||
COPY . /opt/scancodeio/ | ||
WORKDIR /opt/scancodeio/ | ||
RUN pip install . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# http://nexb.com and https://github.com/nexB/scancode.io | ||
# The ScanCode.io software is licensed under the Apache License version 2.0. | ||
# Data generated with ScanCode.io is provided as-is without warranties. | ||
# ScanCode is a trademark of nexB Inc. | ||
# | ||
# You may not use this software except in compliance with the License. | ||
# You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0 | ||
# Unless required by applicable law or agreed to in writing, software distributed | ||
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
# CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations under the License. | ||
# | ||
# Data Generated with ScanCode.io is provided on an "AS IS" BASIS, WITHOUT WARRANTIES | ||
# OR CONDITIONS OF ANY KIND, either express or implied. No content created from | ||
# ScanCode.io should be considered or used as legal advice. Consult an Attorney | ||
# for any legal advice. | ||
# | ||
# ScanCode.io is a free software code scanning tool from nexB Inc. and others. | ||
# Visit https://github.com/nexB/scancode.io for support and download. | ||
|
||
from packagedcode import rpm | ||
|
||
|
||
def package_getter(root_dir, detect_licenses=True, **kwargs): | ||
""" | ||
Yield installed package objects. | ||
""" | ||
packages = rpm.get_installed_packages(root_dir, detect_licenses=detect_licenses) | ||
for package in packages: | ||
yield package.purl, package |