void-packages/srcpkgs/opkg/patches/lock-var-run.patch
Đoàn Trần Công Danh 2fd8d4df94 srcpkgs/o*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

35 lines
1.4 KiB
Diff

Source: https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/opkg/opkg/0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch?id=7dfee9b78daa5d25551704f27d0228b2c170fbcc
From a4628a6171f393add9a2b287483ca39bb72b4dd6 Mon Sep 17 00:00:00 2001
From: Jonathan Liu <net147@gmail.com>
Date: Mon, 21 Sep 2015 20:23:23 +1000
Subject: [PATCH] opkg_conf: create opkg.lock in /run instead of /var/run
This avoids a "Could not unlink" warning when extracting a /var/run
symbolic link pointing to /run from a package as it is unable to
unlink the /var/run directory when it contains opkg.lock.
This also fixes an issue where /var/run is created as a directory
instead of a symbolic link to /run.
Upstream-Status: Inappropriate [OE-Specific]
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
libopkg/opkg_conf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
index 7bca948..5a1bc44 100644
--- a/libopkg/opkg_conf.h
+++ b/libopkg/opkg_conf.h
@@ -40,7 +40,7 @@ extern "C" {
#define OPKG_CONF_DEFAULT_STATUS_FILE VARDIR "/lib/opkg/status"
#define OPKG_CONF_DEFAULT_CACHE_DIR VARDIR "/cache/opkg"
#define OPKG_CONF_DEFAULT_CONF_FILE_DIR SYSCONFDIR "/opkg"
-#define OPKG_CONF_DEFAULT_LOCK_FILE VARDIR "/run/opkg.lock"
+#define OPKG_CONF_DEFAULT_LOCK_FILE "/run/opkg.lock"
/* In case the config file defines no dest */
#define OPKG_CONF_DEFAULT_DEST_NAME "root"
--
2.5.0