summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
Diffstat (limited to 'patches')
-rw-r--r--patches/0001-cli-Set-default-conf-file-path-in-build-system.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/patches/0001-cli-Set-default-conf-file-path-in-build-system.patch b/patches/0001-cli-Set-default-conf-file-path-in-build-system.patch
new file mode 100644
index 0000000..7a97d7a
--- /dev/null
+++ b/patches/0001-cli-Set-default-conf-file-path-in-build-system.patch
@@ -0,0 +1,46 @@
+From 2fcd5f41c78e054840e9d19ea9935cbe7a05ca93 Mon Sep 17 00:00:00 2001
+From: Patrick McDermott <patrick.mcdermott@libiquity.com>
+Date: Thu, 4 Apr 2019 16:55:39 -0400
+Subject: [PATCH] cli: Set default conf file path in build system
+
+---
+ CMakeLists.txt | 2 ++
+ src/opkg-cl.c | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 26230b3..5ad0b36 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,6 +6,7 @@ INCLUDE(TestBigEndian)
+
+ SET(HOST_CPU "" CACHE STRING "Override Host CPU")
+ SET(BUILD_CPU "" CACHE STRING "Override Host CPU")
++SET(CONF_FILE "/etc/opkg.conf" CACHE STRING "Override default configuration file path")
+ SET(LOCK_FILE "/var/lock/opkg.lock" CACHE STRING "Override lock file path")
+ SET(PATH_SPEC "/usr/sbin:/usr/bin:/sbin:/bin" CACHE STRING "Override default PATH value")
+ SET(VERSION "" CACHE STRING "Override version")
+@@ -38,6 +39,7 @@ TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
+ ADD_DEFINITIONS(-Os -Wall --std=gnu99 -g3 -Wmissing-declarations
+ -DDATADIR="/usr/share"
+ -DOPKGETCDIR="/etc"
++ -DOPKGCONFFILE="${CONF_FILE}"
+ -DOPKGLOCKFILE="${LOCK_FILE}"
+ -DOPKGLIBDIR="/usr/lib"
+ -DHOST_CPU_STR="${HOST_CPU}"
+diff --git a/src/opkg-cl.c b/src/opkg-cl.c
+index a3ea5c1..a299514 100644
+--- a/src/opkg-cl.c
++++ b/src/opkg-cl.c
+@@ -244,7 +244,7 @@ static int args_parse(int argc, char *argv[])
+ }
+
+ if (!conf->conf_file && !conf->offline_root)
+- conf->conf_file = xstrdup("/etc/opkg.conf");
++ conf->conf_file = xstrdup(OPKGCONFFILE);
+
+ if (parse_err)
+ return parse_err;
+--
+2.11.0
+