mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 14:32:59 +00:00
treewide: remove redundant patches and locks (#354215)
This commit is contained in:
commit
3b91a81423
@ -1,12 +0,0 @@
|
||||
diff --git a/intern/smoke/intern/WAVELET_NOISE.h b/intern/smoke/intern/WAVELET_NOISE.h
|
||||
index fce901b..1f73c5e 100644
|
||||
--- a/intern/smoke/intern/WAVELET_NOISE.h
|
||||
+++ b/intern/smoke/intern/WAVELET_NOISE.h
|
||||
@@ -43,6 +43,7 @@
|
||||
#ifndef WAVELET_NOISE_H
|
||||
#define WAVELET_NOISE_H
|
||||
|
||||
+#include <string.h>
|
||||
#include <MERSENNETWISTER.h>
|
||||
|
||||
#ifdef WIN32
|
@ -1,77 +0,0 @@
|
||||
From 9dd8048e28b65da0b904dfbace482f70ae768fd8 Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Muizelaar <jmuizelaar@mozilla.com>
|
||||
Date: Tue, 5 Mar 2024 04:12:28 +0100
|
||||
Subject: [PATCH] Bug 1882291. Switch to stdarch_arm_neon_intrinsics feature on
|
||||
rust >=1.78. r=glandium
|
||||
|
||||
We only need this on ARM32 because the ARM64 intrinsics are stable.
|
||||
|
||||
stdarch_arm_neon_intrinsics was split out from stdsimd here:
|
||||
https://github.com/rust-lang/stdarch/pull/1486
|
||||
|
||||
Differential Revision: https://phabricator.services.mozilla.com/D203039
|
||||
---
|
||||
Cargo.lock | 1 +
|
||||
gfx/qcms/Cargo.toml | 3 +++
|
||||
gfx/qcms/build.rs | 7 +++++++
|
||||
gfx/qcms/src/lib.rs | 6 ++++--
|
||||
4 files changed, 15 insertions(+), 2 deletions(-)
|
||||
create mode 100644 gfx/qcms/build.rs
|
||||
|
||||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index aba397832e..8f0a879a87 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -4276,6 +4276,7 @@ name = "qcms"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"libc",
|
||||
+ "version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
diff --git a/gfx/qcms/Cargo.toml b/gfx/qcms/Cargo.toml
|
||||
index e976054a7b..f50d6623a1 100644
|
||||
--- a/gfx/qcms/Cargo.toml
|
||||
+++ b/gfx/qcms/Cargo.toml
|
||||
@@ -20,3 +20,6 @@ cmyk = []
|
||||
|
||||
[dependencies]
|
||||
libc = {version = "0.2", optional = true }
|
||||
+
|
||||
+[build-dependencies]
|
||||
+version_check = "0.9"
|
||||
diff --git a/gfx/qcms/build.rs b/gfx/qcms/build.rs
|
||||
new file mode 100644
|
||||
index 0000000000..6810a8828e
|
||||
--- /dev/null
|
||||
+++ b/gfx/qcms/build.rs
|
||||
@@ -0,0 +1,7 @@
|
||||
+extern crate version_check as rustc;
|
||||
+
|
||||
+fn main() {
|
||||
+ if rustc::is_min_version("1.78.0").unwrap_or(false) {
|
||||
+ println!("cargo:rustc-cfg=stdsimd_split");
|
||||
+ }
|
||||
+}
|
||||
diff --git a/gfx/qcms/src/lib.rs b/gfx/qcms/src/lib.rs
|
||||
index c311964ee3..fc496816a8 100644
|
||||
--- a/gfx/qcms/src/lib.rs
|
||||
+++ b/gfx/qcms/src/lib.rs
|
||||
@@ -7,9 +7,11 @@
|
||||
#![allow(non_upper_case_globals)]
|
||||
// These are needed for the neon SIMD code and can be removed once the MSRV supports the
|
||||
// instrinsics we use
|
||||
-#![cfg_attr(feature = "neon", feature(stdsimd))]
|
||||
+#![cfg_attr(all(stdsimd_split, target_arch = "arm", feature = "neon"), feature(stdarch_arm_neon_intrinsics))]
|
||||
+#![cfg_attr(all(stdsimd_split, target_arch = "arm", feature = "neon"), feature(stdarch_arm_feature_detection))]
|
||||
+#![cfg_attr(all(not(stdsimd_split), target_arch = "arm", feature = "neon"), feature(stdsimd))]
|
||||
#![cfg_attr(
|
||||
- feature = "neon",
|
||||
+ all(target_arch = "arm", feature = "neon"),
|
||||
feature(arm_target_feature, raw_ref_op)
|
||||
|
||||
)]
|
||||
--
|
||||
2.44.0
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -1535,7 +1535,7 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
|
||||
|
||||
[[package]]
|
||||
name = "tiny"
|
||||
-version = "0.10.0"
|
||||
+version = "0.11.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"dirs",
|
@ -1,13 +0,0 @@
|
||||
diff --git c/src/cgraphicsscene.cpp i/src/cgraphicsscene.cpp
|
||||
index ac2929a..c399706 100644
|
||||
--- c/src/cgraphicsscene.cpp
|
||||
+++ i/src/cgraphicsscene.cpp
|
||||
@@ -1436,7 +1436,7 @@ namespace Caneda
|
||||
QPointF newPos = m_currentWiringWire->mapFromScene(pos);
|
||||
QPointF refPos = m_currentWiringWire->port1()->pos();
|
||||
|
||||
- if( abs(refPos.x()-newPos.x()) > abs(refPos.y()-newPos.y()) ) {
|
||||
+ if( (refPos.x()-newPos.x()) > (refPos.y()-newPos.y()) ) {
|
||||
m_currentWiringWire->movePort2(QPointF(newPos.x(), refPos.y()));
|
||||
}
|
||||
else {
|
@ -1,28 +0,0 @@
|
||||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index 5ae2bd6..e4c6f18 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -5676,9 +5676,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
-version = "0.3.34"
|
||||
+version = "0.3.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
|
||||
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
|
||||
dependencies = [
|
||||
"deranged",
|
||||
"itoa",
|
||||
@@ -5699,9 +5699,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
|
||||
|
||||
[[package]]
|
||||
name = "time-macros"
|
||||
-version = "0.2.17"
|
||||
+version = "0.2.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
|
||||
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
|
||||
dependencies = [
|
||||
"num-conv",
|
||||
"time-core",
|
File diff suppressed because it is too large
Load Diff
@ -1,61 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ab3884c..c0fd356 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -38,32 +38,23 @@ include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
${TOML++}
|
||||
- GIT_REPOSITORY "https://github.com/marzer/tomlplusplus.git"
|
||||
- GIT_SHALLOW ON
|
||||
- GIT_SUBMODULES ""
|
||||
- GIT_TAG "v3.3.0"
|
||||
+ DOWNLOAD_COMMAND true
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
${SOL2}
|
||||
- GIT_REPOSITORY "https://github.com/ThePhD/sol2.git"
|
||||
- GIT_SHALLOW ON
|
||||
- GIT_SUBMODULES ""
|
||||
- GIT_TAG "v3.3.0"
|
||||
+ DOWNLOAD_COMMAND true
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
${MAGIC_ENUM}
|
||||
- GIT_REPOSITORY "https://github.com/Neargye/magic_enum.git"
|
||||
- GIT_SHALLOW ON
|
||||
- GIT_SUBMODULES ""
|
||||
- GIT_TAG "v0.8.2"
|
||||
+ DOWNLOAD_COMMAND true
|
||||
)
|
||||
|
||||
FetchContent_GetProperties(${TOML++})
|
||||
if(NOT ${TOML++}_POPULATED)
|
||||
message(STATUS "Cloning ${TOML++}")
|
||||
- FetchContent_Populate(${TOML++})
|
||||
+ FetchContent_Populate(${TOML++})
|
||||
FetchContent_MakeAvailable(${TOML++})
|
||||
endif()
|
||||
|
||||
@@ -113,7 +104,7 @@ if(NOT LUA_INCLUDE_DIR OR (WIN32 AND NOT LUA_LIBRARIES))
|
||||
find_package(Lua)
|
||||
endif()
|
||||
|
||||
-include_directories(${LUA_INCLUDE_DIR} src src/include ${${TOML++}_SOURCE_DIR} ${${SOL2}_SOURCE_DIR}/include ${${MAGIC_ENUM}_SOURCE_DIR}/include)
|
||||
+include_directories(${LUA_INCLUDE_DIR} src src/include TOML_PLUS_PLUS_SRC ${${SOL2}_SOURCE_DIR}/include MAGIC_ENUM_SRC)
|
||||
|
||||
set(SOURCES
|
||||
src/toml.cpp
|
||||
@@ -129,8 +120,8 @@ source_group(src FILES ${SOURCES})
|
||||
|
||||
if(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
target_link_options(toml.lua PUBLIC ${PROJECT_SOURCE_DIR}\\libs\\lua51.lib)
|
||||
-else()
|
||||
- target_link_libraries(toml.lua ${LUA_LIBRARIES})
|
||||
+else()
|
||||
+ target_link_libraries(toml.lua ${LUA_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (LINK_FLAGS)
|
@ -1,23 +0,0 @@
|
||||
--- a/Makefile 2007-10-30 01:59:10.000000000 +0300
|
||||
+++ b/Makefile 2014-09-18 11:04:53.176320021 +0400
|
||||
@@ -6,10 +6,6 @@
|
||||
|
||||
include $(CONFIG)
|
||||
|
||||
-ifeq "$(LUA_VERSION_NUM)" "500"
|
||||
-COMPAT_O= $(COMPAT_DIR)/compat-5.1.o
|
||||
-endif
|
||||
-
|
||||
SRCS= src/lua$T.c
|
||||
OBJS= src/lua$T.o $(COMPAT_O)
|
||||
|
||||
@@ -19,9 +15,6 @@
|
||||
src/$(LIBNAME): $(OBJS)
|
||||
export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/$(LIBNAME) $(OBJS) -lzzip
|
||||
|
||||
-$(COMPAT_DIR)/compat-5.1.o: $(COMPAT_DIR)/compat-5.1.c
|
||||
- $(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c
|
||||
-
|
||||
install: src/$(LIBNAME)
|
||||
mkdir -p $(LUA_LIBDIR)
|
||||
cp src/$(LIBNAME) $(LUA_LIBDIR)
|
@ -1,14 +0,0 @@
|
||||
diff --git a/src/elf_locations.ml b/src/elf_locations.ml
|
||||
index a08b359..0db9274 100644
|
||||
--- a/src/elf_locations.ml
|
||||
+++ b/src/elf_locations.ml
|
||||
@@ -37,7 +37,8 @@ let resolve_from_dwarf t ~program_counter =
|
||||
| Some section ->
|
||||
let body = Owee_buf.cursor (Owee_elf.section_body t.map section) in
|
||||
let rec aux () =
|
||||
- match Owee_debug_line.read_chunk body with
|
||||
+ let pointers_to_other_sections = Owee_elf.debug_line_pointers t.map t.sections in
|
||||
+ match Owee_debug_line.read_chunk body ~pointers_to_other_sections with
|
||||
| None -> ()
|
||||
| Some (header, chunk) ->
|
||||
(* CR-soon mshinwell: fix owee .mli to note that [state] is
|
@ -1,51 +0,0 @@
|
||||
From cebc89b9328eab994f6b0314c263f94e7949a553 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Mon, 21 Feb 2022 10:58:57 +1030
|
||||
Subject: [PATCH] binutils 2.38 vs. ppc32 linux kernel
|
||||
|
||||
Commit b25f942e18d6 made .machine more strict. Weaken it again.
|
||||
|
||||
* config/tc-ppc.c (ppc_machine): Treat an early .machine specially,
|
||||
keeping sticky options to work around gcc bugs.
|
||||
---
|
||||
gas/config/tc-ppc.c | 25 ++++++++++++++++++++++++-
|
||||
1 file changed, 24 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
|
||||
index 054f9c72161..89bc7d3f9b9 100644
|
||||
--- a/gas/config/tc-ppc.c
|
||||
+++ b/gas/config/tc-ppc.c
|
||||
@@ -5965,7 +5965,30 @@ ppc_machine (int ignore ATTRIBUTE_UNUSED)
|
||||
options do not count as a new machine, instead they add
|
||||
to currently selected opcodes. */
|
||||
ppc_cpu_t machine_sticky = 0;
|
||||
- new_cpu = ppc_parse_cpu (ppc_cpu, &machine_sticky, cpu_string);
|
||||
+ /* Unfortunately, some versions of gcc emit a .machine
|
||||
+ directive very near the start of the compiler's assembly
|
||||
+ output file. This is bad because it overrides user -Wa
|
||||
+ cpu selection. Worse, there are versions of gcc that
|
||||
+ emit the *wrong* cpu, not even respecting the -mcpu given
|
||||
+ to gcc. See gcc pr101393. And to compound the problem,
|
||||
+ as of 20220222 gcc doesn't pass the correct cpu option to
|
||||
+ gas on the command line. See gcc pr59828. Hack around
|
||||
+ this by keeping sticky options for an early .machine. */
|
||||
+ asection *sec;
|
||||
+ for (sec = stdoutput->sections; sec != NULL; sec = sec->next)
|
||||
+ {
|
||||
+ segment_info_type *info = seg_info (sec);
|
||||
+ /* Are the frags for this section perturbed from their
|
||||
+ initial state? Even .align will count here. */
|
||||
+ if (info != NULL
|
||||
+ && (info->frchainP->frch_root != info->frchainP->frch_last
|
||||
+ || info->frchainP->frch_root->fr_type != rs_fill
|
||||
+ || info->frchainP->frch_root->fr_fix != 0))
|
||||
+ break;
|
||||
+ }
|
||||
+ new_cpu = ppc_parse_cpu (ppc_cpu,
|
||||
+ sec == NULL ? &sticky : &machine_sticky,
|
||||
+ cpu_string);
|
||||
if (new_cpu != 0)
|
||||
ppc_cpu = new_cpu;
|
||||
else
|
||||
--
|
||||
2.31.1
|
@ -1,10 +0,0 @@
|
||||
--- old/Makefile.conf 2014-05-19 16:53:09.263564921 +0200
|
||||
+++ new/Makefile.conf 2014-05-19 16:53:42.213152994 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
# Where binaries are installed:
|
||||
-BINDIR := `dirname \`which ocamlc\``
|
||||
+BINDIR := $(out)/bin
|
||||
|
||||
####
|
||||
|
@ -1,63 +0,0 @@
|
||||
diff --git a/src/spnavd.c b/src/spnavd.c
|
||||
index 2d4eca6..a5227ed 100644
|
||||
--- a/src/spnavd.c
|
||||
+++ b/src/spnavd.c
|
||||
@@ -27,6 +27,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <sys/select.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <pwd.h>
|
||||
#include "spnavd.h"
|
||||
#include "logger.h"
|
||||
#include "dev.h"
|
||||
@@ -47,13 +49,39 @@ static void handle_events(fd_set *rset);
|
||||
static void sig_handler(int s);
|
||||
static char *fix_path(char *str);
|
||||
|
||||
-static char *cfgfile = DEF_CFGFILE;
|
||||
+static char* config_path;
|
||||
+char* cfg_path()
|
||||
+{
|
||||
+ char* buf;
|
||||
+ if((buf = getenv("XDG_CONFIG_HOME"))) {
|
||||
+ if(config_path == NULL) {
|
||||
+ config_path = malloc(strlen(buf) + strlen("/spnavrc") + 1);
|
||||
+ if ( config_path != NULL) {
|
||||
+ sprintf(config_path, "%s/spnavrc", buf);
|
||||
+ }
|
||||
+ };
|
||||
+ return config_path;
|
||||
+ } else {
|
||||
+ if (!(buf = getenv("HOME"))) {
|
||||
+ struct passwd *pw = getpwuid(getuid());
|
||||
+ buf = pw->pw_dir;
|
||||
+ }
|
||||
+ config_path = malloc(strlen(buf) + strlen("/.config/spnavrc") + 1);
|
||||
+ if ( config_path != NULL) {
|
||||
+ sprintf(config_path, "%s/.config/spnavrc", buf);
|
||||
+ }
|
||||
+ return config_path;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static char *cfgfile = NULL;
|
||||
static char *logfile = DEF_LOGFILE;
|
||||
static char *pidpath = NULL;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int i, pid, ret, become_daemon = 1;
|
||||
+ cfgfile = cfg_path();
|
||||
|
||||
for(i=1; i<argc; i++) {
|
||||
if(argv[i][0] == '-') {
|
||||
@@ -247,7 +275,7 @@ static void print_usage(const char *argv0)
|
||||
printf("usage: %s [options]\n", argv0);
|
||||
printf("options:\n");
|
||||
printf(" -d: do not daemonize\n");
|
||||
- printf(" -c <file>: config file path (default: " DEF_CFGFILE ")\n");
|
||||
+ printf(" -c <file>: config file path (default: %s)\n", cfg_path());
|
||||
printf(" -l <file>|syslog: log file path or log to syslog (default: " DEF_LOGFILE ")\n");
|
||||
printf(" -v: verbose output\n");
|
||||
printf(" -V,-version: print version number and exit\n");
|
@ -1,82 +0,0 @@
|
||||
diff --git a/src/spnavd.c b/src/spnavd.c
|
||||
index 03080da..2d4eca6 100644
|
||||
--- a/src/spnavd.c
|
||||
+++ b/src/spnavd.c
|
||||
@@ -42,12 +42,14 @@ static void cleanup(void);
|
||||
static void daemonize(void);
|
||||
static int write_pid_file(void);
|
||||
static int find_running_daemon(void);
|
||||
+static char *pidfile_path(void);
|
||||
static void handle_events(fd_set *rset);
|
||||
static void sig_handler(int s);
|
||||
static char *fix_path(char *str);
|
||||
|
||||
static char *cfgfile = DEF_CFGFILE;
|
||||
static char *logfile = DEF_LOGFILE;
|
||||
+static char *pidpath = NULL;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
@@ -270,7 +272,7 @@ static void cleanup(void)
|
||||
remove_device(tmp);
|
||||
}
|
||||
|
||||
- remove(PIDFILE);
|
||||
+ remove(pidfile_path());
|
||||
}
|
||||
|
||||
static void daemonize(void)
|
||||
@@ -314,7 +316,7 @@ static int write_pid_file(void)
|
||||
FILE *fp;
|
||||
int pid = getpid();
|
||||
|
||||
- if(!(fp = fopen(PIDFILE, "w"))) {
|
||||
+ if(!(fp = fopen(pidfile_path(), "w"))) {
|
||||
return -1;
|
||||
}
|
||||
fprintf(fp, "%d\n", pid);
|
||||
@@ -329,7 +331,7 @@ static int find_running_daemon(void)
|
||||
struct sockaddr_un addr;
|
||||
|
||||
/* try to open the pid-file */
|
||||
- if(!(fp = fopen(PIDFILE, "r"))) {
|
||||
+ if(!(fp = fopen(pidfile_path(), "r"))) {
|
||||
return -1;
|
||||
}
|
||||
if(fscanf(fp, "%d\n", &pid) != 1) {
|
||||
@@ -356,6 +358,22 @@ static int find_running_daemon(void)
|
||||
return pid;
|
||||
}
|
||||
|
||||
+char *pidfile_path(void)
|
||||
+{
|
||||
+ char *xdg_runtime_dir;
|
||||
+ if((xdg_runtime_dir = getenv("XDG_RUNTIME_DIR"))) {
|
||||
+ if ( pidpath == NULL ) {
|
||||
+ pidpath = malloc(strlen(xdg_runtime_dir) + strlen("/spnavd.pid") + 1);
|
||||
+ if ( pidpath != NULL ) {
|
||||
+ sprintf(pidpath, "%s/spnavd.pid", xdg_runtime_dir);
|
||||
+ }
|
||||
+ };
|
||||
+ return pidpath;
|
||||
+ } else {
|
||||
+ return DEFAULT_PIDFILE;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void handle_events(fd_set *rset)
|
||||
{
|
||||
int dev_fd, hotplug_fd;
|
||||
diff --git a/src/spnavd.h b/src/spnavd.h
|
||||
index 2d1c48b..17d22d3 100644
|
||||
--- a/src/spnavd.h
|
||||
+++ b/src/spnavd.h
|
||||
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define DEF_CFGFILE "/etc/spnavrc"
|
||||
#define DEF_LOGFILE "/var/log/spnavd.log"
|
||||
|
||||
-#define PIDFILE "/var/run/spnavd.pid"
|
||||
+#define DEFAULT_PIDFILE "/run/spnavd.pid"
|
||||
#define DEFAULT_SOCK_NAME "/run/spnav.sock"
|
||||
#define SYSLOG_ID "spnavd"
|
||||
|
@ -1,118 +0,0 @@
|
||||
diff --git a/src/proto_unix.c b/src/proto_unix.c
|
||||
index 998f234..d38452c 100644
|
||||
--- a/src/proto_unix.c
|
||||
+++ b/src/proto_unix.c
|
||||
@@ -36,11 +36,14 @@ enum {
|
||||
|
||||
static int lsock = -1;
|
||||
|
||||
+static char *spath = NULL;
|
||||
+
|
||||
int init_unix(void)
|
||||
{
|
||||
int s;
|
||||
mode_t prev_umask;
|
||||
struct sockaddr_un addr;
|
||||
+ char *sock_path;
|
||||
|
||||
if(lsock >= 0) return 0;
|
||||
|
||||
@@ -49,16 +52,18 @@ int init_unix(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
- unlink(SOCK_NAME); /* in case it already exists */
|
||||
+ sock_path = socket_path();
|
||||
+
|
||||
+ unlink(sock_path); /* in case it already exists */
|
||||
|
||||
memset(&addr, 0, sizeof addr);
|
||||
addr.sun_family = AF_UNIX;
|
||||
- strcpy(addr.sun_path, SOCK_NAME);
|
||||
+ strcpy(addr.sun_path, sock_path);
|
||||
|
||||
prev_umask = umask(0);
|
||||
|
||||
if(bind(s, (struct sockaddr*)&addr, sizeof addr) == -1) {
|
||||
- logmsg(LOG_ERR, "failed to bind unix socket: %s: %s\n", SOCK_NAME, strerror(errno));
|
||||
+ logmsg(LOG_ERR, "failed to bind unix socket: %s: %s\n", sock_path, strerror(errno));
|
||||
close(s);
|
||||
return -1;
|
||||
}
|
||||
@@ -68,7 +73,7 @@ int init_unix(void)
|
||||
if(listen(s, 8) == -1) {
|
||||
logmsg(LOG_ERR, "listen failed: %s\n", strerror(errno));
|
||||
close(s);
|
||||
- unlink(SOCK_NAME);
|
||||
+ unlink(sock_path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -82,7 +87,7 @@ void close_unix(void)
|
||||
close(lsock);
|
||||
lsock = -1;
|
||||
|
||||
- unlink(SOCK_NAME);
|
||||
+ unlink(socket_path());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,3 +178,19 @@ int handle_uevents(fd_set *rset)
|
||||
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+char *socket_path(void)
|
||||
+{
|
||||
+ char *xdg_runtime_dir;
|
||||
+ if((xdg_runtime_dir = getenv("XDG_RUNTIME_DIR"))) {
|
||||
+ if ( spath == NULL ) {
|
||||
+ spath = malloc(strlen(xdg_runtime_dir) + strlen("/spnav.sock") + 1);
|
||||
+ if ( spath != NULL ) {
|
||||
+ sprintf(spath, "%s/spnav.sock", xdg_runtime_dir);
|
||||
+ }
|
||||
+ };
|
||||
+ return spath;
|
||||
+ } else {
|
||||
+ return DEFAULT_SOCK_NAME;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/proto_unix.h b/src/proto_unix.h
|
||||
index 045b379..ec4509c 100644
|
||||
--- a/src/proto_unix.h
|
||||
+++ b/src/proto_unix.h
|
||||
@@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "event.h"
|
||||
#include "client.h"
|
||||
|
||||
+char *socket_path(void);
|
||||
int init_unix(void);
|
||||
void close_unix(void);
|
||||
int get_unix_socket(void);
|
||||
diff --git a/src/spnavd.c b/src/spnavd.c
|
||||
index cbea191..03080da 100644
|
||||
--- a/src/spnavd.c
|
||||
+++ b/src/spnavd.c
|
||||
@@ -344,7 +344,7 @@ static int find_running_daemon(void)
|
||||
}
|
||||
memset(&addr, 0, sizeof addr);
|
||||
addr.sun_family = AF_UNIX;
|
||||
- strncpy(addr.sun_path, SOCK_NAME, sizeof addr.sun_path);
|
||||
+ strncpy(addr.sun_path, socket_path(), sizeof addr.sun_path);
|
||||
|
||||
if(connect(s, (struct sockaddr*)&addr, sizeof addr) == -1) {
|
||||
close(s);
|
||||
diff --git a/src/spnavd.h b/src/spnavd.h
|
||||
index fa0a916..2d1c48b 100644
|
||||
--- a/src/spnavd.h
|
||||
+++ b/src/spnavd.h
|
||||
@@ -26,8 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define DEF_CFGFILE "/etc/spnavrc"
|
||||
#define DEF_LOGFILE "/var/log/spnavd.log"
|
||||
|
||||
-#define SOCK_NAME "/var/run/spnav.sock"
|
||||
#define PIDFILE "/var/run/spnavd.pid"
|
||||
+#define DEFAULT_SOCK_NAME "/run/spnav.sock"
|
||||
#define SYSLOG_ID "spnavd"
|
||||
|
||||
/* Multiple devices support */
|
@ -1,64 +0,0 @@
|
||||
From b0f2b20b23780dd2e67a01c15462070dd86c4ac1 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Tojnar <jtojnar@gmail.com>
|
||||
Date: Sun, 3 Mar 2019 11:50:27 +0100
|
||||
Subject: [PATCH] build: Add datadir option for /usr/share
|
||||
|
||||
Hardcoded /usr/share does not work for platforms that do not have global /usr like Nix.
|
||||
Let’s introduce a new DATADIR option, that allows overriding the directory and use it for metainfodir.
|
||||
|
||||
While at it, let’s also use it for SHAREDIR and MANDIR for consistency,
|
||||
following the GNU directory convention:
|
||||
https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
|
||||
---
|
||||
SConstruct | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SConstruct b/SConstruct
|
||||
index 05755e4b..3fbdc1d8 100644
|
||||
--- a/SConstruct
|
||||
+++ b/SConstruct
|
||||
@@ -49,9 +49,10 @@
|
||||
PathVariable( "BINDIR", "Overwrite the directory where apps are installed to.", "$PREFIX/bin", PathVariable.PathAccept ),
|
||||
PathVariable( "LIBDIR", "Overwrite the directory where libs are installed to.", "$PREFIX/lib", PathVariable.PathAccept ),
|
||||
PathVariable( "INCLUDEDIR", "Overwrite the directory where headers are installed to.", "$PREFIX/include", PathVariable.PathAccept ),
|
||||
- PathVariable( "SHAREDIR", "Overwrite the directory where misc shared files are installed to.", "$PREFIX/share/libffado", PathVariable.PathAccept ),
|
||||
+ PathVariable( "DATADIR", "Overwrite the directory where platform-independent files are installed to.", "$PREFIX/share", PathVariable.PathAccept ),
|
||||
+ PathVariable( "SHAREDIR", "Overwrite the directory where misc shared files are installed to.", "$DATADIR/libffado", PathVariable.PathAccept ),
|
||||
PathVariable( "LIBDATADIR", "Location for architecture-dependent data.", "$LIBDIR/libffado", PathVariable.PathAccept ),
|
||||
- PathVariable( "MANDIR", "Overwrite the directory where manpages are installed", "$PREFIX/man", PathVariable.PathAccept ),
|
||||
+ PathVariable( "MANDIR", "Overwrite the directory where manpages are installed", "$DATADIR/man", PathVariable.PathAccept ),
|
||||
PathVariable( "PYPKGDIR", "The directory where the python modules get installed.",
|
||||
distutils.sysconfig.get_python_lib( prefix="$PREFIX" ), PathVariable.PathAccept ),
|
||||
PathVariable( "UDEVDIR", "Overwrite the directory where udev rules are installed to.", "/lib/udev/rules.d/", PathVariable.PathAccept ),
|
||||
@@ -523,6 +524,7 @@
|
||||
env['BINDIR'] = Template( env['BINDIR'] ).safe_substitute( env )
|
||||
env['LIBDIR'] = Template( env['LIBDIR'] ).safe_substitute( env )
|
||||
env['INCLUDEDIR'] = Template( env['INCLUDEDIR'] ).safe_substitute( env )
|
||||
+env['DATADIR'] = Template( env['DATADIR'] ).safe_substitute( env )
|
||||
env['SHAREDIR'] = Template( env['SHAREDIR'] ).safe_substitute( env )
|
||||
env['LIBDATADIR'] = Template( env['LIBDATADIR'] ).safe_substitute( env )
|
||||
env['UDEVDIR'] = Template( env['UDEVDIR'] ).safe_substitute( env )
|
||||
@@ -531,18 +533,21 @@
|
||||
env['bindir'] = Template( env.destdir + env['BINDIR'] ).safe_substitute( env )
|
||||
env['libdir'] = Template( env.destdir + env['LIBDIR'] ).safe_substitute( env )
|
||||
env['includedir'] = Template( env.destdir + env['INCLUDEDIR'] ).safe_substitute( env )
|
||||
+env['datadir'] = Template( env.destdir + env['DATADIR'] ).safe_substitute( env )
|
||||
env['sharedir'] = Template( env.destdir + env['SHAREDIR'] ).safe_substitute( env )
|
||||
env['libdatadir'] = Template( env.destdir + env['LIBDATADIR'] ).safe_substitute( env )
|
||||
env['mandir'] = Template( env.destdir + env['MANDIR'] ).safe_substitute( env )
|
||||
env['pypkgdir'] = Template( env.destdir + env['PYPKGDIR'] ).safe_substitute( env )
|
||||
env['udevdir'] = Template( env.destdir + env['UDEVDIR'] ).safe_substitute( env )
|
||||
env['PYPKGDIR'] = Template( env['PYPKGDIR'] ).safe_substitute( env )
|
||||
-env['metainfodir'] = Template( env.destdir + "/usr/share/metainfo" ).safe_substitute( env )
|
||||
-
|
||||
+env['metainfodir'] = Template( env.destdir + env['DATADIR'] + "/metainfo" ).safe_substitute( env )
|
||||
+
|
||||
+env.Command( target=env['datadir'], source="", action=Mkdir( env['datadir'] ) )
|
||||
env.Command( target=env['sharedir'], source="", action=Mkdir( env['sharedir'] ) )
|
||||
|
||||
env.Alias( "install", env['libdir'] )
|
||||
env.Alias( "install", env['includedir'] )
|
||||
+env.Alias( "install", env['datadir'] )
|
||||
env.Alias( "install", env['sharedir'] )
|
||||
env.Alias( "install", env['libdatadir'] )
|
||||
env.Alias( "install", env['bindir'] )
|
@ -1,13 +0,0 @@
|
||||
diff --git a/crypto/x509/x509_def.c b/crypto/x509/x509_def.c
|
||||
index d2bc3e5c1..329580075 100644
|
||||
--- a/crypto/x509/x509_def.c
|
||||
+++ b/crypto/x509/x509_def.c
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
#define X509_CERT_AREA OPENSSLDIR
|
||||
#define X509_CERT_DIR OPENSSLDIR "/certs"
|
||||
-#define X509_CERT_FILE OPENSSLDIR "/cert.pem"
|
||||
+#define X509_CERT_FILE "/etc/ssl/certs/ca-certificates.crt"
|
||||
#define X509_PRIVATE_DIR OPENSSLDIR "/private"
|
||||
#define X509_CERT_DIR_EVP "SSL_CERT_DIR"
|
||||
#define X509_CERT_FILE_EVP "SSL_CERT_FILE"
|
@ -1,13 +0,0 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c215f3bf..f5aa25d8 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -67,7 +67,7 @@ AC_C_BIGENDIAN
|
||||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LIBTOOL
|
||||
-AC_PATH_PROG([AR], [ar])
|
||||
+AC_PATH_TOOL([AR], [ar])
|
||||
AC_PATH_PROG([CAT], [cat])
|
||||
AC_PATH_PROG([CHMOD], [chmod])
|
||||
AC_PATH_PROG([CHOWN], [chown])
|
1016
pkgs/servers/monitoring/prometheus/Cargo.lock
generated
1016
pkgs/servers/monitoring/prometheus/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,12 +0,0 @@
|
||||
diff --git a/mk/run_test.sh b/mk/run_test.sh
|
||||
index 7e95df2ac..58420c317 100755
|
||||
--- a/mk/run_test.sh
|
||||
+++ b/mk/run_test.sh
|
||||
@@ -27,7 +27,6 @@ run_test "$1"
|
||||
# appear randomly without anyone knowing why.
|
||||
# See https://github.com/NixOS/nix/issues/3605 for more info
|
||||
if [[ $status -ne 0 && $status -ne 99 && \
|
||||
- "$(uname)" == "Darwin" && \
|
||||
"$log" =~ "unexpected EOF reading a line" \
|
||||
]]; then
|
||||
echo "$post_run_msg [${yellow}FAIL$normal] (possibly flaky, so will be retried)"
|
@ -1,13 +0,0 @@
|
||||
diff --git a/gl/stdint_.h b/gl/stdint_.h
|
||||
index bc27595..303e81a 100644
|
||||
--- a/gl/stdint_.h
|
||||
+++ b/gl/stdint_.h
|
||||
@@ -62,7 +62,7 @@
|
||||
int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
|
||||
<inttypes.h> also defines intptr_t and uintptr_t. */
|
||||
# define _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H
|
||||
-# include <inttypes.h>
|
||||
+// # include <inttypes.h>
|
||||
# undef _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H
|
||||
#elif @HAVE_SYS_INTTYPES_H@
|
||||
/* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
|
Loading…
Reference in New Issue
Block a user