aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core
diff options
context:
space:
mode:
authorDmitry Rozhkov <dmitry.rozhkov@linux.intel.com>2016-04-15 11:34:32 +0300
committerJoshua Lock <joshua.g.lock@intel.com>2016-04-17 21:56:08 +0100
commit572baa4766e246e385c68a0118c9ac5b8a9bb2d5 (patch)
tree28ca1e37b8e9e24a7ac5fca3667decf06c671611 /recipes-core
parenta7dddfbfb8f45989856c93c6f82f46d8a96e6f0b (diff)
downloadmeta-swupd-572baa4766e246e385c68a0118c9ac5b8a9bb2d5.tar.gz
meta-swupd-572baa4766e246e385c68a0118c9ac5b8a9bb2d5.tar.bz2
meta-swupd-572baa4766e246e385c68a0118c9ac5b8a9bb2d5.zip
swupd-client_2.87.bb: Avoid using real distro URL as default
The layer's users are supposed to create their own update repos. Not setting --url may lead to downloading updates from the default repo which is http://downloads.clearlinux.com/update Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Diffstat (limited to 'recipes-core')
-rw-r--r--recipes-core/swupd-client/swupd-client-2.87/0001-globals.c-Use-fake-address-as-default-updates-url.patch37
-rw-r--r--recipes-core/swupd-client/swupd-client_2.87.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/recipes-core/swupd-client/swupd-client-2.87/0001-globals.c-Use-fake-address-as-default-updates-url.patch b/recipes-core/swupd-client/swupd-client-2.87/0001-globals.c-Use-fake-address-as-default-updates-url.patch
new file mode 100644
index 0000000..491a115
--- /dev/null
+++ b/recipes-core/swupd-client/swupd-client-2.87/0001-globals.c-Use-fake-address-as-default-updates-url.patch
@@ -0,0 +1,37 @@
+From e7af0013dd550c72641ea841f1177d6b0af99dce Mon Sep 17 00:00:00 2001
+From: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
+Date: Fri, 15 Apr 2016 10:02:45 +0300
+Subject: [PATCH] globals.c: Use fake address as default updates' url
+
+If a user forgets to provide its swupd server URL then
+ClearLinux's default is used unconditionally which may
+reult in a corrupted system.
+
+Upstream-Status: Inappropriate [latest code doesn't use hardcoded defaults]
+
+Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
+---
+ src/globals.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/globals.c b/src/globals.c
+index 8ca3fd9..0e78f34 100644
+--- a/src/globals.c
++++ b/src/globals.c
+@@ -62,11 +62,11 @@ bool have_network = false; /* assume no access until proved */
+ #define URL_COUNT 2
+ char *version_server_urls[URL_COUNT] = {
+ NULL,
+- "https://download.clearlinux.org/update",
++ "https://example.com/update",
+ };
+ char *content_server_urls[URL_COUNT] = {
+ NULL,
+- "https://download.clearlinux.org/update",
++ "https://example.com/update",
+ };
+ char *preferred_version_url;
+ char *preferred_content_url;
+--
+2.5.0
+
diff --git a/recipes-core/swupd-client/swupd-client_2.87.bb b/recipes-core/swupd-client/swupd-client_2.87.bb
index 6c394f8..3690439 100644
--- a/recipes-core/swupd-client/swupd-client_2.87.bb
+++ b/recipes-core/swupd-client/swupd-client_2.87.bb
@@ -14,6 +14,7 @@ SRC_URI = "\
file://0007-Add-compatibility-with-libarchive-s-bsdtar-command.patch \
file://0001-log.c-avoid-segfault-and-show-staging-file-name.patch \
file://0002-downloads-minimize-syscalls-to-improve-performance.patch \
+ file://0001-globals.c-Use-fake-address-as-default-updates-url.patch \
"
SRC_URI[md5sum] = "5d272c62edb8a9c576005ac5e1182ea3"