summaryrefslogtreecommitdiffstats
path: root/recipes-containers/lxc/files
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/lxc/files')
-rw-r--r--recipes-containers/lxc/files/0001-download-don-t-try-compatbility-index.patch43
-rw-r--r--recipes-containers/lxc/files/logs-optionally-use-base-filenames-to-report-src-fil.patch69
-rw-r--r--recipes-containers/lxc/files/lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch29
-rw-r--r--recipes-containers/lxc/files/lxc-fix-B-S.patch25
-rw-r--r--recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch38
5 files changed, 62 insertions, 142 deletions
diff --git a/recipes-containers/lxc/files/0001-download-don-t-try-compatbility-index.patch b/recipes-containers/lxc/files/0001-download-don-t-try-compatbility-index.patch
new file mode 100644
index 00000000..fee3b61a
--- /dev/null
+++ b/recipes-containers/lxc/files/0001-download-don-t-try-compatbility-index.patch
@@ -0,0 +1,43 @@
1From d69c856f90c752637b33e59fbbcfa31f619e2285 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Sun, 14 Aug 2022 22:44:24 -0400
4Subject: [PATCH] download: don't try compatbility index
5
6This is being mistaken for a valid, non compat index .. and we never
7try for the one that exists (the index without a compatibility
8extension). So we just drop the compat try for now.
9
10Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
11---
12 templates/lxc-download.in | 8 ++------
13 1 file changed, 2 insertions(+), 6 deletions(-)
14
15diff --git a/templates/lxc-download.in b/templates/lxc-download.in
16index 9a3290fbc..216e4dda7 100755
17--- a/templates/lxc-download.in
18+++ b/templates/lxc-download.in
19@@ -234,9 +234,7 @@ if [ "${DOWNLOAD_LIST_IMAGES}" = "true" ] || [ "${DOWNLOAD_INTERACTIVE}" = "true
20 DOWNLOAD_INDEX_PATH="/meta/1.0/index-${DOWNLOAD_MODE}"
21
22 echo "Downloading the image index"
23- if ! download_file "${DOWNLOAD_INDEX_PATH}.${DOWNLOAD_COMPAT_LEVEL}" "${DOWNLOAD_TEMP}/index" noexit; then
24- download_file "${DOWNLOAD_INDEX_PATH}" "${DOWNLOAD_TEMP}/index" normal
25- fi
26+ download_file "${DOWNLOAD_INDEX_PATH}" "${DOWNLOAD_TEMP}/index" normal
27
28 # Parse it
29 echo ""
30@@ -316,9 +314,7 @@ if [ "${DOWNLOAD_USE_CACHE}" = "false" ]; then
31 DOWNLOAD_INDEX_PATH="/meta/1.0/index-${DOWNLOAD_MODE}"
32
33 echo "Downloading the image index"
34- if ! download_file "${DOWNLOAD_INDEX_PATH}.${DOWNLOAD_COMPAT_LEVEL}" "${DOWNLOAD_TEMP}/index" noexit; then
35- download_file "${DOWNLOAD_INDEX_PATH}" "${DOWNLOAD_TEMP}/index" normal
36- fi
37+ download_file "${DOWNLOAD_INDEX_PATH}" "${DOWNLOAD_TEMP}/index" normal
38
39 # Parse it
40 while IFS=';' read -r f1 f2 f3 f4 f5 f6; do
41--
422.25.1
43
diff --git a/recipes-containers/lxc/files/logs-optionally-use-base-filenames-to-report-src-fil.patch b/recipes-containers/lxc/files/logs-optionally-use-base-filenames-to-report-src-fil.patch
deleted file mode 100644
index a8c76bc8..00000000
--- a/recipes-containers/lxc/files/logs-optionally-use-base-filenames-to-report-src-fil.patch
+++ /dev/null
@@ -1,69 +0,0 @@
1From 0cfa202f5d96a35692f063f35bf4706f310b17e4 Mon Sep 17 00:00:00 2001
2From: Jim Somerville <Jim.Somerville@windriver.com>
3Date: Fri, 25 Sep 2015 15:08:17 -0400
4Subject: [PATCH] logs: optionally use base filenames to report src files
5
6Message-Id: <4729d0f4c4d1dacd150ddfd7061dda875eb94e34.1443216870.git.Jim.Somerville@windriver.com>
7
8Problem: Logs are nice in that they report the source file,
9routine, and line number where an issue occurs. But the
10file is printed as the absolute filename. Users do not
11need to see a long spew of path directory names where the package
12was built. It just confuses things.
13
14Solution: Optionally chop off all leading directories so that just
15the source filename ie. basename is printed. This is done by
16setting a #ifdef LXC_LOG_USE_BASENAME check in the code. That
17define is done via the optional --enable-log-src-basename provided
18at configure time.
19
20Using __BASE_FILE__ instead of __FILE__ did not work. It
21refers to the file name as presented to the compile
22machinery, and that may still be the absolute pathname to
23the file.
24
25Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
26
27---
28 configure.ac | 9 +++++++++
29 src/lxc/log.h | 5 +++++
30 2 files changed, 14 insertions(+)
31
32diff --git a/configure.ac b/configure.ac
33index a3272e9..a2d4c29 100644
34--- a/configure.ac
35+++ b/configure.ac
36@@ -378,6 +378,15 @@ AC_ARG_ENABLE([examples],
37 [enable_examples=$enableval], [enable_examples=yes])
38 AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"])
39
40+# Enable basenames in the logs for source files
41+AC_ARG_ENABLE([log-src-basename],
42+ [AC_HELP_STRING([--enable-log-src-basename], [Use the shorter source file basename in the logs [default=no]])],
43+ [], [enable_log_src_basename=no])
44+
45+if test "x$enable_log_src_basename" = "xyes"; then
46+ AC_DEFINE([LXC_LOG_USE_BASENAME], 1, [Enabling shorter src filenames in the logs])
47+fi
48+
49 # Enable dumping stack traces
50 AC_ARG_ENABLE([mutex-debugging],
51 [AS_HELP_STRING([--enable-mutex-debugging], [Makes mutexes to report error and provide stack trace [default=no]])],
52diff --git a/src/lxc/log.h b/src/lxc/log.h
53index d280656..62cbf4f 100644
54--- a/src/lxc/log.h
55+++ b/src/lxc/log.h
56@@ -47,8 +47,13 @@ struct lxc_log_locinfo {
57 int line;
58 };
59
60+#ifdef LXC_LOG_USE_BASENAME
61+#define LXC_LOG_LOCINFO_INIT \
62+ { .file = (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__), .func = __func__, .line = __LINE__ }
63+#else
64 #define LXC_LOG_LOCINFO_INIT \
65 { .file = __FILE__, .func = __func__, .line = __LINE__ }
66+#endif
67
68 /* brief logging event object */
69 struct lxc_log_event {
diff --git a/recipes-containers/lxc/files/lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch b/recipes-containers/lxc/files/lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch
deleted file mode 100644
index be5dddf1..00000000
--- a/recipes-containers/lxc/files/lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 85d1e77acbfde2aa1045cfda877a91a9e57c405d Mon Sep 17 00:00:00 2001
2From: Jim Somerville <Jim.Somerville@windriver.com>
3Date: Tue, 11 Aug 2015 14:05:00 -0400
4Subject: [PATCH] lxc: doc: upgrade to use docbook 3.1 DTD
5
6docbook2man fails to build the man pages in poky
7due to missing the ancient Davenport 3.0 DTD.
8Poky meta has the Oasis 3.1 version so upgrade
9to use that instead.
10
11Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
12
13---
14 configure.ac | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/configure.ac b/configure.ac
18index 90a4bd4..a3272e9 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -227,7 +227,7 @@ AM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$db2xman" != "x"])
22 AM_CONDITIONAL([USE_DOCBOOK2X], [test "x$db2xman" != "xdocbook2man"])
23
24 if test "x$db2xman" = "xdocbook2man"; then
25- docdtd="\"-//Davenport//DTD DocBook V3.0//EN\""
26+ docdtd="\"-//OASIS//DTD DocBook V3.1//EN\""
27 else
28 docdtd="\"-//OASIS//DTD DocBook XML\" \"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\""
29 fi
diff --git a/recipes-containers/lxc/files/lxc-fix-B-S.patch b/recipes-containers/lxc/files/lxc-fix-B-S.patch
deleted file mode 100644
index 7a807b7c..00000000
--- a/recipes-containers/lxc/files/lxc-fix-B-S.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1From dc2e71f060c25b94f011fce12ef59d2f5ae4e6a9 Mon Sep 17 00:00:00 2001
2From: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
3Date: Thu, 9 Apr 2015 23:01:48 +0300
4Subject: [PATCH] %% original patch: lxc-fix-B-S.patch
5
6---
7 config/init/upstart/Makefile.am | 4 ++--
8 1 file changed, 2 insertions(+), 2 deletions(-)
9
10diff --git a/config/init/upstart/Makefile.am b/config/init/upstart/Makefile.am
11index 5552d32..186ae3d 100644
12--- a/config/init/upstart/Makefile.am
13+++ b/config/init/upstart/Makefile.am
14@@ -3,9 +3,9 @@ EXTRA_DIST = lxc.conf lxc-instance.conf lxc-net.conf.in
15 if INIT_SCRIPT_UPSTART
16 install-upstart: lxc.conf lxc-instance.conf lxc-net.conf
17 $(MKDIR_P) $(DESTDIR)$(sysconfdir)/init/
18- $(INSTALL_DATA) lxc.conf $(DESTDIR)$(sysconfdir)/init/
19+ $(INSTALL_DATA) $(srcdir)/lxc.conf $(DESTDIR)$(sysconfdir)/init/
20 $(INSTALL_DATA) $(srcdir)/lxc-instance.conf $(DESTDIR)$(sysconfdir)/init/
21- $(INSTALL_DATA) lxc-net.conf $(DESTDIR)$(sysconfdir)/init/
22+ $(INSTALL_DATA) $(srcdir)/lxc-net.conf $(DESTDIR)$(sysconfdir)/init/
23
24 uninstall-upstart:
25 rm -f $(DESTDIR)$(sysconfdir)/init/lxc.conf
diff --git a/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch b/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch
index f06e5969..3c96c5e0 100644
--- a/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch
+++ b/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch
@@ -1,22 +1,22 @@
1From 1db2db7783bd7ec2aa1da86e640019891634c659 Mon Sep 17 00:00:00 2001 1From 3e4cb0b738649f7750413cefbcfdb2115213ad0d Mon Sep 17 00:00:00 2001
2From: Joakim Roubert <joakimr@axis.com> 2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Fri, 16 Aug 2019 07:52:48 +0200 3Date: Sun, 14 Aug 2022 14:08:56 -0400
4Subject: [PATCH] Use curl instead of wget 4Subject: [PATCH] download: Use curl instead of wget
5 5
6When curl's MIT license is preferable to wget's GPLv3. 6When curl's MIT license is preferable to wget's GPLv3.
7 7
8Change-Id: I4684ae7569704514fdcc63e0655c556efcaf44f8
9Signed-off-by: Joakim Roubert <joakimr@axis.com> 8Signed-off-by: Joakim Roubert <joakimr@axis.com>
10Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com> 9Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
10Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
11--- 11---
12 templates/lxc-download.in | 10 +++++----- 12 templates/lxc-download.in | 8 ++++----
13 1 file changed, 5 insertions(+), 5 deletions(-) 13 1 file changed, 4 insertions(+), 4 deletions(-)
14 14
15Index: git/templates/lxc-download.in 15diff --git a/templates/lxc-download.in b/templates/lxc-download.in
16=================================================================== 16index a62ddf482..690307338 100755
17--- git.orig/templates/lxc-download.in 17--- a/templates/lxc-download.in
18+++ git/templates/lxc-download.in 18+++ b/templates/lxc-download.in
19@@ -59,9 +59,9 @@ 19@@ -59,9 +59,9 @@ cleanup() {
20 fi 20 fi
21 } 21 }
22 22
@@ -28,19 +28,16 @@ Index: git/templates/lxc-download.in
28 return 0 28 return 0
29 fi 29 fi
30 done 30 done
31@@ -70,8 +70,9 @@ 31@@ -70,7 +70,7 @@ wget_wrapper() {
32 } 32 }
33 33
34 download_file() { 34 download_file() {
35- if ! wget_wrapper --user-agent="lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -T 30 -q "https://${DOWNLOAD_SERVER}/$1" -O "$2" >/dev/null 2>&1; then 35- if ! wget_wrapper --user-agent="lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -T 30 -q "https://${DOWNLOAD_SERVER}/$1" -O "$2" >/dev/null 2>&1; then
36- if [ "$3" = "noexit" ]; then 36+ if ! curl_wrapper --user-agent "lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -m 30 -s "https://${DOWNLOAD_SERVER}/$1" -o "$2" >/dev/null 2>&1; then
37+ if ! curl_wrapper --user-agent="lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -m 30 -s "https://${DOWNLOAD_SERVER}/$1" -o "$2" >/dev/null 2>&1; then 37 if [ "$3" = "noexit" ]; then
38+ if ! curl_wrapper --user-agent="lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -m 30 -s "http://${DOWNLOAD_SERVER}/$1" -o "$2" >/dev/null 2>&1; then
39+ if [ "$3" = "noexit" ]; then
40 return 1 38 return 1
41 else 39 else
42 echo "ERROR: Failed to download https://${DOWNLOAD_SERVER}/$1" 1>&2 40@@ -176,7 +176,7 @@ while :; do
43@@ -176,7 +177,7 @@
44 done 41 done
45 42
46 # Check for required binaries 43 # Check for required binaries
@@ -49,3 +46,6 @@ Index: git/templates/lxc-download.in
49 if ! command -V "${bin}" >/dev/null 2>&1; then 46 if ! command -V "${bin}" >/dev/null 2>&1; then
50 echo "ERROR: Missing required tool: ${bin}" 1>&2 47 echo "ERROR: Missing required tool: ${bin}" 1>&2
51 exit 1 48 exit 1
49--
502.25.1
51