Compare commits
89 commits
electron/t
...
edge
| Author | SHA1 | Date | |
|---|---|---|---|
|
f98506d3bb |
|||
| 6a81c77cf8 | |||
|
797de7c2a9 |
|||
|
206336bdd1 |
|||
|
dfd1702835 |
|||
|
e14a8dc1e6 |
|||
|
|
88d7b4e8c7 |
||
|
|
839fa112c7 |
||
|
|
5a29004820 |
||
|
|
7a023d0024 | ||
|
|
094222021c |
||
|
|
946a011b61 |
||
|
|
3d599aff17 | ||
|
|
a7a531a637 | ||
|
|
7ef8cfa070 | ||
|
|
2e181afd19 | ||
|
|
ac2f1855db | ||
|
|
35e7f126ce |
||
|
|
ed788403aa |
||
|
|
55135b73b1 |
||
|
273730b1b9 |
|||
|
7be7e19fc9 |
|||
|
8791fcb06c |
|||
|
cacd6ba22b |
|||
|
16a4ebc1e4 |
|||
|
7ce80a2dd7 |
|||
|
6fceb42254 |
|||
|
8e2f15f244 |
|||
|
ba29f2b000 |
|||
|
2865b8f524 |
|||
|
8792a8c06a |
|||
|
df11191c86 |
|||
|
fd29f9c77b |
|||
|
a1898dab2d |
|||
|
fe3b86d53a |
|||
|
e5734af93e |
|||
|
061cc8069c |
|||
|
1300d81709 |
|||
|
a993aebd4d |
|||
|
2825fbb4f5 |
|||
|
ee0ce13773 |
|||
|
d6eed040f2 |
|||
|
23bcbc7513 |
|||
|
c25b332251 |
|||
|
73ebcb7fcc |
|||
|
f45c1e54db |
|||
|
749f413ab8 |
|||
|
6770f6babb |
|||
| 42d2681350 | |||
| 16d5ce552f | |||
| df65efacf1 | |||
|
869d5c3845 |
|||
|
03b4f6425d |
|||
|
8658e947c7 |
|||
|
b3d03dc817 |
|||
|
223efcc89f |
|||
|
bd1a71e8a2 |
|||
|
d3043bab85 |
|||
|
2eeb660610 |
|||
|
8c1da51a60 |
|||
|
4de45ea910 |
|||
|
d0dfb021eb |
|||
|
953627f48d |
|||
|
8789a20256 |
|||
|
7332be7561 |
|||
|
4adb8575d1 |
|||
|
4a5617805a |
|||
|
9c137f0b9d |
|||
|
b621ae6716 |
|||
|
d0b5791120 |
|||
|
c600b841b3 |
|||
|
2fa99e56c7 |
|||
|
22a33dd83d |
|||
|
a48dd2cc70 |
|||
|
5ea7fbce20 |
|||
|
f7e711f9a1 |
|||
|
923797f1b9 |
|||
|
7c780b5d0f |
|||
|
edac436331 |
|||
|
eea9bc1537 |
|||
|
d746dda5cb |
|||
|
7a2ebe9cfe |
|||
|
3da0a268ee |
|||
|
3611b942ed |
|||
|
f2ad704226 |
|||
|
7b106bae0c |
|||
|
3f1fd192e5 |
|||
|
bff91156de |
|||
|
97a6234e8e |
132 changed files with 10195 additions and 13007 deletions
|
|
@ -10,21 +10,28 @@
|
|||
# fix_only: array of packages that should only track bug fix releases (seperated by space)
|
||||
# default: none
|
||||
# all packages: all
|
||||
#
|
||||
#
|
||||
# If either minor_only or fix_only is set, only packages with semantic versioning schemes
|
||||
# will be tracked.
|
||||
#
|
||||
# If a package is both minor_only and fix_only, the minor releases will be tracked
|
||||
#
|
||||
# If a - is placed in front of package name, it'll be excluded from the update rule
|
||||
#
|
||||
# optional env variables
|
||||
# ALL_PACKAGES: when true, ignore is package is owned by me
|
||||
# skip_package: array of packages to skip
|
||||
# skip_package: array of packages to skip, place a - in front of package name to not exclude it
|
||||
# add_package: array of additional packages to check
|
||||
#
|
||||
|
||||
repo=${downstream/*\/}
|
||||
release=${downstream/\/$repo/}
|
||||
release=${release/*\/}
|
||||
release=${release/v}
|
||||
arch=$(apk --print-arch)
|
||||
# add special case for postmarketos
|
||||
[ "$release" == "postmarketos" ] && { release=$repo; repo="pmos"; arch="aarch64"; }
|
||||
[ "$release" == "master" ] && release=edge
|
||||
|
||||
is_semantic() {
|
||||
local downstream_version_dot=${1//[^.]}
|
||||
|
|
@ -34,8 +41,9 @@ is_semantic() {
|
|||
return 1
|
||||
}
|
||||
|
||||
|
||||
echo "Checking $downstream for out of date packages"
|
||||
curl --silent $downstream/x86_64/APKINDEX.tar.gz | tar -O -zx APKINDEX > APKINDEX
|
||||
curl --silent $downstream/$arch/APKINDEX.tar.gz | tar -O -zx APKINDEX > APKINDEX
|
||||
|
||||
if [ "$ALL_PACKAGES" == "true" ]; then
|
||||
owned_by_you=$(awk -F ':' '{if($1=="o"){print $2}}' APKINDEX | sort | uniq)
|
||||
|
|
@ -45,6 +53,9 @@ else
|
|||
echo "Found $(printf '%s\n' $owned_by_you | wc -l ) packages owned by you"
|
||||
fi
|
||||
|
||||
# add additionnal packages
|
||||
owned_by_you="$owned_by_you $add_package"
|
||||
|
||||
rm -f out_of_date not_in_anitya
|
||||
|
||||
for pkg in $owned_by_you; do
|
||||
|
|
@ -52,13 +63,44 @@ for pkg in $owned_by_you; do
|
|||
downstream_version=${downstream_version/-*}
|
||||
|
||||
# skip package if in $skip_package array
|
||||
if [[ "$skip_package" == *$pkg* ]]; then
|
||||
if [[ "$skip_package" == *all* || "$skip_package" == *$pkg* ]] && [[ "$skip_package" != *-$pkg* ]]; then
|
||||
echo "$pkg skipped"
|
||||
continue
|
||||
fi
|
||||
|
||||
# special cases where package is not semantic
|
||||
case $pkg in
|
||||
# track u-boot-pine64-pinenote against mainline u-boot, and track upstream rockchip blobs
|
||||
u-boot-pine64-pinenote)
|
||||
upstream_version="$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/Alpine/u-boot" | jq -r '.stable_versions.[]' | head -n1)"
|
||||
|
||||
# some reason the commit now not in APKINDEX, using master instead
|
||||
#commit=$(sed -n "/^P:$pkg$/,/^$/p" APKINDEX | awk -F ':' '{if($1=="c"){print $2}}')
|
||||
#commit=${commit/-dirty/}
|
||||
commit=master
|
||||
|
||||
# fetches upstream version for blobs using ini file
|
||||
upstream_trust="$(curl --fail -s 'https://raw.githubusercontent.com/rockchip-linux/rkbin/master/RKTRUST/RK3566TRUST_ULTRA.ini' | grep bl31 | awk -F '=' '{if($1"="PATH){print $2}}' | grep -o -P '(?<=_v).*(?=.elf)')"
|
||||
upstream_ddr="$(curl --fail -s 'https://raw.githubusercontent.com/rockchip-linux/rkbin/master/RKBOOT/RK3566MINIALL_ULTRA.ini' | grep ddr | awk -F '=' '{if($1"="PATH){print $2}}' | head -n 1 | grep -o -P '(?<=_v).*(?=.bin)')"
|
||||
|
||||
# extracts downstream version via _trust_ver and _ddr_ver variable
|
||||
downstream_trust=$(curl --fail -X GET -s "https://gitlab.postmarketos.org/postmarketOS/pmaports/-/raw/$commit/device/testing/u-boot-pine64-pinenote/APKBUILD" | awk -F '=' '{if($1=="_trust_ver"){print $2}}')
|
||||
downstream_ddr=$(curl --fail -X GET -s "https://gitlab.postmarketos.org/postmarketOS/pmaports/-/raw/$commit/device/testing/u-boot-pine64-pinenote/APKBUILD" | awk -F '=' '{if($1=="_ddr_ver"){print $2}}')
|
||||
|
||||
# compares versions and creates newline in out_of_date if problematic
|
||||
if [ "$upstream_trust" != "$downstream_trust" ]; then
|
||||
echo "$pkg new Trust blob $upstream_trust version available"
|
||||
echo "$pkg(trust) $downstream_trust $upstream_trust $repo $release" >> out_of_date
|
||||
fi
|
||||
if [ "$upstream_ddr" != "$downstream_ddr" ]; then
|
||||
echo "$pkg new ddr blob $upstream_ddr version available"
|
||||
echo "$pkg(ddr) $downstream_ddr $upstream_ddr $repo $release" >> out_of_date
|
||||
fi
|
||||
|
||||
;;
|
||||
# release-monitoring omits the extra B, while we keep it but put it after the version no.
|
||||
looking-glass) upstream_version="$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/Alpine/$pkg" | jq -r '.stable_versions.[]' | head -n1)b";;
|
||||
# we want to track both Firefox security upgrades + Zotero upgrades
|
||||
zotero)
|
||||
commit=$(sed -n "/^P:$pkg$/,/^$/p" APKINDEX | awk -F ':' '{if($1=="c"){print $2}}')
|
||||
downstream_fx_ver=$(curl --fail -X GET -s "https://gitlab.alpinelinux.org/alpine/aports/-/raw/$commit/community/zotero/APKBUILD" | awk -F '=' '{if($1=="_fxver"){print $2}}')
|
||||
|
|
@ -69,8 +111,11 @@ for pkg in $owned_by_you; do
|
|||
fi
|
||||
upstream_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/Alpine/$pkg" | jq -r '.stable_versions.[]' | head -n1)
|
||||
;;
|
||||
# aports omits the -beta part of the version
|
||||
freetube) upstream_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/v2/packages/?name=$pkg&distribution=Alpine" | jq -r '.items.[].version' | sed "s|-beta||");;
|
||||
# we only track x.x.1xx feature branches of SDK and stage0
|
||||
dotnet*sdk|dotnet*stage0) upstream_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/Alpine/$pkg" | jq -r ".stable_versions.[] | match(\"${downstream_version::-2}.*\").string" | sed 's|-.*||' | head -n1);;
|
||||
# we want to track both current major version and upstream latest
|
||||
electron)
|
||||
upstream_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/v2/projects/?name=$pkg&distribution=Alpine" | jq -r '.items.[].stable_versions' | jq -r ".[] | match(\"${downstream_version/.*}.*\").string" | head -n 1)
|
||||
latest_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/v2/packages/?name=$pkg&distribution=Alpine" | jq -r '.items.[].stable_version' )
|
||||
|
|
@ -81,19 +126,54 @@ for pkg in $owned_by_you; do
|
|||
pkg="$pkg(${upstream_version/.*})"
|
||||
fi
|
||||
;;
|
||||
arm-trusted-firmware) upstream_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/Alpine/$pkg" | jq -r ".stable_versions.[] | match(\"${downstream_version::-2}.*\").string" | head -n1);;
|
||||
# we want to track LTS (even releases) rather than latest
|
||||
arm-trusted-firmware)
|
||||
if [[ "$fix_only" == *all* || "$fix_only" == *$pkg* ]] || [[ "$minor_only" == *all* || "$minor_only" == *$pkg* ]]; then
|
||||
upstream_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/Alpine/$pkg" | jq -r ".stable_versions.[] | match(\"${downstream_version%.*}.*\").string" | head -n1)
|
||||
else
|
||||
upstream_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/Alpine/$pkg" | jq -r '.stable_versions.[] | select(test("^[0-9]+\\.[0-9]+\\.[0-9]+$")) | select(split(".") | .[1] | tonumber | . % 2 == 0)' | head -n1)
|
||||
fi
|
||||
;;
|
||||
# track linux-pine64-pinenote against latest
|
||||
linux-pine64-pinenote)
|
||||
upstream_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/315000" | jq -r ".stable_versions.[] | match(\"${downstream_version%.*}.*\").string" | head -n1)
|
||||
latest_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/315000" | jq -r ".stable_versions.[]" | head -n1)
|
||||
|
||||
# append version number to signal that this is not latest major version
|
||||
if [ "${upstream_version/.*.*}" != "${latest_version/.*.*}" ]; then
|
||||
echo "$pkg(${latest_version/.*.*}) major version available"
|
||||
echo "$pkg(${latest_version/.*.*}) $downstream_version $latest_version $repo $release" >> out_of_date
|
||||
pkg="$pkg(${upstream_version%.*})"
|
||||
fi
|
||||
;;
|
||||
# track linux-radxa against BSP kernel (usually got awful late
|
||||
linux-radxa)
|
||||
upstream_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/Alpine/$pkg" | jq -r '.stable_versions.[]' | head -n1)
|
||||
upstream_version=${upstream_version/-*}
|
||||
;;
|
||||
dotnet*-sdk|dotnet*-stage0)
|
||||
upstream_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/141853" | jq -r ".stable_versions.[] | match(\"${downstream_version::-2}.*\").string" | head -n 1)
|
||||
;;
|
||||
dotnet*-runtime)
|
||||
upstream_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/220385" | jq -r ".stable_versions.[] | match(\"${downstream_version%.*}.*\").string" | head -n 1)
|
||||
;;
|
||||
# removes last bit in github tag from usbboot release, as not needed
|
||||
raspberrypi-usbboot) curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/Alpine/$pkg" | jq -r '.stable_versions.[]' | head -n1 | sed 's|-.*||';;
|
||||
*)
|
||||
# continues when package version scheme is not semantic, but minor_only or fix_only is set
|
||||
if [ -n "${minor_only}" ] || [ -n "${fix_only}" ]; then
|
||||
|
||||
if [[ "$minor_only" == *all* || "$minor_only" == *$pkg* ]] && [[ "$minor_only" != *-$pkg* ]]; then
|
||||
# continues when package version scheme is not semantic, but minor_only or fix_only is set
|
||||
if ! is_semantic $downstream_version; then
|
||||
echo "$pkg is not semantic, and fix_only or minor_only is set"
|
||||
echo "$pkg is not semantic, and minor_only is set"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${minor_only}" == "all" ] || [[ "${minor_only}" == *$pkg* ]]; then
|
||||
upstream_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/Alpine/$pkg" | jq -r ".stable_versions.[] | match(\"${downstream_version%.*.*}.*\").string" | head -n1)
|
||||
elif [ "${fix_only}" == "all" ] || [[ "${fix_only}" == *$pkg* ]]; then
|
||||
elif [[ "$fix_only" == *all* || "$fix_only" == *$pkg* ]] && [[ "$fix_only" != *-$pkg* ]]; then
|
||||
# continues when package version scheme is not semantic, but minor_only or fix_only is set
|
||||
if ! is_semantic $downstream_version; then
|
||||
echo "$pkg is not semantic, and fix_only is set"
|
||||
continue
|
||||
fi
|
||||
upstream_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/Alpine/$pkg" | jq -r ".stable_versions.[] | match(\"${downstream_version%.*}.*\").string" | head -n1)
|
||||
else
|
||||
upstream_version=$(curl --fail -X GET -s -H 'Content-Type: application/json' "https://release-monitoring.org/api/project/Alpine/$pkg" | jq -r '.stable_versions.[]' | head -n1)
|
||||
|
|
@ -108,7 +188,7 @@ for pkg in $owned_by_you; do
|
|||
echo "$pkg" >> not_in_anitya
|
||||
fi
|
||||
elif [ "$downstream_version" != "$(printf '%s\n' $upstream_version $downstream_version | sort -V | head -n 1)" ]; then
|
||||
echo "$pkg higher downstream"
|
||||
echo "$pkg higher downstream $upstream_version"
|
||||
continue
|
||||
elif [ "$upstream_version" != "$downstream_version" ]; then
|
||||
echo "$pkg upstream version $upstream_version does not match downstream version $downstream_version in $release"
|
||||
|
|
|
|||
|
|
@ -16,10 +16,17 @@ does_it_exist() {
|
|||
release=$5
|
||||
|
||||
query="$repo/$name: upgrade to $upstream_version"
|
||||
if [ "$release" != "edge" ]; then query="[$release] $query"; fi
|
||||
query="%22$(echo $query | sed 's| |%20|g' | sed 's|:|%3A|g' | sed 's|/|%2F|g' | sed 's|\[|%5B|g' | sed 's|\]|%5D|g')%22"
|
||||
if [ "$release" != "edge" ]; then
|
||||
query="%22[$release] $query%22"
|
||||
elif [ "$repo" != "pmos" ] && [ "$repo" != "user" ]; then
|
||||
# workaround to this query matching both stable and edge branch
|
||||
query="%22$query%22&labels=Edge"
|
||||
else
|
||||
query="%22$query%22"
|
||||
fi
|
||||
query="$(echo $query | sed 's| |%20|g' | sed 's|:|%3A|g' | sed 's|/|%2F|g' | sed 's|\[|%5B|g' | sed 's|\]|%5D|g')"
|
||||
|
||||
result="$(curl --silent -X 'GET' \
|
||||
result="$(curl -L --silent -X 'GET' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues?state=open&q=$query&type=issues&sort=latest" \
|
||||
-H 'accept: application/json' \
|
||||
-H "Authorization: token $ISSUE_TOKEN"
|
||||
|
|
@ -38,10 +45,17 @@ is_it_old() {
|
|||
release=$5
|
||||
|
||||
query="$repo/$name: upgrade to"
|
||||
if [ "$release" != "edge" ]; then query="[$release] $query"; fi
|
||||
query="%22$(echo $query | sed 's| |%20|g' | sed 's|:|%3A|g' | sed 's|/|%2F|g' | sed 's|\[|%5B|g' | sed 's|\]|%5D|g')%22"
|
||||
if [ "$release" != "edge" ]; then
|
||||
query="%22[$release] $query%22"
|
||||
elif [ "$repo" != "pmos" ] && [ "$repo" != "user" ]; then
|
||||
# workaround to this query matching both stable and edge branch
|
||||
query="%22$query%22&labels=Edge"
|
||||
else
|
||||
query="%22$query%22"
|
||||
fi
|
||||
query="$(echo $query | sed 's| |%20|g' | sed 's|:|%3A|g' | sed 's|/|%2F|g' | sed 's|\[|%5B|g' | sed 's|\]|%5D|g')"
|
||||
|
||||
result="$(curl --silent -X 'GET' \
|
||||
result="$(curl -L --silent -X 'GET' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues?state=open&q=$query&type=issues&sort=latest" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: token $ISSUE_TOKEN"
|
||||
|
|
@ -66,14 +80,15 @@ update_title() {
|
|||
release=$5
|
||||
id=$6
|
||||
|
||||
result=$(curl --silent -X 'PATCH' \
|
||||
title="$repo/$name: upgrade to $upstream_version"
|
||||
if [ "$release" != "edge" ]; then title="[$release] $title"; fi
|
||||
|
||||
result=$(curl -L --silent -X 'PATCH' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues/$id" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: token $ISSUE_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{
|
||||
\"title\": \"$repo/$name: upgrade to $upstream_version\"
|
||||
}"
|
||||
-d "{\"title\": \"$title\"}"
|
||||
)
|
||||
|
||||
return 0
|
||||
|
|
@ -89,7 +104,7 @@ create_issue() {
|
|||
title="$repo/$name: upgrade to $upstream_version"
|
||||
if [ "$release" != "edge" ]; then title="[$release] $title"; fi
|
||||
|
||||
result=$(curl --silent -X 'POST' \
|
||||
result=$(curl -L --silent -X 'POST' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: token $ISSUE_TOKEN" \
|
||||
|
|
@ -138,7 +153,7 @@ if [ -f not_in_anitya ]; then
|
|||
query="Add missing $repo packages to anitya"
|
||||
query="%22$(echo $query | sed 's| |%20|g')%22"
|
||||
|
||||
result="$(curl --silent -X 'GET' \
|
||||
result="$(curl -L --silent -X 'GET' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues?state=open&q=$query&type=issues&sort=latest" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: token $ISSUE_TOKEN"
|
||||
|
|
@ -146,7 +161,7 @@ if [ -f not_in_anitya ]; then
|
|||
|
||||
if [ "$result" == "[]" ]; then
|
||||
echo "Creating anitya issue"
|
||||
result=$(curl --silent -X 'POST' \
|
||||
result=$(curl -L --silent -X 'POST' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: token $ISSUE_TOKEN" \
|
||||
|
|
@ -162,7 +177,7 @@ if [ -f not_in_anitya ]; then
|
|||
else
|
||||
echo "Updating anitya issue"
|
||||
result_id="$(echo $result | jq -r '.[].number' )"
|
||||
result=$(curl --silent -X 'PATCH' \
|
||||
result=$(curl -L --silent -X 'PATCH' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/issues/$result_id" \
|
||||
-H 'accept: application/json' \
|
||||
-H "authorization: token $ISSUE_TOKEN" \
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ jobs:
|
|||
${{ github.workspace }}/.forgejo/bin/build.sh
|
||||
touch packages/dummy
|
||||
- name: Package upload
|
||||
uses: forgejo/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: package
|
||||
path: packages
|
||||
|
|
@ -49,6 +49,6 @@ jobs:
|
|||
- name: Repo pull
|
||||
uses: actions/checkout@v4
|
||||
- name: Package download
|
||||
uses: forgejo/download-artifact@v3
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Package deployment
|
||||
run: ${{ github.workspace }}/.forgejo/bin/deploy.sh
|
||||
|
|
|
|||
54
.forgejo/workflows/build-armv7.yaml
Normal file
54
.forgejo/workflows/build-armv7.yaml
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
on:
|
||||
pull_request:
|
||||
types: [ assigned, opened, synchronize, reopened ]
|
||||
|
||||
jobs:
|
||||
build-armv7:
|
||||
runs-on: armv7
|
||||
container:
|
||||
image: alpinelinux/alpine-gitlab-ci:latest
|
||||
env:
|
||||
CI_PROJECT_DIR: ${{ github.workspace }}
|
||||
CI_DEBUG_BUILD: ${{ runner.debug }}
|
||||
CI_MERGE_REQUEST_PROJECT_URL: ${{ github.server_url }}/${{ github.repository }}
|
||||
CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${{ github.base_ref }}
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: |
|
||||
doas apk upgrade -a
|
||||
doas apk add nodejs git patch curl
|
||||
cd /etc/apk/keys
|
||||
doas curl -JO https://ayakael.net/api/packages/forge/alpine/key
|
||||
- name: Repo pull
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 500
|
||||
- name: Package build
|
||||
run: |
|
||||
${{ github.workspace }}/.forgejo/bin/build.sh
|
||||
touch packages/dummy
|
||||
- name: Package upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: package
|
||||
path: packages
|
||||
|
||||
deploy-armv7:
|
||||
needs: [build-armv7]
|
||||
runs-on: armv7
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
CI_ALPINE_REPO: 'https://ayakael.net/api/packages/forge/alpine'
|
||||
CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${{ github.base_ref }}
|
||||
FORGE_REPO_TOKEN: ${{ secrets.FORGE_REPO_TOKEN }}
|
||||
FORGE_REPO_USER: ${{ vars.FORGE_REPO_USER }}
|
||||
steps:
|
||||
- name: Setting up environment
|
||||
run: apk add nodejs curl findutils git gawk
|
||||
- name: Repo pull
|
||||
uses: actions/checkout@v4
|
||||
- name: Package download
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Package deployment
|
||||
run: ${{ github.workspace }}/.forgejo/bin/deploy.sh
|
||||
|
|
@ -33,7 +33,7 @@ jobs:
|
|||
${{ github.workspace }}/.forgejo/bin/generate-cross.sh ${{ github.ref_name }} ${{ inputs.target_arch }}
|
||||
mv -v /home/buildozer/packages/main ${{ github.workspace }}/packages/cross
|
||||
- name: Package upload
|
||||
uses: forgejo/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: package
|
||||
path: packages
|
||||
|
|
@ -54,6 +54,6 @@ jobs:
|
|||
- name: Repo pull
|
||||
uses: actions/checkout@v4
|
||||
- name: Package download
|
||||
uses: forgejo/download-artifact@v3
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Package deployment
|
||||
run: ${{ github.workspace }}/.forgejo/bin/deploy.sh
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ jobs:
|
|||
${{ github.workspace }}/.forgejo/bin/build.sh
|
||||
touch packages/dummy
|
||||
- name: Package upload
|
||||
uses: forgejo/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: package
|
||||
path: packages
|
||||
|
|
@ -49,6 +49,6 @@ jobs:
|
|||
- name: Repo pull
|
||||
uses: actions/checkout@v4
|
||||
- name: Package download
|
||||
uses: forgejo/download-artifact@v3
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Package deployment
|
||||
run: ${{ github.workspace }}/.forgejo/bin/deploy.sh
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ on:
|
|||
jobs:
|
||||
check-backports:
|
||||
name: Check backports repo
|
||||
runs-on: x86_64
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
downstream: https://ayakael.net/api/packages/forge/alpine/v3.22/backports
|
||||
downstream: https://ayakael.net/api/packages/forge/alpine/v3.23/backports
|
||||
ISSUE_TOKEN: ${{ secrets.issue_token }}
|
||||
LABEL_NUMBER: 1
|
||||
ALL_PACKAGES: true
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ on:
|
|||
jobs:
|
||||
check-community-edge:
|
||||
name: Check community(edge) repo
|
||||
runs-on: x86_64
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
|
|
@ -25,17 +25,17 @@ jobs:
|
|||
run: ${{ github.workspace }}/.forgejo/bin/check_ver.sh
|
||||
- name: Create issues
|
||||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
||||
check-community-3.22:
|
||||
name: Check community(3.22) repo
|
||||
runs-on: x86_64
|
||||
check-community-3.23:
|
||||
name: Check community(3.23) repo
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
downstream: https://dl-cdn.alpinelinux.org/alpine/3.22/community
|
||||
downstream: https://dl-cdn.alpinelinux.org/alpine/v3.23/community
|
||||
ISSUE_TOKEN: ${{ secrets.issue_token }}
|
||||
LABEL_NUMBER: 13
|
||||
fix_only: all
|
||||
skip_package: dotnet9-stage0 dotnet8-stage0
|
||||
fix_only: all -git-annex
|
||||
skip_package: dotnet9-stage0 dotnet8-stage0 py3-boto3 py3-botocore dotnet10-stage0
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: apk add grep coreutils gawk curl wget bash nodejs git jq sed
|
||||
|
|
@ -47,3 +47,70 @@ jobs:
|
|||
run: ${{ github.workspace }}/.forgejo/bin/check_ver.sh
|
||||
- name: Create issues
|
||||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
||||
check-community-3.22:
|
||||
name: Check community(3.22) repo
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
downstream: https://dl-cdn.alpinelinux.org/alpine/v3.22/community
|
||||
ISSUE_TOKEN: ${{ secrets.issue_token }}
|
||||
LABEL_NUMBER: 13
|
||||
skip_package: 'all -dotnet8-runtime -dotnet9-runtime'
|
||||
fix_only: all
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: apk add grep coreutils gawk curl wget bash nodejs git jq sed
|
||||
- name: Get scripts
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Check out-of-date packages
|
||||
run: ${{ github.workspace }}/.forgejo/bin/check_ver.sh
|
||||
- name: Create issues
|
||||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
||||
check-community-3.21:
|
||||
name: Check community(3.21) repo
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
downstream: https://dl-cdn.alpinelinux.org/alpine/v3.21/community
|
||||
ISSUE_TOKEN: ${{ secrets.issue_token }}
|
||||
LABEL_NUMBER: 13
|
||||
skip_package: 'all -dotnet8-runtime -dotnet9-runtime'
|
||||
fix_only: all
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: apk add grep coreutils gawk curl wget bash nodejs git jq sed
|
||||
- name: Get scripts
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Check out-of-date packages
|
||||
run: ${{ github.workspace }}/.forgejo/bin/check_ver.sh
|
||||
- name: Create issues
|
||||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
||||
check-community-3.20:
|
||||
name: Check community(3.20) repo
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
downstream: https://dl-cdn.alpinelinux.org/alpine/v3.20/community
|
||||
ISSUE_TOKEN: ${{ secrets.issue_token }}
|
||||
LABEL_NUMBER: 13
|
||||
skip_package: 'all -dotnet8-runtime'
|
||||
fix_only: all
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: apk add grep coreutils gawk curl wget bash nodejs git jq sed
|
||||
- name: Get scripts
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Check out-of-date packages
|
||||
run: ${{ github.workspace }}/.forgejo/bin/check_ver.sh
|
||||
- name: Create issues
|
||||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ on:
|
|||
jobs:
|
||||
check-main-edge:
|
||||
name: Check main(edge) repo
|
||||
runs-on: x86_64
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
|
|
@ -25,9 +25,30 @@ jobs:
|
|||
run: ${{ github.workspace }}/.forgejo/bin/check_ver.sh
|
||||
- name: Create issues
|
||||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
||||
check-main-3.23:
|
||||
name: Check main(3.23) repo
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
downstream: https://dl-cdn.alpinelinux.org/alpine/v3.23/main
|
||||
ISSUE_TOKEN: ${{ secrets.issue_token }}
|
||||
LABEL_NUMBER: 13
|
||||
fix_only: all
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: apk add grep coreutils gawk curl wget bash nodejs git jq sed
|
||||
- name: Get scripts
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Check out-of-date packages
|
||||
run: ${{ github.workspace }}/.forgejo/bin/check_ver.sh
|
||||
- name: Create issues
|
||||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
||||
check-main-3.22:
|
||||
name: Check main(3.22) repo
|
||||
runs-on: x86_64
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
|
|
@ -48,7 +69,7 @@ jobs:
|
|||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
||||
check-main-3.21:
|
||||
name: Check main(3.21) repo
|
||||
runs-on: x86_64
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
|
|
@ -69,7 +90,7 @@ jobs:
|
|||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
||||
check-main-3.20:
|
||||
name: Check main(3.20) repo
|
||||
runs-on: x86_64
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
|
|
@ -88,24 +109,4 @@ jobs:
|
|||
run: ${{ github.workspace }}/.forgejo/bin/check_ver.sh
|
||||
- name: Create issues
|
||||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
||||
check-main-3.19:
|
||||
name: Check main(3.19) repo
|
||||
runs-on: x86_64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
downstream: https://dl-cdn.alpinelinux.org/alpine/v3.19/main
|
||||
ISSUE_TOKEN: ${{ secrets.issue_token }}
|
||||
LABEL_NUMBER: 13
|
||||
fix_only: all
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: apk add grep coreutils gawk curl wget bash nodejs git jq sed
|
||||
- name: Get scripts
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Check out-of-date packages
|
||||
run: ${{ github.workspace }}/.forgejo/bin/check_ver.sh
|
||||
- name: Create issues
|
||||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
||||
|
||||
|
|
|
|||
50
.forgejo/workflows/check-pmos.yml
Normal file
50
.forgejo/workflows/check-pmos.yml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
schedule:
|
||||
- cron: '0 5 * * *'
|
||||
|
||||
jobs:
|
||||
check-pmos-edge:
|
||||
name: Check pmos(edge) repo
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
downstream: http://mirror.postmarketos.org/postmarketos/master
|
||||
ISSUE_TOKEN: ${{ secrets.issue_token }}
|
||||
LABEL_NUMBER: 14
|
||||
skip_package: device-clockworkpi-uconsole-radxa-cm5 device-pine64-pinenote u-boot-radxa-cm5
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: apk add grep coreutils gawk curl wget bash nodejs git jq sed
|
||||
- name: Get scripts
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Check out-of-date packages
|
||||
run: ${{ github.workspace }}/.forgejo/bin/check_ver.sh
|
||||
- name: Create issues
|
||||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
||||
check-pmos-latest:
|
||||
name: Check pmos(v25.12) repo
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
downstream: http://mirror.postmarketos.org/postmarketos/v25.12
|
||||
ISSUE_TOKEN: ${{ secrets.issue_token }}
|
||||
LABEL_NUMBER: 14
|
||||
fix_only: all
|
||||
skip_package: device-clockworkpi-uconsole-radxa-cm5 device-pine64-pinenote u-boot-radxa-cm5
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: apk add grep coreutils gawk curl wget bash nodejs git jq sed
|
||||
- name: Get scripts
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Check out-of-date packages
|
||||
run: ${{ github.workspace }}/.forgejo/bin/check_ver.sh
|
||||
- name: Create issues
|
||||
run: ${{ github.workspace }}/.forgejo/bin/create_issue.sh
|
||||
|
|
@ -5,16 +5,16 @@ on:
|
|||
- cron: '0 5 * * *'
|
||||
|
||||
jobs:
|
||||
check-community:
|
||||
check-testing:
|
||||
name: Check testing repo
|
||||
runs-on: x86_64
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
downstream: https://dl-cdn.alpinelinux.org/alpine/edge/testing
|
||||
ISSUE_TOKEN: ${{ secrets.issue_token }}
|
||||
LABEL_NUMBER: 4
|
||||
skip_package: dotnet6-stage dotnet6-build
|
||||
skip_package: dotnet6-stage0 dotnet6-build
|
||||
steps:
|
||||
- name: Environment setup
|
||||
run: apk add grep coreutils gawk curl wget bash nodejs git jq sed
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ on:
|
|||
jobs:
|
||||
check-user:
|
||||
name: Check user repo
|
||||
runs-on: x86_64
|
||||
runs-on: aarch64
|
||||
container:
|
||||
image: alpine:latest
|
||||
env:
|
||||
|
|
|
|||
13
backports/calibre/0002-calibre-use-make.patch
Normal file
13
backports/calibre/0002-calibre-use-make.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/setup/build.py b/setup/build.py
|
||||
index 956ad7504f..aa9d7ea028 100644
|
||||
--- a/setup/build.py
|
||||
+++ b/setup/build.py
|
||||
@@ -662,7 +662,7 @@ def build_headless(self):
|
||||
f.seek(0), f.truncate()
|
||||
f.write(raw)
|
||||
bdir = os.path.join(bdir, 'build')
|
||||
- cmd = [CMAKE]
|
||||
+ cmd = [CMAKE, '-GUnix Makefiles']
|
||||
if is_macos_universal_build:
|
||||
cmd += ['-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64']
|
||||
if sw and os.path.exists(os.path.join(sw, 'qt')):
|
||||
46
backports/calibre/0003-calibre-disable-piper.patch
Normal file
46
backports/calibre/0003-calibre-disable-piper.patch
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
piper uses a function in espeak-ng that is upstreamed but not in a
|
||||
release.
|
||||
|
||||
diff --git a/setup/extensions.json b/setup/extensions.json
|
||||
index b39ce6d..c105031 100644
|
||||
--- a/setup/extensions.json
|
||||
+++ b/setup/extensions.json
|
||||
@@ -134,14 +134,6 @@
|
||||
"error": "!podofo_error",
|
||||
"needs_c++": "17"
|
||||
},
|
||||
- {
|
||||
- "name": "piper",
|
||||
- "sources": "calibre/utils/tts/piper.cpp",
|
||||
- "needs_c++": "17",
|
||||
- "libraries": "!piper_libs",
|
||||
- "lib_dirs": "!piper_lib_dirs",
|
||||
- "inc_dirs": "!piper_inc_dirs"
|
||||
- },
|
||||
{
|
||||
"name": "html_as_json",
|
||||
"sources": "calibre/srv/html_as_json.cpp",
|
||||
diff --git a/src/calibre/constants.py b/src/calibre/constants.py
|
||||
index fa4b211459..7b27768953 100644
|
||||
--- a/src/calibre/constants.py
|
||||
+++ b/src/calibre/constants.py
|
||||
@@ -258,7 +258,6 @@ def __init__(self):
|
||||
'rcc_backend',
|
||||
'icu',
|
||||
'speedup',
|
||||
- 'piper',
|
||||
'html_as_json',
|
||||
'fast_css_transform',
|
||||
'fast_html_entities',
|
||||
diff --git a/src/calibre/utils/run_tests.py b/src/calibre/utils/run_tests.py
|
||||
index ffd0f95c04..c80a35f83d 100644
|
||||
--- a/src/calibre/utils/run_tests.py
|
||||
+++ b/src/calibre/utils/run_tests.py
|
||||
@@ -192,6 +192,7 @@ def test_import_of_all_python_modules(self):
|
||||
}
|
||||
if 'SKIP_SPEECH_TESTS' in os.environ:
|
||||
exclude_packages.add('calibre.gui2.tts')
|
||||
+ exclude_modules.add('calibre.utils.tts.piper')
|
||||
if not isbsd:
|
||||
exclude_modules.add('calibre.devices.usbms.hal')
|
||||
d = os.path.dirname
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# Maintainer: Cowington Post <cowingtonpost@gmail.com>
|
||||
pkgname=calibre
|
||||
pkgver=8.4.0
|
||||
pkgver=8.14.0
|
||||
pkgrel=0
|
||||
pkgdesc="Ebook management application"
|
||||
# qt6-webengine
|
||||
|
|
@ -47,6 +47,7 @@ depends="
|
|||
makedepends="
|
||||
cmake
|
||||
curl
|
||||
ffmpeg-dev
|
||||
hunspell-dev
|
||||
hyphen-dev
|
||||
libmtp-dev
|
||||
|
|
@ -55,12 +56,12 @@ makedepends="
|
|||
podofo-dev
|
||||
py3-pyqt-builder
|
||||
py3-pyqt6-sip
|
||||
py3-qt6
|
||||
py3-sip
|
||||
python3-dev
|
||||
qt6-qtbase-dev
|
||||
uchardet-dev
|
||||
xdg-utils
|
||||
ffmpeg-dev
|
||||
"
|
||||
subpackages="
|
||||
$pkgname-pyc
|
||||
|
|
@ -70,13 +71,15 @@ subpackages="
|
|||
"
|
||||
source="https://download.calibre-ebook.com/$pkgver/calibre-$pkgver.tar.xz
|
||||
0001-$pkgname-no-update.patch
|
||||
musl-pread.patch
|
||||
0002-$pkgname-use-make.patch
|
||||
0003-$pkgname-disable-piper.patch
|
||||
"
|
||||
# net: downloads iso-codes
|
||||
# !check: no tests ran
|
||||
options="net !check"
|
||||
|
||||
export LANG="en_US.UTF-8"
|
||||
export PATH="$PATH:/usr/lib/qt6/bin"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
|
@ -113,7 +116,8 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
df998fa31b9e581739872a649669fccf29f34d3ac1b4d0a96c37e08a0b049b1357b56a2af25f2733936e78901dd61b38a24e536e107e7094ada7e60a5c2c56ab calibre-8.4.0.tar.xz
|
||||
edb32e47b083e10fbf53088e485737f3b61bb642ce6c4dd444e58a6618979c3b05b77ceffc4b8cb42e35eee7dcc2b94145abc22030ffd8b5de63e45b321fbf72 calibre-8.14.0.tar.xz
|
||||
eb8e7ce40ff8b8daf6e7e55a5dff8ec4dff06c45744266bb48b3194e92ab1196bc91468203e3c2ca1e5144166a7d6be90e6cf0253513e761b56a4c85be4c2c76 0001-calibre-no-update.patch
|
||||
d27d29c434a3d2df1b18125225a4d3762bf6fdba77385b377b18a7f325f29ae0b698974a39263f4f7aed8a368c87d0dc4446f488505b8e38664f8e9ee5b9bd12 musl-pread.patch
|
||||
bbb7253257073ae14840b3b4697943fe129d862b49cabd9388ea24cbd0259e68a1d359870334772164897f0c781db121de55fcdf5bccc841e36c021abe56f1ec 0002-calibre-use-make.patch
|
||||
0efcf35944cd0f42d6f3572839647fc5c8336562db3f71655211d3de682e155b6d6fee4d281f9576201156e0bc828b6a579a8708a27791e4e4d604d456416954 0003-calibre-disable-piper.patch
|
||||
"
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
--- a/src/calibre/utils/speedup.c
|
||||
+++ b/src/calibre/utils/speedup.c
|
||||
@@ -748,7 +748,7 @@
|
||||
break;
|
||||
}
|
||||
#else
|
||||
-#ifdef __linux__
|
||||
+#ifdef __GLIBC__
|
||||
ssize_t nr = pread64(fd, buf + pos, n - pos, offset);
|
||||
#else
|
||||
ssize_t nr = pread(fd, buf + pos, n - pos, offset);
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=caprine
|
||||
pkgver=2.60.3
|
||||
pkgrel=2
|
||||
pkgrel=6
|
||||
pkgdesc="Elegant Facebook Messenger desktop app"
|
||||
arch="x86_64 aarch64" # blocked by electron
|
||||
url="https://github.com/sindresorhus/caprine"
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
# Contributor: Aiden Grossman <agrossman154@yahoo.com>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=coin
|
||||
pkgver=4.0.3
|
||||
pkgrel=0
|
||||
pkgdesc="OpenGL OpenInventor compatible graphics library"
|
||||
url="https://github.com/coin3d/coin"
|
||||
license="BSD-3-Clause"
|
||||
arch="all"
|
||||
makedepends="boost-dev cmake glu-dev graphviz samurai"
|
||||
subpackages="$pkgname-dev"
|
||||
source="https://github.com/coin3d/coin/releases/download/v$pkgver/coin-$pkgver-src.tar.gz
|
||||
TestSuitePatch.patch
|
||||
"
|
||||
builddir="$srcdir/coin"
|
||||
|
||||
build() {
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCOIN_BUILD_TESTS=ON
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
check() {
|
||||
cmake --build build --target test
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" cmake --install build
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
b661bf2124b0de1b46e76a6699b0975abb3aed4dc9019bf32531c535179dc84a90fe4e19def6f6cda7b175470636040d0e58812d532198cf207296d37c539915 coin-4.0.3-src.tar.gz
|
||||
aab464244b13371badf0878e5bfbcce859a42756cf8c7657d1480318aa291d296eac2741219c346bae056f761c5f46857f8fd1ec1c4129f86bc10236d3869deb TestSuitePatch.patch
|
||||
"
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- ./testsuite/TestSuiteUtils.cpp
|
||||
+++ ./testsuite/TestSuiteUtils.cpp
|
||||
@@ -39,7 +39,7 @@
|
||||
#elif defined(_WIN32)
|
||||
#define USE_WIN32
|
||||
#else //_WIN32
|
||||
-#error Unknown system
|
||||
+#define USE_POSIX
|
||||
#endif //POSIX
|
||||
|
||||
#include <Inventor/errors/SoDebugError.h>
|
||||
|
|
@ -1,730 +0,0 @@
|
|||
From c854a92a215d0cf39c704bbadd3611e552073d5f Mon Sep 17 00:00:00 2001
|
||||
From: Collin Baker <collinbaker@chromium.org>
|
||||
Date: Fri, 4 Apr 2025 14:08:18 -0700
|
||||
Subject: [PATCH] Reland "Use #[global_allocator] to provide Rust allocator
|
||||
implementation"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This is a reland of commit cfa3beef52625e03ba6ce2b2ac98e1b89dde5cdb
|
||||
|
||||
Original was reverted due to a cronet gn2bp failure. The script
|
||||
filtered out GN rules in //build/rust/std, but this caused an exception
|
||||
when //build/rust/std:allocator was referenced later.
|
||||
|
||||
Moving the rules to //build/rust/allocator sidesteps the issue.
|
||||
|
||||
Original change's description:
|
||||
> Use #[global_allocator] to provide Rust allocator implementation
|
||||
>
|
||||
> The allocator shim hack we have been using no longer works with
|
||||
> upstream Rust. Replace it with a less-unsupported method: provide a
|
||||
> https://github.com/rust-lang/rust/issues/123015, which still requires
|
||||
> us to provide a few symbol definitions.
|
||||
>
|
||||
> Bug: 408221149, 407024458
|
||||
> Change-Id: If1808ca24b12dc80ead35a25521313a3d2e148d5
|
||||
>
|
||||
> Cq-Include-Trybots: luci.chromium.try:android-rust-arm32-rel,android-rust-arm64-dbg,android-rust-arm64-rel,linux-rust-x64-dbg,linux-rust-x64-rel,mac-rust-x64-dbg,win-rust-x64-dbg,win-rust-x64-rel
|
||||
> Change-Id: If1808ca24b12dc80ead35a25521313a3d2e148d5
|
||||
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6427855
|
||||
> Reviewed-by: Alan Zhao <ayzhao@google.com>
|
||||
> Reviewed-by: Lei Zhang <thestig@chromium.org>
|
||||
> Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
|
||||
> Commit-Queue: Collin Baker <collinbaker@chromium.org>
|
||||
> Auto-Submit: Collin Baker <collinbaker@chromium.org>
|
||||
> Cr-Commit-Position: refs/heads/main@{#1442472}
|
||||
|
||||
Bug: 408221149, 407024458
|
||||
Cq-Include-Trybots: luci.chromium.try:android-rust-arm32-rel,android-rust-arm64-dbg,android-rust-arm64-rel,linux-rust-x64-dbg,linux-rust-x64-rel,mac-rust-x64-dbg,win-rust-x64-dbg,win-rust-x64-rel
|
||||
Change-Id: I36fef217297bfe64ae81519be24b8c653f6fdfa1
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6432410
|
||||
Reviewed-by: Mohannad Farrag <aymanm@google.com>
|
||||
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
|
||||
Auto-Submit: Collin Baker <collinbaker@chromium.org>
|
||||
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1442922}
|
||||
---
|
||||
build/rust/allocator/BUILD.gn | 90 ++++++++++++++++
|
||||
build/rust/{std => allocator}/alias.cc | 4 +-
|
||||
build/rust/{std => allocator}/alias.h | 6 +-
|
||||
.../allocator_impls.cc} | 100 ++++++++----------
|
||||
build/rust/allocator/allocator_impls.h | 25 +++++
|
||||
.../allocator/allocator_shim_definitions.cc | 30 ++++++
|
||||
.../{std => allocator}/compiler_specific.h | 6 +-
|
||||
.../rust/{std => allocator}/immediate_crash.h | 6 +-
|
||||
build/rust/allocator/lib.rs | 48 +++++++++
|
||||
build/rust/cargo_crate.gni | 9 ++
|
||||
build/rust/rust_macro.gni | 3 +
|
||||
build/rust/rust_target.gni | 4 +
|
||||
build/rust/std/BUILD.gn | 41 -------
|
||||
components/cronet/android/dependencies.txt | 1 +
|
||||
third_party/breakpad/BUILD.gn | 10 +-
|
||||
15 files changed, 272 insertions(+), 111 deletions(-)
|
||||
create mode 100644 build/rust/allocator/BUILD.gn
|
||||
rename build/rust/{std => allocator}/alias.cc (87%)
|
||||
rename build/rust/{std => allocator}/alias.h (91%)
|
||||
rename build/rust/{std/remap_alloc.cc => allocator/allocator_impls.cc} (67%)
|
||||
create mode 100644 build/rust/allocator/allocator_impls.h
|
||||
create mode 100644 build/rust/allocator/allocator_shim_definitions.cc
|
||||
rename build/rust/{std => allocator}/compiler_specific.h (87%)
|
||||
rename build/rust/{std => allocator}/immediate_crash.h (97%)
|
||||
create mode 100644 build/rust/allocator/lib.rs
|
||||
|
||||
diff --git a/build/rust/allocator/BUILD.gn b/build/rust/allocator/BUILD.gn
|
||||
new file mode 100644
|
||||
index 0000000000000..06aa47f097c9c
|
||||
--- /dev/null
|
||||
+++ b/build/rust/allocator/BUILD.gn
|
||||
@@ -0,0 +1,90 @@
|
||||
+# Copyright 2025 The Chromium Authors
|
||||
+# Use of this source code is governed by a BSD-style license that can be
|
||||
+# found in the LICENSE file.
|
||||
+
|
||||
+import("//build/buildflag_header.gni")
|
||||
+import("//build/config/rust.gni")
|
||||
+import("//build/rust/rust_static_library.gni")
|
||||
+
|
||||
+rust_allocator_uses_partition_alloc = false
|
||||
+if (build_with_chromium) {
|
||||
+ import("//base/allocator/partition_allocator/partition_alloc.gni")
|
||||
+ rust_allocator_uses_partition_alloc = use_partition_alloc_as_malloc
|
||||
+}
|
||||
+
|
||||
+buildflag_header("buildflags") {
|
||||
+ header = "buildflags.h"
|
||||
+ flags = [
|
||||
+ "RUST_ALLOCATOR_USES_PARTITION_ALLOC=$rust_allocator_uses_partition_alloc",
|
||||
+ ]
|
||||
+ visibility = [ ":*" ]
|
||||
+}
|
||||
+
|
||||
+if (toolchain_has_rust) {
|
||||
+ # All targets which depend on Rust code but are not linked by rustc must
|
||||
+ # depend on this. Usually, this dependency will come from the rust_target() GN
|
||||
+ # template. However, cargo_crate() does *not* include this dependency so any
|
||||
+ # C++ targets which directly depend on a cargo_crate() must depend on this.
|
||||
+ rust_static_library("allocator") {
|
||||
+ sources = [ "lib.rs" ]
|
||||
+ crate_root = "lib.rs"
|
||||
+ cxx_bindings = [ "lib.rs" ]
|
||||
+
|
||||
+ deps = [
|
||||
+ ":allocator_impls",
|
||||
+ ":allocator_shim_definitions",
|
||||
+ ]
|
||||
+
|
||||
+ no_chromium_prelude = true
|
||||
+ no_allocator_crate = true
|
||||
+ allow_unsafe = true
|
||||
+ }
|
||||
+
|
||||
+ static_library("allocator_impls") {
|
||||
+ public_deps = []
|
||||
+ if (rust_allocator_uses_partition_alloc) {
|
||||
+ public_deps += [ "//base/allocator/partition_allocator:partition_alloc" ]
|
||||
+ }
|
||||
+
|
||||
+ sources = [
|
||||
+ "allocator_impls.cc",
|
||||
+ "allocator_impls.h",
|
||||
+ ]
|
||||
+
|
||||
+ deps = [
|
||||
+ ":allocator_cpp_shared",
|
||||
+ ":buildflags",
|
||||
+
|
||||
+ # TODO(crbug.com/408221149): remove the C++ -> Rust dependency for the
|
||||
+ # default allocator.
|
||||
+ "//build/rust/std",
|
||||
+ ]
|
||||
+
|
||||
+ visibility = [ ":*" ]
|
||||
+ }
|
||||
+
|
||||
+ source_set("allocator_shim_definitions") {
|
||||
+ sources = [ "allocator_shim_definitions.cc" ]
|
||||
+
|
||||
+ deps = [ ":allocator_cpp_shared" ]
|
||||
+
|
||||
+ visibility = [ ":*" ]
|
||||
+ }
|
||||
+
|
||||
+ source_set("allocator_cpp_shared") {
|
||||
+ sources = [
|
||||
+ # `alias.*`, `compiler_specific.h`, and `immediate_crash.*` have been
|
||||
+ # copied from `//base`.
|
||||
+ # TODO(crbug.com/40279749): Avoid duplication / reuse code.
|
||||
+ "alias.cc",
|
||||
+ "alias.h",
|
||||
+ "compiler_specific.h",
|
||||
+ "immediate_crash.h",
|
||||
+ ]
|
||||
+
|
||||
+ visibility = [
|
||||
+ ":allocator_impls",
|
||||
+ ":allocator_shim_definitions",
|
||||
+ ]
|
||||
+ }
|
||||
+}
|
||||
diff --git a/build/rust/std/alias.cc b/build/rust/allocator/alias.cc
|
||||
similarity index 87%
|
||||
rename from build/rust/std/alias.cc
|
||||
rename to build/rust/allocator/alias.cc
|
||||
index 42febac3ed1fc..ca20986f8ed49 100644
|
||||
--- a/build/rust/std/alias.cc
|
||||
+++ b/build/rust/allocator/alias.cc
|
||||
@@ -7,9 +7,9 @@
|
||||
//
|
||||
// TODO(crbug.com/40279749): Avoid code duplication / reuse code.
|
||||
|
||||
-#include "build/rust/std/alias.h"
|
||||
+#include "build/rust/allocator/alias.h"
|
||||
|
||||
-#include "build/rust/std/compiler_specific.h"
|
||||
+#include "build/rust/allocator/compiler_specific.h"
|
||||
|
||||
namespace build_rust_std {
|
||||
namespace debug {
|
||||
diff --git a/build/rust/std/alias.h b/build/rust/allocator/alias.h
|
||||
similarity index 91%
|
||||
rename from build/rust/std/alias.h
|
||||
rename to build/rust/allocator/alias.h
|
||||
index 0eaba6766148f..80995ecfb045e 100644
|
||||
--- a/build/rust/std/alias.h
|
||||
+++ b/build/rust/allocator/alias.h
|
||||
@@ -8,8 +8,8 @@
|
||||
//
|
||||
// TODO(crbug.com/40279749): Avoid code duplication / reuse code.
|
||||
|
||||
-#ifndef BUILD_RUST_STD_ALIAS_H_
|
||||
-#define BUILD_RUST_STD_ALIAS_H_
|
||||
+#ifndef BUILD_RUST_ALLOCATOR_ALIAS_H_
|
||||
+#define BUILD_RUST_ALLOCATOR_ALIAS_H_
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
@@ -34,4 +34,4 @@ void Alias(const void* var);
|
||||
const int line_number = __LINE__; \
|
||||
build_rust_std::debug::Alias(&line_number)
|
||||
|
||||
-#endif // BUILD_RUST_STD_ALIAS_H_
|
||||
+#endif // BUILD_RUST_ALLOCATOR_ALIAS_H_
|
||||
diff --git a/build/rust/std/remap_alloc.cc b/build/rust/allocator/allocator_impls.cc
|
||||
similarity index 67%
|
||||
rename from build/rust/std/remap_alloc.cc
|
||||
rename to build/rust/allocator/allocator_impls.cc
|
||||
index a443b11ec513d..1fde98f23cd12 100644
|
||||
--- a/build/rust/std/remap_alloc.cc
|
||||
+++ b/build/rust/allocator/allocator_impls.cc
|
||||
@@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
+#include "build/rust/allocator/allocator_impls.h"
|
||||
+
|
||||
#ifdef UNSAFE_BUFFERS_BUILD
|
||||
// TODO(crbug.com/390223051): Remove C-library calls to fix the errors.
|
||||
#pragma allow_unsafe_libc_calls
|
||||
@@ -11,9 +13,9 @@
|
||||
#include <cstring>
|
||||
|
||||
#include "build/build_config.h"
|
||||
-#include "build/rust/std/alias.h"
|
||||
-#include "build/rust/std/buildflags.h"
|
||||
-#include "build/rust/std/immediate_crash.h"
|
||||
+#include "build/rust/allocator/alias.h"
|
||||
+#include "build/rust/allocator/buildflags.h"
|
||||
+#include "build/rust/allocator/immediate_crash.h"
|
||||
|
||||
#if BUILDFLAG(RUST_ALLOCATOR_USES_PARTITION_ALLOC)
|
||||
#include "partition_alloc/partition_alloc_constants.h" // nogncheck
|
||||
@@ -22,6 +24,11 @@
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
+// NOTE: this documentation is outdated.
|
||||
+//
|
||||
+// TODO(crbug.com/408221149): update this documentation, or replace it with docs
|
||||
+// in the Rust allocator implementation.
|
||||
+//
|
||||
// When linking a final binary, rustc has to pick between either:
|
||||
// * The default Rust allocator
|
||||
// * Any #[global_allocator] defined in *any rlib in its dependency tree*
|
||||
@@ -87,19 +94,6 @@
|
||||
// enabling it breaks Win32 APIs like CreateProcess:
|
||||
// https://issues.chromium.org/u/1/issues/368070343#comment29
|
||||
|
||||
-extern "C" {
|
||||
-
|
||||
-#ifdef COMPONENT_BUILD
|
||||
-#if BUILDFLAG(IS_WIN)
|
||||
-#define REMAP_ALLOC_ATTRIBUTES __declspec(dllexport) __attribute__((weak))
|
||||
-#else
|
||||
-#define REMAP_ALLOC_ATTRIBUTES \
|
||||
- __attribute__((visibility("default"))) __attribute__((weak))
|
||||
-#endif
|
||||
-#else
|
||||
-#define REMAP_ALLOC_ATTRIBUTES __attribute__((weak))
|
||||
-#endif // COMPONENT_BUILD
|
||||
-
|
||||
#if !BUILDFLAG(RUST_ALLOCATOR_USES_PARTITION_ALLOC) && BUILDFLAG(IS_WIN) && \
|
||||
defined(ADDRESS_SANITIZER)
|
||||
#define USE_WIN_ALIGNED_MALLOC 1
|
||||
@@ -107,17 +101,19 @@ extern "C" {
|
||||
#define USE_WIN_ALIGNED_MALLOC 0
|
||||
#endif
|
||||
|
||||
-// This must exist as the stdlib depends on it to prove that we know the
|
||||
-// alloc shims below are unstable. In the future we may be required to replace
|
||||
-// them with a #[global_allocator] crate (see file comment above for more).
|
||||
-//
|
||||
-// Marked as weak as when Rust drives linking it includes this symbol itself,
|
||||
-// and we don't want a collision due to C++ being in the same link target, where
|
||||
-// C++ causes us to explicitly link in the stdlib and this symbol here.
|
||||
-[[maybe_unused]]
|
||||
-__attribute__((weak)) unsigned char __rust_no_alloc_shim_is_unstable;
|
||||
+// The default allocator functions provided by the Rust standard library.
|
||||
+extern "C" void* __rdl_alloc(size_t size, size_t align);
|
||||
+extern "C" void __rdl_dealloc(void* p, size_t size, size_t align);
|
||||
+extern "C" void* __rdl_realloc(void* p,
|
||||
+ size_t old_size,
|
||||
+ size_t align,
|
||||
+ size_t new_size);
|
||||
+
|
||||
+extern "C" void* __rdl_alloc_zeroed(size_t size, size_t align);
|
||||
+
|
||||
+namespace rust_allocator_internal {
|
||||
|
||||
-REMAP_ALLOC_ATTRIBUTES void* __rust_alloc(size_t size, size_t align) {
|
||||
+unsigned char* alloc(size_t size, size_t align) {
|
||||
#if BUILDFLAG(RUST_ALLOCATOR_USES_PARTITION_ALLOC)
|
||||
// PartitionAlloc will crash if given an alignment larger than this.
|
||||
if (align > partition_alloc::internal::kMaxSupportedAlignment) {
|
||||
@@ -125,19 +121,19 @@ REMAP_ALLOC_ATTRIBUTES void* __rust_alloc(size_t size, size_t align) {
|
||||
}
|
||||
|
||||
if (align <= alignof(std::max_align_t)) {
|
||||
- return allocator_shim::UncheckedAlloc(size);
|
||||
+ return static_cast<unsigned char*>(allocator_shim::UncheckedAlloc(size));
|
||||
} else {
|
||||
- return allocator_shim::UncheckedAlignedAlloc(size, align);
|
||||
+ return static_cast<unsigned char*>(
|
||||
+ allocator_shim::UncheckedAlignedAlloc(size, align));
|
||||
}
|
||||
#elif USE_WIN_ALIGNED_MALLOC
|
||||
- return _aligned_malloc(size, align);
|
||||
+ return static_cast<unsigned char*>(_aligned_malloc(size, align));
|
||||
#else
|
||||
- extern void* __rdl_alloc(size_t size, size_t align);
|
||||
- return __rdl_alloc(size, align);
|
||||
+ return static_cast<unsigned char*>(__rdl_alloc(size, align));
|
||||
#endif
|
||||
}
|
||||
|
||||
-REMAP_ALLOC_ATTRIBUTES void __rust_dealloc(void* p, size_t size, size_t align) {
|
||||
+void dealloc(unsigned char* p, size_t size, size_t align) {
|
||||
#if BUILDFLAG(RUST_ALLOCATOR_USES_PARTITION_ALLOC)
|
||||
if (align <= alignof(std::max_align_t)) {
|
||||
allocator_shim::UncheckedFree(p);
|
||||
@@ -147,54 +143,44 @@ REMAP_ALLOC_ATTRIBUTES void __rust_dealloc(void* p, size_t size, size_t align) {
|
||||
#elif USE_WIN_ALIGNED_MALLOC
|
||||
return _aligned_free(p);
|
||||
#else
|
||||
- extern void __rdl_dealloc(void* p, size_t size, size_t align);
|
||||
__rdl_dealloc(p, size, align);
|
||||
#endif
|
||||
}
|
||||
|
||||
-REMAP_ALLOC_ATTRIBUTES void* __rust_realloc(void* p,
|
||||
- size_t old_size,
|
||||
- size_t align,
|
||||
- size_t new_size) {
|
||||
+unsigned char* realloc(unsigned char* p,
|
||||
+ size_t old_size,
|
||||
+ size_t align,
|
||||
+ size_t new_size) {
|
||||
#if BUILDFLAG(RUST_ALLOCATOR_USES_PARTITION_ALLOC)
|
||||
if (align <= alignof(std::max_align_t)) {
|
||||
- return allocator_shim::UncheckedRealloc(p, new_size);
|
||||
+ return static_cast<unsigned char*>(
|
||||
+ allocator_shim::UncheckedRealloc(p, new_size));
|
||||
} else {
|
||||
- return allocator_shim::UncheckedAlignedRealloc(p, new_size, align);
|
||||
+ return static_cast<unsigned char*>(
|
||||
+ allocator_shim::UncheckedAlignedRealloc(p, new_size, align));
|
||||
}
|
||||
#elif USE_WIN_ALIGNED_MALLOC
|
||||
- return _aligned_realloc(p, new_size, align);
|
||||
+ return static_cast<unsigned char*>(_aligned_realloc(p, new_size, align));
|
||||
#else
|
||||
- extern void* __rdl_realloc(void* p, size_t old_size, size_t align,
|
||||
- size_t new_size);
|
||||
- return __rdl_realloc(p, old_size, align, new_size);
|
||||
+ return static_cast<unsigned char*>(
|
||||
+ __rdl_realloc(p, old_size, align, new_size));
|
||||
#endif
|
||||
}
|
||||
|
||||
-REMAP_ALLOC_ATTRIBUTES void* __rust_alloc_zeroed(size_t size, size_t align) {
|
||||
+unsigned char* alloc_zeroed(size_t size, size_t align) {
|
||||
#if BUILDFLAG(RUST_ALLOCATOR_USES_PARTITION_ALLOC) || USE_WIN_ALIGNED_MALLOC
|
||||
// TODO(danakj): When RUST_ALLOCATOR_USES_PARTITION_ALLOC is true, it's
|
||||
// possible that a partition_alloc::UncheckedAllocZeroed() call would perform
|
||||
// better than partition_alloc::UncheckedAlloc() + memset. But there is no
|
||||
// such API today. See b/342251590.
|
||||
- void* p = __rust_alloc(size, align);
|
||||
+ unsigned char* p = alloc(size, align);
|
||||
if (p) {
|
||||
memset(p, 0, size);
|
||||
}
|
||||
return p;
|
||||
#else
|
||||
- extern void* __rdl_alloc_zeroed(size_t size, size_t align);
|
||||
- return __rdl_alloc_zeroed(size, align);
|
||||
+ return static_cast<unsigned char*>(__rdl_alloc_zeroed(size, align));
|
||||
#endif
|
||||
}
|
||||
|
||||
-REMAP_ALLOC_ATTRIBUTES void __rust_alloc_error_handler(size_t size,
|
||||
- size_t align) {
|
||||
- NO_CODE_FOLDING();
|
||||
- IMMEDIATE_CRASH();
|
||||
-}
|
||||
-
|
||||
-REMAP_ALLOC_ATTRIBUTES extern const unsigned char
|
||||
- __rust_alloc_error_handler_should_panic = 0;
|
||||
-
|
||||
-} // extern "C"
|
||||
+} // namespace rust_allocator_internal
|
||||
diff --git a/build/rust/allocator/allocator_impls.h b/build/rust/allocator/allocator_impls.h
|
||||
new file mode 100644
|
||||
index 0000000000000..afb335412faf9
|
||||
--- /dev/null
|
||||
+++ b/build/rust/allocator/allocator_impls.h
|
||||
@@ -0,0 +1,25 @@
|
||||
+// Copyright 2025 The Chromium Authors
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+#ifndef BUILD_RUST_ALLOCATOR_ALLOCATOR_IMPLS_H_
|
||||
+#define BUILD_RUST_ALLOCATOR_ALLOCATOR_IMPLS_H_
|
||||
+
|
||||
+#include <cstddef>
|
||||
+
|
||||
+#include "build/build_config.h"
|
||||
+#include "build/rust/allocator/buildflags.h"
|
||||
+
|
||||
+namespace rust_allocator_internal {
|
||||
+
|
||||
+unsigned char* alloc(size_t size, size_t align);
|
||||
+void dealloc(unsigned char* p, size_t size, size_t align);
|
||||
+unsigned char* realloc(unsigned char* p,
|
||||
+ size_t old_size,
|
||||
+ size_t align,
|
||||
+ size_t new_size);
|
||||
+unsigned char* alloc_zeroed(size_t size, size_t align);
|
||||
+
|
||||
+} // namespace rust_allocator_internal
|
||||
+
|
||||
+#endif // BUILD_RUST_ALLOCATOR_ALLOCATOR_IMPLS_H_
|
||||
diff --git a/build/rust/allocator/allocator_shim_definitions.cc b/build/rust/allocator/allocator_shim_definitions.cc
|
||||
new file mode 100644
|
||||
index 0000000000000..a4d1bd77b7016
|
||||
--- /dev/null
|
||||
+++ b/build/rust/allocator/allocator_shim_definitions.cc
|
||||
@@ -0,0 +1,30 @@
|
||||
+// Copyright 2025 The Chromium Authors
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+#include <cstddef>
|
||||
+
|
||||
+#include "build/rust/allocator/alias.h"
|
||||
+#include "build/rust/allocator/immediate_crash.h"
|
||||
+
|
||||
+extern "C" {
|
||||
+
|
||||
+// As part of rustc's contract for using `#[global_allocator]` without
|
||||
+// rustc-generated shims we must define this symbol, since we are opting in to
|
||||
+// unstable functionality. See https://github.com/rust-lang/rust/issues/123015
|
||||
+//
|
||||
+// Mark it weak since rustc will generate it when it drives linking.
|
||||
+[[maybe_unused]]
|
||||
+__attribute__((weak)) unsigned char __rust_no_alloc_shim_is_unstable;
|
||||
+
|
||||
+__attribute__((weak)) void __rust_alloc_error_handler(size_t size,
|
||||
+ size_t align) {
|
||||
+ NO_CODE_FOLDING();
|
||||
+ IMMEDIATE_CRASH();
|
||||
+}
|
||||
+
|
||||
+__attribute__((
|
||||
+ weak)) extern const unsigned char __rust_alloc_error_handler_should_panic =
|
||||
+ 0;
|
||||
+
|
||||
+} // extern "C"
|
||||
diff --git a/build/rust/std/compiler_specific.h b/build/rust/allocator/compiler_specific.h
|
||||
similarity index 87%
|
||||
rename from build/rust/std/compiler_specific.h
|
||||
rename to build/rust/allocator/compiler_specific.h
|
||||
index ea79a7a8dc284..f9079679a3e9a 100644
|
||||
--- a/build/rust/std/compiler_specific.h
|
||||
+++ b/build/rust/allocator/compiler_specific.h
|
||||
@@ -7,8 +7,8 @@
|
||||
//
|
||||
// TODO(crbug.com/40279749): Avoid code duplication / reuse code.
|
||||
|
||||
-#ifndef BUILD_RUST_STD_COMPILER_SPECIFIC_H_
|
||||
-#define BUILD_RUST_STD_COMPILER_SPECIFIC_H_
|
||||
+#ifndef BUILD_RUST_ALLOCATOR_COMPILER_SPECIFIC_H_
|
||||
+#define BUILD_RUST_ALLOCATOR_COMPILER_SPECIFIC_H_
|
||||
|
||||
#include "build/build_config.h"
|
||||
|
||||
@@ -35,4 +35,4 @@
|
||||
#define NOINLINE
|
||||
#endif
|
||||
|
||||
-#endif // BUILD_RUST_STD_COMPILER_SPECIFIC_H_
|
||||
+#endif // BUILD_RUST_ALLOCATOR_COMPILER_SPECIFIC_H_
|
||||
diff --git a/build/rust/std/immediate_crash.h b/build/rust/allocator/immediate_crash.h
|
||||
similarity index 97%
|
||||
rename from build/rust/std/immediate_crash.h
|
||||
rename to build/rust/allocator/immediate_crash.h
|
||||
index e4fd5a09d9379..9cbf9fd65f3e0 100644
|
||||
--- a/build/rust/std/immediate_crash.h
|
||||
+++ b/build/rust/allocator/immediate_crash.h
|
||||
@@ -5,8 +5,8 @@
|
||||
// This file has been copied from //base/immediate_crash.h.
|
||||
// TODO(crbug.com/40279749): Avoid code duplication / reuse code.
|
||||
|
||||
-#ifndef BUILD_RUST_STD_IMMEDIATE_CRASH_H_
|
||||
-#define BUILD_RUST_STD_IMMEDIATE_CRASH_H_
|
||||
+#ifndef BUILD_RUST_ALLOCATOR_IMMEDIATE_CRASH_H_
|
||||
+#define BUILD_RUST_ALLOCATOR_IMMEDIATE_CRASH_H_
|
||||
|
||||
#include "build/build_config.h"
|
||||
|
||||
@@ -168,4 +168,4 @@
|
||||
|
||||
#endif // defined(__clang__) || defined(COMPILER_GCC)
|
||||
|
||||
-#endif // BUILD_RUST_STD_IMMEDIATE_CRASH_H_
|
||||
+#endif // BUILD_RUST_ALLOCATOR_IMMEDIATE_CRASH_H_
|
||||
diff --git a/build/rust/allocator/lib.rs b/build/rust/allocator/lib.rs
|
||||
new file mode 100644
|
||||
index 0000000000000..7f4a0fc245694
|
||||
--- /dev/null
|
||||
+++ b/build/rust/allocator/lib.rs
|
||||
@@ -0,0 +1,48 @@
|
||||
+// Copyright 2025 The Chromium Authors
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+//! Define the allocator that Rust code in Chrome should use.
|
||||
+//!
|
||||
+//! Any final artifact that depends on this crate, even transitively, will use
|
||||
+//! the allocator defined here. Currently this is a thin wrapper around
|
||||
+//! allocator_impls.cc's functions; see the documentation there.
|
||||
+
|
||||
+use std::alloc::{GlobalAlloc, Layout};
|
||||
+
|
||||
+struct Allocator;
|
||||
+
|
||||
+unsafe impl GlobalAlloc for Allocator {
|
||||
+ unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
|
||||
+ unsafe { ffi::alloc(layout.size(), layout.align()) }
|
||||
+ }
|
||||
+
|
||||
+ unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
|
||||
+ unsafe {
|
||||
+ ffi::dealloc(ptr, layout.size(), layout.align());
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 {
|
||||
+ unsafe { ffi::alloc_zeroed(layout.size(), layout.align()) }
|
||||
+ }
|
||||
+
|
||||
+ unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 {
|
||||
+ unsafe { ffi::realloc(ptr, layout.size(), layout.align(), new_size) }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#[global_allocator]
|
||||
+static GLOBAL: Allocator = Allocator;
|
||||
+
|
||||
+#[cxx::bridge(namespace = "rust_allocator_internal")]
|
||||
+mod ffi {
|
||||
+ extern "C++" {
|
||||
+ include!("build/rust/allocator/allocator_impls.h");
|
||||
+
|
||||
+ unsafe fn alloc(size: usize, align: usize) -> *mut u8;
|
||||
+ unsafe fn dealloc(p: *mut u8, size: usize, align: usize);
|
||||
+ unsafe fn realloc(p: *mut u8, old_size: usize, align: usize, new_size: usize) -> *mut u8;
|
||||
+ unsafe fn alloc_zeroed(size: usize, align: usize) -> *mut u8;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/build/rust/cargo_crate.gni b/build/rust/cargo_crate.gni
|
||||
index 6d11c538bf4d5..d9912722b4ecd 100644
|
||||
--- a/build/rust/cargo_crate.gni
|
||||
+++ b/build/rust/cargo_crate.gni
|
||||
@@ -259,6 +259,12 @@ template("cargo_crate") {
|
||||
# Don't import the `chromium` crate into third-party code.
|
||||
no_chromium_prelude = true
|
||||
|
||||
+ # Don't depend on the chrome-specific #[global_allocator] crate from
|
||||
+ # third-party code. This avoids some dependency cycle issues. The allocator
|
||||
+ # crate will still be used if it exists anywhere in the dependency graph for
|
||||
+ # a given linked artifact.
|
||||
+ no_allocator_crate = true
|
||||
+
|
||||
rustc_metadata = _rustc_metadata
|
||||
|
||||
# TODO(crbug.com/40259764): don't default to true. This requires changes to
|
||||
@@ -483,6 +489,9 @@ template("cargo_crate") {
|
||||
# Don't import the `chromium` crate into third-party code.
|
||||
no_chromium_prelude = true
|
||||
|
||||
+ # Build scripts do not need to link to chrome's allocator.
|
||||
+ no_allocator_crate = true
|
||||
+
|
||||
# The ${_build_script_name}_output target looks for the exe in this
|
||||
# location. Due to how the Windows component build works, this has to
|
||||
# be $root_out_dir for all EXEs. In component build, C++ links to the
|
||||
diff --git a/build/rust/rust_macro.gni b/build/rust/rust_macro.gni
|
||||
index bcbb30ed44111..41d857632ccdc 100644
|
||||
--- a/build/rust/rust_macro.gni
|
||||
+++ b/build/rust/rust_macro.gni
|
||||
@@ -16,6 +16,9 @@ template("rust_macro") {
|
||||
forward_variables_from(invoker, TESTONLY_AND_VISIBILITY)
|
||||
proc_macro_configs = invoker.configs
|
||||
target_type = "rust_proc_macro"
|
||||
+
|
||||
+ # Macros are loaded by rustc and shouldn't use chrome's allocation routines.
|
||||
+ no_allocator_crate = true
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/build/rust/rust_target.gni b/build/rust/rust_target.gni
|
||||
index 1a2f96337d436..1003a7b678352 100644
|
||||
--- a/build/rust/rust_target.gni
|
||||
+++ b/build/rust/rust_target.gni
|
||||
@@ -339,6 +339,10 @@ template("rust_target") {
|
||||
_rust_deps += [ "//build/rust/std" ]
|
||||
}
|
||||
|
||||
+ if (!defined(invoker.no_allocator_crate) || !invoker.no_allocator_crate) {
|
||||
+ _rust_deps += [ "//build/rust/allocator" ]
|
||||
+ }
|
||||
+
|
||||
if (_build_unit_tests) {
|
||||
_unit_test_target = "${_target_name}_unittests"
|
||||
if (defined(invoker.unit_test_target)) {
|
||||
diff --git a/build/rust/std/BUILD.gn b/build/rust/std/BUILD.gn
|
||||
index 6b996aa1fe386..25db126076b2f 100644
|
||||
--- a/build/rust/std/BUILD.gn
|
||||
+++ b/build/rust/std/BUILD.gn
|
||||
@@ -15,51 +15,12 @@
|
||||
# allocator functions to PartitionAlloc when `use_partition_alloc_as_malloc` is
|
||||
# true, so that Rust and C++ use the same allocator backend.
|
||||
|
||||
-import("//build/buildflag_header.gni")
|
||||
import("//build/config/compiler/compiler.gni")
|
||||
import("//build/config/coverage/coverage.gni")
|
||||
import("//build/config/rust.gni")
|
||||
import("//build/config/sanitizers/sanitizers.gni")
|
||||
|
||||
-rust_allocator_uses_partition_alloc = false
|
||||
-if (build_with_chromium) {
|
||||
- import("//base/allocator/partition_allocator/partition_alloc.gni")
|
||||
- rust_allocator_uses_partition_alloc = use_partition_alloc_as_malloc
|
||||
-}
|
||||
-
|
||||
-buildflag_header("buildflags") {
|
||||
- header = "buildflags.h"
|
||||
- flags = [
|
||||
- "RUST_ALLOCATOR_USES_PARTITION_ALLOC=$rust_allocator_uses_partition_alloc",
|
||||
- ]
|
||||
- visibility = [ ":*" ]
|
||||
-}
|
||||
-
|
||||
if (toolchain_has_rust) {
|
||||
- # If clang performs the link step, we need to provide the allocator symbols
|
||||
- # that are normally injected by rustc during linking.
|
||||
- #
|
||||
- # We also "happen to" use this to redirect allocations to PartitionAlloc,
|
||||
- # though that would be better done through a #[global_allocator] crate (see
|
||||
- # above).
|
||||
- source_set("remap_alloc") {
|
||||
- public_deps = []
|
||||
- if (rust_allocator_uses_partition_alloc) {
|
||||
- public_deps += [ "//base/allocator/partition_allocator:partition_alloc" ]
|
||||
- }
|
||||
- deps = [ ":buildflags" ]
|
||||
- sources = [
|
||||
- # `alias.*`, `compiler_specific.h`, and `immediate_crash.*` have been
|
||||
- # copied from `//base`.
|
||||
- # TODO(crbug.com/40279749): Avoid duplication / reuse code.
|
||||
- "alias.cc",
|
||||
- "alias.h",
|
||||
- "compiler_specific.h",
|
||||
- "immediate_crash.h",
|
||||
- "remap_alloc.cc",
|
||||
- ]
|
||||
- }
|
||||
-
|
||||
# List of Rust stdlib rlibs which are present in the official Rust toolchain
|
||||
# we are using from the Android team. This is usually a version or two behind
|
||||
# nightly. Generally this matches the toolchain we build ourselves, but if
|
||||
@@ -269,8 +230,6 @@ if (toolchain_has_rust) {
|
||||
foreach(libname, stdlib_files + skip_stdlib_files) {
|
||||
deps += [ "rules:$libname" ]
|
||||
}
|
||||
-
|
||||
- public_deps = [ ":remap_alloc" ]
|
||||
}
|
||||
} else {
|
||||
action("find_stdlib") {
|
||||
diff --git a/components/cronet/android/dependencies.txt b/components/cronet/android/dependencies.txt
|
||||
index bf56bc45ed41f..c0e41ef7c6766 100644
|
||||
--- a/components/cronet/android/dependencies.txt
|
||||
+++ b/components/cronet/android/dependencies.txt
|
||||
@@ -14,6 +14,7 @@
|
||||
//build/config
|
||||
//build/config/compiler
|
||||
//build/rust
|
||||
+//build/rust/allocator
|
||||
//build/rust/chromium_prelude
|
||||
//build/rust/std
|
||||
//build/rust/std/rules
|
||||
diff --git a/third_party/breakpad/BUILD.gn b/third_party/breakpad/BUILD.gn
|
||||
index 007fdff16e92e..00da4fa484998 100644
|
||||
--- a/third_party/breakpad/BUILD.gn
|
||||
+++ b/third_party/breakpad/BUILD.gn
|
||||
@@ -495,7 +495,10 @@ if (is_mac) {
|
||||
defines = [ "HAVE_MACH_O_NLIST_H" ]
|
||||
|
||||
# Rust demangle support.
|
||||
- deps = [ "//third_party/rust/rustc_demangle_capi/v0_1:lib" ]
|
||||
+ deps = [
|
||||
+ "//build/rust/allocator",
|
||||
+ "//third_party/rust/rustc_demangle_capi/v0_1:lib",
|
||||
+ ]
|
||||
defines += [ "HAVE_RUSTC_DEMANGLE" ]
|
||||
include_dirs += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-0.1.0/include" ]
|
||||
sources += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-0.1.0/include/rustc_demangle.h" ]
|
||||
@@ -743,7 +746,10 @@ if (is_linux || is_chromeos || is_android) {
|
||||
include_dirs = [ "breakpad/src" ]
|
||||
|
||||
# Rust demangle support.
|
||||
- deps = [ "//third_party/rust/rustc_demangle_capi/v0_1:lib" ]
|
||||
+ deps = [
|
||||
+ "//build/rust/allocator",
|
||||
+ "//third_party/rust/rustc_demangle_capi/v0_1:lib",
|
||||
+ ]
|
||||
defines += [ "HAVE_RUSTC_DEMANGLE" ]
|
||||
include_dirs += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-0.1.0/include" ]
|
||||
sources += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-0.1.0/include/rustc_demangle.h" ]
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
From adbc495726382c023b755c35aea36c6e9cad1950 Mon Sep 17 00:00:00 2001
|
||||
From: LN Liberda <lauren@selfisekai.rocks>
|
||||
Date: Sat, 23 Aug 2025 03:11:09 +0200
|
||||
Subject: [PATCH] hotfix: ignore a new warning in rust 1.89
|
||||
|
||||
---
|
||||
third_party/rust/chromium_crates_io/vendor/qr_code-v2/src/lib.rs | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/third_party/rust/chromium_crates_io/vendor/qr_code-v2/src/lib.rs b/third_party/rust/chromium_crates_io/vendor/qr_code-v2/src/lib.rs
|
||||
index 1b729621c2f47..55d392c6da72f 100644
|
||||
--- a/third_party/rust/chromium_crates_io/vendor/qr_code-v2/src/lib.rs
|
||||
+++ b/third_party/rust/chromium_crates_io/vendor/qr_code-v2/src/lib.rs
|
||||
@@ -5,7 +5,6 @@
|
||||
//!
|
||||
|
||||
#![deny(missing_docs)]
|
||||
-#![deny(warnings)]
|
||||
#![allow(
|
||||
clippy::must_use_candidate, // This is just annoying.
|
||||
clippy::use_self, // Rust 1.33 doesn't support Self::EnumVariant, let's try again in 1.37.
|
||||
|
|
@ -1,319 +0,0 @@
|
|||
From 5032162442c5f2f3093cd7646f3a06f826d7f7a8 Mon Sep 17 00:00:00 2001
|
||||
From: Collin Baker <collinbaker@chromium.org>
|
||||
Date: Mon, 7 Apr 2025 12:48:17 -0700
|
||||
Subject: [PATCH] Call Rust default allocator directly from Rust
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The Chromium `#[global_allocator] crate forwarded calls to the C++
|
||||
implementation, which in turn called into the Rust standard library
|
||||
implementations in some build configurations.
|
||||
|
||||
This Rust -> C++ -> Rust round trip is unnecessary, and the references
|
||||
to these symbols is blocking a toolchain update: upstream, these
|
||||
symbol names are now mangled.
|
||||
|
||||
Instead, use Rust conditional compilation to choose between the
|
||||
Chromium and the libstd-provided allocators.
|
||||
|
||||
Additionally, the remaining internal symbols defined in C++ are moved
|
||||
to Rust.
|
||||
|
||||
Bug: 408221149, 407024458
|
||||
Change-Id: I78f8c90d51a36a73099aa7d333091d7b8aded3c0
|
||||
|
||||
Cq-Include-Trybots: luci.chromium.try:android-rust-arm32-rel,android-rust-arm64-dbg,android-rust-arm64-rel,linux-rust-x64-dbg,linux-rust-x64-rel,mac-rust-x64-dbg,win-rust-x64-dbg,win-rust-x64-rel
|
||||
Change-Id: I78f8c90d51a36a73099aa7d333091d7b8aded3c0
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6434355
|
||||
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
|
||||
Commit-Queue: Collin Baker <collinbaker@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1443703}
|
||||
---
|
||||
build/rust/allocator/BUILD.gn | 54 +++++++------------
|
||||
build/rust/allocator/allocator_impls.cc | 28 +++++-----
|
||||
build/rust/allocator/allocator_impls.h | 2 +
|
||||
.../allocator/allocator_shim_definitions.cc | 30 -----------
|
||||
build/rust/allocator/lib.rs | 38 +++++++++++++
|
||||
5 files changed, 73 insertions(+), 79 deletions(-)
|
||||
delete mode 100644 build/rust/allocator/allocator_shim_definitions.cc
|
||||
|
||||
diff --git a/build/rust/allocator/BUILD.gn b/build/rust/allocator/BUILD.gn
|
||||
index 06aa47f097c9c..f09314afc8158 100644
|
||||
--- a/build/rust/allocator/BUILD.gn
|
||||
+++ b/build/rust/allocator/BUILD.gn
|
||||
@@ -12,6 +12,9 @@ if (build_with_chromium) {
|
||||
rust_allocator_uses_partition_alloc = use_partition_alloc_as_malloc
|
||||
}
|
||||
|
||||
+use_cpp_allocator_impls =
|
||||
+ rust_allocator_uses_partition_alloc || (is_win && is_asan)
|
||||
+
|
||||
buildflag_header("buildflags") {
|
||||
header = "buildflags.h"
|
||||
flags = [
|
||||
@@ -30,61 +33,44 @@ if (toolchain_has_rust) {
|
||||
crate_root = "lib.rs"
|
||||
cxx_bindings = [ "lib.rs" ]
|
||||
|
||||
- deps = [
|
||||
- ":allocator_impls",
|
||||
- ":allocator_shim_definitions",
|
||||
- ]
|
||||
+ deps = [ ":allocator_impls" ]
|
||||
|
||||
no_chromium_prelude = true
|
||||
no_allocator_crate = true
|
||||
allow_unsafe = true
|
||||
+
|
||||
+ if (use_cpp_allocator_impls) {
|
||||
+ rustflags = [
|
||||
+ "--cfg",
|
||||
+ "use_cpp_allocator_impls",
|
||||
+ ]
|
||||
+ }
|
||||
+
|
||||
+ configs -= [ "//build/config/compiler:disallow_unstable_features" ]
|
||||
}
|
||||
|
||||
+ # TODO(crbug.com/408221149): don't build this when `use_cpp_allocator_impls`
|
||||
+ # is false.
|
||||
static_library("allocator_impls") {
|
||||
public_deps = []
|
||||
if (rust_allocator_uses_partition_alloc) {
|
||||
public_deps += [ "//base/allocator/partition_allocator:partition_alloc" ]
|
||||
}
|
||||
|
||||
- sources = [
|
||||
- "allocator_impls.cc",
|
||||
- "allocator_impls.h",
|
||||
- ]
|
||||
-
|
||||
- deps = [
|
||||
- ":allocator_cpp_shared",
|
||||
- ":buildflags",
|
||||
-
|
||||
- # TODO(crbug.com/408221149): remove the C++ -> Rust dependency for the
|
||||
- # default allocator.
|
||||
- "//build/rust/std",
|
||||
- ]
|
||||
-
|
||||
- visibility = [ ":*" ]
|
||||
- }
|
||||
-
|
||||
- source_set("allocator_shim_definitions") {
|
||||
- sources = [ "allocator_shim_definitions.cc" ]
|
||||
-
|
||||
- deps = [ ":allocator_cpp_shared" ]
|
||||
-
|
||||
- visibility = [ ":*" ]
|
||||
- }
|
||||
-
|
||||
- source_set("allocator_cpp_shared") {
|
||||
sources = [
|
||||
# `alias.*`, `compiler_specific.h`, and `immediate_crash.*` have been
|
||||
# copied from `//base`.
|
||||
# TODO(crbug.com/40279749): Avoid duplication / reuse code.
|
||||
"alias.cc",
|
||||
"alias.h",
|
||||
+ "allocator_impls.cc",
|
||||
+ "allocator_impls.h",
|
||||
"compiler_specific.h",
|
||||
"immediate_crash.h",
|
||||
]
|
||||
|
||||
- visibility = [
|
||||
- ":allocator_impls",
|
||||
- ":allocator_shim_definitions",
|
||||
- ]
|
||||
+ deps = [ ":buildflags" ]
|
||||
+
|
||||
+ visibility = [ ":*" ]
|
||||
}
|
||||
}
|
||||
diff --git a/build/rust/allocator/allocator_impls.cc b/build/rust/allocator/allocator_impls.cc
|
||||
index 1fde98f23cd12..bf3c2a301adf5 100644
|
||||
--- a/build/rust/allocator/allocator_impls.cc
|
||||
+++ b/build/rust/allocator/allocator_impls.cc
|
||||
@@ -101,16 +101,6 @@
|
||||
#define USE_WIN_ALIGNED_MALLOC 0
|
||||
#endif
|
||||
|
||||
-// The default allocator functions provided by the Rust standard library.
|
||||
-extern "C" void* __rdl_alloc(size_t size, size_t align);
|
||||
-extern "C" void __rdl_dealloc(void* p, size_t size, size_t align);
|
||||
-extern "C" void* __rdl_realloc(void* p,
|
||||
- size_t old_size,
|
||||
- size_t align,
|
||||
- size_t new_size);
|
||||
-
|
||||
-extern "C" void* __rdl_alloc_zeroed(size_t size, size_t align);
|
||||
-
|
||||
namespace rust_allocator_internal {
|
||||
|
||||
unsigned char* alloc(size_t size, size_t align) {
|
||||
@@ -129,7 +119,8 @@ unsigned char* alloc(size_t size, size_t align) {
|
||||
#elif USE_WIN_ALIGNED_MALLOC
|
||||
return static_cast<unsigned char*>(_aligned_malloc(size, align));
|
||||
#else
|
||||
- return static_cast<unsigned char*>(__rdl_alloc(size, align));
|
||||
+ // TODO(crbug.com/408221149): don't build this file in this case.
|
||||
+ IMMEDIATE_CRASH();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -143,7 +134,8 @@ void dealloc(unsigned char* p, size_t size, size_t align) {
|
||||
#elif USE_WIN_ALIGNED_MALLOC
|
||||
return _aligned_free(p);
|
||||
#else
|
||||
- __rdl_dealloc(p, size, align);
|
||||
+ // TODO(crbug.com/408221149): don't build this file in this case.
|
||||
+ IMMEDIATE_CRASH();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -162,8 +154,8 @@ unsigned char* realloc(unsigned char* p,
|
||||
#elif USE_WIN_ALIGNED_MALLOC
|
||||
return static_cast<unsigned char*>(_aligned_realloc(p, new_size, align));
|
||||
#else
|
||||
- return static_cast<unsigned char*>(
|
||||
- __rdl_realloc(p, old_size, align, new_size));
|
||||
+ // TODO(crbug.com/408221149): don't build this file in this case.
|
||||
+ IMMEDIATE_CRASH();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -179,8 +171,14 @@ unsigned char* alloc_zeroed(size_t size, size_t align) {
|
||||
}
|
||||
return p;
|
||||
#else
|
||||
- return static_cast<unsigned char*>(__rdl_alloc_zeroed(size, align));
|
||||
+ // TODO(crbug.com/408221149): don't build this file in this case.
|
||||
+ IMMEDIATE_CRASH();
|
||||
#endif
|
||||
}
|
||||
|
||||
+void crash_immediately() {
|
||||
+ NO_CODE_FOLDING();
|
||||
+ IMMEDIATE_CRASH();
|
||||
+}
|
||||
+
|
||||
} // namespace rust_allocator_internal
|
||||
diff --git a/build/rust/allocator/allocator_impls.h b/build/rust/allocator/allocator_impls.h
|
||||
index afb335412faf9..e90ab7cd422c1 100644
|
||||
--- a/build/rust/allocator/allocator_impls.h
|
||||
+++ b/build/rust/allocator/allocator_impls.h
|
||||
@@ -20,6 +20,8 @@ unsigned char* realloc(unsigned char* p,
|
||||
size_t new_size);
|
||||
unsigned char* alloc_zeroed(size_t size, size_t align);
|
||||
|
||||
+void crash_immediately();
|
||||
+
|
||||
} // namespace rust_allocator_internal
|
||||
|
||||
#endif // BUILD_RUST_ALLOCATOR_ALLOCATOR_IMPLS_H_
|
||||
diff --git a/build/rust/allocator/allocator_shim_definitions.cc b/build/rust/allocator/allocator_shim_definitions.cc
|
||||
deleted file mode 100644
|
||||
index a4d1bd77b7016..0000000000000
|
||||
--- a/build/rust/allocator/allocator_shim_definitions.cc
|
||||
+++ /dev/null
|
||||
@@ -1,30 +0,0 @@
|
||||
-// Copyright 2025 The Chromium Authors
|
||||
-// Use of this source code is governed by a BSD-style license that can be
|
||||
-// found in the LICENSE file.
|
||||
-
|
||||
-#include <cstddef>
|
||||
-
|
||||
-#include "build/rust/allocator/alias.h"
|
||||
-#include "build/rust/allocator/immediate_crash.h"
|
||||
-
|
||||
-extern "C" {
|
||||
-
|
||||
-// As part of rustc's contract for using `#[global_allocator]` without
|
||||
-// rustc-generated shims we must define this symbol, since we are opting in to
|
||||
-// unstable functionality. See https://github.com/rust-lang/rust/issues/123015
|
||||
-//
|
||||
-// Mark it weak since rustc will generate it when it drives linking.
|
||||
-[[maybe_unused]]
|
||||
-__attribute__((weak)) unsigned char __rust_no_alloc_shim_is_unstable;
|
||||
-
|
||||
-__attribute__((weak)) void __rust_alloc_error_handler(size_t size,
|
||||
- size_t align) {
|
||||
- NO_CODE_FOLDING();
|
||||
- IMMEDIATE_CRASH();
|
||||
-}
|
||||
-
|
||||
-__attribute__((
|
||||
- weak)) extern const unsigned char __rust_alloc_error_handler_should_panic =
|
||||
- 0;
|
||||
-
|
||||
-} // extern "C"
|
||||
diff --git a/build/rust/allocator/lib.rs b/build/rust/allocator/lib.rs
|
||||
index 7f4a0fc245694..b8b67d9c6c649 100644
|
||||
--- a/build/rust/allocator/lib.rs
|
||||
+++ b/build/rust/allocator/lib.rs
|
||||
@@ -8,10 +8,20 @@
|
||||
//! the allocator defined here. Currently this is a thin wrapper around
|
||||
//! allocator_impls.cc's functions; see the documentation there.
|
||||
|
||||
+// Required to apply weak linkage to symbols.
|
||||
+#![feature(linkage)]
|
||||
+// Required to apply `#[rustc_std_internal_symbol]` to our alloc error handler
|
||||
+// so the name is correctly mangled as rustc expects.
|
||||
+#![cfg_attr(mangle_alloc_error_handler, allow(internal_features))]
|
||||
+#![cfg_attr(mangle_alloc_error_handler, feature(rustc_attrs))]
|
||||
+
|
||||
+#[cfg(use_cpp_allocator_impls)]
|
||||
use std::alloc::{GlobalAlloc, Layout};
|
||||
|
||||
+#[cfg(use_cpp_allocator_impls)]
|
||||
struct Allocator;
|
||||
|
||||
+#[cfg(use_cpp_allocator_impls)]
|
||||
unsafe impl GlobalAlloc for Allocator {
|
||||
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
|
||||
unsafe { ffi::alloc(layout.size(), layout.align()) }
|
||||
@@ -32,9 +42,36 @@ unsafe impl GlobalAlloc for Allocator {
|
||||
}
|
||||
}
|
||||
|
||||
+#[cfg(use_cpp_allocator_impls)]
|
||||
#[global_allocator]
|
||||
static GLOBAL: Allocator = Allocator;
|
||||
|
||||
+#[cfg(not(use_cpp_allocator_impls))]
|
||||
+#[global_allocator]
|
||||
+static GLOBAL: std::alloc::System = std::alloc::System;
|
||||
+
|
||||
+// As part of rustc's contract for using `#[global_allocator]` without
|
||||
+// rustc-generated shims we must define this symbol, since we are opting in to
|
||||
+// unstable functionality. See https://github.com/rust-lang/rust/issues/123015
|
||||
+#[no_mangle]
|
||||
+#[linkage = "weak"]
|
||||
+static __rust_no_alloc_shim_is_unstable: u8 = 0;
|
||||
+
|
||||
+#[no_mangle]
|
||||
+#[linkage = "weak"]
|
||||
+static __rust_alloc_error_handler_should_panic: u8 = 0;
|
||||
+
|
||||
+// Mangle the symbol name as rustc expects.
|
||||
+#[cfg_attr(mangle_alloc_error_handler, rustc_std_internal_symbol)]
|
||||
+#[cfg_attr(not(mangle_alloc_error_handler), no_mangle)]
|
||||
+#[linkage = "weak"]
|
||||
+fn __rust_alloc_error_handler(_size: usize, _align: usize) {
|
||||
+ unsafe { ffi::crash_immediately() }
|
||||
+}
|
||||
+
|
||||
+// TODO(crbug.com/408221149): conditionally include the FFI glue based on
|
||||
+// `use_cpp_allocator_impls`
|
||||
+#[allow(dead_code)]
|
||||
#[cxx::bridge(namespace = "rust_allocator_internal")]
|
||||
mod ffi {
|
||||
extern "C++" {
|
||||
@@ -44,5 +81,6 @@ mod ffi {
|
||||
unsafe fn dealloc(p: *mut u8, size: usize, align: usize);
|
||||
unsafe fn realloc(p: *mut u8, old_size: usize, align: usize, new_size: usize) -> *mut u8;
|
||||
unsafe fn alloc_zeroed(size: usize, align: usize) -> *mut u8;
|
||||
+ unsafe fn crash_immediately();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
reduced -lnl
|
||||
|
||||
From e201e2d467b0daad6cdbbfcd5b0e34760e4099c1 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Zhao <ayzhao@google.com>
|
||||
Date: Mon, 7 Apr 2025 18:15:01 -0700
|
||||
Subject: [PATCH] Roll rust *only* f7b43542838f0a4a6cfdb17fbeadf45002042a77-1 :
|
||||
3f690c2257b7080cd3a8cce64e082fc972148990-1
|
||||
|
||||
https://chromium.googlesource.com/external/github.com/rust-lang/rust/+log/f7b43542838f..3f690c2257b7
|
||||
|
||||
Ran: ./tools/clang/scripts/upload_revision.py 5b36835df010c5813808d34e45428c624fb52ff1
|
||||
|
||||
Additionally, add fixes to the rust allocator to address https://crbug.com/407024458.
|
||||
|
||||
Bug: 404285928,407024458
|
||||
Disable-Rts: True
|
||||
Cq-Include-Trybots: chromium/try:chromeos-amd64-generic-cfi-thin-lto-rel
|
||||
Cq-Include-Trybots: chromium/try:dawn-win10-x86-deps-rel
|
||||
Cq-Include-Trybots: chromium/try:linux-chromeos-dbg
|
||||
Cq-Include-Trybots: chromium/try:linux_chromium_cfi_rel_ng
|
||||
Cq-Include-Trybots: chromium/try:linux_chromium_chromeos_msan_rel_ng
|
||||
Cq-Include-Trybots: chromium/try:linux_chromium_msan_rel_ng
|
||||
Cq-Include-Trybots: chromium/try:mac11-arm64-rel,mac_chromium_asan_rel_ng
|
||||
Cq-Include-Trybots: chromium/try:ios-catalyst,win-asan,android-official
|
||||
Cq-Include-Trybots: chromium/try:fuchsia-arm64-cast-receiver-rel
|
||||
Cq-Include-Trybots: chromium/try:mac-official,linux-official
|
||||
Cq-Include-Trybots: chromium/try:win-official,win32-official
|
||||
Cq-Include-Trybots: chromium/try:win-swangle-try-x86
|
||||
Cq-Include-Trybots: chromium/try:android-cronet-riscv64-dbg
|
||||
Cq-Include-Trybots: chromium/try:android-cronet-riscv64-rel
|
||||
Cq-Include-Trybots: chrome/try:iphone-device
|
||||
Cq-Include-Trybots: chrome/try:linux-chromeos-chrome
|
||||
Cq-Include-Trybots: chrome/try:win-chrome,win64-chrome,linux-chrome,mac-chrome
|
||||
Cq-Include-Trybots: chrome/try:linux-pgo,mac-pgo,win32-pgo,win64-pgo
|
||||
Cq-Include-Trybots: luci.chromium.try:linux-cast-x64-rel
|
||||
Cq-Include-Trybots: chromium/try:android-rust-arm32-rel
|
||||
Cq-Include-Trybots: chromium/try:android-rust-arm64-dbg
|
||||
Cq-Include-Trybots: chromium/try:android-rust-arm64-rel
|
||||
Cq-Include-Trybots: chromium/try:linux-rust-x64-dbg
|
||||
Cq-Include-Trybots: chromium/try:linux-rust-x64-rel
|
||||
Cq-Include-Trybots: chromium/try:mac-rust-x64-dbg
|
||||
Cq-Include-Trybots: chromium/try:win-rust-x64-dbg
|
||||
Cq-Include-Trybots: chromium/try:win-rust-x64-rel
|
||||
Change-Id: Iec99681a89deaf3f2c79c76f9c4d1c2b2b7d6fe1
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6439711
|
||||
Reviewed-by: Collin Baker <collinbaker@chromium.org>
|
||||
Commit-Queue: Alan Zhao <ayzhao@google.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1443873}
|
||||
---
|
||||
build/rust/allocator/BUILD.gn | 6 +-
|
||||
build/rust/allocator/lib.rs | 6 +-
|
||||
build/rust/std/rules/BUILD.gn | 476 +++++++++++++++++-----------------
|
||||
tools/rust/update_rust.py | 2 +-
|
||||
4 files changed, 251 insertions(+), 239 deletions(-)
|
||||
|
||||
diff --git a/build/rust/allocator/BUILD.gn b/build/rust/allocator/BUILD.gn
|
||||
index f09314afc8158..ca581630c76c9 100644
|
||||
--- a/build/rust/allocator/BUILD.gn
|
||||
+++ b/build/rust/allocator/BUILD.gn
|
||||
@@ -32,6 +32,10 @@ if (toolchain_has_rust) {
|
||||
sources = [ "lib.rs" ]
|
||||
crate_root = "lib.rs"
|
||||
cxx_bindings = [ "lib.rs" ]
|
||||
+ rustflags = [
|
||||
+ "--cfg",
|
||||
+ "mangle_alloc_error_handler",
|
||||
+ ]
|
||||
|
||||
deps = [ ":allocator_impls" ]
|
||||
|
||||
@@ -40,7 +44,7 @@ if (toolchain_has_rust) {
|
||||
allow_unsafe = true
|
||||
|
||||
if (use_cpp_allocator_impls) {
|
||||
- rustflags = [
|
||||
+ rustflags += [
|
||||
"--cfg",
|
||||
"use_cpp_allocator_impls",
|
||||
]
|
||||
diff --git a/build/rust/allocator/lib.rs b/build/rust/allocator/lib.rs
|
||||
index b8b67d9c6c649..4e2dad3d542a8 100644
|
||||
--- a/build/rust/allocator/lib.rs
|
||||
+++ b/build/rust/allocator/lib.rs
|
||||
@@ -57,13 +57,17 @@ static GLOBAL: std::alloc::System = std::alloc::System;
|
||||
#[linkage = "weak"]
|
||||
static __rust_no_alloc_shim_is_unstable: u8 = 0;
|
||||
|
||||
-#[no_mangle]
|
||||
+// Mangle the symbol name as rustc expects.
|
||||
+#[cfg_attr(mangle_alloc_error_handler, rustc_std_internal_symbol)]
|
||||
+#[cfg_attr(not(mangle_alloc_error_handler), no_mangle)]
|
||||
+#[allow(non_upper_case_globals)]
|
||||
#[linkage = "weak"]
|
||||
static __rust_alloc_error_handler_should_panic: u8 = 0;
|
||||
|
||||
// Mangle the symbol name as rustc expects.
|
||||
#[cfg_attr(mangle_alloc_error_handler, rustc_std_internal_symbol)]
|
||||
#[cfg_attr(not(mangle_alloc_error_handler), no_mangle)]
|
||||
+#[allow(non_upper_case_globals)]
|
||||
#[linkage = "weak"]
|
||||
fn __rust_alloc_error_handler(_size: usize, _align: usize) {
|
||||
unsafe { ffi::crash_immediately() }
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
From 4a0377f0b847af505915b0e0a6c4178d4e7c3244 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Jolly <kangie@gentoo.org>
|
||||
Date: Mon, 14 Apr 2025 20:16:46 -0700
|
||||
Subject: [PATCH] Drop `remap_alloc` dep
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
commit e3a1797dbab3eaa1c808d53215b32c8759d27ac7 dropped the source set
|
||||
that this refers to, in favour of a more modern, crate-based solution.
|
||||
|
||||
This seems to have been overlooked, possibly as it only appears to
|
||||
be called if using the unbundle toolchain.
|
||||
|
||||
Bug: 408221149
|
||||
Signed-off-by: Matt Jolly <kangie@gentoo.org>
|
||||
Change-Id: I1703d8e1e456161aa2b736169eec407235847099
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6456604
|
||||
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
|
||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
||||
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
|
||||
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1446912}
|
||||
---
|
||||
build/rust/std/BUILD.gn | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/build/rust/std/BUILD.gn b/build/rust/std/BUILD.gn
|
||||
index 25db126076b2f..bb2c9884520b3 100644
|
||||
--- a/build/rust/std/BUILD.gn
|
||||
+++ b/build/rust/std/BUILD.gn
|
||||
@@ -355,12 +355,6 @@ if (toolchain_has_rust) {
|
||||
":stdlib_public_dependent_libs",
|
||||
]
|
||||
deps = [ ":prebuilt_rustc_copy_to_sysroot" ]
|
||||
-
|
||||
- # The host builds tools toolchain supports Rust only and does not use
|
||||
- # the allocator remapping to point it to PartitionAlloc.
|
||||
- if (!toolchain_for_rust_host_build_tools) {
|
||||
- deps += [ ":remap_alloc" ]
|
||||
- }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,354 +0,0 @@
|
|||
From e65cb388e5da56d1236607e0db9cadf89e50eded Mon Sep 17 00:00:00 2001
|
||||
From: Lukasz Anforowicz <lukasza@chromium.org>
|
||||
Date: Tue, 15 Apr 2025 11:10:19 -0700
|
||||
Subject: [PATCH] [rust] Clean up `//build/rust/allocator` after a Rust
|
||||
toolchain roll.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This CL makes minor tweaks and changes under `//build/rust/allocator`:
|
||||
|
||||
* Thanks to the Rust toolchain roll, we no longer need to keep two
|
||||
implementations, picking between them using the
|
||||
`mangle_alloc_error_handler` configuration knob.
|
||||
* The `#[cfg(use_cpp_allocator_impls)]` vs
|
||||
`#[cfg(not(use_cpp_allocator_impls))]` choices have been deduplicated
|
||||
by putting the related/conditional stuff under `mod cpp_allocator` and
|
||||
`rust_allocator`.
|
||||
* Closes a minor gap missed in https://crrev.com/c/6432410:
|
||||
- Moving `DEPS` file to the new source location
|
||||
|
||||
Bug: 408221149
|
||||
Change-Id: Id541797e03da113a5271b02a5f60eb2be08254a9
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6454872
|
||||
Reviewed-by: Alan Zhao <ayzhao@google.com>
|
||||
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1447241}
|
||||
---
|
||||
build/rust/allocator/BUILD.gn | 11 +-
|
||||
build/rust/{std => allocator}/DEPS | 2 +-
|
||||
build/rust/allocator/allocator_impls.cc | 65 ++----------
|
||||
build/rust/allocator/allocator_impls.h | 2 +
|
||||
build/rust/allocator/lib.rs | 132 +++++++++++++++---------
|
||||
5 files changed, 97 insertions(+), 115 deletions(-)
|
||||
rename build/rust/{std => allocator}/DEPS (76%)
|
||||
|
||||
diff --git a/build/rust/allocator/BUILD.gn b/build/rust/allocator/BUILD.gn
|
||||
index ca581630c76c9..434a61e11bdbb 100644
|
||||
--- a/build/rust/allocator/BUILD.gn
|
||||
+++ b/build/rust/allocator/BUILD.gn
|
||||
@@ -32,10 +32,6 @@ if (toolchain_has_rust) {
|
||||
sources = [ "lib.rs" ]
|
||||
crate_root = "lib.rs"
|
||||
cxx_bindings = [ "lib.rs" ]
|
||||
- rustflags = [
|
||||
- "--cfg",
|
||||
- "mangle_alloc_error_handler",
|
||||
- ]
|
||||
|
||||
deps = [ ":allocator_impls" ]
|
||||
|
||||
@@ -43,13 +39,12 @@ if (toolchain_has_rust) {
|
||||
no_allocator_crate = true
|
||||
allow_unsafe = true
|
||||
|
||||
+ rustflags = []
|
||||
if (use_cpp_allocator_impls) {
|
||||
- rustflags += [
|
||||
- "--cfg",
|
||||
- "use_cpp_allocator_impls",
|
||||
- ]
|
||||
+ rustflags += [ "--cfg=use_cpp_allocator_impls" ]
|
||||
}
|
||||
|
||||
+ # TODO(https://crbug.com/410596442): Stop using unstable features here.
|
||||
configs -= [ "//build/config/compiler:disallow_unstable_features" ]
|
||||
}
|
||||
|
||||
diff --git a/build/rust/std/DEPS b/build/rust/allocator/DEPS
|
||||
similarity index 76%
|
||||
rename from build/rust/std/DEPS
|
||||
rename to build/rust/allocator/DEPS
|
||||
index eb524c0a06acd..923a2e07c80f4 100644
|
||||
--- a/build/rust/std/DEPS
|
||||
+++ b/build/rust/allocator/DEPS
|
||||
@@ -3,7 +3,7 @@ include_rules = [
|
||||
]
|
||||
|
||||
specific_include_rules = {
|
||||
- "remap_alloc.cc" : [
|
||||
+ "allocator_impls.cc" : [
|
||||
"+partition_alloc"
|
||||
]
|
||||
}
|
||||
diff --git a/build/rust/allocator/allocator_impls.cc b/build/rust/allocator/allocator_impls.cc
|
||||
index bf3c2a301adf5..8887752f3dfad 100644
|
||||
--- a/build/rust/allocator/allocator_impls.cc
|
||||
+++ b/build/rust/allocator/allocator_impls.cc
|
||||
@@ -24,62 +24,6 @@
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
-// NOTE: this documentation is outdated.
|
||||
-//
|
||||
-// TODO(crbug.com/408221149): update this documentation, or replace it with docs
|
||||
-// in the Rust allocator implementation.
|
||||
-//
|
||||
-// When linking a final binary, rustc has to pick between either:
|
||||
-// * The default Rust allocator
|
||||
-// * Any #[global_allocator] defined in *any rlib in its dependency tree*
|
||||
-// (https://doc.rust-lang.org/edition-guide/rust-2018/platform-and-target-support/global-allocators.html)
|
||||
-//
|
||||
-// In this latter case, this fact will be recorded in some of the metadata
|
||||
-// within the .rlib file. (An .rlib file is just a .a file, but does have
|
||||
-// additional metadata for use by rustc. This is, as far as I know, the only
|
||||
-// such metadata we would ideally care about.)
|
||||
-//
|
||||
-// In all the linked rlibs,
|
||||
-// * If 0 crates define a #[global_allocator], rustc uses its default allocator
|
||||
-// * If 1 crate defines a #[global_allocator], rustc uses that
|
||||
-// * If >1 crates define a #[global_allocator], rustc bombs out.
|
||||
-//
|
||||
-// Because rustc does these checks, it doesn't just have the __rust_alloc
|
||||
-// symbols defined anywhere (neither in the stdlib nor in any of these
|
||||
-// crates which have a #[global_allocator] defined.)
|
||||
-//
|
||||
-// Instead:
|
||||
-// Rust's final linking stage invokes dynamic LLVM codegen to create symbols
|
||||
-// for the basic heap allocation operations. It literally creates a
|
||||
-// __rust_alloc symbol at link time. Unless any crate has specified a
|
||||
-// #[global_allocator], it simply calls from __rust_alloc into
|
||||
-// __rdl_alloc, which is the default Rust allocator. The same applies to a
|
||||
-// few other symbols.
|
||||
-//
|
||||
-// We're not (always) using rustc for final linking. For cases where we're not
|
||||
-// Rustc as the final linker, we'll define those symbols here instead. This
|
||||
-// allows us to redirect allocation to PartitionAlloc if clang is doing the
|
||||
-// link.
|
||||
-//
|
||||
-// We use unchecked allocation paths in PartitionAlloc rather than going through
|
||||
-// its shims in `malloc()` etc so that we can support fallible allocation paths
|
||||
-// such as Vec::try_reserve without crashing on allocation failure.
|
||||
-//
|
||||
-// In future, we should build a crate with a #[global_allocator] and
|
||||
-// redirect these symbols back to Rust in order to use to that crate instead.
|
||||
-// This would allow Rust-linked executables to:
|
||||
-// 1. Use PartitionAlloc on Windows. The stdlib uses Windows heap functions
|
||||
-// directly that PartitionAlloc can not intercept.
|
||||
-// 2. Have `Vec::try_reserve` to fail at runtime on Linux instead of crashing in
|
||||
-// malloc() where PartitionAlloc replaces that function.
|
||||
-//
|
||||
-// They're weak symbols, because this file will sometimes end up in targets
|
||||
-// which are linked by rustc, and thus we would otherwise get duplicate
|
||||
-// definitions. The following definitions will therefore only end up being
|
||||
-// used in targets which are linked by our C++ toolchain.
|
||||
-//
|
||||
-// # On Windows ASAN
|
||||
-//
|
||||
// In ASAN builds, PartitionAlloc-Everywhere is disabled, meaning malloc() and
|
||||
// friends in C++ do not go to PartitionAlloc. So we also don't point the Rust
|
||||
// allocation functions at PartitionAlloc. Generally, this means we just direct
|
||||
@@ -93,7 +37,6 @@
|
||||
// Note that there is a runtime option to make ASAN hook HeapAlloc() but
|
||||
// enabling it breaks Win32 APIs like CreateProcess:
|
||||
// https://issues.chromium.org/u/1/issues/368070343#comment29
|
||||
-
|
||||
#if !BUILDFLAG(RUST_ALLOCATOR_USES_PARTITION_ALLOC) && BUILDFLAG(IS_WIN) && \
|
||||
defined(ADDRESS_SANITIZER)
|
||||
#define USE_WIN_ALIGNED_MALLOC 1
|
||||
@@ -110,6 +53,10 @@ unsigned char* alloc(size_t size, size_t align) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
+ // We use unchecked allocation paths in PartitionAlloc rather than going
|
||||
+ // through its shims in `malloc()` etc so that we can support fallible
|
||||
+ // allocation paths such as Vec::try_reserve without crashing on allocation
|
||||
+ // failure.
|
||||
if (align <= alignof(std::max_align_t)) {
|
||||
return static_cast<unsigned char*>(allocator_shim::UncheckedAlloc(size));
|
||||
} else {
|
||||
@@ -144,6 +91,10 @@ unsigned char* realloc(unsigned char* p,
|
||||
size_t align,
|
||||
size_t new_size) {
|
||||
#if BUILDFLAG(RUST_ALLOCATOR_USES_PARTITION_ALLOC)
|
||||
+ // We use unchecked allocation paths in PartitionAlloc rather than going
|
||||
+ // through its shims in `malloc()` etc so that we can support fallible
|
||||
+ // allocation paths such as Vec::try_reserve without crashing on allocation
|
||||
+ // failure.
|
||||
if (align <= alignof(std::max_align_t)) {
|
||||
return static_cast<unsigned char*>(
|
||||
allocator_shim::UncheckedRealloc(p, new_size));
|
||||
diff --git a/build/rust/allocator/allocator_impls.h b/build/rust/allocator/allocator_impls.h
|
||||
index e90ab7cd422c1..e562a877d886e 100644
|
||||
--- a/build/rust/allocator/allocator_impls.h
|
||||
+++ b/build/rust/allocator/allocator_impls.h
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "build/build_config.h"
|
||||
#include "build/rust/allocator/buildflags.h"
|
||||
|
||||
+// This header exposes PartitionAlloc to Rust
|
||||
+// (most APIs below are called from `impl GlobalAlloc` in `lib.rs`).
|
||||
namespace rust_allocator_internal {
|
||||
|
||||
unsigned char* alloc(size_t size, size_t align);
|
||||
diff --git a/build/rust/allocator/lib.rs b/build/rust/allocator/lib.rs
|
||||
index 4e2dad3d542a8..a4f898f9b107f 100644
|
||||
--- a/build/rust/allocator/lib.rs
|
||||
+++ b/build/rust/allocator/lib.rs
|
||||
@@ -5,72 +5,106 @@
|
||||
//! Define the allocator that Rust code in Chrome should use.
|
||||
//!
|
||||
//! Any final artifact that depends on this crate, even transitively, will use
|
||||
-//! the allocator defined here. Currently this is a thin wrapper around
|
||||
-//! allocator_impls.cc's functions; see the documentation there.
|
||||
+//! the allocator defined here.
|
||||
+//!
|
||||
+//! List of known issues:
|
||||
+//!
|
||||
+//! 1. We'd like to use PartitionAlloc on Windows, but the stdlib uses Windows
|
||||
+//! heap functions directly that PartitionAlloc can not intercept.
|
||||
+//! 2. We'd like `Vec::try_reserve` to fail at runtime on Linux instead of
|
||||
+//! crashing in malloc() where PartitionAlloc replaces that function.
|
||||
|
||||
// Required to apply weak linkage to symbols.
|
||||
+//
|
||||
+// TODO(https://crbug.com/410596442): Stop using unstable features here.
|
||||
+// https://github.com/rust-lang/rust/issues/29603 tracks stabilization of the `linkage` feature.
|
||||
#![feature(linkage)]
|
||||
// Required to apply `#[rustc_std_internal_symbol]` to our alloc error handler
|
||||
// so the name is correctly mangled as rustc expects.
|
||||
-#![cfg_attr(mangle_alloc_error_handler, allow(internal_features))]
|
||||
-#![cfg_attr(mangle_alloc_error_handler, feature(rustc_attrs))]
|
||||
+//
|
||||
+// TODO(https://crbug.com/410596442): Stop using internal features here.
|
||||
+#![allow(internal_features)]
|
||||
+#![feature(rustc_attrs)]
|
||||
|
||||
+/// Module that provides `#[global_allocator]` / `GlobalAlloc` interface for
|
||||
+/// using an allocator from C++.
|
||||
#[cfg(use_cpp_allocator_impls)]
|
||||
-use std::alloc::{GlobalAlloc, Layout};
|
||||
+mod cpp_allocator {
|
||||
+ use super::ffi;
|
||||
+ use std::alloc::{GlobalAlloc, Layout};
|
||||
|
||||
-#[cfg(use_cpp_allocator_impls)]
|
||||
-struct Allocator;
|
||||
+ struct Allocator;
|
||||
|
||||
-#[cfg(use_cpp_allocator_impls)]
|
||||
-unsafe impl GlobalAlloc for Allocator {
|
||||
- unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
|
||||
- unsafe { ffi::alloc(layout.size(), layout.align()) }
|
||||
- }
|
||||
+ unsafe impl GlobalAlloc for Allocator {
|
||||
+ unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
|
||||
+ unsafe { ffi::alloc(layout.size(), layout.align()) }
|
||||
+ }
|
||||
|
||||
- unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
|
||||
- unsafe {
|
||||
- ffi::dealloc(ptr, layout.size(), layout.align());
|
||||
+ unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
|
||||
+ unsafe {
|
||||
+ ffi::dealloc(ptr, layout.size(), layout.align());
|
||||
+ }
|
||||
}
|
||||
- }
|
||||
|
||||
- unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 {
|
||||
- unsafe { ffi::alloc_zeroed(layout.size(), layout.align()) }
|
||||
- }
|
||||
+ unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 {
|
||||
+ unsafe { ffi::alloc_zeroed(layout.size(), layout.align()) }
|
||||
+ }
|
||||
|
||||
- unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 {
|
||||
- unsafe { ffi::realloc(ptr, layout.size(), layout.align(), new_size) }
|
||||
+ unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 {
|
||||
+ unsafe { ffi::realloc(ptr, layout.size(), layout.align(), new_size) }
|
||||
+ }
|
||||
}
|
||||
-}
|
||||
|
||||
-#[cfg(use_cpp_allocator_impls)]
|
||||
-#[global_allocator]
|
||||
-static GLOBAL: Allocator = Allocator;
|
||||
+ #[global_allocator]
|
||||
+ static GLOBAL: Allocator = Allocator;
|
||||
+}
|
||||
|
||||
+/// Module that provides `#[global_allocator]` / `GlobalAlloc` interface for
|
||||
+/// using the default Rust allocator.
|
||||
#[cfg(not(use_cpp_allocator_impls))]
|
||||
-#[global_allocator]
|
||||
-static GLOBAL: std::alloc::System = std::alloc::System;
|
||||
-
|
||||
-// As part of rustc's contract for using `#[global_allocator]` without
|
||||
-// rustc-generated shims we must define this symbol, since we are opting in to
|
||||
-// unstable functionality. See https://github.com/rust-lang/rust/issues/123015
|
||||
-#[no_mangle]
|
||||
-#[linkage = "weak"]
|
||||
-static __rust_no_alloc_shim_is_unstable: u8 = 0;
|
||||
-
|
||||
-// Mangle the symbol name as rustc expects.
|
||||
-#[cfg_attr(mangle_alloc_error_handler, rustc_std_internal_symbol)]
|
||||
-#[cfg_attr(not(mangle_alloc_error_handler), no_mangle)]
|
||||
-#[allow(non_upper_case_globals)]
|
||||
-#[linkage = "weak"]
|
||||
-static __rust_alloc_error_handler_should_panic: u8 = 0;
|
||||
-
|
||||
-// Mangle the symbol name as rustc expects.
|
||||
-#[cfg_attr(mangle_alloc_error_handler, rustc_std_internal_symbol)]
|
||||
-#[cfg_attr(not(mangle_alloc_error_handler), no_mangle)]
|
||||
-#[allow(non_upper_case_globals)]
|
||||
-#[linkage = "weak"]
|
||||
-fn __rust_alloc_error_handler(_size: usize, _align: usize) {
|
||||
- unsafe { ffi::crash_immediately() }
|
||||
+mod rust_allocator {
|
||||
+ #[global_allocator]
|
||||
+ static GLOBAL: std::alloc::System = std::alloc::System;
|
||||
+}
|
||||
+
|
||||
+/// Module that provides global symbols that are needed both by `cpp_allocator`
|
||||
+/// and `rust_allocator`.
|
||||
+///
|
||||
+/// When `rustc` drives linking, then it will define the symbols below. But
|
||||
+/// Chromium only uses `rustc` to link Rust-only executables (e.g. `build.rs`
|
||||
+/// scripts) and otherwise uses a non-Rust linker. This is why we have to
|
||||
+/// manually define a few symbols below. We define those symbols
|
||||
+/// as "weak" symbols, so that Rust-provided symbols "win" in case where Rust
|
||||
+/// actually does drive the linking. This hack works (not only for Chromium,
|
||||
+/// but also for google3 and other projects), but isn't officially supported by
|
||||
+/// `rustc`.
|
||||
+///
|
||||
+/// TODO(https://crbug.com/410596442): Stop using internal features here.
|
||||
+mod both_allocators {
|
||||
+ use super::ffi;
|
||||
+
|
||||
+ /// As part of rustc's contract for using `#[global_allocator]` without
|
||||
+ /// rustc-generated shims we must define this symbol, since we are opting in
|
||||
+ /// to unstable functionality. See https://github.com/rust-lang/rust/issues/123015
|
||||
+ #[no_mangle]
|
||||
+ #[linkage = "weak"]
|
||||
+ static __rust_no_alloc_shim_is_unstable: u8 = 0;
|
||||
+
|
||||
+ // Mangle the symbol name as rustc expects.
|
||||
+ #[rustc_std_internal_symbol]
|
||||
+ #[allow(non_upper_case_globals)]
|
||||
+ #[linkage = "weak"]
|
||||
+ static __rust_alloc_error_handler_should_panic: u8 = 0;
|
||||
+
|
||||
+ // Mangle the symbol name as rustc expects.
|
||||
+ #[rustc_std_internal_symbol]
|
||||
+ #[allow(non_upper_case_globals)]
|
||||
+ #[linkage = "weak"]
|
||||
+ fn __rust_alloc_error_handler(_size: usize, _align: usize) {
|
||||
+ // TODO(lukasza): Investigate if we can just call `std::process::abort()` here.
|
||||
+ // (Not really _needed_, but it could simplify code a little bit.)
|
||||
+ unsafe { ffi::crash_immediately() }
|
||||
+ }
|
||||
}
|
||||
|
||||
// TODO(crbug.com/408221149): conditionally include the FFI glue based on
|
||||
|
|
@ -1,18 +1,19 @@
|
|||
# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=electron
|
||||
pkgver=35.4.0
|
||||
pkgver=39.2.7
|
||||
_gittag=v"${pkgver/_beta/-beta.}"
|
||||
pkgrel=0
|
||||
_chromium=134.0.6998.205
|
||||
_copium_tag=134.0
|
||||
_chromium=142.0.7444.235
|
||||
_copium_tag=142.0
|
||||
_depot_tools=495b23b39aaba2ca3b55dd27cadc523f1cb17ee6
|
||||
pkgdesc="Electron cross-platform desktop toolkit"
|
||||
url="https://github.com/electron/electron"
|
||||
# armv7: Segmentation fault on builder despite building in CI
|
||||
arch="aarch64 x86_64" # same as chromium
|
||||
license="MIT"
|
||||
depends="gtk+3.0 so:libudev.so.1 xdg-utils"
|
||||
_llvmver=20
|
||||
_llvmver=21
|
||||
makedepends="
|
||||
ada-dev
|
||||
alsa-lib-dev
|
||||
|
|
@ -24,8 +25,8 @@ makedepends="
|
|||
c-ares-dev
|
||||
cairo-dev
|
||||
clang$_llvmver-dev
|
||||
clang$_llvmver-rtlib
|
||||
clang-extra-tools
|
||||
compiler-rt
|
||||
crc32c-dev
|
||||
cups-dev
|
||||
curl-dev
|
||||
|
|
@ -44,6 +45,7 @@ makedepends="
|
|||
gn
|
||||
gzip
|
||||
harfbuzz-dev
|
||||
highway-dev
|
||||
hdrhistogram-c-dev
|
||||
hunspell-dev
|
||||
http-parser-dev
|
||||
|
|
@ -74,7 +76,7 @@ makedepends="
|
|||
libxscrnsaver-dev
|
||||
libxslt-dev
|
||||
linux-headers
|
||||
lld
|
||||
lld$_llvmver
|
||||
llhttp-dev
|
||||
llvm$_llvmver
|
||||
mesa-dev
|
||||
|
|
@ -107,7 +109,7 @@ makedepends="
|
|||
sqlite-dev
|
||||
woff2-dev
|
||||
xcb-proto
|
||||
yarn
|
||||
yarn-berry
|
||||
zlib-dev
|
||||
zstd-dev
|
||||
"
|
||||
|
|
@ -116,18 +118,20 @@ subpackages="$pkgname-lang $pkgname-dev"
|
|||
source="
|
||||
https://ayakael.net/api/packages/mirrors/generic/electron/$_gittag/electron-$_gittag-$_chromium.tar.zst
|
||||
copium-$_copium_tag.tar.gz::https://codeberg.org/selfisekai/copium/archive/$_copium_tag.tar.gz
|
||||
chromium-revert-drop-of-system-java.patch
|
||||
0001-hotfix-ignore-a-new-warning-in-rust-1.89.patch
|
||||
compiler.patch
|
||||
disable-dns_config_service.patch
|
||||
disable-failing-tests.patch
|
||||
fc-cache-version.patch
|
||||
fix-opus.patch
|
||||
fix-ffmpeg-codec-list.patch
|
||||
fstatat-32bit.patch
|
||||
gdbinit.patch
|
||||
generic-sensor-include.patch
|
||||
musl-auxv.patch
|
||||
headless-shell-no-license.patch
|
||||
musl-sandbox.patch
|
||||
musl-tid-caching.patch
|
||||
net-test-no-vpython.patch
|
||||
net-test-pyws3-py3.12.patch
|
||||
no-execinfo.patch
|
||||
no-mallinfo.patch
|
||||
no-res-ninit-nclose.patch
|
||||
|
|
@ -135,19 +139,15 @@ source="
|
|||
partalloc-no-tagging-arm64.patch
|
||||
pvalloc.patch
|
||||
temp-failure-retry.patch
|
||||
pipewire-1.4.patch
|
||||
gperf-3.2-fix.patch
|
||||
0001-Reland-Use-global_allocator-to-provide-Rust-allocato.patch
|
||||
0002-Call-Rust-default-allocator-directly-from-Rust.patch
|
||||
0003-Roll-rust-only-f7b43542838f0a4a6cfdb17fbeadf45002042.patch
|
||||
0004-Drop-remap_alloc-dep.patch
|
||||
0005-rust-Clean-up-build-rust-allocator-after-a-Rust-tool.patch
|
||||
|
||||
electron_icon.patch
|
||||
electron_python-jinja-3.10.patch
|
||||
electron_webpack-hash.patch
|
||||
electron_unbundle-node.patch
|
||||
electron_system-zlib-headers.patch
|
||||
electron_do-not-strip-binaries.patch
|
||||
electron_shell-file-dialog-drop-glibc.patch
|
||||
electron_use-system-yarn.patch
|
||||
|
||||
default.conf
|
||||
electron.desktop
|
||||
|
|
@ -157,8 +157,9 @@ _copium_patches="
|
|||
cr131-v8-non4k-pages.patch
|
||||
cr133-ffmpeg-no-noh264parse.patch
|
||||
cr133-is-musl-libcxx.patch
|
||||
cr133-mv2-still-not-dead.patch
|
||||
cr134-unbundle-simdutf.patch
|
||||
cr138-node-version-check.patch
|
||||
cr140-musl-prctl.patch
|
||||
cr142-autofill-incomplete-formfielddata.patch
|
||||
"
|
||||
# Avoid conflicting providers
|
||||
sonameprefix="$pkgname:"
|
||||
|
|
@ -166,17 +167,19 @@ sonameprefix="$pkgname:"
|
|||
options="!check net suid"
|
||||
builddir="$srcdir/electron-$_gittag-$_chromium"
|
||||
|
||||
export CC=clang-$_llvmver
|
||||
export CXX=clang++-$_llvmver
|
||||
export CC="/usr/lib/llvm$_llvmver/bin/clang"
|
||||
export CXX="/usr/lib/llvm$_llvmver/bin/clang++"
|
||||
|
||||
# required to find the tools
|
||||
export AR=llvm-ar
|
||||
export NM=llvm-nm
|
||||
export LD=clang++-$_llvmver
|
||||
export NM="/usr/lib/llvm$_llvmver/bin/llvm-nm"
|
||||
export AR="/usr/lib/llvm$_llvmver/bin/llvm-ar"
|
||||
export LD="/usr/lib/llvm$_llvmver/bin/clang++"
|
||||
|
||||
# less log spam, reproducible
|
||||
export CFLAGS="${CFLAGS/-g/} -O2 -Wno-builtin-macro-redefined -Wno-deprecated-declarations -Wno-shift-count-overflow -Wno-ignored-attributes"
|
||||
export CXXFLAGS="${CXXFLAGS/-g/} -O2 -Wno-builtin-macro-redefined -Wno-deprecated-declarations -Wno-invalid-constexpr"
|
||||
# _LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE is set by project
|
||||
export CXXFLAGS="${CXXFLAGS/-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST/}"
|
||||
export CPPFLAGS="${CPPFLAGS/-g/} -D__DATE__= -D__TIME__= -D__TIMESTAMP__="
|
||||
case "$CARCH" in
|
||||
aarch64|arm*|riscv64)
|
||||
|
|
@ -233,8 +236,8 @@ snapshot() {
|
|||
--nohooks
|
||||
|
||||
python3 src/build/landmines.py
|
||||
python3 src/build/util/lastchange.py -o src/build/util/LASTCHANGE \
|
||||
--revision src/gpu/webgpu/DAWN_VERSION
|
||||
python3 src/build/util/lastchange.py -m DAWN_COMMIT_HASH -s src/third_party/dawn \
|
||||
--revision src/gpu/webgpu/DAWN_VERSION --header src/gpu/webgpu/dawn_commit_hash.h
|
||||
python3 src/build/util/lastchange.py -m GPU_LISTS_VERSION \
|
||||
--revision-id-only --header src/gpu/config/gpu_lists_version.h
|
||||
python3 src/build/util/lastchange.py -m SKIA_COMMIT_HASH \
|
||||
|
|
@ -269,6 +272,8 @@ snapshot() {
|
|||
mcli cp "$SRCDEST"/$pkgname-$_gittag-$_chromium.tar.zst "$_distbucket"
|
||||
}
|
||||
|
||||
export RUSTC_BOOTSTRAP=1
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
|
|
@ -306,7 +311,7 @@ prepare() {
|
|||
git commit -m "init"
|
||||
git tag "$_gittag"
|
||||
git pack-refs
|
||||
yarn install --frozen-lockfile --ignore-scripts
|
||||
yarn install --immutable --mode=skip-build
|
||||
)
|
||||
|
||||
(
|
||||
|
|
@ -314,9 +319,14 @@ prepare() {
|
|||
./update_npm_deps
|
||||
)
|
||||
|
||||
# generate dawn_commit_hash
|
||||
# TODO: remove on next update as it'll be generated after
|
||||
# https://ayakael.net/mirrors/electron/commit/7623f4a14ab44fa4f4343e47d9d681c9b4aa984c
|
||||
python3 build/util/lastchange.py -m DAWN_COMMIT_HASH -s third_party/dawn \
|
||||
--revision gpu/webgpu/DAWN_VERSION --header gpu/webgpu/dawn_commit_hash.h
|
||||
|
||||
# reusable system library settings
|
||||
# flatbuffers - tensorflow has a few static_asserts for a specific patch version
|
||||
# highway - requires highway>=1.1.0 (arm failures)
|
||||
# libavif - https://github.com/AOMediaCodec/libavif/commit/50a541469c98009016af8dcc9f83a1be79f3a7d9
|
||||
# libaom - https://aomedia.googlesource.com/aom/+/706ee36dcc82%5E%21/
|
||||
# but watch this space: https://aomedia-review.googlesource.com/c/aom/+/188606
|
||||
|
|
@ -332,6 +342,7 @@ prepare() {
|
|||
fontconfig
|
||||
freetype
|
||||
harfbuzz-ng
|
||||
highway
|
||||
libdrm
|
||||
libjpeg
|
||||
libsecret
|
||||
|
|
@ -420,6 +431,8 @@ prepare() {
|
|||
third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \
|
||||
third_party/libxml/chromium/*.cc
|
||||
|
||||
echo "$CTARGET" >> build/rust/known-target-triples.txt
|
||||
|
||||
_configure
|
||||
}
|
||||
|
||||
|
|
@ -453,10 +466,9 @@ _configure() {
|
|||
custom_toolchain=\"//build/toolchain/linux/unbundle:default\"
|
||||
disable_fieldtrial_testing_config=true
|
||||
enable_hangout_services_extension=true
|
||||
enable_nacl=false
|
||||
enable_nocompile_tests=false
|
||||
enable_stripping=false
|
||||
enable_rust=true
|
||||
enable_stripping=false
|
||||
enable_vr=false
|
||||
fatal_linker_warnings=false
|
||||
ffmpeg_branding=\"Chrome\"
|
||||
|
|
@ -469,6 +481,7 @@ _configure() {
|
|||
is_musl=true
|
||||
is_official_build=true
|
||||
link_pulseaudio=true
|
||||
node_version_check=false
|
||||
proprietary_codecs=true
|
||||
rtc_link_pipewire=true
|
||||
rtc_use_pipewire=true
|
||||
|
|
@ -478,6 +491,7 @@ _configure() {
|
|||
safe_browsing_use_unrar=false
|
||||
symbol_level=$symbol_level
|
||||
treat_warnings_as_errors=false
|
||||
use_clang_modules=false
|
||||
use_custom_libcxx=true
|
||||
use_lld=true
|
||||
use_pulseaudio=true
|
||||
|
|
@ -551,39 +565,37 @@ lang() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
30a116328f9a5af05b16cf85e31672407c51aef895b29441220f439d66af947272daa8e2ac88d9e4b8f7a9e0bb883932c36d2f1642fd18c5da885931c1c97fe0 electron-v35.4.0-134.0.6998.205.tar.zst
|
||||
c1857b5d6975650f915f3db552666f521822b857e39958ccfb54129f3878f272deaafc3dd446bc8441a5e84f075791feeeb62841b74bb555d8c546bfe231d164 copium-134.0.tar.gz
|
||||
29bb685e03356a77df5fd347cdf55194cc8b3265c421cc76e54d64edefc329dbcb052deb26b22e8f587ce68456876c071de1b7d258dd0fcc6ee66c875ec4a020 chromium-revert-drop-of-system-java.patch
|
||||
d9cc4a37a0311d23ae315a8d8124f8dbf60db8cc4a3943818638174b20387f1d770d00871f6608957b246ad956abca43c22ea0b072724287f2947e1909e47323 compiler.patch
|
||||
4057cc78f10bfd64092bc35a373869abb1d68b880cdbca70422f39ffd78a929c19c7728d4d4c40709aaba25581148a93ae5343e724849fd35323062ed68753fa disable-dns_config_service.patch
|
||||
2470904846e3adde2c9506f9e78220daca0932320b628dd3d427bf2b7c17a8f7880cb97e787b046c28de7aca642e1a8d30824d6049905976da77e7473baa64da disable-failing-tests.patch
|
||||
5fc5c012c1db6cf1ba82f38c6f3f4f5ca3a209e47ac708a74de379b018e0649b7694877c9571ef79002dde875ffc07b458a3355425f1c01867f362c66c2bc1bf fc-cache-version.patch
|
||||
f7fe8a8e5eee17310fb4c3e5de621b4b89ea0567f75033c65be970950cca62b50c5fbd004735e4ad39bdb2e1638b3b73ea614203d323f8181ae18c71edf302a0 fix-opus.patch
|
||||
6dc7161f6df396e2b7569b0a607e264b43a2d7215de65164dc2ca04c019df93ea0a67dec2490071c09c8a03f90605faaf3880f2d843f838bb5d841bba204c298 electron-v39.2.7-142.0.7444.235.tar.zst
|
||||
30b298549804e7753b0b639b72417ba081e964676862b6c7d73ad73cdf806883f20e4a4b36e67a6c375eaf2dd97686cf21b90b062400d3b61fba86da4d239bfa copium-142.0.tar.gz
|
||||
69b45005451ccd69c354b4c2910e92371cb801665f5e300dbecd36f8bc4ce68e77a431b5dac07c0937787debb4e93b7aadefa0a1e76c4ae334d2547ca3ca14ff 0001-hotfix-ignore-a-new-warning-in-rust-1.89.patch
|
||||
dc254dd79e135aeac3e9c03eb055e3bc17980fc213f8c4d8d7921a575be7f9c26b91f110a6dcb01c0a824a7d9375c09f8a61c8858c20c11d79c03f873e2cb3f9 compiler.patch
|
||||
1bee1448e409fedff635388ee6f1efa6d23c29ae3e6b6fd31452c56974adb40fcd0088c82d1e643d549154663e402942cbab9807dff5aff2d8997a09de6f5655 disable-dns_config_service.patch
|
||||
0ef9168b8b1a4779bc4c8df718735e06d29e459dcfd00f8cbf9a4edaf9fade8089225219e46dead7de81de716bddc8d745dc2069db0ee7f7e5d2f64c5236e2ab disable-failing-tests.patch
|
||||
0050857a9a9553c10fd502fe70606bce48269c9b48fa82ce9e111575637a0c03578e923c82fc639fcb574fc3337aeef50d8a0aea5e512ae4eab83b8c3d732cf6 fc-cache-version.patch
|
||||
87f63d83139562e058f3f649eb1f62bf100dd92c2bb6ee393fdce0c8f7d7c188a7062394647aafe4e82c0a8fbbffeb613edc5c8dd9415dd9dda777827ea371c5 fix-ffmpeg-codec-list.patch
|
||||
c63dee5044353eb306a39ca1526158c0f003ab310ecb03d1c368dc2a979454590c84b8d3c15484517d5e66bb8add9b231da9abbadf2e50850abd72ac1345c4ab fstatat-32bit.patch
|
||||
33ee60863cc438ef57ffef92ba4cf67a856a5ffc16138bce241bcf87e47b15154aa86918e793c26f7ec4dc62a445257ad5673ed7001daf22c4043cf6cc57da7f gdbinit.patch
|
||||
36a764fa73443b47d38050b52dbe6ad2fa8d67201ff4ccdbad13b52308ef165ca046aac6f9609fe35890a6485f0f3e672e78cc41e3e44f3cdc7f145e540524e8 generic-sensor-include.patch
|
||||
99bcc7dd485b404a90c606a96addab1d900852128d44fb8cea8acc7303189ef87c89a7b0e749fd0e10c5ef5f6bf1fadeb5c16a34503cab6a59938ce2653d887e musl-auxv.patch
|
||||
a94cf7a0670abf5178abba33c619cc6d41d73f2e16c7a1fd5b152152f5077df103e049d166e3b8627797c38113821d2f2e6b64cd48d132c1e90ad32d63a349f5 headless-shell-no-license.patch
|
||||
51f1959bd622af26a1c3a1f4b0ad9a5bfa461057aa4cf9960c568dddf8ac47d55989c277f5d5ab5db040a04c54925a531af7a1cc767559218b408eaa6bdd7577 musl-sandbox.patch
|
||||
e7163ac5810ac85366cef2447412287c856e3d67c6b77f219a6e5a418b1965b98e449c409424ad0704a5bded9355dd0aec3dc4585918ce5a2ab36c079707afe2 musl-tid-caching.patch
|
||||
3b7420d58d13dfc4baab5065e3017f666f51fed6de087af42a660a839d7b4444b50d1a93204322d213df36c6722eaf6b08d46d50dc374198a342da2675fafff5 net-test-no-vpython.patch
|
||||
e487662b6606ea526ddd716c31e6b9ad3d61f1bee5356cd94b78a903efb3928338cbb48e3d5840b34c3b70a71e8361a228430bd50e707ad301228a7049d59e37 net-test-pyws3-py3.12.patch
|
||||
a250cff50d282b02ce0f28880d0a2b4fb8e7df51bc072bfeeddc561c29a7c76453dbcbc7b17b82966a7b30a31409d2555720d1dcf963e1b3fb8a2a06a6abcf46 no-execinfo.patch
|
||||
0b41aeb6b212f9c3f61aa0a8d3085c9e865a2e68f3270ceec2376aab67f337ac46eaea7da36d3fd7219e2a1cb731b7aa2d3fb619a374d2b7653976b9f4f384bb no-mallinfo.patch
|
||||
e4c4e5bc6f828f9c883dd418c0ba01887949c29c311f76206a1ec29f620b0c0ba0452949dc2778a9c46ea066405857536964a36436a68eecf7da7952736333cf no-res-ninit-nclose.patch
|
||||
6dc4d8dc92e685dace62265a1ddb3aebc558aed54d20ff6d36b030be0c48d7e84662326c31363612492574d9a03c62653cdc21a60995b97dee1d75cae86a9f9b no-sandbox-settls.patch
|
||||
f2b08538ff57c50b3772a07ca91845f9d45f4a5112f608b6192d4fb5d7be48f478c0c36194d95ab7bbf933e0278e5c6d578619d8643895cdc40386eebc5b975f partalloc-no-tagging-arm64.patch
|
||||
b75908a45ee2f4f806eec8d86fca2f51fda3531b88de48ef4539c364a40d7e2897cdaf38b715682d712648e3f43aac983055e688385f85fa7b7204ffb6d617e1 partalloc-no-tagging-arm64.patch
|
||||
03f829a2da633533ef3fd0f287f5ec602d936a97a98b53cd2415553c2537ae9d571f35397ca7c9fb3f4b0806c300e3b189569f8d979ca132e1a2a4dae7206396 pvalloc.patch
|
||||
e48693e6b7aeebf69a5acbf80d9a35defe4c23835121dfeb58b051ac7c527e758a41004f4d193274fe1b01c0bfb1dbc77b09cb6a404a3fdee507a2918afb0edb temp-failure-retry.patch
|
||||
1814096bc611e7f56cc5c570214dae715a4cda1fba96a6b585a73a1abc8b9161efaa799dc83887dac531dbafe9479bbe235cabe1a61cb3081e268c53a6144908 pipewire-1.4.patch
|
||||
4bc087a1e5acbb0f8f884756b40c127df88699ecd6eb42c4aff6691b87239bb6915dd102e9ef2544502a12bff011859ad497206940473e6b0a0fd75afb562a4c gperf-3.2-fix.patch
|
||||
858f8e3c544abf3ffe0f54ba303713e9b4058e15996c8dc10bab7c999d82e1960756325a41d6bebb3a00404efb8e51c299f61f60de4feaac6b621757ab85d329 0001-Reland-Use-global_allocator-to-provide-Rust-allocato.patch
|
||||
077497c1598c7db9f4c23e000e9b86e1833de4866479fd921313543ad599e141427bf38ae687f84c3da59af68f09a776265c2a569e1a7abfa80440231baef10a 0002-Call-Rust-default-allocator-directly-from-Rust.patch
|
||||
5002aa73eb19b87c702eef5b087ecb3a2679142c28cd95a5a9571aeffe24e6944497e862058ed1d609317a723cdec1678f84543235fb93f12653a92b92309efe 0003-Roll-rust-only-f7b43542838f0a4a6cfdb17fbeadf45002042.patch
|
||||
d2e414135d2b046dd9efe277f88062bcb0a94749a17a014309260b1469305d55059931b9531572713c8e516897e30fd2f5317948ece1581ffe9b7b6c01078a6d 0004-Drop-remap_alloc-dep.patch
|
||||
fe66228c0eefe3d08e2a7955b11e6a46f58f477befceba1628765fb016f30eb0bb02723aeedcabdb1ea3b84c42b5ea65073998e0a64f5ce082120fc7e65dee9a 0005-rust-Clean-up-build-rust-allocator-after-a-Rust-tool.patch
|
||||
465107da7818b237e3c144a318ab80c3c9343b51ed38b8971ef204692d13346929becbe94cefad4c153788d3a200642143584d5ca070f6304e768ba2139c19ec electron_icon.patch
|
||||
e05180199ee1d559e4e577cedd3e589844ecf40d98a86321bf1bea5607b02eeb5feb486deddae40e1005b644550331f6b8500177aa7e79bcb3750d3c1ceb76c3 electron_python-jinja-3.10.patch
|
||||
2aa340854316f1284217c0ca17cbf44953684ad6c7da90815117df30928612eb9fb9ffb734b948dfc309cd25d1a67cd57f77aac2d052a3dd9aca07a3a58cbb30 electron_webpack-hash.patch
|
||||
c7f57929943a86f9e5f333da9d5691da88038770eeb46dd0a0719962c934deb2879f0e7a1ed714e9383e38ee4d68eb754501f362c4d7cdee76cfc2e980b21272 electron_unbundle-node.patch
|
||||
4d9287d4cdfe27fbfb7be3d4b26c0c40edbd6a0c3ff926d60f2093ca09c15bcb58e20c2ccc8c0606aafd66c6d25a54225bc329cb056d8c5b297db4c6d0e768e6 electron_system-zlib-headers.patch
|
||||
7031ddb61a858e95d83366185a53b5a2e4be9abe0aa4957543e0621cad57175ffef31bd87b8be25255184bb4cb30ec4fbced055407c6c8c7940c9e240b25d498 electron_do-not-strip-binaries.patch
|
||||
0f8f36c21cc50c80e378691265845ff10fa53953d6cd5352fe71efcba489f956e50d374d8f634dadc3569c4901a81a1f308a3e69140c0f9136e0777022b9520f electron_shell-file-dialog-drop-glibc.patch
|
||||
3fd20144ed171cf9706899a1481141c7fa3e98b17d600cdc5a3a68ba39059cebd9e5ccb5534af3e262f689df381bc3cb630ac24e46dd6f6c72eac4f4b6b14b35 electron_use-system-yarn.patch
|
||||
e8ea87c547546011c4c8fc2de30e4f443b85cd4cfcff92808e2521d2f9ada03feefb8e1b0cf0f6b460919c146e56ef8d5ad4bb5e2461cc5247c30d92eb4d068e default.conf
|
||||
191559fc7aa1ea0353c6fb0cc321ee1d5803a0e44848c8be941cfab96277b0de6a59962d373e2a2a1686c8f9be2bcf2d2f33706759a339a959e297d3f7fda463 electron.desktop
|
||||
5f7ba5ad005f196facec1c0f26108356b64cafb1e5cfa462ff714a33b8a4c757ac00bfcb080da09eb5b65032f8eb245d9676a61ec554515d125ed63912708648 electron-launcher.sh
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
This was dropped for some reason in 6951c37cecd05979b232a39e5c10e6346a0f74ef
|
||||
allows using /usr/bin/java instead of a downloaded one (that doesn't work on musl)
|
||||
--
|
||||
--- a/third_party/closure_compiler/compiler.py 2021-05-20 04:17:53.000000000 +0200
|
||||
+++ b/third_party/closure_compiler/compiler.py 2021-05-20 04:17:53.000000000 +0200
|
||||
@@ -13,8 +13,9 @@
|
||||
|
||||
|
||||
_CURRENT_DIR = os.path.join(os.path.dirname(__file__))
|
||||
-_JAVA_PATH = os.path.join(_CURRENT_DIR, "..", "jdk", "current", "bin", "java")
|
||||
-assert os.path.isfile(_JAVA_PATH), "java only allowed in android builds"
|
||||
+_JAVA_BIN = "java"
|
||||
+_JDK_PATH = os.path.join(_CURRENT_DIR, "..", "jdk", "current", "bin", "java")
|
||||
+_JAVA_PATH = _JDK_PATH if os.path.isfile(_JDK_PATH) else _JAVA_BIN
|
||||
|
||||
class Compiler(object):
|
||||
"""Runs the Closure compiler on given source files to typecheck them
|
||||
|
|
@ -1,14 +1,12 @@
|
|||
--- ./build/config/compiler/BUILD.gn.orig
|
||||
+++ ./build/config/compiler/BUILD.gn
|
||||
@@ -591,24 +591,6 @@
|
||||
@@ -658,22 +658,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- # TODO(crbug.com/40283598): This causes binary size growth and potentially
|
||||
- # other problems.
|
||||
- # TODO(crbug.com/40284925): This isn't supported by Cronet's mainline llvm version.
|
||||
- if (default_toolchain != "//build/toolchain/cros:target" &&
|
||||
- !llvm_android_mainline) {
|
||||
- if (default_toolchain != "//build/toolchain/cros:target") {
|
||||
- cflags += [
|
||||
- "-mllvm",
|
||||
- "-split-threshold-for-reg-with-hint=0",
|
||||
|
|
@ -25,58 +23,91 @@
|
|||
# TODO(crbug.com/40192287): Investigate why/if this should be needed.
|
||||
if (is_win) {
|
||||
cflags += [ "/clang:-ffp-contract=off" ]
|
||||
@@ -1045,20 +1027,6 @@
|
||||
# `-nodefaultlibs` from the linker invocation from Rust, which would be used
|
||||
# to compile dylibs on Android, such as for constructing unit test APKs.
|
||||
"-Cdefault-linker-libraries",
|
||||
-
|
||||
- # To make Rust .d files compatible with ninja
|
||||
- "-Zdep-info-omit-d-target",
|
||||
-
|
||||
- # If a macro panics during compilation, show which macro and where it is
|
||||
- # defined.
|
||||
- "-Zmacro-backtrace",
|
||||
-
|
||||
- # For deterministic builds, keep the local machine's current working
|
||||
- # directory from appearing in build outputs.
|
||||
- "-Zremap-cwd-prefix=.",
|
||||
-
|
||||
- # We use clang-rt sanitizer runtimes.
|
||||
- "-Zexternal-clangrt",
|
||||
]
|
||||
|
||||
if (!is_win || force_rustc_color_output) {
|
||||
@@ -1107,7 +1075,6 @@
|
||||
# Don't allow unstable features to be enabled by `#![feature()]` without
|
||||
# additional command line flags.
|
||||
config("disallow_unstable_features") {
|
||||
- rustflags = [ "-Zallow-features=" ]
|
||||
}
|
||||
|
||||
config("libcxx_hardening") {
|
||||
@@ -1242,8 +1209,8 @@
|
||||
}
|
||||
@@ -1273,8 +1257,8 @@
|
||||
# simplicity we always explicitly set the architecture.
|
||||
if (current_cpu == "x64") {
|
||||
if (is_clang && !is_android && !is_fuchsia && !is_chromeos_device) {
|
||||
- cflags += [ "--target=x86_64-unknown-linux-gnu" ]
|
||||
- ldflags += [ "--target=x86_64-unknown-linux-gnu" ]
|
||||
+ cflags += [ "--target=x86_64-alpine-linux-musl" ]
|
||||
+ ldflags += [ "--target=x86_64-alpine-linux-musl" ]
|
||||
} else {
|
||||
cflags += [ "-m64" ]
|
||||
ldflags += [ "-m64" ]
|
||||
@@ -1282,8 +1266,8 @@
|
||||
cflags += [ "-msse3" ]
|
||||
} else if (current_cpu == "x86") {
|
||||
if (is_clang && !is_android && !is_chromeos_device) {
|
||||
- cflags += [ "--target=i386-unknown-linux-gnu" ]
|
||||
- ldflags += [ "--target=i386-unknown-linux-gnu" ]
|
||||
+ cflags += [ "--target=i586-alpine-linux-musl" ]
|
||||
+ ldflags += [ "--target=i586-alpine-linux-musl" ]
|
||||
} else {
|
||||
cflags += [ "-m32" ]
|
||||
ldflags += [ "-m32" ]
|
||||
@@ -1294,8 +1278,8 @@
|
||||
]
|
||||
} else if (current_cpu == "arm") {
|
||||
if (is_clang && !is_android && !is_nacl && !is_chromeos_device) {
|
||||
if (is_clang && !is_android && !is_chromeos_device) {
|
||||
- cflags += [ "--target=arm-linux-gnueabihf" ]
|
||||
- ldflags += [ "--target=arm-linux-gnueabihf" ]
|
||||
+ cflags += [ "--target=armv7-alpine-linux-musleabihf" ]
|
||||
+ ldflags += [ "--target=armv7-alpine-linux-musleabihf" ]
|
||||
}
|
||||
if (!is_nacl) {
|
||||
cflags += [
|
||||
@@ -1257,8 +1224,8 @@
|
||||
cflags += [
|
||||
"-march=$arm_arch",
|
||||
@@ -1306,8 +1290,8 @@
|
||||
}
|
||||
} else if (current_cpu == "arm64") {
|
||||
if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
|
||||
!is_chromeos_device) {
|
||||
if (is_clang && !is_android && !is_fuchsia && !is_chromeos_device) {
|
||||
- cflags += [ "--target=aarch64-linux-gnu" ]
|
||||
- ldflags += [ "--target=aarch64-linux-gnu" ]
|
||||
+ cflags += [ "--target=aarch64-alpine-linux-musl" ]
|
||||
+ ldflags += [ "--target=aarch64-alpine-linux-musl" ]
|
||||
}
|
||||
} else if (current_cpu == "mipsel" && !is_nacl) {
|
||||
} else if (current_cpu == "mipsel") {
|
||||
ldflags += [ "-Wl,--hash-style=sysv" ]
|
||||
@@ -2086,7 +2053,7 @@
|
||||
@@ -1551,22 +1535,22 @@
|
||||
ldflags += [ "-maix64" ]
|
||||
}
|
||||
} else if (is_clang) {
|
||||
- cflags += [ "--target=powerpc64le-unknown-linux-gnu" ]
|
||||
- ldflags += [ "--target=powerpc64le-unknown-linux-gnu" ]
|
||||
+ cflags += [ "--target=powerpc64le-alpine-linux-musl" ]
|
||||
+ ldflags += [ "--target=powerpc64le-alpine-linux-musl" ]
|
||||
} else {
|
||||
cflags += [ "-m64" ]
|
||||
ldflags += [ "-m64" ]
|
||||
}
|
||||
} else if (current_cpu == "riscv64") {
|
||||
if (is_clang && !is_android) {
|
||||
- cflags += [ "--target=riscv64-linux-gnu" ]
|
||||
- ldflags += [ "--target=riscv64-linux-gnu" ]
|
||||
+ cflags += [ "--target=riscv64-alpine-linux-musl" ]
|
||||
+ ldflags += [ "--target=riscv64-alpine-linux-musl" ]
|
||||
}
|
||||
cflags += [ "-mabi=lp64d" ]
|
||||
} else if (current_cpu == "loong64") {
|
||||
if (is_clang) {
|
||||
- cflags += [ "--target=loongarch64-linux-gnu" ]
|
||||
- ldflags += [ "--target=loongarch64-linux-gnu" ]
|
||||
+ cflags += [ "--target=loongarch64-alpine-linux-musl" ]
|
||||
+ ldflags += [ "--target=loongarch64-alpine-linux-musl" ]
|
||||
}
|
||||
cflags += [
|
||||
"-mabi=lp64d",
|
||||
@@ -1574,8 +1558,8 @@
|
||||
]
|
||||
} else if (current_cpu == "s390x") {
|
||||
if (is_clang) {
|
||||
- cflags += [ "--target=s390x-unknown-linux-gnu" ]
|
||||
- ldflags += [ "--target=s390x-unknown-linux-gnu" ]
|
||||
+ cflags += [ "--target=s390x-alpine-linux-musl" ]
|
||||
+ ldflags += [ "--target=s390x-alpine-linux-musl" ]
|
||||
}
|
||||
cflags += [ "-m64" ]
|
||||
ldflags += [ "-m64" ]
|
||||
@@ -2274,7 +2258,7 @@
|
||||
defines = [ "_HAS_NODISCARD" ]
|
||||
}
|
||||
} else {
|
||||
|
|
@ -87,51 +118,59 @@
|
|||
cflags += [ "-Wextra" ]
|
||||
--- ./build/config/rust.gni.orig
|
||||
+++ ./build/config/rust.gni
|
||||
@@ -198,13 +198,13 @@
|
||||
@@ -178,11 +178,11 @@
|
||||
rust_abi_target = ""
|
||||
if (is_linux || is_chromeos) {
|
||||
if (current_cpu == "arm64") {
|
||||
- rust_abi_target = "aarch64-unknown-linux-gnu"
|
||||
+ rust_abi_target = "aarch64-alpine-linux-musl"
|
||||
cargo_target_abi = ""
|
||||
} else if (current_cpu == "x86") {
|
||||
- rust_abi_target = "i686-unknown-linux-gnu"
|
||||
+ rust_abi_target = "i586-alpine-linux-musl"
|
||||
cargo_target_abi = ""
|
||||
} else if (current_cpu == "x64") {
|
||||
- rust_abi_target = "x86_64-unknown-linux-gnu"
|
||||
+ rust_abi_target = "x86_64-alpine-linux-musl"
|
||||
cargo_target_abi = ""
|
||||
} else if (current_cpu == "arm") {
|
||||
if (arm_float_abi == "hard") {
|
||||
@@ -214,18 +214,18 @@
|
||||
}
|
||||
if (arm_arch == "armv7-a" || arm_arch == "armv7") {
|
||||
# No way to inform Rust about the -a suffix.
|
||||
- rust_abi_target = "armv7-unknown-linux-gnueabi" + float_suffix
|
||||
float_suffix = "hf"
|
||||
@@ -200,25 +200,21 @@
|
||||
# The thumbv7 vs. armv7 distinction is for legacy reasons and both
|
||||
# targets in fact target Thumb, see:
|
||||
# https://github.com/rust-lang/rust/issues/44722
|
||||
- if (arm_use_neon) {
|
||||
- rust_abi_target = "thumbv7neon-unknown-linux-gnueabi" + float_suffix
|
||||
- } else {
|
||||
- rust_abi_target = "armv7-unknown-linux-gnueabi" + float_suffix
|
||||
- }
|
||||
+ rust_abi_target = "armv7-alpine-linux-musleabi" + float_suffix
|
||||
cargo_target_abi = "eabi" + float_suffix
|
||||
} else {
|
||||
- rust_abi_target = "arm-unknown-linux-gnueabi" + float_suffix
|
||||
+ rust_abi_target = "armv6-alpine-linux-musleabi" + float_suffix
|
||||
cargo_target_abi = "eabi" + float_suffix
|
||||
}
|
||||
} else if (current_cpu == "riscv64") {
|
||||
- rust_abi_target = "riscv64gc-unknown-linux-gnu"
|
||||
+ rust_abi_target = "riscv64-alpine-linux-musl"
|
||||
cargo_target_abi = ""
|
||||
} else if (current_cpu == "ppc64") {
|
||||
- rust_abi_target = "powerpc64le-unknown-linux-gnu"
|
||||
+ rust_abi_target = "powerpc64le-alpine-linux-musl"
|
||||
} else if (current_cpu == "s390x") {
|
||||
- rust_abi_target = "s390x-unknown-linux-gnu"
|
||||
+ rust_abi_target = "s390x-alpine-linux-musl"
|
||||
} else if (current_cpu == "loong64") {
|
||||
- rust_abi_target = "loongarch64-unknown-linux-gnu"
|
||||
+ rust_abi_target = "loongarch64-alpine-linux-musl"
|
||||
} else {
|
||||
# Best guess for other future platforms.
|
||||
- rust_abi_target = current_cpu + "-unknown-linux-gnu"
|
||||
+ rust_abi_target = current_cpu + "-alpine-linux-musl"
|
||||
cargo_target_abi = ""
|
||||
}
|
||||
} else if (is_android) {
|
||||
import("//build/config/android/abi.gni")
|
||||
--- ./build/config/clang/BUILD.gn.orig
|
||||
+++ ./build/config/clang/BUILD.gn
|
||||
@@ -128,14 +128,15 @@
|
||||
} else if (is_apple) {
|
||||
_dir = "darwin"
|
||||
@@ -207,22 +207,23 @@
|
||||
assert(false) # Unhandled cpu type
|
||||
}
|
||||
} else if (is_linux || is_chromeos) {
|
||||
+ _dir = "linux"
|
||||
if (current_cpu == "x64") {
|
||||
|
|
@ -146,16 +185,18 @@
|
|||
} else if (current_cpu == "arm64") {
|
||||
- _dir = "aarch64-unknown-linux-gnu"
|
||||
+ _suffix = "-aarch64"
|
||||
} else if (current_cpu == "loong64") {
|
||||
- _dir = "loongarch64-unknown-linux-gnu"
|
||||
+ _suffix = "-loongarch64"
|
||||
} else if (current_cpu == "riscv64") {
|
||||
- _dir = "riscv64-unknown-linux-gnu"
|
||||
+ _suffix = "-riscv64"
|
||||
} else if (current_cpu == "ppc64") {
|
||||
- _dir = "ppc64le-unknown-linux-gnu"
|
||||
+ _suffix = "-powerpc64le"
|
||||
} else if (current_cpu == "s390x") {
|
||||
- _dir = "s390x-unknown-linux-gnu"
|
||||
+ _suffix = "-s390x"
|
||||
} else {
|
||||
assert(false) # Unhandled cpu type
|
||||
}
|
||||
--- ./build/config/gcc/BUILD.gn.orig
|
||||
+++ ./build/config/gcc/BUILD.gn
|
||||
@@ -32,7 +32,6 @@
|
||||
# See http://gcc.gnu.org/wiki/Visibility
|
||||
config("symbol_visibility_hidden") {
|
||||
cflags = [ "-fvisibility=hidden" ]
|
||||
- rustflags = [ "-Zdefault-visibility=hidden" ]
|
||||
|
||||
# Visibility attribute is not supported on AIX.
|
||||
if (current_os != "aix") {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn
|
|||
index f36bf68..805d9a6 100644
|
||||
--- a/net/dns/BUILD.gn
|
||||
+++ b/net/dns/BUILD.gn
|
||||
@@ -130,8 +130,8 @@ source_set("dns") {
|
||||
@@ -142,8 +142,8 @@
|
||||
]
|
||||
} else if (is_linux) {
|
||||
sources += [
|
||||
|
|
@ -13,3 +13,11 @@ index f36bf68..805d9a6 100644
|
|||
]
|
||||
} else if (is_posix) {
|
||||
sources += [
|
||||
@@ -455,7 +455,6 @@
|
||||
if (is_android) {
|
||||
sources += [ "dns_config_service_android_unittest.cc" ]
|
||||
} else if (is_linux) {
|
||||
- sources += [ "dns_config_service_linux_unittest.cc" ]
|
||||
} else if (is_posix) {
|
||||
sources += [ "dns_config_service_posix_unittest.cc" ]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,86 +2,6 @@ safesprintf emitnull:
|
|||
error: conversion from 'std::nullptr_t' to 'const internal::Arg' is ambiguous
|
||||
const internal::Arg arg_array[] = { args... };
|
||||
|
||||
flatmap incompletetype:
|
||||
error: static assertion failed due to requirement 'std::__is_complete_or_unbounded(std::__type_identity<std::pair<A, A>>{})': template argument must be a complete class or an unbounded array
|
||||
static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
|
||||
|
||||
i18n, time:
|
||||
various icu failures (new icu time formatting? internal api difference?)
|
||||
a ton of these fail:
|
||||
|
||||
Expected equality of these values:
|
||||
u"Monday 16 May – Saturday 28 May"
|
||||
Which is: u"Monday 16 May \x2013 Saturday 28 May"
|
||||
DateIntervalFormat(begin_time, end_time, DATE_FORMAT_MONTH_WEEKDAY_DAY)
|
||||
Which is: u"Monday 16\x2009\x2013\x2009Saturday 28 May"
|
||||
|
||||
../../base/i18n/time_formatting_unittest.cc:84: Failure
|
||||
Expected equality of these values:
|
||||
clock12h_pm
|
||||
Which is: u"3:42 PM"
|
||||
TimeFormatTimeOfDay(time)
|
||||
Which is: u"3:42\x202FPM"
|
||||
|
||||
.. and so on
|
||||
|
||||
fileutiltest filetofile:
|
||||
../../base/files/file_util_unittest.cc:2692: Failure
|
||||
Value of: stream
|
||||
Actual: true
|
||||
Expected: false
|
||||
|
||||
stacktracetest: crashes (this doesn't seem to use execinfo so probably relies on glibc internal layout for tracing here)
|
||||
|
||||
platformthreadtest canchangethreadtype:
|
||||
../../base/threading/platform_thread_unittest.cc:445: Failure
|
||||
Expected equality of these values:
|
||||
PlatformThread::CanChangeThreadType(ThreadType::kBackground, ThreadType::kResourceEfficient)
|
||||
Which is: true
|
||||
kCanIncreasePriority
|
||||
Which is: false
|
||||
|
||||
scopedfdownershiptrackingtest crashonunownedclose: fails due to scoped-file-no-close.patch
|
||||
|
||||
stackcontainer customallocator:
|
||||
../../base/containers/stack_container_unittest.cc:211: Failure
|
||||
Expected equality of these values:
|
||||
1
|
||||
Allocator::deallocated
|
||||
Which is: 0
|
||||
|
||||
nativelibrarytest loadlibrarypreferownsymbols: crashes (probably musl dlopen does not play nice here)
|
||||
|
||||
spantest empty: crashes (this looks fishy)
|
||||
|
||||
readelfbuildid: crashes (this looks like glibc dynamic linker semantics)
|
||||
|
||||
nss db unittest: various nss failures: e.g.:
|
||||
../../net/cert/nss_cert_database_unittest.cc:209: Failure
|
||||
Expected equality of these values:
|
||||
OK
|
||||
Which is: 0
|
||||
cert_db_->ImportFromPKCS12(GetPublicSlot(), pkcs12_data, u"12345", true, nullptr)
|
||||
Which is: -702
|
||||
|
||||
processutiltest cloneflags: fails in CI (ulimit? too many threads?)
|
||||
../../base/process/process_util_unittest.cc:1434: Failure
|
||||
Value of: process.IsValid()
|
||||
Actual: false
|
||||
Expected: true
|
||||
|
||||
addresstrackerlinuxnetlinktest:
|
||||
../../net/base/address_tracker_linux_unittest.cc:886: Failure
|
||||
Value of: child.process.IsValid()
|
||||
Actual: false
|
||||
Expected: true
|
||||
|
||||
ToAddressDoesNotDereference: ; Expected `get_for_extraction_cnt` to be 1 but got 0;
|
||||
|
||||
DataCapturedManyThreads: flaky
|
||||
|
||||
ProcessAlternativeServicesTest.Process*: crashed ?
|
||||
|
||||
--- a/base/strings/safe_sprintf_unittest.cc
|
||||
+++ b/base/strings/safe_sprintf_unittest.cc
|
||||
@@ -740,6 +740,7 @@
|
||||
|
|
@ -100,244 +20,3 @@ ProcessAlternativeServicesTest.Process*: crashed ?
|
|||
|
||||
TEST(SafeSPrintfTest, PointerSize) {
|
||||
// The internal data representation is a 64bit value, independent of the
|
||||
--- a/base/containers/flat_map_unittest.cc
|
||||
+++ b/base/containers/flat_map_unittest.cc
|
||||
@@ -52,6 +52,7 @@
|
||||
|
||||
} // namespace
|
||||
|
||||
+#if 0
|
||||
TEST(FlatMap, IncompleteType) {
|
||||
struct A {
|
||||
using Map = flat_map<A, A>;
|
||||
@@ -65,6 +66,7 @@
|
||||
|
||||
A a;
|
||||
}
|
||||
+#endif
|
||||
|
||||
TEST(FlatMap, RangeConstructor) {
|
||||
flat_map<int, int>::value_type input_vals[] = {
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -3194,21 +3194,6 @@
|
||||
"hash/md5_constexpr_unittest.cc",
|
||||
"hash/md5_unittest.cc",
|
||||
"hash/sha1_unittest.cc",
|
||||
- "i18n/break_iterator_unittest.cc",
|
||||
- "i18n/case_conversion_unittest.cc",
|
||||
- "i18n/char_iterator_unittest.cc",
|
||||
- "i18n/character_encoding_unittest.cc",
|
||||
- "i18n/file_util_icu_unittest.cc",
|
||||
- "i18n/icu_string_conversions_unittest.cc",
|
||||
- "i18n/icu_util_unittest.cc",
|
||||
- "i18n/message_formatter_unittest.cc",
|
||||
- "i18n/number_formatting_unittest.cc",
|
||||
- "i18n/rtl_unittest.cc",
|
||||
- "i18n/streaming_utf8_validator_unittest.cc",
|
||||
- "i18n/string_search_unittest.cc",
|
||||
- "i18n/time_formatting_unittest.cc",
|
||||
- "i18n/timezone_unittest.cc",
|
||||
- "i18n/transliterator_unittest.cc",
|
||||
"immediate_crash_unittest.cc",
|
||||
"json/json_parser_unittest.cc",
|
||||
"json/json_reader_unittest.cc",
|
||||
--- a/base/files/file_util_unittest.cc
|
||||
+++ b/base/files/file_util_unittest.cc
|
||||
@@ -2686,6 +2686,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+#if 0
|
||||
TEST_F(FileUtilTest, FileToFILE) {
|
||||
File file;
|
||||
FILE* stream = FileToFILE(std::move(file), "w");
|
||||
@@ -2700,6 +2701,7 @@
|
||||
EXPECT_FALSE(file.IsValid());
|
||||
EXPECT_TRUE(CloseFile(stream));
|
||||
}
|
||||
+#endif
|
||||
|
||||
TEST_F(FileUtilTest, FILEToFile) {
|
||||
ScopedFILE stream;
|
||||
--- a/base/threading/platform_thread_unittest.cc
|
||||
+++ b/base/threading/platform_thread_unittest.cc
|
||||
@@ -416,6 +416,7 @@
|
||||
// platforms for all priorities. This not being the case. This test documents
|
||||
// and hardcodes what we know. Please inform scheduler-dev@chromium.org if this
|
||||
// proprerty changes for a given platform.
|
||||
+#if 0
|
||||
TEST(PlatformThreadTest, CanChangeThreadType) {
|
||||
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||||
// On Ubuntu, RLIMIT_NICE and RLIMIT_RTPRIO are 0 by default, so we won't be
|
||||
@@ -472,6 +473,7 @@
|
||||
ThreadType::kBackground));
|
||||
#endif
|
||||
}
|
||||
+#endif
|
||||
|
||||
TEST(PlatformThreadTest, SetCurrentThreadTypeTest) {
|
||||
TestPriorityResultingFromThreadType(ThreadType::kBackground,
|
||||
--- a/base/files/scoped_file_linux_unittest.cc
|
||||
+++ b/base/files/scoped_file_linux_unittest.cc
|
||||
@@ -42,11 +42,13 @@
|
||||
EXPECT_DEATH(ScopedFD(fd.get()), "");
|
||||
}
|
||||
|
||||
+#if 0
|
||||
TEST_F(ScopedFDOwnershipTrackingTest, CrashOnUnownedClose) {
|
||||
ScopedFD fd = OpenFD();
|
||||
subtle::EnableFDOwnershipEnforcement(true);
|
||||
EXPECT_DEATH(close(fd.get()), "");
|
||||
}
|
||||
+#endif
|
||||
|
||||
#endif // defined(GTEST_HAS_DEATH_TEST)
|
||||
|
||||
--- a/base/native_library_unittest.cc
|
||||
+++ b/base/native_library_unittest.cc
|
||||
@@ -139,6 +139,7 @@
|
||||
// Verifies that the |prefer_own_symbols| option satisfies its guarantee that
|
||||
// a loaded library will always prefer local symbol resolution before
|
||||
// considering global symbols.
|
||||
+#if 0
|
||||
TEST(NativeLibraryTest, LoadLibraryPreferOwnSymbols) {
|
||||
NativeLibraryOptions options;
|
||||
options.prefer_own_symbols = true;
|
||||
@@ -171,6 +172,7 @@
|
||||
EXPECT_EQ(2, NativeLibraryTestIncrement());
|
||||
EXPECT_EQ(3, NativeLibraryTestIncrement());
|
||||
}
|
||||
+#endif
|
||||
|
||||
#endif // !BUILDFLAG(IS_ANDROID) && !defined(THREAD_SANITIZER) && \
|
||||
// !defined(MEMORY_SANITIZER)
|
||||
--- a/base/containers/span_unittest.cc
|
||||
+++ b/base/containers/span_unittest.cc
|
||||
@@ -995,6 +995,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+#if 0
|
||||
TEST(SpanTest, Empty) {
|
||||
{
|
||||
span<int> span;
|
||||
@@ -1014,6 +1015,7 @@
|
||||
EXPECT_TRUE(span_of_checked_iterators.empty());
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
TEST(SpanTest, OperatorAt) {
|
||||
static constexpr int kArray[] = {1, 6, 1, 8, 0};
|
||||
--- a/base/debug/elf_reader_unittest.cc
|
||||
+++ b/base/debug/elf_reader_unittest.cc
|
||||
@@ -194,6 +194,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+#if 0
|
||||
TEST(ElfReaderTestWithCurrentImage, ReadElfBuildId) {
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
// On Android the library loader memory maps the full so file.
|
||||
@@ -229,6 +230,7 @@
|
||||
UnloadNativeLibrary(library);
|
||||
#endif
|
||||
}
|
||||
+#endif
|
||||
|
||||
} // namespace debug
|
||||
} // namespace base
|
||||
--- a/net/BUILD.gn
|
||||
+++ b/net/BUILD.gn
|
||||
@@ -4826,7 +4826,6 @@
|
||||
sources += [
|
||||
"cert/internal/system_trust_store_nss_unittest.cc",
|
||||
"cert/internal/trust_store_nss_unittest.cc",
|
||||
- "cert/nss_cert_database_unittest.cc",
|
||||
"cert/x509_util_nss_unittest.cc",
|
||||
]
|
||||
if (!is_castos) {
|
||||
--- a/base/process/process_util_unittest.cc
|
||||
+++ b/base/process/process_util_unittest.cc
|
||||
@@ -1419,7 +1419,7 @@
|
||||
return kSuccess;
|
||||
}
|
||||
|
||||
-#if defined(CLONE_NEWUSER) && defined(CLONE_NEWPID)
|
||||
+#if 0 && defined(CLONE_NEWUSER) && defined(CLONE_NEWPID)
|
||||
TEST_F(ProcessUtilTest, CloneFlags) {
|
||||
if (!PathExists(FilePath("/proc/self/ns/user")) ||
|
||||
!PathExists(FilePath("/proc/self/ns/pid"))) {
|
||||
--- a/net/base/address_tracker_linux_unittest.cc
|
||||
+++ b/net/base/address_tracker_linux_unittest.cc
|
||||
@@ -831,6 +831,7 @@
|
||||
//
|
||||
// This test creates multiple concurrent `AddressTrackerLinux` instances in
|
||||
// separate processes, each in their own PID namespaces.
|
||||
+#if 0
|
||||
TEST(AddressTrackerLinuxNetlinkTest, TestInitializeTwoTrackersInPidNamespaces) {
|
||||
// This test initializes `kNumChildren` instances of `AddressTrackerLinux` in
|
||||
// tracking mode, each in their own child process running in a PID namespace.
|
||||
@@ -901,6 +902,7 @@
|
||||
ASSERT_EQ(exit_code, 0);
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
MULTIPROCESS_TEST_MAIN(ChildProcessInitializeTrackerForTesting) {
|
||||
base::test::TaskEnvironment task_env(
|
||||
--- a/base/trace_event/trace_event_unittest.cc
|
||||
+++ b/base/trace_event/trace_event_unittest.cc
|
||||
@@ -1368,6 +1368,7 @@
|
||||
}
|
||||
|
||||
// Test that data sent from multiple threads is gathered
|
||||
+#if 0
|
||||
TEST_F(TraceEventTestFixture, DataCapturedManyThreads) {
|
||||
BeginTrace();
|
||||
|
||||
@@ -1408,6 +1409,7 @@
|
||||
delete task_complete_events[i];
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
// Test that thread and process names show up in the trace.
|
||||
// In SDK build, thread names are not tracked inside //base. Instead, there's
|
||||
--- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_unittest.cc
|
||||
+++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_unittest.cc
|
||||
@@ -1481,6 +1481,7 @@
|
||||
// `base::to_address()` will use the dereference operator. This is not
|
||||
// what we want; this test enforces extraction semantics for
|
||||
// `to_address()`.
|
||||
+#if 0
|
||||
TEST_F(RawPtrTest, ToAddressDoesNotDereference) {
|
||||
CountingRawPtr<int> ptr = nullptr;
|
||||
int* raw = base::to_address(ptr);
|
||||
@@ -1492,6 +1493,7 @@
|
||||
.get_for_duplication_cnt = 0}),
|
||||
CountersMatch());
|
||||
}
|
||||
+#endif
|
||||
|
||||
TEST_F(RawPtrTest, ToAddressGivesBackRawAddress) {
|
||||
int* raw = nullptr;
|
||||
--- a/net/http/http_stream_factory_unittest.cc
|
||||
+++ b/net/http/http_stream_factory_unittest.cc
|
||||
@@ -3477,6 +3477,7 @@
|
||||
DefaultCTPolicyEnforcer ct_policy_enforcer_;
|
||||
};
|
||||
|
||||
+#if 0
|
||||
TEST_F(ProcessAlternativeServicesTest, ProcessEmptyAltSvc) {
|
||||
session_ =
|
||||
std::make_unique<HttpNetworkSession>(session_params_, session_context_);
|
||||
@@ -3585,6 +3586,7 @@
|
||||
alternatives[0].host_port_pair());
|
||||
EXPECT_EQ(0u, alternatives[0].advertised_versions().size());
|
||||
}
|
||||
+#endif
|
||||
|
||||
} // namespace
|
||||
|
||||
|
|
|
|||
127
backports/electron/electron_do-not-strip-binaries.patch
Normal file
127
backports/electron/electron_do-not-strip-binaries.patch
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
diff --git a/electron/BUILD.gn.orig b/electron/BUILD.gn
|
||||
index b08f434..4062428 100644
|
||||
--- a/electron/BUILD.gn.orig
|
||||
+++ b/electron/BUILD.gn
|
||||
@@ -44,7 +44,6 @@ if (is_mac) {
|
||||
|
||||
if (is_linux) {
|
||||
import("//build/config/linux/pkg_config.gni")
|
||||
- import("//electron/build/linux/strip_binary.gni")
|
||||
import("//tools/generate_stubs/rules.gni")
|
||||
|
||||
pkg_config("gio_unix") {
|
||||
@@ -1424,18 +1423,6 @@ dist_zip("electron_dist_zip") {
|
||||
":licenses",
|
||||
]
|
||||
if (is_linux) {
|
||||
- if (is_official_build) {
|
||||
- data_deps += [
|
||||
- ":strip_chrome_crashpad_handler",
|
||||
- ":strip_chrome_sandbox",
|
||||
- ":strip_electron_binary",
|
||||
- ":strip_libEGL_shlib",
|
||||
- ":strip_libGLESv2_shlib",
|
||||
- ":strip_libffmpeg_shlib",
|
||||
- ":strip_libvk_swiftshader_shlib",
|
||||
- ]
|
||||
- }
|
||||
-
|
||||
data_deps += [ "//sandbox/linux:chrome_sandbox" ]
|
||||
}
|
||||
deps = data_deps
|
||||
@@ -1481,16 +1468,6 @@ group("electron_mksnapshot") {
|
||||
|
||||
dist_zip("electron_mksnapshot_zip") {
|
||||
data_deps = mksnapshot_deps
|
||||
- if (is_linux && is_official_build) {
|
||||
- data_deps += [
|
||||
- ":strip_libEGL_shlib",
|
||||
- ":strip_libGLESv2_shlib",
|
||||
- ":strip_libffmpeg_shlib",
|
||||
- ":strip_libvk_swiftshader_shlib",
|
||||
- ":strip_mksnapshot_binary",
|
||||
- ":strip_v8_context_snapshot_generator_binary",
|
||||
- ]
|
||||
- }
|
||||
deps = data_deps
|
||||
outputs = [ "$root_build_dir/mksnapshot.zip" ]
|
||||
}
|
||||
@@ -1637,78 +1614,3 @@ group("release_build") {
|
||||
]
|
||||
}
|
||||
}
|
||||
-
|
||||
-if (is_linux && is_official_build) {
|
||||
- strip_binary("strip_electron_binary") {
|
||||
- binary_input = "$root_out_dir/$electron_project_name"
|
||||
- symbol_output = "$root_out_dir/debug/$electron_project_name.debug"
|
||||
- compress_debug_sections = true
|
||||
- deps = [ ":electron_app" ]
|
||||
- }
|
||||
-
|
||||
- strip_binary("strip_chrome_crashpad_handler") {
|
||||
- binary_input = "$root_out_dir/chrome_crashpad_handler"
|
||||
- symbol_output = "$root_out_dir/debug/chrome_crashpad_handler.debug"
|
||||
- compress_debug_sections = true
|
||||
- deps = [ "//components/crash/core/app:chrome_crashpad_handler" ]
|
||||
- }
|
||||
-
|
||||
- strip_binary("strip_chrome_sandbox") {
|
||||
- binary_input = "$root_out_dir/chrome_sandbox"
|
||||
- symbol_output = "$root_out_dir/debug/chrome-sandbox.debug"
|
||||
- compress_debug_sections = true
|
||||
- deps = [ "//sandbox/linux:chrome_sandbox" ]
|
||||
- }
|
||||
-
|
||||
- strip_binary("strip_libEGL_shlib") {
|
||||
- binary_input = "$root_out_dir/libEGL.so"
|
||||
- symbol_output = "$root_out_dir/debug/libEGL.so.debug"
|
||||
- compress_debug_sections = true
|
||||
- deps = [ "//third_party/angle:libEGL" ]
|
||||
- }
|
||||
-
|
||||
- strip_binary("strip_libGLESv2_shlib") {
|
||||
- binary_input = "$root_out_dir/libGLESv2.so"
|
||||
- symbol_output = "$root_out_dir/debug/libGLESv2.so.debug"
|
||||
- compress_debug_sections = true
|
||||
- deps = [ "//third_party/angle:libGLESv2" ]
|
||||
- }
|
||||
-
|
||||
- strip_binary("strip_libffmpeg_shlib") {
|
||||
- binary_input = "$root_out_dir/libffmpeg.so"
|
||||
- symbol_output = "$root_out_dir/debug/libffmpeg.so.debug"
|
||||
- compress_debug_sections = true
|
||||
- deps = [ "//third_party/ffmpeg" ]
|
||||
- }
|
||||
-
|
||||
- strip_binary("strip_libvk_swiftshader_shlib") {
|
||||
- binary_input = "$root_out_dir/libvk_swiftshader.so"
|
||||
- symbol_output = "$root_out_dir/debug/libvk_swiftshader.so.debug"
|
||||
- compress_debug_sections = true
|
||||
- deps = [ "//third_party/swiftshader/src/Vulkan:swiftshader_libvulkan" ]
|
||||
- }
|
||||
-
|
||||
- strip_binary("strip_mksnapshot_binary") {
|
||||
- _binary_path = rebase_path(
|
||||
- get_label_info(
|
||||
- ":v8_context_snapshot_generator($v8_snapshot_toolchain)",
|
||||
- "root_out_dir") + "/mksnapshot",
|
||||
- root_build_dir)
|
||||
- binary_input = "$root_out_dir/$_binary_path"
|
||||
- symbol_output = "$root_out_dir/debug/${_binary_path}.debug"
|
||||
- compress_debug_sections = true
|
||||
- deps = mksnapshot_deps
|
||||
- }
|
||||
-
|
||||
- strip_binary("strip_v8_context_snapshot_generator_binary") {
|
||||
- _binary_path = rebase_path(
|
||||
- get_label_info(
|
||||
- ":v8_context_snapshot_generator($v8_snapshot_toolchain)",
|
||||
- "root_out_dir") + "/v8_context_snapshot_generator",
|
||||
- root_build_dir)
|
||||
- binary_input = "$root_out_dir/$_binary_path"
|
||||
- symbol_output = "$root_out_dir/debug/${_binary_path}.debug"
|
||||
- compress_debug_sections = true
|
||||
- deps = mksnapshot_deps
|
||||
- }
|
||||
-}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
diff --git a/./electron/shell/browser/ui/file_dialog.h.orig b/./electron/shell/browser/ui/file_dialog.h
|
||||
index 6cdfc7b..f7757da 100644
|
||||
--- a/./electron/shell/browser/ui/file_dialog.h.orig
|
||||
+++ b/./electron/shell/browser/ui/file_dialog.h
|
||||
@@ -13,10 +13,6 @@
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/raw_ptr_exclusion.h"
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX)
|
||||
-#include <bits/stdint-uintn.h>
|
||||
-#endif
|
||||
-
|
||||
namespace electron {
|
||||
class NativeWindow;
|
||||
}
|
||||
|
||||
17
backports/electron/electron_use-system-yarn.patch
Normal file
17
backports/electron/electron_use-system-yarn.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
diff --git a/electron/.yarnrc.yml.orig b/electron/.yarnrc.yml
|
||||
index ca0a580..a388ff9 100644
|
||||
--- a/electron/.yarnrc.yml.orig
|
||||
+++ b/electron/.yarnrc.yml
|
||||
@@ -1,12 +1,3 @@
|
||||
enableScripts: false
|
||||
|
||||
-nmHoistingLimits: workspaces
|
||||
-
|
||||
nodeLinker: node-modules
|
||||
-
|
||||
-npmMinimalAgeGate: 10080
|
||||
-
|
||||
-npmPreapprovedPackages:
|
||||
- - "@electron/*"
|
||||
-
|
||||
-yarnPath: .yarn/releases/yarn-4.12.0.cjs
|
||||
|
|
@ -1,12 +1,10 @@
|
|||
instead of hardcoding the version, use the defined macro.
|
||||
--
|
||||
--- a/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
|
||||
+++ b/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
|
||||
--- ./third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc.orig
|
||||
+++ ./third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
|
||||
@@ -56,7 +56,7 @@
|
||||
FcFini();
|
||||
|
||||
// Check existence of intended fontconfig cache file.
|
||||
- auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-9";
|
||||
- auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-11";
|
||||
+ auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-" + FC_CACHE_VERSION;
|
||||
bool cache_exists = access(cache.c_str(), F_OK) == 0;
|
||||
return !cache_exists;
|
||||
|
|
|
|||
13
backports/electron/fix-ffmpeg-codec-list.patch
Normal file
13
backports/electron/fix-ffmpeg-codec-list.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
--- a/media/ffmpeg/ffmpeg_common.cc
|
||||
+++ b/media/ffmpeg/ffmpeg_common.cc
|
||||
@@ -1046,8 +1046,8 @@
|
||||
|
||||
// This should match the configured lists in //third_party/ffmpeg.
|
||||
static constexpr std::string_view kAllowedAudioCodecs =
|
||||
- "vorbis,libopus,flac,pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,"
|
||||
- "mp3,pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw" EXTRA_CODECS;
|
||||
+ "vorbis,opus,libopus,flac,pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,"
|
||||
+ "mp3float,mp3,pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw" EXTRA_CODECS;
|
||||
#undef EXTRA_CODECS
|
||||
|
||||
return kAllowedAudioCodecs.data();
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- a/media/ffmpeg/ffmpeg_common.cc
|
||||
+++ b/media/ffmpeg/ffmpeg_common.cc
|
||||
@@ -1025,7 +1025,7 @@
|
||||
static const base::NoDestructor<std::string> kAllowedAudioCodecs([]() {
|
||||
// This should match the configured lists in //third_party/ffmpeg.
|
||||
std::string allowed_decoders(
|
||||
- "vorbis,libopus,flac,pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,"
|
||||
+ "vorbis,opus,libopus,flac,pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,"
|
||||
"mp3,pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw");
|
||||
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
|
||||
allowed_decoders += ",aac";
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
diff --git a/third_party/blink/renderer/build/scripts/gperf.py.orig b/third_party/blink/renderer/build/scripts/gperf.py
|
||||
index 42630d3..d909aee 100644
|
||||
--- a/third_party/blink/renderer/build/scripts/gperf.py.orig
|
||||
+++ b/third_party/blink/renderer/build/scripts/gperf.py
|
||||
@@ -28,24 +28,6 @@ def generate_gperf(gperf_path, gperf_input, gperf_args):
|
||||
stdout=subprocess.PIPE,
|
||||
universal_newlines=True)
|
||||
gperf_output = gperf.communicate(gperf_input)[0]
|
||||
- # Massage gperf output to be more palatable for modern compilers.
|
||||
- # TODO(thakis): Upstream these to gperf so we don't need massaging.
|
||||
- # `register` is deprecated in C++11 and removed in C++17, so remove
|
||||
- # it from gperf's output.
|
||||
- # https://savannah.gnu.org/bugs/index.php?53028
|
||||
- gperf_output = re.sub(r'\bregister ', '', gperf_output)
|
||||
- # -Wimplicit-fallthrough needs an explicit fallthrough statement,
|
||||
- # so replace gperf's /*FALLTHROUGH*/ comment with the statement.
|
||||
- # https://savannah.gnu.org/bugs/index.php?53029
|
||||
- gperf_output = gperf_output.replace('/*FALLTHROUGH*/',
|
||||
- ' [[fallthrough]];')
|
||||
- # -Wpointer-to-int-cast warns about casting pointers to smaller ints
|
||||
- # Replace {(int)(long)&(foo), bar} with
|
||||
- # {static_cast<int>(reinterpret_cast<uintptr_t>(&(foo)), bar}
|
||||
- gperf_output = re.sub(
|
||||
- r'\(int\)\(long\)(.*?),',
|
||||
- r'static_cast<int>(reinterpret_cast<uintptr_t>(\1)),',
|
||||
- gperf_output)
|
||||
script = 'third_party/blink/renderer/build/scripts/gperf.py'
|
||||
return '// Generated by %s\n' % script + gperf_output
|
||||
except OSError:
|
||||
27
backports/electron/headless-shell-no-license.patch
Normal file
27
backports/electron/headless-shell-no-license.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
From 6f4685cff1ab8c68de98c0731bb8afaf8a05a723 Mon Sep 17 00:00:00 2001
|
||||
From: knuxify <knuxify@gmail.com>
|
||||
Date: Sat, 5 Apr 2025 14:10:37 +0200
|
||||
Subject: [PATCH] Do not generate license file for headless-shell build
|
||||
|
||||
---
|
||||
headless/BUILD.gn | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/headless/BUILD.gn b/headless/BUILD.gn
|
||||
index 798bb22..9d83f49 100644
|
||||
--- a/headless/BUILD.gn
|
||||
+++ b/headless/BUILD.gn
|
||||
@@ -934,10 +934,6 @@ executable("headless_shell") {
|
||||
|
||||
deps = [ ":headless_shell_lib" ]
|
||||
|
||||
- if (proprietary_codecs) {
|
||||
- deps += [ ":generate_headless_shell_license_file" ]
|
||||
- }
|
||||
-
|
||||
if (!headless_use_embedded_resources) {
|
||||
data = [
|
||||
"$root_out_dir/headless_lib_data.pak",
|
||||
--
|
||||
2.49.0
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- ./v8/src/base/cpu.cc.orig
|
||||
+++ ./v8/src/base/cpu.cc
|
||||
@@ -14,7 +14,7 @@
|
||||
#if V8_OS_LINUX
|
||||
#include <linux/auxvec.h> // AT_HWCAP
|
||||
#endif
|
||||
-#if V8_GLIBC_PREREQ(2, 16) || V8_OS_ANDROID
|
||||
+#if 1
|
||||
#include <sys/auxv.h> // getauxval()
|
||||
#endif
|
||||
#if V8_OS_QNX
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
use monotonic clock for pthread_cond_timedwait with musl too, since it supports
|
||||
it
|
||||
--
|
||||
--- a/v8/src/base/platform/condition-variable.cc
|
||||
+++ b/v8/src/base/platform/condition-variable.cc
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
ConditionVariable::ConditionVariable() {
|
||||
#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
|
||||
- (V8_OS_LINUX && V8_LIBC_GLIBC))
|
||||
+ V8_OS_LINUX)
|
||||
// On Free/Net/OpenBSD and Linux with glibc we can change the time
|
||||
// source for pthread_cond_timedwait() to use the monotonic clock.
|
||||
pthread_condattr_t attr;
|
||||
@@ -92,7 +92,7 @@
|
||||
&native_handle_, &mutex->native_handle(), &ts);
|
||||
#else
|
||||
#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
|
||||
- (V8_OS_LINUX && V8_LIBC_GLIBC))
|
||||
+ V8_OS_LINUX)
|
||||
// On Free/Net/OpenBSD and Linux with glibc we can change the time
|
||||
// source for pthread_cond_timedwait() to use the monotonic clock.
|
||||
result = clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
22
backports/electron/net-test-no-vpython.patch
Normal file
22
backports/electron/net-test-no-vpython.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
From 4b41417068045f11db9e7edead1447e93adb9073 Mon Sep 17 00:00:00 2001
|
||||
From: LN Liberda <lauren@selfisekai.rocks>
|
||||
Date: Sat, 28 Jun 2025 18:13:59 +0200
|
||||
Subject: [PATCH] Test net without vendored python
|
||||
|
||||
---
|
||||
net/test/python_utils.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/net/test/python_utils.cc b/net/test/python_utils.cc
|
||||
index 2cdc07dad9948..0b2d42a5bf126 100644
|
||||
--- a/net/test/python_utils.cc
|
||||
+++ b/net/test/python_utils.cc
|
||||
@@ -47,7 +47,7 @@ bool GetPython3Command(base::CommandLine* python_cmd) {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
python_cmd->SetProgram(base::FilePath(FILE_PATH_LITERAL("vpython3.bat")));
|
||||
#else
|
||||
- python_cmd->SetProgram(base::FilePath(FILE_PATH_LITERAL("vpython3")));
|
||||
+ python_cmd->SetProgram(base::FilePath(FILE_PATH_LITERAL("python3")));
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
39
backports/electron/net-test-pyws3-py3.12.patch
Normal file
39
backports/electron/net-test-pyws3-py3.12.patch
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
ssl.wrap_socket() was removed in Python 3.12, needed for net_unittests.
|
||||
Patch-Source: https://github.com/GoogleChromeLabs/pywebsocket3/pull/39
|
||||
Modified (changed path) -lnl
|
||||
|
||||
From bc50ae9d451ca705edd6101d987b839e1a09d45e Mon Sep 17 00:00:00 2001
|
||||
From: Sven Diederichs <22592421+zaurask@users.noreply.github.com>
|
||||
Date: Thu, 28 Mar 2024 18:55:28 +0100
|
||||
Subject: [PATCH] use ssl.SSLContext.wrap_socket rather than the deprecated
|
||||
ssl.wrap_socket
|
||||
|
||||
---
|
||||
pywebsocket3/websocket_server.py | 14 ++++++++------
|
||||
1 file changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/third_party/pywebsocket3/src/mod_pywebsocket/websocket_server.py b/third_party/pywebsocket3/src/mod_pywebsocket/websocket_server.py
|
||||
index e7485ec..93ad6f1 100644
|
||||
--- a/third_party/pywebsocket3/src/mod_pywebsocket/websocket_server.py
|
||||
+++ b/third_party/pywebsocket3/src/mod_pywebsocket/websocket_server.py
|
||||
@@ -157,12 +157,14 @@ class WebSocketServer(socketserver.ThreadingMixIn, BaseHTTPServer.HTTPServer):
|
||||
client_cert_ = ssl.CERT_REQUIRED
|
||||
else:
|
||||
client_cert_ = ssl.CERT_NONE
|
||||
- socket_ = ssl.wrap_socket(
|
||||
- socket_,
|
||||
- keyfile=server_options.private_key,
|
||||
- certfile=server_options.certificate,
|
||||
- ca_certs=server_options.tls_client_ca,
|
||||
- cert_reqs=client_cert_)
|
||||
+
|
||||
+ ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS)
|
||||
+ if server_options.certificate:
|
||||
+ ssl_context.load_cert_chain(certfile=server_options.certificate, keyfile=server_options.private_key)
|
||||
+ if server_options.tls_client_ca:
|
||||
+ ssl_context.load_verify_locations(server_options.tls_client_ca)
|
||||
+ ssl_context.verify_mode =client_cert_
|
||||
+ socket_ = ssl_context.wrap_socket(socket_)
|
||||
self._sockets.append((socket_, addrinfo))
|
||||
|
||||
def server_bind(self):
|
||||
|
|
@ -3,15 +3,16 @@ missing some required interface headers for it, and it's not clear how
|
|||
to make the partalloc support code for it work.
|
||||
--- ./base/allocator/partition_allocator/partition_alloc.gni.orig
|
||||
+++ ./base/allocator/partition_allocator/partition_alloc.gni
|
||||
@@ -30,7 +30,7 @@
|
||||
}
|
||||
@@ -89,8 +89,7 @@
|
||||
# TODO(crbug.com/329199197): Clean this up when experiments are complete.
|
||||
use_large_empty_slot_span_ring = true
|
||||
|
||||
has_memory_tagging =
|
||||
- current_cpu == "arm64" && is_clang && !is_asan && (is_linux || is_android)
|
||||
+ false
|
||||
-has_memory_tagging = current_cpu == "arm64" && is_clang && !is_asan &&
|
||||
- !is_hwasan && (is_linux || is_android)
|
||||
+has_memory_tagging = false
|
||||
|
||||
declare_args() {
|
||||
# Causes all the allocations to be routed via allocator_shim.cc. Usually,
|
||||
# Debug configuration.
|
||||
--- ./base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h.orig
|
||||
+++ ./base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h
|
||||
@@ -10,7 +10,7 @@
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
Patch-Source: https://webrtc-review.googlesource.com/c/src/+/380500
|
||||
---
|
||||
--- a/third_party/webrtc/modules/video_capture/linux/pipewire_session.cc
|
||||
+++ b/third_party/webrtc/modules/video_capture/linux/pipewire_session.cc
|
||||
@@ -87,7 +87,7 @@
|
||||
.param = OnNodeParam,
|
||||
};
|
||||
|
||||
- pw_node_add_listener(proxy_, &node_listener_, &node_events, this);
|
||||
+ pw_node_add_listener(reinterpret_cast<pw_node*>(proxy_), &node_listener_, &node_events, this);
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -119,7 +119,7 @@
|
||||
uint32_t id = info->params[i].id;
|
||||
if (id == SPA_PARAM_EnumFormat &&
|
||||
info->params[i].flags & SPA_PARAM_INFO_READ) {
|
||||
- pw_node_enum_params(that->proxy_, 0, id, 0, UINT32_MAX, nullptr);
|
||||
+ pw_node_enum_params(reinterpret_cast<pw_node*>(that->proxy_), 0, id, 0, UINT32_MAX, nullptr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- ./buildtools/third_party/libc++/__config_site.orig
|
||||
+++ ./buildtools/third_party/libc++/__config_site
|
||||
@@ -18,7 +18,7 @@
|
||||
/* #undef _LIBCPP_ABI_FORCE_MICROSOFT */
|
||||
/* #undef _LIBCPP_HAS_NO_THREADS */
|
||||
/* #undef _LIBCPP_HAS_NO_MONOTONIC_CLOCK */
|
||||
-/* #undef _LIBCPP_HAS_MUSL_LIBC */
|
||||
+#define _LIBCPP_HAS_MUSL_LIBC 1
|
||||
/* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */
|
||||
/* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */
|
||||
/* #undef _LIBCPP_HAS_THREAD_API_WIN32 */
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
|
||||
maintainer="lauren n. liberda <lauren@selfisekai.rocks>"
|
||||
pkgname=element-desktop
|
||||
pkgver=1.11.100
|
||||
pkgver=1.12.3
|
||||
pkgrel=1
|
||||
pkgdesc="Secure and independent communication, connected via Matrix"
|
||||
url="https://element.io/"
|
||||
arch="aarch64 x86_64" # same as electron
|
||||
license="GPL-3.0-only"
|
||||
_electronver=35
|
||||
_electronver=39
|
||||
depends="
|
||||
electron~$_electronver
|
||||
font-inconsolata
|
||||
|
|
@ -36,14 +36,15 @@ source="
|
|||
|
||||
add-alpine-targets.patch
|
||||
use-system-headers.patch
|
||||
tasje-one-hak.patch
|
||||
tasje-no-fuses.patch
|
||||
tasje-fixes.patch
|
||||
no-source-maps.patch.web
|
||||
use-system-fonts.patch.web
|
||||
|
||||
element-desktop
|
||||
"
|
||||
options="net !check" # broken
|
||||
# Avoid conflicting providers
|
||||
sonameprefix="$pkgname:"
|
||||
|
||||
# secfixes:
|
||||
# 1.11.30-r0:
|
||||
|
|
@ -94,6 +95,7 @@ prepare() {
|
|||
|
||||
msg "Fetch element-desktop dependencies"
|
||||
yarn install --frozen-lockfile --ignore-scripts
|
||||
patch -p1 -i patches/@types+auto-launch+5.0.5.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
|
@ -148,7 +150,7 @@ package() {
|
|||
|
||||
cp -r $resources/app.asar.unpacked "$pkgdir"/usr/lib/element-desktop/app.asar.unpacked
|
||||
|
||||
install -Dm644 $resources/img/element.png "$pkgdir"/usr/lib/element-desktop/img/element.png
|
||||
install -Dm644 $resources/build/icon.png "$pkgdir"/usr/lib/element-desktop/build/icon.png
|
||||
|
||||
install -Dm755 "$srcdir"/$pkgname "$pkgdir"/usr/bin/$pkgname
|
||||
|
||||
|
|
@ -159,12 +161,11 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
a8ac5180df3b204fb1947ecaa4786c9c5fdd53ffe705f4dfe97a0b051fa371fd9102c41a898e8783cf25f732674da2d987ef315f2facc7b18b20ef214ea0f81d element-desktop-1.11.100.tar.gz
|
||||
e3e50fd867f9b7388eb22778ccb97d6504a480ab4e2aa9eba10fd0f4d0324a1525c2afe6c80181567d8e554f03086a9e0994a6221cfcb0ca29700754c8f31cac element-web-1.11.100.tar.gz
|
||||
f302907165a35f4a4f069f5aec6bc28edeba3d09c75f483c818e3930ceb4e838e5bb91ad9d42019a11a661d6e656da3c1ff25507cbb281c69183aac7d499e882 element-desktop-1.12.3.tar.gz
|
||||
b845ff71ca39d7ae4dca9bb55e821bfdf911b12de5d012ba55d598f3287046fb2b525bce608925a9fa8fa7d39a4ceed9b4213d5d1c1d0c9e6b9b72154c9a35a5 element-web-1.12.3.tar.gz
|
||||
4747893ed3e43d3074e9afe1cdd668a6be0de073d439205fe8c38c5e0f4091cc76e3cd15d98818bea5139add29501d8d07e83c58e9da230a4ce5bb538d388f80 add-alpine-targets.patch
|
||||
755b17f7b828eb6920c06a6950ad4e14c32c99d22e9c05fcef7a081b5d2034adb03db3958aa5209c99fb7201f4d888c2383fc9864c5e743dd33f8b5c4925acd7 use-system-headers.patch
|
||||
92e69817fdc71f60c5c7dcbd3c7b13428cc18141cf5f27720326390f6817bec85fb1c60f8016b3a8fa275f601b16f646cda12b5e379a349368eef2f801b4de7a tasje-one-hak.patch
|
||||
a1399662bdbe5e7256d31f7bdc05070e7009d70113699856b025a1d5ab1d9b8bf1020072a08255d4eddab0874044131dec296f98a91ba5c12ca61948b1d18dbe tasje-no-fuses.patch
|
||||
a5d90dd1ec7aec0dc18b73eb3a6fd51ac1223e381c492d24e7dc0fd2ade955ac727cebbaff6ffa27c7e18d9acf712c709de3f886ee2ddf87ab3b028d3eb461c6 tasje-fixes.patch
|
||||
ec635fde026f7fce8e8cc57960b5b9dcec4418416d4867ed47711422d48f068bb58a3c9ceb7715efc9c177beca3788da6b0babc9b689ea8c0724a0395f2b85f8 no-source-maps.patch.web
|
||||
aaf46476bac403aa5204aa265fcf0654fad4c149fd74d0ec4273c051a5549943384cae3cdd62c5b78fdedfed55c11ecceb898b886e44165cbe7e30953a095cf9 use-system-fonts.patch.web
|
||||
afc588311dc3b566a754e3e7fe6b37b99a06d47b8bbce0ed9acca8ef308fdab0bd1d41b406199e5cbdd86bdce695ff847cd8668857a235cbdc292ad8b899c063 element-desktop
|
||||
|
|
|
|||
|
|
@ -5,9 +5,22 @@ thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:
|
|||
FileAlreadyWritten("/node_modules/keytar/package.json")', src/main.rs:200:18
|
||||
```
|
||||
|
||||
console.log interferes with tasje, which reads config from node stdout
|
||||
|
||||
--- ./electron-builder.ts.orig
|
||||
+++ ./electron-builder.ts
|
||||
@@ -74,10 +74,6 @@
|
||||
@@ -72,10 +72,6 @@
|
||||
console.warn(`No VARIANT_PATH specified, using default variant configuration '${DEFAULT_VARIANT}':`);
|
||||
}
|
||||
|
||||
-for (const key in variant) {
|
||||
- console.log(`${key}: ${variant[key]}`);
|
||||
-}
|
||||
-
|
||||
interface Configuration extends BaseConfiguration {
|
||||
extraMetadata: Partial<Pick<Pkg, "version">> & ExtraMetadata;
|
||||
linux: BaseConfiguration["linux"];
|
||||
@@ -112,10 +108,6 @@
|
||||
},
|
||||
files: [
|
||||
"package.json",
|
||||
|
|
@ -17,4 +30,4 @@ FileAlreadyWritten("/node_modules/keytar/package.json")', src/main.rs:200:18
|
|||
- },
|
||||
"lib/**",
|
||||
],
|
||||
extraResources: [
|
||||
extraResources: ["build/icon.*", "webapp.asar"],
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
we can't do fuses because we ship one binary in the electron package.
|
||||
and we can't import them here, since they are in devDependencies, which are uninstalled at this stage.
|
||||
|
||||
--- ./electron-builder.ts.orig
|
||||
+++ ./electron-builder.ts
|
||||
@@ -2,8 +2,7 @@
|
||||
import * as fs from "node:fs";
|
||||
import * as path from "node:path";
|
||||
import * as plist from "plist";
|
||||
-import { AfterPackContext, Arch, Configuration as BaseConfiguration, Platform } from "electron-builder";
|
||||
-import { computeData } from "app-builder-lib/out/asar/integrity";
|
||||
+import { Configuration as BaseConfiguration } from "electron-builder";
|
||||
import { readFile, writeFile } from "node:fs/promises";
|
||||
|
||||
/**
|
||||
@@ -46,26 +45,6 @@
|
||||
} & BaseConfiguration["deb"];
|
||||
}
|
||||
|
||||
-async function injectAsarIntegrity(context: AfterPackContext) {
|
||||
- const packager = context.packager;
|
||||
-
|
||||
- // We only need to re-generate asar on universal Mac builds, due to https://github.com/electron/universal/issues/116
|
||||
- if (packager.platform !== Platform.MAC || context.arch !== Arch.universal) return;
|
||||
-
|
||||
- const resourcesPath = packager.getResourcesDir(context.appOutDir);
|
||||
- const asarIntegrity = await computeData({
|
||||
- resourcesPath,
|
||||
- resourcesRelativePath: "Resources",
|
||||
- resourcesDestinationPath: resourcesPath,
|
||||
- extraResourceMatchers: [],
|
||||
- });
|
||||
-
|
||||
- const plistPath = path.join(resourcesPath, "..", "Info.plist");
|
||||
- const data = plist.parse(await readFile(plistPath, "utf8")) as unknown as Writable<plist.PlistObject>;
|
||||
- data["ElectronAsarIntegrity"] = asarIntegrity as unknown as Writable<plist.PlistValue>;
|
||||
- await writeFile(plistPath, plist.build(data));
|
||||
-}
|
||||
-
|
||||
/**
|
||||
* @type {import('electron-builder').Configuration}
|
||||
* @see https://www.electron.build/configuration/configuration
|
||||
@@ -89,9 +68,6 @@
|
||||
|
||||
loadBrowserProcessSpecificV8Snapshot: false,
|
||||
enableEmbeddedAsarIntegrityValidation: true,
|
||||
- },
|
||||
- afterPack: async (context: AfterPackContext) => {
|
||||
- await injectAsarIntegrity(context);
|
||||
},
|
||||
files: [
|
||||
"package.json",
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
# Contributor: Bryce Vandegrift <bryce@brycevandegrift.xyz>
|
||||
# Maintainer: Bryce Vandegrift <bryce@brycevandegrift.xyz>
|
||||
pkgname=freecad
|
||||
pkgver=1.0.1
|
||||
_ondsel_ver="09d6175a2ba69e7016fcecc4f384946a2f84f92d"
|
||||
_gsl_ver="2828399820ef4928cc89b65605dca5dc68efca6e"
|
||||
pkgrel=0
|
||||
pkgdesc="Open-source parametric 3D modeler"
|
||||
url="https://www.freecad.org/"
|
||||
# armv7, armhf, and aarch64: GL_MULTISAMPLE not declared
|
||||
# s390x: blocked by opencascade-dev, vtk-dev, and freeimage-dev
|
||||
# riscv64: blocked by py3-pivy, py3-pyside6, pyside6-dev, and py3-shiboken6
|
||||
arch="all !aarch64 !armhf !armv7 !s390x !riscv64"
|
||||
license="LGPL-2.0-or-later"
|
||||
depends="py3-pivy py3-matplotlib py3-pyside6"
|
||||
makedepends="
|
||||
cmake
|
||||
ninja
|
||||
boost-dev
|
||||
doxygen
|
||||
python3-dev
|
||||
xerces-c-dev
|
||||
opencascade-dev
|
||||
glew-dev
|
||||
gtest-dev
|
||||
vtk-dev
|
||||
libmedc-dev
|
||||
eigen-dev
|
||||
coin-dev
|
||||
libspnav-dev
|
||||
pyside6-dev
|
||||
py3-shiboken6
|
||||
py3-pivy
|
||||
py3-matplotlib
|
||||
swig
|
||||
jsoncpp-dev
|
||||
freeimage-dev
|
||||
qt6-qtbase-dev
|
||||
qt6-qtsvg-dev
|
||||
qt6-qttools-dev
|
||||
yaml-cpp-dev"
|
||||
subpackages="$pkgname-doc $pkgname-dev"
|
||||
options="!check"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/FreeCAD/FreeCAD/archive/$pkgver.tar.gz
|
||||
OndselSolver-$_ondsel_ver.tar.gz::https://github.com/Ondsel-Development/OndselSolver/archive/$_ondsel_ver.tar.gz
|
||||
GSL-$_gsl_ver.tar.gz::https://github.com/microsoft/GSL/archive/$_gsl_ver.tar.gz
|
||||
no-execinfo.patch"
|
||||
builddir="$srcdir/FreeCAD-$pkgver"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
cp -r $srcdir/OndselSolver-$_ondsel_ver/* $builddir/src/3rdParty/OndselSolver
|
||||
cp -r $srcdir/GSL-$_gsl_ver/* $builddir/src/3rdParty/GSL
|
||||
}
|
||||
|
||||
build() {
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DFREECAD_QT_VERSION=6 \
|
||||
-DFREECAD_USE_EXTERNAL_PIVY=ON \
|
||||
-DBUILD_FLAT_MESH=ON \
|
||||
-DENABLE_DEVELOPER_TESTS=OFF \
|
||||
-DBUILD_TEST=OFF \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_DATAROOTDIR=/usr/share \
|
||||
-DCMAKE_INSTALL_DATADIR=/usr/share/$pkgname
|
||||
ninja -C build
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" ninja -C build install
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
69a82c0af45137079b1ce184a4a3df475c005da66b4a4cab17371a1f62432b13f721e3da8b350b3ad50125c939cdfa5fed477e0605d52bd8fcee3c528931a185 freecad-1.0.1.tar.gz
|
||||
7ad78da60320a686f0734da5196ce4cba49a2ff9ecf0bcd6016a56d65c8a8f7570f2898f84c2602a454bc9ccd8ac12fd137d2a952ffb7cbd15e38350fbbd3d79 OndselSolver-09d6175a2ba69e7016fcecc4f384946a2f84f92d.tar.gz
|
||||
a6d731c450da91cba34c13293cc0881a842bd90268dd5ef721ae1f48752c41dc355ebea7716a6de5b49d41568e55751c46a9dd78da4cd68656bffd33e5ee448e GSL-2828399820ef4928cc89b65605dca5dc68efca6e.tar.gz
|
||||
2f190118bddbf2e070519d0244eafd15ae7919f9759f925f593ce43988a7f9ab023c50bec3768404926e8cc661e829f6a55bec5e9e58c58735c050338fbcec16 no-execinfo.patch
|
||||
"
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
From 9cd1f5e5b90ef2e17c61719ffdb2f6c43cbae185 Mon Sep 17 00:00:00 2001
|
||||
From: Bryce Vandegrift <bryce@brycevandegrift.xyz>
|
||||
Date: Sun, 24 Nov 2024 18:19:39 -0500
|
||||
Subject: [PATCH] Remove dependency on execinfo.h
|
||||
|
||||
---
|
||||
.../salomesmesh/src/DriverSTL/Basics_Utils.cpp | 11 -----------
|
||||
src/App/Application.cpp | 1 -
|
||||
2 files changed, 12 deletions(-)
|
||||
|
||||
diff --git a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp b/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
|
||||
index 23c5083fdf..5ea06ad3f4 100644
|
||||
--- a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
|
||||
+++ b/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
|
||||
@@ -29,7 +29,6 @@
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
-#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -113,16 +112,6 @@ namespace Kernel_Utils
|
||||
size_t size;
|
||||
char **strings;
|
||||
size_t i;
|
||||
-
|
||||
- size = backtrace (array, 40);
|
||||
- strings = backtrace_symbols (array, size);
|
||||
-
|
||||
- for (i = 0; i < size; i++)
|
||||
- {
|
||||
- std::cerr << strings[i] << std::endl;
|
||||
- }
|
||||
-
|
||||
- free (strings);
|
||||
}
|
||||
#else
|
||||
#if (_MSC_VER >= 1400) // Visual Studio 2005
|
||||
diff --git a/src/App/Application.cpp b/src/App/Application.cpp
|
||||
index 9384790627..9155c00d25 100644
|
||||
--- a/src/App/Application.cpp
|
||||
+++ b/src/App/Application.cpp
|
||||
@@ -1798,7 +1798,6 @@ static void freecadNewHandler ()
|
||||
#endif
|
||||
|
||||
#if defined(FC_OS_LINUX)
|
||||
-#include <execinfo.h>
|
||||
#include <dlfcn.h>
|
||||
#include <cxxabi.h>
|
||||
|
||||
--
|
||||
2.47.0
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=freetube
|
||||
pkgver=0.23.5
|
||||
pkgver=0.23.12
|
||||
pkgrel=1
|
||||
pkgdesc="An open source desktop YouTube player built with privacy in mind."
|
||||
arch="x86_64 aarch64" # blocked by electron
|
||||
|
|
@ -50,7 +50,7 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
5811ac53788a12f94cbd4cec6f7075350c223865cb4cf4436f131b9d1197b89aa5da128d6c531d1e56a0302aa3d2523c7ba8d48edbf5f328be6fed3fbba02752 freetube-0.23.5.tar.gz
|
||||
e19c7e8de0c6c5bbddcd3da73cd1907cae7157e8f44f550c4a34965b3b4f3c1a180c111a8c497d74a556d6d8e74e9fdd1ed6e064d4fc899f80712a1f187395ae freetube-0.23.12.tar.gz
|
||||
2ce2effc794bb663789cefe968b5899122127983dbfa1b240aa33a2be383720b18204e6d01b4a550df72956f02b6636b79c93a58f470a970b09b770f5b8f2fc4 freetube.sh
|
||||
d27cb896b65a7e8d52ffe86e5f74eed72b6cf976b28e1a13012d34c7eceba5ff6f20298017738dfa93c0336ffa52b8ee4da7e06b02747062898db7e678819526 tasje-dotdash.patch
|
||||
"
|
||||
|
|
|
|||
|
|
@ -1,59 +0,0 @@
|
|||
# Contributor: Aiden Grossman <agrossman154@yahoo.com>
|
||||
# Maintainer:
|
||||
pkgname=libmedc
|
||||
pkgver=5.0.0
|
||||
pkgrel=0
|
||||
pkgdesc="Open source library for numerical simulation"
|
||||
url="https://www.salome-platform.org/"
|
||||
arch="all"
|
||||
license="GPL-3.0-or-later"
|
||||
makedepends="cmake hdf5-dev swig python3-dev samurai"
|
||||
options="!check" #test suite is nonfunctional with python bindings
|
||||
subpackages="$pkgname-dev $pkgname-doc $pkgname-python-pyc $pkgname-python:_py"
|
||||
# Upstream disappeared:
|
||||
# https://www.salome-platform.org/downloads
|
||||
# https://files.salome-platform.org/Salome/other/med-4.1.1.tar.gz
|
||||
#
|
||||
# Using a fork on GitHub by one of the FreeCAD developers instead.
|
||||
#
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://github.com/chennes/med/archive/refs/tags/v$pkgver.tar.gz
|
||||
cmake-config-dir.patch
|
||||
hdf5-1.14.patch
|
||||
med-swig-4.3.0.patch
|
||||
med-py3.13.patch
|
||||
"
|
||||
builddir="$srcdir/med-$pkgver"
|
||||
|
||||
build() {
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DMEDFILE_BUILD_PYTHON=ON \
|
||||
-DMEDFILE_BUILD_TESTS=OFF
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
check() {
|
||||
cd build
|
||||
HDF5_DISABLE_VERSION_CHECK=1 LD_LIBRARY_PATH="$srcdir"/build/src ctest -E '._Python' --output-on-failure
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" cmake --install build
|
||||
}
|
||||
|
||||
_py() {
|
||||
pkgdesc="Python bindings for libmedc"
|
||||
depends="python3"
|
||||
amove usr/lib/python3*
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
6ebb06bf403dbe32512a42179a42de3da6f264034fcc143fcb2b780c5d564527656d3ef28ebf25d7bde93a9d2a44df0d10a09d60e6f4720ba9d25719a4e30d37 libmedc-5.0.0.tar.gz
|
||||
8d0f58cd67d205fbacaff0e6da76e2ee5473457b478ede13a551ebe5853c0716c7406b74c3792e1ace33a34d352fccca8dd2940f063a7c060a12529d060a991a cmake-config-dir.patch
|
||||
78bfbd17a052c039244ce314d53b0d5e5e6ba6773fe7a836999bf7ddf4b6d732dfda95c58681dd9d7e9586e4d36d3dfe7cca15d45fa7d3d453aef72423fcd5c0 hdf5-1.14.patch
|
||||
833187253fcbebb13f239f1f559333db6a7d3ef87c4f7b896f64970a3e553735ed01a82d6d4a368a2261e33e364b05ea3abbff3fd58c8221515aa72aa52684a7 med-swig-4.3.0.patch
|
||||
6c993d924257a01b8bce1952ecc34346ab654a103f4374d514c3616cd6cdf94373b2a4d04b91a68933cd5acbc4fc54becab6bd58f32762973bbee8255c5d7a3d med-py3.13.patch
|
||||
"
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -101,7 +101,7 @@
|
||||
IF(WIN32 AND NOT CYGWIN)
|
||||
SET(INSTALL_CMAKE_CONFIG_DIR cmake)
|
||||
ELSE()
|
||||
- SET(INSTALL_CMAKE_CONFIG_DIR share/cmake/medfile-${MED_STR_VERSION})
|
||||
+ SET(INSTALL_CMAKE_CONFIG_DIR lib${LIB_SUFFIX}/cmake/medfile-${MED_STR_VERSION})
|
||||
ENDIF()
|
||||
SET(INSTALL_INCLUDE_DIR include)
|
||||
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
Patch-Source: https://src.fedoraproject.org/rpms/med/raw/rawhide/f/hdf5-1.14.patch
|
||||
|
||||
diff -rupN --no-dereference med-5.0.0/config/cmake_files/medMacros.cmake med-5.0.0-new/config/cmake_files/medMacros.cmake
|
||||
--- med-5.0.0/config/cmake_files/medMacros.cmake 2025-01-24 00:28:04.460898497 +0100
|
||||
+++ med-5.0.0-new/config/cmake_files/medMacros.cmake 2025-01-24 00:28:04.857640862 +0100
|
||||
@@ -447,7 +447,7 @@ MACRO(MED_FIND_HDF5)
|
||||
##
|
||||
## Requires 1.12.x version
|
||||
##
|
||||
- IF (NOT HDF_VERSION_MAJOR_REF EQUAL 1 OR NOT HDF_VERSION_MINOR_REF EQUAL 12 OR NOT HDF_VERSION_RELEASE_REF GREATER 0)
|
||||
+ IF (HDF5_VERSION VERSION_LESS 1.12.1)
|
||||
MESSAGE(FATAL_ERROR "HDF5 version is ${HDF_VERSION_REF}. Only versions >= 1.12.1 are supported.")
|
||||
ENDIF()
|
||||
##
|
||||
diff -rupN --no-dereference med-5.0.0/src/ci/MEDfileCompatibility.c med-5.0.0-new/src/ci/MEDfileCompatibility.c
|
||||
--- med-5.0.0/src/ci/MEDfileCompatibility.c 2023-06-05 14:14:44.000000000 +0200
|
||||
+++ med-5.0.0-new/src/ci/MEDfileCompatibility.c 2025-01-24 00:28:04.858068408 +0100
|
||||
@@ -116,7 +116,7 @@ MEDfileCompatibility(const char* const f
|
||||
#if MED_NUM_MAJEUR != 5
|
||||
#error "Don't forget to update the test version here when you change the major version of the library !"
|
||||
#endif
|
||||
-#if H5_VERS_MINOR > 12
|
||||
+#if H5_VERS_MINOR > 14
|
||||
#error "Don't forget to check the compatibility version of the library, depending on the internal hdf model choice !"
|
||||
#error "Cf. _MEDfileCreate ..."
|
||||
#endif
|
||||
diff -rupN --no-dereference med-5.0.0/src/hdfi/_MEDfileCreate.c med-5.0.0-new/src/hdfi/_MEDfileCreate.c
|
||||
--- med-5.0.0/src/hdfi/_MEDfileCreate.c 2023-06-05 14:14:45.000000000 +0200
|
||||
+++ med-5.0.0-new/src/hdfi/_MEDfileCreate.c 2025-01-24 00:28:04.858334666 +0100
|
||||
@@ -189,7 +189,7 @@ med_idt _MEDfileCreate(const char * cons
|
||||
* Cette ligne est censée obliger HDF à ne pas utiliser un modèle interne différent de 1.10.z
|
||||
* Un test autoconf permet de fixer un intervalle de version HDF à MED.
|
||||
*/
|
||||
-#if H5_VERS_MINOR > 12
|
||||
+#if H5_VERS_MINOR > 14
|
||||
#error "Don't forget to change the compatibility version of the library !"
|
||||
#endif
|
||||
|
||||
diff -rupN --no-dereference med-5.0.0/src/hdfi/_MEDfileOpen.c med-5.0.0-new/src/hdfi/_MEDfileOpen.c
|
||||
--- med-5.0.0/src/hdfi/_MEDfileOpen.c 2023-06-05 14:14:45.000000000 +0200
|
||||
+++ med-5.0.0-new/src/hdfi/_MEDfileOpen.c 2025-01-24 00:28:04.858574380 +0100
|
||||
@@ -113,7 +113,7 @@ med_idt _MEDfileOpen(const char * const
|
||||
has been set in the group creation property list (see H5Pset_link_creation_order).
|
||||
*/
|
||||
|
||||
-#if H5_VERS_MINOR > 12
|
||||
+#if H5_VERS_MINOR > 14
|
||||
#error "Don't forget to change the compatibility version of the library !"
|
||||
#endif
|
||||
/* L'avantage de bloquer le modèle interne HDF5
|
||||
diff -rupN --no-dereference med-5.0.0/src/hdfi/_MEDfileOpenForImport.c med-5.0.0-new/src/hdfi/_MEDfileOpenForImport.c
|
||||
--- med-5.0.0/src/hdfi/_MEDfileOpenForImport.c 2023-06-05 14:14:45.000000000 +0200
|
||||
+++ med-5.0.0-new/src/hdfi/_MEDfileOpenForImport.c 2025-01-24 00:28:04.858834390 +0100
|
||||
@@ -53,7 +53,7 @@ med_idt _MEDfileOpenForImport(const cha
|
||||
}
|
||||
|
||||
|
||||
-#if H5_VERS_MINOR > 12
|
||||
+#if H5_VERS_MINOR > 14
|
||||
#error "Don't forget to change the compatibility version of the library !"
|
||||
#endif
|
||||
/* L'avantage de bloquer le modèle interne HDF5
|
||||
diff -rupN --no-dereference med-5.0.0/src/hdfi/_MEDmemFileOpen.c med-5.0.0-new/src/hdfi/_MEDmemFileOpen.c
|
||||
--- med-5.0.0/src/hdfi/_MEDmemFileOpen.c 2023-06-05 14:14:45.000000000 +0200
|
||||
+++ med-5.0.0-new/src/hdfi/_MEDmemFileOpen.c 2025-01-24 00:28:04.859128966 +0100
|
||||
@@ -439,7 +439,7 @@ med_idt _MEDmemFileOpen(const char * con
|
||||
goto ERROR;
|
||||
}
|
||||
|
||||
-#if H5_VERS_MINOR > 12
|
||||
+#if H5_VERS_MINOR > 14
|
||||
#error "Don't forget to change the compatibility version of the library !"
|
||||
#endif
|
||||
if ( H5Pset_libver_bounds( _fapl, H5F_LIBVER_V112, H5F_LIBVER_V112 ) ) {
|
||||
@@ -506,7 +506,7 @@ med_idt _MEDmemFileOpen(const char * con
|
||||
goto ERROR;
|
||||
}
|
||||
_fversionMM = 100*_fmajor+10*_fminor;
|
||||
-#if H5_VERS_MINOR > 12
|
||||
+#if H5_VERS_MINOR > 14
|
||||
#error "Don't forget to change the compatibility version of the library !"
|
||||
#endif
|
||||
if ( _fversionMM < 500 ) { /*100*MED_NUM_MAJEUR+10*MED_NUM_MINEUR*/
|
||||
diff -rupN --no-dereference med-5.0.0/src/hdfi/_MEDparFileCreate.c med-5.0.0-new/src/hdfi/_MEDparFileCreate.c
|
||||
--- med-5.0.0/src/hdfi/_MEDparFileCreate.c 2023-06-05 14:14:45.000000000 +0200
|
||||
+++ med-5.0.0-new/src/hdfi/_MEDparFileCreate.c 2025-01-24 00:28:04.859422685 +0100
|
||||
@@ -64,7 +64,7 @@ med_idt _MEDparFileCreate(const char * c
|
||||
* En HDF5-1.10.0p1 cela n'a aucun effet !
|
||||
* Un test autoconf permet de fixer un intervalle de version HDF à MED.
|
||||
*/
|
||||
-#if H5_VERS_MINOR > 12
|
||||
+#if H5_VERS_MINOR > 14
|
||||
#error "Don't forget to change the compatibility version of the library !"
|
||||
#endif
|
||||
|
||||
diff -rupN --no-dereference med-5.0.0/src/hdfi/_MEDparFileOpen.c med-5.0.0-new/src/hdfi/_MEDparFileOpen.c
|
||||
--- med-5.0.0/src/hdfi/_MEDparFileOpen.c 2023-06-05 14:14:45.000000000 +0200
|
||||
+++ med-5.0.0-new/src/hdfi/_MEDparFileOpen.c 2025-01-24 00:28:04.859632596 +0100
|
||||
@@ -86,7 +86,7 @@ med_idt _MEDparFileOpen(const char * con
|
||||
}
|
||||
_fversionMM = 100*_fmajor+10*_fminor;
|
||||
|
||||
-#if H5_VERS_MINOR > 12
|
||||
+#if H5_VERS_MINOR > 14
|
||||
#error "Don't forget to change the compatibility version of the library !"
|
||||
#endif
|
||||
if ( _fversionMM < 500 ) { /*100*MED_NUM_MAJEUR+10*MED_NUM_MINEUR*/
|
||||
diff -rupN --no-dereference med-5.0.0/src/misc/MEDversionedApi3C.c med-5.0.0-new/src/misc/MEDversionedApi3C.c
|
||||
--- med-5.0.0/src/misc/MEDversionedApi3C.c 2023-06-05 14:14:45.000000000 +0200
|
||||
+++ med-5.0.0-new/src/misc/MEDversionedApi3C.c 2025-01-24 00:28:04.859890990 +0100
|
||||
@@ -114,7 +114,7 @@ MedFuncType _MEDversionedApi3( const cha
|
||||
/* (_fversionMM <= (100*MED_NUM_MAJEUR+10*MED_NUM_MINEUR) ) */
|
||||
/* ) { */
|
||||
|
||||
-#if H5_VERS_MINOR > 12
|
||||
+#if H5_VERS_MINOR > 14
|
||||
#error "Don't forget to change the compatibility version of the library !"
|
||||
#endif
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
Patch-Source: https://src.fedoraproject.org/rpms/med/raw/rawhide/f/med-swig-4.3.0.patch
|
||||
|
||||
diff -rupN --no-dereference med-5.0.0/python/med_enumtest_typemap.i med-5.0.0-new/python/med_enumtest_typemap.i
|
||||
--- med-5.0.0/python/med_enumtest_typemap.i 2023-03-07 15:20:57.000000000 +0100
|
||||
+++ med-5.0.0-new/python/med_enumtest_typemap.i 2025-01-24 00:28:04.465816239 +0100
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
if (pclass == NULL) printf("%s\n","Can't get class $1_basetype");
|
||||
Py_DECREF(pmod);
|
||||
pargs = Py_BuildValue("(i)",*$1);
|
||||
- pinst = PyEval_CallObject(pclass, pargs);
|
||||
+ pinst = PyObject_CallObject(pclass, pargs);
|
||||
if (pinst == NULL) printf("%s\n","Can't instanciate class $1_basetype");
|
||||
$result=SWIG_Python_AppendOutput($result, pinst);
|
||||
}
|
||||
diff -rupN --no-dereference med-5.0.0/python/med_enum_typemap.i med-5.0.0-new/python/med_enum_typemap.i
|
||||
--- med-5.0.0/python/med_enum_typemap.i 2023-03-07 15:20:57.000000000 +0100
|
||||
+++ med-5.0.0-new/python/med_enum_typemap.i 2025-01-24 00:28:04.466146326 +0100
|
||||
@@ -109,7 +109,7 @@ Type.__repr__= lambda self: #Type +"("+s
|
||||
if (pclass == NULL) printf("%s\n","Can't get class $1_basetype");
|
||||
Py_DECREF(pmod);
|
||||
pargs = Py_BuildValue("(i)",*$1);
|
||||
- pinst = PyEval_CallObject(pclass, pargs);
|
||||
+ pinst = PyObject_CallObject(pclass, pargs);
|
||||
if (pinst == NULL) printf("%s\n","Can't instanciate class $1_basetype");
|
||||
$result=SWIG_Python_AppendOutput($result, pinst);
|
||||
}
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
Patch-Source: https://src.fedoraproject.org/rpms/med/raw/rawhide/f/med-py3.13.patch
|
||||
|
||||
diff -rupN --no-dereference med-5.0.0/python/med_array_typemap.i med-5.0.0-new/python/med_array_typemap.i
|
||||
--- med-5.0.0/python/med_array_typemap.i 2023-03-07 15:20:57.000000000 +0100
|
||||
+++ med-5.0.0-new/python/med_array_typemap.i 2025-01-24 00:28:05.257751237 +0100
|
||||
@@ -181,7 +181,7 @@ Type.__repr__= lambda self: #Type +"("+s
|
||||
// TypeMed * const ParamName : OUT 2/4 (l'allocation Type est faite ds Python)
|
||||
%typemap(freearg) TypeMed * const ParamName {
|
||||
Py_INCREF(o$argnum);
|
||||
- $result=SWIG_Python_AppendOutput($result, o$argnum);
|
||||
+ $result=SWIG_AppendOutput($result, o$argnum);
|
||||
}
|
||||
// TypeMed * const (OUT) 3/4
|
||||
// pour ne pas activer un out du TypeMed * const (par sécurité)
|
||||
@@ -290,7 +290,7 @@ Type.__repr__= lambda self: #Type +"("+s
|
||||
// unsigned char * const : OUT 2/4 (l'allocation Type est faite ds Python)
|
||||
%typemap(freearg) unsigned char * const {
|
||||
Py_INCREF(o$argnum);
|
||||
- $result=SWIG_Python_AppendOutput($result, o$argnum);
|
||||
+ $result=SWIG_AppendOutput($result, o$argnum);
|
||||
}
|
||||
// unsigned char * const (OUT) 3/4
|
||||
// pour ne pas activer un out du unsigned char * const (par sécurité)
|
||||
diff -rupN --no-dereference med-5.0.0/python/med_bool_typemap.i med-5.0.0-new/python/med_bool_typemap.i
|
||||
--- med-5.0.0/python/med_bool_typemap.i 2023-03-07 15:20:57.000000000 +0100
|
||||
+++ med-5.0.0-new/python/med_bool_typemap.i 2025-01-24 00:28:05.257993234 +0100
|
||||
@@ -22,7 +22,7 @@
|
||||
/* Py_DECREF(o2); */
|
||||
/* Py_DECREF(o3); */
|
||||
/* } */
|
||||
- $result=SWIG_Python_AppendOutput($result, o);
|
||||
+ $result=SWIG_AppendOutput($result, o);
|
||||
}
|
||||
|
||||
%typemap(in,numinputs=0) med_bool *(med_bool temp) {
|
||||
diff -rupN --no-dereference med-5.0.0/python/med_enumtest_typemap.i med-5.0.0-new/python/med_enumtest_typemap.i
|
||||
--- med-5.0.0/python/med_enumtest_typemap.i 2025-01-24 00:28:04.853403794 +0100
|
||||
+++ med-5.0.0-new/python/med_enumtest_typemap.i 2025-01-24 00:28:05.258210585 +0100
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
pargs = Py_BuildValue("(i)",*$1);
|
||||
pinst = PyObject_CallObject(pclass, pargs);
|
||||
if (pinst == NULL) printf("%s\n","Can't instanciate class $1_basetype");
|
||||
- $result=SWIG_Python_AppendOutput($result, pinst);
|
||||
+ $result=SWIG_AppendOutput($result, pinst);
|
||||
}
|
||||
|
||||
%typemap(in,numinputs=0) TypeEnum * (TypeEnum temp) {
|
||||
diff -rupN --no-dereference med-5.0.0/python/med_enum_typemap.i med-5.0.0-new/python/med_enum_typemap.i
|
||||
--- med-5.0.0/python/med_enum_typemap.i 2025-01-24 00:28:04.853741870 +0100
|
||||
+++ med-5.0.0-new/python/med_enum_typemap.i 2025-01-24 00:28:05.258385775 +0100
|
||||
@@ -111,7 +111,7 @@ Type.__repr__= lambda self: #Type +"("+s
|
||||
pargs = Py_BuildValue("(i)",*$1);
|
||||
pinst = PyObject_CallObject(pclass, pargs);
|
||||
if (pinst == NULL) printf("%s\n","Can't instanciate class $1_basetype");
|
||||
- $result=SWIG_Python_AppendOutput($result, pinst);
|
||||
+ $result=SWIG_AppendOutput($result, pinst);
|
||||
}
|
||||
|
||||
%typemap(in,numinputs=0) TypeEnum * (TypeEnum temp) {
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
diff --git a/serial/SerialPortManager.cpp.orig b/serial/SerialPortManager.cpp
|
||||
index 22565b5..d444eee 100644
|
||||
--- a/serial/SerialPortManager.cpp.orig
|
||||
+++ b/serial/SerialPortManager.cpp
|
||||
@@ -1945,8 +1945,9 @@ void SerialPortManager::attemptRecovery()
|
||||
}
|
||||
} else {
|
||||
qCWarning(log_core_serial) << "Serial port recovery attempt failed";
|
||||
- if (eventCallback) {
|
||||
- eventCallback->onStatusUpdate(QString("Recovery attempt %1 failed").arg(m_connectionRetryCount));
|
||||
+ if (eventCallback) {
|
||||
+ int crc = m_connectionRetryCount;
|
||||
+ eventCallback->onStatusUpdate(QString("Recovery attempt %1 failed").arg(crc));
|
||||
}
|
||||
|
||||
// Try again if we haven't exceeded max attempts
|
||||
@@ -2034,4 +2035,4 @@ void SerialPortManager::applyCommandBasedBaudrateChange(int baudRate, const QStr
|
||||
} else {
|
||||
qCWarning(log_core_serial) << logPrefix << "Failed to apply user selected baudrate:" << baudRate;
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
|
|
@ -0,0 +1,586 @@
|
|||
From 4478cfb004d3db7797e99fd3bdb23bf880a9c85b Mon Sep 17 00:00:00 2001
|
||||
From: John Lane <1786613+johnlane@users.noreply.github.com>
|
||||
Date: Wed, 3 Dec 2025 21:19:33 +0000
|
||||
Subject: [PATCH 1/2] Remove additional backslashes and add missing cpp and h
|
||||
files
|
||||
|
||||
---
|
||||
openterfaceQT.pro | 28 +++++++++++++++++++---------
|
||||
1 file changed, 19 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/openterfaceQT.pro b/openterfaceQT.pro
|
||||
index 3460dbac..f0d878e8 100644
|
||||
--- a/openterfaceQT.pro
|
||||
+++ b/openterfaceQT.pro
|
||||
@@ -84,16 +84,26 @@ SOURCES += main.cpp \
|
||||
!win32 {
|
||||
SOURCES += host/backend/ffmpegbackendhandler.cpp \
|
||||
host/backend/gstreamerbackendhandler.cpp \
|
||||
- host/backend/gstreamer/sinkselector.cpp \\
|
||||
- host/backend/gstreamer/queueconfigurator.cpp \\
|
||||
- host/backend/gstreamer/videooverlaymanager.cpp \\
|
||||
- host/backend/gstreamer/pipelinebuilder.cpp
|
||||
+ host/backend/gstreamer/pipelinefactory.cpp \
|
||||
+ host/backend/gstreamer/externalgstrunner.cpp \
|
||||
+ host/backend/gstreamer/inprocessgstrunner.cpp \
|
||||
+ host/backend/gstreamer/sinkselector.cpp \
|
||||
+ host/backend/gstreamer/queueconfigurator.cpp \
|
||||
+ host/backend/gstreamer/videooverlaymanager.cpp \
|
||||
+ host/backend/gstreamer/pipelinebuilder.cpp \
|
||||
+ host/backend/gstreamer/recordingmanager.cpp \
|
||||
+ host/backend/gstreamer/gstreamerhelpers.cpp
|
||||
HEADERS += host/backend/ffmpegbackendhandler.h \
|
||||
host/backend/gstreamerbackendhandler.h \
|
||||
- host/backend/gstreamer/sinkselector.h \\
|
||||
- host/backend/gstreamer/queueconfigurator.h \\
|
||||
- host/backend/gstreamer/videooverlaymanager.h \\
|
||||
- host/backend/gstreamer/pipelinebuilder.h
|
||||
+ host/backend/gstreamer/pipelinefactory.h \
|
||||
+ host/backend/gstreamer/externalgstrunner.h \
|
||||
+ host/backend/gstreamer/inprocessgstrunner.h \
|
||||
+ host/backend/gstreamer/sinkselector.h \
|
||||
+ host/backend/gstreamer/queueconfigurator.h \
|
||||
+ host/backend/gstreamer/videooverlaymanager.h \
|
||||
+ host/backend/gstreamer/pipelinebuilder.h \
|
||||
+ host/backend/gstreamer/recordingmanager.h \
|
||||
+ host/backend/gstreamer/gstreamerhelpers.h
|
||||
}
|
||||
|
||||
|
||||
@@ -263,4 +273,4 @@ TRANSLATIONS += config/languages/openterface_en.ts \
|
||||
config/languages/openterface_se.ts \
|
||||
config/languages/openterface_de.ts \
|
||||
config/languages/openterface_zh.ts
|
||||
- # Add more languages here
|
||||
\ No newline at end of file
|
||||
+ # Add more languages here
|
||||
|
||||
From ccd8f51fe510684439edf0d5f8083e4dd1423836 Mon Sep 17 00:00:00 2001
|
||||
From: John Lane <1786613+johnlane@users.noreply.github.com>
|
||||
Date: Wed, 3 Dec 2025 21:26:20 +0000
|
||||
Subject: [PATCH 2/2] De-duplicate logging categories
|
||||
|
||||
---
|
||||
host/backend/gstreamer/gstreamerhelpers.cpp | 22 ++--
|
||||
host/backend/gstreamer/queueconfigurator.cpp | 8 +-
|
||||
.../backend/gstreamer/videooverlaymanager.cpp | 118 +++++++++---------
|
||||
3 files changed, 74 insertions(+), 74 deletions(-)
|
||||
|
||||
diff --git a/host/backend/gstreamer/gstreamerhelpers.cpp b/host/backend/gstreamer/gstreamerhelpers.cpp
|
||||
index 6fc1dd6e..4739da17 100644
|
||||
--- a/host/backend/gstreamer/gstreamerhelpers.cpp
|
||||
+++ b/host/backend/gstreamer/gstreamerhelpers.cpp
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <QDebug>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
-Q_LOGGING_CATEGORY(log_gstreamer_backend, "opf.backend.gstreamer")
|
||||
+Q_LOGGING_CATEGORY(log_gstreamer_gstreamerhelpers, "opf.backend.gstreamerhelpers")
|
||||
|
||||
using namespace Openterface::GStreamer::GstHelpers;
|
||||
|
||||
@@ -16,7 +16,7 @@ bool Openterface::GStreamer::GstHelpers::setPipelineStateWithTimeout(void* eleme
|
||||
{
|
||||
if (!elementPtr) {
|
||||
if (outError) *outError = QStringLiteral("Element pointer is null");
|
||||
- qCWarning(log_gstreamer_backend) << "setPipelineStateWithTimeout: element pointer is null";
|
||||
+ qCWarning(log_gstreamer_gstreamerhelpers) << "setPipelineStateWithTimeout: element pointer is null";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ bool Openterface::GStreamer::GstHelpers::setPipelineStateWithTimeout(void* eleme
|
||||
|
||||
GstStateChangeReturn ret = gst_element_set_state(element, static_cast<GstState>(targetState));
|
||||
if (ret == GST_STATE_CHANGE_FAILURE) {
|
||||
- qCCritical(log_gstreamer_backend) << "Failed to set element state to" << targetState;
|
||||
+ qCCritical(log_gstreamer_gstreamerhelpers) << "Failed to set element state to" << targetState;
|
||||
// Try to pull any error from the bus for diagnostics
|
||||
// Caller may pass a bus to parseAndLogGstErrorMessage, but we don't have it here.
|
||||
if (outError) *outError = QStringLiteral("Failed to set state (GST_STATE_CHANGE_FAILURE)");
|
||||
@@ -35,13 +35,13 @@ bool Openterface::GStreamer::GstHelpers::setPipelineStateWithTimeout(void* eleme
|
||||
ret = gst_element_get_state(element, &state, &pending, static_cast<GstClockTime>(timeoutMs) * GST_MSECOND);
|
||||
if (ret == GST_STATE_CHANGE_FAILURE) {
|
||||
if (outError) *outError = QStringLiteral("State change failure");
|
||||
- qCCritical(log_gstreamer_backend) << "State change failure waiting for target state";
|
||||
+ qCCritical(log_gstreamer_gstreamerhelpers) << "State change failure waiting for target state";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (state != static_cast<GstState>(targetState)) {
|
||||
if (outError) *outError = QStringLiteral("Element did not reach target state in timeout");
|
||||
- qCCritical(log_gstreamer_backend) << "Element failed to reach state" << targetState << "(current:" << state << ", pending:" << pending << ")";
|
||||
+ qCCritical(log_gstreamer_gstreamerhelpers) << "Element failed to reach state" << targetState << "(current:" << state << ", pending:" << pending << ")";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -51,14 +51,14 @@ bool Openterface::GStreamer::GstHelpers::setPipelineStateWithTimeout(void* eleme
|
||||
void Openterface::GStreamer::GstHelpers::parseAndLogGstErrorMessage(void* busPtr, const char* context)
|
||||
{
|
||||
if (!busPtr) {
|
||||
- qCWarning(log_gstreamer_backend) << "Bus not available for error details" << (context ? context : "");
|
||||
+ qCWarning(log_gstreamer_gstreamerhelpers) << "Bus not available for error details" << (context ? context : "");
|
||||
return;
|
||||
}
|
||||
|
||||
GstBus* bus = static_cast<GstBus*>(busPtr);
|
||||
GstMessage* msg = gst_bus_pop_filtered(bus, GST_MESSAGE_ERROR);
|
||||
if (!msg) {
|
||||
- qCDebug(log_gstreamer_backend) << "No error message available on bus" << (context ? context : "");
|
||||
+ qCDebug(log_gstreamer_gstreamerhelpers) << "No error message available on bus" << (context ? context : "");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ void Openterface::GStreamer::GstHelpers::parseAndLogGstErrorMessage(void* busPtr
|
||||
gchar* debug_info = nullptr;
|
||||
gst_message_parse_error(msg, &error, &debug_info);
|
||||
|
||||
- qCCritical(log_gstreamer_backend) << "GStreamer Error:" << (error ? error->message : "Unknown") << (context ? context : "");
|
||||
- qCCritical(log_gstreamer_backend) << "Debug info:" << (debug_info ? debug_info : "None");
|
||||
+ qCCritical(log_gstreamer_gstreamerhelpers) << "GStreamer Error:" << (error ? error->message : "Unknown") << (context ? context : "");
|
||||
+ qCCritical(log_gstreamer_gstreamerhelpers) << "Debug info:" << (debug_info ? debug_info : "None");
|
||||
|
||||
if (error) g_error_free(error);
|
||||
if (debug_info) g_free(debug_info);
|
||||
@@ -79,13 +79,13 @@ void Openterface::GStreamer::GstHelpers::parseAndLogGstErrorMessage(void* busPtr
|
||||
bool Openterface::GStreamer::GstHelpers::setPipelineStateWithTimeout(void* /*elementPtr*/, int /*targetState*/, int /*timeoutMs*/, QString* outError)
|
||||
{
|
||||
if (outError) *outError = QStringLiteral("GStreamer not available in this build");
|
||||
- qCWarning(log_gstreamer_backend) << "setPipelineStateWithTimeout called but GStreamer is not compiled in";
|
||||
+ qCWarning(log_gstreamer_gstreamerhelpers) << "setPipelineStateWithTimeout called but GStreamer is not compiled in";
|
||||
return false;
|
||||
}
|
||||
|
||||
void Openterface::GStreamer::GstHelpers::parseAndLogGstErrorMessage(void* /*busPtr*/, const char* context)
|
||||
{
|
||||
- qCDebug(log_gstreamer_backend) << "GStreamer not compiled in - no bus to parse" << (context ? context : "");
|
||||
+ qCDebug(log_gstreamer_gstreamerhelpers) << "GStreamer not compiled in - no bus to parse" << (context ? context : "");
|
||||
}
|
||||
|
||||
#endif // HAVE_GSTREAMER
|
||||
diff --git a/host/backend/gstreamer/queueconfigurator.cpp b/host/backend/gstreamer/queueconfigurator.cpp
|
||||
index b7bea42e..12290193 100644
|
||||
--- a/host/backend/gstreamer/queueconfigurator.cpp
|
||||
+++ b/host/backend/gstreamer/queueconfigurator.cpp
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <gst/gst.h>
|
||||
#endif
|
||||
|
||||
-Q_LOGGING_CATEGORY(log_gstreamer_backend, "opf.backend.gstreamer")
|
||||
+Q_LOGGING_CATEGORY(log_gstreamer_queueconfigurator, "opf.backend.queueconfigurator")
|
||||
|
||||
using namespace Openterface::GStreamer;
|
||||
|
||||
@@ -26,10 +26,10 @@ void QueueConfigurator::configureDisplayQueue(void* pipeline)
|
||||
"max-size-time", G_GUINT64_CONSTANT(100000000), // 100ms
|
||||
"leaky", 2, // GST_QUEUE_LEAK_DOWNSTREAM
|
||||
NULL);
|
||||
- qCDebug(log_gstreamer_backend) << "✓ Configured display queue with higher priority for qtsink";
|
||||
+ qCDebug(log_gstreamer_queueconfigurator) << "✓ Configured display queue with higher priority for qtsink";
|
||||
gst_object_unref(displayQueue);
|
||||
} else {
|
||||
- qCDebug(log_gstreamer_backend) << "Display queue element not found (no named display-queue)";
|
||||
+ qCDebug(log_gstreamer_queueconfigurator) << "Display queue element not found (no named display-queue)";
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(pipeline);
|
||||
@@ -50,7 +50,7 @@ void QueueConfigurator::configureRecordingQueue(void* pipeline)
|
||||
"max-size-time", G_GUINT64_CONSTANT(500000000), // 500ms
|
||||
"leaky", 1, // GST_QUEUE_LEAK_UPSTREAM
|
||||
NULL);
|
||||
- qCDebug(log_gstreamer_backend) << "✓ Configured recording queue with lower priority relative to display";
|
||||
+ qCDebug(log_gstreamer_queueconfigurator) << "✓ Configured recording queue with lower priority relative to display";
|
||||
gst_object_unref(recordingQueue);
|
||||
}
|
||||
#else
|
||||
diff --git a/host/backend/gstreamer/videooverlaymanager.cpp b/host/backend/gstreamer/videooverlaymanager.cpp
|
||||
index d8bf42f3..2dbe3bbf 100644
|
||||
--- a/host/backend/gstreamer/videooverlaymanager.cpp
|
||||
+++ b/host/backend/gstreamer/videooverlaymanager.cpp
|
||||
@@ -22,7 +22,7 @@ static int x11_overlay_error_handler_local(Display* display, XErrorEvent* error)
|
||||
}
|
||||
#endif
|
||||
|
||||
-Q_LOGGING_CATEGORY(log_gstreamer_backend, "opf.backend.gstreamer")
|
||||
+Q_LOGGING_CATEGORY(log_gstreamer_videooverlaymanager, "opf.backend.videooverlaymanager")
|
||||
|
||||
using namespace Openterface::GStreamer;
|
||||
|
||||
@@ -30,36 +30,36 @@ bool VideoOverlayManager::embedVideoInWidget(void* pipeline, QWidget* widget)
|
||||
{
|
||||
#ifdef HAVE_GSTREAMER
|
||||
if (!widget || !pipeline) {
|
||||
- qCWarning(log_gstreamer_backend) << "Cannot embed video: widget or pipeline is null";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Cannot embed video: widget or pipeline is null";
|
||||
return false;
|
||||
}
|
||||
|
||||
GstElement* videoSink = gst_bin_get_by_name(GST_BIN(pipeline), "videosink");
|
||||
if (!videoSink) {
|
||||
- qCWarning(log_gstreamer_backend) << "No video sink element named 'videosink' found in pipeline";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "No video sink element named 'videosink' found in pipeline";
|
||||
videoSink = gst_bin_get_by_interface(GST_BIN(pipeline), GST_TYPE_VIDEO_OVERLAY);
|
||||
if (!videoSink) {
|
||||
- qCWarning(log_gstreamer_backend) << "No video overlay interface found in pipeline either";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "No video overlay interface found in pipeline either";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
WId winId = widget->winId();
|
||||
if (winId) {
|
||||
- qCDebug(log_gstreamer_backend) << "Embedding video in widget with window ID:" << winId;
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Embedding video in widget with window ID:" << winId;
|
||||
gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(videoSink), winId);
|
||||
gst_object_unref(videoSink);
|
||||
- qCDebug(log_gstreamer_backend) << "Video embedded in widget successfully";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Video embedded in widget successfully";
|
||||
return true;
|
||||
} else {
|
||||
- qCWarning(log_gstreamer_backend) << "Widget window ID is null, cannot embed video";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Widget window ID is null, cannot embed video";
|
||||
gst_object_unref(videoSink);
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(pipeline)
|
||||
Q_UNUSED(widget)
|
||||
- qCDebug(log_gstreamer_backend) << "Using autovideosink for video output (no in-process GStreamer)";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Using autovideosink for video output (no in-process GStreamer)";
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
@@ -68,36 +68,36 @@ bool VideoOverlayManager::embedVideoInGraphicsView(void* pipeline, QGraphicsView
|
||||
{
|
||||
#ifdef HAVE_GSTREAMER
|
||||
if (!view || !pipeline) {
|
||||
- qCWarning(log_gstreamer_backend) << "Cannot embed video: graphics view or pipeline is null";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Cannot embed video: graphics view or pipeline is null";
|
||||
return false;
|
||||
}
|
||||
|
||||
GstElement* videoSink = gst_bin_get_by_name(GST_BIN(pipeline), "videosink");
|
||||
if (!videoSink) {
|
||||
- qCWarning(log_gstreamer_backend) << "No video sink element named 'videosink' found in pipeline";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "No video sink element named 'videosink' found in pipeline";
|
||||
videoSink = gst_bin_get_by_interface(GST_BIN(pipeline), GST_TYPE_VIDEO_OVERLAY);
|
||||
if (!videoSink) {
|
||||
- qCWarning(log_gstreamer_backend) << "No video overlay interface found in pipeline either";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "No video overlay interface found in pipeline either";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
WId winId = view->winId();
|
||||
if (winId) {
|
||||
- qCDebug(log_gstreamer_backend) << "Embedding video in graphics view with window ID:" << winId;
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Embedding video in graphics view with window ID:" << winId;
|
||||
gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(videoSink), winId);
|
||||
gst_object_unref(videoSink);
|
||||
- qCDebug(log_gstreamer_backend) << "Video embedded in graphics view successfully";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Video embedded in graphics view successfully";
|
||||
return true;
|
||||
} else {
|
||||
- qCWarning(log_gstreamer_backend) << "Graphics view window ID is null, cannot embed video";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Graphics view window ID is null, cannot embed video";
|
||||
gst_object_unref(videoSink);
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(pipeline)
|
||||
Q_UNUSED(view)
|
||||
- qCDebug(log_gstreamer_backend) << "Using autovideosink for video output (no in-process GStreamer)";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Using autovideosink for video output (no in-process GStreamer)";
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
@@ -106,36 +106,36 @@ bool VideoOverlayManager::embedVideoInVideoPane(void* pipeline, ::VideoPane* vid
|
||||
{
|
||||
#ifdef HAVE_GSTREAMER
|
||||
if (!videoPane || !pipeline) {
|
||||
- qCWarning(log_gstreamer_backend) << "Cannot embed video: VideoPane or pipeline is null";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Cannot embed video: VideoPane or pipeline is null";
|
||||
return false;
|
||||
}
|
||||
|
||||
GstElement* videoSink = gst_bin_get_by_name(GST_BIN(pipeline), "videosink");
|
||||
if (!videoSink) {
|
||||
- qCWarning(log_gstreamer_backend) << "No video sink element named 'videosink' found in pipeline";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "No video sink element named 'videosink' found in pipeline";
|
||||
videoSink = gst_bin_get_by_interface(GST_BIN(pipeline), GST_TYPE_VIDEO_OVERLAY);
|
||||
if (!videoSink) {
|
||||
- qCWarning(log_gstreamer_backend) << "No video overlay interface found in pipeline either";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "No video overlay interface found in pipeline either";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
WId winId = videoPane->getVideoOverlayWindowId();
|
||||
if (winId) {
|
||||
- qCDebug(log_gstreamer_backend) << "Embedding video in VideoPane overlay with window ID:" << winId;
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Embedding video in VideoPane overlay with window ID:" << winId;
|
||||
gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(videoSink), winId);
|
||||
gst_object_unref(videoSink);
|
||||
- qCDebug(log_gstreamer_backend) << "Video embedded in VideoPane overlay successfully";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Video embedded in VideoPane overlay successfully";
|
||||
return true;
|
||||
} else {
|
||||
- qCWarning(log_gstreamer_backend) << "VideoPane overlay window ID is null, cannot embed video";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "VideoPane overlay window ID is null, cannot embed video";
|
||||
gst_object_unref(videoSink);
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(pipeline)
|
||||
Q_UNUSED(videoPane)
|
||||
- qCDebug(log_gstreamer_backend) << "Using autovideosink for video output (no in-process GStreamer)";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Using autovideosink for video output (no in-process GStreamer)";
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
@@ -144,7 +144,7 @@ bool VideoOverlayManager::setupVideoOverlay(void* videoSinkPtr, WId windowId, QW
|
||||
{
|
||||
#ifdef HAVE_GSTREAMER
|
||||
if (!videoSinkPtr || windowId == 0) {
|
||||
- qCWarning(log_gstreamer_backend) << "Invalid parameters for overlay setup: sink=" << videoSinkPtr << "windowId=" << windowId;
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Invalid parameters for overlay setup: sink=" << videoSinkPtr << "windowId=" << windowId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ bool VideoOverlayManager::setupVideoOverlay(void* videoSinkPtr, WId windowId, QW
|
||||
|
||||
// Check if the sink supports video overlay interface
|
||||
if (GST_IS_VIDEO_OVERLAY(videoSink)) {
|
||||
- qCDebug(log_gstreamer_backend) << "Sink supports video overlay - setting up overlay with window ID:" << windowId;
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Sink supports video overlay - setting up overlay with window ID:" << windowId;
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
// Add X11 error handling to prevent segmentation fault
|
||||
@@ -175,12 +175,12 @@ bool VideoOverlayManager::setupVideoOverlay(void* videoSinkPtr, WId windowId, QW
|
||||
if (g_object_class_find_property(G_OBJECT_GET_CLASS(videoSink), "force-aspect-ratio")) {
|
||||
// Allow the sink to stretch to the configured render rectangle so overlay scales to widget size
|
||||
g_object_set(videoSink, "force-aspect-ratio", FALSE, NULL);
|
||||
- qCDebug(log_gstreamer_backend) << "Disabled force-aspect-ratio on video sink to allow fill scaling";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Disabled force-aspect-ratio on video sink to allow fill scaling";
|
||||
}
|
||||
|
||||
if (g_object_class_find_property(G_OBJECT_GET_CLASS(videoSink), "pixel-aspect-ratio")) {
|
||||
g_object_set(videoSink, "pixel-aspect-ratio", "1/1", NULL);
|
||||
- qCDebug(log_gstreamer_backend) << "Set pixel-aspect-ratio to 1:1 on video sink";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Set pixel-aspect-ratio to 1:1 on video sink";
|
||||
}
|
||||
|
||||
// Configure render rectangle based on provided targets
|
||||
@@ -188,13 +188,13 @@ bool VideoOverlayManager::setupVideoOverlay(void* videoSinkPtr, WId windowId, QW
|
||||
QSize widgetSize = videoWidget->size();
|
||||
if (widgetSize.width() > 0 && widgetSize.height() > 0) {
|
||||
gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(videoSink), 0, 0, widgetSize.width(), widgetSize.height());
|
||||
- qCDebug(log_gstreamer_backend) << "Set render rectangle to widget size:" << widgetSize;
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Set render rectangle to widget size:" << widgetSize;
|
||||
}
|
||||
} else if (graphicsVideoItem) {
|
||||
QRectF itemRect = graphicsVideoItem->boundingRect();
|
||||
if (itemRect.width() > 0 && itemRect.height() > 0) {
|
||||
gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(videoSink), 0, 0, (gint)itemRect.width(), (gint)itemRect.height());
|
||||
- qCDebug(log_gstreamer_backend) << "Set render rectangle to video item size:" << itemRect.size();
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Set render rectangle to video item size:" << itemRect.size();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,18 +205,18 @@ bool VideoOverlayManager::setupVideoOverlay(void* videoSinkPtr, WId windowId, QW
|
||||
XCloseDisplay(display);
|
||||
|
||||
if (x11_overlay_error_occurred_local) {
|
||||
- qCWarning(log_gstreamer_backend) << "X11 error occurred during overlay setup - continuing without embedding";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "X11 error occurred during overlay setup - continuing without embedding";
|
||||
} else {
|
||||
- qCDebug(log_gstreamer_backend) << "Video overlay setup completed successfully";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Video overlay setup completed successfully";
|
||||
}
|
||||
} else if (!old_handler) {
|
||||
- qCDebug(log_gstreamer_backend) << "Video overlay setup completed (no X11 error handling)";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Video overlay setup completed (no X11 error handling)";
|
||||
}
|
||||
#endif
|
||||
|
||||
- qCDebug(log_gstreamer_backend) << "Overlay setup completed";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Overlay setup completed";
|
||||
} catch (...) {
|
||||
- qCCritical(log_gstreamer_backend) << "Exception during video overlay setup - continuing without embedding";
|
||||
+ qCCritical(log_gstreamer_videooverlaymanager) << "Exception during video overlay setup - continuing without embedding";
|
||||
#ifdef Q_OS_LINUX
|
||||
if (display && old_handler) {
|
||||
XSetErrorHandler(old_handler);
|
||||
@@ -242,17 +242,17 @@ bool VideoOverlayManager::setupVideoOverlay(void* videoSinkPtr, WId windowId, QW
|
||||
if (gst_iterator_next(iter, &item) == GST_ITERATOR_OK) {
|
||||
actualSink = GST_ELEMENT(g_value_get_object(&item));
|
||||
if (actualSink && GST_IS_VIDEO_OVERLAY(actualSink)) {
|
||||
- qCDebug(log_gstreamer_backend) << "Found overlay-capable sink inside autovideosink";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Found overlay-capable sink inside autovideosink";
|
||||
gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(actualSink), windowId);
|
||||
// Use target widget size if available to set explicit render rectangle so scaling works
|
||||
if (videoWidget) {
|
||||
QSize widgetSize = videoWidget->size();
|
||||
if (widgetSize.width() > 0 && widgetSize.height() > 0) {
|
||||
gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(actualSink), 0, 0, widgetSize.width(), widgetSize.height());
|
||||
- qCDebug(log_gstreamer_backend) << "Set render rectangle to widget size for autovideosink child sink:" << widgetSize;
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Set render rectangle to widget size for autovideosink child sink:" << widgetSize;
|
||||
if (g_object_class_find_property(G_OBJECT_GET_CLASS(actualSink), "force-aspect-ratio")) {
|
||||
g_object_set(actualSink, "force-aspect-ratio", FALSE, NULL);
|
||||
- qCDebug(log_gstreamer_backend) << "Disabled force-aspect-ratio on autovideosink child sink";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Disabled force-aspect-ratio on autovideosink child sink";
|
||||
}
|
||||
} else {
|
||||
gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(actualSink), 0, 0, -1, -1);
|
||||
@@ -269,18 +269,18 @@ bool VideoOverlayManager::setupVideoOverlay(void* videoSinkPtr, WId windowId, QW
|
||||
}
|
||||
gst_iterator_free(iter);
|
||||
}
|
||||
- qCDebug(log_gstreamer_backend) << "autovideosink selected sink doesn't support overlay - video will display in separate window";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "autovideosink selected sink doesn't support overlay - video will display in separate window";
|
||||
return false;
|
||||
}
|
||||
|
||||
- qCWarning(log_gstreamer_backend) << "Sink does not support video overlay:" << sinkName;
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Sink does not support video overlay:" << sinkName;
|
||||
return false;
|
||||
#else
|
||||
Q_UNUSED(videoSinkPtr)
|
||||
Q_UNUSED(windowId)
|
||||
Q_UNUSED(videoWidget)
|
||||
Q_UNUSED(graphicsVideoItem)
|
||||
- qCDebug(log_gstreamer_backend) << "No in-process GStreamer - overlay unavailable";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "No in-process GStreamer - overlay unavailable";
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
@@ -300,7 +300,7 @@ bool VideoOverlayManager::setupVideoOverlayForPipeline(void* pipeline, WId windo
|
||||
gst_object_unref(videoSink);
|
||||
return ok;
|
||||
}
|
||||
- qCWarning(log_gstreamer_backend) << "No video sink found in pipeline";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "No video sink found in pipeline";
|
||||
return false;
|
||||
#else
|
||||
Q_UNUSED(pipeline)
|
||||
@@ -315,10 +315,10 @@ bool VideoOverlayManager::completePendingOverlaySetup(void* pipeline,
|
||||
::VideoPane* videoPane,
|
||||
bool &pendingFlag)
|
||||
{
|
||||
- qCDebug(log_gstreamer_backend) << "VideoOverlayManager: Completing pending overlay setup...";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "VideoOverlayManager: Completing pending overlay setup...";
|
||||
|
||||
if (!pendingFlag || !pipeline) {
|
||||
- qCDebug(log_gstreamer_backend) << "No pending setup or no pipeline";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "No pending setup or no pipeline";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ bool VideoOverlayManager::completePendingOverlaySetup(void* pipeline,
|
||||
const bool isXcb = platform.contains("xcb", Qt::CaseInsensitive);
|
||||
const bool hasXDisplay = !qgetenv("DISPLAY").isEmpty();
|
||||
if (!isXcb || !hasXDisplay) {
|
||||
- qCWarning(log_gstreamer_backend) << "Skipping deferred overlay setup: platform is" << platform << "(DISPLAY set:" << hasXDisplay << ")";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Skipping deferred overlay setup: platform is" << platform << "(DISPLAY set:" << hasXDisplay << ")";
|
||||
pendingFlag = false;
|
||||
return false;
|
||||
}
|
||||
@@ -335,7 +335,7 @@ bool VideoOverlayManager::completePendingOverlaySetup(void* pipeline,
|
||||
|
||||
if (videoPane) {
|
||||
windowId = videoPane->getVideoOverlayWindowId();
|
||||
- qCDebug(log_gstreamer_backend) << "Completing overlay setup with VideoPane window ID:" << windowId;
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Completing overlay setup with VideoPane window ID:" << windowId;
|
||||
} else if (graphicsVideoItem) {
|
||||
if (graphicsVideoItem->scene()) {
|
||||
QList<QGraphicsView*> views = graphicsVideoItem->scene()->views();
|
||||
@@ -344,21 +344,21 @@ bool VideoOverlayManager::completePendingOverlaySetup(void* pipeline,
|
||||
if (auto pane = qobject_cast<VideoPane*>(view)) {
|
||||
if (pane->isDirectGStreamerModeEnabled() && pane->getOverlayWidget()) {
|
||||
windowId = pane->getVideoOverlayWindowId();
|
||||
- qCDebug(log_gstreamer_backend) << "Completing overlay setup with VideoPane overlay widget window ID:" << windowId;
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Completing overlay setup with VideoPane overlay widget window ID:" << windowId;
|
||||
} else {
|
||||
- qCDebug(log_gstreamer_backend) << "VideoPane overlay widget still not ready";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "VideoPane overlay widget still not ready";
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
windowId = view->winId();
|
||||
- qCDebug(log_gstreamer_backend) << "Completing overlay setup with graphics view window ID:" << windowId;
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Completing overlay setup with graphics view window ID:" << windowId;
|
||||
}
|
||||
} else {
|
||||
- qCWarning(log_gstreamer_backend) << "Graphics video item has no associated view";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Graphics video item has no associated view";
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
- qCWarning(log_gstreamer_backend) << "Graphics video item has no scene";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Graphics video item has no scene";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -367,7 +367,7 @@ bool VideoOverlayManager::completePendingOverlaySetup(void* pipeline,
|
||||
GstElement* videoSink = gst_bin_get_by_name(GST_BIN(pipeline), "videosink");
|
||||
if (!videoSink) {
|
||||
videoSink = gst_bin_get_by_interface(GST_BIN(pipeline), GST_TYPE_VIDEO_OVERLAY);
|
||||
- if (videoSink) qCDebug(log_gstreamer_backend) << "Deferred path: found sink by overlay interface";
|
||||
+ if (videoSink) qCDebug(log_gstreamer_videooverlaymanager) << "Deferred path: found sink by overlay interface";
|
||||
}
|
||||
|
||||
if (videoSink) {
|
||||
@@ -384,14 +384,14 @@ bool VideoOverlayManager::completePendingOverlaySetup(void* pipeline,
|
||||
targetWidget = videoWidget;
|
||||
}
|
||||
if (targetWidget) {
|
||||
- qCDebug(log_gstreamer_backend) << "Deferred: binding qt6videosink to QWidget" << targetWidget;
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Deferred: binding qt6videosink to QWidget" << targetWidget;
|
||||
g_object_set(G_OBJECT(videoSink), "widget", (gpointer)targetWidget, nullptr);
|
||||
gst_object_unref(videoSink);
|
||||
pendingFlag = false;
|
||||
- qCDebug(log_gstreamer_backend) << "Deferred qt6videosink binding completed";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Deferred qt6videosink binding completed";
|
||||
return true;
|
||||
} else {
|
||||
- qCWarning(log_gstreamer_backend) << "Deferred: no target QWidget available to bind qt6videosink";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Deferred: no target QWidget available to bind qt6videosink";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,30 +399,30 @@ bool VideoOverlayManager::completePendingOverlaySetup(void* pipeline,
|
||||
const bool looksLikeXSink = sinkNameBA.contains("xvimage") || sinkNameBA.contains("ximage");
|
||||
|
||||
if (!supportsOverlay) {
|
||||
- qCWarning(log_gstreamer_backend) << "Deferred overlay skipped: sink does not support overlay interface (" << sinkName << ")";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Deferred overlay skipped: sink does not support overlay interface (" << sinkName << ")";
|
||||
gst_object_unref(videoSink);
|
||||
pendingFlag = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!looksLikeXSink) {
|
||||
- qCWarning(log_gstreamer_backend) << "Deferred overlay skipped: sink is not an X sink (" << sinkName << ") on platform" << QGuiApplication::platformName();
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Deferred overlay skipped: sink is not an X sink (" << sinkName << ") on platform" << QGuiApplication::platformName();
|
||||
gst_object_unref(videoSink);
|
||||
pendingFlag = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
- qCDebug(log_gstreamer_backend) << "Setting up deferred video overlay with window ID:" << windowId << "using sink" << sinkName;
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Setting up deferred video overlay with window ID:" << windowId << "using sink" << sinkName;
|
||||
gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(videoSink), windowId);
|
||||
gst_object_unref(videoSink);
|
||||
pendingFlag = false;
|
||||
- qCDebug(log_gstreamer_backend) << "Deferred overlay setup completed successfully";
|
||||
+ qCDebug(log_gstreamer_videooverlaymanager) << "Deferred overlay setup completed successfully";
|
||||
return true;
|
||||
} else {
|
||||
- qCWarning(log_gstreamer_backend) << "Could not find video sink for deferred overlay setup";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Could not find video sink for deferred overlay setup";
|
||||
}
|
||||
} else {
|
||||
- qCWarning(log_gstreamer_backend) << "Still no valid window ID available for deferred overlay setup";
|
||||
+ qCWarning(log_gstreamer_videooverlaymanager) << "Still no valid window ID available for deferred overlay setup";
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
@ -1,29 +1,54 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=openterface-qt
|
||||
pkgver=0.3.13
|
||||
pkgver=0.5.7
|
||||
pkgrel=0
|
||||
pkgdesc="Openterface Mini-KVM Host Application"
|
||||
arch="all !armhf" # missing qt6-qtmultimedia
|
||||
# armhf: missing qt6-qtmultimedia
|
||||
# riscv64: missing libgtk-3
|
||||
arch="all !armhf !riscv64"
|
||||
url="https://openterface.com/"
|
||||
license="AGPL-3.0-only"
|
||||
depends="qt6-qtmultimedia-ffmpeg hicolor-icon-theme"
|
||||
makedepends="qt6-qtbase-dev qt6-qtmultimedia-dev qt6-qtserialport-dev qt6-qtsvg-dev qt6-qtmultimedia-dev libusb-dev"
|
||||
depends="
|
||||
gst-plugins-good-qt
|
||||
hicolor-icon-theme
|
||||
qt6-qtmultimedia-ffmpeg
|
||||
"
|
||||
makedepends="
|
||||
cmake
|
||||
ffmpeg-dev
|
||||
libgudev-dev
|
||||
libjpeg-turbo-dev
|
||||
libusb-dev
|
||||
libx11-dev
|
||||
libxv-dev
|
||||
patchelf
|
||||
qt6-qtbase-dev
|
||||
qt6-qtmultimedia-dev
|
||||
qt6-qtserialport-dev
|
||||
samurai
|
||||
v4l-utils-dev
|
||||
"
|
||||
install="$pkgname.post-install"
|
||||
builddir="$srcdir"/Openterface_QT-$pkgver
|
||||
options="!check" # No testsuite
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://github.com/TechxArtisanStudio/Openterface_QT/archive/$pkgver.tar.gz
|
||||
openterfaceQT.desktop
|
||||
51-openterface-permissions.rules
|
||||
348_address-use-of-deleted-function.patch
|
||||
423_deduplicate-logging-categories-and-remove-backslashes.patch
|
||||
use-system-libs.patch
|
||||
"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
mkdir build && cd build
|
||||
qmake6 ..
|
||||
# OPENTERFACE_BUILD_STATIC: do not build vendored dependencies
|
||||
cmake -DOPENTERFACE_BUILD_STATIC=OFF ..
|
||||
}
|
||||
|
||||
build() {
|
||||
make -C build
|
||||
ninja -C build
|
||||
}
|
||||
|
||||
package() {
|
||||
|
|
@ -33,9 +58,16 @@ package() {
|
|||
install -Dm644 "$builddir"/images/icon_32.png "$pkgdir"/usr/share/icons/hicolor/32x32/apps/openterfaceQT.png
|
||||
install -Dm644 "$builddir"/images/icon_64.png "$pkgdir"/usr/share/icons/hicolor/64x64/apps/openterfaceQT.png
|
||||
install -Dm644 "$builddir"/images/icon_128.png "$pkgdir"/usr/share/icons/hicolor/128x128/apps/openterfaceQT.png
|
||||
|
||||
# vanilla build does not set rpath, since it usually wants to use vendored libs
|
||||
patchelf --set-rpath '/usr/lib' "$pkgdir"/usr/bin/openterfaceQT
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
7261ce2875b1617d27945de591c72779d2305889b7f53bb6758cb5e1d4dc01c969fef1638726d868f75e995c44a8e2c453cac45c90cfb3d140b8120523c4038d openterface-qt-0.3.13.tar.gz
|
||||
996415d6f7d3ed950901c380a0520ddab8c31e8d3c2e2bb3a5f631a5600cace6bcf6bf89871e4e4ef818009eeb08c448fd793e1e4758ecccf1e1a21ff04fd560 openterface-qt-0.5.7.tar.gz
|
||||
e39cfa04cbcb59e8ba54110a28eff41854f73fa7c4baeeed5433907c79781946f12bd3a731763caa1d591e664eab0650bdbd2a844954baa12bb96a76a17c6e4f openterfaceQT.desktop
|
||||
f50d721a6a2d1e0183c81e99230e91e127ee6c6f3243af1cff3e3cb78e2913ebab3346ec8b461a4710220d1ce2e12a7cc960ded6e0dc2def539375c6e737b647 51-openterface-permissions.rules
|
||||
69b5556ec9e56792e848ea1ff9374e12e6901da821ecd9d6f2f521ea30f48e564c2cd0631fc1360acd6c8c6249cfa718d5baf7ed6929e1e92f63eeaea578bcb3 348_address-use-of-deleted-function.patch
|
||||
47580d07a2d971ad2010e78373d1abbcbc05b3fbd3a7e466faed50dc9a0d632db30c0a7622e7324aeb0eb38d49e3241cb6cebc835f7adeed977b1dd7b48ea5f6 423_deduplicate-logging-categories-and-remove-backslashes.patch
|
||||
22ecac74fe0923f39f538a5d587f8c100d9709631a1584bd20646e09dcf777cd3042670d08195626220f0494e5efa9549a299c5e1fd8c42f991ec5746b42cc86 use-system-libs.patch
|
||||
"
|
||||
72
backports/openterface-qt/use-system-libs.patch
Normal file
72
backports/openterface-qt/use-system-libs.patch
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e0e8ea1..c861725 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -244,7 +244,7 @@ endif()
|
||||
# Add XCB cursor library for static linking (Linux only) - Legacy support
|
||||
if(UNIX AND NOT APPLE AND XCB_CURSOR_FOUND)
|
||||
# This is redundant now but keeping for compatibility
|
||||
- message(STATUS "XCB cursor already linked via static approach above")
|
||||
+ target_link_libraries(openterfaceQT PRIVATE X11)
|
||||
endif()
|
||||
|
||||
# Add TurboJPEG if available
|
||||
@@ -307,4 +307,4 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-# Qt components already found above
|
||||
\ No newline at end of file
|
||||
+# Qt components already found above
|
||||
diff --git a/cmake/FFmpeg.cmake b/cmake/FFmpeg.cmake
|
||||
index ef0699e..660e765 100644
|
||||
--- a/cmake/FFmpeg.cmake
|
||||
+++ b/cmake/FFmpeg.cmake
|
||||
@@ -19,7 +19,7 @@ if(NOT DEFINED FFMPEG_PREFIX)
|
||||
if(WIN32)
|
||||
set(FFMPEG_PREFIX "C:/ffmpeg-static" CACHE PATH "FFmpeg installation directory")
|
||||
else()
|
||||
- set(FFMPEG_PREFIX "/opt/ffmpeg" CACHE PATH "FFmpeg installation directory")
|
||||
+ set(FFMPEG_PREFIX "/usr" CACHE PATH "FFmpeg installation directory")
|
||||
endif()
|
||||
message(STATUS "Using default FFMPEG_PREFIX: ${FFMPEG_PREFIX}")
|
||||
endif()
|
||||
@@ -116,7 +116,7 @@ if(NOT FFMPEG_FOUND)
|
||||
message(STATUS "FFmpeg search paths: ${FFMPEG_SEARCH_PATHS}")
|
||||
foreach(SEARCH_PATH ${FFMPEG_SEARCH_PATHS})
|
||||
# For static builds, prefer .a files; check common lib directories
|
||||
- set(LIB_EXTENSIONS ".a")
|
||||
+ set(LIB_EXTENSIONS ".so")
|
||||
|
||||
# Platform-specific library paths
|
||||
if(WIN32)
|
||||
diff --git a/cmake/GStreamer.cmake b/cmake/GStreamer.cmake
|
||||
index 220e9f5..576535f 100644
|
||||
--- a/cmake/GStreamer.cmake
|
||||
+++ b/cmake/GStreamer.cmake
|
||||
@@ -316,10 +316,11 @@ else()
|
||||
# Check for Qt6 plugin availability in system
|
||||
message(STATUS "Checking for Qt6 GStreamer plugin in system...")
|
||||
find_file(GSTREAMER_QT6_PLUGIN
|
||||
- NAMES libgstqt6.so
|
||||
+ NAMES libgstqml6.so
|
||||
PATHS
|
||||
/usr/lib/x86_64-linux-gnu/gstreamer-1.0
|
||||
/usr/lib/aarch64-linux-gnu/gstreamer-1.0
|
||||
+ /usr/lib/gstreamer-1.0
|
||||
/usr/local/lib/gstreamer-1.0
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
diff --git a/cmake/Resources.cmake b/cmake/Resources.cmake
|
||||
index 2d28b89..e2009e3 100644
|
||||
--- a/cmake/Resources.cmake
|
||||
+++ b/cmake/Resources.cmake
|
||||
@@ -336,7 +336,7 @@ install(FILES ${CMAKE_SOURCE_DIR}/com.openterface.openterfaceQT.metainfo.xml
|
||||
if(COMMAND qt_generate_deploy_app_script)
|
||||
qt_generate_deploy_app_script(
|
||||
TARGET openterfaceQT
|
||||
- FILENAME_VARIABLE deploy_script
|
||||
+ OUTPUT_SCRIPT deploy_script
|
||||
NO_UNSUPPORTED_PLATFORM_ERROR
|
||||
)
|
||||
install(SCRIPT ${deploy_script})
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
|
||||
pkgname=py3-apsw
|
||||
_pkgname=apsw
|
||||
pkgver=3.49.1.0
|
||||
pkgver=3.50.4.0
|
||||
pkgrel=0
|
||||
pkgdesc="Another Python SQLite Wrapper"
|
||||
url="https://github.com/rogerbinns/apsw"
|
||||
|
|
@ -41,6 +41,6 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
faae9cceb462428345fd2815a970dfc80574848f87bade7cceb09aed17127d020fd16402b3d36afe0fbc6bf707a408feea0ce038486c2a68a2ab1077a9b68d0a py3-apsw-3.49.1.0.zip
|
||||
71db63b0a7f550c9a5d3f112d47c24953472cc6555f0b57198428997d5cf5acf73629f2da8d5d53a2473067ba19d4b655cce467a5e2267e5bd6e8cf0d9883579 py3-apsw-3.50.4.0.zip
|
||||
8f3957bd6fecb5660a7cab367043e4ccdacd87d8963bbe41cc3d525265de28f08aa207099658d785be29c5c90b818c1418f766995cd780d02b8e36252a389758 detect-sqlite-config.patch
|
||||
"
|
||||
|
|
|
|||
|
|
@ -1,65 +0,0 @@
|
|||
maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
|
||||
pkgname=py3-dateparser
|
||||
_pyname=${pkgname#py3-}
|
||||
pkgver=1.2.0
|
||||
pkgrel=0
|
||||
pkgdesc="Python parser for human readable dates"
|
||||
url="https://github.com/scrapinghub/dateparser"
|
||||
arch="noarch"
|
||||
license="BSD-3-Clause"
|
||||
depends="
|
||||
python3
|
||||
py3-dateutil
|
||||
py3-regex
|
||||
py3-tz
|
||||
py3-tzlocal
|
||||
"
|
||||
makedepends="
|
||||
py3-gpep517
|
||||
py3-setuptools
|
||||
py3-wheel
|
||||
"
|
||||
checkdepends="
|
||||
py3-fasttext
|
||||
py3-gitpython
|
||||
py3-langdetect
|
||||
py3-parameterized
|
||||
py3-parsel
|
||||
py3-pytest
|
||||
py3-requests
|
||||
py3-ruamel.yaml
|
||||
"
|
||||
subpackages="$pkgname-pyc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/scrapinghub/dateparser/archive/refs/tags/v$pkgver.tar.gz"
|
||||
builddir="$srcdir/$_pyname-$pkgver"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir .dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
# test_relative_base_setting_2_en fails due to tzinfo mismatch
|
||||
# test_custom_language_detect_fast_text fails due to wrong file format
|
||||
_test_filter="not test_parsing_date_should_fail_using_datetime_strptime_if_locale_is_non_english \
|
||||
and not test_relative_base_setting_2_en and not test_custom_language_detect_fast_text"
|
||||
|
||||
python3 -m venv --clear --without-pip --system-site-packages .testenv
|
||||
.testenv/bin/python3 -m installer .dist/*.whl
|
||||
|
||||
# test_hijri.py: needs hijri_converter, test_jalali.py: convertdate
|
||||
.testenv/bin/python3 -m pytest tests \
|
||||
-k "$_test_filter" \
|
||||
--ignore tests/test_hijri.py \
|
||||
--ignore tests/test_jalali.py
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
.dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
2d37115f25c2076c4521b77b89ef1cff3cd0a5233c45beb00d78a5c9b1a384dcd993ff7cdd1f77db95a53ce566cf7d709d46ffa2e63eb468ac954fda178a5b6e py3-dateparser-1.2.0.tar.gz
|
||||
"
|
||||
39
backports/py3-flask-httpauth/APKBUILD
Normal file
39
backports/py3-flask-httpauth/APKBUILD
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
|
||||
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
|
||||
pkgname=py3-flask-httpauth
|
||||
pkgver=4.8.0
|
||||
pkgrel=3
|
||||
pkgdesc="Basic and Digest HTTP authentication for Flask routes"
|
||||
url="https://pypi.org/project/Flask-HTTPAuth"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="py3-flask python3"
|
||||
makedepends="py3-gpep517 py3-setuptools py3-wheel"
|
||||
checkdepends="py3-pytest py3-pytest-asyncio py3-asgiref"
|
||||
subpackages="$pkgname-pyc"
|
||||
source="https://files.pythonhosted.org/packages/source/F/Flask-HTTPAuth/Flask-HTTPAuth-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/Flask-HTTPAuth-$pkgver
|
||||
|
||||
replaces="py-flask-httpauth" # Backwards compatibility
|
||||
provides="py-flask-httpauth=$pkgver-r$pkgrel" # Backwards compatibility
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir .dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
python3 -m venv --clear --without-pip --system-site-packages .testenv
|
||||
.testenv/bin/python3 -m installer .dist/*.whl
|
||||
.testenv/bin/python3 -m pytest
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
.dist/flask_httpauth*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
15878f45faf6bdde43d7b588539b044d621ba1ba590880e3d0a3bccf4e9bd04b898b3372775e99577b7e7955c4b6d2d7cc80df19ba30415c6b7c1d3183b7e5f4 Flask-HTTPAuth-4.8.0.tar.gz
|
||||
"
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
|
||||
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
|
||||
pkgname=py3-pathvalidate
|
||||
pkgver=3.2.3
|
||||
pkgrel=0
|
||||
pkgdesc="Python library to sanitize/validate a string such as filenames/file-paths/etc"
|
||||
url="https://github.com/thombashi/pathvalidate"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="python3"
|
||||
makedepends="
|
||||
py3-gpep517
|
||||
py3-setuptools
|
||||
py3-setuptools_scm
|
||||
py3-wheel
|
||||
"
|
||||
checkdepends="py3-pytest py3-click py3-faker"
|
||||
options="!check" # tests require unpackaged unmaintained dependencies
|
||||
subpackages="$pkgname-pyc"
|
||||
source="https://github.com/thombashi/pathvalidate/archive/refs/tags/v$pkgver/pathvalidate-$pkgver.tar.gz"
|
||||
builddir="$srcdir/pathvalidate-$pkgver"
|
||||
|
||||
build() {
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver"
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir .dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
.dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
674cddcf94d4f03aff5fe968c4c678f6fa510c8ff4dfd9232b2b075ccfaa17de86a08d497c10664399694c5e72b354d452d75f11f6b40d2f9778a2466af0b265 pathvalidate-3.2.3.tar.gz
|
||||
"
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
# Contributor: Aiden Grossman <agrossman154@yahoo.com>
|
||||
# Maintainer:
|
||||
pkgname=py3-pivy
|
||||
pkgver=0.6.9
|
||||
pkgrel=2
|
||||
pkgdesc="Python3 bindings for coin"
|
||||
url="https://github.com/coin3d/pivy"
|
||||
# riscv64 blocked by py3-pyside6
|
||||
# armhf blocked by qt6-qtdeclarative -> py3-pyside6
|
||||
arch="all !riscv64 !armhf"
|
||||
license="ISC"
|
||||
depends="py3-pyside6"
|
||||
makedepends="swig soqt-dev qt6-qtbase-dev python3-dev glu-dev cmake samurai"
|
||||
checkdepends="py3-pytest"
|
||||
options="!check" # test suite is interactive and requires full installation
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/coin3d/pivy/archive/refs/tags/${pkgver//_alpha/.a}.tar.gz"
|
||||
builddir="$srcdir/pivy-${pkgver//_alpha/.a}"
|
||||
|
||||
build() {
|
||||
if [ "$CBUILD" != "$CHOST" ]; then
|
||||
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
|
||||
fi
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DBUILD_SHARED_LIBS=True \
|
||||
-DCMAKE_BUILD_TYPE=None \
|
||||
$CMAKE_CROSSOPTS
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" cmake --install build
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
fd9587c69ad7468b771fbae59e68620f67a3c20850edadd65bf7994c1789d3444feb419e65dce34c6ee897c98eaca9f2f29f0bbfb4d1f0bbde26e4db56f74f78 py3-pivy-0.6.9.tar.gz
|
||||
"
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
# Maintainer: Jean-Louis Fuchs <safe.pen2857@rhizoome.ch>
|
||||
pkgname=shntool
|
||||
pkgver=3.0.10
|
||||
pkgrel=5
|
||||
pkgrel=6
|
||||
pkgdesc="A multi-purpose WAVE data processing and reporting utility"
|
||||
url="http://shnutils.freeshell.org/shntool/"
|
||||
arch="all"
|
||||
|
|
@ -13,6 +13,7 @@ source="http://shnutils.freeshell.org/shntool/dist/src/shntool-$pkgver.tar.gz
|
|||
shntool-3.0.10-large-size.patch
|
||||
shntool-3.0.10-large-times.patch
|
||||
24bit.patch
|
||||
no-cdquality-check.patch
|
||||
"
|
||||
|
||||
build() {
|
||||
|
|
@ -24,7 +25,8 @@ build() {
|
|||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--localstatedir=/var
|
||||
--localstatedir=/var \
|
||||
CFLAGS="--std=gnu17"
|
||||
make
|
||||
}
|
||||
|
||||
|
|
@ -63,4 +65,5 @@ sha512sums="
|
|||
fc44bca63d79b279db6d275caaacdb73cbebd6b902276a9052f005146fa125f4674e3cf559d46405637a337192f4a38f9bec4836af46e7ae52e4f220352c1ba7 shntool-3.0.10-large-size.patch
|
||||
9780f22d93e20dd01d18067978bdf6cbb0b460bb80f41c4f4752b3322c3d70182b3acf35b789e30fc36ca52af6127e24c00599fb49b916f01448613721a94ebe shntool-3.0.10-large-times.patch
|
||||
3c9cdd7936a6572a3c9dfc7575f5ff9a0981dd557add8e1113454487091c7b161040d25d3266937449295a1bb5317ee3515a84c3d7168360bf84643ed828e202 24bit.patch
|
||||
e5b5fe4894eea92e026eec666900bde2b10ea33d4b0ffbf74a231e443c476e11b50eebc21bc2ff2b844ca48af0a41a7b6af77fdc524d0b1bd33d03f133d99992 no-cdquality-check.patch
|
||||
"
|
||||
|
|
|
|||
21
backports/shntool/no-cdquality-check.patch
Normal file
21
backports/shntool/no-cdquality-check.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
Last-Update: 2014-11-15
|
||||
Forwarded: yes
|
||||
Author: Dmitry Smirnov <onlyjob@member.fsf.org>
|
||||
Bug-Debian: http://bugs.debian.org/769585
|
||||
Description: disable CD-quality check, needed to process 24bit 96kHz files.
|
||||
|
||||
--- a/src/core_mode.c
|
||||
+++ b/src/core_mode.c
|
||||
@@ -344,10 +344,10 @@
|
||||
|
||||
*colon = 0;
|
||||
*dot = 0;
|
||||
|
||||
- if (PROB_NOT_CD(info))
|
||||
- st_error("m:ss.ff format can only be used with CD-quality files");
|
||||
+// if (PROB_NOT_CD(info))
|
||||
+// st_error("m:ss.ff format can only be used with CD-quality files");
|
||||
|
||||
min = atoi((const char *)buf);
|
||||
sec = atoi((const char *)(colon+1));
|
||||
frames = atoi((const char *)(dot+1));
|
||||
|
|
@ -2,14 +2,14 @@
|
|||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=signal-desktop
|
||||
pkgver=7.55.0
|
||||
pkgrel=0
|
||||
pkgver=7.76.0
|
||||
pkgrel=1
|
||||
pkgdesc="A messaging app for simple private communication with friends"
|
||||
url="https://github.com/signalapp/Signal-Desktop/"
|
||||
# same as electron
|
||||
arch="aarch64 x86_64"
|
||||
license="AGPL-3.0-only"
|
||||
_llvmver=20
|
||||
_llvmver=21
|
||||
depends="
|
||||
electron
|
||||
font-barlow
|
||||
|
|
@ -29,7 +29,6 @@ makedepends="
|
|||
cmake
|
||||
crc32c-dev
|
||||
dav1d-dev
|
||||
double-conversion-dev
|
||||
electron-dev
|
||||
electron-tasje
|
||||
ffmpeg-dev
|
||||
|
|
@ -37,7 +36,6 @@ makedepends="
|
|||
glib-dev
|
||||
gn
|
||||
jsoncpp-dev
|
||||
libavif-dev
|
||||
libjpeg-turbo-dev
|
||||
libepoxy-dev
|
||||
libsecret-dev
|
||||
|
|
@ -67,10 +65,10 @@ makedepends="
|
|||
options="net !check"
|
||||
|
||||
# use _check_depends to validate this
|
||||
_libsignalver=0.71.1
|
||||
_ringrtcver=2.51.0
|
||||
_webrtcver=6998b
|
||||
_sqlcipherver=2.0.1
|
||||
_libsignalver=0.83.0
|
||||
_ringrtcver=2.59.0
|
||||
_webrtcver=7339c
|
||||
_sqlcipherver=2.4.4
|
||||
|
||||
source="
|
||||
https://github.com/signalapp/Signal-Desktop/archive/refs/tags/v$pkgver/Signal-Desktop-$pkgver.tar.gz
|
||||
|
|
@ -86,13 +84,14 @@ source="
|
|||
signal-show-window-please.patch
|
||||
signal-rollback-locale-changes.patch
|
||||
signal-do-not-package-sqlcipher-deps.patch
|
||||
signal-do-not-package-desktop-entry.patch
|
||||
ringrtc-webrtc-renamed.patch
|
||||
ringrtc-use-sh.patch
|
||||
webrtc-shared-libs.patch
|
||||
webrtc-compiler.patch
|
||||
webrtc-gcc13.patch
|
||||
webrtc-rollback-red.patch
|
||||
webrtc-rollback-3rdparty-build-gn.patch
|
||||
webrtc-pipewire-1.4.patch
|
||||
webrtc-use-only-payloadtypesuggester-for-pt-assignement.patch
|
||||
webrtc-fix-declaration-that-change-meaning-inside-class.patch
|
||||
webrtc-rtcbase-platform-thread-type-do-not-include-linux-prctl-header.patch
|
||||
|
||||
signal-desktop.sh
|
||||
"
|
||||
|
|
@ -112,6 +111,10 @@ export CFLAGS="${CFLAGS/-g/} -O2 -Wno-error -Wno-deprecated-builtins -Wno-unknow
|
|||
export CXXFLAGS="${CXXFLAGS/-g/} -O2 -Wno-error -Wno-deprecated-builtins -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations"
|
||||
export CPPFLAGS="$CPPFLAGS -D__DATE__= -D__TIME__= -D__TIMESTAMP__="
|
||||
|
||||
# stdatomic from compiler-rt uses implicit function declaration
|
||||
export CFLAGS="$CFLAGS -Wno-implicit-function-declaration"
|
||||
export CXXFLAGS="$CXXFLAGS -Wno-implicit-function-declaration"
|
||||
|
||||
export CARGO_PROFILE_RELEASE_OPT_LEVEL=2
|
||||
export CARGO_PROFILE_RELEASE_STRIP="symbols"
|
||||
#export RUSTFLAGS="$RUSTFLAGS -C linker=clang"
|
||||
|
|
@ -136,7 +139,7 @@ _update_depends() {
|
|||
-e "s|^_ringrtcver=.*|_ringrtcver=$_ringrtcver|" \
|
||||
-e "s|^_webrtcver=.*|_webrtcver=$_webrtcver|" \
|
||||
-e "s|^_sqlcipherver=.*|_sqlcipherver=$_sqlcipherver|" \
|
||||
APKBUILD
|
||||
$APKBUILD
|
||||
}
|
||||
|
||||
# webrtc only, the other dependencies are fine with tarballs
|
||||
|
|
@ -213,7 +216,6 @@ prepare() {
|
|||
brotli
|
||||
crc32c
|
||||
dav1d
|
||||
double-conversion
|
||||
ffmpeg
|
||||
flatbuffers
|
||||
fontconfig
|
||||
|
|
@ -223,7 +225,6 @@ prepare() {
|
|||
icu
|
||||
jsoncpp
|
||||
libaom
|
||||
libavif
|
||||
libdrm
|
||||
libjpeg
|
||||
libpng
|
||||
|
|
@ -304,7 +305,7 @@ prepare() {
|
|||
cd "$builddir"/libsignal/node
|
||||
|
||||
# fix target
|
||||
sed -i 's/unknown-linux-gnu/alpine-linux-musl/g' binding.gyp
|
||||
sed -i 's/unknown-linux-gnu/alpine-linux-musl/g' build_node_bridge.py
|
||||
|
||||
msg "Installing libsignal js dependencies"
|
||||
yarn --ignore-scripts --frozen-lockfile
|
||||
|
|
@ -329,6 +330,9 @@ build() {
|
|||
rtc_include_ilbc=false
|
||||
rtc_libvpx_build_vp9=true
|
||||
rtc_use_x11=false
|
||||
rustc_version=\"yes\"
|
||||
rust_bindgen_root=\"/usr\"
|
||||
rust_sysroot_absolute=\"/usr\"
|
||||
|
||||
build_with_mozilla=false
|
||||
chrome_pgo_phase=0
|
||||
|
|
@ -381,8 +385,7 @@ build() {
|
|||
cd "$builddir"/libsignal/node
|
||||
|
||||
msg "Building libsignal"
|
||||
node-gyp configure --nodedir=/usr/include/electron/node_headers --build-from-source
|
||||
node-gyp build --nodedir=/usr/include/electron/node_headers --build-from-source
|
||||
npm_config_nodedir=/usr/include/electron/node_headers python3 build_node_bridge.py
|
||||
|
||||
mkdir -p prebuilds/linux-$chromium_arch
|
||||
mv build/Release/libsignal_client_linux_$chromium_arch.node prebuilds/linux-$chromium_arch/node.napi.node
|
||||
|
|
@ -478,24 +481,25 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
59e1aae568735976e79ee38d55c87b137f7075063985e72deb42b53af6facd7ed2a8c0912fd86cb88df3182d17c1b58af11bf1501135e6855cfd5ee70270905e Signal-Desktop-7.55.0.tar.gz
|
||||
3d1b5b84d42b4f6da46a2f626ec72931d3d7432c10c0d43e562851933f6cf0a434630eb5f8bb9a586d27d6ad5a5d8a6c96873dc468e53bbf6297c35a8da090d8 libsignal-0.71.1.tar.gz
|
||||
8e32d75f9f8216106b6858d9ab58ad53f209408fc155fe27dec184c8c65c9ab5a3a93e9567953f209424ed435ccc6d4903a49a4edae36eb744a897cc02098312 ringrtc-2.51.0.tar.gz
|
||||
592987c1661de464a4e6dee3081cb5fd32e5afdacdba43d901557a217e62301b4655009ad5bdc0c1dcff5e8b67d7acd68ac953cd638f31196162aa3ccdd9c63b node-sqlcipher-2.0.1.tar.gz
|
||||
ba02cb0c293210f9a683b0e08c6acbe84f5b78089329ec017b0db3493b38ccf39e92c49c2475dc66b5ce3bfe060686718cb5053787e2d61ed320dadb22891989 webrtc-6998b.tar.zst
|
||||
c847d3679df77ca137b4c3345b3b941a08639677efcd5eeea6613572fa90b8ad1b8d1d53e077902d4f47c05c480c408787024906d6917dcbf4a840838bf6d79d Signal-Desktop-7.76.0.tar.gz
|
||||
43271a64f65a4cf0e7855fb84476ff811ef248665cb74fdaa9ce12b02d2039abdf8fca28554e7e884eabaa9bdd77e8f5383e6354e589436671675ddab7194d81 libsignal-0.83.0.tar.gz
|
||||
ba4a1850bd096470a6370a0bf730550f64df4a2349cacca3b4864ef1a3a04713dd200307b9ad7ba47425322573148d6bd2ce85c11c2a49232d41e739ef5e788d ringrtc-2.59.0.tar.gz
|
||||
79dd21548329b4ee409fa73b013c18ed4e85038aeef7a4cfe196fd6b5113279da8ad287a259fa6a6b546b52a5a6dd6ae2cb1050007043d25f76d7917dbbbc02d node-sqlcipher-2.4.4.tar.gz
|
||||
06ffb4cdb82f818cc419d42ff2de03977d7e94c5f3eb8ac8a401bcb52ec38fa988c5d757f4bd79e5d9968fa83754fc9046180c950961c90a59eeb6130bf5552f webrtc-7339c.tar.zst
|
||||
8d2d2d82c8546c2dd1fef161b61df79918f8c22235a56a46adb375a0beb4acef12c5fe53e67242a4be97f77adc522ff79b47949c352956c742a70d50f4179f7f libsignal-auditable.patch
|
||||
7ee747c8aaa9d6e9149fe0a031e3d4cc9e9c08f22c42076bd05e2acb86952f8170032613d13a53716010edfa3f26ad97b530e82460318eb46a42e28cf5faeb9d signal-use-system-sqlcipher.patch
|
||||
fc2af28645364cd85c106304a26811b036f6be048c52137fbbcc112870a84132a181f532563e0569b560fde3cf8c02480666a9b01d804b0008f97c728005b1c7 signal-disable-updates.patch
|
||||
ef3622da416a5bd2d4bea4f2a4fbb21a985f660d4acc17bbe66ce51ac1180ab92c0c843a5414ff56ea1deda87c2b0f611a299ca8ebe4d6a24df53626b36ceea8 signal-disable-updates.patch
|
||||
853de84d636f730694f17bcec63463fa7bfbdd0a7f7a64618a8fc6bc523ce1a9854b4c651753735af735c18101295d3efbe54f83ae0bccbed83c8c1fee3e7049 signal-update-links.patch
|
||||
882d6889b23a3ebc6449c8b6acec8c3853674a7e94f066d65b57bab674ba8c11d582ba2c760825cb67b9202716e6d8b7123001d1e9f9229e49a0b77e9d978265 signal-show-window-please.patch
|
||||
aca92e4de6cd005d660d7e8b99607de96ca2d7dc220e3465247d517e915e4d41a4b0eb519e85c5eca1c81cd8bac9821acd03ff57f1603918987829c6ea7757b4 signal-rollback-locale-changes.patch
|
||||
3dd3bf2f6925e2672a20ef56bbac519099d54e912e5a434a0649ea152db5039dbe1bbade3430b485ae9a6085d747dd88602d4efc5198d5a4dbf1b8359de11f94 signal-rollback-locale-changes.patch
|
||||
961568777b86f8fbcc73360252123686c9d1e16b2650f23d8afbc6d7580d53024f81b62e9e9cbdcd0031b5cf99854bd47c6dd4580197f2b27b8b4cbb51c6c9c9 signal-do-not-package-sqlcipher-deps.patch
|
||||
d8cafd4ae1f7438417f5c414d68a175c3d24b66a14b9f3b8ca9c9acae2b2eaa68985ee81c1df7d754a206ff1c9b02929803440fb0734db38b6ac9ab3e34205b0 signal-do-not-package-desktop-entry.patch
|
||||
02a648bb8541a39c75fec2db39f024a27976afca41908eefa2fe1f2e30b05b5d59f980ccc930021c0b0c09ba8b0cbcae071e9f0dd530543c667adbc4272af552 ringrtc-webrtc-renamed.patch
|
||||
98a7e4df27c3ed56c5968ebc3ae8e08bfb54362d0c910f9af1d414079a6d5fe0f18aa570ae3c38042f4691af6a130cb3ff689625e26a3987720dd319a5f587b1 webrtc-shared-libs.patch
|
||||
897174fa3b1eaa74a3b2d7d861863a9f60550ddb0d7be700cd590600efdc3bd962f52c21e371276eaf8d5657c98fe8ade9853b0197b61a68d5dce6fa03b5899b webrtc-compiler.patch
|
||||
3f1095861a79862ab5a55c86d7e353d272974617afba39e4d4441024bede8d7b9b8e122da90d56a9c3c0965171803d6b9e29e91d78167a08c6bcc86b3eedab18 webrtc-gcc13.patch
|
||||
8f53dcf3264c5cec338f037e57a7770ec939ee06dfb0c5dfeab23967a3a64d3f861a6b5419766ac892676036b4522bce2f47279ca3658b5c0b6a31c82ac05053 webrtc-rollback-red.patch
|
||||
f8bd574a0de077a643ced26e8a0e3f162e014bbf91c957bbefd113883a70e2b63e483bf400b7e2da8d09edfe76d4f6a257f194a14124f344f1625c5632d12acb webrtc-rollback-3rdparty-build-gn.patch
|
||||
7fa0344a144d5b8f05d0962799b8ce1dbe8f2d403a311d4fbf802a2d032e6586a1268387052b529e809c4740a79d6737a63d7e37ea8902ce926b74309dd44fc3 webrtc-pipewire-1.4.patch
|
||||
87534e7b5ad7365509eab75629e6bd1a9ed61ee92f7e358405a0abaf0df57de14623fb3894eb082f8785422e5c087e1c50f9e2e5cafbb2529591fd7bf447f7f5 signal-desktop.sh
|
||||
19d2e07bdc0b160ec542fcb0a3d94ae1e37dcb1b3455e57b278cf074f8aac625341b47f4f06a1f7eb5a197cb0f11754de8785ffd10876852972cbfafdc2615db ringrtc-use-sh.patch
|
||||
a9374040dcbc9203c8a3b4ad1cf97d58805cd4755f4f585a988b113697ea97d5900ad68f6a30aa0621f34ab54ae98984a8ce228a2d08186ee1bf3384abf3f364 webrtc-shared-libs.patch
|
||||
8ba740f0552872ddf383545a6bb99bf7bcdd2610cee51c6e69dc667893006facd5d72f62274e25c1a58e1a58c8e8b0b5303b648e4c74a71925639cc9691c72c4 webrtc-compiler.patch
|
||||
d44f62e4ccf2d9094d6ed217b24fa2cde276c7f64f4d6fd26e84dfc021ea667abcb21f9e4666cfd0d88d6ee0a6b1a20b6cc68c8720462711e3b5451e263f6c4a webrtc-use-only-payloadtypesuggester-for-pt-assignement.patch
|
||||
ace87a2be03c6965012a87a10918c5923b10d5e74a7169c1e1384c15b34a367d0c47e806764c368cc30dad01a3dce54b50587abea9831130178db3806619abc8 webrtc-fix-declaration-that-change-meaning-inside-class.patch
|
||||
d17ecd89e867b24a21144d267e1bf7d09e3898018a0f9fcd87084b9de8091bc56f904a1cabdc487a8e46ab509c11ddd363c574d75d85a79e3c4d9424a13b2093 webrtc-rtcbase-platform-thread-type-do-not-include-linux-prctl-header.patch
|
||||
8e1de53ec1608fa05972af605213e8423b8f88cfd8d6a1989bdcaf77ed1420871c39efa15c56ffeccb6ff86677acc5bc436020f3554bee4f94930c7d9f4e16b6 signal-desktop.sh
|
||||
"
|
||||
|
|
|
|||
14
backports/signal-desktop/ringrtc-use-sh.patch
Normal file
14
backports/signal-desktop/ringrtc-use-sh.patch
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/ringrtc/src/node/package.json.orig b/ringrtc/src/node/package.json
|
||||
index 366caf2927f..eedeca3895e 100644
|
||||
--- a/ringrtc/src/node/package.json.orig
|
||||
+++ b/ringrtc/src/node/package.json
|
||||
@@ -16,7 +16,7 @@
|
||||
"virtual_audio": "dist/bin/virtual_audio.sh"
|
||||
},
|
||||
"scripts": {
|
||||
- "build": "tsc && bash scripts/build-help.sh",
|
||||
+ "build": "tsc && sh scripts/build-help.sh",
|
||||
"clean": "rimraf dist",
|
||||
"test": "electron-mocha --renderer --recursive dist/test --timeout 10000 --require source-map-support/register",
|
||||
"eslint": "eslint .",
|
||||
|
||||
|
|
@ -3,4 +3,4 @@
|
|||
# app chooses config (including used endpoints) based on this
|
||||
export NODE_ENV=production
|
||||
|
||||
exec electron /usr/lib/signal-desktop/app.asar
|
||||
exec electron /usr/lib/signal-desktop/app.asar "$@"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
--- a/Signal-Desktop/config/production.json
|
||||
diff --git a/Signal-Desktop/config/production.json.orig b/Signal-Desktop/config/production.json
|
||||
index ee1fc6523d8..6fcb97f3a36 100644
|
||||
--- a/Signal-Desktop/config/production.json.orig
|
||||
+++ b/Signal-Desktop/config/production.json
|
||||
@@ -16,5 +16,5 @@
|
||||
"serverTrustRoot": "BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF",
|
||||
"genericServerPublicParams": "AByD873dTilmOSG0TjKrvpeaKEsUmIO8Vx9BeMmftwUs9v7ikPwM8P3OHyT0+X3EUMZrSe9VUp26Wai51Q9I8mdk0hX/yo7CeFGJyzoOqn8e/i4Ygbn5HoAyXJx5eXfIbqpc0bIxzju4H/HOQeOpt6h742qii5u/cbwOhFZCsMIbElZTaeU+BWMBQiZHIGHT5IE0qCordQKZ5iPZom0HeFa8Yq0ShuEyAl0WINBiY6xE3H/9WnvzXBbMuuk//eRxXgzO8ieCeK8FwQNxbfXqZm6Ro1cMhCOF3u7xoX83QhpN",
|
||||
"backupServerPublicParams": "AJwNSU55fsFCbgaxGRD11wO1juAs8Yr5GF8FPlGzzvdJJIKH5/4CC7ZJSOe3yL2vturVaRU2Cx0n751Vt8wkj1bozK3CBV1UokxV09GWf+hdVImLGjXGYLLhnI1J2TWEe7iWHyb553EEnRb5oxr9n3lUbNAJuRmFM7hrr0Al0F0wrDD4S8lo2mGaXe0MJCOM166F8oYRQqpFeEHfiLnxA1O8ZLh7vMdv4g9jI5phpRBTsJ5IjiJrWeP0zdIGHEssUeprDZ9OUJ14m0v61eYJMKsf59Bn+mAT2a7YfB+Don9O",
|
||||
"stripePublishableKey": "pk_live_6cmGZopuTsV8novGgJJW9JpC00vLIgtQ1D",
|
||||
- "updatesEnabled": true
|
||||
+ "updatesEnabled": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
diff --git a/Signal-Desktop/package.json.orig b/Signal-Desktop/package.json
|
||||
index 832035e..e6ac14c 100644
|
||||
--- a/Signal-Desktop/package.json.orig
|
||||
+++ b/Signal-Desktop/package.json
|
||||
@@ -519,11 +519,6 @@
|
||||
},
|
||||
"linux": {
|
||||
"category": "Network;InstantMessaging;Chat",
|
||||
- "desktop": {
|
||||
- "entry": {
|
||||
- "StartupWMClass": "signal"
|
||||
- }
|
||||
- },
|
||||
"target": [
|
||||
"deb"
|
||||
],
|
||||
|
|
@ -42,7 +42,7 @@ index a63eef4079d..2a959da4d0d 100644
|
|||
-import { app } from 'electron';
|
||||
+import { join } from 'path';
|
||||
+import { readFileSync } from 'fs';
|
||||
import { merge } from 'lodash';
|
||||
import lodash from 'lodash';
|
||||
import * as LocaleMatcher from '@formatjs/intl-localematcher';
|
||||
import { z } from 'zod';
|
||||
@@ -16,9 +15,6 @@ import type { LocalizerType } from '../ts/types/Util';
|
||||
|
|
@ -129,7 +129,7 @@ index 7187d287acc..9a17d638f44 100644
|
|||
import { readdir, mkdir, readFile, writeFile } from 'node:fs/promises';
|
||||
import { join, dirname } from 'node:path';
|
||||
-import pMap from 'p-map';
|
||||
-import { isLocaleMessageType } from '../util/setupI18nMain';
|
||||
-import { isLocaleMessageType } from '../util/setupI18nMain.js';
|
||||
-
|
||||
-async function compact({
|
||||
- sourceDir,
|
||||
|
|
|
|||
|
|
@ -29,27 +29,27 @@ index 88109264ea9..192a3f3119e 100644
|
|||
}
|
||||
|
||||
if (!optimize_for_size) {
|
||||
@@ -1241,8 +1241,8 @@ config("compiler_cpu_abi") {
|
||||
}
|
||||
@@ -1303,8 +1303,8 @@ config("compiler_cpu_abi") {
|
||||
]
|
||||
} else if (current_cpu == "arm") {
|
||||
if (is_clang && !is_android && !is_nacl && !is_chromeos_device) {
|
||||
if (is_clang && !is_android && !is_chromeos_device) {
|
||||
- cflags += [ "--target=arm-linux-gnueabihf" ]
|
||||
- ldflags += [ "--target=arm-linux-gnueabihf" ]
|
||||
+ cflags += [ "--target=arm-alpine-linux-gnueabihf" ]
|
||||
+ ldflags += [ "--target=arm-alpine-linux-gnueabihf" ]
|
||||
}
|
||||
if (!is_nacl) {
|
||||
cflags += [
|
||||
@@ -1256,8 +1256,8 @@ config("compiler_cpu_abi") {
|
||||
cflags += [
|
||||
"-march=$arm_arch",
|
||||
@@ -1315,8 +1315,8 @@ config("compiler_cpu_abi") {
|
||||
}
|
||||
} else if (current_cpu == "arm64") {
|
||||
if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
|
||||
!is_chromeos_device) {
|
||||
if (is_clang && !is_android && !is_fuchsia && !is_chromeos_device) {
|
||||
- cflags += [ "--target=aarch64-linux-gnu" ]
|
||||
- ldflags += [ "--target=aarch64-linux-gnu" ]
|
||||
+ cflags += [ "--target=aarch64-alpine-linux-gnu" ]
|
||||
+ ldflags += [ "--target=aarch64-alpine-linux-gnu" ]
|
||||
}
|
||||
} else if (current_cpu == "mipsel" && !is_nacl) {
|
||||
} else if (current_cpu == "mipsel") {
|
||||
ldflags += [ "-Wl,--hash-style=sysv" ]
|
||||
@@ -1267,8 +1267,8 @@ config("compiler_cpu_abi") {
|
||||
cflags += [ "--target=mipsel-linux-android" ]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,58 @@
|
|||
diff --git a/webrtc/p2p/base/port_interface.h b/webrtc/p2p/base/port_interface.h
|
||||
index 2335fc2..1484a14 100644
|
||||
--- a/webrtc/p2p/base/port_interface.h
|
||||
+++ b/webrtc/p2p/base/port_interface.h
|
||||
@@ -55,7 +55,7 @@
|
||||
virtual ~PortInterface();
|
||||
|
||||
virtual IceCandidateType Type() const = 0;
|
||||
- virtual const Network* Network() const = 0;
|
||||
+ virtual const ::webrtc::Network* Network() const = 0;
|
||||
|
||||
// Methods to set/get ICE role and tiebreaker values.
|
||||
virtual void SetIceRole(IceRole role) = 0;
|
||||
diff --git a/webrtc/pc/codec_vendor.h b/webrtc/pc/codec_vendor.h
|
||||
index aaddc4f..719a082 100644
|
||||
--- a/webrtc/pc/codec_vendor.h
|
||||
+++ b/webrtc/pc/codec_vendor.h
|
||||
@@ -119,7 +119,7 @@
|
||||
class CodecLookupHelper {
|
||||
public:
|
||||
virtual ~CodecLookupHelper() = default;
|
||||
- virtual PayloadTypeSuggester* PayloadTypeSuggester() = 0;
|
||||
+ virtual ::webrtc::PayloadTypeSuggester* PayloadTypeSuggester() = 0;
|
||||
// Look up the codec vendor to use, depending on context.
|
||||
// This call may get additional arguments in the future, to aid
|
||||
// in selection of the correct context.
|
||||
diff --git a/webrtc/pc/jsep_transport.h b/webrtc/pc/jsep_transport.h
|
||||
index 017aad7..50dc991 100644
|
||||
--- a/webrtc/pc/jsep_transport.h
|
||||
+++ b/webrtc/pc/jsep_transport.h
|
||||
@@ -115,14 +115,12 @@
|
||||
}
|
||||
|
||||
RTCError SetLocalJsepTransportDescription(
|
||||
- const JsepTransportDescription& jsep_description,
|
||||
- SdpType type);
|
||||
+ const JsepTransportDescription& jsep_description, SdpType type);
|
||||
|
||||
// Set the remote TransportDescription to be used by DTLS and ICE channels
|
||||
// that are part of this Transport.
|
||||
RTCError SetRemoteJsepTransportDescription(
|
||||
- const JsepTransportDescription& jsep_description,
|
||||
- SdpType type);
|
||||
+ const JsepTransportDescription& jsep_description, SdpType type);
|
||||
RTCError AddRemoteCandidates(const Candidates& candidates);
|
||||
|
||||
// Set the "needs-ice-restart" flag as described in JSEP. After the flag is
|
||||
@@ -204,7 +202,9 @@
|
||||
return rtp_dtls_transport_;
|
||||
}
|
||||
|
||||
- scoped_refptr<SctpTransport> SctpTransport() const { return sctp_transport_; }
|
||||
+ scoped_refptr<::webrtc::SctpTransport> SctpTransport() const {
|
||||
+ return sctp_transport_;
|
||||
+ }
|
||||
|
||||
// TODO(bugs.webrtc.org/9719): Delete method, update callers to use
|
||||
// SctpTransport() instead.
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
--- ./webrtc/rtc_base/system/file_wrapper.h.orig
|
||||
+++ ./webrtc/rtc_base/system/file_wrapper.h
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
+#include <stdint.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
--- ./webrtc/modules/audio_coding/neteq/reorder_optimizer.cc.orig
|
||||
+++ ./webrtc/modules/audio_coding/neteq/reorder_optimizer.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "modules/audio_coding/neteq/reorder_optimizer.h"
|
||||
|
||||
#include <algorithm>
|
||||
+#include <cstdint>
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
|
||||
--- ./webrtc/rtc_base/ssl_stream_adapter.h.orig
|
||||
+++ ./webrtc/rtc_base/ssl_stream_adapter.h
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "rtc_base/ssl_certificate.h"
|
||||
#include "rtc_base/ssl_identity.h"
|
||||
#include "rtc_base/stream.h"
|
||||
+#include <optional>
|
||||
|
||||
namespace rtc {
|
||||
|
||||
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
Patch-Source: https://webrtc-review.googlesource.com/c/src/+/380500
|
||||
---
|
||||
--- a/webrtc/modules/video_capture/linux/pipewire_session.cc
|
||||
+++ b/webrtc/modules/video_capture/linux/pipewire_session.cc
|
||||
@@ -87,7 +87,7 @@
|
||||
.param = OnNodeParam,
|
||||
};
|
||||
|
||||
- pw_node_add_listener(proxy_, &node_listener_, &node_events, this);
|
||||
+ pw_node_add_listener(reinterpret_cast<pw_node*>(proxy_), &node_listener_, &node_events, this);
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -119,7 +119,7 @@
|
||||
uint32_t id = info->params[i].id;
|
||||
if (id == SPA_PARAM_EnumFormat &&
|
||||
info->params[i].flags & SPA_PARAM_INFO_READ) {
|
||||
- pw_node_enum_params(that->proxy_, 0, id, 0, UINT32_MAX, nullptr);
|
||||
+ pw_node_enum_params(reinterpret_cast<pw_node*>(that->proxy_), 0, id, 0, UINT32_MAX, nullptr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
diff --git a/webrtc/third_party/BUILD.gn b/webrtc/third_party/BUILD.gn
|
||||
index 256fd092e2e..4ce797ebad7 100644
|
||||
--- a/webrtc/third_party/BUILD.gn
|
||||
+++ b/webrtc/third_party/BUILD.gn
|
||||
@@ -55,12 +55,10 @@ group("jpeg_includes") {
|
||||
component("freetype_harfbuzz") {
|
||||
public_configs = []
|
||||
public_deps = []
|
||||
- if (enable_freetype) {
|
||||
- if (use_system_freetype) {
|
||||
- public_configs += [ "//build/linux:freetype_from_pkgconfig" ]
|
||||
- } else {
|
||||
- public_deps += [ "//third_party/freetype:freetype_source" ]
|
||||
- }
|
||||
+ if (use_system_freetype) {
|
||||
+ public_configs += [ "//build/linux:freetype_from_pkgconfig" ]
|
||||
+ } else {
|
||||
+ public_deps += [ "//third_party/freetype:freetype_source" ]
|
||||
}
|
||||
if (use_system_harfbuzz) {
|
||||
public_configs += [ "//third_party/harfbuzz-ng:harfbuzz_from_pkgconfig" ]
|
||||
@@ -71,8 +69,5 @@ component("freetype_harfbuzz") {
|
||||
|
||||
buildflag_header("freetype_buildflags") {
|
||||
header = "freetype_buildflags.h"
|
||||
- flags = [
|
||||
- "USE_SYSTEM_FREETYPE=$use_system_freetype",
|
||||
- "ENABLE_FREETYPE=$enable_freetype",
|
||||
- ]
|
||||
+ flags = [ "USE_SYSTEM_FREETYPE=$use_system_freetype" ]
|
||||
}
|
||||
|
|
@ -1,136 +0,0 @@
|
|||
diff --git a/webrtc/ringrtc/rffi/src/sdp_observer.cc b/webrtc/ringrtc/rffi/src/sdp_observer.cc
|
||||
index d60f3d5e7ba..d561dedd1d0 100644
|
||||
--- a/webrtc/ringrtc/rffi/src/sdp_observer.cc
|
||||
+++ b/webrtc/ringrtc/rffi/src/sdp_observer.cc
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "rffi/api/sdp_observer_intf.h"
|
||||
#include "rffi/src/ptr.h"
|
||||
#include "rffi/src/sdp_observer.h"
|
||||
-#include "third_party/re2/src/re2/re2.h"
|
||||
+#include <regex>
|
||||
|
||||
namespace webrtc {
|
||||
namespace rffi {
|
||||
@@ -29,8 +29,8 @@ void CreateSessionDescriptionObserverRffi::OnSuccess(SessionDescriptionInterface
|
||||
// TODO tweak the response a little
|
||||
std::string sdp;
|
||||
if (session_description->ToString(&sdp)) {
|
||||
- static LazyRE2 ssrc_re = {".+urn:ietf:params:rtp-hdrext:ssrc-audio-level.*\r?\n"};
|
||||
- RE2::Replace(&sdp, *ssrc_re, "");
|
||||
+ sdp = std::regex_replace(sdp, std::regex("(a=fmtp:111 ((?!cbr=).)*)\r?\n"), "$1;cbr=1\r\n");
|
||||
+ sdp = std::regex_replace(sdp, std::regex(".+urn:ietf:params:rtp-hdrext:ssrc-audio-level.*\r?\n"), "");
|
||||
|
||||
std::unique_ptr<SessionDescriptionInterface> session_description2 = CreateSessionDescription(session_description->GetType(), sdp);
|
||||
delete session_description;
|
||||
diff --git a/webrtc/ringrtc/rffi/BUILD.gn b/webrtc/ringrtc/rffi/BUILD.gn
|
||||
index 4564e734e63..341535b0fc7 100644
|
||||
--- a/webrtc/ringrtc/rffi/BUILD.gn
|
||||
+++ b/webrtc/ringrtc/rffi/BUILD.gn
|
||||
@@ -58,7 +58,6 @@ if (is_android) {
|
||||
"${android_sdk}:libjingle_peerconnection_jni",
|
||||
"${android_sdk}:libjingle_peerconnection_metrics_default_jni",
|
||||
"//pc:libjingle_peerconnection",
|
||||
- "//third_party/re2",
|
||||
]
|
||||
output_extension = "so"
|
||||
}
|
||||
@@ -78,7 +77,6 @@ if (is_ios) {
|
||||
|
||||
deps = [
|
||||
"//third_party/libyuv",
|
||||
- "//third_party/re2",
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -94,7 +92,6 @@ if (is_linux || is_mac || is_win) {
|
||||
deps = [
|
||||
"//sdk:media_constraints",
|
||||
"//media:rtc_simulcast_encoder_adapter",
|
||||
- "//third_party/re2",
|
||||
]
|
||||
}
|
||||
}
|
||||
diff --git a/webrtc/ringrtc/rffi/api/peer_connection_intf.h b/webrtc/ringrtc/rffi/api/peer_connection_intf.h
|
||||
index 66958254fed..4cd223beb93 100644
|
||||
--- a/webrtc/ringrtc/rffi/api/peer_connection_intf.h
|
||||
+++ b/webrtc/ringrtc/rffi/api/peer_connection_intf.h
|
||||
@@ -105,6 +105,7 @@ RUSTEXPORT webrtc::SessionDescriptionInterface*
|
||||
Rust_sessionDescriptionFromV4(bool offer,
|
||||
const RffiConnectionParametersV4* v4_borrowed,
|
||||
bool enable_tcc_audio,
|
||||
+ bool enable_red_audio,
|
||||
bool enable_vp9);
|
||||
|
||||
RUSTEXPORT void
|
||||
diff --git a/webrtc/ringrtc/rffi/src/peer_connection.cc b/webrtc/ringrtc/rffi/src/peer_connection.cc
|
||||
index 9db5ed8219d..0714b3589e3 100644
|
||||
--- a/webrtc/ringrtc/rffi/src/peer_connection.cc
|
||||
+++ b/webrtc/ringrtc/rffi/src/peer_connection.cc
|
||||
@@ -42,6 +42,7 @@ int VIDEO_LAYERS_ALLOCATION_EXT_ID = 14;
|
||||
// 101 used by connection.rs
|
||||
int DATA_PT = 101;
|
||||
int OPUS_PT = 102;
|
||||
+int OPUS_RED_PT = 105;
|
||||
int VP8_PT = 108;
|
||||
int VP8_RTX_PT = 118;
|
||||
int VP9_PT = 109;
|
||||
@@ -317,12 +318,14 @@ RUSTEXPORT webrtc::SessionDescriptionInterface*
|
||||
Rust_sessionDescriptionFromV4(bool offer,
|
||||
const RffiConnectionParametersV4* v4_borrowed,
|
||||
bool enable_tcc_audio,
|
||||
+ bool enable_red_audio,
|
||||
bool enable_vp9) {
|
||||
// Major changes from the default WebRTC behavior:
|
||||
// 1. We remove all codecs except Opus, VP8, and VP9
|
||||
// 2. We remove all header extensions except for transport-cc, video orientation,
|
||||
// and abs send time.
|
||||
// 3. Opus CBR and DTX is enabled.
|
||||
+ // 4. RED is enabled for audio.
|
||||
|
||||
// For some reason, WebRTC insists that the video SSRCs for one side don't
|
||||
// overlap with SSRCs from the other side. To avoid potential problems, we'll give the
|
||||
@@ -361,6 +364,15 @@ Rust_sessionDescriptionFromV4(bool offer,
|
||||
auto video = std::make_unique<cricket::VideoContentDescription>();
|
||||
set_rtp_params(video.get());
|
||||
|
||||
+ // Turn on the RED "meta codec" for Opus redundancy.
|
||||
+ auto opus_red = cricket::CreateAudioCodec(OPUS_RED_PT, cricket::kRedCodecName, 48000, 2);
|
||||
+ opus_red.SetParam("", std::to_string(OPUS_PT) + "/" + std::to_string(OPUS_PT));
|
||||
+
|
||||
+ if (enable_red_audio) {
|
||||
+ // Add RED before Opus to use it by default when sending.
|
||||
+ audio->AddCodec(opus_red);
|
||||
+ }
|
||||
+
|
||||
auto opus = cricket::CreateAudioCodec(OPUS_PT, cricket::kOpusCodecName, 48000, 2);
|
||||
// These are the current defaults for WebRTC
|
||||
// We set them explicitly to avoid having the defaults change on us.
|
||||
@@ -378,6 +390,11 @@ Rust_sessionDescriptionFromV4(bool offer,
|
||||
opus.AddFeedbackParam(cricket::FeedbackParam(cricket::kRtcpFbParamTransportCc, cricket::kParamValueEmpty));
|
||||
audio->AddCodec(opus);
|
||||
|
||||
+ if (!enable_red_audio) {
|
||||
+ // Add RED after Opus so that RED packets can at least be decoded properly if received.
|
||||
+ audio->AddCodec(opus_red);
|
||||
+ }
|
||||
+
|
||||
auto add_video_feedback_params = [] (cricket::Codec* video_codec) {
|
||||
video_codec->AddFeedbackParam(cricket::FeedbackParam(cricket::kRtcpFbParamTransportCc, cricket::kParamValueEmpty));
|
||||
video_codec->AddFeedbackParam(cricket::FeedbackParam(cricket::kRtcpFbParamCcm, cricket::kRtcpFbCcmParamFir));
|
||||
@@ -589,9 +606,16 @@ CreateSessionDescriptionForGroupCall(bool local,
|
||||
opus.SetParam("cbr", "1");
|
||||
opus.AddFeedbackParam(cricket::FeedbackParam(cricket::kRtcpFbParamTransportCc, cricket::kParamValueEmpty));
|
||||
|
||||
+ // Turn on the RED "meta codec" for Opus redundancy.
|
||||
+ auto opus_red = cricket::CreateAudioCodec(OPUS_RED_PT, cricket::kRedCodecName, 48000, 2);
|
||||
+ opus_red.SetParam("", std::to_string(OPUS_PT) + "/" + std::to_string(OPUS_PT));
|
||||
+
|
||||
+ // Add RED after Opus so that RED packets can at least be decoded properly if received.
|
||||
local_audio->AddCodec(opus);
|
||||
+ local_audio->AddCodec(opus_red);
|
||||
for (auto& remote_audio : remote_audios) {
|
||||
remote_audio->AddCodec(opus);
|
||||
+ remote_audio->AddCodec(opus_red);
|
||||
}
|
||||
|
||||
auto add_video_feedback_params = [] (cricket::Codec* video_codec) {
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/webrtc/rtc_base/platform_thread_types.cc.orig b/webrtc/rtc_base/platform_thread_types.cc
|
||||
index 20bf4af..482b15f 100644
|
||||
--- a/webrtc/rtc_base/platform_thread_types.cc.orig
|
||||
+++ b/webrtc/rtc_base/platform_thread_types.cc
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
// IWYU pragma: begin_keep
|
||||
#if defined(WEBRTC_LINUX)
|
||||
-#include <linux/prctl.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
|
|
@ -18,10 +18,10 @@
|
|||
# Only the root target and the test should depend on this.
|
||||
visibility = [
|
||||
"//:default",
|
||||
@@ -472,7 +472,6 @@
|
||||
]
|
||||
@@ -530,7 +530,6 @@ if (!build_with_chromium) {
|
||||
|
||||
sources = []
|
||||
|
||||
- complete_static_lib = true
|
||||
suppressed_configs += [ "//build/config/compiler:thin_archive" ]
|
||||
defines = []
|
||||
|
|
@ -42,12 +42,12 @@ diff --git a/webrtc/third_party/googletest/BUILD.gn.orig b/webrtc/third_party/go
|
|||
index b7dc621..367f929 100644
|
||||
--- a/webrtc/third_party/googletest/BUILD.gn.orig
|
||||
+++ b/webrtc/third_party/googletest/BUILD.gn
|
||||
@@ -133,7 +133,6 @@ source_set("gtest") {
|
||||
@@ -129,7 +128,6 @@ source_set("gtest") {
|
||||
|
||||
# googletest only needs `absl`, but this makes gn check happier.
|
||||
deps = [ "//third_party/abseil-cpp:absl_full" ]
|
||||
- public_deps = [ "//third_party/re2" ]
|
||||
if (is_nacl || !build_with_chromium) {
|
||||
if (!build_with_chromium) {
|
||||
defines += [ "GTEST_DISABLE_PRINT_STACK_TRACE" ]
|
||||
sources -= [
|
||||
diff --git a/webrtc/third_party/fuzztest/BUILD.gn.orig b/webrtc/third_party/fuzztest/BUILD.gn
|
||||
|
|
@ -62,3 +62,17 @@ index 57ee790..ba1d297 100644
|
|||
|
||||
# For protobuf mutators
|
||||
"$protobuf_target_prefix:protobuf_lite",
|
||||
diff --git a/webrtc/third_party/BUILD.gn b/webrtc/third_party/BUILD.gn
|
||||
index 256fd092e2e..4ce797ebad7 100644
|
||||
--- a/webrtc/third_party/BUILD.gn
|
||||
+++ b/webrtc/third_party/BUILD.gn
|
||||
@@ -71,8 +69,5 @@ component("freetype_harfbuzz") {
|
||||
|
||||
buildflag_header("freetype_buildflags") {
|
||||
header = "freetype_buildflags.h"
|
||||
- flags = [
|
||||
- "USE_SYSTEM_FREETYPE=$use_system_freetype",
|
||||
- "ENABLE_FREETYPE=$enable_freetype",
|
||||
- ]
|
||||
+ flags = [ "USE_SYSTEM_FREETYPE=$use_system_freetype" ]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,459 @@
|
|||
diff --git a/webrtc/pc/codec_vendor.cc b/webrtc/pc/codec_vendor.cc
|
||||
index 42d52f6..e45516c 100644
|
||||
--- a/webrtc/pc/codec_vendor.cc
|
||||
+++ b/webrtc/pc/codec_vendor.cc
|
||||
@@ -39,7 +39,6 @@
|
||||
#include "pc/rtp_media_utils.h"
|
||||
#include "pc/session_description.h"
|
||||
#include "pc/typed_codec_vendor.h"
|
||||
-#include "pc/used_ids.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/string_encode.h"
|
||||
@@ -54,11 +53,6 @@
|
||||
|
||||
namespace {
|
||||
|
||||
-using webrtc::PayloadTypeSuggester;
|
||||
-using webrtc::RTCError;
|
||||
-using webrtc::RTCErrorOr;
|
||||
-using webrtc::RtpTransceiverDirection;
|
||||
-
|
||||
bool IsRtxCodec(const RtpCodecCapability& capability) {
|
||||
return absl::EqualsIgnoreCase(capability.name, kRtxCodecName);
|
||||
}
|
||||
@@ -75,8 +69,7 @@
|
||||
std::optional<Codec> FindMatchingCodec(const CodecList& codecs1,
|
||||
const CodecList& codecs2,
|
||||
const Codec& codec_to_match) {
|
||||
- return webrtc::FindMatchingCodec(codecs1.codecs(), codecs2.codecs(),
|
||||
- codec_to_match);
|
||||
+ return FindMatchingCodec(codecs1.codecs(), codecs2.codecs(), codec_to_match);
|
||||
}
|
||||
|
||||
void StripCNCodecs(CodecList& audio_codecs) {
|
||||
@@ -105,7 +98,7 @@
|
||||
}
|
||||
|
||||
int associated_pt;
|
||||
- if (!webrtc::FromString(associated_pt_str, &associated_pt)) {
|
||||
+ if (!FromString(associated_pt_str, &associated_pt)) {
|
||||
RTC_LOG(LS_WARNING) << "Couldn't convert payload type " << associated_pt_str
|
||||
<< " of RTX codec " << rtx_codec.id
|
||||
<< " to an integer.";
|
||||
@@ -136,14 +129,14 @@
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
- std::vector<absl::string_view> redundant_payloads = webrtc::split(fmtp, '/');
|
||||
+ std::vector<absl::string_view> redundant_payloads = split(fmtp, '/');
|
||||
if (redundant_payloads.size() < 2) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
absl::string_view associated_pt_str = redundant_payloads[0];
|
||||
int associated_pt;
|
||||
- if (!webrtc::FromString(associated_pt_str, &associated_pt)) {
|
||||
+ if (!FromString(associated_pt_str, &associated_pt)) {
|
||||
RTC_LOG(LS_WARNING) << "Couldn't convert first payload type "
|
||||
<< associated_pt_str << " of RED codec " << red_codec.id
|
||||
<< " to an integer.";
|
||||
@@ -182,7 +175,21 @@
|
||||
return suggestion.MoveError();
|
||||
}
|
||||
codec.id = suggestion.value();
|
||||
- offered_codecs.push_back(codec);
|
||||
+ // The rewrite of the parameter may have turned the codec into
|
||||
+ // one that is already present.
|
||||
+ bool skip = false;
|
||||
+ for (const Codec& present_codec : offered_codecs) {
|
||||
+ if (present_codec.id == codec.id) {
|
||||
+ RTC_DCHECK(MatchesWithReferenceAttributes(present_codec, codec))
|
||||
+ << "Codec mismatch: present " << present_codec << ", new "
|
||||
+ << codec;
|
||||
+ skip = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ if (!skip) {
|
||||
+ offered_codecs.push_back(codec);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,7 +239,7 @@
|
||||
}
|
||||
std::string red_param = absl::StrCat(matching_codec->id);
|
||||
red_codec.params[kCodecParamNotInNameValueFormat] =
|
||||
- webrtc::StrJoin(std::vector{red_param, red_param}, "/");
|
||||
+ StrJoin(std::vector{red_param, red_param}, "/");
|
||||
}
|
||||
RTCErrorOr<PayloadType> suggestion =
|
||||
pt_suggester.SuggestPayloadType(mid, red_codec);
|
||||
@@ -240,84 +247,25 @@
|
||||
return suggestion.MoveError();
|
||||
}
|
||||
red_codec.id = suggestion.value();
|
||||
- offered_codecs.push_back(red_codec);
|
||||
+ // The rewrite of the parameter may have turned the RED codec into
|
||||
+ // one that is already present.
|
||||
+ bool skip = false;
|
||||
+ for (const Codec& present_codec : offered_codecs) {
|
||||
+ if (present_codec.id == red_codec.id) {
|
||||
+ RTC_DCHECK(MatchesWithReferenceAttributes(present_codec, red_codec));
|
||||
+ skip = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ if (!skip) {
|
||||
+ offered_codecs.push_back(red_codec);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
offered_codecs.CheckConsistency();
|
||||
return RTCError::OK();
|
||||
}
|
||||
|
||||
-// Adds all codecs from `reference_codecs` to `offered_codecs` that don't
|
||||
-// already exist in `offered_codecs` and ensure the payload types don't
|
||||
-// collide.
|
||||
-// OLD VERSION - uses UsedPayloadTypes
|
||||
-void MergeCodecs(const CodecList& reference_codecs,
|
||||
- CodecList& offered_codecs,
|
||||
- UsedPayloadTypes* used_pltypes) {
|
||||
- // Add all new codecs that are not RTX/RED codecs.
|
||||
- // The two-pass splitting of the loops means preferring payload types
|
||||
- // of actual codecs with respect to collisions.
|
||||
- for (const Codec& reference_codec : reference_codecs) {
|
||||
- if (reference_codec.GetResiliencyType() != Codec::ResiliencyType::kRtx &&
|
||||
- reference_codec.GetResiliencyType() != Codec::ResiliencyType::kRed &&
|
||||
- !FindMatchingCodec(reference_codecs, offered_codecs, reference_codec)) {
|
||||
- Codec codec = reference_codec;
|
||||
- used_pltypes->FindAndSetIdUsed(&codec);
|
||||
- offered_codecs.push_back(codec);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // Add all new RTX or RED codecs.
|
||||
- for (const Codec& reference_codec : reference_codecs) {
|
||||
- if (reference_codec.GetResiliencyType() == Codec::ResiliencyType::kRtx &&
|
||||
- !FindMatchingCodec(reference_codecs, offered_codecs, reference_codec)) {
|
||||
- Codec rtx_codec = reference_codec;
|
||||
- const Codec* associated_codec =
|
||||
- GetAssociatedCodecForRtx(reference_codecs, rtx_codec);
|
||||
- if (!associated_codec) {
|
||||
- continue;
|
||||
- }
|
||||
- // Find a codec in the offered list that matches the reference codec.
|
||||
- // Its payload type may be different than the reference codec.
|
||||
- std::optional<Codec> matching_codec = FindMatchingCodec(
|
||||
- reference_codecs, offered_codecs, *associated_codec);
|
||||
- if (!matching_codec) {
|
||||
- RTC_LOG(LS_WARNING)
|
||||
- << "Couldn't find matching " << associated_codec->name << " codec.";
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- rtx_codec.params[kCodecParamAssociatedPayloadType] =
|
||||
- absl::StrCat(matching_codec->id);
|
||||
- used_pltypes->FindAndSetIdUsed(&rtx_codec);
|
||||
- offered_codecs.push_back(rtx_codec);
|
||||
- } else if (reference_codec.GetResiliencyType() ==
|
||||
- Codec::ResiliencyType::kRed &&
|
||||
- !FindMatchingCodec(reference_codecs, offered_codecs,
|
||||
- reference_codec)) {
|
||||
- Codec red_codec = reference_codec;
|
||||
- const Codec* associated_codec =
|
||||
- GetAssociatedCodecForRed(reference_codecs, red_codec);
|
||||
- if (associated_codec) {
|
||||
- std::optional<Codec> matching_codec = FindMatchingCodec(
|
||||
- reference_codecs, offered_codecs, *associated_codec);
|
||||
- if (!matching_codec) {
|
||||
- RTC_LOG(LS_WARNING) << "Couldn't find matching "
|
||||
- << associated_codec->name << " codec.";
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- red_codec.params[kCodecParamNotInNameValueFormat] =
|
||||
- absl::StrCat(matching_codec->id) + "/" +
|
||||
- absl::StrCat(matching_codec->id);
|
||||
- }
|
||||
- used_pltypes->FindAndSetIdUsed(&red_codec);
|
||||
- offered_codecs.push_back(red_codec);
|
||||
- }
|
||||
- }
|
||||
- offered_codecs.CheckConsistency();
|
||||
-}
|
||||
-
|
||||
// `codecs` is a full list of codecs with correct payload type mappings, which
|
||||
// don't conflict with mappings of the other media type; `supported_codecs` is
|
||||
// a list filtered for the media section`s direction but with default payload
|
||||
@@ -382,7 +330,7 @@
|
||||
codec.params.find(kCodecParamNotInNameValueFormat);
|
||||
if (fmtp != codec.params.end()) {
|
||||
std::vector<absl::string_view> redundant_payloads =
|
||||
- webrtc::split(fmtp->second, '/');
|
||||
+ split(fmtp->second, '/');
|
||||
if (!redundant_payloads.empty() &&
|
||||
redundant_payloads[0] == id) {
|
||||
if (!red_was_added) {
|
||||
@@ -443,7 +391,7 @@
|
||||
for (const Codec& supported_codec : supported_codecs) {
|
||||
if (absl::EqualsIgnoreCase(supported_codec.name, kH265CodecName)) {
|
||||
std::optional<H265ProfileTierLevel> supported_ptl =
|
||||
- webrtc::ParseSdpForH265ProfileTierLevel(supported_codec.params);
|
||||
+ ParseSdpForH265ProfileTierLevel(supported_codec.params);
|
||||
if (supported_ptl.has_value()) {
|
||||
supported_h265_profiles[supported_ptl->profile] =
|
||||
supported_ptl->level;
|
||||
@@ -458,14 +406,14 @@
|
||||
for (auto& filtered_codec : filtered_codecs) {
|
||||
if (absl::EqualsIgnoreCase(filtered_codec.name, kH265CodecName)) {
|
||||
std::optional<H265ProfileTierLevel> filtered_ptl =
|
||||
- webrtc::ParseSdpForH265ProfileTierLevel(filtered_codec.params);
|
||||
+ ParseSdpForH265ProfileTierLevel(filtered_codec.params);
|
||||
if (filtered_ptl.has_value()) {
|
||||
auto it = supported_h265_profiles.find(filtered_ptl->profile);
|
||||
|
||||
if (it != supported_h265_profiles.end() &&
|
||||
filtered_ptl->level != it->second) {
|
||||
filtered_codec.params[kH265FmtpLevelId] =
|
||||
- webrtc::H265LevelToString(it->second);
|
||||
+ H265LevelToString(it->second);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -506,13 +454,13 @@
|
||||
}
|
||||
}
|
||||
if (absl::EqualsIgnoreCase(ours.name, kH264CodecName)) {
|
||||
- webrtc::H264GenerateProfileLevelIdForAnswer(ours.params, theirs->params,
|
||||
- &negotiated.params);
|
||||
+ H264GenerateProfileLevelIdForAnswer(ours.params, theirs->params,
|
||||
+ &negotiated.params);
|
||||
}
|
||||
#ifdef RTC_ENABLE_H265
|
||||
if (absl::EqualsIgnoreCase(ours.name, kH265CodecName)) {
|
||||
- webrtc::H265GenerateProfileTierLevelForAnswer(
|
||||
- ours.params, theirs->params, &negotiated.params);
|
||||
+ H265GenerateProfileTierLevelForAnswer(ours.params, theirs->params,
|
||||
+ &negotiated.params);
|
||||
NegotiateTxMode(ours, *theirs, &negotiated);
|
||||
}
|
||||
#endif
|
||||
@@ -534,7 +482,7 @@
|
||||
continue;
|
||||
}
|
||||
int apt_value;
|
||||
- if (!webrtc::FromString(apt_str, &apt_value)) {
|
||||
+ if (!FromString(apt_str, &apt_value)) {
|
||||
RTC_LOG(LS_WARNING) << "Unconvertable apt value";
|
||||
continue;
|
||||
}
|
||||
@@ -634,9 +582,11 @@
|
||||
}
|
||||
// Add our codecs that are not in the current description.
|
||||
if (media_description_options.type == MediaType::AUDIO) {
|
||||
- MergeCodecs(all_audio_codecs(), mid, codecs, pt_suggester);
|
||||
+ MergeCodecs(audio_recv_codecs(), mid, codecs, pt_suggester);
|
||||
+ MergeCodecs(audio_send_codecs(), mid, codecs, pt_suggester);
|
||||
} else {
|
||||
- MergeCodecs(all_video_codecs(), mid, codecs, pt_suggester);
|
||||
+ MergeCodecs(video_recv_codecs(), mid, codecs, pt_suggester);
|
||||
+ MergeCodecs(video_send_codecs(), mid, codecs, pt_suggester);
|
||||
}
|
||||
CodecList filtered_codecs;
|
||||
CodecList supported_codecs =
|
||||
@@ -667,20 +617,11 @@
|
||||
const MediaContentDescription* mcd =
|
||||
current_content->media_description();
|
||||
for (const Codec& codec : mcd->codecs()) {
|
||||
- if (webrtc::FindMatchingCodec(mcd->codecs(), codecs.codecs(),
|
||||
- codec)) {
|
||||
+ if (FindMatchingCodec(mcd->codecs(), codecs.codecs(), codec)) {
|
||||
filtered_codecs.push_back(codec);
|
||||
}
|
||||
}
|
||||
}
|
||||
- // Note what PTs are already in use.
|
||||
- UsedPayloadTypes
|
||||
- used_pltypes; // Used to avoid pt collisions in filtered_codecs
|
||||
- for (auto& codec : filtered_codecs) {
|
||||
- // Note: This may change PTs. Doing so woud indicate an error, but
|
||||
- // UsedPayloadTypes doesn't offer a means to make the distinction.
|
||||
- used_pltypes.FindAndSetIdUsed(&codec);
|
||||
- }
|
||||
// Add other supported codecs.
|
||||
for (const Codec& codec : supported_codecs) {
|
||||
std::optional<Codec> found_codec =
|
||||
@@ -707,8 +648,11 @@
|
||||
changed_referenced_codec->id);
|
||||
}
|
||||
}
|
||||
- // Quick fix for b/395077842: Remap the codec if it collides.
|
||||
- used_pltypes.FindAndSetIdUsed(&(*found_codec));
|
||||
+ auto pt_or_error = pt_suggester.SuggestPayloadType(mid, *found_codec);
|
||||
+ if (!pt_or_error.ok()) {
|
||||
+ return pt_or_error.MoveError();
|
||||
+ }
|
||||
+ found_codec->id = pt_or_error.value();
|
||||
filtered_codecs.push_back(*found_codec);
|
||||
}
|
||||
}
|
||||
@@ -763,9 +707,11 @@
|
||||
}
|
||||
// Add all our supported codecs
|
||||
if (media_description_options.type == MediaType::AUDIO) {
|
||||
- MergeCodecs(all_audio_codecs(), mid, codecs, pt_suggester);
|
||||
+ MergeCodecs(audio_recv_codecs(), mid, codecs, pt_suggester);
|
||||
+ MergeCodecs(audio_send_codecs(), mid, codecs, pt_suggester);
|
||||
} else {
|
||||
- MergeCodecs(all_video_codecs(), mid, codecs, pt_suggester);
|
||||
+ MergeCodecs(video_recv_codecs(), mid, codecs, pt_suggester);
|
||||
+ MergeCodecs(video_send_codecs(), mid, codecs, pt_suggester);
|
||||
}
|
||||
CodecList filtered_codecs;
|
||||
CodecList negotiated_codecs;
|
||||
@@ -794,8 +740,8 @@
|
||||
const MediaContentDescription* mcd =
|
||||
current_content->media_description();
|
||||
for (const Codec& codec : mcd->codecs()) {
|
||||
- if (std::optional<Codec> found_codec = webrtc::FindMatchingCodec(
|
||||
- mcd->codecs(), codecs.codecs(), codec)) {
|
||||
+ if (std::optional<Codec> found_codec =
|
||||
+ FindMatchingCodec(mcd->codecs(), codecs.codecs(), codec)) {
|
||||
filtered_codecs.push_back(*found_codec);
|
||||
}
|
||||
}
|
||||
@@ -913,8 +859,7 @@
|
||||
case RtpTransceiverDirection::kSendRecv:
|
||||
case RtpTransceiverDirection::kStopped:
|
||||
case RtpTransceiverDirection::kInactive:
|
||||
- return GetVideoCodecsForOffer(
|
||||
- webrtc::RtpTransceiverDirectionReversed(offer));
|
||||
+ return GetVideoCodecsForOffer(RtpTransceiverDirectionReversed(offer));
|
||||
case RtpTransceiverDirection::kSendOnly:
|
||||
return video_send_codecs_.codecs();
|
||||
case RtpTransceiverDirection::kRecvOnly:
|
||||
@@ -948,8 +893,7 @@
|
||||
case RtpTransceiverDirection::kSendRecv:
|
||||
case RtpTransceiverDirection::kStopped:
|
||||
case RtpTransceiverDirection::kInactive:
|
||||
- return GetAudioCodecsForOffer(
|
||||
- webrtc::RtpTransceiverDirectionReversed(offer));
|
||||
+ return GetAudioCodecsForOffer(RtpTransceiverDirectionReversed(offer));
|
||||
case RtpTransceiverDirection::kSendOnly:
|
||||
return audio_send_codecs_.codecs();
|
||||
case RtpTransceiverDirection::kRecvOnly:
|
||||
@@ -958,43 +902,6 @@
|
||||
RTC_CHECK_NOTREACHED();
|
||||
}
|
||||
|
||||
-CodecList CodecVendor::all_video_codecs() const {
|
||||
- CodecList all_codecs;
|
||||
- UsedPayloadTypes used_payload_types;
|
||||
- for (const Codec& codec : video_recv_codecs_.codecs()) {
|
||||
- Codec codec_mutable = codec;
|
||||
- used_payload_types.FindAndSetIdUsed(&codec_mutable);
|
||||
- all_codecs.push_back(codec_mutable);
|
||||
- }
|
||||
-
|
||||
- // Use MergeCodecs to merge the second half of our list as it already checks
|
||||
- // and fixes problems with duplicate payload types.
|
||||
- MergeCodecs(video_send_codecs_.codecs(), all_codecs, &used_payload_types);
|
||||
-
|
||||
- return all_codecs;
|
||||
-}
|
||||
-
|
||||
-CodecList CodecVendor::all_audio_codecs() const {
|
||||
- // Compute the audio codecs union.
|
||||
- CodecList codecs;
|
||||
- for (const Codec& send : audio_send_codecs_.codecs()) {
|
||||
- codecs.push_back(send);
|
||||
- if (!FindMatchingCodec(audio_send_codecs_.codecs(),
|
||||
- audio_recv_codecs_.codecs(), send)) {
|
||||
- // It doesn't make sense to have an RTX codec we support sending but not
|
||||
- // receiving.
|
||||
- RTC_DCHECK(send.GetResiliencyType() != Codec::ResiliencyType::kRtx);
|
||||
- }
|
||||
- }
|
||||
- for (const Codec& recv : audio_recv_codecs_.codecs()) {
|
||||
- if (!FindMatchingCodec(audio_recv_codecs_.codecs(),
|
||||
- audio_send_codecs_.codecs(), recv)) {
|
||||
- codecs.push_back(recv);
|
||||
- }
|
||||
- }
|
||||
- return codecs;
|
||||
-}
|
||||
-
|
||||
CodecList CodecVendor::audio_sendrecv_codecs() const {
|
||||
// Use NegotiateCodecs to merge our codec lists, since the operation is
|
||||
// essentially the same. Put send_codecs as the offered_codecs, which is the
|
||||
diff --git a/webrtc/pc/wcodec_vendor.h b/webrtc/pc/codec_vendor.h
|
||||
index 1472225..4a3a8d9 100644
|
||||
--- a/webrtc/pc/codec_vendor.h
|
||||
+++ b/webrtc/pc/codec_vendor.h
|
||||
@@ -102,9 +102,6 @@
|
||||
const RtpTransceiverDirection& offer,
|
||||
const RtpTransceiverDirection& answer) const;
|
||||
|
||||
- CodecList all_video_codecs() const;
|
||||
- CodecList all_audio_codecs() const;
|
||||
-
|
||||
TypedCodecVendor audio_send_codecs_;
|
||||
TypedCodecVendor audio_recv_codecs_;
|
||||
|
||||
diff --git a/webrtc/pc/used_ids.h b/webrtc/pc/used_ids.h
|
||||
index fe80531..f9d825c 100644
|
||||
--- a/webrtc/pc/used_ids.h
|
||||
+++ b/webrtc/pc/used_ids.h
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "api/rtp_parameters.h"
|
||||
-#include "media/base/codec.h"
|
||||
#include "rtc_base/checks.h"
|
||||
|
||||
namespace webrtc {
|
||||
@@ -88,41 +86,6 @@
|
||||
std::set<int> id_set_;
|
||||
};
|
||||
|
||||
-// Helper class used for finding duplicate RTP payload types among audio, video
|
||||
-// and data codecs. When bundle is used the payload types may not collide.
|
||||
-class UsedPayloadTypes : public UsedIds<Codec> {
|
||||
- public:
|
||||
- UsedPayloadTypes()
|
||||
- : UsedIds<Codec>(kFirstDynamicPayloadTypeLowerRange,
|
||||
- kLastDynamicPayloadTypeUpperRange) {}
|
||||
-
|
||||
- // Check if a payload type is valid. The range [64-95] is forbidden
|
||||
- // when rtcp-mux is used.
|
||||
- static bool IsIdValid(Codec codec, bool rtcp_mux) {
|
||||
- if (rtcp_mux && (codec.id > kLastDynamicPayloadTypeLowerRange &&
|
||||
- codec.id < kFirstDynamicPayloadTypeUpperRange)) {
|
||||
- return false;
|
||||
- }
|
||||
- return codec.id >= 0 && codec.id <= kLastDynamicPayloadTypeUpperRange;
|
||||
- }
|
||||
-
|
||||
- protected:
|
||||
- bool IsIdUsed(int new_id) override {
|
||||
- // Range marked for RTCP avoidance is "used".
|
||||
- if (new_id > kLastDynamicPayloadTypeLowerRange &&
|
||||
- new_id < kFirstDynamicPayloadTypeUpperRange)
|
||||
- return true;
|
||||
- return UsedIds<Codec>::IsIdUsed(new_id);
|
||||
- }
|
||||
-
|
||||
- private:
|
||||
- static const int kFirstDynamicPayloadTypeLowerRange = 35;
|
||||
- static const int kLastDynamicPayloadTypeLowerRange = 63;
|
||||
-
|
||||
- static const int kFirstDynamicPayloadTypeUpperRange = 96;
|
||||
- static const int kLastDynamicPayloadTypeUpperRange = 127;
|
||||
-};
|
||||
-
|
||||
// Helper class used for finding duplicate RTP Header extension ids among
|
||||
// audio and video extensions.
|
||||
class UsedRtpHeaderExtensionIds : public UsedIds<RtpExtension> {
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
# Contributor: Aiden Grossman <agrossman154@yahoo.com>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=soqt
|
||||
pkgver=1.6.3
|
||||
pkgrel=0
|
||||
pkgdesc="GUI binding library for coin"
|
||||
url="https://github.com/coin3d/soqt"
|
||||
arch="all"
|
||||
license="BSD-3-Clause"
|
||||
makedepends="coin-dev cmake mesa-dev samurai qt5-qtbase-dev doxygen"
|
||||
options="!check" # test suite consists only of interactive programs
|
||||
subpackages="$pkgname-dev $pkgname-doc"
|
||||
source="https://github.com/coin3d/soqt/releases/download/v$pkgver/soqt-$pkgver-src.tar.gz"
|
||||
builddir="$srcdir/$pkgname"
|
||||
|
||||
build() {
|
||||
cmake -B build -G Ninja . \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=None \
|
||||
-DSOQT_BUILD_DOCUMENTATION=ON \
|
||||
-DSOQT_BUILD_DOC_MAN=ON
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" cmake --install build
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
8cef22cf4214dd03bb4639c1fff77c127bf80f99e3b7fb7c1c21c25a281aa484252414f4a48fa59b8b2485afe7920ce9e86366fd1343badc77b75b78d3ac4c53 soqt-1.6.3-src.tar.gz
|
||||
"
|
||||
|
|
@ -3,10 +3,11 @@
|
|||
# Maintainer: Fabricio Silva <hi@fabricio.dev>
|
||||
pkgname=thelounge
|
||||
pkgver=4.4.3
|
||||
pkgrel=1
|
||||
pkgrel=0
|
||||
pkgdesc="Modern, responsive, cross-platform, self-hosted web IRC client"
|
||||
url="https://thelounge.chat"
|
||||
arch="all !riscv64" # riscv64 gets SIGILL
|
||||
# build broken against node 24
|
||||
#arch="all !riscv64" # riscv64 gets SIGILL
|
||||
license="MIT"
|
||||
depends="nodejs"
|
||||
makedepends="yarn py3-setuptools"
|
||||
|
|
@ -17,7 +18,7 @@ source="
|
|||
thelounge.initd
|
||||
thelounge.confd
|
||||
"
|
||||
options="!check net" # net for npm
|
||||
options="net" # net for npm
|
||||
|
||||
case $CARCH in
|
||||
# loongarch64: 2 tests failed on the builder
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/server/server.ts b/server/server.ts.orig
|
||||
index 7a1514e..5ecdea9 100644
|
||||
--- a/server/server.ts
|
||||
+++ b/server/server.ts.orig
|
||||
@@ -377,7 +377,7 @@ function addSecurityHeaders(req: Request, res: Response, next: NextFunction) {
|
||||
"default-src 'none'", // default to nothing
|
||||
"base-uri 'none'", // disallow <base>, has no fallback to default-src
|
||||
"form-action 'self'", // 'self' to fix saving passwords in Firefox, even though login is handled in javascript
|
||||
- "connect-src 'self' ws: wss:", // allow self for polling; websockets
|
||||
+ "connect-src 'self' ws: wss: https:", // allow self for polling; websockets
|
||||
"style-src 'self' https: 'unsafe-inline'", // allow inline due to use in irc hex colors
|
||||
"script-src 'self'", // javascript
|
||||
"worker-src 'self'", // service worker
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
diff --git a/test/src/helperTest.ts b/test/src/helperTest.ts
|
||||
index 2a8ddc8..22f0532 100644
|
||||
--- a/test/src/helperTest.ts
|
||||
+++ b/test/src/helperTest.ts
|
||||
@@ -40,14 +40,6 @@ describe("Helper", function () {
|
||||
describe("#getVersion()", function () {
|
||||
const version = Helper.getVersion();
|
||||
|
||||
- it("should mention it is served from source code", function () {
|
||||
- expect(version).to.include("source");
|
||||
- });
|
||||
-
|
||||
- it("should include a short Git SHA", function () {
|
||||
- expect(version).to.match(/\([0-9a-f]{7,11} /);
|
||||
- });
|
||||
-
|
||||
it("should include a valid semver version", function () {
|
||||
expect(version).to.match(/v[0-9]+\.[0-9]+\.[0-9]+/);
|
||||
});
|
||||
33
backports/yarn-berry/APKBUILD
Normal file
33
backports/yarn-berry/APKBUILD
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
maintainer="Fabricio Silva <hi@fabricio.dev>"
|
||||
pkgname=yarn-berry
|
||||
pkgver=4.9.1
|
||||
pkgrel=0
|
||||
pkgdesc="Fast, reliable, and secure dependency management for Node.js - Active development version"
|
||||
url="https://yarnpkg.com/"
|
||||
license="BSD-2-Clause"
|
||||
arch="noarch"
|
||||
depends="!yarn nodejs" # not backward compatible with yarn classic (v1)
|
||||
source="$pkgname-$pkgver.tgz::https://registry.npmjs.org/@yarnpkg/cli-dist/-/cli-dist-$pkgver.tgz"
|
||||
builddir="$srcdir/package"
|
||||
replaces="yarn"
|
||||
|
||||
check() {
|
||||
./bin/yarn.js --version
|
||||
./bin/yarn.js --help
|
||||
}
|
||||
|
||||
package() {
|
||||
local destdir="usr/share/node_modules/@yarnpkg/cli-dist"
|
||||
|
||||
mkdir -p "$pkgdir"/$destdir/bin
|
||||
install -Dm0644 package.json -t "$pkgdir"/$destdir
|
||||
install -Dm0755 bin/yarn.js -t "$pkgdir"/$destdir/bin
|
||||
|
||||
mkdir -p "$pkgdir"/usr/bin
|
||||
ln -s ../share/node_modules/@yarnpkg/cli-dist/bin/yarn.js "$pkgdir"/usr/bin/yarn
|
||||
ln -s yarn "$pkgdir"/usr/bin/yarnpkg
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
cae0bcb10349af010b472ef7fa1023c33c0afd60a54dc29d18797e6bb771bd6c0d3d06aefa801c56363bcc6ecf6133988d1f943543293e7335ede60618fb28e8 yarn-berry-4.9.1.tgz
|
||||
"
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
Section "InputClass"
|
||||
Identifier "evdev touchscreen"
|
||||
MatchProduct "tt21000"
|
||||
MatchIsTouchscreen "on"
|
||||
Driver "evdev"
|
||||
EndSection
|
||||
Section "InputClass"
|
||||
Identifier "RotateTouch"
|
||||
MatchProduct "w9013"
|
||||
Option "TransformationMatrix" "-1 0 1 0 -1 1 0 0 1"
|
||||
EndSection
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
ACTION=="remove", GOTO="libinput_device_group_end"
|
||||
KERNEL!="event[0-9]*", GOTO="libinput_device_group_end"
|
||||
|
||||
ATTRS{phys}=="?*", ATTRS{name}=="cyttsp5", ENV{LIBINPUT_DEVICE_GROUP}="pinenotetouch"
|
||||
ATTRS{phys}=="?*", ATTRS{name}=="w9013 2D1F:0095 Stylus", ENV{LIBINPUT_DEVICE_GROUP}="pinenotetouch"
|
||||
|
||||
ATTRS{phys}=="?*", ATTRS{name}=="cyttsp5", ENV{LIBINPUT_CALIBRATION_MATRIX}="-1 0 1 0 -1 1"
|
||||
|
||||
LABEL="libinput_device_group_end"
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
SUBSYSTEM=="module", KERNEL=="rockchip_ebc", RUN+="/bin/chgrp video /sys/module/%k/parameters/dclk_select /sys/module/%k/parameters/auto_refresh /sys/module/%k/parameters/bw_dither_invert /sys/module/%k/parameters/bw_threshold /sys/module/%k/parameters/bw_mode /sys/module/%k/parameters/diff_mode /sys/module/%k/parameters/direct_mode /sys/module/%k/parameters/limit_fb_blits /sys/module/%k/parameters/panel_reflection /sys/module/%k/parameters/refresh_threshold /sys/module/%k/parameters/refresh_waveform /sys/module/%k/parameters/skip_reset /sys/module/%k/parameters/split_area_limit /sys/module/%k/parameters/default_waveform", RUN+="/bin/chmod g+w /sys/module/%k/parameters/bw_threshold /sys/module/%k/parameters/bw_mode /sys/module/%k/parameters/default_waveform /sys/module/%k/parameters/diff_mode /sys/module/%k/parameters/direct_mode /sys/module/%k/parameters/limit_fb_blits /sys/module/%k/parameters/panel_reflection /sys/module/%k/parameters/refresh_threshold /sys/module/%k/parameters/refresh_waveform /sys/module/%k/parameters/skip_reset /sys/module/%k/parameters/auto_refresh /sys/module/%k/parameters/bw_dither_invert /sys/module/%k/parameters/split_area_limit"
|
||||
DRIVER=="rockchip-ebc", RUN+="/bin/chgrp video /sys/%p/power/control", RUN+="/bin/chmod g+w /sys/%p/power/control"
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
# Maintainer: Petr Hodina <phodina@protonmail.com>
|
||||
pkgname=device-pine64-pinenote
|
||||
pkgdesc="Pine64 PineNote"
|
||||
pkgver=2
|
||||
pkgrel=9
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
u-boot-pine64-pinenote
|
||||
linux-pine64-pinenote
|
||||
postmarketos-base
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
deviceinfo
|
||||
modules-initfs
|
||||
phoc.ini
|
||||
local-overrides.quirks
|
||||
50-touchscreen.conf
|
||||
81-libinput-pinenote.rules
|
||||
82-ebc-rockchip.rules
|
||||
panfrost.conf
|
||||
rockchip_ebc.conf
|
||||
"
|
||||
subpackages="
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
$pkgname-phosh
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
|
||||
install -Dm644 "$srcdir"/local-overrides.quirks \
|
||||
-t "$pkgdir"/etc/libinput/
|
||||
install -Dm644 "$srcdir"/50-touchscreen.conf \
|
||||
-t "$pkgdir"/etc/X11/xorg.conf.d
|
||||
install -Dm644 "$srcdir"/81-libinput-pinenote.rules \
|
||||
-t "$pkgdir"/usr/lib/udev/rules.d
|
||||
install -Dm644 "$srcdir"/82-ebc-rockchip.rules \
|
||||
"$pkgdir"/usr/lib/udev/rules.d
|
||||
install -Dm644 "$srcdir"/panfrost.conf \
|
||||
-t "$pkgdir"/etc/modprobe.d
|
||||
install -Dm644 "$srcdir"/rockchip_ebc.conf \
|
||||
"$pkgdir"/etc/modprobe.d
|
||||
}
|
||||
|
||||
phosh() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel phosh"
|
||||
depends="postmarketos-theme"
|
||||
|
||||
install -Dm644 "$srcdir"/phoc.ini \
|
||||
-t "$subpkgdir"/etc/phosh
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="WiFi, Bluetooth and display firmware"
|
||||
depends="firmware-pine64-pinenote linux-firmware"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5829b9b52206a7520066e4bb3c08c2535d98002a3940664a0239344f5e7522fe7b6a9cb0c0074f9846c7e42c40746f2991f6aeeefeba8efa9140c16630b2893e deviceinfo
|
||||
473accb3497244742dd9fd15f8a02957a13e08fa4d4393fec185ecbb27f1f17726e4b5ece22da861151f9d358d3266206c647def8aa75adb672b6f1f1904c66f modules-initfs
|
||||
4bf5158fbd53274a7429e825bb66225001f2403a4851e2d6803323b77d9095738ee3e5340ac85baf3e86bb4f47d38af8cbd78d8a5055c59a62f5b06e722e19cb phoc.ini
|
||||
1123720962c9c8fec3c50302ca6a3dd56e2907dc9eea361a7b8eb4201b042476633d41a0ee4f6ab61d9c60eeccc894f83491ba9fa309a9bce2f1db0b0341d79d local-overrides.quirks
|
||||
ac433eebbc35a48561837495997aee4e55510b979bc0d8e3bafb761bc1be5b4bdeed2f456369dcbc582688aefd07c63966b0d72b6ffa99e84cfd868e677f02c8 50-touchscreen.conf
|
||||
2bc51f200baefc37abfaaad368a911244999e906bdca4b728ac233f49a8fb3ae7206ee3c95cdb20d7dceae2a31d25a57f4e1da4fd67057fd64724b8232e42aed 81-libinput-pinenote.rules
|
||||
19e922eec89dba419798c4e1dc9b39c040db33986d0969a39a8220c642fa081763f15ff2418115d5a748af4054a1be0784927d1712ea79942c2b237ebab47728 82-ebc-rockchip.rules
|
||||
6ba6638754e00908243de2f73ed6898dac03638a200dcf7b7cd9684757355ee1eb0ac874af0f971ad2e054c1a8c471867bdaea4d9aaf7eea6d3cf81ac7dd73a2 panfrost.conf
|
||||
b52d2e7f0c62d7c313b6db9aeb706cdb2596b6aa637aeddb862abf1e256103377fb6267e38cd4285e25d32112acf8d03bbf32ecff7be3dfbb9176209ea7ae283 rockchip_ebc.conf
|
||||
"
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell
|
||||
# scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Pine64 PineNote"
|
||||
deviceinfo_manufacturer="Pine64"
|
||||
deviceinfo_codename="pine64-pinenote"
|
||||
deviceinfo_year="2021"
|
||||
deviceinfo_dtb="rockchip/rk3566-pinenote-v1.2"
|
||||
deviceinfo_arch="aarch64"
|
||||
deviceinfo_gpu_accelerated="true"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="tablet"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="false"
|
||||
deviceinfo_screen_width="1404"
|
||||
deviceinfo_screen_height="1872"
|
||||
deviceinfo_getty="ttyS2;1500000"
|
||||
|
||||
# initfs
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="rkdeveloptool"
|
||||
deviceinfo_flash_sparse="true"
|
||||
|
||||
deviceinfo_boot_part_start="65536"
|
||||
|
||||
deviceinfo_sd_embed_firmware="u-boot/pine64-pinenote/u-boot-rockchip.bin:1"
|
||||
deviceinfo_sd_embed_firmware_step_size="32768"
|
||||
|
||||
deviceinfo_flash_rk_partition_kernel="boot"
|
||||
deviceinfo_flash_rk_partition_rootfs="os1"
|
||||
|
||||
deviceinfo_generate_extlinux_config="true"
|
||||
deviceinfo_kernel_cmdline="drm.debug=0x0 vt.color=0xf earlycon console=tty0 console=ttyS2,1500000n8 PMOS_FORCE_PARTITION_RESIZE"
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[PineNote]
|
||||
MatchName=cyttsp5
|
||||
AttrPalmPressureThreshold=28
|
||||
AttrThumbPressureThreshold=27
|
||||
AttrSizeHint=210x157
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
tps65185-regulator
|
||||
rockchip_ebc
|
||||
drm_kms_helper
|
||||
drm_shmem_helper
|
||||
pvi_waveform
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
softdep panfrost pre: rockchip_ebc
|
||||
# blacklist rockchip_ebc
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# /etc/phosh/phoc.ini
|
||||
# Overwrites values set in /usr/share/phosh/phoc.ini
|
||||
|
||||
# e-ink is an "Unknown" display type for now in mainline
|
||||
[output:Unknown-1]
|
||||
scale = 2.0
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# rockchip-rga will crash the kernel on unload at the moment
|
||||
blacklist rockchip-rga
|
||||
blacklist ws8100_pen
|
||||
|
||||
options rockchip_ebc direct_mode=0 auto_refresh=1 refresh_threshold=60 split_area_limit=0 panel_reflection=1 prepare_prev_before_a2=0 dclk_select=0
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue