* add various missing patches and files
This commit is contained in:
parent
87ab21bc9e
commit
2798b8f329
@ -1,42 +0,0 @@
|
||||
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
||||
# Maintainer: David Runge <dvzrv@archlinux.org>
|
||||
|
||||
pkgname=erofs-utils
|
||||
pkgver=1.4
|
||||
pkgrel=2
|
||||
pkgdesc="Userspace utilities for linux-erofs file system"
|
||||
arch=(x86_64 powerpc64le powerpc riscv64)
|
||||
url="https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git"
|
||||
license=(GPL2)
|
||||
# TODO: add xz once microlzma is included
|
||||
# https://bugs.archlinux.org/task/73331
|
||||
depends=(fuse2 glibc lz4)
|
||||
makedepends=(util-linux)
|
||||
source=("https://git.kernel.org/pub/scm/linux/kernel/git/xiang/${pkgname}.git/snapshot/${pkgname}-${pkgver}.tar.gz")
|
||||
sha512sums=('ab95d6a7b2d278ee443d1e378c62354db66ce7ab5ce03b3a8d9004cf498c4e43e3e8ced6524444d2ea4871c4db0195489f033180c8a2082c2cba69c46c09692f')
|
||||
b2sums=('aef1dca8cb95e6104d73a84590319d3c55aba1a4ef5dbdbf470662cb86ee1b66a5707dc1c453470115ec6f2bf1246ee4b6b28aa1cb83b4cb9c8eed45e88668d4')
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname-$pkgver"
|
||||
sed 's@-Werror@@g' -i configure.ac
|
||||
sed 's@-Werror@@g' -i Makefile.am
|
||||
sed 's@-Werror@@g' -i */Makefile.am
|
||||
autoreconf -fiv
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname-$pkgver"
|
||||
./configure --prefix=/usr --enable-fuse
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
make -k check -C $pkgname-$pkgver
|
||||
}
|
||||
|
||||
package() {
|
||||
depends+=(libuuid.so)
|
||||
|
||||
make DESTDIR="$pkgdir/" install -C $pkgname-$pkgver
|
||||
install -vDm 644 $pkgname-$pkgver/{AUTHORS,ChangeLog,README} -t "$pkgdir/usr/share/doc/$pkgname/"
|
||||
}
|
55
cdrtools/no-junk.patch
Normal file
55
cdrtools/no-junk.patch
Normal file
@ -0,0 +1,55 @@
|
||||
# --- T2-COPYRIGHT-NOTE-BEGIN ---
|
||||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||||
#
|
||||
# T2 SDE: package/.../cdrtools/no-junk.patch
|
||||
# Copyright (C) 2006 The T2 SDE Project
|
||||
#
|
||||
# More information can be found in the files COPYING and README.
|
||||
#
|
||||
# This patch file is dual-licensed. It is available under the license the
|
||||
# patched project is licensed under, as long as it is an OpenSource license
|
||||
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||||
# of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
# --- T2-COPYRIGHT-NOTE-END ---
|
||||
|
||||
|
||||
We neither want Solaris or commercial flavour advertising, nor needless
|
||||
delays and everything is a /dev file bitching ...
|
||||
|
||||
- Rebe Rebe <rene@exactcode.de>
|
||||
|
||||
diff -r -U 1 cdrtools-2.01/cdrecord/cdrecord.c cdrtools-2.01-nonverb/cdrecord/cdrecord.c
|
||||
--- cdrtools-2.01/cdrecord/cdrecord.c 2004-09-08 19:26:35.000000000 +0200
|
||||
+++ cdrtools-2.01-nonverb/cdrecord/cdrecord.c 2006-01-13 16:06:23.000000000 +0100
|
||||
@@ -666,5 +666,3 @@
|
||||
errmsgno(EX_BAD,
|
||||
- "If you need DVD-R/DVD-RW support, ask the Author for cdrecord-ProDVD.\n");
|
||||
- errmsgno(EX_BAD,
|
||||
- "Free test versions and free keys for personal use are at ftp://ftp.berlios.de/pub/cdrecord/ProDVD/\n");
|
||||
+ "Try dvd+rwtools instead.\n");
|
||||
}
|
||||
@@ -3584,4 +3582,6 @@
|
||||
errmsgno(EX_BAD, "Future versions of cdrecord may have different drive dependent defaults.\n");
|
||||
+#if 0
|
||||
errmsgno(EX_BAD, "Continuing in 5 seconds...\n");
|
||||
sleep(5);
|
||||
+#endif
|
||||
tao = 1;
|
||||
@@ -4680,3 +4680,3 @@
|
||||
{
|
||||
-#if defined(linux) || defined(__linux) || defined(__linux__)
|
||||
+#if 0
|
||||
#ifdef HAVE_UNAME
|
||||
diff -r -U 1 cdrtools-2.01/libscg/scsi-linux-sg.c cdrtools-2.01-nonverb/libscg/scsi-linux-sg.c
|
||||
--- cdrtools-2.01/libscg/scsi-linux-sg.c 2004-05-20 15:42:12.000000000 +0200
|
||||
+++ cdrtools-2.01-nonverb/libscg/scsi-linux-sg.c 2006-01-13 15:26:47.000000000 +0100
|
||||
@@ -499,2 +499,3 @@
|
||||
}
|
||||
+#if 0
|
||||
if (scgp->overbose) {
|
||||
@@ -512,2 +513,3 @@
|
||||
}
|
||||
+#endif
|
||||
/* O_NONBLOCK is dangerous */
|
11
ceph/boost-1.67.patch
Normal file
11
ceph/boost-1.67.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/src/test/librbd/test_mock_Journal.cc 2018-06-03 01:56:35.407273176 +0300
|
||||
+++ b/src/test/librbd/test_mock_Journal.cc 2018-06-03 01:56:29.800506081 +0300
|
||||
@@ -1,6 +1,8 @@
|
||||
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
|
||||
// vim: ts=8 sw=2 smarttab
|
||||
|
||||
+#define BOOST_BIND_NO_PLACEHOLDERS
|
||||
+
|
||||
#include "test/librbd/test_mock_fixture.h"
|
||||
#include "test/journal/mock/MockJournaler.h"
|
||||
#include "test/librbd/test_support.h"
|
11
ceph/ceph-14.2.0-link-crc32-statically.patch
Normal file
11
ceph/ceph-14.2.0-link-crc32-statically.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ceph-14.2.0.orig/src/common/CMakeLists.txt 2019-03-18 04:08:29.000000000 -0600
|
||||
+++ ceph-14.2.0/src/common/CMakeLists.txt 2019-03-21 18:42:32.903182824 -0600
|
||||
@@ -165,7 +165,7 @@
|
||||
crc32c_aarch64.c)
|
||||
endif(HAVE_INTEL)
|
||||
|
||||
-add_library(crc32 ${crc32_srcs})
|
||||
+add_library(crc32 STATIC ${crc32_srcs})
|
||||
if(HAVE_ARMV8_CRC)
|
||||
set_target_properties(crc32 PROPERTIES
|
||||
COMPILE_FLAGS "${CMAKE_C_FLAGS} ${ARMV8_CRC_COMPILE_FLAGS}")
|
73
ceph/ceph-15.2.14-gcc12.patch
Normal file
73
ceph/ceph-15.2.14-gcc12.patch
Normal file
@ -0,0 +1,73 @@
|
||||
From 963d756ded40f5adf2efef53893c917bec1845c1 Mon Sep 17 00:00:00 2001
|
||||
From: Radoslaw Zarzynski <rzarzyns@redhat.com>
|
||||
Date: Wed, 19 Jan 2022 15:24:11 +0000
|
||||
Subject: [PATCH] common: fix FTBFS due to dout & need_dynamic on GCC-12
|
||||
|
||||
For details see:
|
||||
https://gist.github.com/rzarzynski/d6d2df6888923bef6a3e764f4856853f.
|
||||
|
||||
Special thanks to Kaleb Keithley who reported the issue
|
||||
and tested the fix!
|
||||
|
||||
Fixes: https://tracker.ceph.com/issues/53896
|
||||
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
|
||||
---
|
||||
src/common/dout.h | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/common/dout.h b/src/common/dout.h
|
||||
index 421222d535f8d..a1375fbb91026 100644
|
||||
--- a/src/common/dout.h
|
||||
+++ b/src/common/dout.h
|
||||
@@ -99,11 +99,12 @@ namespace ceph::dout {
|
||||
template<typename T>
|
||||
struct dynamic_marker_t {
|
||||
T value;
|
||||
- operator T() const { return value; }
|
||||
+ // constexpr ctor isn't needed as it's an aggregate type
|
||||
+ constexpr operator T() const { return value; }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
-dynamic_marker_t<T> need_dynamic(T&& t) {
|
||||
+constexpr dynamic_marker_t<T> need_dynamic(T&& t) {
|
||||
return dynamic_marker_t<T>{ std::forward<T>(t) };
|
||||
}
|
||||
|
||||
|
||||
From 7c381ba985bd1398ef7d145cc00fae9d0db510e3 Mon Sep 17 00:00:00 2001
|
||||
From: Kefu Chai <tchaikov@gmail.com>
|
||||
Date: Mon, 28 Feb 2022 21:46:39 +0800
|
||||
Subject: [PATCH] include/buffer: include <memory>
|
||||
|
||||
to address following FTBFS:
|
||||
|
||||
/usr/bin/ccache /usr/bin/clang++-13 -DBOOST_ALL_NO_LIB -DBOOST_ASIO_DISABLE_CONCEPTS -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_T$
|
||||
In file included from /var/ssd/ceph/src/crimson/os/seastore/seastore_types.cc:4:
|
||||
In file included from /var/ssd/ceph/src/crimson/os/seastore/seastore_types.h:14:
|
||||
In file included from /var/ssd/ceph/src/include/denc.h:47:
|
||||
/var/ssd/ceph/src/include/buffer.h:98:37: error: no template named 'unique_ptr' in namespace 'std'; did you mean 'boost::movelib::unique_ptr'?
|
||||
struct unique_leakable_ptr : public std::unique_ptr<T, ceph::nop_delete<T>> {
|
||||
^~~~~~~~~~~~~~~
|
||||
boost::movelib::unique_ptr
|
||||
/opt/ceph/include/boost/move/unique_ptr.hpp:354:7: note: 'boost::movelib::unique_ptr' declared here
|
||||
class unique_ptr
|
||||
^
|
||||
|
||||
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
|
||||
---
|
||||
src/include/buffer.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/include/buffer.h b/src/include/buffer.h
|
||||
index 0c89367dd3b2c..8a28d846d9d46 100644
|
||||
--- a/src/include/buffer.h
|
||||
+++ b/src/include/buffer.h
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <iosfwd>
|
||||
#include <iomanip>
|
||||
#include <list>
|
||||
+#include <memory>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#if __cplusplus >= 201703L
|
11
ceph/exclude-frontend-from-mgr-dashboard-cov.patch
Normal file
11
ceph/exclude-frontend-from-mgr-dashboard-cov.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/src/pybind/mgr/dashboard/tox.ini 2019-12-06 17:42:34.000000000 +0100
|
||||
+++ c/src/pybind/mgr/dashboard/tox.ini 2020-01-03 15:25:30.074706391 +0100
|
||||
@@ -20,7 +20,7 @@ commands=
|
||||
py27: pip install -r {toxinidir}/requirements-py27.txt
|
||||
py3: pip install -r {toxinidir}/requirements-py3.txt
|
||||
cov: coverage erase
|
||||
- cov: {envbindir}/py.test --cov=. --cov-report= --junitxml=junit.{envname}.xml --doctest-modules controllers services/ tests/ tools.py
|
||||
+ cov: {envbindir}/py.test --cov=. --cov-report= --junitxml=junit.{envname}.xml --ignore=frontend/ --doctest-modules controllers services/ tests/ tools.py
|
||||
cov: coverage combine {toxinidir}/{env:COVERAGE_FILE}
|
||||
cov: coverage report
|
||||
cov: coverage xml
|
8
ceph/fix-ceph_disk-python-interpreter.patch
Normal file
8
ceph/fix-ceph_disk-python-interpreter.patch
Normal file
@ -0,0 +1,8 @@
|
||||
--- a/src/ceph-disk/ceph_disk/main.py 2017-08-28 18:30:20.000000000 +0200
|
||||
+++ b/src/ceph-disk/ceph_disk/main.py 2017-09-21 13:50:39.373573382 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python2
|
||||
#
|
||||
# Copyright (C) 2015, 2016, 2017 Red Hat <contact@redhat.com>
|
||||
# Copyright (C) 2014 Inktank <info@inktank.com>
|
50
ceph/fix-mgr-dashboard-frontend-unittests-dist-stuff.patch
Normal file
50
ceph/fix-mgr-dashboard-frontend-unittests-dist-stuff.patch
Normal file
@ -0,0 +1,50 @@
|
||||
--- a/src/pybind/mgr/dashboard/run-frontend-unittests.sh 2020-01-08 19:36:54.000000000 +0100
|
||||
+++ b/src/pybind/mgr/dashboard/run-frontend-unittests.sh 2020-01-10 15:18:39.646510326 +0100
|
||||
@@ -8,7 +8,7 @@ if [ `uname` != "FreeBSD" ]; then
|
||||
fi
|
||||
|
||||
# Build
|
||||
-npm run build -- --prod --progress=false || failed=true
|
||||
+#npm run build -- --prod --progress=false || failed=true
|
||||
|
||||
# Unit Tests
|
||||
config='src/unit-test-configuration.ts'
|
||||
@@ -25,22 +25,22 @@ if [ -e ${config}_old ]; then
|
||||
fi
|
||||
|
||||
# Linting
|
||||
-npm run lint --silent
|
||||
-if [ $? -gt 0 ]; then
|
||||
- failed=true
|
||||
- echo -e "\nTry running 'npm run fix' to fix some linting errors. \
|
||||
-Some errors might need a manual fix."
|
||||
-fi
|
||||
-
|
||||
-# I18N
|
||||
-npm run i18n:extract
|
||||
-i18n_lint=`awk '/<source> |<source>$| <\/source>/,/<\/context-group>/ {printf "%-4s ", NR; print}' src/locale/messages.xlf`
|
||||
-if [[ ! -z $i18n_lint ]]; then
|
||||
- echo -e "The following source translations in 'messages.xlf' need to be \
|
||||
-fixed, please check the I18N suggestions in 'HACKING.rst':\n"
|
||||
- echo "${i18n_lint}"
|
||||
- failed=true
|
||||
-fi
|
||||
+# npm run lint --silent
|
||||
+# if [ $? -gt 0 ]; then
|
||||
+# failed=true
|
||||
+# echo -e "\nTry running 'npm run fix' to fix some linting errors. \
|
||||
+# Some errors might need a manual fix."
|
||||
+# fi
|
||||
+#
|
||||
+# # I18N
|
||||
+# npm run i18n:extract
|
||||
+# i18n_lint=`awk '/<source> |<source>$| <\/source>/,/<\/context-group>/ {printf "%-4s ", NR; print}' src/locale/messages.xlf`
|
||||
+# if [[ ! -z $i18n_lint ]]; then
|
||||
+# echo -e "The following source translations in 'messages.xlf' need to be \
|
||||
+# fixed, please check the I18N suggestions in 'HACKING.rst':\n"
|
||||
+# echo "${i18n_lint}"
|
||||
+# failed=true
|
||||
+# fi
|
||||
|
||||
if [ `uname` != "FreeBSD" ]; then
|
||||
deactivate
|
52
ceph/fix-python2-paths.patch
Normal file
52
ceph/fix-python2-paths.patch
Normal file
@ -0,0 +1,52 @@
|
||||
--- a/CMakeLists.txt 2018-05-29 14:04:02.000000000 +0200
|
||||
+++ b/CMakeLists.txt 2018-06-04 13:41:55.684455580 +0200
|
||||
@@ -49,7 +49,7 @@ endif(WITH_CCACHE)
|
||||
option(WITH_MANPAGE "Build man pages." ON)
|
||||
if(WITH_MANPAGE)
|
||||
find_program(SPHINX_BUILD
|
||||
- sphinx-build)
|
||||
+ sphinx-build2)
|
||||
if(NOT SPHINX_BUILD)
|
||||
message(FATAL_ERROR "Can't find sphinx-build.")
|
||||
endif(NOT SPHINX_BUILD)
|
||||
--- a/src/tools/setup-virtualenv.sh 2018-05-29 14:04:02.000000000 +0200
|
||||
+++ b/src/tools/setup-virtualenv.sh 2018-06-04 13:43:24.767175961 +0200
|
||||
@@ -58,10 +58,10 @@ if [ -z "$DIR" ] ; then
|
||||
fi
|
||||
rm -fr $DIR
|
||||
mkdir -p $DIR
|
||||
-virtualenv --python $PYTHON_BINARY $DIR
|
||||
+virtualenv2 --python $PYTHON_BINARY $DIR
|
||||
. $DIR/bin/activate
|
||||
|
||||
-if pip --help | grep -q disable-pip-version-check; then
|
||||
+if pip2 --help | grep -q disable-pip-version-check; then
|
||||
DISABLE_PIP_VERSION_CHECK=--disable-pip-version-check
|
||||
else
|
||||
DISABLE_PIP_VERSION_CHECK=
|
||||
@@ -69,12 +69,12 @@ fi
|
||||
|
||||
# older versions of pip will not install wrap_console scripts
|
||||
# when using wheel packages
|
||||
-pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install --upgrade 'pip >= 6.1'
|
||||
+pip2 $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install --upgrade 'pip >= 6.1'
|
||||
|
||||
# workaround of https://github.com/pypa/setuptools/issues/1042
|
||||
-pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install --upgrade "setuptools < 36"
|
||||
+pip2 $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install --upgrade "setuptools < 36"
|
||||
|
||||
-if pip --help | grep -q disable-pip-version-check; then
|
||||
+if pip2 --help | grep -q disable-pip-version-check; then
|
||||
DISABLE_PIP_VERSION_CHECK=--disable-pip-version-check
|
||||
else
|
||||
DISABLE_PIP_VERSION_CHECK=
|
||||
@@ -84,7 +84,7 @@ if test -d wheelhouse ; then
|
||||
export NO_INDEX=--no-index
|
||||
fi
|
||||
|
||||
-pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install $NO_INDEX --find-links=file://$(pwd)/wheelhouse 'tox >=2.9.1'
|
||||
+pip2 $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install $NO_INDEX --find-links=file://$(pwd)/wheelhouse 'tox >=2.9.1'
|
||||
if test -f requirements.txt ; then
|
||||
- pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install $NO_INDEX --find-links=file://$(pwd)/wheelhouse -r requirements.txt
|
||||
+ pip2 $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install $NO_INDEX --find-links=file://$(pwd)/wheelhouse -r requirements.txt
|
||||
fi
|
160
ceph/fix-tox-test-commands.patch
Normal file
160
ceph/fix-tox-test-commands.patch
Normal file
@ -0,0 +1,160 @@
|
||||
--- a/src/pybind/mgr/ansible/run-tox.sh 2019-04-25 20:15:48.000000000 +0200
|
||||
+++ b/src/pybind/mgr/ansible/run-tox.sh 2019-07-14 16:36:54.220654727 +0200
|
||||
@@ -8,22 +8,22 @@
|
||||
test -d ansible && cd ansible
|
||||
|
||||
if [ -e tox.ini ]; then
|
||||
- TOX_PATH=$(readlink -f tox.ini)
|
||||
+ TOX_PATH="$(readlink -f tox.ini)"
|
||||
else
|
||||
- TOX_PATH=$(readlink -f $(dirname $0)/tox.ini)
|
||||
+ TOX_PATH="$(readlink -f "$(dirname "$0")"/tox.ini)"
|
||||
fi
|
||||
|
||||
# tox.ini will take care of this.
|
||||
unset PYTHONPATH
|
||||
export CEPH_BUILD_DIR=$CEPH_BUILD_DIR
|
||||
|
||||
-source ${MGR_ANSIBLE_VIRTUALENV}/bin/activate
|
||||
+source "${MGR_ANSIBLE_VIRTUALENV}"/bin/activate
|
||||
|
||||
if [ "$WITH_PYTHON2" = "ON" ]; then
|
||||
ENV_LIST+="py27"
|
||||
fi
|
||||
-if [ "$WITH_PYTHON3" = "ON" ]; then
|
||||
+if [[ "$WITH_PYTHON3" == "ON" || "$WITH_PYTHON3" == "3" ]]; then
|
||||
ENV_LIST+="py3"
|
||||
fi
|
||||
|
||||
-tox -c ${TOX_PATH} -e ${ENV_LIST}
|
||||
+tox -c "${TOX_PATH}" -e "${ENV_LIST}"
|
||||
--- a/src/pybind/mgr/dashboard/run-tox.sh 2019-04-25 20:15:48.000000000 +0200
|
||||
+++ b/src/pybind/mgr/dashboard/run-tox.sh 2019-07-14 16:36:48.907269344 +0200
|
||||
@@ -8,30 +8,30 @@
|
||||
test -d dashboard && cd dashboard
|
||||
|
||||
if [ -e tox.ini ]; then
|
||||
- TOX_PATH=`readlink -f tox.ini`
|
||||
+ TOX_PATH="$(readlink -f tox.ini)"
|
||||
else
|
||||
- TOX_PATH=`readlink -f $(dirname $0)/tox.ini`
|
||||
+ TOX_PATH="$(readlink -f "$(dirname "$0")"/tox.ini)"
|
||||
fi
|
||||
|
||||
# tox.ini will take care of this.
|
||||
unset PYTHONPATH
|
||||
export CEPH_BUILD_DIR=$CEPH_BUILD_DIR
|
||||
|
||||
-source ${MGR_DASHBOARD_VIRTUALENV}/bin/activate
|
||||
+source "${MGR_DASHBOARD_VIRTUALENV}"/bin/activate
|
||||
|
||||
-if [ "$WITH_PYTHON2" = "ON" ]; then
|
||||
- if [[ -n "$@" ]]; then
|
||||
+if [ "$WITH_PYTHON2" == "ON" ]; then
|
||||
+ if [[ -n "$*" ]]; then
|
||||
ENV_LIST+="py27-run,"
|
||||
else
|
||||
ENV_LIST+="py27-cov,py27-lint,"
|
||||
fi
|
||||
fi
|
||||
-if [ "$WITH_PYTHON3" = "ON" ]; then
|
||||
- if [[ -n "$@" ]]; then
|
||||
+if [[ "$WITH_PYTHON3" == "ON" || "$WITH_PYTHON3" == "3" ]]; then
|
||||
+ if [[ -n "$*" ]]; then
|
||||
ENV_LIST+="py3-run"
|
||||
else
|
||||
ENV_LIST+="py3-cov,py3-lint"
|
||||
fi
|
||||
fi
|
||||
|
||||
-tox -c ${TOX_PATH} -e "$ENV_LIST" "$@"
|
||||
+tox -c "${TOX_PATH}" -e "$ENV_LIST" "$@"
|
||||
--- a/src/pybind/mgr/insights/run-tox.sh 2019-04-25 20:15:48.000000000 +0200
|
||||
+++ b/src/pybind/mgr/insights/run-tox.sh 2019-07-14 16:36:41.347195419 +0200
|
||||
@@ -8,22 +8,22 @@
|
||||
test -d insights && cd insights
|
||||
|
||||
if [ -e tox.ini ]; then
|
||||
- TOX_PATH=`readlink -f tox.ini`
|
||||
+ TOX_PATH="$(readlink -f tox.ini)"
|
||||
else
|
||||
- TOX_PATH=`readlink -f $(dirname $0)/tox.ini`
|
||||
+ TOX_PATH="$(readlink -f "$(dirname "$0")"/tox.ini)"
|
||||
fi
|
||||
|
||||
# tox.ini will take care of this.
|
||||
unset PYTHONPATH
|
||||
export CEPH_BUILD_DIR=$CEPH_BUILD_DIR
|
||||
|
||||
-source ${MGR_INSIGHTS_VIRTUALENV}/bin/activate
|
||||
+source "${MGR_INSIGHTS_VIRTUALENV}"/bin/activate
|
||||
|
||||
if [ "$WITH_PYTHON2" = "ON" ]; then
|
||||
ENV_LIST+="py27"
|
||||
fi
|
||||
-if [ "$WITH_PYTHON3" = "ON" ]; then
|
||||
+if [[ "$WITH_PYTHON3" == "ON" || "$WITH_PYTHON3" == "3" ]]; then
|
||||
ENV_LIST+="py3"
|
||||
fi
|
||||
|
||||
-tox -c ${TOX_PATH} -e ${ENV_LIST}
|
||||
+tox -c "${TOX_PATH}" -e "${ENV_LIST}"
|
||||
--- a/src/pybind/mgr/orchestrator_cli/run-tox.sh 2019-04-25 20:15:48.000000000 +0200
|
||||
+++ b/src/pybind/mgr/orchestrator_cli/run-tox.sh 2019-07-14 16:37:01.734061798 +0200
|
||||
@@ -8,25 +8,24 @@
|
||||
test -d orchestrator_cli && cd orchestrator_cli
|
||||
|
||||
if [ -e tox.ini ]; then
|
||||
- TOX_PATH=$(readlink -f tox.ini)
|
||||
+ TOX_PATH="$(readlink -f tox.ini)"
|
||||
else
|
||||
- TOX_PATH=$(readlink -f $(dirname $0)/tox.ini)
|
||||
+ TOX_PATH="$(readlink -f "$(dirname "$0")"/tox.ini)"
|
||||
fi
|
||||
|
||||
# tox.ini will take care of this.
|
||||
unset PYTHONPATH
|
||||
export CEPH_BUILD_DIR=$CEPH_BUILD_DIR
|
||||
|
||||
-if [ -f ${MGR_ORCHESTRATOR_CLI_VIRTUALENV}/bin/activate ]
|
||||
-then
|
||||
- source ${MGR_ORCHESTRATOR_CLI_VIRTUALENV}/bin/activate
|
||||
+if [[ -r "${MGR_ORCHESTRATOR_CLI_VIRTUALENV}"/bin/activate ]]; then
|
||||
+ source "${MGR_ORCHESTRATOR_CLI_VIRTUALENV}"/bin/activate
|
||||
fi
|
||||
|
||||
if [ "$WITH_PYTHON2" = "ON" ]; then
|
||||
ENV_LIST+="py27"
|
||||
fi
|
||||
-if [ "$WITH_PYTHON3" = "ON" ]; then
|
||||
- ENV_LIST+=",py3"
|
||||
+if [[ "$WITH_PYTHON3" == "ON" || "$WITH_PYTHON3" == "3" ]]; then
|
||||
+ ENV_LIST+="py3"
|
||||
fi
|
||||
|
||||
-tox -c ${TOX_PATH} -e ${ENV_LIST}
|
||||
+tox -c "${TOX_PATH}" -e "${ENV_LIST}"
|
||||
--- a/src/pybind/mgr/dashboard/tox.ini 2019-04-25 20:15:48.000000000 +0200
|
||||
+++ b/src/pybind/mgr/dashboard/tox.ini 2019-07-15 12:36:39.693948289 +0200
|
||||
@@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
-envlist = py27-{cov,lint,run},py3-{cov,lint,run}
|
||||
+envlist = py3-{cov,lint,run}
|
||||
skipsdist = true
|
||||
toxworkdir = {env:CEPH_BUILD_DIR}/dashboard
|
||||
minversion = 2.8.1
|
||||
@@ -11,13 +11,12 @@ setenv=
|
||||
WEBTEST_INTERACTIVE = false
|
||||
LD_LIBRARY_PATH = {toxinidir}/../../../../build/lib
|
||||
PATH = {toxinidir}/../../../../build/bin:$PATH
|
||||
- py27: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.2
|
||||
py3: PYTHONPATH = {toxinidir}/../../../../build/lib/cython_modules/lib.3
|
||||
cov: UNITTEST = true
|
||||
cov: COVERAGE_FILE = .coverage.{envname}
|
||||
commands=
|
||||
pip install -r {toxinidir}/requirements.txt
|
||||
- py27: pip install -r {toxinidir}/requirements-py27.txt
|
||||
+; py27: pip install -r {toxinidir}/requirements-py27.txt
|
||||
py3: pip install -r {toxinidir}/requirements-py3.txt
|
||||
cov: coverage erase
|
||||
cov: {envbindir}/py.test --cov=. --cov-report= --junitxml=junit.{envname}.xml --doctest-modules controllers/rbd.py services/ tests/ tools.py
|
671
ceph/mgr-dashboard-update-pylint-to-2.6.0.patch
Normal file
671
ceph/mgr-dashboard-update-pylint-to-2.6.0.patch
Normal file
@ -0,0 +1,671 @@
|
||||
From e4f179fa960ed18e8f45bc87d26552d720bc819b Mon Sep 17 00:00:00 2001
|
||||
From: Volker Theile <vtheile@suse.com>
|
||||
Date: Fri, 25 Sep 2020 13:17:19 +0200
|
||||
Subject: [PATCH] mgr/dashboard: update pylint to 2.6.0
|
||||
|
||||
* Update pylint to 2.6.0.
|
||||
* Fix pylint issues.
|
||||
|
||||
Fixes: https://tracker.ceph.com/issues/47647
|
||||
|
||||
(cherry picked from commit 298c91958a41674a928d53f010b20f174f16d68f)
|
||||
---
|
||||
src/pybind/mgr/dashboard/.pylintrc | 8 ++++++--
|
||||
.../mgr/dashboard/controllers/nfsganesha.py | 2 +-
|
||||
src/pybind/mgr/dashboard/controllers/osd.py | 2 +-
|
||||
src/pybind/mgr/dashboard/plugins/__init__.py | 2 +-
|
||||
.../mgr/dashboard/requirements-lint.txt | 2 +-
|
||||
src/pybind/mgr/dashboard/services/auth.py | 1 -
|
||||
.../mgr/dashboard/services/ceph_service.py | 2 +-
|
||||
src/pybind/mgr/dashboard/services/cephx.py | 2 +-
|
||||
src/pybind/mgr/dashboard/services/ganesha.py | 20 +++++++++----------
|
||||
.../mgr/dashboard/services/iscsi_client.py | 2 +-
|
||||
.../mgr/dashboard/services/iscsi_config.py | 2 +-
|
||||
src/pybind/mgr/dashboard/services/progress.py | 2 +-
|
||||
.../mgr/dashboard/services/rgw_client.py | 3 ++-
|
||||
src/pybind/mgr/dashboard/tests/__init__.py | 2 +-
|
||||
src/pybind/mgr/dashboard/tests/helper.py | 2 +-
|
||||
.../dashboard/tests/test_access_control.py | 2 +-
|
||||
.../mgr/dashboard/tests/test_api_auditing.py | 2 +-
|
||||
src/pybind/mgr/dashboard/tests/test_cephfs.py | 2 +-
|
||||
.../mgr/dashboard/tests/test_controllers.py | 2 +-
|
||||
src/pybind/mgr/dashboard/tests/test_docs.py | 2 +-
|
||||
.../tests/test_erasure_code_profile.py | 2 +-
|
||||
.../mgr/dashboard/tests/test_exceptions.py | 2 +-
|
||||
.../dashboard/tests/test_feature_toggles.py | 2 +-
|
||||
.../mgr/dashboard/tests/test_ganesha.py | 2 +-
|
||||
.../mgr/dashboard/tests/test_grafana.py | 2 +-
|
||||
src/pybind/mgr/dashboard/tests/test_home.py | 2 +-
|
||||
src/pybind/mgr/dashboard/tests/test_host.py | 2 +-
|
||||
src/pybind/mgr/dashboard/tests/test_iscsi.py | 3 ++-
|
||||
.../mgr/dashboard/tests/test_orchestrator.py | 2 +-
|
||||
src/pybind/mgr/dashboard/tests/test_osd.py | 4 ++--
|
||||
.../mgr/dashboard/tests/test_plugin_debug.py | 2 +-
|
||||
src/pybind/mgr/dashboard/tests/test_pool.py | 2 +-
|
||||
.../mgr/dashboard/tests/test_prometheus.py | 2 +-
|
||||
.../mgr/dashboard/tests/test_rbd_mirroring.py | 2 +-
|
||||
.../mgr/dashboard/tests/test_rest_tasks.py | 2 +-
|
||||
src/pybind/mgr/dashboard/tests/test_rgw.py | 2 +-
|
||||
.../mgr/dashboard/tests/test_rgw_client.py | 2 +-
|
||||
.../mgr/dashboard/tests/test_settings.py | 2 +-
|
||||
src/pybind/mgr/dashboard/tests/test_sso.py | 3 ++-
|
||||
src/pybind/mgr/dashboard/tests/test_tools.py | 2 +-
|
||||
src/pybind/mgr/dashboard/tools.py | 2 +-
|
||||
41 files changed, 58 insertions(+), 52 deletions(-)
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/.pylintrc b/src/pybind/mgr/dashboard/.pylintrc
|
||||
index 404a16a2e6..c4bf033cda 100644
|
||||
--- a/src/pybind/mgr/dashboard/.pylintrc
|
||||
+++ b/src/pybind/mgr/dashboard/.pylintrc
|
||||
@@ -15,7 +15,7 @@ ignore-patterns=
|
||||
|
||||
# Python code to execute, usually for sys.path manipulation such as
|
||||
# pygtk.require().
|
||||
-#init-hook=
|
||||
+init-hook='import sys; sys.path.append("./")'
|
||||
|
||||
# Use multiple processes to speed up Pylint.
|
||||
jobs=1
|
||||
@@ -118,7 +118,11 @@ disable=import-star-module-level,
|
||||
too-many-arguments,
|
||||
too-many-locals,
|
||||
too-many-statements,
|
||||
- useless-object-inheritance
|
||||
+ useless-object-inheritance,
|
||||
+ relative-beyond-top-level,
|
||||
+ raise-missing-from,
|
||||
+ super-with-arguments,
|
||||
+ import-outside-toplevel
|
||||
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
diff --git a/src/pybind/mgr/dashboard/controllers/nfsganesha.py b/src/pybind/mgr/dashboard/controllers/nfsganesha.py
|
||||
index 1219f78b95..510b37a712 100644
|
||||
--- a/src/pybind/mgr/dashboard/controllers/nfsganesha.py
|
||||
+++ b/src/pybind/mgr/dashboard/controllers/nfsganesha.py
|
||||
@@ -272,7 +272,7 @@ class NFSGaneshaService(RESTController):
|
||||
class NFSGaneshaUi(BaseController):
|
||||
@Endpoint('GET', '/cephx/clients')
|
||||
def cephx_clients(self):
|
||||
- return [client for client in CephX.list_clients()]
|
||||
+ return list(CephX.list_clients())
|
||||
|
||||
@Endpoint('GET', '/fsals')
|
||||
def fsals(self):
|
||||
diff --git a/src/pybind/mgr/dashboard/controllers/osd.py b/src/pybind/mgr/dashboard/controllers/osd.py
|
||||
index 2731ad0ffc..f95951cba2 100644
|
||||
--- a/src/pybind/mgr/dashboard/controllers/osd.py
|
||||
+++ b/src/pybind/mgr/dashboard/controllers/osd.py
|
||||
@@ -272,7 +272,7 @@ class Osd(RESTController):
|
||||
|
||||
@CreatePermission
|
||||
@osd_task('create', {'tracking_id': '{tracking_id}'})
|
||||
- def create(self, method, data, tracking_id): # pylint: disable=W0622
|
||||
+ def create(self, method, data, tracking_id): # pylint: disable=unused-argument
|
||||
if method == 'bare':
|
||||
return self._create_bare(data)
|
||||
if method == 'drive_groups':
|
||||
diff --git a/src/pybind/mgr/dashboard/plugins/__init__.py b/src/pybind/mgr/dashboard/plugins/__init__.py
|
||||
index 8973654770..3e3aca4001 100644
|
||||
--- a/src/pybind/mgr/dashboard/plugins/__init__.py
|
||||
+++ b/src/pybind/mgr/dashboard/plugins/__init__.py
|
||||
@@ -71,4 +71,4 @@ class DashboardPluginManager(object):
|
||||
PLUGIN_MANAGER = DashboardPluginManager("ceph-mgr.dashboard")
|
||||
|
||||
# Load all interfaces and their hooks
|
||||
-from . import interfaces # noqa: F401 pylint: disable=wrong-import-position,cyclic-import
|
||||
+from . import interfaces # noqa pylint: disable=C0413,W0406
|
||||
diff --git a/src/pybind/mgr/dashboard/requirements-lint.txt b/src/pybind/mgr/dashboard/requirements-lint.txt
|
||||
index 8f68ad3856..f01fa54e6e 100644
|
||||
--- a/src/pybind/mgr/dashboard/requirements-lint.txt
|
||||
+++ b/src/pybind/mgr/dashboard/requirements-lint.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-pylint==2.3.1; python_version >= '3'
|
||||
+pylint==2.6.0
|
||||
flake8==3.7.8; python_version >= '3'
|
||||
flake8-colors==0.1.6; python_version >= '3'
|
||||
#TODO: Fix docstring issues: https://tracker.ceph.com/issues/41224
|
||||
diff --git a/src/pybind/mgr/dashboard/services/auth.py b/src/pybind/mgr/dashboard/services/auth.py
|
||||
index d829362e63..475d501263 100644
|
||||
--- a/src/pybind/mgr/dashboard/services/auth.py
|
||||
+++ b/src/pybind/mgr/dashboard/services/auth.py
|
||||
@@ -177,7 +177,6 @@ class AuthManagerTool(cherrypy.Tool):
|
||||
|
||||
def _check_authorization(self, username):
|
||||
self.logger.debug("checking authorization...")
|
||||
- username = username
|
||||
handler = cherrypy.request.handler.callable
|
||||
controller = handler.__self__
|
||||
sec_scope = getattr(controller, '_security_scope', None)
|
||||
diff --git a/src/pybind/mgr/dashboard/services/ceph_service.py b/src/pybind/mgr/dashboard/services/ceph_service.py
|
||||
index a6eee2957e..89582e3f73 100644
|
||||
--- a/src/pybind/mgr/dashboard/services/ceph_service.py
|
||||
+++ b/src/pybind/mgr/dashboard/services/ceph_service.py
|
||||
@@ -12,7 +12,7 @@ from .. import mgr
|
||||
from ..exceptions import DashboardException
|
||||
|
||||
try:
|
||||
- from typing import Dict, Any, Union # pylint: disable=unused-import
|
||||
+ from typing import Dict, Any, Union
|
||||
except ImportError:
|
||||
pass # For typing only
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/services/cephx.py b/src/pybind/mgr/dashboard/services/cephx.py
|
||||
index ccda387961..60303ad85f 100644
|
||||
--- a/src/pybind/mgr/dashboard/services/cephx.py
|
||||
+++ b/src/pybind/mgr/dashboard/services/cephx.py
|
||||
@@ -22,7 +22,7 @@ class CephX(object):
|
||||
|
||||
@classmethod
|
||||
def list_clients(cls):
|
||||
- return [client for client in cls._clients_map()]
|
||||
+ return list(cls._clients_map())
|
||||
|
||||
@classmethod
|
||||
def get_client_key(cls, client_id):
|
||||
diff --git a/src/pybind/mgr/dashboard/services/ganesha.py b/src/pybind/mgr/dashboard/services/ganesha.py
|
||||
index e9144db406..764ebb3739 100644
|
||||
--- a/src/pybind/mgr/dashboard/services/ganesha.py
|
||||
+++ b/src/pybind/mgr/dashboard/services/ganesha.py
|
||||
@@ -69,7 +69,7 @@ class Ganesha(object):
|
||||
|
||||
@classmethod
|
||||
def get_ganesha_clusters(cls):
|
||||
- return [cluster_id for cluster_id in cls._get_clusters_locations()]
|
||||
+ return list(cls._get_clusters_locations())
|
||||
|
||||
@staticmethod
|
||||
def _get_orch_nfs_instances():
|
||||
@@ -325,7 +325,7 @@ class GaneshaConfParser(object):
|
||||
for key, val in block.items():
|
||||
if key == 'block_name':
|
||||
continue
|
||||
- elif key == '_blocks_':
|
||||
+ if key == '_blocks_':
|
||||
for blo in val:
|
||||
conf_str += GaneshaConfParser.write_block(blo, depth)
|
||||
elif val:
|
||||
@@ -693,21 +693,21 @@ class Export(object):
|
||||
result['attr_expiration_time'] = self.attr_expiration_time
|
||||
result['security_label'] = self.security_label
|
||||
if 'protocols' not in defaults:
|
||||
- result['protocols'] = [p for p in self.protocols]
|
||||
+ result['protocols'] = list(self.protocols)
|
||||
else:
|
||||
def_proto = defaults['protocols']
|
||||
if not isinstance(def_proto, list):
|
||||
def_proto = set([def_proto])
|
||||
if self.protocols != def_proto:
|
||||
- result['protocols'] = [p for p in self.protocols]
|
||||
+ result['protocols'] = list(self.protocols)
|
||||
if 'transports' not in defaults:
|
||||
- result['transports'] = [t for t in self.transports]
|
||||
+ result['transports'] = list(self.transports)
|
||||
else:
|
||||
def_transp = defaults['transports']
|
||||
if not isinstance(def_transp, list):
|
||||
def_transp = set([def_transp])
|
||||
if self.transports != def_transp:
|
||||
- result['transports'] = [t for t in self.transports]
|
||||
+ result['transports'] = list(self.transports)
|
||||
|
||||
result['_blocks_'] = [self.fsal.to_fsal_block()]
|
||||
result['_blocks_'].extend([client.to_client_block()
|
||||
@@ -737,14 +737,14 @@ class Export(object):
|
||||
'path': self.path,
|
||||
'fsal': self.fsal.to_dict(),
|
||||
'cluster_id': self.cluster_id,
|
||||
- 'daemons': sorted([d for d in self.daemons]),
|
||||
+ 'daemons': sorted(list(self.daemons)),
|
||||
'pseudo': self.pseudo,
|
||||
'tag': self.tag,
|
||||
'access_type': self.access_type,
|
||||
'squash': self.squash,
|
||||
'security_label': self.security_label,
|
||||
- 'protocols': sorted([p for p in self.protocols]),
|
||||
- 'transports': sorted([t for t in self.transports]),
|
||||
+ 'protocols': sorted(list(self.protocols)),
|
||||
+ 'transports': sorted(list(self.transports)),
|
||||
'clients': [client.to_dict() for client in self.clients]
|
||||
}
|
||||
|
||||
@@ -992,7 +992,7 @@ class GaneshaConf(object):
|
||||
return None
|
||||
|
||||
def list_daemons(self):
|
||||
- return [daemon_id for daemon_id in self.daemons_conf_blocks]
|
||||
+ return list(self.daemons_conf_blocks)
|
||||
|
||||
def reload_daemons(self, daemons):
|
||||
with mgr.rados.open_ioctx(self.rados_pool) as ioctx:
|
||||
diff --git a/src/pybind/mgr/dashboard/services/iscsi_client.py b/src/pybind/mgr/dashboard/services/iscsi_client.py
|
||||
index b82a51a3d4..c5a6dfa0e7 100644
|
||||
--- a/src/pybind/mgr/dashboard/services/iscsi_client.py
|
||||
+++ b/src/pybind/mgr/dashboard/services/iscsi_client.py
|
||||
@@ -12,7 +12,7 @@ try:
|
||||
except ImportError:
|
||||
from urllib.parse import urlparse
|
||||
|
||||
-from .iscsi_config import IscsiGatewaysConfig # pylint: disable=cyclic-import
|
||||
+from .iscsi_config import IscsiGatewaysConfig
|
||||
from ..settings import Settings
|
||||
from ..rest_client import RestClient
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/services/iscsi_config.py b/src/pybind/mgr/dashboard/services/iscsi_config.py
|
||||
index ab90048500..86bdfc770d 100644
|
||||
--- a/src/pybind/mgr/dashboard/services/iscsi_config.py
|
||||
+++ b/src/pybind/mgr/dashboard/services/iscsi_config.py
|
||||
@@ -57,7 +57,7 @@ class IscsiGatewaysConfig(object):
|
||||
"""
|
||||
for gateway_name, gateway_config in config['gateways'].items():
|
||||
if '.' not in gateway_name:
|
||||
- from .iscsi_client import IscsiClient
|
||||
+ from .iscsi_client import IscsiClient # pylint: disable=cyclic-import
|
||||
from ..rest_client import RequestException
|
||||
try:
|
||||
service_url = gateway_config['service_url']
|
||||
diff --git a/src/pybind/mgr/dashboard/services/progress.py b/src/pybind/mgr/dashboard/services/progress.py
|
||||
index d8cf7521fa..d7b9ed973b 100644
|
||||
--- a/src/pybind/mgr/dashboard/services/progress.py
|
||||
+++ b/src/pybind/mgr/dashboard/services/progress.py
|
||||
@@ -12,7 +12,7 @@ from __future__ import absolute_import
|
||||
from datetime import datetime
|
||||
import logging
|
||||
|
||||
-from . import rbd
|
||||
+from . import rbd # pylint: disable=no-name-in-module
|
||||
from .. import mgr
|
||||
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/services/rgw_client.py b/src/pybind/mgr/dashboard/services/rgw_client.py
|
||||
index 5507eb6800..aee18acc54 100644
|
||||
--- a/src/pybind/mgr/dashboard/services/rgw_client.py
|
||||
+++ b/src/pybind/mgr/dashboard/services/rgw_client.py
|
||||
@@ -16,7 +16,7 @@ from ..tools import build_url, dict_contains_path, json_str_to_object,\
|
||||
from .. import mgr
|
||||
|
||||
try:
|
||||
- from typing import Dict, List, Optional # pylint: disable=unused-import
|
||||
+ from typing import Dict, List, Optional
|
||||
except ImportError:
|
||||
pass # For typing only
|
||||
|
||||
@@ -303,6 +303,7 @@ class RgwClient(RestClient):
|
||||
if self.userid != RgwClient._SYSTEM_USERID:
|
||||
logger.info("Fetching new keys for user: %s", self.userid)
|
||||
keys = RgwClient.admin_instance().get_user_keys(self.userid)
|
||||
+ # pylint: disable=attribute-defined-outside-init
|
||||
self.auth = S3Auth(keys['access_key'], keys['secret_key'],
|
||||
service_url=self.service_url)
|
||||
else:
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/__init__.py b/src/pybind/mgr/dashboard/tests/__init__.py
|
||||
index 421378a155..8eb5bb8af1 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/__init__.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/__init__.py
|
||||
@@ -21,7 +21,7 @@ from ..services.auth import AuthManagerTool
|
||||
from ..services.exception import dashboard_exception_handler
|
||||
|
||||
from ..plugins import PLUGIN_MANAGER
|
||||
-from ..plugins import feature_toggles, debug # noqa # pylint: disable=unused-import
|
||||
+from ..plugins import feature_toggles, debug # noqa
|
||||
|
||||
|
||||
PLUGIN_MANAGER.hook.init()
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/helper.py b/src/pybind/mgr/dashboard/tests/helper.py
|
||||
index 9ec043d6be..06b83d42a8 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/helper.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/helper.py
|
||||
@@ -2,7 +2,7 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
try:
|
||||
- from typing import Dict, Any # pylint: disable=unused-import
|
||||
+ from typing import Dict, Any
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_access_control.py b/src/pybind/mgr/dashboard/tests/test_access_control.py
|
||||
index 0039efc167..81604a161e 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_access_control.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_access_control.py
|
||||
@@ -9,7 +9,7 @@ import unittest
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
-from . import CmdException, CLICommandTestMixin
|
||||
+from . import CmdException, CLICommandTestMixin # pylint: disable=no-name-in-module
|
||||
from .. import mgr
|
||||
from ..security import Scope, Permission
|
||||
from ..services.access_control import load_access_control_db, \
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_api_auditing.py b/src/pybind/mgr/dashboard/tests/test_api_auditing.py
|
||||
index 0416c03638..023ea7992a 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_api_auditing.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_api_auditing.py
|
||||
@@ -9,7 +9,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest.mock as mock
|
||||
|
||||
-from . import ControllerTestCase, KVStoreMockMixin
|
||||
+from . import ControllerTestCase, KVStoreMockMixin # pylint: disable=no-name-in-module
|
||||
from ..controllers import RESTController, Controller
|
||||
from ..tools import RequestLoggingTool
|
||||
from .. import mgr
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_cephfs.py b/src/pybind/mgr/dashboard/tests/test_cephfs.py
|
||||
index e9abda5380..778b0aa275 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_cephfs.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_cephfs.py
|
||||
@@ -6,7 +6,7 @@ except ImportError:
|
||||
from unittest.mock import Mock
|
||||
|
||||
from .. import mgr
|
||||
-from . import ControllerTestCase
|
||||
+from . import ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from ..controllers.cephfs import CephFS
|
||||
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_controllers.py b/src/pybind/mgr/dashboard/tests/test_controllers.py
|
||||
index 0e88047061..b14878ff2e 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_controllers.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_controllers.py
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
|
||||
-from . import ControllerTestCase
|
||||
+from . import ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from ..controllers import BaseController, RESTController, Controller, \
|
||||
ApiController, Endpoint
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_docs.py b/src/pybind/mgr/dashboard/tests/test_docs.py
|
||||
index a6e03b5267..ccb777aca5 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_docs.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_docs.py
|
||||
@@ -1,7 +1,7 @@
|
||||
# # -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
|
||||
-from . import ControllerTestCase
|
||||
+from . import ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from ..controllers import RESTController, ApiController, Endpoint, EndpointDoc, ControllerDoc
|
||||
from ..controllers.docs import Docs
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_erasure_code_profile.py b/src/pybind/mgr/dashboard/tests/test_erasure_code_profile.py
|
||||
index 557b7c1061..d266735e8f 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_erasure_code_profile.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_erasure_code_profile.py
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from .. import mgr
|
||||
-from . import ControllerTestCase
|
||||
+from . import ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from ..controllers.erasure_code_profile import ErasureCodeProfile
|
||||
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_exceptions.py b/src/pybind/mgr/dashboard/tests/test_exceptions.py
|
||||
index 2bb25da1bf..b42c356479 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_exceptions.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_exceptions.py
|
||||
@@ -5,7 +5,7 @@ import time
|
||||
|
||||
import rados
|
||||
|
||||
-from . import ControllerTestCase
|
||||
+from . import ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from ..services.ceph_service import SendCommandError
|
||||
from ..controllers import RESTController, Controller, Task, Endpoint
|
||||
from ..services.exception import handle_rados_error, handle_send_command_error, \
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_feature_toggles.py b/src/pybind/mgr/dashboard/tests/test_feature_toggles.py
|
||||
index 031d0ef839..23068c5eda 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_feature_toggles.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_feature_toggles.py
|
||||
@@ -7,7 +7,7 @@ try:
|
||||
except ImportError:
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
-from . import KVStoreMockMixin
|
||||
+from . import KVStoreMockMixin # pylint: disable=no-name-in-module
|
||||
from ..plugins.feature_toggles import FeatureToggles, Features
|
||||
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_ganesha.py b/src/pybind/mgr/dashboard/tests/test_ganesha.py
|
||||
index 03f1f5b551..44498ac40c 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_ganesha.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_ganesha.py
|
||||
@@ -9,7 +9,7 @@ except ImportError:
|
||||
from unittest.mock import MagicMock, Mock
|
||||
|
||||
import orchestrator
|
||||
-from . import KVStoreMockMixin
|
||||
+from . import KVStoreMockMixin # pylint: disable=no-name-in-module
|
||||
from .. import mgr
|
||||
from ..settings import Settings
|
||||
from ..services import ganesha
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_grafana.py b/src/pybind/mgr/dashboard/tests/test_grafana.py
|
||||
index 0eb46bf0f0..a5456905f2 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_grafana.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_grafana.py
|
||||
@@ -8,7 +8,7 @@ except ImportError:
|
||||
|
||||
from requests import RequestException
|
||||
|
||||
-from . import ControllerTestCase, KVStoreMockMixin
|
||||
+from . import ControllerTestCase, KVStoreMockMixin # pylint: disable=no-name-in-module
|
||||
from ..controllers.grafana import Grafana
|
||||
from ..grafana import GrafanaRestClient
|
||||
from ..settings import Settings
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_home.py b/src/pybind/mgr/dashboard/tests/test_home.py
|
||||
index c3088b7a65..c942eed9be 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_home.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_home.py
|
||||
@@ -8,7 +8,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest.mock as mock
|
||||
|
||||
-from . import ControllerTestCase, FakeFsMixin
|
||||
+from . import ControllerTestCase, FakeFsMixin # pylint: disable=no-name-in-module
|
||||
from .. import mgr
|
||||
|
||||
from ..controllers.home import HomeController, LanguageMixin
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_host.py b/src/pybind/mgr/dashboard/tests/test_host.py
|
||||
index ab7286074b..191c3f1245 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_host.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_host.py
|
||||
@@ -7,7 +7,7 @@ except ImportError:
|
||||
|
||||
from orchestrator import HostSpec
|
||||
|
||||
-from . import ControllerTestCase
|
||||
+from . import ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from ..controllers.host import get_hosts, Host, HostUi
|
||||
from .. import mgr
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_iscsi.py b/src/pybind/mgr/dashboard/tests/test_iscsi.py
|
||||
index 962ffeb684..72d64453ac 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_iscsi.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_iscsi.py
|
||||
@@ -10,7 +10,8 @@ try:
|
||||
except ImportError:
|
||||
import unittest.mock as mock
|
||||
|
||||
-from . import CmdException, ControllerTestCase, CLICommandTestMixin, KVStoreMockMixin
|
||||
+from . import CmdException, ControllerTestCase, CLICommandTestMixin, \
|
||||
+ KVStoreMockMixin # pylint: disable=no-name-in-module
|
||||
from .. import mgr
|
||||
from ..controllers.iscsi import Iscsi, IscsiTarget
|
||||
from ..services.iscsi_client import IscsiClient
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_orchestrator.py b/src/pybind/mgr/dashboard/tests/test_orchestrator.py
|
||||
index 714d59c085..9a9d179bbc 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_orchestrator.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_orchestrator.py
|
||||
@@ -6,7 +6,7 @@ except ImportError:
|
||||
|
||||
from orchestrator import InventoryHost
|
||||
|
||||
-from . import ControllerTestCase
|
||||
+from . import ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from .. import mgr
|
||||
from ..controllers.orchestrator import get_device_osd_map
|
||||
from ..controllers.orchestrator import Orchestrator
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_osd.py b/src/pybind/mgr/dashboard/tests/test_osd.py
|
||||
index aeb32ed576..063705ddbb 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_osd.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_osd.py
|
||||
@@ -11,11 +11,11 @@ except ImportError:
|
||||
from ceph.deployment.drive_group import DeviceSelection, DriveGroupSpec
|
||||
from ceph.deployment.service_spec import PlacementSpec
|
||||
|
||||
-from . import ControllerTestCase
|
||||
+from . import ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from ..controllers.osd import Osd
|
||||
from ..tools import NotificationQueue, TaskManager
|
||||
from .. import mgr
|
||||
-from .helper import update_dict
|
||||
+from .helper import update_dict # pylint: disable=import-error
|
||||
|
||||
try:
|
||||
from typing import List, Dict, Any # pylint: disable=unused-import
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_plugin_debug.py b/src/pybind/mgr/dashboard/tests/test_plugin_debug.py
|
||||
index 4985540046..cb4d1afc21 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_plugin_debug.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_plugin_debug.py
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
|
||||
-from . import CLICommandTestMixin, ControllerTestCase
|
||||
+from . import CLICommandTestMixin, ControllerTestCase # pylint: disable=no-name-in-module
|
||||
|
||||
|
||||
class TestPluginDebug(ControllerTestCase, CLICommandTestMixin):
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_pool.py b/src/pybind/mgr/dashboard/tests/test_pool.py
|
||||
index e33e436540..179a8feeed 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_pool.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_pool.py
|
||||
@@ -6,7 +6,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest.mock as mock
|
||||
|
||||
-from . import ControllerTestCase
|
||||
+from . import ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from ..controllers.pool import Pool
|
||||
from ..controllers.task import Task
|
||||
from ..tools import NotificationQueue, TaskManager
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_prometheus.py b/src/pybind/mgr/dashboard/tests/test_prometheus.py
|
||||
index 3385d66a97..ef669a6203 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_prometheus.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_prometheus.py
|
||||
@@ -5,7 +5,7 @@ try:
|
||||
except ImportError:
|
||||
from unittest.mock import patch
|
||||
|
||||
-from . import ControllerTestCase
|
||||
+from . import ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from .. import mgr
|
||||
from ..controllers.prometheus import Prometheus, PrometheusReceiver, PrometheusNotifications
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py b/src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py
|
||||
index ecb4856dc1..d7e0c7dd1e 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py
|
||||
@@ -6,7 +6,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest.mock as mock
|
||||
|
||||
-from . import ControllerTestCase
|
||||
+from . import ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from .. import mgr
|
||||
from ..controllers.summary import Summary
|
||||
from ..controllers.rbd_mirroring import RbdMirroring, RbdMirroringSummary, \
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_rest_tasks.py b/src/pybind/mgr/dashboard/tests/test_rest_tasks.py
|
||||
index e9d7907f05..aa158cd288 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_rest_tasks.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_rest_tasks.py
|
||||
@@ -8,7 +8,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest.mock as mock
|
||||
|
||||
-from . import ControllerTestCase
|
||||
+from . import ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from ..controllers import Controller, RESTController, Task
|
||||
from ..controllers.task import Task as TaskController
|
||||
from ..services import progress
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_rgw.py b/src/pybind/mgr/dashboard/tests/test_rgw.py
|
||||
index 2c90e7d11b..11818ca2b7 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_rgw.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_rgw.py
|
||||
@@ -3,7 +3,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest.mock as mock
|
||||
|
||||
-from . import ControllerTestCase
|
||||
+from . import ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from ..controllers.rgw import RgwUser
|
||||
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_rgw_client.py b/src/pybind/mgr/dashboard/tests/test_rgw_client.py
|
||||
index d69ab2f48d..fa711b45ca 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_rgw_client.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_rgw_client.py
|
||||
@@ -9,7 +9,7 @@ except ImportError:
|
||||
|
||||
from ..services.rgw_client import RgwClient, _parse_frontend_config
|
||||
from ..settings import Settings
|
||||
-from . import KVStoreMockMixin
|
||||
+from . import KVStoreMockMixin # pylint: disable=no-name-in-module
|
||||
|
||||
|
||||
class RgwClientTest(unittest.TestCase, KVStoreMockMixin):
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_settings.py b/src/pybind/mgr/dashboard/tests/test_settings.py
|
||||
index da54a20655..abdb059c1d 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_settings.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_settings.py
|
||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import
|
||||
|
||||
import errno
|
||||
import unittest
|
||||
-from . import KVStoreMockMixin, ControllerTestCase
|
||||
+from . import KVStoreMockMixin, ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from .. import settings
|
||||
from ..controllers.settings import Settings as SettingsController
|
||||
from ..settings import Settings, handle_option_command
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_sso.py b/src/pybind/mgr/dashboard/tests/test_sso.py
|
||||
index f8681b89ed..e8141a09cc 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_sso.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_sso.py
|
||||
@@ -5,7 +5,8 @@ from __future__ import absolute_import
|
||||
import errno
|
||||
import unittest
|
||||
|
||||
-from . import CmdException, exec_dashboard_cmd, KVStoreMockMixin
|
||||
+from . import CmdException, exec_dashboard_cmd, \
|
||||
+ KVStoreMockMixin # pylint: disable=no-name-in-module
|
||||
from ..services.sso import handle_sso_command, load_sso_db
|
||||
|
||||
|
||||
diff --git a/src/pybind/mgr/dashboard/tests/test_tools.py b/src/pybind/mgr/dashboard/tests/test_tools.py
|
||||
index 0f27ec8e63..340ff8c41d 100644
|
||||
--- a/src/pybind/mgr/dashboard/tests/test_tools.py
|
||||
+++ b/src/pybind/mgr/dashboard/tests/test_tools.py
|
||||
@@ -10,7 +10,7 @@ try:
|
||||
except ImportError:
|
||||
from unittest.mock import patch
|
||||
|
||||
-from . import ControllerTestCase
|
||||
+from . import ControllerTestCase # pylint: disable=no-name-in-module
|
||||
from ..services.exception import handle_rados_error
|
||||
from ..controllers import RESTController, ApiController, Controller, \
|
||||
BaseController, Proxy
|
||||
diff --git a/src/pybind/mgr/dashboard/tools.py b/src/pybind/mgr/dashboard/tools.py
|
||||
index 2b6d92ca55..d9a2d813c0 100644
|
||||
--- a/src/pybind/mgr/dashboard/tools.py
|
||||
+++ b/src/pybind/mgr/dashboard/tools.py
|
||||
@@ -30,7 +30,7 @@ from .services.auth import JwtManager
|
||||
|
||||
try:
|
||||
from typing import Any, AnyStr, Callable, DefaultDict, Deque,\
|
||||
- Dict, List, Set, Tuple, Union # noqa pylint: disable=unused-import
|
||||
+ Dict, List, Set, Tuple, Union # noqa
|
||||
except ImportError:
|
||||
pass # For typing only
|
||||
|
10
ceph/remove-distro-version-detection.patch
Normal file
10
ceph/remove-distro-version-detection.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/src/common/util.cc 2018-05-29 14:04:02.000000000 +0200
|
||||
+++ b/src/common/util.cc 2018-06-04 13:45:52.279495745 +0200
|
||||
@@ -96,7 +96,6 @@ static bool os_release_parse(map<string,
|
||||
static const map<string, string> kvm = {
|
||||
{ "distro", "ID=" },
|
||||
{ "distro_description", "PRETTY_NAME=" },
|
||||
- { "distro_version", "VERSION_ID=" }
|
||||
};
|
||||
|
||||
FILE *fp = fopen("/etc/os-release", "r");
|
23
ceph/suppress-pylint-warnings.patch
Normal file
23
ceph/suppress-pylint-warnings.patch
Normal file
@ -0,0 +1,23 @@
|
||||
--- a/src/pybind/mgr/dashboard/.pylintrc 2019-12-06 17:42:34.000000000 +0100
|
||||
+++ b/src/pybind/mgr/dashboard/.pylintrc 2020-01-03 13:55:54.511393504 +0100
|
||||
@@ -119,7 +119,11 @@ disable=import-star-module-level,
|
||||
too-many-arguments,
|
||||
too-many-locals,
|
||||
too-many-statements,
|
||||
- useless-object-inheritance
|
||||
+ useless-object-inheritance,
|
||||
+ no-else-raise,
|
||||
+ multiple-statements,
|
||||
+ unused-argument,
|
||||
+ protected-access
|
||||
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
--- a/src/pybind/mgr/dashboard/services/rgw_client.py 2019-12-06 17:42:34.000000000 +0100
|
||||
+++ b/src/pybind/mgr/dashboard/services/rgw_client.py 2020-01-03 15:13:15.266131061 +0100
|
||||
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
+# pylint: disable=unused-argument
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re
|
35
ceph/use-system-zstd-and-fix-zstd-1.4.0-compatbility.patch
Normal file
35
ceph/use-system-zstd-and-fix-zstd-1.4.0-compatbility.patch
Normal file
@ -0,0 +1,35 @@
|
||||
--- a/src/compressor/zstd/ZstdCompressor.h 2019-04-25 20:15:48.000000000 +0200
|
||||
+++ b/src/compressor/zstd/ZstdCompressor.h 2019-07-17 19:11:33.177014923 +0200
|
||||
@@ -16,7 +16,7 @@
|
||||
#define CEPH_ZSTDCOMPRESSOR_H
|
||||
|
||||
#define ZSTD_STATIC_LINKING_ONLY
|
||||
-#include "zstd/lib/zstd.h"
|
||||
+#include <zstd.h>
|
||||
|
||||
#include "include/buffer.h"
|
||||
#include "include/encoding.h"
|
||||
@@ -30,7 +30,13 @@ class ZstdCompressor : public Compressor
|
||||
|
||||
int compress(const bufferlist &src, bufferlist &dst) override {
|
||||
ZSTD_CStream *s = ZSTD_createCStream();
|
||||
- ZSTD_initCStream_srcSize(s, COMPRESSION_LEVEL, src.length());
|
||||
+
|
||||
+ // ZSTD_initCStream_srcSize(s, COMPRESSION_LEVEL, src.length());
|
||||
+ ZSTD_CCtx_reset(s, ZSTD_reset_session_only);
|
||||
+ ZSTD_CCtx_refCDict(s, NULL); // clear the dictionary (if any)
|
||||
+ ZSTD_CCtx_setParameter(s, ZSTD_c_compressionLevel, COMPRESSION_LEVEL);
|
||||
+ ZSTD_CCtx_setPledgedSrcSize(s, src.length());
|
||||
+
|
||||
auto p = src.begin();
|
||||
size_t left = src.length();
|
||||
|
||||
@@ -48,7 +54,7 @@ class ZstdCompressor : public Compressor
|
||||
inbuf.size = p.get_ptr_and_advance(left, (const char**)&inbuf.src);
|
||||
left -= inbuf.size;
|
||||
ZSTD_EndDirective const zed = (left==0) ? ZSTD_e_end : ZSTD_e_continue;
|
||||
- size_t r = ZSTD_compress_generic(s, &outbuf, &inbuf, zed);
|
||||
+ size_t r = ZSTD_compressStream2(s, &outbuf, &inbuf, zed);
|
||||
if (ZSTD_isError(r)) {
|
||||
return -EINVAL;
|
||||
}
|
10
ceph/use-threadsafe-death-tests-objectstore-memstore.patch
Normal file
10
ceph/use-threadsafe-death-tests-objectstore-memstore.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/src/test/test_objectstore_memstore.sh 2019-04-25 20:15:48.000000000 +0200
|
||||
+++ b/src/test/test_objectstore_memstore.sh 2019-07-14 21:18:32.845040824 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
rm -rf memstore.test_temp_dir
|
||||
-ceph_test_objectstore --gtest_filter=\*/0
|
||||
+ceph_test_objectstore --gtest_filter=\*/0 --gtest_death_test_style=threadsafe
|
||||
|
||||
echo OK
|
18
chromium/remove-no-opaque-pointers-flag.patch
Normal file
18
chromium/remove-no-opaque-pointers-flag.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- chromium-102.0.5005.61/build/config/compiler/BUILD.gn.orig 2022-05-19 10:35:52.991415777 +0000
|
||||
+++ chromium-102.0.5005.61/build/config/compiler/BUILD.gn 2022-05-19 10:36:11.102017131 +0000
|
||||
@@ -1538,15 +1538,6 @@ config("default_warnings") {
|
||||
cflags += [ "-Wno-deprecated-non-prototype" ]
|
||||
}
|
||||
|
||||
- if (!is_nacl && !(is_chromeos ||
|
||||
- default_toolchain == "//build/toolchain/cros:target")) {
|
||||
- # TODO(https://crbug.com/1316298): Re-enable once test failure is figured out
|
||||
- cflags += [
|
||||
- "-Xclang",
|
||||
- "-no-opaque-pointers",
|
||||
- ]
|
||||
- }
|
||||
-
|
||||
if (is_fuchsia) {
|
||||
# TODO(https://bugs.chromium.org/p/fuchsia/issues/detail?id=77383)
|
||||
cflags += [ "-Wno-deprecated-copy" ]
|
@ -0,0 +1,101 @@
|
||||
From f4e7c84467152624a288351321c8664dbf3364af Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Witschel <diabonas@archlinux.org>
|
||||
Date: Sat, 21 Nov 2020 11:41:26 +0100
|
||||
Subject: [PATCH 1/2] mount.cifs: update the cap bounding set only when
|
||||
CAP_SETPCAP is given
|
||||
|
||||
libcap-ng 0.8.1 tightened the error checking on capng_apply, returning an error
|
||||
of -4 when trying to update the capability bounding set without having the
|
||||
CAP_SETPCAP capability to be able to do so. Previous versions of libcap-ng
|
||||
silently skipped updating the bounding set and only updated the normal
|
||||
CAPNG_SELECT_CAPS capabilities instead.
|
||||
|
||||
Check beforehand whether we have CAP_SETPCAP, in which case we can use
|
||||
CAPNG_SELECT_BOTH to update both the normal capabilities and the bounding set.
|
||||
Otherwise, we can at least update the normal capabilities, but refrain from
|
||||
trying to update the bounding set to avoid getting an error.
|
||||
|
||||
Signed-off-by: Jonas Witschel <diabonas@archlinux.org>
|
||||
---
|
||||
mount.cifs.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mount.cifs.c b/mount.cifs.c
|
||||
index 4feb397..88b8b69 100644
|
||||
--- a/mount.cifs.c
|
||||
+++ b/mount.cifs.c
|
||||
@@ -338,6 +338,8 @@ static int set_password(struct parsed_mount_info *parsed_info, const char *src)
|
||||
static int
|
||||
drop_capabilities(int parent)
|
||||
{
|
||||
+ capng_select_t set = CAPNG_SELECT_CAPS;
|
||||
+
|
||||
capng_setpid(getpid());
|
||||
capng_clear(CAPNG_SELECT_BOTH);
|
||||
if (parent) {
|
||||
@@ -355,7 +357,10 @@ drop_capabilities(int parent)
|
||||
return EX_SYSERR;
|
||||
}
|
||||
}
|
||||
- if (capng_apply(CAPNG_SELECT_BOTH)) {
|
||||
+ if (capng_have_capability(CAPNG_EFFECTIVE, CAP_SETPCAP)) {
|
||||
+ set = CAPNG_SELECT_BOTH;
|
||||
+ }
|
||||
+ if (capng_apply(set)) {
|
||||
fprintf(stderr, "Unable to apply new capability set.\n");
|
||||
return EX_SYSERR;
|
||||
}
|
||||
--
|
||||
2.29.2
|
||||
|
||||
|
||||
From 64dfbafe7a0639a96d67f0b840b6e6498e1f68a9 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Witschel <diabonas@archlinux.org>
|
||||
Date: Sat, 21 Nov 2020 11:48:33 +0100
|
||||
Subject: [PATCH 2/2] cifs.upall: update the cap bounding set only when
|
||||
CAP_SETPCAP is given
|
||||
|
||||
libcap-ng 0.8.1 tightened the error checking on capng_apply, returning an error
|
||||
of -4 when trying to update the capability bounding set without having the
|
||||
CAP_SETPCAP capability to be able to do so. Previous versions of libcap-ng
|
||||
silently skipped updating the bounding set and only updated the normal
|
||||
CAPNG_SELECT_CAPS capabilities instead.
|
||||
|
||||
Check beforehand whether we have CAP_SETPCAP, in which case we can use
|
||||
CAPNG_SELECT_BOTH to update both the normal capabilities and the bounding set.
|
||||
Otherwise, we can at least update the normal capabilities, but refrain from
|
||||
trying to update the bounding set to avoid getting an error.
|
||||
|
||||
Signed-off-by: Jonas Witschel <diabonas@archlinux.org>
|
||||
---
|
||||
cifs.upcall.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cifs.upcall.c b/cifs.upcall.c
|
||||
index 1559434..af1a0b0 100644
|
||||
--- a/cifs.upcall.c
|
||||
+++ b/cifs.upcall.c
|
||||
@@ -88,6 +88,8 @@ typedef enum _sectype {
|
||||
static int
|
||||
trim_capabilities(bool need_environ)
|
||||
{
|
||||
+ capng_select_t set = CAPNG_SELECT_CAPS;
|
||||
+
|
||||
capng_clear(CAPNG_SELECT_BOTH);
|
||||
|
||||
/* SETUID and SETGID to change uid, gid, and grouplist */
|
||||
@@ -105,7 +107,10 @@ trim_capabilities(bool need_environ)
|
||||
return 1;
|
||||
}
|
||||
|
||||
- if (capng_apply(CAPNG_SELECT_BOTH)) {
|
||||
+ if (capng_have_capability(CAPNG_EFFECTIVE, CAP_SETPCAP)) {
|
||||
+ set = CAPNG_SELECT_BOTH;
|
||||
+ }
|
||||
+ if (capng_apply(set)) {
|
||||
syslog(LOG_ERR, "%s: Unable to apply capability set: %m\n", __func__);
|
||||
return 1;
|
||||
}
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,58 @@
|
||||
From 0fddcee4b1b9c9f16b3cfe1b2daec87d2b8b19dd Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Koch <mail@alexanderkoch.net>
|
||||
Date: Wed, 16 Dec 2020 18:02:31 +0100
|
||||
Subject: [PATCH] cifs.upcall: drop bounding capabilities only if CAP_SETPCAP
|
||||
is given
|
||||
|
||||
Make drop_call_capabilities() in cifs.upcall update the bounding capabilities
|
||||
only if CAP_SETCAP is present.
|
||||
|
||||
This is an addendum to the patch recently provided in [1]. Without this
|
||||
additional change, cifs.upcall can still fail while trying to mount a CIFS
|
||||
network share with krb5:
|
||||
|
||||
kernel: CIFS: Attempting to mount //server.domain.lan/myshare
|
||||
cifs.upcall[39484]: key description: cifs.spnego;0;0;39010000;ver=0x2;host=server.domain.lan>
|
||||
cifs.upcall[39484]: ver=2
|
||||
cifs.upcall[39484]: host=server.domain.lan
|
||||
cifs.upcall[39484]: ip=172.22.3.14
|
||||
cifs.upcall[39484]: sec=1
|
||||
cifs.upcall[39484]: uid=1000
|
||||
cifs.upcall[39484]: creduid=1000
|
||||
cifs.upcall[39484]: user=username
|
||||
cifs.upcall[39484]: pid=39481
|
||||
cifs.upcall[39484]: get_cachename_from_process_env: pathname=/proc/39481/environ
|
||||
cifs.upcall[39484]: get_cachename_from_process_env: cachename = FILE:/tmp/.krb5cc_1000
|
||||
cifs.upcall[39484]: drop_all_capabilities: Unable to apply capability set: Success
|
||||
cifs.upcall[39484]: Exit status 1
|
||||
|
||||
[1] https://marc.info/?l=linux-cifs&m=160595758021261
|
||||
|
||||
Signed-off-by: Alexander Koch <mail@alexanderkoch.net>
|
||||
Signed-off-by: Jonas Witschel <diabonas@archlinux.org>
|
||||
---
|
||||
cifs.upcall.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cifs.upcall.c b/cifs.upcall.c
|
||||
index 1559434..b62ab50 100644
|
||||
--- a/cifs.upcall.c
|
||||
+++ b/cifs.upcall.c
|
||||
@@ -115,8 +115,13 @@ trim_capabilities(bool need_environ)
|
||||
static int
|
||||
drop_all_capabilities(void)
|
||||
{
|
||||
+ capng_select_t set = CAPNG_SELECT_CAPS;
|
||||
+
|
||||
capng_clear(CAPNG_SELECT_BOTH);
|
||||
- if (capng_apply(CAPNG_SELECT_BOTH)) {
|
||||
+ if (capng_have_capability(CAPNG_EFFECTIVE, CAP_SETPCAP)) {
|
||||
+ set = CAPNG_SELECT_BOTH;
|
||||
+ }
|
||||
+ if (capng_apply(set)) {
|
||||
syslog(LOG_ERR, "%s: Unable to apply capability set: %m\n", __func__);
|
||||
return 1;
|
||||
}
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,493 @@
|
||||
From 7f9711dd902a239c499682015d708f73ec884af2 Mon Sep 17 00:00:00 2001
|
||||
From: Aurelien Aptel <aaptel@suse.com>
|
||||
Date: Wed, 21 Apr 2021 16:22:15 +0200
|
||||
Subject: [PATCH] cifs.upcall: fix regression in kerberos mount
|
||||
|
||||
The fix for CVE-2021-20208 in commit e461afd ("cifs.upcall: try to use
|
||||
container ipc/uts/net/pid/mnt/user namespaces") introduced a
|
||||
regression for kerberos mounts when cifs-utils is built with
|
||||
libcap-ng. It makes mount fail with ENOKEY "Required key not
|
||||
available".
|
||||
|
||||
Current state:
|
||||
|
||||
mount.cifs
|
||||
'---> mount() ---> kernel
|
||||
negprot, session setup (need security blob for krb)
|
||||
request_key("cifs.spnego", payload="pid=%d;username=...")
|
||||
upcall
|
||||
/sbin/request-key <--------------'
|
||||
reads /etc/request-keys.conf
|
||||
dispatch cifs.spnego request
|
||||
calls /usr/sbin/cifs.upcall <key id>
|
||||
- drop privileges (capabilities)
|
||||
- fetch keyid
|
||||
- parse payload
|
||||
- switch to mount.cifs namespaces
|
||||
- call krb5_xxx() funcs
|
||||
- generate security blob
|
||||
- set key value to security blob
|
||||
'-----------------------------------> kernel
|
||||
put blob in session setup packet
|
||||
continue auth
|
||||
open tcon
|
||||
get share root
|
||||
setup superblock
|
||||
mount.cifs mount() returns <-----------'
|
||||
|
||||
By the time cifs.upcall tries to switch to namespaces, enough
|
||||
capabilities have dropped in trim_capabilities() that it makes setns()
|
||||
fail with EPERM.
|
||||
|
||||
setns() requires CAP_SYS_ADMIN.
|
||||
|
||||
With libcap trim_capabilities() is a no-op.
|
||||
|
||||
This fix:
|
||||
|
||||
- moves the namespace switch earlier so that operations like
|
||||
setgroups(), setgid(), scanning of pid environment, ... happens in the
|
||||
contained namespaces.
|
||||
- moves trim_capabilities() after the namespace switch
|
||||
- moves the string processing to decode the key request payload in a
|
||||
child process with minimum capabilities. the decoded data is shared
|
||||
with the parent process via shared memory obtained with mmap().
|
||||
|
||||
Fixes: e461afd ("cifs.upcall: try to use container ipc/uts/net/pid/mnt/user namespaces")
|
||||
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
|
||||
---
|
||||
cifs.upcall.c | 214 ++++++++++++++++++++++++++++++++------------------
|
||||
1 file changed, 139 insertions(+), 75 deletions(-)
|
||||
|
||||
diff --git a/cifs.upcall.c b/cifs.upcall.c
|
||||
index e413934..ad04301 100644
|
||||
--- a/cifs.upcall.c
|
||||
+++ b/cifs.upcall.c
|
||||
@@ -52,6 +52,9 @@
|
||||
#include <stdbool.h>
|
||||
#include <errno.h>
|
||||
#include <sched.h>
|
||||
+#include <sys/mman.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/wait.h>
|
||||
|
||||
#include "data_blob.h"
|
||||
#include "spnego.h"
|
||||
@@ -787,6 +790,25 @@ handle_krb5_mech(const char *oid, const char *host, DATA_BLOB * secblob,
|
||||
return retval;
|
||||
}
|
||||
|
||||
+
|
||||
+
|
||||
+struct decoded_args {
|
||||
+ int ver;
|
||||
+ char hostname[NI_MAXHOST + 1];
|
||||
+ char ip[NI_MAXHOST + 1];
|
||||
+
|
||||
+/* Max user name length. */
|
||||
+#define MAX_USERNAME_SIZE 256
|
||||
+ char username[MAX_USERNAME_SIZE + 1];
|
||||
+
|
||||
+ uid_t uid;
|
||||
+ uid_t creduid;
|
||||
+ pid_t pid;
|
||||
+ sectype_t sec;
|
||||
+
|
||||
+/*
|
||||
+ * Flags to keep track of what was provided
|
||||
+ */
|
||||
#define DKD_HAVE_HOSTNAME 0x1
|
||||
#define DKD_HAVE_VERSION 0x2
|
||||
#define DKD_HAVE_SEC 0x4
|
||||
@@ -796,23 +818,13 @@ handle_krb5_mech(const char *oid, const char *host, DATA_BLOB * secblob,
|
||||
#define DKD_HAVE_CREDUID 0x40
|
||||
#define DKD_HAVE_USERNAME 0x80
|
||||
#define DKD_MUSTHAVE_SET (DKD_HAVE_HOSTNAME|DKD_HAVE_VERSION|DKD_HAVE_SEC)
|
||||
-
|
||||
-struct decoded_args {
|
||||
- int ver;
|
||||
- char *hostname;
|
||||
- char *ip;
|
||||
- char *username;
|
||||
- uid_t uid;
|
||||
- uid_t creduid;
|
||||
- pid_t pid;
|
||||
- sectype_t sec;
|
||||
+ int have;
|
||||
};
|
||||
|
||||
static unsigned int
|
||||
-decode_key_description(const char *desc, struct decoded_args *arg)
|
||||
+__decode_key_description(const char *desc, struct decoded_args *arg)
|
||||
{
|
||||
- int len;
|
||||
- int retval = 0;
|
||||
+ size_t len;
|
||||
char *pos;
|
||||
const char *tkn = desc;
|
||||
|
||||
@@ -826,13 +838,13 @@ decode_key_description(const char *desc, struct decoded_args *arg)
|
||||
len = pos - tkn;
|
||||
|
||||
len -= 5;
|
||||
- free(arg->hostname);
|
||||
- arg->hostname = strndup(tkn + 5, len);
|
||||
- if (arg->hostname == NULL) {
|
||||
- syslog(LOG_ERR, "Unable to allocate memory");
|
||||
+ if (len > sizeof(arg->hostname)-1) {
|
||||
+ syslog(LOG_ERR, "host= value too long for buffer");
|
||||
return 1;
|
||||
}
|
||||
- retval |= DKD_HAVE_HOSTNAME;
|
||||
+ memset(arg->hostname, 0, sizeof(arg->hostname));
|
||||
+ strncpy(arg->hostname, tkn + 5, len);
|
||||
+ arg->have |= DKD_HAVE_HOSTNAME;
|
||||
syslog(LOG_DEBUG, "host=%s", arg->hostname);
|
||||
} else if (!strncmp(tkn, "ip4=", 4) || !strncmp(tkn, "ip6=", 4)) {
|
||||
if (pos == NULL)
|
||||
@@ -841,13 +853,13 @@ decode_key_description(const char *desc, struct decoded_args *arg)
|
||||
len = pos - tkn;
|
||||
|
||||
len -= 4;
|
||||
- free(arg->ip);
|
||||
- arg->ip = strndup(tkn + 4, len);
|
||||
- if (arg->ip == NULL) {
|
||||
- syslog(LOG_ERR, "Unable to allocate memory");
|
||||
+ if (len > sizeof(arg->ip)-1) {
|
||||
+ syslog(LOG_ERR, "ip[46]= value too long for buffer");
|
||||
return 1;
|
||||
}
|
||||
- retval |= DKD_HAVE_IP;
|
||||
+ memset(arg->ip, 0, sizeof(arg->ip));
|
||||
+ strncpy(arg->ip, tkn + 4, len);
|
||||
+ arg->have |= DKD_HAVE_IP;
|
||||
syslog(LOG_DEBUG, "ip=%s", arg->ip);
|
||||
} else if (strncmp(tkn, "user=", 5) == 0) {
|
||||
if (pos == NULL)
|
||||
@@ -856,13 +868,13 @@ decode_key_description(const char *desc, struct decoded_args *arg)
|
||||
len = pos - tkn;
|
||||
|
||||
len -= 5;
|
||||
- free(arg->username);
|
||||
- arg->username = strndup(tkn + 5, len);
|
||||
- if (arg->username == NULL) {
|
||||
- syslog(LOG_ERR, "Unable to allocate memory");
|
||||
+ if (len > sizeof(arg->username)-1) {
|
||||
+ syslog(LOG_ERR, "user= value too long for buffer");
|
||||
return 1;
|
||||
}
|
||||
- retval |= DKD_HAVE_USERNAME;
|
||||
+ memset(arg->username, 0, sizeof(arg->username));
|
||||
+ strncpy(arg->username, tkn + 5, len);
|
||||
+ arg->have |= DKD_HAVE_USERNAME;
|
||||
syslog(LOG_DEBUG, "user=%s", arg->username);
|
||||
} else if (strncmp(tkn, "pid=", 4) == 0) {
|
||||
errno = 0;
|
||||
@@ -873,13 +885,13 @@ decode_key_description(const char *desc, struct decoded_args *arg)
|
||||
return 1;
|
||||
}
|
||||
syslog(LOG_DEBUG, "pid=%u", arg->pid);
|
||||
- retval |= DKD_HAVE_PID;
|
||||
+ arg->have |= DKD_HAVE_PID;
|
||||
} else if (strncmp(tkn, "sec=", 4) == 0) {
|
||||
if (strncmp(tkn + 4, "krb5", 4) == 0) {
|
||||
- retval |= DKD_HAVE_SEC;
|
||||
+ arg->have |= DKD_HAVE_SEC;
|
||||
arg->sec = KRB5;
|
||||
} else if (strncmp(tkn + 4, "mskrb5", 6) == 0) {
|
||||
- retval |= DKD_HAVE_SEC;
|
||||
+ arg->have |= DKD_HAVE_SEC;
|
||||
arg->sec = MS_KRB5;
|
||||
}
|
||||
syslog(LOG_DEBUG, "sec=%d", arg->sec);
|
||||
@@ -891,7 +903,7 @@ decode_key_description(const char *desc, struct decoded_args *arg)
|
||||
strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
- retval |= DKD_HAVE_UID;
|
||||
+ arg->have |= DKD_HAVE_UID;
|
||||
syslog(LOG_DEBUG, "uid=%u", arg->uid);
|
||||
} else if (strncmp(tkn, "creduid=", 8) == 0) {
|
||||
errno = 0;
|
||||
@@ -901,7 +913,7 @@ decode_key_description(const char *desc, struct decoded_args *arg)
|
||||
strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
- retval |= DKD_HAVE_CREDUID;
|
||||
+ arg->have |= DKD_HAVE_CREDUID;
|
||||
syslog(LOG_DEBUG, "creduid=%u", arg->creduid);
|
||||
} else if (strncmp(tkn, "ver=", 4) == 0) { /* if version */
|
||||
errno = 0;
|
||||
@@ -911,14 +923,56 @@ decode_key_description(const char *desc, struct decoded_args *arg)
|
||||
strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
- retval |= DKD_HAVE_VERSION;
|
||||
+ arg->have |= DKD_HAVE_VERSION;
|
||||
syslog(LOG_DEBUG, "ver=%d", arg->ver);
|
||||
}
|
||||
if (pos == NULL)
|
||||
break;
|
||||
tkn = pos + 1;
|
||||
} while (tkn);
|
||||
- return retval;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static unsigned int
|
||||
+decode_key_description(const char *desc, struct decoded_args **arg)
|
||||
+{
|
||||
+ pid_t pid;
|
||||
+ pid_t rc;
|
||||
+ int status;
|
||||
+
|
||||
+ /*
|
||||
+ * Do all the decoding/string processing in a child process
|
||||
+ * with low privileges.
|
||||
+ */
|
||||
+
|
||||
+ *arg = mmap(NULL, sizeof(struct decoded_args), PROT_READ | PROT_WRITE,
|
||||
+ MAP_ANONYMOUS | MAP_SHARED, -1, 0);
|
||||
+ if (*arg == MAP_FAILED) {
|
||||
+ syslog(LOG_ERR, "%s: mmap failed: %s", __func__, strerror(errno));
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ pid = fork();
|
||||
+ if (pid < 0) {
|
||||
+ syslog(LOG_ERR, "%s: fork failed: %s", __func__, strerror(errno));
|
||||
+ munmap(*arg, sizeof(struct decoded_args));
|
||||
+ *arg = NULL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (pid == 0) {
|
||||
+ /* do the parsing in child */
|
||||
+ drop_all_capabilities();
|
||||
+ exit(__decode_key_description(desc, *arg));
|
||||
+ }
|
||||
+
|
||||
+ rc = waitpid(pid, &status, 0);
|
||||
+ if (rc < 0 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) {
|
||||
+ munmap(*arg, sizeof(struct decoded_args));
|
||||
+ *arg = NULL;
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static int setup_key(const key_serial_t key, const void *data, size_t datalen)
|
||||
@@ -1098,7 +1152,7 @@ int main(const int argc, char *const argv[])
|
||||
bool try_dns = false, legacy_uid = false , env_probe = true;
|
||||
char *buf;
|
||||
char hostbuf[NI_MAXHOST], *host;
|
||||
- struct decoded_args arg;
|
||||
+ struct decoded_args *arg = NULL;
|
||||
const char *oid;
|
||||
uid_t uid;
|
||||
char *keytab_name = NULL;
|
||||
@@ -1109,7 +1163,6 @@ int main(const int argc, char *const argv[])
|
||||
const char *key_descr = NULL;
|
||||
|
||||
hostbuf[0] = '\0';
|
||||
- memset(&arg, 0, sizeof(arg));
|
||||
|
||||
openlog(prog, 0, LOG_DAEMON);
|
||||
|
||||
@@ -1150,9 +1203,6 @@ int main(const int argc, char *const argv[])
|
||||
}
|
||||
}
|
||||
|
||||
- if (trim_capabilities(env_probe))
|
||||
- goto out;
|
||||
-
|
||||
/* is there a key? */
|
||||
if (argc <= optind) {
|
||||
usage();
|
||||
@@ -1178,6 +1228,10 @@ int main(const int argc, char *const argv[])
|
||||
|
||||
syslog(LOG_DEBUG, "key description: %s", buf);
|
||||
|
||||
+ /*
|
||||
+ * If we are requested a simple DNS query, do it and exit
|
||||
+ */
|
||||
+
|
||||
if (strncmp(buf, "cifs.resolver", sizeof("cifs.resolver") - 1) == 0)
|
||||
key_descr = ".cifs.resolver";
|
||||
else if (strncmp(buf, "dns_resolver", sizeof("dns_resolver") - 1) == 0)
|
||||
@@ -1187,33 +1241,42 @@ int main(const int argc, char *const argv[])
|
||||
goto out;
|
||||
}
|
||||
|
||||
- have = decode_key_description(buf, &arg);
|
||||
+ /*
|
||||
+ * Otherwise, it's a spnego key request
|
||||
+ */
|
||||
+
|
||||
+ rc = decode_key_description(buf, &arg);
|
||||
free(buf);
|
||||
- if ((have & DKD_MUSTHAVE_SET) != DKD_MUSTHAVE_SET) {
|
||||
+ if (rc) {
|
||||
+ syslog(LOG_ERR, "failed to decode key description");
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ if ((arg->have & DKD_MUSTHAVE_SET) != DKD_MUSTHAVE_SET) {
|
||||
syslog(LOG_ERR, "unable to get necessary params from key "
|
||||
"description (0x%x)", have);
|
||||
rc = 1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- if (arg.ver > CIFS_SPNEGO_UPCALL_VERSION) {
|
||||
+ if (arg->ver > CIFS_SPNEGO_UPCALL_VERSION) {
|
||||
syslog(LOG_ERR, "incompatible kernel upcall version: 0x%x",
|
||||
- arg.ver);
|
||||
+ arg->ver);
|
||||
rc = 1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- if (strlen(arg.hostname) >= NI_MAXHOST) {
|
||||
+ if (strlen(arg->hostname) >= NI_MAXHOST) {
|
||||
syslog(LOG_ERR, "hostname provided by kernel is too long");
|
||||
rc = 1;
|
||||
goto out;
|
||||
|
||||
}
|
||||
|
||||
- if (!legacy_uid && (have & DKD_HAVE_CREDUID))
|
||||
- uid = arg.creduid;
|
||||
- else if (have & DKD_HAVE_UID)
|
||||
- uid = arg.uid;
|
||||
+ if (!legacy_uid && (arg->have & DKD_HAVE_CREDUID))
|
||||
+ uid = arg->creduid;
|
||||
+ else if (arg->have & DKD_HAVE_UID)
|
||||
+ uid = arg->uid;
|
||||
else {
|
||||
/* no uid= or creduid= parm -- something is wrong */
|
||||
syslog(LOG_ERR, "No uid= or creduid= parm specified");
|
||||
@@ -1221,6 +1284,21 @@ int main(const int argc, char *const argv[])
|
||||
goto out;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Change to the process's namespace. This means that things will work
|
||||
+ * acceptably in containers, because we'll be looking at the correct
|
||||
+ * filesystem and have the correct network configuration.
|
||||
+ */
|
||||
+ rc = switch_to_process_ns(arg->pid);
|
||||
+ if (rc == -1) {
|
||||
+ syslog(LOG_ERR, "unable to switch to process namespace: %s", strerror(errno));
|
||||
+ rc = 1;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ if (trim_capabilities(env_probe))
|
||||
+ goto out;
|
||||
+
|
||||
/*
|
||||
* The kernel doesn't pass down the gid, so we resort here to scraping
|
||||
* one out of the passwd nss db. Note that this might not reflect the
|
||||
@@ -1266,20 +1344,7 @@ int main(const int argc, char *const argv[])
|
||||
* look at the environ file.
|
||||
*/
|
||||
env_cachename =
|
||||
- get_cachename_from_process_env(env_probe ? arg.pid : 0);
|
||||
-
|
||||
- /*
|
||||
- * Change to the process's namespace. This means that things will work
|
||||
- * acceptably in containers, because we'll be looking at the correct
|
||||
- * filesystem and have the correct network configuration.
|
||||
- */
|
||||
- rc = switch_to_process_ns(arg.pid);
|
||||
- if (rc == -1) {
|
||||
- syslog(LOG_ERR, "unable to switch to process namespace: %s",
|
||||
- strerror(errno));
|
||||
- rc = 1;
|
||||
- goto out;
|
||||
- }
|
||||
+ get_cachename_from_process_env(env_probe ? arg->pid : 0);
|
||||
|
||||
rc = setuid(uid);
|
||||
if (rc == -1) {
|
||||
@@ -1301,18 +1366,18 @@ int main(const int argc, char *const argv[])
|
||||
|
||||
ccache = get_existing_cc(env_cachename);
|
||||
/* Couldn't find credcache? Try to use keytab */
|
||||
- if (ccache == NULL && arg.username != NULL)
|
||||
- ccache = init_cc_from_keytab(keytab_name, arg.username);
|
||||
+ if (ccache == NULL && arg->username[0] != '\0')
|
||||
+ ccache = init_cc_from_keytab(keytab_name, arg->username);
|
||||
|
||||
if (ccache == NULL) {
|
||||
rc = 1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- host = arg.hostname;
|
||||
+ host = arg->hostname;
|
||||
|
||||
// do mech specific authorization
|
||||
- switch (arg.sec) {
|
||||
+ switch (arg->sec) {
|
||||
case MS_KRB5:
|
||||
case KRB5:
|
||||
/*
|
||||
@@ -1328,7 +1393,7 @@ int main(const int argc, char *const argv[])
|
||||
* TRY only:
|
||||
* cifs/bar.example.com@REALM
|
||||
*/
|
||||
- if (arg.sec == MS_KRB5)
|
||||
+ if (arg->sec == MS_KRB5)
|
||||
oid = OID_KERBEROS5_OLD;
|
||||
else
|
||||
oid = OID_KERBEROS5;
|
||||
@@ -1385,10 +1450,10 @@ retry_new_hostname:
|
||||
break;
|
||||
}
|
||||
|
||||
- if (!try_dns || !(have & DKD_HAVE_IP))
|
||||
+ if (!try_dns || !(arg->have & DKD_HAVE_IP))
|
||||
break;
|
||||
|
||||
- rc = ip_to_fqdn(arg.ip, hostbuf, sizeof(hostbuf));
|
||||
+ rc = ip_to_fqdn(arg->ip, hostbuf, sizeof(hostbuf));
|
||||
if (rc)
|
||||
break;
|
||||
|
||||
@@ -1396,7 +1461,7 @@ retry_new_hostname:
|
||||
host = hostbuf;
|
||||
goto retry_new_hostname;
|
||||
default:
|
||||
- syslog(LOG_ERR, "sectype: %d is not implemented", arg.sec);
|
||||
+ syslog(LOG_ERR, "sectype: %d is not implemented", arg->sec);
|
||||
rc = 1;
|
||||
break;
|
||||
}
|
||||
@@ -1414,7 +1479,7 @@ retry_new_hostname:
|
||||
rc = 1;
|
||||
goto out;
|
||||
}
|
||||
- keydata->version = arg.ver;
|
||||
+ keydata->version = arg->ver;
|
||||
keydata->flags = 0;
|
||||
keydata->sesskey_len = sess_key.length;
|
||||
keydata->secblob_len = secblob.length;
|
||||
@@ -1440,11 +1505,10 @@ out:
|
||||
krb5_cc_close(context, ccache);
|
||||
if (context)
|
||||
krb5_free_context(context);
|
||||
- free(arg.hostname);
|
||||
- free(arg.ip);
|
||||
- free(arg.username);
|
||||
free(keydata);
|
||||
free(env_cachename);
|
||||
+ if (arg)
|
||||
+ munmap(arg, sizeof(*arg));
|
||||
syslog(LOG_DEBUG, "Exit status %ld", rc);
|
||||
return rc;
|
||||
}
|
||||
--
|
||||
2.33.0
|
||||
|
8
clang/clang-tidy-fix-standalone-build.patch
Normal file
8
clang/clang-tidy-fix-standalone-build.patch
Normal file
@ -0,0 +1,8 @@
|
||||
--- tools/extra/unittests/clang-tidy/ReadabilityModuleTest.cpp.orig 2022-04-24 02:31:36.544185904 +0000
|
||||
+++ tools/extra/unittests/clang-tidy/ReadabilityModuleTest.cpp 2022-04-24 02:32:20.390088782 +0000
|
||||
@@ -1,4 +1,4 @@
|
||||
-#include "../../clang/unittests/ASTMatchers/ASTMatchersTest.h"
|
||||
+#include "../../../../unittests/ASTMatchers/ASTMatchersTest.h"
|
||||
#include "ClangTidyTest.h"
|
||||
#include "readability/BracesAroundStatementsCheck.h"
|
||||
#include "readability/NamespaceCommentCheck.h"
|
72
clang/enable-fstack-protector-strong-by-default.patch
Normal file
72
clang/enable-fstack-protector-strong-by-default.patch
Normal file
@ -0,0 +1,72 @@
|
||||
From 75c02a21f954574675020e1d76391b4896211fc7 Mon Sep 17 00:00:00 2001
|
||||
From: Evangelos Foutras <evangelos@foutrelis.com>
|
||||
Date: Sun, 24 Apr 2022 06:29:44 +0300
|
||||
Subject: [PATCH] Enable -fstack-protector-strong by default
|
||||
|
||||
---
|
||||
clang/lib/Driver/ToolChains/Linux.h | 5 +++++
|
||||
clang/test/Driver/fsanitize.c | 6 +++---
|
||||
clang/test/Driver/stack-protector.c | 4 ++--
|
||||
3 files changed, 10 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h
|
||||
index a5648d79d655..3c4546cb9204 100644
|
||||
--- a/clang/lib/Driver/ToolChains/Linux.h
|
||||
+++ b/clang/lib/Driver/ToolChains/Linux.h
|
||||
@@ -10,6 +10,7 @@
|
||||
#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_LINUX_H
|
||||
|
||||
#include "Gnu.h"
|
||||
+#include "clang/Basic/LangOptions.h"
|
||||
#include "clang/Driver/ToolChain.h"
|
||||
|
||||
namespace clang {
|
||||
@@ -46,6 +47,10 @@ public:
|
||||
IsAArch64OutlineAtomicsDefault(const llvm::opt::ArgList &Args) const override;
|
||||
bool isPIEDefault(const llvm::opt::ArgList &Args) const override;
|
||||
bool IsMathErrnoDefault() const override;
|
||||
+ LangOptions::StackProtectorMode
|
||||
+ GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
|
||||
+ return LangOptions::SSPStrong;
|
||||
+ }
|
||||
SanitizerMask getSupportedSanitizers() const override;
|
||||
void addProfileRTLibs(const llvm::opt::ArgList &Args,
|
||||
llvm::opt::ArgStringList &CmdArgs) const override;
|
||||
diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c
|
||||
index 17fce1981eea..a732d29b7688 100644
|
||||
--- a/clang/test/Driver/fsanitize.c
|
||||
+++ b/clang/test/Driver/fsanitize.c
|
||||
@@ -666,12 +666,12 @@
|
||||
// RUN: %clang -fno-sanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NOSP
|
||||
// NOSP-NOT: "-fsanitize=safe-stack"
|
||||
|
||||
-// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
|
||||
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address,safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP-ASAN
|
||||
// RUN: %clang -target x86_64-linux-gnu -fstack-protector -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=SP
|
||||
-// RUN: %clang -target arm-linux-androideabi -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
|
||||
-// RUN: %clang -target aarch64-linux-android -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
|
||||
+// RUN: %clang -target arm-linux-androideabi -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP
|
||||
+// RUN: %clang -target aarch64-linux-android -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP
|
||||
// RUN: %clang -target i386-contiki-unknown -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
|
||||
// NO-SP-NOT: stack-protector
|
||||
// NO-SP: "-fsanitize=safe-stack"
|
||||
diff --git a/clang/test/Driver/stack-protector.c b/clang/test/Driver/stack-protector.c
|
||||
index a3e40b50eed8..dfffe0d6cf85 100644
|
||||
--- a/clang/test/Driver/stack-protector.c
|
||||
+++ b/clang/test/Driver/stack-protector.c
|
||||
@@ -3,11 +3,11 @@
|
||||
// NOSSP-NOT: "-stack-protector-buffer-size"
|
||||
|
||||
// RUN: %clang -target i386-unknown-linux -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=SSP
|
||||
-// SSP: "-stack-protector" "1"
|
||||
+// SSP: "-stack-protector" "2"
|
||||
// SSP-NOT: "-stack-protector-buffer-size"
|
||||
|
||||
// RUN: %clang -target i386-unknown-linux -fstack-protector --param ssp-buffer-size=16 -### %s 2>&1 | FileCheck %s -check-prefix=SSP-BUF
|
||||
-// SSP-BUF: "-stack-protector" "1"
|
||||
+// SSP-BUF: "-stack-protector" "2"
|
||||
// SSP-BUF: "-stack-protector-buffer-size" "16"
|
||||
|
||||
// RUN: %clang -target i386-pc-openbsd -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD
|
17
cups/0001_Fix_OpenSSL_crash_bug.patch
Normal file
17
cups/0001_Fix_OpenSSL_crash_bug.patch
Normal file
@ -0,0 +1,17 @@
|
||||
From c0c403744b1bf4a9790a8fcaabcd60970cbefe06 Mon Sep 17 00:00:00 2001
|
||||
From: Michael R Sweet <michael.r.sweet@gmail.com>
|
||||
Date: Tue, 7 Jun 2022 13:45:29 -0400
|
||||
Subject: [PATCH] Fix OpenSSL crash bug - "tls" pointer wasn't cleared after
|
||||
freeing it (Issue #409)
|
||||
|
||||
diff --git a/cups/tls-openssl.c b/cups/tls-openssl.c
|
||||
index c3e57742e..6db9f8a9c 100644
|
||||
--- a/cups/tls-openssl.c
|
||||
+++ b/cups/tls-openssl.c
|
||||
@@ -1152,6 +1152,8 @@ _httpTLSStop(http_t *http) // I - Connection to server
|
||||
SSL_shutdown(http->tls);
|
||||
SSL_CTX_free(context);
|
||||
SSL_free(http->tls);
|
||||
+
|
||||
+ http->tls = NULL;
|
||||
}
|
30
curl/curl-7.84.0-easylock.patch
Normal file
30
curl/curl-7.84.0-easylock.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 50efb0822aa0e0ab165158dd0a26e65a2290e6d2 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stenberg <daniel@haxx.se>
|
||||
Date: Tue, 28 Jun 2022 09:00:25 +0200
|
||||
Subject: [PATCH] easy_lock: switch to using atomic_int instead of bool
|
||||
|
||||
To work with more compilers without requiring separate libs to
|
||||
link. Like with gcc-12 for RISC-V on Linux.
|
||||
|
||||
Reported-by: Adam Sampson
|
||||
Fixes #9055
|
||||
Closes #9061
|
||||
---
|
||||
lib/easy_lock.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/easy_lock.h b/lib/easy_lock.h
|
||||
index 07c85c5ffdd19..9c11bc50c5f20 100644
|
||||
--- a/lib/easy_lock.h
|
||||
+++ b/lib/easy_lock.h
|
||||
@@ -40,8 +40,8 @@
|
||||
#include <sched.h>
|
||||
#endif
|
||||
|
||||
-#define curl_simple_lock atomic_bool
|
||||
-#define CURL_SIMPLE_LOCK_INIT false
|
||||
+#define curl_simple_lock atomic_int
|
||||
+#define CURL_SIMPLE_LOCK_INIT 0
|
||||
|
||||
static inline void curl_simple_lock_lock(curl_simple_lock *lock)
|
||||
{
|
24
curl/curl-7.84.0-include-sched.patch
Normal file
24
curl/curl-7.84.0-include-sched.patch
Normal file
@ -0,0 +1,24 @@
|
||||
https://github.com/curl/curl/commit/e2e7f54b7bea521fa8373095d0f43261a720cda0
|
||||
https://bugs.gentoo.org/855710
|
||||
|
||||
From e2e7f54b7bea521fa8373095d0f43261a720cda0 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stenberg <daniel@haxx.se>
|
||||
Date: Mon, 27 Jun 2022 08:46:21 +0200
|
||||
Subject: [PATCH] easy_lock.h: include sched.h if available to fix build
|
||||
|
||||
Patched-by: Harry Sintonen
|
||||
|
||||
Closes #9054
|
||||
--- a/lib/easy_lock.h
|
||||
+++ b/lib/easy_lock.h
|
||||
@@ -36,6 +36,9 @@
|
||||
|
||||
#elif defined (HAVE_ATOMIC)
|
||||
#include <stdatomic.h>
|
||||
+#if defined(HAVE_SCHED_YIELD)
|
||||
+#include <sched.h>
|
||||
+#endif
|
||||
|
||||
#define curl_simple_lock atomic_bool
|
||||
#define CURL_SIMPLE_LOCK_INIT false
|
||||
|
25
devtools/makepkg.conf-set-LTOFLAGS-flto-auto.patch
Normal file
25
devtools/makepkg.conf-set-LTOFLAGS-flto-auto.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 00571896cc776222f14d9f67627ba6fb54512bd7 Mon Sep 17 00:00:00 2001
|
||||
From: Evangelos Foutras <evangelos@foutrelis.com>
|
||||
Date: Sun, 6 Mar 2022 10:59:47 +0200
|
||||
Subject: [PATCH] makepkg.conf: set LTOFLAGS="-flto=auto"
|
||||
|
||||
For use with pacman 6.0.1-4 which backports support for LTOFLAGS in
|
||||
order to speed up builds that use gcc as the compiler. This is less
|
||||
useful when clang is used, though a hack would be to specify in the
|
||||
PKGBUILD `LTOFLAGS="-flto=thin"` (outside of any function).
|
||||
---
|
||||
makepkg-x86_64.conf | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/makepkg-x86_64.conf b/makepkg-x86_64.conf
|
||||
index 19d16f7..7725296 100644
|
||||
--- a/makepkg-x86_64.conf
|
||||
+++ b/makepkg-x86_64.conf
|
||||
@@ -45,6 +45,7 @@ CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
|
||||
-fstack-clash-protection -fcf-protection"
|
||||
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
|
||||
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
|
||||
+LTOFLAGS="-flto=auto"
|
||||
#RUSTFLAGS="-C opt-level=2"
|
||||
#-- Make Flags: change this for DistCC/SMP systems
|
||||
#MAKEFLAGS="-j2"
|
@ -0,0 +1,12 @@
|
||||
diff -rupN runtime.4822e3c3aa77eb82b2fb33c9321f923cf11ddde6.orig/eng/packaging.targets runtime.4822e3c3aa77eb82b2fb33c9321f923cf11ddde6/eng/packaging.targets
|
||||
--- runtime.4822e3c3aa77eb82b2fb33c9321f923cf11ddde6.orig/eng/packaging.targets 2021-11-12 12:56:02.738439496 +0000
|
||||
+++ runtime.4822e3c3aa77eb82b2fb33c9321f923cf11ddde6/eng/packaging.targets 2021-11-12 12:56:33.683705462 +0000
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
- <EnablePackageValidation>true</EnablePackageValidation>
|
||||
+ <EnablePackageValidation>false</EnablePackageValidation>
|
||||
<!-- Don't restore prebuilt packages during sourcebuild. -->
|
||||
<DisablePackageBaselineValidation Condition="'$(DotNetBuildFromSource)' == 'true'">true</DisablePackageBaselineValidation>
|
||||
<PackageValidationBaselineVersion Condition="'$(PackageValidationBaselineVersion)' == ''">$([MSBuild]::Subtract($(MajorVersion), 1)).0.0</PackageValidationBaselineVersion>
|
12
dotnet/dotnet-core/dotnet-core-sdk-telemetry-optout.patch
Normal file
12
dotnet/dotnet-core/dotnet-core-sdk-telemetry-optout.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -rupN sdk.2c798cbf6bf259ce49d94d91bc665a95d42d7a7f.orig/src/Cli/dotnet/Program.cs sdk.2c798cbf6bf259ce49d94d91bc665a95d42d7a7f/src/Cli/dotnet/Program.cs
|
||||
--- sdk.2c798cbf6bf259ce49d94d91bc665a95d42d7a7f.orig/src/Cli/dotnet/Program.cs 2021-11-13 08:32:52.012563149 +0000
|
||||
+++ sdk.2c798cbf6bf259ce49d94d91bc665a95d42d7a7f/src/Cli/dotnet/Program.cs 2021-11-13 08:33:32.414941596 +0000
|
||||
@@ -171,7 +171,7 @@ namespace Microsoft.DotNet.Cli
|
||||
bool generateAspNetCertificate =
|
||||
environmentProvider.GetEnvironmentVariableAsBool("DOTNET_GENERATE_ASPNET_CERTIFICATE", defaultValue: true);
|
||||
bool telemetryOptout =
|
||||
- environmentProvider.GetEnvironmentVariableAsBool("DOTNET_CLI_TELEMETRY_OPTOUT", defaultValue: false);
|
||||
+ environmentProvider.GetEnvironmentVariableAsBool("DOTNET_CLI_TELEMETRY_OPTOUT", defaultValue: true);
|
||||
bool addGlobalToolsToPath =
|
||||
environmentProvider.GetEnvironmentVariableAsBool("DOTNET_ADD_GLOBAL_TOOLS_TO_PATH", defaultValue: true);
|
||||
bool nologo =
|
58
dotnet/mono-msbuild/mono-msbuild-license-case.patch
Normal file
58
dotnet/mono-msbuild/mono-msbuild-license-case.patch
Normal file
@ -0,0 +1,58 @@
|
||||
Index: xamarin-pkg-msbuild/LICENSE
|
||||
===================================================================
|
||||
--- xamarin-pkg-msbuild.orig/LICENSE
|
||||
+++ /dev/null
|
||||
@@ -1,24 +0,0 @@
|
||||
-The MIT License (MIT)
|
||||
-
|
||||
-Copyright (c) .NET Foundation and contributors
|
||||
-
|
||||
-All rights reserved.
|
||||
-
|
||||
-Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
-of this software and associated documentation files (the "Software"), to deal
|
||||
-in the Software without restriction, including without limitation the rights
|
||||
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
-copies of the Software, and to permit persons to whom the Software is
|
||||
-furnished to do so, subject to the following conditions:
|
||||
-
|
||||
-The above copyright notice and this permission notice shall be included in all
|
||||
-copies or substantial portions of the Software.
|
||||
-
|
||||
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
-SOFTWARE.
|
||||
-
|
||||
Index: xamarin-pkg-msbuild/license
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xamarin-pkg-msbuild/license
|
||||
@@ -0,0 +1,24 @@
|
||||
+The MIT License (MIT)
|
||||
+
|
||||
+Copyright (c) .NET Foundation and contributors
|
||||
+
|
||||
+All rights reserved.
|
||||
+
|
||||
+Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
+of this software and associated documentation files (the "Software"), to deal
|
||||
+in the Software without restriction, including without limitation the rights
|
||||
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
+copies of the Software, and to permit persons to whom the Software is
|
||||
+furnished to do so, subject to the following conditions:
|
||||
+
|
||||
+The above copyright notice and this permission notice shall be included in all
|
||||
+copies or substantial portions of the Software.
|
||||
+
|
||||
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
+SOFTWARE.
|
||||
+
|
42
dotnet/mono-msbuild/mono-msbuild-use-bash.patch
Normal file
42
dotnet/mono-msbuild/mono-msbuild-use-bash.patch
Normal file
@ -0,0 +1,42 @@
|
||||
Index: xamarin-pkg-msbuild/gen_build_info.sh
|
||||
===================================================================
|
||||
--- xamarin-pkg-msbuild.orig/gen_build_info.sh
|
||||
+++ xamarin-pkg-msbuild/gen_build_info.sh
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!/bin/bash
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 <filename.cs>"
|
||||
Index: xamarin-pkg-msbuild/mono/create_bootstrap.sh
|
||||
===================================================================
|
||||
--- xamarin-pkg-msbuild.orig/mono/create_bootstrap.sh
|
||||
+++ xamarin-pkg-msbuild/mono/create_bootstrap.sh
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!/bin/bash
|
||||
|
||||
# This creates a bootstrap from an exising mono installation
|
||||
# This is just to ensure that we have the correct "matched" Roslyn
|
||||
Index: xamarin-pkg-msbuild/msbuild-deploy.in
|
||||
===================================================================
|
||||
--- xamarin-pkg-msbuild.orig/msbuild-deploy.in
|
||||
+++ xamarin-pkg-msbuild/msbuild-deploy.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!/bin/bash
|
||||
ABSOLUTE_PATH=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)/`basename "${BASH_SOURCE[0]}"`
|
||||
MSBUILD_SRC_DIR=`dirname $ABSOLUTE_PATH`
|
||||
mono $MONO_OPTIONS $MSBUILD_SRC_DIR/MSBuild.exe $*
|
||||
Index: xamarin-pkg-msbuild/eng/cibuild_bootstrapped_msbuild.sh
|
||||
===================================================================
|
||||
--- xamarin-pkg-msbuild.orig/eng/cibuild_bootstrapped_msbuild.sh
|
||||
+++ xamarin-pkg-msbuild/eng/cibuild_bootstrapped_msbuild.sh
|
||||
@@ -56,6 +56,7 @@ function DownloadMSBuildForMono {
|
||||
unzip -q "$msbuild_zip" -d "$artifacts_dir"
|
||||
# rename just to make it obvious when reading logs!
|
||||
mv $artifacts_dir/msbuild $mono_msbuild_dir
|
||||
+ sed -i 's#/sh$#/bash#' $artifacts_dir/mono-msbuild/msbuild
|
||||
chmod +x $artifacts_dir/mono-msbuild/MSBuild.dll
|
||||
rm "$msbuild_zip"
|
||||
fi
|
@ -0,0 +1,47 @@
|
||||
commit 53464654bd33e58e3fff079f34261b823d839f3b
|
||||
Author: Theodore Ts'o <tytso@mit.edu>
|
||||
Date: Mon Aug 2 21:08:01 2021 -0400
|
||||
|
||||
mke2fs: fix creating a file system image w/o a pre-existing file
|
||||
|
||||
The mke2fs program should allow creating a file system image when an
|
||||
explicit file system size is specified, even if the file doesn't yet
|
||||
exist. By deferring the call to check_plausible() in commit
|
||||
942b00cb9d2f ("mke2fs: do not warn about a pre-existing partition
|
||||
table when using a non-zero offset") this behaviour was broken.
|
||||
|
||||
Fix this regression by explicitly creating the file if the file system
|
||||
size is specified.
|
||||
|
||||
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
|
||||
index 306064df..31e8de1a 100644
|
||||
--- a/misc/mke2fs.c
|
||||
+++ b/misc/mke2fs.c
|
||||
@@ -1986,6 +1986,25 @@ profile_error:
|
||||
retval = ext2fs_get_device_size2(device_name,
|
||||
EXT2_BLOCK_SIZE(&fs_param),
|
||||
&dev_size);
|
||||
+ if (retval == ENOENT) {
|
||||
+ int fd;
|
||||
+
|
||||
+ if (!explicit_fssize) {
|
||||
+ fprintf(stderr,
|
||||
+ _("The file %s does not exist and no "
|
||||
+ "size was specified.\n"), device_name);
|
||||
+ exit(1);
|
||||
+ }
|
||||
+ fd = ext2fs_open_file(device_name,
|
||||
+ O_CREAT | O_WRONLY, 0666);
|
||||
+ if (fd < 0) {
|
||||
+ retval = errno;
|
||||
+ } else {
|
||||
+ dev_size = 0;
|
||||
+ retval = 0;
|
||||
+ printf(_("Creating regular file %s\n"), device_name);
|
||||
+ }
|
||||
+ }
|
||||
if (retval && (retval != EXT2_ET_UNIMPLEMENTED)) {
|
||||
com_err(program_name, retval, "%s",
|
||||
_("while trying to determine filesystem size"));
|
13
expect/expect-5.45-format-security.patch
Normal file
13
expect/expect-5.45-format-security.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- exp_clib.c.orig 2017-03-24 10:34:37.269183513 -0400
|
||||
+++ exp_clib.c 2017-03-24 10:34:41.171117943 -0400
|
||||
@@ -1938,8 +1938,8 @@
|
||||
char *str;
|
||||
{
|
||||
if (exp_is_debugging) {
|
||||
- fprintf(stderr,str);
|
||||
- if (exp_logfile) fprintf(exp_logfile,str);
|
||||
+ fprintf(stderr, "%s", str);
|
||||
+ if (exp_logfile) fprintf(exp_logfile, "%s", str);
|
||||
}
|
||||
}
|
||||
|
168
glew/egl+glx.patch
Normal file
168
glew/egl+glx.patch
Normal file
@ -0,0 +1,168 @@
|
||||
--- a/src/glew.c
|
||||
+++ b/src/glew.c
|
||||
@@ -36,11 +36,13 @@
|
||||
# include GLEW_INCLUDE
|
||||
#endif
|
||||
|
||||
+#if defined(GLEW_EGL)
|
||||
+# include <GL/eglew.h>
|
||||
+#endif
|
||||
+
|
||||
#if defined(GLEW_OSMESA)
|
||||
# define GLAPI extern
|
||||
# include <GL/osmesa.h>
|
||||
-#elif defined(GLEW_EGL)
|
||||
-# include <GL/eglew.h>
|
||||
#elif defined(_WIN32)
|
||||
/*
|
||||
* If NOGDI is defined, wingdi.h won't be included by windows.h, and thus
|
||||
@@ -57,8 +59,7 @@
|
||||
|
||||
#include <stddef.h> /* For size_t */
|
||||
|
||||
-#if defined(GLEW_EGL)
|
||||
-#elif defined(GLEW_REGAL)
|
||||
+#if defined(GLEW_REGAL)
|
||||
|
||||
/* In GLEW_REGAL mode we call direcly into the linked
|
||||
libRegal.so glGetProcAddressREGAL for looking up
|
||||
@@ -159,23 +160,37 @@
|
||||
* Define glewGetProcAddress.
|
||||
*/
|
||||
#if defined(GLEW_REGAL)
|
||||
-# define glewGetProcAddress(name) regalGetProcAddress((const GLchar *)name)
|
||||
+# define _glewGetProcAddress(name) regalGetProcAddress((const GLchar *)name)
|
||||
#elif defined(GLEW_OSMESA)
|
||||
-# define glewGetProcAddress(name) OSMesaGetProcAddress((const char *)name)
|
||||
-#elif defined(GLEW_EGL)
|
||||
-# define glewGetProcAddress(name) eglGetProcAddress((const char *)name)
|
||||
+# define _glewGetProcAddress(name) OSMesaGetProcAddress((const char *)name)
|
||||
#elif defined(_WIN32)
|
||||
-# define glewGetProcAddress(name) wglGetProcAddress((LPCSTR)name)
|
||||
+# define _glewGetProcAddress(name) wglGetProcAddress((LPCSTR)name)
|
||||
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
|
||||
-# define glewGetProcAddress(name) NSGLGetProcAddress(name)
|
||||
+# define _glewGetProcAddress(name) NSGLGetProcAddress(name)
|
||||
#elif defined(__sgi) || defined(__sun) || defined(__HAIKU__)
|
||||
-# define glewGetProcAddress(name) dlGetProcAddress(name)
|
||||
+# define _glewGetProcAddress(name) dlGetProcAddress(name)
|
||||
#elif defined(__ANDROID__)
|
||||
-# define glewGetProcAddress(name) NULL /* TODO */
|
||||
+# define _glewGetProcAddress(name) NULL /* TODO */
|
||||
#elif defined(__native_client__)
|
||||
-# define glewGetProcAddress(name) NULL /* TODO */
|
||||
+# define _glewGetProcAddress(name) NULL /* TODO */
|
||||
#else /* __linux */
|
||||
-# define glewGetProcAddress(name) (*glXGetProcAddressARB)(name)
|
||||
+# define _glewGetProcAddress(name) (*glXGetProcAddressARB)(name)
|
||||
+#endif
|
||||
+
|
||||
+#if defined(GLEW_EGL)
|
||||
+static GLboolean _EGL_available = GL_FALSE;
|
||||
+static void (*glewGetProcAddress (const GLubyte *name)) (void)
|
||||
+{
|
||||
+ void (*addr)(void);
|
||||
+ if (_EGL_available)
|
||||
+ {
|
||||
+ addr = eglGetProcAddress((const char *)name);
|
||||
+ if (addr) return addr;
|
||||
+ }
|
||||
+ return _glewGetProcAddress(name);
|
||||
+}
|
||||
+#else
|
||||
+# define glewGetProcAddress(name) _glewGetProcAddress(name)
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -19297,9 +19312,7 @@
|
||||
}
|
||||
|
||||
|
||||
-#if defined(GLEW_OSMESA)
|
||||
-
|
||||
-#elif defined(GLEW_EGL)
|
||||
+#if defined(GLEW_EGL)
|
||||
|
||||
PFNEGLCHOOSECONFIGPROC __eglewChooseConfig = NULL;
|
||||
PFNEGLCOPYBUFFERSPROC __eglewCopyBuffers = NULL;
|
||||
@@ -20490,8 +20503,8 @@
|
||||
PFNEGLQUERYSTRINGPROC queryString = NULL;
|
||||
|
||||
/* Load necessary entry points */
|
||||
- initialize = (PFNEGLINITIALIZEPROC) glewGetProcAddress("eglInitialize");
|
||||
- queryString = (PFNEGLQUERYSTRINGPROC) glewGetProcAddress("eglQueryString");
|
||||
+ initialize = (PFNEGLINITIALIZEPROC) eglGetProcAddress("eglInitialize");
|
||||
+ queryString = (PFNEGLQUERYSTRINGPROC) eglGetProcAddress("eglQueryString");
|
||||
if (!initialize || !queryString)
|
||||
return 1;
|
||||
|
||||
@@ -21029,7 +21042,9 @@
|
||||
return GLEW_OK;
|
||||
}
|
||||
|
||||
-#elif defined(_WIN32)
|
||||
+#endif
|
||||
+
|
||||
+#if defined(_WIN32)
|
||||
|
||||
PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL = NULL;
|
||||
|
||||
@@ -23105,13 +23120,26 @@
|
||||
GLenum r;
|
||||
#if defined(GLEW_EGL)
|
||||
PFNEGLGETCURRENTDISPLAYPROC getCurrentDisplay = NULL;
|
||||
+ EGLDisplay display;
|
||||
#endif
|
||||
r = glewContextInit();
|
||||
if ( r != 0 ) return r;
|
||||
#if defined(GLEW_EGL)
|
||||
- getCurrentDisplay = (PFNEGLGETCURRENTDISPLAYPROC) glewGetProcAddress("eglGetCurrentDisplay");
|
||||
- return eglewInit(getCurrentDisplay());
|
||||
-#elif defined(GLEW_OSMESA) || defined(__ANDROID__) || defined(__native_client__) || defined(__HAIKU__)
|
||||
+ getCurrentDisplay = (PFNEGLGETCURRENTDISPLAYPROC) eglGetProcAddress("eglGetCurrentDisplay");
|
||||
+ if (getCurrentDisplay)
|
||||
+ display = getCurrentDisplay();
|
||||
+ else
|
||||
+ display = EGL_NO_DISPLAY;
|
||||
+ if (display != EGL_NO_DISPLAY)
|
||||
+ {
|
||||
+ r = eglewInit(display);
|
||||
+ if ( r == 0 ) {
|
||||
+ _EGL_available = GL_TRUE;
|
||||
+ return r;
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+#if defined(GLEW_OSMESA) || defined(__ANDROID__) || defined(__native_client__) || defined(__HAIKU__)
|
||||
return r;
|
||||
#elif defined(_WIN32)
|
||||
return wglewInit();
|
||||
@@ -29785,7 +29813,7 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
-#if defined(_WIN32) && !defined(GLEW_EGL) && !defined(GLEW_OSMESA)
|
||||
+#if defined(_WIN32) && !defined(GLEW_OSMESA)
|
||||
|
||||
GLboolean GLEWAPIENTRY wglewIsSupported (const char* name)
|
||||
{
|
||||
@@ -30228,7 +30256,7 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
-#elif !defined(GLEW_OSMESA) && !defined(GLEW_EGL) && !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
||||
+#elif !defined(GLEW_OSMESA) && !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
||||
|
||||
GLboolean glxewIsSupported (const char* name)
|
||||
{
|
||||
@@ -30805,7 +30833,9 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
-#elif defined(GLEW_EGL)
|
||||
+#endif
|
||||
+
|
||||
+#if defined(GLEW_EGL)
|
||||
|
||||
GLboolean eglewIsSupported (const char* name)
|
||||
{
|
18
go/juju/build.patch
Normal file
18
go/juju/build.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 2afecfdc20..8e8904d65e 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -114,10 +114,10 @@ JUJU_GOMOD_MODE ?= mod
|
||||
|
||||
# Compile with debug flags if requested.
|
||||
ifeq ($(DEBUG_JUJU), 1)
|
||||
- COMPILE_FLAGS = -gcflags "all=-N -l"
|
||||
- LINK_FLAGS = -ldflags "-X $(PROJECT)/version.GitCommit=$(GIT_COMMIT) -X $(PROJECT)/version.GitTreeState=$(GIT_TREE_STATE) -X $(PROJECT)/version.build=$(JUJU_BUILD_NUMBER)"
|
||||
+ COMPILE_FLAGS = -gcflags "all=-N -l" -trimpath -gccgoflags "$(CFLAGS)"
|
||||
+ LINK_FLAGS = -ldflags "-X $(PROJECT)/version.GitCommit=$(GIT_COMMIT) -X $(PROJECT)/version.GitTreeState=$(GIT_TREE_STATE) -X $(PROJECT)/version.build=$(JUJU_BUILD_NUMBER) -extldflags '$(LDFLAGS)'"
|
||||
else
|
||||
- LINK_FLAGS = -ldflags "-s -w -extldflags '-static' -X $(PROJECT)/version.GitCommit=$(GIT_COMMIT) -X $(PROJECT)/version.GitTreeState=$(GIT_TREE_STATE) -X $(PROJECT)/version.build=$(JUJU_BUILD_NUMBER)"
|
||||
+ LINK_FLAGS = -ldflags "-s -w -X $(PROJECT)/version.GitCommit=$(GIT_COMMIT) -X $(PROJECT)/version.GitTreeState=$(GIT_TREE_STATE) -X $(PROJECT)/version.build=$(JUJU_BUILD_NUMBER) -extldflags '-static $(LDFLAGS)'"
|
||||
endif
|
||||
|
||||
define DEPENDENCIES
|
71
gyp/0001-gyp-python38.patch
Normal file
71
gyp/0001-gyp-python38.patch
Normal file
@ -0,0 +1,71 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Hughes <tom@compton.nu>
|
||||
Date: Fri, 23 Aug 2019 09:33:14 +0100
|
||||
Subject: [PATCH] gyp-python38
|
||||
|
||||
Fix python 3.8 warnings
|
||||
|
||||
(From Fedora)
|
||||
---
|
||||
pylib/gyp/input.py | 2 +-
|
||||
test/lib/TestCmd.py | 6 +++---
|
||||
test/lib/TestGyp.py | 2 +-
|
||||
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/pylib/gyp/input.py b/pylib/gyp/input.py
|
||||
index 4c1289164045..2bea3341adc5 100644
|
||||
--- a/pylib/gyp/input.py
|
||||
+++ b/pylib/gyp/input.py
|
||||
@@ -1183,7 +1183,7 @@ def LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key):
|
||||
if variable_name in variables:
|
||||
# If the variable is already set, don't set it.
|
||||
continue
|
||||
- if the_dict_key is 'variables' and variable_name in the_dict:
|
||||
+ if the_dict_key == 'variables' and variable_name in the_dict:
|
||||
# If the variable is set without a % in the_dict, and the_dict is a
|
||||
# variables dict (making |variables| a varaibles sub-dict of a
|
||||
# variables dict), use the_dict's definition.
|
||||
diff --git a/test/lib/TestCmd.py b/test/lib/TestCmd.py
|
||||
index 1ec50933a4a8..457694c877d4 100644
|
||||
--- a/test/lib/TestCmd.py
|
||||
+++ b/test/lib/TestCmd.py
|
||||
@@ -283,7 +283,7 @@ if os.name in ('posix', 'nt'):
|
||||
else:
|
||||
tempfile.template = 'testcmd.'
|
||||
|
||||
-re_space = re.compile('\s')
|
||||
+re_space = re.compile(r'\s')
|
||||
|
||||
_Cleanup = []
|
||||
|
||||
@@ -882,7 +882,7 @@ class TestCmd(object):
|
||||
#self.diff_function = difflib.unified_diff
|
||||
self._dirlist = []
|
||||
self._preserve = {'pass_test': 0, 'fail_test': 0, 'no_result': 0}
|
||||
- if 'PRESERVE' in os.environ and os.environ['PRESERVE'] is not '':
|
||||
+ if 'PRESERVE' in os.environ and os.environ['PRESERVE'] != '':
|
||||
self._preserve['pass_test'] = os.environ['PRESERVE']
|
||||
self._preserve['fail_test'] = os.environ['PRESERVE']
|
||||
self._preserve['no_result'] = os.environ['PRESERVE']
|
||||
@@ -1103,7 +1103,7 @@ class TestCmd(object):
|
||||
the temporary working directories to be preserved for all
|
||||
conditions.
|
||||
"""
|
||||
- if conditions is ():
|
||||
+ if len(conditions) == 0:
|
||||
conditions = ('pass_test', 'fail_test', 'no_result')
|
||||
for cond in conditions:
|
||||
self._preserve[cond] = 1
|
||||
diff --git a/test/lib/TestGyp.py b/test/lib/TestGyp.py
|
||||
index 2aa78684f517..badfa910100f 100644
|
||||
--- a/test/lib/TestGyp.py
|
||||
+++ b/test/lib/TestGyp.py
|
||||
@@ -743,7 +743,7 @@ def FindVisualStudioInstallation():
|
||||
build_tool = None
|
||||
if not build_tool:
|
||||
args1 = ['reg', 'query',
|
||||
- 'HKLM\Software\Microsoft\VisualStudio\SxS\VS7',
|
||||
+ r'HKLM\Software\Microsoft\VisualStudio\SxS\VS7',
|
||||
'/v', '15.0', '/reg:32']
|
||||
build_tool = subprocess.check_output(args1).decode(
|
||||
'utf-8', 'ignore').strip().split(b'\r\n').pop().split(b' ').pop()
|
44
gyp/0002-gyp-fix-cmake.patch
Normal file
44
gyp/0002-gyp-fix-cmake.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
|
||||
Date: Sat, 25 Jun 2022 20:41:40 +0000
|
||||
Subject: [PATCH] gyp-fix-cmake
|
||||
|
||||
(From Fedora, with fixed exception type)
|
||||
---
|
||||
pylib/gyp/generator/cmake.py | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/pylib/gyp/generator/cmake.py b/pylib/gyp/generator/cmake.py
|
||||
index 4a2041cf2687..12461dc1d48b 100644
|
||||
--- a/pylib/gyp/generator/cmake.py
|
||||
+++ b/pylib/gyp/generator/cmake.py
|
||||
@@ -40,9 +40,9 @@ import gyp.xcode_emulation
|
||||
|
||||
try:
|
||||
# maketrans moved to str in python3.
|
||||
- _maketrans = string.maketrans
|
||||
-except NameError:
|
||||
_maketrans = str.maketrans
|
||||
+except AttributeError:
|
||||
+ _maketrans = string.maketrans
|
||||
|
||||
generator_default_variables = {
|
||||
'EXECUTABLE_PREFIX': '',
|
||||
@@ -281,7 +281,7 @@ def WriteActions(target_name, actions, extra_sources, extra_deps,
|
||||
dirs = set(dir for dir in (os.path.dirname(o) for o in outputs) if dir)
|
||||
|
||||
if int(action.get('process_outputs_as_sources', False)):
|
||||
- extra_sources.extend(zip(cmake_outputs, outputs))
|
||||
+ extra_sources.extend(list(zip(cmake_outputs, outputs)))
|
||||
|
||||
# add_custom_command
|
||||
output.write('add_custom_command(OUTPUT ')
|
||||
@@ -987,7 +987,7 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use,
|
||||
|
||||
# XCode settings
|
||||
xcode_settings = config.get('xcode_settings', {})
|
||||
- for xcode_setting, xcode_value in xcode_settings.viewitems():
|
||||
+ for xcode_setting, xcode_value in xcode_settings.items():
|
||||
SetTargetProperty(output, cmake_target_name,
|
||||
"XCODE_ATTRIBUTE_%s" % xcode_setting, xcode_value,
|
||||
'' if isinstance(xcode_value, str) else ' ')
|
46
gyp/0003-gyp-fips.patch
Normal file
46
gyp/0003-gyp-fips.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
|
||||
Date: Sat, 25 Jun 2022 20:45:54 +0000
|
||||
Subject: [PATCH] gyp-fips
|
||||
|
||||
(From Fedora, ported to gyp master)
|
||||
---
|
||||
pylib/gyp/generator/make.py | 2 +-
|
||||
pylib/gyp/generator/ninja.py | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/pylib/gyp/generator/make.py b/pylib/gyp/generator/make.py
|
||||
index 997eec08666e..06c763db609a 100644
|
||||
--- a/pylib/gyp/generator/make.py
|
||||
+++ b/pylib/gyp/generator/make.py
|
||||
@@ -1774,7 +1774,7 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
|
||||
|
||||
# Hash the target name to avoid generating overlong filenames.
|
||||
cmdstring = (command if command else self.target).encode('utf-8')
|
||||
- cmddigest = hashlib.sha1(cmdstring).hexdigest()
|
||||
+ cmddigest = hashlib.sha1(cmdstring, usedforsecurity=False).hexdigest()
|
||||
intermediate = "%s.intermediate" % (cmddigest)
|
||||
self.WriteLn('%s: %s' % (' '.join(outputs), intermediate))
|
||||
self.WriteLn('\t%s' % '@:');
|
||||
diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
|
||||
index 3bcfe352925b..c439c8b728ad 100644
|
||||
--- a/pylib/gyp/generator/ninja.py
|
||||
+++ b/pylib/gyp/generator/ninja.py
|
||||
@@ -752,7 +752,7 @@ class NinjaWriter(object):
|
||||
if self.flavor == 'win':
|
||||
# WriteNewNinjaRule uses unique_name for creating an rsp file on win.
|
||||
extra_bindings.append(('unique_name',
|
||||
- hashlib.md5(six.ensure_binary(outputs[0])).hexdigest()))
|
||||
+ hashlib.md5(six.ensure_binary(outputs[0]), usedforsecurity=False).hexdigest()))
|
||||
|
||||
self.ninja.build(outputs, rule_name, self.GypPathToNinja(source),
|
||||
implicit=inputs,
|
||||
@@ -2389,7 +2389,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
|
||||
qualified_target_for_hash = gyp.common.QualifiedTarget(build_file, name,
|
||||
toolset)
|
||||
qualified_target_for_hash = qualified_target_for_hash.encode('utf-8')
|
||||
- hash_for_rules = hashlib.md5(qualified_target_for_hash).hexdigest()
|
||||
+ hash_for_rules = hashlib.md5(qualified_target_for_hash, usedforsecurity=False).hexdigest()
|
||||
|
||||
base_path = os.path.dirname(build_file)
|
||||
obj = 'obj'
|
@ -1,46 +0,0 @@
|
||||
--- elasticsearch-7.6.2/modules/systemd/src/main/java/org/elasticsearch/systemd/SystemdPlugin.java.orig 2020-06-03 10:42:36.940412968 +0200
|
||||
+++ elasticsearch-7.6.2/modules/systemd/src/main/java/org/elasticsearch/systemd/SystemdPlugin.java 2020-06-03 10:48:09.782304365 +0200
|
||||
@@ -55,25 +55,11 @@
|
||||
}
|
||||
|
||||
SystemdPlugin(final boolean assertIsPackageDistribution, final Build.Type buildType, final String esSDNotify) {
|
||||
- final boolean isPackageDistribution = buildType == Build.Type.DEB || buildType == Build.Type.RPM;
|
||||
- if (assertIsPackageDistribution) {
|
||||
- // our build is configured to only include this module in the package distributions
|
||||
- assert isPackageDistribution : buildType;
|
||||
- }
|
||||
- if (isPackageDistribution == false) {
|
||||
- logger.debug("disabling sd_notify as the build type [{}] is not a package distribution", buildType);
|
||||
- enabled = false;
|
||||
- return;
|
||||
- }
|
||||
- logger.trace("ES_SD_NOTIFY is set to [{}]", esSDNotify);
|
||||
- if (esSDNotify == null) {
|
||||
- enabled = false;
|
||||
- return;
|
||||
- }
|
||||
- if (Boolean.TRUE.toString().equals(esSDNotify) == false && Boolean.FALSE.toString().equals(esSDNotify) == false) {
|
||||
- throw new RuntimeException("ES_SD_NOTIFY set to unexpected value [" + esSDNotify + "]");
|
||||
- }
|
||||
- enabled = Boolean.TRUE.toString().equals(esSDNotify);
|
||||
+ final boolean isPackageDistribution = true;
|
||||
+
|
||||
+ logger.info("systemd enabled [{}]", esSDNotify);
|
||||
+
|
||||
+ enabled = Boolean.TRUE.toString().equals(esSDNotify);;
|
||||
}
|
||||
|
||||
Scheduler.Cancellable extender;
|
||||
--- elasticsearch-7.6.2/distribution/build.gradle.orig 2020-06-03 10:54:41.179175507 +0200
|
||||
+++ elasticsearch-7.6.2/distribution/build.gradle 2020-06-03 10:56:44.197558657 +0200
|
||||
@@ -198,10 +198,6 @@
|
||||
// we create the buildOssModules task above but fill it here so we can do a single
|
||||
// loop over modules to also setup cross task dependencies and increment our modules counter
|
||||
project.rootProject.subprojects.findAll { it.parent.path == ':modules' }.each { Project module ->
|
||||
- if (module.name == 'systemd') {
|
||||
- // the systemd module is only included in the package distributions
|
||||
- return
|
||||
- }
|
||||
File licenses = new File(module.projectDir, 'licenses')
|
||||
if (licenses.exists()) {
|
||||
buildDefaultNotice.licensesDir licenses
|
@ -0,0 +1,71 @@
|
||||
From 9a3422e1a6cf519e3fedce396784be2ef48dc7f9 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Vieira <portugee@gmail.com>
|
||||
Date: Fri, 10 Dec 2021 15:51:38 -0800
|
||||
Subject: [PATCH] Patch log4j JAR to remove JndiLookup class (#81629)
|
||||
|
||||
|
||||
diff --git a/distribution/build.gradle b/distribution/build.gradle
|
||||
index feab67bfbf8..76549a83d0b 100644
|
||||
--- a/distribution/build.gradle
|
||||
+++ b/distribution/build.gradle
|
||||
@@ -275,6 +275,10 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+ all {
|
||||
+ resolutionStrategy.dependencySubstitution {
|
||||
+ substitute module("org.apache.logging.log4j:log4j-core") using project(":libs:elasticsearch-log4j") because "patched to remove JndiLookup clas"}
|
||||
+ }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
diff --git a/libs/build.gradle b/libs/build.gradle
|
||||
index 0614199b97b..952985f5aa5 100644
|
||||
--- a/libs/build.gradle
|
||||
+++ b/libs/build.gradle
|
||||
@@ -6,7 +6,7 @@
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
-subprojects {
|
||||
+configure(subprojects - project('elasticsearch-log4j')) {
|
||||
/*
|
||||
* All subprojects are java projects using Elasticsearch's standard build
|
||||
* tools.
|
||||
diff --git a/libs/log4j/build.gradle b/libs/log4j/build.gradle
|
||||
new file mode 100644
|
||||
index 00000000000..917a9f454a1
|
||||
--- /dev/null
|
||||
+++ b/libs/log4j/build.gradle
|
||||
@@ -0,0 +1,28 @@
|
||||
+plugins {
|
||||
+ id 'base'
|
||||
+ id 'elasticsearch.repositories'
|
||||
+}
|
||||
+
|
||||
+configurations {
|
||||
+ log4j {
|
||||
+ transitive = false
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+dependencies {
|
||||
+ log4j "org.apache.logging.log4j:log4j-core:${versions.log4j}"
|
||||
+}
|
||||
+
|
||||
+// Strip out JndiLookup class to avoid any possibility of exploitation of CVE-2021-44228
|
||||
+// See: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228
|
||||
+// See: https://issues.apache.org/jira/browse/LOG4J2-3201
|
||||
+def patchLog4j = tasks.register('patchLog4j', Zip) {
|
||||
+ archiveExtension = 'jar'
|
||||
+ from({ zipTree(configurations.log4j.singleFile) }) {
|
||||
+ exclude '**/JndiLookup.class'
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+artifacts {
|
||||
+ 'default'(patchLog4j)
|
||||
+}
|
||||
--
|
||||
2.34.1
|
||||
|
17
java/elasticsearch/remove-systemd-distribution-check.patch
Normal file
17
java/elasticsearch/remove-systemd-distribution-check.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/modules/systemd/src/main/java/org/elasticsearch/systemd/SystemdPlugin.java b/modules/systemd/src/main/java/org/elasticsearch/systemd/SystemdPlugin.java
|
||||
index 40cc219cbb4..5b89f469da7 100644
|
||||
--- a/modules/systemd/src/main/java/org/elasticsearch/systemd/SystemdPlugin.java
|
||||
+++ b/modules/systemd/src/main/java/org/elasticsearch/systemd/SystemdPlugin.java
|
||||
@@ -59,11 +59,7 @@ public class SystemdPlugin extends Plugin implements ClusterPlugin {
|
||||
}
|
||||
|
||||
SystemdPlugin(final boolean assertIsPackageDistribution, final Build.Type buildType, final String esSDNotify) {
|
||||
- final boolean isPackageDistribution = buildType == Build.Type.DEB || buildType == Build.Type.RPM;
|
||||
- if (assertIsPackageDistribution) {
|
||||
- // our build is configured to only include this module in the package distributions
|
||||
- assert isPackageDistribution : buildType;
|
||||
- }
|
||||
+ final boolean isPackageDistribution = true;
|
||||
if (isPackageDistribution == false) {
|
||||
logger.debug("disabling sd_notify as the build type [{}] is not a package distribution", buildType);
|
||||
enabled = false;
|
38
js91/002-copy-headers.patch
Normal file
38
js91/002-copy-headers.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 3b3c8e37cca418e07bdeceaf3a601805df28d925 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk@redhat.com>
|
||||
Date: Wed, 15 Jul 2020 08:27:39 +0200
|
||||
Subject: [PATCH] build: Copy headers on install instead of symlinking
|
||||
|
||||
Patch by Philip Chimento ported forward to mozjs78
|
||||
---
|
||||
python/mozbuild/mozbuild/backend/recursivemake.py | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
|
||||
index d964466..0285ad9 100644
|
||||
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
|
||||
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
|
||||
@@ -1568,9 +1568,9 @@ class RecursiveMakeBackend(MakeBackend):
|
||||
" of srcdir-relative or absolute paths."
|
||||
)
|
||||
|
||||
- install_manifest.add_pattern_link(basepath, wild, dest_dir)
|
||||
+ install_manifest.add_pattern_copy(basepath, wild, dest_dir)
|
||||
else:
|
||||
- install_manifest.add_pattern_link(f.srcdir, f, dest_dir)
|
||||
+ install_manifest.add_pattern_copy(f.srcdir, f, dest_dir)
|
||||
elif isinstance(f, AbsolutePath):
|
||||
if not f.full_path.lower().endswith((".dll", ".pdb", ".so")):
|
||||
raise Exception(
|
||||
@@ -1581,7 +1581,7 @@ class RecursiveMakeBackend(MakeBackend):
|
||||
install_manifest.add_optional_exists(dest_file)
|
||||
absolute_files.append(f.full_path)
|
||||
else:
|
||||
- install_manifest.add_link(f.full_path, dest_file)
|
||||
+ install_manifest.add_copy(f.full_path, dest_file)
|
||||
else:
|
||||
install_manifest.add_optional_exists(dest_file)
|
||||
objdir_files.append(self._pretty_path(f, backend_file))
|
||||
--
|
||||
2.31.1
|
||||
|
67
js91/003-emitter.patch
Normal file
67
js91/003-emitter.patch
Normal file
@ -0,0 +1,67 @@
|
||||
From d1d785c169345b81c76213f6dd9be32b4db60294 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk@redhat.com>
|
||||
Date: Wed, 15 Jul 2020 08:39:47 +0200
|
||||
Subject: [PATCH] Build: allow LOCAL_INCLUDES paths with topsrcdir or topobjdir
|
||||
|
||||
---
|
||||
python/mozbuild/mozbuild/frontend/emitter.py | 10 ---------
|
||||
.../mozbuild/test/frontend/test_emitter.py | 22 -------------------
|
||||
2 files changed, 32 deletions(-)
|
||||
|
||||
diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py
|
||||
index 44b916e..f2e821d 100644
|
||||
--- a/python/mozbuild/mozbuild/frontend/emitter.py
|
||||
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
|
||||
@@ -1367,16 +1367,6 @@ class TreeMetadataEmitter(LoggingMixin):
|
||||
"(resolved to %s)" % (local_include, full_path),
|
||||
context,
|
||||
)
|
||||
- if (
|
||||
- full_path == context.config.topsrcdir
|
||||
- or full_path == context.config.topobjdir
|
||||
- ):
|
||||
- raise SandboxValidationError(
|
||||
- "Path specified in LOCAL_INCLUDES "
|
||||
- "(%s) resolves to the topsrcdir or topobjdir (%s), which is "
|
||||
- "not allowed" % (local_include, full_path),
|
||||
- context,
|
||||
- )
|
||||
include_obj = LocalInclude(context, local_include)
|
||||
local_includes.append(include_obj.path.full_path)
|
||||
yield include_obj
|
||||
diff --git a/python/mozbuild/mozbuild/test/frontend/test_emitter.py b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
|
||||
index e53bc5e..c1b9d32 100644
|
||||
--- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py
|
||||
+++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
|
||||
@@ -1098,28 +1098,6 @@ class TestEmitterBasic(unittest.TestCase):
|
||||
|
||||
self.assertEqual(local_includes, expected)
|
||||
|
||||
- def test_local_includes_invalid(self):
|
||||
- """Test that invalid LOCAL_INCLUDES are properly detected."""
|
||||
- reader = self.reader("local_includes-invalid/srcdir")
|
||||
-
|
||||
- with six.assertRaisesRegex(
|
||||
- self,
|
||||
- SandboxValidationError,
|
||||
- "Path specified in LOCAL_INCLUDES.*resolves to the "
|
||||
- "topsrcdir or topobjdir",
|
||||
- ):
|
||||
- self.read_topsrcdir(reader)
|
||||
-
|
||||
- reader = self.reader("local_includes-invalid/objdir")
|
||||
-
|
||||
- with six.assertRaisesRegex(
|
||||
- self,
|
||||
- SandboxValidationError,
|
||||
- "Path specified in LOCAL_INCLUDES.*resolves to the "
|
||||
- "topsrcdir or topobjdir",
|
||||
- ):
|
||||
- self.read_topsrcdir(reader)
|
||||
-
|
||||
def test_local_includes_file(self):
|
||||
"""Test that a filename can't be used in LOCAL_INCLUDES."""
|
||||
reader = self.reader("local_includes-filename")
|
||||
--
|
||||
2.31.1
|
||||
|
26
js91/004-disable-spidermonkey-jslint.patch
Normal file
26
js91/004-disable-spidermonkey-jslint.patch
Normal file
@ -0,0 +1,26 @@
|
||||
commit 34d8f3fb025e930450ce44f7aac501da4c2adc9c
|
||||
Author: Daniel Kolesa <daniel@octaforge.org>
|
||||
Date: Sun Jan 23 21:09:42 2022 +0100
|
||||
|
||||
disable spidermonkey jslint
|
||||
|
||||
diff --git a/js/src/build/moz.build b/js/src/build/moz.build
|
||||
index 55c66b97..243f7db2 100644
|
||||
--- a/js/src/build/moz.build
|
||||
+++ b/js/src/build/moz.build
|
||||
@@ -97,15 +97,3 @@ NO_EXPAND_LIBS = True
|
||||
|
||||
DIST_INSTALL = True
|
||||
|
||||
-# Run SpiderMonkey style checker after linking the static library. This avoids
|
||||
-# running the script for no-op builds.
|
||||
-GeneratedFile(
|
||||
- "spidermonkey_checks",
|
||||
- script="/config/run_spidermonkey_checks.py",
|
||||
- inputs=[
|
||||
- "!%sjs_static.%s" % (CONFIG["LIB_PREFIX"], CONFIG["LIB_SUFFIX"]),
|
||||
- "/config/check_spidermonkey_style.py",
|
||||
- "/config/check_macroassembler_style.py",
|
||||
- "/config/check_js_opcode.py",
|
||||
- ],
|
||||
-)
|
28
js91/005-rust-target.patch
Normal file
28
js91/005-rust-target.patch
Normal file
@ -0,0 +1,28 @@
|
||||
commit 34b3ac3195a40757bc5f51a1db5a47a4b18c68b5
|
||||
Author: Daniel Kolesa <daniel@octaforge.org>
|
||||
Date: Sun Jan 23 21:13:38 2022 +0100
|
||||
|
||||
bypass rust triplet checks and just force ours
|
||||
|
||||
diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
|
||||
index cd77d72b..0c03cab7 100644
|
||||
--- a/build/moz.configure/rust.configure
|
||||
+++ b/build/moz.configure/rust.configure
|
||||
@@ -261,7 +261,7 @@ def rust_supported_targets(rustc):
|
||||
data.setdefault(key, []).append(namespace(rust_target=t, target=info))
|
||||
return data
|
||||
|
||||
-
|
||||
+@imports("os")
|
||||
def detect_rustc_target(
|
||||
host_or_target, compiler_info, arm_target, rust_supported_targets
|
||||
):
|
||||
@@ -383,7 +383,7 @@ def detect_rustc_target(
|
||||
|
||||
return None
|
||||
|
||||
- rustc_target = find_candidate(candidates)
|
||||
+ rustc_target = os.environ["RUST_TARGET"]
|
||||
|
||||
if rustc_target is None:
|
||||
die("Don't know how to translate {} for rustc".format(host_or_target.alias))
|
80
js91/006-drop-rustc-validation.patch
Normal file
80
js91/006-drop-rustc-validation.patch
Normal file
@ -0,0 +1,80 @@
|
||||
drop some rust compiler validation
|
||||
|
||||
--- a/build/moz.configure/rust.configure
|
||||
+++ b/build/moz.configure/rust.configure
|
||||
@@ -91,9 +91,6 @@ def unwrap_rustup(prog, name):
|
||||
return unwrap
|
||||
|
||||
|
||||
-rustc = unwrap_rustup(rustc, "rustc")
|
||||
-cargo = unwrap_rustup(cargo, "cargo")
|
||||
-
|
||||
|
||||
set_config("CARGO", cargo)
|
||||
set_config("RUSTC", rustc)
|
||||
@@ -411,35 +408,6 @@ def assert_rust_compile(host_or_target, rustc_target, rustc):
|
||||
|
||||
os.write(in_fd, ensure_binary(source))
|
||||
os.close(in_fd)
|
||||
-
|
||||
- cmd = [
|
||||
- rustc,
|
||||
- "--crate-type",
|
||||
- "staticlib",
|
||||
- target_arg,
|
||||
- "-o",
|
||||
- out_path,
|
||||
- in_path,
|
||||
- ]
|
||||
-
|
||||
- def failed():
|
||||
- die(
|
||||
- dedent(
|
||||
- """\
|
||||
- Cannot compile for {} with {}
|
||||
- The target may be unsupported, or you may not have
|
||||
- a rust std library for that target installed. Try:
|
||||
-
|
||||
- rustup target add {}
|
||||
- """.format(
|
||||
- host_or_target.alias, rustc, rustc_target
|
||||
- )
|
||||
- )
|
||||
- )
|
||||
-
|
||||
- check_cmd_output(*cmd, onerror=failed)
|
||||
- if not os.path.exists(out_path) or os.path.getsize(out_path) == 0:
|
||||
- failed()
|
||||
finally:
|
||||
os.remove(in_path)
|
||||
os.remove(out_path)
|
||||
@@ -462,29 +430,6 @@ def rust_host_triple(
|
||||
rustc_target = detect_rustc_target(
|
||||
host, compiler_info, arm_target, rust_supported_targets
|
||||
)
|
||||
- if rustc_target != rustc_host:
|
||||
- if host.alias == rustc_target:
|
||||
- configure_host = host.alias
|
||||
- else:
|
||||
- configure_host = "{}/{}".format(host.alias, rustc_target)
|
||||
- die(
|
||||
- dedent(
|
||||
- """\
|
||||
- The rust compiler host ({rustc}) is not suitable for the configure host ({configure}).
|
||||
-
|
||||
- You can solve this by:
|
||||
- * Set your configure host to match the rust compiler host by editing your
|
||||
- mozconfig and adding "ac_add_options --host={rustc}".
|
||||
- * Or, install the rust toolchain for {configure}, if supported, by running
|
||||
- "rustup default stable-{rustc_target}"
|
||||
- """.format(
|
||||
- rustc=rustc_host,
|
||||
- configure=configure_host,
|
||||
- rustc_target=rustc_target,
|
||||
- )
|
||||
- )
|
||||
- )
|
||||
- assert_rust_compile(host, rustc_target, rustc)
|
||||
return rustc_target
|
||||
|
||||
|
35
js91/007-no-lto-readelf.patch
Normal file
35
js91/007-no-lto-readelf.patch
Normal file
@ -0,0 +1,35 @@
|
||||
commit 1cc729c5221d0ce4c80786ccdcb2de4a6ca382b6
|
||||
Author: Daniel Kolesa <daniel@octaforge.org>
|
||||
Date: Sun Jan 23 21:55:43 2022 +0100
|
||||
|
||||
drop some library checks
|
||||
|
||||
This calls readelf and won't work with LTO'd setups.
|
||||
|
||||
diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
|
||||
index 401c2933..ade4f1da 100644
|
||||
--- a/config/makefiles/rust.mk
|
||||
+++ b/config/makefiles/rust.mk
|
||||
@@ -405,22 +405,6 @@ force-cargo-library-build:
|
||||
$(call CARGO_BUILD) --lib $(cargo_target_flag) $(rust_features_flag) -- $(cargo_rustc_flags)
|
||||
|
||||
$(RUST_LIBRARY_FILE): force-cargo-library-build
|
||||
-# When we are building in --enable-release mode; we add an additional check to confirm
|
||||
-# that we are not importing any networking-related functions in rust code. This reduces
|
||||
-# the chance of proxy bypasses originating from rust code.
|
||||
-# The check only works when rust code is built with -Clto but without MOZ_LTO_RUST_CROSS.
|
||||
-# Sanitizers and sancov also fail because compiler-rt hooks network functions.
|
||||
-ifndef MOZ_PROFILE_GENERATE
|
||||
-ifeq ($(OS_ARCH), Linux)
|
||||
-ifeq (,$(rustflags_sancov)$(MOZ_ASAN)$(MOZ_TSAN)$(MOZ_UBSAN))
|
||||
-ifndef MOZ_LTO_RUST_CROSS
|
||||
-ifneq (,$(filter -Clto,$(cargo_rustc_flags)))
|
||||
- $(call py_action,check_binary,--target --networking $@)
|
||||
-endif
|
||||
-endif
|
||||
-endif
|
||||
-endif
|
||||
-endif
|
||||
|
||||
force-cargo-library-check:
|
||||
$(call CARGO_CHECK) --lib $(cargo_target_flag) $(rust_features_flag)
|
11
js91/008-ffi-redifinition.patch
Normal file
11
js91/008-ffi-redifinition.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/firefox-91.12.0/gfx/webrender_bindings/webrender_ffi.h.orig 2022-08-16 10:02:32.775661134 +0200
|
||||
+++ src/firefox-91.12.0/gfx/webrender_bindings/webrender_ffi.h 2022-08-16 10:02:45.690394969 +0200
|
||||
@@ -77,8 +77,6 @@
|
||||
struct WrPipelineIdAndEpoch;
|
||||
using WrPipelineIdEpochs = nsTArray<WrPipelineIdAndEpoch>;
|
||||
|
||||
-const uint64_t ROOT_CLIP_CHAIN = ~0;
|
||||
-
|
||||
} // namespace wr
|
||||
} // namespace mozilla
|
||||
|
19
js91/fix-build-ppc32.patch
Normal file
19
js91/fix-build-ppc32.patch
Normal file
@ -0,0 +1,19 @@
|
||||
commit 32e52128ce8fe7704a29a5a4fb921a8394540fbc
|
||||
Author: q66 <daniel@octaforge.org>
|
||||
Date: Mon Jun 13 14:01:59 2022 +0200
|
||||
|
||||
fix ftbfs on powerpc32
|
||||
|
||||
diff --git a/js/src/wasm/WasmFrame.h b/js/src/wasm/WasmFrame.h
|
||||
index 85f2612d..df5c9629 100644
|
||||
--- a/js/src/wasm/WasmFrame.h
|
||||
+++ b/js/src/wasm/WasmFrame.h
|
||||
@@ -230,7 +230,7 @@ class DebugFrame {
|
||||
// Avoid -Wunused-private-field warnings.
|
||||
protected:
|
||||
#if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_ARM) || \
|
||||
- defined(JS_CODEGEN_X86) || defined(__wasi__)
|
||||
+ defined(JS_CODEGEN_X86) || defined(__wasi__) || (defined(__powerpc__) && !defined(__powerpc64__))
|
||||
// See alignmentStaticAsserts(). For MIPS32, ARM32 and X86 DebugFrame is only
|
||||
// 4-byte aligned, so we add another word to get up to 8-byte
|
||||
// alignment.
|
521
julia/julia-gcc-12.patch
Normal file
521
julia/julia-gcc-12.patch
Normal file
@ -0,0 +1,521 @@
|
||||
--- src/llvm-demote-float16.cpp 2022-05-24 16:26:36.982535055 +0000
|
||||
+++ src/llvm-demote-float16.cpp 2022-05-24 19:30:17.191673155 +0000
|
||||
@@ -27,6 +27,166 @@
|
||||
|
||||
namespace {
|
||||
|
||||
+inline AttributeSet getFnAttrs(const AttributeList &Attrs)
|
||||
+{
|
||||
+#if JL_LLVM_VERSION >= 140000
|
||||
+ return Attrs.getFnAttrs();
|
||||
+#else
|
||||
+ return Attrs.getFnAttributes();
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+inline AttributeSet getRetAttrs(const AttributeList &Attrs)
|
||||
+{
|
||||
+#if JL_LLVM_VERSION >= 140000
|
||||
+ return Attrs.getRetAttrs();
|
||||
+#else
|
||||
+ return Attrs.getRetAttributes();
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static Instruction *replaceIntrinsicWith(IntrinsicInst *call, Type *RetTy, ArrayRef<Value*> args)
|
||||
+{
|
||||
+ Intrinsic::ID ID = call->getIntrinsicID();
|
||||
+ assert(ID);
|
||||
+ auto oldfType = call->getFunctionType();
|
||||
+ auto nargs = oldfType->getNumParams();
|
||||
+ assert(args.size() > nargs);
|
||||
+ SmallVector<Type*, 8> argTys(nargs);
|
||||
+ for (unsigned i = 0; i < nargs; i++)
|
||||
+ argTys[i] = args[i]->getType();
|
||||
+ auto newfType = FunctionType::get(RetTy, argTys, oldfType->isVarArg());
|
||||
+
|
||||
+ // Accumulate an array of overloaded types for the given intrinsic
|
||||
+ // and compute the new name mangling schema
|
||||
+ SmallVector<Type*, 4> overloadTys;
|
||||
+ {
|
||||
+ SmallVector<Intrinsic::IITDescriptor, 8> Table;
|
||||
+ getIntrinsicInfoTableEntries(ID, Table);
|
||||
+ ArrayRef<Intrinsic::IITDescriptor> TableRef = Table;
|
||||
+ auto res = Intrinsic::matchIntrinsicSignature(newfType, TableRef, overloadTys);
|
||||
+ assert(res == Intrinsic::MatchIntrinsicTypes_Match);
|
||||
+ (void)res;
|
||||
+ bool matchvararg = !Intrinsic::matchIntrinsicVarArg(newfType->isVarArg(), TableRef);
|
||||
+ assert(matchvararg);
|
||||
+ (void)matchvararg;
|
||||
+ }
|
||||
+ auto newF = Intrinsic::getDeclaration(call->getModule(), ID, overloadTys);
|
||||
+ assert(newF->getFunctionType() == newfType);
|
||||
+ newF->setCallingConv(call->getCallingConv());
|
||||
+ assert(args.back() == call->getCalledFunction());
|
||||
+ auto newCall = CallInst::Create(newF, args.drop_back(), "", call);
|
||||
+ newCall->setTailCallKind(call->getTailCallKind());
|
||||
+ auto old_attrs = call->getAttributes();
|
||||
+ newCall->setAttributes(AttributeList::get(call->getContext(), getFnAttrs(old_attrs),
|
||||
+ getRetAttrs(old_attrs), {})); // drop parameter attributes
|
||||
+ return newCall;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static Value* CreateFPCast(Instruction::CastOps opcode, Value *V, Type *DestTy, IRBuilder<> &builder)
|
||||
+{
|
||||
+
|
||||
+ Type *SrcTy = V->getType();
|
||||
+ Type *RetTy = DestTy;
|
||||
+ if (auto *VC = dyn_cast<Constant>(V)) {
|
||||
+ // The input IR often has things of the form
|
||||
+ // fcmp olt half %0, 0xH7C00
|
||||
+ // and we would like to avoid turning that constant into a call here
|
||||
+ // if we can simply constant fold it to the new type.
|
||||
+ VC = ConstantExpr::getCast(opcode, VC, DestTy, true);
|
||||
+ if (VC)
|
||||
+ return VC;
|
||||
+ }
|
||||
+ assert(SrcTy->isVectorTy() == DestTy->isVectorTy());
|
||||
+ if (SrcTy->isVectorTy()) {
|
||||
+ unsigned NumElems = cast<FixedVectorType>(SrcTy)->getNumElements();
|
||||
+ assert(cast<FixedVectorType>(DestTy)->getNumElements() == NumElems && "Mismatched cast");
|
||||
+ Value *NewV = UndefValue::get(DestTy);
|
||||
+ RetTy = RetTy->getScalarType();
|
||||
+ for (unsigned i = 0; i < NumElems; ++i) {
|
||||
+ Value *I = builder.getInt32(i);
|
||||
+ Value *Vi = builder.CreateExtractElement(V, I);
|
||||
+ Vi = CreateFPCast(opcode, Vi, RetTy, builder);
|
||||
+ NewV = builder.CreateInsertElement(NewV, Vi, I);
|
||||
+ }
|
||||
+ return NewV;
|
||||
+ }
|
||||
+ auto &M = *builder.GetInsertBlock()->getModule();
|
||||
+ auto &ctx = M.getContext();
|
||||
+ // Pick the Function to call in the Julia runtime
|
||||
+ StringRef Name;
|
||||
+ switch (opcode) {
|
||||
+ case Instruction::FPExt:
|
||||
+ // this is exact, so we only need one conversion
|
||||
+ assert(SrcTy->isHalfTy());
|
||||
+ Name = "julia__gnu_h2f_ieee";
|
||||
+ RetTy = Type::getFloatTy(ctx);
|
||||
+ break;
|
||||
+ case Instruction::FPTrunc:
|
||||
+ assert(DestTy->isHalfTy());
|
||||
+ if (SrcTy->isFloatTy())
|
||||
+ Name = "julia__gnu_f2h_ieee";
|
||||
+ else if (SrcTy->isDoubleTy())
|
||||
+ Name = "julia__truncdfhf2";
|
||||
+ break;
|
||||
+ // All F16 fit exactly in Int32 (-65504 to 65504)
|
||||
+ case Instruction::FPToSI: JL_FALLTHROUGH;
|
||||
+ case Instruction::FPToUI:
|
||||
+ assert(SrcTy->isHalfTy());
|
||||
+ Name = "julia__gnu_h2f_ieee";
|
||||
+ RetTy = Type::getFloatTy(ctx);
|
||||
+ break;
|
||||
+ case Instruction::SIToFP: JL_FALLTHROUGH;
|
||||
+ case Instruction::UIToFP:
|
||||
+ assert(DestTy->isHalfTy());
|
||||
+ Name = "julia__gnu_f2h_ieee";
|
||||
+ SrcTy = Type::getFloatTy(ctx);
|
||||
+ break;
|
||||
+ default:
|
||||
+ errs() << Instruction::getOpcodeName(opcode) << ' ';
|
||||
+ V->getType()->print(errs());
|
||||
+ errs() << " to ";
|
||||
+ DestTy->print(errs());
|
||||
+ errs() << " is an ";
|
||||
+ llvm_unreachable("invalid cast");
|
||||
+ }
|
||||
+ if (Name.empty()) {
|
||||
+ errs() << Instruction::getOpcodeName(opcode) << ' ';
|
||||
+ V->getType()->print(errs());
|
||||
+ errs() << " to ";
|
||||
+ DestTy->print(errs());
|
||||
+ errs() << " is an ";
|
||||
+ llvm_unreachable("illegal cast");
|
||||
+ }
|
||||
+ // Coerce the source to the required size and type
|
||||
+ auto T_int16 = Type::getInt16Ty(ctx);
|
||||
+ if (SrcTy->isHalfTy())
|
||||
+ SrcTy = T_int16;
|
||||
+ if (opcode == Instruction::SIToFP)
|
||||
+ V = builder.CreateSIToFP(V, SrcTy);
|
||||
+ else if (opcode == Instruction::UIToFP)
|
||||
+ V = builder.CreateUIToFP(V, SrcTy);
|
||||
+ else
|
||||
+ V = builder.CreateBitCast(V, SrcTy);
|
||||
+ // Call our intrinsic
|
||||
+ if (RetTy->isHalfTy())
|
||||
+ RetTy = T_int16;
|
||||
+ auto FT = FunctionType::get(RetTy, {SrcTy}, false);
|
||||
+ FunctionCallee F = M.getOrInsertFunction(Name, FT);
|
||||
+ Value *I = builder.CreateCall(F, {V});
|
||||
+ // Coerce the result to the expected type
|
||||
+ if (opcode == Instruction::FPToSI)
|
||||
+ I = builder.CreateFPToSI(I, DestTy);
|
||||
+ else if (opcode == Instruction::FPToUI)
|
||||
+ I = builder.CreateFPToUI(I, DestTy);
|
||||
+ else if (opcode == Instruction::FPExt)
|
||||
+ I = builder.CreateFPCast(I, DestTy);
|
||||
+ else
|
||||
+ I = builder.CreateBitCast(I, DestTy);
|
||||
+ return I;
|
||||
+}
|
||||
+
|
||||
struct DemoteFloat16Pass : public FunctionPass {
|
||||
static char ID;
|
||||
DemoteFloat16Pass() : FunctionPass(ID){};
|
||||
@@ -35,15 +195,40 @@
|
||||
bool runOnFunction(Function &F) override;
|
||||
};
|
||||
|
||||
+Type *_getWithNewType(Type *VTyp, Type *EltTy) {
|
||||
+ if (auto *VTy = dyn_cast<VectorType>(VTyp))
|
||||
+ return VectorType::get(EltTy, VTy->getElementCount());
|
||||
+ return EltTy;
|
||||
+}
|
||||
+
|
||||
+
|
||||
bool DemoteFloat16Pass::runOnFunction(Function &F)
|
||||
{
|
||||
auto &ctx = F.getContext();
|
||||
- auto T_float16 = Type::getHalfTy(ctx);
|
||||
auto T_float32 = Type::getFloatTy(ctx);
|
||||
|
||||
SmallVector<Instruction *, 0> erase;
|
||||
for (auto &BB : F) {
|
||||
for (auto &I : BB) {
|
||||
+ // extend Float16 operands to Float32
|
||||
+ bool Float16 = I.getType()->getScalarType()->isHalfTy();
|
||||
+ for (size_t i = 0; !Float16 && i < I.getNumOperands(); i++) {
|
||||
+ Value *Op = I.getOperand(i);
|
||||
+ if (Op->getType()->getScalarType()->isHalfTy())
|
||||
+ Float16 = true;
|
||||
+ }
|
||||
+ if (!Float16)
|
||||
+ continue;
|
||||
+
|
||||
+ if (auto CI = dyn_cast<CastInst>(&I)) {
|
||||
+ if (CI->getOpcode() != Instruction::BitCast) { // aka !CI->isNoopCast(DL)
|
||||
+ IRBuilder<> builder(&I);
|
||||
+ Value *NewI = CreateFPCast(CI->getOpcode(), I.getOperand(0), I.getType(), builder);
|
||||
+ I.replaceAllUsesWith(NewI);
|
||||
+ erase.push_back(&I);
|
||||
+ }
|
||||
+ continue;
|
||||
+ }
|
||||
switch (I.getOpcode()) {
|
||||
case Instruction::FNeg:
|
||||
case Instruction::FAdd:
|
||||
@@ -54,6 +239,9 @@
|
||||
case Instruction::FCmp:
|
||||
break;
|
||||
default:
|
||||
+ if (auto intrinsic = dyn_cast<IntrinsicInst>(&I))
|
||||
+ if (intrinsic->getIntrinsicID())
|
||||
+ break;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -65,61 +253,68 @@
|
||||
IRBuilder<> builder(&I);
|
||||
|
||||
// extend Float16 operands to Float32
|
||||
- bool OperandsChanged = false;
|
||||
+ // XXX: Calls to llvm.fma.f16 may need to go to f64 to be correct?
|
||||
SmallVector<Value *, 2> Operands(I.getNumOperands());
|
||||
for (size_t i = 0; i < I.getNumOperands(); i++) {
|
||||
Value *Op = I.getOperand(i);
|
||||
- if (Op->getType() == T_float16) {
|
||||
- Op = builder.CreateFPExt(Op, T_float32);
|
||||
- OperandsChanged = true;
|
||||
+ if (Op->getType()->getScalarType()->isHalfTy()) {
|
||||
+ Op = CreateFPCast(Instruction::FPExt, Op, _getWithNewType(Op->getType(), T_float32), builder);
|
||||
}
|
||||
Operands[i] = (Op);
|
||||
}
|
||||
|
||||
// recreate the instruction if any operands changed,
|
||||
// truncating the result back to Float16
|
||||
- if (OperandsChanged) {
|
||||
- Value *NewI;
|
||||
- switch (I.getOpcode()) {
|
||||
- case Instruction::FNeg:
|
||||
- assert(Operands.size() == 1);
|
||||
- NewI = builder.CreateFNeg(Operands[0]);
|
||||
- break;
|
||||
- case Instruction::FAdd:
|
||||
- assert(Operands.size() == 2);
|
||||
- NewI = builder.CreateFAdd(Operands[0], Operands[1]);
|
||||
- break;
|
||||
- case Instruction::FSub:
|
||||
- assert(Operands.size() == 2);
|
||||
- NewI = builder.CreateFSub(Operands[0], Operands[1]);
|
||||
- break;
|
||||
- case Instruction::FMul:
|
||||
- assert(Operands.size() == 2);
|
||||
- NewI = builder.CreateFMul(Operands[0], Operands[1]);
|
||||
- break;
|
||||
- case Instruction::FDiv:
|
||||
- assert(Operands.size() == 2);
|
||||
- NewI = builder.CreateFDiv(Operands[0], Operands[1]);
|
||||
- break;
|
||||
- case Instruction::FRem:
|
||||
- assert(Operands.size() == 2);
|
||||
- NewI = builder.CreateFRem(Operands[0], Operands[1]);
|
||||
- break;
|
||||
- case Instruction::FCmp:
|
||||
- assert(Operands.size() == 2);
|
||||
- NewI = builder.CreateFCmp(cast<FCmpInst>(&I)->getPredicate(),
|
||||
- Operands[0], Operands[1]);
|
||||
+ Value *NewI;
|
||||
+ switch (I.getOpcode()) {
|
||||
+ case Instruction::FNeg:
|
||||
+ assert(Operands.size() == 1);
|
||||
+ NewI = builder.CreateFNeg(Operands[0]);
|
||||
+ break;
|
||||
+ case Instruction::FAdd:
|
||||
+ assert(Operands.size() == 2);
|
||||
+ NewI = builder.CreateFAdd(Operands[0], Operands[1]);
|
||||
+ break;
|
||||
+ case Instruction::FSub:
|
||||
+ assert(Operands.size() == 2);
|
||||
+ NewI = builder.CreateFSub(Operands[0], Operands[1]);
|
||||
+ break;
|
||||
+ case Instruction::FMul:
|
||||
+ assert(Operands.size() == 2);
|
||||
+ NewI = builder.CreateFMul(Operands[0], Operands[1]);
|
||||
+ break;
|
||||
+ case Instruction::FDiv:
|
||||
+ assert(Operands.size() == 2);
|
||||
+ NewI = builder.CreateFDiv(Operands[0], Operands[1]);
|
||||
+ break;
|
||||
+ case Instruction::FRem:
|
||||
+ assert(Operands.size() == 2);
|
||||
+ NewI = builder.CreateFRem(Operands[0], Operands[1]);
|
||||
+ break;
|
||||
+ case Instruction::FCmp:
|
||||
+ assert(Operands.size() == 2);
|
||||
+ NewI = builder.CreateFCmp(cast<FCmpInst>(&I)->getPredicate(),
|
||||
+ Operands[0], Operands[1]);
|
||||
+ break;
|
||||
+ default:
|
||||
+ if (auto intrinsic = dyn_cast<IntrinsicInst>(&I)) {
|
||||
+ // XXX: this is not correct in general
|
||||
+ // some obvious failures include llvm.convert.to.fp16.*, llvm.vp.*to*, llvm.experimental.constrained.*to*, llvm.masked.*
|
||||
+ Type *RetTy = I.getType();
|
||||
+ if (RetTy->getScalarType()->isHalfTy())
|
||||
+ RetTy = _getWithNewType(RetTy, T_float32);
|
||||
+ NewI = replaceIntrinsicWith(intrinsic, RetTy, Operands);
|
||||
break;
|
||||
- default:
|
||||
- abort();
|
||||
}
|
||||
- cast<Instruction>(NewI)->copyMetadata(I);
|
||||
- cast<Instruction>(NewI)->copyFastMathFlags(&I);
|
||||
- if (NewI->getType() != I.getType())
|
||||
- NewI = builder.CreateFPTrunc(NewI, I.getType());
|
||||
- I.replaceAllUsesWith(NewI);
|
||||
- erase.push_back(&I);
|
||||
+ abort();
|
||||
+ }
|
||||
+ cast<Instruction>(NewI)->copyMetadata(I);
|
||||
+ cast<Instruction>(NewI)->copyFastMathFlags(&I);
|
||||
+ if (NewI->getType() != I.getType()) {
|
||||
+ NewI = CreateFPCast(Instruction::FPTrunc, NewI, I.getType(), builder);
|
||||
}
|
||||
+ I.replaceAllUsesWith(NewI);
|
||||
+ erase.push_back(&I);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
--- src/runtime_intrinsics.c 2022-05-24 16:27:19.292819527 +0000
|
||||
+++ src/runtime_intrinsics.c 2022-05-24 16:44:16.062717753 +0000
|
||||
@@ -338,9 +338,9 @@
|
||||
}
|
||||
|
||||
#define fp_select(a, func) \
|
||||
- sizeof(a) == sizeof(float) ? func##f((float)a) : func(a)
|
||||
+ sizeof(a) <= sizeof(float) ? func##f((float)a) : func(a)
|
||||
#define fp_select2(a, b, func) \
|
||||
- sizeof(a) == sizeof(float) ? func##f(a, b) : func(a, b)
|
||||
+ sizeof(a) <= sizeof(float) ? func##f(a, b) : func(a, b)
|
||||
|
||||
// fast-function generators //
|
||||
|
||||
@@ -384,11 +384,11 @@
|
||||
static inline void name(unsigned osize, void *pa, void *pr) JL_NOTSAFEPOINT \
|
||||
{ \
|
||||
uint16_t a = *(uint16_t*)pa; \
|
||||
- float A = __gnu_h2f_ieee(a); \
|
||||
+ float A = julia__gnu_h2f_ieee(a); \
|
||||
if (osize == 16) { \
|
||||
float R; \
|
||||
OP(&R, A); \
|
||||
- *(uint16_t*)pr = __gnu_f2h_ieee(R); \
|
||||
+ *(uint16_t*)pr = julia__gnu_f2h_ieee(R); \
|
||||
} else { \
|
||||
OP((uint16_t*)pr, A); \
|
||||
} \
|
||||
@@ -412,11 +412,11 @@
|
||||
{ \
|
||||
uint16_t a = *(uint16_t*)pa; \
|
||||
uint16_t b = *(uint16_t*)pb; \
|
||||
- float A = __gnu_h2f_ieee(a); \
|
||||
- float B = __gnu_h2f_ieee(b); \
|
||||
+ float A = julia__gnu_h2f_ieee(a); \
|
||||
+ float B = julia__gnu_h2f_ieee(b); \
|
||||
runtime_nbits = 16; \
|
||||
float R = OP(A, B); \
|
||||
- *(uint16_t*)pr = __gnu_f2h_ieee(R); \
|
||||
+ *(uint16_t*)pr = julia__gnu_f2h_ieee(R); \
|
||||
}
|
||||
|
||||
// float or integer inputs, bool output
|
||||
@@ -437,8 +437,8 @@
|
||||
{ \
|
||||
uint16_t a = *(uint16_t*)pa; \
|
||||
uint16_t b = *(uint16_t*)pb; \
|
||||
- float A = __gnu_h2f_ieee(a); \
|
||||
- float B = __gnu_h2f_ieee(b); \
|
||||
+ float A = julia__gnu_h2f_ieee(a); \
|
||||
+ float B = julia__gnu_h2f_ieee(b); \
|
||||
runtime_nbits = 16; \
|
||||
return OP(A, B); \
|
||||
}
|
||||
@@ -478,12 +478,12 @@
|
||||
uint16_t a = *(uint16_t*)pa; \
|
||||
uint16_t b = *(uint16_t*)pb; \
|
||||
uint16_t c = *(uint16_t*)pc; \
|
||||
- float A = __gnu_h2f_ieee(a); \
|
||||
- float B = __gnu_h2f_ieee(b); \
|
||||
- float C = __gnu_h2f_ieee(c); \
|
||||
+ float A = julia__gnu_h2f_ieee(a); \
|
||||
+ float B = julia__gnu_h2f_ieee(b); \
|
||||
+ float C = julia__gnu_h2f_ieee(c); \
|
||||
runtime_nbits = 16; \
|
||||
float R = OP(A, B, C); \
|
||||
- *(uint16_t*)pr = __gnu_f2h_ieee(R); \
|
||||
+ *(uint16_t*)pr = julia__gnu_f2h_ieee(R); \
|
||||
}
|
||||
|
||||
|
||||
@@ -1001,7 +1001,7 @@
|
||||
fpiseq_n(float, 32)
|
||||
fpiseq_n(double, 64)
|
||||
#define fpiseq(a,b) \
|
||||
- sizeof(a) == sizeof(float) ? fpiseq32(a, b) : fpiseq64(a, b)
|
||||
+ sizeof(a) <= sizeof(float) ? fpiseq32(a, b) : fpiseq64(a, b)
|
||||
|
||||
bool_fintrinsic(eq,eq_float)
|
||||
bool_fintrinsic(ne,ne_float)
|
||||
@@ -1050,7 +1050,7 @@
|
||||
if (!(osize < 8 * sizeof(a))) \
|
||||
jl_error("fptrunc: output bitsize must be < input bitsize"); \
|
||||
else if (osize == 16) \
|
||||
- *(uint16_t*)pr = __gnu_f2h_ieee(a); \
|
||||
+ *(uint16_t*)pr = julia__gnu_f2h_ieee(a); \
|
||||
else if (osize == 32) \
|
||||
*(float*)pr = a; \
|
||||
else if (osize == 64) \
|
||||
|
||||
--- src/julia_internal.h 2022-05-24 16:26:09.953046957 +0000
|
||||
+++ src/julia_internal.h 2022-05-24 16:28:59.610039708 +0000
|
||||
@@ -1427,8 +1427,9 @@
|
||||
#define JL_GC_ASSERT_LIVE(x) (void)(x)
|
||||
#endif
|
||||
|
||||
-float __gnu_h2f_ieee(uint16_t param) JL_NOTSAFEPOINT;
|
||||
-uint16_t __gnu_f2h_ieee(float param) JL_NOTSAFEPOINT;
|
||||
+JL_DLLEXPORT float julia__gnu_h2f_ieee(uint16_t param) JL_NOTSAFEPOINT;
|
||||
+JL_DLLEXPORT uint16_t julia__gnu_f2h_ieee(float param) JL_NOTSAFEPOINT;
|
||||
+JL_DLLEXPORT uint16_t julia__truncdfhf2(double param) JL_NOTSAFEPOINT;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
--- src/intrinsics.cpp 2022-05-24 17:18:23.008583654 +0000
|
||||
+++ src/intrinsics.cpp 2022-05-24 19:56:09.991480454 +0000
|
||||
@@ -1633,24 +1633,17 @@
|
||||
return h;
|
||||
}
|
||||
|
||||
-#if !defined(_OS_DARWIN_) // xcode already links compiler-rt
|
||||
-
|
||||
-extern "C" JL_DLLEXPORT float __gnu_h2f_ieee(uint16_t param)
|
||||
-{
|
||||
- return half_to_float(param);
|
||||
-}
|
||||
-
|
||||
-extern "C" JL_DLLEXPORT float __extendhfsf2(uint16_t param)
|
||||
+extern "C" JL_DLLEXPORT float julia__gnu_h2f_ieee(uint16_t param)
|
||||
{
|
||||
return half_to_float(param);
|
||||
}
|
||||
|
||||
-extern "C" JL_DLLEXPORT uint16_t __gnu_f2h_ieee(float param)
|
||||
+extern "C" JL_DLLEXPORT uint16_t julia__gnu_f2h_ieee(float param)
|
||||
{
|
||||
return float_to_half(param);
|
||||
}
|
||||
|
||||
-extern "C" JL_DLLEXPORT uint16_t __truncdfhf2(double param)
|
||||
+extern "C" JL_DLLEXPORT uint16_t julia__truncdfhf2(double param)
|
||||
{
|
||||
float res = (float)param;
|
||||
uint32_t resi;
|
||||
@@ -1671,5 +1664,3 @@
|
||||
}
|
||||
return float_to_half(res);
|
||||
}
|
||||
-
|
||||
-#endif
|
||||
|
||||
--- src/julia.expmap 2022-05-24 16:25:48.787865159 +0000
|
||||
+++ src/julia.expmap 2022-05-24 16:28:39.517014539 +0000
|
||||
@@ -42,12 +42,6 @@
|
||||
environ;
|
||||
__progname;
|
||||
|
||||
- /* compiler run-time intrinsics */
|
||||
- __gnu_h2f_ieee;
|
||||
- __extendhfsf2;
|
||||
- __gnu_f2h_ieee;
|
||||
- __truncdfhf2;
|
||||
-
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
||||
--- src/APInt-C.cpp 2022-05-24 16:25:05.957426445 +0000
|
||||
+++ src/APInt-C.cpp 2022-05-24 16:28:27.792411828 +0000
|
||||
@@ -316,7 +316,7 @@
|
||||
void LLVMFPtoInt(unsigned numbits, void *pa, unsigned onumbits, integerPart *pr, bool isSigned, bool *isExact) {
|
||||
double Val;
|
||||
if (numbits == 16)
|
||||
- Val = __gnu_h2f_ieee(*(uint16_t*)pa);
|
||||
+ Val = julia__gnu_h2f_ieee(*(uint16_t*)pa);
|
||||
else if (numbits == 32)
|
||||
Val = *(float*)pa;
|
||||
else if (numbits == 64)
|
||||
@@ -391,7 +391,7 @@
|
||||
val = a.roundToDouble(true);
|
||||
}
|
||||
if (onumbits == 16)
|
||||
- *(uint16_t*)pr = __gnu_f2h_ieee(val);
|
||||
+ *(uint16_t*)pr = julia__gnu_f2h_ieee(val);
|
||||
else if (onumbits == 32)
|
||||
*(float*)pr = val;
|
||||
else if (onumbits == 64)
|
||||
@@ -408,7 +408,7 @@
|
||||
val = a.roundToDouble(false);
|
||||
}
|
||||
if (onumbits == 16)
|
||||
- *(uint16_t*)pr = __gnu_f2h_ieee(val);
|
||||
+ *(uint16_t*)pr = julia__gnu_f2h_ieee(val);
|
||||
else if (onumbits == 32)
|
||||
*(float*)pr = val;
|
||||
else if (onumbits == 64)
|
15
julia/julia-libblastrampoline-4.patch
Normal file
15
julia/julia-libblastrampoline-4.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/stdlib/LinearAlgebra/src/lbt.jl b/stdlib/LinearAlgebra/src/lbt.jl
|
||||
index 26b3a1210a3f..ea1ab25c9e1a 100644
|
||||
--- a/stdlib/LinearAlgebra/src/lbt.jl
|
||||
+++ b/stdlib/LinearAlgebra/src/lbt.jl
|
||||
@@ -156,8 +156,8 @@ function lbt_set_num_threads(nthreads)
|
||||
return ccall((:lbt_set_num_threads, libblastrampoline), Cvoid, (Int32,), nthreads)
|
||||
end
|
||||
|
||||
-function lbt_forward(path; clear::Bool = false, verbose::Bool = false)
|
||||
- ccall((:lbt_forward, libblastrampoline), Int32, (Cstring, Int32, Int32), path, clear ? 1 : 0, verbose ? 1 : 0)
|
||||
+function lbt_forward(path; clear::Bool = false, verbose::Bool = false, suffix_hint::Union{String,Nothing} = nothing)
|
||||
+ ccall((:lbt_forward, libblastrampoline), Int32, (Cstring, Int32, Int32, Cstring), path, clear ? 1 : 0, verbose ? 1 : 0, something(suffix_hint, C_NULL))
|
||||
end
|
||||
|
||||
function lbt_set_default_func(addr)
|
40
julia/julia-libgit-1.4.patch
Normal file
40
julia/julia-libgit-1.4.patch
Normal file
@ -0,0 +1,40 @@
|
||||
diff --git a/stdlib/LibGit2/src/consts.jl b/stdlib/LibGit2/src/consts.jl
|
||||
index 2bc9edaf89..55887ebe2a 100644
|
||||
--- a/stdlib/LibGit2/src/consts.jl
|
||||
+++ b/stdlib/LibGit2/src/consts.jl
|
||||
@@ -247,6 +247,11 @@ const RESET_HARD = Cint(3) # MIXED plus changes in working tree discarded
|
||||
REBASE_OPERATION_FIXUP = Cint(4),
|
||||
REBASE_OPERATION_EXEC = Cint(5))
|
||||
|
||||
+# git_remote_redirect_t
|
||||
+const GIT_REMOTE_REDIRECT_NONE = Cint(0)
|
||||
+const GIT_REMOTE_REDIRECT_INITIAL = Cint(1)
|
||||
+const GIT_REMOTE_REDIRECT_ALL = Cint(2)
|
||||
+
|
||||
# fetch_prune
|
||||
const FETCH_PRUNE_UNSPECIFIED = Cint(0)
|
||||
const FETCH_PRUNE = Cint(1)
|
||||
diff --git a/stdlib/LibGit2/src/types.jl b/stdlib/LibGit2/src/types.jl
|
||||
index 9ffcaa3646..98d938df65 100644
|
||||
--- a/stdlib/LibGit2/src/types.jl
|
||||
+++ b/stdlib/LibGit2/src/types.jl
|
||||
@@ -343,6 +343,9 @@ The fields represent:
|
||||
@static if LibGit2.VERSION >= v"0.25.0"
|
||||
proxy_opts::ProxyOptions = ProxyOptions()
|
||||
end
|
||||
+ @static if LibGit2.VERSION >= v"1.4.0"
|
||||
+ follow_redirects::Cint = Consts.GIT_REMOTE_REDIRECT_INITIAL
|
||||
+ end
|
||||
@static if LibGit2.VERSION >= v"0.24.0"
|
||||
custom_headers::StrArrayStruct = StrArrayStruct()
|
||||
end
|
||||
@@ -674,6 +677,9 @@ The fields represent:
|
||||
@static if LibGit2.VERSION >= v"0.25.0"
|
||||
proxy_opts::ProxyOptions = ProxyOptions()
|
||||
end
|
||||
+ @static if LibGit2.VERSION >= v"1.4.0"
|
||||
+ follow_redirects::Cint = Consts.GIT_REMOTE_REDIRECT_INITIAL
|
||||
+ end
|
||||
@static if LibGit2.VERSION >= v"0.24.0"
|
||||
custom_headers::StrArrayStruct = StrArrayStruct()
|
||||
end
|
97
kmod/0001-master.patch
Normal file
97
kmod/0001-master.patch
Normal file
@ -0,0 +1,97 @@
|
||||
From 16c086f48c2270ad6412ad7226df53079f825270 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: Thu, 30 Jun 2022 18:47:25 +0200
|
||||
Subject: [PATCH 1/3] testsuite: repair read of uninitialized memory
|
||||
|
||||
Function ``test_backoff_time`` does not initialize ``delta``, and
|
||||
``get_backoff_delta_msec`` then performs a read from uninitialized
|
||||
memory with the ``!*delta`` expression.
|
||||
|
||||
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
|
||||
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
|
||||
---
|
||||
testsuite/test-util.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/testsuite/test-util.c b/testsuite/test-util.c
|
||||
index fb8c9ef..5766584 100644
|
||||
--- a/testsuite/test-util.c
|
||||
+++ b/testsuite/test-util.c
|
||||
@@ -231,7 +231,7 @@ DEFINE_TEST(test_addu64_overflow,
|
||||
|
||||
static int test_backoff_time(const struct test *t)
|
||||
{
|
||||
- unsigned long long delta;
|
||||
+ unsigned long long delta = 0;
|
||||
|
||||
/* Check exponential increments */
|
||||
get_backoff_delta_msec(now_msec(), now_msec() + 10, &delta);
|
||||
|
||||
From 09ad8605520c87e799cb89e2bcdf2f36e21f77ba Mon Sep 17 00:00:00 2001
|
||||
From: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
|
||||
Date: Thu, 24 Jun 2021 14:53:56 +0100
|
||||
Subject: [PATCH 2/3] build: enable building & running tests from a subdir
|
||||
|
||||
During dpkg build, in a subdir, it is currently not possible to run
|
||||
tests. Building testsuite/modules due to non-existance of the
|
||||
testsuite directory under the build dir. Thus create it, when it is
|
||||
not there.
|
||||
|
||||
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
|
||||
---
|
||||
Makefile.am | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 0e48770..b0a654c 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -255,6 +255,7 @@ CREATE_ROOTFS = $(AM_V_GEN) ( $(RM) -rf $(ROOTFS) && mkdir -p $(dir $(ROOTFS)) &
|
||||
build-module-playground:
|
||||
$(AM_V_GEN)if test "$(top_srcdir)" != "$(top_builddir)"; then \
|
||||
$(RM) -rf testsuite/module-playground && \
|
||||
+ mkdir -p testsuite/ && \
|
||||
cp -r $(top_srcdir)/$(MODULE_PLAYGROUND) $(top_builddir)/$(MODULE_PLAYGROUND) && \
|
||||
find $(top_builddir)/$(MODULE_PLAYGROUND) -type d -exec chmod +w {} \; ; \
|
||||
fi
|
||||
|
||||
From c1fb98a30dae051ab69d23624d1e062d0527527e Mon Sep 17 00:00:00 2001
|
||||
From: Quentin Armitage <quentin@armitage.org.uk>
|
||||
Date: Fri, 19 Nov 2021 18:33:49 +0000
|
||||
Subject: [PATCH 3/3] modprobe: Write error messages to syslog if stderr is
|
||||
unavailable
|
||||
|
||||
The man page modprobe(8) states for the --syslog option:
|
||||
"This is also automatically enabled when stderr is unavailable."
|
||||
but it wasn't happening.
|
||||
|
||||
This commit now makes modprobe write to syslog if stderr is closed.
|
||||
---
|
||||
tools/modprobe.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/tools/modprobe.c b/tools/modprobe.c
|
||||
index 2a2ae21..3240c2b 100644
|
||||
--- a/tools/modprobe.c
|
||||
+++ b/tools/modprobe.c
|
||||
@@ -819,6 +819,7 @@ static int do_modprobe(int argc, char **orig_argv)
|
||||
int do_show_modversions = 0;
|
||||
int do_show_exports = 0;
|
||||
int err;
|
||||
+ struct stat stat_buf;
|
||||
|
||||
argv = prepend_options_from_env(&argc, orig_argv);
|
||||
if (argv == NULL) {
|
||||
@@ -947,6 +948,12 @@ static int do_modprobe(int argc, char **orig_argv)
|
||||
args = argv + optind;
|
||||
nargs = argc - optind;
|
||||
|
||||
+ if (!use_syslog &&
|
||||
+ (!stderr ||
|
||||
+ fileno(stderr) == -1 ||
|
||||
+ fstat(fileno(stderr), &stat_buf)))
|
||||
+ use_syslog = 1;
|
||||
+
|
||||
log_open(use_syslog);
|
||||
|
||||
if (!do_show_config) {
|
13
libcmis/getRefreshToken.diff
Normal file
13
libcmis/getRefreshToken.diff
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/inc/libcmis/session.hxx b/inc/libcmis/session.hxx
|
||||
index 0a768a8..ec95ab4 100644
|
||||
--- a/inc/libcmis/session.hxx
|
||||
+++ b/inc/libcmis/session.hxx
|
||||
@@ -95,6 +95,8 @@ namespace libcmis
|
||||
certificate exception feature available on common web browser.
|
||||
*/
|
||||
virtual void setNoSSLCertificateCheck( bool noCheck ) = 0;
|
||||
+
|
||||
+ virtual std::string getRefreshToken() { return ""; };
|
||||
};
|
||||
}
|
||||
|
33
libplacebo/libplacebo-2.72.0-fix-vulkan-undeclared.patch
Normal file
33
libplacebo/libplacebo-2.72.0-fix-vulkan-undeclared.patch
Normal file
@ -0,0 +1,33 @@
|
||||
https://bugs.gentoo.org/789498
|
||||
|
||||
From ac44e8f14acbfd2810c46e07e38466673f0ad7e0 Mon Sep 17 00:00:00 2001
|
||||
From: Niklas Haas <git@haasn.xyz>
|
||||
Date: Tue, 23 Mar 2021 11:57:13 +0100
|
||||
Subject: [PATCH] vulkan: blacklist FUCHSIA strings
|
||||
|
||||
Maybe one day we'll actually figure out how to make this python script
|
||||
exclude platform-specific stuff in a way that doesn't rely on hardcoding
|
||||
a list of strings to blacklist.
|
||||
|
||||
One day.
|
||||
|
||||
Fixes https://code.videolan.org/videolan/libplacebo/-/issues/131
|
||||
---
|
||||
src/vulkan/utils_gen.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/vulkan/utils_gen.py b/src/vulkan/utils_gen.py
|
||||
index a4565f3..53195f2 100644
|
||||
--- a/src/vulkan/utils_gen.py
|
||||
+++ b/src/vulkan/utils_gen.py
|
||||
@@ -155,7 +155,7 @@ def get_vkstructs(registry):
|
||||
# Strings for platform-specific crap we want to blacklist as they will
|
||||
# most likely cause build failures
|
||||
blacklist_strs = [
|
||||
- 'ANDROID', 'Surface', 'Win32', 'D3D12', 'GGP'
|
||||
+ 'ANDROID', 'Surface', 'Win32', 'D3D12', 'GGP', 'FUCHSIA',
|
||||
]
|
||||
|
||||
if any([ str in e.attrib['name'] for str in blacklist_strs ]):
|
||||
--
|
||||
GitLab
|
23
librttopo/postgis-15444-security-fix.patch
Normal file
23
librttopo/postgis-15444-security-fix.patch
Normal file
@ -0,0 +1,23 @@
|
||||
--- a/src/rtout_x3d.c
|
||||
+++ b/src/rtout_x3d.c
|
||||
@@ -63,6 +63,20 @@ rtgeom_to_x3d3(const RTCTX *ctx, const RTGEOM *geom, char *srs, int precision, i
|
||||
{
|
||||
int type = geom->type;
|
||||
|
||||
+/* apply patch postgis: https://trac.osgeo.org/postgis/changeset/15444 */
|
||||
+/* https://trac.osgeo.org/postgis/ticket/3704 */
|
||||
+
|
||||
+/* Empty string for empties */
|
||||
+ if( rtgeom_is_empty(ctx, geom) )
|
||||
+ {
|
||||
+ char *ret = NULL;
|
||||
+ ret = rtalloc(ctx, 1);
|
||||
+ ret[0] = '\0';
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+/* end patch */
|
||||
+
|
||||
switch (type)
|
||||
{
|
||||
case RTPOINTTYPE:
|
45
libvirt/823a62ec8aac4fb75e6e281164f3eb56ae47597c.patch
Normal file
45
libvirt/823a62ec8aac4fb75e6e281164f3eb56ae47597c.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From 823a62ec8aac4fb75e6e281164f3eb56ae47597c Mon Sep 17 00:00:00 2001
|
||||
From: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Date: Tue, 1 Mar 2022 18:47:59 +0100
|
||||
Subject: [PATCH] qemu: segmentation fault in virtqemud executing
|
||||
qemuDomainUndefineFlags
|
||||
|
||||
Commit 5adfb3472342741c443ac91dee0abb18b5a3d038 causes a segmentation fault.
|
||||
|
||||
Stack trace of thread 664419:
|
||||
#0 0x000003ff62ec553c in qemuDomainUndefineFlags (dom=0x3ff6c002810, flags=<optimized out>) at ../src/qemu/qemu_driver.c:6618
|
||||
#1 0x000003ff876a7e5c in virDomainUndefineFlags (domain=domain@entry=0x3ff6c002810, flags=<optimized out>) at ../src/libvirt-domain.c:6519
|
||||
#2 0x000002aa2b64a808 in remoteDispatchDomainUndefineFlags (server=0x2aa2c3d7880, msg=0x2aa2c3d2770, args=<optimized out>, rerr=0x3ff8287b950, client=<optimized out>)
|
||||
at src/remote/remote_daemon_dispatch_stubs.h:13080
|
||||
#3 remoteDispatchDomainUndefineFlagsHelper (server=0x2aa2c3d7880, client=<optimized out>, msg=0x2aa2c3d2770, rerr=0x3ff8287b950, args=<optimized out>, ret=0x0)
|
||||
at src/remote/remote_daemon_dispatch_stubs.h:13059
|
||||
#4 0x000003ff8758bbf4 in virNetServerProgramDispatchCall (msg=0x2aa2c3d2770, client=0x2aa2c3e3050, server=0x2aa2c3d7880, prog=0x2aa2c3d8010)
|
||||
at ../src/rpc/virnetserverprogram.c:428
|
||||
#5 virNetServerProgramDispatch (prog=0x2aa2c3d8010, server=server@entry=0x2aa2c3d7880, client=0x2aa2c3e3050, msg=0x2aa2c3d2770) at ../src/rpc/virnetserverprogram.c:302
|
||||
#6 0x000003ff8758c260 in virNetServerProcessMsg (msg=<optimized out>, prog=<optimized out>, client=<optimized out>, srv=0x2aa2c3d7880) at ../src/rpc/virnetserver.c:140
|
||||
#7 virNetServerHandleJob (jobOpaque=0x2aa2c3e2d30, opaque=0x2aa2c3d7880) at ../src/rpc/virnetserver.c:160
|
||||
#8 0x000003ff874c49aa in virThreadPoolWorker (opaque=<optimized out>) at ../src/util/virthreadpool.c:164
|
||||
#9 0x000003ff874c3f62 in virThreadHelper (data=<optimized out>) at ../src/util/virthread.c:256
|
||||
#10 0x000003ff86c1cf8c in start_thread () from /lib64/libc.so.6
|
||||
#11 0x000003ff86c9650e in thread_start () from /lib64/libc.so.6
|
||||
|
||||
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_driver.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||
index bcd9bdb4368..8337eed510d 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -6615,7 +6615,7 @@ qemuDomainUndefineFlags(virDomainPtr dom,
|
||||
}
|
||||
}
|
||||
|
||||
- if (vm->def->os.loader->nvram) {
|
||||
+ if (vm->def->os.loader && vm->def->os.loader->nvram) {
|
||||
nvram_path = g_strdup(vm->def->os.loader->nvram);
|
||||
} else if (vm->def->os.firmware == VIR_DOMAIN_OS_DEF_FIRMWARE_EFI) {
|
||||
qemuDomainNVRAMPathFormat(cfg, vm->def, &nvram_path);
|
@ -0,0 +1,33 @@
|
||||
From e629e34f18141a6244eaac2f0288d7b2a5d669ee Mon Sep 17 00:00:00 2001
|
||||
From: Chih-Hsuan Yen <yan12125@gmail.com>
|
||||
Date: Sun, 3 Jul 2022 11:03:10 +0800
|
||||
Subject: [PATCH] Fix the warning about missing modules.builtin.modinfo
|
||||
|
||||
> depmod: WARNING: could not open modules.builtin.modinfo at /tmp/mkinitcpio.EftMSK/root/lib/modules/5.15.52-1-lts: No such file or directory
|
||||
|
||||
kmod wants modules.builtin.modinfo since v30 [1].
|
||||
|
||||
Also adds modules.order as suggested by heftig. That file is used (if
|
||||
exists) since the first commit of depmod.
|
||||
|
||||
[1] https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=0246e06340df292b5dda4bc00e24cc9ae894e881
|
||||
---
|
||||
functions | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/functions b/functions
|
||||
index 48cfd7a..e77a4c4 100644
|
||||
--- a/functions
|
||||
+++ b/functions
|
||||
@@ -876,7 +876,7 @@ install_modules() {
|
||||
(( ${#zst_comp[*]} )) && zstd -d --rm -q "${zst_comp[@]}"
|
||||
|
||||
msg "Generating module dependencies"
|
||||
- install -m644 -t "$moduledest" "$_d_kmoduledir"/modules.builtin
|
||||
+ install -m644 -t "$moduledest" "$_d_kmoduledir"/modules.{builtin,builtin.modinfo,order}
|
||||
|
||||
# we install all modules into kernel/, making the .order file incorrect for
|
||||
# the module tree. munge it, so that we have an accurate index. This avoids
|
||||
--
|
||||
2.37.0
|
||||
|
@ -0,0 +1,31 @@
|
||||
From dda3eeb61ab5134da02ea916d7be10434dc18b94 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Thu, 7 Jul 2022 10:32:07 +0200
|
||||
Subject: [PATCH 1/1] etc: install system unit with without executable bit
|
||||
|
||||
All systemd unit files are expected to be not executable, so install
|
||||
with correct permissions.
|
||||
---
|
||||
etc/Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/etc/Makefile b/etc/Makefile
|
||||
index 6a03c32..c47c180 100644
|
||||
--- a/etc/Makefile
|
||||
+++ b/etc/Makefile
|
||||
@@ -81,10 +81,10 @@ install_systemd_service_files: $(DESTDIR)$(systemddir)/system $(SYSTEMD_DEST_SVC
|
||||
install_systemd_generator_files: $(DESTDIR)$(systemddir)/system-generators $(SYSTEMD_DEST_GEN_FILES)
|
||||
|
||||
$(SYSTEMD_DEST_SVC_FILES): $(DESTDIR)$(systemddir)/system/%: systemd/%
|
||||
- $(INSTALL) $? $@
|
||||
+ $(INSTALL) -m 644 $? $@
|
||||
|
||||
$(SYSTEMD_DEST_GEN_FILES): $(DESTDIR)$(systemddir)/system-generators/%: systemd/%
|
||||
- $(INSTALL) $? $@
|
||||
+ $(INSTALL) -m 755 $? $@
|
||||
|
||||
install_iname: $(DESTDIR)$(HOMEDIR) $(ISCSI_INAME)
|
||||
if [ ! -f $(INAME_DEST_FILE) ]; then \
|
||||
--
|
||||
2.37.0
|
||||
|
182
opencolorio/opencolorio-openexr3.patch
Normal file
182
opencolorio/opencolorio-openexr3.patch
Normal file
@ -0,0 +1,182 @@
|
||||
diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake
|
||||
index c98e0af3..5f685935 100644
|
||||
--- a/share/cmake/modules/FindExtPackages.cmake
|
||||
+++ b/share/cmake/modules/FindExtPackages.cmake
|
||||
@@ -34,7 +34,7 @@ find_package(yaml-cpp 0.6.3 REQUIRED)
|
||||
|
||||
# Half (OpenEXR/IlmBase)
|
||||
# https://github.com/openexr/openexr
|
||||
-find_package(Half 2.4.0 REQUIRED)
|
||||
+find_package(Imath 3.0 REQUIRED)
|
||||
|
||||
# pystring
|
||||
# https://github.com/imageworks/pystring
|
||||
diff --git a/src/OpenColorIO/BitDepthUtils.h b/src/OpenColorIO/BitDepthUtils.h
|
||||
index a8b3cbd9..bb0163bf 100644
|
||||
--- a/src/OpenColorIO/BitDepthUtils.h
|
||||
+++ b/src/OpenColorIO/BitDepthUtils.h
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <OpenColorIO/OpenColorIO.h>
|
||||
|
||||
-#include "OpenEXR/half.h"
|
||||
+#include "Imath/half.h"
|
||||
|
||||
|
||||
namespace OCIO_NAMESPACE
|
||||
diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt
|
||||
index 2ce801e6..824f8a98 100755
|
||||
--- a/src/OpenColorIO/CMakeLists.txt
|
||||
+++ b/src/OpenColorIO/CMakeLists.txt
|
||||
@@ -207,7 +207,7 @@ target_link_libraries(OpenColorIO
|
||||
public_api
|
||||
PRIVATE
|
||||
expat::expat
|
||||
- IlmBase::Half
|
||||
+ Imath::Imath
|
||||
pystring::pystring
|
||||
sampleicc::sampleicc
|
||||
utils::strings
|
||||
diff --git a/src/OpenColorIO/MathUtils.h b/src/OpenColorIO/MathUtils.h
|
||||
index 309c6244..0873d490 100644
|
||||
--- a/src/OpenColorIO/MathUtils.h
|
||||
+++ b/src/OpenColorIO/MathUtils.h
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <OpenColorIO/OpenColorIO.h>
|
||||
|
||||
-#include "OpenEXR/half.h"
|
||||
+#include "Imath/half.h"
|
||||
|
||||
namespace OCIO_NAMESPACE
|
||||
{
|
||||
diff --git a/src/OpenColorIO/ops/range/RangeOp.cpp b/src/OpenColorIO/ops/range/RangeOp.cpp
|
||||
index 9ec863e2..444dac75 100644
|
||||
--- a/src/OpenColorIO/ops/range/RangeOp.cpp
|
||||
+++ b/src/OpenColorIO/ops/range/RangeOp.cpp
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <OpenColorIO/OpenColorIO.h>
|
||||
|
||||
#include "GpuShaderUtils.h"
|
||||
-#include "OpenEXR/half.h"
|
||||
+#include "Imath/half.h"
|
||||
#include "HashUtils.h"
|
||||
#include "MathUtils.h"
|
||||
#include "ops/lut1d/Lut1DOpData.h"
|
||||
diff --git a/src/OpenColorIO/transforms/builtins/ACES.cpp b/src/OpenColorIO/transforms/builtins/ACES.cpp
|
||||
index 20968c0d..9ee2ac27 100644
|
||||
--- a/src/OpenColorIO/transforms/builtins/ACES.cpp
|
||||
+++ b/src/OpenColorIO/transforms/builtins/ACES.cpp
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <OpenColorIO/OpenColorIO.h>
|
||||
|
||||
-#include "OpenEXR/half.h"
|
||||
+#include "Imath/half.h"
|
||||
#include "ops/fixedfunction/FixedFunctionOp.h"
|
||||
#include "ops/gradingrgbcurve/GradingRGBCurveOp.h"
|
||||
#include "ops/log/LogOp.h"
|
||||
diff --git a/src/OpenColorIO/transforms/builtins/OpHelpers.cpp b/src/OpenColorIO/transforms/builtins/OpHelpers.cpp
|
||||
index 04b8fbd4..288ca566 100644
|
||||
--- a/src/OpenColorIO/transforms/builtins/OpHelpers.cpp
|
||||
+++ b/src/OpenColorIO/transforms/builtins/OpHelpers.cpp
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <OpenColorIO/OpenColorIO.h>
|
||||
|
||||
-#include "OpenEXR/half.h"
|
||||
+#include "Imath/half.h"
|
||||
#include "ops/lut1d/Lut1DOp.h"
|
||||
#include "transforms/builtins/OpHelpers.h"
|
||||
|
||||
diff --git a/src/apps/ocioconvert/CMakeLists.txt b/src/apps/ocioconvert/CMakeLists.txt
|
||||
index 68a5db17..6fea394a 100755
|
||||
--- a/src/apps/ocioconvert/CMakeLists.txt
|
||||
+++ b/src/apps/ocioconvert/CMakeLists.txt
|
||||
@@ -27,7 +27,7 @@ set_target_properties(ocioconvert PROPERTIES
|
||||
target_link_libraries(ocioconvert
|
||||
PRIVATE
|
||||
apputils
|
||||
- IlmBase::Half
|
||||
+ Imath::Imath
|
||||
${OCIO_GL_LIB}
|
||||
oiiohelpers
|
||||
OpenColorIO
|
||||
diff --git a/src/apps/ocioconvert/main.cpp b/src/apps/ocioconvert/main.cpp
|
||||
index b56d4999..7e8af7d0 100644
|
||||
--- a/src/apps/ocioconvert/main.cpp
|
||||
+++ b/src/apps/ocioconvert/main.cpp
|
||||
@@ -24,7 +24,7 @@ namespace OIIO = OIIO_NAMESPACE;
|
||||
#endif // OCIO_GPU_ENABLED
|
||||
|
||||
#include "oiiohelpers.h"
|
||||
-#include "OpenEXR/half.h"
|
||||
+#include "Imath/half.h"
|
||||
|
||||
|
||||
// Array of non OpenColorIO arguments.
|
||||
diff --git a/src/apps/ocioperf/CMakeLists.txt b/src/apps/ocioperf/CMakeLists.txt
|
||||
index 69e9ba4c..bcbe47be 100644
|
||||
--- a/src/apps/ocioperf/CMakeLists.txt
|
||||
+++ b/src/apps/ocioperf/CMakeLists.txt
|
||||
@@ -20,7 +20,7 @@ set_target_properties(ocioperf PROPERTIES
|
||||
target_link_libraries(ocioperf
|
||||
PRIVATE
|
||||
apputils
|
||||
- IlmBase::Half
|
||||
+ Imath::Imath
|
||||
oiiohelpers
|
||||
OpenColorIO
|
||||
OpenImageIO::OpenImageIO
|
||||
diff --git a/src/apps/ocioperf/main.cpp b/src/apps/ocioperf/main.cpp
|
||||
index 6427860d..f6e4a63c 100644
|
||||
--- a/src/apps/ocioperf/main.cpp
|
||||
+++ b/src/apps/ocioperf/main.cpp
|
||||
@@ -11,7 +11,7 @@ namespace OIIO = OIIO_NAMESPACE;
|
||||
#endif
|
||||
|
||||
#include "apputils/argparse.h"
|
||||
-#include "OpenEXR/half.h"
|
||||
+#include "Imath/half.h"
|
||||
#include "oiiohelpers.h"
|
||||
#include "utils/StringUtils.h"
|
||||
|
||||
diff --git a/src/libutils/oiiohelpers/CMakeLists.txt b/src/libutils/oiiohelpers/CMakeLists.txt
|
||||
index 6ef7c368..5f4a5113 100644
|
||||
--- a/src/libutils/oiiohelpers/CMakeLists.txt
|
||||
+++ b/src/libutils/oiiohelpers/CMakeLists.txt
|
||||
@@ -31,7 +31,7 @@ target_link_libraries(oiiohelpers
|
||||
|
||||
PRIVATE
|
||||
OpenColorIO
|
||||
- IlmBase::Half
|
||||
+ Imath::Imath
|
||||
utils::strings
|
||||
)
|
||||
|
||||
diff --git a/src/libutils/oiiohelpers/oiiohelpers.cpp b/src/libutils/oiiohelpers/oiiohelpers.cpp
|
||||
index be1a937d..e7db652c 100644
|
||||
--- a/src/libutils/oiiohelpers/oiiohelpers.cpp
|
||||
+++ b/src/libutils/oiiohelpers/oiiohelpers.cpp
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <OpenColorIO/OpenColorIO.h>
|
||||
|
||||
|
||||
-#include "OpenEXR/half.h"
|
||||
+#include "Imath/half.h"
|
||||
#include "oiiohelpers.h"
|
||||
#include "utils/StringUtils.h"
|
||||
|
||||
diff --git a/tests/cpu/CMakeLists.txt b/tests/cpu/CMakeLists.txt
|
||||
index 67389962..8e8dd900 100755
|
||||
--- a/tests/cpu/CMakeLists.txt
|
||||
+++ b/tests/cpu/CMakeLists.txt
|
||||
@@ -18,7 +18,7 @@ function(add_ocio_test NAME SOURCES PRIVATE_INCLUDES)
|
||||
public_api
|
||||
PRIVATE
|
||||
expat::expat
|
||||
- IlmBase::Half
|
||||
+ Imath::Imath
|
||||
pystring::pystring
|
||||
sampleicc::sampleicc
|
||||
unittest_data
|
16
opencv/undef-altivec-macros-cpp.patch
Normal file
16
opencv/undef-altivec-macros-cpp.patch
Normal file
@ -0,0 +1,16 @@
|
||||
This is necessary because otherwise conflicts are introduced in C++ code that
|
||||
includes this. The header itself does not rely on the macros. The issue is not
|
||||
visible on little endian because they undef the macros somewhere else.
|
||||
|
||||
--- a/3rdparty/include/opencl/1.2/CL/cl_platform.h
|
||||
+++ b/3rdparty/include/opencl/1.2/CL/cl_platform.h
|
||||
@@ -332,6 +332,9 @@ typedef unsigned int cl_GLenum;
|
||||
/* Define basic vector types */
|
||||
#if defined( __VEC__ )
|
||||
#include <altivec.h> /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
|
||||
+ #undef vector
|
||||
+ #undef pixel
|
||||
+ #undef bool
|
||||
typedef __vector unsigned char __cl_uchar16;
|
||||
typedef __vector signed char __cl_char16;
|
||||
typedef __vector unsigned short __cl_ushort8;
|
16
openshadinglanguage/llvm14.patch
Normal file
16
openshadinglanguage/llvm14.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git a/src/liboslexec/llvm_util.cpp b/src/liboslexec/llvm_util.cpp
|
||||
index 45e0b3e4..96651f00 100644
|
||||
--- a/src/liboslexec/llvm_util.cpp
|
||||
+++ b/src/liboslexec/llvm_util.cpp
|
||||
@@ -37,7 +37,11 @@
|
||||
#include <llvm/Support/raw_os_ostream.h>
|
||||
#include <llvm/IR/LegacyPassManager.h>
|
||||
#include <llvm/IR/ValueSymbolTable.h>
|
||||
+#if OSL_LLVM_VERSION < 140
|
||||
#include <llvm/Support/TargetRegistry.h>
|
||||
+#else
|
||||
+#include <llvm/MC/TargetRegistry.h>
|
||||
+#endif
|
||||
|
||||
#include <llvm/Bitcode/BitcodeReader.h>
|
||||
#include <llvm/Bitcode/BitcodeWriter.h>
|
@ -1,116 +0,0 @@
|
||||
==> Building python-jaraco.collections for any..
|
||||
==> Synchronizing chroot copy [/home/buildbot/archpower/buildroot/root] -> [buildbot-2147325]...done
|
||||
[?25l:: Synchronizing package databases...
|
||||
repo-local-any
|
||||
[1F repo-local-any 6.3 KiB 0.00 B/s 00:00 [######################] 100%
repo-local-any 6.3 KiB 1579 KiB/s 00:00 [######################] 100%
[1E repo-local
|
||||
[1F repo-local 10.4 KiB 0.00 B/s 00:00 [######################] 100%
repo-local 10.4 KiB 10.2 MiB/s 00:00 [######################] 100%
[1E testing-any
|
||||
[1F testing-any 15.6 KiB 0.00 B/s 00:00 [######################] 100%
testing-any 15.6 KiB 162 KiB/s 00:00 [######################] 100%
[1E testing
|
||||
[1F testing 3.6 KiB 0.00 B/s --:-- [----------------------] 4%
testing 79.0 KiB 1795 KiB/s 00:00 [######################] 100%
[1E base-any
|
||||
[1F base-any is up to date[K[1E base
|
||||
[1F base is up to date[K[1E:: Starting full system upgrade...
|
||||
resolving dependencies...
|
||||
looking for conflicting packages...
|
||||
|
||||
Packages (3) ca-certificates-mozilla-3.80-1 e2fsprogs-1.46.5-4
|
||||
sqlite-3.39.0-2
|
||||
|
||||
Total Installed Size: 19.71 MiB
|
||||
Net Upgrade Size: 0.04 MiB
|
||||
|
||||
:: Proceed with installation? [Y/n]
|
||||
(0/3) checking keys in keyring [----------------------] 0%
(1/3) checking keys in keyring [#######---------------] 33%
(2/3) checking keys in keyring [##############--------] 66%
(3/3) checking keys in keyring [######################] 100%
|
||||
(0/3) checking package integrity [----------------------] 0%
(1/3) checking package integrity [#####-----------------] 27%
(2/3) checking package integrity [#######---------------] 34%
(3/3) checking package integrity [######################] 100%
|
||||
(0/3) loading package files [----------------------] 0%
(1/3) loading package files [#####-----------------] 27%
(2/3) loading package files [#######---------------] 34%
(3/3) loading package files [######################] 100%
|
||||
(0/3) checking for file conflicts [----------------------] 0%
(1/3) checking for file conflicts [#######---------------] 33%
(2/3) checking for file conflicts [##############--------] 66%
(3/3) checking for file conflicts [######################] 100%
|
||||
(0/3) checking available disk space [----------------------] 0%
(1/3) checking available disk space [#######---------------] 33%
(2/3) checking available disk space [##############--------] 66%
(3/3) checking available disk space [######################] 100%
|
||||
:: Processing package changes...
|
||||
(1/3) upgrading e2fsprogs [----------------------] 0%
(1/3) upgrading e2fsprogs [######################] 100%
|
||||
New optional dependencies for e2fsprogs
|
||||
lvm2: for e2scrub
|
||||
smtp-forwarder: for e2scrub_fail script
|
||||
util-linux: for e2scrub [installed]
|
||||
(2/3) upgrading ca-certificates-mozilla [----------------------] 0%
(2/3) upgrading ca-certificates-mozilla [######################] 100%
|
||||
(3/3) upgrading sqlite [----------------------] 0%
(3/3) upgrading sqlite [######################] 100%
|
||||
:: Running post-transaction hooks...
|
||||
(1/2) Rebuilding certificate stores...
|
||||
(2/2) Updating the info directory file...
|
||||
[?25h==> Making package: python-jaraco.collections 3.5.1-2 (Thu Jul 7 19:37:27 2022)
|
||||
==> Retrieving sources...
|
||||
-> Found jaraco.collections-3.5.1.tar.gz
|
||||
==> Validating source files with sha512sums...
|
||||
jaraco.collections-3.5.1.tar.gz ... Passed
|
||||
[1m[32m==>[0m[1m Making package: python-jaraco.collections 3.5.1-2 (Thu Jul 7 19:37:31 2022)[0m
|
||||
[1m[32m==>[0m[1m Checking runtime dependencies...[0m
|
||||
[1m[32m==>[0m[1m Installing missing dependencies...[0m
|
||||
error: target not found: python-jaraco.classes
|
||||
[?25l[?25h[1m[31m==> ERROR:[0m[1m 'pacman' failed to install missing dependencies.[0m
|
||||
[1m[32m==>[0m[1m Missing dependencies:[0m
|
||||
[1m[34m ->[0m[1m python-jaraco.text[0m
|
||||
[1m[34m ->[0m[1m python-jaraco.classes[0m
|
||||
[1m[32m==>[0m[1m Checking buildtime dependencies...[0m
|
||||
[1m[32m==>[0m[1m Installing missing dependencies...[0m
|
||||
[?25lresolving dependencies...
|
||||
looking for conflicting packages...
|
||||
|
||||
Packages (20) libnsl-2.0.0-2 python-3.10.5-1 python-appdirs-1.4.4-6
|
||||
python-jaraco.context-4.1.1-2 python-jaraco.functools-3.5.0-2
|
||||
python-jaraco.text-3.8.0-2 python-more-itertools-8.13.0-1
|
||||
python-nspektr-0.4.0-1 python-ordered-set-4.0.2-6
|
||||
python-packaging-21.3-1 python-pep517-0.12.0-4
|
||||
python-pyparsing-3.0.9-1 python-setuptools-1:61.3.1-1
|
||||
python-tomli-2.0.1-1 python-trove-classifiers-2022.6.23-1
|
||||
python-validate-pyproject-0.9-1 python-build-0.8.0-1
|
||||
python-installer-0.5.1-1 python-setuptools-scm-6.4.2-1
|
||||
python-wheel-0.37.1-1
|
||||
|
||||
Total Installed Size: 66.77 MiB
|
||||
|
||||
:: Proceed with installation? [Y/n]
|
||||
checking keyring...
|
||||
checking package integrity...
|
||||
loading package files...
|
||||
checking for file conflicts...
|
||||
checking available disk space...
|
||||
:: Processing package changes...
|
||||
installing libnsl...
|
||||
installing python...
|
||||
Optional dependencies for python
|
||||
python-setuptools [pending]
|
||||
python-pip
|
||||
sqlite [installed]
|
||||
mpdecimal: for decimal
|
||||
xz: for lzma [installed]
|
||||
tk: for tkinter
|
||||
installing python-tomli...
|
||||
installing python-pep517...
|
||||
installing python-pyparsing...
|
||||
Optional dependencies for python-pyparsing
|
||||
python-railroad-diagrams: for generating Railroad Diagrams
|
||||
python-jinja: for generating Railroad Diagrams
|
||||
installing python-packaging...
|
||||
installing python-build...
|
||||
Optional dependencies for python-build
|
||||
python-virtualenv: Use virtualenv for build isolation
|
||||
installing python-installer...
|
||||
installing python-appdirs...
|
||||
installing python-more-itertools...
|
||||
installing python-jaraco.functools...
|
||||
installing python-jaraco.context...
|
||||
installing python-jaraco.text...
|
||||
installing python-nspektr...
|
||||
installing python-ordered-set...
|
||||
installing python-trove-classifiers...
|
||||
installing python-validate-pyproject...
|
||||
installing python-setuptools...
|
||||
installing python-setuptools-scm...
|
||||
installing python-wheel...
|
||||
Optional dependencies for python-wheel
|
||||
python-keyring: for wheel.signatures
|
||||
python-xdg: for wheel.signatures
|
||||
[?25h[1m[31m==> ERROR:[0m[1m Could not resolve all dependencies.[0m
|
||||
==> Removing chroot copy [/home/buildbot/archpower/buildroot/buildbot-2147325]...done
|
||||
==> ERROR: Build failed
|
||||
rsync: [sender] link_stat "/home/buildbot/archpower/pkg/python-jaraco.collections/*.pkg.tar.zst" failed: No such file or directory (2)
|
||||
rsync: [sender] link_stat "/home/buildbot/archpower/pkg/python-jaraco.collections/*.log" failed: No such file or directory (2)
|
||||
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1835) [Receiver=v3.2.4]
|
||||
rsync: [Receiver] write error: Broken pipe (32)
|
12
python/python-pip/pip-22.1.2-devendor.patch
Normal file
12
python/python-pip/pip-22.1.2-devendor.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -ruN a/src/pip/_vendor/__init__.py b/src/pip/_vendor/__init__.py
|
||||
--- a/src/pip/_vendor/__init__.py 2022-05-31 13:05:52.000000000 +0200
|
||||
+++ b/src/pip/_vendor/__init__.py 2022-06-27 13:03:22.909131639 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
# Downstream redistributors which have debundled our dependencies should also
|
||||
# patch this value to be true. This will trigger the additional patching
|
||||
# to cause things like "six" to be available as pip.
|
||||
-DEBUNDLED = False
|
||||
+DEBUNDLED = True
|
||||
|
||||
# By default, look in this directory for a bunch of .whl files which we will
|
||||
# add to the beginning of sys.path before attempting to import anything. This
|
21
python/python-pip/pip-22.1.2-devendor_imports.patch
Normal file
21
python/python-pip/pip-22.1.2-devendor_imports.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff --git c/src/pip/_vendor/__init__.py w/src/pip/_vendor/__init__.py
|
||||
index 3843cb099..39579aa96 100644
|
||||
--- c/src/pip/_vendor/__init__.py
|
||||
+++ w/src/pip/_vendor/__init__.py
|
||||
@@ -106,6 +106,16 @@ if DEBUNDLED:
|
||||
vendored("requests.packages.urllib3.util.timeout")
|
||||
vendored("requests.packages.urllib3.util.url")
|
||||
vendored("resolvelib")
|
||||
+ vendored("rich")
|
||||
+ vendored("rich.console")
|
||||
+ vendored("rich.highlighter")
|
||||
+ vendored("rich.logging")
|
||||
+ vendored("rich.markup")
|
||||
+ vendored("rich.progress")
|
||||
+ vendored("rich.segment")
|
||||
+ vendored("rich.style")
|
||||
+ vendored("rich.text")
|
||||
+ vendored("rich.traceback")
|
||||
vendored("tenacity")
|
||||
vendored("tomli")
|
||||
vendored("urllib3")
|
1
qemu/99-qemu-guest-agent.rules
Normal file
1
qemu/99-qemu-guest-agent.rules
Normal file
@ -0,0 +1 @@
|
||||
SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", TAG+="systemd" ENV{SYSTEMD_WANTS}="qemu-guest-agent.service"
|
1
qemu/bridge.conf
Normal file
1
qemu/bridge.conf
Normal file
@ -0,0 +1 @@
|
||||
allow virbr0
|
11
qemu/qemu-7.0.0-flexible-common-user.patch
Normal file
11
qemu/qemu-7.0.0-flexible-common-user.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- qemu-7.0.0/common-user/meson.build.orig 2022-05-09 23:45:31.853457921 +0200
|
||||
+++ qemu-7.0.0/common-user/meson.build 2022-05-09 23:46:05.198043429 +0200
|
||||
@@ -1,4 +1,7 @@
|
||||
-common_user_inc += include_directories('host/' / host_arch)
|
||||
+fs = import('fs')
|
||||
+if fs.is_dir('host/' / host_arch)
|
||||
+ common_user_inc += include_directories('host/' / host_arch)
|
||||
+endif
|
||||
|
||||
user_ss.add(files(
|
||||
'safe-syscall.S',
|
14
qemu/qemu-common.install
Normal file
14
qemu/qemu-common.install
Normal file
@ -0,0 +1,14 @@
|
||||
post_install() {
|
||||
if [[ -d /run/udev ]]; then
|
||||
local file files=(
|
||||
/sys/devices/virtual/misc/vhost-net
|
||||
)
|
||||
|
||||
# trigger change event when modules are already loaded
|
||||
for file in "${files[@]}"; do
|
||||
if [[ -d $file ]]; then
|
||||
udevadm trigger --action=change "$file"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
10
qemu/qemu-ga.conf
Normal file
10
qemu/qemu-ga.conf
Normal file
@ -0,0 +1,10 @@
|
||||
[general]
|
||||
daemonize = 0
|
||||
fsfreeze-hook = /etc/qemu/fsfreeze-hook
|
||||
method = virtio-serial
|
||||
path = /dev/virtio-ports/org.qemu.guest_agent.0
|
||||
pidfile = /run/qemu-ga.pid
|
||||
statedir = /run
|
||||
verbose = 0
|
||||
# blacklist =
|
||||
# logfile =
|
2
qemu/qemu-sysusers.conf
Normal file
2
qemu/qemu-sysusers.conf
Normal file
@ -0,0 +1,2 @@
|
||||
u qemu - "QEMU user" - -
|
||||
m qemu kvm
|
28
strace/mpers-wrapper-g.patch
Normal file
28
strace/mpers-wrapper-g.patch
Normal file
@ -0,0 +1,28 @@
|
||||
# --- T2-COPYRIGHT-NOTE-BEGIN ---
|
||||
# This copyright note is auto-generated by scripts/Create-CopyPatch.
|
||||
#
|
||||
# T2 SDE: package/*/strace/mpers-wrapper-g.patch
|
||||
# Copyright (C) 2021 The T2 SDE Project
|
||||
#
|
||||
# More information can be found in the files COPYING and README.
|
||||
#
|
||||
# This patch file is dual-licensed. It is available under the license the
|
||||
# patched project is licensed under, as long as it is an OpenSource license
|
||||
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||||
# of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
# --- T2-COPYRIGHT-NOTE-END ---
|
||||
|
||||
--- strace-5.12/src/mpers.sh.vanilla 2021-05-06 18:36:04.911571634 +0200
|
||||
+++ strace-5.12/src/mpers.sh 2021-05-06 18:36:32.293570543 +0200
|
||||
@@ -6,6 +6,9 @@
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
+# our wrapper would remove -g* this scripts rely on
|
||||
+export GCC_WRAPPER_BYPASS=1
|
||||
+
|
||||
[ "x${D:-0}" != x1 ] || set -x
|
||||
|
||||
export LC_ALL=C
|
20
synergy/enable-test-build.patch
Normal file
20
synergy/enable-test-build.patch
Normal file
@ -0,0 +1,20 @@
|
||||
From 205c97288e43d9892ed88552862c1160f3a82fa8 Mon Sep 17 00:00:00 2001
|
||||
From: Luca Corbatto <luca@corbatto.de>
|
||||
Date: Sun, 22 Jul 2018 16:26:05 +0200
|
||||
Subject: [PATCH 3/4] Adds tests
|
||||
|
||||
---
|
||||
src/CMakeLists.txt | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index ab63a06..014f87b 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -22,3 +22,4 @@ add_subdirectory(cmd)
|
||||
if (SYNERGY_BUILD_LEGACY_GUI)
|
||||
add_subdirectory(gui)
|
||||
endif (SYNERGY_BUILD_LEGACY_GUI)
|
||||
+add_subdirectory(test)
|
||||
--
|
||||
2.18.0
|
36
synergy/fix-qt5_11-compatibility.patch
Normal file
36
synergy/fix-qt5_11-compatibility.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From f5a22a4e514c02cdff2f6dd4ad20a7964ea67d0f Mon Sep 17 00:00:00 2001
|
||||
From: Luca Corbatto <luca@corbatto.de>
|
||||
Date: Sun, 22 Jul 2018 16:03:39 +0200
|
||||
Subject: [PATCH 2/4] Fixes build on qt 5.1Fixes build on qt 5.11
|
||||
|
||||
---
|
||||
src/gui/src/ActionDialog.h | 5 +++--
|
||||
src/gui/src/ScreenSetupView.h | 6 +++---
|
||||
2 files changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/gui/src/ActionDialog.h b/src/gui/src/ActionDialog.h
|
||||
index 34e4e85..7cd5a1a 100644
|
||||
--- a/src/gui/src/ActionDialog.h
|
||||
+++ b/src/gui/src/ActionDialog.h
|
||||
@@ -21,6 +21,7 @@
|
||||
#define ACTIONDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
+#include <QButtonGroup>
|
||||
|
||||
#include "ui_ActionDialogBase.h"
|
||||
|
||||
diff --git a/src/gui/src/ScreenSetupView.h b/src/gui/src/ScreenSetupView.h
|
||||
index 38eae2a..1a41091 100644
|
||||
--- a/src/gui/src/ScreenSetupView.h
|
||||
+++ b/src/gui/src/ScreenSetupView.h
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <QTableView>
|
||||
#include <QFlags>
|
||||
+#include <QHeaderView>
|
||||
|
||||
#include "Screen.h"
|
||||
|
||||
--
|
||||
2.18.0
|
77
synergy/fix-test-build.patch
Normal file
77
synergy/fix-test-build.patch
Normal file
@ -0,0 +1,77 @@
|
||||
From eedc5ba0dbe901574a9031de1d3c43ef0e417c28 Mon Sep 17 00:00:00 2001
|
||||
From: Luca Corbatto <luca@corbatto.de>
|
||||
Date: Sun, 22 Jul 2018 16:26:30 +0200
|
||||
Subject: [PATCH 4/4] Makes tests compilable
|
||||
|
||||
---
|
||||
src/test/integtests/CMakeLists.txt | 2 +-
|
||||
.../integtests/arch/ArchInternetTests.cpp | 37 -------------------
|
||||
src/test/unittests/CMakeLists.txt | 2 +-
|
||||
3 files changed, 2 insertions(+), 39 deletions(-)
|
||||
delete mode 100644 src/test/integtests/arch/ArchInternetTests.cpp
|
||||
|
||||
diff --git a/src/test/integtests/CMakeLists.txt b/src/test/integtests/CMakeLists.txt
|
||||
index e71499a..24c3891 100644
|
||||
--- a/src/test/integtests/CMakeLists.txt
|
||||
+++ b/src/test/integtests/CMakeLists.txt
|
||||
@@ -68,4 +68,4 @@ endif()
|
||||
|
||||
add_executable(integtests ${sources})
|
||||
target_link_libraries(integtests
|
||||
- arch base client common io ipc mt net platform server synergy gtest gmock ${libs} ${OPENSSL_LIBS})
|
||||
+arch base client common io ipc mt net platform server shared gtest gmock ${libs} ${OPENSSL_LIBS})
|
||||
diff --git a/src/test/integtests/arch/ArchInternetTests.cpp b/src/test/integtests/arch/ArchInternetTests.cpp
|
||||
deleted file mode 100644
|
||||
index 95823e9..0000000
|
||||
--- a/src/test/integtests/arch/ArchInternetTests.cpp
|
||||
+++ /dev/null
|
||||
@@ -1,37 +0,0 @@
|
||||
-/*
|
||||
- * synergy -- mouse and keyboard sharing utility
|
||||
- * Copyright (C) 2014-2016 Symless Ltd.
|
||||
- *
|
||||
- * This package is free software; you can redistribute it and/or
|
||||
- * modify it under the terms of the GNU General Public License
|
||||
- * found in the file LICENSE that should have accompanied this file.
|
||||
- *
|
||||
- * This package is distributed in the hope that it will be useful,
|
||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- * GNU General Public License for more details.
|
||||
- *
|
||||
- * You should have received a copy of the GNU General Public License
|
||||
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
- */
|
||||
-
|
||||
-#include "arch/Arch.h"
|
||||
-
|
||||
-#include "test/global/gtest.h"
|
||||
-
|
||||
-#define TEST_URL "https://symless.com/tests/?testString"
|
||||
-//#define TEST_URL "http://localhost/synergy/tests/?testString"
|
||||
-
|
||||
-TEST(ArchInternetTests, get)
|
||||
-{
|
||||
- ARCH_INTERNET internet;
|
||||
- String result = internet.get(TEST_URL);
|
||||
- ASSERT_EQ("Hello world!", result);
|
||||
-}
|
||||
-
|
||||
-TEST(ArchInternetTests, urlEncode)
|
||||
-{
|
||||
- ARCH_INTERNET internet;
|
||||
- String result = internet.urlEncode("hello=+&world");
|
||||
- ASSERT_EQ("hello%3D%2B%26world", result);
|
||||
-}
|
||||
diff --git a/src/test/unittests/CMakeLists.txt b/src/test/unittests/CMakeLists.txt
|
||||
index 9806be9..c6958c5 100644
|
||||
--- a/src/test/unittests/CMakeLists.txt
|
||||
+++ b/src/test/unittests/CMakeLists.txt
|
||||
@@ -68,4 +68,4 @@ endif()
|
||||
|
||||
add_executable(unittests ${sources})
|
||||
target_link_libraries(unittests
|
||||
- arch base client server common io net platform server synergy mt ipc gtest gmock shared ${libs} ${OPENSSL_LIBS})
|
||||
+arch base client server common io net platform server mt ipc gtest gmock shared ${libs} ${OPENSSL_LIBS})
|
||||
--
|
||||
2.18.0
|
98
synergy/use-system-libs.patch
Normal file
98
synergy/use-system-libs.patch
Normal file
@ -0,0 +1,98 @@
|
||||
From f013182f0bfee54cc1c22740302be84acc380fda Mon Sep 17 00:00:00 2001
|
||||
From: Luca Corbatto <luca@corbatto.de>
|
||||
Date: Sun, 22 Jul 2018 09:17:58 +0200
|
||||
Subject: [PATCH 1/4] Fixes bundled libs
|
||||
|
||||
---
|
||||
CMakeLists.txt | 4 ++--
|
||||
src/test/CMakeLists.txt | 18 +++++++++---------
|
||||
src/test/integtests/CMakeLists.txt | 8 ++++----
|
||||
src/test/unittests/CMakeLists.txt | 10 +++++-----
|
||||
4 files changed, 20 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 35bbfab..eaf8ab6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -56,7 +56,7 @@ else()
|
||||
endif()
|
||||
|
||||
set (libs)
|
||||
-include_directories (BEFORE SYSTEM ./ext/gtest/include)
|
||||
+include_directories (BEFORE SYSTEM /usr/include/gtest)
|
||||
|
||||
if (UNIX)
|
||||
if (NOT APPLE)
|
||||
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
|
||||
index 1f78ae0..b62f30c 100644
|
||||
--- a/src/test/CMakeLists.txt
|
||||
+++ b/src/test/CMakeLists.txt
|
||||
@@ -1,11 +1,11 @@
|
||||
# synergy -- mouse and keyboard sharing utility
|
||||
# Copyright (C) 2012-2016 Symless Ltd.
|
||||
# Copyright (C) 2011 Nick Bolton
|
||||
-#
|
||||
+#
|
||||
# This package is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# found in the file LICENSE that should have accompanied this file.
|
||||
-#
|
||||
+#
|
||||
# This package is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
@@ -15,13 +15,13 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
include_directories(
|
||||
- ../../ext/gtest
|
||||
- ../../ext/gtest/include
|
||||
- ../../ext/gmock
|
||||
- ../../ext/gmock/include)
|
||||
-
|
||||
-add_library(gtest STATIC ../../ext/gtest/src/gtest-all.cc)
|
||||
-add_library(gmock STATIC ../../ext/gmock/src/gmock-all.cc)
|
||||
+ /usr/src/gtest
|
||||
+ /usr/include/gtest
|
||||
+ /usr/src/gmock
|
||||
+ /usr/include/gmock)
|
||||
+
|
||||
+add_library(gtest STATIC /usr/src/gtest/src/gtest-all.cc)
|
||||
+add_library(gmock STATIC /usr/src/gmock/gmock-all.cc)
|
||||
|
||||
if (UNIX)
|
||||
# ignore warnings in gtest and gmock
|
||||
diff --git a/src/test/integtests/CMakeLists.txt b/src/test/integtests/CMakeLists.txt
|
||||
index f39968a..e71499a 100644
|
||||
--- a/src/test/integtests/CMakeLists.txt
|
||||
+++ b/src/test/integtests/CMakeLists.txt
|
||||
@@ -56,8 +56,8 @@ endif()
|
||||
include_directories(
|
||||
../../
|
||||
../../lib/
|
||||
- ../../../ext/gtest/include
|
||||
- ../../../ext/gmock/include
|
||||
+ /usr/include/gtest
|
||||
+ /usr/include/gmock
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
diff --git a/src/test/unittests/CMakeLists.txt b/src/test/unittests/CMakeLists.txt
|
||||
index 54131eb..9806be9 100644
|
||||
--- a/src/test/unittests/CMakeLists.txt
|
||||
+++ b/src/test/unittests/CMakeLists.txt
|
||||
@@ -51,9 +51,9 @@ list(APPEND headers ${platform_sources})
|
||||
include_directories(
|
||||
../../
|
||||
../../lib/
|
||||
- ../../../ext/gtest/include
|
||||
- ../../../ext/gmock/include
|
||||
- ../../../ext
|
||||
+ /usr/include/gtest
|
||||
+ /usr/include/gmock
|
||||
+ /usr/include
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
--
|
||||
2.18.0
|
@ -0,0 +1,71 @@
|
||||
From 7916fda00b347ff263fbfe72c065032d1d9b523c Mon Sep 17 00:00:00 2001
|
||||
From: Fujii Hironori <Hironori.Fujii@sony.com>
|
||||
Date: Tue, 7 Jun 2022 11:42:55 +0000
|
||||
Subject: [PATCH] Merge r295034 - WebKitTestRunner shouldn't link object files
|
||||
of JavaScriptCore and WebCore https://bugs.webkit.org/show_bug.cgi?id=241002
|
||||
|
||||
Reviewed by Don Olmstead.
|
||||
|
||||
243269@main removed `WebKit` from `WebKitTestRunner_FRAMEWORKS` for
|
||||
WPE. But, it should be there not to link object files of
|
||||
JavaScriptCore and WebCore to WebKitTestRunner. In WPE builds,
|
||||
JavaScriptCore and WebCore API are exported from WebKit shared
|
||||
library. WebKit consumers shouldn't link with object files of
|
||||
JavaScriptCore and WebCore.
|
||||
|
||||
However, adding `WebKit` to `WebKitTestRunner_FRAMEWORKS` introduced a
|
||||
new problem that the object file of LowLevelInterpreter.cpp was linked
|
||||
into WebKitTestRunner. This problem was fixed by changing
|
||||
LowLevelInterpreterLib to a STATIC library.
|
||||
|
||||
* Source/JavaScriptCore/CMakeLists.txt:
|
||||
* Tools/WebKitTestRunner/CMakeLists.txt:
|
||||
* Tools/WebKitTestRunner/PlatformGTK.cmake:
|
||||
* Tools/WebKitTestRunner/PlatformWin.cmake:
|
||||
|
||||
Canonical link: https://commits.webkit.org/247617.88@webkitgtk/2.36
|
||||
git-svn-id: https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.36@295340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
|
||||
---
|
||||
Source/JavaScriptCore/CMakeLists.txt | 12 +++---------
|
||||
Tools/WebKitTestRunner/CMakeLists.txt | 1 +
|
||||
Tools/WebKitTestRunner/PlatformGTK.cmake | 4 ----
|
||||
Tools/WebKitTestRunner/PlatformWin.cmake | 4 ----
|
||||
4 files changed, 4 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
|
||||
index 238208eb1137..95a1300ce1b3 100644
|
||||
--- a/Source/JavaScriptCore/CMakeLists.txt
|
||||
+++ b/Source/JavaScriptCore/CMakeLists.txt
|
||||
@@ -456,7 +456,7 @@ if (MSVC AND NOT ENABLE_C_LOOP)
|
||||
COMMAND ${MASM_EXECUTABLE} ${LLINT_MASM_FLAGS} ${JavaScriptCore_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.obj ${JavaScriptCore_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.asm
|
||||
VERBATIM)
|
||||
list(APPEND JavaScriptCore_SOURCES ${JavaScriptCore_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.obj)
|
||||
- add_library(LowLevelInterpreterLib OBJECT llint/LowLevelInterpreter.cpp)
|
||||
+ add_library(LowLevelInterpreterLib STATIC llint/LowLevelInterpreter.cpp)
|
||||
else ()
|
||||
# As there's poor toolchain support for using `.file` directives in
|
||||
# inline asm (i.e. there's no way to avoid clashes with the `.file`
|
||||
@@ -465,7 +465,7 @@ else ()
|
||||
# an object file. We only need to do this for LowLevelInterpreter.cpp
|
||||
# and cmake doesn't allow us to introduce a compiler wrapper for a
|
||||
# single source file, so we need to create a separate target for it.
|
||||
- add_library(LowLevelInterpreterLib OBJECT llint/LowLevelInterpreter.cpp
|
||||
+ add_library(LowLevelInterpreterLib STATIC llint/LowLevelInterpreter.cpp
|
||||
${JavaScriptCore_DERIVED_SOURCES_DIR}/${LLIntOutput})
|
||||
endif ()
|
||||
|
||||
@@ -1496,13 +1496,7 @@ if (CMAKE_COMPILER_IS_GNUCXX AND GCC_OFFLINEASM_SOURCE_MAP)
|
||||
COMPILE_OPTIONS "-fno-lto")
|
||||
endif ()
|
||||
|
||||
-# When building JavaScriptCore as an object library, we need to make sure the
|
||||
-# lowlevelinterpreter lib objects get propogated.
|
||||
-if (${JavaScriptCore_LIBRARY_TYPE} STREQUAL "OBJECT")
|
||||
- list(APPEND JavaScriptCore_PRIVATE_LIBRARIES $<TARGET_OBJECTS:LowLevelInterpreterLib>)
|
||||
-else ()
|
||||
- list(APPEND JavaScriptCore_SOURCES $<TARGET_OBJECTS:LowLevelInterpreterLib>)
|
||||
-endif ()
|
||||
+list(APPEND JavaScriptCore_PRIVATE_LIBRARIES LowLevelInterpreterLib)
|
||||
|
||||
WEBKIT_COMPUTE_SOURCES(JavaScriptCore)
|
||||
list(APPEND JavaScriptCore_SOURCES
|
71
wpewebkit/7916fda00b347ff263fbfe72c065032d1d9b523c.patch
Normal file
71
wpewebkit/7916fda00b347ff263fbfe72c065032d1d9b523c.patch
Normal file
@ -0,0 +1,71 @@
|
||||
From 7916fda00b347ff263fbfe72c065032d1d9b523c Mon Sep 17 00:00:00 2001
|
||||
From: Fujii Hironori <Hironori.Fujii@sony.com>
|
||||
Date: Tue, 7 Jun 2022 11:42:55 +0000
|
||||
Subject: [PATCH] Merge r295034 - WebKitTestRunner shouldn't link object files
|
||||
of JavaScriptCore and WebCore https://bugs.webkit.org/show_bug.cgi?id=241002
|
||||
|
||||
Reviewed by Don Olmstead.
|
||||
|
||||
243269@main removed `WebKit` from `WebKitTestRunner_FRAMEWORKS` for
|
||||
WPE. But, it should be there not to link object files of
|
||||
JavaScriptCore and WebCore to WebKitTestRunner. In WPE builds,
|
||||
JavaScriptCore and WebCore API are exported from WebKit shared
|
||||
library. WebKit consumers shouldn't link with object files of
|
||||
JavaScriptCore and WebCore.
|
||||
|
||||
However, adding `WebKit` to `WebKitTestRunner_FRAMEWORKS` introduced a
|
||||
new problem that the object file of LowLevelInterpreter.cpp was linked
|
||||
into WebKitTestRunner. This problem was fixed by changing
|
||||
LowLevelInterpreterLib to a STATIC library.
|
||||
|
||||
* Source/JavaScriptCore/CMakeLists.txt:
|
||||
* Tools/WebKitTestRunner/CMakeLists.txt:
|
||||
* Tools/WebKitTestRunner/PlatformGTK.cmake:
|
||||
* Tools/WebKitTestRunner/PlatformWin.cmake:
|
||||
|
||||
Canonical link: https://commits.webkit.org/247617.88@webkitgtk/2.36
|
||||
git-svn-id: https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.36@295340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
|
||||
---
|
||||
Source/JavaScriptCore/CMakeLists.txt | 12 +++---------
|
||||
Tools/WebKitTestRunner/CMakeLists.txt | 1 +
|
||||
Tools/WebKitTestRunner/PlatformGTK.cmake | 4 ----
|
||||
Tools/WebKitTestRunner/PlatformWin.cmake | 4 ----
|
||||
4 files changed, 4 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
|
||||
index 238208eb1137..95a1300ce1b3 100644
|
||||
--- a/Source/JavaScriptCore/CMakeLists.txt
|
||||
+++ b/Source/JavaScriptCore/CMakeLists.txt
|
||||
@@ -456,7 +456,7 @@ if (MSVC AND NOT ENABLE_C_LOOP)
|
||||
COMMAND ${MASM_EXECUTABLE} ${LLINT_MASM_FLAGS} ${JavaScriptCore_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.obj ${JavaScriptCore_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.asm
|
||||
VERBATIM)
|
||||
list(APPEND JavaScriptCore_SOURCES ${JavaScriptCore_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.obj)
|
||||
- add_library(LowLevelInterpreterLib OBJECT llint/LowLevelInterpreter.cpp)
|
||||
+ add_library(LowLevelInterpreterLib STATIC llint/LowLevelInterpreter.cpp)
|
||||
else ()
|
||||
# As there's poor toolchain support for using `.file` directives in
|
||||
# inline asm (i.e. there's no way to avoid clashes with the `.file`
|
||||
@@ -465,7 +465,7 @@ else ()
|
||||
# an object file. We only need to do this for LowLevelInterpreter.cpp
|
||||
# and cmake doesn't allow us to introduce a compiler wrapper for a
|
||||
# single source file, so we need to create a separate target for it.
|
||||
- add_library(LowLevelInterpreterLib OBJECT llint/LowLevelInterpreter.cpp
|
||||
+ add_library(LowLevelInterpreterLib STATIC llint/LowLevelInterpreter.cpp
|
||||
${JavaScriptCore_DERIVED_SOURCES_DIR}/${LLIntOutput})
|
||||
endif ()
|
||||
|
||||
@@ -1496,13 +1496,7 @@ if (CMAKE_COMPILER_IS_GNUCXX AND GCC_OFFLINEASM_SOURCE_MAP)
|
||||
COMPILE_OPTIONS "-fno-lto")
|
||||
endif ()
|
||||
|
||||
-# When building JavaScriptCore as an object library, we need to make sure the
|
||||
-# lowlevelinterpreter lib objects get propogated.
|
||||
-if (${JavaScriptCore_LIBRARY_TYPE} STREQUAL "OBJECT")
|
||||
- list(APPEND JavaScriptCore_PRIVATE_LIBRARIES $<TARGET_OBJECTS:LowLevelInterpreterLib>)
|
||||
-else ()
|
||||
- list(APPEND JavaScriptCore_SOURCES $<TARGET_OBJECTS:LowLevelInterpreterLib>)
|
||||
-endif ()
|
||||
+list(APPEND JavaScriptCore_PRIVATE_LIBRARIES LowLevelInterpreterLib)
|
||||
|
||||
WEBKIT_COMPUTE_SOURCES(JavaScriptCore)
|
||||
list(APPEND JavaScriptCore_SOURCES
|
30
zita-alsa-pcmi/zita-alsa-pcmi-0.5.1-apps_makefile.patch
Normal file
30
zita-alsa-pcmi/zita-alsa-pcmi-0.5.1-apps_makefile.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff -ruN a/apps/Makefile b/apps/Makefile
|
||||
--- a/apps/Makefile 2022-07-14 09:07:32.000000000 +0200
|
||||
+++ b/apps/Makefile 2022-07-19 21:12:39.787546862 +0200
|
||||
@@ -25,7 +25,8 @@
|
||||
|
||||
VERSION = "0.3.2"
|
||||
CPPFLAGS += -MMD -MP -DVERSION=\"$(VERSION)\"
|
||||
-CXXFLAGS += -O2 -Wall
|
||||
+CXXFLAGS += -O2 -Wall -I ../source
|
||||
+LDFLAGS += -L ../source
|
||||
|
||||
|
||||
all: alsa_loopback alsa_delay
|
||||
@@ -48,14 +49,11 @@
|
||||
|
||||
|
||||
install: all
|
||||
- install -d $(BINDIR)
|
||||
- install -m 755 alsa_loopback $(DESTDIR)$(BINDIR)
|
||||
- install -m 755 alsa_delay $(DESTDIR)$(BINDIR)
|
||||
+ install -vDm 755 alsa_loopback alsa_delay -t $(DESTDIR)$(BINDIR)
|
||||
|
||||
|
||||
uninstall:
|
||||
- rm -f $(DESTDIR)$(BINDIR)/alsa_loopback
|
||||
- rm -f $(DESTDIR)$(BINDIR)/bin/alsa_delay
|
||||
+ rm -f $(DESTDIR)$(BINDIR)/{alsa_delay,alsa_loopback}
|
||||
|
||||
|
||||
clean:
|
33
zita-alsa-pcmi/zita-alsa-pcmi-0.5.1-source_makefile.patch
Normal file
33
zita-alsa-pcmi/zita-alsa-pcmi-0.5.1-source_makefile.patch
Normal file
@ -0,0 +1,33 @@
|
||||
diff -ruN a/source/Makefile b/source/Makefile
|
||||
--- a/source/Makefile 2022-07-14 17:04:29.000000000 +0200
|
||||
+++ b/source/Makefile 2022-07-19 21:33:40.627248973 +0200
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
CPPFLAGS += -DVERSION=\"$(VERSION)\" -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
|
||||
CXXFLAGS += -O2 -Wall -fPIC
|
||||
-CXXFLAGS += -march=native
|
||||
LDLFAGS +=
|
||||
LDLIBS +=
|
||||
|
||||
@@ -46,15 +45,15 @@
|
||||
|
||||
$(ZITA-ALSA-PCMI_MIN): $(ZITA-ALSA-PCMI_O)
|
||||
$(CXX) -shared $(LDFLAGS) -Wl,-soname,$(ZITA-ALSA-PCMI_MAJ) -o $(ZITA-ALSA-PCMI_MIN) $(ZITA-ALSA-PCMI_O) $(ZITA-ALSA-PCMI_DEP)
|
||||
+ ln -sf $(ZITA-ALSA-PCMI_MIN) $(ZITA-ALSA-PCMI_SO)
|
||||
+ ln -sf $(ZITA-ALSA-PCMI_MIN) $(ZITA-ALSA-PCMI_MAJ)
|
||||
|
||||
|
||||
install: $(ZITA-ALSA-PCMI_MIN)
|
||||
- install -d $(DESTDIR)$(INCDIR)
|
||||
- install -d $(DESTDIR)$(LIBDIR)
|
||||
- install -m 644 $(ZITA-ALSA-PCMI_H) $(DESTDIR)$(INCDIR)
|
||||
- install -m 755 $(ZITA-ALSA-PCMI_MIN) $(DESTDIR)$(LIBDIR)
|
||||
- ldconfig
|
||||
- ln -sf $(ZITA-ALSA-PCMI_MIN) $(DESTDIR)$(LIBDIR)/$(ZITA-ALSA-PCMI_SO)
|
||||
+ install -vDm 644 $(ZITA-ALSA-PCMI_H) -t $(DESTDIR)$(INCDIR)
|
||||
+ install -vDm 755 $(ZITA-ALSA-PCMI_MIN) -t $(DESTDIR)$(LIBDIR)
|
||||
+ ln -fsv $(ZITA-ALSA-PCMI_MIN) $(DESTDIR)$(LIBDIR)/$(ZITA-ALSA-PCMI_SO)
|
||||
+ ln -fsv $(ZITA-ALSA-PCMI_MIN) $(DESTDIR)$(LIBDIR)/$(ZITA-ALSA-PCMI_MAJ)
|
||||
|
||||
uninstall:
|
||||
rm -rf $(DESTDIR)$(INCDIR)/$(ZITA-ALSA-PCMI_H)
|
Loading…
x
Reference in New Issue
Block a user