Commit Graph

30 Commits

Author SHA1 Message Date
Joey Parrish f07fd0d997
fix: Embed full python protobuf library (#1438)
This embeds the full python protobuf library into the output in pssh-box-protos, which is used by installation targets and Docker images.  Without this, the installed pssh-box.py tool would depend on a separate installation of the python protobuf library.

Closes #1436
2024-10-02 08:31:04 -07:00
Cosmin Stejerean 84009d82ef
build: turn on integration tests in ctest by default (#1381)
They can still be skipped by passing `-DSKIP_INTEGRATION_TESTS=ON` for
the build configuration. Fix integration tests so they run correctly when building out of tree.

Use FindPython3 in CMake to fix build and integration tests on Windows.
2024-04-19 07:56:49 -07:00
Joey Parrish 3e71302ba4
feat!: Rewrite build system and third-party dependencies (#1310)
This work was done over ~80 individual commits in the `cmake` branch,
which are now being merged back into `main`. As a roll-up commit, it is
too big to be reviewable, but each change was reviewed individually in
context of the `cmake` branch. After this, the `cmake` branch will be
renamed `cmake-porting-history` and preserved.

---------

Co-authored-by: Geoff Jukes <geoffjukes@users.noreply.github.com>
Co-authored-by: Bartek Zdanowski <bartek.zdanowski@gmail.com>
Co-authored-by: Carlos Bentzen <cadubentzen@gmail.com>
Co-authored-by: Dennis E. Mungai <2356871+Brainiarc7@users.noreply.github.com>
Co-authored-by: Cosmin Stejerean <cstejerean@gmail.com>
Co-authored-by: Carlos Bentzen <carlos.bentzen@bitmovin.com>
Co-authored-by: Cosmin Stejerean <cstejerean@meta.com>
Co-authored-by: Cosmin Stejerean <cosmin@offbytwo.com>
2023-12-01 09:32:19 -08:00
Allan Lei d9d3c7f8be
fix: Indexing `bytes` produces `int` on python3 for `pssh-box.py` (#1228)
Fixes #1227
2023-07-12 09:03:43 -07:00
Dennis E. Mungai 161947f53e
fix: Fix type error in pssh-box.py with Python 3.10+ (#1187)
A single-line change on #L170 to `wv.protection_scheme =
struct.unpack('>L', bytes(protection_scheme, encoding='utf-8'))[0]`,
needed to work around this issue on Ubuntu 22.04LTS+ running Python
3.10+:

```sh
TypeError: a bytes-like object is required, not 'str'
```
On line 170.
2023-05-01 09:06:56 -07:00
Joey Parrish f577e2a0cf
chore: Update URLs after moving projects (#1042)
Since a project URL is encoded into outputs, this means also updating
the golden output files.

Closes #1043
2022-03-07 11:56:34 -08:00
Joey Parrish ac125564b9 build: Fix pylint 2.10 issues, use python3 where possible
The newest pylint release complained about several issues that the
older release did not.  This resolves those issues:

 - removes unneeded "u" prefix from strings
 - adds "encoding" parameter for all open() calls
 - because "encoding" is a python3-only parameter, use python3 in all
   the scripts that we control

Unfortunately, python2 is required for any scripts that import modules
from the ancient Chromium build system we're using (referenced by
DEPS), as well as kokoro scripts.

Change-Id: I2e9f97af508efe58b5a71de21740e59b1528affd
2021-08-24 12:27:03 -07:00
Joey Parrish 56e227267c Fix python linter errors and add linter checks to CI
Internal CI systems and the new GitHub CI system were out of sync,
with the external system not doing any linting.  Further, the internal
system was using an internal-only linter for Python.

This creates a script for Python linting based on the open-source
pylint tool, checks in the Google Style Guide's pylintrc file, creates
a custom action for linting and adds it to the existing workflows,
fixes pre-existing linter errors in Python scripts, and updates pylint
overrides.

b/190743862

Change-Id: Iff1f5d4690b32479af777ded0834c31c2161bd10
2021-06-21 21:46:48 +00:00
Joey Parrish e32b35f3e1 Fix clang-format output during linting
Instead of printing a binary object, treat the output of clang-format
as a utf-8 string.

b/190743862

Change-Id: I596d223792597f8157fdee2d75773131cc858c9a
2021-06-21 21:46:48 +00:00
Joey Parrish 0f8749a211 CI overhaul based on GitHub Actions
This replaces Travis (for Linux & Mac) and Appveyor (for Windows) with
GitHub Actions.  In addition to using GitHub Actions to test PRs, this
also expands the automation of releases so that the only manual steps
are:

 1. Create a new CHANGELOG.md entry
 2. Create a release tag

Workflows have been create for building and testing PRs and releases,
for publishing releases to GitHub, NPM, and Docker Hub, and for
updating documentation on GitHub Pages.

When a new PR is created, GitHub Actions will:
 - Build and test on all combinations of OS, release type, and library
   type

Appveyor's workflow took ~2 hours, whereas the new GitHub Actions
workflow takes ~30 minutes.

When a new release tag is created, GitHub Actions will:
 - Create a draft release on GitHub
 - Extract release notes from CHANGELOG.md & attach them to the
   draft release
 - Build and test on all combinations of OS, release type, and library
   type, aborting if any build or test fails
 - Attach release artifacts to the draft release, aborting if any
   one artifact can't be prepared
 - Fully publish the draft release on GitHub
 - Publish the same release to NPM (triggered by GitHub release)
 - Publish the same release to Docker Hub (triggered by GitHub release)
 - Update the docs on GitHub pages

Closes #336 (GitHub Actions workflow to replace Travis and Appveyor)

b/190743862 (internal; tracking replacement of Travis)

Change-Id: Ic53eef60a8587c5d1487769a0cefaa16eb9b46e7
2021-06-16 11:52:02 -07:00
Mattias Wadman 056140ae83
Update git-clang-format URL
The previous svn link is broken.
2021-05-07 10:21:40 -07:00
KongQun Yang 23953bf931 Update check_formatting.py to work with python3
Change-Id: Iff3ba89f3b3e6fe0991e48482546084d1ba66ac5
2021-05-04 02:07:49 +00:00
Qingquan(Q.Q.) Wang a6cce5e611
Fix wrong _create_bin_int implementation in pssh-box.py
#885.
2021-01-30 11:45:50 -08:00
pszemus c6b01f90ae
Fix python3 in pssh-box
The script now works with both python 2 and python 3 (tested with python 2.7 and python 3.8.6).

Fixes #833.
2020-12-11 09:43:29 -08:00
KongQun Yang 1b262b5784 Fix failures with latest gpylint
Change-Id: Id80000b530b0582b907730db9311075a7f5307fa
2020-06-03 22:59:22 +00:00
yokoyama10 ca47cd7a0d
Fixed build error with Python 3 (#765)
Add parentheses to print methods in `generate_license_notice.py`.
2020-05-06 11:21:23 -07:00
KongQun Yang 72c4797a59 Update pssh-box.py to remove external dependencies
With the update, the script needs to be launched from
out/{Debug,Release} directory.

Also updated docs to make it clear how to use the tool.

Fixes #538.

Change-Id: I37b71afc33e3b73ff5232e43d79c52ffa5859d57
2019-01-31 00:49:12 +00:00
KongQun Yang ba3e054e7e Allow clang-format in presubmit to be disabled
By having 'disable-clang-format' in commit message.

If you have the script setup as git pre-commit, it can be disabled
by '--no-verify' option.

Change-Id: I6fb358e85105255fddde41f950e986c74b7defc9
2018-05-08 23:59:52 +00:00
KongQun Yang 09dc0a1907 Collect and generate license notice
Under flag --licenses

Bug: 74447460

Change-Id: If99c4e927431ce08158e3734428e3b4d23d62c75
2018-04-13 00:29:55 +00:00
KongQun Yang 27c1900f12 [pssh-box] Support generating Widevine PSSH without content-id
Widevine PSSH with key-id and without content-id is now be supported.

Change-Id: I356590b79f79ff4c0310b22e5dc19b6d24ec4cee
2017-10-18 21:38:23 +00:00
KongQun Yang 9cb4018235 Add check formatting script
The script can be set as pre-commit hook to run clang-format
check automatically on every commit.

Change-Id: I05c8e5266ebc773c7949c64d7a885809070a58ec
2017-09-27 21:52:34 +00:00
KongQun Yang 7627871428 Update Doxygen config file
Doxygen should run under src/ directory:

$ doxygen docs/Doxyfile

Outputs are created in out/doxygen.

Change-Id: I9dd1a9aa158851d37ff9a2e37f701757eb3e577c
2017-09-15 22:02:32 +00:00
Kongqun Yang 12c61d6792 Fix pssh README to avoid confusion
Change-Id: I1ac1c4fbb75c2db6d1d960b1681afea0bac61bb8
2017-03-03 16:13:25 -08:00
Kongqun Yang 472fae24f2 [pssh] Support widevine pssh generation with protection_scheme
- Also import the version of the protobuf bundled in packager first,
  this avoids importing the installed version of the protobuf, which
  may not be compatible with this script.
- Print help if no argument is supplied.

Fixes #162

Change-Id: I1b5e87ba7fb51e81b0d4dd3791aaeb37ee0fd6ce
2016-10-10 10:39:41 -07:00
Kongqun Yang 01e53ee946 [pssh script] Fix invalid hex_16_bytes error on lower case input
Change-Id: I274634f9076500156527c04bc9cbb9f86da3c6bd
2016-07-25 17:58:03 -07:00
Jacob Trimble c9645bc21b Add a utility script used to generate/parse PSSH boxes.
This script can be used to parse and generate PSSH boxes.  This
serves two purposes:

* Parse PSSH boxes into a human readable format.
* Take several arguments to generate PSSH boxes.

This is also able to parse Widevine and PlayReady PSSH data and will
print the parsed data instead of the data as binary.  This can also
generate Widevine PSSH data instead of having the PSSH data passed
as an argument.

Change-Id: I245bd9abf79a259f6fda01d1fc0489b4a4a73db5
2016-04-01 16:19:45 +00:00
Rintaro Kuroiwa e251863130 Add ignore file for TSan build
- Added ignores.txt file. When doing a tsan build,
  tsan_blacklist gyp flag should point to the file.

Change-Id: Ia69f89f1906f0b386e081a7df5a7c867e411f8fd
2015-11-13 18:57:54 +00:00
KongQun Yang b6db8b9867 Get rid of svn dependencies
- Generate local copies of libevent, libxml and protobuf.

Change-Id: Ibb29f604191519267f0e6a3ee810cad0c1f80b27
2015-10-16 20:11:20 +00:00
Rintaro Kuroiwa ec21b04fab Add edash_packager.ycm_extra_conf.py
- Adding YCM configuration file for edash packager.
- For now the developer has to do a Debug build before YCM starts
  working.
- Also PATH must be set to where 'clang' is so that the system headers
  are included (e.g. for classes in std namespace).

Change-Id: I934f69fa6d70b930bde3fd684fa5d6a8204c5631
2015-06-29 14:56:22 -07:00
KongQun Yang b8126bc9da Move source code into packager directory
Make it easier to be included and integrated into other code.

Change-Id: I609881688cc20f8fac676cbd91fde4753af32ee5
2014-10-02 12:32:14 -07:00