Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pillow] Pillow build improvements #4929

Merged
merged 6 commits into from Jan 8, 2021

Conversation

wiredfool
Copy link
Contributor

@wiredfool wiredfool commented Jan 7, 2021

This depends on python-pillow/Pillow#5189, which sets the zipsafe flag to false in setup.py. Merged

There are several things going on here, and I'm willing to split them into issue specific changes if required. (btw, I'm an owner of pillow)

  • make install-req is only for development dependencies -- test runners and doc builders. It's not required here.
  • Test using the library versions built for binary distribution, built with the same scripts as for releases. Out of the box, oss-fuzz installs libraries from ubuntu 16.04, and we're using the latest patch releases of the upstream sources for these dependencies. The distribution manylinux wheels are built on centos, so there's a bit of tweaking to make them build here. (e.g., linking yum to /bin/true, while preinstalling the dependencies). Note here that the libraries are downloaded and built at the build_image stage, not the build_fuzzer stage.
  • Don't install in develop mode, build in /tmp, install into site-packages. This minimizes the impact on the source tree when running a custom version.
  • Link was missing libwebpdemux.

@@ -0,0 +1,29 @@
#!/bin/bash

# Copyright 2020 Eric Soroos
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This need to be copyright "Google LLC"
(if you don't want to do this, I suggest putting the file outside of the OSS-Fuzz repo and pulling it in)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: also 2021

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really care, it's not that big of a script, but it might wind up elsewhere.

However,

  • The tests asks for a license block, they do not state what license.
  • The contributing.md doesn't mention this, and specifically says:

    The CLA is necessary mainly because you own the copyright to your changes,

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use this license header. We can improve CONTRIBUTING.md later to mention this, any patches welcome to add it to that documentation

# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.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 perepo_managerissions and
# limitations under the License.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perepo_managerissions?

IANAL, but ... That doesn't look right.

I'm not even sure what autocorrect was on when it did that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is corrected one

# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.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.

@inferno-chromium inferno-chromium merged commit 9abfa52 into google:master Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants