aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/aria2-unbundle-wslay.patch54
-rw-r--r--gnu/packages/patches/go-gopkg-in-yaml-v3-32bit.patch50
-rw-r--r--gnu/packages/patches/scilab-hdf5-1.8-api.patch71
-rw-r--r--gnu/packages/patches/yggdrasil-extra-config.patch134
4 files changed, 148 insertions, 161 deletions
diff --git a/gnu/packages/patches/aria2-unbundle-wslay.patch b/gnu/packages/patches/aria2-unbundle-wslay.patch
new file mode 100644
index 0000000000..e3e534bbe1
--- /dev/null
+++ b/gnu/packages/patches/aria2-unbundle-wslay.patch
@@ -0,0 +1,54 @@
+This patch causes aria2 to depend on an external wslay.
+The wslay version was copied from the configure.ac in deps/wslay
+configure still needs to be deleted to update the script
+deps/wslay is no longer necessary and can also be removed
+
+diff --git a/Makefile.am b/Makefile.am
+index afe70a2..8c4d058 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = po lib deps src doc test
++SUBDIRS = po lib src doc test
+
+ ACLOCAL_AMFLAGS = -I m4 --install
+ RST2HTML = @RST2HTML@
+diff --git a/configure.ac b/configure.ac
+index 14b340f..74d5937 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1001,15 +1001,18 @@ if test "x$have_option_const_name" = "xyes"; then
+ fi
+
+ if test "x$enable_websocket" = "xyes"; then
+- AC_CONFIG_SUBDIRS([deps/wslay])
++ PKG_CHECK_MODULES([WSLAY], [libwslay >= 1.1.1], [have_wslay=yes], [have_wslay=no])
+ enable_websocket=yes
+ AC_DEFINE([ENABLE_WEBSOCKET], [1],
+ [Define 1 if WebSocket support is enabled.])
+- # $(top_srcdir) for `make distcheck`
+- WSLAY_CFLAGS="-I\$(top_builddir)/deps/wslay/lib/includes -I\$(top_srcdir)/deps/wslay/lib/includes"
+- WSLAY_LIBS="\$(top_builddir)/deps/wslay/lib/libwslay.la"
+- AC_SUBST([WSLAY_CFLAGS])
+- AC_SUBST([WSLAY_LIBS])
++ if test "x$have_wslay" = "xyes"; then
++ WSLAY_CFLAGS="$WSLAY_CFLAGS"
++ WSLAY_LIBS="$WSLAY_LIBS"
++ AC_SUBST([WSLAY_CFLAGS])
++ AC_SUBST([WSLAY_LIBS])
++ else
++ ARIA2_DEP_NOT_MET([wslay])
++ fi
+ fi
+ AM_CONDITIONAL([ENABLE_WEBSOCKET], [test "x$enable_websocket" = "xyes"])
+
+@@ -1071,8 +1074,7 @@ AC_CONFIG_FILES([Makefile
+ doc/manual-src/ru/Makefile
+ doc/manual-src/ru/conf.py
+ doc/manual-src/pt/Makefile
+- doc/manual-src/pt/conf.py
+- deps/Makefile])
++ doc/manual-src/pt/conf.py])
+ AC_OUTPUT
+
+ AC_MSG_NOTICE([summary of build options:
diff --git a/gnu/packages/patches/go-gopkg-in-yaml-v3-32bit.patch b/gnu/packages/patches/go-gopkg-in-yaml-v3-32bit.patch
new file mode 100644
index 0000000000..7a243f5d80
--- /dev/null
+++ b/gnu/packages/patches/go-gopkg-in-yaml-v3-32bit.patch
@@ -0,0 +1,50 @@
+https://sources.debian.org/src/golang-gopkg-yaml.v3/3.0.1-3/debian/patches/0001-Fix-0b-on-32-bit-systems.patch/
+
+From: Shengjing Zhu <zhsj@debian.org>
+Date: Fri, 16 Apr 2021 00:40:09 +0800
+Subject: Fix -0b on 32-bit systems
+
+Origin: backport, https://github.com/go-yaml/yaml/pull/442
+---
+ decode_test.go | 7 ++++---
+ resolve.go | 2 +-
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/decode_test.go b/decode_test.go
+index 51f5070..9cac74c 100644
+--- a/decode_test.go
++++ b/decode_test.go
+@@ -175,9 +175,6 @@ var unmarshalTests = []struct {
+ }, {
+ "bin: -0b101010",
+ map[string]interface{}{"bin": -42},
+- }, {
+- "bin: -0b1000000000000000000000000000000000000000000000000000000000000000",
+- map[string]interface{}{"bin": -9223372036854775808},
+ }, {
+ "decimal: +685_230",
+ map[string]int{"decimal": 685230},
+@@ -357,6 +354,10 @@ var unmarshalTests = []struct {
+ "int64_min: -9223372036854775808",
+ map[string]int64{"int64_min": math.MinInt64},
+ },
++ {
++ "int64_min_base2: -0b1000000000000000000000000000000000000000000000000000000000000000",
++ map[string]int64{"int64_min_base2": math.MinInt64},
++ },
+ {
+ "int64_neg_base2: -0b111111111111111111111111111111111111111111111111111111111111111",
+ map[string]int64{"int64_neg_base2": -math.MaxInt64},
+diff --git a/resolve.go b/resolve.go
+index 64ae888..1b7d8c3 100644
+--- a/resolve.go
++++ b/resolve.go
+@@ -223,7 +223,7 @@ func resolve(tag string, in string) (rtag string, out interface{}) {
+ } else if strings.HasPrefix(plain, "-0b") {
+ intv, err := strconv.ParseInt("-"+plain[3:], 2, 64)
+ if err == nil {
+- if true || intv == int64(int(intv)) {
++ if intv == int64(int(intv)) {
+ return intTag, int(intv)
+ } else {
+ return intTag, intv
diff --git a/gnu/packages/patches/scilab-hdf5-1.8-api.patch b/gnu/packages/patches/scilab-hdf5-1.8-api.patch
deleted file mode 100644
index 8b453e4720..0000000000
--- a/gnu/packages/patches/scilab-hdf5-1.8-api.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-This patch fixes the compilation with hdf5 version >= 1.10. Adapted from
-https://aur.archlinux.org/cgit/aur.git/plain/hdf5_18_api.patch?h=scilab-git.
-
-diff -ur a/scilab/modules/hdf5/includes/HDF5Objects.h b/scilab/modules/hdf5/includes/HDF5Objects.h
---- a/scilab/modules/hdf5/includes/HDF5Objects.h
-+++ b/scilab/modules/hdf5/includes/HDF5Objects.h
-@@ -16,14 +16,12 @@
- #ifndef __HDF5OBJECTS_H__
- #define __HDF5OBJECTS_H__
-
--#define H5_NO_DEPRECATED_SYMBOLS
- #undef H5_USE_16_API
-+#define H5_USE_18_API
-
--#define H5Eset_auto_vers 2
- #include <hdf5.h>
- #include <hdf5_hl.h>
-
--#undef H5_NO_DEPRECATED_SYMBOLS
-
- //#define __HDF5OBJECTS_DEBUG__
- //#define __HDF5ERROR_PRINT__
-diff -ur a/scilab/modules/hdf5/Makefile.am b/scilab/modules/hdf5/Makefile.am
---- a/scilab/modules/hdf5/Makefile.am
-+++ b/scilab/modules/hdf5/Makefile.am
-@@ -104,8 +104,7 @@
- -DH5Gopen_vers=2 \
- -DH5Tget_array_dims_vers=2 \
- -DH5Acreate_vers=2 \
-- -DH5Rdereference_vers=2 \
-- -DNO_DEPRECATED_SYMBOLS
-+ -DH5Rdereference_vers=2
-
-
- libscihdf5_la_CPPFLAGS = \
-diff -ur a/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_listvar_v3.cpp b/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_listvar_v3.cpp
---- a/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_listvar_v3.cpp
-+++ b/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_listvar_v3.cpp
-@@ -13,6 +13,8 @@
- *
- */
-
-+#define H5_USE_18_API
-+
- #include <vector>
- #include "function.hxx"
- #include "string.hxx"
-diff -ur a/scilab/modules/hdf5/src/c/h5_readDataFromFile.c b/scilab/modules/hdf5/src/c/h5_readDataFromFile.c
---- a/scilab/modules/hdf5/src/c/h5_readDataFromFile.c
-+++ b/scilab/modules/hdf5/src/c/h5_readDataFromFile.c
-@@ -13,7 +13,7 @@
- *
- */
-
--#define H5_NO_DEPRECATED_SYMBOLS
-+#define H5_USE_18_API
-
- #ifndef _MSC_VER
- #include <sys/time.h>
-diff -ur a/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c b/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c
---- a/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c
-+++ b/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c
-@@ -13,7 +13,7 @@
- *
- */
-
--#define H5_NO_DEPRECATED_SYMBOLS
-+#define H5_USE_18_API
-
- #ifndef _MSC_VER
- #include <sys/time.h>
diff --git a/gnu/packages/patches/yggdrasil-extra-config.patch b/gnu/packages/patches/yggdrasil-extra-config.patch
index 7934e2b50f..44c58a8fbd 100644
--- a/gnu/packages/patches/yggdrasil-extra-config.patch
+++ b/gnu/packages/patches/yggdrasil-extra-config.patch
@@ -1,108 +1,62 @@
-From 779f980451d20079b34812f7006f2d7230738ad0 Mon Sep 17 00:00:00 2001
-From: csepp <raingloom@riseup.net>
-Date: Wed, 3 Nov 2021 21:14:54 +0100
+From 5aeabc1a8a8c5ecea3f5d0b7bcfa0aa0767ac92d Mon Sep 17 00:00:00 2001
+Message-ID: <5aeabc1a8a8c5ecea3f5d0b7bcfa0aa0767ac92d.1699726745.git.avityazev@posteo.org>
+From: Aleksandr Vityazev <avityazev@posteo.org>
+Date: Sat, 11 Nov 2023 19:50:46 +0300
Subject: [PATCH] add extra config file option to yggdrasil command
This is useful in Guix and Nix, because one config file can come
from the world-readable store and another can be placed directly
into /etc with much stricter permissions.
---
- cmd/yggdrasil/main.go | 29 ++++++++++++++++++++++-------
- 1 file changed, 22 insertions(+), 7 deletions(-)
+ cmd/yggdrasil/main.go | 12 ++++++++++++
+ src/config/config.go | 2 +-
+ 2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/cmd/yggdrasil/main.go b/cmd/yggdrasil/main.go
-index 58b8230..b9df98a 100644
+index a225755..3f53dda 100644
--- a/cmd/yggdrasil/main.go
+++ b/cmd/yggdrasil/main.go
-@@ -43,11 +43,12 @@ type node struct {
- admin *admin.AdminSocket
- }
-
--func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf bool) *config.NodeConfig {
-+func readConfig(log *log.Logger, useconf bool, useconffile string, extraconffile string, normaliseconf bool) *config.NodeConfig {
- // Use a configuration file. If -useconf, the configuration will be read
- // from stdin. If -useconffile, the configuration will be read from the
- // filesystem.
- var conf []byte
-+ var extraconf []byte
- var err error
- if useconffile != "" {
- // Read the file from the filesystem
-@@ -59,6 +60,21 @@ func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf
- if err != nil {
- panic(err)
- }
-+ if extraconffile != "" {
-+ extraconf, err = os.ReadFile(extraconffile);
-+ }
-+ if err != nil {
-+ panic(err)
-+ }
-+ // Generate a new configuration - this gives us a set of sane defaults -
-+ // then parse the configuration we loaded above on top of it. The effect
-+ // of this is that any configuration item that is missing from the provided
-+ // configuration will use a sane default.
-+ cfg := defaults.GenerateConfig()
-+ var confs [2][]byte
-+ confs[0]=conf
-+ confs[1]=extraconf
-+ for _, conf := range confs { if len(conf)>0 {
- // If there's a byte order mark - which Windows 10 is now incredibly fond of
- // throwing everywhere when it's converting things into UTF-16 for the hell
- // of it - remove it and decode back down into UTF-8. This is necessary
-@@ -72,11 +88,6 @@ func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf
- panic(err)
- }
- }
-- // Generate a new configuration - this gives us a set of sane defaults -
-- // then parse the configuration we loaded above on top of it. The effect
-- // of this is that any configuration item that is missing from the provided
-- // configuration will use a sane default.
-- cfg := defaults.GenerateConfig()
- var dat map[string]interface{}
- if err := hjson.Unmarshal(conf, &dat); err != nil {
- panic(err)
-@@ -136,6 +147,7 @@ func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf
- if err = mapstructure.Decode(dat, &cfg); err != nil {
- panic(err)
- }
-+ }}
- return cfg
- }
-
-@@ -192,6 +204,7 @@ type yggArgs struct {
- getaddr bool
- getsnet bool
- useconffile string
-+ extraconffile string
- logto string
- loglevel string
- }
-@@ -200,6 +213,7 @@ func getArgs() yggArgs {
+@@ -42,6 +42,7 @@ func main() {
genconf := flag.Bool("genconf", false, "print a new config to stdout")
useconf := flag.Bool("useconf", false, "read HJSON/JSON config from stdin")
useconffile := flag.String("useconffile", "", "read HJSON/JSON config from specified file path")
+ extraconffile := flag.String("extraconffile", "", "extra (usually private) HJSON/JSON config from specified file path")
normaliseconf := flag.Bool("normaliseconf", false, "use in combination with either -useconf or -useconffile, outputs your configuration normalised")
+ exportkey := flag.Bool("exportkey", false, "use in combination with either -useconf or -useconffile, outputs your private key in PEM format")
confjson := flag.Bool("json", false, "print configuration from -genconf or -normaliseconf as JSON instead of HJSON")
- autoconf := flag.Bool("autoconf", false, "automatic mode (dynamic IP, peer with IPv6 neighbors)")
-@@ -213,6 +227,7 @@ func getArgs() yggArgs {
- genconf: *genconf,
- useconf: *useconf,
- useconffile: *useconffile,
-+ extraconffile: *extraconffile,
- normaliseconf: *normaliseconf,
- confjson: *confjson,
- autoconf: *autoconf,
-@@ -265,7 +280,7 @@ func run(args yggArgs, ctx context.Context, done chan struct{}) {
- cfg = defaults.GenerateConfig()
- case args.useconffile != "" || args.useconf:
- // Read the configuration from either stdin or from the filesystem
-- cfg = readConfig(logger, args.useconf, args.useconffile, args.normaliseconf)
-+ cfg = readConfig(logger, args.useconf, args.useconffile, args.extraconffile, args.normaliseconf)
- // If the -normaliseconf option was specified then remarshal the above
- // configuration and print it back to stdout. This lets the user update
- // their configuration file with newly mapped names (like above) or to
+@@ -137,6 +138,17 @@ func main() {
+ return
+ }
+
++ if *extraconffile !="" {
++ f, err := os.Open(*extraconffile)
++ if err != nil {
++ panic(err)
++ }
++ if _, err := cfg.ReadFrom(f); err != nil {
++ panic(err)
++ }
++ _ = f.Close()
++ }
++
+ privateKey := ed25519.PrivateKey(cfg.PrivateKey)
+ publicKey := privateKey.Public().(ed25519.PublicKey)
+
+diff --git a/src/config/config.go b/src/config/config.go
+index e899a35..76b9ec8 100644
+--- a/src/config/config.go
++++ b/src/config/config.go
+@@ -112,7 +112,7 @@ func (cfg *NodeConfig) ReadFrom(r io.Reader) (int64, error) {
+ // then parse the configuration we loaded above on top of it. The effect
+ // of this is that any configuration item that is missing from the provided
+ // configuration will use a sane default.
+- *cfg = *GenerateConfig()
++ // *cfg = *GenerateConfig()
+ if err := cfg.UnmarshalHJSON(conf); err != nil {
+ return n, err
+ }
+
+base-commit: b759683b76985665b5218346abab35f08d9f4d38
--
-2.33.1
+2.41.0