diff options
Diffstat (limited to 'meta-oe/recipes-dbs')
87 files changed, 2793 insertions, 1500 deletions
diff --git a/meta-oe/recipes-dbs/influxdb/influxdb/0001-Use-v2.1.2-xxhash-to-fix-build-with-go-1.17.patch b/meta-oe/recipes-dbs/influxdb/influxdb/0001-Use-v2.1.2-xxhash-to-fix-build-with-go-1.17.patch new file mode 100644 index 0000000000..e31c7be1ec --- /dev/null +++ b/meta-oe/recipes-dbs/influxdb/influxdb/0001-Use-v2.1.2-xxhash-to-fix-build-with-go-1.17.patch @@ -0,0 +1,39 @@ +From 4ca405e9763fd0ba747ef00edd30648b66992fbb Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 30 Nov 2021 15:14:39 -0800 +Subject: [PATCH] Use v2.1.2 xxhash to fix build with go 1.17 + +Fixes +| # github.com/cespare/xxhash +| asm: xxhash_amd64.s:120: when dynamic linking, R15 is clobbered by a global variable access and is used here: 000 +92 (/mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/influxdb/1.8.10-r0/build/pkg/mod/github.com/cespare/xxhash@ +v1.1.0/xxhash_amd64.s:120) ADDQ R15, AX +| asm: assembly failed + +Upstream-Status: Backport [https://github.com/cespare/xxhash/commit/e7a6b52374f7e2abfb8abb27249d53a1997b09a7] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + go.mod | 3 ++- + go.sum | 2 ++ + 2 files changed, 4 insertions(+), 1 deletion(-) + +--- a/go.mod ++++ b/go.mod +@@ -55,3 +55,5 @@ require ( + gonum.org/v1/gonum v0.6.0 // indirect + google.golang.org/grpc v1.26.0 + ) ++ ++replace github.com/cespare/xxhash => github.com/kraj/xxhash v1.1.1-0.20211201014032-8254a11eab56 +--- a/go.sum ++++ b/go.sum +@@ -188,6 +188,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dA + github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= + github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= + github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= ++github.com/kraj/xxhash v1.1.1-0.20211201014032-8254a11eab56 h1:hCQ0jTkNInQ7PpNeGlSV9s+QMi6nUyyMuz37Bg3TduE= ++github.com/kraj/xxhash v1.1.1-0.20211201014032-8254a11eab56/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= + github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= + github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= + github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= diff --git a/meta-oe/recipes-dbs/influxdb/influxdb/0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch b/meta-oe/recipes-dbs/influxdb/influxdb/0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch new file mode 100644 index 0000000000..b05fd3666b --- /dev/null +++ b/meta-oe/recipes-dbs/influxdb/influxdb/0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch @@ -0,0 +1,31 @@ +From f3713628fac72e45223013dcf8e37ac65d17d886 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 11 Jan 2021 15:16:57 -0800 +Subject: [PATCH] patch term module for mips ispeed/ospeed termios absense + +Upstream-Status: Inappropriate [OE-Specific needed on mips] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + go.mod | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/go.mod ++++ b/go.mod +@@ -56,4 +56,5 @@ require ( + google.golang.org/grpc v1.26.0 + ) + ++replace github.com/pkg/term => github.com/kraj/term v0.0.0-20210111231523-7c42fcb0e627 + replace github.com/cespare/xxhash => github.com/kraj/xxhash v1.1.1-0.20211201014032-8254a11eab56 +--- a/go.sum ++++ b/go.sum +@@ -188,6 +188,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dA + github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= + github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= + github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= ++github.com/kraj/term v0.0.0-20210111231523-7c42fcb0e627 h1:3/XXm86KqrOZEJvEmFlzl3NTFA99n5Pd/cSXl60LmuA= ++github.com/kraj/term v0.0.0-20210111231523-7c42fcb0e627/go.mod h1:BYR4E+NOQrH+NhXE71KuBNmyR1lQ+yDvP+O3IIHO5bM= + github.com/kraj/xxhash v1.1.1-0.20211201014032-8254a11eab56 h1:hCQ0jTkNInQ7PpNeGlSV9s+QMi6nUyyMuz37Bg3TduE= + github.com/kraj/xxhash v1.1.1-0.20211201014032-8254a11eab56/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= + github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= diff --git a/meta-oe/recipes-dbs/influxdb/influxdb/influxdb b/meta-oe/recipes-dbs/influxdb/influxdb/influxdb new file mode 100755 index 0000000000..ffb29c3ae6 --- /dev/null +++ b/meta-oe/recipes-dbs/influxdb/influxdb/influxdb @@ -0,0 +1,235 @@ +#!/bin/bash +### BEGIN INIT INFO +# Provides: influxd +# Required-Start: $all +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start the InfluxDB process +### END INIT INFO +set -x +# If you modify this, please make sure to also edit influxdb.service + +# Command-line options that can be set in /etc/default/influxdb. These will override +# any config file values. +DEFAULT=/etc/default/influxdb + +# Daemon options +INFLUXD_OPTS= + +# Process name ( For display ) +NAME=influxdb + +# User and group +USER=influxdb +GROUP=influxdb + +# Check for sudo or root privileges before continuing +if [ "$UID" != "0" ]; then + echo "You must be root to run this script" + exit 1 +fi + +# Daemon name, where is the actual executable If the daemon is not +# there, then exit. +DAEMON=/usr/bin/influxd +if [ ! -x $DAEMON ]; then + echo "Executable $DAEMON does not exist!" + exit 5 +fi + +# Configuration file +CONFIG=/etc/influxdb/influxdb.conf + +# PID file for the daemon +PIDFILE=/var/run/influxdb/influxd.pid +PIDDIR=`dirname $PIDFILE` +if [ ! -d "$PIDDIR" ]; then + mkdir -p $PIDDIR + chown $USER:$GROUP $PIDDIR +fi + +# Max open files +OPEN_FILE_LIMIT=65536 + +if [ -r /lib/lsb/init-functions ]; then + source /lib/lsb/init-functions +fi + +# Logging +if [ -z "$STDOUT" ]; then + STDOUT=/var/log/influxdb/influxd.log +fi + +if [ ! -f "$STDOUT" ]; then + mkdir -p $(dirname $STDOUT) +fi + +if [ -z "$STDERR" ]; then + STDERR=/var/log/influxdb/influxd.log +fi + +if [ ! -f "$STDERR" ]; then + mkdir -p $(dirname $STDERR) +fi + +# Override init script variables with DEFAULT values +if [ -r $DEFAULT ]; then + source $DEFAULT +fi + +function log_failure_msg() { + echo "$@" "[ FAILED ]" +} + +function log_success_msg() { + echo "$@" "[ OK ]" +} + +function start() { + # Check if config file exist + if [ ! -r $CONFIG ]; then + log_failure_msg "config file $CONFIG doesn't exist (or you don't have permission to view)" + exit 4 + fi + + # Check that the PID file exists, and check the actual status of process + if [ -f $PIDFILE ]; then + PID="$(cat $PIDFILE)" + if kill -0 "$PID" &>/dev/null; then + # Process is already up + log_success_msg "$NAME process is already running" + return 0 + fi + else + su -s /bin/sh -c "touch $PIDFILE" $USER &>/dev/null + if [ $? -ne 0 ]; then + log_failure_msg "$PIDFILE not writable, check permissions" + exit 5 + fi + fi + + # Bump the file limits, before launching the daemon. These will + # carry over to launched processes. + ulimit -n $OPEN_FILE_LIMIT + if [ $? -ne 0 ]; then + log_failure_msg "Unable to set ulimit to $OPEN_FILE_LIMIT" + exit 1 + fi + + # Launch process + echo "Starting $NAME..." + if command -v start-stop-daemon &>/dev/null; then + start-stop-daemon \ + --background \ + --chuid $USER:$GROUP \ + --start \ + --quiet \ + --pidfile $PIDFILE \ + --exec $DAEMON \ + -- \ + -config $CONFIG \ + $INFLUXD_OPTS >>$STDOUT 2>>$STDERR + else + local CMD="$DAEMON -config $CONFIG $INFLUXD_OPTS >>$STDOUT 2>>$STDERR &" + su -s /bin/sh -c "$CMD" $USER + fi + + # Sleep to verify process is still up + sleep 1 + echo $(pidof influxd) > $PIDFILE + if [ -f $PIDFILE ]; then + # PIDFILE exists + PID="$(cat $PIDFILE)" + if kill -0 "$PID" &>/dev/null; then + # PID up, service running + log_success_msg "$NAME process was started" + return 0 + fi + fi + log_failure_msg "$NAME process was unable to start" + exit 1 +} + +function stop() { + # Stop the daemon. + if [ -f $PIDFILE ]; then + local PID="$(cat $PIDFILE)" + if kill -0 $PID &>/dev/null; then + echo "Stopping $NAME..." + # Process still up, send SIGTERM and remove PIDFILE + kill -s TERM $PID &>/dev/null && rm -f "$PIDFILE" &>/dev/null + n=0 + while true; do + # Enter loop to ensure process is stopped + kill -0 $PID &>/dev/null + if [ "$?" != "0" ]; then + # Process stopped, break from loop + log_success_msg "$NAME process was stopped" + return 0 + fi + + # Process still up after signal, sleep and wait + sleep 1 + n=$(expr $n + 1) + if [ $n -eq 30 ]; then + # After 30 seconds, send SIGKILL + echo "Timeout exceeded, sending SIGKILL..." + kill -s KILL $PID &>/dev/null + elif [ $? -eq 40 ]; then + # After 40 seconds, error out + log_failure_msg "could not stop $NAME process" + exit 1 + fi + done + fi + fi + log_success_msg "$NAME process already stopped" +} + +function restart() { + # Restart the daemon. + stop + start +} + +function status() { + # Check the status of the process. + if [ -f $PIDFILE ]; then + PID="$(cat $PIDFILE)" + if kill -0 $PID &>/dev/null; then + log_success_msg "$NAME process is running" + exit 0 + fi + fi + log_failure_msg "$NAME process is not running" + exit 1 +} + +case $1 in + start) + start + ;; + + stop) + stop + ;; + + restart) + restart + ;; + + status) + status + ;; + + version) + $DAEMON version + ;; + + *) + # For invalid arguments, print the usage message. + echo "Usage: $0 {start|stop|restart|status|version}" + exit 2 + ;; +esac diff --git a/meta-oe/recipes-dbs/influxdb/influxdb/influxdb.conf b/meta-oe/recipes-dbs/influxdb/influxdb/influxdb.conf new file mode 100644 index 0000000000..21c0926f2d --- /dev/null +++ b/meta-oe/recipes-dbs/influxdb/influxdb/influxdb.conf @@ -0,0 +1,586 @@ +### Welcome to the InfluxDB configuration file. + +# The values in this file override the default values used by the system if +# a config option is not specified. The commented out lines are the configuration +# field and the default value used. Uncommenting a line and changing the value +# will change the value used at runtime when the process is restarted. + +# Once every 24 hours InfluxDB will report usage data to usage.influxdata.com +# The data includes a random ID, os, arch, version, the number of series and other +# usage data. No data from user databases is ever transmitted. +# Change this option to true to disable reporting. +# reporting-disabled = false + +# Bind address to use for the RPC service for backup and restore. +# bind-address = "127.0.0.1:8088" + +### +### [meta] +### +### Controls the parameters for the Raft consensus group that stores metadata +### about the InfluxDB cluster. +### + +[meta] + # Where the metadata/raft database is stored + dir = "/var/lib/influxdb/meta" + + # Automatically create a default retention policy when creating a database. + # retention-autocreate = true + + # If log messages are printed for the meta service + # logging-enabled = true + +### +### [data] +### +### Controls where the actual shard data for InfluxDB lives and how it is +### flushed from the WAL. "dir" may need to be changed to a suitable place +### for your system, but the WAL settings are an advanced configuration. The +### defaults should work for most systems. +### + +[data] + # The directory where the TSM storage engine stores TSM files. + dir = "/var/lib/influxdb/data" + + # The directory where the TSM storage engine stores WAL files. + wal-dir = "/var/lib/influxdb/wal" + + # The amount of time that a write will wait before fsyncing. A duration + # greater than 0 can be used to batch up multiple fsync calls. This is useful for slower + # disks or when WAL write contention is seen. A value of 0s fsyncs every write to the WAL. + # Values in the range of 0-100ms are recommended for non-SSD disks. + # wal-fsync-delay = "0s" + + + # The type of shard index to use for new shards. The default is an in-memory index that is + # recreated at startup. A value of "tsi1" will use a disk based index that supports higher + # cardinality datasets. + # index-version = "inmem" + + # Trace logging provides more verbose output around the tsm engine. Turning + # this on can provide more useful output for debugging tsm engine issues. + # trace-logging-enabled = false + + # Whether queries should be logged before execution. Very useful for troubleshooting, but will + # log any sensitive data contained within a query. + # query-log-enabled = true + + # Validates incoming writes to ensure keys only have valid unicode characters. + # This setting will incur a small overhead because every key must be checked. + # validate-keys = false + + # Settings for the TSM engine + + # CacheMaxMemorySize is the maximum size a shard's cache can + # reach before it starts rejecting writes. + # Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k). + # Values without a size suffix are in bytes. + # cache-max-memory-size = "1g" + + # CacheSnapshotMemorySize is the size at which the engine will + # snapshot the cache and write it to a TSM file, freeing up memory + # Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k). + # Values without a size suffix are in bytes. + # cache-snapshot-memory-size = "25m" + + # CacheSnapshotWriteColdDuration is the length of time at + # which the engine will snapshot the cache and write it to + # a new TSM file if the shard hasn't received writes or deletes + # cache-snapshot-write-cold-duration = "10m" + + # CompactFullWriteColdDuration is the duration at which the engine + # will compact all TSM files in a shard if it hasn't received a + # write or delete + # compact-full-write-cold-duration = "4h" + + # The maximum number of concurrent full and level compactions that can run at one time. A + # value of 0 results in 50% of runtime.GOMAXPROCS(0) used at runtime. Any number greater + # than 0 limits compactions to that value. This setting does not apply + # to cache snapshotting. + # max-concurrent-compactions = 0 + + # CompactThroughput is the rate limit in bytes per second that we + # will allow TSM compactions to write to disk. Note that short bursts are allowed + # to happen at a possibly larger value, set by CompactThroughputBurst + # compact-throughput = "48m" + + # CompactThroughputBurst is the rate limit in bytes per second that we + # will allow TSM compactions to write to disk. + # compact-throughput-burst = "48m" + + # If true, then the mmap advise value MADV_WILLNEED will be provided to the kernel with respect to + # TSM files. This setting has been found to be problematic on some kernels, and defaults to off. + # It might help users who have slow disks in some cases. + # tsm-use-madv-willneed = false + + # Settings for the inmem index + + # The maximum series allowed per database before writes are dropped. This limit can prevent + # high cardinality issues at the database level. This limit can be disabled by setting it to + # 0. + # max-series-per-database = 1000000 + + # The maximum number of tag values per tag that are allowed before writes are dropped. This limit + # can prevent high cardinality tag values from being written to a measurement. This limit can be + # disabled by setting it to 0. + # max-values-per-tag = 100000 + + # Settings for the tsi1 index + + # The threshold, in bytes, when an index write-ahead log file will compact + # into an index file. Lower sizes will cause log files to be compacted more + # quickly and result in lower heap usage at the expense of write throughput. + # Higher sizes will be compacted less frequently, store more series in-memory, + # and provide higher write throughput. + # Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k). + # Values without a size suffix are in bytes. + # max-index-log-file-size = "1m" + + # The size of the internal cache used in the TSI index to store previously + # calculated series results. Cached results will be returned quickly from the cache rather + # than needing to be recalculated when a subsequent query with a matching tag key/value + # predicate is executed. Setting this value to 0 will disable the cache, which may + # lead to query performance issues. + # This value should only be increased if it is known that the set of regularly used + # tag key/value predicates across all measurements for a database is larger than 100. An + # increase in cache size may lead to an increase in heap usage. + series-id-set-cache-size = 100 + +### +### [coordinator] +### +### Controls the clustering service configuration. +### + +[coordinator] + # The default time a write request will wait until a "timeout" error is returned to the caller. + # write-timeout = "10s" + + # The maximum number of concurrent queries allowed to be executing at one time. If a query is + # executed and exceeds this limit, an error is returned to the caller. This limit can be disabled + # by setting it to 0. + # max-concurrent-queries = 0 + + # The maximum time a query will is allowed to execute before being killed by the system. This limit + # can help prevent run away queries. Setting the value to 0 disables the limit. + # query-timeout = "0s" + + # The time threshold when a query will be logged as a slow query. This limit can be set to help + # discover slow or resource intensive queries. Setting the value to 0 disables the slow query logging. + # log-queries-after = "0s" + + # The maximum number of points a SELECT can process. A value of 0 will make + # the maximum point count unlimited. This will only be checked every second so queries will not + # be aborted immediately when hitting the limit. + # max-select-point = 0 + + # The maximum number of series a SELECT can run. A value of 0 will make the maximum series + # count unlimited. + # max-select-series = 0 + + # The maximum number of group by time bucket a SELECT can create. A value of zero will max the maximum + # number of buckets unlimited. + # max-select-buckets = 0 + +### +### [retention] +### +### Controls the enforcement of retention policies for evicting old data. +### + +[retention] + # Determines whether retention policy enforcement enabled. + # enabled = true + + # The interval of time when retention policy enforcement checks run. + # check-interval = "30m" + +### +### [shard-precreation] +### +### Controls the precreation of shards, so they are available before data arrives. +### Only shards that, after creation, will have both a start- and end-time in the +### future, will ever be created. Shards are never precreated that would be wholly +### or partially in the past. + +[shard-precreation] + # Determines whether shard pre-creation service is enabled. + # enabled = true + + # The interval of time when the check to pre-create new shards runs. + # check-interval = "10m" + + # The default period ahead of the endtime of a shard group that its successor + # group is created. + # advance-period = "30m" + +### +### Controls the system self-monitoring, statistics and diagnostics. +### +### The internal database for monitoring data is created automatically if +### if it does not already exist. The target retention within this database +### is called 'monitor' and is also created with a retention period of 7 days +### and a replication factor of 1, if it does not exist. In all cases the +### this retention policy is configured as the default for the database. + +[monitor] + # Whether to record statistics internally. + # store-enabled = true + + # The destination database for recorded statistics + # store-database = "_internal" + + # The interval at which to record statistics + # store-interval = "10s" + +### +### [http] +### +### Controls how the HTTP endpoints are configured. These are the primary +### mechanism for getting data into and out of InfluxDB. +### + +[http] + # Determines whether HTTP endpoint is enabled. + # enabled = true + + # Determines whether the Flux query endpoint is enabled. + # flux-enabled = false + + # Determines whether the Flux query logging is enabled. + # flux-log-enabled = false + + # The bind address used by the HTTP service. + # bind-address = ":8086" + + # Determines whether user authentication is enabled over HTTP/HTTPS. + # auth-enabled = false + + # The default realm sent back when issuing a basic auth challenge. + # realm = "InfluxDB" + + # Determines whether HTTP request logging is enabled. + # log-enabled = true + + # Determines whether the HTTP write request logs should be suppressed when the log is enabled. + # suppress-write-log = false + + # When HTTP request logging is enabled, this option specifies the path where + # log entries should be written. If unspecified, the default is to write to stderr, which + # intermingles HTTP logs with internal InfluxDB logging. + # + # If influxd is unable to access the specified path, it will log an error and fall back to writing + # the request log to stderr. + # access-log-path = "" + + # Filters which requests should be logged. Each filter is of the pattern NNN, NNX, or NXX where N is + # a number and X is a wildcard for any number. To filter all 5xx responses, use the string 5xx. + # If multiple filters are used, then only one has to match. The default is to have no filters which + # will cause every request to be printed. + # access-log-status-filters = [] + + # Determines whether detailed write logging is enabled. + # write-tracing = false + + # Determines whether the pprof endpoint is enabled. This endpoint is used for + # troubleshooting and monitoring. + # pprof-enabled = true + + # Enables authentication on pprof endpoints. Users will need admin permissions + # to access the pprof endpoints when this setting is enabled. This setting has + # no effect if either auth-enabled or pprof-enabled are set to false. + # pprof-auth-enabled = false + + # Enables a pprof endpoint that binds to localhost:6060 immediately on startup. + # This is only needed to debug startup issues. + # debug-pprof-enabled = false + + # Enables authentication on the /ping, /metrics, and deprecated /status + # endpoints. This setting has no effect if auth-enabled is set to false. + # ping-auth-enabled = false + + # Determines whether HTTPS is enabled. + # https-enabled = false + + # The SSL certificate to use when HTTPS is enabled. + # https-certificate = "/etc/ssl/influxdb.pem" + + # Use a separate private key location. + # https-private-key = "" + + # The JWT auth shared secret to validate requests using JSON web tokens. + # shared-secret = "" + + # The default chunk size for result sets that should be chunked. + # max-row-limit = 0 + + # The maximum number of HTTP connections that may be open at once. New connections that + # would exceed this limit are dropped. Setting this value to 0 disables the limit. + # max-connection-limit = 0 + + # Enable http service over unix domain socket + # unix-socket-enabled = false + + # The path of the unix domain socket. + # bind-socket = "/var/run/influxdb.sock" + + # The maximum size of a client request body, in bytes. Setting this value to 0 disables the limit. + # max-body-size = 25000000 + + # The maximum number of writes processed concurrently. + # Setting this to 0 disables the limit. + # max-concurrent-write-limit = 0 + + # The maximum number of writes queued for processing. + # Setting this to 0 disables the limit. + # max-enqueued-write-limit = 0 + + # The maximum duration for a write to wait in the queue to be processed. + # Setting this to 0 or setting max-concurrent-write-limit to 0 disables the limit. + # enqueued-write-timeout = 0 + +### +### [logging] +### +### Controls how the logger emits logs to the output. +### + +[logging] + # Determines which log encoder to use for logs. Available options + # are auto, logfmt, and json. auto will use a more a more user-friendly + # output format if the output terminal is a TTY, but the format is not as + # easily machine-readable. When the output is a non-TTY, auto will use + # logfmt. + # format = "auto" + + # Determines which level of logs will be emitted. The available levels + # are error, warn, info, and debug. Logs that are equal to or above the + # specified level will be emitted. + # level = "info" + + # Suppresses the logo output that is printed when the program is started. + # The logo is always suppressed if STDOUT is not a TTY. + # suppress-logo = false + +### +### [subscriber] +### +### Controls the subscriptions, which can be used to fork a copy of all data +### received by the InfluxDB host. +### + +[subscriber] + # Determines whether the subscriber service is enabled. + # enabled = true + + # The default timeout for HTTP writes to subscribers. + # http-timeout = "30s" + + # Allows insecure HTTPS connections to subscribers. This is useful when testing with self- + # signed certificates. + # insecure-skip-verify = false + + # The path to the PEM encoded CA certs file. If the empty string, the default system certs will be used + # ca-certs = "" + + # The number of writer goroutines processing the write channel. + # write-concurrency = 40 + + # The number of in-flight writes buffered in the write channel. + # write-buffer-size = 1000 + + +### +### [[graphite]] +### +### Controls one or many listeners for Graphite data. +### + +[[graphite]] + # Determines whether the graphite endpoint is enabled. + # enabled = false + # database = "graphite" + # retention-policy = "" + # bind-address = ":2003" + # protocol = "tcp" + # consistency-level = "one" + + # These next lines control how batching works. You should have this enabled + # otherwise you could get dropped metrics or poor performance. Batching + # will buffer points in memory if you have many coming in. + + # Flush if this many points get buffered + # batch-size = 5000 + + # number of batches that may be pending in memory + # batch-pending = 10 + + # Flush at least this often even if we haven't hit buffer limit + # batch-timeout = "1s" + + # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max. + # udp-read-buffer = 0 + + ### This string joins multiple matching 'measurement' values providing more control over the final measurement name. + # separator = "." + + ### Default tags that will be added to all metrics. These can be overridden at the template level + ### or by tags extracted from metric + # tags = ["region=us-east", "zone=1c"] + + ### Each template line requires a template pattern. It can have an optional + ### filter before the template and separated by spaces. It can also have optional extra + ### tags following the template. Multiple tags should be separated by commas and no spaces + ### similar to the line protocol format. There can be only one default template. + # templates = [ + # "*.app env.service.resource.measurement", + # # Default template + # "server.*", + # ] + +### +### [collectd] +### +### Controls one or many listeners for collectd data. +### + +[[collectd]] + # enabled = false + # bind-address = ":25826" + # database = "collectd" + # retention-policy = "" + # + # The collectd service supports either scanning a directory for multiple types + # db files, or specifying a single db file. + # typesdb = "/usr/local/share/collectd" + # + # security-level = "none" + # auth-file = "/etc/collectd/auth_file" + + # These next lines control how batching works. You should have this enabled + # otherwise you could get dropped metrics or poor performance. Batching + # will buffer points in memory if you have many coming in. + + # Flush if this many points get buffered + # batch-size = 5000 + + # Number of batches that may be pending in memory + # batch-pending = 10 + + # Flush at least this often even if we haven't hit buffer limit + # batch-timeout = "10s" + + # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max. + # read-buffer = 0 + + # Multi-value plugins can be handled two ways. + # "split" will parse and store the multi-value plugin data into separate measurements + # "join" will parse and store the multi-value plugin as a single multi-value measurement. + # "split" is the default behavior for backward compatibility with previous versions of influxdb. + # parse-multivalue-plugin = "split" +### +### [opentsdb] +### +### Controls one or many listeners for OpenTSDB data. +### + +[[opentsdb]] + # enabled = false + # bind-address = ":4242" + # database = "opentsdb" + # retention-policy = "" + # consistency-level = "one" + # tls-enabled = false + # certificate= "/etc/ssl/influxdb.pem" + + # Log an error for every malformed point. + # log-point-errors = true + + # These next lines control how batching works. You should have this enabled + # otherwise you could get dropped metrics or poor performance. Only points + # metrics received over the telnet protocol undergo batching. + + # Flush if this many points get buffered + # batch-size = 1000 + + # Number of batches that may be pending in memory + # batch-pending = 5 + + # Flush at least this often even if we haven't hit buffer limit + # batch-timeout = "1s" + +### +### [[udp]] +### +### Controls the listeners for InfluxDB line protocol data via UDP. +### + +[[udp]] + # enabled = false + # bind-address = ":8089" + # database = "udp" + # retention-policy = "" + + # InfluxDB precision for timestamps on received points ("" or "n", "u", "ms", "s", "m", "h") + # precision = "" + + # These next lines control how batching works. You should have this enabled + # otherwise you could get dropped metrics or poor performance. Batching + # will buffer points in memory if you have many coming in. + + # Flush if this many points get buffered + # batch-size = 5000 + + # Number of batches that may be pending in memory + # batch-pending = 10 + + # Will flush at least this often even if we haven't hit buffer limit + # batch-timeout = "1s" + + # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max. + # read-buffer = 0 + +### +### [continuous_queries] +### +### Controls how continuous queries are run within InfluxDB. +### + +[continuous_queries] + # Determines whether the continuous query service is enabled. + # enabled = true + + # Controls whether queries are logged when executed by the CQ service. + # log-enabled = true + + # Controls whether queries are logged to the self-monitoring data store. + # query-stats-enabled = false + + # interval for how often continuous queries will be checked if they need to run + # run-interval = "1s" + +### +### [tls] +### +### Global configuration settings for TLS in InfluxDB. +### + +[tls] + # Determines the available set of cipher suites. See https://golang.org/pkg/crypto/tls/#pkg-constants + # for a list of available ciphers, which depends on the version of Go (use the query + # SHOW DIAGNOSTICS to see the version of Go used to build InfluxDB). If not specified, uses + # the default settings from Go's crypto/tls package. + # ciphers = [ + # "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305", + # "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305", + # ] + + # Minimum version of the tls protocol that will be negotiated. If not specified, uses the + # default settings from Go's crypto/tls package. + # min-version = "tls1.2" + + # Maximum version of the tls protocol that will be negotiated. If not specified, uses the + # default settings from Go's crypto/tls package. + # max-version = "tls1.3" diff --git a/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb b/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb new file mode 100644 index 0000000000..50995c09b6 --- /dev/null +++ b/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb @@ -0,0 +1,70 @@ +DESCRIPTION = "InfluxDB is a time series database designed to handle high write and query loads." +HOMEPAGE = "https://www.influxdata.com/products/influxdb-overview/" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=f39a8d10930fb37bd59adabb3b9d0bd6" + +RDEPENDS:${PN} = "bash" +RDEPENDS:${PN}-dev = "bash" + +GO_IMPORT = "github.com/influxdata/influxdb" + +GO_INSTALL = "\ + ${GO_IMPORT}/cmd/influx \ + ${GO_IMPORT}/cmd/influxd \ +" + +SRC_URI = "\ + git://${GO_IMPORT};protocol=https;branch=1.8;destsuffix=${BPN}-${PV}/src/${GO_IMPORT} \ + file://0001-Use-v2.1.2-xxhash-to-fix-build-with-go-1.17.patch;patchdir=src/${GO_IMPORT} \ + file://influxdb \ + file://influxdb.conf \ +" + +SRC_URI:append:mipsarch = " file://0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch;patchdir=src/${GO_IMPORT}" + +SRCREV = "688e697c51fd5353725da078555adbeff0363d01" + +inherit go-mod pkgconfig systemd update-rc.d useradd + +# Workaround for network access issue during compile step +# this needs to be fixed in the recipes buildsystem to move +# this such that it can be accomplished during do_fetch task +do_compile[network] = "1" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system -d /var/lib/influxdb -m -s /bin/nologin influxdb" + +do_install:prepend() { + rm ${B}/src/${GO_IMPORT}/build.py + rm ${B}/src/${GO_IMPORT}/build.sh + rm ${B}/src/${GO_IMPORT}/Dockerfile* + sed -i -e "s#usr/bin/sh#bin/sh#g" ${B}/src/${GO_IMPORT}/scripts/ci/run_perftest.sh +} + +do_install:append() { + install -d ${D}${sysconfdir}/influxdb + install -m 0644 ${WORKDIR}/influxdb.conf ${D}${sysconfdir}/influxdb + chown -R root.influxdb ${D}${sysconfdir}/influxdb + + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/influxdb ${D}${sysconfdir}/init.d/influxdb + + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ] ; then + install -d ${D}${sysconfdir}/logrotate.d + install -m 0644 ${S}/src/${GO_IMPORT}/scripts/logrotate ${D}${sysconfdir}/logrotate.d/influxdb + fi + + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ] ; then + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${S}/src/${GO_IMPORT}/scripts/influxdb.service ${D}${systemd_system_unitdir}/influxdb.service + fi + + # TODO chown +} + +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME = "influxdb" +INITSCRIPT_PARAMS = "defaults" + +SYSTEMD_SERVICE:${PN} = "influxdb.service" diff --git a/meta-oe/recipes-dbs/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch b/meta-oe/recipes-dbs/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch deleted file mode 100644 index 3135d4d5ac..0000000000 --- a/meta-oe/recipes-dbs/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch +++ /dev/null @@ -1,34 +0,0 @@ -From c85978e77725ef233543370d24e23f853f449170 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 21 Sep 2017 17:47:02 -0700 -Subject: [PATCH] Makefile: Fix parallel build - -Sometimes mkdir $(SHARED_OUTDIR)/db races with compiler which is -creating .o file in the same directory $(SHARED_OUTDIR)/db/db_bench.o - -Fixes error like - -| mkdir out-static -| mkdir out-shared/db -| Assembler messages: -| Fatal error: can't create out-shared/db/db_bench.o: No such file or directory - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile b/Makefile -index f7cc7d7..51a0bcd 100644 ---- a/Makefile -+++ b/Makefile -@@ -386,6 +386,7 @@ $(STATIC_OUTDIR)/write_batch_test:db/write_batch_test.cc $(STATIC_LIBOBJECTS) $( - $(STATIC_OUTDIR)/memenv_test:$(STATIC_OUTDIR)/helpers/memenv/memenv_test.o $(STATIC_OUTDIR)/libmemenv.a $(STATIC_OUTDIR)/libleveldb.a $(TESTHARNESS) - $(XCRUN) $(CXX) $(LDFLAGS) $(STATIC_OUTDIR)/helpers/memenv/memenv_test.o $(STATIC_OUTDIR)/libmemenv.a $(STATIC_OUTDIR)/libleveldb.a $(TESTHARNESS) -o $@ $(LIBS) - -+$(SHARED_OUTDIR)/db/db_bench.o: | $(SHARED_OUTDIR)/db - $(SHARED_OUTDIR)/db_bench:$(SHARED_OUTDIR)/db/db_bench.o $(SHARED_LIBS) $(TESTUTIL) - $(XCRUN) $(CXX) $(LDFLAGS) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(SHARED_OUTDIR)/db/db_bench.o $(TESTUTIL) $(SHARED_OUTDIR)/$(SHARED_LIB3) -o $@ $(LIBS) - diff --git a/meta-oe/recipes-dbs/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch b/meta-oe/recipes-dbs/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch deleted file mode 100644 index 8f93cb325b..0000000000 --- a/meta-oe/recipes-dbs/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 5fd0918df2bb30e8f3edb2ee895d178edbf26f40 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 4 Sep 2017 22:38:03 -0700 -Subject: [PATCH 1/2] build_detect_platform: Check for __SSE4_2__ - -just using -msse4.2 is not enough, especially with clang -where it may accept -msse4.2 even during cross compiling -for say arm, however the difference is that builtin defines -wont be defined. - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - build_detect_platform | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: git/build_detect_platform -=================================================================== ---- git.orig/build_detect_platform -+++ git/build_detect_platform -@@ -224,13 +224,13 @@ EOF - rm -f $CXXOUTPUT 2>/dev/null - - # Test if gcc SSE 4.2 is supported -- $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -msse4.2 2>/dev/null <<EOF -+ $CXX $CXXFLAGS -Werror -x c++ - -o $CXXOUTPUT -msse4.2 -dD -E 2>/dev/null <<EOF - int main() {} - EOF -+ eval fgrep __SSE4_2__ $CXXOUTPUT >/dev/null 2>&1 - if [ "$?" = 0 ]; then - PLATFORM_SSEFLAGS="-msse4.2" - fi -- - rm -f $CXXOUTPUT 2>/dev/null - fi - diff --git a/meta-oe/recipes-dbs/leveldb/leveldb/0002-makefile-build-SHARED_MEMENVLIB.patch b/meta-oe/recipes-dbs/leveldb/leveldb/0002-makefile-build-SHARED_MEMENVLIB.patch deleted file mode 100644 index fc708b23ad..0000000000 --- a/meta-oe/recipes-dbs/leveldb/leveldb/0002-makefile-build-SHARED_MEMENVLIB.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 1ed8cec1fcf666904bb3ebd29fc85e235b72d122 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 4 Sep 2017 22:40:49 -0700 -Subject: [PATCH 2/2] makefile: build SHARED_MEMENVLIB - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - Makefile | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Makefile b/Makefile -index f7cc7d7..cb42278 100644 ---- a/Makefile -+++ b/Makefile -@@ -126,12 +126,12 @@ SHARED_VERSION_MINOR = 20 - SHARED_LIB1 = libleveldb.$(PLATFORM_SHARED_EXT) - SHARED_LIB2 = $(SHARED_LIB1).$(SHARED_VERSION_MAJOR) - SHARED_LIB3 = $(SHARED_LIB1).$(SHARED_VERSION_MAJOR).$(SHARED_VERSION_MINOR) --SHARED_LIBS = $(SHARED_OUTDIR)/$(SHARED_LIB1) $(SHARED_OUTDIR)/$(SHARED_LIB2) $(SHARED_OUTDIR)/$(SHARED_LIB3) -+SHARED_LIBS = $(SHARED_OUTDIR)/$(SHARED_LIB1) $(SHARED_OUTDIR)/$(SHARED_LIB2) $(SHARED_OUTDIR)/$(SHARED_LIB3) $(SHARED_MEMENVLIB) - $(SHARED_OUTDIR)/$(SHARED_LIB1): $(SHARED_OUTDIR)/$(SHARED_LIB3) - ln -fs $(SHARED_LIB3) $(SHARED_OUTDIR)/$(SHARED_LIB1) - $(SHARED_OUTDIR)/$(SHARED_LIB2): $(SHARED_OUTDIR)/$(SHARED_LIB3) - ln -fs $(SHARED_LIB3) $(SHARED_OUTDIR)/$(SHARED_LIB2) --SHARED_MEMENVLIB = $(SHARED_OUTDIR)/libmemenv.a -+SHARED_MEMENVLIB = $(SHARED_OUTDIR)/libmemenv.$(PLATFORM_SHARED_EXT).$(SHARED_VERSION_MAJOR).$(SHARED_VERSION_MINOR) - endif - - $(SHARED_OUTDIR)/$(SHARED_LIB3): $(SHARED_LIBOBJECTS) -@@ -294,7 +294,7 @@ endif - - $(SHARED_MEMENVLIB):$(SHARED_MEMENVOBJECTS) - rm -f $@ -- $(AR) -rs $@ $(SHARED_MEMENVOBJECTS) -+ $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$(basename $(notdir $(SHARED_MEMENVLIB))) $(SHARED_MEMENVOBJECTS) -o $(SHARED_MEMENVLIB) $(LIBS) - - $(STATIC_OUTDIR)/db_bench:db/db_bench.cc $(STATIC_LIBOBJECTS) $(TESTUTIL) - $(CXX) $(LDFLAGS) $(CXXFLAGS) db/db_bench.cc $(STATIC_LIBOBJECTS) $(TESTUTIL) -o $@ $(LIBS) --- -2.14.1 - diff --git a/meta-oe/recipes-dbs/leveldb/leveldb/run-ptest b/meta-oe/recipes-dbs/leveldb/leveldb/run-ptest new file mode 100644 index 0000000000..9ae70c1284 --- /dev/null +++ b/meta-oe/recipes-dbs/leveldb/leveldb/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +for test in *_test; do + if ./${test}; then + echo "PASS: ${test}" + else + echo "FAIL: ${test}" + fi +done + diff --git a/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb b/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb new file mode 100644 index 0000000000..6afc45ab7e --- /dev/null +++ b/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb @@ -0,0 +1,33 @@ +SUMMARY = "LevelDB is a fast key-value storage library" +DESCRIPTION = "LevelDB is a fast key-value storage library that provides an ordered mapping from string keys to string values" +HOMEPAGE = "https://github.com/google/leveldb" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=92d1b128950b11ba8495b64938fc164d" + +SRC_URI = "git://github.com/google/${BPN}.git;branch=main;protocol=https \ + file://run-ptest" + +SRCREV = "78b39d68c15ba020c0d60a3906fb66dbf1697595" +S = "${WORKDIR}/git" + +inherit cmake ptest + +PACKAGECONFIG ??= "" +PACKAGECONFIG[benchmarks] = "-DLEVELDB_BUILD_BENCHMARKS=ON,-DLEVELDB_BUILD_BENCHMARKS=OFF,sqlite" +PACKAGECONFIG[snappy] = ",,snappy" +PACKAGECONFIG[tcmalloc] = ",,gperftools" + +EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_RPATH=ON \ + -DLEVELDB_BUILD_TESTS=${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'ON', 'OFF', d)}" + +do_install:append() { + install -D -m 0755 ${B}/leveldbutil ${D}${bindir}/leveldbutil +} + +do_install_ptest() { + install -m 0755 ${B}/*_test ${D}${PTEST_PATH} +} + +# Do not try to build lib32-leveldb for mips64, but allow libn32-leveldb. +# +COMPATIBLE_HOST:mipsarcho32:pn-lib32-leveldb = "null" diff --git a/meta-oe/recipes-dbs/leveldb/leveldb_git.bb b/meta-oe/recipes-dbs/leveldb/leveldb_git.bb deleted file mode 100644 index 8fec89c6f1..0000000000 --- a/meta-oe/recipes-dbs/leveldb/leveldb_git.bb +++ /dev/null @@ -1,37 +0,0 @@ -SUMMARY = "LevelDB is a fast key-value storage library" -DESCRIPTION = "LevelDB is a fast key-value storage library that provides an ordered mapping from string keys to string values" -HOMEPAGE = "http://leveldb.googlecode.com" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=92d1b128950b11ba8495b64938fc164d" - -SRCREV = "a53934a3ae1244679f812d998a4f16f2c7f309a6" -PV = "1.20+git${SRCPV}" - -SRC_URI = "git://github.com/google/${BPN}.git \ - file://0001-build_detect_platform-Check-for-__SSE4_2__.patch \ - file://0002-makefile-build-SHARED_MEMENVLIB.patch \ - file://0001-Makefile-Fix-parallel-build.patch \ - " - -S = "${WORKDIR}/git" - -inherit utils - -do_compile() { - # do not use oe_runmake. oe_runmake pass to make compilation arguments and override - # leveldb makefile variable CFLAGS and broke leveldb build. - CFLAGS="${CFLAGS}" make ${PARALLEL_MAKE}|| die -} - -do_install() { - install -d ${D}${libdir} ${D}${bindir} ${D}${includedir}/leveldb - oe_libinstall -C ${B}/out-shared libleveldb ${D}${libdir} - oe_libinstall -C ${S}/out-static libleveldb ${D}${libdir} - oe_libinstall -C ${S}/out-static libmemenv ${D}${libdir} - install -m 0755 ${B}/out-shared/db_bench ${D}${bindir} - install -m 0755 ${B}/out-static/*_test ${D}${bindir} - install -m 644 ${S}/include/leveldb/*.h ${D}${includedir}/leveldb/ -} - -PACKAGES =+ "${PN}-ptest" -FILES_${PN}-ptest = "${bindir}" diff --git a/meta-oe/recipes-dbs/libdbi/libdbi.inc b/meta-oe/recipes-dbs/libdbi/libdbi.inc index cea2838e36..0aba91b5db 100644 --- a/meta-oe/recipes-dbs/libdbi/libdbi.inc +++ b/meta-oe/recipes-dbs/libdbi/libdbi.inc @@ -4,7 +4,7 @@ DESCRIPTION = "Database Independent Abstraction Layer for C" HOMEPAGE = "http://libdbi.sourceforge.net/" -LICENSE = "LGPLv2.1" +LICENSE = "LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499" SECTION = "libs" diff --git a/meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch b/meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch new file mode 100644 index 0000000000..3017bcede1 --- /dev/null +++ b/meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch @@ -0,0 +1,35 @@ +From 4a11d4d03ef66729d302cc122fa0c693299a7776 Mon Sep 17 00:00:00 2001 +From: Sakib Sajal <sakib.sajal@windriver.com> +Date: Wed, 18 Aug 2021 10:49:38 -0400 +Subject: [PATCH] Makefile: use libprefix instead of libdir + +libdir expands to "$(exec_prefix)/lib" where "lib" is hardcoded. +This is a problem for builds that enable MULTILIB since libraries +are to be installed in "lib64" directory. Hence allow the directory +to be configurable. + +Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> +--- +Upstream-Status: Pending + + libraries/liblmdb/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index f254511..1ec74e6 100644 +--- a/Makefile ++++ b/Makefile +@@ -46,11 +46,11 @@ all: $(ILIBS) $(PROGS) + + install: $(ILIBS) $(IPROGS) $(IHDRS) + mkdir -p $(DESTDIR)$(bindir) +- mkdir -p $(DESTDIR)$(libdir) ++ mkdir -p $(DESTDIR)$(libprefix) + mkdir -p $(DESTDIR)$(includedir) + mkdir -p $(DESTDIR)$(mandir)/man1 + for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done +- for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done ++ for f in $(ILIBS); do cp $$f $(DESTDIR)$(libprefix); done + for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done + for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done + diff --git a/meta-oe/recipes-dbs/lmdb/files/0001-make-set-soname-on-liblmdb.patch b/meta-oe/recipes-dbs/lmdb/files/0001-make-set-soname-on-liblmdb.patch new file mode 100644 index 0000000000..3dde46573f --- /dev/null +++ b/meta-oe/recipes-dbs/lmdb/files/0001-make-set-soname-on-liblmdb.patch @@ -0,0 +1,24 @@ +From b4d418bf3f78748d84e3cfb110833443eef34284 Mon Sep 17 00:00:00 2001 +From: Justin Bronder <jsbronder@cold-front.org> +Date: Thu, 25 Aug 2022 17:22:20 -0400 +Subject: [PATCH] make: set soname on liblmdb + +--- +Upstream-Status: Pending + + libraries/liblmdb/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile +index 1ec74e6..ea08cd6 100644 +--- a/libraries/liblmdb/Makefile ++++ b/libraries/liblmdb/Makefile +@@ -66,7 +66,7 @@ liblmdb.a: mdb.o midl.o + + liblmdb$(SOEXT): mdb.lo midl.lo + # $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS) +- $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS) ++ $(CC) $(LDFLAGS) -pthread -shared -Wl,-soname,$@ -o $@ mdb.lo midl.lo $(SOLIBS) + + mdb_stat: mdb_stat.o liblmdb.a + mdb_copy: mdb_copy.o liblmdb.a diff --git a/meta-oe/recipes-dbs/lmdb/files/run-ptest b/meta-oe/recipes-dbs/lmdb/files/run-ptest new file mode 100644 index 0000000000..a6a7549b9e --- /dev/null +++ b/meta-oe/recipes-dbs/lmdb/files/run-ptest @@ -0,0 +1,25 @@ +#!/bin/sh + +cd tests + +retval=0 +for t in mtest* +do + mkdir testdb + ./$t > /dev/null && ./mdb_stat testdb > /dev/null + if [ $? -ne 0 ]; then + echo "FAIL: $t" + retval=$(( ${retval} + 1)) + else + echo "PASS: $t" + fi + rm -rf testdb +done + +if [ $retval -eq 0 ] ; then + echo "PASS: lmdb" +else + echo "FAIL: lmdb" +fi + +exit $retval
\ No newline at end of file diff --git a/meta-oe/recipes-dbs/lmdb/lmdb_0.9.31.bb b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.31.bb new file mode 100644 index 0000000000..b2f1920f6b --- /dev/null +++ b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.31.bb @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: 2017-2019 Volker Krause <vkrause@kde.org> +# SPDX-FileCopyrightText: 2019 Hannah Kiekens <hannahkiekens@gmail.com> +# +# SPDX-License-Identifier: MIT + +SUMMARY = "Lightning Memory-Mapped Database (LMDB)" +HOMEPAGE = "https://symas.com/lightning-memory-mapped-database/" +LICENSE = "OLDAP-2.8" +LIC_FILES_CHKSUM = "file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972" + +SRC_URI = "git://github.com/LMDB/lmdb.git;nobranch=1;protocol=https \ + file://run-ptest \ + file://0001-Makefile-use-libprefix-instead-of-libdir.patch \ + file://0001-make-set-soname-on-liblmdb.patch;patchdir=../.. \ + " + +SRCREV = "ce201088de95d26fc0da36ba805bf2ddc2ba74ff" + +inherit ptest + +S = "${WORKDIR}/git/libraries/liblmdb" + +do_compile() { + oe_runmake CC="${CC}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}" XCFLAGS="${CFLAGS}" +} + +do_install() { + oe_runmake CC="${CC}" DESTDIR="${D}" prefix="${prefix}" libprefix="${libdir}" manprefix="${mandir}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}" XCFLAGS="${CFLAGS}" install + cd ${D}${libdir} + ln -s liblmdb.so.${PV} liblmdb.so + rm liblmdb.a +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + for test in mtest mtest2 mtest3 mtest4 mtest5 mdb_stat; do + install -m 755 ${S}/$test ${D}${PTEST_PATH}/tests + done +} diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch deleted file mode 100644 index 4d7ac3aa56..0000000000 --- a/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch +++ /dev/null @@ -1,33 +0,0 @@ -From fbfceebce2121831904f2f7115252dd03b413a6d Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 19 Sep 2017 18:52:53 -0700 -Subject: [PATCH] IntelRDFPMathLib20U1: Check for __DEFINED_wchar_t - -This is defined by musl if wchar_t is already defined - -avoids errors like - -src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h:46:15: error: typedef redefinition with different types - ('int' vs 'unsigned int') -typedef int wchar_t; - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: git/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h -=================================================================== ---- git.orig/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h -+++ git/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h -@@ -43,7 +43,7 @@ - - #if 0 // MongoDB Modification -- just `#include <stddef.h>` - // Fix system header issue on Sun solaris and define required type by ourselves --#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__) -+#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__) && !defined(__DEFINED_wchar_t) - typedef int wchar_t; - #endif - #else diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Support-deprecated-resolver-functions.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Support-deprecated-resolver-functions.patch deleted file mode 100644 index 070411ab9f..0000000000 --- a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Support-deprecated-resolver-functions.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 5994023a03634dfc0318976c293e7391fe6aa060 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 24 Aug 2018 12:56:22 -0700 -Subject: [PATCH 1/2] Support deprecated resolver functions - -Needed for musl libc - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/mongo/util/dns_query_posix-impl.h | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/mongo/util/dns_query_posix-impl.h b/src/mongo/util/dns_query_posix-impl.h -index d19958010c..bbca3309ed 100644 ---- a/src/mongo/util/dns_query_posix-impl.h -+++ b/src/mongo/util/dns_query_posix-impl.h -@@ -53,6 +53,12 @@ - - #include <boost/noncopyable.hpp> - -+#ifndef res_ninit -+#define res_nclose(arg) -+#define res_ninit(arg) res_init() -+#define res_nsearch(sta, nam, clas, typ, ans, alen) res_search(nam, clas, typ, ans, alen) -+#endif -+ - namespace mongo { - namespace dns { - // The anonymous namespace is safe, in this header, as it is not really a header. It is only used --- -2.18.0 - diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch deleted file mode 100644 index a6d721ac54..0000000000 --- a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 53368d3f4adc09dd84234a9af31771bcd8ca2757 Mon Sep 17 00:00:00 2001 -From: Sven Ebenfeld <sven.ebenfeld@gmail.com> -Date: Fri, 15 Jan 2016 22:41:28 +0100 -Subject: [PATCH] Tell scons to use build settings from environment variables - -Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com> ---- - SConstruct | 8 ++++++-- - src/mongo/util/SConscript | 2 ++ - 2 files changed, 8 insertions(+), 2 deletions(-) - -Index: git/SConstruct -=================================================================== ---- git.orig/SConstruct -+++ git/SConstruct -@@ -564,6 +564,7 @@ def variable_arch_converter(val): - 'amd64': 'x86_64', - 'emt64': 'x86_64', - 'x86': 'i386', -+ 'aarch64': 'arm64', - } - val = val.lower() - -@@ -652,7 +653,8 @@ env_vars.Add( - ) - - env_vars.Add('CC', -- help='Select the C compiler to use') -+ help='Select the C compiler to use', -+ default=os.getenv('CC')) - - env_vars.Add('CCFLAGS', - help='Sets flags for the C and C++ compiler', -@@ -672,7 +674,8 @@ env_vars.Add('CPPPATH', - converter=variable_shlex_converter) - - env_vars.Add('CXX', -- help='Select the C++ compiler to use') -+ help='Select the C++ compiler to use', -+ default=os.getenv('CXX')) - - env_vars.Add('CXXFLAGS', - help='Sets flags for the C++ compiler', -@@ -961,6 +964,7 @@ envDict = dict(BUILD_ROOT=buildDir, - ) - - env = Environment(variables=env_vars, **envDict) -+env.PrependENVPath('PATH', os.getenv('PATH')) - del envDict - - env.AddMethod(mongo_platform.env_os_is_wrapper, 'TargetOSIs') -Index: git/src/mongo/util/SConscript -=================================================================== ---- git.orig/src/mongo/util/SConscript -+++ git/src/mongo/util/SConscript -@@ -329,6 +329,8 @@ if env['MONGO_ALLOCATOR'] == 'tcmalloc': - 'MONGO_HAVE_GPERFTOOLS_SIZE_CLASS_STATS' - ] - ) -+ if not use_system_version_of_library('valgrind'): -+ tcmspEnv.InjectThirdPartyIncludePaths('valgrind') - - if not use_system_version_of_library('valgrind'): - # Include valgrind since tcmalloc disables itself while running under valgrind diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch deleted file mode 100644 index c17ebf1e7e..0000000000 --- a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 3eed8388b49d5d3cbc2db74fee1b017eb4b40d0a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 2 Sep 2017 10:06:24 -0700 -Subject: [PATCH] Use __GLIBC__ to control use of gnu_get_libc_version - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - src/mongo/util/processinfo_linux.cpp | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -Index: git/src/mongo/util/processinfo_linux.cpp -=================================================================== ---- git.orig/src/mongo/util/processinfo_linux.cpp -+++ git/src/mongo/util/processinfo_linux.cpp -@@ -44,10 +44,10 @@ - #include <unistd.h> - #ifdef __BIONIC__ - #include <android/api-level.h> --#elif __UCLIBC__ --#include <features.h> --#else -+#elif defined(__GLIBC__) && !defined(__UCLIBC__) - #include <gnu/libc-version.h> -+#else -+#include <features.h> - #endif - - #include <boost/filesystem.hpp> -@@ -503,7 +503,7 @@ void ProcessInfo::SystemInfo::collectSys - stringstream ss; - ss << "uClibc-" << __UCLIBC_MAJOR__ << "." << __UCLIBC_MINOR__ << "." << __UCLIBC_SUBLEVEL__; - bExtra.append("libcVersion", ss.str()); --#else -+#elif defined(__GLIBC__) - bExtra.append("libcVersion", gnu_get_libc_version()); - #endif - if (!verSig.empty()) diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch deleted file mode 100644 index 99edad3c4b..0000000000 --- a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch +++ /dev/null @@ -1,64 +0,0 @@ -From a4951489d649c2b609cbb80f6cfb49fdcad8bd43 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 2 Sep 2017 10:03:37 -0700 -Subject: [PATCH] Use long long instead of int64_t - -Fixes -error: call to member function 'appendNumber' is ambiguous -since this function expects long long as parameter and not int64_t - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - src/mongo/util/procparser.cpp | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -Index: git/src/mongo/util/procparser.cpp -=================================================================== ---- git.orig/src/mongo/util/procparser.cpp -+++ git/src/mongo/util/procparser.cpp -@@ -260,7 +260,7 @@ Status parseProcStat(const std::vector<S - - StringData stringValue((*partIt).begin(), (*partIt).end() - (*partIt).begin()); - -- uint64_t value; -+ long long value; - - if (!parseNumberFromString(stringValue, &value).isOK()) { - value = 0; -@@ -272,7 +272,7 @@ Status parseProcStat(const std::vector<S - } else { - StringData stringValue((*partIt).begin(), (*partIt).end() - (*partIt).begin()); - -- uint64_t value; -+ long long value; - - if (!parseNumberFromString(stringValue, &value).isOK()) { - value = 0; -@@ -365,7 +365,7 @@ Status parseProcMemInfo(const std::vecto - - StringData stringValue((*partIt).begin(), (*partIt).end()); - -- uint64_t value; -+ long long value; - - if (!parseNumberFromString(stringValue, &value).isOK()) { - value = 0; -@@ -522,7 +522,7 @@ Status parseProcDiskStats(const std::vec - StringData data, - BSONObjBuilder* builder) { - bool foundKeys = false; -- std::vector<uint64_t> stats; -+ std::vector<long long> stats; - stats.reserve(kDiskFieldCount); - - using string_split_iterator = boost::split_iterator<StringData::const_iterator>; -@@ -597,7 +597,7 @@ Status parseProcDiskStats(const std::vec - - StringData stringValue((*partIt).begin(), (*partIt).end()); - -- uint64_t value; -+ long long value; - - if (!parseNumberFromString(stringValue, &value).isOK()) { - value = 0; diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-asio-Dont-use-experimental-with-clang.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-asio-Dont-use-experimental-with-clang.patch deleted file mode 100644 index b597422e40..0000000000 --- a/meta-oe/recipes-dbs/mongodb/mongodb/0001-asio-Dont-use-experimental-with-clang.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 31ca5c563f1d9a3f70258be3dd2b1e547a65a550 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 5 Feb 2019 00:21:12 -0800 -Subject: [PATCH] asio: Dont use experimental with clang - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - .../asio-master/asio/include/asio/detail/string_view.hpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/third_party/asio-master/asio/include/asio/detail/string_view.hpp b/src/third_party/asio-master/asio/include/asio/detail/string_view.hpp -index 222c02186d..3bf7494529 100644 ---- a/src/third_party/asio-master/asio/include/asio/detail/string_view.hpp -+++ b/src/third_party/asio-master/asio/include/asio/detail/string_view.hpp -@@ -28,8 +28,8 @@ - namespace asio { - - #if defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) --using std::experimental::basic_string_view; --using std::experimental::string_view; -+using std::basic_string_view; -+using std::string_view; - #else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) - using std::basic_string_view; - using std::string_view; --- -2.20.1 - diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch deleted file mode 100644 index 098306f500..0000000000 --- a/meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch +++ /dev/null @@ -1,35 +0,0 @@ -From df7ef16afcc6ab55daa686e4f15c16e3d1280337 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 2 Sep 2017 12:42:30 -0700 -Subject: [PATCH 2/4] Add a definition for the macro __ELF_NATIVE_CLASS - -It depends on the native arch's word size. - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/mongo/util/stacktrace_posix.cpp | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/src/mongo/util/stacktrace_posix.cpp b/src/mongo/util/stacktrace_posix.cpp -index 53ab85f56f..7c458e7ef2 100644 ---- a/src/mongo/util/stacktrace_posix.cpp -+++ b/src/mongo/util/stacktrace_posix.cpp -@@ -37,6 +37,15 @@ - #include <string> - #include <sys/utsname.h> - -+#if !defined(__GLIBC__) -+#if defined __x86_64__ && !defined __ILP32__ -+# define __WORDSIZE 64 -+#else -+# define __WORDSIZE 32 -+#endif -+#define __ELF_NATIVE_CLASS __WORDSIZE -+#endif -+ - #include "mongo/base/init.h" - #include "mongo/config.h" - #include "mongo/db/jsobj.h" --- -2.14.1 - diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0002-Fix-default-stack-size-to-256K.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0002-Fix-default-stack-size-to-256K.patch deleted file mode 100644 index 085fa50d90..0000000000 --- a/meta-oe/recipes-dbs/mongodb/mongodb/0002-Fix-default-stack-size-to-256K.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 98543889f7ba38c02eb7cd9822f45e27d619edd6 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 24 Aug 2018 13:07:01 -0700 -Subject: [PATCH 2/2] Fix default stack size to 256K - -On musl default stack size is ~80K which is too low -for mongodb - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - .../platform/stack_locator_pthread_getattr_np.cpp | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/src/mongo/platform/stack_locator_pthread_getattr_np.cpp b/src/mongo/platform/stack_locator_pthread_getattr_np.cpp -index 648d26a41c..6e398f00c9 100644 ---- a/src/mongo/platform/stack_locator_pthread_getattr_np.cpp -+++ b/src/mongo/platform/stack_locator_pthread_getattr_np.cpp -@@ -35,6 +35,16 @@ - #include "mongo/util/assert_util.h" - #include "mongo/util/scopeguard.h" - -+__attribute__((constructor)) -+static void set_default_stack_size(void) -+{ -+ pthread_attr_t attr; -+ invariant(pthread_attr_init(&attr) == 0); -+ invariant(pthread_attr_setstacksize(&attr, 256*1024) == 0); -+ pthread_setattr_default_np(&attr); -+ invariant(pthread_attr_destroy(&attr) == 0); -+} -+ - namespace mongo { - - StackLocator::StackLocator() { --- -2.18.0 - diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch deleted file mode 100644 index a2e1f795b1..0000000000 --- a/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch +++ /dev/null @@ -1,23 +0,0 @@ -From a1c77702926eb8546ff96b00b5b994f7478dabae Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 2 Sep 2017 13:13:15 -0700 -Subject: [PATCH 4/4] wiredtiger: Disable strtouq on musl - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/third_party/wiredtiger/build_linux/wiredtiger_config.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: git/src/third_party/wiredtiger/build_linux/wiredtiger_config.h -=================================================================== ---- git.orig/src/third_party/wiredtiger/build_linux/wiredtiger_config.h -+++ git/src/third_party/wiredtiger/build_linux/wiredtiger_config.h -@@ -104,7 +104,7 @@ - #define HAVE_STRING_H 1 - - /* Define to 1 if you have the `strtouq' function. */ --#define HAVE_STRTOUQ 1 -+/* #undef HAVE_STRTOUQ 1 */ - - /* Define to 1 if you have the `sync_file_range' function. */ - /* #undef HAVE_SYNC_FILE_RANGE */ diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch b/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch deleted file mode 100644 index c06898758a..0000000000 --- a/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch +++ /dev/null @@ -1,43 +0,0 @@ -Add alises for arm64 which is same as aarch64 - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Pending - -Index: git/SConstruct -=================================================================== ---- git.orig/SConstruct -+++ git/SConstruct -@@ -1055,6 +1055,7 @@ elif endian == "big": - processor_macros = { - 'arm' : { 'endian': 'little', 'defines': ('__arm__',) }, - 'aarch64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')}, -+ 'arm64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')}, - 'i386' : { 'endian': 'little', 'defines': ('__i386', '_M_IX86')}, - 'ppc64le' : { 'endian': 'little', 'defines': ('__powerpc64__',)}, - 's390x' : { 'endian': 'big', 'defines': ('__s390x__',)}, -Index: git/src/third_party/IntelRDFPMathLib20U1/SConscript -=================================================================== ---- git.orig/src/third_party/IntelRDFPMathLib20U1/SConscript -+++ git/src/third_party/IntelRDFPMathLib20U1/SConscript -@@ -308,7 +308,7 @@ if processor == 'i386': - elif processor == 'arm': - cpp_defines['IA32'] = '1' - cpp_defines['ia32'] = '1' --elif processor == "aarch64": -+elif processor == "aarch64" or processor == 'arm64': - cpp_defines['efi2'] = '1' - cpp_defines['EFI2'] = '1' - # Using 64 bit little endian -Index: git/src/third_party/wiredtiger/SConscript -=================================================================== ---- git.orig/src/third_party/wiredtiger/SConscript -+++ git/src/third_party/wiredtiger/SConscript -@@ -151,7 +151,7 @@ condition_map = { - 'POSIX_HOST' : not env.TargetOSIs('windows'), - 'WINDOWS_HOST' : env.TargetOSIs('windows'), - -- 'ARM64_HOST' : env['TARGET_ARCH'] == 'aarch64', -+ 'ARM64_HOST' : env['TARGET_ARCH'] in ('aarch64', 'arm64'), - 'POWERPC_HOST' : env['TARGET_ARCH'] == 'ppc64le', - 'X86_HOST' : env['TARGET_ARCH'] == 'x86_64', - 'ZSERIES_HOST' : env['TARGET_ARCH'] == 's390x', diff --git a/meta-oe/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/recipes-dbs/mongodb/mongodb_git.bb deleted file mode 100644 index 53a9f66117..0000000000 --- a/meta-oe/recipes-dbs/mongodb/mongodb_git.bb +++ /dev/null @@ -1,73 +0,0 @@ -SUMMARY = "mongodb" -LICENSE = "SSPL-1 & Apache-2.0 & Zlib" -LIC_FILES_CHKSUM = "file://LICENSE-Community.txt;md5=3a865f27f11f43ecbe542d9ea387dcf1 \ - file://APACHE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" - -DEPENDS = "openssl libpcre libpcap zlib boost curl python \ - python-setuptools-native python-typing-native \ - python-pyyaml-native python-cheetah-native \ - " - -inherit scons dos2unix siteinfo pythonnative - -PV = "4.0.6+git${SRCPV}" -#v4.0.6 -SRCREV = "caa42a1f75a56c7643d0b68d3880444375ec42e3" -SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.0 \ - file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \ - file://0001-Use-long-long-instead-of-int64_t.patch \ - file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \ - file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \ - file://arm64-support.patch \ - file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \ - file://0001-Support-deprecated-resolver-functions.patch \ - file://0001-asio-Dont-use-experimental-with-clang.patch \ - " -SRC_URI_append_libc-musl ="\ - file://0002-Fix-default-stack-size-to-256K.patch \ - file://0004-wiredtiger-Disable-strtouq-on-musl.patch \ - " -S = "${WORKDIR}/git" - -COMPATIBLE_HOST ?= '(x86_64|i.86|powerpc64|arm|aarch64).*-linux' - -COMPATIBLE_HOST_arm = "null" -COMPATIBLE_HOST_libc-musl_x86 = "null" - -PACKAGECONFIG ??= "tcmalloc" -# gperftools compilation fails for arm below v7 because of missing support of -# dmb operation. So we use system-allocator instead of tcmalloc -PACKAGECONFIG_remove_armv6 = "tcmalloc" -PACKAGECONFIG_remove_libc-musl = "tcmalloc" - -PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools," - -EXTRA_OESCONS = "--prefix=${D}${prefix} \ - LIBPATH=${STAGING_LIBDIR} \ - LINKFLAGS='${LDFLAGS}' \ - CXXFLAGS='${CXXFLAGS}' \ - TARGET_ARCH=${TARGET_ARCH} \ - --ssl \ - --disable-warnings-as-errors \ - --use-system-pcre \ - --use-system-zlib \ - --js-engine=none \ - --nostrip \ - --endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \ - --wiredtiger=${@['off','on'][d.getVar('SITEINFO_BITS') != '32']} \ - ${PACKAGECONFIG_CONFARGS} \ - mongod mongos" - -do_configure_prepend() { - # tests use hex floats, not supported in plain C++ - sed -e 's|-std=c++11|-std=gnu++11|g' -i ${S}/SConstruct -} -scons_do_compile() { - ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \ - die "scons build execution failed." -} - -scons_do_install() { - ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \ - die "scons install execution failed." -} diff --git a/meta-oe/recipes-dbs/mysql/mariadb-native_5.5.62.bb b/meta-oe/recipes-dbs/mysql/mariadb-native_10.11.4.bb index 4ce960d7da..578357b480 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb-native_5.5.62.bb +++ b/meta-oe/recipes-dbs/mysql/mariadb-native_10.11.4.bb @@ -2,9 +2,11 @@ require mariadb.inc inherit native PROVIDES += "mysql5-native" -DEPENDS = "ncurses-native zlib-native bison-native" +DEPENDS = "ncurses-native zlib-native bison-native libpcre2-native \ +gnutls-native fmt-native \ +" -RDEPENDS_${PN} = "" +RDEPENDS:${PN} = "" PACKAGES = "" EXTRA_OEMAKE = "" @@ -13,7 +15,9 @@ do_install() { install -d ${D}${bindir} install -m 0755 sql/gen_lex_hash ${D}${bindir}/ + install -m 0755 sql/gen_lex_token ${D}${bindir}/ install -m 0755 extra/comp_err ${D}${bindir}/ install -m 0755 scripts/comp_sql ${D}${bindir}/ + install -m 0755 strings/uca-dump ${D}${bindir}/ } diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc index 8ca5b2ba42..2fb0bd7be5 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc @@ -1,25 +1,31 @@ SUMMARY = "A robust, scalable, and reliable SQL server" HOMEPAGE = "http://mariadb.org" SECTION = "libs" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b1becf0cfa3366e0f4d854d1d264f311" -SRC_URI = "https://downloads.mariadb.org/f/${BP}/source/${BP}.tar.gz \ - file://fix-cmake-module-path.patch \ - file://remove-bad-path.patch \ - file://fix-mysqlclient-r-version.patch \ +SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \ file://my.cnf \ file://mysqld.service \ file://install_db.service \ file://install_db \ file://mysql-systemd-start \ file://configure.cmake-fix-valgrind.patch \ - file://fix-a-building-failure.patch \ - file://change-cc-to-cc-version.patch \ - file://0001-disable-ucontext-on-musl.patch \ + file://support-files-CMakeLists.txt-fix-do_populate_sysroot.patch \ + file://fix-arm-atomic.patch \ + file://0001-Fix-library-LZ4-lookup.patch \ + file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \ + file://0001-aio_linux-Check-if-syscall-exists-before-using-it.patch \ + file://ssize_t.patch \ + file://mm_malloc.patch \ + file://sys_futex.patch \ + file://cross-compiling.patch \ + file://0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch \ + file://lfs64.patch \ + file://0001-Add-missing-includes-cstdint-and-cstdio.patch \ " -SRC_URI[md5sum] = "6375d577e9539b839f44d857e70f82b9" -SRC_URI[sha256sum] = "56a365af71b8a9ec8bfee0801e2dec95011da8ee7507986ca329be11296411db" +SRC_URI:append:libc-musl = " file://ppc-remove-glibc-dep.patch" +SRC_URI[sha256sum] = "ce8dac125568cc5f40da74c17212767c92d8faed81066580b526a485a591127d" UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases" @@ -27,45 +33,56 @@ S = "${WORKDIR}/mariadb-${PV}" BINCONFIG_GLOB = "mysql_config" -inherit cmake gettext binconfig update-rc.d useradd systemd +inherit cmake gettext binconfig update-rc.d useradd systemd multilib_script pkgconfig + +MULTILIB_SCRIPTS = "${PN}-server:${bindir}/mariadbd-safe \ + ${PN}-setupdb:${bindir}/mariadb-install-db" INITSCRIPT_PACKAGES = "${PN}-server ${PN}-setupdb" -INITSCRIPT_NAME_${PN}-server = "mysqld" -INITSCRIPT_PARAMS_${PN}-server ?= "start 45 5 . stop 45 0 6 1 ." +INITSCRIPT_NAME:${PN}-server = "mysqld" +INITSCRIPT_PARAMS:${PN}-server ?= "start 45 5 . stop 45 0 6 1 ." -USERADD_PACKAGES = "${PN}-server" -USERADD_PARAM_${PN}-server = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql" -GROUPADD_PARAM_${PN}-server = "--system mysql" +USERADD_PACKAGES = "${PN}-setupdb" +USERADD_PARAM:${PN}-setupdb = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql" +GROUPADD_PARAM:${PN}-setupdb = "--system mysql" -INITSCRIPT_NAME_${PN}-setupdb = "install_db" -INITSCRIPT_PARAMS_${PN}-setupdb ?= "defaults 44 44" +INITSCRIPT_NAME:${PN}-setupdb = "install_db" +INITSCRIPT_PARAMS:${PN}-setupdb ?= "defaults 44 44" SYSTEMD_PACKAGES = "${PN}-server ${PN}-setupdb" -SYSTEMD_SERVICE_${PN}-server = "mysqld.service" -SYSTEMD_AUTO_ENABLE_${PN}-server ?= "disable" - -SYSTEMD_SERVICE_${PN}-setupdb = "install_db.service" -SYSTEMD_AUTO_ENABLE_${PN}-setupdb ?= "enable" -ALLOW_EMPTY_${PN}-setupdb ?= "1" -FILES_${PN}-setupdb = "${sysconfdir}/init.d/install_db" - +SYSTEMD_SERVICE:${PN}-server = "mysqld.service" +SYSTEMD_AUTO_ENABLE:${PN}-server ?= "disable" + +SYSTEMD_SERVICE:${PN}-setupdb = "install_db.service" +SYSTEMD_AUTO_ENABLE:${PN}-setupdb ?= "enable" +ALLOW_EMPTY:${PN}-setupdb ?= "1" +FILES:${PN}-setupdb = "${sysconfdir}/init.d/install_db \ + ${bindir}/mariadb-install-db \ + ${bindir}/my_print_defaults \ + ${bindir}/mysql_install_db \ + ${bindir}/mysql-systemd-start \ + " + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} lz4 openssl" EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'" -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} setupdb" -PACKAGECONFIG_class-native = "" +PACKAGECONFIG:class-native = "" PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam" PACKAGECONFIG[valgrind] = "-DWITH_VALGRIND=TRUE,-DWITH_VALGRIND=FALSE,valgrind" -PACKAGECONFIG[libedit] = "-DLIBEDIT_INTERFACE=TRUE,-DLIBEDIT_INTERFACE=FALSE,libedit" PACKAGECONFIG[krb5] = ", ,krb5" -PACKAGECONFIG[setupdb] = ", ,,${PN}-setupdb" +PACKAGECONFIG[lz4] = ", ,lz4" +PACKAGECONFIG[openssl] = "-DWITH_SSL='system',-DWITH_SSL='bundled',openssl" # MariaDB doesn't link properly with gold # https://mariadb.atlassian.net/browse/MDEV-5982 TARGET_CFLAGS += "-fuse-ld=bfd" +LDFLAGS += " -pthread" BUILD_CFLAGS += "-fuse-ld=bfd" BUILD_CXXFLAGS += "-fuse-ld=bfd" +LDFLAGS:x86:toolchain-clang = "-latomic" + EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ -DWITH_JEMALLOC=no \ -DWITHOUT_TOKUDB=TRUE \ @@ -74,6 +91,7 @@ EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ -DNROFF=FALSE \ -DENABLE_DTRACE=FALSE \ -DWITH_PIC=ON \ + -DWITH_PCRE=system \ -DINSTALL_LAYOUT=RPM \ -DINSTALL_DOCDIR:PATH=${datadir}/doc/${BPN} \ -DINSTALL_LIBDIR:PATH=${baselib} \ @@ -81,16 +99,23 @@ EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \ -DMYSQL_DATADIR:PATH=/var/mysql \ -DCAT_EXECUTABLE=`which cat` \ + -DSTACK_DIRECTION=1 \ -DCMAKE_AR:FILEPATH=${AR}" + # With Ninja it fails with: # make: *** No rule to make target `install'. Stop. OECMAKE_GENERATOR = "Unix Makefiles" -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" + +do_compile:prepend:class-target () { + # remove the buildpath + sed -i -e "s:CMAKE_SYSROOT:CMAKE_SYSROOT_PLACE_HOLDER:g" ${S}/libmariadb/mariadb_config/mariadb_config.c.in +} -do_configure_append() { +do_configure:append() { # handle distros with different values of ${libexecdir} libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'` sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysql_install_db.sh @@ -98,19 +123,19 @@ do_configure_append() { sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh } -do_generate_toolchain_file_append_class-native () { +do_generate_toolchain_file:append:class-native () { # If these are set cmake will assume we're cross-compiling, which will # result in certain things we want being disabled sed -i "/set( CMAKE_SYSTEM_NAME/d" ${WORKDIR}/toolchain.cmake sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake } -do_compile_prepend_class-target () { + +do_compile:prepend:class-target () { # These need to be in-tree or make will think they need to be built, # and since we're cross-compiling that is disabled cp ${STAGING_BINDIR_NATIVE}/comp_err ${S}/extra cp ${STAGING_BINDIR_NATIVE}/comp_sql ${S}/scripts - if [ "${@bb.utils.contains('PACKAGECONFIG', 'krb5', 'yes', 'no', d)}" = "no" ]; then if ! [ -e ${B}/include/openssl/kssl.h ] ; then mkdir -p ${B}/include/openssl @@ -120,6 +145,7 @@ do_compile_prepend_class-target () { echo "#endif" >>${B}/include/openssl/kssl.h fi fi + install -D ${RECIPE_SYSROOT_NATIVE}/usr/bin/uca-dump ${B}/strings/uca-dump } SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess" @@ -148,150 +174,186 @@ do_install() { sed -i -e 's,@BINDIR@,${bindir},g' -e 's,@PREFIX@,${prefix},g' ${D}${systemd_unitdir}/system/mysqld.service \ ${D}${systemd_unitdir}/system/install_db.service - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d - echo "f /var/log/mysqld.err 0640 mysql mysql -" \ - > ${D}${sysconfdir}/tmpfiles.d/99-mysqld.conf - fi install -d ${D}${bindir} install -m 755 ${WORKDIR}/mysql-systemd-start ${D}${bindir} install -d ${D}${datadir}/doc/${PN} if [ -f ${D}${datadir}/doc/README ]; then mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/ fi + + # mini-benchmark used for Gitlab-CI to run on every commit to catch + # if there are severe performance regressions. + # remove it to avoid introducing bash dependency + if [ -f ${D}${datadir}/mysql/mini-benchmark ]; then + rm -rf ${D}${datadir}/mysql/mini-benchmark + fi + if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then + pam_so=$(find ${D} -name pam_user_map.so) + if [ x"${pam_so}" != x ]; then + pam_dir=$(dirname ${pam_so}) + mv ${pam_dir} ${D}/${libdir} + rmdir --ignore-fail-on-non-empty ${pam_dir%security} + fi + fi } -PACKAGES = "${PN}-dbg ${PN} \ +PACKAGES = "${PN}-dbg ${PN}-setupdb ${PN} \ libmysqlclient-r libmysqlclient-r-dev libmysqlclient-r-staticdev \ libmysqlclient libmysqlclient-dev libmysqlclient-staticdev \ - libmysqld libmysqld-dev ${PN}-client ${PN}-server ${PN}-setupdb ${PN}-leftovers" -CONFFILES_${PN}-server += "${sysconfdir}/my.cnf ${sysconfdir}/my.cnf.d/server.cnf" -CONFFILES_${PN}-client += "${sysconfdir}/my.cnf.d/mysql-clients.cnf" -CONFFILES_libmysqlclient += "${sysconfdir}/my.cnf.d/client.cnf" + libmysqld libmysqld-dev ${PN}-client ${PN}-server ${PN}-leftovers" +CONFFILES:${PN}-server += "${sysconfdir}/my.cnf ${sysconfdir}/my.cnf.d/server.cnf" +CONFFILES:${PN}-client += "${sysconfdir}/my.cnf.d/mysql-clients.cnf" +CONFFILES:libmysqlclient += "${sysconfdir}/my.cnf.d/client.cnf" -RPROVIDES_${PN}-dbg += "libmysqlclient-r-dbg libmysqlclient-dbg" +RPROVIDES:${PN}-dbg += "libmysqlclient-r-dbg libmysqlclient-dbg" -FILES_${PN} = " " -RDEPENDS_${PN} = "${PN}-client ${PN}-server" -ALLOW_EMPTY_${PN} = "1" +FILES:${PN} = " " +RDEPENDS:${PN} = "${PN}-client ${PN}-server" +ALLOW_EMPTY:${PN} = "1" -RDEPENDS_${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \ +RDEPENDS:${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \ perl-module-fcntl perl-module-sys-hostname perl-module-ipc-open3 \ perl-module-exporter" -RDEPENDS_${PN}-server = "perl perl-module-getopt-long perl-module-data-dumper \ +RDEPENDS:${PN}-server = "perl perl-module-getopt-long perl-module-data-dumper \ perl-module-file-basename perl-module-file-path perl-module-sys-hostname \ perl-module-file-copy perl-module-file-temp perl-module-posix \ - ${PN}-client libdbi-perl libdbd-mysql-perl" -RDEPENDS_${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-module-getopt-long \ + ${PN}-client ${PN}-setupdb libdbi-perl libdbd-mysql-perl lzo" +RDEPENDS:${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-module-getopt-long \ perl-module-posix perl-module-data-dumper perl-module-sigtrap perl-module-threads \ perl-module-threads-shared perl-module-io-socket perl-module-sys-hostname perl-module-file-copy \ perl-module-file-spec perl-module-file-find perl-module-file-basename perl-module-file-path \ perl-module-constant perl-module-lib perl-module-file-temp perl-module-file-spec-functions \ - perl-module-io-socket-inet perl-module-io-select" -RDEPENDS_${PN}-setupdb = "coreutils" + perl-module-io-socket-inet perl-module-io-select bash" +RDEPENDS:${PN}-setupdb = "coreutils" # Allow old code to link to the backward compatible library -RDEPENDS_libmysqlclient-dev = "libmysqlclient-r-dev" +RDEPENDS:libmysqlclient-dev = "libmysqlclient-r-dev" + +PACKAGE_PREPROCESS_FUNCS += "src_package_preprocess" +src_package_preprocess () { + # Trim build paths from comments in generated sources to ensure reproducibility + sed -i -e "s,${S}/sql/,,g" \ + -e "s,${B}/sql/,,g" \ + ${B}/sql/yy_oracle.hh \ + ${B}/sql/yy_mariadb.cc \ + ${B}/sql/yy_mariadb.hh \ + ${B}/sql/yy_oracle.cc +} -FILES_libmysqlclient = "\ +FILES:libmysqlclient = "\ ${libdir}/libmysqlclient.so.* \ + ${libdir}/libmariadb.so.* \ ${sysconfdir}/my.cnf.d/client.cnf" -FILES_libmysqlclient-dev = " \ +FILES:libmysqlclient-dev = " \ ${includedir}/mysql/ \ ${libdir}/libmysqlclient.so \ + ${libdir}/libmariadb.so \ ${sysconfdir}/aclocal \ ${bindir}/mysql_config" -FILES_libmysqlclient-staticdev = "\ +FILES:libmysqlclient-staticdev = "\ ${libdir}/*.a" # Avoid warnings about ha_xtradb.so.0.0.0 and ha_innodb_plugin.so.0.0.0 # which are intentionally non-PIC on 32-bit x86 (see e.g. # storage/xtradb/plug.in in the source) -INSANE_SKIP_libmysqlclient_append_x86 = " textrel" +INSANE_SKIP:libmysqlclient:append:x86 = " textrel" -FILES_libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*" -FILES_libmysqlclient-r-dev = "\ +FILES:libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*" +FILES:libmysqlclient-r-dev = "\ ${libdir}/libmysqlclient_r.so" -FILES_libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a" +FILES:libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a" -FILES_libmysqld = "\ - ${libdir}/libmysqld.so.*" -FILES_libmysqld-dev = "\ - ${libdir}/libmysqld.so" +FILES:libmysqld = "\ + ${libdir}/libmysqld.so.* \ + ${libdir}/libmariadbd.so.*" +FILES:libmysqld-dev = "\ + ${libdir}/libmysqld.so \ + ${libdir}/libmariadbd.so" -FILES_${PN}-client = "\ +FILES:${PN}-client = "\ ${bindir}/myisam_ftdump \ ${bindir}/mysql \ + ${bindir}/mariadb \ ${bindir}/mysql_client_test \ + ${bindir}/mariadb-client-test \ ${bindir}/mysql_client_test_embedded \ + ${bindir}/mariadb-client-test-embedded \ ${bindir}/mysql_find_rows \ + ${bindir}/mariadb-find-rows \ ${bindir}/mysql_fix_extensions \ + ${bindir}/mariadb-fix-extensions \ ${bindir}/mysql_waitpid \ + ${bindir}/mariadb-waitpid \ ${bindir}/mysqlaccess \ + ${bindir}/mariadb-access \ ${bindir}/mysqladmin \ - ${bindir}/mysqlbug \ + ${bindir}/mariadb-admin \ ${bindir}/mysqlcheck \ + ${bindir}/mariadb-check \ ${bindir}/mysqldump \ + ${bindir}/mariadb-dump \ ${bindir}/mysqldumpslow \ + ${bindir}/mariadb-dumpslow \ ${bindir}/mysqlimport \ + ${bindir}/mariadb-import \ ${bindir}/mysqlshow \ + ${bindir}/mariadb-show \ ${bindir}/mysqlslap \ + ${bindir}/mariadb-slap \ ${bindir}/mysqltest_embedded \ + ${bindir}/mariadb-test-embedded \ ${libexecdir}/mysqlmanager \ ${sysconfdir}/my.cnf.d/mysql-clients.cnf" -FILES_${PN}-server = "\ - ${bindir}/comp_err \ - ${bindir}/isamchk \ - ${bindir}/isamlog \ +FILES:${PN}-server = "\ ${bindir}/msql2mysql \ ${bindir}/my_print_defaults \ ${bindir}/myisamchk \ ${bindir}/myisamlog \ ${bindir}/myisampack \ ${bindir}/mysql_convert_table_format \ - ${bindir}/mysql_fix_privilege_tables \ + ${bindir}/mariadb-convert-table-format \ ${bindir}/mysql_install_db \ ${bindir}/mysql_secure_installation \ + ${bindir}/mariadb-secure-installation \ ${bindir}/mysql_setpermission \ + ${bindir}/mariadb-setpermission \ ${bindir}/mysql-systemd-start \ ${bindir}/mysql_tzinfo_to_sql \ + ${bindir}/mariadb-tzinfo-to-sql \ ${bindir}/mysql_upgrade \ + ${bindir}/mariadb-upgrade \ ${bindir}/mysql_plugin \ - ${bindir}/mysql_zap \ + ${bindir}/mariadb-plugin \ ${bindir}/mysqlbinlog \ + ${bindir}/mariadb-binlog \ ${bindir}/mysqld_multi \ + ${bindir}/mariadbd-multi \ + ${bindir}/mariadbd-safe \ ${bindir}/mysqld_safe \ ${bindir}/mysqld_safe_helper \ + ${bindir}/mariadbd-safe-helper \ ${bindir}/mysqlhotcopy \ + ${bindir}/mariadb-hotcopy \ ${bindir}/mysqltest \ - ${bindir}/ndb_delete_all \ - ${bindir}/ndb_desc \ - ${bindir}/ndb_drop_index \ - ${bindir}/ndb_drop_table \ - ${bindir}/ndb_mgm \ - ${bindir}/ndb_restore \ - ${bindir}/ndb_select_all \ - ${bindir}/ndb_select_count \ - ${bindir}/ndb_show_tables \ - ${bindir}/ndb_waiter \ - ${bindir}/pack_isam \ + ${bindir}/mariadb-test \ ${bindir}/perror \ ${bindir}/replace \ ${bindir}/resolve_stack_dump \ ${bindir}/resolveip \ ${libexecdir}/mysqld \ ${sbindir}/mysqld \ - ${sbindir}/ndb_cpcd \ - ${sbindir}/ndbd \ - ${sbindir}/ndb_mgmd \ + ${sbindir}/mariadbd \ ${libdir}/plugin/*.so \ + ${libdir}/security/*.so \ + ${libdir}/plugin/auth_pam_tool_dir/auth_pam_tool \ ${datadir}/mysql/ \ ${localstatedir}/mysql/ \ ${sysconfdir}/init.d/mysqld \ ${sysconfdir}/my.cnf \ ${sysconfdir}/my.cnf.d/server.cnf \ + ${sysconfdir}/security/user_map.conf \ ${sysconfdir}/tmpfiles.d" -DESCRIPTION_${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}" -FILES_${PN}-leftovers = "/" +DESCRIPTION:${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}" +FILES:${PN}-leftovers = "/" diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch new file mode 100644 index 0000000000..12fbd75976 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch @@ -0,0 +1,70 @@ +From 68100b1f2243304289b9a9a35e8fb0e1bb0cf70f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 24 Jan 2023 21:40:43 -0800 +Subject: [PATCH] Add missing includes <cstdint> and <cstdio> + +This is needed with GCC 13 and newer [1] + +[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + .../rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h | 1 + + storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h | 1 + + .../rocksdb/rocksdb/table/block_based/data_block_hash_index.h | 1 + + storage/rocksdb/rocksdb/util/slice.cc | 1 + + 4 files changed, 4 insertions(+) + +diff --git a/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h b/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h +index 963c1d8e..73487edd 100644 +--- a/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h ++++ b/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h +@@ -5,6 +5,7 @@ + + #pragma once + ++#include <cstdint> + #include "rocksdb/rocksdb_namespace.h" + + struct CompactionIterationStats { +diff --git a/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h b/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h +index c7f93b4c..3c2ab805 100644 +--- a/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h ++++ b/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h +@@ -8,6 +8,7 @@ + #pragma once + #ifndef ROCKSDB_LITE + ++#include <cstdint> + #include <string> + #include <vector> + #include "rocksdb/status.h" +diff --git a/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h b/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h +index f356395f..32152217 100644 +--- a/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h ++++ b/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h +@@ -5,6 +5,7 @@ + + #pragma once + ++#include <cstdint> + #include <string> + #include <vector> + +diff --git a/storage/rocksdb/rocksdb/util/slice.cc b/storage/rocksdb/rocksdb/util/slice.cc +index 6db11cc9..c26b6a21 100644 +--- a/storage/rocksdb/rocksdb/util/slice.cc ++++ b/storage/rocksdb/rocksdb/util/slice.cc +@@ -8,6 +8,7 @@ + // found in the LICENSE file. See the AUTHORS file for names of contributors. + + #include <algorithm> ++#include <cstdint> + #include "rocksdb/slice_transform.h" + #include "rocksdb/slice.h" + #include "util/string_util.h" +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch new file mode 100644 index 0000000000..d8671b76b0 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch @@ -0,0 +1,33 @@ +From f15fbdf1244ca9ce01c5507660a86d685ed88bcf Mon Sep 17 00:00:00 2001 +From: Sumit Garg <sumit.garg@linaro.org> +Date: Mon, 21 Mar 2022 15:08:40 +0800 +Subject: [PATCH] Fix library LZ4 lookup. + +Signed-off-by: Sumit Garg <sumit.garg@linaro.org> +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- +Upstream-Status: Pending + + cmake/FindLZ4.cmake | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake +index eebd859..094241c 100644 +--- a/cmake/FindLZ4.cmake ++++ b/cmake/FindLZ4.cmake +@@ -1,5 +1,10 @@ +-find_path(LZ4_INCLUDE_DIRS NAMES lz4.h) +-find_library(LZ4_LIBRARIES NAMES lz4) ++find_path(LZ4_INCLUDE_DIR ++ NAMES lz4.h ++ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) ++ ++find_library(LZ4_LIBRARIES ++ NAMES lz4 ++ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + + if(LZ4_INCLUDE_DIRS AND EXISTS "${LZ4_INCLUDE_DIRS}/lz4.h") + file(STRINGS "${LZ4_INCLUDE_DIRS}/lz4.h" LZ4_H REGEX "^#define LZ4_VERSION_[MR]") +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-aio_linux-Check-if-syscall-exists-before-using-it.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-aio_linux-Check-if-syscall-exists-before-using-it.patch new file mode 100644 index 0000000000..aba9b9d966 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-aio_linux-Check-if-syscall-exists-before-using-it.patch @@ -0,0 +1,45 @@ +From 0a3222338efc108c831fbdd719a47d35f4b0adcd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 18 Aug 2021 06:49:25 +0000 +Subject: [PATCH] aio_linux: Check if syscall exists before using it + +Return -ENOSYS if not implememented, fixes build on arches like RISCV32 +Fixes +tpool/aio_linux.cc:63:20: error: '__NR_io_getevents' was not declared in this scope; did you mean 'io_getevents'? + 63 | int ret= syscall(__NR_io_getevents, reinterpret_cast<long>(ctx), + | ^~~~~~~~~~~~~~~~~ + | io_getevents + +Upstream-Staus: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + tpool/aio_linux.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tpool/aio_linux.cc b/tpool/aio_linux.cc +index 4abc213..da75411 100644 +--- a/tpool/aio_linux.cc ++++ b/tpool/aio_linux.cc +@@ -58,6 +58,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/ + */ + static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev) + { ++#ifdef __NR_io_getevents + int saved_errno= errno; + int ret= syscall(__NR_io_getevents, reinterpret_cast<long>(ctx), + min_nr, nr, ev, 0); +@@ -67,6 +68,9 @@ static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev) + errno= saved_errno; + } + return ret; ++#else ++ return -ENOSYS; ++#endif + } + + +-- +2.29.2 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch deleted file mode 100644 index 60e9199f95..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 5bc3e7ef9700d12054e0125a126f1bb093f01ef9 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 26 Mar 2017 14:30:33 -0700 -Subject: [PATCH] disable ucontext on musl - -musl does not have *contex() APIs even though it has ucontext.h header - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - include/my_context.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/my_context.h b/include/my_context.h -index dd44103..9b28c17 100644 ---- a/include/my_context.h -+++ b/include/my_context.h -@@ -31,7 +31,7 @@ - #define MY_CONTEXT_USE_X86_64_GCC_ASM - #elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__) - #define MY_CONTEXT_USE_I386_GCC_ASM --#elif defined(HAVE_UCONTEXT_H) -+#elif defined(__GLIBC__) && defined(HAVE_UCONTEXT_H) - #define MY_CONTEXT_USE_UCONTEXT - #else - #define MY_CONTEXT_DISABLE --- -2.12.1 - diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch new file mode 100644 index 0000000000..0a2eed44f4 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch @@ -0,0 +1,37 @@ +From d611f78198dee64bb6a05933d200b544e2510b76 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 14 Nov 2020 14:37:13 -0800 +Subject: [PATCH] innobase: Define __NR_futex if it does not exist + +__NR_futex is not defines by newer architectures e.g. arc, riscv32 as +they only have 64bit variant of time_t. Glibc defines SYS_futex interface based +on +__NR_futex, since this is used in applications, such applications start +to fail to build for these newer architectures. This patch defines a +fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps +working + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + storage/innobase/log/log0sync.cc | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/storage/innobase/log/log0sync.cc b/storage/innobase/log/log0sync.cc +index 7799e605..4fab8f74 100644 +--- a/storage/innobase/log/log0sync.cc ++++ b/storage/innobase/log/log0sync.cc +@@ -66,6 +66,9 @@ Note that if write operation is very fast, a) or b) can be fine as alternative. + #ifdef __linux__ + #include <linux/futex.h> + #include <sys/syscall.h> ++#if !defined(SYS_futex) && defined(SYS_futex_time64) ++# define SYS_futex SYS_futex_time64 ++#endif + #endif + + #include <atomic> +-- +2.29.2 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch new file mode 100644 index 0000000000..456a2bad64 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch @@ -0,0 +1,69 @@ +From f92f657973997df30afdb0032c88ad3a14ead46b Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Fri, 23 Sep 2022 15:48:21 +0800 +Subject: [PATCH] sql/CMakeLists.txt: fix gen_lex_hash not found + +Fix the below do_compile issue in cross-compiling env. +| make[2]: *** No rule to make target '/build/tmp/work/aarch64-poky-linux/mariadb/10.3.13-r0/mariadb-10.3.13/sql/gen_lex_hash', needed by 'sql/lex_hash.h'. Stop. +| make[2]: *** No rule to make target '/build/tmp/work/aarch64-poky-linux/mariadb/10.3.13-r0/mariadb-10.3.13/sql/gen_lex_token', needed by 'sql/lex_token.h'. Stop. + +Upstream-Status: Inappropriate [oe build specific] + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + sql/CMakeLists.txt | 30 ++++++++++++++++++++++-------- + 1 file changed, 22 insertions(+), 8 deletions(-) + +diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt +index 241b482..27a3991 100644 +--- a/sql/CMakeLists.txt ++++ b/sql/CMakeLists.txt +@@ -60,11 +60,18 @@ ${CMAKE_BINARY_DIR}/sql + ${CMAKE_SOURCE_DIR}/tpool + ) + +-ADD_CUSTOM_COMMAND( +- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h +- COMMAND gen_lex_token > lex_token.h +- DEPENDS gen_lex_token ++IF(NOT CMAKE_CROSSCOMPILING) ++ ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h ++ COMMAND gen_lex_token > lex_token.h ++ DEPENDS gen_lex_token ++) ++ELSE() ++ ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h ++ COMMAND gen_lex_token > lex_token.h + ) ++ENDIF() + + FIND_PACKAGE(BISON 2.4) + +@@ -372,11 +379,18 @@ IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR) + ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc) + ENDIF() + +-ADD_CUSTOM_COMMAND( +- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h +- COMMAND gen_lex_hash > lex_hash.h +- DEPENDS gen_lex_hash ++IF(NOT CMAKE_CROSSCOMPILING) ++ ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h ++ COMMAND gen_lex_hash > lex_hash.h ++ DEPENDS gen_lex_hash ++) ++ELSE() ++ ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h ++ COMMAND gen_lex_hash > lex_hash.h + ) ++ENDIF() + + MYSQL_ADD_EXECUTABLE(mariadb-tzinfo-to-sql tztime.cc) + SET_TARGET_PROPERTIES(mariadb-tzinfo-to-sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL") +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch b/meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch deleted file mode 100644 index 02bda24f7b..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch +++ /dev/null @@ -1,26 +0,0 @@ -mariadb: replace the CC with CC_VERSION and CXX with CXX_VERSION - -mysqlbug.sh is a bug report script. It makes a report with the build information, -including gcc version. The CC is the local path of gcc, which is useless for bug -report, and the path may expose private information, so change it to CC_VERSION. - -Upstream-Status: Pending - -Signed-off-by: Yue Tao <Yue.Tao@windriver.com> -Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> -================================ -diff --git a/scripts/mysqlbug.sh.old b/scripts/mysqlbug.sh -index e9df210..d4b8d53 100644 ---- a/scripts/mysqlbug.sh.old -+++ b/scripts/mysqlbug.sh -@@ -24,8 +24,8 @@ VERSION="@VERSION@@MYSQL_SERVER_SUFFIX@" - COMPILATION_COMMENT="@COMPILATION_COMMENT@" - BUGmysql="maria-developers@lists.launchpad.net" - # This is set by configure --COMP_CALL_INFO="CC='@SAVE_CC@' CFLAGS='@SAVE_CFLAGS@' CXX='@SAVE_CXX@' CXXFLAGS='@SAVE_CXXFLAGS@' LDFLAGS='@SAVE_LDFLAGS@' ASFLAGS='@SAVE_ASFLAGS@'" --COMP_RUN_INFO="CC='@CC@' CFLAGS='@CFLAGS@' CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'" -+COMP_CALL_INFO="CC='@CC_VERSION@' CFLAGS='@SAVE_CFLAGS@' CXX='@CXX_VERSION@' CXXFLAGS='@SAVE_CXXFLAGS@' LDFLAGS='@SAVE_LDFLAGS@' ASFLAGS='@SAVE_ASFLAGS@'" -+COMP_RUN_INFO="CC='@CC_VERSION@' CFLAGS='@CFLAGS@' CXX='@CXX_VERSION@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'" - CONFIGURE_LINE="@CONF_COMMAND@" - - LIBC_INFO="" diff --git a/meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch b/meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch index e97def6021..ac94279585 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch +++ b/meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch @@ -1,6 +1,6 @@ -From 5effba0d7d47071a3f1bca56823190d5a95bb1a6 Mon Sep 17 00:00:00 2001 +From 24e2b0edc2612acefcc48414bb6f0aeb086061a9 Mon Sep 17 00:00:00 2001 From: Jackie Huang <jackie.huang@windriver.com> -Date: Wed, 12 Nov 2014 03:09:10 -0500 +Date: Tue, 26 Feb 2019 23:57:06 -0800 Subject: [PATCH] configure.cmake: fix valgrind Check valgrind headers only if WITH_VALGRIND is set. @@ -15,27 +15,26 @@ PACKAGECONFIG to decide if valgrind is needed or not. Upstream-Status: Inappropriate [oe specific] Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> + --- - configure.cmake | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + configure.cmake | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/configure.cmake b/configure.cmake -index 0bd7bbe..51a098f 100644 +index 3cfc4b31..d017b3b3 100644 --- a/configure.cmake +++ b/configure.cmake -@@ -1047,10 +1047,10 @@ MARK_AS_ADVANCED(WITH_ATOMIC_LOCKS MY_ATOMIC_MODE_RWLOCK MY_ATOMIC_MODE_DUMMY) +@@ -930,10 +930,9 @@ HAVE_GCC_C11_ATOMICS) IF(WITH_VALGRIND) SET(HAVE_valgrind 1) -+ CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h" -+ HAVE_VALGRIND) - ENDIF() - +-ENDIF() +- -CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h" -- HAVE_VALGRIND) ++ CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h" + HAVE_VALGRIND_MEMCHECK_H) ++ENDIF() #-------------------------------------------------------------------- # Check for IPv6 support --- -2.0.0 - diff --git a/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch b/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch new file mode 100644 index 0000000000..d0d6e3c730 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch @@ -0,0 +1,34 @@ +From 80be37351d995654f86b838f6b5ed47e8a90261b Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Fri, 23 Sep 2022 12:05:17 +0800 +Subject: [PATCH] CMakeLists.txt: not include import_executables.cmake + +building failed since native does not generate import_executables.cmake +In fact, our building system will export the needed commands. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + CMakeLists.txt | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f9e2b1b..34924ba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -394,11 +394,6 @@ CHECK_LIBFMT() + ADD_SUBDIRECTORY(tpool) + CHECK_SYSTEMD() + +-IF(CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR) +- SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build") +- INCLUDE(${IMPORT_EXECUTABLES}) +-ENDIF() +- + # + # Setup maintainer mode options. Platform checks are + # not run with the warning options as to not perturb fragile checks +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch b/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch deleted file mode 100644 index 0c4e10237c..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch +++ /dev/null @@ -1,31 +0,0 @@ -[PATCH] fix a building failure - -Upstream-Status: Inappropriate [configuration] - -building failed since native does not generate import_executables.cmake -In fact, our building system will export the needed commands - -Signed-off-by: Roy Li <rongqing.li@windriver.com> ---- - CMakeLists.txt | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c1ce1c5..83b3a7e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -350,11 +350,6 @@ MYSQL_CHECK_READLINE() - - CHECK_JEMALLOC() - --IF(CMAKE_CROSSCOMPILING) -- SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build") -- INCLUDE(${IMPORT_EXECUTABLES}) --ENDIF() -- - # - # Setup maintainer mode options by the end. Platform checks are - # not run with the warning options as to not perturb fragile checks --- -1.9.1 - diff --git a/meta-oe/recipes-dbs/mysql/mariadb/fix-arm-atomic.patch b/meta-oe/recipes-dbs/mysql/mariadb/fix-arm-atomic.patch new file mode 100644 index 0000000000..05b0cf8ff7 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/fix-arm-atomic.patch @@ -0,0 +1,34 @@ +From f447aca534d1a12809eeb146e8220d305cc3884d Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Thu, 9 Apr 2020 14:07:19 +0800 +Subject: [PATCH] build_rocksdb.cmake: fix atomic support on arm + +Check to link with libatomic to enable C11 atomics support +to fix below build error on arm: +| /build/tmp/work/armv5e-wrs-linux-gnueabi/mariadb/10.3.13-r0/recipe-sysroot-native/usr/bin/arm-wrs-linux-gnueabi/../../libexec/arm-wrs-linux-gnueabi/gcc/arm-wrs-linux-gnueabi/8.3.0/ld.bfd: librocksdblib.a(env_posix.cc.o): in function `std::__atomic_base<unsigned long long>::store(unsigned long long, std::memory_order)': +| /usr/include/c++/8.3.0/bits/atomic_base.h:374: undefined reference to `__atomic_store_8' + +Upstream-Status: Pending + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + storage/rocksdb/build_rocksdb.cmake | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake +index d7895b0..3bcd52a 100644 +--- a/storage/rocksdb/build_rocksdb.cmake ++++ b/storage/rocksdb/build_rocksdb.cmake +@@ -470,6 +470,9 @@ list(APPEND SOURCES ${CMAKE_CURRENT_BINARY_DIR}/build_version.cc) + + ADD_CONVENIENCE_LIBRARY(rocksdblib ${SOURCES}) + target_link_libraries(rocksdblib ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) ++IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) ++ TARGET_LINK_LIBRARIES(rocksdblib atomic) ++ENDIF() + IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set_target_properties(rocksdblib PROPERTIES COMPILE_FLAGS "-fPIC -fno-builtin-memcmp -Wno-error") + endif() +-- +2.7.4 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch b/meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch deleted file mode 100644 index 8d9f558d05..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch +++ /dev/null @@ -1,29 +0,0 @@ -Avoid CMAKE_MODULE_PATH being overwritten - -OE-Core's setting of CMAKE_MODULE_PATH stomps on MariaDB's value unless -we set it after setting the project name. - -Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> - -Upstream-Status: Inappropriate [working around OE-Core bug] - ---- mariadb/CMakeLists.txt 2014-07-17 11:01:07.676353047 +0100 -+++ mariadb/CMakeLists.txt 2014-07-17 11:01:31.299353107 +0100 -@@ -28,8 +28,6 @@ - - MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}") - --SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) -- - # Distinguish between community and non-community builds, with the - # default being a community build. This does not impact the feature - # set that will be compiled in; it's merely provided as a hint to -@@ -77,6 +75,8 @@ - ENDIF() - PROJECT(${MYSQL_PROJECT_NAME}) - -+SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) -+ - IF(BUILD_CONFIG) - INCLUDE( - ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake) diff --git a/meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch b/meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch deleted file mode 100644 index a519e42921..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch +++ /dev/null @@ -1,160 +0,0 @@ -From 6db2a606196fb38a6d106dc409eee1cb9a40a440 Mon Sep 17 00:00:00 2001 -From: Tor Didriksen <tor.didriksen@oracle.com> -Date: Mon, 24 Jun 2013 17:15:35 +0200 -Subject: [PATCH] Bug#16809055 MYSQL 5.6 AND 5.7 STILL USE LIBMYSQLCLIENT.SO.18 - -With this patch, the libmysql/ directory contains: -libmysqlclient.a -libmysqlclient_r.a -> libmysqlclient.a -libmysqlclient_r.so -> libmysqlclient.so* -libmysqlclient_r.so.18 -> libmysqlclient.so.18* -libmysqlclient_r.so.18.1.0 -> libmysqlclient.so.18.1.0* -libmysqlclient.so -> libmysqlclient.so.18* -libmysqlclient.so.18 -> libmysqlclient.so.18.1.0* -libmysqlclient.so.18.1.0* - -This fixes libmysqlclient_r symlinks pointing to the unversioned -libmysqlclient.so symlink (leading to package QA errors since the -libmysqlclient-r package ends up depending on libmysqlclient-dev). - -Borrowed from MySQL 5.6 tree at https://github.com/percona/mysql/ - -Upstream-Status: Pending - -Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> - ---- - cmake/install_macros.cmake | 25 +++++++++++++++---------- - libmysql/CMakeLists.txt | 34 +++++++++++++++++++++++++++------- - 2 files changed, 42 insertions(+), 17 deletions(-) - -diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake -index b8efdf8..a0d0e68 100644 ---- a/cmake/install_macros.cmake -+++ b/cmake/install_macros.cmake -@@ -1,4 +1,4 @@ --# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. -+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. - # - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by -@@ -167,28 +167,33 @@ ENDFUNCTION() - - - # Install symbolic link to CMake target. --# the link is created in the same directory as target --# and extension will be the same as for target file. --MACRO(INSTALL_SYMLINK linkname target destination component) -+# We do 'cd path; ln -s target_name link_name' -+# We also add an INSTALL target for "${path}/${link_name}" -+MACRO(INSTALL_SYMLINK target target_name link_name destination component) - IF(UNIX) - GET_TARGET_PROPERTY(location ${target} LOCATION) - GET_FILENAME_COMPONENT(path ${location} PATH) -- GET_FILENAME_COMPONENT(name ${location} NAME) -- SET(output ${path}/${linkname}) -+ MESSAGE(STATUS "target ${target}") -+ MESSAGE(STATUS "link_name ${link_name}") -+ MESSAGE(STATUS "target_name ${target_name}") -+ MESSAGE(STATUS "path ${path}") -+ MESSAGE(STATUS "") -+ -+ SET(output ${path}/${link_name}) - ADD_CUSTOM_COMMAND( - OUTPUT ${output} - COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output} - COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink -- ${name} -- ${linkname} -+ ${target_name} -+ ${link_name} - WORKING_DIRECTORY ${path} - DEPENDS ${target} - ) - -- ADD_CUSTOM_TARGET(symlink_${linkname} -+ ADD_CUSTOM_TARGET(symlink_${link_name} - ALL - DEPENDS ${output}) -- SET_TARGET_PROPERTIES(symlink_${linkname} PROPERTIES CLEAN_DIRECT_OUTPUT 1) -+ SET_TARGET_PROPERTIES(symlink_${link_name} PROPERTIES CLEAN_DIRECT_OUTPUT 1) - IF(CMAKE_GENERATOR MATCHES "Xcode") - # For Xcode, replace project config with install config - STRING(REPLACE "${CMAKE_CFG_INTDIR}" -diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt -index be5760f..96286ff 100644 ---- a/libmysql/CMakeLists.txt -+++ b/libmysql/CMakeLists.txt -@@ -433,6 +433,12 @@ IF(MSVC) - INSTALL_DEBUG_TARGET(clientlib DESTINATION ${INSTALL_LIBDIR}/debug) - ENDIF() - -+MACRO(GET_TARGET_NAME target out_name) -+ GET_TARGET_PROPERTY(location ${target} LOCATION) -+ GET_FILENAME_COMPONENT(name ${location} NAME) -+ SET(${out_name} ${name}) -+ENDMACRO() -+ - IF(UNIX) - MACRO(GET_VERSIONED_LIBNAME LIBNAME EXTENSION VERSION OUTNAME) - SET(DOT_VERSION ".${VERSION}") -@@ -445,7 +451,13 @@ IF(UNIX) - SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION}) - ENDIF() - ENDMACRO() -- INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} Development) -+ENDIF() -+ -+IF(UNIX) -+ GET_TARGET_NAME(mysqlclient lib_name) -+ INSTALL_SYMLINK(mysqlclient -+ ${lib_name} ${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a -+ ${INSTALL_LIBDIR} Development) - ENDIF() - - IF(NOT DISABLE_SHARED) -@@ -456,10 +468,9 @@ IF(NOT DISABLE_SHARED) - # libtool compatability - IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE) - SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}") -- ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP-UX") -- SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0") - ELSE() -- SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0") -+ SET(OS_SHARED_LIB_VERSION -+ "${SHARED_LIB_MAJOR_VERSION}.${SHARED_LIB_MINOR_VERSION}.0") - ENDIF() - # Name of shared library is mysqlclient on Unix - SET_TARGET_PROPERTIES(libmysql PROPERTIES -@@ -482,8 +493,13 @@ IF(NOT DISABLE_SHARED) - "${CMAKE_SHARED_LIBRARY_SUFFIX}" - "" - linkname) -- INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries) -- SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}") -+ GET_TARGET_NAME(libmysql lib_name) -+ GET_FILENAME_COMPONENT(lib_name_we ${lib_name} NAME_WE) -+ INSTALL_SYMLINK(libmysql -+ ${lib_name} ${linkname} -+ ${INSTALL_LIBDIR} SharedLibraries) -+ SET(OS_SHARED_LIB_SYMLINKS -+ "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}") - LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS) - FOREACH(ver ${OS_SHARED_LIB_SYMLINKS}) - GET_VERSIONED_LIBNAME( -@@ -491,7 +507,11 @@ IF(NOT DISABLE_SHARED) - "${CMAKE_SHARED_LIBRARY_SUFFIX}" - "${ver}" - linkname) -- INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries) -+ GET_VERSIONED_LIBNAME( -+ ${lib_name_we} "${CMAKE_SHARED_LIBRARY_SUFFIX}" "${ver}" lib_name_ver) -+ INSTALL_SYMLINK(libmysql -+ ${lib_name_ver} ${linkname} -+ ${INSTALL_LIBDIR} SharedLibraries) - ENDFOREACH() - ENDIF() - ENDIF() --- -2.0.3 - diff --git a/meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch b/meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch new file mode 100644 index 0000000000..7a685a6521 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch @@ -0,0 +1,21 @@ +Upstream-Status: Pending + +--- a/storage/connect/os.h ++++ b/storage/connect/os.h +@@ -2,13 +2,15 @@ + #ifndef _OS_H_INCLUDED + #define _OS_H_INCLUDED + +-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__) ++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__) || (defined(__linux__) && !defined(__GLIBC__)) + typedef off_t off64_t; + #define lseek64(fd, offset, whence) lseek((fd), (offset), (whence)) + #define open64(path, flags, mode) open((path), (flags), (mode)) + #define ftruncate64(fd, length) ftruncate((fd), (length)) ++#ifndef O_LARGEFILE + #define O_LARGEFILE 0 + #endif ++#endif + + #ifdef _AIX + #ifndef O_LARGEFILE diff --git a/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch b/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch new file mode 100644 index 0000000000..6aa6c84882 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch @@ -0,0 +1,13 @@ +Upstream-Status: Pending + +--- a/storage/rocksdb/rocksdb/port/jemalloc_helper.h ++++ b/storage/rocksdb/rocksdb/port/jemalloc_helper.h +@@ -5,7 +5,7 @@ + + #pragma once + +-#if defined(__clang__) ++#if defined(__clang__) && defined(__GLIBC__) + // glibc's `posix_memalign()` declaration specifies `throw()` while clang's + // declaration does not. There is a hack in clang to make its re-declaration + // compatible with glibc's if they are declared consecutively. That hack breaks diff --git a/meta-oe/recipes-dbs/mysql/mariadb/my.cnf b/meta-oe/recipes-dbs/mysql/mariadb/my.cnf index dc4c172e54..75db46a559 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/my.cnf +++ b/meta-oe/recipes-dbs/mysql/mariadb/my.cnf @@ -10,7 +10,7 @@ user = mysql port = 3306 socket = /var/lib/mysql/mysql.sock pid-file = /var/lib/mysql/mysqld.pid -log-error = /var/log/mysqld.err +log-error = /var/log/mysqld.log basedir = /usr datadir = /var/lib/mysql skip-external-locking diff --git a/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch b/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch new file mode 100644 index 0000000000..3787b74ad1 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch @@ -0,0 +1,43 @@ +Upstream-Status: Pending + +Remove glibc specific function dependencies + +Sourced from: https://git.alpinelinux.org/aports/tree/main/mariadb/ppc-remove-glibc-dep.patch +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +diff --git a/include/my_cpu.h b/include/my_cpu.h +index f2e26fca..94599b74 100644 +--- a/include/my_cpu.h ++++ b/include/my_cpu.h +@@ -24,17 +24,16 @@ + */ + + #ifdef _ARCH_PWR8 +-#include <sys/platform/ppc.h> + /* Very low priority */ +-#define HMT_very_low() __ppc_set_ppr_very_low() ++#define HMT_very_low() asm volatile("or 31,31,31") + /* Low priority */ +-#define HMT_low() __ppc_set_ppr_low() ++#define HMT_low() asm volatile ("or 1,1,1") + /* Medium low priority */ +-#define HMT_medium_low() __ppc_set_ppr_med_low() ++#define HMT_medium_low() asm volatile ("or 6,6,6") + /* Medium priority */ +-#define HMT_medium() __ppc_set_ppr_med() ++#define HMT_medium() asm volatile ("or 2,2,2") + /* Medium high priority */ +-#define HMT_medium_high() __ppc_set_ppr_med_high() ++#define HMT_medium_high() asm volatile("or 5,5,5") + /* High priority */ + #define HMT_high() asm volatile("or 3,3,3") + #else +@@ -72,7 +71,7 @@ static inline void MY_RELAX_CPU(void) + __asm__ __volatile__ ("pause"); + #endif + #elif defined(_ARCH_PWR8) +- __ppc_get_timebase(); ++ __builtin_ppc_get_timebase(); + #elif defined __GNUC__ && (defined __arm__ || defined __aarch64__) + /* Mainly, prevent the compiler from optimizing away delay loops */ + __asm__ __volatile__ ("":::"memory"); diff --git a/meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch b/meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch deleted file mode 100644 index ff26b0b86c..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch +++ /dev/null @@ -1,18 +0,0 @@ -Remove host path from include directories - -Naturally this breaks cross-compilation if present. - -Upstream-Status: Pending - -Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> - ---- mariadb-5.5.38/storage/tokudb/ft-index/CMakeLists.txt 2014-07-17 14:37:04.529327998 +0100 -+++ mariadb-5.5.38/storage/tokudb/ft-index/CMakeLists.txt 2014-07-17 14:43:56.991337895 +0100 -@@ -39,7 +39,6 @@ - - ## default includes and libraries - include_directories(SYSTEM -- /usr/local/include - ${ZLIB_INCLUDE_DIRS} - ) - diff --git a/meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch b/meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch new file mode 100644 index 0000000000..4e499d4137 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch @@ -0,0 +1,15 @@ +ssize_t comes from sys/types.h therefore include it + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/wsrep-lib/include/wsrep/gtid.hpp ++++ b/wsrep-lib/include/wsrep/gtid.hpp +@@ -25,7 +25,7 @@ + #include "compiler.hpp" + + #include <iosfwd> +- ++#include <sys/types.h> + /** + * Minimum number of bytes guaratneed to store GTID string representation, + * terminating '\0' not included (36 + 1 + 20). diff --git a/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch b/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch new file mode 100644 index 0000000000..233d9e6af6 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch @@ -0,0 +1,34 @@ +From 4ac5b555d058d4d489f25a3806a787b7b2465d09 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Wed, 27 Feb 2019 22:41:26 -0800 +Subject: [PATCH] support-files/CMakeLists.txt: fix do_populate_sysroot issue + +Comment out the logic which for suse as it introduces +below do_populate_sysroot error: +ERROR: mariadb-native-10.3.13-r0 do_populate_sysroot: sstate found an absolute path symlink /build/tmp/work/x86_64-linux/mariadb-native/10.3.13-r0/sysroot-destdir/build/tmp/work/x86_64-linux/mariadb-native/10.3.13-r0/recipe-sysroot-native/usr/sbin/rcmysql pointing at /build/tmp/work/x86_64-linux/mariadb-native/10.3.13-r0/recipe-sysroot-native/etc/init.d/mysql. Please replace this with a relative link. + +Upstream-Status: Inappropriate [oe build specific] + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> + +--- + support-files/CMakeLists.txt | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt +index b5767432..56733de1 100644 +--- a/support-files/CMakeLists.txt ++++ b/support-files/CMakeLists.txt +@@ -165,12 +165,5 @@ IF(UNIX) + INSTALL(FILES rpm/enable_encryption.preset DESTINATION ${INSTALL_SYSCONF2DIR} + COMPONENT IniFiles) + ENDIF() +- +- # This is for SuSE: +- INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink +- ${INSTALL_SYSCONFDIR}/init.d/mysql +- ${INSTALL_SBINDIR}/rcmysql +- WORKING_DIRECTORY \$ENV{DESTDIR}${prefix})" +- COMPONENT SupportFiles) + ENDIF(INSTALL_SYSCONFDIR) + ENDIF() diff --git a/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch b/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch new file mode 100644 index 0000000000..3244ab8da2 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch @@ -0,0 +1,23 @@ +Use SYS_futex for syscall + +glibc defines SYS_futex and on newer 32bit CPUs like RISCV-32, arc there +is no 32bit time_t therefore define SYS_futex in terms of SYS_futex_time64 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/storage/innobase/sync/srw_lock.cc ++++ b/storage/innobase/sync/srw_lock.cc +@@ -210,6 +210,12 @@ void ssux_lock_low::wake() { WakeByAddre + # ifdef __linux__ + # include <linux/futex.h> + # include <sys/syscall.h> ++/** Newer 32bit CPUs eg. RISCV-32 are defaulting to 64bit time_t from get go and ++ therefore do not define __NR_futex */ ++# if !defined(SYS_futex) && defined(SYS_futex_time64) ++# define SYS_futex SYS_futex_time64 ++# endif ++ + # define SRW_FUTEX(a,op,n) \ + syscall(SYS_futex, a, FUTEX_ ## op ## _PRIVATE, n, nullptr, nullptr, 0) + # elif defined __OpenBSD__ diff --git a/meta-oe/recipes-dbs/mysql/mariadb_10.11.4.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.11.4.bb new file mode 100644 index 0000000000..87faabfa27 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb_10.11.4.bb @@ -0,0 +1,26 @@ +require mariadb.inc + +DEPENDS += "mariadb-native bison-native boost libpcre2 curl ncurses \ + zlib libaio libedit libevent libxml2 gnutls fmt lzo zstd" + +PROVIDES += "mysql5 libmysqlclient" + +RPROVIDES:${PN} += "mysql5" +RREPLACES:${PN} += "mysql5" +RCONFLICTS:${PN} += "mysql5" + +RPROVIDES:${PN}-dbg += "mysql5-dbg" +RREPLACES:${PN}-dbg += "mysql5-dbg" +RCONFLICTS:${PN}-dbg += "mysql5-dbg" + +RPROVIDES:${PN}-leftovers += "mysql5-leftovers" +RREPLACES:${PN}-leftovers += "mysql5-leftovers" +RCONFLICTS:${PN}-leftovers += "mysql5-leftovers" + +RPROVIDES:${PN}-client += "mysql5-client" +RREPLACES:${PN}-client += "mysql5-client" +RCONFLICTS:${PN}-client += "mysql5-client" + +RPROVIDES:${PN}-server += "mysql5-server" +RREPLACES:${PN}-server += "mysql5-server" +RCONFLICTS:${PN}-server += "mysql5-server" diff --git a/meta-oe/recipes-dbs/mysql/mariadb_5.5.62.bb b/meta-oe/recipes-dbs/mysql/mariadb_5.5.62.bb deleted file mode 100644 index d7895732a6..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb_5.5.62.bb +++ /dev/null @@ -1,27 +0,0 @@ -require mariadb.inc - -EXTRA_OECMAKE += "-DSTACK_DIRECTION=-1" - -DEPENDS += "mariadb-native ncurses zlib readline libaio libevent" - -PROVIDES += "mysql5 libmysqlclient" - -RPROVIDES_${PN} += "mysql5" -RREPLACES_${PN} += "mysql5" -RCONFLICTS_${PN} += "mysql5" - -RPROVIDES_${PN}-dbg += "mysql5-dbg" -RREPLACES_${PN}-dbg += "mysql5-dbg" -RCONFLICTS_${PN}-dbg += "mysql5-dbg" - -RPROVIDES_${PN}-leftovers += "mysql5-leftovers" -RREPLACES_${PN}-leftovers += "mysql5-leftovers" -RCONFLICTS_${PN}-leftovers += "mysql5-leftovers" - -RPROVIDES_${PN}-client += "mysql5-client" -RREPLACES_${PN}-client += "mysql5-client" -RCONFLICTS_${PN}-client += "mysql5-client" - -RPROVIDES_${PN}-server += "mysql5-server" -RREPLACES_${PN}-server += "mysql5-server" -RCONFLICTS_${PN}-server += "mysql5-server" diff --git a/meta-oe/recipes-dbs/mysql/mysql-python/0001-_mysql.c-fix-compilation-with-MariaDB-with-10.3.13.patch b/meta-oe/recipes-dbs/mysql/mysql-python/0001-_mysql.c-fix-compilation-with-MariaDB-with-10.3.13.patch new file mode 100644 index 0000000000..173241ea5c --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mysql-python/0001-_mysql.c-fix-compilation-with-MariaDB-with-10.3.13.patch @@ -0,0 +1,34 @@ +From 45436592aa64308b2ab46f84c6107c6d7de0a3ec Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Wed, 6 Mar 2019 00:16:17 -0800 +Subject: [PATCH] _mysql.c: fix compilation with MariaDB 10.3.13 + +Use standard API function MYSQL_OPT_RECONNECT +instead of direct modification of internal structures +which does not work for MariaDB. + +Upstream-Status: Pending + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + _mysql.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/_mysql.c ++++ b/_mysql.c +@@ -2002,7 +2002,14 @@ _mysql_ConnectionObject_ping( + int r, reconnect = -1;
+ if (!PyArg_ParseTuple(args, "|I", &reconnect)) return NULL;
+ check_connection(self);
+- if ( reconnect != -1 ) self->connection.reconnect = reconnect;
++ if ( reconnect != -1 ) {
++#if MYSQL_VERSION_ID >= 50013
++ my_bool recon = reconnect;
++ mysql_options(&self->connection, MYSQL_OPT_RECONNECT, &recon);
++#else
++ self->connection.reconnect = reconnect;
++#endif
++ }
+ Py_BEGIN_ALLOW_THREADS
+ r = mysql_ping(&(self->connection));
+ Py_END_ALLOW_THREADS
diff --git a/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb b/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb index ac0df4f066..15f6b6fb9a 100644 --- a/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb +++ b/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb @@ -1,17 +1,26 @@ SUMMARY = "Python interface to MySQL" HOMEPAGE = "https://github.com/farcepest/MySQLdb1" SECTION = "devel/python" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a4263" DEPENDS = "mysql5" SRCNAME = "MySQL-python" -SRC_URI = "https://pypi.python.org/packages/source/M/${SRCNAME}/${SRCNAME}-${PV}.zip" +SRC_URI = "https://pypi.python.org/packages/source/M/${SRCNAME}/${SRCNAME}-${PV}.zip \ + file://0001-_mysql.c-fix-compilation-with-MariaDB-with-10.3.13.patch \ +" SRC_URI[md5sum] = "654f75b302db6ed8dc5a898c625e030c" SRC_URI[sha256sum] = "811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e140c74" S = "${WORKDIR}/${SRCNAME}-${PV}" -inherit setuptools +SKIP_RECIPE[mysql-python] ?= "${@bb.utils.contains('I_SWEAR_TO_MIGRATE_TO_PYTHON3', 'yes', '', 'python2 is out of support for long time, read https://www.python.org/doc/sunset-python-2/ https://python3statement.org/ and if you really have to temporarily use this, then set I_SWEAR_TO_MIGRATE_TO_PYTHON3 to "yes"', d)}" + +inherit ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "setuptools", "", d)} + +python() { + if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split(): + raise bb.parse.SkipRecipe('Requires meta-python2 to be present.') +} diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch b/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch new file mode 100644 index 0000000000..7a4ba9897c --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch @@ -0,0 +1,44 @@ +From 780fd27ea6f7f2c446c46a7a5e26d94106c67efd Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" <rjones@redhat.com> +Date: Sun, 20 Nov 2016 15:04:52 +0000 +Subject: [PATCH] Add support for RISC-V. + +The architecture is sufficiently similar to aarch64 that simply +extending the existing aarch64 macro works. +--- +Upstream-Status: Pending + + src/include/storage/s_lock.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h +index 4d3ffc7..22e27bf 100644 +--- a/src/include/storage/s_lock.h ++++ b/src/include/storage/s_lock.h +@@ -317,11 +317,12 @@ tas(volatile slock_t *lock) + + /* + * On ARM and ARM64, we use __sync_lock_test_and_set(int *, int) if available. ++ * On RISC-V, the same. + * + * We use the int-width variant of the builtin because it works on more chips + * than other widths. + */ +-#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) ++#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) || defined(__riscv) + #ifdef HAVE_GCC__SYNC_INT32_TAS + #define HAS_TEST_AND_SET + +@@ -355,8 +356,7 @@ spin_delay(void) + + #endif /* __aarch64__ || __aarch64 */ + #endif /* HAVE_GCC__SYNC_INT32_TAS */ +-#endif /* __arm__ || __arm || __aarch64__ || __aarch64 */ +- ++#endif /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */ + + /* S/390 and S/390x Linux (32- and 64-bit zSeries) */ + #if defined(__s390__) || defined(__s390x__) +-- +2.34.1 + diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch b/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch new file mode 100644 index 0000000000..02f4c9e513 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch @@ -0,0 +1,41 @@ +From bbba8a5261a99e79c9cd4693ef56021014a9856b Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Mon, 28 Dec 2020 16:38:21 +0800 +Subject: [PATCH] Improve reproducibility, + +Remove build patch from binaries which pg_config do +not record var-CC, var-CFLAGS, and configure + +$ /usr/bin/pg_config --cc +not recorded + +$ /usr/bin/pg_config --configure +not recorded + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + +update patch for v13.1 +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + src/common/Makefile | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/common/Makefile b/src/common/Makefile +index 880722f..7a9b9d4 100644 +--- a/src/common/Makefile ++++ b/src/common/Makefile +@@ -31,9 +31,6 @@ include $(top_builddir)/src/Makefile.global + # don't include subdirectory-path-dependent -I and -L switches + STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS)) + STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS)) +-override CPPFLAGS += -DVAL_CC="\"$(CC)\"" +-override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\"" +-override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\"" + override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\"" + override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\"" + override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\"" +-- +2.34.1 + diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch b/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch deleted file mode 100644 index f14da06d91..0000000000 --- a/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch +++ /dev/null @@ -1,46 +0,0 @@ -From d3ee8c8df5808b63e86f40831f2ba62cbb33d291 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Wed, 8 Aug 2018 09:18:27 +0800 -Subject: [PATCH] postgresql: Use pkg-config for libxml2 detection. - -Upstream-Status: Inappropriate [configuration] - -xml2-config does not work. Use pkgconfig to set CPPFLAGS and LIBS. - -Signed-off-by: Philip Balister <philip@balister.org> - -upate to version 10.4 -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - configure.in | 15 ++------------- - 1 file changed, 2 insertions(+), 13 deletions(-) - -diff --git a/configure.in b/configure.in -index d9fe56e..3e2cd3a 100644 ---- a/configure.in -+++ b/configure.in -@@ -816,19 +816,8 @@ PGAC_ARG_BOOL(with, libxml, no, [build with XML support], - [AC_DEFINE([USE_LIBXML], 1, [Define to 1 to build with XML support. (--with-libxml)])]) - - if test "$with_libxml" = yes ; then -- PGAC_PATH_PROGS(XML2_CONFIG, xml2-config) -- if test -n "$XML2_CONFIG"; then -- for pgac_option in `$XML2_CONFIG --cflags`; do -- case $pgac_option in -- -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";; -- esac -- done -- for pgac_option in `$XML2_CONFIG --libs`; do -- case $pgac_option in -- -L*) LDFLAGS="$LDFLAGS $pgac_option";; -- esac -- done -- fi -+ CPPFLAGS="$CPPFLAGS `pkg-config --short-errors --print-errors --cflags "libxml-2.0" 2>&1`" -+ LIBS="`pkg-config --short-errors --print-errors --libs "libxml-2.0" 2>&1` $LIBS" - fi - - AC_SUBST(with_libxml) --- -2.7.4 - diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch b/meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch new file mode 100644 index 0000000000..52ca276da6 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch @@ -0,0 +1,119 @@ +From b92eebe8b0760fee7bd55c6c22318620c2c07579 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Mon, 1 Aug 2022 15:44:38 +0800 +Subject: [PATCH] config_info.c: not expose build info + +Don't collect the build information to fix the buildpaths issue. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + configure.ac | 2 +- + src/common/config_info.c | 68 ---------------------------------------- + 2 files changed, 1 insertion(+), 69 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0eb595b..508487b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 1996-2021, PostgreSQL Global Development Group]) + AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) + AC_CONFIG_AUX_DIR(config) + AC_PREFIX_DEFAULT(/usr/local/pgsql) +-AC_DEFINE_UNQUOTED(CONFIGURE_ARGS, ["$ac_configure_args"], [Saved arguments from configure]) ++AC_DEFINE_UNQUOTED(CONFIGURE_ARGS, ["ac_configure_args"], [Saved arguments from configure]) + + [PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`] + [PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`] +diff --git a/src/common/config_info.c b/src/common/config_info.c +index e72e729..b482c20 100644 +--- a/src/common/config_info.c ++++ b/src/common/config_info.c +@@ -38,7 +38,7 @@ + int i = 0; + + /* Adjust this to match the number of items filled below */ +- *configdata_len = 23; ++ *configdata_len = 14; + configdata = (ConfigData *) palloc(*configdata_len * sizeof(ConfigData)); + + configdata[i].name = pstrdup("BINDIR"); +@@ -123,74 +123,6 @@ + configdata[i].setting = pstrdup(path); + i++; + +- configdata[i].name = pstrdup("CONFIGURE"); +- configdata[i].setting = pstrdup(CONFIGURE_ARGS); +- i++; +- +- configdata[i].name = pstrdup("CC"); +-#ifdef VAL_CC +- configdata[i].setting = pstrdup(VAL_CC); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- +- configdata[i].name = pstrdup("CPPFLAGS"); +-#ifdef VAL_CPPFLAGS +- configdata[i].setting = pstrdup(VAL_CPPFLAGS); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- +- configdata[i].name = pstrdup("CFLAGS"); +-#ifdef VAL_CFLAGS +- configdata[i].setting = pstrdup(VAL_CFLAGS); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- +- configdata[i].name = pstrdup("CFLAGS_SL"); +-#ifdef VAL_CFLAGS_SL +- configdata[i].setting = pstrdup(VAL_CFLAGS_SL); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- +- configdata[i].name = pstrdup("LDFLAGS"); +-#ifdef VAL_LDFLAGS +- configdata[i].setting = pstrdup(VAL_LDFLAGS); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- +- configdata[i].name = pstrdup("LDFLAGS_EX"); +-#ifdef VAL_LDFLAGS_EX +- configdata[i].setting = pstrdup(VAL_LDFLAGS_EX); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- +- configdata[i].name = pstrdup("LDFLAGS_SL"); +-#ifdef VAL_LDFLAGS_SL +- configdata[i].setting = pstrdup(VAL_LDFLAGS_SL); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- +- configdata[i].name = pstrdup("LIBS"); +-#ifdef VAL_LIBS +- configdata[i].setting = pstrdup(VAL_LIBS); +-#else +- configdata[i].setting = pstrdup(_("not recorded")); +-#endif +- i++; +- + configdata[i].name = pstrdup("VERSION"); + configdata[i].setting = pstrdup("PostgreSQL " PG_VERSION); + i++; +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch b/meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch new file mode 100644 index 0000000000..3c8187d1a2 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch @@ -0,0 +1,30 @@ +From 5f9dedc91a0a9710033fa155ea759f765ce5b58b Mon Sep 17 00:00:00 2001 +From: Yi Fan Yu <yifan.yu@windriver.com> +Date: Fri, 5 Feb 2021 17:15:42 -0500 +Subject: [PATCH] configure.ac: bypass autoconf 2.69 version check + +for upgrade to autoconf 2.71 + +Upstream-Status: Inappropriate [disable feature] + +Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> + +--- + configure.ac | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 998ff31..912e490 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros + + AC_INIT([PostgreSQL], [15.3], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/]) + +-m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required. +-Untested combinations of 'autoconf' and PostgreSQL versions are not +-recommended. You can remove the check from 'configure.ac' but it is then +-your responsibility whether the result works or not.])]) + AC_COPYRIGHT([Copyright (c) 1996-2022, PostgreSQL Global Development Group]) + AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) + AC_CONFIG_AUX_DIR(config) diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch b/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch new file mode 100644 index 0000000000..4db36d26fd --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch @@ -0,0 +1,42 @@ +From 9f81377dddfe32d950844d7053020a36b40fce08 Mon Sep 17 00:00:00 2001 +From: Manoj Saun <manojsingh.saun@windriver.com> +Date: Wed, 22 Mar 2023 08:07:26 +0000 +Subject: [PATCH] postgresql: fix ptest failure of sysviews + +The patch "0001-config_info.c-not-expose-build-info.patch" hides the debug info +in pg_config table which reduces the count of rows from pg_config and leads to +sysviews test failure. +To fix it we need to reduce the count of parameters in sysviews test. +Also we need to reduce the row count in expected result of sysview test +to make the test output shown as pass. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Manoj Saun <manojsingh.saun@windriver.com> +--- + src/test/regress/expected/sysviews.out | 2 +- + src/test/regress/sql/sysviews.sql | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/src/test/regress/expected/sysviews.out ++++ b/src/test/regress/expected/sysviews.out +@@ -29,7 +29,7 @@ select name, ident, parent, level, total + (1 row) + + -- At introduction, pg_config had 23 entries; it may grow +-select count(*) > 20 as ok from pg_config; ++select count(*) > 13 as ok from pg_config; + ok + ---- + t +--- a/src/test/regress/sql/sysviews.sql ++++ b/src/test/regress/sql/sysviews.sql +@@ -18,7 +18,7 @@ select name, ident, parent, level, total + from pg_backend_memory_contexts where level = 0; + + -- At introduction, pg_config had 23 entries; it may grow +-select count(*) > 20 as ok from pg_config; ++select count(*) > 13 as ok from pg_config; + + -- We expect no cursors in this test; see also portals.sql + select count(*) = 0 as ok from pg_cursors; diff --git a/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch b/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch index 22b62d9ded..fa46912eef 100644 --- a/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch +++ b/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch @@ -1,7 +1,7 @@ -From 7e2af4de19be58bc9d551c41ce2750396d357f34 Mon Sep 17 00:00:00 2001 +From 56b830edecff1cac5f8a8a956e7a7eeef2aa7c17 Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Tue, 27 Nov 2018 13:25:15 +0800 -Subject: [PATCH] PATCH] not check libperl under cross compiling +Subject: [PATCH] not check libperl under cross compiling Upstream-Status: Inappropriate [configuration] @@ -16,14 +16,14 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com> update patch to version 11.1 Signed-off-by: Changqing Li <changqing.li@windriver.com> --- - configure.in | 2 +- + configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/configure.in b/configure.in -index b98b9bb..8584677 100644 ---- a/configure.in -+++ b/configure.in -@@ -2211,7 +2211,7 @@ Use --without-tcl to disable building PL/Tcl.]) +diff --git a/configure.ac b/configure.ac +index fba79ee..7170f26 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2261,7 +2261,7 @@ Use --without-tcl to disable building PL/Tcl.]) fi # check for <perl.h> @@ -33,5 +33,5 @@ index b98b9bb..8584677 100644 CPPFLAGS="$CPPFLAGS $perl_includespec" AC_CHECK_HEADER(perl.h, [], [AC_MSG_ERROR([header file <perl.h> is required for Perl])], -- -2.7.4 +2.34.1 diff --git a/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc index 85f19170b9..15ecdeeb2e 100644 --- a/meta-oe/recipes-dbs/postgresql/postgresql.inc +++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc @@ -18,18 +18,17 @@ DESCRIPTION = "\ this package if you're installing the postgresql-server package. \ " HOMEPAGE = "http://www.postgresql.com" -LICENSE = "BSD" -DEPENDS = "libnsl2 zlib readline tzcode-native" +LICENSE = "0BSD" +DEPENDS = "libnsl2 readline tzcode-native" ARM_INSTRUCTION_SET = "arm" -SRC_URI = "http://ftp.postgresql.org/pub/source/v${PV}/${BP}.tar.bz2 \ +SRC_URI = "https://ftp.postgresql.org/pub/source/v${PV}/${BP}.tar.bz2 \ file://postgresql.init \ file://postgresql-profile \ file://postgresql.pam \ file://postgresql-setup \ file://postgresql.service \ - file://0001-Use-pkg-config-for-libxml2-detection.patch \ " LEAD_SONAME = "libpq.so" @@ -37,15 +36,14 @@ LEAD_SONAME = "libpq.so" # LDFLAGS for shared libraries export LDFLAGS_SL = "${LDFLAGS}" -inherit autotools pkgconfig perlnative pythonnative useradd update-rc.d systemd gettext cpan-base +inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext cpan-base multilib_header CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR} -I${STAGING_INCDIR}/tcl8.6" -SYSTEMD_SERVICE_${PN} = "postgresql.service" -SYSTEMD_AUTO_ENABLE_${PN} = "disable" +SYSTEMD_SERVICE:${PN} = "postgresql.service" +SYSTEMD_AUTO_ENABLE:${PN} = "disable" -DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-systemctl-native', '', d)}" -pkg_postinst_${PN} () { +pkg_postinst:${PN} () { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd sysvinit', 'true', 'false', d)}; then if [ -n "$D" ]; then OPTS="--root=$D" @@ -54,30 +52,46 @@ pkg_postinst_${PN} () { fi } -enable_pam = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" -PACKAGECONFIG ??= "${enable_pam} openssl python uuid libxml tcl nls libxml perl" -PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam," -PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl," -PACKAGECONFIG[python] = "--with-python,--without-python,python,python" -PACKAGECONFIG[uuid] = "--with-uuid=e2fs,--without-uuid,util-linux," +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \ + openssl python uuid libxml tcl perl zlib \ +" PACKAGECONFIG[tcl] = "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl tcl-native," -PACKAGECONFIG[nls] = "--enable-nls,--disable-nls,," -PACKAGECONFIG[libxml] = "--with-libxml,--without-libxml,libxml2,libxml2" PACKAGECONFIG[perl] = "--with-perl,--without-perl,perl,perl" +PACKAGECONFIG[python] = "--with-python,--without-python,python3,python3" +PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5" +PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" +PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" +PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd systemd-systemctl-native" +PACKAGECONFIG[uuid] = "--with-uuid=e2fs,--without-uuid,util-linux" +PACKAGECONFIG[libxml] = "--with-libxml,--without-libxml,libxml2,libxml2" +PACKAGECONFIG[libxslt] = "--with-libxslt,--without-libxslt,libxslt" +PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" +PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4" +PACKAGECONFIG[openssl] = "--with-ssl=openssl,ac_cv_file__dev_urandom=yes,openssl" EXTRA_OECONF += "--enable-thread-safety --disable-rpath \ --datadir=${datadir}/${BPN} \ --sysconfdir=${sysconfdir}/${BPN} \ " -EXTRA_OECONF_sh4 += "--disable-spinlocks" -EXTRA_OECONF_aarch64 += "--disable-spinlocks" +EXTRA_OECONF:sh4 += "--disable-spinlocks" + +DEBUG_OPTIMIZATION:remove:mips = " -Og" +DEBUG_OPTIMIZATION:append:mips = " -O" +BUILD_OPTIMIZATION:remove:mips = " -Og" +BUILD_OPTIMIZATION:append:mips = " -O" + +DEBUG_OPTIMIZATION:remove:mipsel = " -Og" +DEBUG_OPTIMIZATION:append:mipsel = " -O" +BUILD_OPTIMIZATION:remove:mipsel = " -Og" +BUILD_OPTIMIZATION:append:mipsel = " -O" PACKAGES_DYNAMIC += "^${PN}-plperl \ ^${PN}-pltcl \ ^${PN}-plpython \ " -python populate_packages_prepend() { +python populate_packages:prepend() { def fill_more(name): if name is None or name.strip() == "": @@ -114,7 +128,7 @@ do_configure() { # do_configure autotools_do_configure - # do_configure_append + # do_configure:append # workaround perl package related bugs sed -i -e "s:-L/usr/local/lib:-L=/usr/local/lib:g" \ ${B}/src/Makefile.global @@ -150,7 +164,7 @@ do_configure() { fi } -do_compile_append() { +do_compile:append() { oe_runmake -C contrib all } @@ -158,17 +172,18 @@ do_compile_append() { usernum = "28" groupnum = "28" USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "-M -g postgres -o -r -d ${localstatedir}/lib/${BPN} \ +USERADD_PARAM:${PN} = "-M -g postgres -o -r -d ${localstatedir}/lib/${BPN} \ -s /bin/sh -c 'PostgreSQL Server' -u ${usernum} postgres" -GROUPADD_PARAM_${PN} = "-g ${groupnum} -o -r postgres" +GROUPADD_PARAM:${PN} = "-g ${groupnum} -o -r postgres" INITSCRIPT_PACKAGES = "${PN}" INITSCRIPT_NAME = "${BPN}-server" INITSCRIPT_PARAMS = "start 64 . stop 36 0 1 2 3 4 5 6 ." -do_install_append() { +do_install:append() { # install contrib oe_runmake DESTDIR=${D} -C contrib install + oe_multilib_header pg_config.h pg_config_ext.h ecpg_config.h postgresql/server/pg_config.h postgresql/server/pg_config_ext.h # install tutorial install -d -m 0755 ${D}${libdir}/${BPN}/tutorial install ${B}/src/tutorial/* ${D}${libdir}/${BPN}/tutorial @@ -191,7 +206,7 @@ do_install_append() { # multiple server config directory install -d -m 700 ${D}${sysconfdir}/default/${BPN} - if [ "${@d.getVar('enable_pam')}" = "pam" ]; then + if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/pam.d install -m 644 ${WORKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql fi @@ -201,10 +216,18 @@ do_install_append() { install -m 0644 ${WORKDIR}/postgresql.service ${D}${systemd_unitdir}/system sed -i -e 's,@BINDIR@,${bindir},g' \ ${D}${systemd_unitdir}/system/postgresql.service + # Remove the build path + if [ -f ${D}${libdir}/${BPN}/pgxs/src/Makefile.global ]; then + sed -i -e 's#${RECIPE_SYSROOT}##g' \ + -e 's#${RECIPE_SYSROOT_NATIVE}##g' \ + -e 's#${WORKDIR}##g' \ + -e 's#${TMPDIR}##g' \ + ${D}${libdir}/${BPN}/pgxs/src/Makefile.global + fi } SSTATE_SCAN_FILES += "Makefile.global" -SSTATE_SCAN_FILES_remove = "*_config" +SSTATE_SCAN_FILES:remove = "*_config" PACKAGES =+ "${PN}-client ${PN}-server-dev ${PN}-timezone \ libecpg-compat libecpg-compat-dev \ @@ -214,7 +237,7 @@ PACKAGES =+ "${PN}-client ${PN}-server-dev ${PN}-timezone \ ${PN}-contrib \ " -RPROVIDES_${PN}-dbg += "libecpg-compat-dbg \ +RPROVIDES:${PN}-dbg += "libecpg-compat-dbg \ libecpg-dbg \ libpq-dbg \ libpgtypes-dbg \ @@ -224,7 +247,7 @@ RPROVIDES_${PN}-dbg += "libecpg-compat-dbg \ ${PN}-plperl-dbg \ " -FILES_${PN} += "${sysconfdir}/init.d/${BPN}-server \ +FILES:${PN} += "${sysconfdir}/init.d/${BPN}-server \ ${localstatedir}/lib/${BPN}/data ${localstatedir}/lib/${BPN}/backups \ ${localstatedir}/lib/${BPN}/.profile ${sysconfdir}/default/${BPN} \ ${libdir}/${BPN}/dict_snowball.so ${libdir}/${BPN}/plpgsql.so \ @@ -236,12 +259,10 @@ FILES_${PN} += "${sysconfdir}/init.d/${BPN}-server \ else ''} \ " -FILES_${PN}-client = "${bindir}/clusterdb \ +FILES:${PN}-client = "${bindir}/clusterdb \ ${bindir}/createdb \ - ${bindir}/createlang \ ${bindir}/createuser \ ${bindir}/dropdb \ - ${bindir}/droplang \ ${bindir}/dropuser \ ${bindir}/pg_dump \ ${bindir}/pg_dumpall \ @@ -252,7 +273,7 @@ FILES_${PN}-client = "${bindir}/clusterdb \ ${bindir}/vacuumlo \ ${datadir}/${BPN}/psqlrc.sample \ " -FILES_${PN}-client-doc = "${mandir}/man1/clusterdb.* \ +FILES:${PN}-client-doc = "${mandir}/man1/clusterdb.* \ ${mandir}/man1/createdb.* ${mandir}/man1/createlang.* \ ${mandir}/man1/createuser.* ${mandir}/man1/dropdb.* \ ${mandir}/man1/droplang.* ${mandir}/man1/dropuser.* \ @@ -261,45 +282,47 @@ FILES_${PN}-client-doc = "${mandir}/man1/clusterdb.* \ ${mandir}/man1/reindexdb.* ${mandir}/man1/vacuumdb.* \ ${mandir}/man7/* \ " -FILES_${PN}-doc += "${docdir}/${BPN}/html ${libdir}/${BPN}/tutorial/ \ +FILES:${PN}-doc += "${docdir}/${BPN}/html ${libdir}/${BPN}/tutorial/ \ ${mandir}/man1/initdb.* ${mandir}/man1/pg_controldata.* \ ${mandir}/man1/pg_ctl.* ${mandir}/man1/pg_resetxlog.* \ ${mandir}/man1/postgres.* ${mandir}/man1/postmaster.* \ " -FILES_${PN}-timezone = "${datadir}/${BPN}/timezone \ +FILES:${PN}-timezone = "${datadir}/${BPN}/timezone \ ${datadir}/${BPN}/timezonesets \ " -RDEPENDS_${PN} += "${PN}-timezone" -FILES_${PN}-server-dev = "${includedir}/${BPN}/server" +RDEPENDS:${PN} += "${PN}-timezone" +FILES:${PN}-server-dev = "${includedir}/${BPN}/server \ + ${libdir}/${BPN}/pgxs \ +" -FILES_libecpg = "${libdir}/libecpg*${SOLIBS}" -FILES_libecpg-dev = "${libdir}/libecpg*${SOLIBSDEV} \ +FILES:libecpg = "${libdir}/libecpg*${SOLIBS}" +FILES:libecpg-dev = "${libdir}/libecpg*${SOLIBSDEV} \ ${libdir}/libpgtypes*${SOLIBSDEV} \ ${includedir}/ecpg*.h ${includedir}/${BPN}/ecpg*.h \ ${includedir}/pgtypes*.h ${includedir}/${BPN}/informix \ ${includedir}/sql3types.h ${includedir}/sqlca.h \ " -FILES_libecpg-doc = "${mandir}/man1/ecpg.*" -FILES_libecpg-staticdev = "${libdir}/libecpg*.a" -SECTION_libecpg-staticdev = "devel" -RDEPENDS_libecpg-staticdev = "libecpg-dev (= ${EXTENDPKGV})" +FILES:libecpg-doc = "${mandir}/man1/ecpg.*" +FILES:libecpg-staticdev = "${libdir}/libecpg*.a" +SECTION:libecpg-staticdev = "devel" +RDEPENDS:libecpg-staticdev = "libecpg-dev (= ${EXTENDPKGV})" -FILES_libpq = "${libdir}/libpq*${SOLIBS}" -FILES_libpq-dev = "${libdir}/libpq*${SOLIBSDEV} \ +FILES:libpq = "${libdir}/libpq*${SOLIBS}" +FILES:libpq-dev = "${libdir}/libpq*${SOLIBSDEV} \ ${includedir} \ " -FILES_libpq-staticdev = "${libdir}/libpq*.a ${libdir}/libpgport.a" -SECTION_libpq-staticdev = "devel" -RDEPENDS_libpq-staticdev = "libpq-dev (= ${EXTENDPKGV})" - -FILES_libecpg-compat = "${libdir}/libecpg_compat*${SOLIBS}" -FILES_libecpg-compat-dev = "${libdir}/libecpg_compat*${SOLIBS}" -FILES_libpgtypes = "${libdir}/libpgtypes*${SOLIBS}" -FILES_libpgtypes-staticdev = "${libdir}/libpgtypes*.a" -FILES_libpgtypes-dev = "${libdir}/libpgtypes*${SOLIBS} ${includedir}/pgtypes*.h" - -FILES_${PN}-contrib = " ${bindir}/oid2name ${bindir}/pg_standby \ - ${bindir}/pgbench ${bindir}/vacuumlo \ +FILES:libpq-staticdev = "${libdir}/libpq*.a ${libdir}/libpgport.a" +SECTION:libpq-staticdev = "devel" +RDEPENDS:libpq-staticdev = "libpq-dev (= ${EXTENDPKGV})" + +FILES:libecpg-compat = "${libdir}/libecpg_compat*${SOLIBS}" +FILES:libecpg-compat-dev = "${libdir}/libecpg_compat*${SOLIBS}" +FILES:libpgtypes = "${libdir}/libpgtypes*${SOLIBS}" +FILES:libpgtypes-staticdev = "${libdir}/libpgtypes*.a" +FILES:libpgtypes-dev = "${libdir}/libpgtypes*${SOLIBS} ${includedir}/pgtypes*.h" + +FILES:${PN}-contrib = " ${bindir}/oid2name ${bindir}/pg_standby \ + ${bindir}/pgbench \ ${S}/contrib/spi/*.example \ ${libdir}/${BPN}/_int.so ${libdir}/${BPN}/adminpack.so \ ${libdir}/${BPN}/autoinc.so ${libdir}/${BPN}/auto_explain.so \ @@ -321,32 +344,32 @@ FILES_${PN}-contrib = " ${bindir}/oid2name ${bindir}/pg_standby \ ${libdir}/${BPN}/sslinfo.so \ ${libdir}/${BPN}/tablefunc.so \ ${libdir}/${BPN}/test_parser.so ${libdir}/${BPN}/timetravel.so \ - ${libdir}/${BPN}/tsearch2.so ${libdir}/${BPN}/uuid-ossp.so \ + ${libdir}/${BPN}/uuid-ossp.so \ ${libdir}/${BPN}/pgxml.so ${libdir}/${BPN}/passwordcheck.so \ ${libdir}/${BPN}/pg_upgrade_support.so ${libdir}/${BPN}/.so \ ${libdir}/${BPN}/unaccent.so \ " -DESCRIPTION_${PN}-contrib = "The postgresql-contrib package contains \ +DESCRIPTION:${PN}-contrib = "The postgresql-contrib package contains \ contributed packages that are included in the PostgreSQL distribution." -FILES_${PN}-pltcl = "${libdir}/${BPN}/pltcl.so ${bindir}/pltcl_delmod \ +FILES:${PN}-pltcl = "${libdir}/${BPN}/pltcl.so ${bindir}/pltcl_delmod \ ${binddir}/pltcl_listmod ${bindir}/pltcl_loadmod \ ${datadir}/${BPN}/unknown.pltcl" -SUMMARY_${PN}-pltcl = "The Tcl procedural language for PostgreSQL" -DESCRIPTION_${PN}-pltcl = "PostgreSQL is an advanced Object-Relational \ +SUMMARY:${PN}-pltcl = "The Tcl procedural language for PostgreSQL" +DESCRIPTION:${PN}-pltcl = "PostgreSQL is an advanced Object-Relational \ database management system. The postgresql-pltcl package contains the PL/Tcl \ procedural language for the backend." -FILES_${PN}-plperl = "${libdir}/${BPN}/plperl.so" -SUMMARY_${PN}-plperl = "The Perl procedural language for PostgreSQL" -DESCRIPTION_${PN}-plperl = "PostgreSQL is an advanced Object-Relational \ +FILES:${PN}-plperl = "${libdir}/${BPN}/plperl.so" +SUMMARY:${PN}-plperl = "The Perl procedural language for PostgreSQL" +DESCRIPTION:${PN}-plperl = "PostgreSQL is an advanced Object-Relational \ database management system. The postgresql-plperl package contains the \ PL/Perl procedural language for the backend." # In version 8, it will be plpython.so # In version 9, it might be plpython{2,3}.so depending on python2 or 3 -FILES_${PN}-plpython = "${libdir}/${BPN}/plpython*.so" -SUMMARY_${PN}-plpython = "The Python procedural language for PostgreSQL" -DESCRIPTION_${PN}-plpython = "PostgreSQL is an advanced Object-Relational \ +FILES:${PN}-plpython = "${libdir}/${BPN}/plpython*.so" +SUMMARY:${PN}-plpython = "The Python procedural language for PostgreSQL" +DESCRIPTION:${PN}-plpython = "PostgreSQL is an advanced Object-Relational \ database management system. The postgresql-plpython package contains \ the PL/Python procedural language for the backend." diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_11.1.bb b/meta-oe/recipes-dbs/postgresql/postgresql_11.1.bb deleted file mode 100644 index 9713cb83b2..0000000000 --- a/meta-oe/recipes-dbs/postgresql/postgresql_11.1.bb +++ /dev/null @@ -1,10 +0,0 @@ -require postgresql.inc - -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=6dc95e63aa4d72502ff8193dfe2ddd38" - -SRC_URI += "\ - file://not-check-libperl.patch \ -" - -SRC_URI[md5sum] = "5e45f6d5b859cc76b5d62f1e328e9711" -SRC_URI[sha256sum] = "90815e812874831e9a4bf6e1136bf73bc2c5a0464ef142e2dfea40cda206db08" diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_15.3.bb b/meta-oe/recipes-dbs/postgresql/postgresql_15.3.bb new file mode 100644 index 0000000000..e1d49895f0 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/postgresql_15.3.bb @@ -0,0 +1,16 @@ +require postgresql.inc + +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=c31f662bb2bfb3b4187fe9a53e0ffe7c" + +SRC_URI += "\ + file://not-check-libperl.patch \ + file://0001-Add-support-for-RISC-V.patch \ + file://0001-Improve-reproducibility.patch \ + file://0001-configure.ac-bypass-autoconf-2.69-version-check.patch \ + file://0001-config_info.c-not-expose-build-info.patch \ + file://0001-postgresql-fix-ptest-failure-of-sysviews.patch \ +" + +SRC_URI[sha256sum] = "ffc7d4891f00ffbf5c3f4eab7fbbced8460b8c0ee63c5a5167133b9e6599d932" + +CVE_STATUS[CVE-2017-8806] = "not-applicable-config: Ddoesn't apply to out configuration of postgresql so we can safely ignore it." diff --git a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch index 7eda038756..84d4467c0e 100644 --- a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch +++ b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch @@ -1,26 +1,27 @@ -[PATCH] do not use the hardcode libdir +From 8f3ed8df4721991958a5becf75a69493d67e7514 Mon Sep 17 00:00:00 2001 +From: "Roy.Li" <rongqing.li@windriver.com> +Date: Tue, 5 Sep 2017 10:24:10 +0800 +Subject: [PATCH] [PATCH] do not use the hardcode libdir -Upstream-status: Pending +Upstream-Status: Pending Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 9b88d4c..df5ad7a 100644 +index 00b359e..ba50e6f 100644 --- a/configure.ac +++ b/configure.ac -@@ -140,7 +140,7 @@ if test "$with_libpq" != yes; then +@@ -114,7 +114,7 @@ if test "$with_libpq" != yes; then if test -d "$with_libpq"; then - PATH="$PATH:$with_libpq/bin" - CPPFLAGS="$CPPFLAGS -I$with_libpq/include" + PATH="$with_libpq/bin:$PATH" + CPPFLAGS="$CPPFLAGS -I$with_libpq/include -I$with_libpq/include/postgresql/internal" - LDFLAGS="$LDFLAGS -L$with_libpq/lib" + LDFLAGS="$LDFLAGS -L$with_libpq/${base_libdir}" else if test -x "$with_libpq"; then PG_CONFIG=$with_libpq --- -2.8.1 - diff --git a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch index a8f14e7689..30e67b7dfb 100644 --- a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch +++ b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch @@ -1,3 +1,6 @@ +From 96896b88776d0080609ec830cf9538d2babe665a Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Tue, 5 Sep 2017 10:24:10 +0800 Subject: [PATCH] psqlodbc: fixes for ptest support * Fix the LIBODBC since we don't use ODBC_CONFIG. @@ -9,27 +12,28 @@ Subject: [PATCH] psqlodbc: fixes for ptest support Upstream-Status: Inappropriate [OE ptest specific] Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + --- test/Makefile.in | 2 +- test/odbcini-gen.sh | 8 ++++---- - test/runsuite.c | 26 +++++++++++++------------- - 3 files changed, 18 insertions(+), 18 deletions(-) + test/runsuite.c | 20 ++++++++++---------- + 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/test/Makefile.in b/test/Makefile.in -index 8710616..fcb470e 100644 +index 3f9a9af..09406ae 100644 --- a/test/Makefile.in +++ b/test/Makefile.in -@@ -18,7 +18,7 @@ CFLAGS = @CFLAGS@ +@@ -19,7 +19,7 @@ CPPFLAGS = @CPPFLAGS@ -I.. # config.h ODBC_CONFIG = @ODBC_CONFIG@ PROVE = @PROVE@ --LIBODBC := $(shell $(ODBC_CONFIG) --libs) +-LIBODBC = @LIBODBC@ +LIBODBC = -lodbc all: $(TESTBINS) runsuite reset-db diff --git a/test/odbcini-gen.sh b/test/odbcini-gen.sh -index d2c2c87..6068d9d 100755 +index 2eaba35..6555cdb 100755 --- a/test/odbcini-gen.sh +++ b/test/odbcini-gen.sh @@ -6,7 +6,7 @@ @@ -41,7 +45,7 @@ index d2c2c87..6068d9d 100755 driver=${drvr}.so if test ! -e $driver ; then driver=${drvr}.dll -@@ -33,10 +33,10 @@ Driver = psqlodbc test driver +@@ -52,10 +52,10 @@ Driver = PostgreSQL Unicode Trace = No TraceFile = Database = contrib_regression @@ -56,10 +60,10 @@ index d2c2c87..6068d9d 100755 RowVersioning = No ShowSystemTables = No diff --git a/test/runsuite.c b/test/runsuite.c -index 583cf35..fd2a90e 100644 +index 3be5732..cd842dc 100644 --- a/test/runsuite.c +++ b/test/runsuite.c -@@ -51,7 +51,7 @@ bailout(const char *fmt, ...) +@@ -55,7 +55,7 @@ bailout(const char *fmt, ...) /* Given a test program's name, get the test name */ void @@ -68,7 +72,7 @@ index 583cf35..fd2a90e 100644 { const char *basename; #ifdef WIN32 -@@ -65,7 +65,7 @@ parse_argument(const char *in, char *testname, char *binname) +@@ -69,7 +69,7 @@ parse_argument(const char *in, char *testname, char *binname) if (strchr(in, DIR_SEP) == NULL) { strcpy(testname, in); @@ -77,7 +81,7 @@ index 583cf35..fd2a90e 100644 return; } -@@ -127,7 +127,7 @@ int main(int argc, char **argv) +@@ -131,7 +131,7 @@ int main(int argc, char **argv) failures = 0; for (i = 1, j = 1; i <= numtests; i++, j++) { @@ -86,7 +90,7 @@ index 583cf35..fd2a90e 100644 if (runtest(binname, testname, i, inputdir) != 0) failures++; } -@@ -157,29 +157,29 @@ runtest(const char *binname, const char *testname, int testno, const char *input +@@ -161,29 +161,29 @@ runtest(const char *binname, const char *testname, int testno, const char *input #ifndef WIN32 snprintf(cmdline, sizeof(cmdline), "ODBCSYSINI=. ODBCINSTINI=./odbcinst.ini ODBCINI=./odbc.ini " @@ -123,26 +127,3 @@ index 583cf35..fd2a90e 100644 ret = 0; } fflush(stdout); -@@ -196,7 +196,7 @@ rundiff(const char *testname, const char *inputdir) - char *result; - size_t result_len; - -- snprintf(filename, sizeof(filename), "results/%s.out", testname); -+ snprintf(filename, sizeof(filename), "%s/results/%s.out", inputdir, testname); - result = slurpfile(filename, &result_len); - - outputno = 0; -@@ -244,8 +244,8 @@ rundiff(const char *testname, const char *inputdir) - * files and print the smallest diff? - */ - snprintf(cmdline, sizeof(cmdline), -- "diff -c %s/expected/%s.out results/%s.out >> regression.diffs", -- inputdir, testname, testname); -+ "diff -c %s/expected/%s.out %s/results/%s.out >> regression.diffs", -+ inputdir, testname, inputdir, testname); - if (system(cmdline) == -1) - printf("# diff failed\n"); - --- -2.8.2 - diff --git a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch index 1d988182e7..9131d70be6 100644 --- a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch +++ b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch @@ -1,3 +1,6 @@ +From 8ca6b0c72b6b933642ec7c4ebb83734244fec46f Mon Sep 17 00:00:00 2001 +From: "Song.Li" <Song.Li@windriver.com> +Date: Tue, 5 Sep 2017 10:24:10 +0800 Subject: [PATCH] remove some checks for cross-compiling some lib check is not suitable for @@ -8,15 +11,16 @@ Upstream-Status: Inappropriate [not a real bug,just for cross-compiling] Signed-off-by: Song.Li <Song.Li@windriver.com> Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + --- - configure.ac | 66 +++++++----------------------------------------------------- - 1 file changed, 7 insertions(+), 59 deletions(-) + configure.ac | 80 +++++----------------------------------------------- + 1 file changed, 7 insertions(+), 73 deletions(-) diff --git a/configure.ac b/configure.ac -index df5ad7a..b72bd4c 100644 +index 7f79563..00b359e 100644 --- a/configure.ac +++ b/configure.ac -@@ -46,57 +46,19 @@ AC_ARG_WITH(iodbc, [ --with-iodbc[[=DIR]] [[default=no]] DIR is the iODBC bas +@@ -57,71 +57,20 @@ AC_ARG_WITH(iodbc, [ --with-iodbc[[=DIR]] [[default=no]] DIR is the iODBC bas if test "$with_iodbc" != no; then with_unixodbc=no AC_DEFINE(WITH_IODBC, 1, [Define to 1 to build with iODBC support]) @@ -34,6 +38,7 @@ index df5ad7a..b72bd4c 100644 - fi fi + wo_odbc_config=__without_odbc_config if test "$with_unixodbc" != no; then AC_DEFINE(WITH_UNIXODBC, 1, [Define to 1 to build with unixODBC support]) @@ -42,7 +47,9 @@ index df5ad7a..b72bd4c 100644 - else - ODBC_CONFIG=$with_unixodbc - fi -- if test ! -x "${ODBC_CONFIG}/bin/odbc_config"; then +- if test "${ODBC_CONFIG}" = "${wo_odbc_config}"; then +- : +- elif test ! -x "${ODBC_CONFIG}/bin/odbc_config"; then - if test ! -x "${ODBC_CONFIG}"; then - AC_MSG_ERROR([odbc_config not found (required for unixODBC build)]) - fi @@ -62,22 +69,33 @@ index df5ad7a..b72bd4c 100644 - # Linking libiodoc is rather problematic - [ODBC_LIBDIR=`${ODBC_CONFIG} --libs | sed -e "s/^\(-L\|.*[ \t]-L\)\([^ \n\r\f\t]*\).*$/-L\2/"`] - LDFLAGS="$LDFLAGS ${ODBC_LIBDIR}" +- LIBODBC=`${ODBC_CONFIG} --libs` # for regression test +- elif test "${ODBC_CONFIG}" = "${wo_odbc_config}"; then +- ODBC_INCLUDE=/usr/include +- CPPFLAGS="$CPPFLAGS -I${ODBC_INCLUDE}" +- ODBC_LIBDiR="" +- LIBODBC="-lodbc" # for regression test - else - ODBC_INCLUDE=`${ODBC_CONFIG} --include-prefix` - CPPFLAGS="$CPPFLAGS -I${ODBC_INCLUDE}" -- # Linking libodoc is rather problematic +- # Linking libodbc is rather problematic - ODBC_LIBDIR=`${ODBC_CONFIG} --lib-prefix` -- LDFLAGS="$LDFLAGS -L${ODBC_LIBDIR}" +- if test "${ODBC_LIBDIR}" != ""; then +- LDFLAGS="$LDFLAGS -L${ODBC_LIBDIR}" +- fi +- LIBODBC=`${ODBC_CONFIG} --libs` # for regression test - fi - AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBDIR]) +- AC_MSG_NOTICE([using $LIBODBC for regression test]) -fi +-AC_SUBST(LIBODBC) +ODBC_LIBS="-lodbcinst" +LIBS="$LIBS ${ODBC_LIBS}" +AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBS]) # # SQLCOLATTRIBUTE_SQLLEN check -@@ -176,18 +138,10 @@ PGAC_ARG_BOOL(enable, pthreads, yes, +@@ -190,19 +139,10 @@ PGAC_ARG_BOOL(enable, pthreads, yes, # Find libpq headers and libraries # @@ -87,8 +105,9 @@ index df5ad7a..b72bd4c 100644 - -if test -n "$PG_CONFIG"; then - pg_includedir=`"$PG_CONFIG" --includedir` +- pg_pkg_includedir=`"$PG_CONFIG" --pkgincludedir` - pg_libdir=`"$PG_CONFIG" --libdir` -- CPPFLAGS="$CPPFLAGS -I$pg_includedir" +- CPPFLAGS="$CPPFLAGS -I$pg_includedir -I$pg_pkg_includedir/internal" - LDFLAGS="$LDFLAGS -L$pg_libdir" -fi - @@ -100,7 +119,7 @@ index df5ad7a..b72bd4c 100644 # 1. Programs -@@ -211,12 +165,6 @@ if test "$with_iodbc" != no; then +@@ -226,12 +166,6 @@ if test "$with_iodbc" != no; then [AC_MSG_ERROR([iODBC library "iodbcinst" not found])]) fi @@ -113,6 +132,3 @@ index df5ad7a..b72bd4c 100644 AC_CHECK_LIB(pq, PQsetSingleRowMode, [], [AC_MSG_ERROR([libpq library version >= 9.2 is required])]) --- -2.8.1 - diff --git a/meta-oe/recipes-dbs/psqlodbc/psqlodbc_09.05.0300.bb b/meta-oe/recipes-dbs/psqlodbc/psqlodbc_09.05.0300.bb deleted file mode 100644 index 6e1c8ab4a0..0000000000 --- a/meta-oe/recipes-dbs/psqlodbc/psqlodbc_09.05.0300.bb +++ /dev/null @@ -1,14 +0,0 @@ -require ${PN}.inc - -LICENSE = "LGPLv2" -LIC_FILES_CHKSUM = "file://license.txt;md5=6db3822fc7512e83087ba798da013692" - -SRC_URI = "http://ftp.postgresql.org/pub/odbc/versions/src/${BPN}-${PV}.tar.gz \ - file://psqlodbc-remove-some-checks-for-cross-compiling.patch \ - file://psqlodbc-donot-use-the-hardcode-libdir.patch \ - file://psqlodbc-fix-for-ptest-support.patch \ - file://run-ptest \ -" - -SRC_URI[md5sum] = "4c6e0b22187d7bb1c998ffac89e50f6b" -SRC_URI[sha256sum] = "9521f328bf28aaaf5c8488dc89792b614f9d6271742c0baf9bb41c97537764a8" diff --git a/meta-oe/recipes-dbs/psqlodbc/psqlodbc.inc b/meta-oe/recipes-dbs/psqlodbc/psqlodbc_15.00.0000.bb index 5337b45695..be79caef0b 100644 --- a/meta-oe/recipes-dbs/psqlodbc/psqlodbc.inc +++ b/meta-oe/recipes-dbs/psqlodbc/psqlodbc_15.00.0000.bb @@ -14,7 +14,19 @@ DESCRIPTION = "\ software to accept ODBC clients. \ " SECTION = "libs" -HOMEPAGE = "http://psqlodbc.projects.postgresql.org/" +HOMEPAGE = "https://odbc.postgresql.org/" + +LICENSE = "LGPL-2.0-only" +LIC_FILES_CHKSUM = "file://license.txt;md5=6db3822fc7512e83087ba798da013692" + +SRC_URI = "http://ftp.postgresql.org/pub/odbc/versions/src/${BPN}-${PV}.tar.gz \ + file://psqlodbc-remove-some-checks-for-cross-compiling.patch \ + file://psqlodbc-donot-use-the-hardcode-libdir.patch \ + file://psqlodbc-fix-for-ptest-support.patch \ + file://run-ptest \ +" + +SRC_URI[sha256sum] = "ca57d6349532ea7fb4fae17bbfc107abe5a155ca2f43446315f9e23764b3f8ec" DEPENDS += "postgresql unixodbc" @@ -24,8 +36,7 @@ EXTRA_OECONF = "\ --with-unixodbc=yes \ --with-libpq=${STAGING_LIBDIR}/.. \ --enable-pthreads \ - --disable-unicode \ - LIBS="-lpthread" \ + LIBS='-lpthread' \ " inherit autotools pkgconfig ptest @@ -44,7 +55,8 @@ do_install_ptest() { sed -i -e 's|@LIBDIR@|${libdir}|' ${D}${PTEST_PATH}/odbcini-gen.sh } -FILES_${PN} += "${libdir}" +FILES:${PN} += "${libdir}" # The tests need a local PostgreSQL server running -RDEPENDS_${PN}-ptest = "postgresql" +RDEPENDS:${PN}-ptest = "postgresql" + diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-Add-missing-includes-cstdint-and-cstdio.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-Add-missing-includes-cstdint-and-cstdio.patch new file mode 100644 index 0000000000..a177ce28b9 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-Add-missing-includes-cstdint-and-cstdio.patch @@ -0,0 +1,70 @@ +From 6e376601c990abaa5e261d1311f92acb3b370b8f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 24 Jan 2023 21:40:43 -0800 +Subject: [PATCH] Add missing includes <cstdint> and <cstdio> + +This is needed with GCC 13 and newer [1] + +[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html + +Upstream-Status: Backport [https://github.com/facebook/rocksdb/commit/88edfbfb5e1cac228f7cc31fbec24bb637fe54b1] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + .../rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h | 1 + + storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h | 1 + + .../rocksdb/rocksdb/table/block_based/data_block_hash_index.h | 1 + + storage/rocksdb/rocksdb/util/slice.cc | 1 + + storage/rocksdb/rocksdb/util/string_util.h | 1 + + tpool/aio_linux.cc | 1 + + 6 files changed, 6 insertions(+) + +--- a/db/compaction/compaction_iteration_stats.h ++++ b/db/compaction/compaction_iteration_stats.h +@@ -7,6 +7,7 @@ + + #include <cstdint> + ++#include <cstdint> + #include "rocksdb/rocksdb_namespace.h" + + namespace ROCKSDB_NAMESPACE { +--- a/include/rocksdb/utilities/checkpoint.h ++++ b/include/rocksdb/utilities/checkpoint.h +@@ -8,6 +8,7 @@ + #pragma once + #ifndef ROCKSDB_LITE + ++#include <cstdint> + #include <string> + #include <vector> + +--- a/table/block_based/data_block_hash_index.h ++++ b/table/block_based/data_block_hash_index.h +@@ -5,6 +5,7 @@ + + #pragma once + ++#include <cstdint> + #include <string> + #include <vector> + +--- a/util/slice.cc ++++ b/util/slice.cc +@@ -12,6 +12,7 @@ + #include <stdio.h> + + #include <algorithm> ++#include <cstdint> + + #include "rocksdb/convenience.h" + #include "rocksdb/slice_transform.h" +--- a/util/string_util.h ++++ b/util/string_util.h +@@ -6,6 +6,7 @@ + + #pragma once + ++#include <cstdint> + #include <sstream> + #include <string> + #include <unordered_map> diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch new file mode 100644 index 0000000000..0fe9c12766 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch @@ -0,0 +1,114 @@ +From cf168ae0b7bceab8432d096719b331f18428fe39 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 18 Mar 2020 15:10:37 -0700 +Subject: [PATCH] cmake: Add check for atomic support + +Detect if libatomic should be linked in or compiler and platform can +provide the needed atomic instrinsics, this helps build on certain +platforms like mips or clang/i386 + +Fixes + +| /mnt/b/yoe/build/tmp/work/mips32r2-yoe-linux/rocksdb/6.6.4-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: librocksdb.so.6.6.4: undefined reference to `__atomic_exchange_8' +| /mnt/b/yoe/build/tmp/work/mips32r2-yoe-linux/rocksdb/6.6.4-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: librocksdb.so.6.6.4: undefined reference to `__atomic_fetch_or_8' +| /mnt/b/yoe/build/tmp/work/mips32r2-yoe-linux/rocksdb/6.6.4-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: librocksdb.so.6.6.4: undefined reference to `__atomic_compare_exchange_8' +| /mnt/b/yoe/build/tmp/work/mips32r2-yoe-linux/rocksdb/6.6.4-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: librocksdb.so.6.6.4: undefined reference to `__atomic_fetch_sub_8' +| /mnt/b/yoe/build/tmp/work/mips32r2-yoe-linux/rocksdb/6.6.4-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: librocksdb.so.6.6.4: undefined reference to `__atomic_load_8' +| /mnt/b/yoe/build/tmp/work/mips32r2-yoe-linux/rocksdb/6.6.4-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: librocksdb.so.6.6.4: undefined reference to `__atomic_store_8' +| /mnt/b/yoe/build/tmp/work/mips32r2-yoe-linux/rocksdb/6.6.4-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: librocksdb.so.6.6.4: undefined reference to `__atomic_fetch_add_8' + +Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/6555] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + CMakeLists.txt | 5 +++ + cmake/modules/CheckAtomic.cmake | 69 +++++++++++++++++++++++++++++++++ + 2 files changed, 74 insertions(+) + create mode 100644 cmake/modules/CheckAtomic.cmake + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1057,7 +1057,12 @@ set(ROCKSDB_SHARED_LIB rocksdb-shared${A + if(WIN32) + set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib) + else() ++ # check if linking against libatomic is necessary ++ include(CheckAtomic) + set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT}) ++ if(HAVE_CXX_ATOMIC_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB) ++ set(SYSTEM_LIBS ${SYSTEM_LIBS} atomic) ++ endif() + endif() + + set(ROCKSDB_PLUGIN_EXTERNS "") +--- /dev/null ++++ b/cmake/modules/CheckAtomic.cmake +@@ -0,0 +1,69 @@ ++# Checks if atomic operations are supported natively or if linking against ++# libatomic is needed. ++ ++# Check inspired by LLVMs cmake/modules/CheckAtomic.cmake ++ ++INCLUDE(CheckCXXSourceCompiles) ++INCLUDE(CheckLibraryExists) ++ ++function(check_working_cxx_atomics varname) ++ set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) ++ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++11") ++ CHECK_CXX_SOURCE_COMPILES(" ++#include <atomic> ++std::atomic<int> x; ++int main() { ++ return x; ++} ++" ${varname}) ++ set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) ++endfunction(check_working_cxx_atomics) ++ ++function(check_working_cxx_atomics64 varname) ++ set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) ++ set(CMAKE_REQUIRED_FLAGS "-std=c++11 ${CMAKE_REQUIRED_FLAGS}") ++ CHECK_CXX_SOURCE_COMPILES(" ++#include <atomic> ++#include <cstdint> ++std::atomic<uint64_t> x (0); ++std::atomic<double> y (0); ++int main() { ++ uint64_t i = x.load(std::memory_order_relaxed); ++ return int(y); ++} ++" ${varname}) ++ set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) ++endfunction(check_working_cxx_atomics64) ++ ++# Check if atomics work without libatomic ++check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB) ++ ++if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB) ++ check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC) ++ if( HAVE_LIBATOMIC ) ++ list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic") ++ check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITH_LIB) ++ if (NOT HAVE_CXX_ATOMICS_WITH_LIB) ++ message(FATAL_ERROR "Host compiler must support std::atomic!") ++ endif() ++ else() ++ message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.") ++ endif() ++endif() ++ ++# Check if 64bit atomics work without libatomic ++check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB) ++ ++if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB) ++ check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64) ++ if(HAVE_CXX_LIBATOMICS64) ++ list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic") ++ check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITH_LIB) ++ if (NOT HAVE_CXX_ATOMICS64_WITH_LIB) ++ message(FATAL_ERROR "Host compiler must support std::atomic!") ++ endif() ++ else() ++ message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.") ++ endif() ++endif() ++ diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch new file mode 100644 index 0000000000..e521854439 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch @@ -0,0 +1,33 @@ +From cedc84a8db468d0b6652e78a8a6667e655586b53 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 26 Jan 2023 13:00:43 -0800 +Subject: [PATCH] cmake: Do not add -msse4.2 -mpclmul on clang + +When testcase is compiled with clang and -msse4.2 -mpclmul is added to +cxxflags then clang -m32 still ends up compiling the test case which is +not correct for i386, therefore depend on yocto to pass the right flags +from environemnt via cflags rather than manufecture them here + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dbef059028..981545a4e0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -290,7 +290,7 @@ endif() + + include(CheckCXXSourceCompiles) + set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) +-if(NOT MSVC) ++if(NOT MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CMAKE_REQUIRED_FLAGS "-msse4.2 -mpclmul") + endif() + +-- +2.39.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch new file mode 100644 index 0000000000..706e0868e5 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch @@ -0,0 +1,29 @@ +From 46a4e585175cac8d76bd0b64f0fc27c9e22f04a1 Mon Sep 17 00:00:00 2001 +From: Pascal Bach <pascal.bach@nextrem.ch> +Date: Mon, 12 Oct 2020 21:22:46 +0200 +Subject: [PATCH] cmake: Use exported target for bz2 + +Without this change, CMake puts the entire path into the generated file. +This is not portable and makes it fail in environment like Yocto. + +Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541] +--- + CMakeLists.txt | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -154,12 +154,7 @@ else() + if(WITH_BZ2) + find_package(BZip2 REQUIRED) + add_definitions(-DBZIP2) +- if(BZIP2_INCLUDE_DIRS) +- include_directories(${BZIP2_INCLUDE_DIRS}) +- else() +- include_directories(${BZIP2_INCLUDE_DIR}) +- endif() +- list(APPEND THIRDPARTY_LIBS ${BZIP2_LIBRARIES}) ++ list(APPEND THIRDPARTY_LIBS BZip2::BZip2) + endif() + + if(WITH_LZ4) diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch new file mode 100644 index 0000000000..c98623360f --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch @@ -0,0 +1,61 @@ +From 114c42fba3fc86119710e8dd1bb2b7a9e39e3064 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 17 Jun 2021 19:35:01 -0700 +Subject: [PATCH] replace old sync with new atomic builtin equivalents + +Helps compiling with gcc on newer arches e.g. riscv32 where these +__sync* builtins are not implemented atleast for 64bit values + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + .../range/range_tree/lib/portability/toku_atomic.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h ++++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h +@@ -77,37 +77,37 @@ template <typename T, typename U> + __attribute__((always_inline)) static inline T toku_sync_fetch_and_add(T *addr, + U diff) { + paranoid_invariant(!crosses_boundary(addr, sizeof *addr)); +- return __sync_fetch_and_add(addr, diff); ++ return __atomic_fetch_add(addr, diff, 5); + } + template <typename T, typename U> + __attribute__((always_inline)) static inline T toku_sync_add_and_fetch(T *addr, + U diff) { + paranoid_invariant(!crosses_boundary(addr, sizeof *addr)); +- return __sync_add_and_fetch(addr, diff); ++ return __atomic_add_fetch(addr, diff, 5); + } + template <typename T, typename U> + __attribute__((always_inline)) static inline T toku_sync_fetch_and_sub(T *addr, + U diff) { + paranoid_invariant(!crosses_boundary(addr, sizeof *addr)); +- return __sync_fetch_and_sub(addr, diff); ++ return __atomic_fetch_sub(addr, diff, 5); + } + template <typename T, typename U> + __attribute__((always_inline)) static inline T toku_sync_sub_and_fetch(T *addr, + U diff) { + paranoid_invariant(!crosses_boundary(addr, sizeof *addr)); +- return __sync_sub_and_fetch(addr, diff); ++ return __atomic_sub_fetch(addr, diff, 5); + } + template <typename T, typename U, typename V> + __attribute__((always_inline)) static inline T toku_sync_val_compare_and_swap( + T *addr, U oldval, V newval) { + paranoid_invariant(!crosses_boundary(addr, sizeof *addr)); +- return __sync_val_compare_and_swap(addr, oldval, newval); ++ return __atomic_compare_exchange(addr, oldval, newval); + } + template <typename T, typename U, typename V> + __attribute__((always_inline)) static inline bool + toku_sync_bool_compare_and_swap(T *addr, U oldval, V newval) { + paranoid_invariant(!crosses_boundary(addr, sizeof *addr)); +- return __sync_bool_compare_and_swap(addr, oldval, newval); ++ return static_cast<bool>(__atomic_compare_exchange(addr, oldval, newval)); + } + + // in case you include this but not toku_portability.h diff --git a/meta-oe/recipes-dbs/rocksdb/files/arm.patch b/meta-oe/recipes-dbs/rocksdb/files/arm.patch new file mode 100644 index 0000000000..3066aa8279 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/arm.patch @@ -0,0 +1,28 @@ +Upstream-Status: Pending + +implement timer for arm >= v6 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h ++++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +@@ -164,6 +164,20 @@ static inline tokutime_t toku_time_now(v + struct timeval tv; + gettimeofday(&tv, nullptr); + return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec; ++#elif (__ARM_ARCH >= 6) ++ uint32_t pmccntr; ++ uint32_t pmuseren; ++ uint32_t pmcntenset; ++ // Read the user mode perf monitor counter access permissions. ++ asm volatile("mrc p15, 0, %0, c9, c14, 0" : "=r"(pmuseren)); ++ if (pmuseren & 1) { // Allows reading perfmon counters for user mode code. ++ asm volatile("mrc p15, 0, %0, c9, c12, 1" : "=r"(pmcntenset)); ++ if (pmcntenset & 0x80000000ul) { // Is it counting? ++ asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r"(pmccntr)); ++ // The counter is set up to count every 64th cycle ++ return (uint64_t)pmccntr * 64; // Should optimize to << 6 ++ } ++ } + #else + #error No timer implementation for this platform + #endif diff --git a/meta-oe/recipes-dbs/rocksdb/files/mips.patch b/meta-oe/recipes-dbs/rocksdb/files/mips.patch new file mode 100644 index 0000000000..cea70352d1 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/mips.patch @@ -0,0 +1,20 @@ +Upstream-Status: Pending + +implement timer implementation for mips platform + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h ++++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +@@ -158,6 +158,12 @@ static inline tokutime_t toku_time_now(v + uint64_t cycles; + asm volatile("rdcycle %0" : "=r"(cycles)); + return cycles; ++#elif defined(__mips__) ++ // mips apparently only allows rdtsc for superusers, so we fall ++ // back to gettimeofday. It's possible clock_gettime would be better. ++ struct timeval tv; ++ gettimeofday(&tv, nullptr); ++ return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec; + #else + #error No timer implementation for this platform + #endif diff --git a/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch b/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch new file mode 100644 index 0000000000..273b8fe2ed --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch @@ -0,0 +1,30 @@ +Upstream-Status: Pending + +implement support for musl/ppc64 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h ++++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +@@ -58,7 +58,7 @@ Copyright (c) 2006, 2015, Percona and/or + #include <stdint.h> + #include <sys/time.h> + #include <time.h> +-#if defined(__powerpc__) ++#if defined(__powerpc__) && defined(__GLIBC__) + #include <sys/platform/ppc.h> + #endif + +@@ -131,8 +131,12 @@ static inline tokutime_t toku_time_now(v + uint64_t result; + __asm __volatile__("mrs %[rt], cntvct_el0" : [rt] "=r"(result)); + return result; +-#elif defined(__powerpc__) ++#elif defined(__powerpc__) && defined(__GLIBC__) + return __ppc_get_timebase(); ++#elif defined(__powerpc64__) || defined(__ppc64__) ++ uint64_t result; ++ asm volatile("mfspr %0, 268" : "=r"(result)); ++ return result; + #elif defined(__s390x__) + uint64_t result; + asm volatile("stckf %0" : "=Q"(result) : : "cc"); diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_7.9.2.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_7.9.2.bb new file mode 100644 index 0000000000..8faaee40f6 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_7.9.2.bb @@ -0,0 +1,57 @@ +SUMMARY = "RocksDB an embeddable, persistent key-value store" +DESCRIPTION = "RocksDB is library that provides an embeddable, persistent key-value store for fast storage." +HOMEPAGE = "http://rocksdb.org/" +LICENSE = "(Apache-2.0 | GPL-2.0-only) & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837" + +SRCREV = "444b3f4845dd01b0d127c4b420fdd3b50ad56682" +SRCBRANCH = "7.9.fb" + +SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH};protocol=https \ + file://0001-cmake-Add-check-for-atomic-support.patch \ + file://0001-cmake-Use-exported-target-for-bz2.patch \ + file://0001-Add-missing-includes-cstdint-and-cstdio.patch \ + file://0001-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch \ + file://ppc64.patch \ + file://mips.patch \ + file://arm.patch \ + " + +SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" +SRC_URI:append:mips = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" +SRC_URI:append:powerpc = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" +SRC_URI:remove:toolchain-clang:riscv32 = "file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" + +S = "${WORKDIR}/git" + +inherit cmake + +PACKAGECONFIG ??= "bzip2 zlib lz4 gflags" +PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON,-DWITH_BZ2=OFF,bzip2" +PACKAGECONFIG[lz4] = "-DWITH_LZ4=ON,-DWITH_LZ4=OFF,lz4" +PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON,-DWITH_ZLIB=OFF,zlib" +PACKAGECONFIG[zstd] = "-DWITH_ZSTD=ON,-DWITH_ZSTD=OFF,zstd" +PACKAGECONFIG[lite] = "-DROCKSDB_LITE=ON,-DROCKSDB_LITE=OFF" +PACKAGECONFIG[gflags] = "-DWITH_GFLAGS=ON,-DWITH_GFLAGS=OFF,gflags" + +# Tools and tests currently don't compile on armv5 so we disable them +EXTRA_OECMAKE = "\ + -DPORTABLE=ON \ + -DWITH_TESTS=OFF \ + -DWITH_BENCHMARK_TOOLS=OFF \ + -DWITH_TOOLS=OFF \ + -DFAIL_ON_WARNINGS=OFF \ +" + +do_install:append() { + # fix for qa check buildpaths + sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/rocksdb/RocksDBTargets.cmake +} + +LDFLAGS:append:riscv64 = " -pthread" + +# Need toku_time_now() implemented for ppc/musl +# see utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +COMPATIBLE_HOST:libc-musl:powerpc = "null" diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb deleted file mode 100644 index ebe50a58ec..0000000000 --- a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "RocksDB an embeddable, persistent key-value store" -DESCRIPTION = "RocksDB is library that provides an embeddable, persistent key-value store for fast storage." -HOMEPAGE = "http://rocksdb.org/" -LICENSE = "(Apache-2.0 | GPL-2.0) & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837" - -SRCREV = "a1774dde9a5bd51bc6ece5988781c6f28cc69d48" -SRCBRANCH = "5.18.fb" -PV = "5.18.2" - -SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ - " - -S = "${WORKDIR}/git" - -inherit cmake - -PACKAGECONFIG ??= "bzip2 zlib lz4" -PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON -DBZIP2_LIBRARIES:STRING=bz2,-DWITH_BZ2=OFF,bzip2" -PACKAGECONFIG[lz4] = "-DWITH_LZ4=ON -DLZ4_LIBRARIES:STRING=lz4,-DWITH_LZ4=OFF,lz4" -PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON -DZLIB_LIBRARIES:STRING=z,-DWITH_ZLIB=OFF,zlib" -PACKAGECONFIG[lite] = "-DROCKSDB_LITE=ON,-DROCKSDB_LITE=OFF" - -# Tools and tests currently don't compile on armv5 so we disable them -EXTRA_OECMAKE = "\ - -DPORTABLE=ON \ - -DWITH_TESTS=OFF \ - -DWITH_TOOLS=OFF \ -" - -do_install_append() { - # fix for qa check buildpaths - sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/rocksdb/RocksDBTargets.cmake -} diff --git a/meta-oe/recipes-dbs/soci/soci/0001-Do-not-use-std-shuffle-with-clang-15.patch b/meta-oe/recipes-dbs/soci/soci/0001-Do-not-use-std-shuffle-with-clang-15.patch new file mode 100644 index 0000000000..eb29627c6d --- /dev/null +++ b/meta-oe/recipes-dbs/soci/soci/0001-Do-not-use-std-shuffle-with-clang-15.patch @@ -0,0 +1,32 @@ +From e5f72c656829402c6f70e7416039bc18f0c26485 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 30 Aug 2022 22:17:14 -0700 +Subject: [PATCH] Do not use std::shuffle with clang 15 + +This fails to compile although its preferred approach for c++11 and +newer + +See +https://github.com/SOCI/soci/issues/984 + +Upstream-Status: Inappropriate [Workaround] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + cmake/SociConfig.cmake | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cmake/SociConfig.cmake b/cmake/SociConfig.cmake +index 492e1837..f24fd9a6 100644 +--- a/cmake/SociConfig.cmake ++++ b/cmake/SociConfig.cmake +@@ -94,6 +94,7 @@ else() + set(SOCI_CXX11 ON) + set(SOCI_CXX_VERSION_FLAGS "-std=c++11") + add_definitions(-DCATCH_CONFIG_CPP11_NO_IS_ENUM) ++ add_definitions(-DCATCH_CONFIG_CPP11_NO_SHUFFLE) + + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SOCI_GCC_CLANG_COMMON_FLAGS} ${SOCI_CXX_VERSION_FLAGS}") + +-- +2.37.3 + diff --git a/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch b/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch deleted file mode 100644 index 00a1a5c862..0000000000 --- a/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch +++ /dev/null @@ -1,28 +0,0 @@ -Define SOCI_LIBDIR only if its not passed via environemnt. In OE we -want to set it per our choice since we use 'lib' for 64bit unless we -are using multilib - --Khem - -Index: soci-3.2.2/CMakeLists.txt -=================================================================== ---- soci-3.2.2.orig/CMakeLists.txt -+++ soci-3.2.2/CMakeLists.txt -@@ -69,11 +69,12 @@ include(SociDependencies) - ############################################################################### - # Installation - ############################################################################### -- --if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4) -- set(SOCI_LIBDIR "lib") --else() -- set(SOCI_LIBDIR "lib64") -+if(NOT DEFINED SOCI_LIBDIR) -+ if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4) -+ set(SOCI_LIBDIR "lib") -+ else() -+ set(SOCI_LIBDIR "lib") -+ endif() - endif() - - set(BINDIR "bin" CACHE PATH "The directory to install binaries into.") diff --git a/meta-oe/recipes-dbs/soci/soci_3.2.3.bb b/meta-oe/recipes-dbs/soci/soci_4.0.3.bb index 3f22d38181..71ab80c48a 100644 --- a/meta-oe/recipes-dbs/soci/soci_3.2.3.bb +++ b/meta-oe/recipes-dbs/soci/soci_4.0.3.bb @@ -1,6 +1,3 @@ -# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com> -# Released under the MIT license (see COPYING.MIT for the terms) - DESCRIPTION = "The C++ Database Access Library" HOMEPAGE = "http://soci.sourceforge.net" LICENSE = "BSL-1.0" @@ -8,12 +5,10 @@ LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c" SECTION = "libs" DEPENDS = "boost" - SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BP}/${BP}.tar.gz \ - file://soci_libdir.patch \ - " -SRC_URI[md5sum] = "acfbccf176cd20e06833a8037a2d3699" -SRC_URI[sha256sum] = "2c659db0f4f7b424bbcffe195c03c293a1dbf676189a27b077fb2aab4d53a610" + file://0001-Do-not-use-std-shuffle-with-clang-15.patch \ + " +SRC_URI[sha256sum] = "615e5f7e4b52007f3a3b4050a99aadf6346b56b5098eb08b3a650836083c6a33" TESTCONFIG = '-DSOCI_TEST_EMPTY_CONNSTR="dummy" -DSOCI_TEST_SQLITE3_CONNSTR="test.db" \ -DSOCI_TEST_POSTGRESQL_CONNSTR:STRING="dbname=soci_test" \ @@ -29,6 +24,7 @@ PACKAGECONFIG[postgresql] = "-DSOCI_POSTGRESQL=ON,-DSOCI_POSTGRESQL=OFF,postgres PACKAGECONFIG[odbc] = "-DSOCI_ODBC=ON,-DSOCI_ODBC=OFF,," PACKAGECONFIG[empty] = "-DSOCI_EMPTY=ON,-DSOCI_EMPTY=OFF,," PACKAGECONFIG[oracle] = "-DWITH_ORACLE=ON --with-oracle-include=${OINCDIR} --with-oracle-lib=${OLIBDIR},-DWITH_ORACLE=OFF,," +PACKAGECONFIG[firebird] = "-DWITH_FIREBIRD=ON,-DWITH_FIREBIRD=OFF,," PACKAGECONFIG[ptest] = "${TESTCONFIG},,," # enable your backend by default we enable 'empty' @@ -42,8 +38,8 @@ inherit dos2unix cmake PACKAGES += "${PN}-sqlite3 ${PN}-mysql ${PN}-postgresql ${PN}-odbc ${PN}-oracle" -FILES_${PN}-sqlite3 = "${libdir}/lib${BPN}_sqlite3.so.*" -FILES_${PN}-mysql = "${libdir}/lib${BPN}_mysql.so.*" -FILES_${PN}-postgresql = "${libdir}/lib${BPN}_postgresql.so.*" -FILES_${PN}-odbc = "${libdir}/lib${BPN}_odbc.so.*" -FILES_${PN}-oracle = "${libdir}/lib${BPN}_oracle.so.*" +FILES:${PN}-sqlite3 = "${libdir}/lib${BPN}_sqlite3.so.*" +FILES:${PN}-mysql = "${libdir}/lib${BPN}_mysql.so.*" +FILES:${PN}-postgresql = "${libdir}/lib${BPN}_postgresql.so.*" +FILES:${PN}-odbc = "${libdir}/lib${BPN}_odbc.so.*" +FILES:${PN}-oracle = "${libdir}/lib${BPN}_oracle.so.*" diff --git a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/0001-shell.c-Fix-format-not-a-string-literal-warning.patch b/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/0001-shell.c-Fix-format-not-a-string-literal-warning.patch deleted file mode 100644 index c5d7c0c81a..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/0001-shell.c-Fix-format-not-a-string-literal-warning.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 443980ddc82fb40e2e1f9544f2be169bd23dd246 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 17 Jun 2017 16:49:24 -0700 -Subject: [PATCH] shell.c: Fix format not a string literal warning - -src/shell.c:695:20: error: format not a string literal and no format arguments [-Werror=format-security] -| fprintf(stderr,zHelp); -| ^~~~~ - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/shell.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/shell.c b/src/shell.c -index bb46c49..3c6fe0f 100644 ---- a/src/shell.c -+++ b/src/shell.c -@@ -692,7 +692,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){ - }else - - if( c=='h' && strncmp(azArg[0], "help", n)==0 ){ -- fprintf(stderr,zHelp); -+ fprintf(stderr, "%s", zHelp); - }else - - if( c=='i' && strncmp(azArg[0], "indices", n)==0 && nArg>1 ){ --- -2.13.1 - diff --git a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch b/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch deleted file mode 100644 index 914422f1df..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -urN sqlite-2.8.17.orig/main.mk sqlite-2.8.17/main.mk ---- sqlite-2.8.17.orig/main.mk 2005-04-23 22:43:23.000000000 +0000 -+++ sqlite-2.8.17/main.mk 2009-04-02 20:10:36.000000000 +0000 -@@ -139,7 +139,7 @@ - # This is the default Makefile target. The objects listed here - # are what get build when you type just "make" with no arguments. - # --all: sqlite.h config.h libsqlite.a sqlite$(EXE) -+all: sqlite.h config.h libsqlite.so sqlite$(EXE) - - # Generate the file "last_change" which contains the date of change - # of the most recently modified source code file -@@ -148,13 +148,12 @@ - cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \ - | awk '{print $$5,$$6}' >last_change - --libsqlite.a: $(LIBOBJ) -- $(AR) libsqlite.a $(LIBOBJ) -- $(RANLIB) libsqlite.a -- --sqlite$(EXE): $(TOP)/src/shell.c libsqlite.a sqlite.h -- $(TCCX) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \ -- libsqlite.a $(LIBREADLINE) $(THREADLIB) -+libsqlite.so: $(LIBOBJ) -+ $(CC) $(LDFLAGS) -shared -o libsqlite.so -Wl,-soname,libsqlite.so.0 $(LIBOBJ) -+ -+sqlite$(EXE): $(TOP)/src/shell.c libsqlite.so sqlite.h -+ $(TCCX) $(LDFLAGS) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \ -+ -lsqlite $(LIBREADLINE) $(THREADLIB) - - sqlite_analyzer$(EXE): $(TOP)/src/tclsqlite.c libsqlite.a $(TESTSRC) \ - $(TOP)/tool/spaceanal.tcl diff --git a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch b/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch deleted file mode 100644 index b84b6486ef..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -bur sqlite-2.8.17~orig/main.mk sqlite-2.8.17/main.mk ---- sqlite-2.8.17~orig/main.mk 2006-02-13 04:09:33.000000000 -0600 -+++ sqlite-2.8.17/main.mk 2006-02-13 04:15:42.000000000 -0600 -@@ -58,7 +58,7 @@ - expr.o func.o hash.o insert.o \ - main.o opcodes.o os.o pager.o parse.o pragma.o printf.o random.o \ - select.o table.o tokenize.o trigger.o update.o util.o \ -- vacuum.o vdbe.o vdbeaux.o where.o tclsqlite.o -+ vacuum.o vdbe.o vdbeaux.o where.o - - # All of the source code files. - # -@@ -91,7 +91,6 @@ - $(TOP)/src/sqlite.h.in \ - $(TOP)/src/sqliteInt.h \ - $(TOP)/src/table.c \ -- $(TOP)/src/tclsqlite.c \ - $(TOP)/src/tokenize.c \ - $(TOP)/src/trigger.c \ - $(TOP)/src/update.c \ diff --git a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/sqlite.pc b/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/sqlite.pc deleted file mode 100644 index 6bc742eecb..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/sqlite.pc +++ /dev/null @@ -1,12 +0,0 @@ -# Package Information for pkg-config - -prefix=/usr -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include - -Name: SQLite -Description: SQL database engine -Version: 2.8.17 -Libs: -L${libdir} -lsqlite -Cflags: -I${includedir} diff --git a/meta-oe/recipes-dbs/sqlite/sqlite_2.8.17.bb b/meta-oe/recipes-dbs/sqlite/sqlite_2.8.17.bb deleted file mode 100644 index 501c0e3e77..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite_2.8.17.bb +++ /dev/null @@ -1,61 +0,0 @@ -SUMMARY = "An Embeddable SQL Database Engine" -HOMEPAGE = "http://www.sqlite.org/" -SECTION = "libs" -DEPENDS = "readline ncurses" -LICENSE = "PD" -LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=10;md5=e98469a8efa024a38ad5b2e4b92f4a96" - -PR = "r7" - -SRC_URI = "http://www.hwaci.com/sw/sqlite/sqlite-${PV}.tar.gz \ - file://mainmk_build_dynamic.patch \ - file://mainmk_no_tcl.patch \ - file://sqlite.pc \ - file://0001-shell.c-Fix-format-not-a-string-literal-warning.patch \ - " - -SOURCES = "attach.o auth.o btree.o btree_rb.o build.o copy.o date.o delete.o \ - expr.o func.o hash.o insert.o main.o opcodes.o os.o pager.o \ - parse.o pragma.o printf.o random.o select.o table.o tokenize.o \ - trigger.o update.o util.o vacuum.o vdbe.o vdbeaux.o where.o" - -inherit autotools pkgconfig - -do_configure() { - echo "main.mk is patched, no need to configure" - # make pkgconfig.bbclass pick this up - cp ${WORKDIR}/sqlite.pc ${S} -} - -do_compile() { - oe_runmake -f ${S}/Makefile.linux-gcc \ - TOP="${S}" \ - BCC="${BUILD_CC}" \ - TCC="${CC}" \ - OPTS="-fPIC -D'INTPTR_TYPE=int'" \ - TCL_FLAGS= LIBTCL= \ - READLINE_FLAGS="-DHAVE_READLINE=1 -I${STAGING_INCDIR}" \ - LIBREADLINE="-L. -L${STAGING_LIBDIR} -lreadline -lncurses" -} - -do_install() { - install -d ${D}${libdir} ${D}${bindir} - install sqlite ${D}${bindir} - install -m 0755 libsqlite.so ${D}${libdir}/libsqlite.so.0.8.6 - ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so - ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0 - ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0.8 - install -d ${D}${includedir} - install -m 0644 sqlite.h ${D}${includedir}/sqlite.h - install -d ${D}${libdir}/pkgconfig - install -m 0644 ${S}/sqlite.pc ${D}${libdir}/pkgconfig/sqlite.pc -} - -PACKAGES += "${PN}-bin" -FILES_${PN}-bin = "${bindir}/*" -FILES_${PN} = "${libdir}/*.so.*" - -SRC_URI[md5sum] = "838dbac20b56d2c4292e98848505a05b" -SRC_URI[sha256sum] = "3f35ebfb67867fb5b583a03e480f900206af637efe7179b32294a6a0cf806f37" - -BBCLASSEXTEND = "native" |