Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8105d7d884 | ||
|
|
a5c1218a91 | ||
|
|
b666010edd | ||
|
|
d5bebe9c83 | ||
|
|
260dee1d79 | ||
|
|
6dd076f79d | ||
|
|
07a1e7da10 | ||
|
|
666ae39186 | ||
|
|
8e5cb3c0d9 | ||
|
|
1ca8cbd0f7 | ||
|
|
8c488651e6 | ||
|
|
12b0c3249f | ||
|
|
91b1bb3d68 | ||
|
|
9500d62ebb | ||
|
|
8eb8089b4c | ||
|
|
f75cea4270 |
No files matched your search
@@ -1,12 +1,14 @@
|
||||
#!/bin/sh -e
|
||||
# Description: run apkbuild-lint on modified APKBUILDs
|
||||
# Options: with-dot-git
|
||||
# Options: native
|
||||
# Use 'native' because it requires git commit history.
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
apk add atools git python3
|
||||
exec su "${TESTUSER:-build}" -c "sh -e $0"
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
.ci/lib/apkbuild_linting.py
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
apk add git openssh-keygen grep curl
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/main/install_pmbootstrap.sh"
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0 $*"
|
||||
fi
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
# Copyright 2025 Pablo Correa Gomez
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Description: create documentation with antora
|
||||
# Options: with-dot-git
|
||||
# Artifacts: build/site
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
|
||||
# Install dependencies
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
apk -q add py3-pip make git
|
||||
apk add dint --allow-untrusted --repository=https://mirror.postmarketos.org/postmarketos/master
|
||||
exec su "${TESTUSER:-build}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
cd docs/
|
||||
make venv
|
||||
make
|
||||
+21
-20
@@ -1,4 +1,4 @@
|
||||
image: registry.alpinelinux.org/img/alpine:latest
|
||||
image: alpine:latest
|
||||
stages:
|
||||
- build
|
||||
- hardware tests
|
||||
@@ -6,7 +6,7 @@ stages:
|
||||
variables:
|
||||
CI_TRON_TEMPLATE_PROJECT: &ci-tron-template-project postmarketOS/ci-common
|
||||
CI_TRON_JOB_TEMPLATE_PROJECT_URL: $CI_SERVER_URL/$CI_TRON_TEMPLATE_PROJECT
|
||||
CI_TRON_JOB_TEMPLATE_COMMIT: &ci-tron-template-commit 1c70e34b7a610cda1d7f048f6b50ca9c10f52995
|
||||
CI_TRON_JOB_TEMPLATE_COMMIT: &ci-tron-template-commit 7c95b5f2d53533e8722abf57c73e558168e811f3
|
||||
|
||||
include:
|
||||
- project: *ci-tron-template-project
|
||||
@@ -68,33 +68,34 @@ build:
|
||||
# Define here all the gitlab-ci snippets that could be common between the
|
||||
# different packages
|
||||
|
||||
# Extends from this job if the target device needs a kernel and initramfs to
|
||||
# boot. This will not work if your device uses boot images.
|
||||
# Extends from this job if the the build job generates a kernel and initramfs
|
||||
# artifact for your target device. This will not work if your device generates
|
||||
# boot images.
|
||||
.device-boot-flow-separate-artifacts:
|
||||
variables:
|
||||
CI_TRON_KERNEL__URL: "glartifact://${CI_TRON__PMB_BUILD_JOB}/${CI_TRON__PMB_EXPORT_PATH}/vmlinuz"
|
||||
CI_TRON_KERNEL__URL: "glartifact://${CI_TRON__PMB_BUILD_JOB}/${CI_TRON__PMB_EXPORT_PATH}/${KERNEL_NAME}"
|
||||
CI_TRON_INITRAMFS__INITRAMFS__URL: "glartifact://${CI_TRON__PMB_BUILD_JOB}/${CI_TRON__PMB_EXPORT_PATH}/initramfs"
|
||||
|
||||
# Extends from this job if the target device boots using fastboot and boot images
|
||||
.device-boot-flow-fastboot-image:
|
||||
variables:
|
||||
CI_TRON_FASTBOOT__BOOT_IMAGE__URL: "glartifact://${CI_TRON__PMB_BUILD_JOB}/${CI_TRON__PMB_EXPORT_PATH}/boot.img"
|
||||
# NOTE: For fastboot devices, we will need to use something like this
|
||||
# .ci-tron-device-boot-flow-fastboot-image:
|
||||
# variables:
|
||||
# CI_TRON_FASTBOOT__BOOT_IMAGE: "glartifact://${CI_TRON__PMB_BUILD_JOB}/${CI_TRON__PMB_EXPORT_PATH}/bootimg"
|
||||
|
||||
# Include all the devices that need and can to be tested
|
||||
|
||||
{% for device in devices_under_test %}
|
||||
{% for device in devices_under_test if device.is_present_in_ci %}
|
||||
prepare-{{ device.name }}:
|
||||
stage: hardware tests
|
||||
extends:
|
||||
.pmos-ci-tron-build-boot-artifacts
|
||||
{%- if device.has_kernel_variants %}
|
||||
# Build all the boot artifacts for all the supported kernel variants in
|
||||
# Let's build all the boot artifacts for all the supported kernels in
|
||||
# different jobs, but hide them behind a single job name so as not to pollute
|
||||
# the pipeline.
|
||||
parallel:
|
||||
matrix:
|
||||
- KERNEL_VARIANT:
|
||||
{%- for kernel in device.kernel_variants %}
|
||||
{%- for kernel in device.kernels %}
|
||||
- {{ kernel }}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
@@ -108,17 +109,19 @@ prepare-{{ device.name }}:
|
||||
DEVICE_NAME: {{ device.name }}
|
||||
# NOTE: All the packages that may influence testing should have an
|
||||
# `install-if postmarketos-mkinitfs-hook-ci`, so no need to add them here
|
||||
INSTALL_PACKAGES: {{ device.pkgname }} {% if device.has_kernel_variants %}{{ device.pkgname }}-kernel-${KERNEL_VARIANT} {% endif %}postmarketos-mkinitfs-hook-ci
|
||||
INSTALL_PACKAGES: {{ device.pkgname }} {{ device.pkgname }}-kernel-${KERNEL_VARIANT} postmarketos-mkinitfs-hook-ci
|
||||
|
||||
.test-{{ device.name }}:
|
||||
stage: hardware tests
|
||||
extends:
|
||||
- .pmos-ci-tron-initramfs-test
|
||||
{%- if device.has_kernel_variants %}
|
||||
# Test all the kernels in different jobs, but hide them behind a single
|
||||
# Let's test all the kernels in different jobs, but hide them behind a single
|
||||
# job name so as not to pollute the pipeline.
|
||||
parallel:
|
||||
matrix:
|
||||
- KERNEL_VARIANT:
|
||||
{%- for kernel in device.kernel_variants %}
|
||||
{%- for kernel in device.kernels %}
|
||||
- {{ kernel }}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
@@ -126,13 +129,11 @@ prepare-{{ device.name }}:
|
||||
needs:
|
||||
- job: 'prepare-{{ device.name }}'
|
||||
artifacts: false
|
||||
{%- if device.has_kernel_variants %}
|
||||
parallel:
|
||||
matrix:
|
||||
- KERNEL_VARIANT: $[[ matrix.KERNEL_VARIANT ]]
|
||||
{%- endif %}
|
||||
# NOTE: We can't wait for a particular job in the matrix until GitLab implements support for it:
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/423553
|
||||
variables:
|
||||
CI_TRON__PMB_BUILD_JOB: "prepare-{{ device.name }}{% if device.has_kernel_variants %}: [$KERNEL_VARIANT]{% endif %}"
|
||||
CI_TRON_KERNEL_CMDLINE__DEVICEINFO: '{{ device.deviceinfo.kernel_cmdline }}'
|
||||
|
||||
# Include the gitlab ci yml fragment, as found in
|
||||
# `device/$category/device-$devicename/gitlab-ci.yml.j2` which defines the jobs
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
lib/build_changed_aports.sh
|
||||
@@ -1 +0,0 @@
|
||||
lib/build_changed_aports.sh
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Description: check pkgver/pkgrel bumps, amount of changed pkgs etc
|
||||
# Options: native
|
||||
# Use 'native' because it requires running pmbootstrap.
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
# In .gitlab-ci.yml currently .ci/pytest.sh runs before this and
|
||||
# already downloads and runs install_pmbootstrap.sh.
|
||||
if ! [ -e install_pmbootstrap.sh ]; then
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/main/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh
|
||||
fi
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
.ci/lib/check_changed_versions.py
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh -e
|
||||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Description: check pkgver/pkgrel bumps, amount of changed pkgs etc
|
||||
# Options: native
|
||||
# Use 'native' because it requires git commit history.
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
# In .gitlab-ci.yml currently .ci/pytest.sh runs before this and
|
||||
# already downloads and runs install_pmbootstrap.sh.
|
||||
if ! [ -e install_pmbootstrap.sh ]; then
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh
|
||||
fi
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
.ci/lib/check_changed_aports_versions.py
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
# Description: Validate and lint deviceinfo files
|
||||
# Options: with-dot-git
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
apk add git python3
|
||||
apk add dint --allow-untrusted --repository=https://mirror.postmarketos.org/postmarketos/master
|
||||
exec su "${TESTUSER:-build}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
.ci/lib/deviceinfo_linting.py
|
||||
+1
-49
@@ -6,7 +6,7 @@ exit_code=0
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
apk -q add git grep
|
||||
apk -q add grep
|
||||
exec su "${TESTUSER:-build}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
@@ -94,52 +94,4 @@ if grep -qEr '^deviceinfo_kernel_cmdline.*[\"\s]console=null' -- device/; then
|
||||
exit_code=1
|
||||
fi
|
||||
|
||||
# Disallow installation of files to /etc/modules-load.d and /etc/modprobe.d
|
||||
if grep -qr '/etc/modules-load.d' --exclude-dir='device-samsung-golden-downstream' -- *; then
|
||||
echo "ERROR: Please replace '/etc/modules-load.d' with '/usr/lib/modules-load.d' in the following files:"
|
||||
grep --color=always -r '/etc/modules-load.d' --exclude-dir='device-samsung-golden-downstream' -- *
|
||||
exit_code=1
|
||||
fi
|
||||
# n900 is excluded because the string is in a comment linking to a repo.
|
||||
# No other non-archived devices should be excluded.
|
||||
if grep -qr '/etc/modprobe.d' --exclude-dir='archived' \
|
||||
--exclude-dir='device-nokia-n900' -- *; then
|
||||
echo "ERROR: Please replace '/etc/modprobe.d' with '/usr/lib/modprobe.d' in the following files:"
|
||||
grep --color=always -r '/etc/modprobe.d' --exclude-dir='device-nokia-n900' \
|
||||
--exclude-dir='archived' -- *
|
||||
exit_code=1
|
||||
fi
|
||||
|
||||
# Disallow maintainer comments.
|
||||
if grep -qr '# Maintainer:' -- *; then
|
||||
echo 'ERROR: Please use maintainer variables of the form maintainer="..." instead of maintainer comments of the form # Maintainer: ...'
|
||||
grep --color=always -r '# Maintainer:' -- *
|
||||
exit_code=1
|
||||
fi
|
||||
|
||||
if [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then
|
||||
# Find all moved or new kernel APKBUILDs in main, community or testing
|
||||
MOVED_OR_NEW_MAINLINE_KERNEL_PACKAGES=$(git show --pretty="" --name-only --diff-filter=AR "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep "device/\(main\|community\|testing\)/linux-.*/APKBUILD" || true)
|
||||
|
||||
if [ -n "$MOVED_OR_NEW_MAINLINE_KERNEL_PACKAGES" ]; then
|
||||
if [ -n "$(grep -L LLVM=1 $MOVED_OR_NEW_MAINLINE_KERNEL_PACKAGES || true)" ]; then
|
||||
echo "ERROR: An added or moved close-to-mainline kernel package is not being built with LLVM."
|
||||
echo "See https://postmarketos.org/edge/2025/11/11/kernels-llvm/ for more details"
|
||||
grep --color=always -L LLVM=1 $MOVED_OR_NEW_MAINLINE_KERNEL_PACKAGES
|
||||
exit_code=1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Disallow adding packages without a maintainer set
|
||||
NEW_APKBUILDS=$(git show --pretty="" --name-only --diff-filter=A "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep APKBUILD || true)
|
||||
|
||||
if [ -n "$NEW_APKBUILDS" ]; then
|
||||
if [ -n "$(grep -L '^maintainer="[^"]\+"$' $NEW_APKBUILDS || true)" ]; then
|
||||
echo "ERROR: A new package does not have a maintainer set."
|
||||
grep --color=always -L '^maintainer="[^"]\+"$' $NEW_APKBUILDS
|
||||
exit_code=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
exit "$exit_code"
|
||||
+2
-2
@@ -6,11 +6,11 @@
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/main/install_pmbootstrap.sh"
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
export PYTHONUNBUFFERED=1
|
||||
|
||||
.ci/lib/kconfig.py
|
||||
.ci/lib/check_changed_kernels.py
|
||||
+1
@@ -0,0 +1 @@
|
||||
../testcases/add_pmbootstrap_to_import_path
|
||||
@@ -2,62 +2,25 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import common
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
import subprocess
|
||||
import tomllib
|
||||
|
||||
|
||||
custom_valid_options = [
|
||||
"!pmb:crossdirect",
|
||||
"!pmb:kconfigcheck",
|
||||
"pmb:cross-native",
|
||||
"pmb:cross-native2",
|
||||
"pmb:drm",
|
||||
"pmb:generic-kernel",
|
||||
"pmb:strict",
|
||||
"pmb:systemd",
|
||||
"pmb:systemd-never",
|
||||
]
|
||||
|
||||
|
||||
def get_kconfigcheck_categories() -> list [str]:
|
||||
with open("kconfigcheck.toml", "rb") as kconfigcheck_config:
|
||||
kconfigcheck_data = tomllib.load(kconfigcheck_config)
|
||||
|
||||
kconfigcheck_categories = []
|
||||
|
||||
for category_name in kconfigcheck_data:
|
||||
if category_name == "aliases":
|
||||
for alias_name in kconfigcheck_data["aliases"]:
|
||||
kconfigcheck_categories.append(f"pmb:kconfigcheck-{alias_name}")
|
||||
else:
|
||||
kconfigcheck_categories.append(category_name)
|
||||
|
||||
return [item.replace("category:", "pmb:kconfigcheck-") for item in kconfigcheck_categories]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
kconfigcheck_categories = get_kconfigcheck_categories()
|
||||
custom_valid_options += kconfigcheck_categories
|
||||
os.environ["CUSTOM_VALID_OPTIONS"] = " ".join(custom_valid_options)
|
||||
|
||||
apkbuilds = {file for file in common.get_changed_files()
|
||||
common.add_upstream_git_remote()
|
||||
apkbuilds = {file for file in common.get_changed_files(removed=False)
|
||||
if os.path.basename(file) == "APKBUILD"}
|
||||
if len(apkbuilds) < 1:
|
||||
print("No APKBUILDs to lint")
|
||||
sys.exit(0)
|
||||
|
||||
apkbuilds_filtered = []
|
||||
packages = []
|
||||
for apkbuild in apkbuilds:
|
||||
if apkbuild.startswith("temp/") or apkbuild.startswith("cross/"):
|
||||
print(f"NOTE: Skipping linting of {apkbuild}")
|
||||
continue
|
||||
apkbuilds_filtered.append(apkbuild)
|
||||
if len(apkbuilds_filtered) < 1:
|
||||
packages.append(os.path.basename(os.path.dirname(apkbuild)))
|
||||
if len(packages) < 1:
|
||||
print("No APKBUILDs to lint")
|
||||
sys.exit(0)
|
||||
try:
|
||||
subprocess.run(["apkbuild-lint", *apkbuilds_filtered], text=True, check=True)
|
||||
except subprocess.CalledProcessError as exception:
|
||||
sys.exit(exception.returncode)
|
||||
|
||||
common.run_pmbootstrap(["-q", "lint"] + packages)
|
||||
@@ -9,6 +9,7 @@ import pathlib
|
||||
import common
|
||||
|
||||
# pmbootstrap
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.core
|
||||
import pmb.parse
|
||||
import pmb.parse._apkbuild
|
||||
@@ -18,11 +19,7 @@ from pmb.core.context import get_context
|
||||
|
||||
def build_strict(packages, arch):
|
||||
common.run_pmbootstrap(["build_init"])
|
||||
# We set the timeout to 1 hour because linking the Linux kernel with
|
||||
# ThinLTO on our aarch64 runners takes slightly over 30 minutes
|
||||
common.run_pmbootstrap(["--details-to-stdout", "--no-ccache",
|
||||
"--timeout", "3600",
|
||||
"build",
|
||||
common.run_pmbootstrap(["--details-to-stdout", "--no-ccache", "build",
|
||||
"--strict", "--force",
|
||||
"--arch", arch, ] + list(packages))
|
||||
|
||||
@@ -35,7 +32,11 @@ if __name__ == "__main__":
|
||||
arch = sys.argv[1]
|
||||
|
||||
# Get and print modified packages
|
||||
packages = common.get_changed_packages(skip_archived=True)
|
||||
common.add_upstream_git_remote()
|
||||
packages = common.get_changed_packages()
|
||||
|
||||
# Package count sanity check
|
||||
common.get_changed_packages_sanity_check(len(packages))
|
||||
|
||||
# Load context
|
||||
sys.argv = ["pmbootstrap.py", "chroot"]
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
#!/bin/sh -e
|
||||
# Description: build modified packages for this architecture
|
||||
# Options: native slow
|
||||
# Use 'native' because it requires running pmbootstrap.
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/main/install_pmbootstrap.sh"
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
Executable
+213
@@ -0,0 +1,213 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import pathlib
|
||||
import tempfile
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
# Same dir
|
||||
import common
|
||||
|
||||
# pmbootstrap
|
||||
import add_pmbootstrap_to_import_path # noqa
|
||||
import pmb.parse
|
||||
import pmb.parse.version
|
||||
import pmb.helpers.logging
|
||||
from pmb.core.context import get_context
|
||||
|
||||
def get_package_contents(package, revision, check=True):
|
||||
# Redirect stderr to /dev/null, so git doesn't complain about files not
|
||||
# existing in upstream branch for new packages
|
||||
stderr = None
|
||||
if not check:
|
||||
stderr = subprocess.DEVNULL
|
||||
|
||||
# Run something like "git show upstream/master:main/hello-world/APKBUILD"
|
||||
pmaports_dir = common.get_pmaports_dir()
|
||||
pattern = pmaports_dir + "/**/" + package + "/APKBUILD"
|
||||
path = glob.glob(pattern, recursive=True)[0][len(pmaports_dir + "/"):]
|
||||
apkbuild_content = common.run_git(["show", revision + ":" + path], check,
|
||||
stderr)
|
||||
if not apkbuild_content:
|
||||
return None
|
||||
|
||||
# Save APKBUILD to a temporary path and parse it from there. (Not the best
|
||||
# way to do things, but good enough for this CI script.)
|
||||
with tempfile.TemporaryDirectory() as tempdir:
|
||||
with open(tempdir + "/APKBUILD", "w", encoding="utf-8") as handle:
|
||||
handle.write(apkbuild_content)
|
||||
parsed = pmb.parse.apkbuild(pathlib.Path(tempdir, "APKBUILD"),
|
||||
False, False)
|
||||
|
||||
return parsed
|
||||
|
||||
|
||||
def get_package_version(package, revision, check=True):
|
||||
""" returns version in the format "{pkgver}-r{pkgrel}", or None if no
|
||||
matching package is found """
|
||||
parsed = get_package_contents(package, revision, check)
|
||||
if parsed is None:
|
||||
return None
|
||||
return parsed["pkgver"] + "-r" + parsed["pkgrel"]
|
||||
|
||||
|
||||
def version_compare_operator(result):
|
||||
""" :param result: return value from pmb.parse.version.compare() """
|
||||
if result == -1:
|
||||
return "<"
|
||||
elif result == 0:
|
||||
return "=="
|
||||
elif result == 1:
|
||||
return ">"
|
||||
|
||||
raise RuntimeError("Unexpected version_compare_operator input: " + result)
|
||||
|
||||
|
||||
def exit_with_error_message():
|
||||
branch = common.get_upstream_branch()
|
||||
print()
|
||||
print("ERROR: Modified package(s) don't have an increased version or a")
|
||||
print("new package has a nonzero pkgrel!")
|
||||
print()
|
||||
print("This can happen if you added a new package with a nonzero")
|
||||
print("pkgrel, or if you did not change the pkgver/pkgrel")
|
||||
print("variables in the APKBUILDs. Or you did change them, but the")
|
||||
print(f"packages have been updated in the official '{branch}' branch, and")
|
||||
print("now your versions are not higher anymore.")
|
||||
print()
|
||||
print("Your options:")
|
||||
print("a) If you made changes to the packages, and did not increase the")
|
||||
print(" pkgrel/pkgver: increase them now, and force push your branch.")
|
||||
print(" => https://postmarketos.org/howto-bump-pkgrel-pkgver")
|
||||
print("b) If you had already increased the package versions, rebase on")
|
||||
print(f" '{branch}', increase the versions again and then force push:")
|
||||
print(" => https://postmarketos.org/rebase")
|
||||
print("c) If you made a change, that does not require rebuilding the")
|
||||
print(" packages, such as only changing the arch=... line: you can")
|
||||
print(" disable this check by adding '[ci:skip-vercheck]' to the")
|
||||
print(" latest commit message, then force push.")
|
||||
print()
|
||||
print("Thank you and sorry for the inconvenience.")
|
||||
exit(1)
|
||||
|
||||
|
||||
def check_versions(packages):
|
||||
error = False
|
||||
|
||||
# Get relevant commits: compare HEAD against upstream branch or HEAD~1
|
||||
# (the latter if this CI check is running on upstream branch). Note that
|
||||
# for the common.get_changed_files() code, we don't check against
|
||||
# upstream branch HEAD, but against the latest common ancestor. This is not
|
||||
# desired here, since we already know what packages changed, and really
|
||||
# want to check if the version was increased towards *current* upstream
|
||||
# branch HEAD.
|
||||
commit = f"upstream/{common.get_upstream_branch()}"
|
||||
if common.run_git(["rev-parse", "HEAD"]) == common.run_git(["rev-parse",
|
||||
commit]):
|
||||
print(f"NOTE: {commit} is on same commit as HEAD, comparing"
|
||||
" HEAD against HEAD~1.")
|
||||
commit = "HEAD~1"
|
||||
|
||||
# Exclude linux-next from pkgrel checks, as it is updated automatically.
|
||||
#
|
||||
# Without this, .ci/commits.sh complains about the following:
|
||||
# ERROR: Modified package(s) don't have an increased version or a new
|
||||
# package has a nonzero pkgrel!
|
||||
if "linux-next" in packages:
|
||||
packages.remove("linux-next")
|
||||
|
||||
for package in packages:
|
||||
# Get versions, skip new packages
|
||||
head = get_package_version(package, "HEAD")
|
||||
upstream = get_package_version(package, commit, False)
|
||||
if not upstream:
|
||||
if head.rpartition('r')[2] != "0":
|
||||
print(f"- {package}: {head} (HEAD) (new package) [ERROR]")
|
||||
error = True
|
||||
else:
|
||||
print(f"- {package}: {head} (HEAD) (new package)")
|
||||
continue
|
||||
|
||||
# Check pkgver follows expected format for device packages
|
||||
pkgver = head.rpartition('-r')[0]
|
||||
if package.startswith('device-') and not pkgver.isdigit():
|
||||
print(f" - {package}: invalid pkgver \"{pkgver}\""
|
||||
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
|
||||
error = True
|
||||
|
||||
# Additional checks for device packages
|
||||
if package.startswith('device-'):
|
||||
head_parsed = get_package_contents(package, "HEAD", False)
|
||||
upstream_parsed = get_package_contents(package, commit, False)
|
||||
|
||||
# checksums did not change
|
||||
if head_parsed["sha512sums"] == upstream_parsed["sha512sums"]:
|
||||
# Check that pkgver did not change
|
||||
if head_parsed["pkgver"] != upstream_parsed["pkgver"]:
|
||||
print(f" - {package}: pkgver should not change when package source checksums did not change."
|
||||
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
|
||||
error = True
|
||||
# We do not check for a bumped pkgrel, because not everything
|
||||
# needs it, e.g: pmb_recommends
|
||||
# checksums changed
|
||||
else:
|
||||
# Check that pkgrel was reset to 0
|
||||
if head_parsed["pkgrel"] != "0":
|
||||
print(f" - {package}: pkgrel should be 0 when package source checksums change."
|
||||
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
|
||||
error = True
|
||||
# Check that pkgver was changed
|
||||
if head_parsed["pkgver"] == upstream_parsed["pkgver"]:
|
||||
print(f" - {package}: pkgver should change when package source checksums change."
|
||||
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
|
||||
error = True
|
||||
|
||||
# Compare head and upstream versions
|
||||
result = pmb.parse.version.compare(head, upstream)
|
||||
if result != 1:
|
||||
error = True
|
||||
|
||||
# Print result line ("- hello-world: 1-r2 (HEAD) > 1-r1 (HEAD~1)")
|
||||
formatstr = "- {}: {} (HEAD) {} {} ({})"
|
||||
if result != 1:
|
||||
formatstr += " [ERROR]"
|
||||
operator = version_compare_operator(result)
|
||||
print(formatstr.format(package, head, operator, upstream, commit))
|
||||
|
||||
if error:
|
||||
exit_with_error_message()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Get and print modified packages
|
||||
common.add_upstream_git_remote()
|
||||
packages = common.get_changed_packages()
|
||||
print(f"Changed packages: {packages}")
|
||||
|
||||
# Verify modified package count
|
||||
common.get_changed_packages_sanity_check(len(packages))
|
||||
if len(packages) == 0:
|
||||
print("no aports changed in this branch")
|
||||
exit(0)
|
||||
|
||||
# Potentially skip this check
|
||||
if common.commit_message_has_string("[ci:skip-vercheck]"):
|
||||
print("WARNING: not checking for changed package versions"
|
||||
" ([ci:skip-vercheck])!")
|
||||
exit(0)
|
||||
|
||||
# Initialize args (so we can use pmbootstrap's APKBUILD parsing)
|
||||
sys.argv = ["pmbootstrap.py", "chroot"]
|
||||
args = pmb.parse.arguments()
|
||||
context = get_context()
|
||||
|
||||
# pmb.helpers.logging.init(args)
|
||||
pmb.helpers.logging.init(context.log, args.verbose, context.details_to_stdout)
|
||||
|
||||
|
||||
# Verify package versions
|
||||
print("checking changed package versions...")
|
||||
check_versions(packages)
|
||||
Executable
+98
@@ -0,0 +1,98 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2024 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import tempfile
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
# Same dir
|
||||
import common
|
||||
|
||||
|
||||
def check_kconfig(pkgnames):
|
||||
last_failed = None
|
||||
for i in range(len(pkgnames)):
|
||||
pkgname = pkgnames[i]
|
||||
print(f" ({i+1}/{len(pkgnames)}) {pkgname}")
|
||||
|
||||
p = subprocess.run(["pmbootstrap", "kconfig", "check", "--keep-going", pkgname],
|
||||
check=False)
|
||||
|
||||
if p.returncode:
|
||||
last_failed = pkgname
|
||||
|
||||
return last_failed
|
||||
|
||||
|
||||
def check_kconfig_all():
|
||||
p = subprocess.run(["pmbootstrap", "kconfig", "check", "--keep-going"], check=False)
|
||||
return p.returncode == 0
|
||||
|
||||
|
||||
def show_error(last_failed):
|
||||
print("")
|
||||
print("---")
|
||||
print("")
|
||||
print("Please adjust your kernel config. This is required for getting your"
|
||||
" patch merged.")
|
||||
print("")
|
||||
print("Edit your kernel config:")
|
||||
print(f" pmbootstrap kconfig edit {last_failed}")
|
||||
print("")
|
||||
print("Test this kernel config again:")
|
||||
print(f" pmbootstrap kconfig check {last_failed}")
|
||||
print("")
|
||||
print("Run this check again (on all kernels you modified):")
|
||||
print(" pmbootstrap ci kconfig")
|
||||
print("")
|
||||
print("---")
|
||||
print("")
|
||||
|
||||
|
||||
def show_error_all():
|
||||
print("")
|
||||
print("---")
|
||||
print("")
|
||||
print("Please adjust the failed kernel configs. This is required for")
|
||||
print("getting your patch merged.")
|
||||
print("")
|
||||
print("If a kernel in the testing category failed, and fixing is too much")
|
||||
print("effort, remove 'pmb:kconfigcheck-community' from the APKBUILD.")
|
||||
print("")
|
||||
print("Edit a kernel config:")
|
||||
print(" pmbootstrap kconfig edit <PACKAGE NAME>")
|
||||
print("")
|
||||
print("Test a specific kernel config again:")
|
||||
print(" pmbootstrap kconfig check <PACKAGE NAME>")
|
||||
print("")
|
||||
print("Run this check again (on all kernels you modified):")
|
||||
print(" pmbootstrap ci kconfig")
|
||||
print("")
|
||||
print("---")
|
||||
print("")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
common.add_upstream_git_remote()
|
||||
|
||||
if "kconfigcheck.toml" in common.get_changed_files():
|
||||
print("kconfigcheck.toml changed -> checking all kernels")
|
||||
if not check_kconfig_all():
|
||||
show_error_all()
|
||||
exit(1)
|
||||
exit(0)
|
||||
|
||||
pkgnames = common.get_changed_kernels()
|
||||
print(f"Changed kernels: {pkgnames}")
|
||||
|
||||
if len(pkgnames) == 0:
|
||||
print("No kernels changed in this branch")
|
||||
exit(0)
|
||||
|
||||
last_failed = check_kconfig(pkgnames)
|
||||
|
||||
if last_failed:
|
||||
show_error(last_failed)
|
||||
exit(1)
|
||||
@@ -1,212 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import pathlib
|
||||
import tempfile
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
# Same dir
|
||||
import common
|
||||
|
||||
# pmbootstrap
|
||||
import pmb.parse
|
||||
import pmb.parse.version
|
||||
import pmb.helpers.logging
|
||||
from pmb.core.context import get_context
|
||||
|
||||
def get_package_contents(package, revision, check=True):
|
||||
# Redirect stderr to /dev/null, so git doesn't complain about files not
|
||||
# existing in upstream branch for new packages
|
||||
stderr = None
|
||||
if not check:
|
||||
stderr = subprocess.DEVNULL
|
||||
|
||||
# Run something like "git show upstream/master:main/hello-world/APKBUILD"
|
||||
pmaports_dir = common.get_pmaports_dir()
|
||||
pattern = pmaports_dir + "/**/" + package + "/APKBUILD"
|
||||
path = glob.glob(pattern, recursive=True)[0][len(pmaports_dir + "/"):]
|
||||
apkbuild_content = common.run_git(["show", revision + ":" + path], check,
|
||||
stderr)
|
||||
if not apkbuild_content:
|
||||
return None
|
||||
|
||||
# Save APKBUILD to a temporary path and parse it from there. (Not the best
|
||||
# way to do things, but good enough for this CI script.)
|
||||
with tempfile.TemporaryDirectory() as tempdir:
|
||||
with open(tempdir + "/APKBUILD", "w", encoding="utf-8") as handle:
|
||||
handle.write(apkbuild_content)
|
||||
parsed = pmb.parse.apkbuild(pathlib.Path(tempdir, "APKBUILD"),
|
||||
False, False)
|
||||
|
||||
return parsed
|
||||
|
||||
|
||||
def get_package_version(package, revision, check=True):
|
||||
""" returns version in the format "{pkgver}-r{pkgrel}", or None if no
|
||||
matching package is found """
|
||||
parsed = get_package_contents(package, revision, check)
|
||||
if parsed is None:
|
||||
return None
|
||||
return parsed["pkgver"] + "-r" + parsed["pkgrel"]
|
||||
|
||||
|
||||
def version_compare_operator(result):
|
||||
""" :param result: return value from pmb.parse.version.compare() """
|
||||
if result == -1:
|
||||
return "<"
|
||||
elif result == 0:
|
||||
return "=="
|
||||
elif result == 1:
|
||||
return ">"
|
||||
|
||||
raise RuntimeError("Unexpected version_compare_operator input: " + result)
|
||||
|
||||
|
||||
def exit_with_error_message():
|
||||
branch = common.get_upstream_branch()
|
||||
print()
|
||||
print("ERROR: Modified package(s) don't have an increased version or a")
|
||||
print("new package has a nonzero pkgrel!")
|
||||
print()
|
||||
print("This can happen if you added a new package with a nonzero")
|
||||
print("pkgrel, or if you did not change the pkgver/pkgrel")
|
||||
print("variables in the APKBUILDs. Or you did change them, but the")
|
||||
print(f"packages have been updated in the official '{branch}' branch, and")
|
||||
print("now your versions are not higher anymore.")
|
||||
print()
|
||||
print("Your options:")
|
||||
print("a) If you made changes to the packages, and did not increase the")
|
||||
print(" pkgrel/pkgver: increase them now, and force push your branch.")
|
||||
print(" => https://postmarketos.org/howto-bump-pkgrel-pkgver")
|
||||
print("b) If you had already increased the package versions, rebase on")
|
||||
print(f" '{branch}', increase the versions again and then force push:")
|
||||
print(" => https://postmarketos.org/rebase")
|
||||
print("c) If you made a change, that does not require rebuilding the")
|
||||
print(" packages, such as only changing the arch=... line: you can")
|
||||
print(" disable this check by adding '[ci:skip-vercheck]' to the")
|
||||
print(" latest commit message, then force push.")
|
||||
print()
|
||||
print("Thank you and sorry for the inconvenience.")
|
||||
exit(1)
|
||||
|
||||
|
||||
def check_versions(packages):
|
||||
error = False
|
||||
|
||||
# Get relevant commits: compare HEAD against upstream branch or HEAD~1
|
||||
# (the latter if this CI check is running on upstream branch). Note that
|
||||
# for the common.get_changed_files() code, we don't check against
|
||||
# upstream branch HEAD, but against the latest common ancestor. This is not
|
||||
# desired here, since we already know what packages changed, and really
|
||||
# want to check if the version was increased towards *current* upstream
|
||||
# branch HEAD.
|
||||
common.run_git(["remote", "add", "upstream",
|
||||
"https://gitlab.postmarketos.org/postmarketOS/pmaports.git"], False)
|
||||
common.run_git(["fetch", "-q", "upstream"])
|
||||
commit = f"upstream/{common.get_upstream_branch()}"
|
||||
if common.run_git(["rev-parse", "HEAD"]) == common.run_git(["rev-parse",
|
||||
commit]):
|
||||
print(f"NOTE: {commit} is on same commit as HEAD, comparing"
|
||||
" HEAD against HEAD~1.")
|
||||
commit = "HEAD~1"
|
||||
|
||||
# Exclude linux-next from pkgrel checks, as it is updated automatically.
|
||||
#
|
||||
# Without this, .ci/commits.sh complains about the following:
|
||||
# ERROR: Modified package(s) don't have an increased version or a new
|
||||
# package has a nonzero pkgrel!
|
||||
if "linux-next" in packages:
|
||||
packages.remove("linux-next")
|
||||
|
||||
for package in packages:
|
||||
# Get versions, skip new packages
|
||||
head = get_package_version(package, "HEAD")
|
||||
upstream = get_package_version(package, commit, False)
|
||||
if not upstream:
|
||||
if head.rpartition('r')[2] != "0":
|
||||
print(f"- {package}: {head} (HEAD) (new package) [ERROR]")
|
||||
error = True
|
||||
else:
|
||||
print(f"- {package}: {head} (HEAD) (new package)")
|
||||
continue
|
||||
|
||||
# Check pkgver follows expected format for device packages
|
||||
pkgver = head.rpartition('-r')[0]
|
||||
if package.startswith('device-') and not pkgver.isdigit():
|
||||
print(f" - {package}: invalid pkgver \"{pkgver}\""
|
||||
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
|
||||
error = True
|
||||
|
||||
# Additional checks for device packages
|
||||
if package.startswith('device-'):
|
||||
head_parsed = get_package_contents(package, "HEAD", False)
|
||||
upstream_parsed = get_package_contents(package, commit, False)
|
||||
|
||||
# checksums did not change
|
||||
if head_parsed["sha512sums"] == upstream_parsed["sha512sums"]:
|
||||
# Check that pkgver did not change
|
||||
if head_parsed["pkgver"] != upstream_parsed["pkgver"]:
|
||||
print(f" - {package}: pkgver should not change when package source checksums did not change."
|
||||
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
|
||||
error = True
|
||||
# We do not check for a bumped pkgrel, because not everything
|
||||
# needs it, e.g: pmb_recommends
|
||||
# checksums changed
|
||||
else:
|
||||
# Check that pkgrel was reset to 0
|
||||
if head_parsed["pkgrel"] != "0":
|
||||
print(f" - {package}: pkgrel should be 0 when package source checksums change."
|
||||
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
|
||||
error = True
|
||||
# Check that pkgver was changed
|
||||
if head_parsed["pkgver"] == upstream_parsed["pkgver"]:
|
||||
print(f" - {package}: pkgver should change when package source checksums change."
|
||||
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
|
||||
error = True
|
||||
|
||||
# Compare head and upstream versions
|
||||
result = pmb.parse.version.compare(head, upstream)
|
||||
if result != 1:
|
||||
error = True
|
||||
|
||||
# Print result line ("- hello-world: 1-r2 (HEAD) > 1-r1 (HEAD~1)")
|
||||
formatstr = "- {}: {} (HEAD) {} {} ({})"
|
||||
if result != 1:
|
||||
formatstr += " [ERROR]"
|
||||
operator = version_compare_operator(result)
|
||||
print(formatstr.format(package, head, operator, upstream, commit))
|
||||
|
||||
if error:
|
||||
exit_with_error_message()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Get and print modified packages
|
||||
packages = common.get_changed_packages()
|
||||
if len(packages) == 0:
|
||||
print("no aports changed in this branch")
|
||||
exit(0)
|
||||
|
||||
print(f"Changed packages: {packages}")
|
||||
|
||||
# Potentially skip this check
|
||||
if common.commit_message_has_string("[ci:skip-vercheck]"):
|
||||
print("WARNING: not checking for changed package versions"
|
||||
" ([ci:skip-vercheck])!")
|
||||
exit(0)
|
||||
|
||||
# Initialize args (so we can use pmbootstrap's APKBUILD parsing)
|
||||
sys.argv = ["pmbootstrap.py", "chroot"]
|
||||
args = pmb.parse.arguments()
|
||||
context = get_context()
|
||||
|
||||
# pmb.helpers.logging.init(args)
|
||||
pmb.helpers.logging.init(context.log, args.verbose, context.details_to_stdout)
|
||||
|
||||
|
||||
# Verify package versions
|
||||
print("checking changed package versions...")
|
||||
check_versions(packages)
|
||||
@@ -7,8 +7,6 @@ import argparse
|
||||
import sys
|
||||
import urllib.request
|
||||
|
||||
# Same dir
|
||||
import common
|
||||
|
||||
def get_devices() -> list[str]:
|
||||
""":returns: list of all devices"""
|
||||
@@ -96,23 +94,13 @@ def main() -> int:
|
||||
parser.add_argument("--path", help="instead of downloading the devices"
|
||||
" page from the wiki, use a local HTML file",
|
||||
type=Path, default=None)
|
||||
parser.add_argument("--all", help="check all devices (default: check only"
|
||||
" devices changed from branch point)",
|
||||
action="store_true")
|
||||
args = parser.parse_args()
|
||||
|
||||
# Check all devices
|
||||
html = get_wiki_devices_html(args.path)
|
||||
html["renamed"] = get_wiki_renamed_devices_html()
|
||||
error = False
|
||||
devices = []
|
||||
if args.all:
|
||||
devices = get_devices()
|
||||
else:
|
||||
devices = common.get_changed_devices(skip_archived=True)
|
||||
# remove 'device-' prefix
|
||||
devices = [d[7:] for d in devices]
|
||||
devices = [d.removesuffix("-downstream") for d in devices]
|
||||
for device in devices:
|
||||
for device in get_devices():
|
||||
if not check_device(device, html, args.booting):
|
||||
error = True
|
||||
|
||||
|
||||
+65
-42
@@ -7,12 +7,19 @@
|
||||
import configparser
|
||||
import os
|
||||
import subprocess
|
||||
from functools import cache
|
||||
import sys
|
||||
|
||||
|
||||
cache = {}
|
||||
|
||||
|
||||
@cache
|
||||
def get_pmaports_dir():
|
||||
return os.path.realpath(os.path.join(os.path.dirname(__file__) + "/../.."))
|
||||
global cache
|
||||
if "pmaports_dir" in cache:
|
||||
return cache["pmaports_dir"]
|
||||
ret = os.path.realpath(os.path.join(os.path.dirname(__file__) + "/../.."))
|
||||
cache["pmaports_dir"] = ret
|
||||
return ret
|
||||
|
||||
|
||||
def run_git(parameters, check=True, stderr=None):
|
||||
@@ -26,26 +33,25 @@ def run_git(parameters, check=True, stderr=None):
|
||||
return None
|
||||
|
||||
|
||||
def add_upstream_git_remote():
|
||||
""" Add a remote pointing to postmarketOS/pmaports. """
|
||||
run_git(["remote", "add", "upstream",
|
||||
"https://gitlab.postmarketos.org/postmarketOS/pmaports.git"], False)
|
||||
run_git(["fetch", "-q", "upstream"])
|
||||
|
||||
|
||||
def commit_message_has_string(needle):
|
||||
base_commit = get_base_commit()
|
||||
|
||||
return needle in run_git(["log", "--pretty=format:%B", f"{base_commit}..HEAD"])
|
||||
|
||||
|
||||
def all_committed_by_merge_bot():
|
||||
base_commit = get_base_commit()
|
||||
commit_emails = run_git(["log", "--pretty=format:%ce", f"{base_commit}..HEAD"]).splitlines()
|
||||
bot_email = os.getenv("PMOS_MERGE_BOT_EMAIL", "merge-bot@postmarketos.org")
|
||||
return all(bot_email == ce for ce in commit_emails)
|
||||
|
||||
|
||||
def run_pmbootstrap(parameters):
|
||||
""" Run pmbootstrap with the pmaports dir as --aports """
|
||||
cmd = ["pmbootstrap", "--aports", get_pmaports_dir()] + parameters
|
||||
subprocess.run(cmd, universal_newlines=True, check=True)
|
||||
|
||||
|
||||
@cache
|
||||
def get_upstream_branch():
|
||||
""" Use pmaports.cfg from current branch (e.g. "v20.05_fix-ci") and
|
||||
channels.cfg from master to retrieve the upstream branch.
|
||||
@@ -56,6 +62,10 @@ def get_upstream_branch():
|
||||
if target_branch := os.environ.get("CI_MERGE_REQUEST_TARGET_BRANCH_NAME"):
|
||||
return target_branch
|
||||
|
||||
global cache
|
||||
if "upstream_branch" in cache:
|
||||
return cache["upstream_branch"]
|
||||
|
||||
# Get channel (e.g. "stable") from pmaports.cfg
|
||||
# https://postmarketos.org/pmaports.cfg
|
||||
pmaports_dir = get_pmaports_dir()
|
||||
@@ -73,23 +83,15 @@ def get_upstream_branch():
|
||||
" This appears to be an old branch, consider recreating your change" \
|
||||
" on top of master."
|
||||
|
||||
return channels_cfg[channel]["branch_pmaports"]
|
||||
ret = channels_cfg[channel]["branch_pmaports"]
|
||||
cache["upstream_branch"] = ret
|
||||
return ret
|
||||
|
||||
|
||||
@cache
|
||||
def get_base_commit() -> str:
|
||||
"""Get the base commit that can be compared with HEAD to get all commits in the
|
||||
given branch/merge request."""
|
||||
|
||||
commit = os.getenv("CI_MERGE_REQUEST_DIFF_BASE_SHA")
|
||||
if commit is not None:
|
||||
return commit
|
||||
|
||||
# Add a remote pointing to postmarketOS/pmaports
|
||||
run_git(["remote", "add", "upstream",
|
||||
"https://gitlab.postmarketos.org/postmarketOS/pmaports.git"], False)
|
||||
run_git(["fetch", "-q", "upstream"])
|
||||
|
||||
branch_upstream = f"upstream/{get_upstream_branch()}"
|
||||
commit_head = run_git(["rev-parse", "HEAD"])[:-1]
|
||||
commit_upstream = run_git(["rev-parse", branch_upstream])[:-1]
|
||||
@@ -108,7 +110,7 @@ def get_base_commit() -> str:
|
||||
return commit
|
||||
|
||||
|
||||
def get_changed_files(removed=False):
|
||||
def get_changed_files(removed=True):
|
||||
""" Get all changed files and print them, as well as the branch and the
|
||||
commit that was used for the diff.
|
||||
:param removed: also return removed files (default: True)
|
||||
@@ -131,22 +133,50 @@ def get_changed_files(removed=False):
|
||||
return ret
|
||||
|
||||
|
||||
def get_changed_packages(skip_archived: bool = False):
|
||||
def get_changed_packages_sanity_check(count):
|
||||
for mark in ["[ci:ignore-count]", "[ci:skip-build]"]:
|
||||
if commit_message_has_string(mark):
|
||||
print("NOTE: package count sanity check skipped (" + mark + ").")
|
||||
return
|
||||
if count <= 10:
|
||||
return
|
||||
|
||||
branch = get_upstream_branch()
|
||||
print(f"""
|
||||
ERROR: Too many packages have changed!
|
||||
|
||||
This is a sanity check, so we don't end up building packages that
|
||||
have not been modified. CI won't run for more than three hours
|
||||
anyway.
|
||||
|
||||
Your options:
|
||||
a) If you *did not* modify everything listed above, then rebase
|
||||
your branch on the official postmarketOS/pmaports.git {branch}
|
||||
branch. Feel free to ask in the chat for help if you need any.
|
||||
b) If you *did* modify all these packages, and you assume that
|
||||
they will build within one hour: skip this sanity check by
|
||||
adding '[ci:ignore-count]' to the commit message of the last
|
||||
commit in the merge request (then force push).
|
||||
c) If you *did* modify all these packages, and you are sure that
|
||||
they won't build in time, please add '[ci:skip-build]' to the
|
||||
commit message (then force push). Make sure that all packages
|
||||
build with 'pmbootstrap build --strict'!
|
||||
|
||||
Thank you and sorry for the inconvenience.
|
||||
""")
|
||||
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def get_changed_packages():
|
||||
ret = set()
|
||||
for file in get_changed_files(removed=True):
|
||||
for file in get_changed_files():
|
||||
dirname, filename = os.path.split(file)
|
||||
|
||||
# Skip files:
|
||||
# * in the root dir of pmaports (e.g. README.md)
|
||||
# * path with a dot (e.g. .ci/, device/.shared-patches/)
|
||||
# * documentation
|
||||
if (
|
||||
not dirname
|
||||
or file.startswith(".")
|
||||
or "/." in file
|
||||
or skip_archived and dirname.startswith("device/archived")
|
||||
or dirname == "docs"
|
||||
):
|
||||
if not dirname or file.startswith(".") or "/." in file:
|
||||
continue
|
||||
|
||||
if filename != "APKBUILD":
|
||||
@@ -175,16 +205,9 @@ def get_changed_packages(skip_archived: bool = False):
|
||||
return ret
|
||||
|
||||
|
||||
def get_changed_kernels(skip_archived: bool = False):
|
||||
def get_changed_kernels():
|
||||
ret = []
|
||||
for pkgname in get_changed_packages(skip_archived):
|
||||
for pkgname in get_changed_packages():
|
||||
if pkgname.startswith("linux-"):
|
||||
ret += [pkgname]
|
||||
return ret
|
||||
|
||||
def get_changed_devices(skip_archived: bool = False):
|
||||
ret = []
|
||||
for pkgname in get_changed_packages(skip_archived):
|
||||
if pkgname.startswith("device-"):
|
||||
ret += [pkgname]
|
||||
return ret
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2025 Stefan Hansson
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import common
|
||||
import os.path
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
if common.commit_message_has_string("[ci:skip-dint]"):
|
||||
print("WARNING: not linting deviceinfo files ([ci:skip-dint])")
|
||||
exit(0)
|
||||
# only lint deviceinfo files in the devices repo
|
||||
deviceinfo_files = {file for file in common.get_changed_files()
|
||||
if os.path.basename(file) == "deviceinfo" and file.startswith("device/")}
|
||||
|
||||
try:
|
||||
subprocess.run(["dint", "check", *deviceinfo_files], text=True, check=True)
|
||||
except subprocess.CalledProcessError as exception:
|
||||
sys.exit(exception.returncode)
|
||||
@@ -2,7 +2,6 @@
|
||||
# Copyright 2025 Pablo Correa Gomez
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import argparse
|
||||
from functools import cached_property
|
||||
from pathlib import Path
|
||||
from typing import Self
|
||||
@@ -44,6 +43,10 @@ class Device:
|
||||
|
||||
return Template(fragment_tmpl).render(device=self)
|
||||
|
||||
@property
|
||||
def is_present_in_ci(self):
|
||||
return bool(self.gitlab_ci_fragment)
|
||||
|
||||
@cached_property
|
||||
def pmaports_path(self) -> Path:
|
||||
# Find the root of pmaports
|
||||
@@ -69,11 +72,11 @@ class Device:
|
||||
|
||||
@property
|
||||
def testing_dependencies(self) -> set[str]:
|
||||
# TODO: Source this from the APKBUILD
|
||||
# TODO: Source this from the APKGBUILD
|
||||
return {"postmarketos-mkinitfs-hook-ci"}
|
||||
|
||||
@cached_property
|
||||
def package_dependencies(self) -> set[str]:
|
||||
def package_dependencies(self) -> list[str]:
|
||||
# HACK: Work around a bug in depends_recurse which prevents listing all the dependencies
|
||||
# Bug: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues/2623
|
||||
return {"postmarketos-initramfs"}
|
||||
@@ -85,7 +88,7 @@ class Device:
|
||||
return self.package_dependencies | self.testing_dependencies
|
||||
|
||||
@cached_property
|
||||
def kernel_variants(self) -> list[str]:
|
||||
def kernels(self) -> list[str] | None:
|
||||
kernels = []
|
||||
|
||||
subpackage_prefix = f"device-{self.codename}-kernel-"
|
||||
@@ -98,7 +101,10 @@ class Device:
|
||||
if kernel_name != "none":
|
||||
kernels.append(kernel_name)
|
||||
|
||||
return kernels
|
||||
if kernels:
|
||||
return kernels
|
||||
else:
|
||||
return None
|
||||
|
||||
@cached_property
|
||||
def deviceinfo(self) -> dict[str, Deviceinfo] | Deviceinfo:
|
||||
@@ -111,7 +117,7 @@ class Device:
|
||||
|
||||
@property
|
||||
def has_kernel_variants(self):
|
||||
return len(self.kernel_variants) > 0
|
||||
return len(self.kernels) > 0
|
||||
|
||||
@classmethod
|
||||
def supported_devices(cls) -> dict[Path, Self]:
|
||||
@@ -125,7 +131,7 @@ class Device:
|
||||
dev = cls(device.codename)
|
||||
|
||||
# Ignore devices that do not have a gitlab ci fragment,
|
||||
# since adding that fragment is how we mark them as DUTs
|
||||
# since we won't be able to make use of them
|
||||
if not dev.gitlab_ci_fragment:
|
||||
continue
|
||||
|
||||
@@ -136,21 +142,30 @@ class Device:
|
||||
|
||||
|
||||
class ArchTagSet(set):
|
||||
supported_arches = [
|
||||
Arch.x86_64,
|
||||
Arch.x86,
|
||||
Arch.aarch64,
|
||||
Arch.armv7,
|
||||
Arch.armhf,
|
||||
Arch.riscv64,
|
||||
]
|
||||
|
||||
def update(self, iterable):
|
||||
supported_arches = Arch.supported_binary()
|
||||
# This ignores things like !armv7, that could be a follow-up optimization
|
||||
if 'noarch' in iterable or 'all' in iterable:
|
||||
iterable = [arch for arch in supported_arches]
|
||||
super().update([Arch(arch) for arch in iterable if Arch(arch) in supported_arches])
|
||||
iterable = [arch for arch in self.supported_arches]
|
||||
super().update([Arch(arch) for arch in iterable if Arch(arch) in self.supported_arches])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
||||
)
|
||||
parser.add_argument("--template", default=".ci/build-jobs.yaml.j2", help="Jinja2 input template")
|
||||
parser.add_argument("--output", default=".ci/build-jobs.yaml", help="output pipeline")
|
||||
args = parser.parse_args()
|
||||
# Needs input to output if we should create the jobs
|
||||
if len(sys.argv) != 3:
|
||||
print("usage: generate_build_jobs.py TEMPLATE CHILD_PIPELINE")
|
||||
print(sys.argv)
|
||||
sys.exit(1)
|
||||
template = sys.argv[1]
|
||||
child_pipeline = sys.argv[2]
|
||||
|
||||
# pmb logging has to be initialized for later pmb commands to work, setting
|
||||
# to /dev/null since we don't care about the output. Later this could
|
||||
@@ -160,16 +175,16 @@ if __name__ == "__main__":
|
||||
|
||||
# Load context
|
||||
sys.argv = ["pmbootstrap.py", "chroot"]
|
||||
_ = pmb.parse.arguments()
|
||||
args = pmb.parse.arguments()
|
||||
|
||||
# Get the list of supported devices
|
||||
supported_devices = Device.supported_devices()
|
||||
print(f"Supported devices: {[d for d in supported_devices.values()]}")
|
||||
|
||||
archs = ArchTagSet()
|
||||
devices_under_test = set()
|
||||
packages_modified = set()
|
||||
# Get and print modified packages
|
||||
common.add_upstream_git_remote()
|
||||
for file in common.get_changed_files():
|
||||
path = Path(file)
|
||||
|
||||
@@ -179,6 +194,8 @@ if __name__ == "__main__":
|
||||
|
||||
if path.name != "APKBUILD":
|
||||
continue
|
||||
elif not path.exists():
|
||||
continue # APKBUILD was deleted
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
packages_modified.add(apkbuild['pkgname'])
|
||||
archs.update(apkbuild["arch"])
|
||||
@@ -189,21 +206,15 @@ if __name__ == "__main__":
|
||||
if apkbuild['pkgname'] in device.dependencies:
|
||||
devices_under_test.add(device)
|
||||
|
||||
skip = False
|
||||
if common.commit_message_has_string("[ci:skip-build]"):
|
||||
print("User requested skipping build, skipping build")
|
||||
skip = True
|
||||
if common.all_committed_by_merge_bot():
|
||||
print("All commits in branch committed by merge bot, skipping build")
|
||||
skip = True
|
||||
if skip:
|
||||
print("User requested skipping build, not creating child pipeline file")
|
||||
archs = ArchTagSet()
|
||||
devices_under_test = set()
|
||||
|
||||
print(f"Architectures to build: {archs}")
|
||||
print(f"Devices under test: {devices_under_test}")
|
||||
|
||||
with open(args.template) as f:
|
||||
with open(template) as f:
|
||||
rendered = Template(f.read()).render(
|
||||
archs=archs,
|
||||
devices_under_test=devices_under_test,
|
||||
@@ -215,9 +226,7 @@ if __name__ == "__main__":
|
||||
Arch.armv7: "qemu",
|
||||
Arch.armhf: "qemu",
|
||||
Arch.riscv64: "qemu",
|
||||
Arch.ppc64le: "ppc64le",
|
||||
Arch.loongarch64: "loongarch64",
|
||||
},
|
||||
)
|
||||
with open(args.output, "w") as fw:
|
||||
with open(child_pipeline, "w") as fw:
|
||||
fw.write(rendered)
|
||||
@@ -1,96 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2024 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import subprocess
|
||||
|
||||
# Same dir
|
||||
import common
|
||||
|
||||
|
||||
def check_kconfig(pkgnames):
|
||||
last_failed = None
|
||||
for i in range(len(pkgnames)):
|
||||
pkgname = pkgnames[i]
|
||||
print(f" ({i+1}/{len(pkgnames)}) {pkgname}")
|
||||
|
||||
p = subprocess.run(["pmbootstrap", "kconfig", "check", "--keep-going", pkgname],
|
||||
check=False)
|
||||
|
||||
if p.returncode:
|
||||
last_failed = pkgname
|
||||
|
||||
return last_failed
|
||||
|
||||
|
||||
def check_kconfig_all():
|
||||
p = subprocess.run(["pmbootstrap", "kconfig", "check", "--keep-going"], check=False)
|
||||
return p.returncode == 0
|
||||
|
||||
|
||||
def show_error(last_failed):
|
||||
print("")
|
||||
print("---")
|
||||
print("")
|
||||
print("Please adjust your kernel config. This is required for getting your"
|
||||
" patch merged.")
|
||||
print("")
|
||||
print("Edit your kernel config:")
|
||||
print(f" pmbootstrap kconfig edit {last_failed}")
|
||||
print("")
|
||||
print("Test this kernel config again:")
|
||||
print(f" pmbootstrap kconfig check {last_failed}")
|
||||
print("")
|
||||
print("Run this check again (on all kernels you modified):")
|
||||
print(" pmbootstrap ci kconfig")
|
||||
print("")
|
||||
print("---")
|
||||
print("")
|
||||
|
||||
|
||||
def show_error_all():
|
||||
print("")
|
||||
print("---")
|
||||
print("")
|
||||
print("Please adjust the failed kernel configs. This is required for")
|
||||
print("getting your patch merged.")
|
||||
print("")
|
||||
print("If a kernel in the testing category failed, and fixing is too much")
|
||||
print("effort, remove 'pmb:kconfigcheck-community' from the APKBUILD.")
|
||||
print("")
|
||||
print("Edit a kernel config:")
|
||||
print(" pmbootstrap kconfig edit <PACKAGE NAME>")
|
||||
print("")
|
||||
print("Test a specific kernel config again:")
|
||||
print(" pmbootstrap kconfig check <PACKAGE NAME>")
|
||||
print("")
|
||||
print("Run this check again (on all kernels you modified):")
|
||||
print(" pmbootstrap ci kconfig")
|
||||
print("")
|
||||
print("---")
|
||||
print("")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "kconfigcheck.toml" in common.get_changed_files():
|
||||
print("kconfigcheck.toml changed -> checking all kernels")
|
||||
if not check_kconfig_all():
|
||||
show_error_all()
|
||||
exit(1)
|
||||
exit(0)
|
||||
|
||||
pkgnames = common.get_changed_kernels(skip_archived=True)
|
||||
print(f"Changed kernels: {pkgnames}")
|
||||
|
||||
if len(pkgnames) == 0:
|
||||
print("No kernels changed in this branch")
|
||||
exit(0)
|
||||
elif common.commit_message_has_string("[ci:skip-kconfigcheck]"):
|
||||
print("WARNING: not checking kernel configs ([ci:skip-kconfigcheck])")
|
||||
exit(0)
|
||||
|
||||
last_failed = check_kconfig(pkgnames)
|
||||
|
||||
if last_failed:
|
||||
show_error(last_failed)
|
||||
exit(1)
|
||||
@@ -23,8 +23,6 @@ _test_passedn=0
|
||||
_test_failedn=0
|
||||
_test_current_test=""
|
||||
_test_statefile="$(mktemp)"
|
||||
_test_original_pwd=""
|
||||
_test_temp_root=""
|
||||
# Set by each test
|
||||
results_dir="${results_dir:-}"
|
||||
|
||||
@@ -44,23 +42,6 @@ test_debug() {
|
||||
echo -e "${YELLOW}$*${RESET}" >&2
|
||||
}
|
||||
|
||||
create_test_root() {
|
||||
_test_original_pwd="$(pwd)"
|
||||
_test_temp_root="$(mktemp -d)"
|
||||
cd "$_test_temp_root"
|
||||
}
|
||||
|
||||
cleanup_test_root() {
|
||||
if [ -n "$_test_original_pwd" ]; then
|
||||
cd "$_test_original_pwd"
|
||||
fi
|
||||
if [ -n "$_test_temp_root" ] && [ -d "$_test_temp_root" ]; then
|
||||
rm -rf "$_test_temp_root"
|
||||
fi
|
||||
_test_original_pwd=""
|
||||
_test_temp_root=""
|
||||
}
|
||||
|
||||
assert_strequal() {
|
||||
# $1: first string
|
||||
# $2: second string
|
||||
@@ -106,71 +87,6 @@ assert_unset() {
|
||||
test_log " ✅ \$$1 is unset"
|
||||
}
|
||||
|
||||
assert_exists() {
|
||||
# $1: filename to test
|
||||
if [ -z "$1" ]; then
|
||||
test_log "ERROR: assert_exists: not enough arguments given"
|
||||
exit 1
|
||||
fi
|
||||
if ! [ -e "$1" ]; then
|
||||
_test_assert_failed="\$$1 should exist but does not"
|
||||
test_log " ❌ $_test_assert_failed"
|
||||
return
|
||||
fi
|
||||
test_log " ✅ \$$1 exists"
|
||||
}
|
||||
|
||||
assert_not_exists() {
|
||||
if [ -z "$1" ]; then
|
||||
test_log "ERROR: assert_not_exists: not enough arguments given"
|
||||
exit 1
|
||||
fi
|
||||
if [ -e "$1" ]; then
|
||||
_test_assert_failed="\$$1 should NOT exist but does"
|
||||
test_log " ❌ $_test_assert_failed"
|
||||
return
|
||||
fi
|
||||
test_log " ✅ \$$1 does not exist"
|
||||
}
|
||||
|
||||
assert_contains() {
|
||||
# $1: string to search in
|
||||
# $2: substring to find
|
||||
if [ -z "$1" ] || [ -z "$2" ]; then
|
||||
test_log "ERROR: assert_contains: not enough arguments given"
|
||||
exit 1
|
||||
fi
|
||||
case "$1" in
|
||||
*"$2"*)
|
||||
test_log " ✅ '$2' found in '$1'"
|
||||
;;
|
||||
*)
|
||||
_test_assert_failed="'$2' not found in '$1'"
|
||||
test_log " ❌ $_test_assert_failed"
|
||||
return
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
assert_not_contains() {
|
||||
# $1: string to search in
|
||||
# $2: substring that should not be found
|
||||
if [ -z "$1" ] || [ -z "$2" ]; then
|
||||
test_log "ERROR: assert_not_contains: not enough arguments given"
|
||||
exit 1
|
||||
fi
|
||||
case "$1" in
|
||||
*"$2"*)
|
||||
_test_assert_failed="'$2' found in '$1' but should not be"
|
||||
test_log " ❌ $_test_assert_failed"
|
||||
return
|
||||
;;
|
||||
*)
|
||||
test_log " ✅ '$2' not found in '$1'"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Log some expression and evaluate it
|
||||
logeval() {
|
||||
eval "$*"
|
||||
|
||||
@@ -8,6 +8,7 @@ import sys
|
||||
import common
|
||||
|
||||
# pmbootstrap
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.core
|
||||
from pmb.core.context import get_context
|
||||
|
||||
@@ -25,6 +26,7 @@ def verify_checksums(packages):
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Get and print modified packages
|
||||
common.add_upstream_git_remote()
|
||||
packages = common.get_changed_packages()
|
||||
|
||||
# Load context
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
# Description: static type checking for python scripts
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
apk -q add py3-argcomplete py3-pip py3-pytest
|
||||
exec su "${TESTUSER:-build}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
pip install --break-system-packages --no-warn-script-location mypy
|
||||
# Need to change directory for pyproject.toml to be picked up.
|
||||
cd .ci
|
||||
python -m mypy .
|
||||
@@ -1,2 +0,0 @@
|
||||
[tool.mypy]
|
||||
disable_error_code = ["import-not-found"]
|
||||
+15
-5
@@ -3,12 +3,12 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Description: lint with various python tests
|
||||
# Options: native
|
||||
# Use 'native' because it requires running pmbootstrap.
|
||||
# Use 'native' because it requires pmbootstrap.
|
||||
# https://postmarketos.org/pmb-ci
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/main/install_pmbootstrap.sh"
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh pytest
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
fi
|
||||
@@ -26,7 +26,17 @@ pmbootstrap work_migrate
|
||||
pmbootstrap config aports "$pmaports"
|
||||
pmbootstrap -q shutdown
|
||||
|
||||
# Needed to import "common"
|
||||
export PYTHONPATH="$PYTHONPATH:.ci/lib"
|
||||
# Make sure we have a valid device (pmbootstrap#1128)
|
||||
device="$(pmbootstrap config device)"
|
||||
deviceinfo="$pmaports/device/*/device-$device/deviceinfo"
|
||||
# shellcheck disable=SC2086
|
||||
if ! [ -e $deviceinfo ]; then
|
||||
echo "ERROR: Could not find deviceinfo file for selected device '$device'."
|
||||
echo "Expected path: $deviceinfo"
|
||||
echo "Maybe you have switched to a branch where your device does not exist?"
|
||||
echo "Use 'pmbootstrap config device qemu-amd64' to switch to a valid device."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run testcases
|
||||
pytest -vv --tb=native "$pmaports/.ci/testcases" "$@"
|
||||
pytest -vv -x --tb=native "$pmaports/.ci/testcases" "$@"
|
||||
+1
-1
@@ -11,4 +11,4 @@ fi
|
||||
set -x
|
||||
|
||||
# shellcheck disable=SC2046
|
||||
ruff check $(find .ci -name '*.py')
|
||||
ruff check --ignore E501,F401,E722,W605 $(find .ci -name '*.py')
|
||||
+2
-4
@@ -16,17 +16,14 @@ fi
|
||||
sh_files="
|
||||
./main/mdss-fb-init-hack/mdss-fb-init-hack.sh
|
||||
./main/postmarketos-base-ui/rootfs-usr-lib-NetworkManager-dispatcher.d-50-dns-filter.sh
|
||||
./main/postmarketos-base-ui/rootfs-usr-lib-NetworkManager-dispatcher.d-50-tethering.sh
|
||||
./main/postmarketos-installkernel/installkernel-pmos
|
||||
./main/postmarketos-initramfs/init.sh
|
||||
./main/postmarketos-initramfs/init_functions.sh
|
||||
./main/postmarketos-mkinitfs-hook-netboot/netboot.sh
|
||||
./main/postmarketos-ui-os-installer/rootfs-usr-bin-pmos_setup.sh
|
||||
./main/postmarketos-usb-moded/rootfs-usr-lib-systemd-system-generators-umtprd-config-generator
|
||||
./main/ttyescape/*.post-install
|
||||
./main/unl0kr/unlock.sh
|
||||
./device/community/soc-qcom/call_audio_idle_suspend_workaround.sh
|
||||
./device/testing/device-apple-mac-aarch64/*.sh
|
||||
./extra-repos/systemd/postmarketos-base-systemd/rootfs-usr-libexec-systemd-apk-trigger
|
||||
|
||||
$(find . -path './main/postmarketos-ui-*/*.sh')
|
||||
$(find . -path './main/postmarketos-ui-*/*.pre-install')
|
||||
@@ -38,6 +35,7 @@ sh_files="
|
||||
|
||||
$(find . -name '*.trigger')
|
||||
$(find . -path './main/devicepkg-dev/*.sh')
|
||||
$(find . -path './main/postmarketos-mvcfg/*.sh')
|
||||
|
||||
$(find . -path './.ci/**.sh')
|
||||
$(find . -path '**/tests/*.sh')
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import shutil
|
||||
import sys
|
||||
import os
|
||||
import importlib
|
||||
import importlib.util
|
||||
from site import getsitepackages
|
||||
|
||||
|
||||
def path_pmbootstrap():
|
||||
""" Find the pmbootstrap installation folder, so we can import the Python
|
||||
code from there.
|
||||
returns: pmbootstrap installation folder
|
||||
"""
|
||||
# This variable is set by pmbootstrap 1.52 and later
|
||||
# If it's undefined, try to find 'pmbootstrap' in path
|
||||
bin = os.environ.get("PMBOOTSTRAP_CMD") or shutil.which("pmbootstrap")
|
||||
|
||||
if not bin:
|
||||
print("ERROR: 'pmbootstrap' not found in $PATH")
|
||||
sys.exit(1)
|
||||
|
||||
# Resolve the symlink and verify the folder
|
||||
directory = os.path.dirname(os.path.realpath(bin))
|
||||
if os.path.exists(directory + "/pmb/__init__.py"):
|
||||
return directory
|
||||
|
||||
directories = getsitepackages()
|
||||
for directory in directories:
|
||||
if os.path.exists(directory + "/pmb/__init__.py"):
|
||||
return directory
|
||||
|
||||
# Symlink not set up properly
|
||||
print("ERROR: unable to find path to pmbootstrap.py. Try setting 'PMBOOTSTRAP_CMD'.")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
# Check if pmb module can be imported
|
||||
if importlib.util.find_spec("pmb") is None:
|
||||
# Add pmbootstrap dir to import path
|
||||
sys.path.append(os.path.realpath(path_pmbootstrap()))
|
||||
@@ -3,11 +3,14 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from pathlib import Path
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
from pmb.helpers.args import init as init_args
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.config
|
||||
from pmb.core.pkgrepo import pkgrepo_default_path
|
||||
import pytest
|
||||
import sys
|
||||
import os
|
||||
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
@@ -24,7 +27,6 @@ def args(request):
|
||||
args.offline = False
|
||||
args.action = "init"
|
||||
args.cross = False
|
||||
args.ccache = False
|
||||
args.log = None
|
||||
|
||||
init_args(args)
|
||||
|
||||
@@ -2,10 +2,16 @@
|
||||
# Copyright 2024 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import fnmatch
|
||||
import glob
|
||||
import os
|
||||
import pytest
|
||||
import sys
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
import pmb.parse._apkbuild
|
||||
from pmb.core.pkgrepo import pkgrepo_default_path, pkgrepo_iglob
|
||||
from pmb.core.pkgrepo import pkgrepo_default_path, pkgrepo_iglob, pkgrepo_relative_path
|
||||
from pmb.core.arch import Arch
|
||||
|
||||
# Don't complain if these nicknames are the only maintainers of an APKBUILD,
|
||||
|
||||
@@ -2,12 +2,33 @@
|
||||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import os
|
||||
import pytest
|
||||
import re
|
||||
import sys
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
from pmb.core.pkgrepo import pkgrepo_iglob
|
||||
|
||||
|
||||
def deviceinfo_obsolete(info):
|
||||
"""
|
||||
Test for obsolete options used in the deviceinfo file. They must still be
|
||||
defined in pmbootstrap's config/__init__.py.
|
||||
"""
|
||||
obsolete_options = [
|
||||
"usb_rndis_function",
|
||||
"weston_pixman_type",
|
||||
]
|
||||
for option in obsolete_options:
|
||||
if getattr(info, option, None):
|
||||
raise RuntimeError(f"option {option} is obsolete, please rename"
|
||||
" or remove it (see reasons for removal of at"
|
||||
" https://postmarketos.org/deviceinfo)")
|
||||
|
||||
|
||||
def test_deviceinfo():
|
||||
"""
|
||||
Parse all deviceinfo files successfully and run checks on the parsed data.
|
||||
@@ -26,10 +47,19 @@ def test_deviceinfo():
|
||||
|
||||
try:
|
||||
for line in lines:
|
||||
# Require space after # for comments
|
||||
if line.startswith("#") and not line.startswith("# "):
|
||||
raise RuntimeError("Comment style: please change '#' to"
|
||||
f" '# ': {line}")
|
||||
|
||||
# Skip empty lines and comments
|
||||
if not line or line.startswith("# "):
|
||||
continue
|
||||
|
||||
# Variable can not be empty
|
||||
if '=""' in line:
|
||||
raise RuntimeError("Please remove the empty variable: " + line)
|
||||
|
||||
# Check line against regex (can't use multiple lines etc.)
|
||||
if not pattern.match(line) or line.endswith("\\\""):
|
||||
raise RuntimeError("Line looks invalid, maybe missing"
|
||||
@@ -38,6 +68,7 @@ def test_deviceinfo():
|
||||
|
||||
# Successful deviceinfo parsing / obsolete options
|
||||
info = pmb.parse.deviceinfo(device)
|
||||
deviceinfo_obsolete(info)
|
||||
|
||||
# deviceinfo_name must start with manufacturer
|
||||
name = info.name
|
||||
|
||||
@@ -46,20 +46,20 @@ def test_executable_files():
|
||||
"m0755` or a variation thereof.")
|
||||
|
||||
|
||||
# Make sure files belong to a package (below a directory with APKBUILD)
|
||||
# Make sure files are either:
|
||||
# - in root directory (README.md)
|
||||
# - hidden (.ci/, device/.shared-patches/)
|
||||
# - or belong to a package (below a directory with APKBUILD)
|
||||
def test_files_belong_to_package():
|
||||
# Walk directories and set package_dir when we find an APKBUILD
|
||||
# This allows matching files in subdirectories to the package directory.
|
||||
package_dir = None
|
||||
for dirpath, dirs, files in os.walk("."):
|
||||
# Skip "hidden" directories (.ci/, device/.shared-patches/)
|
||||
# Skip "hidden" directories
|
||||
dirs[:] = [d for d in dirs if not d.startswith(".")]
|
||||
# Ignore files in root directory (README.md)
|
||||
# Ignore files in root directory
|
||||
if dirpath == '.':
|
||||
continue
|
||||
# Ignore files under docs/
|
||||
if dirpath.startswith('./docs'):
|
||||
continue
|
||||
|
||||
# Switched to another directory?
|
||||
if package_dir and not dirpath.startswith(package_dir + os.sep):
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
# Copyright 2021 Johannes Marbach
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import os
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
from pmb.core.pkgrepo import pkgrepo_iglob
|
||||
from pmb.core.pkgrepo import pkgrepo_default_path, pkgrepo_iglob
|
||||
|
||||
|
||||
def test_aports_firmware():
|
||||
|
||||
@@ -6,8 +6,13 @@
|
||||
version in all packages. We scan all packages, categorize them by URL
|
||||
and then compare the versions of all packages in each category. """
|
||||
|
||||
import glob
|
||||
import logging
|
||||
import os
|
||||
import pytest
|
||||
import sys
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.config
|
||||
import pmb.parse
|
||||
from pmb.core.pkgrepo import pkgrepo_iter_package_dirs
|
||||
|
||||
@@ -2,9 +2,14 @@
|
||||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import glob
|
||||
import pytest
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
from pmb.core.pkgrepo import pkgrepo_iglob, pkgrepo_relative_path
|
||||
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2023 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import glob
|
||||
import logging
|
||||
import os
|
||||
import pytest
|
||||
import sys
|
||||
import re
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
import pmb.parse._apkbuild
|
||||
from pmb.core.pkgrepo import pkgrepo_iter_package_dirs, pkgrepo_relative_path
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
import glob
|
||||
import logging
|
||||
import os
|
||||
import pytest
|
||||
import sys
|
||||
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
import pmb.parse._apkbuild
|
||||
import pmb.parse.apkindex
|
||||
@@ -98,9 +101,6 @@ def test_aports_unreferenced_files():
|
||||
# Skip APKBUILDs and directories
|
||||
if rel_file_path in ["APKBUILD", "gitlab-ci.yml.j2"] or os.path.isdir(file):
|
||||
continue
|
||||
# Skip kernel fragments in linux-* packages
|
||||
if os.path.basename(rel_file_path).endswith(".config") and apkbuild["pkgname"].startswith("linux-"):
|
||||
continue
|
||||
|
||||
if os.path.basename(rel_file_path) not in sources_chk \
|
||||
and rel_file_path not in apkbuild["install"] \
|
||||
|
||||
@@ -2,10 +2,14 @@
|
||||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from pathlib import Path
|
||||
import glob
|
||||
import pytest
|
||||
import sys
|
||||
import os
|
||||
|
||||
import common
|
||||
import add_pmbootstrap_to_import_path
|
||||
import pmb.parse
|
||||
from pmb.core.pkgrepo import pkgrepo_iglob
|
||||
|
||||
|
||||
def test_aports_ui():
|
||||
@@ -13,15 +17,9 @@ def test_aports_ui():
|
||||
Raise an error if package in _pmb_recommends is not found
|
||||
"""
|
||||
pmaports_cfg = pmb.config.pmaports.read_config()
|
||||
|
||||
for arch in pmaports_cfg["supported_arches"].split(","):
|
||||
for path in common.get_changed_files():
|
||||
path = Path(path)
|
||||
|
||||
if path.name != "APKBUILD":
|
||||
continue
|
||||
if not path.parent.name.startswith("postmarketos-ui"):
|
||||
continue
|
||||
|
||||
for path in pkgrepo_iglob("main/postmarketos-ui-*/APKBUILD"):
|
||||
apkbuild = pmb.parse.apkbuild(path)
|
||||
# Skip if arch isn't enabled
|
||||
if not pmb.helpers.package.check_arch(apkbuild["pkgname"], arch, False):
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/main/install_pmbootstrap.sh"
|
||||
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
sh ./install_pmbootstrap.sh
|
||||
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
+1
-3
@@ -7,11 +7,9 @@
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
apk -q add \
|
||||
git \
|
||||
python3
|
||||
exec su "${TESTUSER:-build}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
set -x
|
||||
# shellcheck disable=SC2068
|
||||
.ci/lib/check_devices_in_wiki.py --booting $@
|
||||
.ci/lib/check_devices_in_wiki.py --booting
|
||||
+1
-8
@@ -7,19 +7,12 @@
|
||||
# Top-most EditorConfig file.
|
||||
root = true
|
||||
|
||||
[{**.{ini,sh,rules,nft},**/APKBUILD,CODEOWNERS}]
|
||||
[{**.{md,ini,sh,rules,nft},**/APKBUILD,CODEOWNERS}]
|
||||
indent_style = tab
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[**.md]
|
||||
# No indent_size since space size has meaning in markdown
|
||||
indent_style = space
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
# Forked from Alpine
|
||||
[extra-repos/systemd/networkmanager/networkmanager.rules]
|
||||
indent_style = space
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
#
|
||||
set -eu
|
||||
|
||||
# Maximal allowed size (in bytes) of a file.
|
||||
FILE_SIZE_LIMIT=262144 # 256 kiB
|
||||
|
||||
|
||||
if ! command -v sha512sum >/dev/null; then
|
||||
# macOS / BSDs (?) don't have sha512sum, but shasum.
|
||||
alias sha512sum='shasum -a 512'
|
||||
@@ -91,6 +95,20 @@ check_local_sources() {
|
||||
return $status
|
||||
}
|
||||
|
||||
# Checks if the file ($1) being committed is not bigger than FILE_SIZE_LIMIT.
|
||||
check_file_size() {
|
||||
local path="$1"
|
||||
local size
|
||||
|
||||
size=$(git cat-file -s ":$path")
|
||||
if [ $size -gt $FILE_SIZE_LIMIT ]; then
|
||||
local size_kb=$(( size / 1024 ))
|
||||
|
||||
error "file \"$path\" is quite big ($(( size / 1024 )) kiB), better put a remote url in source="
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
[ -f "$_staged" ] && rm "$_staged"
|
||||
}
|
||||
@@ -104,4 +122,8 @@ for apkbuild in $(changed_files '**/APKBUILD'); do
|
||||
cleanup
|
||||
done
|
||||
|
||||
for path in $(changed_files); do
|
||||
check_file_size "$path"
|
||||
done
|
||||
|
||||
trap - EXIT
|
||||
@@ -49,12 +49,6 @@ case "$lcp" in
|
||||
device/*/*)
|
||||
prefix="$(echo "$lcp" | cut -d/ -f3)"
|
||||
;;
|
||||
docs/*.adoc)
|
||||
prefix="docs/$(basename $lcp .adoc)"
|
||||
;;
|
||||
docs/*)
|
||||
prefix="docs"
|
||||
;;
|
||||
device/*)
|
||||
# Multiple packages touched for same device category. More
|
||||
# logic could be added to detect if they all belong to same
|
||||
|
||||
+2
-3
@@ -65,9 +65,8 @@ instance/
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Documentation
|
||||
public
|
||||
docs/deviceinfo-reference.md
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
+4
-64
@@ -10,23 +10,17 @@ stages:
|
||||
- build
|
||||
- autoupdate
|
||||
- test
|
||||
- deploy
|
||||
variables:
|
||||
# Default of 20 is pretty small, sometimes MRs have >20 commits in them. 100
|
||||
# seems like a reasonable balance. If this is too low, git merge-base (from ci/
|
||||
# common.py) can fail
|
||||
GIT_DEPTH: 100
|
||||
# So that anything that runs install_pmbootstrap and tries to import pmb module
|
||||
# can find it.
|
||||
PYTHONPATH: "/tmp/pmbootstrap"
|
||||
|
||||
# This defines the rules for when a pipeline should run.
|
||||
workflow:
|
||||
rules:
|
||||
# Run for merge requests
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
# Some things have to run in the default branch
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
# Run scheduled pipeline for autoupdate or manually triggered pipeline
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"
|
||||
|
||||
@@ -62,18 +56,6 @@ ruff:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/ruff.sh
|
||||
|
||||
# testcases typechecking
|
||||
mypy:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: *mr_rule
|
||||
changes:
|
||||
- .ci/**/*
|
||||
- .gitlab-ci.yml
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/mypy.sh
|
||||
|
||||
# shellcheck and various grep checks
|
||||
shellcheck-grep:
|
||||
stage: lint
|
||||
@@ -100,7 +82,7 @@ pytest-commits:
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/pytest.sh
|
||||
- .ci/check-changed-versions.sh
|
||||
- .ci/commits.sh
|
||||
artifacts:
|
||||
when: on_failure
|
||||
paths:
|
||||
@@ -119,22 +101,6 @@ aport-lint:
|
||||
- .ci/apkbuild-lint.sh
|
||||
allow_failure: true
|
||||
|
||||
# deviceinfo linting
|
||||
dint:
|
||||
stage: lint
|
||||
rules:
|
||||
- if: *mr_rule
|
||||
changes:
|
||||
- .ci/**/*
|
||||
- .gitlab-ci.yml
|
||||
- device/*/device-*/deviceinfo
|
||||
script:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/dint.sh
|
||||
allow_failure:
|
||||
exit_codes:
|
||||
- 2 # returned by dint on non-fatal warning
|
||||
|
||||
# kernel kconfig check
|
||||
kernel-kconfig:
|
||||
stage: lint
|
||||
@@ -168,7 +134,7 @@ mr-settings:
|
||||
before_script:
|
||||
- apk -q add python3
|
||||
script:
|
||||
- wget -q "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/main/check_mr_settings.py"
|
||||
- wget -q "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/check_mr_settings.py"
|
||||
- python3 ./check_mr_settings.py
|
||||
|
||||
# Calculate build of changed aports using a dynamic downstream pipelines:
|
||||
@@ -187,13 +153,13 @@ generate-build-jobs:
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
needs: []
|
||||
script:
|
||||
- wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/main/install_pmbootstrap.sh"
|
||||
- wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
- sh ./install_pmbootstrap.sh py3-jinja2
|
||||
|
||||
# HACK: Make the pmb library happy to use the currently-cloned pmaports repo
|
||||
- mkdir -p /root/.local/var/pmbootstrap/cache_git/ && ln -s $PWD /root/.local/var/pmbootstrap/cache_git/pmaports
|
||||
|
||||
- .ci/lib/generate_build_jobs.py
|
||||
- PYTHONPATH=/tmp/pmbootstrap/ .ci/lib/generate_build_jobs.py .ci/build-jobs.yaml.j2 .ci/build-jobs.yaml
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
@@ -214,32 +180,6 @@ build-jobs:
|
||||
rules:
|
||||
- if: *mr_rule
|
||||
|
||||
build-docs:
|
||||
stage: build
|
||||
before_script:
|
||||
- adduser -D build
|
||||
script:
|
||||
- .ci/build-docs.sh
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
changes:
|
||||
- .ci/build-docs.sh
|
||||
- deviceinfo_schema.toml
|
||||
- docs/**
|
||||
|
||||
deploy-docs:
|
||||
stage: deploy
|
||||
trigger:
|
||||
project: postmarketOS/docs.postmarketos.org
|
||||
strategy: depend
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_NAMESPACE == "postmarketOS"
|
||||
changes:
|
||||
- deviceinfo_schema.toml
|
||||
- docs/**
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule"
|
||||
when: never
|
||||
|
||||
auto-update:
|
||||
stage: autoupdate
|
||||
rules:
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
Replace space inside `[ ]` with `x` to fill the checkbox
|
||||
-->
|
||||
* [ ] edge (`master` branch)
|
||||
* [ ] `v25.12`
|
||||
* [ ] `v25.06`
|
||||
|
||||
* [ ] I confirm that the issue still is present after running `sudo apk upgrade -a`
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<!-- Use this template to kick off the discussion for a package with (presumably)
|
||||
inactive maintainers and the future for the maintainership of the package.
|
||||
-->
|
||||
|
||||
### Information
|
||||
|
||||
* Package name:
|
||||
* Maintainers of the package:
|
||||
* MR that had no maintainer response, if applicable:
|
||||
|
||||
/label ~maintainership-status
|
||||
@@ -1,5 +1,3 @@
|
||||
Casey Connolly <casey.connolly@linaro.org> <caleb.connolly@linaro.org>
|
||||
Casey Connolly <kcxt@postmarketos.org> <caleb@postmarketos.org>
|
||||
Achill Gilgenast <achill@achill.org> <fossdd@pwned.life>
|
||||
Aelin <aelin@postmarketos.org> <adrian@postmarketos.org>
|
||||
Aelin <aelin@postmarketos.org> <adrian@travitia.xyz>
|
||||
+7
-7
@@ -31,16 +31,16 @@ subfolders of the device directory. As such, commits changing
|
||||
packages inside of the device directory should omit the directory
|
||||
prefix, for example:
|
||||
|
||||
device-pine64-pinephone: description of change
|
||||
device-pine64-pinephone: description of change
|
||||
|
||||
Or:
|
||||
|
||||
soc-qcom-msm8996: description of change
|
||||
soc-qcom-msm8996: description of change
|
||||
|
||||
If the commit only makes device-specific changes, the
|
||||
commit title can opt to use the following format:
|
||||
|
||||
manufacturer-codename: description of change
|
||||
manufacturer-codename: description of change
|
||||
|
||||
### Changes to packages inside of the systemd directory
|
||||
|
||||
@@ -48,12 +48,12 @@ We also shorten the prefixes for packages in `extra-repos/systemd`.
|
||||
When the `systemd` package itself gets changed, use `systemd: ` as
|
||||
prefix. For example:
|
||||
|
||||
systemd: add triggers for reloading/restarting services
|
||||
systemd: add triggers for reloading/restarting services
|
||||
|
||||
When another package inside the systemd directory gets changed, use
|
||||
`systemd/$pkgname: ` as prefix. For example:
|
||||
|
||||
systemd/cups: restart on upgrade
|
||||
systemd/cups: restart on upgrade
|
||||
|
||||
### Moving devices between categories
|
||||
|
||||
@@ -61,11 +61,11 @@ As we do not include directory prefixes in device-related commits,
|
||||
Alpine's commit style for moving packages does not apply. Instead,
|
||||
we do the following:
|
||||
|
||||
manufacturer-codename: move from category to category
|
||||
manufacturer-codename: move from category to category
|
||||
|
||||
For example:
|
||||
|
||||
samsung-m0: move from testing to community
|
||||
samsung-m0: move from testing to community
|
||||
|
||||
## Additions
|
||||
|
||||
|
||||
@@ -7,17 +7,7 @@ There are many more packages defined in the [Alpine Linux aports](https://gitlab
|
||||
Helpful resources:
|
||||
* [How to create a package](https://wiki.postmarketos.org/wiki/Create_a_package)
|
||||
* [APKBUILD reference](https://wiki.alpinelinux.org/wiki/APKBUILD_Reference)
|
||||
* [pmaports commit style](./COMMITSTYLE.md)
|
||||
* [Review and merging guidelines](./docs/modules/ROOT/pages/merging-rules.adoc)
|
||||
* [Alpine Linux aports](https://gitlab.alpinelinux.org/alpine/aports/)
|
||||
* [Alpine Linux package search](https://pkgs.alpinelinux.org/packages)
|
||||
* [postmarketOS package search](https://pkgs.postmarketos.org/packages)
|
||||
|
||||
## Git Hooks
|
||||
|
||||
You can find some useful git hooks in the `.githooks` directory.
|
||||
To use them, run the following command after cloning this repository:
|
||||
|
||||
```sh
|
||||
git config --local core.hooksPath .githooks
|
||||
```
|
||||
* [postmarketOS commit style](./COMMITSTYLE.md)
|
||||
+2
-8
@@ -4,18 +4,12 @@ recommended=edge
|
||||
|
||||
[edge]
|
||||
description=Rolling release / Most devices / Occasional breakage: https://postmarketos.org/edge
|
||||
branch_pmaports=main
|
||||
branch_pmaports=master
|
||||
branch_aports=master
|
||||
mirrordir_alpine=edge
|
||||
|
||||
[v25.12]
|
||||
description=Latest release / Recommended for best stability
|
||||
branch_pmaports=v25.12
|
||||
branch_aports=3.23-stable
|
||||
mirrordir_alpine=v3.23
|
||||
|
||||
[v25.06]
|
||||
description=Old release (unsupported)
|
||||
description=Latest release / Recommended for best stability
|
||||
branch_pmaports=v25.06
|
||||
branch_aports=3.22-stable
|
||||
mirrordir_alpine=v3.22
|
||||
|
||||
+6
-12
@@ -1,21 +1,15 @@
|
||||
cross-gcc-tests:
|
||||
extends: .package-test
|
||||
tags: [qemu]
|
||||
before_script:
|
||||
- wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/main/install_pmbootstrap.sh"
|
||||
- wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
|
||||
- sh ./install_pmbootstrap.sh
|
||||
script:
|
||||
- su pmos -c "pmbootstrap build gcc-aarch64"
|
||||
- su pmos -c "pmbootstrap build --arch=aarch64 hello-world --force"
|
||||
- su pmos -c "pmbootstrap build --arch=aarch64 iskey --force"
|
||||
- su pmos -c "pmbootstrap build --arch=aarch64 pbsplash --force"
|
||||
- su pmos -c "pmbootstrap build --arch=aarch64 gcc-x86_64"
|
||||
- su pmos -c "pmbootstrap --details-to-stdout build gcc-aarch64"
|
||||
- su pmos -c "pmbootstrap --details-to-stdout build --arch=aarch64 hello-world"
|
||||
- su pmos -c "pmbootstrap --details-to-stdout build --arch=aarch64 iskey"
|
||||
- su pmos -c "pmbootstrap --details-to-stdout build --arch=aarch64 pbsplash"
|
||||
- su pmos -c "pmbootstrap --details-to-stdout build --arch=aarch64 gcc-x86_64"
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
changes:
|
||||
- cross/gcc-x86_64/APKBUILD
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
- log.txt
|
||||
expire_in: 1 week
|
||||
@@ -4,7 +4,7 @@
|
||||
# armhf chroot to /usr/bin/gcc. That way compilation works fine, even
|
||||
# when distcc gets the absolute path to the compiler passed (ccache does
|
||||
# that).
|
||||
maintainer=""
|
||||
|
||||
pkgname=arch-bin-masquerade
|
||||
pkgver=2
|
||||
pkgrel=0
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen busybox-static-aarch64
|
||||
|
||||
# Stub for apkbuild-lint
|
||||
if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
arch_to_hostspec() { :; }
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-aarch64
|
||||
pkgver=1.37.0
|
||||
pkgrel=22
|
||||
|
||||
_arch="aarch64"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
|
||||
url="http://busybox.net"
|
||||
license="GPL2"
|
||||
arch="x86_64"
|
||||
options="!check !strip"
|
||||
pkgdesc="Statically linked Busybox for $_arch"
|
||||
_target="$(arch_to_hostspec $_arch)"
|
||||
|
||||
source="
|
||||
busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk::$_mirror/edge/main/$_arch/busybox-static-$pkgver-r$pkgrel.apk
|
||||
"
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir/usr/$_target"
|
||||
cd "$pkgdir/usr/$_target"
|
||||
tar -xf $srcdir/busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk
|
||||
rm .PKGINFO .SIGN.*
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
9ab4cc4a70e7fb124c09860cc783ecfdda13af0b1acc726704dbfd0af5c5302b3cfdbee55cacaa4deb5a367afab3e67d9dea54fcb1fd1c5de77a12cc7cf862da busybox-static-1.37.0-r22-aarch64-edge.apk
|
||||
"
|
||||
@@ -0,0 +1,36 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen busybox-static-armhf
|
||||
|
||||
# Stub for apkbuild-lint
|
||||
if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
arch_to_hostspec() { :; }
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armhf
|
||||
pkgver=1.37.0
|
||||
pkgrel=22
|
||||
|
||||
_arch="armhf"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
|
||||
url="http://busybox.net"
|
||||
license="GPL2"
|
||||
arch="x86_64"
|
||||
options="!check !strip"
|
||||
pkgdesc="Statically linked Busybox for $_arch"
|
||||
_target="$(arch_to_hostspec $_arch)"
|
||||
|
||||
source="
|
||||
busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk::$_mirror/edge/main/$_arch/busybox-static-$pkgver-r$pkgrel.apk
|
||||
"
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir/usr/$_target"
|
||||
cd "$pkgdir/usr/$_target"
|
||||
tar -xf $srcdir/busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk
|
||||
rm .PKGINFO .SIGN.*
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
a625d518a850c69079ae16438deffba87c06ab9ac40f1e63b8f02f04b156f5ddb899aa7687b16affac42744f80acdd07e160abeb5b4a5ecd2327f20c1f4933fc busybox-static-1.37.0-r22-armhf-edge.apk
|
||||
"
|
||||
@@ -0,0 +1,36 @@
|
||||
# Automatically generated aport, do not edit!
|
||||
# Generator: pmbootstrap aportgen busybox-static-armv7
|
||||
|
||||
# Stub for apkbuild-lint
|
||||
if [ -z "$(type -t arch_to_hostspec)" ]; then
|
||||
arch_to_hostspec() { :; }
|
||||
fi
|
||||
|
||||
pkgname=busybox-static-armv7
|
||||
pkgver=1.37.0
|
||||
pkgrel=22
|
||||
|
||||
_arch="armv7"
|
||||
_mirror="http://dl-4.alpinelinux.org/alpine/"
|
||||
|
||||
url="http://busybox.net"
|
||||
license="GPL2"
|
||||
arch="x86_64"
|
||||
options="!check !strip"
|
||||
pkgdesc="Statically linked Busybox for $_arch"
|
||||
_target="$(arch_to_hostspec $_arch)"
|
||||
|
||||
source="
|
||||
busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk::$_mirror/edge/main/$_arch/busybox-static-$pkgver-r$pkgrel.apk
|
||||
"
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir/usr/$_target"
|
||||
cd "$pkgdir/usr/$_target"
|
||||
tar -xf $srcdir/busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk
|
||||
rm .PKGINFO .SIGN.*
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
875b7267c85f551338d0bf6123421cfa374ad6cfbdda596a580e426d1e99bc45a127d92191dcd84b0fc2e851e6e73949f5281307a2f4948345d22ef7a5a856e4 busybox-static-1.37.0-r22-armv7-edge.apk
|
||||
"
|
||||
@@ -2,10 +2,10 @@
|
||||
# compiling packages in the native chroot (e.g. kernel packages), the
|
||||
# cross-compiler does not get called directly, but wrapped through
|
||||
# ccache, which can then cache the results.
|
||||
maintainer=""
|
||||
|
||||
pkgname=ccache-cross-symlinks
|
||||
pkgver=3
|
||||
pkgrel=3
|
||||
pkgrel=2
|
||||
pkgdesc="Enable ccache for cross-compilers with symlinks"
|
||||
url="https://ccache.samba.org/"
|
||||
arch="noarch"
|
||||
@@ -15,7 +15,7 @@ options="!check"
|
||||
|
||||
package() {
|
||||
# Keep in sync with pmb.config.build_device_architectures
|
||||
local _archs="armhf armv7 aarch64 x86_64 x86 riscv64 ppc64le loongarch64"
|
||||
local _archs="armhf armv7 aarch64 x86_64 x86 riscv64 ppc64le"
|
||||
|
||||
local _bins="c++ cc cpp g++ gcc clang clang++"
|
||||
mkdir -p "$pkgdir/usr/lib/ccache/bin"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
|
||||
# https://docs.postmarketos.org/pmbootstrap/cross_compiling.html
|
||||
#
|
||||
# Wrapper for the "crossdirect" compilation method.
|
||||
@@ -17,9 +18,9 @@
|
||||
# chroot. See crossdirect.c for implementation details of the C version (llvm,
|
||||
# fakeroot, rpath). The rust version and redirect for archivers are implemented
|
||||
# as simple shell wrappers.
|
||||
maintainer="Oliver Smith <ollieparanoid@postmarketos.org>"
|
||||
|
||||
pkgname=crossdirect
|
||||
pkgver=5.3.1
|
||||
pkgver=5.3.0
|
||||
pkgrel=1
|
||||
pkgdesc="Wrappers to launch native programs (e.g. cross compilers) in foreign chroots"
|
||||
url="https://postmarketOS.org"
|
||||
@@ -37,7 +38,7 @@ source="
|
||||
build() {
|
||||
cd "$srcdir"
|
||||
# Architectures and binaries
|
||||
_archs="x86_64 armhf armv7 aarch64 loongarch64 ppc64le riscv64"
|
||||
_archs="x86_64 armhf armv7 aarch64 ppc64le riscv64"
|
||||
for _arch in $_archs; do
|
||||
[ "$_arch" == "$CARCH" ] && continue
|
||||
_hostspec="$(arch_to_hostspec $_arch)"
|
||||
@@ -58,7 +59,6 @@ package() {
|
||||
aarch64
|
||||
armhf
|
||||
armv7
|
||||
loongarch64
|
||||
ppc64le
|
||||
riscv64
|
||||
x86_64
|
||||
@@ -128,7 +128,7 @@ package() {
|
||||
sha512sums="
|
||||
0f4b48f250425dc57f63955fc8b38477d23db793bee367c3fbe03c3d2a559ba576434d07518310db4cae9d90d501af4051b80038b10fae94b980e537fc9374ad cargo.sh
|
||||
b2e602b7fc95ed403d29f0d754879d5f773c39ee33e726bb10cff17b3c088406dac84f2ca6d8ad563c64370007d98af805d6ee9cd4a06fe3d4c61c0cb90c5c0c crossdirect.c
|
||||
73e2b5d2d8ef7c6002b3a787d14945586991493b8d81f59e5c0beda0d3b290543e1fdc6f288da726c5dd121c0861d2a894410b7b749a537df0df5b409e102330 exec_native.sh
|
||||
a87d91b6e3286ce29fb1f487954e7154f282194691a1bf19b4cd80cca07a9c36aa96306883b1a6671ffbc2b503575a8c9484dccde8c55431845056c6f377bec5 exec_native.sh
|
||||
ea9bf8db3810d03d0a7395057f3d6e57f7127d87c55deaedc171c255288f5f3cc6fbcc680a5a1b92786cf573875d5dc22521173799fe2639acc97d0715ff905b rust-qemu-linker.sh
|
||||
de2aa6929bbff5db9132673e667f4525b333d062cb1f7a0597dd924de9e5c7215a9f8e2e6263b6fb5ace06f2c4b64f4ebfd0ede9b78add07c2cd08ec8613e98f rustc.sh
|
||||
"
|
||||
@@ -1,20 +1,12 @@
|
||||
#!/bin/sh -e
|
||||
# Execute the binary from the native chroot if it is installed there. This is
|
||||
# done for archiver tools such as unxz, so they don't need to go through QEMU.
|
||||
BASENAME="$(basename "$0")"
|
||||
|
||||
if [ -n "$LD_PRELOAD" ]; then
|
||||
# The archiver tool gets called during package(), which abuild runs
|
||||
# with libfakeroot.so. Some packages do this, like bootchart2, which
|
||||
# compresses man pages in its "make install". We can't run the native
|
||||
# binary here due to the LD_PRELOAD, so run the foreign arch one.
|
||||
export PATH="/usr/bin:/usr/sbin:/sbin:/bin"
|
||||
exec "$BASENAME" "$@"
|
||||
fi
|
||||
|
||||
# Try /native first, then the foreign arch paths. Never try
|
||||
# /native/usr/lib/crossdirect as this would result in a loop.
|
||||
UNWRAPPED_PATH="/native/usr/bin:/native/usr/sbin:/native/sbin:/native/bin:/usr/bin:/usr/sbin:/sbin:/bin"
|
||||
|
||||
BASENAME="$(basename "$0")"
|
||||
UNWRAPPED_BIN="$(PATH="$UNWRAPPED_PATH" command -v "$BASENAME")"
|
||||
|
||||
case "$UNWRAPPED_BIN" in
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
From 824eae920f0f64dd7687c969a2436b129161fdc9 Mon Sep 17 00:00:00 2001
|
||||
From: Jinyang He <hejinyang@loongson.cn>
|
||||
Date: Wed, 29 Oct 2025 16:07:35 +0800
|
||||
Subject: [PATCH] LoongArch: Only allow valid binary op when optimize
|
||||
conditional move
|
||||
|
||||
It is wrong that optimize from `if (cond) dest op= 1 << shift` to
|
||||
`dest op= (cond ? 1 : 0) << shift` when `dest op 0 != dest`.
|
||||
Like `and`, `mul` or `div`.
|
||||
And in this optimization `mul` and `div` is optimized to shift.
|
||||
|
||||
gcc/ChangeLog:
|
||||
|
||||
* config/loongarch/loongarch.cc
|
||||
(loongarch_expand_conditional_move): Only allow valid binary
|
||||
op when optimize conditional move.
|
||||
|
||||
gcc/testsuite/ChangeLog:
|
||||
|
||||
* gcc.target/loongarch/conditional-move-opt-1.c: Remove mul.
|
||||
* gcc.target/loongarch/conditional-move-opt-2.c: Remove and.
|
||||
* gcc.target/loongarch/conditional-move-opt-3.c: New test.
|
||||
|
||||
Co-Authored-By: Peng Fan <fanpeng@loongson.cn>
|
||||
---
|
||||
gcc/config/loongarch/loongarch.cc | 26 ++++++++++++++++---
|
||||
.../loongarch/conditional-move-opt-1.c | 4 +--
|
||||
.../loongarch/conditional-move-opt-2.c | 2 +-
|
||||
.../loongarch/conditional-move-opt-3.c | 14 ++++++++++
|
||||
4 files changed, 40 insertions(+), 6 deletions(-)
|
||||
create mode 100644 gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
|
||||
|
||||
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
|
||||
index bdf290654..740c8611a 100644
|
||||
--- a/gcc/config/loongarch/loongarch.cc
|
||||
+++ b/gcc/config/loongarch/loongarch.cc
|
||||
@@ -5533,12 +5533,32 @@ loongarch_expand_conditional_move (rtx *operands)
|
||||
}
|
||||
}
|
||||
|
||||
+ auto is_binary_op_0_keep_orig = [](enum rtx_code code)
|
||||
+ {
|
||||
+ switch (code)
|
||||
+ {
|
||||
+ case PLUS:
|
||||
+ case MINUS:
|
||||
+ case IOR:
|
||||
+ case XOR:
|
||||
+ case ROTATE:
|
||||
+ case ROTATERT:
|
||||
+ case ASHIFT:
|
||||
+ case ASHIFTRT:
|
||||
+ case LSHIFTRT:
|
||||
+ return true;
|
||||
+ default:
|
||||
+ return false;
|
||||
+ }
|
||||
+ };
|
||||
+
|
||||
/* Check if the optimization conditions are met. */
|
||||
if (value_if_true_insn
|
||||
&& value_if_false_insn
|
||||
- /* Make sure that value_if_false and var are the same. */
|
||||
- && BINARY_P (value_if_true_insn_src
|
||||
- = SET_SRC (single_set (value_if_true_insn)))
|
||||
+ /* Make sure that the orig value OP 0 keep orig. */
|
||||
+ && (value_if_true_insn_src
|
||||
+ = SET_SRC (single_set (value_if_true_insn)))
|
||||
+ && is_binary_op_0_keep_orig ( GET_CODE (value_if_true_insn_src))
|
||||
/* Make sure that both value_if_true and value_if_false
|
||||
has the same var. */
|
||||
&& rtx_equal_p (XEXP (value_if_true_insn_src, 0),
|
||||
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
|
||||
index ed13471aa..47802aa96 100644
|
||||
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
|
||||
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
|
||||
@@ -27,7 +27,7 @@ void
|
||||
test_lt ()
|
||||
{
|
||||
if (lm < ln)
|
||||
- lr *= (1 << 16);
|
||||
+ lr += (1 << 16);
|
||||
lr += lm;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ void
|
||||
test_le ()
|
||||
{
|
||||
if (lm <= ln)
|
||||
- lr = lm * ((long)1 << 32);
|
||||
+ lr = lm + ((long)1 << 32);
|
||||
else
|
||||
lr = lm;
|
||||
lr += lm;
|
||||
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
|
||||
index ac72d4d93..743fd5e67 100644
|
||||
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
|
||||
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
|
||||
@@ -29,7 +29,7 @@ void
|
||||
test_lez ()
|
||||
{
|
||||
if (lm <= 0)
|
||||
- lr &= (1 << 16);
|
||||
+ lr |= (1 << 16);
|
||||
lr += lm;
|
||||
}
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
|
||||
new file mode 100644
|
||||
index 000000000..95887980c
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
|
||||
@@ -0,0 +1,14 @@
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2" } */
|
||||
+/* { dg-final { scan-assembler "maskeqz" } } */
|
||||
+/* { dg-final { scan-assembler "masknez" } } */
|
||||
+
|
||||
+extern long lm, ln, lr;
|
||||
+
|
||||
+void
|
||||
+test_and ()
|
||||
+{
|
||||
+ if (lm < 0)
|
||||
+ lr &= (1 << 16);
|
||||
+ lr += lm;
|
||||
+}
|
||||
--
|
||||
2.51.1
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
From 21b7d08714c4964403848db4144003835ff5245a Mon Sep 17 00:00:00 2001
|
||||
From: Linsen Zhou <i@lin.moe>
|
||||
Date: Fri, 17 Oct 2025 11:05:04 +0800
|
||||
Subject: [PATCH] tree-object-size.cc: Fix assert constant offset in
|
||||
check_for_plus_in_loops [PR122012]
|
||||
|
||||
After commit 51b85dfeb19652bf3e0aaec08828ba7cee1e641c, when the
|
||||
pointer offset is a variable in the loop, the object size of the
|
||||
pointer may also need to be reexamined.
|
||||
Which make gcc_assert in the check_for_plus_in_loops failed.
|
||||
|
||||
gcc/ChangeLog:
|
||||
|
||||
PR tree-optimization/122012
|
||||
* tree-object-size.cc (check_for_plus_in_loops): Skip check
|
||||
for the variable offset
|
||||
|
||||
gcc/testsuite/ChangeLog:
|
||||
|
||||
PR tree-optimization/122012
|
||||
* gcc.dg/torture/pr122012.c: New test.
|
||||
|
||||
Signed-off-by: Linsen Zhou <i@lin.moe>
|
||||
(cherry picked from commit 82cefc4898d4ccabe76e28d6626b91ca9e998923)
|
||||
---
|
||||
gcc/testsuite/gcc.dg/torture/pr122012.c | 18 ++++++++++++++++++
|
||||
gcc/tree-object-size.cc | 7 +++----
|
||||
2 files changed, 21 insertions(+), 4 deletions(-)
|
||||
create mode 100644 gcc/testsuite/gcc.dg/torture/pr122012.c
|
||||
|
||||
diff --git a/gcc/testsuite/gcc.dg/torture/pr122012.c b/gcc/testsuite/gcc.dg/torture/pr122012.c
|
||||
new file mode 100644
|
||||
index 00000000000..055915a1e98
|
||||
--- /dev/null
|
||||
+++ b/gcc/testsuite/gcc.dg/torture/pr122012.c
|
||||
@@ -0,0 +1,18 @@
|
||||
+/* { dg-do compile } */
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+void foo();
|
||||
+
|
||||
+void test(size_t step) {
|
||||
+ char *buf = malloc(64);
|
||||
+ char *p = buf;
|
||||
+ size_t i;
|
||||
+
|
||||
+ for(i = 0; i < 64; ++i) {
|
||||
+ p += 4;
|
||||
+ if (__builtin_object_size (p, 2) != 0)
|
||||
+ foo();
|
||||
+ p += step;
|
||||
+ }
|
||||
+ free(buf);
|
||||
+}
|
||||
diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc
|
||||
index 2d13ab79a84..76dc2446059 100644
|
||||
--- a/gcc/tree-object-size.cc
|
||||
+++ b/gcc/tree-object-size.cc
|
||||
@@ -2153,12 +2153,11 @@ check_for_plus_in_loops (struct object_size_info *osi, tree var)
|
||||
&& gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR)
|
||||
{
|
||||
tree basevar = gimple_assign_rhs1 (stmt);
|
||||
- tree cst = gimple_assign_rhs2 (stmt);
|
||||
-
|
||||
- gcc_assert (TREE_CODE (cst) == INTEGER_CST);
|
||||
+ tree offset = gimple_assign_rhs2 (stmt);
|
||||
|
||||
/* Skip non-positive offsets. */
|
||||
- if (integer_zerop (cst) || compare_tree_int (cst, offset_limit) > 0)
|
||||
+ if (TREE_CODE (offset) != INTEGER_CST
|
||||
+ || integer_zerop (offset) || compare_tree_int (offset, offset_limit) > 0)
|
||||
return;
|
||||
|
||||
osi->depths[SSA_NAME_VERSION (basevar)] = 1;
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 95d8fac6247b2cba1142261cc95c21063539112a Mon Sep 17 00:00:00 2001
|
||||
From a59da582e83071de0566274d912ca6f05f4b75d0 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:46:56 +0000
|
||||
Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
|
||||
@@ -12,7 +12,6 @@ Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
|
||||
gcc/config/i386/gnu-user.h | 2 +-
|
||||
gcc/config/i386/gnu-user64.h | 1 +
|
||||
gcc/config/ia64/linux.h | 2 +-
|
||||
gcc/config/loongarch/gnu-user.h | 2 +-
|
||||
gcc/config/mips/gnu-user.h | 1 +
|
||||
gcc/config/riscv/linux.h | 1 +
|
||||
gcc/config/rs6000/linux64.h | 4 ++--
|
||||
@@ -20,7 +19,7 @@ Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
|
||||
gcc/config/s390/linux.h | 2 +-
|
||||
gcc/config/sparc/linux.h | 2 +-
|
||||
gcc/gcc.cc | 28 ++++++++++++++++++++--------
|
||||
15 files changed, 37 insertions(+), 20 deletions(-)
|
||||
14 files changed, 36 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
|
||||
index 116bb4e69f3..daf99f8dce9 100644
|
||||
@@ -125,19 +124,6 @@ index a2494c214c4..e1a5d530cdf 100644
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
diff --git a/gcc/config/loongarch/gnu-user.h b/gcc/config/loongarch/gnu-user.h
|
||||
index fbc75a90ad5..adbc4b7733f 100644
|
||||
--- a/gcc/config/loongarch/gnu-user.h
|
||||
+++ b/gcc/config/loongarch/gnu-user.h
|
||||
@@ -44,7 +44,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
|
||||
#undef GNU_USER_TARGET_LINK_SPEC
|
||||
#define GNU_USER_TARGET_LINK_SPEC \
|
||||
- "%{G*} %{shared} -m " GNU_USER_LINK_EMULATION \
|
||||
+ "%{G*} %{shared} --as-needed -m " GNU_USER_LINK_EMULATION \
|
||||
"%{!shared: %{static} " \
|
||||
"%{!static: %{!static-pie: %{rdynamic:-export-dynamic} " \
|
||||
"-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} " \
|
||||
diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
|
||||
index 5a82508c113..6eee7cdc603 100644
|
||||
--- a/gcc/config/mips/gnu-user.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 58a94690d4dd7b34543d9d154abc96d2d90d3b32 Mon Sep 17 00:00:00 2001
|
||||
From 35c02ea8267e193b92f30495c94ee1e8e5c2be8e Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:47:43 +0000
|
||||
Subject: [PATCH] Enable -Wformat and -Wformat-security by default.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From b2a755b671d88c34402290d7d769232e01aed350 Mon Sep 17 00:00:00 2001
|
||||
From 0b82663fd2f054e07e116c4dcc5019f7e969cd3e Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@ariadne.space>
|
||||
Date: Fri, 25 Jul 2025 01:44:20 -0700
|
||||
Subject: [PATCH] Enable -Wtrampolines by default.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From c355364231395090e7223ec00d8a16065903c2c5 Mon Sep 17 00:00:00 2001
|
||||
From 3acf32fc94fd447874b2f1447a19a65f0905bff5 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@ariadne.space>
|
||||
Date: Fri, 25 Jul 2025 01:49:03 -0700
|
||||
Subject: [PATCH] gcc: disable SSP on -ffreestanding, -nostdlib and
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 5f09842c19d6db976724cd117190a8a6951acf9b Mon Sep 17 00:00:00 2001
|
||||
From bb98973bdb5fe8bd040e238afe92845203929b59 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@ariadne.space>
|
||||
Date: Fri, 25 Jul 2025 01:50:42 -0700
|
||||
Subject: [PATCH] gcc: params: set default ssp-buffer-size to 4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From ee0615536ae0d255f59070b904aa35d6de8fce49 Mon Sep 17 00:00:00 2001
|
||||
From f89d8e95b809d02eceee416b463200c9abb2b33e Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:50:33 +0000
|
||||
Subject: [PATCH] Ensure that msgfmt doesn't encounter problems during gcc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 62966418472466142a9962892177f4b1f9f56944 Mon Sep 17 00:00:00 2001
|
||||
From b45303198567828a5240baf932a8c13255f35d20 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:52:07 +0000
|
||||
Subject: [PATCH] Don't declare asprintf if defined as a macro.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 0351f4f3dd00bdece780ce5e24d972e97ca1b7ed Mon Sep 17 00:00:00 2001
|
||||
From 68e2c9356221ba30b27840b9449f742505584cf1 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:53:00 +0000
|
||||
Subject: [PATCH] libiberty: copy PIC objects during build process
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From bd7e32d5405b6b4f3994a212a77ff2cd33134c74 Mon Sep 17 00:00:00 2001
|
||||
From ca482f8c9cac9617855f908dd30d3d6144e850a0 Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 24 Oct 2015 20:09:53 +0000
|
||||
Subject: [PATCH] libgcc_s
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From c191dc86f4f7340542066f4156aa57be9cfbf876 Mon Sep 17 00:00:00 2001
|
||||
From 6dfb241ae9f879f4945941273dd73eb13f127b06 Mon Sep 17 00:00:00 2001
|
||||
From: Szabolcs Nagy <nsz@port70.net>
|
||||
Date: Sat, 7 Nov 2015 02:08:05 +0000
|
||||
Subject: [PATCH] nopie
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From f1d6c0950e0f12fb8cf2429da570f478a1369286 Mon Sep 17 00:00:00 2001
|
||||
From 8ac6aeca5d6192ee16b959bd8c1903a52d408a55 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:16 +0000
|
||||
Subject: [PATCH] ada: fix shared linking
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 8773e0cf880da9fe80de7f8a662359664bb0b234 Mon Sep 17 00:00:00 2001
|
||||
From 7323d68ae46fc8e33c0746799d820a4e4c8c8b72 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 06:59:43 +0000
|
||||
Subject: [PATCH] build: fix CXXFLAGS_FOR_BUILD passing
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 625b8095796f24389fdda5bb5bc6ff9fbb365813 Mon Sep 17 00:00:00 2001
|
||||
From eaf89c8c91806905c6e1ec9519cbfb56296204b0 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:01:06 +0000
|
||||
Subject: [PATCH] add fortify-headers paths
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From c557286adc46536fe033df400c50a880b672cfd6 Mon Sep 17 00:00:00 2001
|
||||
From bdedcd9db7b8291637c5147dd82e8a9e3f5f9c87 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
|
||||
Date: Fri, 21 Aug 2020 07:03:00 +0000
|
||||
Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From d698fead9d201ef032e2e978898864335a9ab513 Mon Sep 17 00:00:00 2001
|
||||
From 586ce3614d4fc3fbeccf01659114a4643c1879c8 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:03:42 +0000
|
||||
Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 9cf1916bd52d61ea0fd7a8b6acebb1dc4a1f2488 Mon Sep 17 00:00:00 2001
|
||||
From 0ca7f92018d0bc04a72655f3b130c9aaeea1b771 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:12:55 +0000
|
||||
Subject: [PATCH] aarch64: disable multilib support
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From dc07fb7df8d4f997877d8f98ea9ef8292f738ed3 Mon Sep 17 00:00:00 2001
|
||||
From b48898c8fbd7828b81f407c74c25cf8e07fb73a4 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:13:59 +0000
|
||||
Subject: [PATCH] s390x: disable multilib support
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 496067ded4a3698468412e240b899755d92b314c Mon Sep 17 00:00:00 2001
|
||||
From 158d93ce86f3d311ce489d0740326027068ca721 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:33 +0000
|
||||
Subject: [PATCH] ppc64[le]: disable multilib support
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 3d0f96f3f53a7ff81532f077e9db69d7318db796 Mon Sep 17 00:00:00 2001
|
||||
From 6957fc21caca80f5e01db15df6dc8de46c85167b Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Thu, 6 Jan 2022 03:14:54 +0000
|
||||
Subject: [PATCH] x86_64: disable multilib support
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From b1ab523d6fa44aae8f3ec5f787a8f86f8686bf64 Mon Sep 17 00:00:00 2001
|
||||
From fdcbe7ee4ce81cdf247966385c8d521ac3f5a38c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Mon, 3 Jan 2022 07:14:48 +0100
|
||||
Subject: [PATCH] riscv: disable multilib support
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From ee64e5ead8938d5be6cedd674158a25d93711fe3 Mon Sep 17 00:00:00 2001
|
||||
From 6f63901256443978a2c3746e72bd5762166a7790 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@dereferenced.org>
|
||||
Date: Fri, 21 Aug 2020 07:05:41 +0000
|
||||
Subject: [PATCH] always build libgcc_eh.a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 5adfe740c027fb8dc9931053f55f7eae222e6bb4 Mon Sep 17 00:00:00 2001
|
||||
From a365def37f5de93ad85588d8e2c02c0df28e88d6 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@ariadne.space>
|
||||
Date: Fri, 25 Jul 2025 02:09:02 -0700
|
||||
Subject: [PATCH] ada: libgnarl: remove use of glibc-specific
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From c8edb618208a854d121ff73c0d82d7cc467a3611 Mon Sep 17 00:00:00 2001
|
||||
From e1572457f94a26da9a588a36afa3eb0e74122c34 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@ariadne.space>
|
||||
Date: Fri, 25 Jul 2025 02:13:19 -0700
|
||||
Subject: [PATCH] ada: libgnarl: use posix_openpt instead of glibc-specific
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From d3c515c40b9ec0133787388ae7df037e88a95f73 Mon Sep 17 00:00:00 2001
|
||||
From 4f26d4bfedb7f942b69ca4743f053c3a690a0b4a Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@ariadne.space>
|
||||
Date: Fri, 25 Jul 2025 02:18:49 -0700
|
||||
Subject: [PATCH] ada: libgnarl: adaint: fix sched.h inclusion for musl
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 3d13edda0134af3fbb802cdec6406c91003bbc33 Mon Sep 17 00:00:00 2001
|
||||
From 6592e702844d31bcef17c340bfc13e0e1be9f132 Mon Sep 17 00:00:00 2001
|
||||
From: Drew DeVault <sir@cmpwn.com>
|
||||
Date: Wed, 9 Dec 2020 07:42:06 +0000
|
||||
Subject: [PATCH] configure: Add --enable-autolink-libatomic, use in
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From ddc31942d7363acc938007d70f29e3e324064f76 Mon Sep 17 00:00:00 2001
|
||||
From 952070c1616f231a810af2da50264713d7587b48 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sun, 29 Aug 2021 12:23:34 +0200
|
||||
Subject: [PATCH] configure: fix detection of atomic builtins in libatomic
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From e9f4662af949bc56eef27d531605dd90181bc300 Mon Sep 17 00:00:00 2001
|
||||
From 896b002a2afacb4d75d573aca4ae53b499df19cd Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Thu, 30 Jun 2022 16:44:51 +0000
|
||||
Subject: [PATCH] libstdc++: do not throw exceptions for non-C locales on musl
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From b4c412a5d538f7478596880e89d0e6d5046ef16b Mon Sep 17 00:00:00 2001
|
||||
From 22d69ae3e2768d301ef5a1f1b362c25cf8bf27b9 Mon Sep 17 00:00:00 2001
|
||||
From: Mathias LANG <pro.mathias.lang@gmail.com>
|
||||
Date: Mon, 17 Jan 2022 03:49:21 +0000
|
||||
Subject: [PATCH] gdc: unconditionally link libgphobos against libucontext
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 0c10e5ee09685a5ecc39650e8ec8a1b4f5e096e5 Mon Sep 17 00:00:00 2001
|
||||
From dc66835022cf68085400f2eed30614c5afdc28a6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Sat, 16 Jul 2022 09:21:11 +0200
|
||||
Subject: [PATCH] druntime: link against libucontext on all platforms
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From e5190522319c315efaf9a921737c05fae6a49e85 Mon Sep 17 00:00:00 2001
|
||||
From ab88348da140c68e5e1142041dbe1c7b7d9c9a07 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
|
||||
Date: Tue, 19 Jul 2022 14:54:07 +0200
|
||||
Subject: [PATCH] libgnat: time_t is always 64-bit on musl libc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 3fe1ff6c349a065daba97794c55961cafe6c4a10 Mon Sep 17 00:00:00 2001
|
||||
From f865fb0a27252bd3a01fc4596f101d389929311c Mon Sep 17 00:00:00 2001
|
||||
From: psykose <alice@ayaya.dev>
|
||||
Date: Mon, 29 May 2023 15:33:11 +0000
|
||||
Subject: [PATCH] libphobos: do not use LFS64 symbols
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From ff21b1649c1c5009a33722d21e28af9026c72cd7 Mon Sep 17 00:00:00 2001
|
||||
From cf6ba089ba26cd970962e874a3e35f020c3e921c Mon Sep 17 00:00:00 2001
|
||||
From: psykose <alice@ayaya.dev>
|
||||
Date: Mon, 10 Jul 2023 23:23:29 +0000
|
||||
Subject: [PATCH] libgo: fix lfs64 use
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 0e09546330c7500b0d6d4e6d4bbf4fe751d57c34 Mon Sep 17 00:00:00 2001
|
||||
From a809e7b909e16fcf3379571417d33574e9c1dbff Mon Sep 17 00:00:00 2001
|
||||
From: Jingyun Hua <huajingyun@loongson.cn>
|
||||
Date: Mon, 7 Aug 2023 15:25:58 +0800
|
||||
Subject: [PATCH] loongarch disable multilib support
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 05b462e0a6de90c0d69a48ed9c58a6f76158344e Mon Sep 17 00:00:00 2001
|
||||
From 72606254a2456763cb252b4d729a9505e77e449d Mon Sep 17 00:00:00 2001
|
||||
From: Rich Felker <dalias@aerifal.cx>
|
||||
Date: Fri, 25 Jul 2025 02:41:46 -0700
|
||||
Subject: [PATCH] static PIE: ensure -static reaches the linker
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 4c8cc9a8621b91f8aa83d8ca81f22b00a98d9fa9 Mon Sep 17 00:00:00 2001
|
||||
From d984c5c9ed973bb7072b48399e5d9bb1f35c3123 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Pinski <quic_apinski@quicinc.com>
|
||||
Date: Fri, 28 Mar 2025 17:25:56 -0700
|
||||
Subject: [PATCH] except: Don't use the cached value of the gcc_except_table
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From a6c08fc7fe3a144ebd767cd52fe22043947655e9 Mon Sep 17 00:00:00 2001
|
||||
From 57eb290b3c8fc36da99213f5050b46cd93575234 Mon Sep 17 00:00:00 2001
|
||||
From: Ariadne Conill <ariadne@ariadne.space>
|
||||
Date: Sat, 26 Jul 2025 02:59:45 -0700
|
||||
Subject: [PATCH] ada: libgnat: use stub symbolic module name functions
|
||||
|
||||
Loaded 100 of 4734 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user