void-packages/srcpkgs/oprofile/patches/system-account.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

11 lines
352 B
Diff

--- a/opjitconv/opjitconv.c
+++ b/opjitconv/opjitconv.c
@@ -659,7 +659,7 @@
if (non_root) {
pw_oprofile = NULL;
} else {
- pw_oprofile = getpwnam("oprofile");
+ pw_oprofile = getpwnam("_oprofile");
if (pw_oprofile == NULL) {
printf("opjitconv: User information for special user oprofile cannot be found.\n");
rc = OP_JIT_CONV_FAIL;