diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2021-10-29 23:35:00 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2022-01-24 20:02:44 +0300 |
commit | eff27476badc5d48b544a07f9f4748a96506c8d7 (patch) | |
tree | bafd5e712e1ad4e4dc78056f73dbeb6a9ed6a618 /meta-openembedded | |
parent | 2a947d6075e017a8b50989a0498455752acb0e5d (diff) | |
download | openbmc-eff27476badc5d48b544a07f9f4748a96506c8d7.tar.xz |
subtree updates
poky: 80f2b56ad8..d78650b980:
Ahmed Hossam (1):
go.bbclass: Allow adding parameters to go ldflags
Alejandro Hernandez Samaniego (1):
baremetal-image: Fix do_image dependencies
Alexander Kanavin (153):
meson: update 0.58.1 -> 0.59.1
libcap: update 2.51 -> 2.54
lua: add a recipe from meta-oe
lua: update 5.3.6 -> 5.4.3
rpm: update 4.16.1.3 -> 4.17.0
libdnf: fix the rpm sqlite-only target setup
libsolv: disable rpm bdb format support
perl: do not build berkeley db module by default
package_rpm: use zstd instead of xz
qemu: update 6.0.0 -> 6.1.0
runqemu: correct vga-virtio option to keep virgl enabled
gnupg: update 2.3.1 -> 2.3.2
pinentry: update 1.1.1 -> 1.2.0
spirv-tools: update 2021.2 -> 2021.3
glslang: update 11.5.0 -> 11.6.0
shaderc: update 2021.1 -> 2021.2
inetutils: update 2.1 -> 2.2
systemd: update 249.3 -> 249.4
lsof: update 4.91 -> 4.94.0
libpam: update 1.5.1 -> 1.5.2
rt-tests: update 2.1 -> 2.2
libgit2: update 1.1.1 -> 1.2.0
libssh2: update 1.9.0 -> 1.10.0
libhandy: update 1.2.3 -> 1.4.0
qemu: install qmp module without hardcoding the python version in oeqa scripts
lttng-tools: replace ad hoc ptest fixup with upstream fixes
rust: drop PV from include file names
rust: update 1.54.0 -> 1.55.0
librsvg: update 2.40.21 -> 2.52.0 (transition to rust!)
librsvg: do not enable nativesdk
librsvg: add backports to fix big endian targets (e.g. mips)
librsvg: use only the target architecture to determine availability of atomic primitives
librsvg: restore reproducibility
adwaita-icon-theme: update 3.34/38 -> 41.0
gstreamer1.0-plugins-bad: disable rsvg on x32
rust/cargo: exclude UNINATIVE_LOADER from task signature
rust-common.bbclass: rewrite toolchain wrappers in (native) python
rust: do not write ar into target json definitions
rust: generate target definitions from (arch, abi), not just arch
openssl: update 1.1.1l -> 3.0.0
cryptodev-tests: do not use -Werror with openssl 3
serf: add a openssl 3 compatibility fix
ruby: disable openssl extension
glib-2.0: update 2.68.4 -> 2.70.0
glib-networking: update 2.68.2 -> 2.70.0
bison: update 3.7.6 -> 3.8.1
libdnf: update 0.63.1 -> 0.64.0
libexif: update 0.6.22 -> 0.6.23
sudo: update 1.9.7p2 -> 1.9.8p1
wget: update 1.21.1 -> 1.21.2
coreutils: update 8.32 -> 9.0
itstool: update 2.0.6 -> 2.0.7
nghttp2: add recipe from meta-oe
libsoup: add a 3.x recipe
webkitgtk: trim down DEPENDS
epiphany: trim down DEPENDS
webkitgtk: update 2.32.3 -> 2.34.0
epiphany: update 40.3 -> 41.0
python3: update 3.9.7 -> 3.10.0
libjitterentropy: update 3.1.0 -> 3.3.0
kea: update 1.8.2 -> 2.0.0
ghostscript: update 9.54.0 -> 9.55.0
lighttpd: update 1.4.59 -> 1.4.60
bluez5: update 5.61 -> 5.62
ovmf: update 202105 -> 202108
systemd: update 249.4 -> 249.5
meson: update 0.59.1 -> 0.59.2
python3-pip: update 21.2.4 -> 21.3
valgrind: update 3.17.0 -> 3.18.1
librsvg: update 2.52.0 -> 2.52.2
libva: update 2.12.0 -> 2.13.0
liberation-fonts: update 2.1.4 -> 2.1.5
ca-certificates: update 20210119 -> 20211016
curl: update 7.78.0 -> 7.79.1
libgit2: update 1.2.0 -> 1.3.0
libxcrypt: upgrade 4.4.25 -> 4.4.26
bison: upgrade 3.8.1 -> 3.8.2
cmake: update 3.21.2 -> 3.21.3
git: upgrade 2.33.0 -> 2.33.1
tzdata: upgrade 2021a -> 2021d
ofono: upgrade 1.32 -> 1.33
openssh: upgrade 8.7p1 -> 8.8p1
sysvinit: upgrade 2.99 -> 3.00
btrfs-tools: upgrade 5.13.1 -> 5.14.2
ccache: upgrade 4.4 -> 4.4.2
createrepo-c: upgrade 0.17.5 -> 0.17.6
libcomps: upgrade 0.1.17 -> 0.1.18
libedit: upgrade 20210714-3.1 -> 20210910-3.1
librepo: upgrade 1.14.1 -> 1.14.2
python3-jinja2: upgrade 3.0.1 -> 3.0.2
python3-pygobject: upgrade 3.40.1 -> 3.42.0
python3-setuptools: upgrade 58.0.4 -> 58.2.0
vala: upgrade 0.52.5 -> 0.54.2
acpica: upgrade 20210730 -> 20210930
asciidoc: upgrade 9.1.0 -> 9.1.1
libarchive: upgrade 3.5.1 -> 3.5.2
msmtp: upgrade 1.8.15 -> 1.8.17
sudo: upgrade 1.9.8p1 -> 1.9.8p2
gobject-introspection: upgrade 1.68.0 -> 1.70.0
gsettings-desktop-schemas: upgrade 40.0 -> 41.0
json-glib: upgrade 1.6.4 -> 1.6.6
libdazzle: upgrade 3.40.0 -> 3.42.0
harfbuzz: upgrade 2.9.1 -> 3.0.0
pango: upgrade 1.48.9 -> 1.48.10
libinput: upgrade 1.19.0 -> 1.19.1
linux-firmware: upgrade 20210818 -> 20210919
wireless-regdb: upgrade 2021.07.14 -> 2021.08.28
mpg123: upgrade 1.28.2 -> 1.29.0
puzzles: upgrade to latest revision
libwpe: upgrade 1.10.1 -> 1.12.0
diffoscope: upgrade 182 -> 187
fribidi: upgrade 1.0.10 -> 1.0.11
iso-codes: upgrade 4.6.0 -> 4.7.0
libatomic-ops: upgrade 7.6.10 -> 7.6.12
libcap: upgrade 2.54 -> 2.59
libmd: upgrade 1.0.3 -> 1.0.4
libsoup-2.4: upgrade 2.72.0 -> 2.74.0
gnupg: update 2.3.2 -> 2.3.3
libssh2: skip one of the ptests until openssh 8.8 compatibility is fixed
systemd: disable seccomp on mips32
waffle: convert to git, website is down
u-boot: upgrade 2021.07 -> 2021.10
psplash: upgrade to latest revision
stress-ng: convert to git, website is down
json-c: correct upstream version check
createrepo-c: upgrade 0.17.6 -> 0.17.7
python3-numpy: upgrade 1.21.2 -> 1.21.3
python3-pip: upgrade 21.3 -> 21.3.1
python3-setuptools: upgrade 58.2.0 -> 58.3.0
msmtp: upgrade 1.8.17 -> 1.8.18
gi-docgen: upgrade 2021.7 -> 2021.8
piglit: upgrade to latest revision
libinput: upgrade 1.19.1 -> 1.19.2
mpg123: upgrade 1.29.0 -> 1.29.2
puzzles: upgrade to latest revision
webkitgtk: upgrade 2.34.0 -> 2.34.1
wpebackend-fdo: upgrade 1.10.0 -> 1.12.0
diffoscope: upgrade 187 -> 188
libcap: upgrade 2.59 -> 2.60
vte: upgrade 0.64.2 -> 0.66.0
ncurses: update 6.2 -> 6.3
tzdata: update 2021d -> 2021e
asciidoc: update 9.1.1 -> 10.0.0
waffle: update 1.6.1 -> 1.7.0
virgl: skip headless test on specific older distros and fail otherwise
gptfdisk: address ncurses 6.3 compatibility
powertop: address ncurses 6.3 compatibility
systemtap: address ncurses 6.3 compatibility
igt-gpu-tools: address meson 0.60 compatibility
python3-pygobject: do not supply unknown g-i options
gstreamer1.0-python: do not supply unknown g-i options
webkitgtk: drop unnecessary SSE disabling patch
cups: exclude beta/rc versions from version check
Alexandre Belloni (5):
inetutils: drop CVE-2021-40491 patch
oeqa/selftest/sstatetests: fix typo ware -> were
maintainers.inc: fix up rust-cross entry
libevent,btrfs-tools: fix Upstream-Status tag
ruby: fix Upstream-Status
Andreas Müller (1):
webkitgtk: add gperf-native to DEPENDS to fix build
Andrei Gherzan (1):
qemu: Define libnfs PACKAGECONFIG
Andrej Valek (3):
busybox: 1.34.0 -> 1.34.1
featimage: refactor style
kernel-fitimage: use correct kernel image
Andres Beltran (1):
buildhistory: Fix package output files for SDKs
Bruce Ashfield (15):
linux-yocto/5.14: scripts/gcc-plugins: consistently use HOSTCC
linux-yocto/5.14: update to v5.14.8
linux-yocto/5.14: bsp/qemuarm*-gfx: use virtio graphics
linux-yocto/5.10: update to v5.10.69
linux-yocto/5.10: update to v5.10.70
linux-yocto/5.14: update to v5.14.9
kernel-yocto: don't apply config metadata patches twice
linux-yocto/5.14: revert: scripts/gcc-plugins: consistently use HOSTCC
linux-yocto/5.10: update to v5.10.73
linux-yocto/5.14: update to v5.14.12
linux-yocto/5.14: update to v5.14.13
linux-yocto/5.10: update to v5.10.74
linux-yocto/5.14: common-pc: enable CONFIG_ATA_PIIX as built-in
linux-yocto/5.14: update to v5.14.14
linux-yocto/5.10: update to v5.10.75
Caner Altinbasak (2):
bitbake: npmsw: Avoid race condition with multiple npm fetchers
bitbake: fetch2: Do not attempt to verify donestamp if download is not complete
Changhyeok Bae (2):
iproute2: update to 5.14.0
ethtool: update to 5.14
Changqing Li (1):
lttng-ust: fix do_compile failure for arm32 with DEBUG_BUILD enabled
Daiane Angolini (2):
machine/qemuarm*: Fix UBOOT_MACHINE value
ref-manual: Update how to set a useradd password
Daniel McGregor (3):
bison: prevent checking for textstyle.
bitbake.conf: Add gpg-agent as a host tool
sstate: Allow validation of sstate singatures against list of keys
David Joyner (1):
rust: add support for big endian 64-bit PowerPC
Denys Dmytriyenko (2):
wayland-protocols: upgrade 1.21 -> 1.22
wayland-protocols: upgrade 1.22 -> 1.23
Fred Liu (1):
glibc: Drop libcidn package
Henry Kleynhans (1):
sstate: Switch to ZStandard compressor support
Hsia-Jun(Randy) Li (1):
meson: install native file in sdk
Ian Ray (1):
archiver: Configurable tarball compression
Jon Mason (10):
oeqa/manual: Fix no longer valid URLs
bitbake: bitbake:toaster:test: Update SSTATE URL
yocto-bsp/poky: replace http with https for URLs
bitbake: bitbake: replace http with https for URLs
documentation: update sources mirror URL
documentation: replace http with https for URLs
documentation: use YOCTO_DL_URL
dev-manual: remove errant /
runqemu: add DEPLOY_DIR_IMAGE replacement in QB_OPT_APPEND
bitbake: bitbake-user-manual: update sources mirror URL
Jose Quaresma (15):
gstreamer1.0: 1.18.4 -> 1.18.5
gstreamer1.0-plugins-base: 1.18.4 -> 1.18.5
gstreamer1.0-plugins-good: 1.18.4 -> 1.18.5
gstreamer1.0-plugins-bad: 1.18.4 -> 1.18.5
gstreamer1.0-plugins-ugly: 1.18.4 -> 1.18.5
gstreamer1.0-rtsp-server: 1.18.4 -> 1.18.5
gstreamer1.0-libav: 1.18.4 -> 1.18.5
gstreamer1.0-vaapi: 1.18.4 -> 1.18.5
gstreamer1.0-omx: 1.18.4 -> 1.18.5
gstreamer1.0-python: 1.18.4 -> 1.18.5
gst-devtools: 1.18.4 -> 1.18.5
gst-examples: 1.18.4 -> 1.18.5
patch.bbclass: when the patch fails show more info on the fatal error
sstate.bbclass: count the files on mirrors using the pre local files
sstate: fix touching files inside pseudo
Joshua Watt (4):
bitbake: async: Close sync client event loop
bitbake: hashserv: Add tests for diverging reports
bitbake: hashserv: Fix diverging report race condition
classes/populate_sdk_base: Add setscene tasks
Kai Kang (1):
sudo: update multilib patch for sudo.conf
Khem Raj (11):
pkgconfig: Update to latest
libseccomp: Upgrade to 2.5.2 and beyond
openssl: Drop riscv32 upstreamed patches
opensbi-payloads.inc: Use strings for fallback
mesa: Enable svga for x86 only
qemu: Add knob for enabling PMDK pmem support
opensbi-payloads: Add dependency on kernel if fdt is set
librsvg: Fix vendored libc to work on riscv and musl
librsvg: Bump to 2.52.0 -> 2.52.2
rust: Upgrade to 1.56.0
librsvg: Disable 64bit atomics in crossbeam for rv32
Kiran Surendran (1):
ffmpeg: fix CVE-2021-38114
Konrad Weihmann (1):
libical: fix append in DEPENDS
Lukasz Majewski (1):
glibc: Extract common code to build tests to glibc-tests.inc
Marek Vasut (1):
piglit: upgrade to latest revision
Martin Jansa (2):
webkitgtk: add PACKAGECONFIG for opengl-or-es
boost: allow searching for python310
Maximilian Blenk (1):
mount-copybind: add rootcontext mountoption for overlayfs
Michael Halstead (2):
scripts/autobuilder-worker-prereq-tests: jinja2 check
releases: update to include 3.4 honister
Michael Opdenacker (18):
manuals: font fixes
ref-manual: document DEBUG_PREFIX_MAP
manuals: replace "apt-get" by "apt"
Makefile: allow epub and latexpdf outputs to use diagrams from SVG sources
conf.py: use PNG first in EPUB output
overview-manual: SVG diagram for the git workflow
docs: add "make all" to build old types of docs (html, epub, pdf) at once
manuals: introduce 'yocto_sstate' extlink
overview-manual: simplify expression
dev-manual: correct NO_GENERIC_LICENSE section title
dev-manual: warn about license compliance issues when static libraries are used
devpyshell: rename to pydevshell
ref-manual: document TOOLCHAIN_HOST_TASK_ESDK
manuals: rename "devpyshell" to "pydevshell"
ref-manual: document SOURCE_DATE_EPOCH
ref-manual: fix description of SOURCE_DATE_EPOCH
releases.rst: fix release number for 3.3.3
docs: poky.yaml: updates for 3.4
Mike Crowe (2):
lib/oe/qa,insane: Move extra error handling functions to library
insane,license,license_image: Allow treating license problems as errors
Mingli Yu (1):
packagedata.py: silence a DeprecationWarning
Oleh Matiusha (1):
findutils: add ptest
Oleksandr Kravchuk (15):
python3: update to 3.9.7
python3-git: update to 3.1.24
python3-dbusmock: update to 0.24.0
python3-setuptools: update to 58.0.4
python3-setuptools: minor cleanup
xf86-input-libinput: update to 1.2.0
libinput: update to 1.19.0
libxi: update to 1.8
xorgproto: update to 2021.5
xkeyboard-config: update to 2.34
libxkbcommon: update to 1.3.1
mirrors.bbclass: remove dead infozip mirrors
man-pages: update to 5.13
python3-smmap: update to 5.0.0
python3-pyparsing: update to 3.0.0
Pablo Saavedra Rodi?o (1):
mesa: upgrade 21.2.1 -> 21.2.4
Paul Barker (1):
bitbake: doc: bitbake-user-manual: Document BB_GIT_SHALLOW and friends
Paul Eggleton (7):
migration-3.4: tweak overrides change section
ref-manual: remove meta class
poky.yaml: add lz4 and zstd to essential host packages
migration-3.4: add additional migration info
migration: tweak introduction section
poky.yaml: fix lz4 package name for older Ubuntu versions
migration-3.4: add some extra packaging notes
Pavel Zhukov (1):
weston: wrapper for weston modules argument
Peter Hoyes (2):
u-boot: Convert ${UBOOT_ENV}.cmd into ${UBOOT_ENV}.scr
u-boot: Fix syntax error in ${UBOOT_ENV}.scr compilation
Peter Kjellerstedt (2):
meson.bblcass: Remove empty egg-info directories before running meson
qemu.inc: Remove empty egg-info directories before running meson
Petr Vorel (1):
ltp: Update to 20210927
Pgowda (2):
Fix rust-native build issue when debug is enabled
rust-cross: Fix directory not deleted for race glibc vs. musl
Ralph Siemsen (1):
tar: filter CVEs using vendor name
Randy Li (1):
meson: move lang args to the right section
Richard Purdie (54):
sstatesig: Only apply group/other permissions to pseudo files
rpm: Deterministically set vendor macro entry
abi_version/sstate: Bump to fix rpm corruption issues
multilib: Avoid sysroot race issues when multilib enabled
bitbake: knotty/uihelper: Show setscene task progress in summary output
bitbake: bitbake-worker: Handle pseudo shutdown in Ctrl+C case
poky.conf: Update tested distros list with recent changes
bitbake: hashserv: Improve behaviour for better determinism/sstate reuse
poky.conf: Bump version for 3.4 honister release
build-appliance-image: Update to honister head revision
bitbake: bitbake: Bump to version 1.52.0
build-appliance-image: Update to honister head revision
layer.conf: Extend recipes not to install without explict dependencies
libxml2: Use python3targetconfig to fix reproducibility issue
libnewt: Use python3targetconfig to fix reproducibility issue
bootchart2: Don't compile python modules
linux-yocto-dev: Ensure DEPENDS matches recent 5.14 kernel changes
base/insane: Import oe.qa by default
base: Clean up unneeded len() calls
base: Use repr() for printing exceptions
bitbake.conf: Add BB_CURRENTTASK to BB_HASHEXCLUDE
reproducible_build: Drop obsolete sstate workaround
python: Update now reproducibile builds are the default
bitbake: bitbake-worker: Set BB_CURRENTTASK earlier
bitbake: compress: Allow to operate on file descriptor
bitbake: siggen: Change file format of siginfo files to use zstd compressed json
sstate: Fixes for eSDK generation after zstd switch
patch: Use repr() with exceptions instead of str()
reproducible_build: Drop now unneeded compiler warning
reproducible: Move class function code into library
reproducible: Move variable definitions to bitbake.conf
reproducible: Merge code into base.bbclass
kernel: Add KERNEL_DEBUG_TIMESTAMPS variable
reproducible: Drop BUILD_REPRODUCIBLE_BINARIES variable
kernel: Rework kernel make flag to variable mappings
oeqa: Update cleanup code to wait for hashserv exit
poky: Reproducible builds are now the default
bitbake: tests/runqueue: Ensure hashserv exits before deleting files
bitbake: bitbake-worker: Add debug when unpickle fails
bitbake: siggen: Fix type conversion issues
bitbake: test/fetch: Update urls to match upstream branch name changes
libtool: Update patchset to match those submitted upstream
staging: Fix autoconf-native rebuild failure
patch: Fix exception reporting with repr()
bitbake: fetch2/perforce: Fix typo
bitbake: bitbake: Bump to post release verion 1.53.0
poky.conf: Post release version bump
gcc: Merge three related patches together
gcc: Drop sdt (dtrace) header patch
gcc: Drop broken/unneeded patch
bitbake: tests/runqueue: Drop python version test decorators
gcc: Update patches submitted/merged upstream
gcc: Drop testsuite failure fix patch
gcc: Add missing patch Upstream-Status
Ross Burton (21):
bitbake: tests/utils: mark a regex as a raw string
bitbake: tests/fetch: prefix the FetcherTest temporary directory
bitbake: fetch2: clarify the command-no-found error message
bitbake: fetch2/gitsm: remove the 'nugget' SRCREV caching
linux-yocto: add libmpc-native to DEPENDS
bitbake: fetch2: document checkstatus API
curl: fix CVE-2021-22945 through -22947
oe/license: implement ast.NodeVisitor.visit_Constant
license.bbclass: implement ast.NodeVisitor.visit_Constant
bitbake: codegen: implement ast.NodeVisitor.visit_Constant
testimage: fix unclosed testdata file
oe/utils: log exceptions in ThreadedWorker functions
sstate: don't silently handle all exceptions in sstate_checkhashes
gawk: replace AR patch with upstreamed patch
gawk: reduce strictness of the time test
strace: remove obsolete patch
strace: remove TOOLCHAIN assignment
oeqa/runtime: load modules using importlib
oeqa/runtime: search sys.path explicitly for modules
testimage: remove target_modules_path
strace: show test suite log on failure
Sakib Sajal (1):
go: upgrade 1.16.7 -> 1.16.8
Saul Wold (3):
spdx.py: Add annotation to relationship
create-spdx: add create_annotation function
create-spdx: cross recipes are native also
Stefan Herbrechtsmeier (17):
bitbake: fetch2: npm: Support npm archives with missing search directory mode
bitbake: fetch2: npm: Create config npmrc in environment instantiation
bitbake: fetch2: npmsw: Add support for local tarball and link sources
npm: Add support for EXTRA_OENPM arguments
recipetool: Move license md5sums into CSV files
recipetool: Skip common source files in guess_license
recipetool: Change default paramter fallback_licenses of function split_pkg_licenses from None to []
recipetool: ignore empty license files
recipetool: Add logger info for missing license entries
recipetool: Add support for linenumbers to licenses.csv
recipetool: npm: Do not add package.json files to LIC_FILES_CHKSUM
recipetool: npm: Use README as license fallback
npm: Add variable NPM_NODEDIR with default value
npm: Use configs for npm environment and args for npm run command
recipetool: Rework crunch_license to recognize more variants
recipetool: Simplify common source files skip in guess_license
npm: Remove unnecessary configs argument from npm run command
Teoh Jay Shen (1):
oeqa/runtime/parselogs: modified drm error in common errors list
Thomas Perrot (1):
image_types: allow the creation of block devices on top of UBI volumes
Tim Orling (17):
ptest-runner: install -collect-system-data script
python3-hypothesis: upgrade 6.15.0 -> 6.23.2
python3-importlib-metadata: upgrade 4.6.4 -> 4.8.1
python3-more-itertools: upgrade 8.9.0 -> 8.10.0
python3-zipp: upgrade 3.5.0 -> 3.6.0
libconvert-asn1-perl: upgrade 0.31 -> 0.33
python3-pytest: upgrade 6.2.4 -> 6.2.5
at-spi2-core: upgrade 2.40.3 -> 2.42.0
python3-packaging: DEPENDS on python3-setuptools-native
python3-packaging: BBCLASSEXTEND nativesdk
python3-tomli: add recipe for 1.2.1
python3-setuptools-scm: upgrade 6.0.1 -> 6.3.2
python3-setuptools: _distutils/sysconfig fix
python3-pyyaml: upgrade 5.4.1 -> 6.0
python3-manifest: -pprint RDEPENDS on -profile
python3-hypothesis: upgrade 6.23.2 -> 6.24.0
python3-tomli: upgrade 1.2.1 -> 1.2.2
Tobias Kaufmann (1):
mount-copybind: add SELinux support
Yureka (1):
systemd: add missing include for musl
Zoltán Böszörményi (1):
libpam: Fix build with DISTRO_FEATURES usrmerge
hongxu (1):
libcap: fix nativesdk-libcap relocate failure
wangmy (20):
diffoscope: upgrade 181 -> 182
cmake: upgrade 3.21.1 -> 3.21.2
gzip: upgrade 1.10 -> 1.11
harfbuzz: upgrade 2.9.0 -> 2.9.1
vulkan-headers: upgrade 1.2.182 -> 1.2.191
vulkan-loader: upgrade 1.2.182 -> 1.2.191
vulkan-tools: upgrade 1.2.182 -> 1.2.191
help2man: upgrade 1.48.4 -> 1.48.5
python3-more-itertools: upgrade 8.8.0 -> 8.9.0
acpid: upgrade 2.0.32 -> 2.0.33
bind: upgrade 9.16.20 -> 9.16.21
createrepo-c: upgrade 0.17.4 -> 0.17.5
dnf: upgrade 4.8.0 -> 4.9.0
ell: upgrade 0.43 -> 0.44
libical: upgrade 3.0.10 -> 3.0.11
dhcpcd: upgrade 9.4.0 -> 9.4.1
dnf: upgrade 4.9.0 -> 4.10.0
file: upgrade 5.40 -> 5.41
libdnf: upgrade 0.64.0 -> 0.65.0
lttng-tools: upgrade 2.13.0 -> 2.13.1
zhengruoqin (2):
libsolv: upgrade 0.7.19 -> 0.7.20
python3-pycryptodome: upgrade 3.10.1 -> 3.11.0
meta-security: a85fbe980e..e81c15f851:
Armin Kuster (1):
python3-fail2ban: fix build failure and cleanup
Kai Kang (1):
sssd: re-package to fix QA issues
Kristian Klausen (1):
swtpm: update to 0.6.1
Liwei Song (1):
recipes-security/chipsec: platform security assessment framework
meta-openembedded: 23dc4f060f..2f6797d8d6:
Alexander Kanavin (23):
python3-yappi: add python 3.10 fix
python3-gmpy2: update 2.0.8 -> 2.1.0rc1
python3-m2crypto: address build failure with openssl 3.x
lua: remove recipe as it is now in oe-core
nghttp2: remove recipe as it is now in oe-core
kronosnet: update 1.20 -> 1.22
polkit: update 0.116 -> 0.119
openflow: disable openssl PACKAGECONFIG
openipmi: add a python 3.10 compatibility patch
strongswan: disable openssl PACKAGECONFIG
pkcs11-helper: backport a openssl 3.x patch
nodejs: use -fpermissive
nodejs: add a python 3.10 compatibility patch
php: disable openssl PACKAGECONFIG
libsigrokdecode: add a python 3.10 compatibility patch
freerdp: backport openssl 3.x patches
opensc: do not use -Werror
cfengine: blacklist due to openssl 3.x incompatibility
netplan: do not use -Werror
boinc-client: blacklist due to openssl 3.x incompatibility
ldns: blacklist due to openssl 3.x incompatibility
surf: add a webkit 2.34 compatibility patch
mozjs: update 60.9.0 -> 91.1.0
Alexander Thoma (1):
keyutils: fix install path
Armin Kuster (1):
Apache: Several CVE fixes
Chen Qi (1):
ntfs-3g-ntfsprogs: upgrade to 2021.8.22
Gianfranco (2):
vboxguestdrivers: upgrade 6.1.26 -> 6.1.28
vboxguestdrivers: Fix build failure due to the last update.
Ivan Maidanski (1):
bdwgc: upgrade 8.0.4 -> 8.0.6
Jeremy Kerr (1):
mctp: Add MCTP control utilities
Joshua Watt (2):
colord-native: Inherit pkgconfig
mutter: Move gsettings to a separate package
Justin Bronder (2):
python3-mccabe: fix LICENSE and RDEPENDS
python3-pyflakes: fix LICENSE, HOMEPAGE and RDEPENDS
Khem Raj (44):
packagegroup-meta-oe: Add lv-drivers and lvgl
python3-pystache: Remove need for python2x
python3-behave: Switch to using github src_uri
python3-simpleeval: Remove use_2to3
python3-parse-type: Do not ask for 2to3
python3-anyjson: Do not enable 2to3
python3-pybluez: Do not set 2to3
packagegroup-meta-networking: Remove nghttp2
packagegroup-meta-oe: Remove lua
gjs: Inherit pkgconfig
luaposix: Use lua 5.4
devilspie2: Switch to using github repo
devilspie2: Add missing dependency on libxinerama
kronosnet: Correct path to poll.h
luaposix: Upgrade to 35.1
xfce.bbclass: Mark string as raw in a regexp
nodejs: add -fpermissive BUILD_CXXFLAGS
pcimem: Add riscv64 into COMPATIBLE_HOST
luaposix: Depend on libxcrypt-native
libcrypt-openssl-rsa-perl: Upgrade to 0.32
xrdp: Upgrade to 0.9.17
yelp,yelp-xsl,yelp-tools: Upgrade to 41 release
mozjs: Disable JIT on mips
libcrypt-openssl-rsa-perl: Fix build with openssl3+
nodejs: Upgrade to 14.18.1
librest: Use master with libsoup3 support
gnome-online-accounts: Upgrade to 3.43.1
iwd: Fix build with musl
xrdp: Exclude from builds
xorgxrdp: Add to exclusion list for now
bluepy: Set PV and correct syntax for RDEPENDS
python3-kivy: Use new override syntax in RDEPENDS
bluepy: Fix permissions on tarball
nodejs: Upgrade to 16.11.1
mozjs: Fix build on mips/musl
mozjs: Fix musl miscompiles with HAVE_THREAD_TLS_KEYWORD
luaposix: Use virtual/crypt instread of hardcoding libxcrypt
packagegroup-meta-oe: Add libjs-jquery-globalize and libjs-jquery-cookie
mozjs: Add riscv32 support
driverctl: Rename to have PV in recipe name
tbb: Link with libatomic when using clang compiler on rv32
gimp: Disable vector icons on mips/rv32 using clang
mozjs: Update to 91.2.0
mozjs: Fix build for 32bit systems disabling JIT
Kurt Kiefer (2):
mozjs: move large static library into staticdev package
gyp: fix for compatibility with Python 3.10
Leon Anavi (6):
python3-aiohue: Upgrade 2.6.1 -> 2.6.3
python3-paho-mqtt: Upgrade 1.5.1 -> 1.6.1
python3-thrift: Upgrade 0.13.0 -> 0.15.0
python3-prompt-toolkit: Upgrade 3.0.19 -> 3.0.21
python3-traitlets: Upgrade 5.1.0 -> 5.1.1
python3-prettytable: Upgrade 2.1.0 -> 2.2.1
LiweiSong (1):
Revert "chipsec: platform security assessment framework"
Marco Cavallini (1):
bluepy_git.bb: Added recipe for BluePy Python interface to Bluetooth LE on Linux (v2)
Marek Vasut (3):
apitrace: Upgrade to latest version
apitrace: Conditionally enable X11 support
yavta: Upgrade to latest version and drop downstream patch
Martin Jansa (4):
protobuf: import a patch from meta-webosose to fix building protobuf-c with gold linker
grpc: revert GRPCPP_ABSEIL_SYNC change from 1.40.0 to fix undefined references to absl::lts_20210324::Mutex::~Mutex()
luaposix: depend on target libxcrypt instead of native
lv-lib-png: add wayland to REQUIRED_DISTRO_FEATURES
Matthias Klein (1):
gpsd: Install also the generated parts of the Python library
Matthias Schiffer (1):
byacc: switch to official HTTPS mirror
Mingli Yu (1):
opencv: remove setup_vars_opencv4.sh
Oleksandr Kravchuk (72):
iwd: update to 1.18
nano: update to 5.9
ostree: update to 2021.5
pegtl: update to 3.2.1
pmdk: update to 1.11.1
protobuf-c: update to 1.4.0
thingsboard-gateway: update to 2.8
libbpf: fix PV
libcdio-paranoia: update to 10.2+2.0.1
ttf-abyssinica: update to 2.100
ttf-dejavu: add UPSTREAM_CHECK_URI
ttf-vlgothic: update to 20200720
networkmanager: update to 1.32.12
nng: update to 1.4.0
opensaf: update to 5.21.09
python3-absl: update 0.14.1
python3-alembic: update to 1.7.4
python3-astroid: update to 2.8.2
python3-cantools: update to 36.4.0
python3-certifi: update to 2021.10.8
python3-cffi: update to 1.15.0
python3-colorlog: update to 6.5.0
python3-coverage: update to 6.0.2
python3-cryptography-vectors: update to 35.0.0
python3-dateparser: update to 1.1.0
python3-elementpath: update to 2.3.2
python3-eventlet: update to 0.32.0
python3-google-api-core: update to 2.1.1
python3-google-api-python-client: update to 2.26.1
python3-google-auth: update to 2.3.0
python3-grpcio-tools: update to 1.41.0
python3-grpcio: update to 1.41.0
python3-h2: update to 4.1.0
python3-haversine: update to 2.5.1
python3-httplib2: update to 0.20.1
python3-idna: update to 3.3
python3-iso3166: update to 2.0.2
python3-joblib: update to 1.1.0
python3-jsonrpcserver: update to 5.0.3
python3-paramiko: update to 2.8.0
python3-portion: update to 2.2.0
python3-protobuf: update to 3.18.1
python3-pulsectl: update to 21.10.4
python3-pycodestyle: update to 2.8.0
python3-pyephem: update to 4.1
python3-pyflakes: update to 2.4.0
python3-pyjwt: update to 2.2.0
python3-pykickstart: update to 3.34
python3-pyopenssl: update to 21.0.0
python3-pyperf: update to 2.3.0
python3-pytest-timeout: update 2.0.1
python3-pytz: update to 2021.3
python3-regex: update to 2021.10.8
python3-sentry-sdk: update to 1.4.3
python3-sympy: udpate to 1.9
python3-twitter: update to 4.1.0
python3-uritemplate: update to 4.1.1
python3-websockets: update to 10.0
python3-wrapt: update to 1.13.2
python3-xlsxwriter: update to 3.0.1
python3-xmlschema: update to 1.8.0
python3-yarl: update to 1.7.0
python3-typeguard: update to 2.13.0
python3-pyatspi: update to 2.38.1
python3-h5py: update to 3.5.0
python3-pybind11-json: update to 0.2.11
python3-pychromecast: update to 9.3.1
python3-tzlocal: update to 4.0.1
python3-zeroconf: update to 0.36.9
leptonica: update to 1.82.0
redis-plus-plus: update to 1.3.2
hiredis: update to 1.0.2
Peter Bergin (3):
pipewire: remove manpages class
pipewire: also handle pipewire-media-session in systemd class
pipewire: rework PACKAGECONFIG for systemd service files
Philippe Coval (5):
lvgl: Add recipe for Lightweight Graphics Library
lv-drivers: Add recipe for lvgl lib
lv-lib-png: Add recipe for LVGL for handling PNG format
lvgl: Add lv_lib_png to packagegroup
lvgl: Lint recipe
Roland Hieber (1):
rapidjson: override hard-coded lib install dir
Shiping Ji (1):
Add recipe for driverctl
Tim Orling (6):
unicode-ucd: upgrade 12.1.0 -> 14.0.0
gnome-screenshot: add recipe for 40.0
libgweather: upgrade 3.36.2 -> 40.0
colord: inherit pkgconfig
gfbgraph: patch to build with latest rest
gnome-calendar: upgrade 3.38.1 -> 41.0
Trevor Gamblin (3):
python3-posix-ipc: Add recipe for version 1.0.5
python3-pyinotify: Add fcntl, logging to RDEPENDS
python3-cvxopt: upgrade 1.2.6 -> 1.2.7
Vyacheslav Yurkov (3):
grpc: fix cross-compilation of grpc applications
grpc: fix cross-compilation of grpc applications
grpc: upgrade 1.38.1 -> 1.41.0
Wang Mingyu (1):
poppler: upgrade 21.09.0 -> 21.10.0
Yi Zhao (3):
samba: upgrade 4.14.7 -> 4.14.8
audit: upgrade 3.0.5 -> 3.0.6
strongswan: upgrade 5.9.3 -> 5.9.4
Zoltán Böszörményi (1):
python3-jsmin: Upgrade to version 3.0.0
wangmy (11):
openvpn: upgrade 2.5.3 -> 2.5.4
redis: upgrade 6.2.5 -> 6.2.6
span-lite: upgrade 0.10.1 -> 0.10.3
bdwgc: upgrade 8.0.6 -> 8.2.0
icewm: upgrade 2.7.0 -> 2.8.0
ifenslave: upgrade 2.12 -> 2.13
asio: upgrade 1.18.1.bb -> 1.20.0
libgusb: upgrade 0.3.7 -> 0.3.8
libxmlb: upgrade 0.3.2 -> 0.3.3
xdebug: upgrade 2.9.5 -> 3.1.1
cryptsetup: upgrade 2.3.6 -> 2.4.1
zangrc (25):
python3-ipython: upgrade 7.27.0 -> 7.28.0
python3-jdatetime: upgrade 3.6.2 -> 3.6.4
python3-multidict: upgrade 5.1.0 -> 5.2.0
python3-openpyxl: upgrade 3.0.8 -> 3.0.9
python3-pyscaffold: upgrade 4.0.2 -> 4.1
python3-transitions: upgrade 0.8.9 -> 0.8.10
networkmanager-openvpn: upgrade 1.8.14 -> 1.8.16
ser2net: upgrade 4.3.3 -> 4.3.4
python3-humanize: upgrade 3.11.0 -> 3.12.0
python3-nmap: upgrade 1.5.0 -> 1.5.1
libjs-jquery-cookie: Add recipe
libjs-jquery-globalize: Add recipe
python3-cachetools: upgrade 4.2.2 -> 4.2.4
python3-cbor2: upgrade 5.4.1 -> 5.4.2
python3-click: upgrade 8.0.1 -> 8.0.3
python3-configargparse : upgrade 1.5.2 -> 1.5.3
python3-flask: upgrade 2.0.1 -> 2.0.2
python3-pyscaffold: upgrade 4.1 -> 4.1.1
python3-werkzeug: upgrade 2.0.1 -> 2.0.2
python3-absl: upgrade 0.14.1 -> 0.15.0
python3-pandas: upgrade 1.3.3 -> 1.3.4
python3-pulsectl: upgrade 21.10.4 -> 21.10.5
python3-pyjwt: upgrade 2.2.0 -> 2.3.0
python3-pytest-asyncio: upgrade 0.15.1 -> 0.16.0
python3-robotframework: upgrade 4.1.1 -> 4.1.2
zhengruoqin (15):
python3-ujson: upgrade 4.1.0 -> 4.2.0
python3-urllib3: upgrade 1.26.6 -> 1.26.7
python3-watchdog: upgrade 2.1.5 -> 2.1.6
gensio: upgrade 2.2.9 -> 2.3.1
nlohmann-json: upgrade 3.10.2 -> 3.10.4
libencode-perl: upgrade 3.12 -> 3.16
python3-socketio: upgrade 5.4.0 -> 5.4.1
python3-sqlalchemy: upgrade 1.4.23 -> 1.4.26
python3-stevedore: upgrade 3.4.0 -> 3.5.0
autofs: upgrade 5.1.7 -> 5.1.8
links: upgrade 2.22 -> 2.25
atftp: upgrade 0.7.4 -> 0.7.5
python3-gmqtt: upgrade 0.6.10 -> 0.6.11
python3-google-api-python-client: upgrade 2.26.1 -> 2.27.0
python3-greenlet: upgrade 1.1.1 -> 1.1.2
meta-raspberrypi: 9eb4879cf4..90b3ac6fb3:
Zygmunt Krynicki (1):
rpi-config: warn on config.txt lines exceeding 80 bytes
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I9e75d5bd606a913fbe69e6735c9ecafc436441ba
Diffstat (limited to 'meta-openembedded')
297 files changed, 9377 insertions, 11020 deletions
diff --git a/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2017.3.23.bb b/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2021.8.22.bb index 36fa5efd21..1ebbb410ee 100644 --- a/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2017.3.23.bb +++ b/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2021.8.22.bb @@ -10,8 +10,8 @@ SRC_URI = "http://tuxera.com/opensource/ntfs-3g_ntfsprogs-${PV}.tgz \ file://0001-libntfs-3g-Makefile.am-fix-install-failed-while-host.patch \ " S = "${WORKDIR}/ntfs-3g_ntfsprogs-${PV}" -SRC_URI[md5sum] = "d97474ae1954f772c6d2fa386a6f462c" -SRC_URI[sha256sum] = "3e5a021d7b761261836dcb305370af299793eedbded731df3d6943802e1262d5" +SRC_URI[md5sum] = "90da343e78877d388eb34cefae6799ae" +SRC_URI[sha256sum] = "55b883aa05d94b2ec746ef3966cb41e66bed6db99f22ddd41d1b8b94bb202efb" UPSTREAM_CHECK_URI = "https://www.tuxera.com/community/open-source-ntfs-3g/" UPSTREAM_CHECK_REGEX = "ntfs-3g_ntfsprogs-(?P<pver>\d+(\.\d+)+)\.tgz" diff --git a/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.24.bb b/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.24.bb index dbb576a10b..4b0f43b14a 100644 --- a/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.24.bb +++ b/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.24.bb @@ -51,6 +51,9 @@ EXTRA_OECONF = "--disable-python \ --disable-check-update \ --without-wmf" +EXTRA_OECONF:append:toolchain-clang:riscv32 = " --disable-vector-icons" +EXTRA_OECONF:append:toolchain-clang:mips = " --disable-vector-icons" + do_configure:append() { find ${B} -name Makefile | xargs sed -i s:'-I$(includedir)':'-I.':g find ${B} -name Makefile | xargs sed -i s:'-I/usr/include':'-I${STAGING_INCDIR}':g diff --git a/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.43.bb b/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.43.bb index 69c23d562a..f48f04f9da 100644 --- a/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.43.bb +++ b/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.43.bb @@ -4,15 +4,18 @@ LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=00aefaa50aad75c21367df66102d542c \ file://GPL3.txt;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS = "gtk+ glib-2.0 libwnck lua virtual/libx11" +DEPENDS = "gtk+ glib-2.0 libwnck libxinerama lua virtual/libx11" -SRC_URI = " \ - http://download.savannah.gnu.org/releases/${BPN}/${BPN}_${PV}-src.tar.gz \ +PV .= "+git${SRCPV}" + +SRCREV = "a3ee65b815a0247a0dbdaa39353444cef6f93499" + +SRC_URI = "git://github.com/dsalt/devilspie2;branch=master \ file://default.lua \ file://devilspie2.desktop \ " -SRC_URI[md5sum] = "26eed0b5b4af5c7e13c551eceaeab832" -SRC_URI[sha256sum] = "ecffc17c62b41e196b72340192a90c4223329df041f135e74c0990860595f828" + +S = "${WORKDIR}/git" inherit features_check pkgconfig gettext diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gfbgraph/gfbgraph/0001-Update-rest-requirement-to-rest-1.0.patch b/meta-openembedded/meta-gnome/recipes-gnome/gfbgraph/gfbgraph/0001-Update-rest-requirement-to-rest-1.0.patch new file mode 100644 index 0000000000..c24a9e569f --- /dev/null +++ b/meta-openembedded/meta-gnome/recipes-gnome/gfbgraph/gfbgraph/0001-Update-rest-requirement-to-rest-1.0.patch @@ -0,0 +1,72 @@ +From d058e6eb6c9ebf5f4fff89ec0ac93323fc64c1ba Mon Sep 17 00:00:00 2001 +From: Tim Orling <ticotimo@gmail.com> +Date: Mon, 18 Oct 2021 08:42:35 -0700 +Subject: [PATCH] Update rest requirement to rest-1.0 + +librest 0.8.1 declares rest-1.0 and was released four years ago. + +https://gitlab.gnome.org/GNOME/librest/-/commit/2971b3b92701f70fc368ad64bd25cefaea043f87 + +Upstream-Status: Submitted +[https://gitlab.gnome.org/GNOME/libgfbgraph/-/merge_requests/6] + +Signed-off-by: Tim Orling <ticotimo@gmail.com> + +--- + .dir-locals.el | 2 +- + configure.ac | 2 +- + gfbgraph/Makefile.am | 2 +- + libgfbgraph.pc.in | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/.dir-locals.el b/.dir-locals.el +index 77abbf0..d39cdf2 100644 +--- a/.dir-locals.el ++++ b/.dir-locals.el +@@ -3,7 +3,7 @@ + "/usr/include/json-glib-1.0" + "/usr/include/goa-1.0" + "/usr/lib64/goa-1.0/include" +- "/usr/include/rest-0.7" ++ "/usr/include/rest-1.0" + "/usr/include/dbus-1.0" + "/usr/lib64/dbus-1.0/include" + "/usr/include/gio-unix-2.0/" +diff --git a/configure.ac b/configure.ac +index fd1231f..9b49f3f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -40,7 +40,7 @@ AM_CONDITIONAL([ENABLE_GTK_DOC], false) + + GOBJECT_INTROSPECTION_CHECK([1.30.0]) + +-PKG_CHECK_MODULES(LIBGFBGRAPH, [glib-2.0 gio-2.0 gobject-2.0 rest-0.7 json-glib-1.0]) ++PKG_CHECK_MODULES(LIBGFBGRAPH, [glib-2.0 gio-2.0 gobject-2.0 rest-1.0 json-glib-1.0]) + + PKG_CHECK_MODULES(SOUP, [libsoup-2.4]) + SOUP_UNSTABLE_CPPFLAGS=-DLIBSOUP_USE_UNSTABLE_REQUEST_API +diff --git a/gfbgraph/Makefile.am b/gfbgraph/Makefile.am +index d07b90d..b993ab7 100644 +--- a/gfbgraph/Makefile.am ++++ b/gfbgraph/Makefile.am +@@ -60,7 +60,7 @@ GFBGraph_@API_MAJOR@_@API_MINOR@_gir_INCLUDES = \ + GLib-2.0 \ + Gio-2.0 \ + GObject-2.0 \ +- Rest-0.7 \ ++ Rest-1.0 \ + Json-1.0 \ + Soup-2.4 + +diff --git a/libgfbgraph.pc.in b/libgfbgraph.pc.in +index f87073e..d4f4e3a 100644 +--- a/libgfbgraph.pc.in ++++ b/libgfbgraph.pc.in +@@ -9,6 +9,6 @@ apiversion=@API_VERSION@ + Name: libgfbgraph + Description: GObject library for Facebook Graph API + Version: @VERSION@ +-Requires: gio-2.0 glib-2.0 goa-1.0 json-glib-1.0 libsoup-2.4 rest-0.7 ++Requires: gio-2.0 glib-2.0 goa-1.0 json-glib-1.0 libsoup-2.4 rest-1.0 + Libs: -L${libdir} -lgfbgraph-${apiversion} + Cflags: -I${includedir}/gfbgraph-@API_VERSION@ diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gfbgraph/gfbgraph_0.2.4.bb b/meta-openembedded/meta-gnome/recipes-gnome/gfbgraph/gfbgraph_0.2.4.bb index 1c5d90f6c7..23b3bf63a5 100644 --- a/meta-openembedded/meta-gnome/recipes-gnome/gfbgraph/gfbgraph_0.2.4.bb +++ b/meta-openembedded/meta-gnome/recipes-gnome/gfbgraph/gfbgraph_0.2.4.bb @@ -10,8 +10,9 @@ DEPENDS = " \ gnome-online-accounts \ " -inherit gnomebase gtk-doc gobject-introspection +inherit gnomebase gtk-doc gobject-introspection pkgconfig +SRC_URI += " file://0001-Update-rest-requirement-to-rest-1.0.patch" SRC_URI[archive.md5sum] = "c38af63e49f8fe8baad99537956b69ba" SRC_URI[archive.sha256sum] = "6065391f35e7335588cc6b0cc4c1abbce7341488573a654551264cb9793b9379" diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb b/meta-openembedded/meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb index ccac08d060..096e277bb4 100644 --- a/meta-openembedded/meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb +++ b/meta-openembedded/meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb @@ -9,7 +9,7 @@ GNOMEBASEBUILDCLASS = "autotools" DEPENDS = "mozjs gtk+3" -inherit gnomebase gsettings gobject-introspection vala gettext features_check upstream-version-is-even +inherit gnomebase gsettings gobject-introspection vala gettext features_check upstream-version-is-even pkgconfig SRC_URI[archive.sha256sum] = "7fb3eb746c17363d9ee47f4a5d0bb048f0075611763eb0da11d85e0e57aff381" SRC_URI += "file://0001-Disable-tests-on-host.patch \ diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/files/8be361b6ce8f0f8053e1609decbdbdc164ec8448.patch b/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/files/8be361b6ce8f0f8053e1609decbdbdc164ec8448.patch deleted file mode 100644 index eabf61aa5f..0000000000 --- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/files/8be361b6ce8f0f8053e1609decbdbdc164ec8448.patch +++ /dev/null @@ -1,242 +0,0 @@ -From 8be361b6ce8f0f8053e1609decbdbdc164ec8448 Mon Sep 17 00:00:00 2001 -From: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu> -Date: Sat, 5 Sep 2020 02:06:34 +0200 -Subject: [PATCH] project: Switch to libhandy-1 - -This commit updates the dependencies for libhandy to the tagged 1.0 -release and changes the code to accomodate the changes from -libhandy-0 to libhandy-1. - -Notable changes: -edit-dialog: HdyDialog has been dropped in [1] -alarm-row: action child type in HdyActionRow has been removed. - -[1] https://gitlab.gnome.org/GNOME/libhandy/-/merge_requests/434 -Upstream-Status: Backport -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - build-aux/flatpak/org.gnome.Calendar.json | 4 ++-- - meson.build | 2 +- - src/gui/gcal-alarm-row.c | 2 +- - src/gui/gcal-alarm-row.ui | 2 +- - src/gui/gcal-application.c | 4 ++++ - src/gui/gcal-edit-dialog.c | 4 ++-- - src/gui/gcal-edit-dialog.h | 3 +-- - src/gui/gcal-edit-dialog.ui | 20 ++++++++++---------- - 8 files changed, 22 insertions(+), 19 deletions(-) - -diff --git a/build-aux/flatpak/org.gnome.Calendar.json b/build-aux/flatpak/org.gnome.Calendar.json -index 18893ad6..0772ca8d 100644 ---- a/build-aux/flatpak/org.gnome.Calendar.json -+++ b/build-aux/flatpak/org.gnome.Calendar.json -@@ -174,8 +174,8 @@ - "sources" : [ - { - "type" : "git", -- "url" : "https://source.puri.sm/Librem5/libhandy.git", -- "branch" : "libhandy-0-0" -+ "url" : "https://gitlab.gnome.org/GNOME/libhandy.git", -+ "tag" : "1.0.0" - } - ] - }, -diff --git a/meson.build b/meson.build -index 2a546252..b81b95c9 100644 ---- a/meson.build -+++ b/meson.build -@@ -165,7 +165,7 @@ libedataserver_dep = dependency('libedataserver-1.2', version: '>= 3.17.1') - libecal_dep = dependency('libecal-2.0', version: '>= 3.33.2') - libsoup_dep = dependency('libsoup-2.4') - libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.33.1') --libhandy_dep = dependency('libhandy-0.0', version: '>= 0.0.9') -+libhandy_dep = dependency('libhandy-1', version: '>= 1.0.0') - glib_dep = dependency('glib-2.0', version: '>= 2.58.0') - gtk_dep = dependency('gtk+-3.0', version: '>= 3.22.20') - gio_dep = dependency('gio-2.0', version: '>= 2.58.0') -diff --git a/src/gui/gcal-alarm-row.c b/src/gui/gcal-alarm-row.c -index 1f95426c..1ada82f4 100644 ---- a/src/gui/gcal-alarm-row.c -+++ b/src/gui/gcal-alarm-row.c -@@ -214,7 +214,7 @@ setup_alarm (GcalAlarmRow *self) - duration = e_cal_component_alarm_trigger_get_duration (trigger); - formatted_duration = format_alarm_duration (duration); - -- hdy_action_row_set_title (HDY_ACTION_ROW (self), formatted_duration); -+ hdy_preferences_row_set_title (HDY_PREFERENCES_ROW (self), formatted_duration); - - action = e_cal_component_alarm_get_action (self->alarm); - gtk_toggle_button_set_active (self->volume_button, action == E_CAL_COMPONENT_ALARM_AUDIO); -diff --git a/src/gui/gcal-alarm-row.ui b/src/gui/gcal-alarm-row.ui -index 7d416c4c..bca8af50 100644 ---- a/src/gui/gcal-alarm-row.ui -+++ b/src/gui/gcal-alarm-row.ui -@@ -3,7 +3,7 @@ - <template class="GcalAlarmRow" parent="HdyActionRow"> - <property name="visible">True</property> - <property name="can_focus">False</property> -- <child type="action"> -+ <child> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="can_focus">False</property> -diff --git a/src/gui/gcal-application.c b/src/gui/gcal-application.c -index b9d46cec..591b95c8 100644 ---- a/src/gui/gcal-application.c -+++ b/src/gui/gcal-application.c -@@ -34,6 +34,7 @@ - #include <glib-object.h> - #include <gio/gio.h> - #include <glib/gi18n.h> -+#include <handy.h> - - struct _GcalApplication - { -@@ -446,6 +447,9 @@ gcal_application_startup (GApplication *app) - if ((g_application_get_flags (app) & G_APPLICATION_IS_SERVICE) != 0) - g_application_set_inactivity_timeout (app, 3 * 60 * 1000); - -+ /* initialize libhandy */ -+ hdy_init(); -+ - GCAL_EXIT; - } - -diff --git a/src/gui/gcal-edit-dialog.c b/src/gui/gcal-edit-dialog.c -index ae2b6714..5494a700 100644 ---- a/src/gui/gcal-edit-dialog.c -+++ b/src/gui/gcal-edit-dialog.c -@@ -47,7 +47,7 @@ - - struct _GcalEditDialog - { -- HdyDialog parent; -+ GtkDialog parent; - - gboolean writable; - -@@ -133,7 +133,7 @@ static void on_location_entry_changed_cb (GtkEntry - static void on_add_alarm_button_clicked_cb (GtkWidget *button, - GcalEditDialog *self); - --G_DEFINE_TYPE (GcalEditDialog, gcal_edit_dialog, HDY_TYPE_DIALOG) -+G_DEFINE_TYPE (GcalEditDialog, gcal_edit_dialog, GTK_TYPE_DIALOG) - - enum - { -diff --git a/src/gui/gcal-edit-dialog.h b/src/gui/gcal-edit-dialog.h -index e4f44ec5..a557916b 100644 ---- a/src/gui/gcal-edit-dialog.h -+++ b/src/gui/gcal-edit-dialog.h -@@ -22,7 +22,6 @@ - #include "gcal-event.h" - #include "gcal-manager.h" - --#include <handy.h> - - G_BEGIN_DECLS - -@@ -32,7 +31,7 @@ G_BEGIN_DECLS - - #define GCAL_TYPE_EDIT_DIALOG (gcal_edit_dialog_get_type ()) - --G_DECLARE_FINAL_TYPE (GcalEditDialog, gcal_edit_dialog, GCAL, EDIT_DIALOG, HdyDialog); -+G_DECLARE_FINAL_TYPE (GcalEditDialog, gcal_edit_dialog, GCAL, EDIT_DIALOG, GtkDialog); - - GtkWidget* gcal_edit_dialog_new (void); - -diff --git a/src/gui/gcal-edit-dialog.ui b/src/gui/gcal-edit-dialog.ui -index a36d8ae6..c28c22bb 100644 ---- a/src/gui/gcal-edit-dialog.ui -+++ b/src/gui/gcal-edit-dialog.ui -@@ -1,6 +1,6 @@ - <?xml version="1.0" encoding="UTF-8"?> - <interface> -- <template class="GcalEditDialog" parent="HdyDialog"> -+ <template class="GcalEditDialog" parent="GtkDialog"> - <property name="can_focus">False</property> - <property name="resizable">False</property> - <property name="modal">True</property> -@@ -156,7 +156,7 @@ - <property name="title" translatable="yes">Title</property> - <property name="activatable-widget">summary_entry</property> - -- <child type="action"> -+ <child> - <object class="GtkEntry" id="summary_entry"> - <property name="visible">True</property> - <property name="valign">center</property> -@@ -177,7 +177,7 @@ - <property name="title" translatable="yes">Location</property> - <property name="activatable-widget">location_entry</property> - -- <child type="action"> -+ <child> - <object class="GtkEntry" id="location_entry"> - <property name="visible">True</property> - <property name="valign">center</property> -@@ -226,7 +226,7 @@ - <property name="title" translatable="yes">All Day</property> - <property name="activatable-widget">all_day_switch</property> - -- <child type="action"> -+ <child> - <object class="GtkSwitch" id="all_day_switch"> - <property name="visible">True</property> - <property name="can_focus">True</property> -@@ -246,7 +246,7 @@ - <property name="visible">True</property> - <property name="title" translatable="yes">Starts</property> - -- <child type="action"> -+ <child> - <object class="GtkLabel" id="event_start_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> -@@ -294,7 +294,7 @@ - <property name="visible">True</property> - <property name="title" translatable="yes">Ends</property> - -- <child type="action"> -+ <child> - <object class="GtkLabel" id="event_end_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> -@@ -343,7 +343,7 @@ - <property name="title" translatable="yes">Repeat</property> - <property name="activatable-widget">repeat_combo</property> - -- <child type="action"> -+ <child> - <object class="GtkComboBoxText" id="repeat_combo"> - <property name="visible">True</property> - <property name="can_focus">False</property> -@@ -372,7 +372,7 @@ - <property name="title" translatable="yes">End Repeat</property> - <property name="activatable-widget">repeat_combo</property> - -- <child type="action"> -+ <child> - <object class="GtkComboBoxText" id="repeat_duration_combo"> - <property name="visible">True</property> - <property name="can_focus">False</property> -@@ -397,7 +397,7 @@ - <property name="title" translatable="yes">Number of Occurrences</property> - <property name="activatable-widget">number_of_occurrences_spin</property> - -- <child type="action"> -+ <child> - <object class = "GtkSpinButton" id="number_of_occurrences_spin"> - <property name="input_purpose">number</property> - <property name="input-hints">no-emoji</property> -@@ -415,7 +415,7 @@ - <property name="title" translatable="yes">End Repeat Date</property> - <property name="activatable-widget">until_date_selector</property> - -- <child type="action"> -+ <child> - <object class = "GcalDateSelector" id="until_date_selector"> - <property name="valign">center</property> - </object> --- -GitLab - diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/gnome-calendar_3.38.1.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/gnome-calendar_41.0.bb index e703ec6406..4b9b14a480 100644 --- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/gnome-calendar_3.38.1.bb +++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/gnome-calendar_41.0.bb @@ -18,12 +18,11 @@ DEPENDS = " \ GNOMEBASEBUILDCLASS = "meson" -inherit gnomebase gsettings gtk-icon-cache gettext features_check upstream-version-is-even +inherit gnomebase gsettings gtk-icon-cache gettext features_check upstream-version-is-even mime-xdg REQUIRED_DISTRO_FEATURES = "x11" -SRC_URI += "file://8be361b6ce8f0f8053e1609decbdbdc164ec8448.patch" -SRC_URI[archive.sha256sum] = "7280880a082d631624d02a102dd547ceb59498da368311f3e49a06cff897f512" +SRC_URI[archive.sha256sum] = "73ac923c6618bd0957d6b7c012a00a47bff67ee934249358817433772ceb193f" FILES:${PN} += " \ ${datadir}/gnome-shell \ diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/files/0001-Use-GUri-instead-of-SoupURI.patch b/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/files/0001-Use-GUri-instead-of-SoupURI.patch new file mode 100644 index 0000000000..11fc96bc28 --- /dev/null +++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/files/0001-Use-GUri-instead-of-SoupURI.patch @@ -0,0 +1,351 @@ +From 5a5abbedb171986dbf6f5a37577ec6afa892b66b Mon Sep 17 00:00:00 2001 +From: Carlos Garcia Campos <cgarcia@igalia.com> +Date: Mon, 7 Jun 2021 16:31:18 +0200 +Subject: [PATCH 1/2] Use GUri instead of SoupURI + +In preparation for libsoup3 where SoupURI has been removed in favor of +GUri. + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/merge_requests/73] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 2 +- + src/goabackend/goaoauth2provider.c | 11 +-- + src/goabackend/goaoauthprovider.c | 8 +- + src/goabackend/goaowncloudprovider.c | 107 ++++++++++++++++----------- + src/goabackend/goawebview.c | 9 +-- + 5 files changed, 80 insertions(+), 57 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 1f88bbd..7c0b39d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -90,7 +90,7 @@ GTK_DOC_CHECK([1.3]) + # Libraries + # + +-PKG_CHECK_MODULES(GLIB, [glib-2.0 gio-2.0 gio-unix-2.0 >= 2.52]) ++PKG_CHECK_MODULES(GLIB, [glib-2.0 gio-2.0 gio-unix-2.0 >= 2.67.4]) + AC_SUBST(GLIB_CFLAGS) + AC_SUBST(GLIB_LIBS) + +diff --git a/src/goabackend/goaoauth2provider.c b/src/goabackend/goaoauth2provider.c +index 3715431..2757838 100644 +--- a/src/goabackend/goaoauth2provider.c ++++ b/src/goabackend/goaoauth2provider.c +@@ -763,7 +763,7 @@ on_web_view_decide_policy (WebKitWebView *web_view, + GHashTable *key_value_pairs; + WebKitNavigationAction *action; + WebKitURIRequest *request; +- SoupURI *uri; ++ GUri *uri; + const gchar *fragment; + const gchar *oauth2_error; + const gchar *query; +@@ -793,9 +793,9 @@ on_web_view_decide_policy (WebKitWebView *web_view, + if (!g_str_has_prefix (requested_uri, redirect_uri)) + goto default_behaviour; + +- uri = soup_uri_new (requested_uri); +- fragment = soup_uri_get_fragment (uri); +- query = soup_uri_get_query (uri); ++ uri = g_uri_parse (requested_uri, G_URI_FLAGS_ENCODED, NULL); ++ fragment = g_uri_get_fragment (uri); ++ query = g_uri_get_query (uri); + + /* Three cases: + * 1) we can either have the backend handle the URI for us, or +@@ -808,7 +808,7 @@ on_web_view_decide_policy (WebKitWebView *web_view, + { + gchar *url; + +- url = soup_uri_to_string (uri, FALSE); ++ url = g_uri_to_string (uri); + if (!goa_oauth2_provider_process_redirect_url (self, url, &priv->access_token, &priv->error)) + { + g_prefix_error (&priv->error, _("Authorization response: ")); +@@ -889,6 +889,7 @@ on_web_view_decide_policy (WebKitWebView *web_view, + goto ignore_request; + + ignore_request: ++ g_uri_unref (uri); + g_assert (response_id != GTK_RESPONSE_NONE); + if (response_id < 0) + gtk_dialog_response (priv->dialog, response_id); +diff --git a/src/goabackend/goaoauthprovider.c b/src/goabackend/goaoauthprovider.c +index 0bfab6b..ff0927e 100644 +--- a/src/goabackend/goaoauthprovider.c ++++ b/src/goabackend/goaoauthprovider.c +@@ -643,7 +643,7 @@ on_web_view_decide_policy (WebKitWebView *web_view, + { + GHashTable *key_value_pairs; + IdentifyData *data = user_data; +- SoupURI *uri; ++ GUri *uri; + WebKitNavigationAction *action; + WebKitURIRequest *request; + const gchar *query; +@@ -664,8 +664,8 @@ on_web_view_decide_policy (WebKitWebView *web_view, + if (!g_str_has_prefix (requested_uri, redirect_uri)) + goto default_behaviour; + +- uri = soup_uri_new (requested_uri); +- query = soup_uri_get_query (uri); ++ uri = g_uri_parse (requested_uri, G_URI_FLAGS_ENCODED, NULL); ++ query = g_uri_get_query (uri); + + if (query != NULL) + { +@@ -678,6 +678,8 @@ on_web_view_decide_policy (WebKitWebView *web_view, + g_hash_table_unref (key_value_pairs); + } + ++ g_uri_unref (uri); ++ + if (data->oauth_verifier != NULL) + goto ignore_request; + +diff --git a/src/goabackend/goaowncloudprovider.c b/src/goabackend/goaowncloudprovider.c +index d142966..10734be 100644 +--- a/src/goabackend/goaowncloudprovider.c ++++ b/src/goabackend/goaowncloudprovider.c +@@ -22,8 +22,6 @@ + + #include <glib/gi18n-lib.h> + +-#include <libsoup/soup.h> +- + #include "goahttpclient.h" + #include "goaprovider.h" + #include "goaowncloudprovider.h" +@@ -78,45 +76,42 @@ get_provider_features (GoaProvider *provider) + /* ---------------------------------------------------------------------------------------------------- */ + + static char * +-uri_to_string_with_path (SoupURI *soup_uri, const gchar *path) ++uri_to_string_with_path (GUri *uri, const gchar *path) + { + gchar *uri_string; + gchar *uri_tmp; + +- if (soup_uri == NULL) ++ if (uri == NULL) + return NULL; + +- uri_tmp = soup_uri_to_string (soup_uri, FALSE); ++ uri_tmp = g_uri_to_string (uri); + uri_string = g_strconcat (uri_tmp, path, NULL); + g_free (uri_tmp); + + return uri_string; + } + +-static char *get_webdav_uri (SoupURI *soup_uri) ++static char *get_webdav_uri (GUri *uri) + { +- SoupURI *uri_tmp; ++ GUri *uri_tmp; + gchar *uri_webdav; + const gchar *scheme; +- guint port; + +- if (soup_uri == NULL) ++ if (uri == NULL) + return NULL; + +- scheme = soup_uri_get_scheme (soup_uri); +- port = soup_uri_get_port (soup_uri); +- uri_tmp = soup_uri_copy (soup_uri); +- +- if (g_strcmp0 (scheme, SOUP_URI_SCHEME_HTTPS) == 0) +- soup_uri_set_scheme (uri_tmp, "davs"); +- else +- soup_uri_set_scheme (uri_tmp, "dav"); +- +- if (!soup_uri_uses_default_port (soup_uri)) +- soup_uri_set_port (uri_tmp, port); ++ scheme = g_uri_get_scheme (uri); ++ uri_tmp = g_uri_build (g_uri_get_flags (uri), ++ g_strcmp0 (scheme, "https") == 0 ? "davs" : "dav", ++ g_uri_get_userinfo (uri), ++ g_uri_get_host (uri), ++ g_uri_get_port (uri), ++ g_uri_get_path (uri), ++ g_uri_get_query (uri), ++ g_uri_get_fragment (uri)); + + uri_webdav = uri_to_string_with_path (uri_tmp, WEBDAV_ENDPOINT); +- soup_uri_free (uri_tmp); ++ g_uri_unref (uri_tmp); + + return uri_webdav; + } +@@ -140,7 +135,7 @@ build_object (GoaProvider *provider, + gchar *uri_carddav; + gchar *uri_webdav; + GoaPasswordBased *password_based = NULL; +- SoupURI *uri = NULL; ++ GUri *uri = NULL; + gboolean accept_ssl_errors; + gboolean calendar_enabled; + gboolean contacts_enabled; +@@ -176,9 +171,24 @@ build_object (GoaProvider *provider, + account = goa_object_get_account (GOA_OBJECT (object)); + identity = goa_account_get_identity (account); + uri_string = g_key_file_get_string (key_file, group, "Uri", NULL); +- uri = soup_uri_new (uri_string); ++ uri = g_uri_parse (uri_string, G_URI_FLAGS_ENCODED, NULL); + if (uri != NULL) +- soup_uri_set_user (uri, identity); ++ { ++ GUri *tmp_uri; ++ ++ tmp_uri = g_uri_build_with_user (g_uri_get_flags (uri), ++ g_uri_get_scheme (uri), ++ identity, ++ g_uri_get_password (uri), ++ g_uri_get_auth_params (uri), ++ g_uri_get_host (uri), ++ g_uri_get_port (uri), ++ g_uri_get_path (uri), ++ g_uri_get_query (uri), ++ g_uri_get_fragment (uri)); ++ g_uri_unref (uri); ++ uri = tmp_uri; ++ } + + accept_ssl_errors = g_key_file_get_boolean (key_file, group, "AcceptSslErrors", NULL); + +@@ -224,7 +234,7 @@ build_object (GoaProvider *provider, + + out: + g_clear_object (&password_based); +- g_clear_pointer (&uri, soup_uri_free); ++ g_clear_pointer (&uri, g_uri_unref); + g_free (uri_string); + return ret; + } +@@ -354,8 +364,11 @@ add_entry (GtkWidget *grid, + static gchar * + normalize_uri (const gchar *address, gchar **server) + { +- SoupURI *uri = NULL; ++ GUri *uri = NULL; ++ GUri *uri_tmp = NULL; + const gchar *path; ++ const gchar *new_scheme; ++ gchar *new_path = NULL; + gchar *ret = NULL; + gchar *scheme = NULL; + gchar *uri_string = NULL; +@@ -384,48 +397,56 @@ normalize_uri (const gchar *address, gchar **server) + else + goto out; + +- uri = soup_uri_new (uri_string); ++ uri = g_uri_parse (uri_string, G_URI_FLAGS_ENCODED, NULL); + if (uri == NULL) + goto out; + + if (g_strcmp0 (scheme, "dav") == 0) +- soup_uri_set_scheme (uri, SOUP_URI_SCHEME_HTTP); ++ new_scheme = "http"; + else if (g_strcmp0 (scheme, "davs") == 0) +- soup_uri_set_scheme (uri, SOUP_URI_SCHEME_HTTPS); ++ new_scheme = "https"; ++ else ++ new_scheme = g_uri_get_scheme (uri); + +- path = soup_uri_get_path (uri); ++ path = g_uri_get_path (uri); + if (!g_str_has_suffix (path, "/")) +- { +- gchar *new_path; +- + new_path = g_strconcat (path, "/", NULL); +- soup_uri_set_path (uri, new_path); +- path = soup_uri_get_path (uri); +- g_free (new_path); +- } ++ ++ uri_tmp = g_uri_build (g_uri_get_flags (uri), ++ new_scheme, ++ g_uri_get_userinfo (uri), ++ g_uri_get_host (uri), ++ g_uri_get_port (uri), ++ new_path ? new_path : path, ++ g_uri_get_query (uri), ++ g_uri_get_fragment (uri)); ++ g_free (new_path); ++ g_uri_unref (uri); ++ uri = uri_tmp; ++ path = g_uri_get_path (uri); + + if (server != NULL) + { + gchar *port_string; + gchar *pretty_path; +- guint port; ++ gint port; + +- port = soup_uri_get_port (uri); +- port_string = g_strdup_printf (":%u", port); ++ port = g_uri_get_port (uri); ++ port_string = g_strdup_printf (":%d", port); + + pretty_path = g_strdup (path); + pretty_path[strlen(pretty_path) - 1] = '\0'; + +- *server = g_strconcat (soup_uri_get_host (uri), (port == std_port) ? "" : port_string, pretty_path, NULL); ++ *server = g_strconcat (g_uri_get_host (uri), (port == std_port || port == -1) ? "" : port_string, pretty_path, NULL); + + g_free (port_string); + g_free (pretty_path); + } + +- ret = soup_uri_to_string (uri, FALSE); ++ ret = g_uri_to_string (uri); + + out: +- g_clear_pointer (&uri, soup_uri_free); ++ g_clear_pointer (&uri, g_uri_unref); + g_free (scheme); + g_free (uri_string); + return ret; +diff --git a/src/goabackend/goawebview.c b/src/goabackend/goawebview.c +index 2438e0c..3df600e 100644 +--- a/src/goabackend/goawebview.c ++++ b/src/goabackend/goawebview.c +@@ -25,7 +25,6 @@ + #include <glib.h> + #include <glib/gi18n-lib.h> + #include <jsc/jsc.h> +-#include <libsoup/soup.h> + #include <webkit2/webkit2.h> + + #include "goawebview.h" +@@ -77,17 +76,17 @@ web_view_clear_notify_progress_cb (gpointer user_data) + static char * + web_view_create_loading_title (const gchar *url) + { +- SoupURI *uri; ++ GUri *uri; + const gchar *hostname; + gchar *title; + + g_return_val_if_fail (url != NULL && url[0] != '\0', NULL); + +- uri = soup_uri_new (url); +- hostname = soup_uri_get_host (uri); ++ uri = g_uri_parse (url, G_URI_FLAGS_NONE, NULL); ++ hostname = g_uri_get_host (uri); + /* translators: %s here is the address of the web page */ + title = g_strdup_printf (_("Loading “%s”…"), hostname); +- soup_uri_free (uri); ++ g_uri_unref (uri); + + return title; + } +-- +2.33.1 + diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/files/0002-Port-to-libsoup3.patch b/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/files/0002-Port-to-libsoup3.patch new file mode 100644 index 0000000000..0f959084a2 --- /dev/null +++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/files/0002-Port-to-libsoup3.patch @@ -0,0 +1,841 @@ +From 7d8c5208d095ce8e7123935263ef7a02f0381ae5 Mon Sep 17 00:00:00 2001 +From: Carlos Garcia Campos <cgarcia@igalia.com> +Date: Mon, 7 Jun 2021 18:28:42 +0200 +Subject: [PATCH 2/2] Port to libsoup3 + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/merge_requests/73] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 8 +- + src/daemon/goadaemon.c | 2 +- + src/goabackend/goaewsclient.c | 178 +++++++++++++++-------------- + src/goabackend/goahttpclient.c | 72 +++++++----- + src/goabackend/goalastfmprovider.c | 24 ++-- + src/goabackend/goaoauth2provider.c | 6 +- + src/goabackend/goaoauthprovider.c | 23 ++-- + src/goabackend/goarestproxy.h | 2 - + src/goabackend/goasouplogger.c | 33 ++---- + src/goabackend/goasouplogger.h | 3 - + src/goabackend/goautils.c | 27 ++--- + 11 files changed, 199 insertions(+), 179 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -113,15 +113,15 @@ if test "$enable_backend" != "no"; then + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + +- PKG_CHECK_MODULES(JAVASCRIPT_CORE_GTK, [javascriptcoregtk-4.0 >= 2.12.0]) ++ PKG_CHECK_MODULES(JAVASCRIPT_CORE_GTK, [javascriptcoregtk-4.1 >= 2.33.1]) + AC_SUBST(JAVASCRIPT_CORE_GTK_CFLAGS) + AC_SUBST(JAVASCRIPT_CORE_GTK_LIBS) + +- PKG_CHECK_MODULES(WEBKIT_GTK, [webkit2gtk-4.0 >= 2.26.0]) ++ PKG_CHECK_MODULES(WEBKIT_GTK, [webkit2gtk-4.1 >= 2.33.1]) + AC_SUBST(WEBKIT_GTK_CFLAGS) + AC_SUBST(WEBKIT_GTK_LIBS) + +- PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.42]) ++ PKG_CHECK_MODULES(LIBSOUP, [libsoup-3.0 >= 2.99.8]) + AC_SUBST(LIBSOUP_CFLAGS) + AC_SUBST(LIBSOUP_LIBS) + +@@ -129,7 +129,7 @@ if test "$enable_backend" != "no"; then + AC_SUBST(JSON_GLIB_CFLAGS) + AC_SUBST(JSON_GLIB_LIBS) + +- PKG_CHECK_MODULES(REST, [rest-0.7]) ++ PKG_CHECK_MODULES(REST, [rest-1.0]) + AC_SUBST(REST_CFLAGS) + AC_SUBST(REST_LIBS) + +--- a/src/daemon/goadaemon.c ++++ b/src/daemon/goadaemon.c +@@ -1496,7 +1496,7 @@ is_authorization_error (GError *error) + g_return_val_if_fail (error != NULL, FALSE); + + ret = FALSE; +- if (error->domain == REST_PROXY_ERROR || error->domain == SOUP_HTTP_ERROR) ++ if (error->domain == REST_PROXY_ERROR) + { + if (SOUP_STATUS_IS_CLIENT_ERROR (error->code)) + ret = TRUE; +--- a/src/goabackend/goaewsclient.c ++++ b/src/goabackend/goaewsclient.c +@@ -63,6 +63,12 @@ goa_ews_client_new (void) + + typedef struct + { ++ gchar *password; ++ gchar *username; ++} AutodiscoverAuthData; ++ ++typedef struct ++{ + GCancellable *cancellable; + GError *error; + SoupMessage *msgs[2]; +@@ -71,13 +77,16 @@ typedef struct + guint pending; + gulong cancellable_id; + xmlOutputBuffer *buf; ++ AutodiscoverAuthData *auth; + } AutodiscoverData; + +-typedef struct ++static void ++ews_client_autodiscover_auth_data_free (AutodiscoverAuthData *auth) + { +- gchar *password; +- gchar *username; +-} AutodiscoverAuthData; ++ g_free (auth->password); ++ g_free (auth->username); ++ g_slice_free (AutodiscoverAuthData, auth); ++} + + static void + ews_client_autodiscover_data_free (gpointer user_data) +@@ -92,22 +101,12 @@ ews_client_autodiscover_data_free (gpoin + + g_clear_error (&data->error); + +- /* soup_session_queue_message stole the references to data->msgs */ + xmlOutputBufferClose (data->buf); ++ g_clear_pointer (&data->auth, ews_client_autodiscover_auth_data_free); + g_object_unref (data->session); + g_slice_free (AutodiscoverData, data); + } + +-static void +-ews_client_autodiscover_auth_data_free (gpointer data, GClosure *closure) +-{ +- AutodiscoverAuthData *auth = data; +- +- g_free (auth->password); +- g_free (auth->username); +- g_slice_free (AutodiscoverAuthData, auth); +-} +- + static gboolean + ews_client_check_node (const xmlNode *node, const gchar *name) + { +@@ -115,9 +114,8 @@ ews_client_check_node (const xmlNode *no + return node->type == XML_ELEMENT_NODE && !g_strcmp0 ((gchar *) node->name, name); + } + +-static void +-ews_client_authenticate (SoupSession *session, +- SoupMessage *msg, ++static gboolean ++ews_client_authenticate (SoupMessage *msg, + SoupAuth *auth, + gboolean retrying, + gpointer user_data) +@@ -125,26 +123,26 @@ ews_client_authenticate (SoupSession *se + AutodiscoverAuthData *data = user_data; + + if (retrying) +- return; ++ return FALSE; + + soup_auth_authenticate (auth, data->username, data->password); ++ return TRUE; + } + +-static void +-ews_client_request_started (SoupSession *session, SoupMessage *msg, SoupSocket *socket, gpointer user_data) ++static gboolean ++ews_client_accept_certificate (SoupMessage *msg, GTlsCertificate *cert, GTlsCertificateFlags cert_flags, gpointer user_data) + { + AutodiscoverData *data; + GTask *task = G_TASK (user_data); +- GTlsCertificateFlags cert_flags; + +- g_debug ("goa_ews_client_autodiscover(): request started (%p)", msg); ++ g_debug ("goa_ews_client_autodiscover(): accept certificate for request (%p)", msg); + + data = (AutodiscoverData *) g_task_get_task_data (task); + +- if (!data->accept_ssl_errors +- && soup_message_get_https_status (msg, NULL, &cert_flags) +- && cert_flags != 0 +- && data->error == NULL) ++ if (data->accept_ssl_errors || cert_flags == 0) ++ return TRUE; ++ ++ if (data->error == NULL) + { + goa_utils_set_error_ssl (&data->error, cert_flags); + +@@ -153,6 +151,8 @@ ews_client_request_started (SoupSession + */ + soup_session_abort (data->session); + } ++ ++ return FALSE; + } + + static void +@@ -192,8 +192,10 @@ ews_client_autodiscover_parse_protocol ( + } + + static void +-ews_client_autodiscover_response_cb (SoupSession *session, SoupMessage *msg, gpointer user_data) ++ews_client_autodiscover_response_cb (SoupSession *session, GAsyncResult *result, gpointer user_data) + { ++ SoupMessage *msg; ++ GBytes *body; + GError *error = NULL; + AutodiscoverData *data; + GTask *task = G_TASK (user_data); +@@ -204,7 +206,11 @@ ews_client_autodiscover_response_cb (Sou + xmlDoc *doc; + xmlNode *node; + +- g_debug ("goa_ews_client_autodiscover(): response (%p, %u)", msg, msg->status_code); ++ msg = soup_session_get_async_result_message (session, result); ++ ++ g_debug ("goa_ews_client_autodiscover(): response (%p, %u)", msg, soup_message_get_status (msg)); ++ ++ body = soup_session_send_and_read_finish (session, result, &error); + + data = (AutodiscoverData *) g_task_get_task_data (task); + size = sizeof (data->msgs) / sizeof (data->msgs[0]); +@@ -215,16 +221,19 @@ ews_client_autodiscover_response_cb (Sou + break; + } + if (idx == size || data->pending == 0) +- return; ++ { ++ g_bytes_unref (body); ++ g_clear_object (&error); ++ g_object_unref (msg); ++ return; ++ } + + data->msgs[idx] = NULL; +- status = msg->status_code; +- +- /* status == SOUP_STATUS_CANCELLED, if we are being aborted by the ++ /* G_IO_ERROR_CANCELLED, if we are being aborted by the + * GCancellable, an SSL error or another message that was + * successful. + */ +- if (status == SOUP_STATUS_CANCELLED) ++ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + { + /* If we are being aborted by the GCancellable, then the + * GTask is responsible for setting the GError automatically. +@@ -235,21 +244,23 @@ ews_client_autodiscover_response_cb (Sou + */ + goto out; + } +- else if (status != SOUP_STATUS_OK) ++ ++ status = soup_message_get_status (msg); ++ if (status != SOUP_STATUS_OK || error) + { +- g_warning ("goa_ews_client_autodiscover() failed: %u — %s", msg->status_code, msg->reason_phrase); ++ g_warning ("goa_ews_client_autodiscover() failed: %u — %s", status, soup_message_get_reason_phrase (msg)); + g_return_if_fail (data->error == NULL); + +- goa_utils_set_error_soup (&error, msg); ++ if (!error) ++ goa_utils_set_error_soup (&error, msg); + goto out; + } + +- soup_buffer_free (soup_message_body_flatten (SOUP_MESSAGE (msg)->response_body)); + g_debug ("The response headers"); + g_debug ("==================="); +- g_debug ("%s", SOUP_MESSAGE (msg)->response_body->data); ++ g_debug ("%s", (char *)g_bytes_get_data (body, NULL)); + +- doc = xmlReadMemory (msg->response_body->data, msg->response_body->length, "autodiscover.xml", NULL, 0); ++ doc = xmlReadMemory (g_bytes_get_data (body, NULL), g_bytes_get_size (body), "autodiscover.xml", NULL, 0); + if (doc == NULL) + { + g_set_error (&error, +@@ -333,7 +344,7 @@ ews_client_autodiscover_response_cb (Sou + /* The callback (ie. this function) will be invoked after we + * have returned to the main loop. + */ +- soup_session_cancel_message (data->session, data->msgs[idx], SOUP_STATUS_CANCELLED); ++ g_cancellable_cancel (data->cancellable); + } + } + +@@ -368,6 +379,7 @@ ews_client_autodiscover_response_cb (Sou + + g_clear_error (&error); + g_object_unref (task); ++ g_object_unref (msg); + } + + static xmlDoc * +@@ -399,52 +411,54 @@ static void + ews_client_post_restarted_cb (SoupMessage *msg, gpointer data) + { + xmlOutputBuffer *buf = data; ++ GBytes *body; + + /* In violation of RFC2616, libsoup will change a POST request to + * a GET on receiving a 302 redirect. + */ + g_debug ("Working around libsoup bug with redirect"); +- g_object_set (msg, SOUP_MESSAGE_METHOD, "POST", NULL); ++ g_object_set (msg, "method", "POST", NULL); + +- soup_message_set_request(msg, +- "text/xml; charset=utf-8", +- SOUP_MEMORY_COPY, + #ifdef LIBXML2_NEW_BUFFER +- (gchar *) xmlOutputBufferGetContent(buf), +- xmlOutputBufferGetSize(buf)); ++ body = g_bytes_new (xmlOutputBufferGetContent (buf), xmlOutputBufferGetSize (buf)); + #else +- (gchar *) buf->buffer->content, +- buf->buffer->use); ++ body = g_bytes_new (buf->buffer->content, buf->buffer->use); + #endif ++ soup_message_set_request_body_from_bytes (msg, "text/xml; charset=utf-8", body); ++ g_bytes_unref (body); + } + + static SoupMessage * +-ews_client_create_msg_for_url (const gchar *url, xmlOutputBuffer *buf) ++ews_client_create_msg_for_url (const gchar *url, xmlOutputBuffer *buf, AutodiscoverAuthData *auth, GTask *task) + { + SoupMessage *msg; ++ GBytes *body = NULL; + + msg = soup_message_new (buf != NULL ? "POST" : "GET", url); +- soup_message_headers_append (msg->request_headers, "User-Agent", "libews/0.1"); ++ soup_message_headers_append (soup_message_get_request_headers (msg), ++ "User-Agent", "libews/0.1"); ++ ++ g_signal_connect (msg, "authenticate", ++ G_CALLBACK (ews_client_authenticate), ++ auth); ++ g_signal_connect (msg, "accept-certificate", ++ G_CALLBACK (ews_client_accept_certificate), ++ task); + + if (buf != NULL) + { +- soup_message_set_request (msg, +- "text/xml; charset=utf-8", +- SOUP_MEMORY_COPY, + #ifdef LIBXML2_NEW_BUFFER +- (gchar *) xmlOutputBufferGetContent(buf), +- xmlOutputBufferGetSize(buf)); ++ body = g_bytes_new (xmlOutputBufferGetContent (buf), xmlOutputBufferGetSize (buf)); + #else +- (gchar *) buf->buffer->content, +- buf->buffer->use); ++ body = g_bytes_new (buf->buffer->content, buf->buffer->use); + #endif ++ soup_message_set_request_body_from_bytes (msg, "text/xml; charset=utf-8", body); + g_signal_connect (msg, "restarted", G_CALLBACK (ews_client_post_restarted_cb), buf); + } + +- soup_buffer_free (soup_message_body_flatten (SOUP_MESSAGE (msg)->request_body)); + g_debug ("The request headers"); + g_debug ("==================="); +- g_debug ("%s", SOUP_MESSAGE (msg)->request_body->data); ++ g_debug ("%s", body ? (char *)g_bytes_get_data (body, NULL) : ""); + + return msg; + } +@@ -497,12 +511,15 @@ goa_ews_client_autodiscover (GoaEwsClien + * (successful) one win. + */ + ++ auth = g_slice_new0 (AutodiscoverAuthData); ++ auth->username = g_strdup (username); ++ auth->password = g_strdup (password); ++ data->auth = auth; + data->buf = buf; +- data->msgs[0] = ews_client_create_msg_for_url (url1, buf); +- data->msgs[1] = ews_client_create_msg_for_url (url2, buf); ++ data->msgs[0] = ews_client_create_msg_for_url (url1, buf, auth, task); ++ data->msgs[1] = ews_client_create_msg_for_url (url2, buf, auth, task); + data->pending = sizeof (data->msgs) / sizeof (data->msgs[0]); +- data->session = soup_session_new_with_options (SOUP_SESSION_SSL_STRICT, FALSE, +- NULL); ++ data->session = soup_session_new (); + soup_session_add_feature_by_type (data->session, SOUP_TYPE_AUTH_NTLM); + data->accept_ssl_errors = accept_ssl_errors; + +@@ -515,26 +532,19 @@ goa_ews_client_autodiscover (GoaEwsClien + NULL); + } + +- auth = g_slice_new0 (AutodiscoverAuthData); +- auth->username = g_strdup (username); +- auth->password = g_strdup (password); +- g_signal_connect_data (data->session, +- "authenticate", +- G_CALLBACK (ews_client_authenticate), +- auth, +- ews_client_autodiscover_auth_data_free, +- 0); +- +- g_signal_connect (data->session, "request-started", G_CALLBACK (ews_client_request_started), task); +- +- soup_session_queue_message (data->session, +- data->msgs[0], +- ews_client_autodiscover_response_cb, +- g_object_ref (task)); +- soup_session_queue_message (data->session, +- data->msgs[1], +- ews_client_autodiscover_response_cb, +- g_object_ref (task)); ++ ++ soup_session_send_and_read_async (data->session, ++ data->msgs[0], ++ G_PRIORITY_DEFAULT, ++ data->cancellable, ++ (GAsyncReadyCallback)ews_client_autodiscover_response_cb, ++ g_object_ref (task)); ++ soup_session_send_and_read_async (data->session, ++ data->msgs[1], ++ G_PRIORITY_DEFAULT, ++ data->cancellable, ++ (GAsyncReadyCallback)ews_client_autodiscover_response_cb, ++ g_object_ref (task)); + + g_free (url2); + g_free (url1); +--- a/src/goabackend/goahttpclient.c ++++ b/src/goabackend/goahttpclient.c +@@ -82,7 +82,7 @@ http_client_check_data_free (gpointer us + + g_clear_error (&data->error); + +- /* soup_session_queue_message stole the references to data->msg */ ++ g_object_unref (data->msg); + g_object_unref (data->session); + g_slice_free (CheckData, data); + } +@@ -97,9 +97,8 @@ http_client_check_auth_data_free (gpoint + g_slice_free (CheckAuthData, auth); + } + +-static void +-http_client_authenticate (SoupSession *session, +- SoupMessage *msg, ++static gboolean ++http_client_authenticate (SoupMessage *msg, + SoupAuth *auth, + gboolean retrying, + gpointer user_data) +@@ -107,26 +106,26 @@ http_client_authenticate (SoupSession *s + CheckAuthData *data = user_data; + + if (retrying) +- return; ++ return FALSE; + + soup_auth_authenticate (auth, data->username, data->password); ++ return TRUE; + } + +-static void +-http_client_request_started (SoupSession *session, SoupMessage *msg, SoupSocket *socket, gpointer user_data) ++static gboolean ++http_client_accept_certificate (SoupMessage *msg, GTlsCertificate *cert, GTlsCertificateFlags cert_flags, gpointer user_data) + { + CheckData *data; + GTask *task = G_TASK (user_data); +- GTlsCertificateFlags cert_flags; + + g_debug ("goa_http_client_check(): request started (%p)", msg); + + data = (CheckData *) g_task_get_task_data (task); + +- if (!data->accept_ssl_errors +- && soup_message_get_https_status (msg, NULL, &cert_flags) +- && cert_flags != 0 +- && data->error == NULL) ++ if (data->accept_ssl_errors || cert_flags == 0) ++ return TRUE; ++ ++ if (data->error == NULL) + { + goa_utils_set_error_ssl (&data->error, cert_flags); + +@@ -135,6 +134,8 @@ http_client_request_started (SoupSession + */ + soup_session_abort (data->session); + } ++ ++ return FALSE; + } + + static void +@@ -154,21 +155,27 @@ http_client_check_cancelled_cb (GCancell + } + + static void +-http_client_check_response_cb (SoupSession *session, SoupMessage *msg, gpointer user_data) ++http_client_check_response_cb (SoupSession *session, GAsyncResult *result, gpointer user_data) + { ++ SoupMessage *msg; + CheckData *data; +- GCancellable *cancellable; + GTask *task = G_TASK (user_data); ++ guint status; ++ GBytes *body; ++ GError *error = NULL; + +- g_debug ("goa_http_client_check(): response (%p, %u)", msg, msg->status_code); ++ msg = soup_session_get_async_result_message (session, result); ++ ++ g_debug ("goa_http_client_check(): response (%p, %u)", msg, soup_message_get_status (msg)); ++ ++ body = soup_session_send_and_read_finish (session, result, &error); + + data = (CheckData *) g_task_get_task_data (task); +- cancellable = g_task_get_cancellable (task); + +- /* status == SOUP_STATUS_CANCELLED, if we are being aborted by the ++ /* G_IO_ERROR_CANCELLED, if we are being aborted by the + * GCancellable or due to an SSL error. + */ +- if (msg->status_code == SOUP_STATUS_CANCELLED) ++ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + { + /* If we are being aborted by the GCancellable then there might + * or might not be an error. The GCancellable can be triggered +@@ -176,20 +183,27 @@ http_client_check_response_cb (SoupSessi + * of events across threads. + */ + if (data->error == NULL) +- g_cancellable_set_error_if_cancelled (cancellable, &data->error); ++ g_propagate_error (&data->error, g_steal_pointer (&error)); + + goto out; + } +- else if (msg->status_code != SOUP_STATUS_OK) ++ ++ status = soup_message_get_status (msg); ++ if (status != SOUP_STATUS_OK || error) + { +- g_warning ("goa_http_client_check() failed: %u — %s", msg->status_code, msg->reason_phrase); ++ g_warning ("goa_http_client_check() failed: %u — %s", status, soup_message_get_reason_phrase (msg)); + g_return_if_fail (data->error == NULL); + +- goa_utils_set_error_soup (&data->error, msg); ++ if (error) ++ g_propagate_error (&data->error, g_steal_pointer (&error)); ++ else ++ goa_utils_set_error_soup (&data->error, msg); + goto out; + } + + out: ++ g_clear_error (&error); ++ g_clear_pointer (&body, g_bytes_unref); + if (data->error != NULL) + g_task_return_error (task, g_steal_pointer (&data->error)); + else +@@ -225,7 +239,7 @@ goa_http_client_check (GoaHttpClient + data = g_slice_new0 (CheckData); + g_task_set_task_data (task, data, http_client_check_data_free); + +- data->session = soup_session_new_with_options (SOUP_SESSION_SSL_STRICT, FALSE, NULL); ++ data->session = soup_session_new (); + + logger = goa_soup_logger_new (SOUP_LOGGER_LOG_BODY, -1); + soup_session_add_feature (data->session, SOUP_SESSION_FEATURE (logger)); +@@ -246,15 +260,21 @@ goa_http_client_check (GoaHttpClient + auth = g_slice_new0 (CheckAuthData); + auth->username = g_strdup (username); + auth->password = g_strdup (password); +- g_signal_connect_data (data->session, ++ g_signal_connect_data (data->msg, + "authenticate", + G_CALLBACK (http_client_authenticate), + auth, + http_client_check_auth_data_free, + 0); + +- g_signal_connect (data->session, "request-started", G_CALLBACK (http_client_request_started), task); +- soup_session_queue_message (data->session, data->msg, http_client_check_response_cb, g_object_ref (task)); ++ g_signal_connect (data->msg, "accept-certificate", G_CALLBACK (http_client_accept_certificate), task); ++ ++ soup_session_send_and_read_async (data->session, ++ data->msg, ++ G_PRIORITY_DEFAULT, ++ data->cancellable, ++ (GAsyncReadyCallback)http_client_check_response_cb, ++ g_object_ref (task)); + + g_object_unref (task); + } +--- a/src/goabackend/goalastfmprovider.c ++++ b/src/goabackend/goalastfmprovider.c +@@ -483,8 +483,7 @@ add_account_cb (GoaManager *manager, GAs + + static void + check_cb (RestProxyCall *call, +- const GError *error, +- GObject *weak_object, ++ GAsyncResult *result, + gpointer user_data) + { + AddAccountData *data = user_data; +@@ -494,6 +493,9 @@ check_cb (RestProxyCall *call, + JsonObject *session_obj; + const gchar *payload; + ++ if (!rest_proxy_call_invoke_finish (call, result, &data->error)) ++ goto out; ++ + parser = NULL; + + parser = json_parser_new (); +@@ -562,12 +564,12 @@ on_rest_proxy_call_cancelled_cb (GCancel + } + + static void +-lastfm_login (GoaProvider *provider, +- const gchar *username, +- const gchar *password, +- GCancellable *cancellable, +- RestProxyCallAsyncCallback callback, +- gpointer user_data) ++lastfm_login (GoaProvider *provider, ++ const gchar *username, ++ const gchar *password, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) + { + AddAccountData *data = user_data; + RestProxyCall *call; +@@ -598,7 +600,7 @@ lastfm_login (GoaProvider + rest_proxy_call_add_param (call, "api_sig", sig_md5); + rest_proxy_call_add_param (call, "format", "json"); + +- rest_proxy_call_async (call, callback, NULL, data, &data->error); ++ rest_proxy_call_invoke_async (call, NULL, callback, data); + + g_signal_connect (cancellable, "cancelled", G_CALLBACK (on_rest_proxy_call_cancelled_cb), call); + +@@ -665,7 +667,7 @@ add_account (GoaProvider *provider, + username, + password, + data.cancellable, +- (RestProxyCallAsyncCallback) check_cb, ++ (GAsyncReadyCallback) check_cb, + &data); + + gtk_widget_set_sensitive (data.connect_button, FALSE); +@@ -819,7 +821,7 @@ refresh_account (GoaProvider *provide + username, + password, + data.cancellable, +- (RestProxyCallAsyncCallback) check_cb, ++ (GAsyncReadyCallback) check_cb, + &data); + gtk_widget_set_sensitive (data.connect_button, FALSE); + gtk_widget_show (data.progress_grid); +--- a/src/goabackend/goaoauth2provider.c ++++ b/src/goabackend/goaoauth2provider.c +@@ -95,11 +95,15 @@ is_authorization_error (GError *error) + g_return_val_if_fail (error != NULL, FALSE); + + ret = FALSE; +- if (error->domain == REST_PROXY_ERROR || error->domain == SOUP_HTTP_ERROR) ++ if (error->domain == REST_PROXY_ERROR) + { + if (SOUP_STATUS_IS_CLIENT_ERROR (error->code)) + ret = TRUE; + } ++ else if (g_error_matches (error, GOA_ERROR, GOA_ERROR_NOT_AUTHORIZED)) ++ { ++ ret = TRUE; ++ } + return ret; + } + +--- a/src/goabackend/goaoauthprovider.c ++++ b/src/goabackend/goaoauthprovider.c +@@ -77,11 +77,15 @@ is_authorization_error (GError *error) + g_return_val_if_fail (error != NULL, FALSE); + + ret = FALSE; +- if (error->domain == REST_PROXY_ERROR || error->domain == SOUP_HTTP_ERROR) ++ if (error->domain == REST_PROXY_ERROR) + { + if (SOUP_STATUS_IS_CLIENT_ERROR (error->code)) + ret = TRUE; + } ++ else if (g_error_matches (error, GOA_ERROR, GOA_ERROR_NOT_AUTHORIZED)) ++ { ++ ret = TRUE; ++ } + return ret; + } + +@@ -701,9 +705,15 @@ on_web_view_decide_policy (WebKitWebView + } + + static void +-rest_proxy_call_cb (RestProxyCall *call, const GError *error, GObject *weak_object, gpointer user_data) ++rest_proxy_call_cb (GObject *source, GAsyncResult *result, gpointer user_data) + { ++ RestProxyCall *call = REST_PROXY_CALL (source); + IdentifyData *data = user_data; ++ ++ if (!rest_proxy_call_invoke_finish (call, result, &data->error)) ++ { ++ g_prefix_error (&data->error, _("Error getting a Request Token: ")); ++ } + g_main_loop_quit (data->loop); + } + +@@ -770,11 +780,7 @@ get_tokens_and_identity (GoaOAuthProvide + for (n = 0; request_params[n] != NULL; n += 2) + rest_proxy_call_add_param (call, request_params[n], request_params[n+1]); + } +- if (!rest_proxy_call_async (call, rest_proxy_call_cb, NULL, &data, &data.error)) +- { +- g_prefix_error (&data.error, _("Error getting a Request Token: ")); +- goto out; +- } ++ rest_proxy_call_invoke_async (call, NULL, rest_proxy_call_cb, &data); + + goa_utils_set_dialog_title (GOA_PROVIDER (provider), dialog, add_account); + +@@ -796,6 +802,9 @@ get_tokens_and_identity (GoaOAuthProvide + g_main_loop_run (data.loop); + gtk_container_remove (GTK_CONTAINER (grid), spinner); + ++ if (data.error) ++ goto out; ++ + if (rest_proxy_call_get_status_code (call) != 200) + { + gchar *msg; +--- a/src/goabackend/goarestproxy.h ++++ b/src/goabackend/goarestproxy.h +@@ -27,8 +27,6 @@ + + G_BEGIN_DECLS + +-G_DEFINE_AUTOPTR_CLEANUP_FUNC (RestProxy, g_object_unref); +- + #define GOA_TYPE_REST_PROXY (goa_rest_proxy_get_type ()) + G_DECLARE_FINAL_TYPE (GoaRestProxy, goa_rest_proxy, GOA, REST_PROXY, RestProxy); + +--- a/src/goabackend/goasouplogger.c ++++ b/src/goabackend/goasouplogger.c +@@ -22,15 +22,6 @@ + + #include "goasouplogger.h" + +-struct _GoaSoupLogger +-{ +- SoupLogger parent_instance; +-}; +- +-G_DEFINE_TYPE (GoaSoupLogger, goa_soup_logger, SOUP_TYPE_LOGGER); +- +-/* ---------------------------------------------------------------------------------------------------- */ +- + static void + goa_soup_logger_printer (SoupLogger *logger, + SoupLoggerLogLevel level, +@@ -45,24 +36,16 @@ goa_soup_logger_printer (SoupLogger + g_free (message); + } + +-/* ---------------------------------------------------------------------------------------------------- */ +- +-static void +-goa_soup_logger_init (GoaSoupLogger *self) +-{ +- soup_logger_set_printer (SOUP_LOGGER (self), goa_soup_logger_printer, NULL, NULL); +-} +- +-static void +-goa_soup_logger_class_init (GoaSoupLoggerClass *klass) +-{ +-} +- +-/* ---------------------------------------------------------------------------------------------------- */ +- + SoupLogger * + goa_soup_logger_new (SoupLoggerLogLevel level, + gint max_body_size) + { +- return g_object_new (GOA_TYPE_SOUP_LOGGER, "level", level, "max-body-size", max_body_size, NULL); ++ SoupLogger *logger; ++ ++ logger = soup_logger_new (level); ++ if (max_body_size != -1) ++ soup_logger_set_max_body_size (logger, max_body_size); ++ soup_logger_set_printer (logger, goa_soup_logger_printer, NULL, NULL); ++ ++ return logger; + } +--- a/src/goabackend/goasouplogger.h ++++ b/src/goabackend/goasouplogger.h +@@ -27,9 +27,6 @@ + + G_BEGIN_DECLS + +-#define GOA_TYPE_SOUP_LOGGER (goa_soup_logger_get_type ()) +-G_DECLARE_FINAL_TYPE (GoaSoupLogger, goa_soup_logger, GOA, SOUP_LOGGER, SoupLogger); +- + SoupLogger *goa_soup_logger_new (SoupLoggerLogLevel level, + gint max_body_size); + +--- a/src/goabackend/goautils.c ++++ b/src/goabackend/goautils.c +@@ -841,29 +841,26 @@ goa_utils_set_error_soup (GError **err, + { + gchar *error_msg = NULL; + gint error_code = GOA_ERROR_FAILED; /* TODO: more specific */ ++ guint status_code; + +- switch (msg->status_code) ++ status_code = soup_message_get_status (msg); ++ switch (status_code) + { +- case SOUP_STATUS_CANT_RESOLVE: +- error_msg = g_strdup (_("Cannot resolve hostname")); +- break; +- +- case SOUP_STATUS_CANT_RESOLVE_PROXY: +- error_msg = g_strdup (_("Cannot resolve proxy hostname")); +- break; +- + case SOUP_STATUS_INTERNAL_SERVER_ERROR: + case SOUP_STATUS_NOT_FOUND: + error_msg = g_strdup (_("Cannot find WebDAV endpoint")); + break; + +- case SOUP_STATUS_UNAUTHORIZED: +- error_msg = g_strdup (_("Authentication failed")); +- error_code = GOA_ERROR_NOT_AUTHORIZED; +- break; +- + default: +- error_msg = g_strdup_printf (_("Code: %u — Unexpected response from server"), msg->status_code); ++ if (SOUP_STATUS_IS_CLIENT_ERROR (status_code)) ++ { ++ error_msg = g_strdup (_("Authentication failed")); ++ error_code = GOA_ERROR_NOT_AUTHORIZED; ++ } ++ else ++ { ++ error_msg = g_strdup_printf (_("Code: %u — Unexpected response from server"), status_code); ++ } + break; + } + diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.40.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.43.1.bb index c7e8eecb1f..8580d293ee 100644 --- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.40.0.bb +++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.43.1.bb @@ -4,19 +4,23 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=34c88b124db5fb2762c1676be7dadd36" GNOMEBASEBUILDCLASS = "autotools" -inherit gnomebase gsettings gobject-introspection gsettings gtk-doc vala gettext upstream-version-is-even features_check +inherit gnomebase gsettings gobject-introspection gsettings gtk-doc vala gettext features_check # for webkitgtk REQUIRED_DISTRO_FEATURES = "x11" DEPENDS = "glib-2.0" -SRC_URI[archive.sha256sum] = "585c4f979f6f543b77bfdb4fb01eb18ba25c2aec5b7866c676d929616fb2c3fa" +SRC_URI += "\ + file://0001-Use-GUri-instead-of-SoupURI.patch \ + file://0002-Port-to-libsoup3.patch \ +" +SRC_URI[archive.sha256sum] = "3bcb3663a12efd4482d9fdda3e171676267fc739eb6440a2b7109a0e87afb7e8" # backend is required for gnome-control-center PACKAGECONFIG = "backend other" -PACKAGECONFIG[backend] = "--enable-backend,--disable-backend,gtk+3 webkitgtk libsoup-2.4 json-glib libsecret rest libxml2" +PACKAGECONFIG[backend] = "--enable-backend,--disable-backend,gtk+3 webkitgtk libsoup json-glib libsecret rest libxml2" PACKAGECONFIG[krb5] = "--enable-kerberos, --disable-kerberos , krb5 gcr" # no extra dependencies! diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-screenshot/gnome-screenshot_40.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-screenshot/gnome-screenshot_40.0.bb new file mode 100644 index 0000000000..72272f993c --- /dev/null +++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-screenshot/gnome-screenshot_40.0.bb @@ -0,0 +1,22 @@ +SUMMARY = "GNOME Screenshot" +DESCRIPTION = "GNOME Screenshot is a small utility that takes a screenshot \ +of the whole desktop, the currently focused window, or an area of the screen." +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" + +SECTION = "x11/gnome" + +GNOMEBASEBUILDCLASS = "meson" + +inherit features_check gnomebase gettext upstream-version-is-even pkgconfig + +SRC_URI[archive.sha256sum] = "368ca95a39e39dc2406c849e8c4205e3f574acdd874c30741873455e3d21a5e2" + +DEPENDS += "glib-2.0 glib-2.0-native gtk+3 libhandy xext" + +REQUIRED_DISTRO_FEATURES = "x11" + +FILES:${PN} += " \ + ${datadir}/dbus-1 \ + ${datadir}/metainfo \ +" diff --git a/meta-openembedded/meta-gnome/recipes-gnome/libgweather/libgweather_3.36.2.bb b/meta-openembedded/meta-gnome/recipes-gnome/libgweather/libgweather_40.0.bb index 69fe9552f0..1d9daac1f0 100644 --- a/meta-openembedded/meta-gnome/recipes-gnome/libgweather/libgweather_3.36.2.bb +++ b/meta-openembedded/meta-gnome/recipes-gnome/libgweather/libgweather_40.0.bb @@ -7,8 +7,7 @@ GNOMEBASEBUILDCLASS = "meson" inherit gnomebase gsettings gobject-introspection gettext gtk-doc vala features_check upstream-version-is-even -SRC_URI[archive.md5sum] = "ff399cf89e97a3e574ae05db5617b96b" -SRC_URI[archive.sha256sum] = "ee1201a8fc25c14e940d3b26db49a34947c8aebf67dee01ee67fbcb06ecb37a0" +SRC_URI[archive.sha256sum] = "ca4e8f2a4baaa9fc6d75d8856adb57056ef1cd6e55c775ba878ae141b6276ee6" # gobject-introspection is mandatory and cannot be configured REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" @@ -17,8 +16,9 @@ UNKNOWN_CONFIGURE_WHITELIST:append = " introspection" GTKDOC_MESON_OPTION = "gtk_doc" DEPENDS = " \ + geocode-glib \ gtk+3 \ json-glib \ libsoup-2.4 \ - geocode-glib \ + python3-pygobject-native \ " diff --git a/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_3.34.6.bb b/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_3.34.6.bb index 72e776719e..b659d92952 100644 --- a/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_3.34.6.bb +++ b/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_3.34.6.bb @@ -73,7 +73,9 @@ do_install:append() { done } -PACKAGES =+ "${PN}-tests" +GSETTINGS_PACKAGE = "${PN}-gsettings" + +PACKAGES =+ "${PN}-tests ${PN}-gsettings" FILES:${PN} += " \ ${datadir}/gnome-control-center \ @@ -93,5 +95,5 @@ FILES:${PN}-dev += " \ ${libdir}/${MUTTER_API_NAME}/lib*.so \ " -RDEPENDS:${PN} += "zenity" +RDEPENDS:${PN} += "zenity ${PN}-gsettings" diff --git a/meta-openembedded/meta-gnome/recipes-gnome/rest/files/0001-Use-GUri-instead-of-SoupURI.patch b/meta-openembedded/meta-gnome/recipes-gnome/rest/files/0001-Use-GUri-instead-of-SoupURI.patch new file mode 100644 index 0000000000..37ba0a0429 --- /dev/null +++ b/meta-openembedded/meta-gnome/recipes-gnome/rest/files/0001-Use-GUri-instead-of-SoupURI.patch @@ -0,0 +1,181 @@ +From d39fd6d5f4c0a63cc048b84b0f989cb83f31e5fe Mon Sep 17 00:00:00 2001 +From: Carlos Garcia Campos <cgarcia@igalia.com> +Date: Tue, 8 Jun 2021 10:57:06 +0200 +Subject: [PATCH 1/2] Use GUri instead of SoupURI + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/librest/-/merge_requests/6] +--- + configure.ac | 2 +- + rest-extras/flickr-proxy.c | 19 ++++++++++++++----- + rest/oauth-proxy-call.c | 19 ++++++++++++++----- + rest/oauth2-proxy.c | 22 +++++++++++----------- + 4 files changed, 40 insertions(+), 22 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d15e592..d586e69 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -40,7 +40,7 @@ AM_PROG_CC_C_O + LT_PREREQ([2.2.6]) + LT_INIT([disable-static]) + +-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.44) ++PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.67.4) + PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.42) + PKG_CHECK_MODULES(XML, libxml-2.0) + PKG_CHECK_MODULES(GTHREAD, gthread-2.0) +diff --git a/rest-extras/flickr-proxy.c b/rest-extras/flickr-proxy.c +index 3342a4d..7726359 100644 +--- a/rest-extras/flickr-proxy.c ++++ b/rest-extras/flickr-proxy.c +@@ -304,13 +304,13 @@ flickr_proxy_build_login_url (FlickrProxy *proxy, + const char *frob, + const char *perms) + { +- SoupURI *uri; ++ GUri *uri; + GHashTable *params; + char *sig, *s; ++ char *query; + + g_return_val_if_fail (FLICKR_IS_PROXY (proxy), NULL); + +- uri = soup_uri_new ("http://flickr.com/services/auth/"); + params = g_hash_table_new (g_str_hash, g_str_equal); + + g_hash_table_insert (params, "api_key", proxy->priv->api_key); +@@ -321,14 +321,23 @@ flickr_proxy_build_login_url (FlickrProxy *proxy, + + sig = flickr_proxy_sign (proxy, params); + g_hash_table_insert (params, "api_sig", sig); ++ query = soup_form_encode_hash (params); + +- soup_uri_set_query_from_form (uri, params); ++ uri = g_uri_build (G_URI_FLAGS_ENCODED, ++ "http", ++ NULL, ++ "flickr.com", ++ -1, ++ "services/auth/", ++ query, ++ NULL); + +- s = soup_uri_to_string (uri, FALSE); ++ s = g_uri_to_string (uri); + ++ g_free (query); + g_free (sig); + g_hash_table_destroy (params); +- soup_uri_free (uri); ++ g_uri_unref (uri); + + return s; + } +diff --git a/rest/oauth-proxy-call.c b/rest/oauth-proxy-call.c +index c90c69d..e238c3c 100644 +--- a/rest/oauth-proxy-call.c ++++ b/rest/oauth-proxy-call.c +@@ -30,7 +30,7 @@ + + G_DEFINE_TYPE (OAuthProxyCall, oauth_proxy_call, REST_TYPE_PROXY_CALL) + +-#define OAUTH_ENCODE_STRING(x_) (x_ ? soup_uri_encode( (x_), "!$&'()*+,;=@") : g_strdup ("")) ++#define OAUTH_ENCODE_STRING(x_) (x_ ? g_uri_escape_string( (x_), NULL, TRUE) : g_strdup ("")) + + static char * + sign_plaintext (OAuthProxyPrivate *priv) +@@ -136,15 +136,24 @@ sign_hmac (OAuthProxy *proxy, RestProxyCall *call, GHashTable *oauth_params) + if (priv->oauth_echo) { + g_string_append_uri_escaped (text, priv->service_url, NULL, FALSE); + } else if (priv->signature_host != NULL) { +- SoupURI *url = soup_uri_new (url_str); ++ GUri *url = g_uri_parse (url_str, G_URI_FLAGS_ENCODED, NULL); ++ GUri *new_url; + gchar *signing_url; + +- soup_uri_set_host (url, priv->signature_host); +- signing_url = soup_uri_to_string (url, FALSE); ++ new_url = g_uri_build (g_uri_get_flags (url), ++ g_uri_get_scheme (url), ++ g_uri_get_userinfo (url), ++ priv->signature_host, ++ g_uri_get_port (url), ++ g_uri_get_path (url), ++ g_uri_get_query (url), ++ g_uri_get_fragment (url)); ++ signing_url = g_uri_to_string (new_url); + + g_string_append_uri_escaped (text, signing_url, NULL, FALSE); + +- soup_uri_free (url); ++ g_uri_unref (new_url); ++ g_uri_unref (url); + g_free (signing_url); + } else { + g_string_append_uri_escaped (text, url_str, NULL, FALSE); +diff --git a/rest/oauth2-proxy.c b/rest/oauth2-proxy.c +index 24e5da0..3382f8b 100644 +--- a/rest/oauth2-proxy.c ++++ b/rest/oauth2-proxy.c +@@ -37,8 +37,6 @@ oauth2_proxy_error_quark (void) + return g_quark_from_static_string ("rest-oauth2-proxy"); + } + +-#define EXTRA_CHARS_ENCODE "!$&'()*+,;=@" +- + enum { + PROP_0, + PROP_CLIENT_ID, +@@ -242,8 +240,8 @@ append_query_param (gpointer key, gpointer value, gpointer user_data) + char *encoded_val, *encoded_key; + char *param; + +- encoded_val = soup_uri_encode (value, EXTRA_CHARS_ENCODE); +- encoded_key = soup_uri_encode (key, EXTRA_CHARS_ENCODE); ++ encoded_val = g_uri_escape_string (value, NULL, TRUE); ++ encoded_key = g_uri_escape_string (key, NULL, TRUE); + + param = g_strdup_printf ("%s=%s", encoded_key, encoded_val); + g_free (encoded_key); +@@ -295,8 +293,8 @@ oauth2_proxy_build_login_url_full (OAuth2Proxy *proxy, + g_hash_table_foreach (extra_params, append_query_param, params); + } + +- encoded_uri = soup_uri_encode (redirect_uri, EXTRA_CHARS_ENCODE); +- encoded_id = soup_uri_encode (proxy->priv->client_id, EXTRA_CHARS_ENCODE); ++ encoded_uri = g_uri_escape_string (redirect_uri, NULL, TRUE); ++ encoded_id = g_uri_escape_string (proxy->priv->client_id, NULL, TRUE); + + url = g_strdup_printf ("%s?client_id=%s&redirect_uri=%s&type=user_agent", + proxy->priv->auth_endpoint, encoded_id, +@@ -378,20 +376,22 @@ oauth2_proxy_extract_access_token (const char *url) + { + GHashTable *params; + char *token = NULL; +- SoupURI *soupuri = soup_uri_new (url); ++ const char *fragment; ++ GUri *uri = g_uri_parse (url, G_URI_FLAGS_ENCODED, NULL); + +- if (soupuri->fragment != NULL) { +- params = soup_form_decode (soupuri->fragment); ++ fragment = g_uri_get_fragment (uri); ++ if (fragment != NULL) { ++ params = soup_form_decode (fragment); + + if (params) { + char *encoded = g_hash_table_lookup (params, "access_token"); + if (encoded) +- token = soup_uri_decode (encoded); ++ token = g_uri_unescape_string (encoded, NULL); + + g_hash_table_destroy (params); + } + } +- soup_uri_free (soupuri); ++ g_uri_unref (uri); + + return token; + } +-- +2.33.1 + diff --git a/meta-openembedded/meta-gnome/recipes-gnome/rest/files/0002-Port-to-libsoup3.patch b/meta-openembedded/meta-gnome/recipes-gnome/rest/files/0002-Port-to-libsoup3.patch new file mode 100644 index 0000000000..eed522f776 --- /dev/null +++ b/meta-openembedded/meta-gnome/recipes-gnome/rest/files/0002-Port-to-libsoup3.patch @@ -0,0 +1,1696 @@ +From 3dc630ae5b9dc6cda1ba318de2cd654aaba7b4a2 Mon Sep 17 00:00:00 2001 +From: Carlos Garcia Campos <cgarcia@igalia.com> +Date: Tue, 8 Jun 2021 17:44:04 +0200 +Subject: [PATCH 2/2] Port to libsoup3 + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/librest/-/merge_requests/6] +--- + configure.ac | 39 ++++- + rest-extras.pc.in | 2 +- + rest-extras/youtube-proxy.c | 110 +++++++++++--- + rest.pc.in | 2 +- + rest/rest-private.h | 22 ++- + rest/rest-proxy-auth.c | 16 ++ + rest/rest-proxy-call.c | 296 +++++++++++++++++++++++++++++------- + rest/rest-proxy.c | 209 ++++++++++++++++++++++--- + tests/custom-serialize.c | 18 +++ + tests/proxy-continuous.c | 37 ++++- + tests/proxy.c | 63 +++++++- + tests/threaded.c | 17 +++ + 12 files changed, 719 insertions(+), 112 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d586e69..75c02fe 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -20,12 +20,6 @@ AM_INIT_AUTOMAKE([1.11 foreign -Wno-portability no-define dist-xz]) + + AM_SILENT_RULES([yes]) + +-API_MAJOR=1 +-API_MINOR=0 +-AC_SUBST([API_VERSION],[$API_MAJOR.$API_MINOR]) +-AC_SUBST([API_VERSION_AM],[$API_MAJOR\_$API_MINOR]) +-AC_DEFINE_UNQUOTED(API_VERSION, [$API_VERSION], [API version]) +- + AC_CANONICAL_HOST + + AC_PROG_CC +@@ -41,7 +35,6 @@ LT_PREREQ([2.2.6]) + LT_INIT([disable-static]) + + PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.67.4) +-PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.42) + PKG_CHECK_MODULES(XML, libxml-2.0) + PKG_CHECK_MODULES(GTHREAD, gthread-2.0) + +@@ -58,6 +51,37 @@ AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums]) + localedir=${datadir}/locale + AC_SUBST(localedir) + ++AC_MSG_CHECKING([for libsoup version to use]) ++AC_ARG_WITH(soup, ++ [AC_HELP_STRING([--soup=2|3], ++ [version of libsoup library to use (default: 2)])], ++ [case "$withval" in ++ 2|3) ;; ++ *) AC_MSG_ERROR([invalid argument "$withval" for --with-soup]) ;; ++ esac], ++ [with_soup=2]) ++AC_MSG_RESULT([$with_soup]) ++ ++API_MAJOR=1 ++ ++if test "$with_soup" = "2"; then ++ PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.42) ++ SOUP_API_VERSION=2.4 ++ API_MINOR=0 ++ AC_DEFINE([WITH_SOUP_2],[1],[Define if libsoup version used is 2]) ++else ++ PKG_CHECK_MODULES(SOUP, libsoup-3.0 >= 2.99.8) ++ SOUP_API_VERSION=3.0 ++ API_MINOR=1 ++fi ++ ++AM_CONDITIONAL([WITH_SOUP_2],[test "$with_soup" = "2"]) ++AC_SUBST(SOUP_API_VERSION) ++ ++AC_SUBST([API_VERSION],[$API_MAJOR.$API_MINOR]) ++AC_SUBST([API_VERSION_AM],[$API_MAJOR\_$API_MINOR]) ++AC_DEFINE_UNQUOTED(API_VERSION, [$API_VERSION], [API version]) ++ + dnl === Coverage report ======================================================= + AC_PATH_PROG([GCOV], [lcov], [enable_gcov=no]) + +@@ -130,6 +154,7 @@ echo " LibRest $VERSION" + echo " ================" + echo "" + echo " prefix: ${prefix}" ++echo " libsoup version: ${with_soup}" + echo "" + echo " Documentation: ${enable_gtk_doc}" + echo " Introspection data: ${enable_introspection}" +diff --git a/rest-extras.pc.in b/rest-extras.pc.in +index 39f21bf..3723d6d 100644 +--- a/rest-extras.pc.in ++++ b/rest-extras.pc.in +@@ -9,4 +9,4 @@ Description: RESTful web api query library + Version: @VERSION@ + Libs: -L${libdir} -lrest-extras-${apiversion} + Cflags: -I${includedir}/rest-${apiversion} +-Requires: glib-2.0 libsoup-2.4 libxml-2.0 ++Requires: glib-2.0 libsoup-@SOUP_API_VERSION@ libxml-2.0 +diff --git a/rest-extras/youtube-proxy.c b/rest-extras/youtube-proxy.c +index be0cf08..cd598f4 100644 +--- a/rest-extras/youtube-proxy.c ++++ b/rest-extras/youtube-proxy.c +@@ -246,6 +246,9 @@ typedef struct { + GObject *weak_object; + gpointer user_data; + gsize uploaded; ++#ifndef WITH_SOUP_2 ++ GCancellable *cancellable; ++#endif + } YoutubeProxyUploadClosure; + + static void +@@ -255,7 +258,11 @@ _upload_async_weak_notify_cb (gpointer *data, + YoutubeProxyUploadClosure *closure = + (YoutubeProxyUploadClosure *) data; + ++#ifdef WITH_SOUP_2 + _rest_proxy_cancel_message (REST_PROXY (closure->proxy), closure->message); ++#else ++ g_cancellable_cancel (closure->cancellable); ++#endif + } + + static void +@@ -267,6 +274,9 @@ _upload_async_closure_free (YoutubeProxyUploadClosure *closure) + closure); + + g_object_unref (closure->proxy); ++#ifndef WITH_SOUP_2 ++ g_object_unref (closure->cancellable); ++#endif + + g_slice_free (YoutubeProxyUploadClosure, closure); + } +@@ -286,6 +296,9 @@ _upload_async_closure_new (YoutubeProxy *self, + closure->message = message; + closure->weak_object = weak_object; + closure->user_data = user_data; ++#ifndef WITH_SOUP_2 ++ closure->cancellable = g_cancellable_new (); ++#endif + + if (weak_object != NULL) + g_object_weak_ref (weak_object, +@@ -295,41 +308,67 @@ _upload_async_closure_new (YoutubeProxy *self, + } + + static void +-_upload_completed_cb (SoupSession *session, +- SoupMessage *message, ++_upload_completed_cb (SoupMessage *message, ++ GBytes *payload, ++ GError *error, + gpointer user_data) + { + YoutubeProxyUploadClosure *closure = + (YoutubeProxyUploadClosure *) user_data; +- GError *error = NULL; ++ gsize length; ++ gconstpointer data; ++ guint status_code; ++ const char *reason_phrase; + + if (closure->callback == NULL) + return; + +- if (message->status_code < 200 || message->status_code >= 300) +- error = g_error_new_literal (REST_PROXY_ERROR, +- message->status_code, +- message->reason_phrase); +- +- closure->callback (closure->proxy, message->response_body->data, +- message->request_body->length, +- message->request_body->length, ++#ifdef WITH_SOUP_2 ++ status_code = message->status_code; ++ reason_phrase = message->reason_phrase; ++#else ++ status_code = soup_message_get_status (message); ++ reason_phrase = soup_message_get_reason_phrase (message); ++#endif ++ ++ if (status_code < 200 || status_code >= 300) ++ { ++ g_clear_error (&error); ++ error = g_error_new_literal (REST_PROXY_ERROR, ++ status_code, ++ reason_phrase); ++ } ++ ++ data = g_bytes_get_data (payload, &length); ++ closure->callback (closure->proxy, data, length, length, + error, closure->weak_object, closure->user_data); ++ g_bytes_unref (payload); + + _upload_async_closure_free (closure); + } + + static void + _message_wrote_data_cb (SoupMessage *msg, ++#ifdef WITH_SOUP_2 + SoupBuffer *chunk, ++#else ++ gsize chunk_size, ++#endif + YoutubeProxyUploadClosure *closure) + { +- closure->uploaded = closure->uploaded + chunk->length; ++#ifdef WITH_SOUP_2 ++ gsize chunk_size = chunk->length; ++ goffset content_length = msg->request_body->length; ++#else ++ goffset content_length = soup_message_headers_get_content_length (soup_message_get_request_headers (msg)); ++#endif ++ ++ closure->uploaded = closure->uploaded + chunk_size; + +- if (closure->uploaded < msg->request_body->length) ++ if (closure->uploaded < content_length) + closure->callback (closure->proxy, + NULL, +- msg->request_body->length, ++ content_length, + closure->uploaded, + NULL, + closure->weak_object, +@@ -364,7 +403,12 @@ youtube_proxy_upload_async (YoutubeProxy *self, + SoupMultipart *mp; + SoupMessage *message; + SoupMessageHeaders *part_headers; ++ SoupMessageHeaders *request_headers; ++#ifdef WITH_SOUP_2 + SoupBuffer *sb; ++#else ++ GBytes *sb; ++#endif + gchar *content_type; + gchar *atom_xml; + GMappedFile *map; +@@ -380,10 +424,17 @@ youtube_proxy_upload_async (YoutubeProxy *self, + + atom_xml = _construct_upload_atom_xml (fields, incomplete); + ++#ifdef WITH_SOUP_2 + sb = soup_buffer_new_with_owner (atom_xml, + strlen(atom_xml), + atom_xml, + (GDestroyNotify) g_free); ++#else ++ sb = g_bytes_new_with_free_func (atom_xml, ++ strlen (atom_xml), ++ (GDestroyNotify) g_free, ++ atom_xml); ++#endif + + part_headers = soup_message_headers_new (SOUP_MESSAGE_HEADERS_MULTIPART); + +@@ -393,7 +444,11 @@ youtube_proxy_upload_async (YoutubeProxy *self, + + soup_multipart_append_part (mp, part_headers, sb); + ++#ifdef WITH_SOUP_2 + soup_buffer_free (sb); ++#else ++ g_bytes_unref (sb); ++#endif + + content_type = g_content_type_guess ( + filename, +@@ -401,24 +456,37 @@ youtube_proxy_upload_async (YoutubeProxy *self, + g_mapped_file_get_length (map), + NULL); + ++#ifdef WITH_SOUP_2 + sb = soup_buffer_new_with_owner (g_mapped_file_get_contents (map), + g_mapped_file_get_length (map), + map, + (GDestroyNotify) g_mapped_file_unref); ++#else ++ sb = g_bytes_new_with_free_func (g_mapped_file_get_contents (map), ++ g_mapped_file_get_length (map), ++ (GDestroyNotify) g_mapped_file_unref, ++ map); ++#endif + + soup_message_headers_replace (part_headers, "Content-Type", content_type); + + soup_multipart_append_part (mp, part_headers, sb); + ++#ifdef WITH_SOUP_2 + soup_buffer_free (sb); +- + soup_message_headers_free (part_headers); +- + message = soup_form_request_new_from_multipart (UPLOAD_URL, mp); ++ request_headers = message->request_headers; ++#else ++ g_bytes_unref (sb); ++ soup_message_headers_unref (part_headers); ++ message = soup_message_new_from_multipart (UPLOAD_URL, mp); ++ request_headers = soup_message_get_request_headers (message); ++#endif + + soup_multipart_free (mp); + +- _set_upload_headers (self, message->request_headers, filename); ++ _set_upload_headers (self, request_headers, filename); + + closure = _upload_async_closure_new (self, callback, message, weak_object, + user_data); +@@ -429,7 +497,13 @@ youtube_proxy_upload_async (YoutubeProxy *self, + closure); + + +- _rest_proxy_queue_message (REST_PROXY (self), message, _upload_completed_cb, ++ _rest_proxy_queue_message (REST_PROXY (self), message, ++#ifdef WITH_SOUP_2 ++ NULL, ++#else ++ closure->cancellable, ++#endif ++ _upload_completed_cb, + closure); + + return TRUE; +diff --git a/rest.pc.in b/rest.pc.in +index 94c384b..e6bae3e 100644 +--- a/rest.pc.in ++++ b/rest.pc.in +@@ -9,4 +9,4 @@ Description: RESTful web api query library + Version: @VERSION@ + Libs: -L${libdir} -lrest-${apiversion} + Cflags: -I${includedir}/rest-${apiversion} +-Requires: glib-2.0 libsoup-2.4 libxml-2.0 ++Requires: glib-2.0 libsoup-@SOUP_API_VERSION@ libxml-2.0 +diff --git a/rest/rest-private.h b/rest/rest-private.h +index 9e91fa0..6e71322 100644 +--- a/rest/rest-private.h ++++ b/rest/rest-private.h +@@ -31,6 +31,11 @@ + + G_BEGIN_DECLS + ++typedef void (*RestMessageFinishedCallback) (SoupMessage *msg, ++ GBytes *body, ++ GError *error, ++ gpointer user_data); ++ + typedef enum + { + REST_DEBUG_XML_PARSER = 1 << 0, +@@ -53,12 +58,23 @@ gboolean _rest_proxy_get_binding_required (RestProxy *proxy); + const gchar *_rest_proxy_get_bound_url (RestProxy *proxy); + void _rest_proxy_queue_message (RestProxy *proxy, + SoupMessage *message, +- SoupSessionCallback callback, ++ GCancellable *cancellable, ++ RestMessageFinishedCallback callback, + gpointer user_data); + void _rest_proxy_cancel_message (RestProxy *proxy, + SoupMessage *message); +-guint _rest_proxy_send_message (RestProxy *proxy, +- SoupMessage *message); ++GBytes *_rest_proxy_send_message (RestProxy *proxy, ++ SoupMessage *message, ++ GCancellable *cancellable, ++ GError **error); ++void _rest_proxy_send_message_async (RestProxy *proxy, ++ SoupMessage *message, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data); ++GInputStream *_rest_proxy_send_message_finish (RestProxy *proxy, ++ GAsyncResult *result, ++ GError **error); + + RestXmlNode *_rest_xml_node_new (void); + void _rest_xml_node_reverse_children_siblings (RestXmlNode *node); +diff --git a/rest/rest-proxy-auth.c b/rest/rest-proxy-auth.c +index b96e443..0b2ec9f 100644 +--- a/rest/rest-proxy-auth.c ++++ b/rest/rest-proxy-auth.c +@@ -29,7 +29,9 @@ + struct _RestProxyAuthPrivate { + /* used to hold state during async authentication */ + RestProxy *proxy; ++#ifdef WITH_SOUP_2 + SoupSession *session; ++#endif + SoupMessage *message; + SoupAuth *auth; + gboolean paused; +@@ -43,7 +45,9 @@ rest_proxy_auth_dispose (GObject *object) + RestProxyAuthPrivate *priv = ((RestProxyAuth*)object)->priv; + + g_clear_object (&priv->proxy); ++#ifdef WITH_SOUP_2 + g_clear_object (&priv->session); ++#endif + g_clear_object (&priv->message); + g_clear_object (&priv->auth); + +@@ -73,13 +77,17 @@ rest_proxy_auth_new (RestProxy *proxy, + RestProxyAuth *rest_auth; + + g_return_val_if_fail (REST_IS_PROXY (proxy), NULL); ++#ifdef WITH_SOUP_2 + g_return_val_if_fail (SOUP_IS_SESSION (session), NULL); ++#endif + g_return_val_if_fail (SOUP_IS_MESSAGE (message), NULL); + g_return_val_if_fail (SOUP_IS_AUTH (soup_auth), NULL); + + rest_auth = REST_PROXY_AUTH (g_object_new (REST_TYPE_PROXY_AUTH, NULL)); + rest_auth->priv->proxy = g_object_ref(proxy); ++#ifdef WITH_SOUP_2 + rest_auth->priv->session = g_object_ref(session); ++#endif + rest_auth->priv->message = g_object_ref(message); + rest_auth->priv->auth = g_object_ref(soup_auth); + +@@ -104,7 +112,9 @@ rest_proxy_auth_pause (RestProxyAuth *auth) + return; + + auth->priv->paused = TRUE; ++#ifdef WITH_SOUP_2 + soup_session_pause_message (auth->priv->session, auth->priv->message); ++#endif + } + + /** +@@ -128,7 +138,9 @@ rest_proxy_auth_unpause (RestProxyAuth *auth) + soup_auth_authenticate (auth->priv->auth, username, password); + g_free (username); + g_free (password); ++#ifdef WITH_SOUP_2 + soup_session_unpause_message (auth->priv->session, auth->priv->message); ++#endif + auth->priv->paused = FALSE; + } + +@@ -146,7 +158,11 @@ rest_proxy_auth_cancel (RestProxyAuth *auth) + { + g_return_if_fail (REST_IS_PROXY_AUTH (auth)); + ++#ifdef WITH_SOUP_2 + soup_session_cancel_message (auth->priv->session, auth->priv->message, SOUP_STATUS_CANCELLED); ++#else ++ soup_auth_cancel (auth->priv->auth); ++#endif + } + + G_GNUC_INTERNAL gboolean rest_proxy_auth_is_paused (RestProxyAuth *auth) +diff --git a/rest/rest-proxy-call.c b/rest/rest-proxy-call.c +index 2ab722f..62b00da 100644 +--- a/rest/rest-proxy-call.c ++++ b/rest/rest-proxy-call.c +@@ -20,12 +20,14 @@ + * + */ + ++#include <config.h> + #include <rest/rest-proxy.h> + #include <rest/rest-proxy-call.h> + #include <rest/rest-params.h> + #include <libsoup/soup.h> + + #include "rest-private.h" ++#include "rest-proxy-auth-private.h" + #include "rest-proxy-call-private.h" + + +@@ -38,12 +40,15 @@ struct _RestProxyCallAsyncClosure { + }; + typedef struct _RestProxyCallAsyncClosure RestProxyCallAsyncClosure; + ++#define READ_BUFFER_SIZE 8192 ++ + struct _RestProxyCallContinuousClosure { + RestProxyCall *call; + RestProxyCallContinuousCallback callback; + GObject *weak_object; + gpointer userdata; + SoupMessage *message; ++ guchar buffer[READ_BUFFER_SIZE]; + }; + typedef struct _RestProxyCallContinuousClosure RestProxyCallContinuousClosure; + +@@ -70,8 +75,7 @@ struct _RestProxyCallPrivate { + gchar *url; + + GHashTable *response_headers; +- goffset length; +- gchar *payload; ++ GBytes *payload; + guint status_code; + gchar *status_message; + +@@ -160,7 +164,7 @@ rest_proxy_call_finalize (GObject *object) + g_free (priv->method); + g_free (priv->function); + +- g_free (priv->payload); ++ g_clear_pointer (&priv->payload, g_bytes_unref); + g_free (priv->status_message); + + g_free (priv->url); +@@ -546,14 +550,23 @@ _populate_headers_hash_table (const gchar *name, + g_hash_table_insert (headers, g_strdup (name), g_strdup (value)); + } + ++#ifdef WITH_SOUP_2 + /* I apologise for this macro, but it saves typing ;-) */ + #define error_helper(x) g_set_error_literal(error, REST_PROXY_ERROR, x, message->reason_phrase) ++#endif + static gboolean + _handle_error_from_message (SoupMessage *message, GError **error) + { +- if (message->status_code < 100) ++ guint status_code; ++ const char *reason_phrase; ++ ++#ifdef WITH_SOUP_2 ++ status_code = message->status_code; ++ ++ if (status_code < 100) + { +- switch (message->status_code) ++ g_clear_error (error); ++ switch (status_code) + { + case SOUP_STATUS_CANCELLED: + error_helper (REST_PROXY_ERROR_CANCELLED); +@@ -580,61 +593,84 @@ _handle_error_from_message (SoupMessage *message, GError **error) + } + return FALSE; + } ++ reason_phrase = message->reason_phrase; ++#else ++ status_code = soup_message_get_status (message); ++ reason_phrase = soup_message_get_reason_phrase (message); ++#endif + +- if (message->status_code >= 200 && message->status_code < 300) ++ if (status_code >= 200 && status_code < 300) + { + return TRUE; + } + ++ if (*error != NULL) ++ return FALSE; ++ + /* If we are here we must be in some kind of HTTP error, lets try */ + g_set_error_literal (error, + REST_PROXY_ERROR, +- message->status_code, +- message->reason_phrase); ++ status_code, ++ reason_phrase); + return FALSE; + } + + static gboolean +-finish_call (RestProxyCall *call, SoupMessage *message, GError **error) ++finish_call (RestProxyCall *call, SoupMessage *message, GBytes *payload, GError **error) + { + RestProxyCallPrivate *priv = GET_PRIVATE (call); ++ SoupMessageHeaders *response_headers; + + g_assert (call); + g_assert (message); ++ g_assert (payload); ++ ++#ifdef WITH_SOUP_2 ++ response_headers = message->response_headers; ++#else ++ response_headers = soup_message_get_response_headers (message); ++#endif + + /* Convert the soup headers in to hash */ + /* FIXME: Eeek..are you allowed duplicate headers? ... */ + g_hash_table_remove_all (priv->response_headers); +- soup_message_headers_foreach (message->response_headers, ++ soup_message_headers_foreach (response_headers, + (SoupMessageHeadersForeachFunc)_populate_headers_hash_table, + priv->response_headers); + +- priv->payload = g_memdup (message->response_body->data, +- message->response_body->length + 1); +- priv->length = message->response_body->length; ++ priv->payload = payload; + ++#ifdef WITH_SOUP_2 + priv->status_code = message->status_code; + priv->status_message = g_strdup (message->reason_phrase); ++#else ++ priv->status_code = soup_message_get_status (message); ++ priv->status_message = g_strdup (soup_message_get_reason_phrase (message)); ++#endif + + return _handle_error_from_message (message, error); + } + + static void +-_continuous_call_message_completed_cb (SoupSession *session, +- SoupMessage *message, +- gpointer userdata) ++_continuous_call_message_completed (SoupMessage *message, ++ GError *error, ++ gpointer userdata) + { + RestProxyCallContinuousClosure *closure; + RestProxyCall *call; + RestProxyCallPrivate *priv; +- GError *error = NULL; + + closure = (RestProxyCallContinuousClosure *)userdata; + call = closure->call; + priv = GET_PRIVATE (call); + ++#ifdef WITH_SOUP_2 + priv->status_code = message->status_code; + priv->status_message = g_strdup (message->reason_phrase); ++#else ++ priv->status_code = soup_message_get_status (message); ++ priv->status_message = g_strdup (soup_message_get_reason_phrase (message)); ++#endif + + _handle_error_from_message (message, &error); + +@@ -657,6 +693,7 @@ _continuous_call_message_completed_cb (SoupSession *session, + + priv->cur_call_closure = NULL; + g_object_unref (closure->call); ++ g_object_unref (message); + g_slice_free (RestProxyCallContinuousClosure, closure); + } + +@@ -715,6 +752,49 @@ set_url (RestProxyCall *call) + return TRUE; + } + ++#ifndef WITH_SOUP_2 ++static gboolean ++authenticate (RestProxyCall *call, ++ SoupAuth *soup_auth, ++ gboolean retrying, ++ SoupMessage *message) ++{ ++ RestProxyCallPrivate *priv = GET_PRIVATE (call); ++ RestProxyAuth *rest_auth; ++ gboolean try_auth; ++ ++ rest_auth = rest_proxy_auth_new (priv->proxy, NULL, message, soup_auth); ++ g_signal_emit_by_name (priv->proxy, "authenticate", rest_auth, retrying, &try_auth); ++ if (try_auth && !rest_proxy_auth_is_paused (rest_auth)) { ++ char *username, *password; ++ ++ g_object_get (priv->proxy, "username", &username, "password", &password, NULL); ++ soup_auth_authenticate (soup_auth, username, password); ++ g_free (username); ++ g_free (password); ++ } ++ g_object_unref (rest_auth); ++ ++ return try_auth; ++} ++ ++static gboolean ++accept_certificate (RestProxyCall *call, ++ GTlsCertificate *tls_certificate, ++ GTlsCertificateFlags *tls_errors, ++ SoupMessage *message) ++{ ++ RestProxyCallPrivate *priv = GET_PRIVATE (call); ++ gboolean ssl_strict; ++ ++ if (tls_errors == 0) ++ return TRUE; ++ ++ g_object_get (priv->proxy, "ssl-strict", &ssl_strict, NULL); ++ return !ssl_strict; ++} ++#endif ++ + static SoupMessage * + prepare_message (RestProxyCall *call, GError **error_out) + { +@@ -722,6 +802,7 @@ prepare_message (RestProxyCall *call, GError **error_out) + RestProxyCallClass *call_class; + const gchar *user_agent; + SoupMessage *message; ++ SoupMessageHeaders *request_headers; + GError *error = NULL; + + call_class = REST_PROXY_CALL_GET_CLASS (call); +@@ -748,6 +829,9 @@ prepare_message (RestProxyCall *call, GError **error_out) + gchar *content; + gchar *content_type; + gsize content_len; ++#ifndef WITH_SOUP_2 ++ GBytes *body; ++#endif + + if (!call_class->serialize_params (call, &content_type, + &content, &content_len, &error)) +@@ -780,8 +864,14 @@ prepare_message (RestProxyCall *call, GError **error_out) + "Could not parse URI"); + return NULL; + } ++#ifdef WITH_SOUP_2 + soup_message_set_request (message, content_type, + SOUP_MEMORY_TAKE, content, content_len); ++#else ++ body = g_bytes_new_take (content, content_len); ++ soup_message_set_request_body_from_bytes (message, content_type, body); ++ g_bytes_unref (body); ++#endif + + g_free (content_type); + } else if (rest_params_are_strings (priv->params)) { +@@ -798,9 +888,15 @@ prepare_message (RestProxyCall *call, GError **error_out) + + hash = rest_params_as_string_hash_table (priv->params); + ++#ifdef WITH_SOUP_2 + message = soup_form_request_new_from_hash (priv->method, + priv->url, + hash); ++#else ++ message = soup_message_new_from_encoded_form (priv->method, ++ priv->url, ++ soup_form_encode_hash (hash)); ++#endif + + g_hash_table_unref (hash); + +@@ -827,19 +923,28 @@ prepare_message (RestProxyCall *call, GError **error_out) + if (rest_param_is_string (param)) { + soup_multipart_append_form_string (mp, name, rest_param_get_content (param)); + } else { +- SoupBuffer *sb; +- +- sb = soup_buffer_new_with_owner (rest_param_get_content (param), +- rest_param_get_content_length (param), +- rest_param_ref (param), +- (GDestroyNotify)rest_param_unref); ++#ifdef WITH_SOUP_2 ++ SoupBuffer *sb = soup_buffer_new_with_owner (rest_param_get_content (param), ++ rest_param_get_content_length (param), ++ rest_param_ref (param), ++ (GDestroyNotify)rest_param_unref); ++#else ++ GBytes *sb = g_bytes_new_with_free_func (rest_param_get_content (param), ++ rest_param_get_content_length (param), ++ (GDestroyNotify)rest_param_unref, ++ rest_param_ref (param)); ++#endif + + soup_multipart_append_form_file (mp, name, + rest_param_get_file_name (param), + rest_param_get_content_type (param), + sb); + ++#ifdef WITH_SOUP_2 + soup_buffer_free (sb); ++#else ++ g_bytes_unref (sb); ++#endif + } + } + +@@ -853,19 +958,36 @@ prepare_message (RestProxyCall *call, GError **error_out) + return NULL; + } + ++#ifdef WITH_SOUP_2 + message = soup_form_request_new_from_multipart (priv->url, mp); ++#else ++ message = soup_message_new_from_multipart (priv->url, mp); ++#endif + + soup_multipart_free (mp); + } + ++#ifdef WITH_SOUP_2 ++ request_headers = message->request_headers; ++#else ++ request_headers = soup_message_get_request_headers (message); ++ g_signal_connect_swapped (message, "authenticate", ++ G_CALLBACK (authenticate), ++ call); ++ g_signal_connect_swapped (message, "accept-certificate", ++ G_CALLBACK (accept_certificate), ++ call); ++#endif ++ ++ + /* Set the user agent, if one was set in the proxy */ + user_agent = rest_proxy_get_user_agent (priv->proxy); + if (user_agent) { +- soup_message_headers_append (message->request_headers, "User-Agent", user_agent); ++ soup_message_headers_append (request_headers, "User-Agent", user_agent); + } + + /* Set the headers */ +- g_hash_table_foreach (priv->headers, set_header, message->request_headers); ++ g_hash_table_foreach (priv->headers, set_header, request_headers); + + return message; + } +@@ -878,17 +1000,17 @@ _call_message_call_cancelled_cb (GCancellable *cancellable, + } + + static void +-_call_message_call_completed_cb (SoupSession *session, +- SoupMessage *message, ++_call_message_call_completed_cb (SoupMessage *message, ++ GBytes *payload, ++ GError *error, + gpointer user_data) + { + GTask *task = user_data; + RestProxyCall *call; +- GError *error = NULL; + + call = REST_PROXY_CALL (g_task_get_source_object (task)); + +- finish_call (call, message, &error); ++ finish_call (call, message, payload, &error); + + if (error != NULL) + g_task_return_error (task, error); +@@ -938,6 +1060,7 @@ rest_proxy_call_invoke_async (RestProxyCall *call, + + _rest_proxy_queue_message (priv->proxy, + message, ++ priv->cancellable, + _call_message_call_completed_cb, + task); + } +@@ -962,16 +1085,55 @@ rest_proxy_call_invoke_finish (RestProxyCall *call, + } + + static void +-_continuous_call_message_got_chunk_cb (SoupMessage *msg, +- SoupBuffer *chunk, +- RestProxyCallContinuousClosure *closure) ++_continuous_call_read_cb (GObject *source, ++ GAsyncResult *result, ++ gpointer user_data) + { ++ GInputStream *stream = G_INPUT_STREAM (source); ++ RestProxyCallContinuousClosure *closure = user_data; ++ RestProxyCallPrivate *priv = GET_PRIVATE (closure->call); ++ gssize bytes_read; ++ GError *error = NULL; ++ ++ bytes_read = g_input_stream_read_finish (stream, result, &error); ++ if (bytes_read <= 0) ++ { ++ _continuous_call_message_completed (closure->message, error, user_data); ++ return; ++ } ++ + closure->callback (closure->call, +- chunk->data, +- chunk->length, ++ (gconstpointer)closure->buffer, ++ bytes_read, + NULL, + closure->weak_object, + closure->userdata); ++ ++ g_input_stream_read_async (stream, closure->buffer, READ_BUFFER_SIZE, G_PRIORITY_DEFAULT, ++ priv->cancellable, _continuous_call_read_cb, closure); ++} ++ ++static void ++_continuous_call_message_sent_cb (GObject *source, ++ GAsyncResult *result, ++ gpointer user_data) ++{ ++ RestProxy *proxy = REST_PROXY (source); ++ RestProxyCallContinuousClosure *closure = user_data; ++ RestProxyCallPrivate *priv = GET_PRIVATE (closure->call); ++ GInputStream *stream; ++ GError *error = NULL; ++ ++ stream = _rest_proxy_send_message_finish (proxy, result, &error); ++ if (!stream) ++ { ++ _continuous_call_message_completed (closure->message, error, user_data); ++ return; ++ } ++ ++ g_input_stream_read_async (stream, closure->buffer, READ_BUFFER_SIZE, G_PRIORITY_DEFAULT, ++ priv->cancellable, _continuous_call_read_cb, closure); ++ g_object_unref (stream); + } + + +@@ -1021,9 +1183,6 @@ rest_proxy_call_continuous (RestProxyCall *call, + if (message == NULL) + return FALSE; + +- /* Must turn off accumulation */ +- soup_message_body_set_accumulate (message->response_body, FALSE); +- + closure = g_slice_new0 (RestProxyCallContinuousClosure); + closure->call = g_object_ref (call); + closure->callback = callback; +@@ -1041,33 +1200,29 @@ rest_proxy_call_continuous (RestProxyCall *call, + closure); + } + +- g_signal_connect (message, +- "got-chunk", +- (GCallback)_continuous_call_message_got_chunk_cb, +- closure); +- +- _rest_proxy_queue_message (priv->proxy, +- message, +- _continuous_call_message_completed_cb, +- closure); ++ _rest_proxy_send_message_async (priv->proxy, ++ message, ++ priv->cancellable, ++ _continuous_call_message_sent_cb, ++ closure); + return TRUE; + } + + static void +-_upload_call_message_completed_cb (SoupSession *session, +- SoupMessage *message, ++_upload_call_message_completed_cb (SoupMessage *message, ++ GBytes *payload, ++ GError *error, + gpointer user_data) + { + RestProxyCall *call; + RestProxyCallPrivate *priv; +- GError *error = NULL; + RestProxyCallUploadClosure *closure; + + closure = (RestProxyCallUploadClosure *) user_data; + call = closure->call; + priv = GET_PRIVATE (call); + +- finish_call (call, message, &error); ++ finish_call (call, message, payload, &error); + + closure->callback (closure->call, + closure->uploaded, +@@ -1093,14 +1248,25 @@ _upload_call_message_completed_cb (SoupSession *session, + + static void + _upload_call_message_wrote_data_cb (SoupMessage *msg, ++#ifdef WITH_SOUP_2 + SoupBuffer *chunk, ++#else ++ gsize chunk_size, ++#endif + RestProxyCallUploadClosure *closure) + { +- closure->uploaded = closure->uploaded + chunk->length; ++#ifdef WITH_SOUP_2 ++ gsize chunk_size = chunk->length; ++ goffset content_length = msg->request_body->length; ++#else ++ goffset content_length = soup_message_headers_get_content_length (soup_message_get_request_headers (msg)); ++#endif + +- if (closure->uploaded < msg->request_body->length) ++ closure->uploaded = closure->uploaded + chunk_size; ++ ++ if (closure->uploaded < content_length) + closure->callback (closure->call, +- msg->request_body->length, ++ content_length, + closure->uploaded, + NULL, + closure->weak_object, +@@ -1178,6 +1344,7 @@ rest_proxy_call_upload (RestProxyCall *call, + + _rest_proxy_queue_message (priv->proxy, + message, ++ priv->cancellable, + _upload_call_message_completed_cb, + closure); + return TRUE; +@@ -1206,6 +1373,10 @@ rest_proxy_call_cancel (RestProxyCall *call) + if (priv->cancellable) + { + g_signal_handler_disconnect (priv->cancellable, priv->cancel_sig); ++#ifndef WITH_SOUP_2 ++ if (!g_cancellable_is_cancelled (priv->cancellable)) ++ g_cancellable_cancel (priv->cancellable); ++#endif + g_clear_object (&priv->cancellable); + } + +@@ -1240,6 +1411,7 @@ rest_proxy_call_sync (RestProxyCall *call, + RestProxyCallPrivate *priv = GET_PRIVATE (call); + SoupMessage *message; + gboolean ret; ++ GBytes *payload; + + g_return_val_if_fail (REST_IS_PROXY_CALL (call), FALSE); + +@@ -1247,9 +1419,9 @@ rest_proxy_call_sync (RestProxyCall *call, + if (!message) + return FALSE; + +- _rest_proxy_send_message (priv->proxy, message); ++ payload = _rest_proxy_send_message (priv->proxy, message, priv->cancellable, error_out); + +- ret = finish_call (call, message, error_out); ++ ret = finish_call (call, message, payload, error_out); + + g_object_unref (message); + +@@ -1314,9 +1486,16 @@ rest_proxy_call_get_response_headers (RestProxyCall *call) + goffset + rest_proxy_call_get_payload_length (RestProxyCall *call) + { ++ GBytes *payload; ++ + g_return_val_if_fail (REST_IS_PROXY_CALL (call), 0); + +- return GET_PRIVATE (call)->length; ++ payload = GET_PRIVATE (call)->payload; ++#ifdef WITH_SOUP_2 ++ return payload ? g_bytes_get_size (payload) - 1 : 0; ++#else ++ return payload ? g_bytes_get_size (payload) : 0; ++#endif + } + + /** +@@ -1331,9 +1510,12 @@ rest_proxy_call_get_payload_length (RestProxyCall *call) + const gchar * + rest_proxy_call_get_payload (RestProxyCall *call) + { ++ GBytes *payload; ++ + g_return_val_if_fail (REST_IS_PROXY_CALL (call), NULL); + +- return GET_PRIVATE (call)->payload; ++ payload = GET_PRIVATE (call)->payload; ++ return payload ? g_bytes_get_data (payload, NULL) : NULL; + } + + /** +diff --git a/rest/rest-proxy.c b/rest/rest-proxy.c +index 80972a3..171f6cb 100644 +--- a/rest/rest-proxy.c ++++ b/rest/rest-proxy.c +@@ -45,6 +45,9 @@ struct _RestProxyPrivate { + SoupSession *session; + gboolean disable_cookies; + char *ssl_ca_file; ++#ifndef WITH_SOUP_2 ++ gboolean ssl_strict; ++#endif + }; + + +@@ -116,11 +119,15 @@ rest_proxy_get_property (GObject *object, + g_value_set_string (value, priv->password); + break; + case PROP_SSL_STRICT: { ++#ifdef WITH_SOUP_2 + gboolean ssl_strict; + g_object_get (G_OBJECT(priv->session), + "ssl-strict", &ssl_strict, + NULL); + g_value_set_boolean (value, ssl_strict); ++#else ++ g_value_set_boolean (value, priv->ssl_strict); ++#endif + break; + } + case PROP_SSL_CA_FILE: +@@ -172,9 +179,13 @@ rest_proxy_set_property (GObject *object, + priv->password = g_value_dup_string (value); + break; + case PROP_SSL_STRICT: ++#ifdef WITH_SOUP_2 + g_object_set (G_OBJECT(priv->session), + "ssl-strict", g_value_get_boolean (value), + NULL); ++#else ++ priv->ssl_strict = g_value_get_boolean (value); ++#endif + break; + case PROP_SSL_CA_FILE: + g_free(priv->ssl_ca_file); +@@ -207,6 +218,7 @@ default_authenticate_cb (RestProxy *self, + return !retrying; + } + ++#ifdef WITH_SOUP_2 + static void + authenticate (RestProxy *self, + SoupMessage *msg, +@@ -224,6 +236,7 @@ authenticate (RestProxy *self, + soup_auth_authenticate (soup_auth, priv->username, priv->password); + g_object_unref (G_OBJECT (rest_auth)); + } ++#endif + + static void + rest_proxy_constructed (GObject *object) +@@ -238,14 +251,20 @@ rest_proxy_constructed (GObject *object) + } + + if (REST_DEBUG_ENABLED(PROXY)) { ++#ifdef WITH_SOUP_2 + SoupSessionFeature *logger = (SoupSessionFeature*)soup_logger_new (SOUP_LOGGER_LOG_BODY, 0); ++#else ++ SoupSessionFeature *logger = (SoupSessionFeature*)soup_logger_new (SOUP_LOGGER_LOG_HEADERS); ++#endif + soup_session_add_feature (priv->session, logger); + g_object_unref (logger); + } + ++#ifdef WITH_SOUP_2 + /* session lifetime is same as self, no need to keep signalid */ + g_signal_connect_swapped (priv->session, "authenticate", + G_CALLBACK(authenticate), object); ++#endif + } + + static void +@@ -391,23 +410,62 @@ rest_proxy_class_init (RestProxyClass *klass) + proxy_class->authenticate = default_authenticate_cb; + } + ++static gboolean ++transform_ssl_ca_file_to_tls_database (GBinding *binding, ++ const GValue *from_value, ++ GValue *to_value, ++ gpointer user_data) ++{ ++ g_value_take_object (to_value, ++ g_tls_file_database_new (g_value_get_string (from_value), NULL)); ++ return TRUE; ++} ++ ++static gboolean ++transform_tls_database_to_ssl_ca_file (GBinding *binding, ++ const GValue *from_value, ++ GValue *to_value, ++ gpointer user_data) ++{ ++ GTlsDatabase *tls_database; ++ char *path = NULL; ++ ++ tls_database = g_value_get_object (from_value); ++ if (tls_database) ++ g_object_get (tls_database, "anchors", &path, NULL); ++ g_value_take_string (to_value, path); ++ return TRUE; ++} ++ + static void + rest_proxy_init (RestProxy *self) + { + RestProxyPrivate *priv = GET_PRIVATE (self); ++ GTlsDatabase *tls_database; ++ ++#ifndef WITH_SOUP_2 ++ priv->ssl_strict = TRUE; ++#endif + + priv->session = soup_session_new (); + + #ifdef REST_SYSTEM_CA_FILE + /* with ssl-strict (defaults TRUE) setting ssl-ca-file forces all + * certificates to be trusted */ +- g_object_set (priv->session, +- "ssl-ca-file", REST_SYSTEM_CA_FILE, +- NULL); ++ tls_database = g_tls_file_database_new (REST_SYSTEM_CA_FILE, NULL); ++ if (tls_database) { ++ g_object_set (priv->session, ++ "tls-database", tls_database, ++ NULL); ++ g_object_unref (tls_database); ++ } + #endif +- g_object_bind_property (self, "ssl-ca-file", +- priv->session, "ssl-ca-file", +- G_BINDING_BIDIRECTIONAL); ++ g_object_bind_property_full (self, "ssl-ca-file", ++ priv->session, "tls-database", ++ G_BINDING_BIDIRECTIONAL, ++ transform_ssl_ca_file_to_tls_database, ++ transform_tls_database_to_ssl_ca_file, ++ NULL, NULL); + } + + /** +@@ -689,27 +747,127 @@ rest_proxy_simple_run (RestProxy *proxy, + return ret; + } + ++typedef struct { ++ RestMessageFinishedCallback callback; ++ gpointer user_data; ++} RestMessageQueueData; ++ ++#ifdef WITH_SOUP_2 ++static void ++message_finished_cb (SoupSession *session, ++ SoupMessage *message, ++ gpointer user_data) ++{ ++ RestMessageQueueData *data = user_data; ++ GBytes *body; ++ GError *error = NULL; ++ ++ body = g_bytes_new (message->response_body->data, ++ message->response_body->length + 1); ++ data->callback (message, body, error, data->user_data); ++ g_free (data); ++} ++#else ++static void ++message_send_and_read_ready_cb (GObject *source, ++ GAsyncResult *result, ++ gpointer user_data) ++{ ++ SoupSession *session = SOUP_SESSION (source); ++ RestMessageQueueData *data = user_data; ++ GBytes *body; ++ GError *error = NULL; ++ ++ body = soup_session_send_and_read_finish (session, result, &error); ++ data->callback (soup_session_get_async_result_message (session, result), body, error, data->user_data); ++ g_free (data); ++} ++#endif ++ + void +-_rest_proxy_queue_message (RestProxy *proxy, +- SoupMessage *message, +- SoupSessionCallback callback, +- gpointer user_data) ++_rest_proxy_queue_message (RestProxy *proxy, ++ SoupMessage *message, ++ GCancellable *cancellable, ++ RestMessageFinishedCallback callback, ++ gpointer user_data) + { + RestProxyPrivate *priv = GET_PRIVATE (proxy); ++ RestMessageQueueData *data; + + g_return_if_fail (REST_IS_PROXY (proxy)); + g_return_if_fail (SOUP_IS_MESSAGE (message)); + ++ data = g_new0 (RestMessageQueueData, 1); ++ data->callback = callback; ++ data->user_data = user_data; ++ ++#ifdef WITH_SOUP_2 + soup_session_queue_message (priv->session, + message, +- callback, +- user_data); ++ message_finished_cb, ++ data); ++#else ++ soup_session_send_and_read_async (priv->session, ++ message, ++ G_PRIORITY_DEFAULT, ++ cancellable, ++ message_send_and_read_ready_cb, ++ data); ++#endif ++} ++ ++static void ++message_send_ready_cb (GObject *source, ++ GAsyncResult *result, ++ gpointer user_data) ++{ ++ SoupSession *session = SOUP_SESSION (source); ++ GTask *task = user_data; ++ GInputStream *stream; ++ GError *error = NULL; ++ ++ stream = soup_session_send_finish (session, result, &error); ++ if (stream) ++ g_task_return_pointer (task, stream, g_object_unref); ++ else ++ g_task_return_error (task, error); ++ g_object_unref (task); ++} ++ ++void ++_rest_proxy_send_message_async (RestProxy *proxy, ++ SoupMessage *message, ++ GCancellable *cancellable, ++ GAsyncReadyCallback callback, ++ gpointer user_data) ++{ ++ RestProxyPrivate *priv = GET_PRIVATE (proxy); ++ GTask *task; ++ ++ task = g_task_new (proxy, cancellable, callback, user_data); ++ soup_session_send_async (priv->session, ++ message, ++#ifndef WITH_SOUP_2 ++ G_PRIORITY_DEFAULT, ++#endif ++ cancellable, ++ message_send_ready_cb, ++ task); ++} ++ ++GInputStream * ++_rest_proxy_send_message_finish (RestProxy *proxy, ++ GAsyncResult *result, ++ GError **error) ++{ ++ return g_task_propagate_pointer (G_TASK (result), error); + } + + void + _rest_proxy_cancel_message (RestProxy *proxy, + SoupMessage *message) + { ++#ifdef WITH_SOUP_2 + RestProxyPrivate *priv = GET_PRIVATE (proxy); + + g_return_if_fail (REST_IS_PROXY (proxy)); +@@ -718,16 +876,31 @@ _rest_proxy_cancel_message (RestProxy *proxy, + soup_session_cancel_message (priv->session, + message, + SOUP_STATUS_CANCELLED); ++#endif + } + +-guint +-_rest_proxy_send_message (RestProxy *proxy, +- SoupMessage *message) ++GBytes * ++_rest_proxy_send_message (RestProxy *proxy, ++ SoupMessage *message, ++ GCancellable *cancellable, ++ GError **error) + { + RestProxyPrivate *priv = GET_PRIVATE (proxy); ++ GBytes *body; + +- g_return_val_if_fail (REST_IS_PROXY (proxy), 0); +- g_return_val_if_fail (SOUP_IS_MESSAGE (message), 0); ++ g_return_val_if_fail (REST_IS_PROXY (proxy), NULL); ++ g_return_val_if_fail (SOUP_IS_MESSAGE (message), NULL); ++ ++#ifdef WITH_SOUP_2 ++ soup_session_send_message (priv->session, message); ++ body = g_bytes_new (message->response_body->data, ++ message->response_body->length + 1); ++#else ++ body = soup_session_send_and_read (priv->session, ++ message, ++ cancellable, ++ error); ++#endif + +- return soup_session_send_message (priv->session, message); ++ return body; + } +diff --git a/tests/custom-serialize.c b/tests/custom-serialize.c +index c3fde93..01b3a56 100644 +--- a/tests/custom-serialize.c ++++ b/tests/custom-serialize.c +@@ -88,22 +88,40 @@ custom_proxy_call_init (CustomProxyCall *self) + } + + static void ++#ifdef WITH_SOUP_2 + server_callback (SoupServer *server, SoupMessage *msg, + const char *path, GHashTable *query, + SoupClientContext *client, gpointer user_data) ++#else ++server_callback (SoupServer *server, SoupServerMessage *msg, ++ const char *path, GHashTable *query, gpointer user_data) ++#endif + { + if (g_str_equal (path, "/ping")) { + const char *content_type = NULL; ++#ifdef WITH_SOUP_2 + SoupMessageHeaders *headers = msg->request_headers; + SoupMessageBody *body = msg->request_body; ++#else ++ SoupMessageHeaders *headers = soup_server_message_get_request_headers (msg); ++ SoupMessageBody *body = soup_server_message_get_request_body (msg); ++#endif + content_type = soup_message_headers_get_content_type (headers, NULL); + g_assert_cmpstr (content_type, ==, "application/json"); + + g_assert_cmpstr (body->data, ==, "{}"); + ++#ifdef WITH_SOUP_2 + soup_message_set_status (msg, SOUP_STATUS_OK); ++#else ++ soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL); ++#endif + } else { ++#ifdef WITH_SOUP_2 + soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED); ++#else ++ soup_server_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED, NULL); ++#endif + } + } + +diff --git a/tests/proxy-continuous.c b/tests/proxy-continuous.c +index 8f4b7a8..7967bbd 100644 +--- a/tests/proxy-continuous.c ++++ b/tests/proxy-continuous.c +@@ -39,9 +39,15 @@ static SoupServer *server; + static gboolean + send_chunks (gpointer user_data) + { +- SoupMessage *msg = SOUP_MESSAGE (user_data); + guint i; + guint8 data[SIZE_CHUNK]; ++#ifdef WITH_SOUP_2 ++ SoupMessage *msg = SOUP_MESSAGE (user_data); ++ SoupMessageBody *response_body = msg->response_body; ++#else ++ SoupServerMessage *msg = SOUP_SERVER_MESSAGE (user_data); ++ SoupMessageBody *response_body = soup_server_message_get_response_body (msg); ++#endif + + for (i = 0; i < SIZE_CHUNK; i++) + { +@@ -49,12 +55,12 @@ send_chunks (gpointer user_data) + server_count++; + } + +- soup_message_body_append (msg->response_body, SOUP_MEMORY_COPY, data, SIZE_CHUNK); ++ soup_message_body_append (response_body, SOUP_MEMORY_COPY, data, SIZE_CHUNK); + soup_server_unpause_message (server, msg); + + if (server_count == NUM_CHUNKS * SIZE_CHUNK) + { +- soup_message_body_complete (msg->response_body); ++ soup_message_body_complete (response_body); + return FALSE; + } else { + return TRUE; +@@ -62,13 +68,28 @@ send_chunks (gpointer user_data) + } + + static void ++#ifdef WITH_SOUP_2 + server_callback (SoupServer *server, SoupMessage *msg, + const char *path, GHashTable *query, + SoupClientContext *client, gpointer user_data) ++#else ++server_callback (SoupServer *server, SoupServerMessage *msg, ++ const char *path, GHashTable *query, gpointer user_data) ++#endif + { ++#ifdef WITH_SOUP_2 ++ SoupMessageHeaders *response_headers = msg->response_headers; ++#else ++ SoupMessageHeaders *response_headers = soup_server_message_get_response_headers (msg); ++#endif ++ + g_assert_cmpstr (path, ==, "/stream"); ++#ifdef WITH_SOUP_2 + soup_message_set_status (msg, SOUP_STATUS_OK); +- soup_message_headers_set_encoding (msg->response_headers, ++#else ++ soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL); ++#endif ++ soup_message_headers_set_encoding (response_headers, + SOUP_ENCODING_CHUNKED); + soup_server_pause_message (server, msg); + +@@ -142,13 +163,21 @@ continuous () + uris = soup_server_get_uris (server); + g_assert (g_slist_length (uris) > 0); + ++#ifdef WITH_SOUP_2 + url = soup_uri_to_string (uris->data, FALSE); ++#else ++ url = g_uri_to_string (uris->data); ++#endif + + loop = g_main_loop_new (NULL, FALSE); + + proxy = rest_proxy_new (url, FALSE); + stream_test (proxy); ++#ifdef WITH_SOUP_2 + g_slist_free_full (uris, (GDestroyNotify)soup_uri_free); ++#else ++ g_slist_free_full (uris, (GDestroyNotify)g_uri_unref); ++#endif + + g_main_loop_run (loop); + g_free (url); +diff --git a/tests/proxy.c b/tests/proxy.c +index 89a9325..652c600 100644 +--- a/tests/proxy.c ++++ b/tests/proxy.c +@@ -49,20 +49,35 @@ SoupServer *server; + GMainLoop *server_loop; + + static void ++#ifdef WITH_SOUP_2 + server_callback (SoupServer *server, SoupMessage *msg, + const char *path, GHashTable *query, + SoupClientContext *client, gpointer user_data) ++#else ++server_callback (SoupServer *server, SoupServerMessage *msg, ++ const char *path, GHashTable *query, gpointer user_data) ++#endif + { + if (g_str_equal (path, "/ping")) { ++#ifdef WITH_SOUP_2 + soup_message_set_status (msg, SOUP_STATUS_OK); ++#else ++ soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL); ++#endif + } + else if (g_str_equal (path, "/echo")) { + const char *value; + + value = g_hash_table_lookup (query, "value"); ++#ifdef WITH_SOUP_2 + soup_message_set_response (msg, "text/plain", SOUP_MEMORY_COPY, + value, strlen (value)); + soup_message_set_status (msg, SOUP_STATUS_OK); ++#else ++ soup_server_message_set_response (msg, "text/plain", SOUP_MEMORY_COPY, ++ value, strlen (value)); ++ soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL); ++#endif + } + else if (g_str_equal (path, "/reverse")) { + char *value; +@@ -70,9 +85,15 @@ server_callback (SoupServer *server, SoupMessage *msg, + value = g_strdup (g_hash_table_lookup (query, "value")); + g_strreverse (value); + ++#ifdef WITH_SOUP_2 + soup_message_set_response (msg, "text/plain", SOUP_MEMORY_TAKE, + value, strlen (value)); + soup_message_set_status (msg, SOUP_STATUS_OK); ++#else ++ soup_server_message_set_response (msg, "text/plain", SOUP_MEMORY_TAKE, ++ value, strlen (value)); ++ soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL); ++#endif + } + else if (g_str_equal (path, "/status")) { + const char *value; +@@ -81,25 +102,61 @@ server_callback (SoupServer *server, SoupMessage *msg, + value = g_hash_table_lookup (query, "status"); + if (value) { + status = atoi (value); ++#ifdef WITH_SOUP_2 + soup_message_set_status (msg, status ?: SOUP_STATUS_INTERNAL_SERVER_ERROR); ++#else ++ soup_server_message_set_status (msg, status ?: SOUP_STATUS_INTERNAL_SERVER_ERROR, NULL); ++#endif + } else { ++#ifdef WITH_SOUP_2 + soup_message_set_status (msg, SOUP_STATUS_INTERNAL_SERVER_ERROR); ++#else ++ soup_server_message_set_status (msg, SOUP_STATUS_INTERNAL_SERVER_ERROR, NULL); ++#endif + } + } + else if (g_str_equal (path, "/useragent/none")) { +- if (soup_message_headers_get (msg->request_headers, "User-Agent") == NULL) { ++#ifdef WITH_SOUP_2 ++ SoupMessageHeaders *request_headers = msg->request_headers; ++#else ++ SoupMessageHeaders *request_headers = soup_server_message_get_request_headers (msg); ++#endif ++ ++ if (soup_message_headers_get (request_headers, "User-Agent") == NULL) { ++#ifdef WITH_SOUP_2 + soup_message_set_status (msg, SOUP_STATUS_OK); ++#else ++ soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL); ++#endif + } else { ++#ifdef WITH_SOUP_2 + soup_message_set_status (msg, SOUP_STATUS_EXPECTATION_FAILED); ++#else ++ soup_server_message_set_status (msg, SOUP_STATUS_EXPECTATION_FAILED, NULL); ++#endif + } + } + else if (g_str_equal (path, "/useragent/testsuite")) { ++#ifdef WITH_SOUP_2 ++ SoupMessageHeaders *request_headers = msg->request_headers; ++#else ++ SoupMessageHeaders *request_headers = soup_server_message_get_request_headers (msg); ++#endif + const char *value; +- value = soup_message_headers_get (msg->request_headers, "User-Agent"); ++ value = soup_message_headers_get (request_headers, "User-Agent"); + if (g_strcmp0 (value, "TestSuite-1.0") == 0) { ++#ifdef WITH_SOUP_2 + soup_message_set_status (msg, SOUP_STATUS_OK); ++#else ++ soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL); ++#endif + } else { ++#ifdef WITH_SOUP_2 + soup_message_set_status (msg, SOUP_STATUS_EXPECTATION_FAILED); ++#else ++ soup_server_message_set_status (msg, SOUP_STATUS_EXPECTATION_FAILED, NULL); ++#endif ++ + } + } + } +@@ -325,7 +382,7 @@ main (int argc, char **argv) + char *url; + RestProxy *proxy; + +- server = soup_server_new ("", NULL); ++ server = soup_server_new (NULL); + g_thread_new ("Server Thread", server_thread_func, NULL); + + url = g_strdup_printf ("http://127.0.0.1:%d/", PORT); +diff --git a/tests/threaded.c b/tests/threaded.c +index a251900..411361c 100644 +--- a/tests/threaded.c ++++ b/tests/threaded.c +@@ -36,13 +36,22 @@ GMainLoop *main_loop; + SoupServer *server; + + static void ++#ifdef WITH_SOUP_2 + server_callback (SoupServer *server, SoupMessage *msg, + const char *path, GHashTable *query, + SoupClientContext *client, gpointer user_data) ++#else ++server_callback (SoupServer *server, SoupServerMessage *msg, ++ const char *path, GHashTable *query, gpointer user_data) ++#endif + { + g_assert_cmpstr (path, ==, "/ping"); + ++#ifdef WITH_SOUP_2 + soup_message_set_status (msg, SOUP_STATUS_OK); ++#else ++ soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL); ++#endif + g_atomic_int_add (&threads_done, 1); + + if (threads_done == N_THREADS) { +@@ -96,7 +105,11 @@ static void ping () + uris = soup_server_get_uris (server); + g_assert (g_slist_length (uris) > 0); + ++#ifdef WITH_SOUP_2 + url = soup_uri_to_string (uris->data, FALSE); ++#else ++ url = g_uri_to_string (uris->data); ++#endif + + main_loop = g_main_loop_new (NULL, TRUE); + +@@ -109,7 +122,11 @@ static void ping () + g_main_loop_run (main_loop); + + g_free (url); ++#ifdef WITH_SOUP_2 + g_slist_free_full (uris, (GDestroyNotify)soup_uri_free); ++#else ++ g_slist_free_full (uris, (GDestroyNotify)g_uri_unref); ++#endif + g_object_unref (server); + g_main_loop_unref (main_loop); + } +-- +2.33.1 + diff --git a/meta-openembedded/meta-gnome/recipes-gnome/rest/rest_0.8.1.bb b/meta-openembedded/meta-gnome/recipes-gnome/rest/rest_0.8.1.bb index 47e3f8dbbf..545224a99e 100644 --- a/meta-openembedded/meta-gnome/recipes-gnome/rest/rest_0.8.1.bb +++ b/meta-openembedded/meta-gnome/recipes-gnome/rest/rest_0.8.1.bb @@ -14,13 +14,13 @@ DEPENDS = " \ inherit gnomebase gobject-introspection gtk-doc vala -SRC_URI[archive.md5sum] = "ece4547298a81105f307369d73c21b9d" -SRC_URI[archive.sha256sum] = "0513aad38e5d3cedd4ae3c551634e3be1b9baaa79775e53b2dba9456f15b01c9" - -# * gnome environment requires libsoup build with in gnome PACKAGECONFIG -# * libsoup-gnome support was removed upstream three years ago [1] -# [1] https://gitlab.gnome.org/GNOME/librest/commit/8f904a8e2bb38a7bf72245cdf2f1ecad17e9a720 -EXTRA_OECONF = "--without-gnome" +PV .= "+git${SRCPV}" +SRCREV = "7b46065dea860ef09861f4d70124728b8270c8b7" +SRC_URI = "git://gitlab.gnome.org/GNOME/librest;protocol=https;branch=master \ + file://0001-Use-GUri-instead-of-SoupURI.patch \ + file://0002-Port-to-libsoup3.patch \ +" +S = "${WORKDIR}/git" do_configure:prepend() { # rest expects introspection.m4 at custom location (see aclocal.m4). diff --git a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-tools_40.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-tools_41.0.bb index 0e7f499bc0..ec8edb80d3 100644 --- a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-tools_40.0.bb +++ b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-tools_41.0.bb @@ -16,7 +16,7 @@ DEPENDS += " \ yelp-xsl \ " -SRC_URI[archive.sha256sum] = "664bacf2f3dd65ef00a43f79487351ab64a6c4c629c56ac0ceb1723c2eb66aae" +SRC_URI[archive.sha256sum] = "37f1acc02bcbe68a31b86e07c129a839bd3276e656dc89eb7fc0a92746eff272" RDEPENDS:${PN} += "python3-core yelp-xsl" diff --git a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-xsl_40.2.bb b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-xsl_41.0.bb index 9ac88c1fe3..029fd02951 100644 --- a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-xsl_40.2.bb +++ b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-xsl_41.0.bb @@ -10,7 +10,7 @@ inherit gnomebase gettext itstool DEPENDS += "libxml2" -SRC_URI[archive.sha256sum] = "919c552f846aaec741fe51d5af416b469bcdb25c77effc3b5a15a4b4b7ff814e" +SRC_URI[archive.sha256sum] = "c8cd64c093bbd8c5d5e47fd38864e90831b5f9cf7403530870206fa96636a4a5" RDEPENDS:${PN}:append:class-target = " libxml2 itstool" diff --git a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp_40.3.bb b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp_41.1.bb index c179a618ba..980b9a1ae5 100644 --- a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp_40.3.bb +++ b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp_41.1.bb @@ -9,7 +9,7 @@ inherit gnomebase itstool autotools-brokensep gsettings gettext gtk-doc features # for webkitgtk REQUIRED_DISTRO_FEATURES = "x11" -SRC_URI[archive.sha256sum] = "a173847851f26189be78ecbb10015d539d8cceffc7c23e8635492bc3ada5ee23" +SRC_URI[archive.sha256sum] = "456a6415647bceeb0159b90b3553ff328728cf29a608fce08024232504ccb874" DEPENDS += " \ libxml2-native \ diff --git a/meta-openembedded/meta-gnome/recipes-support/packagegroups/packagegroup-gnome-apps.bb b/meta-openembedded/meta-gnome/recipes-support/packagegroups/packagegroup-gnome-apps.bb index d47d847a59..d003e23b8d 100644 --- a/meta-openembedded/meta-gnome/recipes-support/packagegroups/packagegroup-gnome-apps.bb +++ b/meta-openembedded/meta-gnome/recipes-support/packagegroups/packagegroup-gnome-apps.bb @@ -16,6 +16,7 @@ RDEPENDS:${PN} = " \ gnome-calendar \ gnome-font-viewer \ gnome-photos \ + gnome-screenshot \ gnome-terminal \ gthumb \ libwnck3 \ diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.34.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.34.bb index 0fd41331f6..2abc64efb2 100644 --- a/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.34.bb +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.34.bb @@ -16,7 +16,7 @@ SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=master;prot S = "${WORKDIR}/git" -inherit meson pkgconfig systemd manpages gettext useradd +inherit meson pkgconfig systemd gettext useradd USERADD_PACKAGES = "${PN}" @@ -27,6 +27,8 @@ USERADD_PARAM:${PN} = "--system --home / --no-create-home \ --gid pipewire --groups audio,video \ pipewire" +SYSTEMD_PACKAGES = "${PN} ${PN}-media-session" + # For "EVL", look up https://evlproject.org/ . It involves # a specially prepared kernel, and is currently unavailable # in Yocto. @@ -37,11 +39,6 @@ USERADD_PARAM:${PN} = "--system --home / --no-create-home \ # # libcamera support currently does not build successfully. # -# systemd user service files are disabled because per-user -# PipeWire instances aren't really something that makes -# much sense in an embedded environment. A system-wide -# instance does. -# # manpage generation requires xmltoman, which is not available. EXTRA_OEMESON += " \ -Daudiotestsrc=enabled \ @@ -57,7 +54,8 @@ EXTRA_OEMESON += " \ PACKAGECONFIG ??= "\ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'alsa systemd', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)} \ gstreamer jack sndfile pw-cat v4l2 \ " @@ -66,7 +64,6 @@ PACKAGECONFIG ??= "\ # libjack.so* files, thus colliding with the libpack package. This # is why these two are marked in their respective packageconfigs # as being in conflict. - PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib udev" PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc" PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native" @@ -74,7 +71,12 @@ PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,glib-2.0 gs PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack,,,pipewire-jack" PACKAGECONFIG[sdl2] = "-Dsdl2=enabled,-Dsdl2=disabled,virtual/libsdl2" PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" -PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd-system-service=enabled -Dsystemd-user-service=enabled,-Dsystemd=disabled -Dsystemd-system-service=disabled -Dsystemd-user-service=disabled,systemd" +PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd" +PACKAGECONFIG[systemd-system-service] = "-Dsystemd-system-service=enabled,-Dsystemd-system-service=disabled,systemd" +# "systemd-user-service" packageconfig will only install service +# files to rootfs but not enable them as systemd.bbclass +# currently lacks the feature of enabling user services. +PACKAGECONFIG[systemd-user-service] = "-Dsystemd-user-service=enabled,-Dsystemd-user-service=disabled,systemd" # pw-cat needs sndfile packageconfig to be enabled PACKAGECONFIG[pw-cat] = "-Dpw-cat=enabled,-Dpw-cat=disabled" PACKAGECONFIG[v4l2] = "-Dv4l2=enabled,-Dv4l2=disabled,udev" @@ -189,7 +191,7 @@ PACKAGES =+ "\ PACKAGES_DYNAMIC = "^${PN}-spa-plugins.* ^${PN}-modules.*" -SYSTEMD_SERVICE:${PN} = "pipewire.service" +SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd-system-service', 'pipewire.service', '', d)}" CONFFILES:${PN} += "${datadir}/pipewire/pipewire.conf" FILES:${PN} = " \ ${datadir}/pipewire/pipewire.conf \ @@ -246,7 +248,7 @@ FILES:${PN}-jack = "\ # Example session manager. Not intended for use in production. CONFFILES:${PN}-media-session = "${datadir}/pipewire/media-session.d/*" -SYSTEMD_SERVICE:${PN}-media-session = "pipewire-media-session.service" +SYSTEMD_SERVICE:${PN}-media-session = "${@bb.utils.contains('PACKAGECONFIG', 'systemd-system-service', 'pipewire-media-session.service', '', d)}" FILES:${PN}-media-session = " \ ${bindir}/pipewire-media-session \ ${datadir}/pipewire/media-session.d/* \ diff --git a/meta-openembedded/meta-networking/recipes-connectivity/bluepy/bluepy/0001-bluepy-Fix-username-issue-with-tarballs.patch b/meta-openembedded/meta-networking/recipes-connectivity/bluepy/bluepy/0001-bluepy-Fix-username-issue-with-tarballs.patch new file mode 100644 index 0000000000..93b367a77b --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-connectivity/bluepy/bluepy/0001-bluepy-Fix-username-issue-with-tarballs.patch @@ -0,0 +1,32 @@ +From 318a0e7dfaa0f5f233a20c0b347948c8004cf6af Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 20 Oct 2021 14:02:09 -0700 +Subject: [PATCH] bluepy: Fix username issue with tarballs + +Fixes +Cannot change ownership to uid 1000, gid 1000: Operation not permitted + +Upstream-Status: Submitted [https://github.com/IanHarvey/bluepy/pull/462] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + bluepy/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/bluepy/Makefile ++++ b/bluepy/Makefile +@@ -30,13 +30,13 @@ bluepy-helper: $(LOCAL_SRCS) $(IMPORT_SR + $(CC) -L. $(CFLAGS) $(CPPFLAGS) -o $@ $(LOCAL_SRCS) $(IMPORT_SRCS) $(LDLIBS) + + $(IMPORT_SRCS): bluez-src.tgz +- tar xzf $< ++ tar xzf $< --no-same-owner + touch $(IMPORT_SRCS) + + .PHONY: bluez-tarfile + + bluez-tarfile: +- (cd ..; tar czf bluepy/bluez-src.tgz $(BLUEZ_PATH)) ++ (cd ..; tar czf bluepy/bluez-src.tgz $(BLUEZ_PATH) --no-same-owner) + + GET_SERVICES=get_services.py + diff --git a/meta-openembedded/meta-networking/recipes-connectivity/bluepy/bluepy_git.bb b/meta-openembedded/meta-networking/recipes-connectivity/bluepy/bluepy_git.bb new file mode 100644 index 0000000000..887870fb78 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-connectivity/bluepy/bluepy_git.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "Python interface to Bluetooth LE on Linux" +HOMEPAGE = "https://github.com/IanHarvey/bluepy" +SECTION = "devel/python" +LICENSE = "GPLv2 & PD" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=59e0d45ea684dda215889aa1b5acd001" +DEPENDS = "glib-2.0" +SRCREV = "7ad565231a97c304c0eff45f2649cd005e69db09" +PV = "1.3.0+git${SRCPV}" + +SRC_URI = "git://github.com/IanHarvey/bluepy.git;protocol=https \ + file://0001-bluepy-Fix-username-issue-with-tarballs.patch \ + " + +S = "${WORKDIR}/git" + +inherit setuptools3 pkgconfig + +RDEPENDS:${PN} = "bluez5" + +TARGET_CC_ARCH += "${LDFLAGS}" diff --git a/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.4.0.bb b/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.5.2.bb index 49e2015641..1ffd8918a4 100644 --- a/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.4.0.bb +++ b/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.5.2.bb @@ -1,14 +1,12 @@ SUMMARY = "nanomsg-next-generation -- light-weight brokerless messaging" DESCRIPTION = "NNG, like its predecessors nanomsg (and to some extent ZeroMQ), is a lightweight, broker-less library, offering a simple API to solve common recurring messaging problems, such as publish/subscribe, RPC-style request/reply, or service discovery." HOMEPAGE = "https://github.com/nanomsg/nng" +SECTION = "libs/networking" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a41e579bb4326c21c774f8e51e41d8a3" -SECTION = "libs/networking" - -SRCREV = "d020adda8f0348d094790618703b8341a26007a3" - SRC_URI = "git://github.com/nanomsg/nng.git" +SRCREV = "169221da8d53b2ca4fda76f894bee8505887a7c6" S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-Makefile-do-not-use-Werror.patch b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-Makefile-do-not-use-Werror.patch new file mode 100644 index 0000000000..ddc44c3ca0 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-Makefile-do-not-use-Werror.patch @@ -0,0 +1,23 @@ +From a06c77557ed951249d5b344441ad6ec57410e63f Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Sun, 3 Oct 2021 21:52:16 +0200 +Subject: [PATCH] Makefile: do not use -Werror + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + Makefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 8645aee..50fc0da 100644 +--- a/Makefile ++++ b/Makefile +@@ -7,7 +7,6 @@ BUILDFLAGS = \ + -D_XOPEN_SOURCE=500 \ + -DSBINDIR=\"$(SBINDIR)\" \ + -Wall \ +- -Werror \ + $(NULL) + + SYSTEMD_GENERATOR_DIR=$(shell pkg-config --variable=systemdsystemgeneratordir systemd) diff --git a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch index 0fa6ba48a4..c7d371dfa0 100644 --- a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch +++ b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch @@ -1,16 +1,19 @@ -From ceb4111af317ecc54d97bb21878dcccbfdb2983e Mon Sep 17 00:00:00 2001 +From e0df1f07d1707d5daf0358cc60b30f06121f7e60 Mon Sep 17 00:00:00 2001 From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> Date: Fri, 25 Dec 2020 11:41:43 +0900 Subject: [PATCH] don't fail if GLOB_BRACE is not defined Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> + --- src/util.c | 6 ++++++ 1 file changed, 6 insertions(+) +diff --git a/src/util.c b/src/util.c +index a4c0dba..fd4542d 100644 --- a/src/util.c +++ b/src/util.c -@@ -24,6 +24,12 @@ +@@ -25,6 +25,12 @@ #include "util.h" #include "netplan.h" diff --git a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.103.bb b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.103.bb index 682a6b611d..3527bceeb2 100644 --- a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.103.bb +++ b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.103.bb @@ -15,7 +15,9 @@ SRCREV = "51c872d856db80281ea810ebc02e05c09d5310fa" PV = "0.103" SRC_URI = "git://github.com/CanonicalLtd/netplan.git;branch=main \ - file://0001-parse-nm-fix-32bit-format-string.patch" + file://0001-parse-nm-fix-32bit-format-string.patch \ + file://0001-Makefile-do-not-use-Werror.patch \ + " SRC_URI:append:libc-musl = " file://0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch" diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.14.bb b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.16.bb index 9f3054a7c2..19cac13458 100644 --- a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.14.bb +++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.16.bb @@ -10,8 +10,7 @@ inherit gnomebase useradd gettext systemd SRC_URI = "${GNOME_MIRROR}/NetworkManager-openvpn/${@gnome_verdir("${PV}")}/NetworkManager-openvpn-${PV}.tar.xz" -SRC_URI[md5sum] = "bef67eca77bee68da703609b92f804a0" -SRC_URI[sha256sum] = "e7419053fc3b5a7e25f1a7517c313ad4531b6ea280255524ebb85a70c76fdbeb" +SRC_URI[sha256sum] = "8920de09c7ae5f1f520c83f844455db8faec31427350268fe2dd95b860f91fb5" S = "${WORKDIR}/NetworkManager-openvpn-${PV}" diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.32.10.bb b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.32.12.bb index 89f95548cd..c45452f75c 100644 --- a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.32.10.bb +++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.32.12.bb @@ -27,7 +27,7 @@ SRC_URI = " \ file://0002-Do-not-create-settings-settings-property-documentati.patch \ file://0003-install-firewalld-to-var-libdir-rather-than-hardcod-.patch \ " -SRC_URI[sha256sum] = "3e5ccc66805659e3f11a718e3a599f9726b79a01d6ff14814be6ad8bc5da8bb8" +SRC_URI[sha256sum] = "a8ab36a0a502fe73cd8e3bacb6585f97fbb94ebef79e276cdbaf11c33ff8f54b" S = "${WORKDIR}/NetworkManager-${PV}" diff --git a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.14.7.bb b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.14.8.bb index 47fcd3a00e..0dd563c5b9 100644 --- a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.14.7.bb +++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.14.8.bb @@ -34,8 +34,8 @@ SRC_URI:append:libc-musl = " \ file://samba-fix-musl-lib-without-innetgr.patch \ " -SRC_URI[md5sum] = "f0db8302944bb861b31f4163fd302f66" -SRC_URI[sha256sum] = "6f50353f9602aa20245eb18ceb00e7e5ec793df0974aebd5254c38f16d8f1906" +SRC_URI[md5sum] = "5c6636b34a322de0eb917ee0403be322" +SRC_URI[sha256sum] = "c936b782c2aced8cd7299c13bec67c495fd4affdb217a6ed6150f4fd6d770fde" UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.14(\.\d+)+).tar.gz" diff --git a/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb b/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb index dd5d68807a..e84086e131 100644 --- a/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb +++ b/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb @@ -207,6 +207,7 @@ RDEPENDS:packagegroup-meta-networking-support = "\ libtevent \ linux-atm \ lksctp-tools \ + mctp \ memcached \ ifenslave \ netcat \ @@ -233,7 +234,6 @@ RDEPENDS:packagegroup-meta-networking-support = "\ tcpdump \ tcpslice \ netcf \ - nghttp2 \ tnftp \ traceroute \ tunctl \ diff --git a/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.4.bb b/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.5.bb index 7661e9c48e..de283df837 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.4.bb +++ b/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.5.bb @@ -2,9 +2,9 @@ SUMMARY = "Advanced TFTP server and client" SECTION = "net" HOMEPAGE = "http://packages.debian.org/atftp" LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f65159f73e603f89d6867d43191900e5" -SRCREV = "e56e8845f1070e89a4a6e509396b681688d03793" +SRCREV = "00921e75728e3681b051c2e48c59e36c6cfa2e97" SRC_URI = "git://git.code.sf.net/p/atftp/code \ file://atftpd.init \ diff --git a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch index d5ea417fb2..f18f237d98 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch @@ -1,4 +1,4 @@ -From a27217a5437da313d251b4a765bf7cb60ffaa62d Mon Sep 17 00:00:00 2001 +From d7a34bb388e33d16260b67275cdb58f9c877d324 Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Tue, 27 Nov 2018 15:27:47 +0800 Subject: [PATCH] From 6d24365f0828185fd1bb4d199209ca07eb95c41d Mon Sep 17 @@ -11,14 +11,17 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> update patch to version 5.1.6 Signed-off-by: Changqing Li <changqing.li@windriver.com> + --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/configure.in b/configure.in +index 07c2051..e85d718 100644 --- a/configure.in +++ b/configure.in @@ -12,7 +12,7 @@ define([AC_CACHE_SAVE], )dnl - AC_INIT(.autofs-5.1.7) + AC_INIT(.autofs-5.1.8) # for pkg-config macros -m4_include([/usr/share/aclocal/pkg.m4]) diff --git a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.7-use-default-stack-size-for-threads.patch b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.7-use-default-stack-size-for-threads.patch deleted file mode 100644 index b21e7c03bf..0000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.7-use-default-stack-size-for-threads.patch +++ /dev/null @@ -1,110 +0,0 @@ -autofs-5.1.7 - use default stack size for threads - -From: Ian Kent <raven@themaw.net> - -autofs uses PTHREAD_STACK_MIN to set the stack size for threads it -creates. - -In two cases it is used to reduce the stack size for long running -service threads while it's used to allocate a larger stack for worker -threads that can have larger memory requirements. - -In recent glibc releases PTHREAD_STACK_MIN is no longer a constant -which can lead to unexpectedly different stack sizes on different -architectures and the autofs assumption it's a constant causes a -compile failure. - -The need to alter the stack size was due to observed stack overflow -which was thought to be due the thread stack being too small for autofs -and glibc alloca(3) usage. - -Quite a bit of that alloca(3) usage has been eliminated from autofs now, -particularly those that might be allocating largish amounts of storage, -and there has been a lot of change in glibc too so using the thread -default stack should be ok. - -Signed-off-by: Ian Kent <raven@themaw.net> ---- - CHANGELOG | 1 + - daemon/automount.c | 29 ----------------------------- - daemon/state.c | 6 +----- - lib/alarm.c | 6 +----- - 4 files changed, 3 insertions(+), 39 deletions(-) - ---- a/daemon/automount.c -+++ b/daemon/automount.c -@@ -92,7 +92,6 @@ static size_t kpkt_len; - /* Attributes for creating detached and joinable threads */ - pthread_attr_t th_attr; - pthread_attr_t th_attr_detached; --size_t detached_thread_stack_size = PTHREAD_STACK_MIN * 144; - - struct master_readmap_cond mrc = { - PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, NULL, 0, 0, 0, 0}; -@@ -2617,34 +2616,6 @@ int main(int argc, char *argv[]) - if (start_pipefd[1] != -1) { - res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat)); - close(start_pipefd[1]); -- } -- release_flag_file(); -- macro_free_global_table(); -- exit(1); -- } -- --#ifdef _POSIX_THREAD_ATTR_STACKSIZE -- if (pthread_attr_setstacksize( -- &th_attr_detached, detached_thread_stack_size)) { -- logerr("%s: failed to set stack size thread attribute!", -- program); -- if (start_pipefd[1] != -1) { -- res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat)); -- close(start_pipefd[1]); -- } -- release_flag_file(); -- macro_free_global_table(); -- exit(1); -- } --#endif -- -- if (pthread_attr_getstacksize( -- &th_attr_detached, &detached_thread_stack_size)) { -- logerr("%s: failed to get detached thread stack size!", -- program); -- if (start_pipefd[1] != -1) { -- res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat)); -- close(start_pipefd[1]); - } - release_flag_file(); - macro_free_global_table(); ---- a/daemon/state.c -+++ b/daemon/state.c -@@ -1173,12 +1173,8 @@ int st_start_handler(void) - status = pthread_attr_init(pattrs); - if (status) - pattrs = NULL; -- else { -+ else - pthread_attr_setdetachstate(pattrs, PTHREAD_CREATE_DETACHED); --#ifdef _POSIX_THREAD_ATTR_STACKSIZE -- pthread_attr_setstacksize(pattrs, PTHREAD_STACK_MIN*4); --#endif -- } - - status = pthread_create(&thid, pattrs, st_queue_handler, NULL); - ---- a/lib/alarm.c -+++ b/lib/alarm.c -@@ -270,12 +270,8 @@ int alarm_start_handler(void) - status = pthread_attr_init(pattrs); - if (status) - pattrs = NULL; -- else { -+ else - pthread_attr_setdetachstate(pattrs, PTHREAD_CREATE_DETACHED); --#ifdef _POSIX_THREAD_ATTR_STACKSIZE -- pthread_attr_setstacksize(pattrs, PTHREAD_STACK_MIN*4); --#endif -- } - - status = pthread_condattr_init(&condattrs); - if (status) diff --git a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.7.bb b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.8.bb index 3fc574fd0a..c41d0e6b93 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.7.bb +++ b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.8.bb @@ -26,9 +26,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ file://0001-Do-not-hardcode-path-for-pkg.m4.patch \ file://0001-Bug-fix-for-pid_t-not-found-on-musl.patch \ file://0001-Define-__SWORD_TYPE-if-undefined.patch \ - file://autofs-5.1.7-use-default-stack-size-for-threads.patch \ " -SRC_URI[sha256sum] = "a18619e5ad18960fe382354eef33f070e57e4e5711d484b010acde080a003312" +SRC_URI[sha256sum] = "0bd401c56f0eb1ca6251344c3a3d70bface3eccf9c67117cd184422c4cace30c" UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/" diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.21.06.bb b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb index caa85e040a..6c8a48179b 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.21.06.bb +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb @@ -29,8 +29,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \ file://0001-Fix-build-with-fno-common.patch \ file://0001-Use-correct-printf-format-for-__fsblkcnt_t.patch \ " -SRC_URI[md5sum] = "a60775787ba520a0b1031fcd42e0d65b" -SRC_URI[sha256sum] = "d29d124506e4b084285d27c8742c7bca66de80be6a0ba9de8e37835ccaa8ee57" +SRC_URI[sha256sum] = "227ae1dafb6d51ce6561c9fcaec60087a0183839a8a4da11517e09f2a662b53d" UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/opensaf/files/releases" diff --git a/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet/0001-libknet-tests-Correct-include-path-for-poll.h.patch b/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet/0001-libknet-tests-Correct-include-path-for-poll.h.patch new file mode 100644 index 0000000000..0d261fd4ef --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet/0001-libknet-tests-Correct-include-path-for-poll.h.patch @@ -0,0 +1,29 @@ +From cae68083fda5d4ca832ff3cc8a533454df2efe23 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 12 Oct 2021 20:35:53 -0700 +Subject: [PATCH] libknet/tests: Correct include path for poll.h + +Fixes +/usr/include/sys/poll.h:1:2: error: redirec +ting incorrect #include <sys/poll.h> to <poll.h> [-Werror,-W#warnings] +| #warning redirecting incorrect #include <sys/poll.h> to <poll.h> + +Upstream-Status: Submitted [https://github.com/kronosnet/kronosnet/pull/363] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libknet/tests/test-common.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libknet/tests/test-common.c b/libknet/tests/test-common.c +index 86b76b0..8f8b6ca 100644 +--- a/libknet/tests/test-common.c ++++ b/libknet/tests/test-common.c +@@ -20,7 +20,7 @@ + #include <pthread.h> + #include <dirent.h> + #include <sys/select.h> +-#include <sys/poll.h> ++#include <poll.h> + + #include "libknet.h" + #include "test-common.h" diff --git a/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet_1.20.bb b/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet_1.22.bb index b19482c79a..28d740cb41 100644 --- a/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet_1.20.bb +++ b/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet_1.22.bb @@ -11,8 +11,10 @@ LIC_FILES_CHKSUM = "file://COPYING.applications;md5=751419260aa954499f7abaabaa88 SECTION = "libs" DEPENDS = "doxygen-native libqb-native libxml2-native bzip2 libqb libxml2 libnl lksctp-tools lz4 lzo openssl nss xz zlib zstd" -SRCREV = "b8d18c8360fd39cb04748e8bc1ee26de4afa4cbd" -SRC_URI = "git://github.com/kronosnet/kronosnet;protocol=https;branch=stable1" +SRCREV = "0123ecebce0ad6aba3cdb320027192e15fd71e23" +SRC_URI = "git://github.com/kronosnet/kronosnet;protocol=https;branch=stable1 \ + file://0001-libknet-tests-Correct-include-path-for-poll.h.patch \ + " UPSTREAM_CHECK_URI = "https://github.com/kronosnet/kronosnet/releases" diff --git a/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc b/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc index 1640911fd8..94d9553e11 100644 --- a/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc +++ b/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc @@ -15,7 +15,7 @@ SRC_URI = "git://gitosis.stanford.edu/openflow.git;protocol=git" DEPENDS = "virtual/libc" -PACKAGECONFIG ??= "openssl" +PACKAGECONFIG ??= "" PACKAGECONFIG[openssl] = "--enable-ssl,--disable-ssl, openssl openssl-native, libssl" EXTRA_OECONF += " \ diff --git a/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.12.bb b/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.13.bb index 0254823304..a2eb81fd5b 100644 --- a/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.12.bb +++ b/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.13.bb @@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://debian/copyright;md5=acc89812938cf9ad6b1debc37cea0253 inherit manpages MAN_PKG = "${PN}" -SRCREV = "88410a7003c31993e79471e151b24662fc2a0d64" -SRC_URI = "git://salsa.debian.org/debian/ifenslave.git;protocol=https" +SRCREV = "1bdfb472f2f8212056ed418d48387e8b36e61b34" +SRC_URI = "git://salsa.debian.org/debian/ifenslave.git;protocol=https;branch=main" S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-networking/recipes-support/mctp/mctp_git.bb b/meta-openembedded/meta-networking/recipes-support/mctp/mctp_git.bb new file mode 100644 index 0000000000..cab5d6c132 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/mctp/mctp_git.bb @@ -0,0 +1,31 @@ +SUMMARY = "Management Component Control Protocol utilities" +HOMEPAGE = "http://www.github.com/CodeConstruct/mctp" +SECTION = "net" +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=4cc91856b08b094b4f406a29dc61db21" + +SRCREV = "a8658290b7914f67146a982671b09f2270ba1654" + +SRC_URI = "git://github.com/CodeConstruct/mctp;branch=main" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig systemd + +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ +" + +# mctpd will only be built if pkg-config detects libsystemd; in which case +# we'll want to declare the dep and install the service. +PACKAGECONFIG[systemd] = ",,systemd,libsystemd" +SYSTEMD_SERVICE:${PN} = "mctpd.service" + +do_install:append () { + if ${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${S}/conf/mctpd.service \ + ${D}${systemd_system_unitdir}/mctpd.service + fi +} diff --git a/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2/0001-fetch-ocsp-response-use-python3.patch b/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2/0001-fetch-ocsp-response-use-python3.patch deleted file mode 100644 index e4db09638f..0000000000 --- a/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2/0001-fetch-ocsp-response-use-python3.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 73ec79432fc557a8be4f1500982b1c0f5fdf12a9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com> -Date: Thu, 7 Nov 2019 09:58:52 +0000 -Subject: [PATCH] fetch-ocsp-response: use python3 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Inappropriate [oe specific] -Signed-off-by: André Draszik <git@andred.net> ---- - script/fetch-ocsp-response | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/script/fetch-ocsp-response b/script/fetch-ocsp-response -index 0ff7461..185116b 100755 ---- a/script/fetch-ocsp-response -+++ b/script/fetch-ocsp-response -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # -*- coding: utf-8 -*- - - # nghttp2 - HTTP/2 C Library --- -2.23.0.rc1 - diff --git a/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.45.1.bb b/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.45.1.bb deleted file mode 100644 index e4a17cbdd6..0000000000 --- a/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.45.1.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "HTTP/2 C Library and tools" -HOMEPAGE = "https://nghttp2.org/" -SECTION = "libs" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=764abdf30b2eadd37ce47dcbce0ea1ec" -DEPENDS = "c-ares cunit jansson libev libevent libxml2 openssl zlib" - -UPSTREAM_CHECK_URI = "https://github.com/nghttp2/nghttp2/releases" - -SRC_URI = "\ - https://github.com/nghttp2/nghttp2/releases/download/v${PV}/nghttp2-${PV}.tar.xz \ - file://0001-fetch-ocsp-response-use-python3.patch \ -" -SRC_URI[sha256sum] = "abdc4addccadbc7d89abe27c4d6427d78e57d139f69c1f45749227393c68bf79" - -inherit cmake manpages python3native -PACKAGECONFIG[manpages] = "" - -# examples are never installed, and don't need to be built in the -# first place -EXTRA_OECMAKE = "-DENABLE_EXAMPLES=OFF -DENABLE_APP=ON -DENABLE_HPACK_TOOLS=OFF" - -PACKAGES =+ "lib${PN} ${PN}-client ${PN}-proxy ${PN}-server" - -RDEPENDS:${PN} = "${PN}-client (>= ${PV}) ${PN}-proxy (>= ${PV}) ${PN}-server (>= ${PV})" -RDEPENDS:${PN}:class-native = "" -RDEPENDS:${PN}-proxy = "openssl python3-core python3-io python3-shell" - -ALLOW_EMPTY:${PN} = "1" -FILES:${PN} = "" -FILES:lib${PN} = "${libdir}/*${SOLIBS}" -FILES:${PN}-client = "${bindir}/h2load ${bindir}/nghttp" -FILES:${PN}-proxy = "${bindir}/nghttpx ${datadir}/${BPN}/fetch-ocsp-response" -FILES:${PN}-server = "${bindir}/nghttpd" - -BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-networking/recipes-support/openipmi/files/0001-m4-ax_python_devel.m4-do-not-check-for-distutils.patch b/meta-openembedded/meta-networking/recipes-support/openipmi/files/0001-m4-ax_python_devel.m4-do-not-check-for-distutils.patch new file mode 100644 index 0000000000..00956fb117 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/openipmi/files/0001-m4-ax_python_devel.m4-do-not-check-for-distutils.patch @@ -0,0 +1,41 @@ +From 3a35611687864cf3599712d0d2ff54532b0118ac Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Sun, 3 Oct 2021 21:42:32 +0200 +Subject: [PATCH] m4/ax_python_devel.m4: do not check for distutils + +With py 3.10 this prints a deprecation warning which is +taken as an error. Upstream should rework the code to not +use distuils. + +Upstream-Status: Inappropriate [needs a proper fix upstream] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + m4/ax_python_devel.m4 | 15 --------------- + 1 file changed, 15 deletions(-) + +diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4 +index e0804c5..cfc0b24 100644 +--- a/m4/ax_python_devel.m4 ++++ b/m4/ax_python_devel.m4 +@@ -138,21 +138,6 @@ variable to configure. See ``configure --help'' for reference. + fi + fi + +- # +- # Check if you have distutils, else fail +- # +- AC_MSG_CHECKING([for the distutils Python package]) +- ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` +- if test -z "$ac_distutils_result"; then +- AC_MSG_RESULT([yes]) +- else +- AC_MSG_RESULT([no]) +- AC_MSG_ERROR([cannot import Python module "distutils". +-Please check your Python installation. The error was: +-$ac_distutils_result]) +- PYTHON_VERSION="" +- fi +- + # + # Check for Python include path + # diff --git a/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.31.bb b/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.31.bb index ecc98dd8be..4b85d94273 100644 --- a/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.31.bb +++ b/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.31.bb @@ -31,6 +31,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/openipmi/OpenIPMI-${PV}.tar.gz \ file://include_sys_types.patch \ file://openipmi-helper \ file://ipmi.service \ + file://0001-m4-ax_python_devel.m4-do-not-check-for-distutils.patch \ " S = "${WORKDIR}/OpenIPMI-${PV}" diff --git a/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.5.3.bb b/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.5.4.bb index a70e9708de..6b588a5f50 100644 --- a/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.5.3.bb +++ b/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.5.4.bb @@ -14,8 +14,7 @@ SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \ UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads" -SRC_URI[md5sum] = "08895fd1142f25fdd94a98315632e1bf" -SRC_URI[sha256sum] = "75f0044df449430555ca7b995a2b77ab24f2946fdc3668301b8edc23986a5f7e" +SRC_URI[sha256sum] = "f80f3c3df1b94a8892ae547df84f152583250684a24bd022ccc98ef56fa93d97" # CVE-2020-7224 and CVE-2020-27569 are for Aviatrix OpenVPN client, not for openvpn. CVE_CHECK_WHITELIST += "CVE-2020-7224 CVE-2020-27569" diff --git a/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.9.3.bb b/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.9.4.bb index ad104e44ed..cbc263d301 100644 --- a/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.9.3.bb +++ b/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.9.4.bb @@ -12,7 +12,7 @@ SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \ file://0001-memory.h-Include-stdint.h-for-uintptr_t.patch \ " -SRC_URI[sha256sum] = "9325ab56a0a4e97e379401e1d942ce3e0d8b6372291350ab2caae0755862c6f7" +SRC_URI[sha256sum] = "45fdf1a4c2af086d8ff5b76fd7b21d3b6f0890f365f83bf4c9a75dda26887518" UPSTREAM_CHECK_REGEX = "strongswan-(?P<pver>\d+(\.\d+)+)\.tar" diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_2.5.2.bb b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_2.8.bb index 3c89c377a7..6ff98abe5f 100644 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_2.5.2.bb +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_2.8.bb @@ -7,8 +7,7 @@ HOMEPAGE = "https://thingsboard.io/" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" -SRC_URI[md5sum] = "469c8b5cd1c16c20ef40f0a97a3a0fda" -SRC_URI[sha256sum] = "b328f4e315c3541ac80a4931974a34a81afe4d1f382f48e8604669a55816c0d7" +SRC_URI[sha256sum] = "35a8aa0268e61b15d689439927756934a28757dc77ad5f03ee6a9119edc37199" inherit pypi setuptools3 @@ -65,4 +64,4 @@ do_install:append(){ install -d ${D}${systemd_unitdir}/system/ install -m 0644 ${WORKDIR}/thingsboard-gateway.service ${D}${systemd_system_unitdir}/thingsboard-gateway.service -}
\ No newline at end of file +} diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Cargo.toml-do-not-abort-on-panic.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Cargo.toml-do-not-abort-on-panic.patch new file mode 100644 index 0000000000..e09848f403 --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Cargo.toml-do-not-abort-on-panic.patch @@ -0,0 +1,29 @@ +From 9e37248870b2b955293754933c789ca00bca06ef Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Fri, 1 Oct 2021 13:00:24 +0200 +Subject: [PATCH] Cargo.toml: do not abort on panic + +OE's rust is configured to unwind, and this setting clashes with it/ + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + Cargo.toml | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -51,13 +51,11 @@ opt-level = 1 + rpath = false + lto = false + debug-assertions = true +-panic = "abort" + + [profile.release] + opt-level = 2 + rpath = false + debug-assertions = false +-panic = "abort" + + # Optimize build dependencies, because bindgen and proc macros / style + # compilation take more to run than to build otherwise. diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Port-build-to-python3.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Port-build-to-python3.patch deleted file mode 100644 index 5cdad93e95..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Port-build-to-python3.patch +++ /dev/null @@ -1,6897 +0,0 @@ -From 33a373ba41d978af60c2f0230bcba6ad27357ec8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> -Date: Wed, 29 Jan 2020 16:25:11 +0100 -Subject: [PATCH] Port build to python3 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -* first tool of choice was 2to3 -* some parts were taken from [1] but during work it was found that this patch - introduces interesting effects - see hash functions. Working more on this - makes me guess that one has never worked... -* Few parts were taken from upstream mirror [2]. Since they use six for porting - to python3 it adds us a new dependency. -* To get a better overview what is going on or failing some additional messages - were added. The most verbose one is left disabled - see - python/mozbuild/mozbuild/configure/__init__.py / Line 310 onwards -* major changes upstream on build are not to expect so upgrading should cause - little trouble and changes can be tracked by [3] -* some solutions are workarounds/hacks so this patch will not be accepted - upstream. This should not be a problem for us: once mozjs >= 68 will arrive - we have to go to rust/cargo based build anyway. - -[1] https://code.foxkit.us/adelie/packages/blob/f2b5773da19ab397fbe64fd32dacc383cfe4cd77/user/mozjs/python3.patch -[2] https://github.com/mozilla/gecko-dev -[3] https://github.com/mozilla/gecko-dev/tree/esr60 - -Upstream-Status: Inappropriate [Some Hacks] - -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> ---- - build/autoconf/config.status.m4 | 2 +- - build/moz.configure/android-ndk.configure | 4 +- - build/moz.configure/checks.configure | 4 +- - build/moz.configure/init.configure | 31 +- - build/moz.configure/keyfiles.configure | 4 +- - build/moz.configure/old.configure | 32 +- - build/moz.configure/toolchain.configure | 18 +- - build/moz.configure/util.configure | 9 +- - build/moz.configure/windows.configure | 10 +- - build/templates.mozbuild | 2 +- - config/MozZipFile.py | 12 +- - config/expandlibs.py | 6 +- - config/expandlibs_exec.py | 14 +- - config/expandlibs_gen.py | 4 +- - configure.py | 42 +- - js/src/build/moz.build | 8 +- - js/src/builtin/embedjs.py | 10 +- - js/src/configure | 2 +- - js/src/frontend/GenerateReservedWords.py | 6 +- - js/src/gc/GenerateStatsPhases.py | 4 +- - js/src/old-configure.in | 2 + - memory/build/moz.build | 8 +- - mozglue/build/moz.build | 22 +- - .../mozbuild/mozbuild/action/check_binary.py | 2 + - .../mozbuild/action/process_define_files.py | 4 +- - python/mozbuild/mozbuild/backend/base.py | 8 +- - python/mozbuild/mozbuild/backend/common.py | 8 +- - .../mozbuild/backend/configenvironment.py | 14 +- - .../mozbuild/mozbuild/backend/fastermake.py | 10 +- - .../mozbuild/backend/recursivemake.py | 181 +++---- - python/mozbuild/mozbuild/config_status.py | 7 +- - .../mozbuild/mozbuild/configure/__init__.py | 83 +++- - .../mozbuild/configure/check_debug_ranges.py | 6 +- - python/mozbuild/mozbuild/configure/options.py | 24 +- - python/mozbuild/mozbuild/configure/util.py | 12 +- - .../mozbuild/mozbuild/controller/building.py | 16 +- - python/mozbuild/mozbuild/frontend/context.py | 89 ++-- - python/mozbuild/mozbuild/frontend/data.py | 8 +- - python/mozbuild/mozbuild/frontend/emitter.py | 50 +- - python/mozbuild/mozbuild/frontend/reader.py | 49 +- - python/mozbuild/mozbuild/frontend/sandbox.py | 3 +- - python/mozbuild/mozbuild/jar.py | 12 +- - python/mozbuild/mozbuild/makeutil.py | 24 +- - python/mozbuild/mozbuild/mozinfo.py | 8 +- - python/mozbuild/mozbuild/preprocessor.py | 27 +- - python/mozbuild/mozbuild/shellutil.py | 6 +- - .../test/backend/test_recursivemake.py | 18 +- - .../mozbuild/test/configure/common.py | 8 +- - .../mozbuild/mozbuild/test/configure/lint.py | 8 +- - .../test/configure/test_checks_configure.py | 8 +- - .../test/configure/test_compile_checks.py | 4 +- - .../mozbuild/test/configure/test_configure.py | 244 +++++----- - .../mozbuild/test/configure/test_lint.py | 24 +- - .../test/configure/test_moz_configure.py | 32 +- - .../mozbuild/test/configure/test_options.py | 450 +++++++++--------- - .../configure/test_toolchain_configure.py | 22 +- - .../test/configure/test_toolchain_helpers.py | 62 +-- - .../configure/test_toolkit_moz_configure.py | 2 +- - .../mozbuild/test/configure/test_util.py | 8 +- - python/mozbuild/mozbuild/testing.py | 10 +- - python/mozbuild/mozbuild/util.py | 79 ++- - python/mozbuild/mozbuild/virtualenv.py | 6 +- - python/mozbuild/mozpack/chrome/manifest.py | 6 +- - python/mozbuild/mozpack/copier.py | 12 +- - python/mozbuild/mozpack/files.py | 22 +- - python/mozbuild/mozpack/manifests.py | 16 +- - python/mozbuild/mozpack/mozjar.py | 37 +- - .../manifestparser/manifestparser/ini.py | 13 +- - .../manifestparser/manifestparser.py | 24 +- - testing/mozbase/mozinfo/mozinfo/mozinfo.py | 26 +- - .../mozprocess/mozprocess/processhandler.py | 10 +- - third_party/python/which/which.py | 18 +- - 72 files changed, 1081 insertions(+), 993 deletions(-) - -diff --git a/build/autoconf/config.status.m4 b/build/autoconf/config.status.m4 -index c75575386..543c2d682 100644 ---- a/build/autoconf/config.status.m4 -+++ b/build/autoconf/config.status.m4 -@@ -122,7 +122,7 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - - dnl We're going to need [ ] for python syntax. - changequote(<<<, >>>)dnl --echo creating $CONFIG_STATUS -+echo creating $CONFIG_STATUS in `pwd` - - cat > $CONFIG_STATUS <<EOF - -diff --git a/build/moz.configure/android-ndk.configure b/build/moz.configure/android-ndk.configure -index 1067b8619..3b592a237 100644 ---- a/build/moz.configure/android-ndk.configure -+++ b/build/moz.configure/android-ndk.configure -@@ -30,7 +30,7 @@ js_option('--with-android-version', - - - @depends('--with-android-version', min_android_version, '--help') --@imports(_from='__builtin__', _import='ValueError') -+@imports(_from='builtins', _import='ValueError') - def android_version(value, min_version, _): - if not value: - # Someone has passed --without-android-version. -@@ -68,7 +68,7 @@ add_old_configure_assignment('android_ndk', ndk) - - @depends(ndk) - @checking('for android ndk version') --@imports(_from='__builtin__', _import='open') -+@imports(_from='builtins', _import='open') - def ndk_version(ndk): - if not ndk: - # Building 'js/src' for non-Android. -diff --git a/build/moz.configure/checks.configure b/build/moz.configure/checks.configure -index 516652da9..11e1091c6 100644 ---- a/build/moz.configure/checks.configure -+++ b/build/moz.configure/checks.configure -@@ -14,7 +14,7 @@ - - - @template --@imports(_from='__builtin__', _import='Exception') -+@imports(_from='builtins', _import='Exception') - def _declare_exceptions(): - class FatalCheckError(Exception): - '''An exception to throw from a function decorated with @checking. -@@ -57,7 +57,7 @@ def checking(what, callback=None): - try: - ret = func(*args, **kwargs) - except FatalCheckError as e: -- error = e.message -+ error = str(e) - display_ret = callback(ret) if callback else ret - if display_ret is True: - log.info('yes') -diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure -index 648ac2ded..4d74547d8 100644 ---- a/build/moz.configure/init.configure -+++ b/build/moz.configure/init.configure -@@ -14,7 +14,7 @@ option(env='DIST', nargs=1, help='DIST directory') - - - @depends('--help', 'DIST') --@imports(_from='__builtin__', _import='open') -+@imports(_from='builtins', _import='open') - @imports(_from='os.path', _import='exists') - def check_build_environment(help, dist): - topobjdir = os.path.realpath(os.path.abspath('.')) -@@ -65,7 +65,7 @@ def check_build_environment(help, dist): - # Check for CRLF line endings. - with open(os.path.join(topsrcdir, 'configure.py'), 'rb') as fh: - data = fh.read() -- if '\r' in data: -+ if b'\r' in data: - die('\n ***\n' - ' * The source tree appears to have Windows-style line endings.\n' - ' *\n' -@@ -269,7 +269,7 @@ def early_options(): - def early_options(): - return set( - option.env -- for option in __sandbox__._options.itervalues() -+ for option in __sandbox__._options.values() - if option.env - ) - return early_options -@@ -307,15 +307,15 @@ def mozconfig_options(mozconfig, automation, help): - log.info(' %s' % arg) - helper.add(arg, origin='mozconfig', args=helper._args) - -- for key, value in mozconfig['env']['added'].iteritems(): -+ for key, value in mozconfig['env']['added'].items(): - add(key, value) - os.environ[key] = value -- for key, (_, value) in mozconfig['env']['modified'].iteritems(): -+ for key, (_, value) in mozconfig['env']['modified'].items(): - add(key, value) - os.environ[key] = value -- for key, value in mozconfig['vars']['added'].iteritems(): -+ for key, value in mozconfig['vars']['added'].items(): - add(key, value) -- for key, (_, value) in mozconfig['vars']['modified'].iteritems(): -+ for key, (_, value) in mozconfig['vars']['modified'].items(): - add(key, value) - - -@@ -353,7 +353,7 @@ option(env='PYTHON3', nargs=1, help='Python 3 interpreter (3.5 or later)') - @depends('PYTHON3') - @checking('for Python 3', - callback=lambda x: '%s (%s)' % (x.path, x.str_version) if x else 'no') --@imports(_from='__builtin__', _import='Exception') -+@imports(_from='builtins', _import='Exception') - @imports(_from='mozbuild.pythonutil', _import='find_python3_executable') - @imports(_from='mozbuild.pythonutil', _import='python_executable_version') - def python3(env_python): -@@ -377,9 +377,6 @@ def python3(env_python): - if not python: - return None - -- # The API returns a bytes whereas everything in configure is unicode. -- python = python.decode('utf-8') -- - return namespace( - path=python, - version=version, -@@ -481,6 +478,8 @@ def hg_config(build_env, hg, version): - @imports('re') - def git_version(git): - out = check_cmd_output(git, '--version').rstrip() -+ if isinstance(out, bytes): -+ out = out.decode('utf-8') - - match = re.search('git version (.*)$', out) - -@@ -551,8 +550,8 @@ option('--target', nargs=1, - @imports(_from='mozbuild.configure.constants', _import='Endianness') - @imports(_from='mozbuild.configure.constants', _import='Kernel') - @imports(_from='mozbuild.configure.constants', _import='OS') --@imports(_from='__builtin__', _import='KeyError') --@imports(_from='__builtin__', _import='ValueError') -+@imports(_from='builtins', _import='KeyError') -+@imports(_from='builtins', _import='ValueError') - def split_triplet(triplet, allow_unknown=False): - # The standard triplet is defined as - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -@@ -562,6 +561,8 @@ def split_triplet(triplet, allow_unknown=False): - # Additionally, some may omit "unknown" when the manufacturer - # is not specified and emit - # CPU_TYPE-OPERATING_SYSTEM -+ if isinstance(triplet, bytes): -+ triplet = triplet.decode('utf-8') - parts = triplet.split('-', 2) - if len(parts) == 3: - cpu, _, os = parts -@@ -987,7 +988,7 @@ add_old_configure_assignment('MOZ_BUILD_APP', build_project) - # - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora - # - otherwise, we're building Release/Beta (define RELEASE_OR_BETA) - @depends(check_build_environment, '--help') --@imports(_from='__builtin__', _import='open') -+@imports(_from='builtins', _import='open') - @imports('re') - def milestone(build_env, _): - milestone_path = os.path.join(build_env.topsrcdir, -@@ -1105,7 +1106,7 @@ def enabled_in_nightly(milestone, _): - def all_configure_options(): - result = [] - previous = None -- for option in __sandbox__._options.itervalues(): -+ for option in __sandbox__._options.values(): - # __sandbox__._options contains items for both option.name and - # option.env. But it's also an OrderedDict, meaning both are - # consecutive. -diff --git a/build/moz.configure/keyfiles.configure b/build/moz.configure/keyfiles.configure -index 5d51cccea..14a35a3c6 100644 ---- a/build/moz.configure/keyfiles.configure -+++ b/build/moz.configure/keyfiles.configure -@@ -16,8 +16,8 @@ def keyfile(desc, default=None, help=None, callback=lambda x: x): - - @depends('--with-%s-keyfile' % name) - @checking('for the %s key' % desc, lambda x: x and x is not no_key) -- @imports(_from='__builtin__', _import='open') -- @imports(_from='__builtin__', _import='IOError') -+ @imports(_from='builtins', _import='open') -+ @imports(_from='builtins', _import='IOError') - def keyfile(value): - if value: - try: -diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure -index 81c10b91f..29b496bae 100644 ---- a/build/moz.configure/old.configure -+++ b/build/moz.configure/old.configure -@@ -64,9 +64,9 @@ set_config('AUTOCONF', autoconf) - - @depends('OLD_CONFIGURE', mozconfig, autoconf, check_build_environment, shell, - old_configure_assignments, build_project) --@imports(_from='__builtin__', _import='open') --@imports(_from='__builtin__', _import='print') --@imports(_from='__builtin__', _import='sorted') -+@imports(_from='builtins', _import='open') -+@imports(_from='builtins', _import='print') -+@imports(_from='builtins', _import='sorted') - @imports('glob') - @imports('itertools') - @imports('subprocess') -@@ -113,7 +113,7 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell, - - # Make old-configure append to config.log, where we put our own log. - # This could be done with a m4 macro, but it's way easier this way -- script = script.replace('>./config.log', '>>./config.log') -+ script = script.replace(b'>./config.log', b'>>./config.log') - - with open(old_configure, 'wb') as fh: - fh.write(script) -@@ -282,8 +282,8 @@ def old_configure_options(*options): - '--x-includes', - '--x-libraries', - ) --@imports(_from='__builtin__', _import='compile') --@imports(_from='__builtin__', _import='open') -+@imports(_from='builtins', _import='compile') -+@imports(_from='builtins', _import='open') - @imports('logging') - @imports('os') - @imports('subprocess') -@@ -326,7 +326,7 @@ def old_configure(prepare_configure, extra_old_configure_args, all_options, - log.debug('Running %s', quote(*cmd)) - if extra_env: - log.debug('with extra environment: %s', -- ' '.join('%s=%s' % pair for pair in extra_env.iteritems())) -+ ' '.join('%s=%s' % pair for pair in extra_env.items())) - - # Our logging goes to config.log, the same file old.configure uses. - # We can't share the handle on the file, so close it. We assume nothing -@@ -359,7 +359,7 @@ def old_configure(prepare_configure, extra_old_configure_args, all_options, - # Every variation of the exec() function I tried led to: - # SyntaxError: unqualified exec is not allowed in function 'main' it - # contains a nested function with free variables -- exec code in raw_config # noqa -+ exec(code, raw_config) # noqa - - # Ensure all the flags known to old-configure appear in the - # @old_configure_options above. -@@ -393,16 +393,24 @@ def set_old_configure_define(name, value): - @depends(old_configure) - @imports('types') - def post_old_configure(raw_config): -+ log.info('post_old_configure started') -+ - for k, v in raw_config['substs']: - set_old_configure_config( -- k[1:-1], v[1:-1] if isinstance(v, types.StringTypes) else v) -+ k[1:-1], v[1:-1] if isinstance(v, str) else v) -+ -+ log.info('post_old_configure 1 finished') - -- for k, v in dict(raw_config['defines']).iteritems(): -+ for k, v in dict(raw_config['defines']).items(): - set_old_configure_define(k[1:-1], v[1:-1]) - -+ log.info('post_old_configure 2 finished') -+ - set_old_configure_config('non_global_defines', - raw_config['non_global_defines']) - -+ log.info('post_old_configure 3 finished') -+ - - # Assuming no other option is declared after this function, handle the - # env options that were injected by mozconfig_options by creating dummy -@@ -414,6 +422,7 @@ def post_old_configure(raw_config): - @imports('__sandbox__') - @imports(_from='mozbuild.configure.options', _import='Option') - def remaining_mozconfig_options(_): -+ log.info('remaining_mozconfig_options started') - helper = __sandbox__._helper - for arg in helper: - if helper._origins[arg] != 'mozconfig': -@@ -422,5 +431,6 @@ def remaining_mozconfig_options(_): - if name.isupper() and name not in __sandbox__._options: - option = Option(env=name, nargs='*', help=name) - helper.handle(option) -+ log.info('remaining_mozconfig_options finished') - - # Please do not add anything after remaining_mozconfig_options() -diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure -index fc640c75e..c5508dfb7 100755 ---- a/build/moz.configure/toolchain.configure -+++ b/build/moz.configure/toolchain.configure -@@ -391,7 +391,7 @@ def get_compiler_info(compiler, language): - ('CPU', CPU_preprocessor_checks), - ('KERNEL', kernel_preprocessor_checks), - ): -- for n, (value, condition) in enumerate(preprocessor_checks.iteritems()): -+ for n, (value, condition) in enumerate(preprocessor_checks.items()): - check += dedent('''\ - #%(if)s %(condition)s - %%%(name)s "%(value)s" -@@ -425,9 +425,9 @@ def get_compiler_info(compiler, language): - data = {} - for line in result.splitlines(): - if line.startswith(b'%'): -- k, _, v = line.partition(' ') -- k = k.lstrip('%') -- data[k] = v.replace(' ', '').lstrip('"').rstrip('"') -+ k, _, v = line.partition(b' ') -+ k = k.lstrip(b'%').decode('utf-8') -+ data[k] = v.replace(b' ', b'').lstrip(b'"').rstrip(b'"').decode('utf-8') - log.debug('%s = %s', k, data[k]) - - try: -@@ -551,7 +551,7 @@ def check_compiler(compiler, language, target): - ) - - --@imports(_from='__builtin__', _import='open') -+@imports(_from='builtins', _import='open') - @imports('json') - @imports('subprocess') - @imports('sys') -@@ -606,7 +606,7 @@ def vs_major_version(value): - - - @depends(host, target, vs_major_version, check_build_environment, '--with-visual-studio-version') --@imports(_from='__builtin__', _import='sorted') -+@imports(_from='builtins', _import='sorted') - @imports(_from='operator', _import='itemgetter') - @imports('platform') - def vc_compiler_path(host, target, vs_major_version, env, vs_release_name): -@@ -807,7 +807,7 @@ def compiler(language, host_or_target, c_compiler=None, other_compiler=None, - target.os != 'Android': - return namespace(**{ - k: [] if k == 'flags' else v -- for k, v in other_compiler.__dict__.iteritems() -+ for k, v in other_compiler.__dict__.items() - }) - - # Normally, we'd use `var` instead of `_var`, but the interaction with -@@ -1238,7 +1238,7 @@ set_config('VISIBILITY_FLAGS', visibility_flags) - - @depends(c_compiler) - @imports('multiprocessing') --@imports(_from='__builtin__', _import='min') -+@imports(_from='builtins', _import='min') - def pgo_flags(compiler): - if compiler.type in ('gcc', 'clang'): - return namespace( -@@ -1517,6 +1517,8 @@ def enable_gnu_linker(enable_gold_option, c_compiler, developer_options, build_e - gold = check_cmd_output(*detection_cmd).strip() - if not gold: - return -+ if isinstance(gold, bytes): -+ gold = gold.decode('utf-8') - - goldFullPath = find_program(gold) - if goldFullPath is None: -diff --git a/build/moz.configure/util.configure b/build/moz.configure/util.configure -index 3284fd8b5..218813e2d 100644 ---- a/build/moz.configure/util.configure -+++ b/build/moz.configure/util.configure -@@ -25,7 +25,6 @@ def configure_error(message): - # does not. - - --@imports(_from='__builtin__', _import='unicode') - @imports('subprocess') - @imports('sys') - @imports(_from='mozbuild.configure.util', _import='LineIO') -@@ -39,10 +38,10 @@ def check_cmd_output(*args, **kwargs): - if 'env' in kwargs: - normalized_env = {} - for k, v in kwargs['env'].items(): -- if isinstance(k, unicode): -+ if isinstance(k, str): - k = k.encode('utf-8', 'strict') - -- if isinstance(v, unicode): -+ if isinstance(v, str): - v = v.encode('utf-8', 'strict') - - normalized_env[k] = v -@@ -285,7 +284,7 @@ def unique_list(l): - # ('19.0', 'x64', r'C:\...\amd64\cl.exe') - # ('19.0', 'x86', r'C:\...\amd64_x86\cl.exe') - @imports(_import='_winreg', _as='winreg') --@imports(_from='__builtin__', _import='WindowsError') -+@imports(_from='builtins', _import='WindowsError') - @imports(_from='fnmatch', _import='fnmatch') - def get_registry_values(pattern, get_32_and_64_bit=False): - def enum_helper(func, key): -@@ -360,6 +359,8 @@ def get_registry_values(pattern, get_32_and_64_bit=False): - @imports(_from='mozbuild.configure.util', _import='Version', _as='_Version') - def Version(v): - 'A version number that can be compared usefully.' -+ if isinstance(v, bytes): -+ v = v.decode('utf-8') - return _Version(v) - - # Denotes a deprecated option. Combines option() and @depends: -diff --git a/build/moz.configure/windows.configure b/build/moz.configure/windows.configure -index a5b790e3b..2b88fc447 100644 ---- a/build/moz.configure/windows.configure -+++ b/build/moz.configure/windows.configure -@@ -10,7 +10,7 @@ option('--with-windows-version', nargs=1, default='603', - - - @depends('--with-windows-version') --@imports(_from='__builtin__', _import='ValueError') -+@imports(_from='builtins', _import='ValueError') - def valid_windows_version(value): - if not value: - die('Cannot build with --without-windows-version') -@@ -50,8 +50,8 @@ def windows_sdk_dir(value, host): - - @imports('os') - @imports('re') --@imports(_from='__builtin__', _import='sorted') --@imports(_from='__builtin__', _import='WindowsError') -+@imports(_from='builtins', _import='sorted') -+@imports(_from='builtins', _import='WindowsError') - def get_sdk_dirs(sdk, subdir): - def get_dirs_containing(sdk, stem, subdir): - base = os.path.join(sdk, stem) -@@ -96,7 +96,7 @@ def valid_windows_sdk_dir_result(value): - - @depends(c_compiler, windows_sdk_dir, valid_windows_version, 'WINDOWSSDKDIR') - @checking('for Windows SDK', valid_windows_sdk_dir_result) --@imports(_from='__builtin__', _import='sorted') -+@imports(_from='builtins', _import='sorted') - @imports(_from='textwrap', _import='dedent') - def valid_windows_sdk_dir(compiler, windows_sdk_dir, target_version, - windows_sdk_dir_env): -@@ -174,7 +174,7 @@ def valid_ucrt_sdk_dir_result(value): - @depends(windows_sdk_dir, 'WINDOWSSDKDIR', c_compiler) - @checking('for Universal CRT SDK', valid_ucrt_sdk_dir_result) - @imports('os') --@imports(_from='__builtin__', _import='sorted') -+@imports(_from='builtins', _import='sorted') - @imports(_import='mozpack.path', _as='mozpath') - def valid_ucrt_sdk_dir(windows_sdk_dir, windows_sdk_dir_env, c_compiler): - if windows_sdk_dir_env: -diff --git a/build/templates.mozbuild b/build/templates.mozbuild -index 3da850ce5..ae5e410fe 100644 ---- a/build/templates.mozbuild -+++ b/build/templates.mozbuild -@@ -10,7 +10,7 @@ def Binary(): - templates.''' - - # Add -llog by default, since we use it all over the place. -- if CONFIG['OS_TARGET'] == 'Android': -+ if str(CONFIG['OS_TARGET']) == 'Android': - OS_LIBS += ['log'] - - -diff --git a/config/MozZipFile.py b/config/MozZipFile.py -index 337fe0521..dc7add4c3 100644 ---- a/config/MozZipFile.py -+++ b/config/MozZipFile.py -@@ -18,7 +18,7 @@ class ZipFile(zipfile.ZipFile): - def __init__(self, file, mode="r", compression=zipfile.ZIP_STORED, - lock = False): - if lock: -- assert isinstance(file, basestring) -+ assert isinstance(file, str) - self.lockfile = lock_file(file + '.lck') - else: - self.lockfile = None -@@ -46,7 +46,7 @@ class ZipFile(zipfile.ZipFile): - date_time=time.localtime(time.time())) - zinfo.compress_type = self.compression - # Add some standard UNIX file access permissions (-rw-r--r--). -- zinfo.external_attr = (0x81a4 & 0xFFFF) << 16L -+ zinfo.external_attr = (0x81a4 & 0xFFFF) << 16 - else: - zinfo = zinfo_or_arcname - -@@ -58,7 +58,7 @@ class ZipFile(zipfile.ZipFile): - # as the old, reuse the existing entry. - - doSeek = False # store if we need to seek to the eof after overwriting -- if self.NameToInfo.has_key(zinfo.filename): -+ if zinfo.filename in self.NameToInfo: - # Find the last ZipInfo with our name. - # Last, because that's catching multiple overwrites - i = len(self.filelist) -@@ -109,14 +109,14 @@ class ZipFile(zipfile.ZipFile): - # adjust file mode if we originally just wrote, now we rewrite - self.fp.close() - self.fp = open(self.filename, 'r+b') -- all = map(lambda zi: (zi, True), self.filelist) + \ -- map(lambda zi: (zi, False), self._remove) -+ all = [(zi, True) for zi in self.filelist] + \ -+ [(zi, False) for zi in self._remove] - all.sort(lambda l, r: cmp(l[0].header_offset, r[0].header_offset)) - # empty _remove for multiple closes - self._remove = [] - - lengths = [all[i+1][0].header_offset - all[i][0].header_offset -- for i in xrange(len(all)-1)] -+ for i in range(len(all)-1)] - lengths.append(self.end - all[-1][0].header_offset) - to_pos = 0 - for (zi, keep), length in zip(all, lengths): -diff --git a/config/expandlibs.py b/config/expandlibs.py -index ac06c432f..df1fed15d 100644 ---- a/config/expandlibs.py -+++ b/config/expandlibs.py -@@ -26,7 +26,7 @@ ${LIB_PREFIX}${ROOT}.${LIB_SUFFIX} following these rules: - descriptor contains. And for each of these LIBS, also apply the same - rules. - ''' --from __future__ import with_statement -+ - import sys, os, errno - import expandlibs_config as conf - -@@ -36,7 +36,7 @@ def ensureParentDir(file): - if dir and not os.path.exists(dir): - try: - os.makedirs(dir) -- except OSError, error: -+ except OSError as error: - if error.errno != errno.EEXIST: - raise - -@@ -140,4 +140,4 @@ class ExpandArgs(list): - return [relativize(arg)] - - if __name__ == '__main__': -- print " ".join(ExpandArgs(sys.argv[1:])) -+ print(" ".join(ExpandArgs(sys.argv[1:]))) -diff --git a/config/expandlibs_exec.py b/config/expandlibs_exec.py -index df656016c..fb786a6a8 100644 ---- a/config/expandlibs_exec.py -+++ b/config/expandlibs_exec.py -@@ -20,7 +20,7 @@ With the --symbol-order argument, followed by a file name, it will add the - relevant linker options to change the order in which the linker puts the - symbols appear in the resulting binary. Only works for ELF targets. - ''' --from __future__ import with_statement -+ - import sys - import os - from expandlibs import ( -@@ -304,11 +304,11 @@ class SectionFinder(object): - return syms - - def print_command(out, args): -- print >>out, "Executing: " + " ".join(args) -+ print("Executing: " + " ".join(args), file=out) - for tmp in [f for f in args.tmp if os.path.isfile(f)]: -- print >>out, tmp + ":" -+ print(tmp + ":", file=out) - with open(tmp) as file: -- print >>out, "".join([" " + l for l in file.readlines()]) -+ print("".join([" " + l for l in file.readlines()]), file=out) - out.flush() - - def main(args, proc_callback=None): -@@ -338,13 +338,13 @@ def main(args, proc_callback=None): - proc = subprocess.Popen(args, stdout = subprocess.PIPE, stderr = subprocess.STDOUT) - if proc_callback: - proc_callback(proc) -- except Exception, e: -- print >>sys.stderr, 'error: Launching', args, ':', e -+ except Exception as e: -+ print('error: Launching', args, ':', e, file=sys.stderr) - raise e - (stdout, stderr) = proc.communicate() - if proc.returncode and not options.verbose: - print_command(sys.stderr, args) -- sys.stderr.write(stdout) -+ sys.stderr.write(stdout.decode("utf-8")) - sys.stderr.flush() - if proc.returncode: - return proc.returncode -diff --git a/config/expandlibs_gen.py b/config/expandlibs_gen.py -index b1de63cd0..dc62bd184 100644 ---- a/config/expandlibs_gen.py -+++ b/config/expandlibs_gen.py -@@ -5,7 +5,7 @@ - '''Given a list of object files and library names, prints a library - descriptor to standard output''' - --from __future__ import with_statement -+ - import sys - import os - import expandlibs_config as conf -@@ -38,4 +38,4 @@ if __name__ == '__main__': - - ensureParentDir(options.output) - with open(options.output, 'w') as outfile: -- print >>outfile, generate(args) -+ print(generate(args), file=outfile) -diff --git a/configure.py b/configure.py -index 771e34e38..bee329d7c 100644 ---- a/configure.py -+++ b/configure.py -@@ -2,10 +2,11 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import print_function, unicode_literals -+ - - import codecs - import itertools -+import logging - import os - import sys - import textwrap -@@ -34,7 +35,9 @@ from mozbuild.util import ( - def main(argv): - config = {} - sandbox = ConfigureSandbox(config, os.environ, argv) -+ print('sandbox.run started') - sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure')) -+ print('sandbox.run finished') - - if sandbox._help: - return 0 -@@ -56,12 +59,21 @@ def config_status(config): - - sanitized_config = {} - sanitized_config['substs'] = { -- k: sanitized_bools(v) for k, v in config.iteritems() -+ k: sanitized_bools(v) for k, v in config.items() - if k not in ('DEFINES', 'non_global_defines', 'TOPSRCDIR', 'TOPOBJDIR', - 'ALL_CONFIGURE_PATHS') - } -+ -+ # Hack around OptionValue entries unknown during compile -+ for opt in ('BUILD_BACKENDS', 'MOZ_UI_LOCALE', 'RUSTFLAGS' ): -+ old = sanitized_config['substs'][opt] -+ new = [] -+ for setting in old: -+ new.append(setting) -+ sanitized_config['substs'][opt] = new -+ - sanitized_config['defines'] = { -- k: sanitized_bools(v) for k, v in config['DEFINES'].iteritems() -+ k: sanitized_bools(v) for k, v in config['DEFINES'].items() - } - sanitized_config['non_global_defines'] = config['non_global_defines'] - sanitized_config['topsrcdir'] = config['TOPSRCDIR'] -@@ -71,20 +83,17 @@ def config_status(config): - # Create config.status. Eventually, we'll want to just do the work it does - # here, when we're able to skip configure tests/use cached results/not rely - # on autoconf. -- print("Creating config.status", file=sys.stderr) -- encoding = 'mbcs' if sys.platform == 'win32' else 'utf-8' -- with codecs.open('config.status', 'w', encoding) as fh: -+ logging.getLogger('moz.configure').info('Creating config.status') -+ with codecs.open('config.status', 'w', 'utf-8') as fh: - fh.write(textwrap.dedent('''\ - #!%(python)s -- # coding=%(encoding)s -- from __future__ import unicode_literals -- from mozbuild.util import encode -- encoding = '%(encoding)s' -- ''') % {'python': config['PYTHON'], 'encoding': encoding}) -+ # coding=utf-8 -+ print("config.status started") -+ ''') % {'python': config['PYTHON']}) - # A lot of the build backend code is currently expecting byte - # strings and breaks in subtle ways with unicode strings. (bug 1296508) -- for k, v in sanitized_config.iteritems(): -- fh.write('%s = encode(%s, encoding)\n' % (k, indented_repr(v))) -+ for k, v in sanitized_config.items(): -+ fh.write('%s = %s\n' % (k, indented_repr(v))) - fh.write("__all__ = ['topobjdir', 'topsrcdir', 'defines', " - "'non_global_defines', 'substs', 'mozconfig']") - -@@ -97,6 +106,9 @@ def config_status(config): - args = dict([(name, globals()[name]) for name in __all__]) - config_status(**args) - ''')) -+ fh.write(textwrap.dedent(''' -+ print("config.status finished") -+ ''')) - - partial_config = PartialConfigEnvironment(config['TOPOBJDIR']) - partial_config.write_vars(sanitized_config) -@@ -116,7 +128,7 @@ def config_status(config): - # executable permissions. - os.chmod('config.status', 0o755) - if config.get('MOZ_BUILD_APP') != 'js' or config.get('JS_STANDALONE'): -- os.environ[b'WRITE_MOZINFO'] = b'1' -+ os.environ['WRITE_MOZINFO'] = '1' - from mozbuild.config_status import config_status - - # Some values in sanitized_config also have more complex types, such as -@@ -127,7 +139,7 @@ def config_status(config): - - # A lot of the build backend code is currently expecting byte strings - # and breaks in subtle ways with unicode strings. -- return config_status(args=[], **encode(sanitized_config, encoding)) -+ return config_status(args=[], **sanitized_config) - return 0 - - -diff --git a/js/src/build/moz.build b/js/src/build/moz.build -index a7f5fa4ce..856cae32d 100644 ---- a/js/src/build/moz.build -+++ b/js/src/build/moz.build -@@ -47,22 +47,22 @@ USE_LIBS += [ - 'zlib', - ] - --if CONFIG['OS_ARCH'] not in ('WINNT', 'HP-UX'): -+if str(CONFIG['OS_ARCH']) not in ('WINNT', 'HP-UX'): - OS_LIBS += [ - 'm', - ] - --if CONFIG['OS_ARCH'] == 'FreeBSD': -+if str(CONFIG['OS_ARCH']) == 'FreeBSD': - OS_LIBS += [ - '-pthread', - ] - --if CONFIG['OS_ARCH'] == 'Linux': -+if str(CONFIG['OS_ARCH']) == 'Linux': - OS_LIBS += [ - 'dl', - ] - --if CONFIG['OS_ARCH'] == 'SunOS': -+if str(CONFIG['OS_ARCH']) == 'SunOS': - OS_LIBS += [ - 'posix4', - 'dl', -diff --git a/js/src/builtin/embedjs.py b/js/src/builtin/embedjs.py -index ba25e71c1..d4f2de122 100644 ---- a/js/src/builtin/embedjs.py -+++ b/js/src/builtin/embedjs.py -@@ -36,7 +36,7 @@ - # - # It uses the C preprocessor to process its inputs. - --from __future__ import with_statement -+ - import re, sys, os, subprocess - import shlex - import which -@@ -52,8 +52,8 @@ def ToCAsciiArray(lines): - - def ToCArray(lines): - result = [] -- for chr in lines: -- result.append(str(ord(chr))) -+ for char in lines: -+ result.append("0x%0.2X" % char) - return ", ".join(result) - - HEADER_TEMPLATE = """\ -@@ -87,7 +87,7 @@ def embed(cxx, preprocessorOption, cppflags, msgs, sources, c_out, js_out, names - - js_out.write(processed) - import zlib -- compressed = zlib.compress(processed) -+ compressed = zlib.compress(processed.encode('utf-8')) - data = ToCArray(compressed) - c_out.write(HEADER_TEMPLATE % { - 'sources_type': 'unsigned char', -@@ -107,7 +107,7 @@ def preprocess(cxx, preprocessorOption, source, args = []): - tmpOut = 'self-hosting-preprocessed.pp'; - outputArg = shlex.split(preprocessorOption + tmpOut) - -- with open(tmpIn, 'wb') as input: -+ with open(tmpIn, 'w') as input: - input.write(source) - print(' '.join(cxx + outputArg + args + [tmpIn])) - result = subprocess.Popen(cxx + outputArg + args + [tmpIn]).wait() -diff --git a/js/src/configure b/js/src/configure -index 3b3a39af3..8f5ea41d0 100755 ---- a/js/src/configure -+++ b/js/src/configure -@@ -24,4 +24,4 @@ export OLD_CONFIGURE="$SRCDIR"/old-configure - - set -- "$@" --enable-project=js - --which python2.7 > /dev/null && exec python2.7 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@" -+which python3 > /dev/null && exec python3 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@" -diff --git a/js/src/frontend/GenerateReservedWords.py b/js/src/frontend/GenerateReservedWords.py -index 3aa2307b9..381c8e2b4 100644 ---- a/js/src/frontend/GenerateReservedWords.py -+++ b/js/src/frontend/GenerateReservedWords.py -@@ -80,14 +80,14 @@ def split_list_per_column(reserved_word_list, column): - per_column = column_dict.setdefault(word[column], []) - per_column.append(item) - -- return sorted(column_dict.items(), key=lambda (char, word): ord(char)) -+ return sorted(list(column_dict.items()), key=lambda char_word: ord(char_word[0])) - - def generate_letter_switch(opt, unprocessed_columns, reserved_word_list, - columns=None): - assert(len(reserved_word_list) != 0); - - if not columns: -- columns = range(0, unprocessed_columns) -+ columns = list(range(0, unprocessed_columns)) - - if len(reserved_word_list) == 1: - index, word = reserved_word_list[0] -@@ -161,7 +161,7 @@ def split_list_per_length(reserved_word_list): - per_length = length_dict.setdefault(len(word), []) - per_length.append(item) - -- return sorted(length_dict.items(), key=lambda (length, word): length) -+ return sorted(list(length_dict.items()), key=lambda length_word: length_word[0]) - - def generate_switch(opt, reserved_word_list): - assert(len(reserved_word_list) != 0); -diff --git a/js/src/gc/GenerateStatsPhases.py b/js/src/gc/GenerateStatsPhases.py -index 2daf83555..e39a26a4b 100644 ---- a/js/src/gc/GenerateStatsPhases.py -+++ b/js/src/gc/GenerateStatsPhases.py -@@ -267,7 +267,7 @@ def generateHeader(out): - # - # Generate PhaseKind enum. - # -- phaseKindNames = map(lambda phaseKind: phaseKind.name, AllPhaseKinds) -+ phaseKindNames = [phaseKind.name for phaseKind in AllPhaseKinds] - extraPhaseKinds = [ - "NONE = LIMIT", - "EXPLICIT_SUSPENSION = LIMIT", -@@ -279,7 +279,7 @@ def generateHeader(out): - # - # Generate Phase enum. - # -- phaseNames = map(lambda phase: phase.name, AllPhases) -+ phaseNames = [phase.name for phase in AllPhases] - extraPhases = [ - "NONE = LIMIT", - "EXPLICIT_SUSPENSION = LIMIT", -diff --git a/js/src/old-configure.in b/js/src/old-configure.in -index 11c3d5a2e..389265404 100644 ---- a/js/src/old-configure.in -+++ b/js/src/old-configure.in -@@ -1884,3 +1884,5 @@ if test "$JS_STANDALONE"; then - fi - - rm -fr confdefs* $ac_clean_files -+echo confdefs* $ac_clean_files removed -+echo "old-configure done" -diff --git a/memory/build/moz.build b/memory/build/moz.build -index e2c715271..f09ce7935 100644 ---- a/memory/build/moz.build -+++ b/memory/build/moz.build -@@ -30,7 +30,7 @@ else: - 'fallback.cpp', - ] - --if CONFIG['OS_TARGET'] == 'Darwin' and (CONFIG['MOZ_REPLACE_MALLOC'] or -+if str(CONFIG['OS_TARGET']) == 'Darwin' and (CONFIG['MOZ_REPLACE_MALLOC'] or - CONFIG['MOZ_MEMORY']): - SOURCES += [ - 'zone.c', -@@ -38,15 +38,15 @@ if CONFIG['OS_TARGET'] == 'Darwin' and (CONFIG['MOZ_REPLACE_MALLOC'] or - - Library('memory') - --if CONFIG['OS_TARGET'] == 'Android' and CONFIG['CC_TYPE'] == 'clang': -+if str(CONFIG['OS_TARGET']) == 'Android' and str(CONFIG['CC_TYPE']) == 'clang': - CXXFLAGS += [ - '-Wno-tautological-pointer-compare', - ] - --if CONFIG['MOZ_BUILD_APP'] != 'memory': -+if str(CONFIG['MOZ_BUILD_APP']) != 'memory': - FINAL_LIBRARY = 'mozglue' - --if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'): -+if str(CONFIG['CC_TYPE']) in ('msvc', 'clang-cl'): - CXXFLAGS += ['-wd4273'] # inconsistent dll linkage (bug 558163) - - if CONFIG['MOZ_REPLACE_MALLOC_STATIC']: -diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build -index 53758485a..5e9308802 100644 ---- a/mozglue/build/moz.build -+++ b/mozglue/build/moz.build -@@ -9,12 +9,12 @@ - # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in - if CONFIG['JS_STANDALONE'] and not CONFIG['MOZ_MEMORY']: - Library('mozglue') --elif CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'): -+elif str(CONFIG['OS_TARGET']) in ('WINNT', 'Darwin', 'Android'): - SharedLibrary('mozglue') - else: - Library('mozglue') - --if CONFIG['OS_TARGET'] == 'Android': -+if str(CONFIG['OS_TARGET']) == 'Android': - SOURCES += [ - 'BionicGlue.cpp', - ] -@@ -24,14 +24,14 @@ if CONFIG['MOZ_ASAN']: - 'AsanOptions.cpp', - ] - --if CONFIG['OS_TARGET'] == 'WINNT': -+if str(CONFIG['OS_TARGET']) == 'WINNT': - DEFFILE = 'mozglue.def' - # We'll break the DLL blocklist if we immediately load user32.dll - DELAYLOAD_DLLS += [ - 'user32.dll', - ] - -- if CONFIG['CC_TYPE'] == "msvc": -+ if str(CONFIG['CC_TYPE']) == "msvc": - CFLAGS += ['-guard:cf'] - CXXFLAGS += ['-guard:cf'] - LDFLAGS += ['-guard:cf'] -@@ -48,12 +48,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT']: - 'dummy.cpp', - ] - -- if CONFIG['OS_TARGET'] == 'WINNT': -+ if str(CONFIG['OS_TARGET']) == 'WINNT': - LOCAL_INCLUDES += [ - '/memory/build', - ] - -- if CONFIG['CC_TYPE'] == "msvc": -+ if str(CONFIG['CC_TYPE']) == "msvc": - SOURCES += ['WindowsCFGStatus.cpp'] - SOURCES += [ - 'Authenticode.cpp', -@@ -85,17 +85,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT']: - 'WindowsDllBlocklist.h', - ] - -- if CONFIG['CPU_ARCH'].startswith('x86'): -+ if str(CONFIG['CPU_ARCH']).startswith('x86'): - SOURCES += [ - 'SSE.cpp', - ] - -- if CONFIG['CPU_ARCH'] == 'arm': -+ if str(CONFIG['CPU_ARCH']) == 'arm': - SOURCES += [ - 'arm.cpp', - ] - -- if CONFIG['CPU_ARCH'].startswith('mips'): -+ if str(CONFIG['CPU_ARCH']).startswith('mips'): - SOURCES += [ - 'mips.cpp', - ] -@@ -114,7 +114,7 @@ LIBRARY_DEFINES['MOZ_HAS_MOZGLUE'] = True - - LDFLAGS += CONFIG['MOZ_GLUE_WRAP_LDFLAGS'] - --if CONFIG['OS_TARGET'] == 'Darwin': -+if str(CONFIG['OS_TARGET']) == 'Darwin': - # On OSX 10.10.3, a dead lock happens in some cases involving dynamic - # symbol resolution for symbols that jemalloc itself uses. While it - # might be possible to find a way to avoid all such symbol resolutions, -@@ -124,7 +124,7 @@ if CONFIG['OS_TARGET'] == 'Darwin': - # for TLS. - LDFLAGS += ['-Wl,-bind_at_load'] - --if CONFIG['MOZ_LINKER'] and CONFIG['TARGET_CPU'] == 'arm': -+if CONFIG['MOZ_LINKER'] and str(CONFIG['TARGET_CPU']) == 'arm': - LDFLAGS += ['-Wl,-version-script,%s/arm-eabi-filter' % SRCDIR] - - DIST_INSTALL = True -diff --git a/python/mozbuild/mozbuild/action/check_binary.py b/python/mozbuild/mozbuild/action/check_binary.py -index 5665ef053..b696f73d6 100644 ---- a/python/mozbuild/mozbuild/action/check_binary.py -+++ b/python/mozbuild/mozbuild/action/check_binary.py -@@ -104,6 +104,8 @@ def iter_readelf_symbols(target, binary): - - def iter_readelf_dynamic(target, binary): - for line in get_output(target['readelf'], '-d', binary): -+ if isinstance(line, bytes): -+ line=line.decode('utf-8') - data = line.split(None, 2) - if data and len(data) == 3 and data[0].startswith('0x'): - yield data[1].rstrip(')').lstrip('('), data[2] -diff --git a/python/mozbuild/mozbuild/action/process_define_files.py b/python/mozbuild/mozbuild/action/process_define_files.py -index 563fbb8fa..c3df2869b 100644 ---- a/python/mozbuild/mozbuild/action/process_define_files.py -+++ b/python/mozbuild/mozbuild/action/process_define_files.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -+ - - import argparse - import os -@@ -53,7 +53,7 @@ def process_define_file(output, input): - 'CONFIGURE_DEFINE_FILE') - defines = '\n'.join(sorted( - '#define %s %s' % (name, val) -- for name, val in config.defines['ALLDEFINES'].iteritems())) -+ for name, val in config.defines['ALLDEFINES'].items())) - l = l[:m.start('cmd') - 1] \ - + defines + l[m.end('name'):] - elif cmd == 'define': -diff --git a/python/mozbuild/mozbuild/backend/base.py b/python/mozbuild/mozbuild/backend/base.py -index a8d5c94e0..7cda63475 100644 ---- a/python/mozbuild/mozbuild/backend/base.py -+++ b/python/mozbuild/mozbuild/backend/base.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, unicode_literals -+ - - from abc import ( - ABCMeta, -@@ -31,7 +31,7 @@ from .configenvironment import ConfigEnvironment - from mozbuild.base import ExecutionSummary - - --class BuildBackend(LoggingMixin): -+class BuildBackend(LoggingMixin, metaclass=ABCMeta): - """Abstract base class for build backends. - - A build backend is merely a consumer of the build configuration (the output -@@ -39,8 +39,6 @@ class BuildBackend(LoggingMixin): - is the discretion of the specific implementation. - """ - -- __metaclass__ = ABCMeta -- - def __init__(self, environment): - assert isinstance(environment, (ConfigEnvironment, EmptyConfig)) - self.populate_logger() -@@ -311,7 +309,7 @@ class BuildBackend(LoggingMixin): - srcdir = mozpath.dirname(obj.input_path) - pp.context.update({ - k: ' '.join(v) if isinstance(v, list) else v -- for k, v in obj.config.substs.iteritems() -+ for k, v in obj.config.substs.items() - }) - pp.context.update( - top_srcdir=obj.topsrcdir, -diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbuild/backend/common.py -index d00cbbcaf..f747df446 100644 ---- a/python/mozbuild/mozbuild/backend/common.py -+++ b/python/mozbuild/mozbuild/backend/common.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, unicode_literals -+ - - import json - import os -@@ -174,7 +174,7 @@ class CommonBackend(BuildBackend): - if len(self._idl_manager.idls): - self._write_rust_xpidl_summary(self._idl_manager) - self._handle_idl_manager(self._idl_manager) -- self._handle_generated_sources(mozpath.join(self.environment.topobjdir, 'dist/include/%s.h' % idl['root']) for idl in self._idl_manager.idls.values()) -+ self._handle_generated_sources(mozpath.join(self.environment.topobjdir, 'dist/include/%s.h' % idl['root']) for idl in list(self._idl_manager.idls.values())) - - - for config in self._configs: -@@ -372,14 +372,14 @@ class CommonBackend(BuildBackend): - - with self._write_file(mozpath.join(topobjdir, 'dist', 'xpcrs', 'rt', 'all.rs')) as fh: - fh.write("// THIS FILE IS GENERATED - DO NOT EDIT\n\n") -- for idl in manager.idls.values(): -+ for idl in list(manager.idls.values()): - fh.write(include_tmpl % ("rt", idl['root'])) - fh.write(";\n") - - with self._write_file(mozpath.join(topobjdir, 'dist', 'xpcrs', 'bt', 'all.rs')) as fh: - fh.write("// THIS FILE IS GENERATED - DO NOT EDIT\n\n") - fh.write("&[\n") -- for idl in manager.idls.values(): -+ for idl in list(manager.idls.values()): - fh.write(include_tmpl % ("bt", idl['root'])) - fh.write(",\n") - fh.write("]\n") -diff --git a/python/mozbuild/mozbuild/backend/configenvironment.py b/python/mozbuild/mozbuild/backend/configenvironment.py -index 3676a7d18..f0896cea4 100644 ---- a/python/mozbuild/mozbuild/backend/configenvironment.py -+++ b/python/mozbuild/mozbuild/backend/configenvironment.py -@@ -2,14 +2,14 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import -+ - - import os - import sys - import json - - from collections import Iterable, OrderedDict --from types import StringTypes, ModuleType -+from types import ModuleType - - import mozpack.path as mozpath - -@@ -22,7 +22,7 @@ from mozbuild.shellutil import quote as shell_quote - - - if sys.version_info.major == 2: -- text_type = unicode -+ text_type = str - else: - text_type = str - -@@ -151,7 +151,7 @@ class ConfigEnvironment(object): - shell_quote(self.defines[name]).replace('$', '$$')) - for name in sorted(global_defines)]) - def serialize(name, obj): -- if isinstance(obj, StringTypes): -+ if isinstance(obj, str): - return obj - if isinstance(obj, Iterable): - return ' '.join(obj) -@@ -185,8 +185,8 @@ class ConfigEnvironment(object): - except UnicodeDecodeError: - return v.decode('utf-8', 'replace') - -- for k, v in self.substs.items(): -- if not isinstance(v, StringTypes): -+ for k, v in list(self.substs.items()): -+ if not isinstance(v, str): - if isinstance(v, Iterable): - type(v)(decode(i) for i in v) - elif not isinstance(v, text_type): -@@ -255,7 +255,7 @@ class PartialConfigDict(object): - existing_files = self._load_config_track() - - new_files = set() -- for k, v in values.iteritems(): -+ for k, v in values.items(): - new_files.add(self._write_file(k, v)) - - for filename in existing_files - new_files: -diff --git a/python/mozbuild/mozbuild/backend/fastermake.py b/python/mozbuild/mozbuild/backend/fastermake.py -index b029aa10f..b66ade64f 100644 ---- a/python/mozbuild/mozbuild/backend/fastermake.py -+++ b/python/mozbuild/mozbuild/backend/fastermake.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, unicode_literals, print_function -+ - - from mozbuild.backend.base import PartialBackend - from mozbuild.backend.common import CommonBackend -@@ -140,7 +140,7 @@ class FasterMakeBackend(CommonBackend, PartialBackend): - # Add information for chrome manifest generation - manifest_targets = [] - -- for target, entries in self._manifest_entries.iteritems(): -+ for target, entries in self._manifest_entries.items(): - manifest_targets.append(target) - install_target = mozpath.basedir(target, install_manifests_bases) - self._install_manifests[install_target].add_content( -@@ -152,13 +152,13 @@ class FasterMakeBackend(CommonBackend, PartialBackend): - % ' '.join(self._install_manifests.keys())) - - # Add dependencies we infered: -- for target, deps in self._dependencies.iteritems(): -+ for target, deps in self._dependencies.items(): - mk.create_rule([target]).add_dependencies( - '$(TOPOBJDIR)/%s' % d for d in deps) - - mk.add_statement('include $(TOPSRCDIR)/config/faster/rules.mk') - -- for base, install_manifest in self._install_manifests.iteritems(): -+ for base, install_manifest in self._install_manifests.items(): - with self._write_file( - mozpath.join(self.environment.topobjdir, 'faster', - 'install_%s' % base.replace('/', '_'))) as fh: -@@ -167,7 +167,7 @@ class FasterMakeBackend(CommonBackend, PartialBackend): - # For artifact builds only, write a single unified manifest for consumption by |mach watch|. - if self.environment.is_artifact_build: - unified_manifest = InstallManifest() -- for base, install_manifest in self._install_manifests.iteritems(): -+ for base, install_manifest in self._install_manifests.items(): - # Expect 'dist/bin/**', which includes 'dist/bin' with no trailing slash. - assert base.startswith('dist/bin') - base = base[len('dist/bin'):] -diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py -index dd9020d62..aa89cc297 100644 ---- a/python/mozbuild/mozbuild/backend/recursivemake.py -+++ b/python/mozbuild/mozbuild/backend/recursivemake.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, unicode_literals -+ - - import logging - import os -@@ -12,7 +12,7 @@ from collections import ( - defaultdict, - namedtuple, - ) --from StringIO import StringIO -+from io import StringIO - from itertools import chain - - from mozpack.manifests import ( -@@ -80,75 +80,76 @@ from ..util import ( - ) - from ..makeutil import Makefile - from mozbuild.shellutil import quote as shell_quote -+from functools import reduce - - MOZBUILD_VARIABLES = [ -- b'ASFLAGS', -- b'CMSRCS', -- b'CMMSRCS', -- b'CPP_UNIT_TESTS', -- b'DIRS', -- b'DIST_INSTALL', -- b'EXTRA_DSO_LDOPTS', -- b'EXTRA_JS_MODULES', -- b'EXTRA_PP_COMPONENTS', -- b'EXTRA_PP_JS_MODULES', -- b'FORCE_SHARED_LIB', -- b'FORCE_STATIC_LIB', -- b'FINAL_LIBRARY', -- b'HOST_CFLAGS', -- b'HOST_CSRCS', -- b'HOST_CMMSRCS', -- b'HOST_CXXFLAGS', -- b'HOST_EXTRA_LIBS', -- b'HOST_LIBRARY_NAME', -- b'HOST_PROGRAM', -- b'HOST_SIMPLE_PROGRAMS', -- b'JAR_MANIFEST', -- b'JAVA_JAR_TARGETS', -- b'LIBRARY_NAME', -- b'LIBS', -- b'MAKE_FRAMEWORK', -- b'MODULE', -- b'NO_DIST_INSTALL', -- b'NO_EXPAND_LIBS', -- b'NO_INTERFACES_MANIFEST', -- b'NO_JS_MANIFEST', -- b'OS_LIBS', -- b'PARALLEL_DIRS', -- b'PREF_JS_EXPORTS', -- b'PROGRAM', -- b'RESOURCE_FILES', -- b'SHARED_LIBRARY_LIBS', -- b'SHARED_LIBRARY_NAME', -- b'SIMPLE_PROGRAMS', -- b'SONAME', -- b'STATIC_LIBRARY_NAME', -- b'TEST_DIRS', -- b'TOOL_DIRS', -+ 'ASFLAGS', -+ 'CMSRCS', -+ 'CMMSRCS', -+ 'CPP_UNIT_TESTS', -+ 'DIRS', -+ 'DIST_INSTALL', -+ 'EXTRA_DSO_LDOPTS', -+ 'EXTRA_JS_MODULES', -+ 'EXTRA_PP_COMPONENTS', -+ 'EXTRA_PP_JS_MODULES', -+ 'FORCE_SHARED_LIB', -+ 'FORCE_STATIC_LIB', -+ 'FINAL_LIBRARY', -+ 'HOST_CFLAGS', -+ 'HOST_CSRCS', -+ 'HOST_CMMSRCS', -+ 'HOST_CXXFLAGS', -+ 'HOST_EXTRA_LIBS', -+ 'HOST_LIBRARY_NAME', -+ 'HOST_PROGRAM', -+ 'HOST_SIMPLE_PROGRAMS', -+ 'JAR_MANIFEST', -+ 'JAVA_JAR_TARGETS', -+ 'LIBRARY_NAME', -+ 'LIBS', -+ 'MAKE_FRAMEWORK', -+ 'MODULE', -+ 'NO_DIST_INSTALL', -+ 'NO_EXPAND_LIBS', -+ 'NO_INTERFACES_MANIFEST', -+ 'NO_JS_MANIFEST', -+ 'OS_LIBS', -+ 'PARALLEL_DIRS', -+ 'PREF_JS_EXPORTS', -+ 'PROGRAM', -+ 'RESOURCE_FILES', -+ 'SHARED_LIBRARY_LIBS', -+ 'SHARED_LIBRARY_NAME', -+ 'SIMPLE_PROGRAMS', -+ 'SONAME', -+ 'STATIC_LIBRARY_NAME', -+ 'TEST_DIRS', -+ 'TOOL_DIRS', - # XXX config/Makefile.in specifies this in a make invocation - #'USE_EXTENSION_MANIFEST', -- b'XPCSHELL_TESTS', -- b'XPIDL_MODULE', -+ 'XPCSHELL_TESTS', -+ 'XPIDL_MODULE', - ] - - DEPRECATED_VARIABLES = [ -- b'EXPORT_LIBRARY', -- b'EXTRA_LIBS', -- b'HOST_LIBS', -- b'LIBXUL_LIBRARY', -- b'MOCHITEST_A11Y_FILES', -- b'MOCHITEST_BROWSER_FILES', -- b'MOCHITEST_BROWSER_FILES_PARTS', -- b'MOCHITEST_CHROME_FILES', -- b'MOCHITEST_FILES', -- b'MOCHITEST_FILES_PARTS', -- b'MOCHITEST_METRO_FILES', -- b'MOCHITEST_ROBOCOP_FILES', -- b'MODULE_OPTIMIZE_FLAGS', -- b'MOZ_CHROME_FILE_FORMAT', -- b'SHORT_LIBNAME', -- b'TESTING_JS_MODULES', -- b'TESTING_JS_MODULE_DIR', -+ 'EXPORT_LIBRARY', -+ 'EXTRA_LIBS', -+ 'HOST_LIBS', -+ 'LIBXUL_LIBRARY', -+ 'MOCHITEST_A11Y_FILES', -+ 'MOCHITEST_BROWSER_FILES', -+ 'MOCHITEST_BROWSER_FILES_PARTS', -+ 'MOCHITEST_CHROME_FILES', -+ 'MOCHITEST_FILES', -+ 'MOCHITEST_FILES_PARTS', -+ 'MOCHITEST_METRO_FILES', -+ 'MOCHITEST_ROBOCOP_FILES', -+ 'MODULE_OPTIMIZE_FLAGS', -+ 'MOZ_CHROME_FILE_FORMAT', -+ 'SHORT_LIBNAME', -+ 'TESTING_JS_MODULES', -+ 'TESTING_JS_MODULE_DIR', - ] - - MOZBUILD_VARIABLES_MESSAGE = 'It should only be defined in moz.build files.' -@@ -207,7 +208,7 @@ class BackendMakeFile(object): - self.fh.write(buf) - - def write_once(self, buf): -- if isinstance(buf, unicode): -+ if isinstance(buf, str): - buf = buf.encode('utf-8') - if b'\n' + buf not in self.fh.getvalue(): - self.write(buf) -@@ -280,7 +281,7 @@ class RecursiveMakeTraversal(object): - Helper function to call a filter from compute_dependencies and - traverse. - """ -- return filter(current, self.get_subdirs(current)) -+ return list(filter(current, self.get_subdirs(current))) - - def compute_dependencies(self, filter=None): - """ -@@ -710,7 +711,7 @@ class RecursiveMakeBackend(CommonBackend): - convenience variables, and the other dependency definitions for a - hopefully proper directory traversal. - """ -- for tier, no_skip in self._no_skip.items(): -+ for tier, no_skip in list(self._no_skip.items()): - self.log(logging.DEBUG, 'fill_root_mk', { - 'number': len(no_skip), 'tier': tier - }, 'Using {number} directories during {tier}') -@@ -757,7 +758,7 @@ class RecursiveMakeBackend(CommonBackend): - for tier, filter in filters: - main, all_deps = \ - self._traversal.compute_dependencies(filter) -- for dir, deps in all_deps.items(): -+ for dir, deps in list(all_deps.items()): - if deps is not None or (dir in self._idl_dirs \ - and tier == 'export'): - rule = root_deps_mk.create_rule(['%s/%s' % (dir, tier)]) -@@ -770,7 +771,7 @@ class RecursiveMakeBackend(CommonBackend): - rule.add_dependencies('%s/%s' % (d, tier) for d in main) - - all_compile_deps = reduce(lambda x,y: x|y, -- self._compile_graph.values()) if self._compile_graph else set() -+ list(self._compile_graph.values())) if self._compile_graph else set() - # Include the following as dependencies of the top recursion target for - # compilation: - # - nodes that are not dependended upon by anything. Typically, this -@@ -783,7 +784,7 @@ class RecursiveMakeBackend(CommonBackend): - # as direct dependencies of the top recursion target, to somehow - # prioritize them. - # 1. See bug 1262241 comment 5. -- compile_roots = [t for t, deps in self._compile_graph.iteritems() -+ compile_roots = [t for t, deps in list(self._compile_graph.items()) - if not deps or t not in all_compile_deps] - - rule = root_deps_mk.create_rule(['recurse_compile']) -@@ -845,14 +846,14 @@ class RecursiveMakeBackend(CommonBackend): - rule.add_dependencies(['$(CURDIR)/%: %']) - - def _check_blacklisted_variables(self, makefile_in, makefile_content): -- if b'EXTERNALLY_MANAGED_MAKE_FILE' in makefile_content: -+ if 'EXTERNALLY_MANAGED_MAKE_FILE' in makefile_content: - # Bypass the variable restrictions for externally managed makefiles. - return - - for l in makefile_content.splitlines(): - l = l.strip() - # Don't check comments -- if l.startswith(b'#'): -+ if l.startswith('#'): - continue - for x in chain(MOZBUILD_VARIABLES, DEPRECATED_VARIABLES): - if x not in l: -@@ -909,11 +910,11 @@ class RecursiveMakeBackend(CommonBackend): - # Directories with a Makefile containing a tools target, or - # XPI_PKGNAME or INSTALL_EXTENSION_ID can't be skipped and - # must run during the 'tools' tier. -- for t in (b'XPI_PKGNAME', b'INSTALL_EXTENSION_ID', -- b'tools'): -+ for t in ('XPI_PKGNAME', 'INSTALL_EXTENSION_ID', -+ 'tools'): - if t not in content: - continue -- if t == b'tools' and not re.search('(?:^|\s)tools.*::', content, re.M): -+ if t == 'tools' and not re.search('(?:^|\s)tools.*::', content, re.M): - continue - if objdir == self.environment.topobjdir: - continue -@@ -933,7 +934,7 @@ class RecursiveMakeBackend(CommonBackend): - self._fill_root_mk() - - # Make the master test manifest files. -- for flavor, t in self._test_manifests.items(): -+ for flavor, t in list(self._test_manifests.items()): - install_prefix, manifests = t - manifest_stem = mozpath.join(install_prefix, '%s.ini' % flavor) - self._write_master_test_manifest(mozpath.join( -@@ -1039,7 +1040,7 @@ class RecursiveMakeBackend(CommonBackend): - for p in ('Makefile', 'backend.mk', '.deps/.mkdir.done'): - build_files.add_optional_exists(p) - -- for idl in manager.idls.values(): -+ for idl in list(manager.idls.values()): - self._install_manifests['dist_idl'].add_link(idl['source'], - idl['basename']) - self._install_manifests['dist_include'].add_optional_exists('%s.h' -@@ -1086,7 +1087,7 @@ class RecursiveMakeBackend(CommonBackend): - - interfaces_manifests = [] - dist_dir = mozpath.join(self.environment.topobjdir, 'dist') -- for manifest, entries in manager.interface_manifests.items(): -+ for manifest, entries in list(manager.interface_manifests.items()): - interfaces_manifests.append(mozpath.join('$(DEPTH)', manifest)) - for xpt in sorted(entries): - registered_xpt_files.add(mozpath.join( -@@ -1194,7 +1195,7 @@ class RecursiveMakeBackend(CommonBackend): - # Don't allow files to be defined multiple times unless it is allowed. - # We currently allow duplicates for non-test files or test files if - # the manifest is listed as a duplicate. -- for source, (dest, is_test) in obj.installs.items(): -+ for source, (dest, is_test) in list(obj.installs.items()): - try: - self._install_manifests['_test_files'].add_link(source, dest) - except ValueError: -@@ -1558,7 +1559,7 @@ class RecursiveMakeBackend(CommonBackend): - man_dir = mozpath.join(self.environment.topobjdir, '_build_manifests', - dest) - -- for k, manifest in manifests.items(): -+ for k, manifest in list(manifests.items()): - with self._write_file(mozpath.join(man_dir, k)) as fh: - manifest.write(fileobj=fh) - -@@ -1593,20 +1594,20 @@ class RecursiveMakeBackend(CommonBackend): - pp.context.update(extra) - if not pp.context.get('autoconfmk', ''): - pp.context['autoconfmk'] = 'autoconf.mk' -- pp.handleLine(b'# THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT MODIFY BY HAND.\n'); -- pp.handleLine(b'DEPTH := @DEPTH@\n') -- pp.handleLine(b'topobjdir := @topobjdir@\n') -- pp.handleLine(b'topsrcdir := @top_srcdir@\n') -- pp.handleLine(b'srcdir := @srcdir@\n') -- pp.handleLine(b'VPATH := @srcdir@\n') -- pp.handleLine(b'relativesrcdir := @relativesrcdir@\n') -- pp.handleLine(b'include $(DEPTH)/config/@autoconfmk@\n') -+ pp.handleLine('# THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT MODIFY BY HAND.\n'); -+ pp.handleLine('DEPTH := @DEPTH@\n') -+ pp.handleLine('topobjdir := @topobjdir@\n') -+ pp.handleLine('topsrcdir := @top_srcdir@\n') -+ pp.handleLine('srcdir := @srcdir@\n') -+ pp.handleLine('VPATH := @srcdir@\n') -+ pp.handleLine('relativesrcdir := @relativesrcdir@\n') -+ pp.handleLine('include $(DEPTH)/config/@autoconfmk@\n') - if not stub: - pp.do_include(obj.input_path) - # Empty line to avoid failures when last line in Makefile.in ends - # with a backslash. -- pp.handleLine(b'\n') -- pp.handleLine(b'include $(topsrcdir)/config/recurse.mk\n') -+ pp.handleLine('\n') -+ pp.handleLine('include $(topsrcdir)/config/recurse.mk\n') - if not stub: - # Adding the Makefile.in here has the desired side-effect - # that if the Makefile.in disappears, this will force -diff --git a/python/mozbuild/mozbuild/config_status.py b/python/mozbuild/mozbuild/config_status.py -index d46f1332d..a9a27a699 100644 ---- a/python/mozbuild/mozbuild/config_status.py -+++ b/python/mozbuild/mozbuild/config_status.py -@@ -77,6 +77,7 @@ def config_status(topobjdir='.', topsrcdir='.', defines=None, - See build/autoconf/config.status.m4. - ''' - -+ print("config_status started") - if 'CONFIG_FILES' in os.environ: - raise Exception('Using the CONFIG_FILES environment variable is not ' - 'supported.') -@@ -119,7 +120,7 @@ def config_status(topobjdir='.', topsrcdir='.', defines=None, - if 'WRITE_MOZINFO' in os.environ: - write_mozinfo(os.path.join(topobjdir, 'mozinfo.json'), env, os.environ) - -- cpu_start = time.clock() -+ cpu_start = time.perf_counter() - time_start = time.time() - - # Make appropriate backend instances, defaulting to RecursiveMakeBackend, -@@ -155,7 +156,7 @@ def config_status(topobjdir='.', topsrcdir='.', defines=None, - summary = obj.gyp_summary() - print(summary, file=sys.stderr) - -- cpu_time = time.clock() - cpu_start -+ cpu_time = time.perf_counter() - cpu_start - wall_time = time.time() - time_start - efficiency = cpu_time / wall_time if wall_time else 100 - untracked = wall_time - execution_time -@@ -179,3 +180,5 @@ def config_status(topobjdir='.', topsrcdir='.', defines=None, - # Advertise Android Studio if it is appropriate. - if MachCommandConditions.is_android(env): - print(ANDROID_IDE_ADVERTISEMENT) -+ -+ print("config_status finished") -diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py -index d03615707..13d623d4f 100644 ---- a/python/mozbuild/mozbuild/configure/__init__.py -+++ b/python/mozbuild/mozbuild/configure/__init__.py -@@ -2,9 +2,9 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals - --import __builtin__ -+ -+import builtins - import inspect - import logging - import os -@@ -38,6 +38,8 @@ from mozbuild.util import ( - - import mozpack.path as mozpath - -+import traceback -+ - - class ConfigureError(Exception): - pass -@@ -69,7 +71,7 @@ class SandboxDependsFunction(object): - def __getattr__(self, key): - return self._getattr(key).sandboxed - -- def __nonzero__(self): -+ def __bool__(self): - raise ConfigureError( - 'Cannot do boolean operations on @depends functions.') - -@@ -96,6 +98,7 @@ class DependsFunction(object): - sandbox._value_for(self) - elif not sandbox._help: - sandbox._execution_queue.append((sandbox._value_for, (self,))) -+ sandbox.tasks_debug_out("DependsFunction.__init %s" % func.__name__) - - @property - def name(self): -@@ -206,6 +209,15 @@ class CombinedDependsFunction(DependsFunction): - def __ne__(self, other): - return not self == other - -+ def __hash__(self): -+ # This was one was taken from [1] initially. Should not have done that: -+ # it causes explosion of ConfigureSandbox._execution_queue with 100% -+ # CPU load and eating all avaliable memory... -+ # -+ # [1] https://code.foxkit.us/adelie/packages/blob/f2b5773da19ab397fbe64fd32dacc383cfe4cd77/user/mozjs/python3.patch#L8068 -+ return hash((self._name, tuple(self.dependencies))) -+ -+ - class SandboxedGlobal(dict): - '''Identifiable dict type for use as function global''' - -@@ -253,11 +265,12 @@ class ConfigureSandbox(dict): - # The default set of builtins. We expose unicode as str to make sandboxed - # files more python3-ready. - BUILTINS = ReadOnlyDict({ -- b: getattr(__builtin__, b) -+ b: getattr(builtins, b) - for b in ('None', 'False', 'True', 'int', 'bool', 'any', 'all', 'len', - 'list', 'tuple', 'set', 'dict', 'isinstance', 'getattr', -- 'hasattr', 'enumerate', 'range', 'zip') -- }, __import__=forbidden_import, str=unicode) -+ 'hasattr', 'enumerate', 'range', 'zip', '__build_class__', -+ 'bytes', 'exec') -+ }, __import__=forbidden_import, str=str) - - # Expose a limited set of functions from os.path - OS = ReadOnlyNamespace(path=ReadOnlyNamespace(**{ -@@ -294,6 +307,11 @@ class ConfigureSandbox(dict): - # Queue of functions to execute, with their arguments - self._execution_queue = [] - -+ # For debugging: Show number of tasks started in run() / added elsewhere -+ # and some additional info -+ self.task_debug = False # set True to enable -+ self.tasks_started = 0 -+ - # Store the `when`s associated to some options. - self._conditions = {} - -@@ -331,7 +349,7 @@ class ConfigureSandbox(dict): - return method - def wrapped(*args, **kwargs): - out_args = [ -- arg.decode(encoding) if isinstance(arg, str) else arg -+ arg.decode(encoding) if isinstance(arg, bytes) else arg - for arg in args - ] - return method(*out_args, **kwargs) -@@ -360,6 +378,14 @@ class ConfigureSandbox(dict): - handler.setFormatter(formatter) - logger.addHandler(handler) - -+ def tasks_debug_out(self, text): -+ if self.task_debug: -+ print("%s / queued %i / done %i" %(text, len(self._execution_queue), self.tasks_started)) -+ #if len(self._execution_queue) > 5000: -+ # traceback.print_stack(file=sys.stdout) -+ #if len(self._execution_queue) > 5010: -+ # raise Exception("Too many tasks") -+ - def include_file(self, path): - '''Include one file in the sandbox. Users of this class probably want - to use `run` instead. -@@ -380,6 +406,9 @@ class ConfigureSandbox(dict): - if path in self._all_paths: - raise ConfigureError( - 'Cannot include `%s` because it was included already.' % path) -+ -+ if self.task_debug: -+ print("include_file", path) - self._paths.append(path) - self._all_paths.add(path) - -@@ -398,7 +427,7 @@ class ConfigureSandbox(dict): - if path: - self.include_file(path) - -- for option in self._options.itervalues(): -+ for option in self._options.values(): - # All options must be referenced by some @depends function - if option not in self._seen: - raise ConfigureError( -@@ -425,6 +454,8 @@ class ConfigureSandbox(dict): - - # Run the execution queue - for func, args in self._execution_queue: -+ self.tasks_started += 1 -+ self.tasks_debug_out("ConfigureSandbox.run(%s)" % func.__name__) - func(*args) - - if self._help: -@@ -504,7 +535,7 @@ class ConfigureSandbox(dict): - value = PositiveOptionValue() - elif value is False or value == (): - value = NegativeOptionValue() -- elif isinstance(value, types.StringTypes): -+ elif isinstance(value, (str,)): - value = PositiveOptionValue((value,)) - elif isinstance(value, tuple): - value = PositiveOptionValue(value) -@@ -544,7 +575,7 @@ class ConfigureSandbox(dict): - return value - - def _dependency(self, arg, callee_name, arg_name=None): -- if isinstance(arg, types.StringTypes): -+ if isinstance(arg, (str,)): - prefix, name, values = Option.split_option(arg) - if values != (): - raise ConfigureError("Option must not contain an '='") -@@ -608,7 +639,7 @@ class ConfigureSandbox(dict): - ''' - when = self._normalize_when(kwargs.get('when'), 'option') - args = [self._resolve(arg) for arg in args] -- kwargs = {k: self._resolve(v) for k, v in kwargs.iteritems() -+ kwargs = {k: self._resolve(v) for k, v in kwargs.items() - if k != 'when'} - option = Option(*args, **kwargs) - if when: -@@ -689,7 +720,7 @@ class ConfigureSandbox(dict): - with self.only_when_impl(when): - what = self._resolve(what) - if what: -- if not isinstance(what, types.StringTypes): -+ if not isinstance(what, (str,)): - raise TypeError("Unexpected type: '%s'" % type(what).__name__) - self.include_file(what) - -@@ -707,7 +738,7 @@ class ConfigureSandbox(dict): - (k[:-len('_impl')], getattr(self, k)) - for k in dir(self) if k.endswith('_impl') and k != 'template_impl' - ) -- glob.update((k, v) for k, v in self.iteritems() if k not in glob) -+ glob.update((k, v) for k, v in self.items() if k not in glob) - - # Any function argument to the template must be prepared to be sandboxed. - # If the template itself returns a function (in which case, it's very -@@ -731,7 +762,7 @@ class ConfigureSandbox(dict): - def wrapper(*args, **kwargs): - args = [maybe_prepare_function(arg) for arg in args] - kwargs = {k: maybe_prepare_function(v) -- for k, v in kwargs.iteritems()} -+ for k, v in kwargs.items()} - ret = template(*args, **kwargs) - if isfunction(ret): - # We can't expect the sandboxed code to think about all the -@@ -766,7 +797,7 @@ class ConfigureSandbox(dict): - for value, required in ( - (_import, True), (_from, False), (_as, False)): - -- if not isinstance(value, types.StringTypes) and ( -+ if not isinstance(value, (str,)) and ( - required or value is not None): - raise TypeError("Unexpected type: '%s'" % type(value).__name__) - if value is not None and not self.RE_MODULE.match(value): -@@ -807,7 +838,7 @@ class ConfigureSandbox(dict): - # Special case for the open() builtin, because otherwise, using it - # fails with "IOError: file() constructor not accessible in - # restricted mode" -- if what == '__builtin__.open': -+ if what == 'builtins.open': - return lambda *args, **kwargs: open(*args, **kwargs) - # Until this proves to be a performance problem, just construct an - # import statement and execute it. -@@ -829,7 +860,7 @@ class ConfigureSandbox(dict): - name = self._resolve(name, need_help_dependency=False) - if name is None: - return -- if not isinstance(name, types.StringTypes): -+ if not isinstance(name, (str,)): - raise TypeError("Unexpected type: '%s'" % type(name).__name__) - if name in data: - raise ConfigureError( -@@ -850,6 +881,7 @@ class ConfigureSandbox(dict): - - self._execution_queue.append(( - self._resolve_and_set, (self._config, name, value, when))) -+ self.tasks_debug_out("ConfigureSandbox.set_config_impl / %s(%s" % (name, value)) - - def set_define_impl(self, name, value, when=None): - '''Implementation of set_define(). -@@ -864,6 +896,7 @@ class ConfigureSandbox(dict): - defines = self._config.setdefault('DEFINES', {}) - self._execution_queue.append(( - self._resolve_and_set, (defines, name, value, when))) -+ self.tasks_debug_out("ConfigureSandbox.set_define_impl / %s(%s)" % (name, value)) - - def imply_option_impl(self, option, value, reason=None, when=None): - '''Implementation of imply_option(). -@@ -922,7 +955,7 @@ class ConfigureSandbox(dict): - if isinstance(possible_reasons[0], Option): - reason = possible_reasons[0] - if not reason and (isinstance(value, (bool, tuple)) or -- isinstance(value, types.StringTypes)): -+ isinstance(value, (str,))): - # A reason can be provided automatically when imply_option - # is called with an immediate value. - _, filename, line, _, _, _ = inspect.stack()[1] -@@ -955,10 +988,10 @@ class ConfigureSandbox(dict): - if not inspect.isfunction(func): - raise TypeError("Unexpected type: '%s'" % type(func).__name__) - if func in self._prepared_functions: -- return func, func.func_globals -+ return func, func.__globals__ - - glob = SandboxedGlobal( -- (k, v) for k, v in func.func_globals.iteritems() -+ (k, v) for k, v in func.__globals__.items() - if (inspect.isfunction(v) and v not in self._templates) or ( - inspect.isclass(v) and issubclass(v, Exception)) - ) -@@ -979,20 +1012,20 @@ class ConfigureSandbox(dict): - # Note this is not entirely bullet proof (if the value is e.g. a list, - # the list contents could have changed), but covers the bases. - closure = None -- if func.func_closure: -+ if func.__closure__: - def makecell(content): - def f(): - content -- return f.func_closure[0] -+ return f.__closure__[0] - - closure = tuple(makecell(cell.cell_contents) -- for cell in func.func_closure) -+ for cell in func.__closure__) - - new_func = self.wraps(func)(types.FunctionType( -- func.func_code, -+ func.__code__, - glob, - func.__name__, -- func.func_defaults, -+ func.__defaults__, - closure - )) - @self.wraps(new_func) -diff --git a/python/mozbuild/mozbuild/configure/check_debug_ranges.py b/python/mozbuild/mozbuild/configure/check_debug_ranges.py -index c0caa9cc5..a3e1f37e1 100644 ---- a/python/mozbuild/mozbuild/configure/check_debug_ranges.py -+++ b/python/mozbuild/mozbuild/configure/check_debug_ranges.py -@@ -6,7 +6,7 @@ - # to a given compilation unit. This is used as a helper to find a bug in some - # versions of GNU ld. - --from __future__ import absolute_import -+ - - import subprocess - import sys -@@ -45,6 +45,8 @@ def get_range_length(range, debug_ranges): - def main(bin, compilation_unit): - p = subprocess.Popen(['objdump', '-W', bin], stdout = subprocess.PIPE, stderr = subprocess.PIPE) - (out, err) = p.communicate() -+ if isinstance(out, bytes): -+ out = out.decode('utf-8') - sections = re.split('\n(Contents of the|The section) ', out) - debug_info = [s for s in sections if s.startswith('.debug_info')] - debug_ranges = [s for s in sections if s.startswith('.debug_ranges')] -@@ -59,4 +61,4 @@ def main(bin, compilation_unit): - - - if __name__ == '__main__': -- print(main(*sys.argv[1:])) -+ print((main(*sys.argv[1:]))) -diff --git a/python/mozbuild/mozbuild/configure/options.py b/python/mozbuild/mozbuild/configure/options.py -index 53ae2ae6d..4d80cad86 100644 ---- a/python/mozbuild/mozbuild/configure/options.py -+++ b/python/mozbuild/mozbuild/configure/options.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -+ - - import os - import sys -@@ -12,7 +12,7 @@ from collections import OrderedDict - - def istupleofstrings(obj): - return isinstance(obj, tuple) and len(obj) and all( -- isinstance(o, types.StringTypes) for o in obj) -+ isinstance(o, (str,)) for o in obj) - - - class OptionValue(tuple): -@@ -88,7 +88,7 @@ class PositiveOptionValue(OptionValue): - in the form of a tuple for when values are given to the option (in the form - --option=value[,value2...]. - ''' -- def __nonzero__(self): -+ def __bool__(self): - return True - - -@@ -113,7 +113,7 @@ class ConflictingOptionError(InvalidOptionError): - if format_data: - message = message.format(**format_data) - super(ConflictingOptionError, self).__init__(message) -- for k, v in format_data.iteritems(): -+ for k, v in format_data.items(): - setattr(self, k, v) - - -@@ -149,7 +149,7 @@ class Option(object): - 'At least an option name or an environment variable name must ' - 'be given') - if name: -- if not isinstance(name, types.StringTypes): -+ if not isinstance(name, (str,)): - raise InvalidOptionError('Option must be a string') - if not name.startswith('--'): - raise InvalidOptionError('Option must start with `--`') -@@ -158,7 +158,7 @@ class Option(object): - if not name.islower(): - raise InvalidOptionError('Option must be all lowercase') - if env: -- if not isinstance(env, types.StringTypes): -+ if not isinstance(env, (str,)): - raise InvalidOptionError( - 'Environment variable name must be a string') - if not env.isupper(): -@@ -168,8 +168,8 @@ class Option(object): - isinstance(nargs, int) and nargs >= 0): - raise InvalidOptionError( - "nargs must be a positive integer, '?', '*' or '+'") -- if (not isinstance(default, types.StringTypes) and -- not isinstance(default, (bool, types.NoneType)) and -+ if (not isinstance(default, (str,)) and -+ not isinstance(default, (bool, type(None))) and - not istupleofstrings(default)): - raise InvalidOptionError( - 'default must be a bool, a string or a tuple of strings') -@@ -241,7 +241,7 @@ class Option(object): - ', '.join("'%s'" % c for c in choices)) - elif has_choices: - maxargs = self.maxargs -- if len(choices) < maxargs and maxargs != sys.maxint: -+ if len(choices) < maxargs and maxargs != sys.maxsize: - raise InvalidOptionError('Not enough `choices` for `nargs`') - self.choices = choices - self.help = help -@@ -255,7 +255,7 @@ class Option(object): - where prefix is one of 'with', 'without', 'enable' or 'disable'. - The '=values' part is optional. Values are separated with commas. - ''' -- if not isinstance(option, types.StringTypes): -+ if not isinstance(option, (str,)): - raise InvalidOptionError('Option must be a string') - - elements = option.split('=', 1) -@@ -308,7 +308,7 @@ class Option(object): - def maxargs(self): - if isinstance(self.nargs, int): - return self.nargs -- return 1 if self.nargs == '?' else sys.maxint -+ return 1 if self.nargs == '?' else sys.maxsize - - def _validate_nargs(self, num): - minargs, maxargs = self.minargs, self.maxargs -@@ -499,5 +499,5 @@ class CommandLineHelper(object): - - def __iter__(self): - for d in (self._args, self._extra_args): -- for arg, pos in d.itervalues(): -+ for arg, pos in d.values(): - yield arg -diff --git a/python/mozbuild/mozbuild/configure/util.py b/python/mozbuild/mozbuild/configure/util.py -index 9d8b2eb0e..a12986e48 100644 ---- a/python/mozbuild/mozbuild/configure/util.py -+++ b/python/mozbuild/mozbuild/configure/util.py -@@ -77,15 +77,7 @@ class ConfigureOutputHandler(logging.Handler): - # Python has this feature where it sets the encoding of pipes to - # ascii, which blatantly fails when trying to print out non-ascii. - def fix_encoding(fh): -- try: -- isatty = fh.isatty() -- except AttributeError: -- isatty = True -- -- if not isatty: -- encoding = getpreferredencoding() -- if encoding: -- return codecs.getwriter(encoding)(fh) -+ # no magic on oe / python3 - return fh - - self._stdout = fix_encoding(stdout) -@@ -200,7 +192,7 @@ class LineIO(object): - self._errors = errors - - def write(self, buf): -- if self._encoding and isinstance(buf, str): -+ if self._encoding and isinstance(buf, bytes): - buf = buf.decode(self._encoding, self._errors) - lines = buf.splitlines() - if not lines: -diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py -index d5af532f7..e9810fe58 100644 ---- a/python/mozbuild/mozbuild/controller/building.py -+++ b/python/mozbuild/mozbuild/controller/building.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, unicode_literals -+ - - import errno - import getpass -@@ -146,7 +146,7 @@ class TierStatus(object): - """ - o = [] - -- for tier, state in self.tiers.items(): -+ for tier, state in list(self.tiers.items()): - t_entry = dict( - name=tier, - start=state['begin_time'], -@@ -574,7 +574,7 @@ class BuildProgressFooter(Footer): - - def __init__(self, terminal, monitor): - Footer.__init__(self, terminal) -- self.tiers = monitor.tiers.tier_status.viewitems() -+ self.tiers = monitor.tiers.tier_status.items() - - def draw(self): - """Draws this footer in the terminal.""" -@@ -911,8 +911,8 @@ class CCacheStats(object): - - return '\n'.join(lines) - -- def __nonzero__(self): -- relative_values = [v for k, v in self._values.items() -+ def __bool__(self): -+ relative_values = [v for k, v in list(self._values.items()) - if k not in self.ABSOLUTE_KEYS] - return (all(v >= 0 for v in relative_values) and - any(v > 0 for v in relative_values)) -@@ -1156,7 +1156,7 @@ class BuildDriver(MozbuildObject): - - high_finder, finder_percent = monitor.have_high_finder_usage() - if high_finder: -- print(FINDER_SLOW_MESSAGE % finder_percent) -+ print((FINDER_SLOW_MESSAGE % finder_percent)) - - ccache_end = monitor.ccache_stats() - -@@ -1276,8 +1276,8 @@ class BuildDriver(MozbuildObject): - """Install test files.""" - - if self.is_clobber_needed(): -- print(INSTALL_TESTS_CLOBBER.format( -- clobber_file=os.path.join(self.topobjdir, 'CLOBBER'))) -+ print((INSTALL_TESTS_CLOBBER.format( -+ clobber_file=os.path.join(self.topobjdir, 'CLOBBER')))) - sys.exit(1) - - if not test_objs: -diff --git a/python/mozbuild/mozbuild/frontend/context.py b/python/mozbuild/mozbuild/frontend/context.py -index fbdbefc1d..1aef6a65a 100644 ---- a/python/mozbuild/mozbuild/frontend/context.py -+++ b/python/mozbuild/mozbuild/frontend/context.py -@@ -14,7 +14,7 @@ If you are looking for the absolute authority on what moz.build files can - contain, you've come to the right place. - """ - --from __future__ import absolute_import, unicode_literals -+ - - import os - -@@ -237,15 +237,15 @@ class Context(KeyedDefaultDict): - This function is transactional: if setitem fails for one of the values, - the context is not updated at all.""" - if isinstance(iterable, dict): -- iterable = iterable.items() -+ iterable = list(iterable.items()) - - update = {} -- for key, value in itertools.chain(iterable, kwargs.items()): -+ for key, value in itertools.chain(iterable, list(kwargs.items())): - stored_type = self._validate(key, value) - # Don't create an instance of stored_type if coercion is needed, - # until all values are validated. - update[key] = (value, stored_type) -- for key, (value, stored_type) in update.items(): -+ for key, (value, stored_type) in list(update.items()): - if not isinstance(value, stored_type): - update[key] = stored_type(value) - else: -@@ -311,7 +311,7 @@ class BaseCompileFlags(ContextDerivedValue, dict): - # a template were set and which were provided as defaults. - template_name = getattr(context, 'template', None) - if template_name in (None, 'Gyp'): -- dict.__init__(self, ((k, v if v is None else TypedList(unicode)(v)) -+ dict.__init__(self, ((k, v if v is None else TypedList(str)(v)) - for k, v, _ in self.flag_variables)) - else: - dict.__init__(self) -@@ -520,13 +520,13 @@ class CompileFlags(BaseCompileFlags): - if key in self and self[key] is None: - raise ValueError('`%s` may not be set in COMPILE_FLAGS from moz.build, this ' - 'value is resolved from the emitter.' % key) -- if not (isinstance(value, list) and all(isinstance(v, basestring) for v in value)): -+ if not (isinstance(value, list) and all(isinstance(v, str) for v in value)): - raise ValueError('A list of strings must be provided as a value for a ' - 'compile flags category.') - dict.__setitem__(self, key, value) - - --class FinalTargetValue(ContextDerivedValue, unicode): -+class FinalTargetValue(ContextDerivedValue, str): - def __new__(cls, context, value=""): - if not value: - value = 'dist/' -@@ -536,7 +536,7 @@ class FinalTargetValue(ContextDerivedValue, unicode): - value += 'bin' - if context['DIST_SUBDIR']: - value += '/' + context['DIST_SUBDIR'] -- return unicode.__new__(cls, value) -+ return str.__new__(cls, value) - - - def Enum(*values): -@@ -584,7 +584,7 @@ class PathMeta(type): - cls = SourcePath - return super(PathMeta, cls).__call__(context, value) - --class Path(ContextDerivedValue, unicode): -+class Path(ContextDerivedValue, str, metaclass=PathMeta): - """Stores and resolves a source path relative to a given context - - This class is used as a backing type for some of the sandbox variables. -@@ -595,7 +595,6 @@ class Path(ContextDerivedValue, unicode): - - '!objdir/relative/paths' - - '%/filesystem/absolute/paths' - """ -- __metaclass__ = PathMeta - - def __new__(cls, context, value=None): - return super(Path, cls).__new__(cls, value) -@@ -612,10 +611,14 @@ class Path(ContextDerivedValue, unicode): - """ - return Path(self.context, mozpath.join(self, *p)) - -+ @staticmethod -+ def cmp(a, b): -+ return (a > b) - (a < b) -+ - def __cmp__(self, other): - if isinstance(other, Path) and self.srcdir != other.srcdir: -- return cmp(self.full_path, other.full_path) -- return cmp(unicode(self), other) -+ return self.cmp(self.full_path, other.full_path) -+ return self.cmp(str(self), other) - - # __cmp__ is not enough because unicode has __eq__, __ne__, etc. defined - # and __cmp__ is only used for those when they don't exist. -@@ -773,7 +776,7 @@ def ContextDerivedTypedRecord(*fields): - __slots__ = tuple([name for name, _ in fields]) - - def __init__(self, context): -- for fname, ftype in self._fields.items(): -+ for fname, ftype in list(self._fields.items()): - if issubclass(ftype, ContextDerivedValue): - setattr(self, fname, self._fields[fname](context)) - else: -@@ -909,8 +912,8 @@ def TypedListWithAction(typ, action): - return _TypedListWithAction - - WebPlatformTestManifest = TypedNamedTuple("WebPlatformTestManifest", -- [("manifest_path", unicode), -- ("test_root", unicode)]) -+ [("manifest_path", str), -+ ("test_root", str)]) - ManifestparserManifestList = OrderedPathListWithAction(read_manifestparser_manifest) - ReftestManifestList = OrderedPathListWithAction(read_reftest_manifest) - WptManifestList = TypedListWithAction(WebPlatformTestManifest, read_wpt_manifest) -@@ -918,18 +921,18 @@ WptManifestList = TypedListWithAction(WebPlatformTestManifest, read_wpt_manifest - OrderedSourceList = ContextDerivedTypedList(SourcePath, StrictOrderingOnAppendList) - OrderedTestFlavorList = TypedList(Enum(*all_test_flavors()), - StrictOrderingOnAppendList) --OrderedStringList = TypedList(unicode, StrictOrderingOnAppendList) -+OrderedStringList = TypedList(str, StrictOrderingOnAppendList) - DependentTestsEntry = ContextDerivedTypedRecord(('files', OrderedSourceList), - ('tags', OrderedStringList), - ('flavors', OrderedTestFlavorList)) - BugzillaComponent = TypedNamedTuple('BugzillaComponent', -- [('product', unicode), ('component', unicode)]) -+ [('product', str), ('component', str)]) - SchedulingComponents = ContextDerivedTypedRecord( -- ('inclusive', TypedList(unicode, StrictOrderingOnAppendList)), -- ('exclusive', TypedList(unicode, StrictOrderingOnAppendList))) -+ ('inclusive', TypedList(str, StrictOrderingOnAppendList)), -+ ('exclusive', TypedList(str, StrictOrderingOnAppendList))) - - GeneratedFilesList = StrictOrderingOnAppendListWithFlagsFactory({ -- 'script': unicode, -+ 'script': str, - 'inputs': list, - 'flags': list, }) - -@@ -1096,7 +1099,7 @@ class Files(SubContext): - self.test_tags |= other.test_tags - self.test_flavors |= other.test_flavors - -- for k, v in other.items(): -+ for k, v in list(other.items()): - if k == 'IMPACTED_TESTS': - self.test_files |= set(mozpath.relpath(e.full_path, e.context.config.topsrcdir) - for e in v.files) -@@ -1154,7 +1157,7 @@ class Files(SubContext): - - bug_components = Counter() - -- for f in files.values(): -+ for f in list(files.values()): - bug_component = f.get('BUG_COMPONENT') - if bug_component: - bug_components[bug_component] += 1 -@@ -1232,7 +1235,7 @@ VARIABLES = { - RustLibrary template instead. - """), - -- 'RUST_LIBRARY_TARGET_DIR': (unicode, unicode, -+ 'RUST_LIBRARY_TARGET_DIR': (str, str, - """Where CARGO_TARGET_DIR should point when compiling this library. If - not set, it defaults to the current objdir. It should be a relative path - to the current objdir; absolute paths should not be used. -@@ -1248,7 +1251,7 @@ VARIABLES = { - HostRustLibrary template instead. - """), - -- 'RUST_TEST': (unicode, unicode, -+ 'RUST_TEST': (str, str, - """Name of a Rust test to build and run via `cargo test`. - - This variable should not be used directly; you should be using the -@@ -1487,7 +1490,7 @@ VARIABLES = { - """Like ``OBJDIR_FILES``, with preprocessing. Use sparingly. - """), - -- 'FINAL_LIBRARY': (unicode, unicode, -+ 'FINAL_LIBRARY': (str, str, - """Library in which the objects of the current directory will be linked. - - This variable contains the name of a library, defined elsewhere with -@@ -1528,7 +1531,7 @@ VARIABLES = { - with the host compiler. - """), - -- 'HOST_LIBRARY_NAME': (unicode, unicode, -+ 'HOST_LIBRARY_NAME': (str, str, - """Name of target library generated when cross compiling. - """), - -@@ -1546,7 +1549,7 @@ VARIABLES = { - libraries that link into this library via FINAL_LIBRARY. - """), - -- 'LIBRARY_NAME': (unicode, unicode, -+ 'LIBRARY_NAME': (str, str, - """The code name of the library generated for a directory. - - By default STATIC_LIBRARY_NAME and SHARED_LIBRARY_NAME take this name. -@@ -1558,7 +1561,7 @@ VARIABLES = { - ``example/components/xpcomsample.lib`` on Windows. - """), - -- 'SHARED_LIBRARY_NAME': (unicode, unicode, -+ 'SHARED_LIBRARY_NAME': (str, str, - """The name of the static library generated for a directory, if it needs to - differ from the library code name. - -@@ -1572,7 +1575,7 @@ VARIABLES = { - Implies FORCE_SHARED_LIB. - """), - -- 'STATIC_LIBRARY_NAME': (unicode, unicode, -+ 'STATIC_LIBRARY_NAME': (str, str, - """The name of the static library generated for a directory, if it needs to - differ from the library code name. - -@@ -1604,31 +1607,31 @@ VARIABLES = { - - This variable contains a list of system libaries to link against. - """), -- 'RCFILE': (unicode, unicode, -+ 'RCFILE': (str, str, - """The program .rc file. - - This variable can only be used on Windows. - """), - -- 'RESFILE': (unicode, unicode, -+ 'RESFILE': (str, str, - """The program .res file. - - This variable can only be used on Windows. - """), - -- 'RCINCLUDE': (unicode, unicode, -+ 'RCINCLUDE': (str, str, - """The resource script file to be included in the default .res file. - - This variable can only be used on Windows. - """), - -- 'DEFFILE': (unicode, unicode, -+ 'DEFFILE': (str, str, - """The program .def (module definition) file. - - This variable can only be used on Windows. - """), - -- 'SYMBOLS_FILE': (Path, unicode, -+ 'SYMBOLS_FILE': (Path, str, - """A file containing a list of symbols to export from a shared library. - - The given file contains a list of symbols to be exported, and is -@@ -1649,7 +1652,7 @@ VARIABLES = { - ``BIN_SUFFIX``, the name will remain unchanged. - """), - -- 'SONAME': (unicode, unicode, -+ 'SONAME': (str, str, - """The soname of the shared object currently being linked - - soname is the "logical name" of a shared object, often used to provide -@@ -1719,7 +1722,7 @@ VARIABLES = { - ``GENERATED_FILES``. - """), - -- 'PROGRAM' : (unicode, unicode, -+ 'PROGRAM' : (str, str, - """Compiled executable name. - - If the configuration token ``BIN_SUFFIX`` is set, its value will be -@@ -1727,7 +1730,7 @@ VARIABLES = { - ``BIN_SUFFIX``, ``PROGRAM`` will remain unchanged. - """), - -- 'HOST_PROGRAM' : (unicode, unicode, -+ 'HOST_PROGRAM' : (str, str, - """Compiled host executable name. - - If the configuration token ``HOST_BIN_SUFFIX`` is set, its value will be -@@ -1765,7 +1768,7 @@ VARIABLES = { - files. - """), - -- 'XPIDL_MODULE': (unicode, unicode, -+ 'XPIDL_MODULE': (str, str, - """XPCOM Interface Definition Module Name. - - This is the name of the ``.xpt`` file that is created by linking -@@ -1924,14 +1927,14 @@ VARIABLES = { - - - # The following variables are used to control the target of installed files. -- 'XPI_NAME': (unicode, unicode, -+ 'XPI_NAME': (str, str, - """The name of an extension XPI to generate. - - When this variable is present, the results of this directory will end up - being packaged into an extension instead of the main dist/bin results. - """), - -- 'DIST_SUBDIR': (unicode, unicode, -+ 'DIST_SUBDIR': (str, str, - """The name of an alternate directory to install files to. - - When this variable is present, the results of this directory will end up -@@ -1939,7 +1942,7 @@ VARIABLES = { - otherwise be placed. - """), - -- 'FINAL_TARGET': (FinalTargetValue, unicode, -+ 'FINAL_TARGET': (FinalTargetValue, str, - """The name of the directory to install targets to. - - The directory is relative to the top of the object directory. The -@@ -1970,7 +1973,7 @@ VARIABLES = { - - 'GYP_DIRS': (StrictOrderingOnAppendListWithFlagsFactory({ - 'variables': dict, -- 'input': unicode, -+ 'input': str, - 'sandbox_vars': dict, - 'no_chromium': bool, - 'no_unified': bool, -@@ -2194,7 +2197,7 @@ VARIABLES = { - } - - # Sanity check: we don't want any variable above to have a list as storage type. --for name, (storage_type, input_types, docs) in VARIABLES.items(): -+for name, (storage_type, input_types, docs) in list(VARIABLES.items()): - if storage_type == list: - raise RuntimeError('%s has a "list" storage type. Use "List" instead.' - % name) -diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuild/frontend/data.py -index 442fc9e0a..837453a9f 100644 ---- a/python/mozbuild/mozbuild/frontend/data.py -+++ b/python/mozbuild/mozbuild/frontend/data.py -@@ -15,7 +15,7 @@ contains the code for converting executed mozbuild files into these data - structures. - """ - --from __future__ import absolute_import, unicode_literals -+ - - from mozbuild.util import StrictOrderingOnAppendList - from mozpack.chrome.manifest import ManifestEntry -@@ -182,7 +182,7 @@ class ComputedFlags(ContextDerived): - if value: - for dest_var in dest_vars: - flags[dest_var].extend(value) -- return flags.items() -+ return list(flags.items()) - - class XPIDLFile(ContextDerived): - """Describes an XPIDL file to be compiled.""" -@@ -213,7 +213,7 @@ class BaseDefines(ContextDerived): - self.defines = defines - - def get_defines(self): -- for define, value in self.defines.iteritems(): -+ for define, value in self.defines.items(): - if value is True: - yield('-D%s' % define) - elif value is False: -@@ -494,7 +494,7 @@ class SimpleProgram(BaseProgram): - KIND = 'target' - - def source_files(self): -- for srcs in self.sources.values(): -+ for srcs in list(self.sources.values()): - for f in srcs: - if mozpath.basename(mozpath.splitext(f)[0]) == mozpath.splitext(self.program)[0]: - return [f] -diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py -index 642b381c0..c28344a75 100644 ---- a/python/mozbuild/mozbuild/frontend/emitter.py -+++ b/python/mozbuild/mozbuild/frontend/emitter.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, unicode_literals -+ - - import itertools - import logging -@@ -116,8 +116,8 @@ class TreeMetadataEmitter(LoggingMixin): - # arguments. This gross hack works around the problem until we - # rid ourselves of 2.6. - self.info = {} -- for k, v in mozinfo.info.items(): -- if isinstance(k, unicode): -+ for k, v in list(mozinfo.info.items()): -+ if isinstance(k, str): - k = k.encode('ascii') - self.info[k] = v - -@@ -234,7 +234,7 @@ class TreeMetadataEmitter(LoggingMixin): - - - # Next do FINAL_LIBRARY linkage. -- for lib in (l for libs in self._libs.values() for l in libs): -+ for lib in (l for libs in list(self._libs.values()) for l in libs): - if not isinstance(lib, (StaticLibrary, RustLibrary)) or not lib.link_into: - continue - if lib.link_into not in self._libs: -@@ -294,13 +294,13 @@ class TreeMetadataEmitter(LoggingMixin): - lib.link_into == outerlib.basename): - propagate_defines(lib, defines) - -- for lib in (l for libs in self._libs.values() for l in libs): -+ for lib in (l for libs in list(self._libs.values()) for l in libs): - if isinstance(lib, Library): - propagate_defines(lib, lib.lib_defines) - yield lib - - -- for lib in (l for libs in self._libs.values() for l in libs): -+ for lib in (l for libs in list(self._libs.values()) for l in libs): - lib_defines = list(lib.lib_defines.get_defines()) - if lib_defines: - objdir_flags = self._compile_flags[lib.objdir] -@@ -310,13 +310,13 @@ class TreeMetadataEmitter(LoggingMixin): - if objdir_flags: - objdir_flags.resolve_flags('LIBRARY_DEFINES', lib_defines) - -- for flags_obj in self._compile_flags.values(): -+ for flags_obj in list(self._compile_flags.values()): - yield flags_obj - -- for flags_obj in self._compile_as_flags.values(): -+ for flags_obj in list(self._compile_as_flags.values()): - yield flags_obj - -- for obj in self._binaries.values(): -+ for obj in list(self._binaries.values()): - yield obj - - -@@ -409,7 +409,7 @@ class TreeMetadataEmitter(LoggingMixin): - libs[key] = l - if key not in libs: - libs[key] = l -- candidates = libs.values() -+ candidates = list(libs.values()) - if force_static and not candidates: - if dir: - raise SandboxValidationError( -@@ -473,9 +473,9 @@ class TreeMetadataEmitter(LoggingMixin): - - def _verify_deps(self, context, crate_dir, crate_name, dependencies, description='Dependency'): - """Verify that a crate's dependencies all specify local paths.""" -- for dep_crate_name, values in dependencies.iteritems(): -+ for dep_crate_name, values in dependencies.items(): - # A simple version number. -- if isinstance(values, (str, unicode)): -+ if isinstance(values, str): - raise SandboxValidationError( - '%s %s of crate %s does not list a path' % (description, dep_crate_name, crate_name), - context) -@@ -529,7 +529,7 @@ class TreeMetadataEmitter(LoggingMixin): - - cargo_target_dir = context.get('RUST_LIBRARY_TARGET_DIR', '.') - -- dependencies = set(config.get('dependencies', {}).iterkeys()) -+ dependencies = set(config.get('dependencies', {}).keys()) - - features = context.get(cls.FEATURES_VAR, []) - unique_features = set(features) -@@ -863,7 +863,7 @@ class TreeMetadataEmitter(LoggingMixin): - assert not gen_sources['UNIFIED_SOURCES'] - - no_pgo = context.get('NO_PGO') -- no_pgo_sources = [f for f, flags in all_flags.iteritems() -+ no_pgo_sources = [f for f, flags in all_flags.items() - if flags.no_pgo] - if no_pgo: - if no_pgo_sources: -@@ -890,7 +890,7 @@ class TreeMetadataEmitter(LoggingMixin): - - # The inverse of the above, mapping suffixes to their canonical suffix. - canonicalized_suffix_map = {} -- for suffix, alternatives in suffix_map.iteritems(): -+ for suffix, alternatives in suffix_map.items(): - alternatives.add(suffix) - for a in alternatives: - canonicalized_suffix_map[a] = suffix -@@ -914,7 +914,7 @@ class TreeMetadataEmitter(LoggingMixin): - # Source files to track for linkables associated with this context. - ctxt_sources = defaultdict(lambda: defaultdict(list)) - -- for variable, (klass, gen_klass, suffixes) in varmap.items(): -+ for variable, (klass, gen_klass, suffixes) in list(varmap.items()): - allowed_suffixes = set().union(*[suffix_map[s] for s in suffixes]) - - # First ensure that we haven't been given filetypes that we don't -@@ -941,20 +941,20 @@ class TreeMetadataEmitter(LoggingMixin): - obj = cls(*arglist) - srcs = obj.files - if isinstance(obj, UnifiedSources) and obj.have_unified_mapping: -- srcs = dict(obj.unified_source_mapping).keys() -+ srcs = list(dict(obj.unified_source_mapping).keys()) - ctxt_sources[variable][canonical_suffix] += sorted(srcs) - yield obj - - if ctxt_sources: - for linkable in linkables: - for target_var in ('SOURCES', 'UNIFIED_SOURCES'): -- for suffix, srcs in ctxt_sources[target_var].items(): -+ for suffix, srcs in list(ctxt_sources[target_var].items()): - linkable.sources[suffix] += srcs - for host_linkable in host_linkables: -- for suffix, srcs in ctxt_sources['HOST_SOURCES'].items(): -+ for suffix, srcs in list(ctxt_sources['HOST_SOURCES'].items()): - host_linkable.sources[suffix] += srcs - -- for f, flags in all_flags.iteritems(): -+ for f, flags in all_flags.items(): - if flags.flags: - ext = mozpath.splitext(f)[1] - yield PerSourceFlag(context, f, flags.flags) -@@ -1143,7 +1143,7 @@ class TreeMetadataEmitter(LoggingMixin): - for obj in self._handle_linkables(context, passthru, generated_files): - yield obj - -- generated_files.update(['%s%s' % (k, self.config.substs.get('BIN_SUFFIX', '')) for k in self._binaries.keys()]) -+ generated_files.update(['%s%s' % (k, self.config.substs.get('BIN_SUFFIX', '')) for k in list(self._binaries.keys())]) - - components = [] - for var, cls in ( -@@ -1277,7 +1277,7 @@ class TreeMetadataEmitter(LoggingMixin): - for obj in self._process_jar_manifests(context): - yield obj - -- for name, jar in context.get('JAVA_JAR_TARGETS', {}).items(): -+ for name, jar in list(context.get('JAVA_JAR_TARGETS', {}).items()): - yield ContextWrapped(context, jar) - - computed_as_flags.resolve_flags('MOZBUILD', -@@ -1346,7 +1346,7 @@ class TreeMetadataEmitter(LoggingMixin): - script = mozpath.join(mozpath.dirname(mozpath.dirname(__file__)), - 'action', 'process_define_files.py') - yield GeneratedFile(context, script, 'process_define_file', -- unicode(path), -+ str(path), - [Path(context, path + '.in')]) - - generated_files = context.get('GENERATED_FILES') or [] -@@ -1393,7 +1393,7 @@ class TreeMetadataEmitter(LoggingMixin): - flags.flags, localized=localized) - - def _process_test_manifests(self, context): -- for prefix, info in TEST_MANIFESTS.items(): -+ for prefix, info in list(TEST_MANIFESTS.items()): - for path, manifest in context.get('%s_MANIFESTS' % prefix, []): - for obj in self._process_test_manifest(context, info, path, manifest): - yield obj -@@ -1479,7 +1479,7 @@ class TreeMetadataEmitter(LoggingMixin): - - process_support_files(test) - -- for path, m_defaults in mpmanifest.manifest_defaults.items(): -+ for path, m_defaults in list(mpmanifest.manifest_defaults.items()): - process_support_files(m_defaults) - - # We also copy manifests into the output directory, -diff --git a/python/mozbuild/mozbuild/frontend/reader.py b/python/mozbuild/mozbuild/frontend/reader.py -index c1efc1c3d..0cdf8b8db 100644 ---- a/python/mozbuild/mozbuild/frontend/reader.py -+++ b/python/mozbuild/mozbuild/frontend/reader.py -@@ -16,7 +16,7 @@ The BuildReader contains basic logic for traversing a tree of mozbuild files. - It does this by examining specific variables populated during execution. - """ - --from __future__ import absolute_import, print_function, unicode_literals -+ - - import ast - import inspect -@@ -81,12 +81,13 @@ from .context import ( - - from mozbuild.base import ExecutionSummary - from concurrent.futures.process import ProcessPoolExecutor -+from functools import reduce - - - - if sys.version_info.major == 2: -- text_type = unicode -- type_type = types.TypeType -+ text_type = str -+ type_type = type - else: - text_type = str - type_type = type -@@ -127,7 +128,7 @@ class EmptyConfig(object): - - self.substs = self.PopulateOnGetDict(EmptyValue, substs or self.default_substs) - udict = {} -- for k, v in self.substs.items(): -+ for k, v in list(self.substs.items()): - if isinstance(v, str): - udict[k.decode('utf-8')] = v.decode('utf-8') - else: -@@ -311,7 +312,7 @@ class MozbuildSandbox(Sandbox): - raise Exception('`template` is a function decorator. You must ' - 'use it as `@template` preceding a function declaration.') - -- name = func.func_name -+ name = func.__name__ - - if name in self.templates: - raise KeyError( -@@ -390,7 +391,7 @@ class MozbuildSandbox(Sandbox): - klass = self._context.__class__ - self._context.__class__ = TemplateContext - # The sandbox will do all the necessary checks for these merges. -- for key, value in context.items(): -+ for key, value in list(context.items()): - if isinstance(value, dict): - self[key].update(value) - elif isinstance(value, (list, HierarchicalStringList)): -@@ -407,12 +408,14 @@ class MozbuildSandbox(Sandbox): - - class TemplateFunction(object): - def __init__(self, func, sandbox): -- self.path = func.func_code.co_filename -- self.name = func.func_name -+ self.path = func.__code__.co_filename -+ self.name = func.__name__ - -- code = func.func_code -+ code = func.__code__ - firstlineno = code.co_firstlineno - lines = sandbox._current_source.splitlines(True) -+ if len(lines) and isinstance(lines[0], bytes): -+ lines = [l.decode('utf-8') for l in lines] - lines = inspect.getblock(lines[firstlineno - 1:]) - - # The code lines we get out of inspect.getsourcelines look like -@@ -430,7 +433,7 @@ class TemplateFunction(object): - # actually never calls __getitem__ and __setitem__, so we need to - # modify the AST so that accesses to globals are properly directed - # to a dict. -- self._global_name = b'_data' # AST wants str for this, not unicode -+ self._global_name = '_data' - # In case '_data' is a name used for a variable in the function code, - # prepend more underscores until we find an unused name. - while (self._global_name in code.co_names or -@@ -449,8 +452,8 @@ class TemplateFunction(object): - compile(func_ast, self.path, 'exec'), - glob, - self.name, -- func.func_defaults, -- func.func_closure, -+ func.__defaults__, -+ func.__closure__, - ) - func() - -@@ -464,11 +467,11 @@ class TemplateFunction(object): - '__builtins__': sandbox._builtins - } - func = types.FunctionType( -- self._func.func_code, -+ self._func.__code__, - glob, - self.name, -- self._func.func_defaults, -- self._func.func_closure -+ self._func.__defaults__, -+ self._func.__closure__ - ) - sandbox.exec_function(func, args, kwargs, self.path, - becomes_current_path=False) -@@ -484,7 +487,7 @@ class TemplateFunction(object): - def visit_Str(self, node): - # String nodes we got from the AST parser are str, but we want - # unicode literals everywhere, so transform them. -- node.s = unicode(node.s) -+ node.s = str(node.s) - return node - - def visit_Name(self, node): -@@ -617,7 +620,7 @@ class BuildReaderError(Exception): - - for l in traceback.format_exception(type(self.other), self.other, - self.trace): -- s.write(unicode(l)) -+ s.write(str(l)) - - return s.getvalue() - -@@ -767,7 +770,7 @@ class BuildReaderError(Exception): - s.write(' %s\n' % inner.args[2]) - s.write('\n') - close_matches = difflib.get_close_matches(inner.args[2], -- VARIABLES.keys(), 2) -+ list(VARIABLES.keys()), 2) - if close_matches: - s.write('Maybe you meant %s?\n' % ' or '.join(close_matches)) - s.write('\n') -@@ -1152,7 +1155,7 @@ class BuildReader(object): - context) - non_unified_sources.add(source) - action_overrides = {} -- for action, script in gyp_dir.action_overrides.iteritems(): -+ for action, script in gyp_dir.action_overrides.items(): - action_overrides[action] = SourcePath(context, script) - - gyp_processor = GypProcessor(context.config, -@@ -1188,7 +1191,7 @@ class BuildReader(object): - - recurse_info[d][key] = dict(sandbox.metadata[key]) - -- for path, child_metadata in recurse_info.items(): -+ for path, child_metadata in list(recurse_info.items()): - child_path = path.join('moz.build').full_path - - # Ensure we don't break out of the topsrcdir. We don't do realpath -@@ -1279,7 +1282,7 @@ class BuildReader(object): - # There is room to improve this code (and the code in - # _find_relevant_mozbuilds) to better handle multiple files in the same - # directory. Bug 1136966 tracks. -- for path, mbpaths in relevants.items(): -+ for path, mbpaths in list(relevants.items()): - path_mozbuilds[path] = [mozpath.join(topsrcdir, p) for p in mbpaths] - - for i, mbpath in enumerate(mbpaths[0:-1]): -@@ -1316,7 +1319,7 @@ class BuildReader(object): - all_contexts.append(context) - - result = {} -- for path, paths in path_mozbuilds.items(): -+ for path, paths in list(path_mozbuilds.items()): - result[path] = reduce(lambda x, y: x + y, (contexts[p] for p in paths), []) - - return result, all_contexts -@@ -1356,7 +1359,7 @@ class BuildReader(object): - - r = {} - -- for path, ctxs in paths.items(): -+ for path, ctxs in list(paths.items()): - # Should be normalized by read_relevant_mozbuilds. - assert '\\' not in path - -diff --git a/python/mozbuild/mozbuild/frontend/sandbox.py b/python/mozbuild/mozbuild/frontend/sandbox.py -index b2090802e..6d94291ea 100644 ---- a/python/mozbuild/mozbuild/frontend/sandbox.py -+++ b/python/mozbuild/mozbuild/frontend/sandbox.py -@@ -17,7 +17,7 @@ KeyError are machine parseable. This machine-friendly data is used to present - user-friendly error messages in the case of errors. - """ - --from __future__ import absolute_import, unicode_literals -+ - - import os - import sys -@@ -112,6 +112,7 @@ class Sandbox(dict): - 'int': int, - 'set': set, - 'tuple': tuple, -+ 'str': str, - }) - - def __init__(self, context, finder=default_finder): -diff --git a/python/mozbuild/mozbuild/jar.py b/python/mozbuild/mozbuild/jar.py -index 47a2eff63..96aea63ce 100644 ---- a/python/mozbuild/mozbuild/jar.py -+++ b/python/mozbuild/mozbuild/jar.py -@@ -8,7 +8,7 @@ processing jar.mn files. - See the documentation for jar.mn on MDC for further details on the format. - ''' - --from __future__ import absolute_import -+ - - import sys - import os -@@ -17,7 +17,7 @@ import re - import logging - from time import localtime - from MozZipFile import ZipFile --from cStringIO import StringIO -+from io import StringIO - from collections import defaultdict - - from mozbuild.preprocessor import Preprocessor -@@ -302,9 +302,9 @@ class JarMaker(object): - '''updateManifest replaces the % in the chrome registration entries - with the given chrome base path, and updates the given manifest file. - ''' -- myregister = dict.fromkeys(map(lambda s: s.replace('%', -- chromebasepath), register)) -- addEntriesToListFile(manifestPath, myregister.iterkeys()) -+ myregister = dict.fromkeys([s.replace('%', -+ chromebasepath) for s in register]) -+ addEntriesToListFile(manifestPath, iter(myregister.keys())) - - def makeJar(self, infile, jardir): - '''makeJar is the main entry point to JarMaker. -@@ -322,7 +322,7 @@ class JarMaker(object): - elif self.relativesrcdir: - self.localedirs = \ - self.generateLocaleDirs(self.relativesrcdir) -- if isinstance(infile, basestring): -+ if isinstance(infile, str): - logging.info('processing ' + infile) - self.sourcedirs.append(_normpath(os.path.dirname(infile))) - pp = self.pp.clone() -diff --git a/python/mozbuild/mozbuild/makeutil.py b/python/mozbuild/mozbuild/makeutil.py -index fcd45bed2..f77c5d2c3 100644 ---- a/python/mozbuild/mozbuild/makeutil.py -+++ b/python/mozbuild/mozbuild/makeutil.py -@@ -2,11 +2,10 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import -+ - - import os - import re --from types import StringTypes - from collections import Iterable - - -@@ -66,7 +65,7 @@ class _SimpleOrderedSet(object): - self._list = [] - self._set = set() - -- def __nonzero__(self): -+ def __bool__(self): - return bool(self._set) - - def __iter__(self): -@@ -103,19 +102,19 @@ class Rule(object): - - def add_targets(self, targets): - '''Add additional targets to the rule.''' -- assert isinstance(targets, Iterable) and not isinstance(targets, StringTypes) -+ assert isinstance(targets, Iterable) and not isinstance(targets, str) - self._targets.update(targets) - return self - - def add_dependencies(self, deps): - '''Add dependencies to the rule.''' -- assert isinstance(deps, Iterable) and not isinstance(deps, StringTypes) -+ assert isinstance(deps, Iterable) and not isinstance(deps, str) - self._dependencies.update(deps) - return self - - def add_commands(self, commands): - '''Add commands to the rule.''' -- assert isinstance(commands, Iterable) and not isinstance(commands, StringTypes) -+ assert isinstance(commands, Iterable) and not isinstance(commands, str) - self._commands.extend(commands) - return self - -@@ -139,13 +138,16 @@ class Rule(object): - ''' - if not self._targets: - return -- fh.write('%s:' % ' '.join(self._targets)) -+ wstring = '%s:' % ' '.join(self._targets) - if self._dependencies: -- fh.write(' %s' % ' '.join(self.dependencies())) -- fh.write('\n') -+ wstring += ' %s' % ' '.join(self.dependencies()) -+ wstring += '\n' - for cmd in self._commands: -- fh.write('\t%s\n' % cmd) -- -+ wstring += '\t%s\n' % cmd -+ try: -+ fh.write(wstring.encode('utf-8')) -+ except TypeError: -+ fh.write(wstring) - - # colon followed by anything except a slash (Windows path detection) - _depfilesplitter = re.compile(r':(?![\\/])') -diff --git a/python/mozbuild/mozbuild/mozinfo.py b/python/mozbuild/mozbuild/mozinfo.py -index 7e7ad1b2a..f03f20ba3 100755 ---- a/python/mozbuild/mozbuild/mozinfo.py -+++ b/python/mozbuild/mozbuild/mozinfo.py -@@ -5,7 +5,7 @@ - # This module produces a JSON file that provides basic build info and - # configuration metadata. - --from __future__ import absolute_import -+ - - import os - import re -@@ -33,7 +33,7 @@ def build_dict(config, env=os.environ): - d['mozconfig'] = config.mozconfig - - # os -- o = substs["OS_TARGET"] -+ o = str(substs["OS_TARGET"]) - known_os = {"Linux": "linux", - "WINNT": "win", - "Darwin": "mac", -@@ -148,7 +148,7 @@ def write_mozinfo(file, config, env=os.environ): - and what keys are produced. - """ - build_conf = build_dict(config, env) -- if isinstance(file, basestring): -- file = open(file, 'wb') -+ if isinstance(file, str): -+ file = open(file, 'w') - - json.dump(build_conf, file, sort_keys=True, indent=4) -diff --git a/python/mozbuild/mozbuild/preprocessor.py b/python/mozbuild/mozbuild/preprocessor.py -index 6780b8b72..19e59884e 100644 ---- a/python/mozbuild/mozbuild/preprocessor.py -+++ b/python/mozbuild/mozbuild/preprocessor.py -@@ -27,7 +27,8 @@ import os - import re - from optparse import OptionParser - import errno --from makeutil import Makefile -+from .makeutil import Makefile -+from functools import reduce - - # hack around win32 mangling our line endings - # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65443 -@@ -230,7 +231,7 @@ class Expression: - def __repr__(self): - return self.value.__repr__() - -- class ParseError(StandardError): -+ class ParseError(Exception): - """ - Error raised when parsing fails. - It has two members, offset and content, which give the offset of the -@@ -278,7 +279,7 @@ class Preprocessor: - self.context = Context() - for k,v in {'FILE': '', - 'LINE': 0, -- 'DIRECTORY': os.path.abspath('.')}.iteritems(): -+ 'DIRECTORY': os.path.abspath('.')}.items(): - self.context[k] = v - self.actionLevel = 0 - self.disableLevel = 0 -@@ -292,21 +293,21 @@ class Preprocessor: - self.cmds = {} - for cmd, level in {'define': 0, - 'undef': 0, -- 'if': sys.maxint, -- 'ifdef': sys.maxint, -- 'ifndef': sys.maxint, -+ 'if': sys.maxsize, -+ 'ifdef': sys.maxsize, -+ 'ifndef': sys.maxsize, - 'else': 1, - 'elif': 1, - 'elifdef': 1, - 'elifndef': 1, -- 'endif': sys.maxint, -+ 'endif': sys.maxsize, - 'expand': 0, - 'literal': 0, - 'filter': 0, - 'unfilter': 0, - 'include': 0, - 'includesubst': 0, -- 'error': 0}.iteritems(): -+ 'error': 0}.items(): - self.cmds[cmd] = (level, getattr(self, 'do_' + cmd)) - self.out = sys.stdout - self.setMarker(marker) -@@ -434,7 +435,7 @@ class Preprocessor: - filteredLine = self.applyFilters(aLine) - if filteredLine != aLine: - self.actionLevel = 2 -- self.out.write(filteredLine) -+ self.out.write(filteredLine.encode('utf-8')) - - def handleCommandLine(self, args, defaultToStdin = False): - """ -@@ -468,7 +469,7 @@ class Preprocessor: - raise Preprocessor.Error(self, "--depend doesn't work with stdout", - None) - try: -- from makeutil import Makefile -+ from .makeutil import Makefile - except: - raise Preprocessor.Error(self, "--depend requires the " - "mozbuild.makeutil module", None) -@@ -683,7 +684,7 @@ class Preprocessor: - current = dict(self.filters) - for f in filters: - current[f] = getattr(self, 'filter_' + f) -- filterNames = current.keys() -+ filterNames = list(current.keys()) - filterNames.sort() - self.filters = [(fn, current[fn]) for fn in filterNames] - return -@@ -693,7 +694,7 @@ class Preprocessor: - for f in filters: - if f in current: - del current[f] -- filterNames = current.keys() -+ filterNames = list(current.keys()) - filterNames.sort() - self.filters = [(fn, current[fn]) for fn in filterNames] - return -@@ -738,7 +739,7 @@ class Preprocessor: - args can either be a file name, or a file-like object. - Files should be opened, and will be closed after processing. - """ -- isName = type(args) == str or type(args) == unicode -+ isName = type(args) == str or type(args) == str - oldCheckLineNumbers = self.checkLineNumbers - self.checkLineNumbers = False - if isName: -diff --git a/python/mozbuild/mozbuild/shellutil.py b/python/mozbuild/mozbuild/shellutil.py -index 185a970ee..c0c15f8f2 100644 ---- a/python/mozbuild/mozbuild/shellutil.py -+++ b/python/mozbuild/mozbuild/shellutil.py -@@ -15,7 +15,7 @@ def _tokens2re(**tokens): - # which matches the pattern and captures it in a named match group. - # The group names and patterns are given as arguments. - all_tokens = '|'.join('(?P<%s>%s)' % (name, value) -- for name, value in tokens.iteritems()) -+ for name, value in tokens.items()) - nonescaped = r'(?<!\\)(?:%s)' % all_tokens - - # The final pattern matches either the above pattern, or an escaped -@@ -96,7 +96,7 @@ class _ClineSplitter(object): - self.cline = self.cline[m.end():] - - match = {name: value -- for name, value in m.groupdict().items() if value} -+ for name, value in list(m.groupdict().items()) if value} - if 'quote' in match: - # " or ' start a quoted string - if match['quote'] == '"': -@@ -144,7 +144,7 @@ class _ClineSplitter(object): - self._push(self.cline[:m.start()]) - self.cline = self.cline[m.end():] - match = {name: value -- for name, value in m.groupdict().items() if value} -+ for name, value in list(m.groupdict().items()) if value} - if 'quote' in match: - # a double quote ends the quoted string, so go back to - # unquoted parsing -diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py -index a05059f8a..355a96165 100644 ---- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py -+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py -@@ -2,9 +2,9 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import unicode_literals - --import cPickle as pickle -+ -+import pickle as pickle - import json - import os - import unittest -@@ -333,7 +333,7 @@ class TestRecursiveMakeBackend(BackendTester): - ], - } - -- for var, val in expected.items(): -+ for var, val in list(expected.items()): - # print("test_variable_passthru[%s]" % (var)) - found = [str for str in lines if str.startswith(var)] - self.assertEqual(found, val) -@@ -372,7 +372,7 @@ class TestRecursiveMakeBackend(BackendTester): - ], - } - -- for var, val in expected.items(): -+ for var, val in list(expected.items()): - found = [str for str in lines if str.startswith(var)] - self.assertEqual(found, val) - -@@ -563,7 +563,7 @@ class TestRecursiveMakeBackend(BackendTester): - - # This is not the most robust test in the world, but it gets the job - # done. -- entries = [e for e in m._dests.keys() if '**' in e] -+ entries = [e for e in list(m._dests.keys()) if '**' in e] - self.assertEqual(len(entries), 1) - self.assertIn('support/**', entries[0]) - -@@ -590,11 +590,11 @@ class TestRecursiveMakeBackend(BackendTester): - set(['child/test_sub.js', - 'child/data/**', - 'child/another-file.sjs'])) -- for key in test_installs.keys(): -+ for key in list(test_installs.keys()): - self.assertIn(key, test_installs) - - synthesized_manifest = InstallManifest() -- for item, installs in test_installs.items(): -+ for item, installs in list(test_installs.items()): - for install_info in installs: - if len(install_info) == 3: - synthesized_manifest.add_pattern_link(*install_info) -@@ -602,7 +602,7 @@ class TestRecursiveMakeBackend(BackendTester): - synthesized_manifest.add_link(*install_info) - - self.assertEqual(len(synthesized_manifest), 3) -- for item, info in synthesized_manifest._dests.items(): -+ for item, info in list(synthesized_manifest._dests.items()): - self.assertIn(item, m) - self.assertEqual(info, m._dests[item]) - -@@ -864,7 +864,7 @@ class TestRecursiveMakeBackend(BackendTester): - expected[mozpath.join(env.topobjdir, 'final-target')] = [ - 'FINAL_TARGET = $(DEPTH)/random-final-target' - ] -- for key, expected_rules in expected.iteritems(): -+ for key, expected_rules in expected.items(): - backend_path = mozpath.join(key, 'backend.mk') - lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]] - found = [str for str in lines if -diff --git a/python/mozbuild/mozbuild/test/configure/common.py b/python/mozbuild/mozbuild/test/configure/common.py -index 150c6e393..5e2c2afaa 100644 ---- a/python/mozbuild/mozbuild/test/configure/common.py -+++ b/python/mozbuild/mozbuild/test/configure/common.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -+ - - import copy - import errno -@@ -16,7 +16,7 @@ from mozbuild.configure import ConfigureSandbox - from mozbuild.util import ReadOnlyNamespace - from mozpack import path as mozpath - --from StringIO import StringIO -+from io import StringIO - from which import WhichError - - from buildconfig import ( -@@ -77,10 +77,10 @@ class ConfigureTestSandbox(ConfigureSandbox): - self._search_path = environ.get('PATH', '').split(os.pathsep) - - self._subprocess_paths = { -- mozpath.abspath(k): v for k, v in paths.iteritems() if v -+ mozpath.abspath(k): v for k, v in paths.items() if v - } - -- paths = paths.keys() -+ paths = list(paths.keys()) - - environ = dict(environ) - if 'CONFIG_SHELL' not in environ: -diff --git a/python/mozbuild/mozbuild/test/configure/lint.py b/python/mozbuild/mozbuild/test/configure/lint.py -index 98f5f4fe7..a549b4bcf 100644 ---- a/python/mozbuild/mozbuild/test/configure/lint.py -+++ b/python/mozbuild/mozbuild/test/configure/lint.py -@@ -2,11 +2,11 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -+ - - import os - import unittest --from StringIO import StringIO -+from io import StringIO - from mozunit import main - from buildconfig import ( - topobjdir, -@@ -40,9 +40,7 @@ class LintMeta(type): - return type.__new__(mcs, name, bases, attrs) - - --class Lint(unittest.TestCase): -- __metaclass__ = LintMeta -- -+class Lint(unittest.TestCase, metaclass=LintMeta): - def setUp(self): - self._curdir = os.getcwd() - os.chdir(topobjdir) -diff --git a/python/mozbuild/mozbuild/test/configure/test_checks_configure.py b/python/mozbuild/mozbuild/test/configure/test_checks_configure.py -index c60000bb2..07091c077 100644 ---- a/python/mozbuild/mozbuild/test/configure/test_checks_configure.py -+++ b/python/mozbuild/mozbuild/test/configure/test_checks_configure.py -@@ -2,9 +2,9 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals - --from StringIO import StringIO -+ -+from io import StringIO - import os - import sys - import textwrap -@@ -447,7 +447,7 @@ class TestChecksConfigure(unittest.TestCase): - checking for a... %s - ''' % self.OTHER_A)) - -- dirs = map(mozpath.dirname, (self.OTHER_A, self.KNOWN_A)) -+ dirs = list(map(mozpath.dirname, (self.OTHER_A, self.KNOWN_A))) - config, out, status = self.get_result(textwrap.dedent('''\ - check_prog("A", ("known-a",), paths=["%s"]) - ''' % os.pathsep.join(dirs))) -@@ -457,7 +457,7 @@ class TestChecksConfigure(unittest.TestCase): - checking for a... %s - ''' % self.OTHER_A)) - -- dirs = map(mozpath.dirname, (self.KNOWN_A, self.KNOWN_B)) -+ dirs = list(map(mozpath.dirname, (self.KNOWN_A, self.KNOWN_B))) - config, out, status = self.get_result(textwrap.dedent('''\ - check_prog("A", ("known-a",), paths=["%s", "%s"]) - ''' % (os.pathsep.join(dirs), self.OTHER_A))) -diff --git a/python/mozbuild/mozbuild/test/configure/test_compile_checks.py b/python/mozbuild/mozbuild/test/configure/test_compile_checks.py -index b5be3bf2e..282000bb2 100644 ---- a/python/mozbuild/mozbuild/test/configure/test_compile_checks.py -+++ b/python/mozbuild/mozbuild/test/configure/test_compile_checks.py -@@ -2,14 +2,14 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -+ - - import os - import textwrap - import unittest - import mozpack.path as mozpath - --from StringIO import StringIO -+from io import StringIO - - from buildconfig import topsrcdir - from common import ConfigureTestSandbox -diff --git a/python/mozbuild/mozbuild/test/configure/test_configure.py b/python/mozbuild/mozbuild/test/configure/test_configure.py -index f37e2701f..eb0ca84fb 100644 ---- a/python/mozbuild/mozbuild/test/configure/test_configure.py -+++ b/python/mozbuild/mozbuild/test/configure/test_configure.py -@@ -2,9 +2,9 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals - --from StringIO import StringIO -+ -+from io import StringIO - import os - import sys - import textwrap -@@ -43,7 +43,7 @@ class TestConfigure(unittest.TestCase): - - if '--help' in options: - return out.getvalue(), config -- self.assertEquals('', out.getvalue()) -+ self.assertEqual('', out.getvalue()) - return config - - def moz_configure(self, source): -@@ -55,7 +55,7 @@ class TestConfigure(unittest.TestCase): - def test_defaults(self): - config = self.get_config() - self.maxDiff = None -- self.assertEquals({ -+ self.assertEqual({ - 'CHOICES': NegativeOptionValue(), - 'DEFAULTED': PositiveOptionValue(('not-simple',)), - 'IS_GCC': NegativeOptionValue(), -@@ -71,9 +71,9 @@ class TestConfigure(unittest.TestCase): - def test_help(self): - help, config = self.get_config(['--help'], prog='configure') - -- self.assertEquals({}, config) -+ self.assertEqual({}, config) - self.maxDiff = None -- self.assertEquals( -+ self.assertEqual( - 'Usage: configure [options]\n' - '\n' - 'Options: [defaults in brackets after descriptions]\n' -@@ -109,7 +109,7 @@ class TestConfigure(unittest.TestCase): - ): - self.assertNotIn('ENABLED_SIMPLE', config) - self.assertIn('SIMPLE', config) -- self.assertEquals(NegativeOptionValue(), config['SIMPLE']) -+ self.assertEqual(NegativeOptionValue(), config['SIMPLE']) - - for config in ( - self.get_config(['--enable-simple']), -@@ -117,7 +117,7 @@ class TestConfigure(unittest.TestCase): - ): - self.assertIn('ENABLED_SIMPLE', config) - self.assertIn('SIMPLE', config) -- self.assertEquals(PositiveOptionValue(), config['SIMPLE']) -+ self.assertEqual(PositiveOptionValue(), config['SIMPLE']) - self.assertIs(config['SIMPLE'], config['ENABLED_SIMPLE']) - - # --enable-simple doesn't take values. -@@ -135,7 +135,7 @@ class TestConfigure(unittest.TestCase): - env={'MOZ_WITH_ENV': '1'}), - ): - self.assertIn('WITH_ENV', config) -- self.assertEquals(NegativeOptionValue(), config['WITH_ENV']) -+ self.assertEqual(NegativeOptionValue(), config['WITH_ENV']) - - for config in ( - self.get_config(['--enable-with-env']), -@@ -145,7 +145,7 @@ class TestConfigure(unittest.TestCase): - env={'MOZ_WITH_ENV': ''}), - ): - self.assertIn('WITH_ENV', config) -- self.assertEquals(PositiveOptionValue(), config['WITH_ENV']) -+ self.assertEqual(PositiveOptionValue(), config['WITH_ENV']) - - with self.assertRaises(InvalidOptionError): - self.get_config(['--enable-with-env=value']) -@@ -160,23 +160,23 @@ class TestConfigure(unittest.TestCase): - self.get_config(['--enable-values', '--disable-values']), - ): - self.assertIn(name, config) -- self.assertEquals(NegativeOptionValue(), config[name]) -+ self.assertEqual(NegativeOptionValue(), config[name]) - - for config in ( - self.get_config(['--enable-values']), - self.get_config(['--disable-values', '--enable-values']), - ): - self.assertIn(name, config) -- self.assertEquals(PositiveOptionValue(), config[name]) -+ self.assertEqual(PositiveOptionValue(), config[name]) - - config = self.get_config(['--enable-values=foo']) - self.assertIn(name, config) -- self.assertEquals(PositiveOptionValue(('foo',)), config[name]) -+ self.assertEqual(PositiveOptionValue(('foo',)), config[name]) - - config = self.get_config(['--enable-values=foo,bar']) - self.assertIn(name, config) - self.assertTrue(config[name]) -- self.assertEquals(PositiveOptionValue(('foo', 'bar')), config[name]) -+ self.assertEqual(PositiveOptionValue(('foo', 'bar')), config[name]) - - def test_values2(self): - self.test_values('VALUES2') -@@ -187,12 +187,12 @@ class TestConfigure(unittest.TestCase): - def test_returned_default(self): - config = self.get_config(['--enable-simple']) - self.assertIn('DEFAULTED', config) -- self.assertEquals( -+ self.assertEqual( - PositiveOptionValue(('simple',)), config['DEFAULTED']) - - config = self.get_config(['--disable-simple']) - self.assertIn('DEFAULTED', config) -- self.assertEquals( -+ self.assertEqual( - PositiveOptionValue(('not-simple',)), config['DEFAULTED']) - - def test_returned_choices(self): -@@ -200,13 +200,13 @@ class TestConfigure(unittest.TestCase): - config = self.get_config( - ['--enable-values=alpha', '--returned-choices=%s' % val]) - self.assertIn('CHOICES', config) -- self.assertEquals(PositiveOptionValue((val,)), config['CHOICES']) -+ self.assertEqual(PositiveOptionValue((val,)), config['CHOICES']) - - for val in ('0', '1', '2'): - config = self.get_config( - ['--enable-values=numeric', '--returned-choices=%s' % val]) - self.assertIn('CHOICES', config) -- self.assertEquals(PositiveOptionValue((val,)), config['CHOICES']) -+ self.assertEqual(PositiveOptionValue((val,)), config['CHOICES']) - - with self.assertRaises(InvalidOptionError): - self.get_config(['--enable-values=numeric', -@@ -218,12 +218,12 @@ class TestConfigure(unittest.TestCase): - def test_included(self): - config = self.get_config(env={'CC': 'gcc'}) - self.assertIn('IS_GCC', config) -- self.assertEquals(config['IS_GCC'], True) -+ self.assertEqual(config['IS_GCC'], True) - - config = self.get_config( - ['--enable-include=extra.configure', '--extra']) - self.assertIn('EXTRA', config) -- self.assertEquals(PositiveOptionValue(), config['EXTRA']) -+ self.assertEqual(PositiveOptionValue(), config['EXTRA']) - - with self.assertRaises(InvalidOptionError): - self.get_config(['--extra']) -@@ -231,7 +231,7 @@ class TestConfigure(unittest.TestCase): - def test_template(self): - config = self.get_config(env={'CC': 'gcc'}) - self.assertIn('CFLAGS', config) -- self.assertEquals(config['CFLAGS'], ['-Werror=foobar']) -+ self.assertEqual(config['CFLAGS'], ['-Werror=foobar']) - - config = self.get_config(env={'CC': 'clang'}) - self.assertNotIn('CFLAGS', config) -@@ -288,7 +288,7 @@ class TestConfigure(unittest.TestCase): - sandbox - ) - -- import __builtin__ -+ import builtins - self.assertIs(sandbox['foo'](), __builtin__) - - exec_(textwrap.dedent(''' -@@ -300,7 +300,7 @@ class TestConfigure(unittest.TestCase): - ) - - f = sandbox['foo']() -- self.assertEquals(f.name, os.devnull) -+ self.assertEqual(f.name, os.devnull) - f.close() - - # This unlocks the sandbox -@@ -336,8 +336,8 @@ class TestConfigure(unittest.TestCase): - self.assertIs(sandbox['foo'](), sandbox) - - # Nothing leaked from the function being executed -- self.assertEquals(sandbox.keys(), ['__builtins__', 'foo']) -- self.assertEquals(sandbox['__builtins__'], ConfigureSandbox.BUILTINS) -+ self.assertEqual(list(sandbox.keys()), ['__builtins__', 'foo']) -+ self.assertEqual(sandbox['__builtins__'], ConfigureSandbox.BUILTINS) - - exec_(textwrap.dedent(''' - @template -@@ -354,7 +354,7 @@ class TestConfigure(unittest.TestCase): - with self.assertRaises(NameError) as e: - sandbox._depends[sandbox['bar']].result() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "global name 'sys' is not defined") - - def test_apply_imports(self): -@@ -380,28 +380,28 @@ class TestConfigure(unittest.TestCase): - sandbox - ) - -- self.assertEquals(len(imports), 1) -+ self.assertEqual(len(imports), 1) - - def test_os_path(self): - config = self.get_config(['--with-imports=%s' % __file__]) - self.assertIn('HAS_ABSPATH', config) -- self.assertEquals(config['HAS_ABSPATH'], True) -+ self.assertEqual(config['HAS_ABSPATH'], True) - self.assertIn('HAS_GETATIME', config) -- self.assertEquals(config['HAS_GETATIME'], True) -+ self.assertEqual(config['HAS_GETATIME'], True) - self.assertIn('HAS_GETATIME2', config) -- self.assertEquals(config['HAS_GETATIME2'], False) -+ self.assertEqual(config['HAS_GETATIME2'], False) - - def test_template_call(self): - config = self.get_config(env={'CC': 'gcc'}) - self.assertIn('TEMPLATE_VALUE', config) -- self.assertEquals(config['TEMPLATE_VALUE'], 42) -+ self.assertEqual(config['TEMPLATE_VALUE'], 42) - self.assertIn('TEMPLATE_VALUE_2', config) -- self.assertEquals(config['TEMPLATE_VALUE_2'], 21) -+ self.assertEqual(config['TEMPLATE_VALUE_2'], 21) - - def test_template_imports(self): - config = self.get_config(['--enable-imports-in-template']) - self.assertIn('PLATFORM', config) -- self.assertEquals(config['PLATFORM'], sys.platform) -+ self.assertEqual(config['PLATFORM'], sys.platform) - - def test_decorators(self): - config = {} -@@ -419,27 +419,27 @@ class TestConfigure(unittest.TestCase): - return self.get_config(*args, configure='set_config.configure') - - help, config = get_config(['--help']) -- self.assertEquals(config, {}) -+ self.assertEqual(config, {}) - - config = get_config(['--set-foo']) - self.assertIn('FOO', config) -- self.assertEquals(config['FOO'], True) -+ self.assertEqual(config['FOO'], True) - - config = get_config(['--set-bar']) - self.assertNotIn('FOO', config) - self.assertIn('BAR', config) -- self.assertEquals(config['BAR'], True) -+ self.assertEqual(config['BAR'], True) - - config = get_config(['--set-value=qux']) - self.assertIn('VALUE', config) -- self.assertEquals(config['VALUE'], 'qux') -+ self.assertEqual(config['VALUE'], 'qux') - - config = get_config(['--set-name=hoge']) - self.assertIn('hoge', config) -- self.assertEquals(config['hoge'], True) -+ self.assertEqual(config['hoge'], True) - - config = get_config([]) -- self.assertEquals(config, {'BAR': False}) -+ self.assertEqual(config, {'BAR': False}) - - with self.assertRaises(ConfigureError): - # Both --set-foo and --set-name=FOO are going to try to -@@ -454,11 +454,11 @@ class TestConfigure(unittest.TestCase): - set_config('QUX', 'qux', when='--with-qux') - '''): - config = self.get_config() -- self.assertEquals(config, { -+ self.assertEqual(config, { - 'FOO': 'foo', - }) - config = self.get_config(['--with-qux']) -- self.assertEquals(config, { -+ self.assertEqual(config, { - 'FOO': 'foo', - 'QUX': 'qux', - }) -@@ -468,27 +468,27 @@ class TestConfigure(unittest.TestCase): - return self.get_config(*args, configure='set_define.configure') - - help, config = get_config(['--help']) -- self.assertEquals(config, {'DEFINES': {}}) -+ self.assertEqual(config, {'DEFINES': {}}) - - config = get_config(['--set-foo']) - self.assertIn('FOO', config['DEFINES']) -- self.assertEquals(config['DEFINES']['FOO'], True) -+ self.assertEqual(config['DEFINES']['FOO'], True) - - config = get_config(['--set-bar']) - self.assertNotIn('FOO', config['DEFINES']) - self.assertIn('BAR', config['DEFINES']) -- self.assertEquals(config['DEFINES']['BAR'], True) -+ self.assertEqual(config['DEFINES']['BAR'], True) - - config = get_config(['--set-value=qux']) - self.assertIn('VALUE', config['DEFINES']) -- self.assertEquals(config['DEFINES']['VALUE'], 'qux') -+ self.assertEqual(config['DEFINES']['VALUE'], 'qux') - - config = get_config(['--set-name=hoge']) - self.assertIn('hoge', config['DEFINES']) -- self.assertEquals(config['DEFINES']['hoge'], True) -+ self.assertEqual(config['DEFINES']['hoge'], True) - - config = get_config([]) -- self.assertEquals(config['DEFINES'], {'BAR': False}) -+ self.assertEqual(config['DEFINES'], {'BAR': False}) - - with self.assertRaises(ConfigureError): - # Both --set-foo and --set-name=FOO are going to try to -@@ -503,11 +503,11 @@ class TestConfigure(unittest.TestCase): - set_define('QUX', 'qux', when='--with-qux') - '''): - config = self.get_config() -- self.assertEquals(config['DEFINES'], { -+ self.assertEqual(config['DEFINES'], { - 'FOO': 'foo', - }) - config = self.get_config(['--with-qux']) -- self.assertEquals(config['DEFINES'], { -+ self.assertEqual(config['DEFINES'], { - 'FOO': 'foo', - 'QUX': 'qux', - }) -@@ -518,19 +518,19 @@ class TestConfigure(unittest.TestCase): - *args, configure='imply_option/simple.configure') - - help, config = get_config(['--help']) -- self.assertEquals(config, {}) -+ self.assertEqual(config, {}) - - config = get_config([]) -- self.assertEquals(config, {}) -+ self.assertEqual(config, {}) - - config = get_config(['--enable-foo']) - self.assertIn('BAR', config) -- self.assertEquals(config['BAR'], PositiveOptionValue()) -+ self.assertEqual(config['BAR'], PositiveOptionValue()) - - with self.assertRaises(InvalidOptionError) as e: - get_config(['--enable-foo', '--disable-bar']) - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - "'--enable-bar' implied by '--enable-foo' conflicts with " - "'--disable-bar' from the command-line") -@@ -541,31 +541,31 @@ class TestConfigure(unittest.TestCase): - *args, configure='imply_option/negative.configure') - - help, config = get_config(['--help']) -- self.assertEquals(config, {}) -+ self.assertEqual(config, {}) - - config = get_config([]) -- self.assertEquals(config, {}) -+ self.assertEqual(config, {}) - - config = get_config(['--enable-foo']) - self.assertIn('BAR', config) -- self.assertEquals(config['BAR'], NegativeOptionValue()) -+ self.assertEqual(config['BAR'], NegativeOptionValue()) - - with self.assertRaises(InvalidOptionError) as e: - get_config(['--enable-foo', '--enable-bar']) - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - "'--disable-bar' implied by '--enable-foo' conflicts with " - "'--enable-bar' from the command-line") - - config = get_config(['--disable-hoge']) - self.assertIn('BAR', config) -- self.assertEquals(config['BAR'], NegativeOptionValue()) -+ self.assertEqual(config['BAR'], NegativeOptionValue()) - - with self.assertRaises(InvalidOptionError) as e: - get_config(['--disable-hoge', '--enable-bar']) - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - "'--disable-bar' implied by '--disable-hoge' conflicts with " - "'--enable-bar' from the command-line") -@@ -576,23 +576,23 @@ class TestConfigure(unittest.TestCase): - *args, configure='imply_option/values.configure') - - help, config = get_config(['--help']) -- self.assertEquals(config, {}) -+ self.assertEqual(config, {}) - - config = get_config([]) -- self.assertEquals(config, {}) -+ self.assertEqual(config, {}) - - config = get_config(['--enable-foo=a']) - self.assertIn('BAR', config) -- self.assertEquals(config['BAR'], PositiveOptionValue(('a',))) -+ self.assertEqual(config['BAR'], PositiveOptionValue(('a',))) - - config = get_config(['--enable-foo=a,b']) - self.assertIn('BAR', config) -- self.assertEquals(config['BAR'], PositiveOptionValue(('a','b'))) -+ self.assertEqual(config['BAR'], PositiveOptionValue(('a','b'))) - - with self.assertRaises(InvalidOptionError) as e: - get_config(['--enable-foo=a,b', '--disable-bar']) - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - "'--enable-bar=a,b' implied by '--enable-foo' conflicts with " - "'--disable-bar' from the command-line") -@@ -603,15 +603,15 @@ class TestConfigure(unittest.TestCase): - *args, configure='imply_option/infer.configure') - - help, config = get_config(['--help']) -- self.assertEquals(config, {}) -+ self.assertEqual(config, {}) - - config = get_config([]) -- self.assertEquals(config, {}) -+ self.assertEqual(config, {}) - - with self.assertRaises(InvalidOptionError) as e: - get_config(['--enable-foo', '--disable-bar']) - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - "'--enable-bar' implied by '--enable-foo' conflicts with " - "'--disable-bar' from the command-line") -@@ -619,7 +619,7 @@ class TestConfigure(unittest.TestCase): - with self.assertRaises(ConfigureError) as e: - self.get_config([], configure='imply_option/infer_ko.configure') - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - "Cannot infer what implies '--enable-bar'. Please add a `reason` " - "to the `imply_option` call.") -@@ -630,25 +630,25 @@ class TestConfigure(unittest.TestCase): - *args, configure='imply_option/imm.configure') - - help, config = get_config(['--help']) -- self.assertEquals(config, {}) -+ self.assertEqual(config, {}) - - config = get_config([]) -- self.assertEquals(config, {}) -+ self.assertEqual(config, {}) - - config_path = mozpath.abspath( - mozpath.join(test_data_path, 'imply_option', 'imm.configure')) - -- with self.assertRaisesRegexp(InvalidOptionError, -+ with self.assertRaisesRegex(InvalidOptionError, - "--enable-foo' implied by 'imply_option at %s:7' conflicts with " - "'--disable-foo' from the command-line" % config_path): - get_config(['--disable-foo']) - -- with self.assertRaisesRegexp(InvalidOptionError, -+ with self.assertRaisesRegex(InvalidOptionError, - "--enable-bar=foo,bar' implied by 'imply_option at %s:16' conflicts" - " with '--enable-bar=a,b,c' from the command-line" % config_path): - get_config(['--enable-bar=a,b,c']) - -- with self.assertRaisesRegexp(InvalidOptionError, -+ with self.assertRaisesRegex(InvalidOptionError, - "--enable-baz=BAZ' implied by 'imply_option at %s:25' conflicts" - " with '--enable-baz=QUUX' from the command-line" % config_path): - get_config(['--enable-baz=QUUX']) -@@ -660,7 +660,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "`--with-foo`, emitted from `%s` line 2, is unknown." - % mozpath.join(test_data_path, 'moz.configure')) - -@@ -675,7 +675,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "Unexpected type: 'int'") - - def test_imply_option_when(self): -@@ -686,12 +686,12 @@ class TestConfigure(unittest.TestCase): - set_config('QUX', depends('--with-qux')(lambda x: x)) - '''): - config = self.get_config() -- self.assertEquals(config, { -+ self.assertEqual(config, { - 'QUX': NegativeOptionValue(), - }) - - config = self.get_config(['--with-foo']) -- self.assertEquals(config, { -+ self.assertEqual(config, { - 'QUX': PositiveOptionValue(), - }) - -@@ -700,7 +700,7 @@ class TestConfigure(unittest.TestCase): - with self.moz_configure('option("--with-foo", help="foo")'): - self.get_config() - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - 'Option `--with-foo` is not handled ; reference it with a @depends' - ) -@@ -712,7 +712,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - 'Option `--with-foo` already defined' - ) -@@ -724,7 +724,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - 'Option `MOZ_FOO` already defined' - ) -@@ -736,7 +736,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - 'Option `MOZ_FOO` already defined' - ) -@@ -748,7 +748,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - 'Option `MOZ_FOO` already defined' - ) -@@ -760,7 +760,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - 'Option `--with-foo` already defined' - ) -@@ -776,18 +776,18 @@ class TestConfigure(unittest.TestCase): - set_config('QUX', depends('--with-qux', when='--with-foo')(lambda x: x)) - '''): - config = self.get_config() -- self.assertEquals(config, { -+ self.assertEqual(config, { - 'FOO': NegativeOptionValue(), - }) - - config = self.get_config(['--with-foo']) -- self.assertEquals(config, { -+ self.assertEqual(config, { - 'FOO': PositiveOptionValue(), - 'QUX': NegativeOptionValue(), - }) - - config = self.get_config(['--with-foo', '--with-qux']) -- self.assertEquals(config, { -+ self.assertEqual(config, { - 'FOO': PositiveOptionValue(), - 'QUX': PositiveOptionValue(), - }) -@@ -795,7 +795,7 @@ class TestConfigure(unittest.TestCase): - with self.assertRaises(InvalidOptionError) as e: - self.get_config(['--with-bar']) - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - '--with-bar is not available in this configuration' - ) -@@ -803,7 +803,7 @@ class TestConfigure(unittest.TestCase): - with self.assertRaises(InvalidOptionError) as e: - self.get_config(['--with-qux']) - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - '--with-qux is not available in this configuration' - ) -@@ -811,18 +811,18 @@ class TestConfigure(unittest.TestCase): - with self.assertRaises(InvalidOptionError) as e: - self.get_config(['QUX=1']) - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - 'QUX is not available in this configuration' - ) - - config = self.get_config(env={'QUX': '1'}) -- self.assertEquals(config, { -+ self.assertEqual(config, { - 'FOO': NegativeOptionValue(), - }) - - help, config = self.get_config(['--help']) -- self.assertEquals(help, textwrap.dedent('''\ -+ self.assertEqual(help, textwrap.dedent('''\ - Usage: configure [options] - - Options: [defaults in brackets after descriptions] -@@ -833,7 +833,7 @@ class TestConfigure(unittest.TestCase): - ''')) - - help, config = self.get_config(['--help', '--with-foo']) -- self.assertEquals(help, textwrap.dedent('''\ -+ self.assertEqual(help, textwrap.dedent('''\ - Usage: configure [options] - - Options: [defaults in brackets after descriptions] -@@ -851,7 +851,7 @@ class TestConfigure(unittest.TestCase): - with self.assertRaises(ConfigureError) as e: - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '@depends function needs the same `when` as ' - 'options it depends on') - -@@ -868,7 +868,7 @@ class TestConfigure(unittest.TestCase): - with self.assertRaises(ConfigureError) as e: - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '@depends function needs the same `when` as ' - 'options it depends on') - -@@ -896,7 +896,7 @@ class TestConfigure(unittest.TestCase): - with self.moz_configure('include("../foo.configure")'): - self.get_config() - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - 'Cannot include `%s` because it is not in a subdirectory of `%s`' - % (mozpath.normpath(mozpath.join(test_data_path, '..', -@@ -911,7 +911,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - 'Cannot include `%s` because it was included already.' - % mozpath.normpath(mozpath.join(test_data_path, -@@ -924,7 +924,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, "Unexpected type: 'int'") -+ self.assertEqual(e.exception.message, "Unexpected type: 'int'") - - def test_include_when(self): - with MockedOpen({ -@@ -967,26 +967,26 @@ class TestConfigure(unittest.TestCase): - '''), - }): - config = self.get_config() -- self.assertEquals(config, {}) -+ self.assertEqual(config, {}) - - config = self.get_config(['--with-foo']) -- self.assertEquals(config, {}) -+ self.assertEqual(config, {}) - - config = self.get_config(['--with-bar']) -- self.assertEquals(config, { -+ self.assertEqual(config, { - 'BAR': 'bar', - }) - - with self.assertRaises(InvalidOptionError) as e: - self.get_config(['--with-qux']) - -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - '--with-qux is not available in this configuration' - ) - - config = self.get_config(['--with-foo', '--with-foo-really']) -- self.assertEquals(config, { -+ self.assertEqual(config, { - 'FOO': 'foo', - 'FOO2': True, - }) -@@ -998,7 +998,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, 'Cannot reassign builtins') -+ self.assertEqual(e.exception.message, 'Cannot reassign builtins') - - with self.assertRaises(KeyError) as e: - with self.moz_configure(''' -@@ -1006,7 +1006,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'Cannot assign `foo` because it is neither a ' - '@depends nor a @template') - -@@ -1019,7 +1019,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "@depends needs at least one argument") - - with self.assertRaises(ConfigureError) as e: -@@ -1030,7 +1030,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "'--with-foo' is not a known option. Maybe it's " - "declared too late?") - -@@ -1042,7 +1042,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "Option must not contain an '='") - - with self.assertRaises(TypeError) as e: -@@ -1053,7 +1053,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "Cannot use object of type 'int' as argument " - "to @depends") - -@@ -1065,7 +1065,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "Cannot decorate generator functions with @depends") - - with self.assertRaises(TypeError) as e: -@@ -1074,7 +1074,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "Unexpected type: 'int'") - - with self.assertRaises(ConfigureError) as e: -@@ -1088,7 +1088,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The `foo` function may not be called") - - with self.assertRaises(TypeError) as e: -@@ -1099,7 +1099,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "depends_impl() got an unexpected keyword argument 'foo'") - - def test_depends_when(self): -@@ -1124,12 +1124,12 @@ class TestConfigure(unittest.TestCase): - set_config('QUX', qux) - '''): - config = self.get_config() -- self.assertEquals(config, { -+ self.assertEqual(config, { - 'FOO': 'foo', - }) - - config = self.get_config(['--with-qux']) -- self.assertEquals(config, { -+ self.assertEqual(config, { - 'FOO': 'foo', - 'QUX': 'qux', - }) -@@ -1144,7 +1144,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '@imports must appear after @template') - - with self.assertRaises(ConfigureError) as e: -@@ -1157,7 +1157,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '@imports must appear after @depends') - - for import_ in ( -@@ -1174,7 +1174,7 @@ class TestConfigure(unittest.TestCase): - ''' % import_): - self.get_config() - -- self.assertEquals(e.exception.message, "Unexpected type: 'int'") -+ self.assertEqual(e.exception.message, "Unexpected type: 'int'") - - with self.assertRaises(TypeError) as e: - with self.moz_configure(''' -@@ -1185,7 +1185,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, "Unexpected type: 'int'") -+ self.assertEqual(e.exception.message, "Unexpected type: 'int'") - - with self.assertRaises(ValueError) as e: - with self.moz_configure(''' -@@ -1195,7 +1195,7 @@ class TestConfigure(unittest.TestCase): - '''): - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "Invalid argument to @imports: 'os*'") - - def test_only_when(self): -@@ -1250,7 +1250,7 @@ class TestConfigure(unittest.TestCase): - with self.assertRaises(InvalidOptionError) as e: - self.get_config(['--foo']) - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--foo is not available in this configuration') - - # Cannot depend on an option defined in a only_when block, because we -@@ -1261,7 +1261,7 @@ class TestConfigure(unittest.TestCase): - with self.assertRaises(ConfigureError) as e: - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '@depends function needs the same `when` as ' - 'options it depends on') - -@@ -1278,7 +1278,7 @@ class TestConfigure(unittest.TestCase): - with self.assertRaises(InvalidOptionError) as e: - self.get_config() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--foo is not available in this configuration') - - # And similarly doesn't fail when the condition is true. -diff --git a/python/mozbuild/mozbuild/test/configure/test_lint.py b/python/mozbuild/mozbuild/test/configure/test_lint.py -index 6d8d4c49f..6ad897839 100644 ---- a/python/mozbuild/mozbuild/test/configure/test_lint.py -+++ b/python/mozbuild/mozbuild/test/configure/test_lint.py -@@ -2,9 +2,9 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals - --from StringIO import StringIO -+ -+from io import StringIO - import os - import textwrap - import unittest -@@ -62,7 +62,7 @@ class TestLint(unittest.TestCase): - '''): - self.lint_test() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "`bar` depends on '--help' and `foo`. " - "`foo` must depend on '--help'") - -@@ -85,7 +85,7 @@ class TestLint(unittest.TestCase): - '''): - self.lint_test() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "`bar` depends on '--help' and `foo`. " - "`foo` must depend on '--help'") - -@@ -111,7 +111,7 @@ class TestLint(unittest.TestCase): - '''): - self.lint_test() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "Missing @depends for `foo`: '--help'") - - with self.assertRaises(ConfigureError) as e: -@@ -130,7 +130,7 @@ class TestLint(unittest.TestCase): - '''): - self.lint_test() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "Missing @depends for `foo`: '--help'") - - with self.assertRaises(ConfigureError) as e: -@@ -145,7 +145,7 @@ class TestLint(unittest.TestCase): - '''): - self.lint_test() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "Missing @depends for `foo`: '--help'") - - # This would have failed with "Missing @depends for `foo`: '--help'" -@@ -178,7 +178,7 @@ class TestLint(unittest.TestCase): - '''): - self.lint_test() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "Missing @depends for `foo`: '--help'") - - # There is a default restricted `os` module when there is no explicit -@@ -205,7 +205,7 @@ class TestLint(unittest.TestCase): - '''): - self.lint_test() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "%s:3: The dependency on `--foo` is unused." - % mozpath.join(test_data_path, 'moz.configure')) - -@@ -222,7 +222,7 @@ class TestLint(unittest.TestCase): - '''): - self.lint_test() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "%s:5: The dependency on `bar` is unused." - % mozpath.join(test_data_path, 'moz.configure')) - -@@ -236,7 +236,7 @@ class TestLint(unittest.TestCase): - '''): - self.lint_test() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "%s:2: The dependency on `<lambda>` is unused." - % mozpath.join(test_data_path, 'moz.configure')) - -@@ -257,7 +257,7 @@ class TestLint(unittest.TestCase): - '''): - self.lint_test() - -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "%s:9: The dependency on `qux` is unused." - % mozpath.join(test_data_path, 'moz.configure')) - -diff --git a/python/mozbuild/mozbuild/test/configure/test_moz_configure.py b/python/mozbuild/mozbuild/test/configure/test_moz_configure.py -index b3342e268..7a26e9e09 100644 ---- a/python/mozbuild/mozbuild/test/configure/test_moz_configure.py -+++ b/python/mozbuild/mozbuild/test/configure/test_moz_configure.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -+ - - from mozunit import main - from mozpack import path as mozpath -@@ -27,10 +27,10 @@ class TestMozConfigure(BaseConfigureTest): - shell = mozpath.abspath('/bin/sh') - return result.replace('CONFIG_SHELL=%s ' % shell, '') - -- self.assertEquals('--enable-application=browser', -+ self.assertEqual('--enable-application=browser', - get_value_for(['--enable-application=browser'])) - -- self.assertEquals('--enable-application=browser ' -+ self.assertEqual('--enable-application=browser ' - 'MOZ_VTUNE=1', - get_value_for(['--enable-application=browser', - 'MOZ_VTUNE=1'])) -@@ -39,25 +39,25 @@ class TestMozConfigure(BaseConfigureTest): - environ={'MOZ_VTUNE': '1'}, - mozconfig='ac_add_options --enable-project=js') - -- self.assertEquals('--enable-project=js MOZ_VTUNE=1', -+ self.assertEqual('--enable-project=js MOZ_VTUNE=1', - value) - - # --disable-js-shell is the default, so it's filtered out. -- self.assertEquals('--enable-application=browser', -+ self.assertEqual('--enable-application=browser', - get_value_for(['--enable-application=browser', - '--disable-js-shell'])) - - # Normally, --without-foo would be filtered out because that's the - # default, but since it is a (fake) old-configure option, it always - # appears. -- self.assertEquals('--enable-application=browser --without-foo', -+ self.assertEqual('--enable-application=browser --without-foo', - get_value_for(['--enable-application=browser', - '--without-foo'])) -- self.assertEquals('--enable-application=browser --with-foo', -+ self.assertEqual('--enable-application=browser --with-foo', - get_value_for(['--enable-application=browser', - '--with-foo'])) - -- self.assertEquals("--enable-application=browser '--with-foo=foo bar'", -+ self.assertEqual("--enable-application=browser '--with-foo=foo bar'", - get_value_for(['--enable-application=browser', - '--with-foo=foo bar'])) - -@@ -69,7 +69,7 @@ class TestMozConfigure(BaseConfigureTest): - self.version = version - - def __call__(self, stdin, args): -- this.assertEquals(args, ('-version',)) -+ this.assertEqual(args, ('-version',)) - return 0, self.version, '' - - def check_nsis_version(version): -@@ -84,13 +84,13 @@ class TestMozConfigure(BaseConfigureTest): - with self.assertRaises(SystemExit) as e: - check_nsis_version('v3.0a2') - -- self.assertEquals(check_nsis_version('v3.0b1'), '3.0b1') -- self.assertEquals(check_nsis_version('v3.0b2'), '3.0b2') -- self.assertEquals(check_nsis_version('v3.0rc1'), '3.0rc1') -- self.assertEquals(check_nsis_version('v3.0'), '3.0') -- self.assertEquals(check_nsis_version('v3.0-2'), '3.0') -- self.assertEquals(check_nsis_version('v3.0.1'), '3.0') -- self.assertEquals(check_nsis_version('v3.1'), '3.1') -+ self.assertEqual(check_nsis_version('v3.0b1'), '3.0b1') -+ self.assertEqual(check_nsis_version('v3.0b2'), '3.0b2') -+ self.assertEqual(check_nsis_version('v3.0rc1'), '3.0rc1') -+ self.assertEqual(check_nsis_version('v3.0'), '3.0') -+ self.assertEqual(check_nsis_version('v3.0-2'), '3.0') -+ self.assertEqual(check_nsis_version('v3.0.1'), '3.0') -+ self.assertEqual(check_nsis_version('v3.1'), '3.1') - - - if __name__ == '__main__': -diff --git a/python/mozbuild/mozbuild/test/configure/test_options.py b/python/mozbuild/mozbuild/test/configure/test_options.py -index 9defccb2c..330ce3b1f 100644 ---- a/python/mozbuild/mozbuild/test/configure/test_options.py -+++ b/python/mozbuild/mozbuild/test/configure/test_options.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -+ - - import unittest - -@@ -28,139 +28,139 @@ class Option(Option): - class TestOption(unittest.TestCase): - def test_option(self): - option = Option('--option') -- self.assertEquals(option.prefix, '') -- self.assertEquals(option.name, 'option') -- self.assertEquals(option.env, None) -+ self.assertEqual(option.prefix, '') -+ self.assertEqual(option.name, 'option') -+ self.assertEqual(option.env, None) - self.assertFalse(option.default) - - option = Option('--enable-option') -- self.assertEquals(option.prefix, 'enable') -- self.assertEquals(option.name, 'option') -- self.assertEquals(option.env, None) -+ self.assertEqual(option.prefix, 'enable') -+ self.assertEqual(option.name, 'option') -+ self.assertEqual(option.env, None) - self.assertFalse(option.default) - - option = Option('--disable-option') -- self.assertEquals(option.prefix, 'disable') -- self.assertEquals(option.name, 'option') -- self.assertEquals(option.env, None) -+ self.assertEqual(option.prefix, 'disable') -+ self.assertEqual(option.name, 'option') -+ self.assertEqual(option.env, None) - self.assertTrue(option.default) - - option = Option('--with-option') -- self.assertEquals(option.prefix, 'with') -- self.assertEquals(option.name, 'option') -- self.assertEquals(option.env, None) -+ self.assertEqual(option.prefix, 'with') -+ self.assertEqual(option.name, 'option') -+ self.assertEqual(option.env, None) - self.assertFalse(option.default) - - option = Option('--without-option') -- self.assertEquals(option.prefix, 'without') -- self.assertEquals(option.name, 'option') -- self.assertEquals(option.env, None) -+ self.assertEqual(option.prefix, 'without') -+ self.assertEqual(option.name, 'option') -+ self.assertEqual(option.env, None) - self.assertTrue(option.default) - - option = Option('--without-option-foo', env='MOZ_OPTION') -- self.assertEquals(option.env, 'MOZ_OPTION') -+ self.assertEqual(option.env, 'MOZ_OPTION') - - option = Option(env='MOZ_OPTION') -- self.assertEquals(option.prefix, '') -- self.assertEquals(option.name, None) -- self.assertEquals(option.env, 'MOZ_OPTION') -+ self.assertEqual(option.prefix, '') -+ self.assertEqual(option.name, None) -+ self.assertEqual(option.env, 'MOZ_OPTION') - self.assertFalse(option.default) - - with self.assertRaises(InvalidOptionError) as e: - Option('--option', nargs=0, default=('a',)) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The given `default` doesn't satisfy `nargs`") - - with self.assertRaises(InvalidOptionError) as e: - Option('--option', nargs=1, default=()) -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - 'default must be a bool, a string or a tuple of strings') - - with self.assertRaises(InvalidOptionError) as e: - Option('--option', nargs=1, default=True) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The given `default` doesn't satisfy `nargs`") - - with self.assertRaises(InvalidOptionError) as e: - Option('--option', nargs=1, default=('a', 'b')) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The given `default` doesn't satisfy `nargs`") - - with self.assertRaises(InvalidOptionError) as e: - Option('--option', nargs=2, default=()) -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - 'default must be a bool, a string or a tuple of strings') - - with self.assertRaises(InvalidOptionError) as e: - Option('--option', nargs=2, default=True) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The given `default` doesn't satisfy `nargs`") - - with self.assertRaises(InvalidOptionError) as e: - Option('--option', nargs=2, default=('a',)) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The given `default` doesn't satisfy `nargs`") - - with self.assertRaises(InvalidOptionError) as e: - Option('--option', nargs='?', default=('a', 'b')) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The given `default` doesn't satisfy `nargs`") - - with self.assertRaises(InvalidOptionError) as e: - Option('--option', nargs='+', default=()) -- self.assertEquals( -+ self.assertEqual( - e.exception.message, - 'default must be a bool, a string or a tuple of strings') - - with self.assertRaises(InvalidOptionError) as e: - Option('--option', nargs='+', default=True) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The given `default` doesn't satisfy `nargs`") - - # --disable options with a nargs value that requires at least one - # argument need to be given a default. - with self.assertRaises(InvalidOptionError) as e: - Option('--disable-option', nargs=1) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The given `default` doesn't satisfy `nargs`") - - with self.assertRaises(InvalidOptionError) as e: - Option('--disable-option', nargs='+') -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The given `default` doesn't satisfy `nargs`") - - # Test nargs inference from default value - option = Option('--with-foo', default=True) -- self.assertEquals(option.nargs, 0) -+ self.assertEqual(option.nargs, 0) - - option = Option('--with-foo', default=False) -- self.assertEquals(option.nargs, 0) -+ self.assertEqual(option.nargs, 0) - - option = Option('--with-foo', default='a') -- self.assertEquals(option.nargs, '?') -+ self.assertEqual(option.nargs, '?') - - option = Option('--with-foo', default=('a',)) -- self.assertEquals(option.nargs, '?') -+ self.assertEqual(option.nargs, '?') - - option = Option('--with-foo', default=('a', 'b')) -- self.assertEquals(option.nargs, '*') -+ self.assertEqual(option.nargs, '*') - - option = Option(env='FOO', default=True) -- self.assertEquals(option.nargs, 0) -+ self.assertEqual(option.nargs, 0) - - option = Option(env='FOO', default=False) -- self.assertEquals(option.nargs, 0) -+ self.assertEqual(option.nargs, 0) - - option = Option(env='FOO', default='a') -- self.assertEquals(option.nargs, '?') -+ self.assertEqual(option.nargs, '?') - - option = Option(env='FOO', default=('a',)) -- self.assertEquals(option.nargs, '?') -+ self.assertEqual(option.nargs, '?') - - option = Option(env='FOO', default=('a', 'b')) -- self.assertEquals(option.nargs, '*') -+ self.assertEqual(option.nargs, '*') - - def test_option_option(self): - for option in ( -@@ -170,70 +170,70 @@ class TestOption(unittest.TestCase): - '--with-option', - '--without-option', - ): -- self.assertEquals(Option(option).option, option) -- self.assertEquals(Option(option, env='FOO').option, option) -+ self.assertEqual(Option(option).option, option) -+ self.assertEqual(Option(option, env='FOO').option, option) - - opt = Option(option, default=False) -- self.assertEquals(opt.option, -+ self.assertEqual(opt.option, - option.replace('-disable-', '-enable-') - .replace('-without-', '-with-')) - - opt = Option(option, default=True) -- self.assertEquals(opt.option, -+ self.assertEqual(opt.option, - option.replace('-enable-', '-disable-') - .replace('-with-', '-without-')) - -- self.assertEquals(Option(env='FOO').option, 'FOO') -+ self.assertEqual(Option(env='FOO').option, 'FOO') - - def test_option_choices(self): - with self.assertRaises(InvalidOptionError) as e: - Option('--option', nargs=3, choices=('a', 'b')) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'Not enough `choices` for `nargs`') - - with self.assertRaises(InvalidOptionError) as e: - Option('--without-option', nargs=1, choices=('a', 'b')) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'A `default` must be given along with `choices`') - - with self.assertRaises(InvalidOptionError) as e: - Option('--without-option', nargs='+', choices=('a', 'b')) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'A `default` must be given along with `choices`') - - with self.assertRaises(InvalidOptionError) as e: - Option('--without-option', default='c', choices=('a', 'b')) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The `default` value must be one of 'a', 'b'") - - with self.assertRaises(InvalidOptionError) as e: - Option('--without-option', default=('a', 'c',), choices=('a', 'b')) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The `default` value must be one of 'a', 'b'") - - with self.assertRaises(InvalidOptionError) as e: - Option('--without-option', default=('c',), choices=('a', 'b')) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The `default` value must be one of 'a', 'b'") - - option = Option('--with-option', nargs='+', choices=('a', 'b')) - with self.assertRaises(InvalidOptionError) as e: - option.get_value('--with-option=c') -- self.assertEquals(e.exception.message, "'c' is not one of 'a', 'b'") -+ self.assertEqual(e.exception.message, "'c' is not one of 'a', 'b'") - - value = option.get_value('--with-option=b,a') - self.assertTrue(value) -- self.assertEquals(PositiveOptionValue(('b', 'a')), value) -+ self.assertEqual(PositiveOptionValue(('b', 'a')), value) - - option = Option('--without-option', nargs='*', default='a', - choices=('a', 'b')) - with self.assertRaises(InvalidOptionError) as e: - option.get_value('--with-option=c') -- self.assertEquals(e.exception.message, "'c' is not one of 'a', 'b'") -+ self.assertEqual(e.exception.message, "'c' is not one of 'a', 'b'") - - value = option.get_value('--with-option=b,a') - self.assertTrue(value) -- self.assertEquals(PositiveOptionValue(('b', 'a')), value) -+ self.assertEqual(PositiveOptionValue(('b', 'a')), value) - - # Test nargs inference from choices - option = Option('--with-option', choices=('a', 'b')) -@@ -244,37 +244,37 @@ class TestOption(unittest.TestCase): - choices=('a', 'b', 'c', 'd')) - - value = option.get_value('--with-option=+d') -- self.assertEquals(PositiveOptionValue(('b', 'c', 'd')), value) -+ self.assertEqual(PositiveOptionValue(('b', 'c', 'd')), value) - - value = option.get_value('--with-option=-b') -- self.assertEquals(PositiveOptionValue(('c',)), value) -+ self.assertEqual(PositiveOptionValue(('c',)), value) - - value = option.get_value('--with-option=-b,+d') -- self.assertEquals(PositiveOptionValue(('c','d')), value) -+ self.assertEqual(PositiveOptionValue(('c','d')), value) - - # Adding something that is in the default is fine - value = option.get_value('--with-option=+b') -- self.assertEquals(PositiveOptionValue(('b', 'c')), value) -+ self.assertEqual(PositiveOptionValue(('b', 'c')), value) - - # Removing something that is not in the default is fine, as long as it - # is one of the choices - value = option.get_value('--with-option=-a') -- self.assertEquals(PositiveOptionValue(('b', 'c')), value) -+ self.assertEqual(PositiveOptionValue(('b', 'c')), value) - - with self.assertRaises(InvalidOptionError) as e: - option.get_value('--with-option=-e') -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "'e' is not one of 'a', 'b', 'c', 'd'") - - # Other "not a choice" errors. - with self.assertRaises(InvalidOptionError) as e: - option.get_value('--with-option=+e') -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "'e' is not one of 'a', 'b', 'c', 'd'") - - with self.assertRaises(InvalidOptionError) as e: - option.get_value('--with-option=e') -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "'e' is not one of 'a', 'b', 'c', 'd'") - - def test_option_value_compare(self): -@@ -294,7 +294,7 @@ class TestOption(unittest.TestCase): - - # For usability reasons, we raise TypeError when attempting to compare - # against a non-tuple. -- with self.assertRaisesRegexp(TypeError, 'cannot compare a'): -+ with self.assertRaisesRegex(TypeError, 'cannot compare a'): - val == 'foo' - - # But we allow empty option values to compare otherwise we can't -@@ -313,36 +313,36 @@ class TestOption(unittest.TestCase): - - def test_option_value_format(self): - val = PositiveOptionValue() -- self.assertEquals('--with-value', val.format('--with-value')) -- self.assertEquals('--with-value', val.format('--without-value')) -- self.assertEquals('--enable-value', val.format('--enable-value')) -- self.assertEquals('--enable-value', val.format('--disable-value')) -- self.assertEquals('--value', val.format('--value')) -- self.assertEquals('VALUE=1', val.format('VALUE')) -+ self.assertEqual('--with-value', val.format('--with-value')) -+ self.assertEqual('--with-value', val.format('--without-value')) -+ self.assertEqual('--enable-value', val.format('--enable-value')) -+ self.assertEqual('--enable-value', val.format('--disable-value')) -+ self.assertEqual('--value', val.format('--value')) -+ self.assertEqual('VALUE=1', val.format('VALUE')) - - val = PositiveOptionValue(('a',)) -- self.assertEquals('--with-value=a', val.format('--with-value')) -- self.assertEquals('--with-value=a', val.format('--without-value')) -- self.assertEquals('--enable-value=a', val.format('--enable-value')) -- self.assertEquals('--enable-value=a', val.format('--disable-value')) -- self.assertEquals('--value=a', val.format('--value')) -- self.assertEquals('VALUE=a', val.format('VALUE')) -+ self.assertEqual('--with-value=a', val.format('--with-value')) -+ self.assertEqual('--with-value=a', val.format('--without-value')) -+ self.assertEqual('--enable-value=a', val.format('--enable-value')) -+ self.assertEqual('--enable-value=a', val.format('--disable-value')) -+ self.assertEqual('--value=a', val.format('--value')) -+ self.assertEqual('VALUE=a', val.format('VALUE')) - - val = PositiveOptionValue(('a', 'b')) -- self.assertEquals('--with-value=a,b', val.format('--with-value')) -- self.assertEquals('--with-value=a,b', val.format('--without-value')) -- self.assertEquals('--enable-value=a,b', val.format('--enable-value')) -- self.assertEquals('--enable-value=a,b', val.format('--disable-value')) -- self.assertEquals('--value=a,b', val.format('--value')) -- self.assertEquals('VALUE=a,b', val.format('VALUE')) -+ self.assertEqual('--with-value=a,b', val.format('--with-value')) -+ self.assertEqual('--with-value=a,b', val.format('--without-value')) -+ self.assertEqual('--enable-value=a,b', val.format('--enable-value')) -+ self.assertEqual('--enable-value=a,b', val.format('--disable-value')) -+ self.assertEqual('--value=a,b', val.format('--value')) -+ self.assertEqual('VALUE=a,b', val.format('VALUE')) - - val = NegativeOptionValue() -- self.assertEquals('--without-value', val.format('--with-value')) -- self.assertEquals('--without-value', val.format('--without-value')) -- self.assertEquals('--disable-value', val.format('--enable-value')) -- self.assertEquals('--disable-value', val.format('--disable-value')) -- self.assertEquals('', val.format('--value')) -- self.assertEquals('VALUE=', val.format('VALUE')) -+ self.assertEqual('--without-value', val.format('--with-value')) -+ self.assertEqual('--without-value', val.format('--without-value')) -+ self.assertEqual('--disable-value', val.format('--enable-value')) -+ self.assertEqual('--disable-value', val.format('--disable-value')) -+ self.assertEqual('', val.format('--value')) -+ self.assertEqual('VALUE=', val.format('VALUE')) - - def test_option_value(self, name='option', nargs=0, default=None): - disabled = name.startswith(('disable-', 'without-')) -@@ -359,28 +359,28 @@ class TestOption(unittest.TestCase): - - if nargs in (0, '?', '*') or disabled: - value = option.get_value('--%s' % name, 'option') -- self.assertEquals(value, posOptionValue()) -- self.assertEquals(value.origin, 'option') -+ self.assertEqual(value, posOptionValue()) -+ self.assertEqual(value.origin, 'option') - else: - with self.assertRaises(InvalidOptionError) as e: - option.get_value('--%s' % name) - if nargs == 1: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--%s takes 1 value' % name) - elif nargs == '+': -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--%s takes 1 or more values' % name) - else: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--%s takes 2 values' % name) - - value = option.get_value('') -- self.assertEquals(value, defaultValue) -- self.assertEquals(value.origin, 'default') -+ self.assertEqual(value, defaultValue) -+ self.assertEqual(value.origin, 'default') - - value = option.get_value(None) -- self.assertEquals(value, defaultValue) -- self.assertEquals(value.origin, 'default') -+ self.assertEqual(value, defaultValue) -+ self.assertEqual(value.origin, 'default') - - with self.assertRaises(AssertionError): - value = option.get_value('MOZ_OPTION=', 'environment') -@@ -393,47 +393,47 @@ class TestOption(unittest.TestCase): - - if nargs in (1, '?', '*', '+') and not disabled: - value = option.get_value('--%s=' % name, 'option') -- self.assertEquals(value, PositiveOptionValue(('',))) -- self.assertEquals(value.origin, 'option') -+ self.assertEqual(value, PositiveOptionValue(('',))) -+ self.assertEqual(value.origin, 'option') - else: - with self.assertRaises(InvalidOptionError) as e: - option.get_value('--%s=' % name) - if disabled: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'Cannot pass a value to --%s' % name) - else: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--%s takes %d values' % (name, nargs)) - - if nargs in (1, '?', '*', '+') and not disabled: - value = option.get_value('--%s=foo' % name, 'option') -- self.assertEquals(value, PositiveOptionValue(('foo',))) -- self.assertEquals(value.origin, 'option') -+ self.assertEqual(value, PositiveOptionValue(('foo',))) -+ self.assertEqual(value.origin, 'option') - else: - with self.assertRaises(InvalidOptionError) as e: - option.get_value('--%s=foo' % name) - if disabled: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'Cannot pass a value to --%s' % name) - else: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--%s takes %d values' % (name, nargs)) - - if nargs in (2, '*', '+') and not disabled: - value = option.get_value('--%s=foo,bar' % name, 'option') -- self.assertEquals(value, PositiveOptionValue(('foo', 'bar'))) -- self.assertEquals(value.origin, 'option') -+ self.assertEqual(value, PositiveOptionValue(('foo', 'bar'))) -+ self.assertEqual(value.origin, 'option') - else: - with self.assertRaises(InvalidOptionError) as e: - option.get_value('--%s=foo,bar' % name, 'option') - if disabled: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'Cannot pass a value to --%s' % name) - elif nargs == '?': -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--%s takes 0 or 1 values' % name) - else: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--%s takes %d value%s' - % (name, nargs, 's' if nargs != 1 else '')) - -@@ -441,59 +441,59 @@ class TestOption(unittest.TestCase): - default=default) - if nargs in (0, '?', '*') or disabled: - value = option.get_value('--%s' % name, 'option') -- self.assertEquals(value, posOptionValue()) -- self.assertEquals(value.origin, 'option') -+ self.assertEqual(value, posOptionValue()) -+ self.assertEqual(value.origin, 'option') - else: - with self.assertRaises(InvalidOptionError) as e: - option.get_value('--%s' % name) - if disabled: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'Cannot pass a value to --%s' % name) - elif nargs == '+': -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--%s takes 1 or more values' % name) - else: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--%s takes %d value%s' - % (name, nargs, 's' if nargs != 1 else '')) - - value = option.get_value('') -- self.assertEquals(value, defaultValue) -- self.assertEquals(value.origin, 'default') -+ self.assertEqual(value, defaultValue) -+ self.assertEqual(value.origin, 'default') - - value = option.get_value(None) -- self.assertEquals(value, defaultValue) -- self.assertEquals(value.origin, 'default') -+ self.assertEqual(value, defaultValue) -+ self.assertEqual(value.origin, 'default') - - value = option.get_value('MOZ_OPTION=', 'environment') -- self.assertEquals(value, NegativeOptionValue()) -- self.assertEquals(value.origin, 'environment') -+ self.assertEqual(value, NegativeOptionValue()) -+ self.assertEqual(value.origin, 'environment') - - if nargs in (0, '?', '*'): - value = option.get_value('MOZ_OPTION=1', 'environment') -- self.assertEquals(value, PositiveOptionValue()) -- self.assertEquals(value.origin, 'environment') -+ self.assertEqual(value, PositiveOptionValue()) -+ self.assertEqual(value.origin, 'environment') - elif nargs in (1, '+'): - value = option.get_value('MOZ_OPTION=1', 'environment') -- self.assertEquals(value, PositiveOptionValue(('1',))) -- self.assertEquals(value.origin, 'environment') -+ self.assertEqual(value, PositiveOptionValue(('1',))) -+ self.assertEqual(value.origin, 'environment') - else: - with self.assertRaises(InvalidOptionError) as e: - option.get_value('MOZ_OPTION=1', 'environment') -- self.assertEquals(e.exception.message, 'MOZ_OPTION takes 2 values') -+ self.assertEqual(e.exception.message, 'MOZ_OPTION takes 2 values') - - if nargs in (1, '?', '*', '+') and not disabled: - value = option.get_value('--%s=' % name, 'option') -- self.assertEquals(value, PositiveOptionValue(('',))) -- self.assertEquals(value.origin, 'option') -+ self.assertEqual(value, PositiveOptionValue(('',))) -+ self.assertEqual(value.origin, 'option') - else: - with self.assertRaises(InvalidOptionError) as e: - option.get_value('--%s=' % name, 'option') - if disabled: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'Cannot pass a value to --%s' % name) - else: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--%s takes %d values' % (name, nargs)) - - with self.assertRaises(AssertionError): -@@ -501,26 +501,26 @@ class TestOption(unittest.TestCase): - - if nargs in (1, '?', '*', '+'): - value = option.get_value('MOZ_OPTION=foo', 'environment') -- self.assertEquals(value, PositiveOptionValue(('foo',))) -- self.assertEquals(value.origin, 'environment') -+ self.assertEqual(value, PositiveOptionValue(('foo',))) -+ self.assertEqual(value.origin, 'environment') - else: - with self.assertRaises(InvalidOptionError) as e: - option.get_value('MOZ_OPTION=foo', 'environment') -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'MOZ_OPTION takes %d values' % nargs) - - if nargs in (2, '*', '+'): - value = option.get_value('MOZ_OPTION=foo,bar', 'environment') -- self.assertEquals(value, PositiveOptionValue(('foo', 'bar'))) -- self.assertEquals(value.origin, 'environment') -+ self.assertEqual(value, PositiveOptionValue(('foo', 'bar'))) -+ self.assertEqual(value.origin, 'environment') - else: - with self.assertRaises(InvalidOptionError) as e: - option.get_value('MOZ_OPTION=foo,bar', 'environment') - if nargs == '?': -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'MOZ_OPTION takes 0 or 1 values') - else: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'MOZ_OPTION takes %d value%s' - % (nargs, 's' if nargs != 1 else '')) - -@@ -532,26 +532,26 @@ class TestOption(unittest.TestCase): - env_option.get_value('--%s' % name) - - value = env_option.get_value('') -- self.assertEquals(value, defaultValue) -- self.assertEquals(value.origin, 'default') -+ self.assertEqual(value, defaultValue) -+ self.assertEqual(value.origin, 'default') - - value = env_option.get_value('MOZ_OPTION=', 'environment') -- self.assertEquals(value, negOptionValue()) -- self.assertEquals(value.origin, 'environment') -+ self.assertEqual(value, negOptionValue()) -+ self.assertEqual(value.origin, 'environment') - - if nargs in (0, '?', '*'): - value = env_option.get_value('MOZ_OPTION=1', 'environment') -- self.assertEquals(value, posOptionValue()) -+ self.assertEqual(value, posOptionValue()) - self.assertTrue(value) -- self.assertEquals(value.origin, 'environment') -+ self.assertEqual(value.origin, 'environment') - elif nargs in (1, '+'): - value = env_option.get_value('MOZ_OPTION=1', 'environment') -- self.assertEquals(value, PositiveOptionValue(('1',))) -- self.assertEquals(value.origin, 'environment') -+ self.assertEqual(value, PositiveOptionValue(('1',))) -+ self.assertEqual(value.origin, 'environment') - else: - with self.assertRaises(InvalidOptionError) as e: - env_option.get_value('MOZ_OPTION=1', 'environment') -- self.assertEquals(e.exception.message, 'MOZ_OPTION takes 2 values') -+ self.assertEqual(e.exception.message, 'MOZ_OPTION takes 2 values') - - with self.assertRaises(AssertionError) as e: - env_option.get_value('--%s' % name) -@@ -561,26 +561,26 @@ class TestOption(unittest.TestCase): - - if nargs in (1, '?', '*', '+'): - value = env_option.get_value('MOZ_OPTION=foo', 'environment') -- self.assertEquals(value, PositiveOptionValue(('foo',))) -- self.assertEquals(value.origin, 'environment') -+ self.assertEqual(value, PositiveOptionValue(('foo',))) -+ self.assertEqual(value.origin, 'environment') - else: - with self.assertRaises(InvalidOptionError) as e: - env_option.get_value('MOZ_OPTION=foo', 'environment') -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'MOZ_OPTION takes %d values' % nargs) - - if nargs in (2, '*', '+'): - value = env_option.get_value('MOZ_OPTION=foo,bar', 'environment') -- self.assertEquals(value, PositiveOptionValue(('foo', 'bar'))) -- self.assertEquals(value.origin, 'environment') -+ self.assertEqual(value, PositiveOptionValue(('foo', 'bar'))) -+ self.assertEqual(value.origin, 'environment') - else: - with self.assertRaises(InvalidOptionError) as e: - env_option.get_value('MOZ_OPTION=foo,bar', 'environment') - if nargs == '?': -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'MOZ_OPTION takes 0 or 1 values') - else: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - 'MOZ_OPTION takes %d value%s' - % (nargs, 's' if nargs != 1 else '')) - -@@ -592,28 +592,28 @@ class TestOption(unittest.TestCase): - default=default) - - value = option.get_value('--%s-option' % disable, 'option') -- self.assertEquals(value, NegativeOptionValue()) -- self.assertEquals(value.origin, 'option') -+ self.assertEqual(value, NegativeOptionValue()) -+ self.assertEqual(value.origin, 'option') - - option = self.test_option_value('%s-option' % disable, nargs=nargs, - default=default) - - if nargs in (0, '?', '*'): - value = option.get_value('--%s-option' % enable, 'option') -- self.assertEquals(value, PositiveOptionValue()) -- self.assertEquals(value.origin, 'option') -+ self.assertEqual(value, PositiveOptionValue()) -+ self.assertEqual(value.origin, 'option') - else: - with self.assertRaises(InvalidOptionError) as e: - option.get_value('--%s-option' % enable, 'option') - if nargs == 1: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--%s-option takes 1 value' % enable) - elif nargs == '+': -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--%s-option takes 1 or more values' - % enable) - else: -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - '--%s-option takes 2 values' % enable) - - def test_option_value_with(self): -@@ -622,12 +622,12 @@ class TestOption(unittest.TestCase): - def test_option_value_invalid_nargs(self): - with self.assertRaises(InvalidOptionError) as e: - Option('--option', nargs='foo') -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "nargs must be a positive integer, '?', '*' or '+'") - - with self.assertRaises(InvalidOptionError) as e: - Option('--option', nargs=-2) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "nargs must be a positive integer, '?', '*' or '+'") - - def test_option_value_nargs_1(self): -@@ -638,7 +638,7 @@ class TestOption(unittest.TestCase): - # A default is required - with self.assertRaises(InvalidOptionError) as e: - Option('--disable-option', nargs=1) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The given `default` doesn't satisfy `nargs`") - - def test_option_value_nargs_2(self): -@@ -649,7 +649,7 @@ class TestOption(unittest.TestCase): - # A default is required - with self.assertRaises(InvalidOptionError) as e: - Option('--disable-option', nargs=2) -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The given `default` doesn't satisfy `nargs`") - - def test_option_value_nargs_0_or_1(self): -@@ -676,7 +676,7 @@ class TestOption(unittest.TestCase): - # A default is required - with self.assertRaises(InvalidOptionError) as e: - Option('--disable-option', nargs='+') -- self.assertEquals(e.exception.message, -+ self.assertEqual(e.exception.message, - "The given `default` doesn't satisfy `nargs`") - - -@@ -684,21 +684,21 @@ class TestCommandLineHelper(unittest.TestCase): - def test_basic(self): - helper = CommandLineHelper({}, ['cmd', '--foo', '--bar']) - -- self.assertEquals(['--foo', '--bar'], list(helper)) -+ self.assertEqual(['--foo', '--bar'], list(helper)) - - helper.add('--enable-qux') - -- self.assertEquals(['--foo', '--bar', '--enable-qux'], list(helper)) -+ self.assertEqual(['--foo', '--bar', '--enable-qux'], list(helper)) - - value, option = helper.handle(Option('--bar')) -- self.assertEquals(['--foo', '--enable-qux'], list(helper)) -- self.assertEquals(PositiveOptionValue(), value) -- self.assertEquals('--bar', option) -+ self.assertEqual(['--foo', '--enable-qux'], list(helper)) -+ self.assertEqual(PositiveOptionValue(), value) -+ self.assertEqual('--bar', option) - - value, option = helper.handle(Option('--baz')) -- self.assertEquals(['--foo', '--enable-qux'], list(helper)) -- self.assertEquals(NegativeOptionValue(), value) -- self.assertEquals(None, option) -+ self.assertEqual(['--foo', '--enable-qux'], list(helper)) -+ self.assertEqual(NegativeOptionValue(), value) -+ self.assertEqual(None, option) - - with self.assertRaises(AssertionError): - CommandLineHelper({}, ['--foo', '--bar']) -@@ -707,89 +707,89 @@ class TestCommandLineHelper(unittest.TestCase): - foo = Option('--with-foo', nargs='*') - helper = CommandLineHelper({}, ['cmd', '--with-foo=a,b']) - value, option = helper.handle(foo) -- self.assertEquals(PositiveOptionValue(('a', 'b')), value) -- self.assertEquals('command-line', value.origin) -- self.assertEquals('--with-foo=a,b', option) -+ self.assertEqual(PositiveOptionValue(('a', 'b')), value) -+ self.assertEqual('command-line', value.origin) -+ self.assertEqual('--with-foo=a,b', option) - - helper = CommandLineHelper({}, ['cmd', '--with-foo=a,b', - '--without-foo']) - value, option = helper.handle(foo) -- self.assertEquals(NegativeOptionValue(), value) -- self.assertEquals('command-line', value.origin) -- self.assertEquals('--without-foo', option) -+ self.assertEqual(NegativeOptionValue(), value) -+ self.assertEqual('command-line', value.origin) -+ self.assertEqual('--without-foo', option) - - helper = CommandLineHelper({}, ['cmd', '--without-foo', - '--with-foo=a,b']) - value, option = helper.handle(foo) -- self.assertEquals(PositiveOptionValue(('a', 'b')), value) -- self.assertEquals('command-line', value.origin) -- self.assertEquals('--with-foo=a,b', option) -+ self.assertEqual(PositiveOptionValue(('a', 'b')), value) -+ self.assertEqual('command-line', value.origin) -+ self.assertEqual('--with-foo=a,b', option) - - foo = Option('--with-foo', env='FOO', nargs='*') - helper = CommandLineHelper({'FOO': ''}, ['cmd', '--with-foo=a,b']) - value, option = helper.handle(foo) -- self.assertEquals(PositiveOptionValue(('a', 'b')), value) -- self.assertEquals('command-line', value.origin) -- self.assertEquals('--with-foo=a,b', option) -+ self.assertEqual(PositiveOptionValue(('a', 'b')), value) -+ self.assertEqual('command-line', value.origin) -+ self.assertEqual('--with-foo=a,b', option) - - helper = CommandLineHelper({'FOO': 'a,b'}, ['cmd', '--without-foo']) - value, option = helper.handle(foo) -- self.assertEquals(NegativeOptionValue(), value) -- self.assertEquals('command-line', value.origin) -- self.assertEquals('--without-foo', option) -+ self.assertEqual(NegativeOptionValue(), value) -+ self.assertEqual('command-line', value.origin) -+ self.assertEqual('--without-foo', option) - - helper = CommandLineHelper({'FOO': ''}, ['cmd', '--with-bar=a,b']) - value, option = helper.handle(foo) -- self.assertEquals(NegativeOptionValue(), value) -- self.assertEquals('environment', value.origin) -- self.assertEquals('FOO=', option) -+ self.assertEqual(NegativeOptionValue(), value) -+ self.assertEqual('environment', value.origin) -+ self.assertEqual('FOO=', option) - - helper = CommandLineHelper({'FOO': 'a,b'}, ['cmd', '--without-bar']) - value, option = helper.handle(foo) -- self.assertEquals(PositiveOptionValue(('a', 'b')), value) -- self.assertEquals('environment', value.origin) -- self.assertEquals('FOO=a,b', option) -+ self.assertEqual(PositiveOptionValue(('a', 'b')), value) -+ self.assertEqual('environment', value.origin) -+ self.assertEqual('FOO=a,b', option) - - helper = CommandLineHelper({}, ['cmd', '--with-foo=a,b', 'FOO=']) - value, option = helper.handle(foo) -- self.assertEquals(NegativeOptionValue(), value) -- self.assertEquals('command-line', value.origin) -- self.assertEquals('FOO=', option) -+ self.assertEqual(NegativeOptionValue(), value) -+ self.assertEqual('command-line', value.origin) -+ self.assertEqual('FOO=', option) - - helper = CommandLineHelper({}, ['cmd', '--without-foo', 'FOO=a,b']) - value, option = helper.handle(foo) -- self.assertEquals(PositiveOptionValue(('a', 'b')), value) -- self.assertEquals('command-line', value.origin) -- self.assertEquals('FOO=a,b', option) -+ self.assertEqual(PositiveOptionValue(('a', 'b')), value) -+ self.assertEqual('command-line', value.origin) -+ self.assertEqual('FOO=a,b', option) - - helper = CommandLineHelper({}, ['cmd', 'FOO=', '--with-foo=a,b']) - value, option = helper.handle(foo) -- self.assertEquals(PositiveOptionValue(('a', 'b')), value) -- self.assertEquals('command-line', value.origin) -- self.assertEquals('--with-foo=a,b', option) -+ self.assertEqual(PositiveOptionValue(('a', 'b')), value) -+ self.assertEqual('command-line', value.origin) -+ self.assertEqual('--with-foo=a,b', option) - - helper = CommandLineHelper({}, ['cmd', 'FOO=a,b', '--without-foo']) - value, option = helper.handle(foo) -- self.assertEquals(NegativeOptionValue(), value) -- self.assertEquals('command-line', value.origin) -- self.assertEquals('--without-foo', option) -+ self.assertEqual(NegativeOptionValue(), value) -+ self.assertEqual('command-line', value.origin) -+ self.assertEqual('--without-foo', option) - - def test_extra_args(self): - foo = Option('--with-foo', env='FOO', nargs='*') - helper = CommandLineHelper({}, ['cmd']) - helper.add('FOO=a,b,c', 'other-origin') - value, option = helper.handle(foo) -- self.assertEquals(PositiveOptionValue(('a', 'b', 'c')), value) -- self.assertEquals('other-origin', value.origin) -- self.assertEquals('FOO=a,b,c', option) -+ self.assertEqual(PositiveOptionValue(('a', 'b', 'c')), value) -+ self.assertEqual('other-origin', value.origin) -+ self.assertEqual('FOO=a,b,c', option) - - helper = CommandLineHelper({}, ['cmd']) - helper.add('FOO=a,b,c', 'other-origin') - helper.add('--with-foo=a,b,c', 'other-origin') - value, option = helper.handle(foo) -- self.assertEquals(PositiveOptionValue(('a', 'b', 'c')), value) -- self.assertEquals('other-origin', value.origin) -- self.assertEquals('--with-foo=a,b,c', option) -+ self.assertEqual(PositiveOptionValue(('a', 'b', 'c')), value) -+ self.assertEqual('other-origin', value.origin) -+ self.assertEqual('--with-foo=a,b,c', option) - - # Adding conflicting options is not allowed. - helper = CommandLineHelper({}, ['cmd']) -@@ -809,9 +809,9 @@ class TestCommandLineHelper(unittest.TestCase): - # But adding the same is allowed. - helper.add('FOO=a,b,c', 'other-origin') - value, option = helper.handle(foo) -- self.assertEquals(PositiveOptionValue(('a', 'b', 'c')), value) -- self.assertEquals('other-origin', value.origin) -- self.assertEquals('FOO=a,b,c', option) -+ self.assertEqual(PositiveOptionValue(('a', 'b', 'c')), value) -+ self.assertEqual('other-origin', value.origin) -+ self.assertEqual('FOO=a,b,c', option) - - # The same rule as above applies when using the option form vs. the - # variable form. But we can't detect it when .add is called. -@@ -837,9 +837,9 @@ class TestCommandLineHelper(unittest.TestCase): - helper.add('FOO=a,b,c', 'other-origin') - helper.add('--with-foo=a,b,c', 'other-origin') - value, option = helper.handle(foo) -- self.assertEquals(PositiveOptionValue(('a', 'b', 'c')), value) -- self.assertEquals('other-origin', value.origin) -- self.assertEquals('--with-foo=a,b,c', option) -+ self.assertEqual(PositiveOptionValue(('a', 'b', 'c')), value) -+ self.assertEqual('other-origin', value.origin) -+ self.assertEqual('--with-foo=a,b,c', option) - - # Conflicts are also not allowed against what is in the - # environment/on the command line. -@@ -869,19 +869,19 @@ class TestCommandLineHelper(unittest.TestCase): - foo = Option('--foo', - possible_origins=('command-line',)) - value, option = helper.handle(foo) -- self.assertEquals(PositiveOptionValue(), value) -- self.assertEquals('command-line', value.origin) -- self.assertEquals('--foo', option) -+ self.assertEqual(PositiveOptionValue(), value) -+ self.assertEqual('command-line', value.origin) -+ self.assertEqual('--foo', option) - - bar = Option('--bar', - possible_origins=('mozconfig',)) -- with self.assertRaisesRegexp(InvalidOptionError, -+ with self.assertRaisesRegex(InvalidOptionError, - "--bar can not be set by command-line. Values are accepted from: mozconfig"): - helper.handle(bar) - - baz = Option(env='BAZ', - possible_origins=('implied',)) -- with self.assertRaisesRegexp(InvalidOptionError, -+ with self.assertRaisesRegex(InvalidOptionError, - "BAZ=1 can not be set by environment. Values are accepted from: implied"): - helper.handle(baz) - -diff --git a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py -index cb7ff709e..c339a32bf 100755 ---- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py -+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py -@@ -2,12 +2,12 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -+ - - import logging - import os - --from StringIO import StringIO -+from io import StringIO - - from mozunit import main - -@@ -366,9 +366,9 @@ class BaseToolchainTest(BaseConfigureTest): - compiler = sandbox._value_for(sandbox[var]) - # Add var on both ends to make it clear which of the - # variables is failing the test when that happens. -- self.assertEquals((var, compiler), (var, result)) -+ self.assertEqual((var, compiler), (var, result)) - except SystemExit: -- self.assertEquals((var, result), -+ self.assertEqual((var, result), - (var, self.out.getvalue().strip())) - return - -@@ -407,7 +407,7 @@ class BaseToolchainTest(BaseConfigureTest): - 'RUST_LIB_SUFFIX', - 'OBJ_SUFFIX', - ): -- self.assertEquals('%s=%s' % (k, sandbox.get_config(k)), -+ self.assertEqual('%s=%s' % (k, sandbox.get_config(k)), - '%s=%s' % (k, library_name_info[k])) - - -@@ -584,7 +584,7 @@ class LinuxToolchainTest(BaseToolchainTest): - # We'll try gcc and clang, but since there is no gcc (gcc-x.y doesn't - # count), find clang. - paths = { -- k: v for k, v in self.PATHS.iteritems() -+ k: v for k, v in self.PATHS.items() - if os.path.basename(k) not in ('gcc', 'g++') - } - self.do_toolchain_test(paths, { -@@ -619,7 +619,7 @@ class LinuxToolchainTest(BaseToolchainTest): - # Even if there are gcc-x.y or clang-x.y compilers available, we - # don't try them. This could be considered something to improve. - paths = { -- k: v for k, v in self.PATHS.iteritems() -+ k: v for k, v in self.PATHS.items() - if os.path.basename(k) not in ('gcc', 'g++', 'clang', 'clang++') - } - self.do_toolchain_test(paths, { -@@ -800,7 +800,7 @@ class OSXToolchainTest(BaseToolchainTest): - def test_not_gcc(self): - # We won't pick GCC if it's the only thing available. - paths = { -- k: v for k, v in self.PATHS.iteritems() -+ k: v for k, v in self.PATHS.items() - if os.path.basename(k) not in ('clang', 'clang++') - } - self.do_toolchain_test(paths, { -@@ -976,7 +976,7 @@ class WindowsToolchainTest(BaseToolchainTest): - def test_clang_cl(self): - # We'll pick clang-cl if msvc can't be found. - paths = { -- k: v for k, v in self.PATHS.iteritems() -+ k: v for k, v in self.PATHS.items() - if os.path.basename(k) != 'cl' - } - self.do_toolchain_test(paths, { -@@ -987,7 +987,7 @@ class WindowsToolchainTest(BaseToolchainTest): - def test_gcc(self): - # We'll pick GCC if msvc and clang-cl can't be found. - paths = { -- k: v for k, v in self.PATHS.iteritems() -+ k: v for k, v in self.PATHS.items() - if os.path.basename(k) not in ('cl', 'clang-cl') - } - self.do_toolchain_test(paths, { -@@ -1006,7 +1006,7 @@ class WindowsToolchainTest(BaseToolchainTest): - def test_clang(self): - # We'll pick clang if nothing else is found. - paths = { -- k: v for k, v in self.PATHS.iteritems() -+ k: v for k, v in self.PATHS.items() - if os.path.basename(k) not in ('cl', 'clang-cl', 'gcc') - } - self.do_toolchain_test(paths, { -diff --git a/python/mozbuild/mozbuild/test/configure/test_toolchain_helpers.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_helpers.py -index 8ec33a8b7..ba046ed12 100644 ---- a/python/mozbuild/mozbuild/test/configure/test_toolchain_helpers.py -+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_helpers.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -+ - - import copy - import re -@@ -10,7 +10,7 @@ import types - import unittest - - from fnmatch import fnmatch --from StringIO import StringIO -+from io import StringIO - from textwrap import dedent - - from mozunit import ( -@@ -43,7 +43,7 @@ class CompilerPreprocessor(Preprocessor): - # Hack around it enough that the configure tests work properly. - context = self.context - def normalize_numbers(value): -- if isinstance(value, types.StringTypes): -+ if isinstance(value, (str,)): - if value[-1:] == 'L' and value[:-1].isdigit(): - value = int(value[:-1]) - return value -@@ -53,7 +53,7 @@ class CompilerPreprocessor(Preprocessor): - return self.HAS_FEATURE.sub(r'\1\2', expr) - self.context = self.Context( - (normalize_has_feature(k), normalize_numbers(v)) -- for k, v in context.iteritems() -+ for k, v in context.items() - ) - try: - return Preprocessor.do_if(self, normalize_has_feature(expression), -@@ -95,7 +95,7 @@ class TestCompilerPreprocessor(unittest.TestCase): - input.name = 'foo' - pp.do_include(input) - -- self.assertEquals(pp.out.getvalue(), '1 . 2 . c "D"') -+ self.assertEqual(pp.out.getvalue(), '1 . 2 . c "D"') - - def test_condition(self): - pp = CompilerPreprocessor({ -@@ -125,7 +125,7 @@ class TestCompilerPreprocessor(unittest.TestCase): - input.name = 'foo' - pp.do_include(input) - -- self.assertEquals('IFDEF_A\nIF_A\nIF_B\nIF_NOT_C\n', pp.out.getvalue()) -+ self.assertEqual('IFDEF_A\nIF_A\nIF_B\nIF_NOT_C\n', pp.out.getvalue()) - - - class FakeCompiler(dict): -@@ -164,9 +164,9 @@ class FakeCompiler(dict): - ''' - def __init__(self, *definitions): - for definition in definitions: -- if all(not isinstance(d, dict) for d in definition.itervalues()): -+ if all(not isinstance(d, dict) for d in definition.values()): - definition = {None: definition} -- for key, value in definition.iteritems(): -+ for key, value in definition.items(): - self.setdefault(key, {}).update(value) - - def __call__(self, stdin, args): -@@ -178,14 +178,14 @@ class FakeCompiler(dict): - pp = CompilerPreprocessor(self[None]) - - def apply_defn(defn): -- for k, v in defn.iteritems(): -+ for k, v in defn.items(): - if v is False: - if k in pp.context: - del pp.context[k] - else: - pp.context[k] = v - -- for glob, defn in self.iteritems(): -+ for glob, defn in self.items(): - if glob and not glob.startswith('-') and fnmatch(file, glob): - apply_defn(defn) - -@@ -216,7 +216,7 @@ class TestFakeCompiler(unittest.TestCase): - 'A': '1', - 'B': '2', - }) -- self.assertEquals(compiler(None, ['-E', 'file']), -+ self.assertEqual(compiler(None, ['-E', 'file']), - (0, '1 2 C', '')) - - compiler = FakeCompiler({ -@@ -238,25 +238,25 @@ class TestFakeCompiler(unittest.TestCase): - 'B': '42', - }, - }) -- self.assertEquals(compiler(None, ['-E', 'file']), -+ self.assertEqual(compiler(None, ['-E', 'file']), - (0, '1 2 C', '')) -- self.assertEquals(compiler(None, ['-E', '-foo', 'file']), -+ self.assertEqual(compiler(None, ['-E', '-foo', 'file']), - (0, '1 2 foo', '')) -- self.assertEquals(compiler(None, ['-E', '-bar', 'file']), -+ self.assertEqual(compiler(None, ['-E', '-bar', 'file']), - (0, '1 bar bar', '')) -- self.assertEquals(compiler(None, ['-E', '-qux', 'file']), -+ self.assertEqual(compiler(None, ['-E', '-qux', 'file']), - (0, '1 B C', '')) -- self.assertEquals(compiler(None, ['-E', '-foo', '-bar', 'file']), -+ self.assertEqual(compiler(None, ['-E', '-foo', '-bar', 'file']), - (0, '1 bar bar', '')) -- self.assertEquals(compiler(None, ['-E', '-bar', '-foo', 'file']), -+ self.assertEqual(compiler(None, ['-E', '-bar', '-foo', 'file']), - (0, '1 bar foo', '')) -- self.assertEquals(compiler(None, ['-E', '-bar', '-qux', 'file']), -+ self.assertEqual(compiler(None, ['-E', '-bar', '-qux', 'file']), - (0, '1 B bar', '')) -- self.assertEquals(compiler(None, ['-E', '-qux', '-bar', 'file']), -+ self.assertEqual(compiler(None, ['-E', '-qux', '-bar', 'file']), - (0, '1 bar bar', '')) -- self.assertEquals(compiler(None, ['-E', 'file.c']), -+ self.assertEqual(compiler(None, ['-E', 'file.c']), - (0, '1 42 C', '')) -- self.assertEquals(compiler(None, ['-E', '-bar', 'file.c']), -+ self.assertEqual(compiler(None, ['-E', '-bar', 'file.c']), - (0, '1 bar bar', '')) - - def test_multiple_definitions(self): -@@ -267,7 +267,7 @@ class TestFakeCompiler(unittest.TestCase): - 'C': 3, - }) - -- self.assertEquals(compiler, { -+ self.assertEqual(compiler, { - None: { - 'A': 1, - 'B': 2, -@@ -282,7 +282,7 @@ class TestFakeCompiler(unittest.TestCase): - 'C': 3, - }) - -- self.assertEquals(compiler, { -+ self.assertEqual(compiler, { - None: { - 'A': 1, - 'B': 4, -@@ -302,7 +302,7 @@ class TestFakeCompiler(unittest.TestCase): - }, - }) - -- self.assertEquals(compiler, { -+ self.assertEqual(compiler, { - None: { - 'A': 1, - 'B': 4, -@@ -330,7 +330,7 @@ class TestFakeCompiler(unittest.TestCase): - }, - }) - -- self.assertEquals(compiler, { -+ self.assertEqual(compiler, { - None: { - 'A': 1, - 'B': 2, -@@ -370,7 +370,7 @@ class CompilerResult(ReadOnlyNamespace): - def __add__(self, other): - assert isinstance(other, dict) - result = copy.deepcopy(self.__dict__) -- for k, v in other.iteritems(): -+ for k, v in other.items(): - if k == 'flags': - result.setdefault(k, []).extend(v) - else: -@@ -381,7 +381,7 @@ class CompilerResult(ReadOnlyNamespace): - class TestCompilerResult(unittest.TestCase): - def test_compiler_result(self): - result = CompilerResult() -- self.assertEquals(result.__dict__, { -+ self.assertEqual(result.__dict__, { - 'wrapper': [], - 'compiler': mozpath.abspath(''), - 'version': '', -@@ -397,7 +397,7 @@ class TestCompilerResult(unittest.TestCase): - language='C', - flags=['-std=gnu99'], - ) -- self.assertEquals(result.__dict__, { -+ self.assertEqual(result.__dict__, { - 'wrapper': [], - 'compiler': mozpath.abspath('/usr/bin/gcc'), - 'version': '4.2.1', -@@ -407,7 +407,7 @@ class TestCompilerResult(unittest.TestCase): - }) - - result2 = result + {'flags': ['-m32']} -- self.assertEquals(result2.__dict__, { -+ self.assertEqual(result2.__dict__, { - 'wrapper': [], - 'compiler': mozpath.abspath('/usr/bin/gcc'), - 'version': '4.2.1', -@@ -416,14 +416,14 @@ class TestCompilerResult(unittest.TestCase): - 'flags': ['-std=gnu99', '-m32'], - }) - # Original flags are untouched. -- self.assertEquals(result.flags, ['-std=gnu99']) -+ self.assertEqual(result.flags, ['-std=gnu99']) - - result3 = result + { - 'compiler': '/usr/bin/gcc-4.7', - 'version': '4.7.3', - 'flags': ['-m32'], - } -- self.assertEquals(result3.__dict__, { -+ self.assertEqual(result3.__dict__, { - 'wrapper': [], - 'compiler': mozpath.abspath('/usr/bin/gcc-4.7'), - 'version': '4.7.3', -diff --git a/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py -index ac35d745f..cdd8ece1b 100644 ---- a/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py -+++ b/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -+ - - import os - -diff --git a/python/mozbuild/mozbuild/test/configure/test_util.py b/python/mozbuild/mozbuild/test/configure/test_util.py -index 9f9575fd0..c2db1a628 100644 ---- a/python/mozbuild/mozbuild/test/configure/test_util.py -+++ b/python/mozbuild/mozbuild/test/configure/test_util.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function, unicode_literals -+ - - import logging - import os -@@ -11,7 +11,7 @@ import textwrap - import unittest - import sys - --from StringIO import StringIO -+from io import StringIO - - from mozunit import main - from mozpack import path as mozpath -@@ -434,11 +434,11 @@ class TestLogSubprocessOutput(unittest.TestCase): - except SystemExit as e: - status = e.code - -- self.assertEquals(status, 0) -+ self.assertEqual(status, 0) - quote_char = "'" - if getpreferredencoding().lower() == 'utf-8': - quote_char = '\u00B4'.encode('utf-8') -- self.assertEquals(out.getvalue().strip(), quote_char) -+ self.assertEqual(out.getvalue().strip(), quote_char) - - - class TestVersion(unittest.TestCase): -diff --git a/python/mozbuild/mozbuild/testing.py b/python/mozbuild/mozbuild/testing.py -index 3229c3f77..82d250fab 100644 ---- a/python/mozbuild/mozbuild/testing.py -+++ b/python/mozbuild/mozbuild/testing.py -@@ -2,9 +2,9 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, unicode_literals - --import cPickle as pickle -+ -+import pickle as pickle - import os - import sys - -@@ -70,7 +70,7 @@ REFTEST_FLAVORS = ('crashtest', 'reftest') - WEB_PLATFORM_TESTS_FLAVORS = ('web-platform-tests',) - - def all_test_flavors(): -- return ([v[0] for v in TEST_MANIFESTS.values()] + -+ return ([v[0] for v in list(TEST_MANIFESTS.values())] + - list(REFTEST_FLAVORS) + - list(WEB_PLATFORM_TESTS_FLAVORS)) - -@@ -210,7 +210,7 @@ def install_test_files(topsrcdir, topobjdir, tests_root, test_objs): - only a few tests need to be run. - """ - flavor_info = {flavor: (root, prefix, install) -- for (flavor, root, prefix, install) in TEST_MANIFESTS.values()} -+ for (flavor, root, prefix, install) in list(TEST_MANIFESTS.values())} - objdir_dest = mozpath.join(topobjdir, tests_root) - - converter = SupportFilesConverter() -@@ -292,7 +292,7 @@ def read_wpt_manifest(context, paths): - paths_file = os.path.join(context.config.topsrcdir, "testing", - "web-platform", "tests", "tools", "localpaths.py") - _globals = {"__file__": paths_file} -- execfile(paths_file, _globals) -+ exec(compile(open(paths_file, "rb").read(), paths_file, 'exec'), _globals) - import manifest as wptmanifest - finally: - sys.path = old_path -diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py -index 4ea227dc0..79cb15713 100644 ---- a/python/mozbuild/mozbuild/util.py -+++ b/python/mozbuild/mozbuild/util.py -@@ -5,7 +5,7 @@ - # This file contains miscellaneous utility functions that don't belong anywhere - # in particular. - --from __future__ import absolute_import, unicode_literals, print_function -+ - - import argparse - import collections -@@ -21,6 +21,9 @@ import stat - import sys - import time - import types -+import pprint -+import six -+import subprocess - - from collections import ( - defaultdict, -@@ -36,7 +39,7 @@ from io import ( - if sys.version_info[0] == 3: - str_type = str - else: -- str_type = basestring -+ str_type = str - - if sys.platform == 'win32': - _kernel32 = ctypes.windll.kernel32 -@@ -78,7 +81,7 @@ def hash_file(path, hasher=None): - return h.hexdigest() - - --class EmptyValue(unicode): -+class EmptyValue(str): - """A dummy type that behaves like an empty string and sequence. - - This type exists in order to support -@@ -92,7 +95,7 @@ class EmptyValue(unicode): - class ReadOnlyNamespace(object): - """A class for objects with immutable attributes set at initialization.""" - def __init__(self, **kwargs): -- for k, v in kwargs.iteritems(): -+ for k, v in kwargs.items(): - super(ReadOnlyNamespace, self).__setattr__(k, v) - - def __delattr__(self, key): -@@ -224,7 +227,7 @@ class FileAvoidWrite(BytesIO): - self.mode = mode - - def write(self, buf): -- if isinstance(buf, unicode): -+ if isinstance(buf, str): - buf = buf.encode('utf-8') - BytesIO.write(self, buf) - -@@ -267,6 +270,10 @@ class FileAvoidWrite(BytesIO): - if 'b' in self.mode: - writemode += 'b' - with open(self.name, writemode) as file: -+ if 'b' in self.mode and isinstance(buf, str): -+ buf = buf.encode('utf-8') -+ elif 'b' not in self.mode and isinstance(buf, bytes): -+ buf = buf.decode('utf-8') - file.write(buf) - - if self._capture_diff: -@@ -381,7 +388,7 @@ class ListMixin(object): - def __add__(self, other): - # Allow None and EmptyValue is a special case because it makes undefined - # variable references in moz.build behave better. -- other = [] if isinstance(other, (types.NoneType, EmptyValue)) else other -+ other = [] if isinstance(other, (type(None), EmptyValue)) else other - if not isinstance(other, list): - raise ValueError('Only lists can be appended to lists.') - -@@ -390,7 +397,7 @@ class ListMixin(object): - return new_list - - def __iadd__(self, other): -- other = [] if isinstance(other, (types.NoneType, EmptyValue)) else other -+ other = [] if isinstance(other, (type(None), EmptyValue)) else other - if not isinstance(other, list): - raise ValueError('Only lists can be appended to lists.') - -@@ -561,14 +568,14 @@ def FlagsFactory(flags): - functions below. - """ - assert isinstance(flags, dict) -- assert all(isinstance(v, type) for v in flags.values()) -+ assert all(isinstance(v, type) for v in list(flags.values())) - - class Flags(object): -- __slots__ = flags.keys() -+ __slots__ = list(flags.keys()) - _flags = flags - - def update(self, **kwargs): -- for k, v in kwargs.iteritems(): -+ for k, v in kwargs.items(): - setattr(self, k, v) - - def __getattr__(self, name): -@@ -1006,8 +1013,6 @@ def TypedNamedTuple(name, fields): - 'got %s, expected %s' % (fname, - type(value), ftype)) - -- super(TypedTuple, self).__init__(*args, **kwargs) -- - TypedTuple._fields = fields - - return TypedTuple -@@ -1099,14 +1104,14 @@ def group_unified_files(files, unified_prefix, unified_suffix, - # issue. So we do a little dance to filter it out ourselves. - dummy_fill_value = ("dummy",) - def filter_out_dummy(iterable): -- return itertools.ifilter(lambda x: x != dummy_fill_value, -+ return filter(lambda x: x != dummy_fill_value, - iterable) - - # From the itertools documentation, slightly modified: - def grouper(n, iterable): - "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx" - args = [iter(iterable)] * n -- return itertools.izip_longest(fillvalue=dummy_fill_value, *args) -+ return itertools.zip_longest(fillvalue=dummy_fill_value, *args) - - for i, unified_group in enumerate(grouper(files_per_unified_file, - files)): -@@ -1123,7 +1128,7 @@ def pair(iterable): - [(1,2), (3,4), (5,6)] - ''' - i = iter(iterable) -- return itertools.izip_longest(i, i) -+ return itertools.zip_longest(i, i) - - - VARIABLES_RE = re.compile('\$\((\w+)\)') -@@ -1141,7 +1146,7 @@ def expand_variables(s, variables): - value = variables.get(name) - if not value: - continue -- if not isinstance(value, types.StringTypes): -+ if not isinstance(value, (str,)): - value = ' '.join(value) - result += value - return result -@@ -1168,7 +1173,7 @@ class EnumStringComparisonError(Exception): - pass - - --class EnumString(unicode): -+class EnumString(str): - '''A string type that only can have a limited set of values, similarly to - an Enum, and can only be compared against that set of values. - -@@ -1185,8 +1190,8 @@ class EnumString(unicode): - def __eq__(self, other): - if other not in self.POSSIBLE_VALUES: - raise EnumStringComparisonError( -- 'Can only compare with %s' -- % ', '.join("'%s'" % v for v in self.POSSIBLE_VALUES)) -+ '%s is not in %s' -+ % (other, ', '.join("'%s'" % v for v in self.POSSIBLE_VALUES))) - return super(EnumString, self).__eq__(other) - - def __ne__(self, other): -@@ -1204,14 +1209,14 @@ def _escape_char(c): - # quoting could be done with either ' or ". - if c == "'": - return "\\'" -- return unicode(c.encode('unicode_escape')) -+ return str(c.encode('unicode_escape')) - - # Mapping table between raw characters below \x80 and their escaped - # counterpart, when they differ - _INDENTED_REPR_TABLE = { - c: e - for c, e in map(lambda x: (x, _escape_char(x)), -- map(unichr, range(128))) -+ map(chr, range(128))) - if c != e - } - # Regexp matching all characters to escape. -@@ -1219,7 +1224,33 @@ _INDENTED_REPR_RE = re.compile( - '([' + ''.join(_INDENTED_REPR_TABLE.values()) + ']+)') - - -+# Stolen from gecko master [1] -+# [1] https://github.com/mozilla/gecko-dev/blob/4165a2e843c494bfb3e35d8a1fbf9c61209e3675/python/mozbuild/mozbuild/util.py#L1286 -+ -+# The default PrettyPrinter has some issues with UTF-8, so we need to override -+# some stuff here. -+class _PrettyPrinter(pprint.PrettyPrinter): -+ def format(self, object, context, maxlevels, level): -+ if not (isinstance(object, six.text_type) or -+ isinstance(object, six.binary_type)): -+ return super(_PrettyPrinter, self).format( -+ object, context, maxlevels, level) -+ # This is super hacky and weird, but the output of 'repr' actually -+ # varies based on the default I/O encoding of the process, which isn't -+ # necessarily utf-8. Instead we open a new shell and ask what the repr -+ # WOULD be assuming the default encoding is utf-8. If you can come up -+ # with a better way of doing this without simply re-implementing the -+ # logic of "repr", please replace this. -+ env = dict(os.environ) -+ env['PYTHONIOENCODING'] = 'utf-8' -+ ret = six.ensure_text(subprocess.check_output( -+ [sys.executable], input='print(repr(%s))' % repr(object), -+ universal_newlines=True, env=env, encoding='utf-8')).strip() -+ return (ret, True, False) -+ - def indented_repr(o, indent=4): -+ return _PrettyPrinter(indent=indent).pformat(o) -+ - '''Similar to repr(), but returns an indented representation of the object - - One notable difference with repr is that the returned representation -@@ -1242,7 +1273,7 @@ def indented_repr(o, indent=4): - elif isinstance(o, bytes): - yield 'b' - yield repr(o) -- elif isinstance(o, unicode): -+ elif isinstance(o, str): - yield "'" - # We want a readable string (non escaped unicode), but some - # special characters need escaping (e.g. \n, \t, etc.) -@@ -1272,11 +1303,11 @@ def encode(obj, encoding='utf-8'): - if isinstance(obj, dict): - return { - encode(k, encoding): encode(v, encoding) -- for k, v in obj.iteritems() -+ for k, v in obj.items() - } - if isinstance(obj, bytes): - return obj -- if isinstance(obj, unicode): -+ if isinstance(obj, str): - return obj.encode(encoding) - if isinstance(obj, Iterable): - return [encode(i, encoding) for i in obj] -diff --git a/python/mozbuild/mozbuild/virtualenv.py b/python/mozbuild/mozbuild/virtualenv.py -index 38d06d71d..c67c046f3 100644 ---- a/python/mozbuild/mozbuild/virtualenv.py -+++ b/python/mozbuild/mozbuild/virtualenv.py -@@ -531,9 +531,9 @@ def verify_python_version(log_handle): - - our = LooseVersion('%d.%d.%d' % (major, minor, micro)) - -- if major != MINIMUM_PYTHON_MAJOR or our < MINIMUM_PYTHON_VERSION: -- log_handle.write('Python %s or greater (but not Python 3) is ' -- 'required to build. ' % MINIMUM_PYTHON_VERSION) -+ if our < MINIMUM_PYTHON_VERSION: -+ log_handle.write('Python %s or greater is required to build. ' -+ % MINIMUM_PYTHON_VERSION) - log_handle.write('You are running Python %s.\n' % our) - - if os.name in ('nt', 'ce'): -diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpack/chrome/manifest.py -index c91b99cf1..02eac0dbb 100644 ---- a/python/mozbuild/mozpack/chrome/manifest.py -+++ b/python/mozbuild/mozpack/chrome/manifest.py -@@ -2,11 +2,11 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import -+ - - import re - import os --from urlparse import urlparse -+from urllib.parse import urlparse - import mozpack.path as mozpath - from mozpack.chrome.flags import Flags - from mozpack.errors import errors -@@ -316,7 +316,7 @@ class ManifestContract(ManifestEntry): - return self.serialize(self.contractID, self.cid) - - # All manifest classes by their type name. --MANIFESTS_TYPES = dict([(c.type, c) for c in globals().values() -+MANIFESTS_TYPES = dict([(c.type, c) for c in list(globals().values()) - if type(c) == type and issubclass(c, ManifestEntry) - and hasattr(c, 'type') and c.type]) - -diff --git a/python/mozbuild/mozpack/copier.py b/python/mozbuild/mozpack/copier.py -index 1e521e52b..43ed9be4a 100644 ---- a/python/mozbuild/mozpack/copier.py -+++ b/python/mozbuild/mozpack/copier.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import -+ - - import os - import stat -@@ -113,7 +113,7 @@ class FileRegistry(object): - ''' - Return all paths stored in the container, in the order they were added. - ''' -- return self._files.keys() -+ return list(self._files.keys()) - - def __len__(self): - ''' -@@ -146,7 +146,7 @@ class FileRegistry(object): - for path, file in registry: - (...) - ''' -- return self._files.iteritems() -+ return iter(self._files.items()) - - def required_directories(self): - ''' -@@ -155,7 +155,7 @@ class FileRegistry(object): - unspecified (virtual) root directory (and do not include said root - directory). - ''' -- return set(k for k, v in self._required_directories.items() if v > 0) -+ return set(k for k, v in list(self._required_directories.items()) if v > 0) - - def output_to_inputs_tree(self): - ''' -@@ -295,7 +295,7 @@ class FileCopier(FileRegistry): - - Returns a FileCopyResult that details what changed. - ''' -- assert isinstance(destination, basestring) -+ assert isinstance(destination, str) - assert not os.path.exists(destination) or os.path.isdir(destination) - - result = FileCopyResult() -@@ -563,7 +563,7 @@ class Jarrer(FileRegistry, BaseFile): - def exists(self): - return self.deflater is not None - -- if isinstance(dest, basestring): -+ if isinstance(dest, str): - dest = Dest(dest) - assert isinstance(dest, Dest) - -diff --git a/python/mozbuild/mozpack/files.py b/python/mozbuild/mozpack/files.py -index 8ce353375..bf35e39b8 100644 ---- a/python/mozbuild/mozpack/files.py -+++ b/python/mozbuild/mozpack/files.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import -+ - - import errno - import os -@@ -57,7 +57,7 @@ else: - - def _copyfile(src, dest): - # False indicates `dest` should be overwritten if it exists already. -- if isinstance(src, unicode) and isinstance(dest, unicode): -+ if isinstance(src, str) and isinstance(dest, str): - _CopyFileW(src, dest, False) - elif isinstance(src, str) and isinstance(dest, str): - _CopyFileA(src, dest, False) -@@ -164,7 +164,7 @@ class BaseFile(object): - disabled when skip_if_older is False. - Returns whether a copy was actually performed (True) or not (False). - ''' -- if isinstance(dest, basestring): -+ if isinstance(dest, str): - dest = Dest(dest) - else: - assert isinstance(dest, Dest) -@@ -278,11 +278,11 @@ class ExecutableFile(File): - ''' - def copy(self, dest, skip_if_older=True): - real_dest = dest -- if not isinstance(dest, basestring): -+ if not isinstance(dest, str): - fd, dest = mkstemp() - os.close(fd) - os.remove(dest) -- assert isinstance(dest, basestring) -+ assert isinstance(dest, str) - # If File.copy didn't actually copy because dest is newer, check the - # file sizes. If dest is smaller, it means it is already stripped and - # elfhacked, so we can skip. -@@ -319,7 +319,7 @@ class AbsoluteSymlinkFile(File): - File.__init__(self, path) - - def copy(self, dest, skip_if_older=True): -- assert isinstance(dest, basestring) -+ assert isinstance(dest, str) - - # The logic in this function is complicated by the fact that symlinks - # aren't universally supported. So, where symlinks aren't supported, we -@@ -410,7 +410,7 @@ class HardlinkFile(File): - ''' - - def copy(self, dest, skip_if_older=True): -- assert isinstance(dest, basestring) -+ assert isinstance(dest, str) - - if not hasattr(os, 'link'): - return super(HardlinkFile, self).copy( -@@ -471,7 +471,7 @@ class ExistingFile(BaseFile): - self.required = required - - def copy(self, dest, skip_if_older=True): -- if isinstance(dest, basestring): -+ if isinstance(dest, str): - dest = Dest(dest) - else: - assert isinstance(dest, Dest) -@@ -517,7 +517,7 @@ class PreprocessedFile(BaseFile): - ''' - Invokes the preprocessor to create the destination file. - ''' -- if isinstance(dest, basestring): -+ if isinstance(dest, str): - dest = Dest(dest) - else: - assert isinstance(dest, Dest) -@@ -657,7 +657,7 @@ class XPTFile(GeneratedFile): - the individual XPTs to link. - skip_if_older is ignored. - ''' -- if isinstance(dest, basestring): -+ if isinstance(dest, str): - dest = Dest(dest) - assert isinstance(dest, Dest) - -@@ -1108,7 +1108,7 @@ class ComposedFinder(BaseFinder): - from mozpack.copier import FileRegistry - self.files = FileRegistry() - -- for base, finder in sorted(finders.iteritems()): -+ for base, finder in sorted(finders.items()): - if self.files.contains(base): - self.files.remove(base) - for p, f in finder.find(''): -diff --git a/python/mozbuild/mozpack/manifests.py b/python/mozbuild/mozpack/manifests.py -index 27c66634b..f79b40086 100644 ---- a/python/mozbuild/mozpack/manifests.py -+++ b/python/mozbuild/mozpack/manifests.py -@@ -2,8 +2,6 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, unicode_literals -- - from contextlib import contextmanager - import json - -@@ -116,7 +114,7 @@ class InstallManifest(object): - self._source_files = set() - - if path or fileobj: -- with _auto_fileobj(path, fileobj, 'rb') as fh: -+ with _auto_fileobj(path, fileobj, 'r') as fh: - self._source_files.add(fh.name) - self._load_from_fileobj(fh) - -@@ -175,7 +173,7 @@ class InstallManifest(object): - dest, content = fields[1:] - - self.add_content( -- self._decode_field_entry(content).encode('utf-8'), dest) -+ self._decode_field_entry(content), dest) - continue - - # Don't fail for non-actionable items, allowing -@@ -228,7 +226,7 @@ class InstallManifest(object): - - It is an error if both are specified. - """ -- with _auto_fileobj(path, fileobj, 'wb') as fh: -+ with _auto_fileobj(path, fileobj, 'w') as fh: - fh.write('%d\n' % self.CURRENT_VERSION) - - for dest in sorted(self._dests): -@@ -242,13 +240,11 @@ class InstallManifest(object): - for path in paths: - source = mozpath.join(base, path) - parts = ['%d' % type, mozpath.join(dest, path), source] -- fh.write('%s\n' % self.FIELD_SEPARATOR.join( -- p.encode('utf-8') for p in parts)) -+ fh.write('%s\n' % self.FIELD_SEPARATOR.join(parts)) - else: - parts = ['%d' % entry[0], dest] - parts.extend(entry[1:]) -- fh.write('%s\n' % self.FIELD_SEPARATOR.join( -- p.encode('utf-8') for p in parts)) -+ fh.write('%s\n' % self.FIELD_SEPARATOR.join(parts)) - - def add_link(self, source, dest): - """Add a link to this manifest. -@@ -439,7 +435,7 @@ class InstallManifest(object): - if install_type == self.CONTENT: - # GeneratedFile expect the buffer interface, which the unicode - # type doesn't have, so encode to a str. -- content = self._decode_field_entry(entry[1]).encode('utf-8') -+ content = self._decode_field_entry(entry[1]) - registry.add(dest, GeneratedFile(content)) - continue - -diff --git a/python/mozbuild/mozpack/mozjar.py b/python/mozbuild/mozpack/mozjar.py -index a723fd2c0..0b04d233c 100644 ---- a/python/mozbuild/mozpack/mozjar.py -+++ b/python/mozbuild/mozpack/mozjar.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import -+ - - from io import BytesIO - import struct -@@ -14,9 +14,10 @@ from zipfile import ( - ZIP_DEFLATED, - ) - from collections import OrderedDict --from urlparse import urlparse, ParseResult -+from urllib.parse import urlparse, ParseResult - import mozpack.path as mozpath - from mozbuild.util import memoize -+from functools import reduce - - - JAR_STORED = ZIP_STORED -@@ -72,7 +73,7 @@ class JarStruct(object): - an instance with empty fields. - ''' - assert self.MAGIC and isinstance(self.STRUCT, OrderedDict) -- self.size_fields = set(t for t in self.STRUCT.itervalues() -+ self.size_fields = set(t for t in self.STRUCT.values() - if not t in JarStruct.TYPE_MAPPING) - self._values = {} - if data: -@@ -94,7 +95,7 @@ class JarStruct(object): - # For all fields used as other fields sizes, keep track of their value - # separately. - sizes = dict((t, 0) for t in self.size_fields) -- for name, t in self.STRUCT.iteritems(): -+ for name, t in self.STRUCT.items(): - if t in JarStruct.TYPE_MAPPING: - value, size = JarStruct.get_data(t, data[offset:]) - else: -@@ -113,7 +114,7 @@ class JarStruct(object): - Initialize an instance with empty fields. - ''' - self.signature = self.MAGIC -- for name, t in self.STRUCT.iteritems(): -+ for name, t in self.STRUCT.items(): - if name in self.size_fields: - continue - self._values[name] = 0 if t in JarStruct.TYPE_MAPPING else '' -@@ -138,9 +139,9 @@ class JarStruct(object): - from self.STRUCT. - ''' - serialized = struct.pack('<I', self.signature) -- sizes = dict((t, name) for name, t in self.STRUCT.iteritems() -+ sizes = dict((t, name) for name, t in self.STRUCT.items() - if not t in JarStruct.TYPE_MAPPING) -- for name, t in self.STRUCT.iteritems(): -+ for name, t in self.STRUCT.items(): - if t in JarStruct.TYPE_MAPPING: - format, size = JarStruct.TYPE_MAPPING[t] - if name in sizes: -@@ -159,7 +160,7 @@ class JarStruct(object): - variable length fields. - ''' - size = JarStruct.TYPE_MAPPING['uint32'][1] -- for name, type in self.STRUCT.iteritems(): -+ for name, type in self.STRUCT.items(): - if type in JarStruct.TYPE_MAPPING: - size += JarStruct.TYPE_MAPPING[type][1] - else: -@@ -180,7 +181,7 @@ class JarStruct(object): - return key in self._values - - def __iter__(self): -- return self._values.iteritems() -+ return iter(self._values.items()) - - def __repr__(self): - return "<%s %s>" % (self.__class__.__name__, -@@ -374,7 +375,7 @@ class JarReader(object): - entries = self.entries - if not entries: - return JAR_STORED -- return max(f['compression'] for f in entries.itervalues()) -+ return max(f['compression'] for f in entries.values()) - - @property - def entries(self): -@@ -390,7 +391,7 @@ class JarReader(object): - preload = JarStruct.get_data('uint32', self._data)[0] - entries = OrderedDict() - offset = self._cdir_end['cdir_offset'] -- for e in xrange(self._cdir_end['cdir_entries']): -+ for e in range(self._cdir_end['cdir_entries']): - entry = JarCdirEntry(self._data[offset:]) - offset += entry.size - # Creator host system. 0 is MSDOS, 3 is Unix -@@ -452,7 +453,7 @@ class JarReader(object): - for file in jarReader: - ... - ''' -- for entry in self.entries.itervalues(): -+ for entry in self.entries.values(): - yield self._getreader(entry) - - def __getitem__(self, name): -@@ -547,7 +548,7 @@ class JarWriter(object): - headers = {} - preload_size = 0 - # Prepare central directory entries -- for entry, content in self._contents.itervalues(): -+ for entry, content in self._contents.values(): - header = JarLocalFileHeader() - for name in entry.STRUCT: - if name in header: -@@ -562,7 +563,7 @@ class JarWriter(object): - end['disk_entries'] = len(self._contents) - end['cdir_entries'] = end['disk_entries'] - end['cdir_size'] = reduce(lambda x, y: x + y[0].size, -- self._contents.values(), 0) -+ list(self._contents.values()), 0) - # On optimized archives, store the preloaded size and the central - # directory entries, followed by the first end of central directory. - if self._optimize: -@@ -571,18 +572,18 @@ class JarWriter(object): - if preload_size: - preload_size += offset - self._data.write(struct.pack('<I', preload_size)) -- for entry, _ in self._contents.itervalues(): -+ for entry, _ in self._contents.values(): - entry['offset'] += offset - self._data.write(entry.serialize()) - self._data.write(end.serialize()) - # Store local file entries followed by compressed data -- for entry, content in self._contents.itervalues(): -+ for entry, content in self._contents.values(): - self._data.write(headers[entry].serialize()) - self._data.write(content) - # On non optimized archives, store the central directory entries. - if not self._optimize: - end['cdir_offset'] = offset -- for entry, _ in self._contents.itervalues(): -+ for entry, _ in self._contents.values(): - self._data.write(entry.serialize()) - # Store the end of central directory. - self._data.write(end.serialize()) -@@ -622,7 +623,7 @@ class JarWriter(object): - deflater = data - else: - deflater = Deflater(compress, compress_level=self._compress_level) -- if isinstance(data, basestring): -+ if isinstance(data, str): - deflater.write(data) - elif hasattr(data, 'read'): - if hasattr(data, 'seek'): -diff --git a/testing/mozbase/manifestparser/manifestparser/ini.py b/testing/mozbase/manifestparser/manifestparser/ini.py -index e5ba249c1..c141a18b7 100644 ---- a/testing/mozbase/manifestparser/manifestparser/ini.py -+++ b/testing/mozbase/manifestparser/manifestparser/ini.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this file, - # You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import -+ - - import os - import sys -@@ -12,7 +12,7 @@ __all__ = ['read_ini', 'combine_fields'] - - class IniParseError(Exception): - def __init__(self, fp, linenum, msg): -- if isinstance(fp, basestring): -+ if isinstance(fp, str): - path = fp - elif hasattr(fp, 'name'): - path = fp.name -@@ -43,12 +43,15 @@ def read_ini(fp, variables=None, default='DEFAULT', defaults_only=False, - sections = [] - key = value = None - section_names = set() -- if isinstance(fp, basestring): -+ if isinstance(fp, str): - fp = file(fp) - - # read the lines - for (linenum, line) in enumerate(fp.read().splitlines(), start=1): - -+ if isinstance(line, bytes): -+ line = line.decode('utf-8') -+ - stripped = line.strip() - - # ignore blank lines -@@ -66,7 +69,7 @@ def read_ini(fp, variables=None, default='DEFAULT', defaults_only=False, - inline_prefixes = {p: -1 for p in comments} - while comment_start == sys.maxsize and inline_prefixes: - next_prefixes = {} -- for prefix, index in inline_prefixes.items(): -+ for prefix, index in list(inline_prefixes.items()): - index = line.find(prefix, index+1) - if index == -1: - continue -@@ -163,7 +166,7 @@ def combine_fields(global_vars, local_vars): - 'support-files': '%s %s', - } - final_mapping = global_vars.copy() -- for field_name, value in local_vars.items(): -+ for field_name, value in list(local_vars.items()): - if field_name not in field_patterns or field_name not in global_vars: - final_mapping[field_name] = value - continue -diff --git a/testing/mozbase/manifestparser/manifestparser/manifestparser.py b/testing/mozbase/manifestparser/manifestparser/manifestparser.py -index 921369fd2..5b2f4c453 100755 ---- a/testing/mozbase/manifestparser/manifestparser/manifestparser.py -+++ b/testing/mozbase/manifestparser/manifestparser/manifestparser.py -@@ -2,9 +2,9 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this file, - # You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function - --from StringIO import StringIO -+ -+from io import StringIO - import json - import fnmatch - import os -@@ -23,7 +23,7 @@ from .filters import ( - __all__ = ['ManifestParser', 'TestManifest', 'convert'] - - relpath = os.path.relpath --string = (basestring,) -+string = (str,) - - - # path normalization -@@ -195,7 +195,7 @@ class ManifestParser(object): - - # otherwise an item - # apply ancestor defaults, while maintaining current file priority -- data = dict(self._ancestor_defaults.items() + data.items()) -+ data = dict(list(self._ancestor_defaults.items()) + list(data.items())) - - test = data - test['name'] = section -@@ -323,19 +323,19 @@ class ManifestParser(object): - # make some check functions - if inverse: - def has_tags(test): -- return not tags.intersection(test.keys()) -+ return not tags.intersection(list(test.keys())) - - def dict_query(test): -- for key, value in kwargs.items(): -+ for key, value in list(kwargs.items()): - if test.get(key) == value: - return False - return True - else: - def has_tags(test): -- return tags.issubset(test.keys()) -+ return tags.issubset(list(test.keys())) - - def dict_query(test): -- for key, value in kwargs.items(): -+ for key, value in list(kwargs.items()): - if test.get(key) != value: - return False - return True -@@ -359,7 +359,7 @@ class ManifestParser(object): - if tests is None: - manifests = [] - # Make sure to return all the manifests, even ones without tests. -- for manifest in self.manifest_defaults.keys(): -+ for manifest in list(self.manifest_defaults.keys()): - if isinstance(manifest, tuple): - parentmanifest, manifest = manifest - if manifest not in manifests: -@@ -409,7 +409,7 @@ class ManifestParser(object): - """ - - files = set([]) -- if isinstance(directories, basestring): -+ if isinstance(directories, str): - directories = [directories] - - # get files in directories -@@ -476,7 +476,7 @@ class ManifestParser(object): - print('[DEFAULT]', file=fp) - for tag in global_tags: - print('%s =' % tag, file=fp) -- for key, value in global_kwargs.items(): -+ for key, value in list(global_kwargs.items()): - print('%s = %s' % (key, value), file=fp) - print(file=fp) - -@@ -602,7 +602,7 @@ class ManifestParser(object): - internal function to import directories - """ - -- if isinstance(pattern, basestring): -+ if isinstance(pattern, str): - patterns = [pattern] - else: - patterns = pattern -diff --git a/testing/mozbase/mozinfo/mozinfo/mozinfo.py b/testing/mozbase/mozinfo/mozinfo/mozinfo.py -index 90c187568..6c5a1f322 100755 ---- a/testing/mozbase/mozinfo/mozinfo/mozinfo.py -+++ b/testing/mozbase/mozinfo/mozinfo/mozinfo.py -@@ -8,7 +8,7 @@ - # linux) to the information; I certainly wouldn't want anyone parsing this - # information and having behaviour depend on it - --from __future__ import absolute_import, print_function -+ - - import os - import platform -@@ -24,7 +24,7 @@ _os = os - class unknown(object): - """marker class for unknown information""" - -- def __nonzero__(self): -+ def __bool__(self): - return False - - def __str__(self): -@@ -96,20 +96,17 @@ elif system.startswith(('MINGW', 'MSYS_NT')): - info['os'] = 'win' - os_version = version = unknown - elif system == "Linux": -- if hasattr(platform, "linux_distribution"): -- (distro, os_version, codename) = platform.linux_distribution() -- else: -- (distro, os_version, codename) = platform.dist() - if not processor: - processor = machine -- version = "%s %s" % (distro, os_version) -+ -+ distro = 'OE/Yocto' -+ os_version = version = unknown - - # Bug in Python 2's `platform` library: - # It will return a triple of empty strings if the distribution is not supported. - # It works on Python 3. If we don't have an OS version, - # the unit tests fail to run. - if not distro and not os_version and not codename: -- distro = 'lfs' - version = release - os_version = release - -@@ -131,7 +128,7 @@ else: - os_version = version = unknown - - info['version'] = version --info['os_version'] = StringVersion(os_version) -+info['os_version'] = version - - # processor type and bits - if processor in ["i386", "i686"]: -@@ -188,12 +185,7 @@ def update(new_info): - to a json file containing the new info. - """ - -- PY3 = sys.version_info[0] == 3 -- if PY3: -- string_types = str, -- else: -- string_types = basestring, -- if isinstance(new_info, string_types): -+ if isinstance(new_info, str): - # lazy import - import mozfile - import json -@@ -295,7 +287,7 @@ def main(args=None): - - # print out choices if requested - flag = False -- for key, value in options.__dict__.items(): -+ for key, value in list(options.__dict__.items()): - if value is True: - print('%s choices: %s' % (key, ' '.join([str(choice) - for choice in choices[key]]))) -@@ -304,7 +296,7 @@ def main(args=None): - return - - # otherwise, print out all info -- for key, value in info.items(): -+ for key, value in list(info.items()): - print('%s: %s' % (key, value)) - - -diff --git a/testing/mozbase/mozprocess/mozprocess/processhandler.py b/testing/mozbase/mozprocess/mozprocess/processhandler.py -index 3efb650b7..2575a4702 100644 ---- a/testing/mozbase/mozprocess/mozprocess/processhandler.py -+++ b/testing/mozbase/mozprocess/mozprocess/processhandler.py -@@ -2,7 +2,7 @@ - # License, v. 2.0. If a copy of the MPL was not distributed with this file, - # You can obtain one at http://mozilla.org/MPL/2.0/. - --from __future__ import absolute_import, print_function -+ - - import errno - import os -@@ -13,7 +13,7 @@ import threading - import time - import traceback - --from Queue import Queue, Empty -+from queue import Queue, Empty - from datetime import datetime - - -@@ -124,14 +124,14 @@ class ProcessHandlerMixin(object): - thread = threading.current_thread().name - print("DBG::MOZPROC PID:{} ({}) | {}".format(self.pid, thread, msg)) - -- def __del__(self, _maxint=sys.maxint): -+ def __del__(self, _maxint=sys.maxsize): - if isWin: - handle = getattr(self, '_handle', None) - if handle: - if hasattr(self, '_internal_poll'): - self._internal_poll(_deadstate=_maxint) - else: -- self.poll(_deadstate=sys.maxint) -+ self.poll(_deadstate=sys.maxsize) - if handle or self._job or self._io_port: - self._cleanup() - else: -@@ -243,7 +243,7 @@ class ProcessHandlerMixin(object): - p2cread, p2cwrite, - c2pread, c2pwrite, - errread, errwrite) = args_tuple -- if not isinstance(args, basestring): -+ if not isinstance(args, str): - args = subprocess.list2cmdline(args) - - # Always or in the create new process group -diff --git a/third_party/python/which/which.py b/third_party/python/which/which.py -index 9c7d10835..f02b2616e 100644 ---- a/third_party/python/which/which.py -+++ b/third_party/python/which/which.py -@@ -90,13 +90,13 @@ def _getRegisteredExecutable(exeName): - if sys.platform.startswith('win'): - if os.path.splitext(exeName)[1].lower() != '.exe': - exeName += '.exe' -- import _winreg -+ import winreg - try: - key = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\" +\ - exeName -- value = _winreg.QueryValue(_winreg.HKEY_LOCAL_MACHINE, key) -+ value = winreg.QueryValue(winreg.HKEY_LOCAL_MACHINE, key) - registered = (value, "from HKLM\\"+key) -- except _winreg.error: -+ except winreg.error: - pass - if registered and not os.path.exists(registered[0]): - registered = None -@@ -244,7 +244,7 @@ def which(command, path=None, verbose=0, exts=None): - If no match is found for the command, a WhichError is raised. - """ - try: -- match = whichgen(command, path, verbose, exts).next() -+ match = next(whichgen(command, path, verbose, exts)) - except StopIteration: - raise WhichError("Could not find '%s' on the path." % command) - return match -@@ -281,17 +281,17 @@ def main(argv): - try: - optlist, args = getopt.getopt(argv[1:], 'haVvqp:e:', - ['help', 'all', 'version', 'verbose', 'quiet', 'path=', 'exts=']) -- except getopt.GetoptError, msg: -+ except getopt.GetoptError as msg: - sys.stderr.write("which: error: %s. Your invocation was: %s\n"\ - % (msg, argv)) - sys.stderr.write("Try 'which --help'.\n") - return 1 - for opt, optarg in optlist: - if opt in ('-h', '--help'): -- print _cmdlnUsage -+ print(_cmdlnUsage) - return 0 - elif opt in ('-V', '--version'): -- print "which %s" % __version__ -+ print("which %s" % __version__) - return 0 - elif opt in ('-a', '--all'): - all = 1 -@@ -319,9 +319,9 @@ def main(argv): - nmatches = 0 - for match in whichgen(arg, path=altpath, verbose=verbose, exts=exts): - if verbose: -- print "%s (%s)" % match -+ print("%s (%s)" % match) - else: -- print match -+ print(match) - nmatches += 1 - if not all: - break --- -2.21.0 - diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch new file mode 100644 index 0000000000..a2ccf6b916 --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch @@ -0,0 +1,28 @@ +From e5b95b3918588e2930c9af7ba304c57e871b2d55 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Thu, 7 Oct 2021 12:44:18 +0200 +Subject: [PATCH] build: do not use autoconf's config.sub to 'canonicalize' + names + +The outcome is that processed names no longer match our custom rust +target definitions, and the build fails. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + build/moz.configure/init.configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure +index 3a164c6558..99dfc9054a 100644 +--- a/build/moz.configure/init.configure ++++ b/build/moz.configure/init.configure +@@ -823,7 +823,7 @@ def help_host_target(help, host, target): + + def config_sub(shell, triplet): + config_sub = os.path.join(os.path.dirname(__file__), "..", "autoconf", "config.sub") +- return check_cmd_output(shell, config_sub, triplet).strip() ++ return triplet + + + @depends("--host", shell) diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0002-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0002-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch deleted file mode 100644 index e3f1883a99..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0002-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0a61b0b98c152f10404ccbdeeac583a486638a7a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> -Date: Thu, 6 Jun 2013 18:36:01 +0200 -Subject: [PATCH] js.pc.in: do not include RequiredDefines.h for depending - packages - -in our cross environment the would fail with: - -| cc1: fatal error: /usr/include/js-17.0/js/RequiredDefines.h: No such file or directory - -and currently it only defines __STDC_LIMIT_MACROS -Upstream-Status: Inappropriate [embedded specific] -Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> - -Rebase to 52.8.1 -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - js/src/build/js.pc.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/js/src/build/js.pc.in b/js/src/build/js.pc.in -index 2eae393..c2dea62 100644 ---- a/js/src/build/js.pc.in -+++ b/js/src/build/js.pc.in -@@ -8,4 +8,4 @@ Description: The Mozilla library for JavaScript - Version: @MOZILLA_VERSION@ - @PKGCONF_REQUIRES_PRIVATE@ - Libs: -L${libdir} -l@JS_LIBRARY_NAME@ --Cflags: -include ${includedir}/@JS_LIBRARY_NAME@/js/RequiredDefines.h -I${includedir}/@JS_LIBRARY_NAME@ -+Cflags: -I${includedir}/@JS_LIBRARY_NAME@ --- -2.7.4 - diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0002-moz.configure-do-not-look-for-llvm-objdump.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0002-moz.configure-do-not-look-for-llvm-objdump.patch new file mode 100644 index 0000000000..6ff83e3bb2 --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0002-moz.configure-do-not-look-for-llvm-objdump.patch @@ -0,0 +1,43 @@ +From 0133ddb86eb6e0741e02b0032c41468db6438530 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Fri, 1 Oct 2021 13:01:10 +0200 +Subject: [PATCH] moz.configure: do not look for llvm-objdump + +This avoid dragging in a dependency that isn't even needed +for js builds. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + moz.configure | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/moz.configure b/moz.configure +index fc66b520d0..15de9a2ee0 100755 +--- a/moz.configure ++++ b/moz.configure +@@ -994,15 +994,15 @@ def llvm_objdump(host_c_compiler, c_compiler, bindgen_config_paths): + return (llvm_objdump,) + + +-llvm_objdump = check_prog( +- "LLVM_OBJDUMP", +- llvm_objdump, +- what="llvm-objdump", +- when="--enable-compile-environment", +- paths=clang_search_path, +-) +- +-add_old_configure_assignment("LLVM_OBJDUMP", llvm_objdump) ++#llvm_objdump = check_prog( ++# "LLVM_OBJDUMP", ++# llvm_objdump, ++# what="llvm-objdump", ++# when="--enable-compile-environment", ++# paths=clang_search_path, ++#) ++ ++#add_old_configure_assignment("LLVM_OBJDUMP", llvm_objdump) + + + option("--enable-dtrace", help="Build with dtrace support") diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0003-fix-cross-compilation-on-i586-targets.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0003-fix-cross-compilation-on-i586-targets.patch deleted file mode 100644 index e0929a8a8f..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0003-fix-cross-compilation-on-i586-targets.patch +++ /dev/null @@ -1,38 +0,0 @@ -From a452138a1dd274bfad381a701729783360dc86fb Mon Sep 17 00:00:00 2001 -From: Maciej Borzecki <maciej.borzecki@open-rnd.pl> -Date: Tue, 5 Jan 2016 22:04:17 +0100 -Subject: [PATCH] fix cross compilation on i586 targets - -Remove offending -Wl,-rpath-link that may cause host libraries to be picked -during linking. The patch applies a fix to configure.in. So as not to -regenerate configure, similar fix is applied there. - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl> - -Rebase to 52.8.1 -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - -Rebase to 60.9.0 (firefox-esr sources) -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> ---- - js/src/old-configure.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/js/src/old-configure.in b/js/src/old-configure.in -index 3d53ee1..11c3d5a 100644 ---- a/js/src/old-configure.in -+++ b/js/src/old-configure.in -@@ -405,7 +405,7 @@ AS='$(CC)' - AS_DASH_C_FLAG='-c' - MOZ_USER_DIR=".mozilla" - --MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib" -+MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin" - - dnl Configure platform-specific CPU architecture compiler options. - dnl ============================================================== --- -2.21.0 - diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch new file mode 100644 index 0000000000..c440bf178f --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch @@ -0,0 +1,65 @@ +From 749ba11fd6a69c8180945d4866415d16ae06a9c0 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Fri, 1 Oct 2021 13:02:17 +0200 +Subject: [PATCH] rust.configure: do not try to find a suitable upstream target + +OE is using custom targets and so this is bound to fail. + +Upstream-Status: Inapppropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + build/moz.configure/rust.configure | 34 ++---------------------------- + 1 file changed, 2 insertions(+), 32 deletions(-) + +diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure +index cd77d72bb7..4b6481cbe3 100644 +--- a/build/moz.configure/rust.configure ++++ b/build/moz.configure/rust.configure +@@ -459,33 +459,7 @@ def assert_rust_compile(host_or_target, rustc_target, rustc): + def rust_host_triple( + rustc, host, compiler_info, rustc_host, rust_supported_targets, arm_target + ): +- rustc_target = detect_rustc_target( +- host, compiler_info, arm_target, rust_supported_targets +- ) +- if rustc_target != rustc_host: +- if host.alias == rustc_target: +- configure_host = host.alias +- else: +- configure_host = "{}/{}".format(host.alias, rustc_target) +- die( +- dedent( +- """\ +- The rust compiler host ({rustc}) is not suitable for the configure host ({configure}). +- +- You can solve this by: +- * Set your configure host to match the rust compiler host by editing your +- mozconfig and adding "ac_add_options --host={rustc}". +- * Or, install the rust toolchain for {configure}, if supported, by running +- "rustup default stable-{rustc_target}" +- """.format( +- rustc=rustc_host, +- configure=configure_host, +- rustc_target=rustc_target, +- ) +- ) +- ) +- assert_rust_compile(host, rustc_target, rustc) +- return rustc_target ++ return rustc_host + + + @depends( +@@ -495,11 +469,7 @@ def rust_host_triple( + def rust_target_triple( + rustc, target, compiler_info, rust_supported_targets, arm_target + ): +- rustc_target = detect_rustc_target( +- target, compiler_info, arm_target, rust_supported_targets +- ) +- assert_rust_compile(target, rustc_target, rustc) +- return rustc_target ++ return target.alias + + + set_config("RUST_TARGET", rust_target_triple) diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0004-do-not-create-python-environment.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0004-do-not-create-python-environment.patch deleted file mode 100644 index 985fc36c18..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0004-do-not-create-python-environment.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 5028d1cd669c179ed49061316d04c8e8862a5bd8 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 12 Jul 2018 15:04:47 +0800 -Subject: [PATCH 1/5] do not create python environment - -Use oe's python environment rather than create one of host - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - -Rebase to 60.9.0 (firefox-esr sources) -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> ---- - build/moz.configure/init.configure | 18 ------------------ - configure.py | 10 +++++++++- - 3 files changed, 11 insertions(+), 21 deletions(-) - ---- a/build/moz.configure/init.configure -+++ b/build/moz.configure/init.configure -@@ -250,24 +250,6 @@ def virtualenv_python(env_python, build_ - else: - python = sys.executable - -- if not manager.up_to_date(python): -- log.info('Creating Python environment') -- manager.build(python) -- -- python = normsep(manager.python_path) -- -- if python != normsep(sys.executable): -- log.info('Reexecuting in the virtualenv') -- if env_python: -- del os.environ['PYTHON'] -- # One would prefer to use os.execl, but that's completely borked on -- # Windows. -- sys.exit(subprocess.call([python] + sys.argv)) -- -- # We are now in the virtualenv -- if not distutils.sysconfig.get_python_lib(): -- die('Could not determine python site packages directory') -- - return python - - ---- a/configure.py -+++ b/configure.py -@@ -12,7 +12,15 @@ import textwrap - - - base_dir = os.path.abspath(os.path.dirname(__file__)) --sys.path.insert(0, os.path.join(base_dir, 'python', 'mozbuild')) -+sys.path.insert(0, os.path.join(base_dir, 'config')) -+def get_immediate_subdirectories(a_dir): -+ return [name for name in os.listdir(a_dir) -+ if os.path.isdir(os.path.join(a_dir, name))] -+for s in ["python", "testing/mozbase"]: -+ sub_dir = os.path.join(base_dir, s) -+ for module_dir in get_immediate_subdirectories(sub_dir): -+ sys.path.insert(0, os.path.join(sub_dir, module_dir)) -+ - from mozbuild.configure import ConfigureSandbox - from mozbuild.makeutil import Makefile - from mozbuild.pythonutil import iter_modules_in_path diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0004-use-asm-sgidefs.h.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0004-use-asm-sgidefs.h.patch new file mode 100644 index 0000000000..b56f0b95b5 --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0004-use-asm-sgidefs.h.patch @@ -0,0 +1,35 @@ +From 65acc8800dba7e10da882871d4648241805c47ce Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <amccurdy@gmail.com> +Date: Sat, 30 Apr 2016 15:29:06 -0700 +Subject: [PATCH] use <asm/sgidefs.h> + +Build fix for MIPS with musl libc + +The MIPS specific header <sgidefs.h> is provided by glibc and uclibc +but not by musl. Regardless of the libc, the kernel headers provide +<asm/sgidefs.h> which provides the same definitions, so use that +instead. + +Upstream-Status: Pending + +[Vincent: +Taken from: https://sourceware.org/bugzilla/show_bug.cgi?id=21070] + +Signed-off-by: Andre McCurdy <armccurdy@gmail.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> +--- + gdb/mips-linux-nat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mfbt/RandomNum.cpp ++++ b/mfbt/RandomNum.cpp +@@ -52,7 +52,7 @@ extern "C" BOOLEAN NTAPI RtlGenRandom(PV + # elif defined(__s390__) + # define GETRANDOM_NR 349 + # elif defined(__mips__) +-# include <sgidefs.h> ++# include <asm/sgidefs.h> + # if _MIPS_SIM == _MIPS_SIM_ABI32 + # define GETRANDOM_NR 4353 + # elif _MIPS_SIM == _MIPS_SIM_ABI64 diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0005-fix-cannot-find-link.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0005-fix-cannot-find-link.patch deleted file mode 100644 index 4f7ebc68d7..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0005-fix-cannot-find-link.patch +++ /dev/null @@ -1,34 +0,0 @@ -From e6dcee5f8a0f80ce99946b81fa1233611a149fe6 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 12 Jul 2018 18:00:52 +0800 -Subject: [PATCH 2/5] fix cannot find link - -.. -|DEBUG: link: Trying 'mips64-wrs-linux-ld --sysroot=tmp-glibc/work/ -mips64-wrs-linux/mozjs/52.8.1-r0/recipe-sysroot ' -|ERROR: Cannot find link -... - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - build/moz.configure/checks.configure | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/moz.configure/checks.configure b/build/moz.configure/checks.configure -index 8c2dbc0..83bffc3 100644 ---- a/build/moz.configure/checks.configure -+++ b/build/moz.configure/checks.configure -@@ -128,7 +128,7 @@ def check_prog(var, progs, what=None, input=None, allow_missing=False, - - for prog in value or progs: - log.debug('%s: Trying %s', var.lower(), quote(prog)) -- result = find_program(prog, paths) -+ result = find_program(prog.split()[0], paths) - if result: - return result - --- -2.7.4 - diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0006-workaround-autoconf-2.13-detection-failed.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0006-workaround-autoconf-2.13-detection-failed.patch deleted file mode 100644 index a754ff16cf..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0006-workaround-autoconf-2.13-detection-failed.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 646a78262b18e19721cd41ee515215221dd241b6 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 12 Jul 2018 18:12:42 +0800 -Subject: [PATCH 3/5] workaround autoconf 2.13 detection failed - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - build/moz.configure/old.configure | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure -index b32c3f7..ece47f4 100644 ---- a/build/moz.configure/old.configure -+++ b/build/moz.configure/old.configure -@@ -31,7 +31,7 @@ def autoconf(mozconfig, autoconf): - autoconf = autoconf[0] if autoconf else None - - for ac in (mozconfig_autoconf, autoconf, 'autoconf-2.13', 'autoconf2.13', -- 'autoconf213'): -+ 'autoconf213', 'autoconf'): - if ac: - autoconf = find_program(ac) - if autoconf: --- -2.7.4 - diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0007-fix-do_compile-failed-on-mips.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0007-fix-do_compile-failed-on-mips.patch deleted file mode 100644 index d1da109720..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0007-fix-do_compile-failed-on-mips.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 55d833dc3c194f1eb7841f308ad3b9ec3800d3b3 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Fri, 13 Jul 2018 15:48:32 +0800 -Subject: [PATCH 5/5] fix do_compile failed on mips - -Link with var-OS_LDFLAGS to fix the issue. -Such as on mips: -... -|mips-wrsmllib32-linux-g++ -meb -mabi=32 -mhard-float ... -o libmozjs-52.so -|/usr/include/c++/8.1.0/bits/atomic_base.h:514: error: undefined -reference to '__atomic_fetch_add_8' -... - -In recipe, set OS_LDFLAGS="-Wl,-latomic" could fix the issue. - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - config/config.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/config/config.mk -+++ b/config/config.mk -@@ -423,7 +423,7 @@ EXPAND_MKSHLIB_ARGS = --uselist - ifdef SYMBOL_ORDER - EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER) - endif --EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB) -+EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB) $(OS_LDFLAGS) - - # autoconf.mk sets OBJ_SUFFIX to an error to avoid use before including - # this file diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0008-add-riscv-support.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0008-add-riscv-support.patch deleted file mode 100644 index 0a41485610..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0008-add-riscv-support.patch +++ /dev/null @@ -1,50 +0,0 @@ -Add RISC-V support - -Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1318905] - -Signed-off-by: Ricardo Salveti <ricardo@foundries.io> - ---- a/build/autoconf/config.guess -+++ b/build/autoconf/config.guess -@@ -1029,6 +1029,9 @@ EOF - ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} - exit ;; -+ riscv32:Linux:*:* | riscv64:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} - exit ;; ---- a/build/moz.configure/init.configure -+++ b/build/moz.configure/init.configure -@@ -658,6 +658,9 @@ def split_triplet(triplet, allow_unknown - elif cpu == 'sh4': - canonical_cpu = 'sh4' - endianness = 'little' -+ elif cpu in ('riscv32', 'riscv64'): -+ canonical_cpu = cpu -+ endianness = 'little' - elif allow_unknown: - canonical_cpu = cpu - endianness = 'unknown' ---- a/python/mozbuild/mozbuild/configure/constants.py -+++ b/python/mozbuild/mozbuild/configure/constants.py -@@ -50,6 +50,8 @@ CPU_bitness = { - 'mips64': 64, - 'ppc': 32, - 'ppc64': 64, -+ 'riscv32': 32, -+ 'riscv64': 64, - 's390': 32, - 's390x': 64, - 'sh4': 32, -@@ -82,6 +84,8 @@ CPU_preprocessor_checks = OrderedDict(( - ('s390', '__s390__'), - ('ppc64', '__powerpc64__'), - ('ppc', '__powerpc__'), -+ ('riscv32', '__riscv && __SIZEOF_POINTER__ == 4'), -+ ('riscv64', '__riscv && __SIZEOF_POINTER__ == 8'), - ('Alpha', '__alpha__'), - ('hppa', '__hppa__'), - ('sparc64', '__sparc__ && __arch64__'), diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0009-mozjs-fix-coredump-caused-by-getenv.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0009-mozjs-fix-coredump-caused-by-getenv.patch deleted file mode 100644 index 477f73a2f7..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0009-mozjs-fix-coredump-caused-by-getenv.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 20b639b7364f9953fdacb058f9ba800bcbf029b4 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Thu, 2 Aug 2018 09:40:48 +0800 -Subject: [PATCH] mozjs: fix coredump caused by getenv - -Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1480315] - -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - mozglue/misc/TimeStamp.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/mozglue/misc/TimeStamp.cpp b/mozglue/misc/TimeStamp.cpp -index 932b75c..7a4d71b 100644 ---- a/mozglue/misc/TimeStamp.cpp -+++ b/mozglue/misc/TimeStamp.cpp -@@ -11,6 +11,7 @@ - #include "mozilla/TimeStamp.h" - #include <stdio.h> - #include <string.h> -+#include <stdlib.h> - - namespace mozilla { - --- -2.7.4 - diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0010-format-overflow.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0010-format-overflow.patch deleted file mode 100644 index e257fc6f62..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0010-format-overflow.patch +++ /dev/null @@ -1,21 +0,0 @@ -Drop enable format string warnings to help gcc9 - -Fixes -| /mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/mozjs/52.9.1-r0/mozjs-52.9.1/js/src/jit/x64/BaseAssembler-x64.h:596:13: error: '%s' directive argument is null [-Werror=format-overflow=] -| 596 | spew("movq " MEM_obs ", %s", ADDR_obs(offset, base, index, scale), GPReg64Name(dst)); -| | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Upstream-Status: Inappropriate [Workaround for gcc9] -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- a/js/src/moz.build -+++ b/js/src/moz.build -@@ -785,7 +785,7 @@ if CONFIG['JS_HAS_CTYPES']: - if CONFIG['CC_TYPE'] in ('clang', 'gcc'): - # Also disable strict-aliasing for GCC compiler, that is enabled by default - # starting with version 7.1, see Bug 1363009 -- CXXFLAGS += ['-Wno-shadow', '-Werror=format', '-fno-strict-aliasing'] -+ CXXFLAGS += ['-Wno-shadow', '-fno-strict-aliasing'] - - # Suppress warnings in third-party code. - if CONFIG['CC_TYPE'] in ('clang', 'gcc'): diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0011-To-fix-build-error-on-arm32BE.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0011-To-fix-build-error-on-arm32BE.patch deleted file mode 100644 index 056f74a529..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0011-To-fix-build-error-on-arm32BE.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 9afb0e4d3b9209ea198052cea0401bef7ee25ad8 Mon Sep 17 00:00:00 2001 -From: Lei Maohui <leimaohui@cn.fujitsu.com> -Date: Thu, 9 May 2019 12:23:40 +0900 -Subject: [PATCH] To fix build error on arm32BE. - -error: #error Target architecture was not detected as supported by Double-Conversion. - -Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> ---- - mfbt/double-conversion/double-conversion/utils.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mfbt/double-conversion/double-conversion/utils.h b/mfbt/double-conversion/double-conversion/utils.h -index 4f37218..93575cb 100644 ---- a/mfbt/double-conversion/double-conversion/utils.h -+++ b/mfbt/double-conversion/double-conversion/utils.h -@@ -53,7 +53,7 @@ - // disabled.) - // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) - #if defined(_M_X64) || defined(__x86_64__) || \ -- defined(__ARMEL__) || defined(__avr32__) || \ -+ defined(__arm__) || defined(__avr32__) || \ - defined(__hppa__) || defined(__ia64__) || \ - defined(__mips__) || \ - defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ --- -2.7.4 - diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0012-JS_PUBLIC_API.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0012-JS_PUBLIC_API.patch deleted file mode 100644 index 56b18ba8c6..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0012-JS_PUBLIC_API.patch +++ /dev/null @@ -1,55 +0,0 @@ -patch from https://bugzilla.mozilla.org/show_bug.cgi?id=1426865 - -Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1426865] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- a/js/public/TypeDecls.h -+++ b/js/public/TypeDecls.h -@@ -21,31 +21,32 @@ - #include <stdint.h> - - #include "js-config.h" -+#include "jstypes.h" - - typedef uint8_t jsbytecode; - --class JSAtom; --struct JSCompartment; --struct JSContext; --class JSFunction; --class JSObject; --struct JSRuntime; --class JSScript; --class JSString; --class JSAddonId; --struct JSFreeOp; -+class JS_PUBLIC_API JSAtom; -+struct JS_PUBLIC_API JSCompartment; -+struct JS_PUBLIC_API JSContext; -+class JS_PUBLIC_API JSFunction; -+class JS_PUBLIC_API JSObject; -+struct JS_PUBLIC_API JSRuntime; -+class JS_PUBLIC_API JSScript; -+class JS_PUBLIC_API JSString; -+class JS_PUBLIC_API JSAddonId; -+struct JS_PUBLIC_API JSFreeOp; - --struct jsid; -+struct JS_PUBLIC_API jsid; - - namespace JS { - - typedef unsigned char Latin1Char; - --class Symbol; --class Value; --class Realm; --struct Runtime; --struct Zone; -+class JS_PUBLIC_API Symbol; -+class JS_PUBLIC_API Value; -+class JS_PUBLIC_API Realm; -+struct JS_PUBLIC_API Runtime; -+struct JS_PUBLIC_API Zone; - - template <typename T> - class Handle; diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0013-riscv-Disable-atomic-operations.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0013-riscv-Disable-atomic-operations.patch deleted file mode 100644 index 2e810c87f9..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0013-riscv-Disable-atomic-operations.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 64ad80e6d95871f17be4cd01da15581f41ac0b2b Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 27 May 2019 21:10:34 -0700 -Subject: [PATCH] riscv: Disable atomic operations - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - js/src/jit/AtomicOperations.h | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/js/src/jit/AtomicOperations.h -+++ b/js/src/jit/AtomicOperations.h -@@ -393,6 +393,8 @@ inline bool AtomicOperations::isLockfree - #include "jit/none/AtomicOperations-feeling-lucky.h" - #elif defined(__s390__) || defined(__s390x__) - #include "jit/none/AtomicOperations-feeling-lucky.h" -+#elif defined(__riscv) -+#include "jit/none/AtomicOperations-feeling-lucky.h" - #else - #error "No AtomicOperations support provided for this platform" - #endif ---- a/js/src/jit/none/AtomicOperations-feeling-lucky.h -+++ b/js/src/jit/none/AtomicOperations-feeling-lucky.h -@@ -80,6 +80,14 @@ - #define GNUC_COMPATIBLE - #endif - -+#ifdef __riscv -+#define GNUC_COMPATIBLE -+#ifdef __riscv_xlen == 64 -+#define HAS_64BIT_ATOMICS -+#define HAS_64BIT_LOCKFREE -+#endif -+#endif -+ - // The default implementation tactic for gcc/clang is to use the newer - // __atomic intrinsics added for use in C++11 <atomic>. Where that - // isn't available, we use GCC's older __sync functions instead. diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0014-remove-JS_VOLATIME_ARM.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0014-remove-JS_VOLATIME_ARM.patch deleted file mode 100644 index a20873cb0b..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0014-remove-JS_VOLATIME_ARM.patch +++ /dev/null @@ -1,111 +0,0 @@ -# HG changeset patch -# User Lars T Hansen <lhansen@mozilla.com> -# Date 1538489772 -7200 -# Node ID bb430eaf5521aa8ab233a45b585ff9e5dfecf4c9 -# Parent e87d7028568e721e8d297ce62f9622e74d29bb37 -Bug 1495731 - remove JS_VOLATILE_ARM, it is no longer relevant. r=waldo - -JS_VOLATILE_ARM was a workaround for a gcc 4.7 bug on B2G where it -would generate unaligned word accesses that should have been -individual byte accesses. We now require at least gcc 6.1 (and ARM -systems support unaligned accesses). - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Backport [https://hg.mozilla.org/integration/mozilla-inbound/rev/bb430eaf5521] - ---- a/js/src/vm/TypedArrayObject-inl.h -+++ b/js/src/vm/TypedArrayObject-inl.h -@@ -259,68 +259,61 @@ class ElementSpecific { - return true; - } - -- // Inhibit unaligned accesses on ARM (bug 1097253, a compiler bug). --#if defined(__arm__) && defined(__GNUC__) && !defined(__clang__) --#define JS_VOLATILE_ARM volatile --#else --#define JS_VOLATILE_ARM --#endif -- - SharedMem<void*> data = Ops::extract(source); - switch (source->type()) { - case Scalar::Int8: { -- SharedMem<JS_VOLATILE_ARM int8_t*> src = -- data.cast<JS_VOLATILE_ARM int8_t*>(); -+ SharedMem<int8_t*> src = -+ data.cast<int8_t*>(); - for (uint32_t i = 0; i < count; ++i) - Ops::store(dest++, ConvertNumber<T>(Ops::load(src++))); - break; - } - case Scalar::Uint8: - case Scalar::Uint8Clamped: { -- SharedMem<JS_VOLATILE_ARM uint8_t*> src = -- data.cast<JS_VOLATILE_ARM uint8_t*>(); -+ SharedMem<uint8_t*> src = -+ data.cast<uint8_t*>(); - for (uint32_t i = 0; i < count; ++i) - Ops::store(dest++, ConvertNumber<T>(Ops::load(src++))); - break; - } - case Scalar::Int16: { -- SharedMem<JS_VOLATILE_ARM int16_t*> src = -- data.cast<JS_VOLATILE_ARM int16_t*>(); -+ SharedMem<int16_t*> src = -+ data.cast<int16_t*>(); - for (uint32_t i = 0; i < count; ++i) - Ops::store(dest++, ConvertNumber<T>(Ops::load(src++))); - break; - } - case Scalar::Uint16: { -- SharedMem<JS_VOLATILE_ARM uint16_t*> src = -- data.cast<JS_VOLATILE_ARM uint16_t*>(); -+ SharedMem<uint16_t*> src = -+ data.cast<uint16_t*>(); - for (uint32_t i = 0; i < count; ++i) - Ops::store(dest++, ConvertNumber<T>(Ops::load(src++))); - break; - } - case Scalar::Int32: { -- SharedMem<JS_VOLATILE_ARM int32_t*> src = -- data.cast<JS_VOLATILE_ARM int32_t*>(); -+ SharedMem<int32_t*> src = -+ data.cast<int32_t*>(); - for (uint32_t i = 0; i < count; ++i) - Ops::store(dest++, ConvertNumber<T>(Ops::load(src++))); - break; - } - case Scalar::Uint32: { -- SharedMem<JS_VOLATILE_ARM uint32_t*> src = -- data.cast<JS_VOLATILE_ARM uint32_t*>(); -+ SharedMem<uint32_t*> src = -+ data.cast<uint32_t*>(); - for (uint32_t i = 0; i < count; ++i) - Ops::store(dest++, ConvertNumber<T>(Ops::load(src++))); - break; - } - case Scalar::Float32: { -- SharedMem<JS_VOLATILE_ARM float*> src = -- data.cast<JS_VOLATILE_ARM float*>(); -+ SharedMem<float*> src = -+ data.cast<float*>(); - for (uint32_t i = 0; i < count; ++i) - Ops::store(dest++, ConvertNumber<T>(Ops::load(src++))); - break; - } - case Scalar::Float64: { -- SharedMem<JS_VOLATILE_ARM double*> src = -- data.cast<JS_VOLATILE_ARM double*>(); -+ SharedMem<double*> src = -+ data.cast<double*>(); - for (uint32_t i = 0; i < count; ++i) - Ops::store(dest++, ConvertNumber<T>(Ops::load(src++))); - break; -@@ -329,8 +322,6 @@ class ElementSpecific { - MOZ_CRASH("setFromTypedArray with a typed array with bogus type"); - } - --#undef JS_VOLATILE_ARM -- - return true; - } - diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/fix-musl-build.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/fix-musl-build.patch new file mode 100644 index 0000000000..c0834af589 --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/fix-musl-build.patch @@ -0,0 +1,15 @@ +Upstream: No +Reason: mozjs60 miscompiles on musl if built with HAVE_THREAD_TLS_KEYWORD: +https://github.com/void-linux/void-packages/issues/2598 +--- a/js/src/old-configure.in ++++ b/js/src/old-configure.in +@@ -1072,6 +1072,9 @@ if test "$ac_cv_thread_keyword" = yes; t + *-android*|*-linuxandroid*) + : + ;; ++ *-musl*) ++ : ++ ;; + *) + AC_DEFINE(HAVE_THREAD_TLS_KEYWORD) + ;; diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/mipsarchn32/0001-fix-compiling-failure-on-mips64-n32-bsp.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/mipsarchn32/0001-fix-compiling-failure-on-mips64-n32-bsp.patch deleted file mode 100644 index b882d76ec2..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/mipsarchn32/0001-fix-compiling-failure-on-mips64-n32-bsp.patch +++ /dev/null @@ -1,80 +0,0 @@ -From f2f8be496c8e34b4d909b688a95c6f8565201081 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Wed, 19 Jun 2019 14:30:44 +0800 -Subject: [PATCH] fix compiling failure on mips64-n32 bsp - -- Tweak mips64-n32 with mips32 - -- The toolchain of mips64-n32 supports both of macro - `__mips64' and `__mips__', but 32bit is required here. - -- N32 uses 64-bit registers but restricts addresses to 32 bits. - https://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf - Table 2-1 specifies the use of registers in n32 and native 64-bit mode. - From the table, N32 and N64 have the same registers - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> -Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> ---- - build/moz.configure/init.configure | 5 ++++- - js/src/jit/mips-shared/Architecture-mips-shared.h | 4 +++- - python/mozbuild/mozbuild/configure/constants.py | 2 +- - 3 files changed, 8 insertions(+), 3 deletions(-) - -diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure -index 648ac2d..d0bcaf8 100644 ---- a/build/moz.configure/init.configure -+++ b/build/moz.configure/init.configure -@@ -650,7 +650,10 @@ def split_triplet(triplet, allow_unknown=False): - canonical_cpu = 'mips32' - endianness = 'little' if 'el' in cpu else 'big' - elif cpu in ('mips64', 'mips64el'): -- canonical_cpu = 'mips64' -+ if 'n32' in triplet: -+ canonical_cpu = 'mips32' -+ else: -+ canonical_cpu = 'mips64' - endianness = 'little' if 'el' in cpu else 'big' - elif cpu.startswith('aarch64'): - canonical_cpu = 'aarch64' -diff --git a/js/src/jit/mips-shared/Architecture-mips-shared.h b/js/src/jit/mips-shared/Architecture-mips-shared.h -index e95ffd4..caf83f7 100644 ---- a/js/src/jit/mips-shared/Architecture-mips-shared.h -+++ b/js/src/jit/mips-shared/Architecture-mips-shared.h -@@ -28,6 +28,8 @@ - #elif (defined(_MIPS_SIM) && (_MIPS_SIM == _ABI64)) || \ - defined(JS_SIMULATOR_MIPS64) - #define USES_N64_ABI -+#elif (defined(_MIPS_SIM) && (_MIPS_SIM == _ABIN32)) -+#define USES_N32_ABI - #else - #error "Unsupported ABI" - #endif -@@ -94,7 +96,7 @@ class Registers { - ta1 = t5, - ta2 = t6, - ta3 = t7, --#elif defined(USES_N64_ABI) -+#elif defined(USES_N64_ABI) || defined(USES_N32_ABI) - a4 = r8, - a5 = r9, - a6 = r10, -diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py -index 1067b6a..e0f0405 100644 ---- a/python/mozbuild/mozbuild/configure/constants.py -+++ b/python/mozbuild/mozbuild/configure/constants.py -@@ -90,8 +90,8 @@ CPU_preprocessor_checks = OrderedDict(( - ('hppa', '__hppa__'), - ('sparc64', '__sparc__ && __arch64__'), - ('sparc', '__sparc__'), -- ('mips64', '__mips64'), - ('mips32', '__mips__'), -+ ('mips64', '__mips64'), - ('sh4', '__sh__'), - )) - --- -2.7.4 - diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/musl/0001-support-musl.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/musl/0001-support-musl.patch deleted file mode 100644 index 770d5e0aaa..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/musl/0001-support-musl.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 04e8a611e958f0da1ccac61acae3a6f1a5168b20 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Fri, 13 Jul 2018 18:08:14 +0800 -Subject: [PATCH] support musl - -Upstream-Status: Pending - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - mozglue/misc/TimeStamp_darwin.cpp | 1 - - mozglue/misc/TimeStamp_posix.cpp | 1 - - nsprpub/pr/src/misc/prsystem.c | 1 - - python/psutil/psutil/_psutil_bsd.c | 1 - - python/psutil/psutil/_psutil_osx.c | 1 - - python/psutil/psutil/arch/bsd/process_info.c | 1 - - python/psutil/psutil/arch/osx/process_info.c | 1 - - 9 files changed, 3 insertions(+), 12 deletions(-) - ---- a/mozglue/misc/TimeStamp_darwin.cpp -+++ b/mozglue/misc/TimeStamp_darwin.cpp -@@ -19,7 +19,6 @@ - - #include <mach/mach_time.h> - #include <sys/time.h> --#include <sys/sysctl.h> - #include <time.h> - #include <unistd.h> - ---- a/mozglue/misc/TimeStamp_posix.cpp -+++ b/mozglue/misc/TimeStamp_posix.cpp -@@ -21,7 +21,6 @@ - #if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \ - defined(__OpenBSD__) - #include <sys/param.h> --#include <sys/sysctl.h> - #endif - - #if defined(__DragonFly__) || defined(__FreeBSD__) ---- a/nsprpub/pr/src/misc/prsystem.c -+++ b/nsprpub/pr/src/misc/prsystem.c -@@ -27,7 +27,6 @@ - || defined(OPENBSD) || defined(DRAGONFLY) || defined(DARWIN) - #define _PR_HAVE_SYSCTL - #include <sys/param.h> --#include <sys/sysctl.h> - #endif - - #if defined(DARWIN) ---- a/third_party/python/psutil/psutil/_psutil_bsd.c -+++ b/third_party/python/psutil/psutil/_psutil_bsd.c -@@ -29,7 +29,6 @@ - #include <paths.h> - #include <sys/types.h> - #include <sys/param.h> --#include <sys/sysctl.h> - #include <sys/user.h> - #include <sys/proc.h> - #include <sys/file.h> ---- a/third_party/python/psutil/psutil/_psutil_osx.c -+++ b/third_party/python/psutil/psutil/_psutil_osx.c -@@ -13,7 +13,6 @@ - #include <stdlib.h> - #include <stdio.h> - #include <utmpx.h> --#include <sys/sysctl.h> - #include <sys/vmmeter.h> - #include <libproc.h> - #include <sys/proc_info.h> ---- a/third_party/python/psutil/psutil/arch/osx/process_info.c -+++ b/third_party/python/psutil/psutil/arch/osx/process_info.c -@@ -16,7 +16,6 @@ - #include <stdlib.h> - #include <stdio.h> - #include <signal.h> --#include <sys/sysctl.h> - #include <libproc.h> - - #include "process_info.h" ---- a/memory/build/Mutex.h -+++ b/memory/build/Mutex.h -@@ -42,7 +42,7 @@ struct Mutex { - if (pthread_mutexattr_init(&attr) != 0) { - return false; - } -- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP); -+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_STALLED); - if (pthread_mutex_init(&mMutex, &attr) != 0) { - pthread_mutexattr_destroy(&attr); - return false; -@@ -102,7 +102,7 @@ typedef Mutex StaticMutex; - - #if defined(XP_DARWIN) - #define STATIC_MUTEX_INIT OS_SPINLOCK_INIT --#elif defined(XP_LINUX) && !defined(ANDROID) -+#elif defined(XP_LINUX) && !defined(ANDROID) && defined(__GLIBC__) - #define STATIC_MUTEX_INIT PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP - #else - #define STATIC_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/musl/0002-js-Fix-build-with-musl.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/musl/0002-js-Fix-build-with-musl.patch deleted file mode 100644 index f4c6e2768d..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/musl/0002-js-Fix-build-with-musl.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0c9e8f586ba52a9aef5ed298e8315b2598b8fb72 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 25 May 2019 16:54:45 -0700 -Subject: [PATCH] js: Fix build with musl - -The MIPS specific header <sgidefs.h> is not provided by musl -linux kernel headers provide <asm/sgidefs.h> which has same definitions - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - js/src/jsmath.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/js/src/jsmath.cpp b/js/src/jsmath.cpp -index a28968be..8facaa81 100644 ---- a/js/src/jsmath.cpp -+++ b/js/src/jsmath.cpp -@@ -71,7 +71,7 @@ - #elif defined(__s390__) - #define GETRANDOM_NR 349 - #elif defined(__mips__) --#include <sgidefs.h> -+#include <asm/sgidefs.h> - #if _MIPS_SIM == _MIPS_SIM_ABI32 - #define GETRANDOM_NR 4353 - #elif _MIPS_SIM == _MIPS_SIM_ABI64 --- -2.21.0 - diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/nojit-32bit-arch-fix.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/nojit-32bit-arch-fix.patch new file mode 100644 index 0000000000..f308b4863f --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/nojit-32bit-arch-fix.patch @@ -0,0 +1,21 @@ +Fix build when JIT is disabled on 32bit systems + +This fixes a compile time assert +js/src/wasm/WasmFrame.cpp:57:3: error: static_assert failed due to requirement '(__builtin_offsetof(js::wasm::DebugFrame, frame_) + sizeof(js::wasm::Frame)) % Alignment == 0' "Aligned after pushing DebugFrame" + static_assert((offsetof(DebugFrame, frame_) + sizeof(Frame)) % Alignment == 0, + ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/js/src/wasm/WasmFrame.h ++++ b/js/src/wasm/WasmFrame.h +@@ -230,6 +230,8 @@ class DebugFrame { + // Avoid -Wunused-private-field warnings. + protected: + #if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_ARM) || \ ++ (defined(JS_CODEGEN_NONE) && \ ++ (defined(__riscv) && __riscv_xlen == 32) || defined(__mips__)) || \ + defined(JS_CODEGEN_X86) || defined(__wasi__) + // See alignmentStaticAsserts(). For MIPS32, ARM32 and X86 DebugFrame is only + // 4-byte aligned, so we add another word to get up to 8-byte diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/riscv32.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/riscv32.patch new file mode 100644 index 0000000000..fe9c332a00 --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/riscv32.patch @@ -0,0 +1,45 @@ +Add RISCV32 support + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/build/moz.configure/init.configure ++++ b/build/moz.configure/init.configure +@@ -765,6 +765,9 @@ def split_triplet(triplet, allow_msvc=Fa + elif cpu.startswith("aarch64"): + canonical_cpu = "aarch64" + endianness = "little" ++ elif cpu in ("riscv32", "riscv32gc"): ++ canonical_cpu = "riscv32" ++ endianness = "little" + elif cpu in ("riscv64", "riscv64gc"): + canonical_cpu = "riscv64" + endianness = "little" +--- a/python/mozbuild/mozbuild/configure/constants.py ++++ b/python/mozbuild/mozbuild/configure/constants.py +@@ -52,6 +52,7 @@ CPU_bitness = { + "mips64": 64, + "ppc": 32, + "ppc64": 64, ++ 'riscv32': 32, + "riscv64": 64, + "s390": 32, + "s390x": 64, +@@ -94,6 +95,7 @@ CPU_preprocessor_checks = OrderedDict( + ("m68k", "__m68k__"), + ("mips64", "__mips64"), + ("mips32", "__mips__"), ++ ("riscv32", "__riscv && __riscv_xlen == 32"), + ("riscv64", "__riscv && __riscv_xlen == 64"), + ("sh4", "__sh__"), + ("wasm32", "__wasm32__"), +--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py ++++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py +@@ -1186,6 +1186,7 @@ class LinuxCrossCompileToolchainTest(Bas + "m68k-unknown-linux-gnu": big_endian + {"__m68k__": 1}, + "mips64-unknown-linux-gnuabi64": big_endian + {"__mips64": 1, "__mips__": 1}, + "mips-unknown-linux-gnu": big_endian + {"__mips__": 1}, ++ "riscv32-unknown-linux-gnu": little_endian + {"__riscv": 1, "__riscv_xlen": 32}, + "riscv64-unknown-linux-gnu": little_endian + {"__riscv": 1, "__riscv_xlen": 64}, + "sh4-unknown-linux-gnu": little_endian + {"__sh__": 1}, + } diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb deleted file mode 100644 index 1747e6b293..0000000000 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb +++ /dev/null @@ -1,147 +0,0 @@ -SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++" -HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" -LICENSE = "MPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf" - -SRC_URI = " \ - https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \ - file://0001-Port-build-to-python3.patch \ - file://0002-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \ - file://0003-fix-cross-compilation-on-i586-targets.patch \ - file://0004-do-not-create-python-environment.patch \ - file://0005-fix-cannot-find-link.patch \ - file://0006-workaround-autoconf-2.13-detection-failed.patch \ - file://0007-fix-do_compile-failed-on-mips.patch \ - file://0008-add-riscv-support.patch \ - file://0009-mozjs-fix-coredump-caused-by-getenv.patch \ - file://0010-format-overflow.patch \ - file://0011-To-fix-build-error-on-arm32BE.patch \ - file://0012-JS_PUBLIC_API.patch \ - file://0013-riscv-Disable-atomic-operations.patch \ - file://0014-remove-JS_VOLATIME_ARM.patch \ -" -SRC_URI:append:libc-musl = " \ - file://musl/0001-support-musl.patch \ - file://musl/0002-js-Fix-build-with-musl.patch \ -" -SRC_URI:append:mipsarchn32 = " \ - file://mipsarchn32/0001-fix-compiling-failure-on-mips64-n32-bsp.patch \ -" -SRC_URI[md5sum] = "69a0be9ce695e5dc4941ed0c78ef00c2" -SRC_URI[sha256sum] = "9f453c8cc5669e46e38f977764d49a36295bf0d023619d9aac782e6bb3e8c53f" - -S = "${WORKDIR}/firefox-${@d.getVar("PV").replace("esr", "")}" - -inherit autotools pkgconfig perlnative python3native - -inherit features_check -CONFLICT_DISTRO_FEATURES:mipsarchn32 = "ld-is-gold" - -DEPENDS += " \ - nspr zlib autoconf-2.13-native \ - python3-six-native python3-pytoml-native \ - python3-jsmin-native python3-six \ -" - -# Disable null pointer optimization in gcc >= 6 -# https://bugzilla.redhat.com/show_bug.cgi?id=1328045 -CFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks" -CXXFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks" - -# nspr's package-config is ignored so set libs manually -EXTRA_OECONF = " \ - --target=${TARGET_SYS} \ - --host=${BUILD_SYS} \ - --prefix=${prefix} \ - --libdir=${libdir} \ - --disable-tests --disable-strip --disable-optimize \ - --disable-jemalloc \ - --with-nspr-cflags='-I${STAGING_INCDIR}/nspr -I${STAGING_INCDIR}/nss3' \ - --with-nspr-libs='-lplds4 -lplc4 -lnspr4' \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \ -" - -# Without this, JS_Init() will fail for mips64. -EXTRA_OECONF:append:mipsarch = " --with-intl-api=build" -EXTRA_OECONF:append:powerpc = " --with-intl-api=build" - -EXTRA_OECONF:append:mipsarch = " --disable-ion" -EXTRA_OECONF:append:riscv64 = " --disable-ion" -EXTRA_OECONF:append:riscv32 = " --disable-ion" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" -PACKAGECONFIG[x11] = "--x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--x-includes=no --x-libraries=no,virtual/libx11" - -EXTRA_OEMAKE:task-compile += "BUILD_OPT=1 OS_LDFLAGS='-Wl,-latomic ${LDFLAGS}'" -EXTRA_OEMAKE:task-install += "STATIC_LIBRARY_NAME=js_static" - -export HOST_CC = "${BUILD_CC}" -export HOST_CXX = "${BUILD_CXX}" -export HOST_CFLAGS = "${BUILD_CFLAGS}" -export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}" -export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}" - -do_configure() { - export SHELL="/bin/sh" - cd ${S} - # Add mozjs python-modules necessary - PYTHONPATH="${S}/third_party/python/which:${S}/config:${S}/build" - for sub_dir in python testing/mozbase; do - for module_dir in `ls $sub_dir -1`;do - [ $module_dir = "virtualenv" ] && continue - if [ -d "${S}/$sub_dir/$module_dir" ];then - PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir" - fi - done - done - echo "$PYTHONPATH" > ${B}/PYTHONPATH - export PYTHONPATH=`cat ${B}/PYTHONPATH` - - cd ${S}/js/src - autoconf213 --macrodir=${STAGING_DATADIR_NATIVE}/autoconf213 old-configure.in > old-configure - - cd ${B} - # use of /tmp can causes problems on heavily loaded hosts - mkdir -p "${B}/lcl_tmp" - TMPDIR="${B}/lcl_tmp" ${S}/js/src/configure ${EXTRA_OECONF} - - # Make standard Makefile checks pass - touch ${S}/js/src/configure - touch ${B}/config.status -} - -do_compile:prepend() { - export SHELL="/bin/sh" - export PYTHONPATH=`cat ${B}/PYTHONPATH` -} - -do_install:prepend() { - export SHELL="/bin/sh" - export PYTHONPATH=`cat ${B}/PYTHONPATH` -} - -inherit multilib_script multilib_header - -MULTILIB_SCRIPTS += " ${PN}-dev:${bindir}/js60-config" - -do_install:append() { - oe_multilib_header mozjs-60/js-config.h - sed -e 's@${STAGING_DIR_HOST}@@g' \ - -i ${D}${bindir}/js60-config -} - -PACKAGES =+ "lib${BPN}" -FILES:lib${BPN} += "${libdir}/lib*.so" -FILES:${PN}-dev += "${bindir}/js60-config" - -# Fails to build with thumb-1 (qemuarm) -#| {standard input}: Assembler messages: -#| {standard input}:2172: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r2,r1,LSR#20' -#| {standard input}:2173: Error: unshifted register required -- `bic r2,r2,#(1<<11)' -#| {standard input}:2174: Error: unshifted register required -- `orr r1,r1,#(1<<20)' -#| {standard input}:2176: Error: instruction not supported in Thumb16 mode -- `subs r2,r2,#0x300' -#| {standard input}:2178: Error: instruction not supported in Thumb16 mode -- `subs r5,r2,#52' -ARM_INSTRUCTION_SET:armv5 = "arm" -ARM_INSTRUCTION_SET:armv4 = "arm" - -DISABLE_STATIC = "" diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.2.0.bb b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.2.0.bb new file mode 100644 index 0000000000..a1a5ddc3b0 --- /dev/null +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_91.2.0.bb @@ -0,0 +1,71 @@ +SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++" +HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf" + +SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \ + file://0001-Cargo.toml-do-not-abort-on-panic.patch \ + file://0002-moz.configure-do-not-look-for-llvm-objdump.patch \ + file://0003-rust.configure-do-not-try-to-find-a-suitable-upstrea.patch \ + file://0004-use-asm-sgidefs.h.patch \ + file://fix-musl-build.patch \ + file://0001-build-do-not-use-autoconf-s-config.sub-to-canonicali.patch \ + file://riscv32.patch \ + file://nojit-32bit-arch-fix.patch \ + " +SRC_URI[sha256sum] = "3ef3cfd321d0c2c80ee1b41b8baf7a1ea4daf93c29e1377274933440ff5e42c3" + +S = "${WORKDIR}/firefox-${@d.getVar("PV").replace("esr", "")}" + +inherit pkgconfig perlnative python3native rust + +DEPENDS += "zlib cargo-native python3" + +B = "${WORKDIR}/build" + +export PYTHONPATH = "${S}/build:${S}/third_party/python/PyYAML/lib3:${S}/testing/mozbase/mozfile:${S}/python/mozboot:${S}/third_party/python/distro:${S}/testing/mozbase/mozinfo:${S}/config:${S}/testing/mozbase/manifestparser:${S}/third_party/python/pytoml:${S}/testing/mozbase/mozprocess:${S}/third_party/python/six:${S}/python/mozbuild:${S}/python/mozbuild/mozbuild:${S}/python/mach:${S}/third_party/python/jsmin:${S}/python/mozversioncontrol" + +export HOST_CC = "${BUILD_CC}" +export HOST_CXX = "${BUILD_CXX}" +export HOST_CFLAGS = "${BUILD_CFLAGS}" +export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}" +export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}" + +export AS = "${CC}" + +export RUSTFLAGS + +JIT ?= "" + +JIT:mipsarch = "--disable-jit" + +do_configure() { + cd ${B} + python3 ${S}/configure.py \ + --enable-project=js \ + --target=${HOST_SYS} \ + --host=${BUILD_SYS} \ + --prefix=${prefix} \ + --libdir=${libdir} \ + --disable-jemalloc \ + ${JIT} + +} + +do_install() { + oe_runmake 'DESTDIR=${D}' install +} + +inherit multilib_script multilib_header + +MULTILIB_SCRIPTS += " ${PN}-dev:${bindir}/js91-config" + +do_install:append() { + oe_multilib_header mozjs-91/js-config.h + sed -e 's@${STAGING_DIR_HOST}@@g' \ + -i ${D}${bindir}/js91-config +} + +PACKAGES =+ "lib${BPN}-staticdev lib${BPN}" +FILES:lib${BPN}-staticdev += "${libdir}/libjs_static.ajs" +FILES:lib${BPN} += "${libdir}/lib*" diff --git a/meta-openembedded/meta-oe/recipes-bsp/chipsec/chipsec_git.bb b/meta-openembedded/meta-oe/recipes-bsp/chipsec/chipsec_git.bb deleted file mode 100644 index 3339dc1421..0000000000 --- a/meta-openembedded/meta-oe/recipes-bsp/chipsec/chipsec_git.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "CHIPSEC: Platform Security Assessment Framework" - -DESCRIPTION = "CHIPSEC is a framework for analyzing the security \ - of PC platforms including hardware, system firmware \ - (BIOS/UEFI), and platform components." - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=bc2d1f9b427be5fb63f6af9da56f7c5d" - -SRC_URI = "git://github.com/chipsec/chipsec.git;branch=master \ - " - -SRCREV = "b2a61684826dc8b9f622a844a40efea579cd7e7d" - -COMPATIBLE_HOST = "(i.86|x86_64).*-linux" - -S = "${WORKDIR}/git" -EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'" - -DEPENDS = "virtual/kernel nasm-native python3-setuptools-native" -RDEPENDS:${PN} += "python3 python3-modules" - -inherit module distutils3 - -do_compile:append() { - cd ${S}/drivers/linux - oe_runmake KSRC=${STAGING_KERNEL_BUILDDIR} -} - -do_install:append() { - install -m 0644 ${S}/drivers/linux/chipsec.ko ${D}${PYTHON_SITEPACKAGES_DIR}/chipsec/helper/linux -} - -FILES:${PN} += "${exec_prefix} \ -" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.2.9.bb b/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.3.1.bb index fb83361856..6d10bfcfd9 100644 --- a/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.2.9.bb +++ b/meta-openembedded/meta-oe/recipes-connectivity/gensio/gensio_2.3.1.bb @@ -5,9 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a0fd36908af843bcee10cb6dfc47fa67 \ file://COPYING;md5=bae3019b4c6dc4138c217864bd04331f \ " -SRCREV = "343ccf17ce656203b6b5513f4b7962f45d37b589" +SRCREV = "c500d8705c517f96e591c060105a789f053d2b7a" -SRC_URI = "git://github.com/cminyard/gensio;protocol=https;branch=2.2.x" +SRC_URI = "git://github.com/cminyard/gensio;protocol=https" S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd/0001-netconfig-Use-s6_addr-instead-of-__in6_u.__u6_addr8.patch b/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd/0001-netconfig-Use-s6_addr-instead-of-__in6_u.__u6_addr8.patch new file mode 100644 index 0000000000..a9f2393532 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd/0001-netconfig-Use-s6_addr-instead-of-__in6_u.__u6_addr8.patch @@ -0,0 +1,38 @@ +From 36c74f974eba6f276ed4dd04c2077e6f23ebec37 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 17 Oct 2021 16:09:03 -0700 +Subject: [PATCH] netconfig: Use s6_addr instead of __in6_u.__u6_addr8 + +Building fails with: + +../iwd-1.18/src/netconfig.c: In function 'netconfig_ipv6_to_string': +../iwd-1.18/src/netconfig.c:188:25: error: 'struct in6_addr' has no member named '__in6_u'; did you mean '__in6_union'? + 188 | memcpy(in6_addr.__in6_u.__u6_addr8, addr, 16); + | ^~~~~~~ + | __in6_union + +Can be fixed by changing &this_ip.__in6_u.__u6_addr8[0] with &this_ip.s6_addr[0]. +For references: in6_addr is declared in /usr/include/linux/in6.h + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/netconfig.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/netconfig.c b/src/netconfig.c +index c748630..ab51c3d 100644 +--- a/src/netconfig.c ++++ b/src/netconfig.c +@@ -185,7 +185,7 @@ static inline char *netconfig_ipv6_to_string(const uint8_t *addr) + struct in6_addr in6_addr; + char *addr_str = l_malloc(INET6_ADDRSTRLEN); + +- memcpy(in6_addr.__in6_u.__u6_addr8, addr, 16); ++ memcpy(in6_addr.s6_addr, addr, 16); + + if (L_WARN_ON(unlikely(!inet_ntop(AF_INET6, &in6_addr, addr_str, + INET6_ADDRSTRLEN)))) { +-- +2.33.1 + diff --git a/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd_1.17.bb b/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd_1.18.bb index 00d94f36e9..4136de84fa 100644 --- a/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd_1.17.bb +++ b/meta-openembedded/meta-oe/recipes-connectivity/iwd/iwd_1.18.bb @@ -7,8 +7,9 @@ DEPENDS = "ell" SRC_URI = "https://www.kernel.org/pub/linux/network/wireless/${BP}.tar.xz \ file://0001-build-Use-abs_top_srcdir-instead-of-abs_srcdir-for-e.patch \ + file://0001-netconfig-Use-s6_addr-instead-of-__in6_u.__u6_addr8.patch \ " -SRC_URI[sha256sum] = "6f946f823b0dc3205e4e72becf8ad1915448d194f5b10d8003e4c8c5a18e4ef7" +SRC_URI[sha256sum] = "0225ab81579f027e0fcbf255517f432fcf355d14f3645c36813c71a441dfab55" inherit autotools manpages pkgconfig python3native systemd diff --git a/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.3.3.bb b/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.3.4.bb index 87b5b15b75..fcd2546472 100644 --- a/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.3.3.bb +++ b/meta-openembedded/meta-oe/recipes-connectivity/ser2net/ser2net_4.3.4.bb @@ -9,7 +9,7 @@ DEPENDS = "gensio libyaml" SRC_URI = "${SOURCEFORGE_MIRROR}/project/ser2net/ser2net/ser2net-${PV}.tar.gz" -SRC_URI[sha256sum] = "f5be52033a690bd0dd711209a64ebaec024ee4542b1357350aad8489dc2bf720" +SRC_URI[sha256sum] = "c714d6777849100b2ca3f216d1cfc36d4573639ececc91d5c7809dfe27c8428e" UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/ser2net/files/ser2net" diff --git a/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb index dab983b947..4e1ee86328 100644 --- a/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +++ b/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb @@ -249,7 +249,6 @@ RDEPENDS:packagegroup-meta-oe-devtools ="\ libparse-yapp-perl \ libubox \ ltrace \ - lua \ luajit \ mcpp \ memstat \ @@ -270,7 +269,6 @@ RDEPENDS:packagegroup-meta-oe-devtools ="\ yajl \ yajl \ kconfig-frontends \ - ldns \ libgee \ libsombok3 \ lshw \ @@ -308,6 +306,7 @@ RDEPENDS:packagegroup-meta-oe-devtools ="\ " RDEPENDS:packagegroup-meta-oe-devtools:append:x86 = " cpuid msr-tools pahole pmtools" RDEPENDS:packagegroup-meta-oe-devtools:append:x86-64 = " cpuid msr-tools pahole pcimem pmtools" +RDEPENDS:packagegroup-meta-oe-devtools:append:riscv64 = " pcimem" RDEPENDS:packagegroup-meta-oe-devtools:append:arm = " pcimem" RDEPENDS:packagegroup-meta-oe-devtools:append:aarch64 = " pahole pcimem" RDEPENDS:packagegroup-meta-oe-devtools:append:libc-musl = " musl-nscd" @@ -327,13 +326,10 @@ RDEPENDS:packagegroup-meta-oe-devtools:remove:x86 = "ply" RDEPENDS:packagegroup-meta-oe-extended ="\ bitwise \ - ${@bb.utils.contains("DISTRO_FEATURES", "x11 wayland opengl", "boinc-client", "", d)} \ brotli \ byacc \ cmpi-bindings \ collectd \ - cfengine-masterfiles \ - cfengine \ ddrescue \ dialog \ enscript \ @@ -506,6 +502,7 @@ RDEPENDS:packagegroup-meta-oe-graphics ="\ libsdl2-net \ ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "libsdl2-ttf", "", d)} \ libsdl \ + ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "lv-drivers lvgl lv-lib-png", "", d)} \ ttf-arphic-uming \ ttf-droid-sans ttf-droid-sans-mono ttf-droid-sans-fallback ttf-droid-sans-japanese ttf-droid-serif \ ttf-abyssinica \ @@ -717,6 +714,7 @@ RDEPENDS:packagegroup-meta-oe-support ="\ anthy \ atop \ ace-cloud-editor \ + driverctl \ frame \ ${@bb.utils.contains("DISTRO_FEATURES", "x11", "geis", "", d)} \ grail \ @@ -766,6 +764,8 @@ RDEPENDS:packagegroup-meta-oe-support ="\ libestr \ libfann \ libftdi \ + libjs-jquery-globalize \ + libjs-jquery-cookie \ ccid \ zchunk \ libgpiod \ @@ -910,7 +910,6 @@ RDEPENDS:packagegroup-meta-oe-support ="\ nano \ xdg-user-dirs \ xmlsec1 \ - ${@bb.utils.contains("DISTRO_FEATURES", "x11 pam", "xorgxrdp xrdp", "", d)} \ usb-modeswitch-data \ usb-modeswitch \ liburing \ @@ -961,7 +960,6 @@ RDEPENDS:packagegroup-meta-oe-ptest-packages = "\ zeromq-ptest \ leveldb-ptest \ psqlodbc-ptest \ - lua-ptest \ protobuf-ptest \ rsyslog-ptest \ oprofile-ptest \ diff --git a/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.3.6.bb b/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.4.1.bb index 806a05e8f2..7f7c350a63 100644 --- a/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.3.6.bb +++ b/meta-openembedded/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.4.1.bb @@ -14,11 +14,14 @@ DEPENDS = " \ libdevmapper \ popt \ util-linux-libuuid \ + libssh \ " +DEPENDS:append:libc-musl = " argp-standalone" +LDFLAGS:append:libc-musl = " -largp" + SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}/${BP}.tar.xz" -SRC_URI[md5sum] = "504d1ab22cbc4d1a59a8d8c7ee5ed3bf" -SRC_URI[sha256sum] = "b296b7a21ea576c2b180611ccb19d06aec8dddaedf7c704b0c6a81210c25635f" +SRC_URI[sha256sum] = "a356a727a83a464ade566e95239622a22dbe4e0f482b198fdb04ab0d3a5a9c5f" inherit autotools gettext pkgconfig diff --git a/meta-openembedded/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper/0001-build-openssl-remove-RSA_SSLV23_PADDING-constant-usa.patch b/meta-openembedded/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper/0001-build-openssl-remove-RSA_SSLV23_PADDING-constant-usa.patch new file mode 100644 index 0000000000..f2baae9149 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper/0001-build-openssl-remove-RSA_SSLV23_PADDING-constant-usa.patch @@ -0,0 +1,27 @@ +From 5b9a8da964ee0b998955cd986000cfa27cfa698d Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev <alon.barlev@gmail.com> +Date: Wed, 4 Aug 2021 19:02:34 +0300 +Subject: [PATCH] build: openssl: remove RSA_SSLV23_PADDING constant usage + +Due to openssl-3 compatibility, thanks to t0b3 + +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + lib/pkcs11h-openssl.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/lib/pkcs11h-openssl.c b/lib/pkcs11h-openssl.c +index 9c9b2cd..85c8193 100644 +--- a/lib/pkcs11h-openssl.c ++++ b/lib/pkcs11h-openssl.c +@@ -474,9 +474,6 @@ __pkcs11h_openssl_rsa_dec ( + case RSA_PKCS1_OAEP_PADDING: + mech = CKM_RSA_PKCS_OAEP; + break; +- case RSA_SSLV23_PADDING: +- rv = CKR_MECHANISM_INVALID; +- break; + case RSA_NO_PADDING: + mech = CKM_RSA_X_509; + break; diff --git a/meta-openembedded/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.27.bb b/meta-openembedded/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.27.bb index a7365f193a..944f49fc78 100644 --- a/meta-openembedded/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.27.bb +++ b/meta-openembedded/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.27.bb @@ -15,7 +15,9 @@ LIC_FILES_CHKSUM = " \ file://COPYING.GPL;md5=8a71d0475d08eee76d8b6d0c6dbec543 \ file://COPYING.BSD;md5=66b7a37c3c10483c1fd86007726104d7 \ " -SRC_URI = "git://github.com/OpenSC/${BPN}.git" +SRC_URI = "git://github.com/OpenSC/${BPN}.git \ + file://0001-build-openssl-remove-RSA_SSLV23_PADDING-constant-usa.patch \ + " S = "${WORKDIR}/git" # v1.27 diff --git a/meta-openembedded/meta-oe/recipes-devtools/apitrace/apitrace/0001-Workaround-glibc-2.34-build-failure-by-disabling-dls.patch b/meta-openembedded/meta-oe/recipes-devtools/apitrace/apitrace/0001-Workaround-glibc-2.34-build-failure-by-disabling-dls.patch deleted file mode 100644 index 92edc4404c..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/apitrace/apitrace/0001-Workaround-glibc-2.34-build-failure-by-disabling-dls.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 1926700b367745e976dae9d9dc2236da21f4435b Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 1 Sep 2021 10:07:48 -0700 -Subject: [PATCH] Workaround glibc 2.34 build failure by disabling dlsym - wrapper - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - wrappers/dlsym.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/wrappers/dlsym.cpp b/wrappers/dlsym.cpp -index 5ab8465b..d353bbf7 100644 ---- a/wrappers/dlsym.cpp -+++ b/wrappers/dlsym.cpp -@@ -34,7 +34,7 @@ - #include "os.hpp" - - --#if defined(__GLIBC__) && !defined(__UCLIBC__) -+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !(__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) - - - #include <dlfcn.h> --- -2.33.0 - diff --git a/meta-openembedded/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb b/meta-openembedded/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb index ca828b0b44..eb8e0318ee 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/apitrace/apitrace_10.0.bb @@ -5,10 +5,9 @@ LICENSE = "MIT & BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=aeb969185a143c3c25130bc2c3ef9a50 \ file://thirdparty/snappy/COPYING;md5=f62f3080324a97b3159a7a7e61812d0c" -SRCREV = "9d42f667e2a36a6624d92b9bd697de097cc4e619" +SRCREV = "d28a980802ad48568c87da02d630c8babfe163bb" PV .= "+10.0.1+git${SRCPV}" SRC_URI = "gitsm://github.com/${BPN}/${BPN}.git \ - file://0001-Workaround-glibc-2.34-build-failure-by-disabling-dls.patch \ " S = "${WORKDIR}/git" @@ -17,9 +16,11 @@ DEPENDS += "zlib libpng python3-native" inherit cmake +PACKAGECONFIG ??= " ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11', '', d)} " +PACKAGECONFIG[x11] = "-DENABLE_X11=ON,-DENABLE_X11=OFF,libx11" + EXTRA_OECMAKE += "\ -DENABLE_GUI=OFF \ - -DENABLE_X11=OFF \ -DENABLE_STATIC_LIBGCC=OFF \ -DENABLE_STATIC_LIBSTDCXX=OFF \ -DPython3_ROOT_DIR=/usr/bin/python3-native \ diff --git a/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch b/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch new file mode 100644 index 0000000000..2f1483f97c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch @@ -0,0 +1,60 @@ +From dc593958e556dd496b774f35c5992285510d6859 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Tue, 19 Oct 2021 17:09:55 +0200 +Subject: [PATCH] Revert "Changed GRPCPP_ABSEIL_SYNC to GPR_ABSEIL_SYNC + (#25681)" + +This reverts commit 931f91b745cd5b2864a0d1787815871d0bd844ae. + +Fixes sysdig from meta-oe and other recipes (like com.webos.service.tts +libgoogleassistant from meta-webosose) failing with: + +| FAILED: userspace/sysdig/sysdig +| : && /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/x86_64-oe-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-sec +urity --sysroot=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -f +debug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot= -fdebug-prefix-map=/OE/bu +ild/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/OE/build +/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot -Wall -ggdb -std=c++0x -O3 -fno-strict-aliasing -DNDEBUG -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security +--sysroot=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-p +refix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/oe- +core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/OE/build/oe-cor +e/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-cor +e/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2- +64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/ +oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/ +core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now -rdynamic userspace/sysdig/CMakeFiles/sysdig.dir/fields_info.cpp.o userspace/sysdig/CMakeFiles/sysdig.dir/sysdig.cpp.o -o userspace/sysdig/sysdig userspace/libsinsp/libsinsp.a userspace/libscap/libscap.a + -lelf -lz -lcurl -ljsoncpp -ltbb -lcares -lgrpc++_unsecure -lgrpc_unsecure -lprotobuf -lcares -lgrpc++_unsecure -lgrpc_unsecure -lprotobuf -ljq -lb64 -lrt -lanl -lssl -lcrypto -lluajit-5.1 -ldl -lpthread && : +| /usr/include/grpcpp/impl/codegen/completion_queue.h:121: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' +| /usr/include/grpcpp/impl/codegen/completion_queue.h:121: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' +| /usr/include/grpcpp/impl/codegen/completion_queue.h:121: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' +| /usr/include/grpcpp/impl/codegen/completion_queue.h:259: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' +| collect2: error: ld returned 1 exit status + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> + +--- + include/grpcpp/impl/codegen/sync.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/grpcpp/impl/codegen/sync.h b/include/grpcpp/impl/codegen/sync.h +index 4cb8133c7c..3d10d9a3a0 100644 +--- a/include/grpcpp/impl/codegen/sync.h ++++ b/include/grpcpp/impl/codegen/sync.h +@@ -47,7 +47,7 @@ + namespace grpc { + namespace internal { + +-#ifdef GPR_ABSEIL_SYNC ++#ifdef GRPCPP_ABSEIL_SYNC + + using Mutex = absl::Mutex; + using MutexLock = absl::MutexLock; +@@ -142,7 +142,7 @@ class CondVar { + gpr_cv cv_; + }; + +-#endif // GPR_ABSEIL_SYNC ++#endif // GRPCPP_ABSEIL_SYNC + + template <typename Predicate> + GRPC_DEPRECATED("incompatible with thread safety analysis") diff --git a/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch b/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch new file mode 100644 index 0000000000..d9cfa009f9 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch @@ -0,0 +1,107 @@ +From 50d54458324c1a19eefb9968e4cb556dbd34b875 Mon Sep 17 00:00:00 2001 +From: Vyacheslav Yurkov <uvv.mail@gmail.com> +Date: Tue, 12 Oct 2021 19:11:40 +0200 +Subject: [PATCH] cmake: revert db88fb0ee826e73323e06ac6166ac038ee71f6a + (#27626) + +Fix regression introduced by previous commit. Original problem that +commit was trying to fix was solved by modification of grpc recipe in +meta-openembedded project repository + +Fixes #26857 + +Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> +--- + CMakeLists.txt | 16 ++++++++-------- + templates/CMakeLists.txt.template | 2 -- + 2 files changed, 8 insertions(+), 10 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0e8fbdee8b..02cd48bee4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3828,7 +3828,7 @@ foreach(_hdr + endforeach() + + +-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) ++if(gRPC_INSTALL) + install(TARGETS grpc_plugin_support EXPORT gRPCTargets + RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} + LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +@@ -11679,7 +11679,7 @@ target_link_libraries(grpc_cpp_plugin + + + +-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) ++if(gRPC_INSTALL) + install(TARGETS grpc_cpp_plugin EXPORT gRPCTargets + RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} + LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +@@ -11718,7 +11718,7 @@ target_link_libraries(grpc_csharp_plugin + + + +-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) ++if(gRPC_INSTALL) + install(TARGETS grpc_csharp_plugin EXPORT gRPCTargets + RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} + LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +@@ -11757,7 +11757,7 @@ target_link_libraries(grpc_node_plugin + + + +-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) ++if(gRPC_INSTALL) + install(TARGETS grpc_node_plugin EXPORT gRPCTargets + RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} + LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +@@ -11796,7 +11796,7 @@ target_link_libraries(grpc_objective_c_plugin + + + +-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) ++if(gRPC_INSTALL) + install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets + RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} + LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +@@ -11835,7 +11835,7 @@ target_link_libraries(grpc_php_plugin + + + +-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) ++if(gRPC_INSTALL) + install(TARGETS grpc_php_plugin EXPORT gRPCTargets + RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} + LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +@@ -11874,7 +11874,7 @@ target_link_libraries(grpc_python_plugin + + + +-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) ++if(gRPC_INSTALL) + install(TARGETS grpc_python_plugin EXPORT gRPCTargets + RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} + LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +@@ -11913,7 +11913,7 @@ target_link_libraries(grpc_ruby_plugin + + + +-if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) ++if(gRPC_INSTALL) + install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets + RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} + LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template +index 0f0883e09c..b9a5bc4144 100644 +--- a/templates/CMakeLists.txt.template ++++ b/templates/CMakeLists.txt.template +@@ -695,8 +695,6 @@ + # grpcpp_channelz doesn't build with protobuf-lite, so no install required + # See https://github.com/grpc/grpc/issues/22826 + if(gRPC_INSTALL AND NOT gRPC_USE_PROTO_LITE) +- % elif tgt.build == 'protoc': +- if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) + % else: + if(gRPC_INSTALL) + % endif diff --git a/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.38.1.bb b/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.41.0.bb index b4f10662dc..f961c533e0 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.38.1.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/grpc/grpc_1.41.0.bb @@ -13,12 +13,18 @@ DEPENDS:append:class-nativesdk = " grpc-native " PACKAGE_BEFORE_PN = "${PN}-compiler" RDEPENDS:${PN}-compiler = "${PN}" -RDEPENDS:${PN}-dev += "${PN}-compiler" +RDEPENDS:${PN}-dev:class_native += "${PN}-compiler" +# Configuration above allows to cross-compile gRPC applications +# In order to compile applications on the target, use the dependency below +# Both dependencies are mutually exclusive +# RDEPENDS:${PN}-dev += "${PN}-compiler" S = "${WORKDIR}/git" -SRCREV_grpc = "96b73272eadc01afb5fb45b92b408c47e4387274" -BRANCH = "v1.38.x" +SRCREV_grpc = "fc662b7964384b701af5bd3ce6994d2180080eb4" +BRANCH = "v1.41.x" SRC_URI = "git://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \ + file://0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch \ + file://0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch \ " # Fixes build with older compilers 4.8 especially on ubuntu 14.04 CXXFLAGS:append:class-native = " -Wl,--no-as-needed" @@ -39,6 +45,7 @@ EXTRA_OECMAKE = " \ " PACKAGECONFIG ??= "cpp shared" +PACKAGECONFIG_class-target ?= "shared" PACKAGECONFIG[cpp] = "-DgRPC_BUILD_GRPC_CPP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF" PACKAGECONFIG[csharp] = "-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF" PACKAGECONFIG[node] = "-DgRPC_BUILD_GRPC_NODE_PLUGIN=ON,-DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF" diff --git a/meta-openembedded/meta-oe/recipes-devtools/ldns/ldns_1.7.1.bb b/meta-openembedded/meta-oe/recipes-devtools/ldns/ldns_1.7.1.bb index 2ce669154a..858614ceee 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/ldns/ldns_1.7.1.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/ldns/ldns_1.7.1.bb @@ -8,6 +8,7 @@ SRC_URI[md5sum] = "166262a46995d9972aba417fd091acd5" SRC_URI[sha256sum] = "8ac84c16bdca60e710eea75782356f3ac3b55680d40e1530d7cea474ac208229" DEPENDS = "openssl" +PNBLACKLIST[ldns] ?= "Needs porting to openssl 3.x" inherit autotools-brokensep diff --git a/meta-openembedded/meta-oe/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch b/meta-openembedded/meta-oe/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch deleted file mode 100644 index e767900864..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 601ef636fc4dfb2af3e7fda88d8ea1c1d92affe4 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Wed, 2 Oct 2019 17:54:15 +0200 -Subject: [PATCH] Allow building lua without readline on Linux - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - Makefile | 2 +- - src/Makefile | 3 +++ - src/luaconf.h | 5 +++++ - 3 files changed, 9 insertions(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 119110d..9f6df45 100644 ---- a/Makefile -+++ b/Makefile -@@ -36,7 +36,7 @@ RM= rm -f - # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE ======= - - # Convenience platforms targets. --PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris -+PLATS= aix bsd c89 freebsd generic linux linux-no-readline macosx mingw posix solaris - - # What to install. - TO_BIN= lua luac -diff --git a/src/Makefile b/src/Makefile -index 64c78f7..5c0428a 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -109,6 +109,9 @@ generic: $(ALL) - linux: - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" - -+linux-no-readline: -+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX_NO_READLINE" SYSLIBS="-Wl,-E -ldl" -+ - macosx: - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" - -diff --git a/src/luaconf.h b/src/luaconf.h -index 9eeeea6..d71ca25 100644 ---- a/src/luaconf.h -+++ b/src/luaconf.h -@@ -64,6 +64,11 @@ - #define LUA_USE_READLINE /* needs some extra libraries */ - #endif - -+#if defined(LUA_USE_LINUX_NO_READLINE) -+#define LUA_USE_POSIX -+#define LUA_USE_DLOPEN /* needs an extra library: -ldl */ -+#endif -+ - - #if defined(LUA_USE_MACOSX) - #define LUA_USE_POSIX --- -2.17.1 - diff --git a/meta-openembedded/meta-oe/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch b/meta-openembedded/meta-oe/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch deleted file mode 100644 index a302874d76..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 1e6df25ac28dcd89f0324177bb55019422404b44 Mon Sep 17 00:00:00 2001 -From: Roberto Ierusalimschy <roberto@inf.puc-rio.br> -Date: Thu, 3 Sep 2020 15:32:17 +0800 -Subject: [PATCH] Fixed bug: barriers cannot be active during sweep - -Barriers cannot be active during sweep, even in generational mode. -(Although gen. mode is not incremental, it can hit a barrier when -deleting a thread and closing its upvalues.) The colors of objects are -being changed during sweep and, therefore, cannot be trusted. - -Upstream-Status: Backport [https://github.com/lua/lua/commit/a6da1472c0c5e05ff249325f979531ad51533110] -CVE: CVE-2020-24371 - -[Adjust code KGC_INC -> KGC_NORMAL, refer 69371c4b84becac09c445aae01d005b49658ef82] -Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> ---- - src/lgc.c | 33 ++++++++++++++++++++++++--------- - 1 file changed, 24 insertions(+), 9 deletions(-) - -diff --git a/src/lgc.c b/src/lgc.c -index 973c269..7af23d5 100644 ---- a/src/lgc.c -+++ b/src/lgc.c -@@ -142,10 +142,17 @@ static int iscleared (global_State *g, const TValue *o) { - - - /* --** barrier that moves collector forward, that is, mark the white object --** being pointed by a black object. (If in sweep phase, clear the black --** object to white [sweep it] to avoid other barrier calls for this --** same object.) -+** Barrier that moves collector forward, that is, marks the white object -+** 'v' being pointed by the black object 'o'. In the generational -+** mode, 'v' must also become old, if 'o' is old; however, it cannot -+** be changed directly to OLD, because it may still point to non-old -+** objects. So, it is marked as OLD0. In the next cycle it will become -+** OLD1, and in the next it will finally become OLD (regular old). By -+** then, any object it points to will also be old. If called in the -+** incremental sweep phase, it clears the black object to white (sweep -+** it) to avoid other barrier calls for this same object. (That cannot -+** be done is generational mode, as its sweep does not distinguish -+** whites from deads.) - */ - void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) { - global_State *g = G(L); -@@ -154,7 +161,8 @@ void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) { - reallymarkobject(g, v); /* restore invariant */ - else { /* sweep phase */ - lua_assert(issweepphase(g)); -- makewhite(g, o); /* mark main obj. as white to avoid other barriers */ -+ if (g->gckind == KGC_NORMAL) /* incremental mode? */ -+ makewhite(g, o); /* mark 'o' as white to avoid other barriers */ - } - } - -@@ -299,10 +307,15 @@ static void markbeingfnz (global_State *g) { - - - /* --** Mark all values stored in marked open upvalues from non-marked threads. --** (Values from marked threads were already marked when traversing the --** thread.) Remove from the list threads that no longer have upvalues and --** not-marked threads. -+** For each non-marked thread, simulates a barrier between each open -+** upvalue and its value. (If the thread is collected, the value will be -+** assigned to the upvalue, but then it can be too late for the barrier -+** to act. The "barrier" does not need to check colors: A non-marked -+** thread must be young; upvalues cannot be older than their threads; so -+** any visited upvalue must be young too.) Also removes the thread from -+** the list, as it was already visited. Removes also threads with no -+** upvalues, as they have nothing to be checked. (If the thread gets an -+** upvalue later, it will be linked in the list again.) - */ - static void remarkupvals (global_State *g) { - lua_State *thread; -@@ -313,9 +326,11 @@ static void remarkupvals (global_State *g) { - p = &thread->twups; /* keep marked thread with upvalues in the list */ - else { /* thread is not marked or without upvalues */ - UpVal *uv; -+ lua_assert(!isold(thread) || thread->openupval == NULL); - *p = thread->twups; /* remove thread from the list */ - thread->twups = thread; /* mark that it is out of list */ - for (uv = thread->openupval; uv != NULL; uv = uv->u.open.next) { -+ lua_assert(getage(uv) <= getage(thread)); - if (uv->u.open.touched) { - markvalue(g, uv->v); /* remark upvalue's value */ - uv->u.open.touched = 0; --- -1.9.1 - diff --git a/meta-openembedded/meta-oe/recipes-devtools/lua/lua/CVE-2020-15888.patch b/meta-openembedded/meta-oe/recipes-devtools/lua/lua/CVE-2020-15888.patch deleted file mode 100644 index 60a4125971..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/lua/lua/CVE-2020-15888.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 6298903e35217ab69c279056f925fb72900ce0b7 Mon Sep 17 00:00:00 2001 -From: Roberto Ierusalimschy <roberto@inf.puc-rio.br> -Date: Mon, 6 Jul 2020 12:11:54 -0300 -Subject: [PATCH] Keep minimum size when shrinking a stack - -When shrinking a stack (during GC), do not make it smaller than the -initial stack size. ---- - ldo.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) -==== end of original header ==== - -CVE: CVE-2020-15888 - -Upstream-Status: backport [https://github.com/lua/lua.git] - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - -==== -diff --git a/ldo.c b/ldo.c -index c563b1d9..a89ac010 100644 ---- a/src/ldo.c -+++ b/src/ldo.c -@@ -220,7 +220,7 @@ static int stackinuse (lua_State *L) { - - void luaD_shrinkstack (lua_State *L) { - int inuse = stackinuse(L); -- int goodsize = inuse + (inuse / 8) + 2*EXTRA_STACK; -+ int goodsize = inuse + BASIC_STACK_SIZE; - if (goodsize > LUAI_MAXSTACK) - goodsize = LUAI_MAXSTACK; /* respect stack limit */ - if (L->stacksize > LUAI_MAXSTACK) /* had been handling stack overflow? */ -@@ -229,8 +229,7 @@ void luaD_shrinkstack (lua_State *L) { - luaE_shrinkCI(L); /* shrink list */ - /* if thread is currently not handling a stack overflow and its - good size is smaller than current size, shrink its stack */ -- if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) && -- goodsize < L->stacksize) -+ if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) && goodsize < L->stacksize) - luaD_reallocstack(L, goodsize); - else /* don't change stack */ - condmovestack(L,{},{}); /* (change only for debugging) */ --- -2.17.1 - diff --git a/meta-openembedded/meta-oe/recipes-devtools/lua/lua/lua.pc.in b/meta-openembedded/meta-oe/recipes-devtools/lua/lua/lua.pc.in deleted file mode 100644 index c27e86e85d..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/lua/lua/lua.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=/usr -libdir=${prefix}/lib -includedir=${prefix}/include - -Name: Lua -Description: Lua language engine -Version: @VERSION@ -Requires: -Libs: -L${libdir} -llua -lm -ldl -Cflags: -I${includedir} diff --git a/meta-openembedded/meta-oe/recipes-devtools/lua/lua/run-ptest b/meta-openembedded/meta-oe/recipes-devtools/lua/lua/run-ptest deleted file mode 100644 index 8e085e1af9..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/lua/lua/run-ptest +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -cd test -lua -e"_U=true" all.lua > lua-test.tmp - -echo "--- test output ---" -cat lua-test.tmp -echo "" -echo "" -echo "--- ptest result ---" - -grep "final OK \!\!\!" lua-test.tmp > /dev/null -if [ $? -eq 0 ]; then - echo "PASS: lua" -else - echo "FAIL: lua" -fi - -rm -f lua-test.tmp diff --git a/meta-openembedded/meta-oe/recipes-devtools/lua/lua_5.3.6.bb b/meta-openembedded/meta-oe/recipes-devtools/lua/lua_5.3.6.bb deleted file mode 100644 index af3054dcbc..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/lua/lua_5.3.6.bb +++ /dev/null @@ -1,66 +0,0 @@ -DESCRIPTION = "Lua is a powerful light-weight programming language designed \ -for extending applications." -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=318;endline=352;md5=f43d8ee6bc4df18ef8b276439cc4a153" -HOMEPAGE = "http://www.lua.org/" - -SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \ - file://lua.pc.in \ - file://0001-Allow-building-lua-without-readline-on-Linux.patch \ - file://CVE-2020-15888.patch \ - file://0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch \ - " - -# if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release. -PV_testsuites = "5.3.4" - -SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', \ - 'http://www.lua.org/tests/lua-${PV_testsuites}-tests.tar.gz;name=tarballtest \ - file://run-ptest \ - ', '', d)}" - -SRC_URI[tarballsrc.md5sum] = "83f23dbd5230140a3770d5f54076948d" -SRC_URI[tarballsrc.sha256sum] = "fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60" -SRC_URI[tarballtest.md5sum] = "b14fe3748c1cb2d74e3acd1943629ba3" -SRC_URI[tarballtest.sha256sum] = "b80771238271c72565e5a1183292ef31bd7166414cd0d43a8eb79845fa7f599f" - -inherit pkgconfig binconfig ptest - -PACKAGECONFIG ??= "readline" -PACKAGECONFIG[readline] = ",,readline" - -TARGET_CC_ARCH += " -fPIC ${LDFLAGS}" -EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}'" - -do_configure:prepend() { - sed -i -e s:/usr/local:${prefix}:g src/luaconf.h - sed -i -e s:lib/lua/:${baselib}/lua/:g src/luaconf.h -} - -do_compile () { - oe_runmake ${@bb.utils.contains('PACKAGECONFIG', 'readline', 'linux', 'linux-no-readline', d)} -} - -do_install () { - oe_runmake \ - 'INSTALL_TOP=${D}${prefix}' \ - 'INSTALL_BIN=${D}${bindir}' \ - 'INSTALL_INC=${D}${includedir}/' \ - 'INSTALL_MAN=${D}${mandir}/man1' \ - 'INSTALL_SHARE=${D}${datadir}/lua' \ - 'INSTALL_LIB=${D}${libdir}' \ - 'INSTALL_CMOD=${D}${libdir}/lua/5.3' \ - install - install -d ${D}${libdir}/pkgconfig - - sed -e s/@VERSION@/${PV}/ ${WORKDIR}/lua.pc.in > ${WORKDIR}/lua.pc - install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/ - rmdir ${D}${datadir}/lua/5.3 - rmdir ${D}${datadir}/lua -} - -do_install_ptest () { - cp -R --no-dereference --preserve=mode,links -v ${WORKDIR}/lua-${PV_testsuites}-tests ${D}${PTEST_PATH}/test -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-oe/recipes-devtools/luaposix/luaposix/0001-fix-avoid-race-condition-between-test-and-mkdir.patch b/meta-openembedded/meta-oe/recipes-devtools/luaposix/luaposix/0001-fix-avoid-race-condition-between-test-and-mkdir.patch deleted file mode 100644 index d8a9e3d2b7..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/luaposix/luaposix/0001-fix-avoid-race-condition-between-test-and-mkdir.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 4dfca036c96071bd2a2c80ff84719c6d37858373 Mon Sep 17 00:00:00 2001 -From: Haseeb Ashraf <Haseeb_Ashraf@mentor.com> -Date: Fri, 17 Apr 2020 14:36:50 +0500 -Subject: [PATCH 1/1] fix: avoid race condition between test and mkdir - -when building in parallel the race condition, when the directory -is tested for existence and it is created, can break the build - -Signed-off-by: Haseeb Ashraf <Haseeb_Ashraf@mentor.com> ---- - Makefile.in | 6 +++--- - build-aux/rockspecs.mk | 2 +- - local.mk | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index 9b51ef3..4722525 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -1637,7 +1637,7 @@ distclean-tags: - - distdir: $(DISTFILES) - $(am__remove_distdir) -- test -d "$(distdir)" || mkdir "$(distdir)" -+ $(MKDIR_P) "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -1975,7 +1975,7 @@ clean-local: - rm -f $(posix_submodules) - - $(allhtml): $(EXTRA_ext_posix_posix_la_SOURCES) $(ext_posix_posix_la_SOURCES) -- test -d $(builddir)/doc || mkdir $(builddir)/doc -+ $(MKDIR_P) $(builddir)/doc - @HAVE_LDOC_TRUE@ $(LDOC) -c build-aux/config.ld -d $(abs_srcdir)/doc . - @HAVE_LDOC_FALSE@ $(MKDIR_P) doc - @HAVE_LDOC_FALSE@ touch doc/index.html doc/ldoc.css -@@ -1983,7 +1983,7 @@ $(allhtml): $(EXTRA_ext_posix_posix_la_SOURCES) $(ext_posix_posix_la_SOURCES) - doc: $(allhtml) - - $(luarocks_config): Makefile.am -- @test -d build-aux || mkdir build-aux -+ @$(MKDIR_P) build-aux - $(AM_V_GEN){ \ - $(set_LUA_BINDIR); \ - echo 'rocks_trees = { "$(abs_srcdir)/luarocks" }'; \ -diff --git a/build-aux/rockspecs.mk b/build-aux/rockspecs.mk -index ebd1dbf..c8fbdbc 100644 ---- a/build-aux/rockspecs.mk -+++ b/build-aux/rockspecs.mk -@@ -62,7 +62,7 @@ LUA_INCDIR = `cd $$LUA_BINDIR/../include && pwd` - LUA_LIBDIR = `cd $$LUA_BINDIR/../lib && pwd` - - $(luarocks_config): Makefile.am -- @test -d build-aux || mkdir build-aux -+ @$(MKDIR_P) build-aux - $(AM_V_GEN){ \ - $(set_LUA_BINDIR); \ - echo 'rocks_trees = { "$(abs_srcdir)/luarocks" }'; \ -diff --git a/local.mk b/local.mk -index d391ef7..80b22ce 100644 ---- a/local.mk -+++ b/local.mk -@@ -255,7 +255,7 @@ dist_examples_DATA += \ - allhtml = $(dist_doc_DATA) $(dist_examples_DATA) $(dist_modules_DATA) $(dist_classes_DATA) - - $(allhtml): $(EXTRA_ext_posix_posix_la_SOURCES) $(ext_posix_posix_la_SOURCES) -- test -d $(builddir)/doc || mkdir $(builddir)/doc -+ $(MKDIR_P) $(builddir)/doc - if HAVE_LDOC - $(LDOC) -c build-aux/config.ld -d $(abs_srcdir)/doc . - else --- -2.17.1 - diff --git a/meta-openembedded/meta-oe/recipes-devtools/luaposix/luaposix_33.4.0.bb b/meta-openembedded/meta-oe/recipes-devtools/luaposix/luaposix_33.4.0.bb deleted file mode 100644 index 720e2eab8f..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/luaposix/luaposix_33.4.0.bb +++ /dev/null @@ -1,21 +0,0 @@ -DESCRIPTION = "luaposix is a POSIX binding for Lua." -LICENSE = "MIT" -HOMEPAGE = "https://github.com/luaposix/luaposix" -LIC_FILES_CHKSUM = "file://COPYING;md5=7dd2aad04bb7ca212e69127ba8d58f9f" - -DEPENDS += "lua-native lua" - -SRC_URI = "git://github.com/luaposix/luaposix.git;branch=release \ - file://0001-fix-avoid-race-condition-between-test-and-mkdir.patch \ -" -SRCREV = "8e4902ed81c922ed8f76a7ed85be1eaa3fd7e66d" -S = "${WORKDIR}/git" -LUA_VERSION = "5.3" - -inherit autotools pkgconfig - -do_install() { - oe_runmake 'DESTDIR=${D}' 'luadir=${datadir}/lua/${LUA_VERSION}' 'luaexecdir=${libdir}/lua/${LUA_VERSION}' install -} - -FILES:${PN} = "${datadir}/lua/${LUA_VERSION} ${libdir}/lua/${LUA_VERSION}" diff --git a/meta-openembedded/meta-oe/recipes-devtools/luaposix/luaposix_35.1.bb b/meta-openembedded/meta-oe/recipes-devtools/luaposix/luaposix_35.1.bb new file mode 100644 index 0000000000..d9f489b8b0 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/luaposix/luaposix_35.1.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "luaposix is a POSIX binding for Lua." +LICENSE = "MIT" +HOMEPAGE = "https://github.com/luaposix/luaposix" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f81069e00c0cad249f20efe958276db1" + +DEPENDS += "lua-native lua virtual/crypt" + +SRC_URI = "git://github.com/luaposix/luaposix.git;branch=release-v${PV} \ +" +SRCREV = "14043c5086ae738823a5dfbc9170d9e14193fbef" +S = "${WORKDIR}/git" +LUA_VERSION = "5.4" + +B = "${S}" + +inherit pkgconfig + +do_compile() { + ${S}/build-aux/luke +} + +do_install() { + ${S}/build-aux/luke PREFIX=${D}${prefix} install +} + +FILES:${PN} = "${datadir}/lua/${LUA_VERSION} \ + ${libdir}/lua/${LUA_VERSION}" diff --git a/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.10.2.bb b/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.10.4.bb index d2015771ac..fff32372a4 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.10.2.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.10.4.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.MIT;md5=441793d25a658d58d79a1f87516a6ad1" SRC_URI = "git://github.com/nlohmann/json.git;nobranch=1 \ " -SRCREV = "626e7d61e44dee32887126c8f437dd077dec09cf" +SRCREV = "fec56a1a16c6e1c1b1f4e116a20e79398282626c" S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch new file mode 100644 index 0000000000..d7005ae972 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch @@ -0,0 +1,71 @@ +From dc3652c0abcdf8573fd044907b19d8eda7ca1124 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 20 Oct 2021 12:49:58 -0700 +Subject: [PATCH] [liftoff] Correct function signatures + +Fixes builds on mips where clang reports an error +../deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h:661:5: error: no matching member function for call to 'Move' + Move(tmp, src, type.value_type()); + ^~~~ + +Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/v8/v8/+/3235674] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/wasm/baseline/liftoff-assembler.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/deps/v8/src/wasm/baseline/liftoff-assembler.h ++++ b/deps/v8/src/wasm/baseline/liftoff-assembler.h +@@ -613,7 +613,7 @@ class LiftoffAssembler : public TurboAss + void FinishCall(const ValueKindSig*, compiler::CallDescriptor*); + + // Move {src} into {dst}. {src} and {dst} must be different. +- void Move(LiftoffRegister dst, LiftoffRegister src, ValueKind); ++ void Move(LiftoffRegister dst, LiftoffRegister src, ValueKind kind); + + // Parallel register move: For a list of tuples <dst, src, kind>, move the + // {src} register of kind {kind} into {dst}. If {src} equals {dst}, ignore +@@ -759,8 +759,8 @@ class LiftoffAssembler : public TurboAss + inline void MoveStackValue(uint32_t dst_offset, uint32_t src_offset, + ValueKind); + +- inline void Move(Register dst, Register src, ValueKind); +- inline void Move(DoubleRegister dst, DoubleRegister src, ValueKind); ++ inline void Move(Register dst, Register src, ValueKind kind); ++ inline void Move(DoubleRegister dst, DoubleRegister src, ValueKind kind); + + inline void Spill(int offset, LiftoffRegister, ValueKind); + inline void Spill(int offset, WasmValue); +--- a/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h ++++ b/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h +@@ -658,7 +658,7 @@ void LiftoffAssembler::Store(Register ds + pinned = pinned | LiftoffRegList::ForRegs(dst_op.rm(), src); + LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned); + // Save original value. +- Move(tmp, src, type.value_type()); ++ Move(tmp, src, type.value_type().kind()); + + src = tmp; + pinned.set(tmp); +--- a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h ++++ b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h +@@ -596,7 +596,7 @@ void LiftoffAssembler::Store(Register ds + pinned.set(dst_op.rm()); + LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned); + // Save original value. +- Move(tmp, src, type.value_type()); ++ Move(tmp, src, type.value_type().kind()); + + src = tmp; + pinned.set(tmp); +--- a/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h ++++ b/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h +@@ -580,7 +580,7 @@ void LiftoffAssembler::Store(Register ds + pinned.set(dst_op.rm()); + LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned); + // Save original value. +- Move(tmp, src, type.value_type()); ++ Move(tmp, src, type.value_type().kind()); + + src = tmp; + pinned.set(tmp); diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch index 00b2e9baa9..4773f05109 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch @@ -10,11 +10,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> common.gypi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/common.gypi b/common.gypi -index ee91fb1d..049c8f8c 100644 --- a/common.gypi +++ b/common.gypi -@@ -413,7 +413,7 @@ +@@ -417,7 +417,7 @@ 'ldflags': [ '-m32' ], }], [ 'target_arch=="ppc64" and OS!="aix"', { @@ -23,6 +21,3 @@ index ee91fb1d..049c8f8c 100644 'ldflags': [ '-m64' ], }], [ 'target_arch=="s390x"', { --- -2.32.0 - diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Install-both-binaries-and-use-libdir.patch index 6223920990..5cb2e97015 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir.patch +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Install-both-binaries-and-use-libdir.patch @@ -1,10 +1,7 @@ -From 5b22fac923d1ca3e9fefb97f5a171124a88f5e22 Mon Sep 17 00:00:00 2001 +From 62ddf8499747fb1e366477d666c0634ad50039a9 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade <quantum.analyst@gmail.com> Date: Tue, 19 Mar 2019 23:22:40 -0400 -Subject: [PATCH] Install both binaries and use libdir. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit +Subject: [PATCH 2/2] Install both binaries and use libdir. This allows us to build with a shared library for other users while still providing the normal executable. @@ -22,23 +19,29 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/configure.py b/configure.py -index e6f7e4db..6cf5c45d 100755 +index 6efb98c2316f089f3167e486282593245373af3f..a6d2ec939e4480dfae703f3978067537abf9f0f0 100755 --- a/configure.py +++ b/configure.py -@@ -626,6 +626,12 @@ parser.add_option('--shared', +@@ -721,10 +721,16 @@ parser.add_argument('--shared', + dest='shared', + default=None, help='compile shared library for embedding node in another project. ' + '(This mode is not officially supported for regular applications)') -+parser.add_option('--libdir', ++parser.add_argument('--libdir', + action='store', + dest='libdir', + default='lib', + help='a directory to install the shared library into') + - parser.add_option('--without-v8-platform', + parser.add_argument('--without-v8-platform', action='store_true', dest='without_v8_platform', -@@ -1202,6 +1208,7 @@ def configure_node(o): + default=False, + help='do not initialize v8 platform during node.js startup. ' + +@@ -1305,10 +1311,11 @@ def configure_node(o): + o['variables']['debug_nghttp2'] = 'false' + o['variables']['node_no_browser_globals'] = b(options.no_browser_globals) o['variables']['node_shared'] = b(options.shared) @@ -46,11 +49,15 @@ index e6f7e4db..6cf5c45d 100755 node_module_version = getmoduleversion.get_version() if options.dest_os == 'android': + shlib_suffix = 'so' + elif sys.platform == 'darwin': diff --git a/tools/install.py b/tools/install.py -index 729b416f..9bfc6234 100755 +index 41cc1cbc60a9480cc08df3aa0ebe582c2becc3a2..11208f9e7166ab60da46d5ace2257c239a7e9263 100755 --- a/tools/install.py +++ b/tools/install.py -@@ -121,22 +121,19 @@ def subdir_files(path, dest, action): +@@ -128,26 +128,23 @@ def subdir_files(path, dest, action): + for subdir, files_in_path in ret.items(): + action(files_in_path, subdir + '/') def files(action): is_windows = sys.platform == 'win32' @@ -82,3 +89,8 @@ index 729b416f..9bfc6234 100755 if 'true' == variables.get('node_use_dtrace'): action(['out/Release/node.d'], 'lib/dtrace/node.d') + + # behave similarly for systemtap +-- +2.33.0 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch index c6fc2dcd76..8db1f1dd54 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch @@ -10,7 +10,7 @@ Subject: [PATCH] Using native binaries --- a/node.gyp +++ b/node.gyp -@@ -487,6 +487,7 @@ +@@ -294,6 +294,7 @@ 'action_name': 'run_mkcodecache', 'process_outputs_as_sources': 1, 'inputs': [ @@ -18,7 +18,7 @@ Subject: [PATCH] Using native binaries '<(mkcodecache_exec)', ], 'outputs': [ -@@ -512,6 +513,7 @@ +@@ -319,6 +320,7 @@ 'action_name': 'node_mksnapshot', 'process_outputs_as_sources': 1, 'inputs': [ @@ -28,7 +28,7 @@ Subject: [PATCH] Using native binaries 'outputs': [ --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp -@@ -220,6 +220,7 @@ +@@ -68,6 +68,7 @@ { 'action_name': 'run_torque_action', 'inputs': [ # Order matters. @@ -36,7 +36,15 @@ Subject: [PATCH] Using native binaries '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', '<@(torque_files)', ], -@@ -351,6 +352,7 @@ +@@ -99,6 +100,7 @@ + '<@(torque_outputs_inc)', + ], + 'action': [ ++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', + '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', + '-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated', + '-v8-root', '<(V8_ROOT)', +@@ -225,6 +227,7 @@ { 'action_name': 'generate_bytecode_builtins_list_action', 'inputs': [ @@ -44,7 +52,7 @@ Subject: [PATCH] Using native binaries '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)bytecode_builtins_list_generator<(EXECUTABLE_SUFFIX)', ], 'outputs': [ -@@ -533,6 +535,7 @@ +@@ -415,6 +418,7 @@ ], }, 'inputs': [ @@ -52,7 +60,7 @@ Subject: [PATCH] Using native binaries '<(mksnapshot_exec)', ], 'outputs': [ -@@ -1448,6 +1451,7 @@ +@@ -1548,6 +1552,7 @@ { 'action_name': 'run_gen-regexp-special-case_action', 'inputs': [ diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch index cdf6bc8e23..cb0237309e 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch @@ -11,7 +11,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp -@@ -1336,6 +1336,7 @@ +@@ -1436,6 +1436,7 @@ { 'target_name': 'mksnapshot', 'type': 'executable', diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/mips-warnings.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/mips-warnings.patch deleted file mode 100644 index 1a773f23d8..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/mips-warnings.patch +++ /dev/null @@ -1,19 +0,0 @@ -Add explicit static cast to fix narrowing warning - -Fixes -deps/v8/src/codegen/mips/assembler-mips.cc:3556:44: error: non-constant-expression cannot be narrowed from type 'int' to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- a/deps/v8/src/codegen/mips/assembler-mips.cc -+++ b/deps/v8/src/codegen/mips/assembler-mips.cc -@@ -3553,7 +3553,7 @@ void Assembler::GrowBuffer() { - reloc_info_writer.last_pc() + pc_delta); - - // Relocate runtime entries. -- Vector<byte> instructions{buffer_start_, pc_offset()}; -+ Vector<byte> instructions{buffer_start_, static_cast<size_t>(pc_offset())}; - Vector<const byte> reloc_info{reloc_info_writer.pos(), reloc_size}; - for (RelocIterator it(instructions, reloc_info, 0); !it.done(); it.next()) { - RelocInfo::Mode rmode = it.rinfo()->rmode(); diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/system-c-ares.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/system-c-ares.patch new file mode 100644 index 0000000000..141889ad23 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/system-c-ares.patch @@ -0,0 +1,24 @@ +keep nodejs compatible with c-ares 1.17.1 + +Upstream-Status: Inappropriate [c-ares specific] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/src/cares_wrap.h ++++ b/src/cares_wrap.h +@@ -22,7 +22,15 @@ + # include <netdb.h> + #endif // __POSIX__ + +-# include <ares_nameser.h> ++#if defined(__ANDROID__) || \ ++ defined(__MINGW32__) || \ ++ defined(__OpenBSD__) || \ ++ defined(_MSC_VER) ++ ++# include <nameser.h> ++#else ++# include <arpa/nameser.h> ++#endif + + namespace node { + namespace cares_wrap { diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_14.17.1.bb b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_16.11.1.bb index 4715019798..beed833c09 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_14.17.1.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_16.11.1.bb @@ -1,10 +1,11 @@ DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" HOMEPAGE = "http://nodejs.org" LICENSE = "MIT & BSD & Artistic-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a1016f9b7979cfe6fc3466a9bba60b1e" +LIC_FILES_CHKSUM = "file://LICENSE;md5=12f6b053282af96a218353ae7aff7cd8" DEPENDS = "openssl" DEPENDS:append:class-target = " qemu-native" +DEPENDS:append:class-native = " c-ares-native" inherit pkgconfig python3native qemu @@ -17,11 +18,12 @@ COMPATIBLE_HOST:riscv32 = "null" SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ - file://0003-Install-both-binaries-and-use-libdir.patch \ + file://0002-Install-both-binaries-and-use-libdir.patch \ file://0004-v8-don-t-override-ARM-CFLAGS.patch \ file://big-endian.patch \ - file://mips-warnings.patch \ file://mips-less-memory.patch \ + file://system-c-ares.patch \ + file://0001-liftoff-Correct-function-signatures.patch \ " SRC_URI:append:class-target = " \ file://0002-Using-native-binaries.patch \ @@ -32,7 +34,7 @@ SRC_URI:append:toolchain-clang:x86 = " \ SRC_URI:append:toolchain-clang:powerpc64le = " \ file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \ " -SRC_URI[sha256sum] = "ddf1d2d56ddf35ecd98c5ea5ddcd690b245899f289559b4330c921255f5a247f" +SRC_URI[sha256sum] = "67587f4de25e30a9cc0b51a6033eca3bc82d7b4e0d79bb84a265e88f76ab6278" S = "${WORKDIR}/node-v${PV}" @@ -54,7 +56,8 @@ ARCHFLAGS:arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '- bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \ bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \ '--with-arm-fpu=vfp', d), d), d)}" -GYP_DEFINES:append:mipsel = " mips_arch_variant='r1' " +ARCHFLAGS:append:mips = " --v8-lite-mode" +ARCHFLAGS:append:mipsel = " --v8-lite-mode" ARCHFLAGS ?= "" PACKAGECONFIG ??= "ares brotli icu zlib" @@ -85,7 +88,6 @@ python do_unpack() { import shutil bb.build.exec_func('base_do_unpack', d) - shutil.rmtree(d.getVar('S') + '/deps/openssl', True) if 'ares' in d.getVar('PACKAGECONFIG'): shutil.rmtree(d.getVar('S') + '/deps/cares', True) @@ -135,7 +137,8 @@ do_configure () { export LD="${CXX}" GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES # $TARGET_ARCH settings don't match --dest-cpu settings - python3 configure.py --prefix=${prefix} --cross-compiling --shared-openssl \ + python3 configure.py --prefix=${prefix} --cross-compiling \ + --shared-openssl \ --without-dtrace \ --without-etw \ --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ diff --git a/meta-openembedded/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb b/meta-openembedded/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb index 107d5a8b72..42f5513284 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb @@ -5,7 +5,7 @@ SECTION = "devel" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" -COMPATIBLE_HOST = "(x86_64|aarch64|arm)" +COMPATIBLE_HOST = "(x86_64|aarch64|arm|riscv64)" SRCREV = "09724edb1783a98da2b7ae53c5aaa87493aabc9b" SRC_URI = "git://github.com/billfarrow/pcimem.git " diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php_7.4.21.bb b/meta-openembedded/meta-oe/recipes-devtools/php/php_7.4.21.bb index 916010a6ff..ab87ced885 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/php/php_7.4.21.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php_7.4.21.bb @@ -77,7 +77,7 @@ EXTRA_OECONF:class-native = " \ ${COMMON_EXTRA_OECONF} \ " -PACKAGECONFIG ??= "mysql sqlite3 imap opcache openssl \ +PACKAGECONFIG ??= "mysql sqlite3 imap opcache \ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \ " PACKAGECONFIG:class-native = "" diff --git a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-avoid-race-condition.patch b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-avoid-race-condition.patch deleted file mode 100644 index 4fc7703d81..0000000000 --- a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-avoid-race-condition.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 216e31260b618ec73862f9f5336597f391444dac Mon Sep 17 00:00:00 2001 -From: Chen Qi <Qi.Chen@windriver.com> -Date: Sun, 29 Sep 2019 17:20:42 +0800 -Subject: [PATCH] avoid race condition - -It's possible that the cxx-generate-packed-data.cc is compiled -while the t/test-full.pb.h is being generated. This will result -the following error. - - DEBUG: ./t/test-full.pb.h:4:0: error: unterminated #ifndef - ./t/test-full.pb.h:4:0: error: unterminated #ifndef - -Add a dependency to avoid such problem. - -Upstream-Status: Pending - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Makefile.am b/Makefile.am -index b0cb065..1608ae0 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -156,6 +156,7 @@ noinst_PROGRAMS += \ - t_generated_code2_cxx_generate_packed_data_SOURCES = \ - t/generated-code2/cxx-generate-packed-data.cc \ - t/test-full.pb.cc -+t/generated-code2/cxx-generate-packed-data.cc: t/test-full.pb.h - $(t_generated_code2_cxx_generate_packed_data_OBJECTS): t/test-full.pb.h - t_generated_code2_cxx_generate_packed_data_CXXFLAGS = \ - $(AM_CXXFLAGS) \ --- -2.17.1 - diff --git a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.3.bb b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb index 1a0bf535c9..cc037d3934 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.3.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.0.bb @@ -12,11 +12,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=cb901168715f4782a2b06c3ddaefa558" DEPENDS = "protobuf-native protobuf" -SRCREV = "f20a3fa131c275a0e795d99a28f94b4dbbb5af26" - -SRC_URI = "git://github.com/protobuf-c/protobuf-c.git \ - file://0001-avoid-race-condition.patch \ - " +SRC_URI = "git://github.com/protobuf-c/protobuf-c.git" +SRCREV = "f224ab2eeb648a818eb20687d7150a285442c907" S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch new file mode 100644 index 0000000000..488c1f6ff9 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch @@ -0,0 +1,69 @@ +From ddb9c5147883f8b27b4205450139e4a115d9961f Mon Sep 17 00:00:00 2001 +From: Kyungjik Min <dp.min@lge.com> +Date: Mon, 28 Dec 2020 15:56:09 +0900 +Subject: [PATCH] Fix linking error with ld-gold + +:Release Notes: + +:Detailed Notes: +https://github.com/protocolbuffers/protobuf/issues/6113 +There's a bug in the CMake build leading it to not use the version +scripts, which hides the problem (because all symbols are now public) +but doesn't solve it properly. + +:Testing Performed: + +:QA Notes: +N/A + +:Issues Addressed: +[PLAT-130467] Fix build error for libgoogleassistant with latest + protobuf-3.11.4 +--- + src/libprotobuf-lite.map | 2 ++ + src/libprotobuf.map | 2 ++ + src/libprotoc.map | 2 ++ + 3 files changed, 6 insertions(+) + +diff --git a/src/libprotobuf-lite.map b/src/libprotobuf-lite.map +index 391554669..a1853ca6c 100644 +--- a/src/libprotobuf-lite.map ++++ b/src/libprotobuf-lite.map +@@ -3,6 +3,8 @@ + extern "C++" { + *google*; + }; ++ scc_info_*; ++ descriptor_table_*; + + local: + *; +diff --git a/src/libprotobuf.map b/src/libprotobuf.map +index 391554669..a1853ca6c 100644 +--- a/src/libprotobuf.map ++++ b/src/libprotobuf.map +@@ -3,6 +3,8 @@ + extern "C++" { + *google*; + }; ++ scc_info_*; ++ descriptor_table_*; + + local: + *; +diff --git a/src/libprotoc.map b/src/libprotoc.map +index 391554669..a1853ca6c 100644 +--- a/src/libprotoc.map ++++ b/src/libprotoc.map +@@ -3,6 +3,8 @@ + extern "C++" { + *google*; + }; ++ scc_info_*; ++ descriptor_table_*; + + local: + *; +-- +2.17.1 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.18.0.bb b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.18.0.bb index 9f501124a0..46ebef9785 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.18.0.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.18.0.bb @@ -17,6 +17,7 @@ SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=3.18.x \ file://0001-protobuf-fix-configure-error.patch \ file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \ file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ + file://0001-Fix-linking-error-with-ld-gold.patch \ " S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb b/meta-openembedded/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb index 384dd5129c..0dd6edb854 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb @@ -15,6 +15,9 @@ S = "${WORKDIR}/git" inherit cmake EXTRA_OECMAKE += "-DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_TESTS=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF" +# the install path for cmake modules etc. is hardcoded as ${prefix}/lib in +# CMakeLists.txt, which breaks the package split with multilib +EXTRA_OECMAKE += "-DLIB_INSTALL_DIR=${libdir}" # RapidJSON is a header-only C++ library, so the main package will be empty. diff --git a/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client_7.16.16.bb b/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client_7.16.16.bb index 0acd099956..79aaad9d85 100644 --- a/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client_7.16.16.bb +++ b/meta-openembedded/meta-oe/recipes-extended/boinc/boinc-client_7.16.16.bb @@ -16,6 +16,7 @@ global warming, discover sources of gravitational waves, and many other types \ of scientific and mathematical research." HOMEPAGE = "http://boinc.berkeley.edu/" +PNBLACKLIST[boinc-client] ?= "Needs porting to openssl 3.x" LICENSE = "LGPLv2+ & GPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6" diff --git a/meta-openembedded/meta-oe/recipes-extended/byacc/byacc.inc b/meta-openembedded/meta-oe/recipes-extended/byacc/byacc.inc index cffa7f5dcd..a3d9bfdb70 100644 --- a/meta-openembedded/meta-oe/recipes-extended/byacc/byacc.inc +++ b/meta-openembedded/meta-oe/recipes-extended/byacc/byacc.inc @@ -6,7 +6,7 @@ programming language." SECTION = "devel" LICENSE = "PD" -SRC_URI = "ftp://ftp.invisible-island.net/byacc/byacc-${PV}.tgz \ +SRC_URI = "https://invisible-mirror.net/archives/byacc/byacc-${PV}.tgz \ file://byacc-open.patch \ file://0001-byacc-do-not-reorder-CC-and-CFLAGS.patch" diff --git a/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine_3.15.0.bb b/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine_3.15.0.bb index 38efe6306d..60c5ab3815 100644 --- a/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine_3.15.0.bb +++ b/meta-openembedded/meta-oe/recipes-extended/cfengine/cfengine_3.15.0.bb @@ -10,6 +10,8 @@ its lifecycle. CFEngine takes systems from Build to Deploy, Manage and Audit." HOMEPAGE = "http://cfengine.com" +PNBLACKLIST[cfengine] ?= "Needs porting to openssl 3.x" + LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://LICENSE;md5=233aa25e53983237cf0bd4c238af255f" diff --git a/meta-openembedded/meta-oe/recipes-extended/hiredis/files/0001-CMake-configuration-for-hiredis.patch b/meta-openembedded/meta-oe/recipes-extended/hiredis/files/0001-CMake-configuration-for-hiredis.patch deleted file mode 100644 index 139d13f4cb..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/hiredis/files/0001-CMake-configuration-for-hiredis.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 2dc0c7e4a3fa7ecc92ee5e22f1d8ee48c2b333a8 Mon Sep 17 00:00:00 2001 -From: Thomas Lee <debian@tomlee.co> -Date: Sun, 4 Nov 2018 22:59:09 +0000 -Subject: [PATCH] CMake configuration for hiredis - -Last-Update: 2018-09-26 - -Upstream-Status: Backport [Ubuntu 20.04] ---- - HiredisConfig.cmake.in | 5 +++++ - HiredisConfigVersion.cmake.in | 22 ++++++++++++++++++++++ - Makefile | 17 ++++++++++++++++- - 3 files changed, 43 insertions(+), 1 deletion(-) - create mode 100644 HiredisConfig.cmake.in - create mode 100644 HiredisConfigVersion.cmake.in - -diff --git a/HiredisConfig.cmake.in b/HiredisConfig.cmake.in -new file mode 100644 -index 0000000..2cce290 ---- /dev/null -+++ b/HiredisConfig.cmake.in -@@ -0,0 +1,5 @@ -+find_path(HIREDIS_INCLUDE_DIRS hiredis/hiredis.h HINTS "/usr/include") -+find_library(HIREDIS_LIB_HIREDIS NAMES hiredis HINTS "/usr/lib") -+ -+set(HIREDIS_LIBRARIES ${HIREDIS_LIB_HIREDIS}) -+ -diff --git a/HiredisConfigVersion.cmake.in b/HiredisConfigVersion.cmake.in -new file mode 100644 -index 0000000..584144a ---- /dev/null -+++ b/HiredisConfigVersion.cmake.in -@@ -0,0 +1,22 @@ -+set(PACKAGE_VERSION "@HIREDIS_VERSION@") -+ -+string(REPLACE "." ";" HIREDIS_VERSION_COMPONENTS ${PACKAGE_VERSION}) -+string(REPLACE "." ";" REQUESTED_VERSION_COMPONENTS ${PACKAGE_FIND_VERSION}) -+ -+list(GET HIREDIS_VERSION_COMPONENTS 0 HIREDIS_VERSION_MAJOR) -+list(GET HIREDIS_VERSION_COMPONENTS 1 HIREDIS_VERSION_MINOR) -+ -+list(GET REQUESTED_VERSION_COMPONENTS 0 REQUESTED_VERSION_MAJOR) -+list(GET REQUESTED_VERSION_COMPONENTS 1 REQUESTED_VERSION_MINOR) -+ -+if(("${HIREDIS_VERSION_MAJOR}" EQUAL "${REQUESTED_VERSION_MAJOR}") AND -+ (("${HIREDIS_VERSION_MINOR}" EQUAL "${REQUESTED_VERSION_MINOR}") OR -+ ("${HIREDIS_VERSION_MINOR}" GREATER "${REQUESTED_VERSION_MINOR}"))) -+ set(PACKAGE_VERSION_COMPATIBLE TRUE) -+ if("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") -+ set(PACKAGE_VERSION_EXACT TRUE) -+ endif() -+else() -+ set(PACKAGE_VERSION_COMPATIBLE FALSE) -+endif() -+ -diff --git a/Makefile b/Makefile -index 339727f..43704cd 100644 ---- a/Makefile -+++ b/Makefile -@@ -8,6 +8,8 @@ EXAMPLES=hiredis-example hiredis-example-libevent hiredis-example-libev hiredis- - TESTS=hiredis-test - LIBNAME=libhiredis - PKGCONFNAME=hiredis.pc -+CMAKECONFNAME=HiredisConfig.cmake -+CMAKEVERSNAME=HiredisConfigVersion.cmake - - HIREDIS_MAJOR=$(shell grep HIREDIS_MAJOR hiredis.h | awk '{print $$3}') - HIREDIS_MINOR=$(shell grep HIREDIS_MINOR hiredis.h | awk '{print $$3}') -@@ -19,9 +21,11 @@ PREFIX?=/usr/local - INCLUDE_PATH?=include/hiredis - LIBRARY_PATH?=lib - PKGCONF_PATH?=pkgconfig -+CMAKE_PATH?=cmake/Hiredis - INSTALL_INCLUDE_PATH= $(DESTDIR)$(PREFIX)/$(INCLUDE_PATH) - INSTALL_LIBRARY_PATH= $(DESTDIR)$(PREFIX)/$(LIBRARY_PATH) - INSTALL_PKGCONF_PATH= $(INSTALL_LIBRARY_PATH)/$(PKGCONF_PATH) -+INSTALL_CMAKE_PATH= $(INSTALL_LIBRARY_PATH)/$(CMAKE_PATH) - - # redis-server configuration used for testing - REDIS_PORT=56379 -@@ -150,6 +154,7 @@ check: hiredis-test - - clean: - rm -rf $(DYLIBNAME) $(STLIBNAME) $(TESTS) $(PKGCONFNAME) examples/hiredis-example* *.o *.gcda *.gcno *.gcov -+ rm -f $(CMAKECONFNAME) $(CMAKEVERSNAME) - - dep: - $(CC) -MM *.c -@@ -169,7 +174,14 @@ $(PKGCONFNAME): hiredis.h - @echo Libs: -L\$${libdir} -lhiredis >> $@ - @echo Cflags: -I\$${includedir} -D_FILE_OFFSET_BITS=64 >> $@ - --install: $(DYLIBNAME) $(STLIBNAME) $(PKGCONFNAME) -+$(CMAKECONFNAME): $(CMAKECONFNAME).in -+ cp $(CMAKECONFNAME).in $(CMAKECONFNAME) -+ -+$(CMAKEVERSNAME): $(CMAKEVERSNAME).in -+ sed -e "s,@HIREDIS_VERSION@,$(HIREDIS_MAJOR).$(HIREDIS_MINOR).$(HIREDIS_PATCH),g" \ -+ $(CMAKEVERSNAME).in >$(CMAKEVERSNAME) -+ -+install: $(DYLIBNAME) $(STLIBNAME) $(PKGCONFNAME) $(CMAKECONFNAME) $(CMAKEVERSNAME) - mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_INCLUDE_PATH)/adapters $(INSTALL_LIBRARY_PATH) - $(INSTALL) hiredis.h async.h read.h sds.h $(INSTALL_INCLUDE_PATH) - $(INSTALL) adapters/*.h $(INSTALL_INCLUDE_PATH)/adapters -@@ -178,6 +190,9 @@ install: $(DYLIBNAME) $(STLIBNAME) $(PKGCONFNAME) - $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH) - mkdir -p $(INSTALL_PKGCONF_PATH) - $(INSTALL) $(PKGCONFNAME) $(INSTALL_PKGCONF_PATH) -+ mkdir -p $(INSTALL_CMAKE_PATH) -+ $(INSTALL) $(CMAKECONFNAME) $(INSTALL_CMAKE_PATH) -+ $(INSTALL) $(CMAKEVERSNAME) $(INSTALL_CMAKE_PATH) - - 32bit: - @echo "" --- -2.27.0 - diff --git a/meta-openembedded/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch b/meta-openembedded/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch deleted file mode 100644 index 1af5d26ac0..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/hiredis/files/0001-Makefile-remove-hardcoding-of-CC.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d13b918a3ff8b0ebfd1e7b18b198b4b45841d720 Mon Sep 17 00:00:00 2001 -From: Andrea Galbusera <gizero@gmail.com> -Date: Fri, 31 Jul 2015 16:42:08 +0200 -Subject: [PATCH] Makefile: remove hardcoding of CC - -* upgrade previous patch to avoid wiping CFLAGS. This fixes build on arm -platforms which previously caused and issue due to -fPIC being lost - -Signed-off-by: Andrea Galbusera <gizero@gmail.com> ---- - Makefile | 5 ----- - 1 file changed, 5 deletions(-) - ---- a/Makefile -+++ b/Makefile -@@ -35,12 +35,6 @@ define REDIS_TEST_CONFIG - endef - export REDIS_TEST_CONFIG - --# Fallback to gcc when $CC is not in $PATH. --CC:=$(shell sh -c 'type $${CC%% *} >/dev/null 2>/dev/null && echo $(CC) || echo gcc') --CXX:=$(shell sh -c 'type $${CXX%% *} >/dev/null 2>/dev/null && echo $(CXX) || echo g++') --OPTIMIZATION?=-O3 --WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings --DEBUG_FLAGS?= -g -ggdb - REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) - REAL_LDFLAGS=$(LDFLAGS) - diff --git a/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_0.14.0.bb b/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_0.14.0.bb deleted file mode 100644 index ed81859190..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_0.14.0.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "Minimalistic C client library for Redis" -HOMEPAGE = "http://github.com/redis/hiredis" -LICENSE = "BSD-3-Clause" -SECTION = "libs" -DEPENDS = "redis" - -LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51" -SRCREV = "685030652cd98c5414ce554ff5b356dfe8437870" -SRC_URI = "git://github.com/redis/hiredis;protocol=git \ - file://0001-Makefile-remove-hardcoding-of-CC.patch \ - file://0001-CMake-configuration-for-hiredis.patch" - -S = "${WORKDIR}/git" - -inherit autotools-brokensep pkgconfig - -EXTRA_OEMAKE = "PREFIX=${prefix} LIBRARY_PATH=${baselib}" - -# By default INSTALL variable in Makefile is equal to 'cp -a', which preserves -# ownership and causes host-user-contamination QA issue. -# And PREFIX defaults to /usr/local. -do_install:prepend() { - export INSTALL='cp -r' -} diff --git a/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_1.0.2.bb b/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_1.0.2.bb new file mode 100644 index 0000000000..93bda3372d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/hiredis/hiredis_1.0.2.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "Minimalistic C client library for Redis" +HOMEPAGE = "http://github.com/redis/hiredis" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51" +DEPENDS = "redis" + +SRC_URI = "git://github.com/redis/hiredis;protocol=git" +SRCREV = "b731283245f3183af527237166261ad0768ba7d4" + +S = "${WORKDIR}/git" + +inherit cmake diff --git a/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_2.7.0.bb b/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_2.8.0.bb index a16dbd4145..259187b0cd 100644 --- a/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_2.7.0.bb +++ b/meta-openembedded/meta-oe/recipes-extended/icewm/icewm_2.8.0.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4a26952467ef79a7efca4a9cf52d417b" SRC_URI = "https://github.com/ice-wm/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.lz \ file://0001-configure.ac-skip-running-test-program-when-cross-co.patch \ " -SRC_URI[sha256sum] = "c56b1d0f5d8efa2af3e38003770eab9165289aa87bd8f1627819c7f93f9433a3" +SRC_URI[sha256sum] = "12b7cce67b95b09f34873f46948e7f1cef9edd88682139e054b79ba165c53e49" UPSTREAM_CHECK_URI = "https://github.com/ice-wm/${BPN}/releases" diff --git a/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2021.3.bb b/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2021.5.bb index b0c9849fad..08cfb136e5 100644 --- a/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2021.3.bb +++ b/meta-openembedded/meta-oe/recipes-extended/ostree/ostree_2021.5.bb @@ -25,7 +25,7 @@ SRC_URI = " \ gitsm://github.com/ostreedev/ostree;branch=main \ file://run-ptest \ " -SRCREV = "38c14b374567f736533f7f515595208fe359819f" +SRCREV = "63bf5e606b24c7343bfe622bf6af2110ee6beabc" UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+)" diff --git a/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_2.8.3.bb b/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_3.2.1.bb index 01233699a5..f0ae229414 100644 --- a/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_2.8.3.bb +++ b/meta-openembedded/meta-oe/recipes-extended/pegtl/pegtl_3.2.1.bb @@ -1,11 +1,10 @@ DESCRIPTION="header-only library for creating parsers according to Parsing Expression Grammar" HOMEPAGE="https://github.com/taocpp/PEGTL" LICENSE="MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6a5195f720a8d436a4148e0cb8660400" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5b6701671289d12b7ffa69138832c006" -SRCREV = "47e878ad4fd72c91253c9d47b6f17e001ca2dfcf" -SRC_URI = "git://github.com/taocpp/PEGTL.git;protocol=https;branch=2.x \ - " +SRC_URI = "git://github.com/taocpp/PEGTL.git;protocol=https;branch=main" +SRCREV = "6d03c8decc22b4ddd51115e2170e0e82413c7104" inherit cmake diff --git a/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_1.9.bb b/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_1.11.1.bb index 4325c15c33..e456603c1c 100644 --- a/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_1.9.bb +++ b/meta-openembedded/meta-oe/recipes-extended/pmdk/pmdk_1.11.1.bb @@ -11,9 +11,8 @@ DEPENDS:append:libc-musl = " fts" S = "${WORKDIR}/git" -SRC_URI = "git://github.com/pmem/pmdk.git" - -SRCREV = "1926ffb8f3f5f0617b3b3ed32029d437c272f187" +SRC_URI = "git://github.com/pmem/pmdk.git;branch=stable-1.11" +SRCREV = "5b21904a257eff47f2e87fcbf2de46111f03ddd8" inherit autotools-brokensep pkgconfig diff --git a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0002-jsauthority-port-to-mozjs-91.patch b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0002-jsauthority-port-to-mozjs-91.patch new file mode 100644 index 0000000000..5b3660da2f --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0002-jsauthority-port-to-mozjs-91.patch @@ -0,0 +1,38 @@ +From 4ce27b66bb07b72cb96d3d43a75108a5a6e7e156 Mon Sep 17 00:00:00 2001 +From: Xi Ruoyao <xry111@mengyan1223.wang> +Date: Tue, 10 Aug 2021 19:09:42 +0800 +Subject: [PATCH] jsauthority: port to mozjs-91 + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/92] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + configure.ac | 2 +- + meson.build | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d807086..5a7fc11 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -80,7 +80,7 @@ PKG_CHECK_MODULES(GLIB, [gmodule-2.0 gio-unix-2.0 >= 2.30.0]) + AC_SUBST(GLIB_CFLAGS) + AC_SUBST(GLIB_LIBS) + +-PKG_CHECK_MODULES(LIBJS, [mozjs-78]) ++PKG_CHECK_MODULES(LIBJS, [mozjs-91]) + + AC_SUBST(LIBJS_CFLAGS) + AC_SUBST(LIBJS_CXXFLAGS) +diff --git a/meson.build b/meson.build +index b3702be..733bbff 100644 +--- a/meson.build ++++ b/meson.build +@@ -126,7 +126,7 @@ expat_dep = dependency('expat') + assert(cc.has_header('expat.h', dependencies: expat_dep), 'Can\'t find expat.h. Please install expat.') + assert(cc.has_function('XML_ParserCreate', dependencies: expat_dep), 'Can\'t find expat library. Please install expat.') + +-mozjs_dep = dependency('mozjs-78') ++mozjs_dep = dependency('mozjs-91') + + dbus_dep = dependency('dbus-1') + dbus_confdir = dbus_dep.get_pkgconfig_variable('datadir', define_variable: ['datadir', pk_prefix / pk_datadir]) #changed from sysconfdir with respect to commit#8eada3836465838 diff --git a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0003-jsauthority-ensure-to-call-JS_Init-and-JS_ShutDown-e.patch b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0003-jsauthority-ensure-to-call-JS_Init-and-JS_ShutDown-e.patch new file mode 100644 index 0000000000..9e9755e44f --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0003-jsauthority-ensure-to-call-JS_Init-and-JS_ShutDown-e.patch @@ -0,0 +1,63 @@ +From 7799441b9aa55324160deefbc65f9d918b8c94c1 Mon Sep 17 00:00:00 2001 +From: Xi Ruoyao <xry111@mengyan1223.wang> +Date: Tue, 10 Aug 2021 18:52:56 +0800 +Subject: [PATCH] jsauthority: ensure to call JS_Init() and JS_ShutDown() + exactly once + +Before this commit, we were calling JS_Init() in +polkit_backend_js_authority_class_init and never called JS_ShutDown. +This is actually a misusage of SpiderMonkey API. Quote from a comment +in js/Initialization.h (both mozjs-78 and mozjs-91): + + It is currently not possible to initialize SpiderMonkey multiple + times (that is, calling JS_Init/JSAPI methods/JS_ShutDown in that + order, then doing so again). + +This misusage does not cause severe issues with mozjs-78. However, when +we eventually port jsauthority to use mozjs-91, bad thing will happen: +see the test failure mentioned in #150. + +This commit is tested with both mozjs-78 and mozjs-91, all tests pass +with it. + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/91] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + src/polkitbackend/polkitbackendjsauthority.cpp | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp +index 41d8d5c..38dc001 100644 +--- a/src/polkitbackend/polkitbackendjsauthority.cpp ++++ b/src/polkitbackend/polkitbackendjsauthority.cpp +@@ -75,6 +75,13 @@ + + /* ---------------------------------------------------------------------------------------------------- */ + ++static class JsInitHelperType ++{ ++public: ++ JsInitHelperType() { JS_Init(); } ++ ~JsInitHelperType() { JS_ShutDown(); } ++} JsInitHelper; ++ + struct _PolkitBackendJsAuthorityPrivate + { + gchar **rules_dirs; +@@ -589,7 +596,6 @@ polkit_backend_js_authority_finalize (GObject *object) + delete authority->priv->js_polkit; + + JS_DestroyContext (authority->priv->cx); +- /* JS_ShutDown (); */ + + G_OBJECT_CLASS (polkit_backend_js_authority_parent_class)->finalize (object); + } +@@ -665,8 +671,6 @@ polkit_backend_js_authority_class_init (PolkitBackendJsAuthorityClass *klass) + + + g_type_class_add_private (klass, sizeof (PolkitBackendJsAuthorityPrivate)); +- +- JS_Init (); + } + + /* ---------------------------------------------------------------------------------------------------- */ diff --git a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0003-make-netgroup-support-optional.patch b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0003-make-netgroup-support-optional.patch index fd7251369e..1a268f2d0d 100644 --- a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0003-make-netgroup-support-optional.patch +++ b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/0003-make-netgroup-support-optional.patch @@ -1,4 +1,4 @@ -From 21aa2747e8f0048759aab184b07dd6389666d5e6 Mon Sep 17 00:00:00 2001 +From 0c1debb380fee7f5b2bc62406e45856dc9c9e1a1 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 22 May 2019 13:18:55 -0700 Subject: [PATCH] make netgroup support optional @@ -17,20 +17,23 @@ Fixes bug 50145. Closes polkit/polkit#14. Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- configure.ac | 2 +- src/polkit/polkitidentity.c | 16 ++++++++++++++++ src/polkit/polkitunixnetgroup.c | 3 +++ .../polkitbackendinteractiveauthority.c | 14 ++++++++------ - src/polkitbackend/polkitbackendjsauthority.cpp | 2 ++ + src/polkitbackend/polkitbackendjsauthority.cpp | 3 +++ test/polkit/polkitidentitytest.c | 9 ++++++++- test/polkit/polkitunixnetgrouptest.c | 3 +++ .../test-polkitbackendjsauthority.c | 2 ++ - 8 files changed, 43 insertions(+), 8 deletions(-) + 8 files changed, 44 insertions(+), 8 deletions(-) +diff --git a/configure.ac b/configure.ac +index b625743..d807086 100644 --- a/configure.ac +++ b/configure.ac -@@ -99,7 +99,7 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXP +@@ -100,7 +100,7 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXPAT_LIBS="-lexpat"], [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) AC_SUBST(EXPAT_LIBS) @@ -39,9 +42,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> if test "x$GCC" = "xyes"; then LDFLAGS="-Wl,--as-needed $LDFLAGS" +diff --git a/src/polkit/polkitidentity.c b/src/polkit/polkitidentity.c +index 3aa1f7f..10e9c17 100644 --- a/src/polkit/polkitidentity.c +++ b/src/polkit/polkitidentity.c -@@ -182,7 +182,15 @@ polkit_identity_from_string (const gcha +@@ -182,7 +182,15 @@ polkit_identity_from_string (const gchar *str, } else if (g_str_has_prefix (str, "unix-netgroup:")) { @@ -57,7 +62,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> } if (identity == NULL && (error != NULL && *error == NULL)) -@@ -344,6 +352,13 @@ polkit_identity_new_for_gvariant (GVaria +@@ -344,6 +352,13 @@ polkit_identity_new_for_gvariant (GVariant *variant, GVariant *v; const char *name; @@ -71,7 +76,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> v = lookup_asv (details_gvariant, "name", G_VARIANT_TYPE_STRING, error); if (v == NULL) { -@@ -353,6 +368,7 @@ polkit_identity_new_for_gvariant (GVaria +@@ -353,6 +368,7 @@ polkit_identity_new_for_gvariant (GVariant *variant, name = g_variant_get_string (v, NULL); ret = polkit_unix_netgroup_new (name); g_variant_unref (v); @@ -79,9 +84,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> } else { +diff --git a/src/polkit/polkitunixnetgroup.c b/src/polkit/polkitunixnetgroup.c +index 8a2b369..83f8d4a 100644 --- a/src/polkit/polkitunixnetgroup.c +++ b/src/polkit/polkitunixnetgroup.c -@@ -194,6 +194,9 @@ polkit_unix_netgroup_set_name (PolkitUni +@@ -194,6 +194,9 @@ polkit_unix_netgroup_set_name (PolkitUnixNetgroup *group, PolkitIdentity * polkit_unix_netgroup_new (const gchar *name) { @@ -91,9 +98,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> g_return_val_if_fail (name != NULL, NULL); return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_NETGROUP, "name", name, +diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c +index 056d9a8..36c2f3d 100644 --- a/src/polkitbackend/polkitbackendinteractiveauthority.c +++ b/src/polkitbackend/polkitbackendinteractiveauthority.c -@@ -2233,25 +2233,26 @@ get_users_in_net_group (PolkitIdentity +@@ -2233,25 +2233,26 @@ get_users_in_net_group (PolkitIdentity *group, GList *ret; ret = NULL; @@ -126,7 +135,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> PolkitIdentity *user; GError *error = NULL; -@@ -2282,6 +2283,7 @@ get_users_in_net_group (PolkitIdentity +@@ -2282,6 +2283,7 @@ get_users_in_net_group (PolkitIdentity *group, out: endnetgrent (); @@ -134,9 +143,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> return ret; } +diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp +index ca17108..41d8d5c 100644 --- a/src/polkitbackend/polkitbackendjsauthority.cpp +++ b/src/polkitbackend/polkitbackendjsauthority.cpp -@@ -1502,6 +1502,7 @@ js_polkit_user_is_in_netgroup (JSContext +@@ -1520,6 +1520,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx, JS::CallArgs args = JS::CallArgsFromVp (argc, vp); @@ -144,14 +155,17 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> JS::RootedString usrstr (authority->priv->cx); usrstr = args[0].toString(); user = JS_EncodeStringToUTF8 (cx, usrstr); -@@ -1519,6 +1520,7 @@ js_polkit_user_is_in_netgroup (JSContext +@@ -1535,6 +1536,8 @@ js_polkit_user_is_in_netgroup (JSContext *cx, + is_in_netgroup = true; + } - JS_free (cx, netgroup); - JS_free (cx, user); +#endif - ++ ret = true; + args.rval ().setBoolean (is_in_netgroup); +diff --git a/test/polkit/polkitidentitytest.c b/test/polkit/polkitidentitytest.c +index e91967b..e829aaa 100644 --- a/test/polkit/polkitidentitytest.c +++ b/test/polkit/polkitidentitytest.c @@ -19,6 +19,7 @@ @@ -162,7 +176,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> #include "glib.h" #include <polkit/polkit.h> #include <polkit/polkitprivate.h> -@@ -145,11 +146,15 @@ struct ComparisonTestData comparison_tes +@@ -145,11 +146,15 @@ struct ComparisonTestData comparison_test_data [] = { {"unix-group:root", "unix-group:jane", FALSE}, {"unix-group:jane", "unix-group:jane", TRUE}, @@ -193,6 +207,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> add_comparison_tests (); +diff --git a/test/polkit/polkitunixnetgrouptest.c b/test/polkit/polkitunixnetgrouptest.c +index 3701ba1..e3352eb 100644 --- a/test/polkit/polkitunixnetgrouptest.c +++ b/test/polkit/polkitunixnetgrouptest.c @@ -19,6 +19,7 @@ @@ -213,6 +229,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> +#endif return g_test_run (); } +diff --git a/test/polkitbackend/test-polkitbackendjsauthority.c b/test/polkitbackend/test-polkitbackendjsauthority.c +index f97e0e0..fc52149 100644 --- a/test/polkitbackend/test-polkitbackendjsauthority.c +++ b/test/polkitbackend/test-polkitbackendjsauthority.c @@ -137,12 +137,14 @@ test_get_admin_identities (void) diff --git a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2021-3560.patch b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2021-3560.patch deleted file mode 100644 index 76308ffdb9..0000000000 --- a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit/CVE-2021-3560.patch +++ /dev/null @@ -1,33 +0,0 @@ -From a04d13affe0fa53ff618e07aa8f57f4c0e3b9b81 Mon Sep 17 00:00:00 2001 -From: Jan Rybar <jrybar@redhat.com> -Date: Wed, 2 Jun 2021 15:43:38 +0200 -Subject: [PATCH] GHSL-2021-074: authentication bypass vulnerability in polkit - -initial values returned if error caught - -CVE: CVE-2021-3560 - -Upstream-Status: Backport [https://gitlab.freedesktop.org/polkit/polkit/-/commit/a04d13affe0fa53ff618e07aa8f57f4c0e3b9b81] - -Signed-off-by: Mingli Yu <mingli.yu@windriver.com> ---- - src/polkit/polkitsystembusname.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/polkit/polkitsystembusname.c b/src/polkit/polkitsystembusname.c -index 8daa12c..8ed1363 100644 ---- a/src/polkit/polkitsystembusname.c -+++ b/src/polkit/polkitsystembusname.c -@@ -435,6 +435,9 @@ polkit_system_bus_name_get_creds_sync (PolkitSystemBusName *system_bus - while (!((data.retrieved_uid && data.retrieved_pid) || data.caught_error)) - g_main_context_iteration (tmp_context, TRUE); - -+ if (data.caught_error) -+ goto out; -+ - if (out_uid) - *out_uid = data.uid; - if (out_pid) --- -2.29.2 - diff --git a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_0.116.bb b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_0.119.bb index 6408933ea3..a41b0fecad 100644 --- a/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_0.116.bb +++ b/meta-openembedded/meta-oe/recipes-extended/polkit/polkit_0.119.bb @@ -25,10 +25,10 @@ PAM_SRC_URI = "file://polkit-1_pam.patch" SRC_URI = "http://www.freedesktop.org/software/polkit/releases/polkit-${PV}.tar.gz \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ file://0003-make-netgroup-support-optional.patch \ - file://CVE-2021-3560.patch \ + file://0002-jsauthority-port-to-mozjs-91.patch \ + file://0003-jsauthority-ensure-to-call-JS_Init-and-JS_ShutDown-e.patch \ " -SRC_URI[md5sum] = "4b37258583393e83069a0e2e89c0162a" -SRC_URI[sha256sum] = "88170c9e711e8db305a12fdb8234fac5706c61969b94e084d0f117d8ec5d34b1" +SRC_URI[sha256sum] = "c8579fdb86e94295404211285fee0722ad04893f0213e571bd75c00972fd1f5c" EXTRA_OECONF = "--with-os-type=moblin \ --disable-man-pages \ diff --git a/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus_1.2.2.bb b/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus_1.3.2.bb index 0870c6629d..2a6bb57ed7 100644 --- a/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus_1.2.2.bb +++ b/meta-openembedded/meta-oe/recipes-extended/redis-plus-plus/redis-plus-plus_1.3.2.bb @@ -1,18 +1,21 @@ DESCRIPTION = "C++ client for Redis based on hiredis" HOMEPAGE = "https://github.com/sewenew/redis-plus-plus" SECTION = "libs" - -DEPENDS += "hiredis" -RDEPENDS:${PN} += "hiredis" - LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" -SRCREV = "8ac506e6eb0e5c5b2625785b67400bde705773a1" + SRC_URI = "git://github.com/sewenew/redis-plus-plus" +SRCREV = "e29c63db54653a660d7a0f556f670b7a6fce0a78" S = "${WORKDIR}/git" inherit cmake +DEPENDS += "hiredis" + +RDEPENDS:${PN} += "hiredis" + FILES_SOLIBSDEV = "" -FILES:${PN} += " ${libdir}/libredis++.so" +FILES:${PN} += " ${libdir}/libredis++.so*" + +INSANE_SKIP:${PN} += "dev-so" diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis_6.2.5.bb b/meta-openembedded/meta-oe/recipes-extended/redis/redis_6.2.6.bb index 58d759b59d..87fade7e04 100644 --- a/meta-openembedded/meta-oe/recipes-extended/redis/redis_6.2.5.bb +++ b/meta-openembedded/meta-oe/recipes-extended/redis/redis_6.2.6.bb @@ -17,7 +17,7 @@ SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ file://GNU_SOURCE.patch \ file://0006-Define-correct-gregs-for-RISCV32.patch \ " -SRC_URI[sha256sum] = "4b9a75709a1b74b3785e20a6c158cab94cf52298aa381eea947a678a60d551ae" +SRC_URI[sha256sum] = "5b2b8b7a50111ef395bf1c1d5be11e6e167ac018125055daa8b5c2317ae131ab" inherit autotools-brokensep update-rc.d systemd useradd diff --git a/meta-openembedded/meta-oe/recipes-extended/sigrok/libsigrokdecode/0001-configure.ac-add-py-3.10-support.patch b/meta-openembedded/meta-oe/recipes-extended/sigrok/libsigrokdecode/0001-configure.ac-add-py-3.10-support.patch new file mode 100644 index 0000000000..85e49cca2d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/sigrok/libsigrokdecode/0001-configure.ac-add-py-3.10-support.patch @@ -0,0 +1,24 @@ +From a5835dfe126bfe6ed0b8197c6578960835bf1fe8 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Sun, 3 Oct 2021 22:08:50 +0200 +Subject: [PATCH] configure.ac: add py 3.10 support + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 4802f35..e0e468f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -93,7 +93,7 @@ SR_PKG_CHECK_SUMMARY([srd_pkglibs_summary]) + # first, since usually only that variant will add "-lpython3.8". + # https://docs.python.org/3/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build + SR_PKG_CHECK([python3], [SRD_PKGLIBS], +- [python-3.9-embed], [python-3.8-embed], [python-3.8 >= 3.8], [python-3.7 >= 3.7], [python-3.6 >= 3.6], [python-3.5 >= 3.5], [python-3.4 >= 3.4], [python-3.3 >= 3.3], [python-3.2 >= 3.2], [python3 >= 3.2]) ++ [python-3.10-embed], [python-3.9-embed], [python-3.8-embed], [python-3.8 >= 3.8], [python-3.7 >= 3.7], [python-3.6 >= 3.6], [python-3.5 >= 3.5], [python-3.4 >= 3.4], [python-3.3 >= 3.3], [python-3.2 >= 3.2], [python3 >= 3.2]) + AS_IF([test "x$sr_have_python3" = xno], + [AC_MSG_ERROR([Cannot find Python 3 development headers.])]) + diff --git a/meta-openembedded/meta-oe/recipes-extended/sigrok/libsigrokdecode_0.5.3.bb b/meta-openembedded/meta-oe/recipes-extended/sigrok/libsigrokdecode_0.5.3.bb index d78d2770c6..86b894090e 100644 --- a/meta-openembedded/meta-oe/recipes-extended/sigrok/libsigrokdecode_0.5.3.bb +++ b/meta-openembedded/meta-oe/recipes-extended/sigrok/libsigrokdecode_0.5.3.bb @@ -9,7 +9,9 @@ DEPENDS = "glib-2.0 python3" inherit autotools pkgconfig SRC_URI = "http://sigrok.org/download/source/libsigrokdecode/libsigrokdecode-${PV}.tar.gz \ - file://python39.patch" + file://python39.patch \ + file://0001-configure.ac-add-py-3.10-support.patch \ + " SRC_URI[md5sum] = "7ba4ed4ef1f06ae96979751e096c2821" SRC_URI[sha256sum] = "c50814aa6743cd8c4e88c84a0cdd8889d883c3be122289be90c63d7d67883fc0" diff --git a/meta-openembedded/meta-oe/recipes-gnome/libxmlb/libxmlb_0.3.2.bb b/meta-openembedded/meta-oe/recipes-gnome/libxmlb/libxmlb_0.3.3.bb index cacb493a1d..0ebd653fe8 100644 --- a/meta-openembedded/meta-oe/recipes-gnome/libxmlb/libxmlb_0.3.2.bb +++ b/meta-openembedded/meta-oe/recipes-gnome/libxmlb/libxmlb_0.3.3.bb @@ -2,11 +2,10 @@ SUMMARY = "A library to help create and query binary XML blobs" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://LICENSE;md5=1803fa9c2c3ce8cb06b4861d75310742" -SRC_URI = "\ - git://github.com/hughsie/libxmlb.git \ - file://run-ptest \ -" -SRCREV = "994fd0ec3d28da82b5965949a9d925510f603562" +SRC_URI = "git://github.com/hughsie/libxmlb.git;branch=main \ + file://run-ptest \ + " +SRCREV = "5108556a17bb1c2863c2ca5df088143ea65474a3" S = "${WORKDIR}/git" inherit gobject-introspection gtk-doc meson ptest-gnome diff --git a/meta-openembedded/meta-oe/recipes-graphics/leptonica/leptonica_1.80.0.bb b/meta-openembedded/meta-oe/recipes-graphics/leptonica/leptonica_1.82.0.bb index a861bba5b8..c0a2b45a48 100644 --- a/meta-openembedded/meta-oe/recipes-graphics/leptonica/leptonica_1.80.0.bb +++ b/meta-openembedded/meta-oe/recipes-graphics/leptonica/leptonica_1.82.0.bb @@ -6,8 +6,7 @@ LIC_FILES_CHKSUM = "file://leptonica-license.txt;md5=809b282cea2df68975fbe0ffe02 UPSTREAM_CHECK_URI = "https://github.com/DanBloomberg/leptonica/releases" SRC_URI = "http://www.leptonica.org/source/leptonica-${PV}.tar.gz" -SRC_URI[md5sum] = "d640d684234442a84c9e8902f0b3ff36" -SRC_URI[sha256sum] = "ec9c46c2aefbb960fb6a6b7f800fe39de48343437b6ce08e30a8d9688ed14ba4" +SRC_URI[sha256sum] = "155302ee914668c27b6fe3ca9ff2da63b245f6d62f3061c8f27563774b8ae2d6" EXTRA_OECONF += " \ --without-libwebp \ diff --git a/meta-openembedded/meta-oe/recipes-graphics/lvgl/lv-drivers_7.11.0.bb b/meta-openembedded/meta-oe/recipes-graphics/lvgl/lv-drivers_7.11.0.bb new file mode 100644 index 0000000000..a7478d4d5b --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-graphics/lvgl/lv-drivers_7.11.0.bb @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# SPDX-License-Identifier: MIT + +# TODO: Pin upstream release (current v7.11.0-80-g419a757) +src_org = "lvgl" +SRC_URI = "gitsm://github.com/${src_org}/lv_drivers;destsuffix=${S};protocol=https;nobranch=1" +SRCREV = "419a757c23aaa67c676fe3a2196d64808fcf2254" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d6fc0df890c5270ef045981b516bb8f2" + +HOMEPAGE = "https://docs.lvgl.io/latest/en/html/porting/index.html" +SUMMARY = "LVGL's Display and Touch pad drivers" +DESCRIPTION = "Collection of drivers: SDL, framebuffer, wayland and more..." + +DEPENDS += "libxkbcommon" +DEPENDS += "lvgl" +DEPENDS += "wayland" + +REQUIRED_DISTRO_FEATURES = "wayland" + +inherit cmake +inherit features_check + +S = "${WORKDIR}/${PN}-${PV}" + +EXTRA_OECMAKE += "-Dinstall:BOOL=ON" + +TARGET_CFLAGS += "-DLV_CONF_INCLUDE_SIMPLE=1" +TARGET_CFLAGS += "-I${RECIPE_SYSROOT}/${includedir}/lvgl" + + +do_configure:append() { + [ -r "${S}/lv_drv_conf.h" ] \ + || sed -e "s|#if 0 .*Set it to \"1\" to enable the content.*|#if 1 // Enabled by ${PN}|g" \ + -e "s|# define USE_WAYLAND 0|# define USE_WAYLAND 1|g" \ + < "${S}/lv_drv_conf_template.h" > "${S}/lv_drv_conf.h" +} + + +FILES:${PN}-dev = "\ + ${includedir}/lvgl/lv_drivers/ \ + " + +FILES:${PN}-staticdev = "${libdir}/" diff --git a/meta-openembedded/meta-oe/recipes-graphics/lvgl/lv-lib-png_8.0.2.bb b/meta-openembedded/meta-oe/recipes-graphics/lvgl/lv-lib-png_8.0.2.bb new file mode 100644 index 0000000000..084070c436 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-graphics/lvgl/lv-lib-png_8.0.2.bb @@ -0,0 +1,30 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# SPDX-License-Identifier: MIT + +src_org = "lvgl" +SRC_URI = "gitsm://github.com/${src_org}/lv_lib_png;destsuffix=${S};protocol=https;nobranch=1" +SRCREV = "bf1531afe07c9f861107559e29ab8a2d83e4715a" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d6fc0df890c5270ef045981b516bb8f2" + +HOMEPAGE = "https://docs.lvgl.io" +SUMMARY = "PNG decoder for LVGL" +DESCRIPTION = "Allow the use of PNG images in LVGL. This implementation uses lodepng" + +# because of lvgl dependency +REQUIRED_DISTRO_FEATURES = "wayland" + +DEPENDS += "lvgl" + +inherit cmake +inherit features_check + +TARGET_CFLAGS += "-DLV_CONF_INCLUDE_SIMPLE=1" +TARGET_CFLAGS += "-I${RECIPE_SYSROOT}/${includedir}/lvgl" + +FILES:${PN}-dev = "\ + ${includedir}/lvgl/lv_lib_png/ \ + " + +FILES:${PN}-staticdev = "${libdir}/" diff --git a/meta-openembedded/meta-oe/recipes-graphics/lvgl/lvgl_8.0.3.bb b/meta-openembedded/meta-oe/recipes-graphics/lvgl/lvgl_8.0.3.bb new file mode 100644 index 0000000000..2ca7f60e85 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-graphics/lvgl/lvgl_8.0.3.bb @@ -0,0 +1,33 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: MIT + +HOMEPAGE = "https://lvgl.io/" +DESCRIPTION = "LVGL is an OSS graphics library to create embedded GUI" +SUMMARY = "Light and Versatile Graphics Library" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a" + +# TODO: Pin upstream release (current is v8.0.3-dev-239-g7b7bed37d) +SRC_URI = "gitsm://github.com/lvgl/lvgl;destsuffix=${S};protocol=https;nobranch=1" +SRCREV = "7b7bed37d3e937c59ec99fccba58774fbf9f1930" + +REQUIRED_DISTRO_FEATURES = "wayland" + +inherit cmake +inherit features_check + +S = "${WORKDIR}/${PN}-${PV}" + +EXTRA_OECMAKE += "-Dinstall:BOOL=ON" + +do_configure:prepend() { + [ -r "${S}/lv_conf.h" ] \ + || sed -e "s|#if 0 /*Set it to \"1\" to enable the content*/|#if 1 // Enabled by ${PN}|g" \ + < "${S}/lv_conf_template.h" > "${S}/lv_conf.h" +} + +FILES:${PN}-dev += "\ + ${includedir}/${PN}/ \ + ${includedir}/${PN}/lvgl/ \ + " diff --git a/meta-openembedded/meta-oe/recipes-graphics/surf/surf/0001-config.ml-make-compatible-with-webkitgtk-2.34.0.patch b/meta-openembedded/meta-oe/recipes-graphics/surf/surf/0001-config.ml-make-compatible-with-webkitgtk-2.34.0.patch new file mode 100644 index 0000000000..2fb44eb0e7 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-graphics/surf/surf/0001-config.ml-make-compatible-with-webkitgtk-2.34.0.patch @@ -0,0 +1,32 @@ +From 0cd38e6dbcaff7eef39fd46a60ff8a47e5f488c4 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Sun, 3 Oct 2021 23:08:48 +0200 +Subject: [PATCH] config.ml: make compatible with webkitgtk 2.34.0 + +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + config.mk | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/config.mk b/config.mk +index 032bf9f..850afbf 100644 +--- a/config.mk ++++ b/config.mk +@@ -12,10 +12,10 @@ LIBDIR = $(LIBPREFIX)/surf + X11INC = `pkg-config --cflags x11` + X11LIB = `pkg-config --libs x11` + +-GTKINC = `pkg-config --cflags gtk+-3.0 gcr-3 webkit2gtk-4.0` +-GTKLIB = `pkg-config --libs gtk+-3.0 gcr-3 webkit2gtk-4.0` +-WEBEXTINC = `pkg-config --cflags webkit2gtk-4.0 webkit2gtk-web-extension-4.0 gio-2.0` +-WEBEXTLIBS = `pkg-config --libs webkit2gtk-4.0 webkit2gtk-web-extension-4.0 gio-2.0` ++GTKINC = `pkg-config --cflags gtk+-3.0 gcr-3 webkit2gtk-4.1` ++GTKLIB = `pkg-config --libs gtk+-3.0 gcr-3 webkit2gtk-4.1` ++WEBEXTINC = `pkg-config --cflags webkit2gtk-4.1 webkit2gtk-web-extension-4.1 gio-2.0` ++WEBEXTLIBS = `pkg-config --libs webkit2gtk-4.1 webkit2gtk-web-extension-4.1 gio-2.0` + + # includes and libs + INCS = $(X11INC) $(GTKINC) +-- +2.20.1 + diff --git a/meta-openembedded/meta-oe/recipes-graphics/surf/surf_2.1.bb b/meta-openembedded/meta-oe/recipes-graphics/surf/surf_2.1.bb index 307ee9b981..710ed9bce9 100644 --- a/meta-openembedded/meta-oe/recipes-graphics/surf/surf_2.1.bb +++ b/meta-openembedded/meta-oe/recipes-graphics/surf/surf_2.1.bb @@ -11,7 +11,8 @@ REQUIRED_DISTRO_FEATURES = "x11 opengl" SRC_URI = "git://git.suckless.org/surf;branch=surf-webkit2 \ file://0001-config.mk-Fix-compiler-and-linker.patch \ -" + file://0001-config.ml-make-compatible-with-webkitgtk-2.34.0.patch \ + " SRCREV = "bcd7d74e613fb8af11b40c351f0a6c1a771b2d2b" S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-abyssinica_2.000.bb b/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-abyssinica_2.100.bb index 29a1f6ba75..bce37a2e05 100644 --- a/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-abyssinica_2.000.bb +++ b/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-abyssinica_2.100.bb @@ -3,13 +3,13 @@ require ttf.inc SUMMARY = "Ethiopia and Eritrea (Amharic) font - TTF Edition" HOMEPAGE = "http://software.sil.org/abyssinica/" LICENSE = "OFL-1.1" -LIC_FILES_CHKSUM = "file://OFL.txt;md5=80cc8cdcdc3f8ce96957bbac946b70ae" +LIC_FILES_CHKSUM = "file://OFL.txt;md5=fd664aaab50445c3c1c97544554a6bda" SRCNAME = "AbyssinicaSIL" SRC_URI = "http://software.sil.org/downloads/r/abyssinica/${SRCNAME}-${PV}.zip" S = "${WORKDIR}/${SRCNAME}-${PV}" -SRC_URI[sha256sum] = "274204a53b30f64cca662d78c7199e3c0325ea95ad4109886b47af734c92d0f9" +SRC_URI[sha256sum] = "1a1fc8e82f0c0f2e824f42bff05c1f4a0356330a89dc7ba798c1a20bc3e333e0" FONT_PACKAGES = "${PN}" FILES:${PN} = "${datadir}" diff --git a/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-dejavu_2.37.bb b/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-dejavu_2.37.bb index 0de4996660..b02dbbdaaf 100644 --- a/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-dejavu_2.37.bb +++ b/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-dejavu_2.37.bb @@ -20,6 +20,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/dejavu/dejavu-fonts-ttf-${PV}.tar.bz2 \ S = "${WORKDIR}/dejavu-fonts-ttf-${PV}/ttf" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/dejavu/files/dejavu/" + do_install:append () { install -d ${D}${sysconfdir}/fonts/conf.d/ install -m 0644 ${WORKDIR}/30-dejavu-aliases.conf ${D}${sysconfdir}/fonts/conf.d/ diff --git a/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-vlgothic_20141206.bb b/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-vlgothic_20200720.bb index aa4a377234..a386bb850f 100644 --- a/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-vlgothic_20141206.bb +++ b/meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-vlgothic_20200720.bb @@ -5,14 +5,13 @@ AUTHOR = "Contributor: noonov <noonov@gmail.com>" HOMEPAGE = "http://vlgothic.dicey.org/" LICENSE = "ttf-mplus & BSD" -LIC_FILES_CHKSUM = "file://LICENSE.en;md5=66ecd0fd7e4da6246fa30317c7b66755 \ +LIC_FILES_CHKSUM = "file://LICENSE.en;md5=cc06b20e7a20bdf6c989624405378303 \ file://LICENSE_E.mplus;md5=1c4767416f20215f1e61b970f2117db9 \ " SRC_URI = "https://osdn.jp/dl/vlgothic/VLGothic-${PV}.tar.xz" -SRC_URI[md5sum] = "bb7fadb2dff09a4fb6a11dc9dfdc0c36" -SRC_URI[sha256sum] = "982040db2f9cb73d7c6ab7d9d163f2ed46d1180f330c9ba2fae303649bf8102d" +SRC_URI[sha256sum] = "297a3813675fbea12c5813b55a78091c9a5946515ecbf9fde8b8102e01c579f4" S = "${WORKDIR}/VLGothic" diff --git a/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_0.5.bb b/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_0.5.0.bb index 7ce7234528..7ce7234528 100644 --- a/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_0.5.bb +++ b/meta-openembedded/meta-oe/recipes-kernel/libbpf/libbpf_0.5.0.bb diff --git a/meta-openembedded/meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+0.93+1.bb b/meta-openembedded/meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+2.0.1.bb index d6b898c188..441defea43 100644 --- a/meta-openembedded/meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+0.93+1.bb +++ b/meta-openembedded/meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+2.0.1.bb @@ -1,13 +1,13 @@ SUMMARY = "library to read digital audio CDs with error correction" HOMEPAGE = "http://www.gnu.org/software/libcdio/" +BUGTRUCKER = "https://github.com/rocky/libcdio-paranoia/issues/" SECTION = "libs" LICENSE = "GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" DEPENDS = "libcdio" SRC_URI = "${GNU_MIRROR}/libcdio/${BP}.tar.bz2" -SRC_URI[md5sum] = "0255aa50e660db7f2c39658b9c565814" -SRC_URI[sha256sum] = "ec1d9b1d5a28cc042f2cb33a7cc0a2b5ce5525f102bc4c15db1fac322559a493" +SRC_URI[sha256sum] = "33b1cf305ccfbfd03b43936975615000ce538b119989c4bec469577570b60e8a" inherit autotools pkgconfig diff --git a/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/yavta/0001-Add-stdout-mode-to-allow-streaming-over-the-network-.patch b/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/yavta/0001-Add-stdout-mode-to-allow-streaming-over-the-network-.patch deleted file mode 100644 index 41a5dbf4fd..0000000000 --- a/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/yavta/0001-Add-stdout-mode-to-allow-streaming-over-the-network-.patch +++ /dev/null @@ -1,961 +0,0 @@ -From 141d3b3593722eb3d588e7c4b1542f810bc25853 Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@dominion.thruhere.net> -Date: Thu, 5 Jun 2014 11:29:20 -0500 -Subject: [PATCH] Add stdout mode to allow streaming over the network with nc - -Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> -Signed-off-by: Chase Maupin <Chase.Maupin@ti.com> ---- - yavta.c | 315 ++++++++++++++++++++++++++++++++++----------------------------- - 1 file changed, 169 insertions(+), 146 deletions(-) - -diff --git a/yavta.c b/yavta.c -index 32adc26..b398da0 100644 ---- a/yavta.c -+++ b/yavta.c -@@ -309,7 +309,7 @@ static bool video_has_fd(struct device *dev) - static int video_set_fd(struct device *dev, int fd) - { - if (video_has_fd(dev)) { -- printf("Can't set fd (already open).\n"); -+ fprintf(stderr, "Can't set fd (already open).\n"); - return -1; - } - -@@ -321,18 +321,18 @@ static int video_set_fd(struct device *dev, int fd) - static int video_open(struct device *dev, const char *devname) - { - if (video_has_fd(dev)) { -- printf("Can't open device (already open).\n"); -+ fprintf(stderr, "Can't open device (already open).\n"); - return -1; - } - - dev->fd = open(devname, O_RDWR); - if (dev->fd < 0) { -- printf("Error opening device %s: %s (%d).\n", devname, -+ fprintf(stderr, "Error opening device %s: %s (%d).\n", devname, - strerror(errno), errno); - return dev->fd; - } - -- printf("Device %s opened.\n", devname); -+ fprintf(stderr, "Device %s opened.\n", devname); - - dev->opened = 1; - -@@ -352,7 +352,7 @@ static int video_querycap(struct device *dev, unsigned int *capabilities) - *capabilities = cap.capabilities & V4L2_CAP_DEVICE_CAPS - ? cap.device_caps : cap.capabilities; - -- printf("Device `%s' on `%s' is a video %s (%s mplanes) device.\n", -+ fprintf(stderr, "Device `%s' on `%s' is a video %s (%s mplanes) device.\n", - cap.card, cap.bus_info, - video_is_capture(dev) ? "capture" : "output", - video_is_mplane(dev) ? "with" : "without"); -@@ -370,7 +370,7 @@ static int cap_get_buf_type(unsigned int capabilities) - } else if (capabilities & V4L2_CAP_VIDEO_OUTPUT) { - return V4L2_BUF_TYPE_VIDEO_OUTPUT; - } else { -- printf("Device supports neither capture nor output.\n"); -+ fprintf(stderr, "Device supports neither capture nor output.\n"); - return -EINVAL; - } - -@@ -440,7 +440,7 @@ static int get_control(struct device *dev, unsigned int id, int type, - } - } - -- printf("unable to get control 0x%8.8x: %s (%d).\n", -+ fprintf(stderr, "unable to get control 0x%8.8x: %s (%d).\n", - id, strerror(errno), errno); - return -1; - } -@@ -484,12 +484,12 @@ static void set_control(struct device *dev, unsigned int id, int type, - val = old.value; - } - if (ret == -1) { -- printf("unable to set control 0x%8.8x: %s (%d).\n", -+ fprintf(stderr, "unable to set control 0x%8.8x: %s (%d).\n", - id, strerror(errno), errno); - return; - } - -- printf("Control 0x%08x set to %" PRId64 ", is %" PRId64 "\n", -+ fprintf(stderr, "Control 0x%08x set to %" PRId64 ", is %" PRId64 "\n", - id, old_val, val); - } - -@@ -504,7 +504,7 @@ static int video_get_format(struct device *dev) - - ret = ioctl(dev->fd, VIDIOC_G_FMT, &fmt); - if (ret < 0) { -- printf("Unable to get format: %s (%d).\n", strerror(errno), -+ fprintf(stderr, "Unable to get format: %s (%d).\n", strerror(errno), - errno); - return ret; - } -@@ -514,7 +514,7 @@ static int video_get_format(struct device *dev) - dev->height = fmt.fmt.pix_mp.height; - dev->num_planes = fmt.fmt.pix_mp.num_planes; - -- printf("Video format: %s (%08x) %ux%u field %s, %u planes: \n", -+ fprintf(stderr, "Video format: %s (%08x) %ux%u field %s, %u planes: \n", - v4l2_format_name(fmt.fmt.pix_mp.pixelformat), fmt.fmt.pix_mp.pixelformat, - fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height, - v4l2_field_name(fmt.fmt.pix_mp.field), -@@ -527,7 +527,7 @@ static int video_get_format(struct device *dev) - fmt.fmt.pix_mp.plane_fmt[i].bytesperline ? - fmt.fmt.pix_mp.plane_fmt[i].sizeimage : 0; - -- printf(" * Stride %u, buffer size %u\n", -+ fprintf(stderr, " * Stride %u, buffer size %u\n", - fmt.fmt.pix_mp.plane_fmt[i].bytesperline, - fmt.fmt.pix_mp.plane_fmt[i].sizeimage); - } -@@ -539,7 +539,7 @@ static int video_get_format(struct device *dev) - dev->plane_fmt[0].bytesperline = fmt.fmt.pix.bytesperline; - dev->plane_fmt[0].sizeimage = fmt.fmt.pix.bytesperline ? fmt.fmt.pix.sizeimage : 0; - -- printf("Video format: %s (%08x) %ux%u (stride %u) field %s buffer size %u\n", -+ fprintf(stderr, "Video format: %s (%08x) %ux%u (stride %u) field %s buffer size %u\n", - v4l2_format_name(fmt.fmt.pix.pixelformat), fmt.fmt.pix.pixelformat, - fmt.fmt.pix.width, fmt.fmt.pix.height, fmt.fmt.pix.bytesperline, - v4l2_field_name(fmt.fmt.pix_mp.field), -@@ -581,25 +581,25 @@ static int video_set_format(struct device *dev, unsigned int w, unsigned int h, - - ret = ioctl(dev->fd, VIDIOC_S_FMT, &fmt); - if (ret < 0) { -- printf("Unable to set format: %s (%d).\n", strerror(errno), -+ fprintf(stderr, "Unable to set format: %s (%d).\n", strerror(errno), - errno); - return ret; - } - - if (video_is_mplane(dev)) { -- printf("Video format set: %s (%08x) %ux%u field %s, %u planes: \n", -+ fprintf(stderr, "Video format set: %s (%08x) %ux%u field %s, %u planes: \n", - v4l2_format_name(fmt.fmt.pix_mp.pixelformat), fmt.fmt.pix_mp.pixelformat, - fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height, - v4l2_field_name(fmt.fmt.pix_mp.field), - fmt.fmt.pix_mp.num_planes); - - for (i = 0; i < fmt.fmt.pix_mp.num_planes; i++) { -- printf(" * Stride %u, buffer size %u\n", -+ fprintf(stderr, " * Stride %u, buffer size %u\n", - fmt.fmt.pix_mp.plane_fmt[i].bytesperline, - fmt.fmt.pix_mp.plane_fmt[i].sizeimage); - } - } else { -- printf("Video format set: %s (%08x) %ux%u (stride %u) field %s buffer size %u\n", -+ fprintf(stderr, "Video format set: %s (%08x) %ux%u (stride %u) field %s buffer size %u\n", - v4l2_format_name(fmt.fmt.pix.pixelformat), fmt.fmt.pix.pixelformat, - fmt.fmt.pix.width, fmt.fmt.pix.height, fmt.fmt.pix.bytesperline, - v4l2_field_name(fmt.fmt.pix.field), -@@ -619,16 +619,16 @@ static int video_set_framerate(struct device *dev, struct v4l2_fract *time_per_f - - ret = ioctl(dev->fd, VIDIOC_G_PARM, &parm); - if (ret < 0) { -- printf("Unable to get frame rate: %s (%d).\n", -+ fprintf(stderr, "Unable to get frame rate: %s (%d).\n", - strerror(errno), errno); - return ret; - } - -- printf("Current frame rate: %u/%u\n", -+ fprintf(stderr, "Current frame rate: %u/%u\n", - parm.parm.capture.timeperframe.numerator, - parm.parm.capture.timeperframe.denominator); - -- printf("Setting frame rate to: %u/%u\n", -+ fprintf(stderr, "Setting frame rate to: %u/%u\n", - time_per_frame->numerator, - time_per_frame->denominator); - -@@ -637,19 +637,19 @@ static int video_set_framerate(struct device *dev, struct v4l2_fract *time_per_f - - ret = ioctl(dev->fd, VIDIOC_S_PARM, &parm); - if (ret < 0) { -- printf("Unable to set frame rate: %s (%d).\n", strerror(errno), -+ fprintf(stderr, "Unable to set frame rate: %s (%d).\n", strerror(errno), - errno); - return ret; - } - - ret = ioctl(dev->fd, VIDIOC_G_PARM, &parm); - if (ret < 0) { -- printf("Unable to get frame rate: %s (%d).\n", strerror(errno), -+ fprintf(stderr, "Unable to get frame rate: %s (%d).\n", strerror(errno), - errno); - return ret; - } - -- printf("Frame rate set: %u/%u\n", -+ fprintf(stderr, "Frame rate set: %u/%u\n", - parm.parm.capture.timeperframe.numerator, - parm.parm.capture.timeperframe.denominator); - return 0; -@@ -674,7 +674,7 @@ static int video_buffer_mmap(struct device *dev, struct buffer *buffer, - buffer->mem[i] = mmap(0, length, PROT_READ | PROT_WRITE, MAP_SHARED, - dev->fd, offset); - if (buffer->mem[i] == MAP_FAILED) { -- printf("Unable to map buffer %u/%u: %s (%d)\n", -+ fprintf(stderr, "Unable to map buffer %u/%u: %s (%d)\n", - buffer->idx, i, strerror(errno), errno); - return -1; - } -@@ -682,7 +682,7 @@ static int video_buffer_mmap(struct device *dev, struct buffer *buffer, - buffer->size[i] = length; - buffer->padding[i] = 0; - -- printf("Buffer %u/%u mapped at address %p.\n", -+ fprintf(stderr, "Buffer %u/%u mapped at address %p.\n", - buffer->idx, i, buffer->mem[i]); - } - -@@ -697,7 +697,7 @@ static int video_buffer_munmap(struct device *dev, struct buffer *buffer) - for (i = 0; i < dev->num_planes; i++) { - ret = munmap(buffer->mem[i], buffer->size[i]); - if (ret < 0) { -- printf("Unable to unmap buffer %u/%u: %s (%d)\n", -+ fprintf(stderr, "Unable to unmap buffer %u/%u: %s (%d)\n", - buffer->idx, i, strerror(errno), errno); - } - -@@ -725,7 +725,7 @@ static int video_buffer_alloc_userptr(struct device *dev, struct buffer *buffer, - ret = posix_memalign(&buffer->mem[i], page_size, - length + offset + padding); - if (ret < 0) { -- printf("Unable to allocate buffer %u/%u (%d)\n", -+ fprintf(stderr, "Unable to allocate buffer %u/%u (%d)\n", - buffer->idx, i, ret); - return -ENOMEM; - } -@@ -734,7 +734,7 @@ static int video_buffer_alloc_userptr(struct device *dev, struct buffer *buffer, - buffer->size[i] = length; - buffer->padding[i] = padding; - -- printf("Buffer %u/%u allocated at address %p.\n", -+ fprintf(stderr, "Buffer %u/%u allocated at address %p.\n", - buffer->idx, i, buffer->mem[i]); - } - -@@ -809,12 +809,12 @@ static int video_alloc_buffers(struct device *dev, int nbufs, - - ret = ioctl(dev->fd, VIDIOC_REQBUFS, &rb); - if (ret < 0) { -- printf("Unable to request buffers: %s (%d).\n", strerror(errno), -+ fprintf(stderr, "Unable to request buffers: %s (%d).\n", strerror(errno), - errno); - return ret; - } - -- printf("%u buffers requested.\n", rb.count); -+ fprintf(stderr, "%u buffers requested.\n", rb.count); - - buffers = malloc(rb.count * sizeof buffers[0]); - if (buffers == NULL) -@@ -835,12 +835,12 @@ static int video_alloc_buffers(struct device *dev, int nbufs, - - ret = ioctl(dev->fd, VIDIOC_QUERYBUF, &buf); - if (ret < 0) { -- printf("Unable to query buffer %u: %s (%d).\n", i, -+ fprintf(stderr, "Unable to query buffer %u: %s (%d).\n", i, - strerror(errno), errno); - return ret; - } - get_ts_flags(buf.flags, &ts_type, &ts_source); -- printf("length: %u offset: %u timestamp type/source: %s/%s\n", -+ fprintf(stderr, "length: %u offset: %u timestamp type/source: %s/%s\n", - buf.length, buf.m.offset, ts_type, ts_source); - - buffers[i].idx = i; -@@ -899,12 +899,12 @@ static int video_free_buffers(struct device *dev) - - ret = ioctl(dev->fd, VIDIOC_REQBUFS, &rb); - if (ret < 0) { -- printf("Unable to release buffers: %s (%d).\n", -+ fprintf(stderr, "Unable to release buffers: %s (%d).\n", - strerror(errno), errno); - return ret; - } - -- printf("%u buffers released.\n", dev->nbufs); -+ fprintf(stderr, "%u buffers released.\n", dev->nbufs); - - free(dev->buffers); - dev->nbufs = 0; -@@ -974,7 +974,7 @@ static int video_queue_buffer(struct device *dev, int index, enum buffer_fill_mo - - ret = ioctl(dev->fd, VIDIOC_QBUF, &buf); - if (ret < 0) -- printf("Unable to queue buffer: %s (%d).\n", -+ fprintf(stderr, "Unable to queue buffer: %s (%d).\n", - strerror(errno), errno); - - return ret; -@@ -987,7 +987,7 @@ static int video_enable(struct device *dev, int enable) - - ret = ioctl(dev->fd, enable ? VIDIOC_STREAMON : VIDIOC_STREAMOFF, &type); - if (ret < 0) { -- printf("Unable to %s streaming: %s (%d).\n", -+ fprintf(stderr, "Unable to %s streaming: %s (%d).\n", - enable ? "start" : "stop", strerror(errno), errno); - return ret; - } -@@ -1009,10 +1009,10 @@ static void video_query_menu(struct device *dev, struct v4l2_queryctrl *query, - continue; - - if (query->type == V4L2_CTRL_TYPE_MENU) -- printf(" %u: %.32s%s\n", menu.index, menu.name, -+ fprintf(stderr, " %u: %.32s%s\n", menu.index, menu.name, - menu.index == value ? " (*)" : ""); - else -- printf(" %u: %lld%s\n", menu.index, menu.value, -+ fprintf(stderr, " %u: %lld%s\n", menu.index, menu.value, - menu.index == value ? " (*)" : ""); - }; - } -@@ -1043,7 +1043,7 @@ static void video_list_controls(struct device *dev) - continue; - - if (query.type == V4L2_CTRL_TYPE_CTRL_CLASS) { -- printf("--- %s (class 0x%08x) ---\n", query.name, query.id); -+ fprintf(stderr, "--- %s (class 0x%08x) ---\n", query.name, query.id); - continue; - } - -@@ -1053,7 +1053,7 @@ static void video_list_controls(struct device *dev) - else - sprintf(value, "%" PRId64, val64); - -- printf("control 0x%08x `%s' min %d max %d step %d default %d current %s.\n", -+ fprintf(stderr, "control 0x%08x `%s' min %d max %d step %d default %d current %s.\n", - query.id, query.name, query.minimum, query.maximum, - query.step, query.default_value, value); - -@@ -1065,9 +1065,9 @@ static void video_list_controls(struct device *dev) - } - - if (nctrls) -- printf("%u control%s found.\n", nctrls, nctrls > 1 ? "s" : ""); -+ fprintf(stderr, "%u control%s found.\n", nctrls, nctrls > 1 ? "s" : ""); - else -- printf("No control found.\n"); -+ fprintf(stderr, "No control found.\n"); - } - - static void video_enum_frame_intervals(struct device *dev, __u32 pixelformat, -@@ -1088,30 +1088,30 @@ static void video_enum_frame_intervals(struct device *dev, __u32 pixelformat, - break; - - if (i != ival.index) -- printf("Warning: driver returned wrong ival index " -+ fprintf(stderr, "Warning: driver returned wrong ival index " - "%u.\n", ival.index); - if (pixelformat != ival.pixel_format) -- printf("Warning: driver returned wrong ival pixel " -+ fprintf(stderr, "Warning: driver returned wrong ival pixel " - "format %08x.\n", ival.pixel_format); - if (width != ival.width) -- printf("Warning: driver returned wrong ival width " -+ fprintf(stderr, "Warning: driver returned wrong ival width " - "%u.\n", ival.width); - if (height != ival.height) -- printf("Warning: driver returned wrong ival height " -+ fprintf(stderr, "Warning: driver returned wrong ival height " - "%u.\n", ival.height); - - if (i != 0) -- printf(", "); -+ fprintf(stderr, ", "); - - switch (ival.type) { - case V4L2_FRMIVAL_TYPE_DISCRETE: -- printf("%u/%u", -+ fprintf(stderr, "%u/%u", - ival.discrete.numerator, - ival.discrete.denominator); - break; - - case V4L2_FRMIVAL_TYPE_CONTINUOUS: -- printf("%u/%u - %u/%u", -+ fprintf(stderr, "%u/%u - %u/%u", - ival.stepwise.min.numerator, - ival.stepwise.min.denominator, - ival.stepwise.max.numerator, -@@ -1119,7 +1119,7 @@ static void video_enum_frame_intervals(struct device *dev, __u32 pixelformat, - return; - - case V4L2_FRMIVAL_TYPE_STEPWISE: -- printf("%u/%u - %u/%u (by %u/%u)", -+ fprintf(stderr, "%u/%u - %u/%u (by %u/%u)", - ival.stepwise.min.numerator, - ival.stepwise.min.denominator, - ival.stepwise.max.numerator, -@@ -1149,23 +1149,23 @@ static void video_enum_frame_sizes(struct device *dev, __u32 pixelformat) - break; - - if (i != frame.index) -- printf("Warning: driver returned wrong frame index " -+ fprintf(stderr, "Warning: driver returned wrong frame index " - "%u.\n", frame.index); - if (pixelformat != frame.pixel_format) -- printf("Warning: driver returned wrong frame pixel " -+ fprintf(stderr, "Warning: driver returned wrong frame pixel " - "format %08x.\n", frame.pixel_format); - - switch (frame.type) { - case V4L2_FRMSIZE_TYPE_DISCRETE: -- printf("\tFrame size: %ux%u (", frame.discrete.width, -+ fprintf(stderr, "\tFrame size: %ux%u (", frame.discrete.width, - frame.discrete.height); - video_enum_frame_intervals(dev, frame.pixel_format, - frame.discrete.width, frame.discrete.height); -- printf(")\n"); -+ fprintf(stderr, ")\n"); - break; - - case V4L2_FRMSIZE_TYPE_CONTINUOUS: -- printf("\tFrame size: %ux%u - %ux%u (", -+ fprintf(stderr, "\tFrame size: %ux%u - %ux%u (", - frame.stepwise.min_width, - frame.stepwise.min_height, - frame.stepwise.max_width, -@@ -1173,11 +1173,11 @@ static void video_enum_frame_sizes(struct device *dev, __u32 pixelformat) - video_enum_frame_intervals(dev, frame.pixel_format, - frame.stepwise.max_width, - frame.stepwise.max_height); -- printf(")\n"); -+ fprintf(stderr, ")\n"); - break; - - case V4L2_FRMSIZE_TYPE_STEPWISE: -- printf("\tFrame size: %ux%u - %ux%u (by %ux%u) (\n", -+ fprintf(stderr, "\tFrame size: %ux%u - %ux%u (by %ux%u) (\n", - frame.stepwise.min_width, - frame.stepwise.min_height, - frame.stepwise.max_width, -@@ -1187,7 +1187,7 @@ static void video_enum_frame_sizes(struct device *dev, __u32 pixelformat) - video_enum_frame_intervals(dev, frame.pixel_format, - frame.stepwise.max_width, - frame.stepwise.max_height); -- printf(")\n"); -+ fprintf(stderr, ")\n"); - break; - - default: -@@ -1211,19 +1211,19 @@ static void video_enum_formats(struct device *dev, enum v4l2_buf_type type) - break; - - if (i != fmt.index) -- printf("Warning: driver returned wrong format index " -+ fprintf(stderr, "Warning: driver returned wrong format index " - "%u.\n", fmt.index); - if (type != fmt.type) -- printf("Warning: driver returned wrong format type " -+ fprintf(stderr, "Warning: driver returned wrong format type " - "%u.\n", fmt.type); - -- printf("\tFormat %u: %s (%08x)\n", i, -+ fprintf(stderr, "\tFormat %u: %s (%08x)\n", i, - v4l2_format_name(fmt.pixelformat), fmt.pixelformat); -- printf("\tType: %s (%u)\n", v4l2_buf_type_name(fmt.type), -+ fprintf(stderr, "\tType: %s (%u)\n", v4l2_buf_type_name(fmt.type), - fmt.type); -- printf("\tName: %.32s\n", fmt.description); -+ fprintf(stderr, "\tName: %.32s\n", fmt.description); - video_enum_frame_sizes(dev, fmt.pixelformat); -- printf("\n"); -+ fprintf(stderr, "\n"); - } - } - -@@ -1241,13 +1241,13 @@ static void video_enum_inputs(struct device *dev) - break; - - if (i != input.index) -- printf("Warning: driver returned wrong input index " -+ fprintf(stderr, "Warning: driver returned wrong input index " - "%u.\n", input.index); - -- printf("\tInput %u: %s.\n", i, input.name); -+ fprintf(stderr, "\tInput %u: %s.\n", i, input.name); - } - -- printf("\n"); -+ fprintf(stderr, "\n"); - } - - static int video_get_input(struct device *dev) -@@ -1257,7 +1257,7 @@ static int video_get_input(struct device *dev) - - ret = ioctl(dev->fd, VIDIOC_G_INPUT, &input); - if (ret < 0) { -- printf("Unable to get current input: %s (%d).\n", -+ fprintf(stderr, "Unable to get current input: %s (%d).\n", - strerror(errno), errno); - return ret; - } -@@ -1272,7 +1272,7 @@ static int video_set_input(struct device *dev, unsigned int input) - - ret = ioctl(dev->fd, VIDIOC_S_INPUT, &_input); - if (ret < 0) -- printf("Unable to select input %u: %s (%d).\n", input, -+ fprintf(stderr, "Unable to select input %u: %s (%d).\n", input, - strerror(errno), errno); - - return ret; -@@ -1291,14 +1291,14 @@ static int video_set_quality(struct device *dev, unsigned int quality) - - ret = ioctl(dev->fd, VIDIOC_S_JPEGCOMP, &jpeg); - if (ret < 0) { -- printf("Unable to set quality to %u: %s (%d).\n", quality, -+ fprintf(stderr, "Unable to set quality to %u: %s (%d).\n", quality, - strerror(errno), errno); - return ret; - } - - ret = ioctl(dev->fd, VIDIOC_G_JPEGCOMP, &jpeg); - if (ret >= 0) -- printf("Quality set to %u\n", jpeg.quality); -+ fprintf(stderr, "Quality set to %u\n", jpeg.quality); - - return 0; - } -@@ -1313,7 +1313,7 @@ static int video_load_test_pattern(struct device *dev, const char *filename) - if (filename != NULL) { - fd = open(filename, O_RDONLY); - if (fd == -1) { -- printf("Unable to open test pattern file '%s': %s (%d).\n", -+ fprintf(stderr, "Unable to open test pattern file '%s': %s (%d).\n", - filename, strerror(errno), errno); - return -errno; - } -@@ -1331,7 +1331,7 @@ static int video_load_test_pattern(struct device *dev, const char *filename) - if (filename != NULL) { - ret = read(fd, dev->pattern[plane], size); - if (ret != (int)size && dev->plane_fmt[plane].bytesperline != 0) { -- printf("Test pattern file size %u doesn't match image size %u\n", -+ fprintf(stderr, "Test pattern file size %u doesn't match image size %u\n", - ret, size); - ret = -EINVAL; - goto done; -@@ -1341,7 +1341,7 @@ static int video_load_test_pattern(struct device *dev, const char *filename) - unsigned int i; - - if (dev->plane_fmt[plane].bytesperline == 0) { -- printf("Compressed format detected for plane %u and no test pattern filename given.\n" -+ fprintf(stderr, "Compressed format detected for plane %u and no test pattern filename given.\n" - "The test pattern can't be generated automatically.\n", plane); - ret = -EINVAL; - goto done; -@@ -1410,7 +1410,7 @@ static void video_verify_buffer(struct device *dev, struct v4l2_buffer *buf) - - if (dev->plane_fmt[plane].sizeimage && - dev->plane_fmt[plane].sizeimage != length) -- printf("Warning: bytes used %u != image size %u for plane %u\n", -+ fprintf(stderr, "Warning: bytes used %u != image size %u for plane %u\n", - length, dev->plane_fmt[plane].sizeimage, plane); - - if (buffer->padding[plane] == 0) -@@ -1424,16 +1424,16 @@ static void video_verify_buffer(struct device *dev, struct v4l2_buffer *buf) - } - - if (errors) { -- printf("Warning: %u bytes overwritten among %u first padding bytes for plane %u\n", -+ fprintf(stderr, "Warning: %u bytes overwritten among %u first padding bytes for plane %u\n", - errors, dirty, plane); - - dirty = (dirty + 15) & ~15; - dirty = dirty > 32 ? 32 : dirty; - - for (i = 0; i < dirty; ++i) { -- printf("%02x ", data[i]); -+ fprintf(stderr, "%02x ", data[i]); - if (i % 16 == 15) -- printf("\n"); -+ fprintf(stderr, "\n"); - } - } - } -@@ -1481,18 +1481,32 @@ static void video_save_image(struct device *dev, struct v4l2_buffer *buf, - - ret = write(fd, dev->buffers[buf->index].mem[i], length); - if (ret < 0) { -- printf("write error: %s (%d)\n", strerror(errno), errno); -+ fprintf(stderr, "write error: %s (%d)\n", strerror(errno), errno); - break; - } else if (ret != (int)length) -- printf("write error: only %d bytes written instead of %u\n", -+ fprintf(stderr, "write error: only %d bytes written instead of %u\n", - ret, length); - } - close(fd); - } - -+static void video_stdout_image(struct device *dev, struct v4l2_buffer *buf) -+{ -+ int ret; -+ -+ fprintf(stderr, "stdout"); -+ ret = fwrite(dev->buffers[buf->index].mem, buf->bytesused, 1, stdout); -+ -+ if (ret < 0) -+ fprintf(stderr, "write error: %s (%d)\n", strerror(errno), errno); -+ else if (ret != (int)buf->bytesused) -+ fprintf(stderr, "write error: only %d bytes written instead of %u\n", -+ ret, buf->bytesused); -+} -+ - static int video_do_capture(struct device *dev, unsigned int nframes, - unsigned int skip, unsigned int delay, const char *pattern, -- int do_requeue_last, enum buffer_fill_mode fill) -+ int do_requeue_last, enum buffer_fill_mode fill, int do_stdout) - { - struct v4l2_plane planes[VIDEO_MAX_PLANES]; - struct v4l2_buffer buf; -@@ -1529,7 +1543,7 @@ static int video_do_capture(struct device *dev, unsigned int nframes, - ret = ioctl(dev->fd, VIDIOC_DQBUF, &buf); - if (ret < 0) { - if (errno != EIO) { -- printf("Unable to dequeue buffer: %s (%d).\n", -+ fprintf(stderr, "Unable to dequeue buffer: %s (%d).\n", - strerror(errno), errno); - goto done; - } -@@ -1550,7 +1564,7 @@ static int video_do_capture(struct device *dev, unsigned int nframes, - - clock_gettime(CLOCK_MONOTONIC, &ts); - get_ts_flags(buf.flags, &ts_type, &ts_source); -- printf("%u (%u) [%c] %s %u %u B %ld.%06ld %ld.%06ld %.3f fps ts %s/%s\n", i, buf.index, -+ fprintf(stderr, "%u (%u) [%c] %s %u %u B %ld.%06ld %ld.%06ld %.3f fps ts %s/%s\n", i, buf.index, - (buf.flags & V4L2_BUF_FLAG_ERROR) ? 'E' : '-', - v4l2_field_name(buf.field), - buf.sequence, buf.bytesused, buf.timestamp.tv_sec, -@@ -1563,6 +1577,9 @@ static int video_do_capture(struct device *dev, unsigned int nframes, - if (video_is_capture(dev) && pattern && !skip) - video_save_image(dev, &buf, pattern, i); - -+ if (video_is_capture(dev) && do_stdout && !skip) -+ video_stdout_image(dev, &buf); -+ - if (skip) - --skip; - -@@ -1577,7 +1594,7 @@ static int video_do_capture(struct device *dev, unsigned int nframes, - - ret = video_queue_buffer(dev, buf.index, fill); - if (ret < 0) { -- printf("Unable to requeue buffer: %s (%d).\n", -+ fprintf(stderr, "Unable to requeue buffer: %s (%d).\n", - strerror(errno), errno); - goto done; - } -@@ -1587,7 +1604,7 @@ static int video_do_capture(struct device *dev, unsigned int nframes, - video_enable(dev, 0); - - if (nframes == 0) { -- printf("No frames captured.\n"); -+ fprintf(stderr, "No frames captured.\n"); - goto done; - } - -@@ -1604,7 +1621,7 @@ static int video_do_capture(struct device *dev, unsigned int nframes, - bps = size/(ts.tv_nsec/1000.0+1000000.0*ts.tv_sec)*1000000.0; - fps = i/(ts.tv_nsec/1000.0+1000000.0*ts.tv_sec)*1000000.0; - -- printf("Captured %u frames in %lu.%06lu seconds (%f fps, %f B/s).\n", -+ fprintf(stderr, "Captured %u frames in %lu.%06lu seconds (%f fps, %f B/s).\n", - i, ts.tv_sec, ts.tv_nsec/1000, fps, bps); - - done: -@@ -1616,42 +1633,42 @@ done: - - static void usage(const char *argv0) - { -- printf("Usage: %s [options] device\n", argv0); -- printf("Supported options:\n"); -- printf("-B, --buffer-type Buffer type (\"capture\", \"output\",\n"); -- printf(" \"capture-mplane\" or \"output-mplane\")\n"); -- printf("-c, --capture[=nframes] Capture frames\n"); -- printf("-C, --check-overrun Verify dequeued frames for buffer overrun\n"); -- printf("-d, --delay Delay (in ms) before requeuing buffers\n"); -- printf("-f, --format format Set the video format\n"); -- printf("-F, --file[=name] Read/write frames from/to disk\n"); -- printf("\tFor video capture devices, the first '#' character in the file name is\n"); -- printf("\texpanded to the frame sequence number. The default file name is\n"); -- printf("\t'frame-#.bin'.\n"); -- printf("-h, --help Show this help screen\n"); -- printf("-i, --input input Select the video input\n"); -- printf("-I, --fill-frames Fill frames with check pattern before queuing them\n"); -- printf("-l, --list-controls List available controls\n"); -- printf("-n, --nbufs n Set the number of video buffers\n"); -- printf("-p, --pause Pause before starting the video stream\n"); -- printf("-q, --quality n MJPEG quality (0-100)\n"); -- printf("-r, --get-control ctrl Get control 'ctrl'\n"); -- printf("-R, --realtime=[priority] Enable realtime RR scheduling\n"); -- printf("-s, --size WxH Set the frame size\n"); -- printf("-t, --time-per-frame num/denom Set the time per frame (eg. 1/25 = 25 fps)\n"); -- printf("-u, --userptr Use the user pointers streaming method\n"); -- printf("-w, --set-control 'ctrl value' Set control 'ctrl' to 'value'\n"); -- printf(" --enum-formats Enumerate formats\n"); -- printf(" --enum-inputs Enumerate inputs\n"); -- printf(" --fd Use a numeric file descriptor insted of a device\n"); -- printf(" --field Interlaced format field order\n"); -- printf(" --no-query Don't query capabilities on open\n"); -- printf(" --offset User pointer buffer offset from page start\n"); -- printf(" --requeue-last Requeue the last buffers before streamoff\n"); -- printf(" --timestamp-source Set timestamp source on output buffers [eof, soe]\n"); -- printf(" --skip n Skip the first n frames\n"); -- printf(" --sleep-forever Sleep forever after configuring the device\n"); -- printf(" --stride value Line stride in bytes\n"); -+ fprintf(stderr, "Usage: %s [options] device\n", argv0); -+ fprintf(stderr, "Supported options:\n"); -+ fprintf(stderr, "-B, --buffer-type Buffer type (\"capture\", \"output\",\n"); -+ fprintf(stderr, " \"capture-mplane\" or \"output-mplane\")\n"); -+ fprintf(stderr, "-c, --capture[=nframes] Capture frames\n"); -+ fprintf(stderr, "-C, --check-overrun Verify dequeued frames for buffer overrun\n"); -+ fprintf(stderr, "-d, --delay Delay (in ms) before requeuing buffers\n"); -+ fprintf(stderr, "-f, --format format Set the video format\n"); -+ fprintf(stderr, "-F, --file[=name] Read/write frames from/to disk\n"); -+ fprintf(stderr, "\tFor video capture devices, the first '#' character in the file name is\n"); -+ fprintf(stderr, "\texpanded to the frame sequence number. The default file name is\n"); -+ fprintf(stderr, "\t'frame-#.bin'.\n"); -+ fprintf(stderr, "-h, --help Show this help screen\n"); -+ fprintf(stderr, "-i, --input input Select the video input\n"); -+ fprintf(stderr, "-I, --fill-frames Fill frames with check pattern before queuing them\n"); -+ fprintf(stderr, "-l, --list-controls List available controls\n"); -+ fprintf(stderr, "-n, --nbufs n Set the number of video buffers\n"); -+ fprintf(stderr, "-p, --pause Pause before starting the video stream\n"); -+ fprintf(stderr, "-q, --quality n MJPEG quality (0-100)\n"); -+ fprintf(stderr, "-r, --get-control ctrl Get control 'ctrl'\n"); -+ fprintf(stderr, "-R, --realtime=[priority] Enable realtime RR scheduling\n"); -+ fprintf(stderr, "-s, --size WxH Set the frame size\n"); -+ fprintf(stderr, "-t, --time-per-frame num/denom Set the time per frame (eg. 1/25 = 25 fps)\n"); -+ fprintf(stderr, "-u, --userptr Use the user pointers streaming method\n"); -+ fprintf(stderr, "-w, --set-control 'ctrl value' Set control 'ctrl' to 'value'\n"); -+ fprintf(stderr, " --enum-formats Enumerate formats\n"); -+ fprintf(stderr, " --enum-inputs Enumerate inputs\n"); -+ fprintf(stderr, " --fd Use a numeric file descriptor insted of a device\n"); -+ fprintf(stderr, " --field Interlaced format field order\n"); -+ fprintf(stderr, " --no-query Don't query capabilities on open\n"); -+ fprintf(stderr, " --offset User pointer buffer offset from page start\n"); -+ fprintf(stderr, " --requeue-last Requeue the last buffers before streamoff\n"); -+ fprintf(stderr, " --timestamp-source Set timestamp source on output buffers [eof, soe]\n"); -+ fprintf(stderr, " --skip n Skip the first n frames\n"); -+ fprintf(stderr, " --sleep-forever Sleep forever after configuring the device\n"); -+ fprintf(stderr, " --stride value Line stride in bytes\n"); - } - - #define OPT_ENUM_FORMATS 256 -@@ -1665,6 +1682,7 @@ static void usage(const char *argv0) - #define OPT_FD 264 - #define OPT_TSTAMP_SRC 265 - #define OPT_FIELD 266 -+#define OPT_STDOUT 267 - - static struct option opts[] = { - {"buffer-type", 1, 0, 'B'}, -@@ -1677,6 +1695,7 @@ static struct option opts[] = { - {"field", 1, 0, OPT_FIELD}, - {"file", 2, 0, 'F'}, - {"fill-frames", 0, 0, 'I'}, -+ {"stdout", 0, 0, OPT_STDOUT}, - {"format", 1, 0, 'f'}, - {"help", 0, 0, 'h'}, - {"input", 1, 0, 'i'}, -@@ -1717,7 +1736,8 @@ int main(int argc, char *argv[]) - int do_list_controls = 0, do_get_control = 0, do_set_control = 0; - int do_sleep_forever = 0, do_requeue_last = 0; - int do_rt = 0; -- int no_query = 0; -+ int no_query = 0; -+ int do_stdout = 0; - char *endptr; - int c; - -@@ -1755,7 +1775,7 @@ int main(int argc, char *argv[]) - case 'B': - ret = v4l2_buf_type_from_string(optarg); - if (ret == -1) { -- printf("Bad buffer type \"%s\"\n", optarg); -+ fprintf(stderr, "Bad buffer type \"%s\"\n", optarg); - return 1; - } - video_set_buf_type(&dev, ret); -@@ -1775,7 +1795,7 @@ int main(int argc, char *argv[]) - do_set_format = 1; - info = v4l2_format_by_name(optarg); - if (info == NULL) { -- printf("Unsupported video format '%s'\n", optarg); -+ fprintf(stderr, "Unsupported video format '%s'\n", optarg); - return 1; - } - pixelformat = info->fourcc; -@@ -1812,7 +1832,7 @@ int main(int argc, char *argv[]) - case 'r': - ctrl_name = strtol(optarg, &endptr, 0); - if (*endptr != 0) { -- printf("Invalid control name '%s'\n", optarg); -+ fprintf(stderr, "Invalid control name '%s'\n", optarg); - return 1; - } - do_get_control = 1; -@@ -1826,12 +1846,12 @@ int main(int argc, char *argv[]) - do_set_format = 1; - width = strtol(optarg, &endptr, 10); - if (*endptr != 'x' || endptr == optarg) { -- printf("Invalid size '%s'\n", optarg); -+ fprintf(stderr, "Invalid size '%s'\n", optarg); - return 1; - } - height = strtol(endptr + 1, &endptr, 10); - if (*endptr != 0) { -- printf("Invalid size '%s'\n", optarg); -+ fprintf(stderr, "Invalid size '%s'\n", optarg); - return 1; - } - break; -@@ -1839,12 +1859,12 @@ int main(int argc, char *argv[]) - do_set_time_per_frame = 1; - time_per_frame.numerator = strtol(optarg, &endptr, 10); - if (*endptr != '/' || endptr == optarg) { -- printf("Invalid time per frame '%s'\n", optarg); -+ fprintf(stderr, "Invalid time per frame '%s'\n", optarg); - return 1; - } - time_per_frame.denominator = strtol(endptr + 1, &endptr, 10); - if (*endptr != 0) { -- printf("Invalid time per frame '%s'\n", optarg); -+ fprintf(stderr, "Invalid time per frame '%s'\n", optarg); - return 1; - } - break; -@@ -1854,12 +1874,12 @@ int main(int argc, char *argv[]) - case 'w': - ctrl_name = strtol(optarg, &endptr, 0); - if (*endptr != ' ' || endptr == optarg) { -- printf("Invalid control name '%s'\n", optarg); -+ fprintf(stderr, "Invalid control name '%s'\n", optarg); - return 1; - } - ctrl_value = strtol(endptr + 1, &endptr, 0); - if (*endptr != 0) { -- printf("Invalid control value '%s'\n", optarg); -+ fprintf(stderr, "Invalid control value '%s'\n", optarg); - return 1; - } - do_set_control = 1; -@@ -1873,16 +1893,16 @@ int main(int argc, char *argv[]) - case OPT_FD: - ret = atoi(optarg); - if (ret < 0) { -- printf("Bad file descriptor %d\n", ret); -+ fprintf(stderr, "Bad file descriptor %d\n", ret); - return 1; - } -- printf("Using file descriptor %d\n", ret); -+ fprintf(stderr, "Using file descriptor %d\n", ret); - video_set_fd(&dev, ret); - break; - case OPT_FIELD: - field = v4l2_field_from_string(optarg); - if (field == (enum v4l2_field)-1) { -- printf("Invalid field order '%s'\n", optarg); -+ fprintf(stderr, "Invalid field order '%s'\n", optarg); - return 1; - } - break; -@@ -1907,22 +1927,25 @@ int main(int argc, char *argv[]) - } else if (!strcmp(optarg, "soe")) { - dev.buffer_output_flags |= V4L2_BUF_FLAG_TSTAMP_SRC_SOE; - } else { -- printf("Invalid timestamp source %s\n", optarg); -+ fprintf(stderr, "Invalid timestamp source %s\n", optarg); - return 1; - } - break; - case OPT_USERPTR_OFFSET: - userptr_offset = atoi(optarg); - break; -+ case OPT_STDOUT: -+ do_stdout = 1; -+ break; - default: -- printf("Invalid option -%c\n", c); -- printf("Run %s -h for help.\n", argv[0]); -+ fprintf(stderr, "Invalid option -%c\n", c); -+ fprintf(stderr, "Run %s -h for help.\n", argv[0]); - return 1; - } - } - - if ((fill_mode & BUFFER_FILL_PADDING) && memtype != V4L2_MEMORY_USERPTR) { -- printf("Buffer overrun can only be checked in USERPTR mode.\n"); -+ fprintf(stderr, "Buffer overrun can only be checked in USERPTR mode.\n"); - return 1; - } - -@@ -1959,7 +1982,7 @@ int main(int argc, char *argv[]) - ret = get_control(&dev, ctrl_name, - get_control_type(&dev, ctrl_name), &val); - if (ret >= 0) -- printf("Control 0x%08x value %" PRId64 "\n", ctrl_name, val); -+ fprintf(stderr, "Control 0x%08x value %" PRId64 "\n", ctrl_name, val); - } - - if (do_set_control) -@@ -1970,7 +1993,7 @@ int main(int argc, char *argv[]) - video_list_controls(&dev); - - if (do_enum_formats) { -- printf("- Available formats:\n"); -+ fprintf(stderr, "- Available formats:\n"); - video_enum_formats(&dev, V4L2_BUF_TYPE_VIDEO_CAPTURE); - video_enum_formats(&dev, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE); - video_enum_formats(&dev, V4L2_BUF_TYPE_VIDEO_OUTPUT); -@@ -1979,14 +2002,14 @@ int main(int argc, char *argv[]) - } - - if (do_enum_inputs) { -- printf("- Available inputs:\n"); -+ fprintf(stderr, "- Available inputs:\n"); - video_enum_inputs(&dev); - } - - if (do_set_input) { - video_set_input(&dev, input); - ret = video_get_input(&dev); -- printf("Input %d selected\n", ret); -+ fprintf(stderr, "Input %d selected\n", ret); - } - - /* Set the video format. */ -@@ -2028,7 +2051,7 @@ int main(int argc, char *argv[]) - } - - if (do_pause) { -- printf("Press enter to start capture\n"); -+ fprintf(stderr, "Press enter to start capture\n"); - getchar(); - } - -@@ -2037,12 +2060,12 @@ int main(int argc, char *argv[]) - sched.sched_priority = rt_priority; - ret = sched_setscheduler(0, SCHED_RR, &sched); - if (ret < 0) -- printf("Failed to select RR scheduler: %s (%d)\n", -+ fprintf(stderr, "Failed to select RR scheduler: %s (%d)\n", - strerror(errno), errno); - } - - if (video_do_capture(&dev, nframes, skip, delay, filename, -- do_requeue_last, fill_mode) < 0) { -+ do_requeue_last, fill_mode, do_stdout) < 0) { - video_close(&dev); - return 1; - } --- -1.7.9.5 - diff --git a/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb b/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb index a192d1a3bb..deffa4a146 100644 --- a/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb +++ b/meta-openembedded/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb @@ -3,8 +3,8 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe" SRC_URI = "git://git.ideasonboard.org/yavta.git \ - file://0001-Add-stdout-mode-to-allow-streaming-over-the-network-.patch" -SRCREV = "7e9f28bedc1ed3205fb5164f686aea96f27a0de2" + " +SRCREV = "65f740aa1758531fd810339bc1b7d1d33666e28a" PV = "0.0" PR = "r2" diff --git a/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.23.1.bb b/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.23.1.bb index 4740e0c987..8763c68ed7 100644 --- a/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.23.1.bb +++ b/meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.23.1.bb @@ -72,7 +72,7 @@ do_install:append() { # Support for python install -d ${D}${PYTHON_SITEPACKAGES_DIR}/gps - install -m 755 ${S}/gps/*.py ${D}${PYTHON_SITEPACKAGES_DIR}/gps + install -m 755 ${D}${libdir}/gps/*.py ${D}${PYTHON_SITEPACKAGES_DIR}/gps } PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" diff --git a/meta-openembedded/meta-oe/recipes-security/audit/audit_3.0.5.bb b/meta-openembedded/meta-oe/recipes-security/audit/audit_3.0.6.bb index 173c2cab11..2d75232b85 100644 --- a/meta-openembedded/meta-oe/recipes-security/audit/audit_3.0.5.bb +++ b/meta-openembedded/meta-oe/recipes-security/audit/audit_3.0.6.bb @@ -15,7 +15,7 @@ SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=master \ " S = "${WORKDIR}/git" -SRCREV = "c382a4925a7d0d1b332a2f4e689c71d71b0005a5" +SRCREV = "b1b2728ccd83eeb0dffe29c01a5c97e14e6a0d8a" inherit autotools python3native update-rc.d systemd diff --git a/meta-openembedded/meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb b/meta-openembedded/meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb index 00cca53b5a..6273edd7ed 100644 --- a/meta-openembedded/meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb +++ b/meta-openembedded/meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb @@ -31,6 +31,9 @@ EXTRA_OEMAKE = "'CFLAGS=${CFLAGS} -Wall' \ LIBDIR=${libdir} \ USRLIBDIR=${libdir} \ INCLUDEDIR=${includedir} \ + ETCDIR=${sysconfdir} \ + SHAREDIR=${datadir}/keyutils \ + MANDIR=${datadir}/man \ BUILDFOR=${SITEINFO_BITS}-bit \ NO_GLIBC_KEYERR=1 \ " @@ -40,18 +43,6 @@ do_install () { oe_runmake DESTDIR=${D} install } -do_install:append:class-nativesdk() { - install -d ${D}${datadir} - src_dir="${D}${target_datadir}" - mv $src_dir/* ${D}${datadir} - par_dir=`dirname $src_dir` - rmdir $src_dir $par_dir - - install -d ${D}${sysconfdir} - mv ${D}/etc/* ${D}${sysconfdir}/ - rmdir ${D}/etc -} - do_install_ptest () { cp -r ${S}/tests ${D}${PTEST_PATH}/ sed -i -e 's/OSDIST=Unknown/OSDIST=${DISTRO}/' ${D}${PTEST_PATH}/tests/prepare.inc.sh diff --git a/meta-openembedded/meta-oe/recipes-support/asio/asio_1.18.1.bb b/meta-openembedded/meta-oe/recipes-support/asio/asio_1.20.0.bb index 530e061968..cedcf9fee0 100644 --- a/meta-openembedded/meta-oe/recipes-support/asio/asio_1.18.1.bb +++ b/meta-openembedded/meta-oe/recipes-support/asio/asio_1.20.0.bb @@ -15,10 +15,9 @@ inherit autotools ALLOW_EMPTY:${PN} = "1" -LIC_FILES_CHKSUM = "file://COPYING;md5=de86c8210a433f72bd3cc98e797a6084" +LIC_FILES_CHKSUM = "file://COPYING;md5=416f4cc4f79551b690babb14ef1a5799" -SRC_URI[md5sum] = "00807b2e976f467b3cec85d1589f0825" -SRC_URI[sha256sum] = "4af9875df5497fdd507231f4b7346e17d96fc06fe10fd30e2b3750715a329113" +SRC_URI[sha256sum] = "204374d3cadff1b57a63f4c343cbadcee28374c072dc04b549d772dbba9f650c" SRC_URI = "${SOURCEFORGE_MIRROR}/asio/${BP}.tar.bz2" diff --git a/meta-openembedded/meta-oe/recipes-support/bdwgc/bdwgc_8.0.4.bb b/meta-openembedded/meta-oe/recipes-support/bdwgc/bdwgc_8.2.0.bb index b478b86bae..ad94009b71 100644 --- a/meta-openembedded/meta-oe/recipes-support/bdwgc/bdwgc_8.0.4.bb +++ b/meta-openembedded/meta-oe/recipes-support/bdwgc/bdwgc_8.2.0.bb @@ -19,12 +19,12 @@ DESCRIPTION = "The Boehm-Demers-Weiser conservative garbage collector can be\ HOMEPAGE = "http://www.hboehm.info/gc/" SECTION = "devel" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://README.QUICK;md5=81b447d779e278628c843aef92f088fa" +LIC_FILES_CHKSUM = "file://README.QUICK;md5=7912d9213b3547f8a81aadd08893fe84" DEPENDS = "libatomic-ops" -SRCREV = "d3dede3ce4462cd82a15f161af797ca51654546a" -SRC_URI = "git://github.com/ivmai/bdwgc.git;branch=release-8_0" +SRCREV = "47e9106c17b72e9ee5501308f69ea94531e798b3" +SRC_URI = "git://github.com/ivmai/bdwgc.git" S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-oe/recipes-support/colord/colord-native.bb b/meta-openembedded/meta-oe/recipes-support/colord/colord-native.bb index 65fa0f44b0..64dd94a9ed 100644 --- a/meta-openembedded/meta-oe/recipes-support/colord/colord-native.bb +++ b/meta-openembedded/meta-oe/recipes-support/colord/colord-native.bb @@ -2,7 +2,7 @@ require ${BPN}.inc FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}-native:" -inherit meson native +inherit meson pkgconfig native DEPENDS += " \ meson-native \ diff --git a/meta-openembedded/meta-oe/recipes-support/colord/colord.bb b/meta-openembedded/meta-oe/recipes-support/colord/colord.bb index 66dc4a5802..563a0ee00a 100644 --- a/meta-openembedded/meta-oe/recipes-support/colord/colord.bb +++ b/meta-openembedded/meta-oe/recipes-support/colord/colord.bb @@ -1,6 +1,6 @@ require ${BPN}.inc -inherit meson gobject-introspection gsettings gettext bash-completion systemd features_check useradd +inherit meson gobject-introspection gsettings gettext bash-completion systemd features_check useradd pkgconfig # polkit and gobject-introspection are mandatory and cannot be configured REQUIRED_DISTRO_FEATURES = "polkit gobject-introspection-data" diff --git a/meta-openembedded/meta-oe/recipes-support/driverctl/driverctl_0.111.bb b/meta-openembedded/meta-oe/recipes-support/driverctl/driverctl_0.111.bb new file mode 100644 index 0000000000..7404f40c21 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/driverctl/driverctl_0.111.bb @@ -0,0 +1,28 @@ +SUMMARY = "driverctl is a device driver control utility for Linux" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/LGPL-2.1-only;md5=1a6d268fd218675ffea8be556788b780" + +REQUIRED_DISTRO_FEATURES = "systemd" + +DEPENDS = "systemd" +RDEPENDS:${PN} += "bash bash-completion" + +SRC_URI = " git://gitlab.com/driverctl/driverctl.git" +SRCREV = "fa9dce43d1a667d6e6e26895fbed01b3b04362c9" + +S = "${WORKDIR}/git" + +inherit pkgconfig systemd features_check + +FILES:${PN} += "${libdir}" +FILES:${PN} += "${libdir}/udev" +FILES:${PN} += "${libdir}/udev/rules.d" +FILES:${PN} += "${systemd_unitdir}" +FILES:${PN} += "${systemd_unitdir}/system" +FILES:${PN} += "${datadir}" +FILES:${PN} += "${datadir}/bash-completion" +FILES:${PN} += "${datadir}/bash-completion/completions" + +do_install () { + oe_runmake install DESTDIR=${D} +} diff --git a/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-Fix-FIPS-mode-support-and-build-with-OpenSSL-3.0.patch b/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-Fix-FIPS-mode-support-and-build-with-OpenSSL-3.0.patch new file mode 100644 index 0000000000..04fe644d47 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0001-Fix-FIPS-mode-support-and-build-with-OpenSSL-3.0.patch @@ -0,0 +1,43 @@ +From f703b1184229796d504a2e833f72ace4cc605d15 Mon Sep 17 00:00:00 2001 +From: Ondrej Holy <oholy@redhat.com> +Date: Wed, 12 May 2021 12:48:15 +0200 +Subject: [PATCH 1/2] Fix FIPS mode support and build with OpenSSL 3.0 + +FreeRDP fails to build with OpenSSL 3.0 because of usage of the `FIPS_mode` +and `FIPS_mode_set` functions, which were removed there. Just a note that +the FIPS mode is not supported by OpenSSL 1.1.* although the mentioned +functions are still there (see https://wiki.openssl.org/index.php/FIPS_modules). +Let's make FreeRDP build with OpenSSL 3.0 and fix the FIPS mode support. + +See: https://bugzilla.redhat.com/show_bug.cgi?id=1952937 +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + winpr/libwinpr/utils/ssl.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/winpr/libwinpr/utils/ssl.c b/winpr/libwinpr/utils/ssl.c +index 3a8590390..03b23af43 100644 +--- a/winpr/libwinpr/utils/ssl.c ++++ b/winpr/libwinpr/utils/ssl.c +@@ -244,9 +244,17 @@ static BOOL winpr_enable_fips(DWORD flags) + #else + WLog_DBG(TAG, "Ensuring openssl fips mode is ENabled"); + ++#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) ++ if (!EVP_default_properties_is_fips_enabled(NULL)) ++#else + if (FIPS_mode() != 1) ++#endif + { ++#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) ++ if (EVP_set_default_properties(NULL, "fips=yes")) ++#else + if (FIPS_mode_set(1)) ++#endif + WLog_INFO(TAG, "Openssl fips mode ENabled!"); + else + { +-- +2.20.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0002-winpr-avoid-calling-FIPS_mode-with-OpenSSL-3.0.patch b/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0002-winpr-avoid-calling-FIPS_mode-with-OpenSSL-3.0.patch new file mode 100644 index 0000000000..728638e15d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp/0002-winpr-avoid-calling-FIPS_mode-with-OpenSSL-3.0.patch @@ -0,0 +1,28 @@ +From 4dbf108c0ae5e997d5c432f3da4b4c5fd7b35373 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Sun, 1 Aug 2021 12:14:43 -0400 +Subject: [PATCH 2/2] winpr: avoid calling FIPS_mode() with OpenSSL 3.0 + +Fixes: 26bf2816c3e0daeaf524c47cf0fcda8ae13b65ad +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + winpr/libwinpr/utils/ssl.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/winpr/libwinpr/utils/ssl.c b/winpr/libwinpr/utils/ssl.c +index 03b23af43..74ef156e7 100644 +--- a/winpr/libwinpr/utils/ssl.c ++++ b/winpr/libwinpr/utils/ssl.c +@@ -364,6 +364,8 @@ BOOL winpr_FIPSMode(void) + { + #if (OPENSSL_VERSION_NUMBER < 0x10001000L) || defined(LIBRESSL_VERSION_NUMBER) + return FALSE; ++#elif defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) ++ return (EVP_default_properties_is_fips_enabled(NULL) == 1); + #else + return (FIPS_mode() == 1); + #endif +-- +2.20.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.3.0.bb b/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.3.0.bb index f46834445e..78af5389b6 100644 --- a/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.3.0.bb +++ b/meta-openembedded/meta-oe/recipes-support/freerdp/freerdp_2.3.0.bb @@ -16,6 +16,8 @@ PKGV = "${GITPKGVTAG}" SRCREV = "14c7f7aed7dd4e2454ee0cd81028b9f790885021" SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=stable-2.0 \ file://winpr-makecert-Build-with-install-RPATH.patch \ + file://0001-Fix-FIPS-mode-support-and-build-with-OpenSSL-3.0.patch \ + file://0002-winpr-avoid-calling-FIPS_mode-with-OpenSSL-3.0.patch \ " S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-oe/recipes-support/libgusb/libgusb_0.3.7.bb b/meta-openembedded/meta-oe/recipes-support/libgusb/libgusb_0.3.8.bb index 2b87281793..c22030b983 100644 --- a/meta-openembedded/meta-oe/recipes-support/libgusb/libgusb_0.3.7.bb +++ b/meta-openembedded/meta-oe/recipes-support/libgusb/libgusb_0.3.8.bb @@ -6,6 +6,6 @@ DEPENDS = "glib-2.0 libusb" inherit meson gobject-introspection gtk-doc gettext vala -SRC_URI = "git://github.com/hughsie/libgusb.git" -SRCREV = "ff9c606d9d72c7dd369ad220d92729556faaaf0c" +SRC_URI = "git://github.com/hughsie/libgusb.git;branch=main" +SRCREV = "db9edbd8b45662d551194a0985173732f8f557a5" S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-oe/recipes-support/libjs/libjs-jquery-cookie_3.0.1.bb b/meta-openembedded/meta-oe/recipes-support/libjs/libjs-jquery-cookie_3.0.1.bb new file mode 100644 index 0000000000..66fb5a3ffb --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/libjs/libjs-jquery-cookie_3.0.1.bb @@ -0,0 +1,27 @@ +SUMMARY = "A simple, lightweight JavaScript API for handling cookies." +HOMEPAGE = "https://github.com/js-cookie/js-cookie" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e16cf0e247d84f8999bf55865a9c98cf" + +SRC_URI = "git://github.com/js-cookie/js-cookie.git;protocol=http" + +SRCREV = "0ba77141dd215782cc7770347a457906908c66ff" + +S = "${WORKDIR}/git" + +JQUERYCOOKIEDIR = "${datadir}/javascript/jquery-cookie" +JQUERYCOOKIEDOCDIR = "${docdir}/libjs-jquery-cookie" + +do_install() { + install -d ${D}${JQUERYCOOKIEDIR} + install -m 0644 ${S}/*.js ${D}${JQUERYCOOKIEDIR} + install -m 0644 ${S}/src/*.mjs ${D}${JQUERYCOOKIEDIR} + install -m 0644 ${S}/*.json ${D}${JQUERYCOOKIEDIR} + + install -d ${D}${JQUERYCOOKIEDOCDIR} + install -m 0644 ${S}/*.md ${D}${JQUERYCOOKIEDOCDIR} + +} + +FILES:${PN} += "${datadir}/javascript/jquery-cookie" +FILES:${PN}-doc += "${docdir}/libjs-jquery-cookie" diff --git a/meta-openembedded/meta-oe/recipes-support/libjs/libjs-jquery-globalize_1.7.0.bb b/meta-openembedded/meta-oe/recipes-support/libjs/libjs-jquery-globalize_1.7.0.bb new file mode 100644 index 0000000000..a87c5bf758 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/libjs/libjs-jquery-globalize_1.7.0.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data" +SECTION = "console/network" +HOMEPAGE = "https://github.com/globalizejs/globalize" +LICENSE = "MIT" + +S = "${WORKDIR}/git" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=4db68fb4d1d9986d736b35039f2ad9ea" + +SRC_URI = "git://github.com/globalizejs/globalize;tag=1.7.0;nobranch=1" + +FILES:${PN} = "${datadir}/javascript/jquery-globalize" +FILES:${PN}-doc += "${docdir}/${PN}" + +do_install() { + install -d ${D}${datadir}/javascript/jquery-globalize/ + install -m 0644 ${S}/dist/*.js ${D}${datadir}/javascript/jquery-globalize/ + install -m 0644 ${S}/dist/globalize/*.js ${D}${datadir}/javascript/jquery-globalize/ + + install -d ${D}${docdir}/${PN}/ + install -m 0644 ${S}/LICENSE ${D}${docdir}/${PN}/ +} diff --git a/meta-openembedded/meta-oe/recipes-support/links/links_2.22.bb b/meta-openembedded/meta-oe/recipes-support/links/links_2.25.bb index f2b4a6a80d..1986358b21 100644 --- a/meta-openembedded/meta-oe/recipes-support/links/links_2.22.bb +++ b/meta-openembedded/meta-oe/recipes-support/links/links_2.25.bb @@ -8,5 +8,4 @@ EXTRA_OECONF = "--enable-graphics \ --without-libtiff --without-svgalib --with-fb \ --without-directfb --without-pmshell --without-atheos \ --without-x" -SRC_URI[sha256sum] = "0364986b3a7f1e8e3171bea362b53f71e1dd3360a8842d66fdc65580ebc2084d" -SRC_URI[icon.sha256sum] = "eddcd8b8c8698aa621d1a453943892d77b72ed492e0d14e0dbac5c6a57e52f47" +SRC_URI[sha256sum] = "2dd78508698e8279ef4f09a3a2a21e9595040113402da6c553974414fb49dd2c" diff --git a/meta-openembedded/meta-oe/recipes-support/nano/nano_5.8.bb b/meta-openembedded/meta-oe/recipes-support/nano/nano_5.9.bb index 146ad55c65..85c81fb799 100644 --- a/meta-openembedded/meta-oe/recipes-support/nano/nano_5.8.bb +++ b/meta-openembedded/meta-oe/recipes-support/nano/nano_5.9.bb @@ -13,7 +13,7 @@ RDEPENDS:${PN} = "ncurses-terminfo-base" PV_MAJOR = "${@d.getVar('PV').split('.')[0]}" SRC_URI = "https://nano-editor.org/dist/v${PV_MAJOR}/nano-${PV}.tar.xz" -SRC_URI[sha256sum] = "e43b63db2f78336e2aa123e8d015dbabc1720a15361714bfd4b1bb4e5e87768c" +SRC_URI[sha256sum] = "757db8cda4bb2873599e47783af463e3b547a627b0cabb30ea7bf71fb4c24937" UPSTREAM_CHECK_URI = "https://ftp.gnu.org/gnu/nano" diff --git a/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.5.2.bb b/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.5.2.bb index 361ac0cb95..8d557e0868 100644 --- a/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.5.2.bb +++ b/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.5.2.bb @@ -230,4 +230,8 @@ do_install:append() { sed -e 's@${STAGING_DIR_HOST}@@g' \ -i ${D}${libdir}/cmake/opencv4/OpenCVModules.cmake fi + # remove setup_vars_opencv4.sh as its content is confusing and useless + if [ -f ${D}${bindir}/setup_vars_opencv4.sh ]; then + rm -rf ${D}${bindir}/setup_vars_opencv4.sh + fi } diff --git a/meta-openembedded/meta-oe/recipes-support/opensc/opensc_0.22.0.bb b/meta-openembedded/meta-oe/recipes-support/opensc/opensc_0.22.0.bb index e8bb505e44..44a0dccbba 100644 --- a/meta-openembedded/meta-oe/recipes-support/opensc/opensc_0.22.0.bb +++ b/meta-openembedded/meta-oe/recipes-support/opensc/opensc_0.22.0.bb @@ -24,6 +24,7 @@ EXTRA_OECONF = " \ --disable-static \ --disable-ctapi \ --disable-doc \ + --disable-strict \ " EXTRA_OEMAKE = "DESTDIR=${D}" diff --git a/meta-openembedded/meta-oe/recipes-support/poppler/poppler_21.09.0.bb b/meta-openembedded/meta-oe/recipes-support/poppler/poppler_21.10.0.bb index 0ecf199732..164a348815 100644 --- a/meta-openembedded/meta-oe/recipes-support/poppler/poppler_21.09.0.bb +++ b/meta-openembedded/meta-oe/recipes-support/poppler/poppler_21.10.0.bb @@ -7,7 +7,7 @@ SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.xz \ file://0001-Do-not-overwrite-all-our-build-flags.patch \ file://basename-include.patch \ " -SRC_URI[sha256sum] = "5a47fef738c2b99471f9b459a8bf8b40aefb7eed92caa4861c3798b2e126d05b" +SRC_URI[sha256sum] = "964b5b16290fbec3fae57c2a5bcdea49bb0736bd750c3a3711c47995c9efc394" DEPENDS = "fontconfig zlib cairo lcms glib-2.0" diff --git a/meta-openembedded/meta-oe/recipes-support/span-lite/span-lite_0.10.1.bb b/meta-openembedded/meta-oe/recipes-support/span-lite/span-lite_0.10.3.bb index 15ba099826..0079cf7298 100644 --- a/meta-openembedded/meta-oe/recipes-support/span-lite/span-lite_0.10.1.bb +++ b/meta-openembedded/meta-oe/recipes-support/span-lite/span-lite_0.10.3.bb @@ -4,7 +4,7 @@ LICENSE = "BSL-1.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e4224ccaecb14d942c71d31bef20d78c" SRC_URI += "git://github.com/martinmoene/span-lite" -SRCREV = "da49b231a25600b4431e00b564a6a20be95c1108" +SRCREV = "cbb9c3c5162a0d7018c7b3e053153a04d4fbbbb9" S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb b/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb index 36ca8f91ae..c726bef3b5 100644 --- a/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb +++ b/meta-openembedded/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb @@ -45,6 +45,7 @@ ASNEEDED = "" LDFLAGS:append:mips = " -latomic" LDFLAGS:append:mipsel = " -latomic" +LDFLAGS:append:riscv32:toolchain-clang = " -latomic" LDFLAGS:append:libc-musl = " -lucontext" diff --git a/meta-openembedded/meta-oe/recipes-support/unicode-ucd/files/license.html b/meta-openembedded/meta-oe/recipes-support/unicode-ucd/files/license.html deleted file mode 100644 index a02442ad97..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/unicode-ucd/files/license.html +++ /dev/null @@ -1,98 +0,0 @@ -<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html> - - - -<head> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<meta http-equiv="Content-Language" content="en-us"> -<meta name="VI60_defaultClientScript" content="JavaScript"> -<meta name="GENERATOR" content="Microsoft FrontPage 12.0"> -<meta name="keywords" content="Unicode Standard, copyright"> -<meta name="ProgId" content="FrontPage.Editor.Document"> -<title>Unicode License Agreement</title> -<link rel="stylesheet" type="text/css" - -href="http://www.unicode.org/webscripts/standard_styles.css"> - -<style type="text/css"> -pre { - FONT-FAMILY: Arial, Geneva, sans-serif; -} -</style> - - -</head> - - -<body text="#330000"> - - <table width="100%" cellpadding="0" cellspacing="0" border="0"> - <tr> - - <!-- BEGIN CONTENTS --> - - <td> - - -<blockquote> -<h2><a name="License">UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE</a></h2> - -<pre> -See <a href="https://www.unicode.org/copyright.html">Terms of Use</a> for definitions of Unicode Inc.'s -Data Files and Software. - -NOTICE TO USER: Carefully read the following legal agreement. -BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S -DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), -YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE -TERMS AND CONDITIONS OF THIS AGREEMENT. -IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE -THE DATA FILES OR SOFTWARE. - -COPYRIGHT AND PERMISSION NOTICE - -Copyright © 1991-2019 Unicode, Inc. All rights reserved. -Distributed under the Terms of Use in https://www.unicode.org/copyright.html. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Unicode data files and any associated documentation -(the "Data Files") or Unicode software and any associated documentation -(the "Software") to deal in the Data Files or Software -without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, and/or sell copies of -the Data Files or Software, and to permit persons to whom the Data Files -or Software are furnished to do so, provided that either -(a) this copyright and permission notice appear with all copies -of the Data Files or Software, or -(b) this copyright and permission notice appear in associated -Documentation. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT OF THIRD PARTY RIGHTS. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS -NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL -DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THE DATA FILES OR SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, -use or other dealings in these Data Files or Software without prior -written authorization of the copyright holder. -</pre> - -</blockquote> - - - - </td> - - </tr> - - </table> -</body> -</html> diff --git a/meta-openembedded/meta-oe/recipes-support/unicode-ucd/unicode-ucd_12.1.0.bb b/meta-openembedded/meta-oe/recipes-support/unicode-ucd/unicode-ucd_14.0.0.bb index 06f97940cb..2a0188649c 100644 --- a/meta-openembedded/meta-oe/recipes-support/unicode-ucd/unicode-ucd_12.1.0.bb +++ b/meta-openembedded/meta-oe/recipes-support/unicode-ucd/unicode-ucd_14.0.0.bb @@ -1,14 +1,14 @@ SUMMARY = "Unicode Character Database" HOMEPAGE = "https://unicode.org/ucd/" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://../license.html;beginline=42;endline=85;md5=ddcaebcc17ab633995f12c383599f377" +LIC_FILES_CHKSUM = "file://${WORKDIR}/license.html;beginline=43;endline=83;md5=cf6c4777b109bcee78b6083a21be6192" SRC_URI = " \ https://www.unicode.org/Public/zipped/${PV}/UCD.zip;name=ucd;subdir=ucd \ - file://license.html \ + https://www.unicode.org/license.html;name=license \ " -SRC_URI[ucd.md5sum] = "430cbdac2615451571dd69a976dd08f6" -SRC_URI[ucd.sha256sum] = "25ba51a0d4c6fa41047b7a5e5733068d4a734588f055f61e85f450097834a0a6" +SRC_URI[ucd.sha256sum] = "033a5276b5d7af8844589f8e3482f3977a8385e71d107d375055465178c23600" +SRC_URI[license.sha256sum] = "e415e1f2188ef2b1a5f7e6ee8c60cefe8a49dacd8b96c9025cad5013985129e4" inherit allarch diff --git a/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils b/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils index 495601f08f..5982e2d08c 100644 --- a/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils +++ b/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils @@ -13,7 +13,7 @@ INCLUDES = -I. -I../vboxsf -I../vboxsf/include MOD_DEFS = -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 \ -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DIN_MODULE -DIN_GUEST_R0 -CFLAGS = ${INCLUDES} ${MOD_DEFS} +CFLAGS = ${INCLUDES} ${MOD_DEFS} ${EXTRA_CFLAGS} LDFLAGS = SRCS = mount.vboxsf.c \ diff --git a/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/r89690-5.14-fixes.patch b/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/r89690-5.14-fixes.patch deleted file mode 100644 index 951bd5013d..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/r89690-5.14-fixes.patch +++ /dev/null @@ -1,442 +0,0 @@ -Subject: Fix build errors with linux 5.14 - -Upstream-Status: backport - -svn-id: r89690 - -Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> - -Index: a/src/VBox/Additions/linux/drm/vbox_drv.h -=================================================================== ---- a/src/VBox/Additions/linux/drm/vbox_drv.h (revision 89690) -+++ a/src/VBox/Additions/linux/drm/vbox_drv.h (revision 90498) -@@ -227,6 +227,15 @@ - sizeof(HGSMIHOSTFLAGS)) - #define HOST_FLAGS_OFFSET GUEST_HEAP_USABLE_SIZE - -+/** Field @pdev of struct drm_device was removed in 5.14. This macro -+ * transparently handles this change. Input argument is a pointer -+ * to struct drm_device. */ -+#if RTLNX_VER_MIN(5,14,0) -+# define VBOX_DRM_TO_PCI_DEV(_dev) to_pci_dev(_dev->dev) -+#else -+# define VBOX_DRM_TO_PCI_DEV(_dev) _dev->pdev -+#endif -+ - /** How frequently we refresh if the guest is not providing dirty rectangles. */ - #define VBOX_REFRESH_PERIOD (HZ / 2) - -Index: a/src/VBox/Additions/linux/drm/vbox_main.c -=================================================================== ---- a/src/VBox/Additions/linux/drm/vbox_main.c (revision 89690) -+++ a/src/VBox/Additions/linux/drm/vbox_main.c (revision 90498) -@@ -290,7 +290,7 @@ - /* Take a command buffer for each screen from the end of usable VRAM. */ - vbox->available_vram_size -= vbox->num_crtcs * VBVA_MIN_BUFFER_SIZE; - -- vbox->vbva_buffers = pci_iomap_range(vbox->dev->pdev, 0, -+ vbox->vbva_buffers = pci_iomap_range(VBOX_DRM_TO_PCI_DEV(vbox->dev), 0, - vbox->available_vram_size, - vbox->num_crtcs * - VBVA_MIN_BUFFER_SIZE); -@@ -311,7 +311,7 @@ - return 0; - - err_pci_iounmap: -- pci_iounmap(vbox->dev->pdev, vbox->vbva_buffers); -+ pci_iounmap(VBOX_DRM_TO_PCI_DEV(vbox->dev), vbox->vbva_buffers); - return ret; - } - -@@ -318,7 +318,7 @@ - static void vbox_accel_fini(struct vbox_private *vbox) - { - vbox_disable_accel(vbox); -- pci_iounmap(vbox->dev->pdev, vbox->vbva_buffers); -+ pci_iounmap(VBOX_DRM_TO_PCI_DEV(vbox->dev), vbox->vbva_buffers); - } - - /** Do we support the 4.3 plus mode hint reporting interface? */ -@@ -393,7 +393,7 @@ - - /* Map guest-heap at end of vram */ - vbox->guest_heap = -- pci_iomap_range(vbox->dev->pdev, 0, GUEST_HEAP_OFFSET(vbox), -+ pci_iomap_range(VBOX_DRM_TO_PCI_DEV(vbox->dev), 0, GUEST_HEAP_OFFSET(vbox), - GUEST_HEAP_SIZE); - if (!vbox->guest_heap) - return -ENOMEM; -@@ -442,7 +442,7 @@ - err_destroy_guest_pool: - gen_pool_destroy(vbox->guest_pool); - err_unmap_guest_heap: -- pci_iounmap(vbox->dev->pdev, vbox->guest_heap); -+ pci_iounmap(VBOX_DRM_TO_PCI_DEV(vbox->dev), vbox->guest_heap); - return ret; - } - -@@ -452,7 +452,7 @@ - cancel_delayed_work(&vbox->refresh_work); - vbox_accel_fini(vbox); - gen_pool_destroy(vbox->guest_pool); -- pci_iounmap(vbox->dev->pdev, vbox->guest_heap); -+ pci_iounmap(VBOX_DRM_TO_PCI_DEV(vbox->dev), vbox->guest_heap); - } - - #if RTLNX_VER_MIN(4,19,0) || RTLNX_RHEL_MIN(8,3) -@@ -567,12 +567,16 @@ - - size = roundup(size, PAGE_SIZE); - if (size == 0) -+ { -+ DRM_ERROR("bad size\n"); - return -EINVAL; -+ } - - ret = vbox_bo_create(dev, size, 0, 0, &vboxbo); - if (ret) { - if (ret != -ERESTARTSYS) - DRM_ERROR("failed to allocate GEM object\n"); -+ DRM_ERROR("failed to allocate GEM (%d)\n", ret); - return ret; - } - -@@ -628,6 +632,21 @@ - { - struct vbox_bo *vbox_bo = gem_to_vbox_bo(obj); - -+#if RTLNX_VER_MIN(5,14,0) -+ /* Starting from kernel 5.14, there is a warning appears in dmesg -+ * on attempt to desroy pinned buffer object. Make sure it is unpinned. */ -+ while (vbox_bo->bo.pin_count) -+ { -+ int ret; -+ ret = vbox_bo_unpin(vbox_bo); -+ if (ret) -+ { -+ DRM_ERROR("unable to unpin buffer object\n"); -+ break; -+ } -+ } -+#endif -+ - ttm_bo_put(&vbox_bo->bo); - } - -@@ -648,7 +667,7 @@ - u32 handle, u64 *offset) - { - struct drm_gem_object *obj; -- int ret; -+ int ret = 0; - struct vbox_bo *bo; - - mutex_lock(&dev->struct_mutex); -@@ -665,8 +684,15 @@ - bo = gem_to_vbox_bo(obj); - *offset = vbox_bo_mmap_offset(bo); - -+#if RTLNX_VER_MIN(5,14,0) -+ ret = drm_vma_node_allow(&bo->bo.base.vma_node, file); -+ if (ret) -+ { -+ DRM_ERROR("unable to grant previladges to user"); -+ } -+#endif -+ - drm_gem_object_put(obj); -- ret = 0; - - out_unlock: - mutex_unlock(&dev->struct_mutex); -Index: a/src/VBox/Additions/linux/drm/vbox_mode.c -=================================================================== ---- a/src/VBox/Additions/linux/drm/vbox_mode.c (revision 89690) -+++ a/src/VBox/Additions/linux/drm/vbox_mode.c (revision 90498) -@@ -245,6 +245,10 @@ - vbox_bo_unpin(bo); - vbox_bo_unreserve(bo); - } -+ else -+ { -+ DRM_ERROR("unable to lock buffer object: error %d\n", ret); -+ } - } - - if (&vbox->fbdev->afb == vbox_fb) -@@ -856,7 +860,9 @@ - vbox->cursor_data_size = data_size; - dst = vbox->cursor_data; - --#if RTLNX_VER_MIN(5,12,0) -+#if RTLNX_VER_MIN(5,14,0) -+ ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.resource->num_pages, &uobj_map); -+#elif RTLNX_VER_MIN(5,12,0) - ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.mem.num_pages, &uobj_map); - #else - ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &uobj_map); -Index: a/src/VBox/Additions/linux/drm/vbox_ttm.c -=================================================================== ---- a/src/VBox/Additions/linux/drm/vbox_ttm.c (revision 89690) -+++ a/src/VBox/Additions/linux/drm/vbox_ttm.c (revision 90498) -@@ -41,6 +41,10 @@ - # include <drm/ttm/ttm_page_alloc.h> - #endif - -+#if RTLNX_VER_MIN(5,14,0) -+# include <drm/ttm/ttm_range_manager.h> -+#endif -+ - #if RTLNX_VER_MAX(3,18,0) && !RTLNX_RHEL_MAJ_PREREQ(7,2) - #define PLACEMENT_FLAGS(placement) (placement) - #else -@@ -174,11 +178,13 @@ - *pl = vboxbo->placement; - } - -+#if RTLNX_VER_MAX(5,14,0) - static int vbox_bo_verify_access(struct ttm_buffer_object *bo, - struct file *filp) - { - return 0; - } -+#endif - - #if RTLNX_VER_MAX(5,10,0) - static int vbox_ttm_io_mem_reserve(struct ttm_bo_device *bdev, -@@ -234,10 +240,10 @@ - mem->bus.caching = ttm_write_combined; - # endif - # if RTLNX_VER_MIN(5,10,0) -- mem->bus.offset = (mem->start << PAGE_SHIFT) + pci_resource_start(vbox->dev->pdev, 0); -+ mem->bus.offset = (mem->start << PAGE_SHIFT) + pci_resource_start(VBOX_DRM_TO_PCI_DEV(vbox->dev), 0); - # else - mem->bus.offset = mem->start << PAGE_SHIFT; -- mem->start = pci_resource_start(vbox->dev->pdev, 0); -+ mem->start = pci_resource_start(VBOX_DRM_TO_PCI_DEV(vbox->dev), 0); - # endif - mem->bus.is_iomem = true; - break; -@@ -373,7 +379,9 @@ - .eviction_valuable = ttm_bo_eviction_valuable, - #endif - .evict_flags = vbox_bo_evict_flags, -+#if RTLNX_VER_MAX(5,14,0) - .verify_access = vbox_bo_verify_access, -+#endif - .io_mem_reserve = &vbox_ttm_io_mem_reserve, - .io_mem_free = &vbox_ttm_io_mem_free, - #if RTLNX_VER_MIN(4,12,0) || RTLNX_RHEL_MAJ_PREREQ(7,5) -@@ -451,12 +459,12 @@ - } - - #ifdef DRM_MTRR_WC -- vbox->fb_mtrr = drm_mtrr_add(pci_resource_start(dev->pdev, 0), -- pci_resource_len(dev->pdev, 0), -+ vbox->fb_mtrr = drm_mtrr_add(pci_resource_start(VBOX_DRM_TO_PCI_DEV(dev), 0), -+ pci_resource_len(VBOX_DRM_TO_PCI_DEV(dev), 0), - DRM_MTRR_WC); - #else -- vbox->fb_mtrr = arch_phys_wc_add(pci_resource_start(dev->pdev, 0), -- pci_resource_len(dev->pdev, 0)); -+ vbox->fb_mtrr = arch_phys_wc_add(pci_resource_start(VBOX_DRM_TO_PCI_DEV(dev), 0), -+ pci_resource_len(VBOX_DRM_TO_PCI_DEV(dev), 0)); - #endif - return 0; - -@@ -477,8 +485,8 @@ - { - #ifdef DRM_MTRR_WC - drm_mtrr_del(vbox->fb_mtrr, -- pci_resource_start(vbox->dev->pdev, 0), -- pci_resource_len(vbox->dev->pdev, 0), DRM_MTRR_WC); -+ pci_resource_start(VBOX_DRM_TO_PCI_DEV(vbox->dev), 0), -+ pci_resource_len(VBOX_DRM_TO_PCI_DEV(vbox->dev), 0), DRM_MTRR_WC); - #else - arch_phys_wc_del(vbox->fb_mtrr); - #endif -@@ -560,6 +568,9 @@ - static const struct drm_gem_object_funcs vbox_drm_gem_object_funcs = { - .free = vbox_gem_free_object, - .print_info = drm_gem_ttm_print_info, -+# if RTLNX_VER_MIN(5,14,0) -+ .mmap = drm_gem_ttm_mmap, -+# endif - }; - #endif - -@@ -598,6 +609,17 @@ - sizeof(struct vbox_bo)); - #endif - -+#if RTLNX_VER_MIN(5,14,0) -+ /* Initialization of the following was removed from DRM stack -+ * in 5.14, so we need to do it manually. */ -+ vboxbo->bo.base.funcs = &vbox_drm_gem_object_funcs; -+ kref_init(&vboxbo->bo.base.refcount); -+ vboxbo->bo.base.size = size; -+ vboxbo->bo.base.dev = dev; -+ dma_resv_init(&vboxbo->bo.base._resv); -+ drm_vma_node_reset(&vboxbo->bo.base.vma_node); -+#endif -+ - ret = ttm_bo_init(&vbox->ttm.bdev, &vboxbo->bo, size, - ttm_bo_type_device, &vboxbo->placement, - #if RTLNX_VER_MAX(4,17,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) && !RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5) -@@ -613,7 +635,11 @@ - NULL, vbox_bo_ttm_destroy); - #endif - if (ret) -- goto err_free_vboxbo; -+ { -+ /* In case of failure, ttm_bo_init() supposed to call -+ * vbox_bo_ttm_destroy() which in turn will free @vboxbo. */ -+ goto err_exit; -+ } - - *pvboxbo = vboxbo; - -@@ -621,12 +647,15 @@ - - err_free_vboxbo: - kfree(vboxbo); -+err_exit: - return ret; - } - - static inline u64 vbox_bo_gpu_offset(struct vbox_bo *bo) - { --#if RTLNX_VER_MIN(5,9,0) || RTLNX_RHEL_MIN(8,4) || RTLNX_SUSE_MAJ_PREREQ(15,3) -+#if RTLNX_VER_MIN(5,14,0) -+ return bo->bo.resource->start << PAGE_SHIFT; -+#elif RTLNX_VER_MIN(5,9,0) || RTLNX_RHEL_MIN(8,4) || RTLNX_SUSE_MAJ_PREREQ(15,3) - return bo->bo.mem.start << PAGE_SHIFT; - #else - return bo->bo.offset; -@@ -685,7 +714,7 @@ - struct ttm_operation_ctx ctx = { false, false }; - # endif - #endif -- int ret; -+ int ret = 0; - #if RTLNX_VER_MAX(5,11,0) - int i; - #endif -@@ -765,6 +794,7 @@ - { - struct drm_file *file_priv; - struct vbox_private *vbox; -+ int ret = -EINVAL; - - if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) - return -EINVAL; -@@ -772,5 +802,12 @@ - file_priv = filp->private_data; - vbox = file_priv->minor->dev->dev_private; - -- return ttm_bo_mmap(filp, vma, &vbox->ttm.bdev); -+#if RTLNX_VER_MIN(5,14,0) -+ if (drm_dev_is_unplugged(file_priv->minor->dev)) -+ return -ENODEV; -+ ret = drm_gem_mmap(filp, vma); -+#else -+ ret = ttm_bo_mmap(filp, vma, &vbox->ttm.bdev); -+#endif -+ return ret; - } -Index: a/src/VBox/Additions/linux/drm/vbox_fb.c -=================================================================== ---- a/src/VBox/Additions/linux/drm/vbox_fb.c (revision 89690) -+++ a/src/VBox/Additions/linux/drm/vbox_fb.c (revision 90498) -@@ -301,7 +301,9 @@ - return ret; - } - --#if RTLNX_VER_MIN(5,12,0) -+#if RTLNX_VER_MIN(5,14,0) -+ ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.resource->num_pages, &bo->kmap); -+#elif RTLNX_VER_MIN(5,12,0) - ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.mem.num_pages, &bo->kmap); - #else - ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &bo->kmap); -@@ -337,8 +339,8 @@ - * This seems to be done for safety checking that the framebuffer - * is not registered twice by different drivers. - */ -- info->apertures->ranges[0].base = pci_resource_start(dev->pdev, 0); -- info->apertures->ranges[0].size = pci_resource_len(dev->pdev, 0); -+ info->apertures->ranges[0].base = pci_resource_start(VBOX_DRM_TO_PCI_DEV(dev), 0); -+ info->apertures->ranges[0].size = pci_resource_len(VBOX_DRM_TO_PCI_DEV(dev), 0); - - #if RTLNX_VER_MIN(5,2,0) || RTLNX_RHEL_MAJ_PREREQ(8,2) - /* -Index: a/src/VBox/Additions/linux/drm/vbox_drv.c -=================================================================== ---- a/src/VBox/Additions/linux/drm/vbox_drv.c (revision 89690) -+++ a/src/VBox/Additions/linux/drm/vbox_drv.c (revision 90498) -@@ -43,6 +43,10 @@ - # include <drm/drm_probe_helper.h> - #endif - -+#if RTLNX_VER_MIN(5,14,0) -+# include <drm/drm_aperture.h> -+#endif -+ - #include "version-generated.h" - #include "revision-generated.h" - -@@ -65,12 +69,23 @@ - struct drm_device *dev = NULL; - int ret = 0; - -+# if RTLNX_VER_MIN(5,14,0) -+ ret = drm_aperture_remove_conflicting_pci_framebuffers(pdev, "vboxvideofb"); -+ if (ret) -+ { -+ printk("unable to remove conflicting framebuffer devices\n"); -+ return ret; -+ } -+# endif /* 5.14 */ -+ - dev = drm_dev_alloc(&driver, &pdev->dev); - if (IS_ERR(dev)) { - ret = PTR_ERR(dev); - goto err_drv_alloc; - } -+#if RTLNX_VER_MAX(5,14,0) - dev->pdev = pdev; -+#endif - pci_set_drvdata(pdev, dev); - - ret = vbox_driver_load(dev); -@@ -125,7 +140,7 @@ - - drm_kms_helper_poll_disable(dev); - -- pci_save_state(dev->pdev); -+ pci_save_state(VBOX_DRM_TO_PCI_DEV(dev)); - - drm_fb_helper_set_suspend_unlocked(&vbox->fbdev->helper, true); - -@@ -147,7 +162,7 @@ - { - int ret; - -- if (pci_enable_device(dev->pdev)) -+ if (pci_enable_device(VBOX_DRM_TO_PCI_DEV(dev))) - return -EIO; - - ret = vbox_drm_thaw(dev); -Index: a/src/VBox/Additions/linux/drm/vbox_irq.c -=================================================================== ---- a/src/VBox/Additions/linux/drm/vbox_irq.c (revision 89690) -+++ a/src/VBox/Additions/linux/drm/vbox_irq.c (revision 90498) -@@ -206,7 +206,7 @@ - INIT_WORK(&vbox->hotplug_work, vbox_hotplug_worker); - vbox_update_mode_hints(vbox); - #if RTLNX_VER_MIN(3,16,0) || RTLNX_RHEL_MAJ_PREREQ(7,1) -- return drm_irq_install(vbox->dev, vbox->dev->pdev->irq); -+ return drm_irq_install(vbox->dev, VBOX_DRM_TO_PCI_DEV(vbox->dev)->irq); - #else - return drm_irq_install(vbox->dev); - #endif diff --git a/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/r90497-regops-5.14-fix.patch b/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/r90497-regops-5.14-fix.patch deleted file mode 100644 index 0d960fa4f5..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/r90497-regops-5.14-fix.patch +++ /dev/null @@ -1,118 +0,0 @@ -Subject: Fix regops build errors with linux 5.14 - -Upstream-Status: backport - -svn-id: r90497 - -Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> - -Index: a/src/VBox/Additions/linux/sharedfolders/regops.c -=================================================================== ---- a/src/VBox/Additions/linux/sharedfolders/regops.c (revision 88716) -+++ a/src/VBox/Additions/linux/sharedfolders/regops.c (revision 90497) -@@ -2126,7 +2126,11 @@ - int rc = 0; - - Assert(iov_iter_count(iter) + pStash->cb > 0); -+# if RTLNX_VER_MIN(5,14,0) -+ if (!(iter->iter_type & ITER_KVEC)) { -+#else - if (!(iter->type & ITER_KVEC)) { -+#endif - /* - * Do we have a stashed page? - */ -@@ -2372,7 +2376,9 @@ - static size_t vbsf_iter_max_span_of_pages(struct iov_iter *iter) - { - size_t cPages; --# if RTLNX_VER_MIN(3,16,0) -+#if RTLNX_VER_MIN(5,14,0) -+ if (iter_is_iovec(iter) || (iter->iter_type & ITER_KVEC)) { -+#elif RTLNX_VER_MIN(3,16,0) - if (iter_is_iovec(iter) || (iter->type & ITER_KVEC)) { - #endif - const struct iovec *pCurIov = iter->iov; -@@ -2436,7 +2442,11 @@ - } else { - /* Won't bother with accurate counts for the next two types, just make - some rough estimates (does pipes have segments?): */ -+# if RTLNX_VER_MIN(5,14,0) -+ size_t cSegs = iter->iter_type & ITER_BVEC ? RT_MAX(1, iter->nr_segs) : 1; -+# else - size_t cSegs = iter->type & ITER_BVEC ? RT_MAX(1, iter->nr_segs) : 1; -+#endif - cPages = (iov_iter_count(iter) + (PAGE_SIZE * 2 - 2) * cSegs) >> PAGE_SHIFT; - } - # endif -@@ -2588,8 +2598,14 @@ - struct vbsf_reg_info *sf_r = kio->ki_filp->private_data; - struct vbsf_super_info *pSuperInfo = VBSF_GET_SUPER_INFO(inode->i_sb); - -+#if RTLNX_VER_MIN(5,14,0) - SFLOGFLOW(("vbsf_reg_read_iter: inode=%p file=%p size=%#zx off=%#llx type=%#x\n", -+ inode, kio->ki_filp, cbToRead, kio->ki_pos, iter->iter_type)); -+#else -+ SFLOGFLOW(("vbsf_reg_read_iter: inode=%p file=%p size=%#zx off=%#llx type=%#x\n", - inode, kio->ki_filp, cbToRead, kio->ki_pos, iter->type)); -+#endif -+ - AssertReturn(S_ISREG(inode->i_mode), -EINVAL); - - /* -@@ -2823,9 +2839,13 @@ - bool const fAppend = RT_BOOL(kio->ki_filp->f_flags & O_APPEND); - # endif - -- -+#if RTLNX_VER_MIN(5,14,0) - SFLOGFLOW(("vbsf_reg_write_iter: inode=%p file=%p size=%#zx off=%#llx type=%#x\n", -+ inode, kio->ki_filp, cbToWrite, offFile, iter->iter_type)); -+#else -+ SFLOGFLOW(("vbsf_reg_write_iter: inode=%p file=%p size=%#zx off=%#llx type=%#x\n", - inode, kio->ki_filp, cbToWrite, offFile, iter->type)); -+#endif - AssertReturn(S_ISREG(inode->i_mode), -EINVAL); - - /* -@@ -3737,7 +3757,27 @@ - } - #endif /* KERNEL_VERSION >= 2.6.24 */ - -+#if RTLNX_VER_MIN(5,14,0) -+static int vbsf_write_end(struct file *file, struct address_space *mapping, -+ loff_t pos, unsigned int len, unsigned int copied, -+ struct page *page, void *fsdata) -+{ -+ static uint64_t volatile s_cCalls = 0; -+ if (s_cCalls++ < 16) -+ { -+ printk("vboxsf: Unexpected call to vbsf_write_end(pos=%#llx len=%#x)! Please report.\n", -+ (unsigned long long)pos, len); -+ RTLogBackdoorPrintf("vboxsf: Unexpected call to vbsf_write_end(pos=%#llx len=%#x)! Please report.\n", -+ (unsigned long long)pos, len); -+# ifdef WARN_ON -+ WARN_ON(1); -+# endif -+ } - -+ return -ENOTSUPP; -+} -+#endif -+ - #if RTLNX_VER_MIN(2,4,10) - - # ifdef VBOX_UEK -@@ -3791,8 +3831,11 @@ - #if RTLNX_VER_MIN(2,5,12) - .set_page_dirty = __set_page_dirty_buffers, - #endif --#if RTLNX_VER_MIN(2,6,24) -+#if RTLNX_VER_MIN(5,14,0) - .write_begin = vbsf_write_begin, -+ .write_end = vbsf_write_end, -+#elif RTLNX_VER_MIN(2,6,24) -+ .write_begin = vbsf_write_begin, - .write_end = simple_write_end, - #elif RTLNX_VER_MIN(2,5,45) - .prepare_write = simple_prepare_write, diff --git a/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.26.bb b/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.28.bb index 84651ae64a..0265e38f5f 100644 --- a/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.26.bb +++ b/meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.28.bb @@ -13,12 +13,10 @@ VBOX_NAME = "VirtualBox-${PV}" SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \ file://Makefile.utils \ - file://r89690-5.14-fixes.patch \ - file://r90497-regops-5.14-fix.patch \ " -SRC_URI[md5sum] = "fce04bbef244b4df1a50e53d132d3e6f" -SRC_URI[sha256sum] = "0212602eea878d6c9fd7f4a3e0182da3e4505f31d25f5539fb8f7b1fbe366195" +SRC_URI[md5sum] = "c6efae8dc115b90c6124e13126794c4f" +SRC_URI[sha256sum] = "8d34993d8e9c0cf35e7bd44dd26c8c757f17a3b7d5a64052f945d00fd798ebfe" S ?= "${WORKDIR}/vbox_module" S:task-patch = "${WORKDIR}/${VBOX_NAME}" @@ -56,7 +54,7 @@ do_configure:prepend() { # compile and install mount utility do_compile() { oe_runmake all - oe_runmake 'LD=${CC}' 'LDFLAGS=${LDFLAGS}' -C ${S}/utils + oe_runmake 'LD=${CC}' 'EXTRA_CFLAGS=-I${STAGING_KERNEL_BUILDDIR}/include/' 'LDFLAGS=${LDFLAGS}' -C ${S}/utils if ! [ -e vboxguest.ko -a -e vboxsf.ko -a -e vboxvideo.ko ] ; then echo "ERROR: One of vbox*.ko modules wasn't built" exit 1 diff --git a/meta-openembedded/meta-oe/recipes-support/xorg-xrdp/xorgxrdp_0.2.5.bb b/meta-openembedded/meta-oe/recipes-support/xorg-xrdp/xorgxrdp_0.2.5.bb index fd22defb24..25dbe1379c 100644 --- a/meta-openembedded/meta-oe/recipes-support/xorg-xrdp/xorgxrdp_0.2.5.bb +++ b/meta-openembedded/meta-oe/recipes-support/xorg-xrdp/xorgxrdp_0.2.5.bb @@ -21,3 +21,5 @@ S = "${WORKDIR}/git" FILES:${PN} += "${libdir}/xorg/modules/*" INSANE_SKIP:${PN} += "xorg-driver-abi" + +PNBLACKLIST[xorgxrdp] ?= "Depends on xrdp which needs porting to openssl 3.x" diff --git a/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp_0.9.16.bb b/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp_0.9.17.bb index 6d8659844c..e933c6679f 100644 --- a/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp_0.9.16.bb +++ b/meta-openembedded/meta-oe/recipes-support/xrdp/xrdp_0.9.17.bb @@ -16,7 +16,7 @@ SRC_URI = "git://github.com/neutrinolabs/xrdp.git;branch=devel \ file://0001-Fix-the-compile-error.patch \ file://0001-arch-Define-NO_NEED_ALIGN-on-ppc64.patch \ " -SRCREV = "a4c7ee077c049202d73f82f518b2de958d722890" +SRCREV = "58088324956d94fd2eb5e7694a318cccec6990f1" S = "${WORKDIR}/git" @@ -92,3 +92,4 @@ pkg_postinst:${PN}() { fi fi } +PNBLACKLIST[xrdp] ?= "Needs porting to openssl 3.x" diff --git a/meta-openembedded/meta-perl/recipes-perl/libcrypt/files/0001-Fix-for-Issue-31.patch b/meta-openembedded/meta-perl/recipes-perl/libcrypt/files/0001-Fix-for-Issue-31.patch new file mode 100644 index 0000000000..a5ea43f88b --- /dev/null +++ b/meta-openembedded/meta-perl/recipes-perl/libcrypt/files/0001-Fix-for-Issue-31.patch @@ -0,0 +1,37 @@ +From 5e8202458e41ba1f7801746c503fe7c60ae340d5 Mon Sep 17 00:00:00 2001 +From: kambe-mikb <77083885+kambe-mikb@users.noreply.github.com> +Date: Tue, 28 Sep 2021 17:40:18 +1000 +Subject: [PATCH] Fix for Issue 31 + +Fix Issue 31 by removing reference to RSA_SSLV23_PADDING (removed from OpenSSL starting from v3.0.0) + +Upstream-Status: Submitted [https://github.com/toddr/Crypt-OpenSSL-RSA/pull/32] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + RSA.xs | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/RSA.xs b/RSA.xs +index 46cb199..4f65dfc 100644 +--- a/RSA.xs ++++ b/RSA.xs +@@ -640,12 +640,16 @@ use_pkcs1_oaep_padding(p_rsa) + CODE: + p_rsa->padding = RSA_PKCS1_OAEP_PADDING; + ++#if OPENSSL_VERSION_NUMBER < 0x30000000L ++ + void + use_sslv23_padding(p_rsa) + rsaData* p_rsa; + CODE: + p_rsa->padding = RSA_SSLV23_PADDING; + ++#endif ++ + # Sign text. Returns the signature. + + SV* +-- +2.33.1 + diff --git a/meta-openembedded/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.31.bb b/meta-openembedded/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.32.bb index 9a42b52cb6..8dd2574e97 100644 --- a/meta-openembedded/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.31.bb +++ b/meta-openembedded/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.32.bb @@ -3,10 +3,11 @@ SECTION = "libs" LICENSE = "Artistic-1.0 | GPL-1.0+" LIC_FILES_CHKSUM = "file://LICENSE;md5=a67ceecc5d9a91a5a0d003ba50c26346" -SRC_URI = "http://www.cpan.org/modules/by-module/Crypt/Crypt-OpenSSL-RSA-${PV}.tar.gz " +SRC_URI = "http://www.cpan.org/modules/by-module/Crypt/Crypt-OpenSSL-RSA-${PV}.tar.gz \ + file://0001-Fix-for-Issue-31.patch \ +" -SRC_URI[md5sum] = "d33681e19d2094df7c26bc7a4509265e" -SRC_URI[sha256sum] = "4173403ad4cf76732192099f833fbfbf3cd8104e0246b3844187ae384d2c5436" +SRC_URI[sha256sum] = "adc74f0ae125c77f65d5dd32abb9c3429300a79543bf263494f333f9c0b62a61" DEPENDS += "libcrypt-openssl-guess-perl-native openssl" diff --git a/meta-openembedded/meta-perl/recipes-perl/libencode/libencode-perl_3.12.bb b/meta-openembedded/meta-perl/recipes-perl/libencode/libencode-perl_3.16.bb index 90ae623f79..2286ee5249 100644 --- a/meta-openembedded/meta-perl/recipes-perl/libencode/libencode-perl_3.12.bb +++ b/meta-openembedded/meta-perl/recipes-perl/libencode/libencode-perl_3.16.bb @@ -15,7 +15,7 @@ LICENSE = "Artistic-1.0 | GPL-1.0+" LIC_FILES_CHKSUM = "file://META.json;beginline=8;endline=10;md5=b12e3be1e17a7e99ca4f429ff32c28b5" SRC_URI = "${CPAN_MIRROR}/authors/id/D/DA/DANKOGAI/Encode-${PV}.tar.gz" -SRC_URI[sha256sum] = "38da5b7f74bc402075f5994557b5f1426636291efea0f39fcdf4b1366b0756fd" +SRC_URI[sha256sum] = "e5e91d98a97de70dccecc2a25d049a0b5f5f12228c618680020d73043355294c" UPSTREAM_CHECK_REGEX = "Encode\-(?P<pver>(\d+\.\d+))(?!_\d+).tar" diff --git a/meta-openembedded/meta-python/recipes-connectivity/python-h2/python3-h2_4.0.0.bb b/meta-openembedded/meta-python/recipes-connectivity/python-h2/python3-h2_4.1.0.bb index 8c488fe2c6..c2d58846df 100644 --- a/meta-openembedded/meta-python/recipes-connectivity/python-h2/python3-h2_4.0.0.bb +++ b/meta-openembedded/meta-python/recipes-connectivity/python-h2/python3-h2_4.1.0.bb @@ -4,8 +4,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=aa3b9b4395563dd427be5f022ec321c1" -SRC_URI[md5sum] = "d086f6a9746a5f4eeb63bb3d0a482e1f" -SRC_URI[sha256sum] = "bb7ac7099dd67a857ed52c815a6192b6b1f5ba6b516237fc24a085341340593d" +SRC_URI[sha256sum] = "a83aca08fbe7aacb79fec788c9c0bac936343560ed9ec18b82a13a12c28d2abb" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-connectivity/python-thrift/python3-thrift_0.13.0.bb b/meta-openembedded/meta-python/recipes-connectivity/python-thrift/python3-thrift_0.15.0.bb index d62ba66223..78cbba6b27 100644 --- a/meta-openembedded/meta-python/recipes-connectivity/python-thrift/python3-thrift_0.13.0.bb +++ b/meta-openembedded/meta-python/recipes-connectivity/python-thrift/python3-thrift_0.15.0.bb @@ -1,9 +1,8 @@ SUMMARY = "Python bindings for the Apache Thrift RPC system" LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://PKG-INFO;md5=e95cd2f17c70d3180a2b361332319fe0" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=7145f7cdd263359b62d342a02f005515" -SRC_URI[md5sum] = "c3bc8d9a910d2c9ce26f2ad1f7c96762" -SRC_URI[sha256sum] = "9af1c86bf73433afc6010ed376a6c6aca2b54099cc0d61895f640870a9ae7d89" +SRC_URI[sha256sum] = "87c8205a71cf8bbb111cb99b1f7495070fbc9cabb671669568854210da5b3e29" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb b/meta-openembedded/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb index 550b0269dc..f0159f8234 100644 --- a/meta-openembedded/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb +++ b/meta-openembedded/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb @@ -279,6 +279,7 @@ RDEPENDS:packagegroup-meta-python3 = "\ python3-pocketsphinx \ python3-polyline \ python3-portalocker \ + python3-posix-ipc \ python3-prctl \ python3-precise-runner \ python3-pretend \ diff --git a/meta-openembedded/meta-python/recipes-devtools/gyp/gyp/0001-Fix-for-Python-3.10-compatibility.patch b/meta-openembedded/meta-python/recipes-devtools/gyp/gyp/0001-Fix-for-Python-3.10-compatibility.patch new file mode 100644 index 0000000000..2b88023fe8 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/gyp/gyp/0001-Fix-for-Python-3.10-compatibility.patch @@ -0,0 +1,25 @@ +From bfe579283e5fcab60172818bfe4e6e1d40c2bed0 Mon Sep 17 00:00:00 2001 +From: Kurt Kiefer <kurt.kiefer@arthrex.com> +Date: Mon, 18 Oct 2021 11:21:14 -0700 +Subject: [PATCH] Fix for Python 3.10 compatibility + +The collections.abc module replaces collections for Python 3.10 + +Signed-off-by: Kurt Kiefer <kurt.kiefer@arthrex.com> +--- + pylib/gyp/common.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pylib/gyp/common.py b/pylib/gyp/common.py +index b268d229..4f9cb0ec 100644 +--- a/pylib/gyp/common.py ++++ b/pylib/gyp/common.py +@@ -494,7 +494,7 @@ def uniquer(seq, idfun=None): + + + # Based on http://code.activestate.com/recipes/576694/. +-class OrderedSet(collections.MutableSet): ++class OrderedSet(collections.abc.MutableSet): + def __init__(self, iterable=None): + self.end = end = [] + end += [None, end, end] # sentinel node for doubly linked list diff --git a/meta-openembedded/meta-python/recipes-devtools/gyp/gyp_git.bb b/meta-openembedded/meta-python/recipes-devtools/gyp/gyp_git.bb index d668d1ca10..73329cec7c 100644 --- a/meta-openembedded/meta-python/recipes-devtools/gyp/gyp_git.bb +++ b/meta-openembedded/meta-python/recipes-devtools/gyp/gyp_git.bb @@ -4,7 +4,9 @@ LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=ab828cb8ce4c62ee82945a11247b6bbd" SECTION = "devel" -SRC_URI = "git://chromium.googlesource.com/external/gyp;protocol=https" +SRC_URI = "git://chromium.googlesource.com/external/gyp;protocol=https \ + file://0001-Fix-for-Python-3.10-compatibility.patch \ + " SRCREV = "caa60026e223fc501e8b337fd5086ece4028b1c6" S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-absl_0.13.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-absl_0.15.0.bb index 2ebd358e5a..f25201dc3f 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-absl_0.13.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-absl_0.15.0.bb @@ -4,8 +4,7 @@ SECTION = "devel/python" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" -SRC_URI[md5sum] = "afb3ffb4b59d53575e8eb073c3a52803" -SRC_URI[sha256sum] = "6953272383486044699fd0e9f00aad167a27e08ce19aae66c6c4b10e7e767793" +SRC_URI[sha256sum] = "72d782fbeafba66ba3e525d46bccac949b9a174dbf66233e50ece09ee688dc81" PYPI_PACKAGE = "absl-py" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_2.6.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_2.6.3.bb index c79a922a29..e9cbde84d8 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_2.6.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_2.6.3.bb @@ -4,7 +4,7 @@ SECTION = "devel/python" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=dab31a1d28183826937f4b152143a33f" -SRC_URI[sha256sum] = "1374f7fc50bac46375e18ce7d511515265ce83c9180f312e60a36d63055f0104" +SRC_URI[sha256sum] = "ce9c240ca3eb1394c56503b403589f4d0ee7f93445a578b78da8b7879a65c863" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.6.5.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.7.4.bb index e1f29cad22..17e9e533cd 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.6.5.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.7.4.bb @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c4ece55266dcdd02ce165b1ee0e490bb" inherit pypi setuptools3 -SRC_URI[sha256sum] = "a21fedebb3fb8f6bbbba51a11114f08c78709377051384c9c5ead5705ee93a51" +SRC_URI[sha256sum] = "9d33f3ff1488c4bfab1e1a6dfebbf085e8a8e1a3e047a43ad29ad1f67f012a1d" PYPI_PACKAGE = "alembic" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-anyjson/0001-setup.py-Do-not-use-2to3.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-anyjson/0001-setup.py-Do-not-use-2to3.patch new file mode 100644 index 0000000000..2b9e6e52e8 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-anyjson/0001-setup.py-Do-not-use-2to3.patch @@ -0,0 +1,29 @@ +From 4fb61d7c621599b0db9c2c45f4243f07936c5953 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 13 Oct 2021 08:20:00 -0700 +Subject: [PATCH] setup.py: Do not use 2to3 + +This helps compiling with setuptools 0.58+ +and it seems to compile fine with python3 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + setup.py | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/setup.py b/setup.py +index 9fe4902..f2098e1 100644 +--- a/setup.py ++++ b/setup.py +@@ -2,8 +2,6 @@ import os + import sys + + extra = {} +-if sys.version_info >= (3, 0): +- extra.update(use_2to3=True) + + try: + from setuptools import setup, find_packages +-- +2.33.0 + diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-anyjson_0.3.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-anyjson_0.3.3.bb index 07cc99860d..2b8abb8b80 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-anyjson_0.3.3.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-anyjson_0.3.3.bb @@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=989aa97e73c912a83a3c873fa11deb08" inherit pypi setuptools3 ptest SRC_URI += " \ + file://0001-setup.py-Do-not-use-2to3.patch \ file://run-ptest \ " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_2.7.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_2.8.2.bb index 4ed051d22d..f465ba992d 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_2.7.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_2.8.2.bb @@ -4,7 +4,7 @@ SECTION = "devel/python" LICENSE = "LGPL-2.1" LIC_FILES_CHKSUM = "file://LICENSE;md5=a70cf540abf41acb644ac3b621b2fad1" -SRC_URI[sha256sum] = "f3083366b7bb8b3a72c0e12841ab07f14b0d7ff5cc1c89676b84d8f5832e4b61" +SRC_URI[sha256sum] = "304e99c129794f2cfda584a12b71fde85205da950e2f330f4be09150525ae949" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-behave_1.2.6.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-behave_1.2.6.bb index 04e24a607f..89bf29fd7a 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-behave_1.2.6.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-behave_1.2.6.bb @@ -3,10 +3,13 @@ HOMEPAGE = "https://github.com/behave/behave" LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=d950439e8ea6ed233e4288f5e1a49c06" -SRC_URI[md5sum] = "3f05c859a1c45f5ed33e925817ad887d" -SRC_URI[sha256sum] = "b9662327aa53294c1351b0a9c369093ccec1d21026f050c3bd9b3e5cccf81a86" +PV .= "+git${SRCREV}" +SRCREV = "9520119376046aeff73804b5f1ea05d87a63f370" +SRC_URI += "git://github.com/behave/behave;branch=master" -inherit pypi setuptools3 +S = "${WORKDIR}/git" + +inherit setuptools3 RDEPENDS:${PN} += " \ ${PYTHON_PN}-parse-type \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cachetools_4.2.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cachetools_4.2.4.bb index 58994d7096..1040dc7e5a 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-cachetools_4.2.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-cachetools_4.2.4.bb @@ -27,6 +27,6 @@ do_install_ptest() { cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ } -SRC_URI[sha256sum] = "61b5ed1e22a0924aed1d23b478f37e8d52549ff8a961de2909c69bf950020cff" +SRC_URI[sha256sum] = "89ea6f1b638d5a73a4f9226be57ac5e4f399d22770b92355f92dcb0f7f001693" BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_36.2.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_36.4.0.bb index 632175cc43..ec7d4b87e7 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_36.2.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_36.4.0.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/eerimoq/cantools" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=d9aa4ec07de78abae21c490c9ffe61bd" -SRC_URI[sha256sum] = "31bcdd56cbb5e26decab42f0624c8cead9b94991f6ee922512b0acd6ae7d6da2" +SRC_URI[sha256sum] = "8de959fe61bd1d5c30e91aded237f4273c13fafe5fee4d1d78a15a84c8fd9691" PYPI_PACKAGE = "cantools" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cbor2_5.4.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cbor2_5.4.2.bb index 9f0242de48..d3f6cd8c16 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-cbor2_5.4.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-cbor2_5.4.2.bb @@ -4,7 +4,7 @@ DEPENDS +="${PYTHON_PN}-setuptools-scm-native" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" -SRC_URI[sha256sum] = "a8bf432f6cb595f50aeb8fed2a4aa3b3f7caa7f135fb57e4378eaa39242feac9" +SRC_URI[sha256sum] = "e283e70b55a049ff364cc5e648fde587e4d9b0e87e4b2664c69e639135e6b3b8" inherit pypi setuptools3 ptest diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-certifi_2021.5.30.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-certifi_2021.10.8.bb index ef2c66b14e..4c376da897 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-certifi_2021.5.30.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-certifi_2021.10.8.bb @@ -7,7 +7,7 @@ HOMEPAGE = " http://certifi.io/" LICENSE = "ISC" LIC_FILES_CHKSUM = "file://LICENSE;md5=67da0714c3f9471067b729eca6c9fbe8" -SRC_URI[sha256sum] = "2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee" +SRC_URI[sha256sum] = "78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cffi_1.14.6.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cffi_1.15.0.bb index 529d8960a8..c36f23b3dd 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-cffi_1.14.6.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-cffi_1.15.0.bb @@ -4,7 +4,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=5677e2fdbf7cdda61d6dd2b57df547bf" DEPENDS += "libffi ${PYTHON_PN}-pycparser" -SRC_URI[sha256sum] = "c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd" +SRC_URI[sha256sum] = "920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-click_8.0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-click_8.0.3.bb index c8b9a429ed..c31d065673 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-click_8.0.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-click_8.0.3.bb @@ -8,7 +8,7 @@ HOMEPAGE = "http://click.pocoo.org/" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=1fa98232fd645608937a0fdc82e999b8" -SRC_URI[sha256sum] = "8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a" +SRC_URI[sha256sum] = "410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b" inherit pypi setuptools3 ptest diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-colorlog_6.4.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-colorlog_6.5.0.bb index 59a0e94939..bd90083308 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-colorlog_6.4.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-colorlog_6.5.0.bb @@ -7,4 +7,4 @@ inherit pypi setuptools3 PYPI_PACKAGE = "colorlog" -SRC_URI[sha256sum] = "af99440154a01f27c09256760ea3477982bf782721feaa345904e806879df4d8" +SRC_URI[sha256sum] = "cf62a8e389d5660d0d22be17937b25b9abef9497ddc940197d1773aa1f604339" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-configargparse_1.5.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-configargparse_1.5.3.bb index e4b6797182..7d21375548 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-configargparse_1.5.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-configargparse_1.5.3.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/bw2/ConfigArgParse" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=da746463714cc35999ed9a42339f2943" -SRC_URI[sha256sum] = "c39540eb4843883d526beeed912dc80c92481b0c13c9787c91e614a624de3666" +SRC_URI[sha256sum] = "1b0b3cbf664ab59dada57123c81eff3d9737e0d11d8cf79e3d6eb10823f1739f" PYPI_PACKAGE = "ConfigArgParse" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_5.5.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_6.0.2.bb index c780a63ae9..67b3a5ef93 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_5.5.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_6.0.2.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://coverage.readthedocs.io" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ee41112a44fe7014dce33e26468ba93" -SRC_URI[sha256sum] = "ebe78fe9a0e874362175b02371bdfbee64d8edc42a044253ddf4ee7d3c15212c" +SRC_URI[sha256sum] = "6807947a09510dc31fa86f43595bf3a14017cd60bf633cc746d52141bfa6b149" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cryptography-vectors_3.4.8.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cryptography-vectors_35.0.0.bb index 2fb48f3cf7..474eb82343 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-cryptography-vectors_3.4.8.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-cryptography-vectors_35.0.0.bb @@ -4,7 +4,7 @@ SECTION = "devel/python" LICENSE = "Apache-2.0 | BSD" LIC_FILES_CHKSUM = "file://LICENSE;md5=8c3617db4fb6fae01f1d253ab91511e4" -SRC_URI[sha256sum] = "4c84410257993d3de058b44b777a49e1da2ae35ebea2970a360c7e3aa0f580f2" +SRC_URI[sha256sum] = "978ad96822c0e007a0a3d8187eb0eafbd9eb1d67b50cfac70277175e74957bfc" PYPI_PACKAGE = "cryptography_vectors" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cvxopt_1.2.6.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cvxopt_1.2.7.bb index cc017dd833..3f35149f96 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-cvxopt_1.2.6.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-cvxopt_1.2.7.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ba1a8a73d8ebea5c47a1173aaf476ddd" SRC_URI = "git://github.com/cvxopt/cvxopt;protocol=https" -SRCREV = "60fdb838e0bb2d8f32ba51129552c83b55acd2a7" +SRCREV = "d5a21cf1da62e4269176384b1ff62edac5579f94" S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-dateparser_1.0.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-dateparser_1.1.0.bb index 3d6995adb8..5b661a0863 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-dateparser_1.0.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-dateparser_1.1.0.bb @@ -3,8 +3,7 @@ HOMEPAGE = "https://github.com/scrapinghub/dateparser" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=3d3ed25571191e7aa3f55d0a6efe0051" -SRC_URI[md5sum] = "24a06a429597239004d47e6b93991aaf" -SRC_URI[sha256sum] = "159cc4e01a593706a15cd4e269a0b3345edf3aef8bf9278a57dac8adf5bf1e4a" +SRC_URI[sha256sum] = "faa2b97f51f3b5ff1ba2f17be90de2b733fb6191f89b4058787473e8202f3044" PYPI_PACKAGE = "dateparser" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-elementpath_2.2.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-elementpath_2.3.2.bb index 1801fc26b8..4c94d93782 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-elementpath_2.2.3.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-elementpath_2.3.2.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/sissaschool/elementpath" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=5dbb7fb7d72da3921202dd7b995d3ecf" -SRC_URI[sha256sum] = "60139b91ef9646e27381fd62b8c38f1fc8ebc78dc4bc231c08c51240062e58e6" +SRC_URI[sha256sum] = "392f32a5efdf15c14f3f56ef8422364f8b0a74a12f51a66d9c903c172fe3594b" PYPI_PACKAGE = "elementpath" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.30.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.32.0.bb index 80869a2597..3848150e46 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.30.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.32.0.bb @@ -4,8 +4,7 @@ SECTION = "devel/python" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=56472ad6de4caf50e05332a34b66e778" -SRC_URI[md5sum] = "ebf5794e3f7a9f1778fb4f2a58eb7614" -SRC_URI[sha256sum] = "1811b122d9a45eb5bafba092d36911bca825f835cb648a862bbf984030acff9d" +SRC_URI[sha256sum] = "2f0bb8ed0dc0ab21d683975d5d8ab3c054d588ce61def9faf7a465ee363e839b" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_2.0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_2.0.2.bb index f1c0461470..e3f1df3562 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_2.0.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_2.0.2.bb @@ -6,7 +6,7 @@ HOMEPAGE = "https://github.com/mitsuhiko/flask/" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75" -SRC_URI[sha256sum] = "1c4c257b1892aec1398784c63791cbaa43062f1f7aeb555c4da961b20ee68f55" +SRC_URI[sha256sum] = "7b2fb8e934ddd50731893bdcdb00fc8c0315916f9fcd50d22c7cc1a95ab634e2" PYPI_PACKAGE = "Flask" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-gmpy2_2.0.8.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-gmpy2_2.1.0rc1.bb index 976f57ab26..d3150d665d 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-gmpy2_2.0.8.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-gmpy2_2.1.0rc1.bb @@ -7,8 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ DEPENDS += "gmp mpfr libmpc" PYPI_PACKAGE = "gmpy2" -PYPI_PACKAGE_EXT = "zip" -SRC_URI[sha256sum] = "dd233e3288b90f21b0bb384bcc7a7e73557bb112ccf0032ad52aa614eb373d3f" +SRC_URI[sha256sum] = "86cb6d8e5837560c32c706d48d6ed25676be6b3c79e6aa5d245965b9e99231b9" inherit pypi setuptools3 python3native BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.10.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.11.bb index eee47fefa0..0e6670b906 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.10.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.11.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/wialon/gmqtt" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=903f1792621a3b35ee546da75d139177" -SRC_URI[sha256sum] = "7ab7a226ab13d75f7bc34a1422da73658ce4cac86708bf55f92daf7c5f44165a" +SRC_URI[sha256sum] = "0be6d57841538abc3ae0a41131c6d53314e0705b74876a6f94bc903df1209fb6" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_1.31.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.1.1.bb index fe0aebb527..34489af727 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_1.31.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.1.1.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" inherit pypi setuptools3 -SRC_URI[sha256sum] = "108cf94336aed7e614eafc53933ef02adf63b9f0fd87e8f8212acaa09eaca456" +SRC_URI[sha256sum] = "646d9399c3c478fe475cfe523e84572ab31a340814ea977fb2774eca5a6549a2" RDEPENDS:${PN} += "\ ${PYTHON_PN}-asyncio \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.19.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.27.0.bb index 564058e98f..41ab48c6b7 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.19.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.27.0.bb @@ -4,7 +4,7 @@ HOMEPAGE = "https://github.com/googleapis/google-api-python-client" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" -SRC_URI[sha256sum] = "c89b345615188fbd525f52d59013156ad3bfd1023af27041f2dec3d7877ba112" +SRC_URI[sha256sum] = "659e9955f0f1e02fcce5dec85622eb5af1807572ef0f09c49d68d8426da670e7" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_1.34.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.3.0.bb index 92ad24800f..9d192c15ee 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_1.34.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.3.0.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" inherit pypi setuptools3 -SRC_URI[sha256sum] = "f1094088bae046fb06f3d1a3d7df14717e8d959e9105b79c57725bd4e17597a2" +SRC_URI[sha256sum] = "2800f6dfad29c6ced5faf9ca0c38ea8ba1ebe2559b10c029bd021e3de3301627" RDEPENDS:${PN} += "\ ${PYTHON_PN}-asyncio \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_1.1.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_1.1.2.bb index 9d014ec7a7..07c1436bfa 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_1.1.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_1.1.2.bb @@ -4,6 +4,6 @@ LICENSE = "MIT & PSF" LIC_FILES_CHKSUM = "file://LICENSE;md5=e95668d68e4329085c7ab3535e6a7aee \ file://LICENSE.PSF;md5=c106931d9429eda0492617f037b8f69a" -SRC_URI[sha256sum] = "c0f22774cd8294078bdf7392ac73cf00bfa1e5e0ed644bd064fdabc5f2a2f481" +SRC_URI[sha256sum] = "e30f5ea4ae2346e62cedde8794a56858a67b878dd79f7df76a0767e356b1744a" inherit pypi distutils3 setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.40.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.41.0.bb index f86bf008f7..55b8890997 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.40.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.41.0.bb @@ -11,7 +11,7 @@ DEPENDS += "${PYTHON_PN}-grpcio" SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch" -SRC_URI[sha256sum] = "d440f2bc089ff628618c536904d5bc39d0b44f7afdda4c4c1ecd15fcf385bfba" +SRC_URI[sha256sum] = "3891b1df82369acbc8451d4952cd20755f49a82398dce62437511ad17b47290e" RDEPENDS:${PN} = "${PYTHON_PN}-grpcio" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.40.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.41.0.bb index 1cfb967493..fb6f1a3e2d 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.40.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.41.0.bb @@ -12,7 +12,7 @@ SRC_URI:append:class-target = " file://ppc-boringssl-support.patch \ file://mips_bigendian.patch \ file://0001-absl-always-use-asm-sgidefs.h.patch \ " -SRC_URI[sha256sum] = "3d172158fe886a2604db1b6e17c2de2ab465fe0fe36aba2ec810ca8441cefe3a" +SRC_URI[sha256sum] = "15c04d695833c739dbb25c88eaf6abd9a461ec0dbd32f44bc8769335a495cf5a" RDEPENDS:${PN} = "${PYTHON_PN}-protobuf \ ${PYTHON_PN}-setuptools \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py_3.4.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py_3.5.0.bb index 89000b7936..aad2f91777 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py_3.4.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-h5py_3.5.0.bb @@ -4,7 +4,7 @@ SECTION = "devel/python" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=113251d71fb0384712c719b567261c5c" -SRC_URI[sha256sum] = "ee1c683d91ab010d5e85cb61e8f9e7ee0d8eab545bf3dd50a9618f1d0e8f615e" +SRC_URI[sha256sum] = "77c7be4001ac7d3ed80477de5b6942501d782de1bbe4886597bdfec2a7ab821f" SRC_URI:append = " \ file://0001-setup_build.py-avoid-absolute-path.patch \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-haversine_2.4.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-haversine_2.5.1.bb index 9eda659e1d..1ed67d3260 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-haversine_2.4.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-haversine_2.5.1.bb @@ -2,7 +2,7 @@ SUMMARY = "Calculate the distance between 2 points on Earth" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" -SRC_URI[sha256sum] = "6dcdee48b854b7bd0a121a04a2cb775dc7d9e2354f1e22d29ff62110189305b0" +SRC_URI[sha256sum] = "357e41dfddc4a0f2b1c941d92a590cac840f7ce4b3da14b45b68d968b3ad7cc7" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-httplib2_0.19.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-httplib2_0.20.1.bb index 3f244eccd4..8a0b6c9e5b 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-httplib2_0.19.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-httplib2_0.20.1.bb @@ -4,7 +4,7 @@ SECTION = "devel/python" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=56e5e931172b6164b62dc7c4aba6c8cf" -SRC_URI[sha256sum] = "0b12617eeca7433d4c396a100eaecfa4b08ee99aa881e6df6e257a7aad5d533d" +SRC_URI[sha256sum] = "0efbcb8bfbfbc11578130d87d8afcc65c2274c6eb446e59fc674e4d7c972d327" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_3.11.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_3.12.0.bb index aacda65ca5..1aecc5a967 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_3.11.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-humanize_3.12.0.bb @@ -5,7 +5,7 @@ SECTION = "devel/python" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENCE;md5=4ecc42519e84f6f3e23529464df7bd1d" -SRC_URI[sha256sum] = "4160cdc63fcd0daac27d2e1e218a31bb396fc3fe5712d153675d89432a03778f" +SRC_URI[sha256sum] = "5ec1a66e230a3e31fb3f184aab9436ea13d4e37c168e0ffc345ae5bb57e58be6" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-idna_3.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-idna_3.3.bb index 22f6402c3b..a0e6b79a56 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-idna_3.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-idna_3.3.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/kjd/idna" LICENSE = "BSD-3-Clause & Python-2.0 & Unicode" LIC_FILES_CHKSUM = "file://LICENSE.md;md5=239668a7c6066d9e0c5382e9c8c6c0e1" -SRC_URI[sha256sum] = "467fbad99067910785144ce333826c71fb0e63a425657295239737f7ecd125f3" +SRC_URI[sha256sum] = "9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_7.27.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_7.28.0.bb index 3c64b82c2d..c5d05a8dad 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_7.27.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_7.28.0.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING.rst;md5=59b20262b8663cdd094005bddf47af5f" PYPI_PACKAGE = "ipython" -SRC_URI[sha256sum] = "58b55ebfdfa260dad10d509702dc2857cb25ad82609506b070cf2d7b7df5af13" +SRC_URI[sha256sum] = "2097be5c814d1b974aea57673176a924c4c8c9583890e7a5f082f547b9975b11" RDEPENDS:${PN} = "\ ${PYTHON_PN}-setuptools \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-iso3166_1.0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-iso3166_2.0.2.bb index 8ff3059520..bc05f066a6 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-iso3166_1.0.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-iso3166_2.0.2.bb @@ -3,8 +3,7 @@ HOMEPAGE = "https://pypi.org/project/iso3166/" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5e2f4edc7e7408a82e4a1d05f229b695" -SRC_URI[md5sum] = "53c313c7ae8721e40ddd5e7a01bbcb7e" -SRC_URI[sha256sum] = "b1e58dbcf50fbb2c9c418ec7a6057f0cdb30b8f822ac852f72e71ba769dae8c5" +SRC_URI[sha256sum] = "04d02cfcfc18a6f8a9a4edb4d0a55e2e4fc575626c29d702f750de415e88d372" inherit pypi setuptools3 ptest diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-jdatetime_3.6.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-jdatetime_3.6.4.bb index cadddc49f5..ad1ca428fe 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-jdatetime_3.6.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-jdatetime_3.6.4.bb @@ -1,10 +1,9 @@ DESCRIPTION = "Jalali implementation of Python's datetime module" HOMEPAGE = "https://github.com/slashmili/python-jalali" LICENSE = "Python-2.0" -LIC_FILES_CHKSUM = "file://PKG-INFO;md5=fc0a323542d2fbe0ad822fa0b1a0a96f" +LIC_FILES_CHKSUM = "file://PKG-INFO;md5=f6890b2f685363312aff7f520831cdef" -SRC_URI[md5sum] = "3c9ee1bc7de48ff4d9c773046b2eb081" -SRC_URI[sha256sum] = "a589e35f0dab89283c1a3de9d70ed6cf657932aaed8e8ce1b0e5801aaab1da67" +SRC_URI[sha256sum] = "39d0be41076b3a3850c3bfa90817e7ed459edc0e9cadce37dc7229b11f121c7e" PYPI_PACKAGE = "jdatetime" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.1.0.bb index e325ad8777..e69cfefd1f 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.0.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.1.0.bb @@ -1,11 +1,10 @@ SUMMARY = "Joblib is a set of tools to provide lightweight pipelining in Python." LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=32b289008fb813a27c9025f02b59d03d" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2e481820abf0a70a18011a30153df066" inherit setuptools3 pypi -SRC_URI[md5sum] = "9914b330916395c0a1feca54949867a3" -SRC_URI[sha256sum] = "9c17567692206d2f3fb9ecf5e991084254fe631665c450b443761c4186a613f7" +SRC_URI[sha256sum] = "4158fcecd13733f8be669be0683b96ebdbbd38d23559f54dca7205aea1bf1e35" RDEPENDS:${PN} += " \ python3-asyncio \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-jsmin_2.2.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-jsmin_3.0.0.bb index 1a0578eddd..733c9639c7 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-jsmin_2.2.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-jsmin_3.0.0.bb @@ -5,8 +5,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3a3301ce2ad647e172f4a1016c67324d" inherit setuptools3 pypi ptest -SRC_URI[md5sum] = "00e7a3179a4591aab2ee707b3214e2fd" -SRC_URI[sha256sum] = "b6df99b2cd1c75d9d342e4335b535789b8da9107ec748212706ef7bbe5c2553b" +SRC_URI[sha256sum] = "88fc1bd6033a47c5911dbcada7d279c7a8b7ad0841909590f6a742c20c4d2e08" BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-jsonrpcserver_4.2.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-jsonrpcserver_5.0.3.bb index 492ed658ef..c2500300f1 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-jsonrpcserver_4.2.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-jsonrpcserver_5.0.3.bb @@ -1,9 +1,9 @@ SUMMARY = "Library to process JSON-RPC requests" HOMEPAGE = "https://github.com/bcb/jsonrpcserver" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c89120516900f96f4c60d35fdc4c3f15" +LIC_FILES_CHKSUM = "file://LICENSE;md5=61b63ea9d36f6fb63ddaaaac8265304f" -SRC_URI[sha256sum] = "0c9e5b9445621138521e912016ae39b3badadd2607140dcbb0c8062934ab4854" +SRC_URI[sha256sum] = "0cc514559596fa380bf188e31b0cdf3d9e6d9cc162fdca8a49ed511b291a9ae1" inherit pypi setuptools3 @@ -19,4 +19,3 @@ RDEPENDS:${PN} += "\ " BBCLASSEXTEND = "native nativesdk" - diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.0.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.0.0.bb index d046489021..a4ec62626b 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.0.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-kivy_2.0.0.bb @@ -56,7 +56,7 @@ DEPENDS += " \ python3-cython-native \ " -RDEPENDS_${PN} = " \ +RDEPENDS:${PN} = " \ gstreamer1.0 \ gstreamer1.0-python \ libsdl2 \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-address-openssl-3.x-build-issue.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-address-openssl-3.x-build-issue.patch new file mode 100644 index 0000000000..c67e50803b --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-address-openssl-3.x-build-issue.patch @@ -0,0 +1,28 @@ +From 0d824e5c2ab13e761ffaeabdccf9513d5b8f280d Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Fri, 8 Oct 2021 11:18:35 +0200 +Subject: [PATCH] setup.py: address openssl 3.x build issue + +swig throws: +| /home/alex/development/poky/build-metaoe/tmp/work/x86_64-linux/python3-m2crypto-native/0.38.0-r0/recipe-sysroot-native/usr/include/openssl/macros.h:155: Error: CPP #error ""OPENSSL_API_COMPAT expresses an impossible API compatibility level"". Use the -cpperraswarn option to continue swig processing. + +I'm not sure why; upstream should take a look. + +Upstream-Status: Inappropriate [workaround] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + setup.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/setup.py b/setup.py +index 2c65404..74704bc 100644 +--- a/setup.py ++++ b/setup.py +@@ -192,6 +192,7 @@ class _M2CryptoBuildExt(build_ext.build_ext): + + self.swig_opts.append('-includeall') + self.swig_opts.append('-modern') ++ self.swig_opts.append('-cpperraswarn') + self.swig_opts.append('-builtin') + + # These two lines are a workaround for diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-m2crypto_0.38.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-m2crypto_0.38.0.bb index e1ee99baea..51a0dd676e 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-m2crypto_0.38.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-m2crypto_0.38.0.bb @@ -7,8 +7,9 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e" FILESEXTRAPATHS:prepend := "${THISDIR}/python-m2crypto:" SRC_URI += "file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \ - file://cross-compile-platform.patch \ - file://avoid-host-contamination.patch \ + file://cross-compile-platform.patch \ + file://avoid-host-contamination.patch \ + file://0001-setup.py-address-openssl-3.x-build-issue.patch \ " SRC_URI[sha256sum] = "99f2260a30901c949a8dc6d5f82cd5312ffb8abc92e76633baf231bbbcb2decb" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-mccabe_0.6.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-mccabe_0.6.1.bb index f1190c36fb..513a5a9f22 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-mccabe_0.6.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-mccabe_0.6.1.bb @@ -1,7 +1,7 @@ DESCRIPTION = "McCabe checker, plugin for flake8" HOMEPAGE = "https://github.com/PyCQA/mccabe" SECTION = "devel/python" -LICENSE = "Apache-2.0" +LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=a489dc62bacbdad3335c0f160a974f0f" SRC_URI[md5sum] = "723df2f7b1737b8887475bac4c763e1e" @@ -10,8 +10,3 @@ SRC_URI[sha256sum] = "dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271 inherit pypi setuptools3 DEPENDS += "${PYTHON_PN}-pytest-runner-native" - -RDEPENDS:${PN} += "${PYTHON_PN}-prettytable \ - ${PYTHON_PN}-cmd2 \ - ${PYTHON_PN}-pyparsing \ - " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-multidict_5.1.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-multidict_5.2.0.bb index 3ec271a0f2..05b18fa0b5 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-multidict_5.1.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-multidict_5.2.0.bb @@ -2,9 +2,9 @@ SUMMARY = "Multidicts are useful for working with HTTP headers, URL query args e HOMEPAGE = "https://github.com/aio-libs/multidict/" LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e74c98abe0de8f798ca609137f9cef4a" +LIC_FILES_CHKSUM = "file://LICENSE;md5=84c63e2bcd84e619d249af5181e2147f" -SRC_URI[sha256sum] = "25b4e5f22d3a37ddf3effc0710ba692cfc792c2b9edfb9c05aefe823256e84d5" +SRC_URI[sha256sum] = "0dd1c93edb444b33ba2274b66f63def8a327d607c6c790772f448a53b6ea59ce" inherit pypi setuptools3 ptest diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-nmap_1.5.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-nmap_1.5.1.bb index a3523b7dfe..ed0e980c8d 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-nmap_1.5.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-nmap_1.5.1.bb @@ -8,8 +8,7 @@ DEPENDS += "${PYTHON_PN}-wheel-native" PYPI_PACKAGE = "python3-nmap" -SRC_URI[md5sum] = "3a43dd0f56ade8c76c7c6f994604212d" -SRC_URI[sha256sum] = "b52744e0c9944c567733b8deb60d6363e17233ee40466edfb1b09a5780576f9a" +SRC_URI[sha256sum] = "0e6667153a84938bdc0e95a64cd86397b4c46724c422873ea8f1d007d248926a" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-openpyxl_3.0.8.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-openpyxl_3.0.9.bb index 3d1f46e50b..4dfd4490ab 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-openpyxl_3.0.8.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-openpyxl_3.0.9.bb @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148 inherit pypi setuptools3 -SRC_URI[sha256sum] = "4f2770348c029ce9433316ced8f91ed37d2a605e654f8bfdc93a3524561a8ce2" +SRC_URI[sha256sum] = "40f568b9829bf9e446acfffce30250ac1fa39035124d55fc024025c41481c90f" RDEPENDS:${PN} += "\ ${PYTHON_PN}-compression \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_1.5.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_1.6.1.bb index 2d4e55abc8..81a6d0a9c9 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_1.5.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-paho-mqtt_1.6.1.bb @@ -1,15 +1,13 @@ SUMMARY = "MQTT version 3.1/3.1.1 client library" LICENSE = "EPL-1.0 | EDL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=eb48c6ee2cb9f5b8b9fe75e6f817bdfc \ - file://epl-v10;md5=8d383c379e91d20ba18a52c3e7d3a979 \ +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8e5f264c6988aec56808a3a11e77b913 \ file://edl-v10;md5=c09f121939f063aeb5235972be8c722c \ " SRCNAME = "paho-mqtt" inherit pypi setuptools3 -SRC_URI[md5sum] = "32f93c0ed92c7439f7a715ed258fd35d" -SRC_URI[sha256sum] = "9feb068e822be7b3a116324e01fb6028eb1d66412bf98595ae72698965cb1cae" +SRC_URI[sha256sum] = "2a8291c81623aec00372b5a85558a372c747cbca8e9934dfe218638b8eefc26f" DEPENDS += "${PYTHON_PN}-pytest-runner-native" @@ -20,7 +18,7 @@ do_install:append() { PACKAGES =+ "${PN}-examples" -RDEPENDS:${PN}-examples += "${PN}" +RDEPENDS:${PN}-examples += "${PN} ${PYTHON_PN}-core" FILES:${PN}-examples = "${datadir}/${BPN}/examples" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_1.3.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_1.3.4.bb index 6e557ed7bc..cde43184bb 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_1.3.3.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pandas_1.3.4.bb @@ -6,7 +6,7 @@ HOMEPAGE = "http://pandas.pydata.org/" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=3f23c5c092b74d245d48eeef72bc3fd2" -SRC_URI[sha256sum] = "272c8cb14aa9793eada6b1ebe81994616e647b5892a370c7135efb2924b701df" +SRC_URI[sha256sum] = "a2aa18d3f0b7d538e21932f637fbfe8518d085238b429e4790a35e1e44a96ffc" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_2.7.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_2.8.0.bb index ece55f1e30..1942a1d6c5 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_2.7.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_2.8.0.bb @@ -3,8 +3,7 @@ HOMEPAGE = "https://github.com/paramiko/paramiko/" LICENSE = "LGPL-2.1" LIC_FILES_CHKSUM = "file://LICENSE;md5=fd0120fc2e9f841c73ac707a30389af5" -SRC_URI[md5sum] = "44136d79da4cd7619e368018ad022619" -SRC_URI[sha256sum] = "7f36f4ba2c0d81d219f4595e35f70d56cc94f9ac40a6acdf51d6ca210ce65035" +SRC_URI[sha256sum] = "e673b10ee0f1c80d46182d3af7751d033d9b573dd7054d2d0aa46be186c3c1d2" PYPI_PACKAGE = "paramiko" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-parse-type_0.5.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-parse-type_0.5.2.bb index 39812a17cd..7eebbfb503 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-parse-type_0.5.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-parse-type_0.5.2.bb @@ -19,6 +19,11 @@ RDEPENDS:${PN}-ptest += " \ ${PYTHON_PN}-pytest \ " +do_configure:prepend() { + sed -i -e "/python_version >= 3.0/d" ${S}/setup.py + sed -i -e "/use_2to3/d" ${S}/setup.py +} + do_install_ptest() { install -d ${D}${PTEST_PATH}/tests cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.1.6.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.2.0.bb index a1076f9f0c..e712c8f1ed 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.1.6.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.2.0.bb @@ -7,6 +7,6 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=05f1e16a8e59ce3e9a979e881816c2ab" inherit pypi setuptools3 -SRC_URI[sha256sum] = "725b65da806fb79df05c0b6383b01631c510f371d9bc0ece93a996b4260ba085" +SRC_URI[sha256sum] = "b6bfb08a7834787aca076da1200b735d97beef61b60a462b05213e7354a099cf" BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc_1.0.5.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc_1.0.5.bb new file mode 100644 index 0000000000..2377bd5258 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-posix-ipc_1.0.5.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "POSIX IPC primitives (semaphores, shared memory and message queues) for Python" +HOMEPAGE = "http://semanchuk.com/philip/posix_ipc/" +SECTION = "devel/python" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=dc089fb2f37e90799a54c19a20c9880f" + +PYPI_PACKAGE = "posix_ipc" + +# Archived version so we need to overwrite what the pypi class will derive +PYPI_SRC_URI = "https://pypi.python.org/packages/source/p/${PYPI_PACKAGE}/${PYPI_PACKAGE}-${PV}.tar.gz" + +SRC_URI[md5sum] = "8c9443859492ecf3aae9182aa6b5c78c" +SRC_URI[sha256sum] = "6cddb1ce2cf4aae383f2a0079c26c69bee257fe2720f372201ef047f8ceb8b97" + +inherit setuptools3 pypi + +# DEPENDS_default: python-pip + +DEPENDS += " \ + ${PYTHON_PN}-pip \ + " + +# RDEPENDS:default: +RDEPENDS:${PN} += " \ + " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-prettytable_2.1.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-prettytable_2.2.1.bb index 58a48e9e03..b9050cc1bd 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-prettytable_2.1.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-prettytable_2.2.1.bb @@ -3,7 +3,7 @@ HOMEPAGE = "http://code.google.com/p/prettytable" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=c9a6829fcd174d9535b46211917c7671" -SRC_URI[sha256sum] = "5882ed9092b391bb8f6e91f59bcdbd748924ff556bb7c634089d5519be87baa0" +SRC_URI[sha256sum] = "6d465005573a5c058d4ca343449a5b28c21252b86afcdfa168cdc6a440f0b24c" do_install:append() { perm_files=`find "${D}${PYTHON_SITEPACKAGES_DIR}/" -name "*.txt" -o -name "PKG-INFO"` @@ -28,6 +28,9 @@ RDEPENDS:${PN} += " \ ${PYTHON_PN}-math \ ${PYTHON_PN}-html \ ${PYTHON_PN}-wcwidth \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-compression \ + ${PYTHON_PN}-importlib-metadata \ " RDEPENDS:${PN}-ptest += " \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.19.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.21.bb index 5d809055b0..e0d379d033 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.19.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.21.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://python-prompt-toolkit.readthedocs.io/" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=b2cde7da89f0c1f3e49bf968d00d554f" -SRC_URI[sha256sum] = "08360ee3a3148bdb5163621709ee322ec34fc4375099afa4bbf751e9b7b7fa4f" +SRC_URI[sha256sum] = "27f13ff4e4850fe8f860b77414c7880f67c6158076a7b099062cc8570f1562e5" inherit pypi setuptools3 @@ -19,6 +19,7 @@ RDEPENDS:${PN} += " \ ${PYTHON_PN}-shell \ ${PYTHON_PN}-image \ ${PYTHON_PN}-asyncio \ + ${PYTHON_PN}-xml \ " BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_3.17.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_3.18.1.bb index b43529cc95..8ecb3ab6ea 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_3.17.3.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_3.18.1.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=19e8f490f9526b1de8 inherit pypi setuptools3 -SRC_URI[sha256sum] = "72804ea5eaa9c22a090d2803813e280fb273b62d5ae497aaf3553d141c4fdd7b" +SRC_URI[sha256sum] = "1c9bb40503751087300dd12ce2e90899d68628977905c76effc48e66d089391e" # http://errors.yoctoproject.org/Errors/Details/184715/ # Can't find required file: ../src/google/protobuf/descriptor.proto diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_21.9.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_21.10.5.bb index 5871ee2164..0b867b83a2 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_21.9.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pulsectl_21.10.5.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/mk-fg/python-pulse-control" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=f1d10048469ff90123263eb5e214061d" -SRC_URI[sha256sum] = "8eef4dbfc97d984e63fd609a3f690d005173ec5342be88d10f67dd507affdf32" +SRC_URI[sha256sum] = "b347983fb78baab168f4dc4804ab2c59ca5b813bf62f8146dfb5fcb6ab6c8ba2" RDEPENDS:${PN} += " \ libpulse \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyatspi_2.34.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyatspi_2.38.1.bb index 1368b923d8..8ae9ac996d 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyatspi_2.34.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyatspi_2.38.1.bb @@ -7,8 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=db29218e6ba3794c56df7d4987dc7e4d \ file://COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe" DEPENDS = "python3-dbus-native glib-2.0 dbus-glib libxml2 atk gtk+ python3-pygobject" -SRC_URI = "git://github.com/GNOME/pyatspi2.git;protocol=https;branch=mainline" -SRCREV = "cc99d68db66174f4499b9b325bc788393b972edd" +SRC_URI = "git://github.com/GNOME/pyatspi2.git;protocol=https;branch=master" +SRCREV = "6d5f47ee8e8a36140b52bf52fe954a131a0aa5dd" + S = "${WORKDIR}/git" # Same restriction as gtk+ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.6.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.11.bb index c56c70ad37..838447120d 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.6.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.11.bb @@ -2,7 +2,7 @@ SUMMARY = "Using nlohmann::json with pybind11" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=0e25ff0ec476d06d366439e1120cce98" -SRCREV = "d1d00888bc0eb7c50dde6cff1a5eb4586e620b65" +SRCREV = "0fbbe3bbb27bd07a5ec7d71cbb1f17eaf4d37702" SRC_URI = "git://github.com/pybind/pybind11_json" DEPENDS += "nlohmann-json python3-pybind11" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pybluez_0.23.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pybluez_0.23.bb index e8d14416f8..cc659ea678 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pybluez_0.23.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pybluez_0.23.bb @@ -11,8 +11,13 @@ SRC_URI[md5sum] = "afbe8429bb82d2c46a3d0f5f4f898f9d" SRC_URI[sha256sum] = "c8f04d2e78951eaa9de486b4d49381704e8943d0a6e6e58f55fcd7b8582e90de" PYPI_PACKAGE = "PyBluez" + inherit pypi setuptools3 +do_configure:prepend() { + sed -i -e "/use_2to3=True,/d" ${S}/setup.py +} + RDEPENDS:${PN} += "\ bluez5 \ ${PYTHON_PN}-fcntl \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pychromecast_9.2.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pychromecast_9.3.1.bb index 1fd76ed39d..77b032ae2b 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pychromecast_9.2.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pychromecast_9.3.1.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/balloob/pychromecast" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=b1dbd4e85f47b389bdadee9c694669f5" -SRC_URI[sha256sum] = "883d6e836ff5f1068a8bd00364a15b4c9854293086495e9fd9cacd9b4d54c0bf" +SRC_URI[sha256sum] = "a1d6807ae0fc455aaeecd2def87c31bb86679a2920cacfa7910db9c9db5085d4" PYPI_PACKAGE = "PyChromecast" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pycodestyle_2.7.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pycodestyle_2.8.0.bb index 611abca6bc..31720e2aab 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pycodestyle_2.7.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pycodestyle_2.8.0.bb @@ -4,7 +4,7 @@ LICENSE = "MIT" SECTION = "devel/python" LIC_FILES_CHKSUM = "file://LICENSE;md5=a8546d0e77f416fb05a26acd89c8b3bd" -SRC_URI[sha256sum] = "c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef" +SRC_URI[sha256sum] = "eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyflakes_2.3.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyflakes_2.3.1.bb deleted file mode 100644 index 607879c8d3..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyflakes_2.3.1.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "passive checker of Python programs" -HOMEPAGE = "https://github.com/dreamhost/cliff" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=690c2d09203dc9e07c4083fc45ea981f" - -SRC_URI[sha256sum] = "f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-prettytable \ - ${PYTHON_PN}-cmd2 \ - ${PYTHON_PN}-pyparsing" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyflakes_2.4.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyflakes_2.4.0.bb new file mode 100644 index 0000000000..827ff0b292 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyflakes_2.4.0.bb @@ -0,0 +1,10 @@ +SUMMARY = "passive checker of Python programs" +HOMEPAGE = "https://github.com/PyCQA/pyflakes" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=690c2d09203dc9e07c4083fc45ea981f" + +SRC_URI[sha256sum] = "05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c" + +inherit pypi setuptools3 + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyinotify_0.9.6.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyinotify_0.9.6.bb index 8c6550a2bf..8dd5e1580a 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyinotify_0.9.6.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyinotify_0.9.6.bb @@ -4,7 +4,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ab173cade7965b411528464589a08382" RDEPENDS:${PN} += "\ ${PYTHON_PN}-ctypes \ + ${PYTHON_PN}-fcntl \ ${PYTHON_PN}-io \ + ${PYTHON_PN}-logging \ ${PYTHON_PN}-misc \ ${PYTHON_PN}-shell \ ${PYTHON_PN}-smtpd \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_2.1.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_2.3.0.bb index aae1474915..19ba30780e 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_2.1.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyjwt_2.3.0.bb @@ -5,7 +5,7 @@ HOMEPAGE = "http://github.com/jpadilla/pyjwt" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=68626705a7b513ca8d5f44a3e200ed0c" -SRC_URI[sha256sum] = "fba44e7898bbca160a2b2b501f492824fc8382485d3a6f11ba5d0c1937ce6130" +SRC_URI[sha256sum] = "b888b4d56f06f6dcd777210c334e69c737be74755d3e5e9ee3fe67dc18a0ee41" PYPI_PACKAGE = "PyJWT" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyopenssl_20.0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyopenssl_21.0.0.bb index eda9381a54..a7e0ae4b14 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyopenssl_20.0.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyopenssl_21.0.0.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" DEPENDS += "openssl ${PYTHON_PN}-cryptography" -SRC_URI[sha256sum] = "4c231c759543ba02560fcd2480c48dcec4dae34c9da7d3747c508227e0624b51" +SRC_URI[sha256sum] = "5e2d8c5e46d0d865ae933bef5230090bdaf5506281e9eec60fa250ee80600cb3" PYPI_PACKAGE = "pyOpenSSL" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperf_2.2.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperf_2.3.0.bb index 89d22ee897..5172b0a05e 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperf_2.2.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyperf_2.3.0.bb @@ -13,7 +13,7 @@ Features: \ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=78bc2e6e87c8c61272937b879e6dc2f8" -SRC_URI[sha256sum] = "498bb4d1fe21350c2b7c1aa8bb3eae9c9979358d0b66327954bc66839fcba8b6" +SRC_URI[sha256sum] = "8a85dd42e067131d5b26b71472336da7f7f4b87ff9c97350d89f5ff0de9adedc" DEPENDS += "${PYTHON_PN}-six-native" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyscaffold_4.0.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyscaffold_4.1.1.bb index bba94f8a0f..9769cd6b98 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyscaffold_4.0.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyscaffold_4.1.1.bb @@ -12,6 +12,11 @@ inherit pypi setuptools3 PYPI_PACKAGE = "PyScaffold" -SRC_URI[sha256sum] = "cfa719c2d97392ec3cd5f44d95ec0d40df2dd483d5ee05ea029896cfd7c04af8" +SRC_URI[sha256sum] = "8972252fda90d1020a93f1e99db370c002d18f52ff2fca9c3cc2a0aee74d07ad" BBCLASSEXTEND = "native nativesdk" + +RDEPENDS:${PN} += " \ + python3-email \ + python3-compression \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pystache/0001-Modernize-python-versions-remove-py2x-and-fix-tests-.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-pystache/0001-Modernize-python-versions-remove-py2x-and-fix-tests-.patch new file mode 100644 index 0000000000..d268cc5cd9 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pystache/0001-Modernize-python-versions-remove-py2x-and-fix-tests-.patch @@ -0,0 +1,4150 @@ +From 8bb1ac2d81f697598a766714f2c439d78c85d71e Mon Sep 17 00:00:00 2001 +From: Stephen L Arnold <nerdboy@gentoo.org> +Date: Sat, 7 Nov 2020 12:38:33 -0800 +Subject: [PATCH] Modernize python versions (remove py2x) and fix tests, update + spec + +* migrate to github actions for CI, add conda recipe/workflow +* fix document processing, update pandoc args and history +* convert doctests and modules to py3 +* convert packaging/setup.py to pep517, keep doc processing +* cleanup tox cfg, add coverage, readme status +* add pep8speaks cfg, cleanup warnings, use correct env +* update setup_description.rst for packaging +* set version for test release => 0.6.0 and deploy + +Upstream-Status: Backport [https://github.com/defunkt/pystache/pull/214] +Signed-off-by: Stephen L Arnold <nerdboy@gentoo.org> +--- + .coveragerc | 38 +++ + .gitchangelog.rc | 295 +++++++++++++++++++++ + .github/workflows/ci.yml | 73 ++++++ + .github/workflows/conda.yml | 55 ++++ + .github/workflows/release.yml | 94 +++++++ + .github/workflows/wheels.yml | 82 ++++++ + .pep8speaks.yml | 15 ++ + HISTORY.md | 37 ++- + MANIFEST.in | 8 +- + README.md | 141 +++++----- + TODO.md | 5 +- + conda/meta.yaml | 50 ++++ + pyproject.toml | 3 + + pystache/__init__.py | 2 +- + pystache/commands/render.py | 4 +- + pystache/common.py | 13 +- + pystache/defaults.py | 2 +- + pystache/loader.py | 14 +- + pystache/parsed.py | 6 +- + pystache/parser.py | 20 +- + pystache/renderengine.py | 2 +- + pystache/renderer.py | 22 +- + pystache/specloader.py | 2 +- + pystache/tests/benchmark.py | 15 +- + pystache/tests/common.py | 10 +- + pystache/tests/examples/unicode_output.py | 2 +- + pystache/tests/main.py | 28 +- + pystache/tests/spectesting.py | 16 +- + pystache/tests/test___init__.py | 4 +- + pystache/tests/test_commands.py | 2 +- + pystache/tests/test_defaults.py | 18 +- + pystache/tests/test_examples.py | 40 +-- + pystache/tests/test_loader.py | 46 ++-- + pystache/tests/test_pystache.py | 6 +- + pystache/tests/test_renderengine.py | 148 +++++------ + pystache/tests/test_renderer.py | 86 +++---- + pystache/tests/test_simple.py | 20 +- + pystache/tests/test_specloader.py | 60 ++--- + setup.cfg | 74 +++++- + setup.py | 134 +--------- + setup_description.rst | 297 +++++++++++++--------- + tox.ini | 118 +++++++-- + travis.yml_disabled | 52 ++++ + 43 files changed, 1487 insertions(+), 672 deletions(-) + create mode 100644 .coveragerc + create mode 100644 .gitchangelog.rc + create mode 100644 .github/workflows/ci.yml + create mode 100644 .github/workflows/conda.yml + create mode 100644 .github/workflows/release.yml + create mode 100644 .github/workflows/wheels.yml + create mode 100644 .pep8speaks.yml + create mode 100644 conda/meta.yaml + create mode 100644 pyproject.toml + create mode 100644 travis.yml_disabled + +diff --git a/.coveragerc b/.coveragerc +new file mode 100644 +index 0000000..9a336dd +--- /dev/null ++++ b/.coveragerc +@@ -0,0 +1,38 @@ ++# .coveragerc to control coverage.py ++[run] ++branch = True ++ ++source = pystache ++ ++omit = ++ .tox/* ++ setup.py ++ pystache/tests/* ++ ++#plugins = ++# coverage_python_version ++ ++[report] ++# must set this to True to see missing ++#show_missing = True ++ ++# Regexes for lines to exclude from consideration ++exclude_lines = ++ # Have to re-enable the standard pragma ++ pragma: no cover ++ ++ # Don't complain about missing debug-only code: ++ def __repr__ ++ if self\.debug ++ ++ # Don't complain if tests don't hit defensive assertion code: ++ raise AssertionError ++ raise NotImplementedError ++ ++ # Don't complain if non-runnable code isn't run: ++ if 0: ++ ++ignore_errors = True ++ ++[html] ++directory = cover +diff --git a/.gitchangelog.rc b/.gitchangelog.rc +new file mode 100644 +index 0000000..5cf63a0 +--- /dev/null ++++ b/.gitchangelog.rc +@@ -0,0 +1,295 @@ ++# -*- coding: utf-8; mode: python -*- ++## ++## Format ++## ++## ACTION: [AUDIENCE:] COMMIT_MSG [!TAG ...] ++## ++## Description ++## ++## ACTION is one of 'chg', 'fix', 'new' ++## ++## Is WHAT the change is about. ++## ++## 'chg' is for refactor, small improvement, cosmetic changes... ++## 'fix' is for bug fixes ++## 'new' is for new features, big improvement ++## ++## AUDIENCE is optional and one of 'dev', 'usr', 'pkg', 'test', 'doc' ++## ++## Is WHO is concerned by the change. ++## ++## 'dev' is for developpers (API changes, refactors...) ++## 'usr' is for final users (UI changes) ++## 'pkg' is for packagers (packaging changes) ++## 'test' is for testers (test only related changes) ++## 'doc' is for doc guys (doc only changes) ++## ++## COMMIT_MSG is ... well ... the commit message itself. ++## ++## TAGs are additionnal adjective as 'refactor' 'minor' 'cosmetic' ++## ++## They are preceded with a '!' or a '@' (prefer the former, as the ++## latter is wrongly interpreted in github.) Commonly used tags are: ++## ++## 'refactor' is obviously for refactoring code only ++## 'minor' is for a very meaningless change (a typo, adding a comment) ++## 'cosmetic' is for cosmetic driven change (re-indentation, 80-col...) ++## 'wip' is for partial functionality but complete subfunctionality. ++## ++## Example: ++## ++## new: usr: support of bazaar implemented ++## chg: re-indentend some lines !cosmetic ++## new: dev: updated code to be compatible with last version of killer lib. ++## fix: pkg: updated year of licence coverage. ++## new: test: added a bunch of test around user usability of feature X. ++## fix: typo in spelling my name in comment. !minor ++## ++## Please note that multi-line commit message are supported, and only the ++## first line will be considered as the "summary" of the commit message. So ++## tags, and other rules only applies to the summary. The body of the commit ++## message will be displayed in the changelog without reformatting. ++ ++ ++## ++## ``ignore_regexps`` is a line of regexps ++## ++## Any commit having its full commit message matching any regexp listed here ++## will be ignored and won't be reported in the changelog. ++## ++ignore_regexps = [ ++ r'@minor', r'!minor', ++ r'@cosmetic', r'!cosmetic', ++ r'@refactor', r'!refactor', ++ r'@wip', r'!wip', ++ r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[p|P]kg:', ++ r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[d|D]ev:', ++ r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$', ++ r'^$', ## ignore commits with empty messages ++] ++ ++ ++## ``section_regexps`` is a list of 2-tuples associating a string label and a ++## list of regexp ++## ++## Commit messages will be classified in sections thanks to this. Section ++## titles are the label, and a commit is classified under this section if any ++## of the regexps associated is matching. ++## ++## Please note that ``section_regexps`` will only classify commits and won't ++## make any changes to the contents. So you'll probably want to go check ++## ``subject_process`` (or ``body_process``) to do some changes to the subject, ++## whenever you are tweaking this variable. ++## ++section_regexps = [ ++ ('New', [ ++ r'^[nN]ew\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$', ++ ]), ++ ('Features', [ ++ r'^([nN]ew|[fF]eat)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$', ++ ]), ++ ('Changes', [ ++ r'^[cC]hg\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$', ++ ]), ++ ('Fixes', [ ++ r'^[fF]ix\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$', ++ ]), ++ ++ ('Other', None ## Match all lines ++ ), ++] ++ ++ ++## ``body_process`` is a callable ++## ++## This callable will be given the original body and result will ++## be used in the changelog. ++## ++## Available constructs are: ++## ++## - any python callable that take one txt argument and return txt argument. ++## ++## - ReSub(pattern, replacement): will apply regexp substitution. ++## ++## - Indent(chars=" "): will indent the text with the prefix ++## Please remember that template engines gets also to modify the text and ++## will usually indent themselves the text if needed. ++## ++## - Wrap(regexp=r"\n\n"): re-wrap text in separate paragraph to fill 80-Columns ++## ++## - noop: do nothing ++## ++## - ucfirst: ensure the first letter is uppercase. ++## (usually used in the ``subject_process`` pipeline) ++## ++## - final_dot: ensure text finishes with a dot ++## (usually used in the ``subject_process`` pipeline) ++## ++## - strip: remove any spaces before or after the content of the string ++## ++## - SetIfEmpty(msg="No commit message."): will set the text to ++## whatever given ``msg`` if the current text is empty. ++## ++## Additionally, you can `pipe` the provided filters, for instance: ++#body_process = Wrap(regexp=r'\n(?=\w+\s*:)') | Indent(chars=" ") ++#body_process = Wrap(regexp=r'\n(?=\w+\s*:)') ++#body_process = noop ++body_process = ReSub(r'((^|\n)[A-Z]\w+(-\w+)*: .*(\n\s+.*)*)+$', r'') | strip ++ ++ ++## ``subject_process`` is a callable ++## ++## This callable will be given the original subject and result will ++## be used in the changelog. ++## ++## Available constructs are those listed in ``body_process`` doc. ++subject_process = (strip | ++ ReSub(r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n@]*)(@[a-z]+\s+)*$', r'\4') | ++ SetIfEmpty("No commit message.") | ucfirst | final_dot) ++ ++ ++## ``tag_filter_regexp`` is a regexp ++## ++## Tags that will be used for the changelog must match this regexp. ++## ++#tag_filter_regexp = r'^v?[0-9]+\.[0-9]+(\.[0-9]+)?$' ++tag_filter_regexp = r'^[0-9]+\.[0-9]+(\.[0-9]+)?$' ++ ++ ++## ``unreleased_version_label`` is a string or a callable that outputs a string ++## ++## This label will be used as the changelog Title of the last set of changes ++## between last valid tag and HEAD if any. ++unreleased_version_label = "(unreleased)" ++#unreleased_version_label = lambda: swrap( ++# ["git", "describe", "--tags"], ++#shell=False) ++ ++ ++## ``output_engine`` is a callable ++## ++## This will change the output format of the generated changelog file ++## ++## Available choices are: ++## ++## - rest_py ++## ++## Legacy pure python engine, outputs ReSTructured text. ++## This is the default. ++## ++## - mustache(<template_name>) ++## ++## Template name could be any of the available templates in ++## ``templates/mustache/*.tpl``. ++## Requires python package ``pystache``. ++## Examples: ++## - mustache("markdown") ++## - mustache("restructuredtext") ++## ++## - makotemplate(<template_name>) ++## ++## Template name could be any of the available templates in ++## ``templates/mako/*.tpl``. ++## Requires python package ``mako``. ++## Examples: ++## - makotemplate("restructuredtext") ++## ++#output_engine = rest_py ++#output_engine = mustache("restructuredtext") ++output_engine = mustache("markdown") ++#output_engine = makotemplate("restructuredtext") ++ ++ ++## ``include_merge`` is a boolean ++## ++## This option tells git-log whether to include merge commits in the log. ++## The default is to include them. ++include_merge = True ++ ++ ++## ``log_encoding`` is a string identifier ++## ++## This option tells gitchangelog what encoding is outputed by ``git log``. ++## The default is to be clever about it: it checks ``git config`` for ++## ``i18n.logOutputEncoding``, and if not found will default to git's own ++## default: ``utf-8``. ++#log_encoding = 'utf-8' ++ ++ ++## ``publish`` is a callable ++## ++## Sets what ``gitchangelog`` should do with the output generated by ++## the output engine. ``publish`` is a callable taking one argument ++## that is an interator on lines from the output engine. ++## ++## Some helper callable are provided: ++## ++## Available choices are: ++## ++## - stdout ++## ++## Outputs directly to standard output ++## (This is the default) ++## ++## - FileInsertAtFirstRegexMatch(file, pattern, idx=lamda m: m.start(), flags) ++## ++## Creates a callable that will parse given file for the given ++## regex pattern and will insert the output in the file. ++## ``idx`` is a callable that receive the matching object and ++## must return a integer index point where to insert the ++## the output in the file. Default is to return the position of ++## the start of the matched string. ++## ++## - FileRegexSubst(file, pattern, replace, flags) ++## ++## Apply a replace inplace in the given file. Your regex pattern must ++## take care of everything and might be more complex. Check the README ++## for a complete copy-pastable example. ++## ++# publish = FileInsertIntoFirstRegexMatch( ++# "CHANGELOG.rst", ++# r'/(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n/', ++# idx=lambda m: m.start(1) ++# ) ++#publish = stdout ++ ++ ++## ``revs`` is a list of callable or a list of string ++## ++## callable will be called to resolve as strings and allow dynamical ++## computation of these. The result will be used as revisions for ++## gitchangelog (as if directly stated on the command line). This allows ++## to filter exaclty which commits will be read by gitchangelog. ++## ++## To get a full documentation on the format of these strings, please ++## refer to the ``git rev-list`` arguments. There are many examples. ++## ++## Using callables is especially useful, for instance, if you ++## are using gitchangelog to generate incrementally your changelog. ++## ++## Some helpers are provided, you can use them:: ++## ++## - FileFirstRegexMatch(file, pattern): will return a callable that will ++## return the first string match for the given pattern in the given file. ++## If you use named sub-patterns in your regex pattern, it'll output only ++## the string matching the regex pattern named "rev". ++## ++## - Caret(rev): will return the rev prefixed by a "^", which is a ++## way to remove the given revision and all its ancestor. ++## ++## Please note that if you provide a rev-list on the command line, it'll ++## replace this value (which will then be ignored). ++## ++## If empty, then ``gitchangelog`` will act as it had to generate a full ++## changelog. ++## ++## The default is to use all commits to make the changelog. ++#revs = ["^1.0.3", ] ++#revs = [ ++# Caret( ++# FileFirstRegexMatch( ++# "CHANGELOG.rst", ++# r"(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n")), ++# "HEAD" ++#] ++revs = [] +diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml +new file mode 100644 +index 0000000..356dd2c +--- /dev/null ++++ b/.github/workflows/ci.yml +@@ -0,0 +1,73 @@ ++# This workflow will install Python dependencies, run tests and lint with a variety of Python versions ++# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions ++ ++name: ci ++ ++on: ++ push: ++ branches: [ master ] ++ pull_request: ++ branches: [ master ] ++ ++jobs: ++ build: ++ ++ runs-on: ${{ matrix.os }} ++ defaults: ++ run: ++ shell: bash ++ env: ++ OS: ${{ matrix.os }} ++ PYTHON: ${{ matrix.python-version }} ++ PYTHONIOENCODING: utf-8 ++ PIP_DOWNLOAD_CACHE: ${{ github.workspace }}/../.pip_download_cache ++ strategy: ++ fail-fast: false ++ matrix: ++ os: [ubuntu-20.04, macos-latest, windows-latest] ++ python-version: [3.6, 3.7, 3.8, 3.9] ++ steps: ++ - name: Set git crlf/eol ++ run: | ++ git config --global core.autocrlf false ++ git config --global core.eol lf ++ ++ - uses: actions/checkout@v2 ++ with: ++ submodules: True ++ ++ - name: Set up Python ${{ matrix.python-version }} ++ uses: actions/setup-python@v2 ++ with: ++ python-version: ${{ matrix.python-version }} ++ ++ - name: Install dependencies ++ run: | ++ python -m pip install --upgrade pip ++ pip install tox tox-gh-actions ++ ++ - name: Run tests with coverage ++ run: | ++ tox ++ env: ++ PLATFORM: ${{ matrix.os }} ++ ++ - name: Upload coverage to Codecov ++ uses: codecov/codecov-action@v1 ++ with: ++ env_vars: OS,PYTHON ++ ++ - name: Test with specs and pystache-test ++ run: | ++ tox -e setup . ext/spec/specs ++ ++ - name: Check pkg builds ++ run: | ++ tox -e deploy ++ ++ - name: Check docs ++ if: runner.os == 'Linux' ++ run: | ++ sudo apt-get -qq update ++ sudo apt-get install -y pandoc ++ tox -e docs +diff --git a/.github/workflows/conda.yml b/.github/workflows/conda.yml +new file mode 100644 +index 0000000..261f9ad +--- /dev/null ++++ b/.github/workflows/conda.yml +@@ -0,0 +1,55 @@ ++name: Conda ++ ++on: ++ workflow_dispatch: ++ pull_request: ++ push: ++ branches: ++ - master ++ ++jobs: ++ build: ++ strategy: ++ fail-fast: false ++ matrix: ++ platform: [ubuntu-18.04, windows-latest, macos-latest] ++ python-version: [3.6, 3.7, 3.8, 3.9] ++ ++ runs-on: ${{ matrix.platform }} ++ ++ # The setup-miniconda action needs this to activate miniconda ++ defaults: ++ run: ++ shell: "bash -l {0}" ++ ++ steps: ++ - uses: actions/checkout@v2 ++ with: ++ fetch-depth: 0 ++ ++ - name: Cache conda ++ uses: actions/cache@v1 ++ with: ++ path: ~/conda_pkgs_dir ++ key: ${{matrix.os}}-conda-pkgs-${{hashFiles('**/conda/meta.yaml')}} ++ ++ - name: Get conda ++ uses: conda-incubator/setup-miniconda@v2 ++ with: ++ python-version: ${{ matrix.python-version }} ++ channels: conda-forge ++ channel-priority: strict ++ use-only-tar-bz2: true ++ auto-activate-base: true ++ ++ - name: Prepare ++ run: conda install conda-build conda-verify ++ ++ - name: Build ++ run: conda build conda ++ ++ - name: Install ++ run: conda install -c ${CONDA_PREFIX}/conda-bld/ pystache ++ ++ - name: Test ++ run: python test_pystache.py +diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml +new file mode 100644 +index 0000000..f33c4b5 +--- /dev/null ++++ b/.github/workflows/release.yml +@@ -0,0 +1,94 @@ ++name: Release ++ ++on: ++ push: ++ # release on tag push ++ tags: ++ - '*' ++ ++jobs: ++ wheels: ++ ++ runs-on: ${{ matrix.os }} ++ defaults: ++ run: ++ shell: bash ++ env: ++ PYTHONIOENCODING: utf-8 ++ strategy: ++ fail-fast: false ++ matrix: ++ os: [ubuntu-18.04, macos-latest, windows-latest] ++ python-version: [3.6, 3.7, 3.8, 3.9] ++ exclude: ++ - os: windows-latest ++ python-version: 2.7 ++ ++ steps: ++ - name: Set git crlf/eol ++ run: | ++ git config --global core.autocrlf false ++ git config --global core.eol lf ++ ++ - uses: actions/checkout@v2 ++ with: ++ fetch-depth: 0 ++ ++ - name: Set up Python ${{ matrix.python-version }} ++ uses: actions/setup-python@v2 ++ with: ++ python-version: ${{ matrix.python-version }} ++ ++ - name: Install dependencies ++ run: | ++ python -m pip install --upgrade pip wheel ++ pip install tox tox-gh-actions ++ ++ - name: Build dist pkgs ++ run: | ++ tox -e deploy ++ ++ - name: Upload artifacts ++ if: matrix.python-version == 3.7 && runner.os == 'Linux' ++ uses: actions/upload-artifact@v2 ++ with: ++ name: wheels ++ path: ./dist/*.whl ++ ++ create_release: ++ name: Create Release ++ needs: [wheels] ++ runs-on: ubuntu-18.04 ++ ++ steps: ++ - name: Get version ++ id: get_version ++ run: | ++ echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV ++ echo ${{ env.VERSION }} ++ ++ - uses: actions/checkout@v2 ++ with: ++ fetch-depth: 0 ++ ++ # download all artifacts to project dir ++ - uses: actions/download-artifact@v2 ++ ++ - name: Generate changes file ++ uses: sarnold/gitchangelog-action@master ++ with: ++ github_token: ${{ secrets.GITHUB_TOKEN}} ++ ++ - name: Create release ++ id: create_release ++ uses: softprops/action-gh-release@v1 ++ env: ++ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ++ with: ++ tag_name: ${{ env.VERSION }} ++ name: Release v${{ env.VERSION }} ++ body_path: CHANGES.md ++ draft: false ++ prerelease: false ++ files: | ++ wheels/pystache*.whl +diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml +new file mode 100644 +index 0000000..58f0c5e +--- /dev/null ++++ b/.github/workflows/wheels.yml +@@ -0,0 +1,82 @@ ++name: Wheels ++ ++on: ++ workflow_dispatch: ++ pull_request: ++ #push: ++ #branches: [ master ] ++ ++jobs: ++ build: ++ ++ runs-on: ${{ matrix.os }} ++ defaults: ++ run: ++ shell: bash ++ env: ++ PYTHONIOENCODING: utf-8 ++ strategy: ++ fail-fast: false ++ matrix: ++ os: [ubuntu-18.04, macos-latest, windows-latest] ++ python-version: [3.6, 3.7, 3.8, 3.9] ++ ++ steps: ++ - name: Set git crlf/eol ++ run: | ++ git config --global core.autocrlf false ++ git config --global core.eol lf ++ ++ - uses: actions/checkout@v2 ++ with: ++ fetch-depth: 0 ++ ++ - name: Set up Python ${{ matrix.python-version }} ++ uses: actions/setup-python@v2 ++ with: ++ python-version: ${{ matrix.python-version }} ++ ++ - name: Install dependencies ++ run: | ++ python -m pip install --upgrade pip wheel ++ pip install tox tox-gh-actions ++ ++ - name: Build dist pkgs ++ run: | ++ tox -e deploy ++ ++ - name: Upload artifacts ++ if: matrix.python-version == 3.7 && runner.os == 'Linux' ++ uses: actions/upload-artifact@v2 ++ with: ++ name: wheels ++ path: ./dist/*.whl ++ ++ check_artifact: ++ name: Check wheel artifact ++ needs: [build] ++ runs-on: ${{ matrix.os }} ++ defaults: ++ run: ++ shell: bash ++ env: ++ PYTHONIOENCODING: utf-8 ++ strategy: ++ fail-fast: false ++ matrix: ++ os: [ubuntu-18.04, macos-latest, windows-latest] ++ python-version: [3.6, 3.8, 3.9] ++ ++ steps: ++ - name: Set up Python ${{ matrix.python-version }} ++ uses: actions/setup-python@v2 ++ with: ++ python-version: ${{ matrix.python-version }} ++ ++ # download all artifacts to project dir ++ - uses: actions/download-artifact@v2 ++ ++ - name: Check wheel install ++ run: | ++ bash -c 'export WHL=$(ls wheels/*.whl); python -m pip install $WHL' ++ pystache-test +diff --git a/.pep8speaks.yml b/.pep8speaks.yml +new file mode 100644 +index 0000000..e841b66 +--- /dev/null ++++ b/.pep8speaks.yml +@@ -0,0 +1,15 @@ ++scanner: ++ linter: flake8 # Other option is pycodestyle ++ ++no_blank_comment: False # If True, no comment is made on PR without any errors. ++descending_issues_order: True # If True, PEP 8 issues in message will be displayed in descending order of line numbers in the file ++ ++[flake8] ++exclude = ++ .git, ++ .github, ++ __pycache__, ++ build, ++ dist ++ ++max-line-length = 110 +diff --git a/HISTORY.md b/HISTORY.md +index e5b7638..60b6308 100644 +--- a/HISTORY.md ++++ b/HISTORY.md +@@ -1,7 +1,42 @@ + History + ======= + +-**Note:** Official support for Python 2.4 will end with Pystache version 0.6.0. ++**Note:** Official support for Python 2.7 will end with Pystache version 0.6.0. ++ ++0.6.0 (2021-03-04) ++------------------ ++ ++- Bump spec versions to latest => v1.1.3 ++- Modernize python and CI tools, update docs/doctests ++- Update unicode conversion test for py3-only ++- Add pep8speaks cfg, cleanup warnings ++- Remove superfluous setup test/unused imports ++- Add conda recipe/CI build ++ ++0.5.6 (2021-02-28) ++------------------ ++ ++- Use correct wheel name in release workflow, limit wheels ++- Add install check/test of downloaded wheel ++- Update/add ci workflows and tox cfg, bump to next dev0 version ++ ++0.5.5 (2020-12-16) ++------------------ ++ ++- fix document processing, update pandoc args and history ++- add release.yml to CI, test env settings ++- fix bogus commit message, update versions and tox cf ++- add post-test steps for building pkgs with/without doc updates ++- add CI build check, fix MANIFEST.in pruning ++ ++0.5.4-2 (2020-11-09) ++-------------------- ++ ++- Merge pull request #1 from sarnold/rebase-up ++- Bugfix: test_specloader.py: fix test_find__with_directory on other OSs ++- Bugfix: pystache/loader.py: remove stray windows line-endings ++- fix crufty (and insecure) http urls ++- Bugfix: modernize python versions (keep py27) and fix spec_test load cmd + + 0.5.4 (2014-07-11) + ------------------ +diff --git a/MANIFEST.in b/MANIFEST.in +index bdc64bf..1593143 100644 +--- a/MANIFEST.in ++++ b/MANIFEST.in +@@ -1,7 +1,4 @@ +-include README.md +-include HISTORY.md +-include LICENSE +-include TODO.md ++include README.md HISTORY.md TODO.md LICENSE + include setup_description.rst + include tox.ini + include test_pystache.py +@@ -11,3 +8,6 @@ recursive-include pystache/tests *.mustache *.txt + # We deliberately exclude the gh/ directory because it contains copies + # of resources needed only for the web page hosted on GitHub (via the + # gh-pages branch). ++exclude *.ini *travis* ++prune gh ++prune .git* +diff --git a/README.md b/README.md +index 54a9608..1203b7a 100644 +--- a/README.md ++++ b/README.md +@@ -10,11 +10,25 @@ Pystache + <!-- --> + <!-- We leave the leading brackets empty here. Otherwise, unwanted --> + <!-- caption text shows up in the reST version converted by pandoc. --> +-![](http://defunkt.github.com/pystache/images/logo_phillips.png "mustachioed, monocled snake by David Phillips") ++[![ci](https://github.com/sarnold/pystache/actions/workflows/ci.yml/badge.svg)](https://github.com/sarnold/pystache/actions/workflows/ci.yml) ++[![Conda](https://github.com/sarnold/pystache/actions/workflows/conda.yml/badge.svg)](https://github.com/sarnold/pystache/actions/workflows/conda.yml) ++[![Wheels](https://github.com/sarnold/pystache/actions/workflows/wheels.yml/badge.svg)](https://github.com/sarnold/pystache/actions/workflows/wheels.yml) ++[![Release](https://github.com/sarnold/pystache/actions/workflows/release.yml/badge.svg)](https://github.com/sarnold/pystache/actions/workflows/release.yml) ++[![Python](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/) + +-![](https://secure.travis-ci.org/defunkt/pystache.png "Travis CI current build status") ++[![Latest release](https://img.shields.io/github/v/release/sarnold/pystache?include_prereleases)](https://github.com/sarnold/pystache/releases/latest) ++[![License](https://img.shields.io/github/license/sarnold/pystache)](https://github.com/sarnold/pystache/blob/master/LICENSE) ++[![Maintainability](https://api.codeclimate.com/v1/badges/a8fa1bf4638bfc6581b6/maintainability)](https://codeclimate.com/github/sarnold/pystache/maintainability) ++[![codecov](https://codecov.io/gh/sarnold/pystache/branch/master/graph/badge.svg?token=5PZNMZBI6K)](https://codecov.io/gh/sarnold/pystache) + +-[Pystache](http://defunkt.github.com/pystache) is a Python ++ ++ ++This updated fork of Pystache is currently tested on Python 3.6+ and in ++Conda, on Linux, Macos, and Windows (Python 2.7 support has been removed). ++ ++![](gh/images/logo_phillips_small.png "mustachioed, monocled snake by David Phillips") ++ ++[Pystache](http://sarnold.github.com/pystache) is a Python + implementation of [Mustache](http://mustache.github.com/). Mustache is a + framework-agnostic, logic-free templating system inspired by + [ctemplate](http://code.google.com/p/google-ctemplate/) and +@@ -27,10 +41,10 @@ provides a good introduction to Mustache's syntax. For a more complete + (and more current) description of Mustache's behavior, see the official + [Mustache spec](https://github.com/mustache/spec). + +-Pystache is [semantically versioned](http://semver.org) and can be found +-on [PyPI](http://pypi.python.org/pypi/pystache). This version of +-Pystache passes all tests in [version +-1.1.2](https://github.com/mustache/spec/tree/v1.1.2) of the spec. ++Pystache is [semantically versioned](http://semver.org) and older versions ++can still be found on [PyPI](http://pypi.python.org/pypi/pystache). This ++version of Pystache now passes all tests in [version ++1.1.3](https://github.com/mustache/spec/tree/v1.1.3) of the spec. + + + Requirements +@@ -38,41 +52,25 @@ Requirements + + Pystache is tested with-- + +-- Python 2.4 (requires simplejson [version +- 2.0.9](http://pypi.python.org/pypi/simplejson/2.0.9) or earlier) +-- Python 2.5 (requires +- [simplejson](http://pypi.python.org/pypi/simplejson/)) +-- Python 2.6 +-- Python 2.7 +-- Python 3.1 +-- Python 3.2 +-- Python 3.3 +-- [PyPy](http://pypy.org/) ++- Python 3.6 ++- Python 3.7 ++- Python 3.8 ++- Python 3.9 ++- Conda (py36-py39) + + [Distribute](http://packages.python.org/distribute/) (the setuptools fork) +-is recommended over [setuptools](http://pypi.python.org/pypi/setuptools), +-and is required in some cases (e.g. for Python 3 support). +-If you use [pip](http://www.pip-installer.org/), you probably already satisfy +-this requirement. ++is no longer required over [setuptools](http://pypi.python.org/pypi/setuptools), ++as the current packaging is now PEP517-compliant. + + JSON support is needed only for the command-line interface and to run +-the spec tests. We require simplejson for earlier versions of Python +-since Python's [json](http://docs.python.org/library/json.html) module +-was added in Python 2.6. +- +-For Python 2.4 we require an earlier version of simplejson since +-simplejson stopped officially supporting Python 2.4 in simplejson +-version 2.1.0. Earlier versions of simplejson can be installed manually, +-as follows: ++the spec tests; PyYAML can still be used (see the Develop section). + +- pip install 'simplejson<2.1.0' +- +-Official support for Python 2.4 will end with Pystache version 0.6.0. ++Official support for Python 2 will end with Pystache version 0.6.0. + + Install It + ---------- + +- pip install pystache ++ pip install -U pystache -f https://github.com/sarnold/pystache/releases/ + + And test it-- + +@@ -85,12 +83,12 @@ Use It + ------ + + >>> import pystache +- >>> print pystache.render('Hi {{person}}!', {'person': 'Mom'}) ++ >>> print(pystache.render('Hi {{person}}!', {'person': 'Mom'})) + Hi Mom! + + You can also create dedicated view classes to hold your view logic. + +-Here's your view class (in .../examples/readme.py): ++Here's your view class (in ../pystache/tests/examples/readme.py): + + class SayHello(object): + def to(self): +@@ -109,7 +107,7 @@ directory as your class definition): + Pull it together: + + >>> renderer = pystache.Renderer() +- >>> print renderer.render(hello) ++ >>> print(renderer.render(hello)) + Hello, Pizza! + + For greater control over rendering (e.g. to specify a custom template +@@ -117,22 +115,22 @@ directory), use the `Renderer` class like above. One can pass attributes + to the Renderer class constructor or set them on a Renderer instance. To + customize template loading on a per-view basis, subclass `TemplateSpec`. + See the docstrings of the +-[Renderer](https://github.com/defunkt/pystache/blob/master/pystache/renderer.py) ++[Renderer](https://github.com/sarnold/pystache/blob/master/pystache/renderer.py) + class and +-[TemplateSpec](https://github.com/defunkt/pystache/blob/master/pystache/template_spec.py) ++[TemplateSpec](https://github.com/sarnold/pystache/blob/master/pystache/template_spec.py) + class for more information. + + You can also pre-parse a template: + + >>> parsed = pystache.parse(u"Hey {{#who}}{{.}}!{{/who}}") +- >>> print parsed +- [u'Hey ', _SectionNode(key=u'who', index_begin=12, index_end=18, parsed=[_EscapeNode(key=u'.'), u'!'])] ++ >>> print(parsed) ++ ['Hey ', _SectionNode(key='who', index_begin=12, index_end=18, parsed=[_EscapeNode(key='.'), '!'])] + + And then: + +- >>> print renderer.render(parsed, {'who': 'Pops'}) ++ >>> print(renderer.render(parsed, {'who': 'Pops'})) + Hey Pops! +- >>> print renderer.render(parsed, {'who': 'you'}) ++ >>> print(renderer.render(parsed, {'who': 'you'})) + Hey you! + + Python 3 +@@ -194,15 +192,16 @@ To test from a source distribution (without installing)-- + python test_pystache.py + + To test Pystache with multiple versions of Python (with a single +-command!), you can use [tox](http://pypi.python.org/pypi/tox): ++command!) and different platforms, you can use [tox](http://pypi.python.org/pypi/tox): ++ ++ pip install tox ++ tox -e setup + +- pip install 'virtualenv<1.8' # Version 1.8 dropped support for Python 2.4. +- pip install 'tox<1.4' # Version 1.4 dropped support for Python 2.4. +- tox ++To run tests on multiple versions with coverage, run: + +-If you do not have all Python versions listed in `tox.ini`-- ++ tox -e py38-linux,py39-linux # for example + +- tox -e py26,py32 # for example ++(substitute your platform above, eg, macos or windows) + + The source distribution tests also include doctests and tests from the + Mustache spec. To include tests from the Mustache spec in your test +@@ -217,57 +216,33 @@ parses the json files. To install PyYAML-- + + pip install pyyaml + ++Once the submodule is available, you can run the full test set with: ++ ++ tox -e setup . ext/spec/specs ++ + To run a subset of the tests, you can use + [nose](http://somethingaboutorange.com/mrl/projects/nose/0.11.1/testing.html): + + pip install nose + nosetests --tests pystache/tests/test_context.py:GetValueTests.test_dictionary__key_present + +-### Using Python 3 with Pystache from source +- +-Pystache is written in Python 2 and must be converted to Python 3 prior to +-using it with Python 3. The installation process (and tox) do this +-automatically. + +-To convert the code to Python 3 manually (while using Python 3)-- ++Mailing List (old) ++------------------ + +- python setup.py build +- +-This writes the converted code to a subdirectory called `build`. +-By design, Python 3 builds +-[cannot](https://bitbucket.org/tarek/distribute/issue/292/allow-use_2to3-with-python-2) +-be created from Python 2. +- +-To convert the code without using setup.py, you can use +-[2to3](http://docs.python.org/library/2to3.html) as follows (two steps)-- +- +- 2to3 --write --nobackups --no-diffs --doctests_only pystache +- 2to3 --write --nobackups --no-diffs pystache +- +-This converts the code (and doctests) in place. +- +-To `import pystache` from a source distribution while using Python 3, be +-sure that you are importing from a directory containing a converted +-version of the code (e.g. from the `build` directory after converting), +-and not from the original (unconverted) source directory. Otherwise, you will +-get a syntax error. You can help prevent this by not running the Python +-IDE from the project directory when importing Pystache while using Python 3. +- +- +-Mailing List +------------- +- +-There is a [mailing list](http://librelist.com/browser/pystache/). Note ++There is(was) a [mailing list](http://librelist.com/browser/pystache/). Note + that there is a bit of a delay between posting a message and seeing it + appear in the mailing list archive. + + Credits + ------- + +- >>> context = { 'author': 'Chris Wanstrath', 'maintainer': 'Chris Jerdonek' } +- >>> print pystache.render("Author: {{author}}\nMaintainer: {{maintainer}}", context) ++ >>> import pystache ++ >>> context = { 'author': 'Chris Wanstrath', 'maintainer': 'Chris Jerdonek','refurbisher': 'Steve Arnold' } ++ >>> print(pystache.render("Author: {{author}}\nMaintainer: {{maintainer}}\nRefurbisher: {{refurbisher}}", context)) + Author: Chris Wanstrath + Maintainer: Chris Jerdonek ++ Refurbisher: Steve Arnold + + Pystache logo by [David Phillips](http://davidphillips.us/) is licensed + under a [Creative Commons Attribution-ShareAlike 3.0 Unported +diff --git a/TODO.md b/TODO.md +index cd82417..76853a4 100644 +--- a/TODO.md ++++ b/TODO.md +@@ -6,11 +6,10 @@ In development branch: + * Figure out a way to suppress center alignment of images in reST output. + * Add a unit test for the change made in 7ea8e7180c41. This is with regard + to not requiring spec tests when running tests from a downloaded sdist. +-* End support for Python 2.4. +-* Add Python 3.3 to tox file (after deprecating 2.4). ++* End support for Python 2.7 (done as of 03/03/21 - SA) ++* Release 0.6.0 on github, make a pypi account (SA) + * Turn the benchmarking script at pystache/tests/benchmark.py into a command + in pystache/commands, or make it a subcommand of one of the existing + commands (i.e. using a command argument). + * Provide support for logging in at least one of the commands. +-* Make sure command parsing to pystache-test doesn't break with Python 2.4 and earlier. + * Combine pystache-test with the main command. +diff --git a/conda/meta.yaml b/conda/meta.yaml +new file mode 100644 +index 0000000..e7f4fd9 +--- /dev/null ++++ b/conda/meta.yaml +@@ -0,0 +1,50 @@ ++{% set name = "pystache" %} ++{% set version = "0.6.0.dev0" %} ++ ++package: ++ name: {{ name|lower }} ++ version: {{ version }} ++ ++source: ++ path: .. ++ ++build: ++ number: 0 ++ script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vvv ++ noarch: python ++ entry_points: ++ - pystache = pystache.commands.render:main ++ - pystache-test = pystache.commands.test:main ++ ++requirements: ++ build: ++ - python ++ - setuptools ++ ++ run: ++ - python ++ ++test: ++ imports: ++ - pystache ++ - pystache.commands ++ - pystache.tests ++ - pystache.tests.data ++ - pystache.tests.data.locator ++ - pystache.tests.examples ++ ++ commands: ++ - pystache --help ++ - pystache-test ++ ++ ++about: ++ home: https://github.com/sarnold/pystache ++ license: MIT ++ license_family: MIT ++ license_file: LICENSE ++ summary: Mustache for Python ++ ++extra: ++ recipe-maintainers: ++ - sarnold +diff --git a/pyproject.toml b/pyproject.toml +new file mode 100644 +index 0000000..2f21011 +--- /dev/null ++++ b/pyproject.toml +@@ -0,0 +1,3 @@ ++[build-system] ++requires = ["setuptools>=40.8.0", "wheel"] ++build-backend = "setuptools.build_meta" +diff --git a/pystache/__init__.py b/pystache/__init__.py +index 4cf2434..5edc1c5 100644 +--- a/pystache/__init__.py ++++ b/pystache/__init__.py +@@ -10,4 +10,4 @@ from pystache.init import parse, render, Renderer, TemplateSpec + + __all__ = ['parse', 'render', 'Renderer', 'TemplateSpec'] + +-__version__ = '0.5.4' # Also change in setup.py. ++__version__ = '0.6.0' +diff --git a/pystache/commands/render.py b/pystache/commands/render.py +index 1a9c309..9c913e7 100644 +--- a/pystache/commands/render.py ++++ b/pystache/commands/render.py +@@ -22,7 +22,7 @@ except: + from sys import exc_info + ex_type, ex_value, tb = exc_info() + new_ex = Exception("%s: %s" % (ex_type.__name__, ex_value)) +- raise new_ex.__class__, new_ex, tb ++ raise new_ex.__class__(new_ex).with_traceback(tb) + + # The optparse module is deprecated in Python 2.7 in favor of argparse. + # However, argparse is not available in Python 2.6 and earlier. +@@ -88,7 +88,7 @@ def main(sys_argv=sys.argv): + context = json.loads(context) + + rendered = renderer.render(template, context) +- print rendered ++ print(rendered) + + + if __name__=='__main__': +diff --git a/pystache/common.py b/pystache/common.py +index fb266dd..0e9b091 100644 +--- a/pystache/common.py ++++ b/pystache/common.py +@@ -5,17 +5,12 @@ Exposes functionality needed throughout the project. + + """ + +-from sys import version_info + + def _get_string_types(): +- # TODO: come up with a better solution for this. One of the issues here +- # is that in Python 3 there is no common base class for unicode strings +- # and byte strings, and 2to3 seems to convert all of "str", "unicode", +- # and "basestring" to Python 3's "str". +- if version_info < (3, ): +- return basestring +- # The latter evaluates to "bytes" in Python 3 -- even after conversion by 2to3. +- return (unicode, type(u"a".encode('utf-8'))) ++ """ ++ Return the Python3 string type (no more python2) ++ """ ++ return (str, type("a".encode('utf-8'))) + + + _STRING_TYPES = _get_string_types() +diff --git a/pystache/defaults.py b/pystache/defaults.py +index bcfdf4c..2fab0e0 100644 +--- a/pystache/defaults.py ++++ b/pystache/defaults.py +@@ -39,7 +39,7 @@ STRING_ENCODING = sys.getdefaultencoding() + FILE_ENCODING = sys.getdefaultencoding() + + # The delimiters to start with when parsing. +-DELIMITERS = (u'{{', u'}}') ++DELIMITERS = ('{{', '}}') + + # How to handle missing tags when rendering a template. + MISSING_TAGS = MissingTags.ignore +diff --git a/pystache/loader.py b/pystache/loader.py +index d4a7e53..ea01d17 100644 +--- a/pystache/loader.py ++++ b/pystache/loader.py +@@ -6,6 +6,7 @@ This module provides a Loader class for locating and reading templates. + """ + + import os ++import platform + import sys + + from pystache import common +@@ -24,7 +25,7 @@ def _make_to_unicode(): + """ + if encoding is None: + encoding = defaults.STRING_ENCODING +- return unicode(s, encoding, defaults.DECODE_ERRORS) ++ return str(s, encoding, defaults.DECODE_ERRORS) + return to_unicode + + +@@ -86,7 +87,7 @@ class Loader(object): + def _make_locator(self): + return Locator(extension=self.extension) + +- def unicode(self, s, encoding=None): ++ def str(self, s, encoding=None): + """ + Convert a string to unicode using the given encoding, and return it. + +@@ -104,8 +105,8 @@ class Loader(object): + Defaults to None. + + """ +- if isinstance(s, unicode): +- return unicode(s) ++ if isinstance(s, str): ++ return str(s) + + return self.to_unicode(s, encoding) + +@@ -118,8 +119,9 @@ class Loader(object): + + if encoding is None: + encoding = self.file_encoding +- +- return self.unicode(b, encoding) ++ if platform.system() == "Windows": ++ return self.str(b, encoding).replace('\r', '') ++ return self.str(b, encoding) + + def load_file(self, file_name): + """ +diff --git a/pystache/parsed.py b/pystache/parsed.py +index 372d96c..75d417d 100644 +--- a/pystache/parsed.py ++++ b/pystache/parsed.py +@@ -41,10 +41,10 @@ class ParsedTemplate(object): + """ + # We avoid use of the ternary operator for Python 2.4 support. + def get_unicode(node): +- if type(node) is unicode: ++ if type(node) is str: + return node + return node.render(engine, context) +- parts = map(get_unicode, self._parse_tree) ++ parts = list(map(get_unicode, self._parse_tree)) + s = ''.join(parts) + +- return unicode(s) ++ return str(s) +diff --git a/pystache/parser.py b/pystache/parser.py +index c6a171f..1afd50a 100644 +--- a/pystache/parser.py ++++ b/pystache/parser.py +@@ -11,8 +11,8 @@ from pystache import defaults + from pystache.parsed import ParsedTemplate + + +-END_OF_LINE_CHARACTERS = [u'\r', u'\n'] +-NON_BLANK_RE = re.compile(ur'^(.)', re.M) ++END_OF_LINE_CHARACTERS = ['\r', '\n'] ++NON_BLANK_RE = re.compile(r'^(.)', re.M) + + + # TODO: add some unit tests for this. +@@ -30,12 +30,12 @@ def parse(template, delimiters=None): + + Examples: + +- >>> parsed = parse(u"Hey {{#who}}{{name}}!{{/who}}") +- >>> print str(parsed).replace('u', '') # This is a hack to get the test to pass both in Python 2 and 3. ++ >>> parsed = parse("Hey {{#who}}{{name}}!{{/who}}") ++ >>> print(str(parsed).replace('u', '')) # This is an old hack. + ['Hey ', _SectionNode(key='who', index_begin=12, index_end=21, parsed=[_EscapeNode(key='name'), '!'])] + + """ +- if type(template) is not unicode: ++ if type(template) is not str: + raise Exception("Template is not unicode: %s" % type(template)) + parser = _Parser(delimiters) + return parser.parse(template) +@@ -94,7 +94,7 @@ class _CommentNode(object): + return _format(self) + + def render(self, engine, context): +- return u'' ++ return '' + + + class _ChangeNode(object): +@@ -106,7 +106,7 @@ class _ChangeNode(object): + return _format(self) + + def render(self, engine, context): +- return u'' ++ return '' + + + class _EscapeNode(object): +@@ -147,7 +147,7 @@ class _PartialNode(object): + def render(self, engine, context): + template = engine.resolve_partial(self.key) + # Indent before rendering. +- template = re.sub(NON_BLANK_RE, self.indent + ur'\1', template) ++ template = re.sub(NON_BLANK_RE, self.indent + r'\1', template) + + return engine.render(template, context) + +@@ -168,7 +168,7 @@ class _InvertedNode(object): + # Note that lambdas are considered truthy for inverted sections + # per the spec. + if data: +- return u'' ++ return '' + return self.parsed_section.render(engine, context) + + +@@ -218,7 +218,7 @@ class _SectionNode(object): + parts.append(self.parsed.render(engine, context)) + context.pop() + +- return unicode(''.join(parts)) ++ return str(''.join(parts)) + + + class _Parser(object): +diff --git a/pystache/renderengine.py b/pystache/renderengine.py +index c797b17..2f1e341 100644 +--- a/pystache/renderengine.py ++++ b/pystache/renderengine.py +@@ -160,7 +160,7 @@ class RenderEngine(object): + if not is_string(val): + # In case the template is an integer, for example. + val = self.to_str(val) +- if type(val) is not unicode: ++ if type(val) is not str: + val = self.literal(val) + return self.render(val, context, delimiters) + +diff --git a/pystache/renderer.py b/pystache/renderer.py +index ff6a90c..064f040 100644 +--- a/pystache/renderer.py ++++ b/pystache/renderer.py +@@ -32,7 +32,7 @@ class Renderer(object): + >>> partials = {'partial': 'Hello, {{thing}}!'} + >>> renderer = Renderer(partials=partials) + >>> # We apply print to make the test work in Python 3 after 2to3. +- >>> print renderer.render('{{>partial}}', {'thing': 'world'}) ++ >>> print(renderer.render('{{>partial}}', {'thing': 'world'})) + Hello, world! + + To customize string coercion (e.g. to render False values as ''), one can +@@ -130,7 +130,7 @@ class Renderer(object): + if string_encoding is None: + string_encoding = defaults.STRING_ENCODING + +- if isinstance(search_dirs, basestring): ++ if isinstance(search_dirs, str): + search_dirs = [search_dirs] + + self._context = None +@@ -177,16 +177,16 @@ class Renderer(object): + """ + # We type-check to avoid "TypeError: decoding Unicode is not supported". + # We avoid the Python ternary operator for Python 2.4 support. +- if isinstance(s, unicode): ++ if isinstance(s, str): + return s +- return self.unicode(s) ++ return self.str(s) + + def _to_unicode_hard(self, s): + """ + Convert a basestring to a string with type unicode (not subclass). + + """ +- return unicode(self._to_unicode_soft(s)) ++ return str(self._to_unicode_soft(s)) + + def _escape_to_unicode(self, s): + """ +@@ -195,9 +195,9 @@ class Renderer(object): + Returns a unicode string (not subclass). + + """ +- return unicode(self.escape(self._to_unicode_soft(s))) ++ return str(self.escape(self._to_unicode_soft(s))) + +- def unicode(self, b, encoding=None): ++ def str(self, b, encoding=None): + """ + Convert a byte string to unicode, using string_encoding and decode_errors. + +@@ -222,7 +222,7 @@ class Renderer(object): + + # TODO: Wrap UnicodeDecodeErrors with a message about setting + # the string_encoding and decode_errors attributes. +- return unicode(b, encoding, self.decode_errors) ++ return str(b, encoding, self.decode_errors) + + def _make_loader(self): + """ +@@ -230,7 +230,7 @@ class Renderer(object): + + """ + return Loader(file_encoding=self.file_encoding, extension=self.file_extension, +- to_unicode=self.unicode, search_dirs=self.search_dirs) ++ to_unicode=self.str, search_dirs=self.search_dirs) + + def _make_load_template(self): + """ +@@ -299,7 +299,7 @@ class Renderer(object): + try: + return load_partial(name) + except TemplateNotFoundError: +- return u'' ++ return '' + + return resolve_partial + +@@ -316,7 +316,7 @@ class Renderer(object): + try: + return context_get(stack, name) + except KeyNotFoundError: +- return u'' ++ return '' + + return resolve_context + +diff --git a/pystache/specloader.py b/pystache/specloader.py +index 3a77d4c..a82d52a 100644 +--- a/pystache/specloader.py ++++ b/pystache/specloader.py +@@ -83,7 +83,7 @@ class SpecLoader(object): + + """ + if spec.template is not None: +- return self.loader.unicode(spec.template, spec.template_encoding) ++ return self.loader.str(spec.template, spec.template_encoding) + + path = self._find(spec) + +diff --git a/pystache/tests/benchmark.py b/pystache/tests/benchmark.py +index d46e973..6cb54f8 100755 +--- a/pystache/tests/benchmark.py ++++ b/pystache/tests/benchmark.py +@@ -13,6 +13,13 @@ tests/benchmark.py 10000 + import sys + from timeit import Timer + ++try: ++ import chevron as pystache ++ print('Using module: chevron') ++except (ImportError): ++ import pystache ++ print('Using module: pystache') ++ + import pystache + + # TODO: make the example realistic. +@@ -76,17 +83,17 @@ def main(sys_argv): + args = sys_argv[1:] + count = int(args[0]) + +- print "Benchmarking: %sx" % count +- print ++ print("Benchmarking: %sx" % count) ++ print() + + for example in examples: + + test = make_test_function(example) + + t = Timer(test,) +- print min(t.repeat(repeat=3, number=count)) ++ print(min(t.repeat(repeat=3, number=count))) + +- print "Done" ++ print("Done") + + + if __name__ == '__main__': +diff --git a/pystache/tests/common.py b/pystache/tests/common.py +index 222e14f..12b76b5 100644 +--- a/pystache/tests/common.py ++++ b/pystache/tests/common.py +@@ -72,8 +72,8 @@ def _find_files(root_dir, should_include): + # http://docs.python.org/library/os.html#os.walk + for dir_path, dir_names, file_names in os.walk(root_dir): + new_paths = [os.path.join(dir_path, file_name) for file_name in file_names] +- new_paths = filter(is_module, new_paths) +- new_paths = filter(should_include, new_paths) ++ new_paths = list(filter(is_module, new_paths)) ++ new_paths = list(filter(should_include, new_paths)) + paths.extend(new_paths) + + return paths +@@ -183,7 +183,7 @@ class AssertExceptionMixin: + try: + callable(*args, **kwds) + raise Exception("Expected exception: %s: %s" % (exception_type, repr(msg))) +- except exception_type, err: ++ except exception_type as err: + self.assertEqual(str(err), msg) + + +@@ -228,10 +228,10 @@ class Attachable(object): + """ + def __init__(self, **kwargs): + self.__args__ = kwargs +- for arg, value in kwargs.iteritems(): ++ for arg, value in kwargs.items(): + setattr(self, arg, value) + + def __repr__(self): + return "%s(%s)" % (self.__class__.__name__, + ", ".join("%s=%s" % (k, repr(v)) +- for k, v in self.__args__.iteritems())) ++ for k, v in self.__args__.items())) +diff --git a/pystache/tests/examples/unicode_output.py b/pystache/tests/examples/unicode_output.py +index da0e1d2..7bdea36 100644 +--- a/pystache/tests/examples/unicode_output.py ++++ b/pystache/tests/examples/unicode_output.py +@@ -8,4 +8,4 @@ TODO: add a docstring. + class UnicodeOutput(object): + + def name(self): +- return u'Henri Poincaré' ++ return 'Henri Poincaré' +diff --git a/pystache/tests/main.py b/pystache/tests/main.py +index 8af6b2e..17f2fb2 100644 +--- a/pystache/tests/main.py ++++ b/pystache/tests/main.py +@@ -88,7 +88,7 @@ def main(sys_argv): + + """ + # TODO: use logging module +- print "pystache: running tests: argv: %s" % repr(sys_argv) ++ print("pystache: running tests: argv: %s" % repr(sys_argv)) + + should_source_exist = False + spec_test_dir = None +@@ -131,11 +131,9 @@ def main(sys_argv): + module_names = _discover_test_modules(PACKAGE_DIR) + sys_argv.extend(module_names) + if project_dir is not None: +- # Add the current module for unit tests contained here (e.g. +- # to include SetupTests). ++ # Add the current module for unit tests contained here + sys_argv.append(__name__) + +- SetupTests.project_dir = project_dir + + extra_tests = make_extra_tests(project_dir, spec_test_dir) + test_program_class = make_test_program_class(extra_tests) +@@ -166,25 +164,3 @@ def _discover_test_modules(package_dir): + raise Exception("No unit-test modules found--\n in %s" % package_dir) + + return names +- +- +-class SetupTests(TestCase): +- +- """Tests about setup.py.""" +- +- project_dir = None +- +- def test_version(self): +- """ +- Test that setup.py's version matches the package's version. +- +- """ +- original_path = list(sys.path) +- +- sys.path.insert(0, self.project_dir) +- +- try: +- from setup import VERSION +- self.assertEqual(VERSION, pystache.__version__) +- finally: +- sys.path = original_path +diff --git a/pystache/tests/spectesting.py b/pystache/tests/spectesting.py +index ec8a08d..2dd57e8 100644 +--- a/pystache/tests/spectesting.py ++++ b/pystache/tests/spectesting.py +@@ -37,7 +37,7 @@ except ImportError: + from sys import exc_info + ex_type, ex_value, tb = exc_info() + new_ex = Exception("%s: %s" % (ex_type.__name__, ex_value)) +- raise new_ex.__class__, new_ex, tb ++ raise new_ex.__class__(new_ex).with_traceback(tb) + file_extension = 'json' + parser = json + else: +@@ -62,7 +62,7 @@ def get_spec_tests(spec_test_dir): + + """ + # TODO: use logging module instead. +- print "pystache: spec tests: using %s" % _get_parser_info() ++ print("pystache: spec tests: using %s" % _get_parser_info()) + + cases = [] + +@@ -103,7 +103,7 @@ def _read_spec_tests(path): + + """ + b = common.read(path) +- u = unicode(b, encoding=FILE_ENCODING) ++ u = str(b, encoding=FILE_ENCODING) + spec_data = parse(u) + tests = spec_data['tests'] + +@@ -133,7 +133,7 @@ def _convert_children(node): + return + # Otherwise, node is a dict, so attempt the conversion. + +- for key in node.keys(): ++ for key in list(node.keys()): + val = node[key] + + if not isinstance(val, dict) or val.get('__tag__') != 'code': +@@ -158,9 +158,9 @@ def _deserialize_spec_test(data, file_path): + context = data['data'] + description = data['desc'] + # PyYAML seems to leave ASCII strings as byte strings. +- expected = unicode(data['expected']) ++ expected = str(data['expected']) + # TODO: switch to using dict.get(). +- partials = data.has_key('partials') and data['partials'] or {} ++ partials = 'partials' in data and data['partials'] or {} + template = data['template'] + test_name = data['name'] + +@@ -237,8 +237,8 @@ def parse(u): + value = loader.construct_mapping(node) + return eval(value['python'], {}) + +- yaml.add_constructor(u'!code', code_constructor) +- return yaml.load(u) ++ yaml.add_constructor('!code', code_constructor) ++ return yaml.full_load(u) + + + class SpecTestBase(unittest.TestCase, AssertStringMixin): +diff --git a/pystache/tests/test___init__.py b/pystache/tests/test___init__.py +index eae42c1..63d2c3b 100644 +--- a/pystache/tests/test___init__.py ++++ b/pystache/tests/test___init__.py +@@ -6,9 +6,9 @@ Tests of __init__.py. + """ + + # Calling "import *" is allowed only at the module level. +-GLOBALS_INITIAL = globals().keys() ++GLOBALS_INITIAL = list(globals().keys()) + from pystache import * +-GLOBALS_PYSTACHE_IMPORTED = globals().keys() ++GLOBALS_PYSTACHE_IMPORTED = list(globals().keys()) + + import unittest + +diff --git a/pystache/tests/test_commands.py b/pystache/tests/test_commands.py +index 2529d25..34fe8ba 100644 +--- a/pystache/tests/test_commands.py ++++ b/pystache/tests/test_commands.py +@@ -39,7 +39,7 @@ class CommandsTestCase(unittest.TestCase): + + """ + actual = self.callScript("Hi {{thing}}", '{"thing": "world"}') +- self.assertEqual(actual, u"Hi world\n") ++ self.assertEqual(actual, "Hi world\n") + + def tearDown(self): + sys.stdout = ORIGINAL_STDOUT +diff --git a/pystache/tests/test_defaults.py b/pystache/tests/test_defaults.py +index c78ea7c..5399bb0 100644 +--- a/pystache/tests/test_defaults.py ++++ b/pystache/tests/test_defaults.py +@@ -31,37 +31,37 @@ class DefaultsConfigurableTestCase(unittest.TestCase, AssertStringMixin): + self.saved[e] = getattr(pystache.defaults, e) + + def tearDown(self): +- for key, value in self.saved.items(): ++ for key, value in list(self.saved.items()): + setattr(pystache.defaults, key, value) + + def test_tag_escape(self): + """Test that changes to defaults.TAG_ESCAPE take effect.""" +- template = u"{{foo}}" ++ template = "{{foo}}" + context = {'foo': '<'} + actual = pystache.render(template, context) +- self.assertString(actual, u"<") ++ self.assertString(actual, "<") + + pystache.defaults.TAG_ESCAPE = lambda u: u + actual = pystache.render(template, context) +- self.assertString(actual, u"<") ++ self.assertString(actual, "<") + + def test_delimiters(self): + """Test that changes to defaults.DELIMITERS take effect.""" +- template = u"[[foo]]{{foo}}" ++ template = "[[foo]]{{foo}}" + context = {'foo': 'FOO'} + actual = pystache.render(template, context) +- self.assertString(actual, u"[[foo]]FOO") ++ self.assertString(actual, "[[foo]]FOO") + + pystache.defaults.DELIMITERS = ('[[', ']]') + actual = pystache.render(template, context) +- self.assertString(actual, u"FOO{{foo}}") ++ self.assertString(actual, "FOO{{foo}}") + + def test_missing_tags(self): + """Test that changes to defaults.MISSING_TAGS take effect.""" +- template = u"{{foo}}" ++ template = "{{foo}}" + context = {} + actual = pystache.render(template, context) +- self.assertString(actual, u"") ++ self.assertString(actual, "") + + pystache.defaults.MISSING_TAGS = 'strict' + self.assertRaises(pystache.context.KeyNotFoundError, +diff --git a/pystache/tests/test_examples.py b/pystache/tests/test_examples.py +index 5c9f74d..9f93de3 100644 +--- a/pystache/tests/test_examples.py ++++ b/pystache/tests/test_examples.py +@@ -7,15 +7,15 @@ TODO: add a docstring. + + import unittest + +-from examples.comments import Comments +-from examples.double_section import DoubleSection +-from examples.escaped import Escaped +-from examples.unescaped import Unescaped +-from examples.template_partial import TemplatePartial +-from examples.delimiters import Delimiters +-from examples.unicode_output import UnicodeOutput +-from examples.unicode_input import UnicodeInput +-from examples.nested_context import NestedContext ++from .examples.comments import Comments ++from .examples.double_section import DoubleSection ++from .examples.escaped import Escaped ++from .examples.unescaped import Unescaped ++from .examples.template_partial import TemplatePartial ++from .examples.delimiters import Delimiters ++from .examples.unicode_output import UnicodeOutput ++from .examples.unicode_input import UnicodeInput ++from .examples.nested_context import NestedContext + from pystache import Renderer + from pystache.tests.common import EXAMPLES_DIR + from pystache.tests.common import AssertStringMixin +@@ -29,34 +29,34 @@ class TestView(unittest.TestCase, AssertStringMixin): + self.assertString(actual, expected) + + def test_comments(self): +- self._assert(Comments(), u"<h1>A Comedy of Errors</h1>") ++ self._assert(Comments(), "<h1>A Comedy of Errors</h1>") + + def test_double_section(self): +- self._assert(DoubleSection(), u"* first\n* second\n* third") ++ self._assert(DoubleSection(), "* first\n* second\n* third") + + def test_unicode_output(self): + renderer = Renderer() + actual = renderer.render(UnicodeOutput()) +- self.assertString(actual, u'<p>Name: Henri Poincaré</p>') ++ self.assertString(actual, '<p>Name: Henri Poincaré</p>') + + def test_unicode_input(self): + renderer = Renderer() + actual = renderer.render(UnicodeInput()) +- self.assertString(actual, u'abcdé') ++ self.assertString(actual, 'abcdé') + + def test_escaping(self): +- self._assert(Escaped(), u"<h1>Bear > Shark</h1>") ++ self._assert(Escaped(), "<h1>Bear > Shark</h1>") + + def test_literal(self): + renderer = Renderer() + actual = renderer.render(Unescaped()) +- self.assertString(actual, u"<h1>Bear > Shark</h1>") ++ self.assertString(actual, "<h1>Bear > Shark</h1>") + + def test_template_partial(self): + renderer = Renderer(search_dirs=EXAMPLES_DIR) + actual = renderer.render(TemplatePartial(renderer=renderer)) + +- self.assertString(actual, u"""<h1>Welcome</h1> ++ self.assertString(actual, """<h1>Welcome</h1> + Again, Welcome!""") + + def test_template_partial_extension(self): +@@ -65,7 +65,7 @@ Again, Welcome!""") + view = TemplatePartial(renderer=renderer) + + actual = renderer.render(view) +- self.assertString(actual, u"""Welcome ++ self.assertString(actual, """Welcome + ------- + + ## Again, Welcome! ##""") +@@ -73,7 +73,7 @@ Again, Welcome!""") + def test_delimiters(self): + renderer = Renderer() + actual = renderer.render(Delimiters()) +- self.assertString(actual, u"""\ ++ self.assertString(actual, """\ + * It worked the first time. + * And it worked the second time. + * Then, surprisingly, it worked the third time. +@@ -82,7 +82,7 @@ Again, Welcome!""") + def test_nested_context(self): + renderer = Renderer() + actual = renderer.render(NestedContext(renderer)) +- self.assertString(actual, u"one and foo and two") ++ self.assertString(actual, "one and foo and two") + + def test_nested_context_is_available_in_view(self): + renderer = Renderer() +@@ -91,7 +91,7 @@ Again, Welcome!""") + view.template = '{{#herp}}{{#derp}}{{nested_context_in_view}}{{/derp}}{{/herp}}' + + actual = renderer.render(view) +- self.assertString(actual, u'it works!') ++ self.assertString(actual, 'it works!') + + def test_partial_in_partial_has_access_to_grand_parent_context(self): + renderer = Renderer(search_dirs=EXAMPLES_DIR) +diff --git a/pystache/tests/test_loader.py b/pystache/tests/test_loader.py +index f2c2187..315daff 100644 +--- a/pystache/tests/test_loader.py ++++ b/pystache/tests/test_loader.py +@@ -55,23 +55,23 @@ class LoaderTests(unittest.TestCase, AssertStringMixin, SetupDefaults): + + def test_init__to_unicode__default(self): + loader = Loader() +- self.assertRaises(TypeError, loader.to_unicode, u"abc") ++ self.assertRaises(TypeError, loader.to_unicode, "abc") + + decode_errors = defaults.DECODE_ERRORS + string_encoding = defaults.STRING_ENCODING + +- nonascii = u'abcdé'.encode('utf-8') ++ nonascii = 'abcdé'.encode('utf-8') + + loader = Loader() + self.assertRaises(UnicodeDecodeError, loader.to_unicode, nonascii) + + defaults.DECODE_ERRORS = 'ignore' + loader = Loader() +- self.assertString(loader.to_unicode(nonascii), u'abcd') ++ self.assertString(loader.to_unicode(nonascii), 'abcd') + + defaults.STRING_ENCODING = 'utf-8' + loader = Loader() +- self.assertString(loader.to_unicode(nonascii), u'abcdé') ++ self.assertString(loader.to_unicode(nonascii), 'abcdé') + + + def _get_path(self, filename): +@@ -83,9 +83,9 @@ class LoaderTests(unittest.TestCase, AssertStringMixin, SetupDefaults): + + """ + loader = Loader() +- actual = loader.unicode("foo") ++ actual = loader.str("foo") + +- self.assertString(actual, u"foo") ++ self.assertString(actual, "foo") + + def test_unicode__basic__input_unicode(self): + """ +@@ -93,24 +93,24 @@ class LoaderTests(unittest.TestCase, AssertStringMixin, SetupDefaults): + + """ + loader = Loader() +- actual = loader.unicode(u"foo") ++ actual = loader.str("foo") + +- self.assertString(actual, u"foo") ++ self.assertString(actual, "foo") + + def test_unicode__basic__input_unicode_subclass(self): + """ + Test unicode(): default arguments with unicode-subclass input. + + """ +- class UnicodeSubclass(unicode): ++ class UnicodeSubclass(str): + pass + +- s = UnicodeSubclass(u"foo") ++ s = UnicodeSubclass("foo") + + loader = Loader() +- actual = loader.unicode(s) ++ actual = loader.str(s) + +- self.assertString(actual, u"foo") ++ self.assertString(actual, "foo") + + def test_unicode__to_unicode__attribute(self): + """ +@@ -119,16 +119,16 @@ class LoaderTests(unittest.TestCase, AssertStringMixin, SetupDefaults): + """ + loader = Loader() + +- non_ascii = u'abcdé'.encode('utf-8') +- self.assertRaises(UnicodeDecodeError, loader.unicode, non_ascii) ++ non_ascii = 'abcdé'.encode('utf-8') ++ self.assertRaises(UnicodeDecodeError, loader.str, non_ascii) + + def to_unicode(s, encoding=None): + if encoding is None: + encoding = 'utf-8' +- return unicode(s, encoding) ++ return str(s, encoding) + + loader.to_unicode = to_unicode +- self.assertString(loader.unicode(non_ascii), u"abcdé") ++ self.assertString(loader.str(non_ascii), "abcdé") + + def test_unicode__encoding_argument(self): + """ +@@ -137,12 +137,12 @@ class LoaderTests(unittest.TestCase, AssertStringMixin, SetupDefaults): + """ + loader = Loader() + +- non_ascii = u'abcdé'.encode('utf-8') ++ non_ascii = 'abcdé'.encode('utf-8') + +- self.assertRaises(UnicodeDecodeError, loader.unicode, non_ascii) ++ self.assertRaises(UnicodeDecodeError, loader.str, non_ascii) + +- actual = loader.unicode(non_ascii, encoding='utf-8') +- self.assertString(actual, u'abcdé') ++ actual = loader.str(non_ascii, encoding='utf-8') ++ self.assertString(actual, 'abcdé') + + # TODO: check the read() unit tests. + def test_read(self): +@@ -153,7 +153,7 @@ class LoaderTests(unittest.TestCase, AssertStringMixin, SetupDefaults): + loader = Loader() + path = self._get_path('ascii.mustache') + actual = loader.read(path) +- self.assertString(actual, u'ascii: abc') ++ self.assertString(actual, 'ascii: abc') + + def test_read__file_encoding__attribute(self): + """ +@@ -167,7 +167,7 @@ class LoaderTests(unittest.TestCase, AssertStringMixin, SetupDefaults): + + loader.file_encoding = 'utf-8' + actual = loader.read(path) +- self.assertString(actual, u'non-ascii: é') ++ self.assertString(actual, 'non-ascii: é') + + def test_read__encoding__argument(self): + """ +@@ -180,7 +180,7 @@ class LoaderTests(unittest.TestCase, AssertStringMixin, SetupDefaults): + self.assertRaises(UnicodeDecodeError, loader.read, path) + + actual = loader.read(path, encoding='utf-8') +- self.assertString(actual, u'non-ascii: é') ++ self.assertString(actual, 'non-ascii: é') + + def test_read__to_unicode__attribute(self): + """ +diff --git a/pystache/tests/test_pystache.py b/pystache/tests/test_pystache.py +index 5447f8d..cf5d6af 100644 +--- a/pystache/tests/test_pystache.py ++++ b/pystache/tests/test_pystache.py +@@ -71,14 +71,14 @@ class PystacheTests(unittest.TestCase): + template = "{{#stats}}({{key}} & {{value}}){{/stats}}" + stats = [] + stats.append({'key': 123, 'value': ['something']}) +- stats.append({'key': u"chris", 'value': 0.900}) ++ stats.append({'key': "chris", 'value': 0.900}) + context = { 'stats': stats } + self._assert_rendered(self.non_strings_expected, template, context) + + def test_unicode(self): + template = 'Name: {{name}}; Age: {{age}}' +- context = {'name': u'Henri Poincaré', 'age': 156 } +- self._assert_rendered(u'Name: Henri Poincaré; Age: 156', template, context) ++ context = {'name': 'Henri Poincaré', 'age': 156} ++ self._assert_rendered('Name: Henri Poincaré; Age: 156', template, context) + + def test_sections(self): + template = """<ul>{{#users}}<li>{{name}}</li>{{/users}}</ul>""" +diff --git a/pystache/tests/test_renderengine.py b/pystache/tests/test_renderengine.py +index db916f7..ed604c5 100644 +--- a/pystache/tests/test_renderengine.py ++++ b/pystache/tests/test_renderengine.py +@@ -33,11 +33,11 @@ def mock_literal(s): + s: a byte string or unicode string. + + """ +- if isinstance(s, unicode): ++ if isinstance(s, str): + # Strip off unicode super classes, if present. +- u = unicode(s) ++ u = str(s) + else: +- u = unicode(s, encoding='ascii') ++ u = str(s, encoding='ascii') + + # We apply upper() to make sure we are actually using our custom + # function in the tests +@@ -94,17 +94,17 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + engine = kwargs.get('engine', self._engine()) + + if partials is not None: +- engine.resolve_partial = lambda key: unicode(partials[key]) ++ engine.resolve_partial = lambda key: str(partials[key]) + + context = ContextStack(*context) + + # RenderEngine.render() only accepts unicode template strings. +- actual = engine.render(unicode(template), context) ++ actual = engine.render(str(template), context) + + self.assertString(actual=actual, expected=expected) + + def test_render(self): +- self._assert_render(u'Hi Mom', 'Hi {{person}}', {'person': 'Mom'}) ++ self._assert_render('Hi Mom', 'Hi {{person}}', {'person': 'Mom'}) + + def test__resolve_partial(self): + """ +@@ -112,10 +112,10 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + + """ + engine = self._engine() +- partials = {'partial': u"{{person}}"} ++ partials = {'partial': "{{person}}"} + engine.resolve_partial = lambda key: partials[key] + +- self._assert_render(u'Hi Mom', 'Hi {{>partial}}', {'person': 'Mom'}, engine=engine) ++ self._assert_render('Hi Mom', 'Hi {{>partial}}', {'person': 'Mom'}, engine=engine) + + def test__literal(self): + """ +@@ -125,13 +125,13 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + engine = self._engine() + engine.literal = lambda s: s.upper() + +- self._assert_render(u'BAR', '{{{foo}}}', {'foo': 'bar'}, engine=engine) ++ self._assert_render('BAR', '{{{foo}}}', {'foo': 'bar'}, engine=engine) + + def test_literal__sigil(self): + template = "<h1>{{& thing}}</h1>" + context = {'thing': 'Bear > Giraffe'} + +- expected = u"<h1>Bear > Giraffe</h1>" ++ expected = "<h1>Bear > Giraffe</h1>" + + self._assert_render(expected, template, context) + +@@ -143,7 +143,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + engine = self._engine() + engine.escape = lambda s: "**" + s + +- self._assert_render(u'**bar', '{{foo}}', {'foo': 'bar'}, engine=engine) ++ self._assert_render('**bar', '{{foo}}', {'foo': 'bar'}, engine=engine) + + def test__escape_does_not_call_literal(self): + """ +@@ -157,7 +157,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = 'literal: {{{foo}}} escaped: {{foo}}' + context = {'foo': 'bar'} + +- self._assert_render(u'literal: BAR escaped: **bar', template, context, engine=engine) ++ self._assert_render('literal: BAR escaped: **bar', template, context, engine=engine) + + def test__escape_preserves_unicode_subclasses(self): + """ +@@ -167,7 +167,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + variable value is markupsafe.Markup when escaping. + + """ +- class MyUnicode(unicode): ++ class MyUnicode(str): + pass + + def escape(s): +@@ -182,7 +182,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = '{{foo1}} {{foo2}}' + context = {'foo1': MyUnicode('bar'), 'foo2': 'bar'} + +- self._assert_render(u'**bar bar**', template, context, engine=engine) ++ self._assert_render('**bar bar**', template, context, engine=engine) + + # Custom to_str for testing purposes. + def _to_str(self, val): +@@ -197,9 +197,9 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = '{{value}}' + context = {'value': None} + +- self._assert_render(u'None', template, context, engine=engine) ++ self._assert_render('None', template, context, engine=engine) + engine.to_str = self._to_str +- self._assert_render(u'', template, context, engine=engine) ++ self._assert_render('', template, context, engine=engine) + + def test_to_str__lambda(self): + """Test the to_str attribute for a lambda.""" +@@ -207,9 +207,9 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = '{{value}}' + context = {'value': lambda: None} + +- self._assert_render(u'None', template, context, engine=engine) ++ self._assert_render('None', template, context, engine=engine) + engine.to_str = self._to_str +- self._assert_render(u'', template, context, engine=engine) ++ self._assert_render('', template, context, engine=engine) + + def test_to_str__section_list(self): + """Test the to_str attribute for a section list.""" +@@ -217,9 +217,9 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = '{{#list}}{{.}}{{/list}}' + context = {'list': [None, None]} + +- self._assert_render(u'NoneNone', template, context, engine=engine) ++ self._assert_render('NoneNone', template, context, engine=engine) + engine.to_str = self._to_str +- self._assert_render(u'', template, context, engine=engine) ++ self._assert_render('', template, context, engine=engine) + + def test_to_str__section_lambda(self): + # TODO: add a test for a "method with an arity of 1". +@@ -239,7 +239,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = '{{text}} {{int}} {{{int}}}' + context = {'int': 100, 'text': 'foo'} + +- self._assert_render(u'FOO 100 100', template, context, engine=engine) ++ self._assert_render('FOO 100 100', template, context, engine=engine) + + def test_tag__output_not_interpolated(self): + """ +@@ -248,7 +248,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + """ + template = '{{template}}: {{planet}}' + context = {'template': '{{planet}}', 'planet': 'Earth'} +- self._assert_render(u'{{planet}}: Earth', template, context) ++ self._assert_render('{{planet}}: Earth', template, context) + + def test_tag__output_not_interpolated__section(self): + """ +@@ -257,7 +257,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + """ + template = '{{test}}' + context = {'test': '{{#hello}}'} +- self._assert_render(u'{{#hello}}', template, context) ++ self._assert_render('{{#hello}}', template, context) + + ## Test interpolation with "falsey" values + # +@@ -268,17 +268,17 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + def test_interpolation__falsey__zero(self): + template = '{{.}}' + context = 0 +- self._assert_render(u'0', template, context) ++ self._assert_render('0', template, context) + + def test_interpolation__falsey__none(self): + template = '{{.}}' + context = None +- self._assert_render(u'None', template, context) ++ self._assert_render('None', template, context) + + def test_interpolation__falsey__zero(self): + template = '{{.}}' + context = False +- self._assert_render(u'False', template, context) ++ self._assert_render('False', template, context) + + # Built-in types: + # +@@ -310,7 +310,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + Check tag interpolation with a built-in type: string. + + """ +- self._assert_builtin_type('abc', 'upper', 'ABC', u'xyz') ++ self._assert_builtin_type('abc', 'upper', 'ABC', 'xyz') + + def test_interpolation__built_in_type__integer(self): + """ +@@ -324,7 +324,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + # + # we need to resort to built-in attributes (double-underscored) on + # the integer type. +- self._assert_builtin_type(15, '__neg__', -15, u'999') ++ self._assert_builtin_type(15, '__neg__', -15, '999') + + def test_interpolation__built_in_type__list(self): + """ +@@ -338,7 +338,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + + template = '{{#section}}{{%s}}{{/section}}' % attr_name + context = {'section': item, attr_name: 7} +- self._assert_render(u'7', template, context) ++ self._assert_render('7', template, context) + + # This test is also important for testing 2to3. + def test_interpolation__nonascii_nonunicode(self): +@@ -347,8 +347,8 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + + """ + template = '{{nonascii}}' +- context = {'nonascii': u'abcdé'.encode('utf-8')} +- self._assert_render(u'abcdé', template, context) ++ context = {'nonascii': 'abcdé'.encode('utf-8')} ++ self._assert_render('abcdé', template, context) + + def test_implicit_iterator__literal(self): + """ +@@ -358,7 +358,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = """{{#test}}{{{.}}}{{/test}}""" + context = {'test': ['<', '>']} + +- self._assert_render(u'<>', template, context) ++ self._assert_render('<>', template, context) + + def test_implicit_iterator__escaped(self): + """ +@@ -368,7 +368,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = """{{#test}}{{.}}{{/test}}""" + context = {'test': ['<', '>']} + +- self._assert_render(u'<>', template, context) ++ self._assert_render('<>', template, context) + + def test_literal__in_section(self): + """ +@@ -378,7 +378,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = '{{#test}}1 {{{less_than}}} 2{{/test}}' + context = {'test': {'less_than': '<'}} + +- self._assert_render(u'1 < 2', template, context) ++ self._assert_render('1 < 2', template, context) + + def test_literal__in_partial(self): + """ +@@ -389,11 +389,11 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + partials = {'partial': '1 {{{less_than}}} 2'} + context = {'less_than': '<'} + +- self._assert_render(u'1 < 2', template, context, partials=partials) ++ self._assert_render('1 < 2', template, context, partials=partials) + + def test_partial(self): + partials = {'partial': "{{person}}"} +- self._assert_render(u'Hi Mom', 'Hi {{>partial}}', {'person': 'Mom'}, partials=partials) ++ self._assert_render('Hi Mom', 'Hi {{>partial}}', {'person': 'Mom'}, partials=partials) + + def test_partial__context_values(self): + """ +@@ -406,7 +406,9 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + partials = {'partial': 'unescaped: {{{foo}}} escaped: {{foo}}'} + context = {'foo': '<'} + +- self._assert_render(u'unescaped: < escaped: <', template, context, engine=engine, partials=partials) ++ self._assert_render( ++ 'unescaped: < escaped: <', ++ template, context, engine=engine, partials=partials) + + ## Test cases related specifically to lambdas. + +@@ -417,8 +419,8 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + + """ + template = '{{#nonascii}}{{.}}{{/nonascii}}' +- context = {'nonascii': u'abcdé'.encode('utf-8')} +- self._assert_render(u'abcdé', template, context) ++ context = {'nonascii': 'abcdé'.encode('utf-8')} ++ self._assert_render('abcdé', template, context) + + # This test is also important for testing 2to3. + def test_lambda__returning_nonascii_nonunicode(self): +@@ -427,8 +429,8 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + + """ + template = '{{lambda}}' +- context = {'lambda': lambda: u'abcdé'.encode('utf-8')} +- self._assert_render(u'abcdé', template, context) ++ context = {'lambda': lambda: 'abcdé'.encode('utf-8')} ++ self._assert_render('abcdé', template, context) + + ## Test cases related specifically to sections. + +@@ -440,7 +442,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = '{{/section}}' + try: + self._assert_render(None, template) +- except ParsingError, err: ++ except ParsingError as err: + self.assertEqual(str(err), "Section end tag mismatch: section != None") + + def test_section__end_tag_mismatch(self): +@@ -451,7 +453,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = '{{#section_start}}{{/section_end}}' + try: + self._assert_render(None, template) +- except ParsingError, err: ++ except ParsingError as err: + self.assertEqual(str(err), "Section end tag mismatch: section_end != section_start") + + def test_section__context_values(self): +@@ -464,7 +466,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = '{{#test}}unescaped: {{{foo}}} escaped: {{foo}}{{/test}}' + context = {'test': {'foo': '<'}} + +- self._assert_render(u'unescaped: < escaped: <', template, context, engine=engine) ++ self._assert_render('unescaped: < escaped: <', template, context, engine=engine) + + def test_section__context_precedence(self): + """ +@@ -473,7 +475,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + """ + template = '{{entree}} : {{#vegetarian}}{{entree}}{{/vegetarian}}' + context = {'entree': 'chicken', 'vegetarian': {'entree': 'beans and rice'}} +- self._assert_render(u'chicken : beans and rice', template, context) ++ self._assert_render('chicken : beans and rice', template, context) + + def test_section__list_referencing_outer_context(self): + """ +@@ -491,7 +493,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + + template = "{{#list}}{{greeting}} {{name}}, {{/list}}" + +- self._assert_render(u"Hi Al, Hi Bob, ", template, context) ++ self._assert_render("Hi Al, Hi Bob, ", template, context) + + def test_section__output_not_interpolated(self): + """ +@@ -500,7 +502,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + """ + template = '{{#section}}{{template}}{{/section}}: {{planet}}' + context = {'section': True, 'template': '{{planet}}', 'planet': 'Earth'} +- self._assert_render(u'{{planet}}: Earth', template, context) ++ self._assert_render('{{planet}}: Earth', template, context) + + # TODO: have this test case added to the spec. + def test_section__string_values_not_lists(self): +@@ -511,7 +513,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = '{{#section}}foo{{/section}}' + context = {'section': '123'} + # If strings were interpreted as lists, this would give "foofoofoo". +- self._assert_render(u'foo', template, context) ++ self._assert_render('foo', template, context) + + def test_section__nested_truthy(self): + """ +@@ -525,7 +527,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + """ + template = '| A {{#bool}}B {{#bool}}C{{/bool}} D{{/bool}} E |' + context = {'bool': True} +- self._assert_render(u'| A B C D E |', template, context) ++ self._assert_render('| A B C D E |', template, context) + + def test_section__nested_with_same_keys(self): + """ +@@ -537,16 +539,16 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + # Start with an easier, working case. + template = '{{#x}}{{#z}}{{y}}{{/z}}{{/x}}' + context = {'x': {'z': {'y': 1}}} +- self._assert_render(u'1', template, context) ++ self._assert_render('1', template, context) + + template = '{{#x}}{{#x}}{{y}}{{/x}}{{/x}}' + context = {'x': {'x': {'y': 1}}} +- self._assert_render(u'1', template, context) ++ self._assert_render('1', template, context) + + def test_section__lambda(self): + template = '{{#test}}Mom{{/test}}' + context = {'test': (lambda text: 'Hi %s' % text)} +- self._assert_render(u'Hi Mom', template, context) ++ self._assert_render('Hi Mom', template, context) + + # This test is also important for testing 2to3. + def test_section__lambda__returning_nonascii_nonunicode(self): +@@ -555,8 +557,8 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + + """ + template = '{{#lambda}}{{/lambda}}' +- context = {'lambda': lambda text: u'abcdé'.encode('utf-8')} +- self._assert_render(u'abcdé', template, context) ++ context = {'lambda': lambda text: 'abcdé'.encode('utf-8')} ++ self._assert_render('abcdé', template, context) + + def test_section__lambda__returning_nonstring(self): + """ +@@ -565,7 +567,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + """ + template = '{{#lambda}}foo{{/lambda}}' + context = {'lambda': lambda text: len(text)} +- self._assert_render(u'3', template, context) ++ self._assert_render('3', template, context) + + def test_section__iterable(self): + """ +@@ -575,10 +577,10 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = '{{#iterable}}{{.}}{{/iterable}}' + + context = {'iterable': (i for i in range(3))} # type 'generator' +- self._assert_render(u'012', template, context) ++ self._assert_render('012', template, context) + +- context = {'iterable': xrange(4)} # type 'xrange' +- self._assert_render(u'0123', template, context) ++ context = {'iterable': range(4)} # type 'xrange' ++ self._assert_render('0123', template, context) + + d = {'foo': 0, 'bar': 0} + # We don't know what order of keys we'll be given, but from the +@@ -586,8 +588,8 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + # "If items(), keys(), values(), iteritems(), iterkeys(), and + # itervalues() are called with no intervening modifications to + # the dictionary, the lists will directly correspond." +- expected = u''.join(d.keys()) +- context = {'iterable': d.iterkeys()} # type 'dictionary-keyiterator' ++ expected = ''.join(list(d.keys())) ++ context = {'iterable': iter(d.keys())} # type 'dictionary-keyiterator' + self._assert_render(expected, template, context) + + def test_section__lambda__tag_in_output(self): +@@ -605,7 +607,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + """ + template = '{{#test}}Hi {{person}}{{/test}}' + context = {'person': 'Mom', 'test': (lambda text: text + " :)")} +- self._assert_render(u'Hi Mom :)', template, context) ++ self._assert_render('Hi Mom :)', template, context) + + def test_section__lambda__list(self): + """ +@@ -621,7 +623,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + 'lambdas': [lambda text: "~{{%s}}~" % text, + lambda text: "#{{%s}}#" % text]} + +- self._assert_render(u'<~bar~#bar#>', template, context) ++ self._assert_render('<~bar~#bar#>', template, context) + + def test_section__lambda__mixed_list(self): + """ +@@ -636,7 +638,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + context = {'foo': 'bar', + 'lambdas': [lambda text: "~{{%s}}~" % text, 1]} + +- self._assert_render(u'<~bar~foo>', template, context) ++ self._assert_render('<~bar~foo>', template, context) + + def test_section__lambda__not_on_context_stack(self): + """ +@@ -653,7 +655,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + """ + context = {'foo': 'bar', 'lambda': (lambda text: "{{.}}")} + template = '{{#foo}}{{#lambda}}blah{{/lambda}}{{/foo}}' +- self._assert_render(u'bar', template, context) ++ self._assert_render('bar', template, context) + + def test_section__lambda__no_reinterpolation(self): + """ +@@ -670,15 +672,15 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + """ + template = '{{#planet}}{{#lambda}}dot{{/lambda}}{{/planet}}' + context = {'planet': 'Earth', 'dot': '~{{.}}~', 'lambda': (lambda text: "#{{%s}}#" % text)} +- self._assert_render(u'#~{{.}}~#', template, context) ++ self._assert_render('#~{{.}}~#', template, context) + + def test_comment__multiline(self): + """ + Check that multiline comments are permitted. + + """ +- self._assert_render(u'foobar', 'foo{{! baz }}bar') +- self._assert_render(u'foobar', 'foo{{! \nbaz }}bar') ++ self._assert_render('foobar', 'foo{{! baz }}bar') ++ self._assert_render('foobar', 'foo{{! \nbaz }}bar') + + def test_custom_delimiters__sections(self): + """ +@@ -689,7 +691,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + """ + template = '{{=[[ ]]=}}[[#foo]]bar[[/foo]]' + context = {'foo': True} +- self._assert_render(u'bar', template, context) ++ self._assert_render('bar', template, context) + + def test_custom_delimiters__not_retroactive(self): + """ +@@ -698,7 +700,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + Test case for issue #35: https://github.com/defunkt/pystache/issues/35 + + """ +- expected = u' {{foo}} ' ++ expected = ' {{foo}} ' + self._assert_render(expected, '{{=$ $=}} {{foo}} ') + self._assert_render(expected, '{{=$ $=}} {{foo}} $={{ }}=$') # was yielding u' '. + +@@ -713,7 +715,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + template = 'Hello, {{person.name}}. I see you are {{person.details.age}}.' + person = Attachable(name='Biggles', details={'age': 42}) + context = {'person': person} +- self._assert_render(u'Hello, Biggles. I see you are 42.', template, context) ++ self._assert_render('Hello, Biggles. I see you are 42.', template, context) + + def test_dot_notation__multiple_levels(self): + """ +@@ -722,7 +724,7 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + """ + template = """Hello, Mr. {{person.name.lastname}}. + I see you're back from {{person.travels.last.country.city}}.""" +- expected = u"""Hello, Mr. Pither. ++ expected = """Hello, Mr. Pither. + I see you're back from Cornwall.""" + context = {'person': {'name': {'firstname': 'unknown', 'lastname': 'Pither'}, + 'travels': {'last': {'country': {'city': 'Cornwall'}}}, +@@ -758,10 +760,10 @@ class RenderTests(unittest.TestCase, AssertStringMixin, AssertExceptionMixin): + context = {'a': {'b': 'A.B'}, 'c': {'a': 'A'} } + + template = '{{a.b}}' +- self._assert_render(u'A.B', template, context) ++ self._assert_render('A.B', template, context) + + template = '{{#c}}{{a}}{{/c}}' +- self._assert_render(u'A', template, context) ++ self._assert_render('A', template, context) + + template = '{{#c}}{{a.b}}{{/c}}' + self.assertException(KeyNotFoundError, "Key %(unicode)s'a.b' not found: missing %(unicode)s'b'" % +diff --git a/pystache/tests/test_renderer.py b/pystache/tests/test_renderer.py +index 0dbe0d9..e0d2448 100644 +--- a/pystache/tests/test_renderer.py ++++ b/pystache/tests/test_renderer.py +@@ -10,7 +10,7 @@ import os + import sys + import unittest + +-from examples.simple import Simple ++from .examples.simple import Simple + from pystache import Renderer + from pystache import TemplateSpec + from pystache.common import TemplateNotFoundError +@@ -33,7 +33,7 @@ def _make_renderer(): + def mock_unicode(b, encoding=None): + if encoding is None: + encoding = 'ascii' +- u = unicode(b, encoding=encoding) ++ u = str(b, encoding=encoding) + return u.upper() + + +@@ -197,13 +197,13 @@ class RendererTests(unittest.TestCase, AssertStringMixin): + + """ + renderer = self._renderer() +- b = u"é".encode('utf-8') ++ b = "é".encode('utf-8') + + renderer.string_encoding = "ascii" +- self.assertRaises(UnicodeDecodeError, renderer.unicode, b) ++ self.assertRaises(UnicodeDecodeError, renderer.str, b) + + renderer.string_encoding = "utf-8" +- self.assertEqual(renderer.unicode(b), u"é") ++ self.assertEqual(renderer.str(b), "é") + + def test_unicode__decode_errors(self): + """ +@@ -212,14 +212,14 @@ class RendererTests(unittest.TestCase, AssertStringMixin): + """ + renderer = self._renderer() + renderer.string_encoding = "ascii" +- b = u"déf".encode('utf-8') ++ b = "déf".encode('utf-8') + + renderer.decode_errors = "ignore" +- self.assertEqual(renderer.unicode(b), "df") ++ self.assertEqual(renderer.str(b), "df") + + renderer.decode_errors = "replace" + # U+FFFD is the official Unicode replacement character. +- self.assertEqual(renderer.unicode(b), u'd\ufffd\ufffdf') ++ self.assertEqual(renderer.str(b), u'd\ufffd\ufffdf') + + ## Test the _make_loader() method. + +@@ -243,7 +243,7 @@ class RendererTests(unittest.TestCase, AssertStringMixin): + renderer = self._renderer() + renderer.file_encoding = 'enc' + renderer.file_extension = 'ext' +- renderer.unicode = unicode_ ++ renderer.str = unicode_ + + loader = renderer._make_loader() + +@@ -260,12 +260,12 @@ class RendererTests(unittest.TestCase, AssertStringMixin): + """ + renderer = self._renderer() + rendered = renderer.render('foo') +- self.assertEqual(type(rendered), unicode) ++ self.assertEqual(type(rendered), str) + + def test_render__unicode(self): + renderer = self._renderer() +- actual = renderer.render(u'foo') +- self.assertEqual(actual, u'foo') ++ actual = renderer.render('foo') ++ self.assertEqual(actual, 'foo') + + def test_render__str(self): + renderer = self._renderer() +@@ -274,8 +274,8 @@ class RendererTests(unittest.TestCase, AssertStringMixin): + + def test_render__non_ascii_character(self): + renderer = self._renderer() +- actual = renderer.render(u'Poincaré') +- self.assertEqual(actual, u'Poincaré') ++ actual = renderer.render('Poincaré') ++ self.assertEqual(actual, 'Poincaré') + + def test_render__context(self): + """ +@@ -326,7 +326,7 @@ class RendererTests(unittest.TestCase, AssertStringMixin): + + """ + renderer = _make_renderer() +- template = u"déf".encode("utf-8") ++ template = "déf".encode("utf-8") + + # Check that decode_errors and string_encoding are both respected. + renderer.decode_errors = 'ignore' +@@ -334,7 +334,7 @@ class RendererTests(unittest.TestCase, AssertStringMixin): + self.assertEqual(renderer.render(template), "df") + + renderer.string_encoding = 'utf_8' +- self.assertEqual(renderer.render(template), u"déf") ++ self.assertEqual(renderer.render(template), "déf") + + def test_make_resolve_partial(self): + """ +@@ -347,7 +347,7 @@ class RendererTests(unittest.TestCase, AssertStringMixin): + + actual = resolve_partial('foo') + self.assertEqual(actual, 'bar') +- self.assertEqual(type(actual), unicode, "RenderEngine requires that " ++ self.assertEqual(type(actual), str, "RenderEngine requires that " + "resolve_partial return unicode strings.") + + def test_make_resolve_partial__unicode(self): +@@ -362,7 +362,7 @@ class RendererTests(unittest.TestCase, AssertStringMixin): + self.assertEqual(resolve_partial("partial"), "foo") + + # Now with a value that is already unicode. +- renderer.partials = {'partial': u'foo'} ++ renderer.partials = {'partial': 'foo'} + resolve_partial = renderer._make_resolve_partial() + # If the next line failed, we would get the following error: + # TypeError: decoding Unicode is not supported +@@ -373,7 +373,7 @@ class RendererTests(unittest.TestCase, AssertStringMixin): + data_dir = get_data_path() + renderer = Renderer(search_dirs=data_dir) + actual = renderer.render_name("say_hello", to='foo') +- self.assertString(actual, u"Hello, foo") ++ self.assertString(actual, "Hello, foo") + + def test_render_path(self): + """ +@@ -412,7 +412,7 @@ class RendererTests(unittest.TestCase, AssertStringMixin): + + spec = Spec() + actual = renderer.render(spec) +- self.assertString(actual, u'hello, world') ++ self.assertString(actual, 'hello, world') + + def test_render__view(self): + """ +@@ -484,7 +484,7 @@ class Renderer_MakeRenderEngineTests(unittest.TestCase, AssertStringMixin, Asser + Check that resolve_partial returns unicode (and not a subclass). + + """ +- class MyUnicode(unicode): ++ class MyUnicode(str): + pass + + renderer = Renderer() +@@ -495,12 +495,12 @@ class Renderer_MakeRenderEngineTests(unittest.TestCase, AssertStringMixin, Asser + + actual = engine.resolve_partial('str') + self.assertEqual(actual, "foo") +- self.assertEqual(type(actual), unicode) ++ self.assertEqual(type(actual), str) + + # Check that unicode subclasses are not preserved. + actual = engine.resolve_partial('subclass') + self.assertEqual(actual, "abc") +- self.assertEqual(type(actual), unicode) ++ self.assertEqual(type(actual), str) + + def test__resolve_partial__not_found(self): + """ +@@ -512,7 +512,7 @@ class Renderer_MakeRenderEngineTests(unittest.TestCase, AssertStringMixin, Asser + engine = renderer._make_render_engine() + resolve_partial = engine.resolve_partial + +- self.assertString(resolve_partial('foo'), u'') ++ self.assertString(resolve_partial('foo'), '') + + def test__resolve_partial__not_found__missing_tags_strict(self): + """ +@@ -539,7 +539,7 @@ class Renderer_MakeRenderEngineTests(unittest.TestCase, AssertStringMixin, Asser + engine = renderer._make_render_engine() + resolve_partial = engine.resolve_partial + +- self.assertString(resolve_partial('foo'), u'') ++ self.assertString(resolve_partial('foo'), '') + + def test__resolve_partial__not_found__partials_dict__missing_tags_strict(self): + """ +@@ -566,12 +566,12 @@ class Renderer_MakeRenderEngineTests(unittest.TestCase, AssertStringMixin, Asser + + """ + renderer = self._make_renderer() +- renderer.unicode = mock_unicode ++ renderer.str = mock_unicode + + engine = renderer._make_render_engine() + literal = engine.literal + +- b = u"foo".encode("ascii") ++ b = "foo".encode("ascii") + self.assertEqual(literal(b), "FOO") + + def test__literal__handles_unicode(self): +@@ -585,7 +585,7 @@ class Renderer_MakeRenderEngineTests(unittest.TestCase, AssertStringMixin, Asser + engine = renderer._make_render_engine() + literal = engine.literal + +- self.assertEqual(literal(u"foo"), "foo") ++ self.assertEqual(literal("foo"), "foo") + + def test__literal__returns_unicode(self): + """ +@@ -598,16 +598,16 @@ class Renderer_MakeRenderEngineTests(unittest.TestCase, AssertStringMixin, Asser + engine = renderer._make_render_engine() + literal = engine.literal + +- self.assertEqual(type(literal("foo")), unicode) ++ self.assertEqual(type(literal("foo")), str) + +- class MyUnicode(unicode): ++ class MyUnicode(str): + pass + + s = MyUnicode("abc") + + self.assertEqual(type(s), MyUnicode) +- self.assertTrue(isinstance(s, unicode)) +- self.assertEqual(type(literal(s)), unicode) ++ self.assertTrue(isinstance(s, str)) ++ self.assertEqual(type(literal(s)), str) + + ## Test the engine's escape attribute. + +@@ -630,12 +630,12 @@ class Renderer_MakeRenderEngineTests(unittest.TestCase, AssertStringMixin, Asser + + """ + renderer = Renderer() +- renderer.unicode = mock_unicode ++ renderer.str = mock_unicode + + engine = renderer._make_render_engine() + escape = engine.escape + +- b = u"foo".encode('ascii') ++ b = "foo".encode('ascii') + self.assertEqual(escape(b), "FOO") + + def test__escape__has_access_to_original_unicode_subclass(self): +@@ -644,16 +644,16 @@ class Renderer_MakeRenderEngineTests(unittest.TestCase, AssertStringMixin, Asser + + """ + renderer = Renderer() +- renderer.escape = lambda s: unicode(type(s).__name__) ++ renderer.escape = lambda s: str(type(s).__name__) + + engine = renderer._make_render_engine() + escape = engine.escape + +- class MyUnicode(unicode): ++ class MyUnicode(str): + pass + +- self.assertEqual(escape(u"foo".encode('ascii')), unicode.__name__) +- self.assertEqual(escape(u"foo"), unicode.__name__) ++ self.assertEqual(escape("foo".encode('ascii')), str.__name__) ++ self.assertEqual(escape("foo"), str.__name__) + self.assertEqual(escape(MyUnicode("foo")), MyUnicode.__name__) + + def test__escape__returns_unicode(self): +@@ -667,17 +667,17 @@ class Renderer_MakeRenderEngineTests(unittest.TestCase, AssertStringMixin, Asser + engine = renderer._make_render_engine() + escape = engine.escape + +- self.assertEqual(type(escape("foo")), unicode) ++ self.assertEqual(type(escape("foo")), str) + + # Check that literal doesn't preserve unicode subclasses. +- class MyUnicode(unicode): ++ class MyUnicode(str): + pass + + s = MyUnicode("abc") + + self.assertEqual(type(s), MyUnicode) +- self.assertTrue(isinstance(s, unicode)) +- self.assertEqual(type(escape(s)), unicode) ++ self.assertTrue(isinstance(s, str)) ++ self.assertEqual(type(escape(s)), str) + + ## Test the missing_tags attribute. + +@@ -706,7 +706,7 @@ class Renderer_MakeRenderEngineTests(unittest.TestCase, AssertStringMixin, Asser + stack = ContextStack({'foo': 'bar'}) + + self.assertEqual('bar', engine.resolve_context(stack, 'foo')) +- self.assertString(u'', engine.resolve_context(stack, 'missing')) ++ self.assertString('', engine.resolve_context(stack, 'missing')) + + def test__resolve_context__missing_tags_strict(self): + """ +diff --git a/pystache/tests/test_simple.py b/pystache/tests/test_simple.py +index 07b059f..b88bf35 100644 +--- a/pystache/tests/test_simple.py ++++ b/pystache/tests/test_simple.py +@@ -2,11 +2,11 @@ import unittest + + import pystache + from pystache import Renderer +-from examples.nested_context import NestedContext +-from examples.complex import Complex +-from examples.lambdas import Lambdas +-from examples.template_partial import TemplatePartial +-from examples.simple import Simple ++from .examples.nested_context import NestedContext ++from .examples.complex import Complex ++from .examples.lambdas import Lambdas ++from .examples.template_partial import TemplatePartial ++from .examples.simple import Simple + + from pystache.tests.common import EXAMPLES_DIR + from pystache.tests.common import AssertStringMixin +@@ -20,7 +20,7 @@ class TestSimple(unittest.TestCase, AssertStringMixin): + view.template = '{{#foo}}{{thing1}} and {{thing2}} and {{outer_thing}}{{/foo}}{{^foo}}Not foo!{{/foo}}' + + actual = renderer.render(view) +- self.assertString(actual, u"one and foo and two") ++ self.assertString(actual, "one and foo and two") + + def test_looping_and_negation_context(self): + template = '{{#item}}{{header}}: {{name}} {{/item}}{{^item}} Shouldnt see me{{/item}}' +@@ -40,7 +40,7 @@ class TestSimple(unittest.TestCase, AssertStringMixin): + + renderer = Renderer() + actual = renderer.render(view) +- self.assertString(actual, u'bar != bar. oh, it does!') ++ self.assertString(actual, 'bar != bar. oh, it does!') + + def test_rendering_partial(self): + renderer = Renderer(search_dirs=EXAMPLES_DIR) +@@ -49,11 +49,11 @@ class TestSimple(unittest.TestCase, AssertStringMixin): + view.template = '{{>inner_partial}}' + + actual = renderer.render(view) +- self.assertString(actual, u'Again, Welcome!') ++ self.assertString(actual, 'Again, Welcome!') + + view.template = '{{#looping}}{{>inner_partial}} {{/looping}}' + actual = renderer.render(view) +- self.assertString(actual, u"Again, Welcome! Again, Welcome! Again, Welcome! ") ++ self.assertString(actual, "Again, Welcome! Again, Welcome! Again, Welcome! ") + + def test_non_existent_value_renders_blank(self): + view = Simple() +@@ -77,7 +77,7 @@ class TestSimple(unittest.TestCase, AssertStringMixin): + view = TemplatePartial(renderer=renderer) + + actual = renderer.render(view) +- self.assertString(actual, u"""Welcome ++ self.assertString(actual, """Welcome + ------- + + ## Again, Welcome! ##""") +diff --git a/pystache/tests/test_specloader.py b/pystache/tests/test_specloader.py +index cacc0fc..dcdc55f 100644 +--- a/pystache/tests/test_specloader.py ++++ b/pystache/tests/test_specloader.py +@@ -9,11 +9,11 @@ import os.path + import sys + import unittest + +-import examples +-from examples.simple import Simple +-from examples.complex import Complex +-from examples.lambdas import Lambdas +-from examples.inverted import Inverted, InvertedLists ++from . import examples ++from .examples.simple import Simple ++from .examples.complex import Complex ++from .examples.lambdas import Lambdas ++from .examples.inverted import Inverted, InvertedLists + from pystache import Renderer + from pystache import TemplateSpec + from pystache.common import TemplateNotFoundError +@@ -70,7 +70,7 @@ class ViewTestCase(unittest.TestCase, AssertStringMixin): + renderer2 = Renderer(search_dirs=EXAMPLES_DIR) + + actual = renderer1.render(spec) +- self.assertString(actual, u"Partial: ") ++ self.assertString(actual, "Partial: ") + + actual = renderer2.render(spec) + self.assertEqual(actual, "Partial: No tags...") +@@ -79,7 +79,7 @@ class ViewTestCase(unittest.TestCase, AssertStringMixin): + renderer = Renderer() + actual = renderer.render(Simple()) + +- self.assertString(actual, u"Hi pizza!") ++ self.assertString(actual, "Hi pizza!") + + def test_non_callable_attributes(self): + view = Simple() +@@ -92,7 +92,7 @@ class ViewTestCase(unittest.TestCase, AssertStringMixin): + def test_complex(self): + renderer = Renderer() + actual = renderer.render(Complex()) +- self.assertString(actual, u"""\ ++ self.assertString(actual, """\ + <h1>Colors</h1> + <ul> + <li><strong>red</strong></li> +@@ -111,7 +111,7 @@ class ViewTestCase(unittest.TestCase, AssertStringMixin): + + renderer = Renderer() + actual = renderer.render(view) +- self.assertString(actual, u'nopqrstuvwxyz') ++ self.assertString(actual, 'nopqrstuvwxyz') + + def test_higher_order_lambda(self): + view = Lambdas() +@@ -119,7 +119,7 @@ class ViewTestCase(unittest.TestCase, AssertStringMixin): + + renderer = Renderer() + actual = renderer.render(view) +- self.assertString(actual, u'abcdefghijklmnopqrstuvwxyz') ++ self.assertString(actual, 'abcdefghijklmnopqrstuvwxyz') + + def test_partials_with_lambda(self): + view = Lambdas() +@@ -127,7 +127,7 @@ class ViewTestCase(unittest.TestCase, AssertStringMixin): + + renderer = Renderer(search_dirs=EXAMPLES_DIR) + actual = renderer.render(view) +- self.assertEqual(actual, u'nopqrstuvwxyz') ++ self.assertEqual(actual, 'nopqrstuvwxyz') + + def test_hierarchical_partials_with_lambdas(self): + view = Lambdas() +@@ -135,12 +135,12 @@ class ViewTestCase(unittest.TestCase, AssertStringMixin): + + renderer = Renderer(search_dirs=EXAMPLES_DIR) + actual = renderer.render(view) +- self.assertString(actual, u'nopqrstuvwxyznopqrstuvwxyz') ++ self.assertString(actual, 'nopqrstuvwxyznopqrstuvwxyz') + + def test_inverted(self): + renderer = Renderer() + actual = renderer.render(Inverted()) +- self.assertString(actual, u"""one, two, three, empty list""") ++ self.assertString(actual, """one, two, three, empty list""") + + def test_accessing_properties_on_parent_object_from_child_objects(self): + parent = Thing() +@@ -152,12 +152,12 @@ class ViewTestCase(unittest.TestCase, AssertStringMixin): + renderer = Renderer() + actual = renderer.render(view, {'parent': parent}) + +- self.assertString(actual, u'derp') ++ self.assertString(actual, 'derp') + + def test_inverted_lists(self): + renderer = Renderer() + actual = renderer.render(InvertedLists()) +- self.assertString(actual, u"""one, two, three, empty list""") ++ self.assertString(actual, """one, two, three, empty list""") + + + def _make_specloader(): +@@ -176,7 +176,7 @@ def _make_specloader(): + """ + if encoding is None: + encoding = 'ascii' +- return unicode(s, encoding, 'strict') ++ return str(s, encoding, 'strict') + + loader = Loader(file_encoding='ascii', to_unicode=to_unicode) + return SpecLoader(loader=loader) +@@ -222,7 +222,7 @@ class SpecLoaderTests(unittest.TestCase, AssertIsMixin, AssertStringMixin, + custom.template = "abc" + + spec_loader = self._make_specloader() +- self._assert_template(spec_loader, custom, u"abc") ++ self._assert_template(spec_loader, custom, "abc") + + def test_load__template__type_unicode(self): + """ +@@ -230,10 +230,10 @@ class SpecLoaderTests(unittest.TestCase, AssertIsMixin, AssertStringMixin, + + """ + custom = TemplateSpec() +- custom.template = u"abc" ++ custom.template = "abc" + + spec_loader = self._make_specloader() +- self._assert_template(spec_loader, custom, u"abc") ++ self._assert_template(spec_loader, custom, "abc") + + def test_load__template__unicode_non_ascii(self): + """ +@@ -241,10 +241,10 @@ class SpecLoaderTests(unittest.TestCase, AssertIsMixin, AssertStringMixin, + + """ + custom = TemplateSpec() +- custom.template = u"é" ++ custom.template = "é" + + spec_loader = self._make_specloader() +- self._assert_template(spec_loader, custom, u"é") ++ self._assert_template(spec_loader, custom, "é") + + def test_load__template__with_template_encoding(self): + """ +@@ -252,14 +252,14 @@ class SpecLoaderTests(unittest.TestCase, AssertIsMixin, AssertStringMixin, + + """ + custom = TemplateSpec() +- custom.template = u'é'.encode('utf-8') ++ custom.template = 'é'.encode('utf-8') + + spec_loader = self._make_specloader() + +- self.assertRaises(UnicodeDecodeError, self._assert_template, spec_loader, custom, u'é') ++ self.assertRaises(UnicodeDecodeError, self._assert_template, spec_loader, custom, 'é') + + custom.template_encoding = 'utf-8' +- self._assert_template(spec_loader, custom, u'é') ++ self._assert_template(spec_loader, custom, 'é') + + # TODO: make this test complete. + def test_load__template__correct_loader(self): +@@ -279,10 +279,10 @@ class SpecLoaderTests(unittest.TestCase, AssertIsMixin, AssertStringMixin, + self.encoding = None + + # Overrides the existing method. +- def unicode(self, s, encoding=None): ++ def str(self, s, encoding=None): + self.s = s + self.encoding = encoding +- return u"foo" ++ return "foo" + + loader = MockLoader() + custom_loader = SpecLoader() +@@ -293,7 +293,7 @@ class SpecLoaderTests(unittest.TestCase, AssertIsMixin, AssertStringMixin, + view.template_encoding = "encoding-foo" + + # Check that our unicode() above was called. +- self._assert_template(custom_loader, view, u'foo') ++ self._assert_template(custom_loader, view, 'foo') + self.assertEqual(loader.s, "template-foo") + self.assertEqual(loader.encoding, "encoding-foo") + +@@ -410,7 +410,7 @@ class TemplateSpecTests(unittest.TestCase, AssertPathsMixin): + loader = self._make_loader() + actual = loader.load(custom) + +- self.assertEqual(type(actual), unicode) ++ self.assertEqual(type(actual), str) + self.assertEqual(actual, expected) + + def test_get_template(self): +@@ -420,7 +420,7 @@ class TemplateSpecTests(unittest.TestCase, AssertPathsMixin): + """ + view = SampleView() + +- self._assert_get_template(view, u"ascii: abc") ++ self._assert_get_template(view, "ascii: abc") + + def test_get_template__template_encoding(self): + """ +@@ -432,4 +432,4 @@ class TemplateSpecTests(unittest.TestCase, AssertPathsMixin): + self.assertRaises(UnicodeDecodeError, self._assert_get_template, view, 'foo') + + view.template_encoding = 'utf-8' +- self._assert_get_template(view, u"non-ascii: é") ++ self._assert_get_template(view, "non-ascii: é") +diff --git a/setup.cfg b/setup.cfg +index 861a9f5..f6f1279 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -1,5 +1,71 @@ +-[egg_info] +-tag_build = +-tag_date = 0 +-tag_svn_revision = 0 ++[metadata] ++name = pystache ++version = attr: pystache.__version__ ++author = Chris Wanstrath ++author_email = chris@ozmm.org ++maintainer = Steve Arnold ++maintainer_email = nerdboy@gentoo.org ++description = Mustache for Python ++url = https://github.com/sarnold/pystache ++license = MIT ++license_files = LICENSE ++classifiers = ++ Development Status :: 4 - Beta ++ Intended Audience :: Developers ++ License :: OSI Approved :: MIT License ++ Programming Language :: Python :: 3 ++ Programming Language :: Python :: 3.6 ++ Programming Language :: Python :: 3.7 ++ Programming Language :: Python :: 3.8 ++ Programming Language :: Python :: 3.9 + ++[options] ++python_requires = >=3.6 ++zip_safe = True ++include_package_data = True ++packages = find: ++ ++[options.package_data] ++* = *.mustache, *.txt ++ ++[options.entry_points] ++console_scripts = ++ pystache=pystache.commands.render:main ++ pystache-test=pystache.commands.test:main ++ ++[options.extras_require] ++test = ++ nose ++ ++cov = ++ coverage ++ ++[bdist_wheel] ++universal = 0 ++ ++[check-manifest] ++ignore = ++ .codeclimate.yml ++ .gitattributes ++ .coveragerc ++ .gitignore ++ .pep8speaks.yml ++ codecov.yml ++ ++[flake8] ++exclude = ++ .git, ++ __pycache__, ++ build, ++ dist ++ ++max-line-length = 110 ++ ++[nosetests] ++traverse-namespace = 1 ++verbosity = 3 ++with-coverage = 1 ++with-doctest = 1 ++doctest-extension = rst ++cover-package = pystache ++cover-xml = 1 +diff --git a/setup.py b/setup.py +index 0d99aae..f0b7d7f 100644 +--- a/setup.py ++++ b/setup.py +@@ -28,7 +28,7 @@ it on the PyPI project page. If PyPI finds any issues, it will render it + instead as plain-text, which we do not want. + + To check in advance that PyPI will accept and parse the reST file as HTML, +-you can use the rst2html program installed by the docutils package ++you can use the rst2html.py program installed by the docutils package + (http://docutils.sourceforge.net/). To install docutils: + + $ pip install docutils +@@ -89,30 +89,7 @@ import os + import shutil + import sys + +- +-py_version = sys.version_info +- +-# distutils does not seem to support the following setup() arguments. +-# It displays a UserWarning when setup() is passed those options: +-# +-# * entry_points +-# * install_requires +-# +-# distribute works with Python 2.3.5 and above: +-# +-# http://packages.python.org/distribute/setuptools.html#building-and-distributing-packages-with-distribute +-# +-if py_version < (2, 3, 5): +- # TODO: this might not work yet. +- import distutils as dist +- from distutils import core +- setup = core.setup +-else: +- import setuptools as dist +- setup = dist.setup +- +- +-VERSION = '0.5.4' # Also change in pystache/__init__.py. ++from setuptools import setup + + FILE_ENCODING = 'utf-8' + +@@ -126,22 +103,6 @@ TEMP_EXTENSION = '.temp' + + PREP_COMMAND = 'prep' + +-CLASSIFIERS = ( +- 'Development Status :: 4 - Beta', +- 'License :: OSI Approved :: MIT License', +- 'Programming Language :: Python', +- 'Programming Language :: Python :: 2', +- 'Programming Language :: Python :: 2.4', +- 'Programming Language :: Python :: 2.5', +- 'Programming Language :: Python :: 2.6', +- 'Programming Language :: Python :: 2.7', +- 'Programming Language :: Python :: 3', +- 'Programming Language :: Python :: 3.1', +- 'Programming Language :: Python :: 3.2', +- 'Programming Language :: Python :: 3.3', +- 'Programming Language :: Python :: Implementation :: PyPy', +-) +- + # Comments in reST begin with two dots. + RST_LONG_DESCRIPTION_INTRO = """\ + .. Do not edit this file. This file is auto-generated for PyPI by setup.py +@@ -221,7 +182,7 @@ def convert_md_to_rst(md_path, rst_temp_path): + + """ + # Pandoc uses the UTF-8 character encoding for both input and output. +- command = "pandoc --write=rst --output=%s %s" % (rst_temp_path, md_path) ++ command = "pandoc -f markdown-smart --write=rst --output=%s %s" % (rst_temp_path, md_path) + print("converting with pandoc: %s to %s\n-->%s" % (md_path, rst_temp_path, + command)) + +@@ -308,65 +269,9 @@ Run the following command and commit the changes-- + os.system('python setup.py sdist upload') + + +-# We use the package simplejson for older Python versions since Python +-# does not contain the module json before 2.6: +-# +-# http://docs.python.org/library/json.html +-# +-# Moreover, simplejson stopped officially support for Python 2.4 in version 2.1.0: +-# +-# https://github.com/simplejson/simplejson/blob/master/CHANGES.txt +-# +-requires = [] +-if py_version < (2, 5): +- requires.append('simplejson<2.1') +-elif py_version < (2, 6): +- requires.append('simplejson') +- +-INSTALL_REQUIRES = requires +- +-# TODO: decide whether to use find_packages() instead. I'm not sure that +-# find_packages() is available with distutils, for example. +-PACKAGES = [ +- 'pystache', +- 'pystache.commands', +- # The following packages are only for testing. +- 'pystache.tests', +- 'pystache.tests.data', +- 'pystache.tests.data.locator', +- 'pystache.tests.examples', +-] +- +- +-# The purpose of this function is to follow the guidance suggested here: +-# +-# http://packages.python.org/distribute/python3.html#note-on-compatibility-with-setuptools +-# +-# The guidance is for better compatibility when using setuptools (e.g. with +-# earlier versions of Python 2) instead of Distribute, because of new +-# keyword arguments to setup() that setuptools may not recognize. +-def get_extra_args(): +- """ +- Return a dictionary of extra args to pass to setup(). +- +- """ +- extra = {} +- # TODO: it might be more correct to check whether we are using +- # Distribute instead of setuptools, since use_2to3 doesn't take +- # effect when using Python 2, even when using Distribute. +- if py_version >= (3, ): +- # Causes 2to3 to be run during the build step. +- extra['use_2to3'] = True +- +- return extra +- +- + def main(sys_argv): + + # TODO: use the logging module instead of printing. +- # TODO: include the following in a verbose mode. +- sys.stderr.write("pystache: using: version %s of %s\n" % (repr(dist.__version__), repr(dist))) +- + command = sys_argv[-1] + + if command == 'publish': +@@ -377,35 +282,10 @@ def main(sys_argv): + sys.exit() + + long_description = read(RST_DESCRIPTION_PATH) +- template_files = ['*.mustache', '*.txt'] +- extra_args = get_extra_args() +- +- setup(name='pystache', +- version=VERSION, +- license='MIT', +- description='Mustache for Python', +- long_description=long_description, +- author='Chris Wanstrath', +- author_email='chris@ozmm.org', +- maintainer='Chris Jerdonek', +- maintainer_email='chris.jerdonek@gmail.com', +- url='http://github.com/defunkt/pystache', +- install_requires=INSTALL_REQUIRES, +- packages=PACKAGES, +- package_data = { +- # Include template files so tests can be run. +- 'pystache.tests.data': template_files, +- 'pystache.tests.data.locator': template_files, +- 'pystache.tests.examples': template_files, +- }, +- entry_points = { +- 'console_scripts': [ +- 'pystache=pystache.commands.render:main', +- 'pystache-test=pystache.commands.test:main', +- ], +- }, +- classifiers = CLASSIFIERS, +- **extra_args ++ ++ setup( ++ long_description=long_description, ++ long_description_content_type='text/x-rst', + ) + + +diff --git a/setup_description.rst b/setup_description.rst +index 724c457..d7f1bc0 100644 +--- a/setup_description.rst ++++ b/setup_description.rst +@@ -4,13 +4,17 @@ + Pystache + ======== + +-.. figure:: http://defunkt.github.com/pystache/images/logo_phillips.png +- :alt: mustachioed, monocled snake by David Phillips ++|ci| |Conda| |Wheels| |Release| |Python| + +-.. figure:: https://secure.travis-ci.org/defunkt/pystache.png +- :alt: Travis CI current build status ++|Latest release| |License| |Maintainability| |codecov| + +-`Pystache <http://defunkt.github.com/pystache>`__ is a Python ++This updated fork of Pystache is currently tested on Python 3.6+ and in ++Conda, on Linux, Macos, and Windows (Python 2.7 support has been ++removed). ++ ++|image9| ++ ++`Pystache <http://sarnold.github.com/pystache>`__ is a Python + implementation of `Mustache <http://mustache.github.com/>`__. Mustache + is a framework-agnostic, logic-free templating system inspired by + `ctemplate <http://code.google.com/p/google-ctemplate/>`__ and +@@ -23,62 +27,45 @@ page provides a good introduction to Mustache's syntax. For a more + complete (and more current) description of Mustache's behavior, see the + official `Mustache spec <https://github.com/mustache/spec>`__. + +-Pystache is `semantically versioned <http://semver.org>`__ and can be +-found on `PyPI <http://pypi.python.org/pypi/pystache>`__. This version +-of Pystache passes all tests in `version +-1.1.2 <https://github.com/mustache/spec/tree/v1.1.2>`__ of the spec. ++Pystache is `semantically versioned <http://semver.org>`__ and older ++versions can still be found on ++`PyPI <http://pypi.python.org/pypi/pystache>`__. This version of ++Pystache now passes all tests in `version ++1.1.3 <https://github.com/mustache/spec/tree/v1.1.3>`__ of the spec. + + Requirements + ------------ + + Pystache is tested with-- + +-- Python 2.4 (requires simplejson `version +- 2.0.9 <http://pypi.python.org/pypi/simplejson/2.0.9>`__ or earlier) +-- Python 2.5 (requires +- `simplejson <http://pypi.python.org/pypi/simplejson/>`__) +-- Python 2.6 +-- Python 2.7 +-- Python 3.1 +-- Python 3.2 +-- Python 3.3 +-- `PyPy <http://pypy.org/>`__ ++- Python 3.6 ++- Python 3.7 ++- Python 3.8 ++- Python 3.9 ++- Conda (py36-py39) + + `Distribute <http://packages.python.org/distribute/>`__ (the setuptools +-fork) is recommended over +-`setuptools <http://pypi.python.org/pypi/setuptools>`__, and is required +-in some cases (e.g. for Python 3 support). If you use +-`pip <http://www.pip-installer.org/>`__, you probably already satisfy +-this requirement. ++fork) is no longer required over ++`setuptools <http://pypi.python.org/pypi/setuptools>`__, as the current ++packaging is now PEP517-compliant. + + JSON support is needed only for the command-line interface and to run +-the spec tests. We require simplejson for earlier versions of Python +-since Python's `json <http://docs.python.org/library/json.html>`__ +-module was added in Python 2.6. +- +-For Python 2.4 we require an earlier version of simplejson since +-simplejson stopped officially supporting Python 2.4 in simplejson +-version 2.1.0. Earlier versions of simplejson can be installed manually, +-as follows: +- +-:: +- +- pip install 'simplejson<2.1.0' ++the spec tests; PyYAML can still be used (see the Develop section). + +-Official support for Python 2.4 will end with Pystache version 0.6.0. ++Official support for Python 2 will end with Pystache version 0.6.0. + + Install It + ---------- + + :: + +- pip install pystache ++ pip install -U pystache -f https://github.com/sarnold/pystache/releases/ + + And test it-- + + :: + +- pystache-test ++ pystache-test + + To install and test from source (e.g. from GitHub), see the Develop + section. +@@ -88,68 +75,68 @@ Use It + + :: + +- >>> import pystache +- >>> print pystache.render('Hi {{person}}!', {'person': 'Mom'}) +- Hi Mom! ++ >>> import pystache ++ >>> print(pystache.render('Hi {{person}}!', {'person': 'Mom'})) ++ Hi Mom! + + You can also create dedicated view classes to hold your view logic. + +-Here's your view class (in .../examples/readme.py): ++Here's your view class (in ../pystache/tests/examples/readme.py): + + :: + +- class SayHello(object): +- def to(self): +- return "Pizza" ++ class SayHello(object): ++ def to(self): ++ return "Pizza" + + Instantiating like so: + + :: + +- >>> from pystache.tests.examples.readme import SayHello +- >>> hello = SayHello() ++ >>> from pystache.tests.examples.readme import SayHello ++ >>> hello = SayHello() + +-Then your template, say\_hello.mustache (by default in the same +-directory as your class definition): ++Then your template, say_hello.mustache (by default in the same directory ++as your class definition): + + :: + +- Hello, {{to}}! ++ Hello, {{to}}! + + Pull it together: + + :: + +- >>> renderer = pystache.Renderer() +- >>> print renderer.render(hello) +- Hello, Pizza! ++ >>> renderer = pystache.Renderer() ++ >>> print(renderer.render(hello)) ++ Hello, Pizza! + + For greater control over rendering (e.g. to specify a custom template + directory), use the ``Renderer`` class like above. One can pass + attributes to the Renderer class constructor or set them on a Renderer + instance. To customize template loading on a per-view basis, subclass + ``TemplateSpec``. See the docstrings of the +-`Renderer <https://github.com/defunkt/pystache/blob/master/pystache/renderer.py>`__ ++`Renderer <https://github.com/sarnold/pystache/blob/master/pystache/renderer.py>`__ + class and +-`TemplateSpec <https://github.com/defunkt/pystache/blob/master/pystache/template_spec.py>`__ ++`TemplateSpec <https://github.com/sarnold/pystache/blob/master/pystache/template_spec.py>`__ + class for more information. + + You can also pre-parse a template: + + :: + +- >>> parsed = pystache.parse(u"Hey {{#who}}{{.}}!{{/who}}") +- >>> print parsed +- [u'Hey ', _SectionNode(key=u'who', index_begin=12, index_end=18, parsed=[_EscapeNode(key=u'.'), u'!'])] ++ >>> parsed = pystache.parse(u"Hey {{#who}}{{.}}!{{/who}}") ++ >>> print(parsed) ++ ['Hey ', _SectionNode(key='who', index_begin=12, index_end=18, parsed=[_EscapeNode(key='.'), '!'])] + + And then: + + :: + +- >>> print renderer.render(parsed, {'who': 'Pops'}) +- Hey Pops! +- >>> print renderer.render(parsed, {'who': 'you'}) +- Hey you! ++ >>> print(renderer.render(parsed, {'who': 'Pops'})) ++ Hey Pops! ++ >>> print(renderer.render(parsed, {'who': 'you'})) ++ Hey you! + + Python 3 + -------- +@@ -211,22 +198,24 @@ To test from a source distribution (without installing)-- + + :: + +- python test_pystache.py ++ python test_pystache.py + + To test Pystache with multiple versions of Python (with a single +-command!), you can use `tox <http://pypi.python.org/pypi/tox>`__: ++command!) and different platforms, you can use ++`tox <http://pypi.python.org/pypi/tox>`__: + + :: + +- pip install 'virtualenv<1.8' # Version 1.8 dropped support for Python 2.4. +- pip install 'tox<1.4' # Version 1.4 dropped support for Python 2.4. +- tox ++ pip install tox ++ tox -e setup + +-If you do not have all Python versions listed in ``tox.ini``-- ++To run tests on multiple versions with coverage, run: + + :: + +- tox -e py26,py32 # for example ++ tox -e py38-linux,py39-linux # for example ++ ++(substitute your platform above, eg, macos or windows) + + The source distribution tests also include doctests and tests from the + Mustache spec. To include tests from the Mustache spec in your test +@@ -234,8 +223,8 @@ runs: + + :: + +- git submodule init +- git submodule update ++ git submodule init ++ git submodule update + + The test harness parses the spec's (more human-readable) yaml files if + `PyYAML <http://pypi.python.org/pypi/PyYAML>`__ is present. Otherwise, +@@ -243,94 +232,113 @@ it parses the json files. To install PyYAML-- + + :: + +- pip install pyyaml ++ pip install pyyaml ++ ++Once the submodule is available, you can run the full test set with: ++ ++:: ++ ++ tox -e setup . ext/spec/specs + + To run a subset of the tests, you can use + `nose <http://somethingaboutorange.com/mrl/projects/nose/0.11.1/testing.html>`__: + + :: + +- pip install nose +- nosetests --tests pystache/tests/test_context.py:GetValueTests.test_dictionary__key_present ++ pip install nose ++ nosetests --tests pystache/tests/test_context.py:GetValueTests.test_dictionary__key_present + +-Using Python 3 with Pystache from source +-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++Mailing List (old) ++------------------ + +-Pystache is written in Python 2 and must be converted to Python 3 prior +-to using it with Python 3. The installation process (and tox) do this +-automatically. ++There is(was) a `mailing ++list <http://librelist.com/browser/pystache/>`__. Note that there is a ++bit of a delay between posting a message and seeing it appear in the ++mailing list archive. + +-To convert the code to Python 3 manually (while using Python 3)-- ++Credits ++------- + + :: + +- python setup.py build ++ >>> import pystache ++ >>> context = { 'author': 'Chris Wanstrath', 'maintainer': 'Chris Jerdonek','refurbisher': 'Steve Arnold' } ++ >>> print(pystache.render("Author: {{author}}\nMaintainer: {{maintainer}}\nRefurbisher: {{refurbisher}}", context)) ++ Author: Chris Wanstrath ++ Maintainer: Chris Jerdonek ++ Refurbisher: Steve Arnold + +-This writes the converted code to a subdirectory called ``build``. By +-design, Python 3 builds +-`cannot <https://bitbucket.org/tarek/distribute/issue/292/allow-use_2to3-with-python-2>`__ +-be created from Python 2. ++Pystache logo by `David Phillips <http://davidphillips.us/>`__ is ++licensed under a `Creative Commons Attribution-ShareAlike 3.0 Unported ++License <http://creativecommons.org/licenses/by-sa/3.0/deed.en_US>`__. ++|image10| + +-To convert the code without using setup.py, you can use +-`2to3 <http://docs.python.org/library/2to3.html>`__ as follows (two +-steps)-- ++History ++======= + +-:: ++**Note:** Official support for Python 2.7 will end with Pystache version ++0.6.0. + +- 2to3 --write --nobackups --no-diffs --doctests_only pystache +- 2to3 --write --nobackups --no-diffs pystache ++0.6.0 (2021-03-04) ++------------------ + +-This converts the code (and doctests) in place. ++- Bump spec versions to latest => v1.1.3 ++- Modernize python and CI tools, update docs/doctests ++- Update unicode conversion test for py3-only ++- Add pep8speaks cfg, cleanup warnings ++- Remove superfluous setup test/unused imports ++- Add conda recipe/CI build + +-To ``import pystache`` from a source distribution while using Python 3, +-be sure that you are importing from a directory containing a converted +-version of the code (e.g. from the ``build`` directory after +-converting), and not from the original (unconverted) source directory. +-Otherwise, you will get a syntax error. You can help prevent this by not +-running the Python IDE from the project directory when importing +-Pystache while using Python 3. ++.. _section-1: + +-Mailing List +------------- ++0.5.6 (2021-02-28) ++------------------ + +-There is a `mailing list <http://librelist.com/browser/pystache/>`__. +-Note that there is a bit of a delay between posting a message and seeing +-it appear in the mailing list archive. ++- Use correct wheel name in release workflow, limit wheels ++- Add install check/test of downloaded wheel ++- Update/add ci workflows and tox cfg, bump to next dev0 version + +-Credits +-------- ++.. _section-2: + +-:: ++0.5.5 (2020-12-16) ++------------------ + +- >>> context = { 'author': 'Chris Wanstrath', 'maintainer': 'Chris Jerdonek' } +- >>> print pystache.render("Author: {{author}}\nMaintainer: {{maintainer}}", context) +- Author: Chris Wanstrath +- Maintainer: Chris Jerdonek ++- fix document processing, update pandoc args and history ++- add release.yml to CI, test env settings ++- fix bogus commit message, update versions and tox cf ++- add post-test steps for building pkgs with/without doc updates ++- add CI build check, fix MANIFEST.in pruning + +-Pystache logo by `David Phillips <http://davidphillips.us/>`__ is +-licensed under a `Creative Commons Attribution-ShareAlike 3.0 Unported +-License <http://creativecommons.org/licenses/by-sa/3.0/deed.en_US>`__. +-|image0| ++.. _section-3: + +-History +-======= ++0.5.4-2 (2020-11-09) ++-------------------- + +-**Note:** Official support for Python 2.4 will end with Pystache version +-0.6.0. ++- Merge pull request #1 from sarnold/rebase-up ++- Bugfix: test_specloader.py: fix test_find__with_directory on other ++ OSs ++- Bugfix: pystache/loader.py: remove stray windows line-endings ++- fix crufty (and insecure) http urls ++- Bugfix: modernize python versions (keep py27) and fix spec_test load ++ cmd ++ ++.. _section-4: + + 0.5.4 (2014-07-11) + ------------------ + + - Bugfix: made test with filenames OS agnostic (issue #162). + ++.. _section-5: ++ + 0.5.3 (2012-11-03) + ------------------ + + - Added ability to customize string coercion (e.g. to have None render + as ``''``) (issue #130). +-- Added Renderer.render\_name() to render a template by name (issue ++- Added Renderer.render_name() to render a template by name (issue + #122). +-- Added TemplateSpec.template\_path to specify an absolute path to a ++- Added TemplateSpec.template_path to specify an absolute path to a + template (issue #41). + - Added option of raising errors on missing tags/partials: + ``Renderer(missing_tags='strict')`` (issue #110). +@@ -355,6 +363,8 @@ History + - More robust handling of byte strings in Python 3. + - Added Creative Commons license for David Phillips's logo. + ++.. _section-6: ++ + 0.5.2 (2012-05-03) + ------------------ + +@@ -367,16 +377,20 @@ History + context stack (issue #113). + - Bugfix: lists of lambdas for sections were not rendered (issue #114). + ++.. _section-7: ++ + 0.5.1 (2012-04-24) + ------------------ + + - Added support for Python 3.1 and 3.2. + - Added tox support to test multiple Python versions. + - Added test script entry point: pystache-test. +-- Added \_\_version\_\_ package attribute. ++- Added \__version_\_ package attribute. + - Test harness now supports both YAML and JSON forms of Mustache spec. + - Test harness no longer requires nose. + ++.. _section-8: ++ + 0.5.0 (2012-04-03) + ------------------ + +@@ -435,11 +449,15 @@ Bug fixes: + - Passing ``**kwargs`` to ``Template()`` with no context no longer + raises an exception. + ++.. _section-9: ++ + 0.4.1 (2012-03-25) + ------------------ + + - Added support for Python 2.4. [wangtz, jvantuyl] + ++.. _section-10: ++ + 0.4.0 (2011-01-12) + ------------------ + +@@ -447,19 +465,25 @@ Bug fixes: + - Add support for inverted lists + - Decoupled template loading + ++.. _section-11: ++ + 0.3.1 (2010-05-07) + ------------------ + + - Fix package + ++.. _section-12: ++ + 0.3.0 (2010-05-03) + ------------------ + +-- View.template\_path can now hold a list of path ++- View.template_path can now hold a list of path + - Add {{& blah}} as an alias for {{{ blah }}} + - Higher Order Sections + - Inverted sections + ++.. _section-13: ++ + 0.2.0 (2010-02-15) + ------------------ + +@@ -473,12 +497,16 @@ Bug fixes: + [enaeseth] + - Template file encoding awareness. [enaeseth] + ++.. _section-14: ++ + 0.1.1 (2009-11-13) + ------------------ + + - Ensure we're dealing with strings, always + - Tests can be run by executing the test file directly + ++.. _section-15: ++ + 0.1.0 (2009-11-12) + ------------------ + +@@ -510,4 +538,23 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-.. |image0| image:: http://i.creativecommons.org/l/by-sa/3.0/88x31.png ++.. |ci| image:: https://github.com/sarnold/pystache/actions/workflows/ci.yml/badge.svg ++ :target: https://github.com/sarnold/pystache/actions/workflows/ci.yml ++.. |Conda| image:: https://github.com/sarnold/pystache/actions/workflows/conda.yml/badge.svg ++ :target: https://github.com/sarnold/pystache/actions/workflows/conda.yml ++.. |Wheels| image:: https://github.com/sarnold/pystache/actions/workflows/wheels.yml/badge.svg ++ :target: https://github.com/sarnold/pystache/actions/workflows/wheels.yml ++.. |Release| image:: https://github.com/sarnold/pystache/actions/workflows/release.yml/badge.svg ++ :target: https://github.com/sarnold/pystache/actions/workflows/release.yml ++.. |Python| image:: https://img.shields.io/badge/python-3.6+-blue.svg ++ :target: https://www.python.org/downloads/ ++.. |Latest release| image:: https://img.shields.io/github/v/release/sarnold/pystache?include_prereleases ++ :target: https://github.com/sarnold/pystache/releases/latest ++.. |License| image:: https://img.shields.io/github/license/sarnold/pystache ++ :target: https://github.com/sarnold/pystache/blob/master/LICENSE ++.. |Maintainability| image:: https://api.codeclimate.com/v1/badges/a8fa1bf4638bfc6581b6/maintainability ++ :target: https://codeclimate.com/github/sarnold/pystache/maintainability ++.. |codecov| image:: https://codecov.io/gh/sarnold/pystache/branch/master/graph/badge.svg?token=5PZNMZBI6K ++ :target: https://codecov.io/gh/sarnold/pystache ++.. |image9| image:: gh/images/logo_phillips_small.png ++.. |image10| image:: http://i.creativecommons.org/l/by-sa/3.0/88x31.png +diff --git a/tox.ini b/tox.ini +index d1eaebf..66c4515 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -1,36 +1,110 @@ +-# A tox configuration file to test across multiple Python versions. +-# +-# http://pypi.python.org/pypi/tox +-# + [tox] +-# Tox 1.4 drops py24 and adds py33. In the current version, we want to +-# support 2.4, so we can't simultaneously support 3.3. +-envlist = py24,py25,py26,py27,py27-yaml,py27-noargs,py31,py32,pypy ++envlist = py{36,37,38,39}-{linux,macos,windows} ++skip_missing_interpreters = true ++isolated_build = true ++#skipsdist = true ++ ++[gh-actions] ++python = ++ 3.6: py36 ++ 3.7: py37 ++ 3.8: py38 ++ 3.9: py39 ++ ++[gh-actions:env] ++PLATFORM = ++ ubuntu-18.04: linux ++ macos-latest: macos ++ windows-latest: windows + + [testenv] ++passenv = CI PYTHON PYTHONIOENCODING ++ ++deps = ++ pip>=20.0.1 ++ nose ++ coverage ++ ++commands = ++ nosetests -sx . {posargs} ++ ++[testenv:bare] + # Change the working directory so that we don't import the pystache located + # in the original location. ++deps = ++ pip>=20.0.1 ++ -e . ++ + changedir = + {envbindir} ++ + commands = +- pystache-test {toxinidir} ++ pystache-test ++ ++[testenv:bench] ++passenv = CI PYTHON PYTHONIOENCODING + +-# Check that the spec tests work with PyYAML. +-[testenv:py27-yaml] +-basepython = +- python2.7 + deps = +- PyYAML +-changedir = +- {envbindir} ++ pip>=20.0.1 ++ # uncomment for comparison, posargs expects a number, eg, 10000 ++ #chevron ++ ++commands_pre = ++ pip install . ++ + commands = +- pystache-test {toxinidir} ++ python pystache/tests/benchmark.py {posargs} ++ ++[testenv:setup] ++passenv = CI PYTHON PYTHONIOENCODING ++ ++deps = ++ pyyaml ++ twine ++ ++commands = ++ python setup.py install ++ twine check dist/* ++ pystache-test {posargs} ++ ++[testenv:deploy] ++passenv = CI PYTHON PYTHONIOENCODING ++allowlist_externals = bash ++ ++deps = ++ pip>=19.0.1 ++ wheel ++ pep517 ++ twine ++ ++commands = ++ python -m pep517.build . ++ twine check dist/* ++ ++[testenv:check] ++passenv = CI PYTHON PYTHONIOENCODING ++skip_install = true ++ ++allowlist_externals = bash ++ ++deps = ++ pip>=20.0.1 + +-# Check that pystache-test works from an install with no arguments. +-[testenv:py27-noargs] +-basepython = +- python2.7 +-changedir = +- {envbindir} + commands = ++ bash -c 'export WHL_FILE=$(ls dist/*.whl); \ ++ python -m pip install $WHL_FILE' + pystache-test ++ ++[testenv:docs] ++passenv = CI PYTHON PYTHONIOENCODING ++allowlist_externals = bash ++ ++deps = ++ pip>=19.0.1 ++ wheel ++ docutils ++ # apt/emerge pandoc first ++ ++commands = ++ python setup.py prep ++ bash -c 'python setup.py --long-description | rst2html.py -v --no-raw > out.html' +diff --git a/travis.yml_disabled b/travis.yml_disabled +new file mode 100644 +index 0000000..f0b4042 +--- /dev/null ++++ b/travis.yml_disabled +@@ -0,0 +1,52 @@ ++dist: xenial ++language: python ++ ++# Travis CI has no plans to support Jython and no longer supports Python 2.5. ++python: ++ - "2.7" ++ - "3.5" ++ - "3.6" ++ - "3.7" ++ - "3.8" ++ - "3.9-dev" ++ - "nightly" ++ ++matrix: ++ fast_finish: true ++ include: ++ - os: osx ++ # osx is goofy, ``python`` is always py2, images mutate fast ++ language: shell ++ before_install: ++ - pip3 install --upgrade pip wheel ++ install: ++ - python3 setup.py install ++ script: ++ - pystache-test . ext/spec/specs ++ - os: windows ++ # windows is even goofier, install path is different for python/python3 ++ # but either way you get python3 and the cmd is always ``python`` o.O ++ # (also versions mutuate like bacteria) ++ language: shell ++ before_install: ++ - choco install python3 --params "/InstallDir:C:\\Python" ++ - python -m pip install --upgrade pip wheel ++ env: PATH="/c/Python:/c/Python/Scripts:$PATH" ++ install: ++ - python setup.py install ++ script: ++ - pystache-test . ext/spec/specs ++ allow_failures: ++ - python: "nightly" ++ ++# command to install dependencies ++install: ++ - pip install --upgrade pip ++ - pip install codecov ++ ++script: ++ - python setup.py install ++ # Include the spec tests directory for Mustache spec tests and the ++ # project directory for doctests. ++ - pystache-test . ext/spec/specs ++ #- tox +-- +2.33.0 + diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pystache_0.5.4.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pystache_0.5.4.bb index bbf4fbbf52..0ae5a19115 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pystache_0.5.4.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pystache_0.5.4.bb @@ -3,6 +3,8 @@ HOMEPAGE = "https://github.com/defunkt/pystache" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=eb4417802c56384aac71b34505528a60" +SRC_URI += "file://0001-Modernize-python-versions-remove-py2x-and-fix-tests-.patch" + SRC_URI[md5sum] = "485885e67a0f6411d5252e69b20a35ca" SRC_URI[sha256sum] = "f7bbc265fb957b4d6c7c042b336563179444ab313fb93a719759111eabd3b85a" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-asyncio_0.15.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-asyncio_0.16.0.bb index 1c7df2c72c..1dfeab6332 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-asyncio_0.15.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-asyncio_0.16.0.bb @@ -3,7 +3,7 @@ DESCRIPTION = "pytest-asyncio is an Apache2 licensed library, written in Python, LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314" -SRC_URI[sha256sum] = "2564ceb9612bbd560d19ca4b41347b54e7835c2f792c504f698e05395ed63f6f" +SRC_URI[sha256sum] = "7496c5977ce88c34379df64a66459fe395cd05543f0a2f837016e7144391fcfb" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-timeout_1.4.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-timeout_2.0.1.bb index 3fb8bdf822..a790a6551f 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-timeout_1.4.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-timeout_2.0.1.bb @@ -5,8 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d8048cd156eda3df2e7f111b0ae9ceff" PYPI_PACKAGE = "pytest-timeout" -SRC_URI[md5sum] = "552cc293447b00f7a294ce7a1fb3839f" -SRC_URI[sha256sum] = "20b3113cf6e4e80ce2d403b6fb56e9e1b871b510259206d40ff8d609f48bda76" +SRC_URI[sha256sum] = "a5ec4eceddb8ea726911848593d668594107e797621e97f93a1d1dbc6fbb9080" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytz_2021.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytz_2021.3.bb index dc51966901..119342a4bd 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytz_2021.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytz_2021.3.bb @@ -5,8 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1a67fc46c1b596cce5d21209bbe75999" inherit pypi setuptools3 ptest -SRC_URI[md5sum] = "8c849bdf95414fe708a84473e42d4406" -SRC_URI[sha256sum] = "83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da" +SRC_URI[sha256sum] = "acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326" RDEPENDS:${PN}:class-target += "\ ${PYTHON_PN}-datetime \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2021.8.28.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2021.10.8.bb index e375b5b28f..e7978970c7 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2021.8.28.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2021.10.8.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=f0a3e4a2554ebb89c0 inherit pypi setuptools3 -SRC_URI[sha256sum] = "f585cbbeecb35f35609edccb95efd95a3e35824cd7752b586503f7e6087303f1" +SRC_URI[sha256sum] = "26895d7c9bbda5c52b3635ce5991caa90fbb1ddfac9c9ff1c7ce505e2282fb2a" RDEPENDS:${PN} += " \ python3-stringold \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_4.1.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_4.1.2.bb index d715f35135..0c3de5da79 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_4.1.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-robotframework_4.1.2.bb @@ -13,7 +13,7 @@ inherit pypi setuptools3 PYPI_PACKAGE_EXT = "zip" -SRC_URI[sha256sum] = "663f84c177b2fa9b3b782939e31637a057a33f3a4b29067812f1259b7f4bad35" +SRC_URI[sha256sum] = "7ea2454b847cfcb211e2906743c5c4a868ab096ab4ce1547ab102d91fb224443" RDEPENDS:${PN} += " \ ${PYTHON_PN}-shell \ @@ -26,4 +26,5 @@ RDEPENDS:${PN} += " \ ${PYTHON_PN}-ctypes \ ${PYTHON_PN}-logging \ ${PYTHON_PN}-numbers \ + ${PYTHON_PN}-profile \ " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.3.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.4.3.bb index a7810ff0c9..c5614a381d 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.3.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.4.3.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0c79f8d3c91fc847350efd28bfe0a341" RDEPENDS:${PN} += "python3-urllib3" -SRC_URI[sha256sum] = "ebe99144fa9618d4b0e7617e7929b75acd905d258c3c779edcd34c0adfffe26c" +SRC_URI[sha256sum] = "b9844751e40710e84a457c5bc29b21c383ccb2b63d76eeaad72f7f1c808c8828" PYPI_PACKAGE = "sentry-sdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-simpleeval_0.9.10.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-simpleeval_0.9.10.bb index 9708fc6262..36512cba9a 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-simpleeval_0.9.10.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-simpleeval_0.9.10.bb @@ -17,7 +17,9 @@ SRC_URI += " \ RDEPENDS:${PN}-ptest += " \ ${PYTHON_PN}-pytest \ " - +do_configure:prepend() { + sed -i -e "/use_2to3=True,/d" ${S}/setup.py +} do_install_ptest() { cp -f ${S}/test_simpleeval.py ${D}${PTEST_PATH}/ } diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-socketio_5.4.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-socketio_5.4.1.bb index cd2c436a5c..bf8ce4c7bf 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-socketio_5.4.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-socketio_5.4.1.bb @@ -9,7 +9,7 @@ inherit pypi setuptools3 PYPI_PACKAGE = "python-socketio" -SRC_URI[sha256sum] = "ca807c9e1f168e96dea412d64dd834fb47c470d27fd83da0504aa4b248ba2544" +SRC_URI[sha256sum] = "ef4e273ddfebb421144a228cbab1e7e27ffe8d372514fa561e57d590ea6627b0" PACKAGECONFIG ?= "asyncio_client client" PACKAGECONFIG[asyncio_client] = ",,,${PYTHON_PN}-aiohttp ${PYTHON_PN}-websockets" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_1.4.23.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_1.4.26.bb index 4bfaf656d9..e00015629b 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_1.4.23.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_1.4.26.bb @@ -4,7 +4,7 @@ HOMEPAGE = "http://www.sqlalchemy.org/" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=3359ed561ac16aaa25b6c6eff84df595" -SRC_URI[sha256sum] = "76ff246881f528089bf19385131b966197bb494653990396d2ce138e2a447583" +SRC_URI[sha256sum] = "6bc7f9d7d90ef55e8c6db1308a8619cd8f40e24a34f759119b95e7284dca351a" PYPI_PACKAGE = "SQLAlchemy" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_3.4.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_3.5.0.bb index e2f43048e6..8d345e66e5 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_3.4.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-stevedore_3.5.0.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://docs.openstack.org/stevedore/latest/" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" -SRC_URI[sha256sum] = "59b58edb7f57b11897f150475e7bc0c39c5381f0b8e3fa9f5c20ce6c89ec4aa1" +SRC_URI[sha256sum] = "f40253887d8712eaa2bb0ea3830374416736dc8ec0e22f5a65092c1174c44335" DEPENDS += "${PYTHON_PN}-pbr-native" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-sympy_1.8.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-sympy_1.8.bb deleted file mode 100644 index e274857f76..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-sympy_1.8.bb +++ /dev/null @@ -1,15 +0,0 @@ -# This recipe is adapted from one in meta-jupyter: -# https://github.com/Xilinx/meta-jupyter/blob/master/recipes-python/python3-sympy_1.1.bb - -SUMMARY = "Computer algebra system (CAS) in Python" -HOMEPAGE = "https://pypi.org/project/sympy/" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2245824980a408ef1749391dfba32b3b" - -SRC_URI[sha256sum] = "1ca588a9f6ce6a323c5592f9635159c2093572826668a1022c75c75bdf0297cb" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "python3-mpmath" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-sympy_1.9.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-sympy_1.9.bb new file mode 100644 index 0000000000..92018698e7 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-sympy_1.9.bb @@ -0,0 +1,12 @@ +SUMMARY = "Computer algebra system (CAS) in Python" +HOMEPAGE = "https://pypi.org/project/sympy/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=42976c55ba05d15b32a7b4757dee5e64" + +SRC_URI[sha256sum] = "c7a880e229df96759f955d4f3970d4cabce79f60f5b18830c08b90ce77cd5fdc" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "python3-mpmath" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-traitlets_5.1.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-traitlets_5.1.1.bb index 120604a8be..bfed02d6f5 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-traitlets_5.1.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-traitlets_5.1.1.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING.md;md5=eec4de4d599518742e54e75954e33b46" PYPI_PACKAGE = "traitlets" -SRC_URI[sha256sum] = "bd382d7ea181fbbcce157c133db9a829ce06edffe097bcf3ab945b435452b46d" +SRC_URI[sha256sum] = "059f456c5a7c1c82b98c2e8c799f39c9b8128f6d0d46941ee118daace9eb70c7" RDEPENDS:${PN} = "\ ${PYTHON_PN}-ipython-genutils \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-transitions_0.8.9.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-transitions_0.8.10.bb index 178dfad3f3..46292987b1 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-transitions_0.8.9.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-transitions_0.8.10.bb @@ -4,6 +4,6 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=baac7be1f4c17620df74188e23da6d47" inherit pypi setuptools3 -SRC_URI[sha256sum] = "fc2ec6d6b6f986cd7e28e119eeb9ba1c9cc51ab4fbbdb7f2dedad01983fd2de0" +SRC_URI[sha256sum] = "b0385975a842e885c1a55c719d2f90164471665794d39d51f9eb3f11e1d9c8ac" RDEPENDS:${PN} += "python3-six python3-logging" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-twitter_3.10.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-twitter_4.1.0.bb index bb034a4f99..ac1dab8d83 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-twitter_3.10.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-twitter_4.1.0.bb @@ -4,7 +4,7 @@ DESCRIPTION = "Python module to support twitter API" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489" -SRC_URI[sha256sum] = "76e6954b806ca470dda877f57db8792fff06a0beba0ed43efc3805771e39f06a" +SRC_URI[sha256sum] = "88e2938de5ac7043c9ba8b8358996fbc5806059d63c96269d22527a40ca7d511" PYPI_PACKAGE = "tweepy" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-typeguard_2.12.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-typeguard_2.13.0.bb index 6b33c17950..564f98e3f2 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-typeguard_2.12.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-typeguard_2.13.0.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://pypi.org/project/typeguard/" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=f0e423eea5c91e7aa21bdb70184b3e53" -SRC_URI[sha256sum] = "c2af8b9bdd7657f4bd27b45336e7930171aead796711bc4cfc99b4731bb9d051" +SRC_URI[sha256sum] = "04e38f92eb59410c9375d3be23df65e0a7643f2e8bcbd421423d808d2f9e99df" inherit pypi setuptools3 ptest diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-tzlocal_3.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-tzlocal_4.0.1.bb index a9d372ee98..f8339bb2e8 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-tzlocal_3.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-tzlocal_4.0.1.bb @@ -3,6 +3,6 @@ HOMEPAGE = "https://pypi.org/project/tzlocal/" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=57e0bd61643d81d05683cdce65b11d10" -SRC_URI[sha256sum] = "f4e6e36db50499e0d92f79b67361041f048e2609d166e93456b50746dc4aef12" +SRC_URI[sha256sum] = "8560aabba61b5d2a5e1697bb781f682e6eaa3ce386cee85a09a458cc0003f836" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_4.1.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_4.2.0.bb index d8e83c58a1..3dbfe44faa 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_4.1.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_4.2.0.bb @@ -4,7 +4,7 @@ DESCRIPTION = "UltraJSON is an ultra fast JSON encoder and decoder written in pu LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=10fa10456417c0252bcb8a498e498ffe" -SRC_URI[sha256sum] = "22b63ec4409f0d2f2c4c9d5aa331997e02470b7a15a3233f3cc32f2f9b92d58c" +SRC_URI[sha256sum] = "fffe509f556861c7343c6cba57ed05fe7bcf4b48a934a5b946ccb45428cf8883" inherit pypi ptest setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-uritemplate_3.0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-uritemplate_4.1.1.bb index 0d63803bb6..eaf8bda846 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-uritemplate_3.0.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-uritemplate_4.1.1.bb @@ -6,8 +6,7 @@ AUTHOR = "Ian Cordasco" LICENSE = "Apache-2.0 | BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=0f6d769bdcfacac3c1a1ffa568937fe0" -SRC_URI[md5sum] = "869fb44fbd56713490db7272eb36c8ae" -SRC_URI[sha256sum] = "5af8ad10cec94f215e3f48112de2022e1d5a37ed427fbd88652fa908f2ab7cae" +SRC_URI[sha256sum] = "4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0" inherit pypi setuptools3 ptest diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-urllib3_1.26.6.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-urllib3_1.26.7.bb index 5a2a6287f0..72696749bc 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-urllib3_1.26.6.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-urllib3_1.26.7.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/shazow/urllib3" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c2823cb995439c984fd62a973d79815c" -SRC_URI[sha256sum] = "f57b4c16c62fa2760b7e3d97c35b255512fb6b59a259730f36ba32ce9f8e342f" +SRC_URI[sha256sum] = "4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-watchdog_2.1.5.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-watchdog_2.1.6.bb index 55b966a90f..2bb110049f 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-watchdog_2.1.5.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-watchdog_2.1.6.bb @@ -4,7 +4,7 @@ DEPENDS = "${PYTHON_PN}-argh" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" -SRC_URI[sha256sum] = "5563b005907613430ef3d4aaac9c78600dd5704e84764cb6deda4b3d72807f09" +SRC_URI[sha256sum] = "a36e75df6c767cbf46f61a91c70b3ba71811dfa0aca4a324d9407a06a8b7a2e7" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-websockets_9.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-websockets_10.0.bb index a44c2d8231..004d3beb17 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-websockets_9.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-websockets_10.0.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=78c2cc91e172ca96d6f8e4a76c739ec6" inherit pypi setuptools3 -SRC_URI[sha256sum] = "276d2339ebf0df4f45df453923ebd2270b87900eda5dfd4a6b0cfa15f82111c3" +SRC_URI[sha256sum] = "c4fc9a1d242317892590abe5b61a9127f1a61740477bfb121743f290b8054002" BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_2.0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_2.0.2.bb index 57db204649..4c221cc41f 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_2.0.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-werkzeug_2.0.2.bb @@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=5dc88300786f1c214c1e9827a5229462" PYPI_PACKAGE = "Werkzeug" -SRC_URI[sha256sum] = "1de1db30d010ff1af14a009224ec49ab2329ad2cde454c8a708130642d579c42" +SRC_URI[sha256sum] = "aa2bb6fc8dee8d6c504c0ac1e7f5f7dc5810a9903e793b6f715a9f015bdadb9a" inherit pypi setuptools3 @@ -35,4 +35,5 @@ RDEPENDS:${PN} += " \ ${PYTHON_PN}-threading \ ${PYTHON_PN}-unixadmin \ ${PYTHON_PN}-misc \ + ${PYTHON_PN}-profile \ " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt_1.12.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt_1.13.2.bb index 22457d9c86..b1710fcd1e 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt_1.12.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-wrapt_1.13.2.bb @@ -4,8 +4,7 @@ LICENSE = "BSD-2-Clause" SECTION = "devel/python" LIC_FILES_CHKSUM = "file://LICENSE;md5=fdfc019b57affbe1d7a32e3d34e83db4" -SRC_URI[md5sum] = "6d56ed0de4336462a73350341462f45e" -SRC_URI[sha256sum] = "b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" +SRC_URI[sha256sum] = "dca56cc5963a5fd7c2aa8607017753f534ee514e09103a6c55d2db70b50e7447" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_1.4.5.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.0.1.bb index ffd3072a99..aeb27cef42 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_1.4.5.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-xlsxwriter_3.0.1.bb @@ -16,6 +16,6 @@ RDEPENDS:${PN} += " \ python3-io \ " -SRC_URI[sha256sum] = "0956747859567ec01907e561a7d8413de18a7aae36860f979f9da52b9d58bc19" +SRC_URI[sha256sum] = "3f39bf581c55f3ad1438bc170d7f4c4649cee8b6b7a80d21f79508118eeea52a" BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_1.6.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_1.8.0.bb index 217e77e50a..d720dd3341 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_1.6.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_1.8.0.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/sissaschool/xmlschema" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=47489cb18c469474afeb259ed1d4832f" -SRC_URI[sha256sum] = "31ddf77a44e4b121de212beeb2cc039e2e8b7a7a4f1678c9b29be1f5341aec52" +SRC_URI[sha256sum] = "fa4e22a708f08d15f605c9191e2500149ba1a848fff7fa4904c2f2c57dc1087f" PYPI_PACKAGE = "xmlschema" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/python310.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/python310.patch new file mode 100644 index 0000000000..6dd58ae968 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/python310.patch @@ -0,0 +1,51 @@ +From d40bc0e8230dd35e05222f5761e3d7f7a75fd46e Mon Sep 17 00:00:00 2001 +From: Alexander Shadchin <shadchin@yandex-team.ru> +Date: Tue, 1 Jun 2021 02:31:12 +0300 +Subject: [PATCH] Adapt to Python 3.10 beta 1 + +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + yappi/_yappi.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/yappi/_yappi.c b/yappi/_yappi.c +index 1721280..343130d 100644 +--- a/yappi/_yappi.c ++++ b/yappi/_yappi.c +@@ -1258,7 +1258,11 @@ _resume_greenlet_ctx(_ctx *ctx) + static _ctx * + _bootstrap_thread(PyThreadState *ts) + { ++#if PY_VERSION_HEX < 0x030a00b1 + ts->use_tracing = 1; ++#else ++ ts->cframe->use_tracing = 1; ++#endif + ts->c_profilefunc = _yapp_callback; + return NULL; + } +@@ -1289,7 +1293,11 @@ _profile_thread(PyThreadState *ts) + ctx = (_ctx *)it->val; + } + ++#if PY_VERSION_HEX < 0x030a00b1 + ts->use_tracing = 1; ++#else ++ ts->cframe->use_tracing = 1; ++#endif + ts->c_profilefunc = _yapp_callback; + ctx->id = ctx_id; + ctx->tid = ts->thread_id; +@@ -1306,7 +1314,11 @@ _profile_thread(PyThreadState *ts) + static _ctx* + _unprofile_thread(PyThreadState *ts) + { ++#if PY_VERSION_HEX < 0x030a00b1 + ts->use_tracing = 0; ++#else ++ ts->cframe->use_tracing = 0; ++#endif + ts->c_profilefunc = NULL; + + return NULL; //dummy return for enum_threads() func. prototype diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_1.3.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_1.3.2.bb index 94988a7448..7cfc84e756 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_1.3.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_1.3.2.bb @@ -9,6 +9,7 @@ SRC_URI[sha256sum] = "a51d3e6e5563cc74b5bb82ed6e7bd44a9c1a7eae3d97e4d52e9465edb3 SRC_URI += " \ file://run-ptest \ file://0001-Fix-imports-for-ptests.patch \ + file://python310.patch \ " inherit pypi setuptools3 ptest diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl/0001-Drop-tests-for-semicolon-as-a-separator.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl/0001-Drop-tests-for-semicolon-as-a-separator.patch deleted file mode 100644 index 1a9d5d02d8..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl/0001-Drop-tests-for-semicolon-as-a-separator.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 47eabc562a8883d757e3cff487c6c6e98def5a21 Mon Sep 17 00:00:00 2001 -From: Andrew Svetlov <andrew.svetlov@gmail.com> -Date: Fri, 28 May 2021 12:42:17 +0300 -Subject: [PATCH] Drop tests for semicolon as a separator - -yarl 1.6.3 ptests check the use of semicolons as separators in URLs, -which are no longer valid by default in newer versions of Python. This -patch is in python3-yarl master, but there is no release with it yet, so -backport it until there is a new release. - -For more info, see: -https://bugs.python.org/issue42967 -https://github.com/aio-libs/yarl/issues/563 - -Upstream-Status: Backport -(https://github.com/aio-libs/yarl/commit/47eabc562a8883d757e3cff487c6c6e98def5a21) - -Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> - ---- - tests/test_url_query.py | 11 ----------- - 1 file changed, 11 deletions(-) - -diff --git a/tests/test_url_query.py b/tests/test_url_query.py -index d2ca640..07f858b 100644 ---- a/tests/test_url_query.py -+++ b/tests/test_url_query.py -@@ -60,14 +60,3 @@ def test_ampersand_as_value(): - u = URL("http://127.0.0.1/?a=1%26b=2") - assert len(u.query) == 1 - assert u.query["a"] == "1&b=2" -- -- --def test_semicolon_as_separator(): -- u = URL("http://127.0.0.1/?a=1;b=2") -- assert len(u.query) == 2 -- -- --def test_semicolon_as_value(): -- u = URL("http://127.0.0.1/?a=1%3Bb=2") -- assert len(u.query) == 1 -- assert u.query["a"] == "1;b=2" --- -2.31.1 - diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.6.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.7.0.bb index 7bab771f7f..acb4b4ac20 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.6.3.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.7.0.bb @@ -1,14 +1,11 @@ SUMMARY = "The module provides handy URL class for url parsing and changing" HOMEPAGE = "https://github.com/aio-libs/yarl/" LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b334fc90d45983db318f54fd5bf6c90b" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e581798a7b985311f29fa3e163ea27ae" -SRC_URI[sha256sum] = "8a9066529240171b68893d60dca86a763eae2139dd42f42106b03cf4b426bf10" +SRC_URI[sha256sum] = "8e7ebaf62e19c2feb097ffb7c94deb0f0c9fab52590784c8cd679d30ab009162" -SRC_URI += " \ - file://run-ptest \ - file://0001-Drop-tests-for-semicolon-as-a-separator.patch \ -" +SRC_URI += "file://run-ptest" PYPI_PACKAGE = "yarl" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.36.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.36.9.bb index 5f6f0a2987..8258ddd51d 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.36.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.36.9.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/jstasiak/python-zeroconf" LICENSE = "LGPL-2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=3bb705b228ea4a14ea2728215b780d80" -SRC_URI[sha256sum] = "549f685a318c06d5345ed6533f54f33b206816b564ed7f7876e7b9522e77bf29" +SRC_URI[sha256sum] = "023ebc58b765537edcb0395367b732e5271e2659760b1d5c6119aaacaeb7b390" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-extended/python-pyephem/python3-pyephem_4.0.0.2.bb b/meta-openembedded/meta-python/recipes-extended/python-pyephem/python3-pyephem_4.1.bb index ce2a802849..add4458333 100644 --- a/meta-openembedded/meta-python/recipes-extended/python-pyephem/python3-pyephem_4.0.0.2.bb +++ b/meta-openembedded/meta-python/recipes-extended/python-pyephem/python3-pyephem_4.1.bb @@ -4,7 +4,7 @@ HOMEPAGE = "http://rhodesmill.org/pyephem/" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=9c930b395b435b00bb13ec83b0c99f40" -SRC_URI[sha256sum] = "d03de73ebf6a91681d597eb5b5d43bcf6f0c67e292bba2f9a974734b4f15757e" +SRC_URI[sha256sum] = "c076794a511a34b5b91871c1cf6374dbc323ec69fca3f50eb718f20b171259d6" PYPI_PACKAGE = "ephem" diff --git a/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0001-support-authentication-for-kickstart.patch b/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0001-support-authentication-for-kickstart.patch index 0e64ce420e..5f95d74bf1 100644 --- a/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0001-support-authentication-for-kickstart.patch +++ b/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0001-support-authentication-for-kickstart.patch @@ -1,7 +1,7 @@ -From f05f5fc363e2510f6943532f3e14a6423f6a2cf1 Mon Sep 17 00:00:00 2001 +From 3540ddcc7448dc784b65c74424c8a25132cb8534 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Tue, 31 Jul 2018 17:24:47 +0800 -Subject: [PATCH 1/4] support authentication for kickstart +Subject: [PATCH] support authentication for kickstart While download kickstart file from web server, we support basic/digest authentication. @@ -12,6 +12,7 @@ which the invoker could parse this specific error. Upstream-Status: inappropriate [oe specific] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + --- pykickstart/errors.py | 17 +++++++++++++++++ pykickstart/load.py | 34 ++++++++++++++++++++++++++++------ @@ -19,7 +20,7 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 3 files changed, 47 insertions(+), 8 deletions(-) diff --git a/pykickstart/errors.py b/pykickstart/errors.py -index bf08ac5..aada7aa 100644 +index 8294f59a..3d20bf82 100644 --- a/pykickstart/errors.py +++ b/pykickstart/errors.py @@ -32,6 +32,9 @@ This module exports several exception classes: @@ -51,10 +52,10 @@ index bf08ac5..aada7aa 100644 + def __str__(self): + return self.value diff --git a/pykickstart/load.py b/pykickstart/load.py -index fb935f2..41a2e9e 100644 +index 30e2fcfa..b984876d 100644 --- a/pykickstart/load.py +++ b/pykickstart/load.py -@@ -18,10 +18,13 @@ +@@ -18,9 +18,12 @@ # with the express permission of Red Hat, Inc. # import requests @@ -62,14 +63,13 @@ index fb935f2..41a2e9e 100644 +from requests.auth import HTTPBasicAuth + import shutil - import six -from pykickstart.errors import KickstartError +from pykickstart.errors import KickstartError, KickstartAuthError from pykickstart.i18n import _ from requests.exceptions import SSLError, RequestException -@@ -29,7 +32,7 @@ _is_url = lambda location: '://' in location # RFC 3986 +@@ -28,7 +31,7 @@ _is_url = lambda location: '://' in location # RFC 3986 SSL_VERIFY = True @@ -78,7 +78,7 @@ index fb935f2..41a2e9e 100644 '''Load a destination URL or file into a string. Type of input is inferred automatically. -@@ -40,7 +43,7 @@ def load_to_str(location): +@@ -39,7 +42,7 @@ def load_to_str(location): Raises: KickstartError on error reading''' if _is_url(location): @@ -87,7 +87,7 @@ index fb935f2..41a2e9e 100644 else: return _load_file(location) -@@ -70,11 +73,30 @@ def load_to_file(location, destination): +@@ -69,11 +72,30 @@ def load_to_file(location, destination): _copy_file(location, destination) return destination @@ -122,10 +122,10 @@ index fb935f2..41a2e9e 100644 raise KickstartError(_('Error securely accessing URL "%s"') % location + ': {e}'.format(e=str(e))) except RequestException as e: diff --git a/pykickstart/parser.py b/pykickstart/parser.py -index d8880eb..22d14cb 100644 +index b23e54f1..e10f06b5 100644 --- a/pykickstart/parser.py +++ b/pykickstart/parser.py -@@ -801,7 +801,7 @@ class KickstartParser(object): +@@ -796,7 +796,7 @@ class KickstartParser(object): i = PutBackIterator(s.splitlines(True) + [""]) self._stateMachine(i) @@ -134,7 +134,7 @@ index d8880eb..22d14cb 100644 """Process a kickstart file, given by the filename f.""" if reset: self._reset() -@@ -822,7 +822,7 @@ class KickstartParser(object): +@@ -817,7 +817,7 @@ class KickstartParser(object): self.currentdir[self._includeDepth] = cd try: @@ -143,6 +143,3 @@ index d8880eb..22d14cb 100644 except KickstartError as e: raise KickstartError(_("Unable to open input kickstart file: %s") % str(e), lineno=0) --- -2.7.4 - diff --git a/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0004-load.py-retry-to-invoke-request-with-timeout.patch b/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0004-load.py-retry-to-invoke-request-with-timeout.patch index 6ed15ab09c..bf5a197230 100644 --- a/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0004-load.py-retry-to-invoke-request-with-timeout.patch +++ b/meta-openembedded/meta-python/recipes-extended/python-pykickstart/files/0004-load.py-retry-to-invoke-request-with-timeout.patch @@ -1,7 +1,7 @@ -From ffe06c6dd812b604d6482e4353d5564fad78bc90 Mon Sep 17 00:00:00 2001 +From 737e9a7c11233183f48ce6c83d38b504c8ffed12 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Mon, 30 Jul 2018 15:52:21 +0800 -Subject: [PATCH 4/4] load.py: retry to invoke request with timeout +Subject: [PATCH] load.py: retry to invoke request with timeout While networkless, use request to fetch kickstart file from network, it failed and wait 300s to break, we should retry @@ -11,23 +11,23 @@ network is up, the fetch works. Upstream-Status: inappropriate [oe specific] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + --- pykickstart/load.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/pykickstart/load.py b/pykickstart/load.py -index ad3bad1..a5cbbc5 100644 +index f75fe5d3..a8f3ed1d 100644 --- a/pykickstart/load.py +++ b/pykickstart/load.py -@@ -21,6 +21,7 @@ import requests +@@ -21,12 +21,16 @@ import requests from requests.auth import HTTPDigestAuth from requests.auth import HTTPBasicAuth +import time import shutil - import six -@@ -28,6 +29,9 @@ from pykickstart.errors import KickstartError, KickstartAuthError + from pykickstart.errors import KickstartError, KickstartAuthError from pykickstart.i18n import _ from requests.exceptions import SSLError, RequestException @@ -37,7 +37,7 @@ index ad3bad1..a5cbbc5 100644 _is_url = lambda location: '://' in location # RFC 3986 SSL_VERIFY = False -@@ -73,6 +77,29 @@ def load_to_file(location, destination): +@@ -72,6 +76,29 @@ def load_to_file(location, destination): _copy_file(location, destination) return destination @@ -67,7 +67,7 @@ index ad3bad1..a5cbbc5 100644 def _get_auth(location, user=None, passwd=None): auth = None -@@ -94,6 +121,10 @@ def _get_auth(location, user=None, passwd=None): +@@ -93,6 +120,10 @@ def _get_auth(location, user=None, passwd=None): def _load_url(location, user=None, passwd=None): '''Load a location (URL or filename) and return contents as string''' @@ -78,6 +78,3 @@ index ad3bad1..a5cbbc5 100644 auth = _get_auth(location, user=user, passwd=passwd) try: request = requests.get(location, verify=SSL_VERIFY, auth=auth) --- -2.7.4 - diff --git a/meta-openembedded/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.32.bb b/meta-openembedded/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.34.bb index 829ada4f8b..65fc88e77b 100644 --- a/meta-openembedded/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.32.bb +++ b/meta-openembedded/meta-python/recipes-extended/python-pykickstart/python3-pykickstart_3.34.bb @@ -18,7 +18,7 @@ SRC_URI = "git://github.com/rhinstaller/pykickstart.git;protocol=https;branch=ma file://0003-comment-out-sections-shutdown-and-environment-in-gen.patch \ file://0004-load.py-retry-to-invoke-request-with-timeout.patch \ " -SRCREV = "c56a5fbdd4079b187b21787f072ccc83dc09c28c" +SRCREV = "bfd836cfdd8439d984595aca015811ed5c6be733" UPSTREAM_CHECK_GITTAGREGEX = "r(?P<pver>\d+(\.\d+)+(-\d+)*)" diff --git a/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.49.bb b/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.51.bb index e5d1879578..4b36c50d55 100644 --- a/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.49.bb +++ b/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.51.bb @@ -26,7 +26,7 @@ SRC_URI:append:class-target = " \ " LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3" -SRC_URI[sha256sum] = "65b965d6890ea90d9706595e4b7b9365b5060bec8ea723449480b4769974133b" +SRC_URI[sha256sum] = "20e01d81fecf077690a4439e3969a9b22a09a8d43c525356e863407741b838f4" S = "${WORKDIR}/httpd-${PV}" diff --git a/meta-openembedded/meta-webserver/recipes-php/xdebug/xdebug_2.9.5.bb b/meta-openembedded/meta-webserver/recipes-php/xdebug/xdebug_3.1.1.bb index b03517bf1a..580ae7e89a 100644 --- a/meta-openembedded/meta-webserver/recipes-php/xdebug/xdebug_2.9.5.bb +++ b/meta-openembedded/meta-webserver/recipes-php/xdebug/xdebug_3.1.1.bb @@ -6,8 +6,7 @@ DEPENDS = "php re2c-native" SRC_URI = "http://xdebug.org/files/xdebug-${PV}.tgz" -SRC_URI[md5sum] = "c04be1bf225b768bf627dc92e5a1f9df" -SRC_URI[sha256sum] = "775b1705109611b996d6a713fe14117a67846e157eb7dbf349bc0b055e861a10" +SRC_URI[sha256sum] = "9be3ae0fdb4dc4a4c68084626cddc56f12396487e309a8c8dd318f0f900d1a68" UPSTREAM_CHECK_REGEX = "xdebug-(?P<pver>\d+(\.\d+)+)\.tgz" diff --git a/meta-openembedded/meta-xfce/classes/xfce.bbclass b/meta-openembedded/meta-xfce/classes/xfce.bbclass index 7cd806701c..913202be59 100644 --- a/meta-openembedded/meta-xfce/classes/xfce.bbclass +++ b/meta-openembedded/meta-xfce/classes/xfce.bbclass @@ -1,6 +1,6 @@ def xfce_verdir(v): import re - m = re.match("^([0-9]+)\.([0-9]+)", v) + m = re.match(r"^([0-9]+)\.([0-9]+)", v) return "%s.%s" % (m.group(1), m.group(2)) HOMEPAGE = "http://www.xfce.org" |