Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] runit: fix default service path in manpages
@ 2022-06-22  8:24 subnut
  2022-06-22  8:25 ` subnut
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: subnut @ 2022-06-22  8:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]

There is a new pull request by subnut against master on the void-packages repository

https://github.com/subnut/void-packages runit
https://github.com/void-linux/void-packages/pull/37639

runit: fix default service path in manpages
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/37639.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-37639.patch --]
[-- Type: text/x-diff, Size: 844 bytes --]

From 9b613138d7b743ea5acc1d9e2811a732fb2320ac Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Wed, 22 Jun 2022 11:40:31 +0530
Subject: [PATCH] runit: fix default service path in manpages

---
 srcpkgs/runit/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/runit/template b/srcpkgs/runit/template
index 68b400c1ef5c..015f9c430365 100644
--- a/srcpkgs/runit/template
+++ b/srcpkgs/runit/template
@@ -27,6 +27,7 @@ pre_build() {
 	echo "$CC $LDFLAGS -Wl,-z -Wl,noexecstack" >conf-ld
 	# set default service path to /var/service
 	sed -i -e 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c
+	(cd ../man; sed -i -e s:/service:/var/service:g *;)
 	# change type short to gid_t for getgroups(2) and setgroups(2)
 	sed -i -e 's:short x\[4\];$:gid_t x[4];:' chkshsgr.c
 }

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: runit: fix default service path in manpages
  2022-06-22  8:24 [PR PATCH] runit: fix default service path in manpages subnut
@ 2022-06-22  8:25 ` subnut
  2022-06-22  8:58 ` classabbyamp
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: subnut @ 2022-06-22  8:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

New comment by subnut on void-packages repository

https://github.com/void-linux/void-packages/pull/37639#issuecomment-1162803677

Comment:
Is this approach OK? Or should I make a `.diff` patch?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: runit: fix default service path in manpages
  2022-06-22  8:24 [PR PATCH] runit: fix default service path in manpages subnut
  2022-06-22  8:25 ` subnut
@ 2022-06-22  8:58 ` classabbyamp
  2022-06-22  8:58 ` classabbyamp
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2022-06-22  8:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 330 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/37639#issuecomment-1162837173

Comment:
not commenting on whether this is the right approach or a necessary change, but all the seds in pre_build should be vseds and possibly be moved to post_patch (or turned into patches) 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: runit: fix default service path in manpages
  2022-06-22  8:24 [PR PATCH] runit: fix default service path in manpages subnut
  2022-06-22  8:25 ` subnut
  2022-06-22  8:58 ` classabbyamp
@ 2022-06-22  8:58 ` classabbyamp
  2022-06-22 10:15 ` [PR PATCH] [Updated] " subnut
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2022-06-22  8:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 363 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/37639#issuecomment-1162837173

Comment:
not commenting on whether this is the right approach or a necessary change, but all the seds in pre_build should be vseds and possibly be moved to post_patch (or turned into patches)

also, this is missing a revbump 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] runit: fix default service path in manpages
  2022-06-22  8:24 [PR PATCH] runit: fix default service path in manpages subnut
                   ` (2 preceding siblings ...)
  2022-06-22  8:58 ` classabbyamp
@ 2022-06-22 10:15 ` subnut
  2022-06-22 10:15 ` subnut
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: subnut @ 2022-06-22 10:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]

There is an updated pull request by subnut against master on the void-packages repository

https://github.com/subnut/void-packages runit
https://github.com/void-linux/void-packages/pull/37639

runit: fix default service path in manpages
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/37639.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-37639.patch --]
[-- Type: text/x-diff, Size: 3124 bytes --]

From 8c979aebf183f4e3ce562f6533afdd263b5c301a Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Wed, 22 Jun 2022 11:40:31 +0530
Subject: [PATCH] runit: added patch to change default service path

---
 srcpkgs/runit/patches/default_svdir.patch | 76 +++++++++++++++++++++++
 srcpkgs/runit/template                    |  2 -
 2 files changed, 76 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/runit/patches/default_svdir.patch

diff --git a/srcpkgs/runit/patches/default_svdir.patch b/srcpkgs/runit/patches/default_svdir.patch
new file mode 100644
index 000000000000..45627b538259
--- /dev/null
+++ b/srcpkgs/runit/patches/default_svdir.patch
@@ -0,0 +1,76 @@
+Set default service path to /var/service
+
+--- a/runit-2.1.2/src/sv.c
++++ b/runit-2.1.2/src/sv.c
+@@ -32,7 +32,7 @@
+ char *progname;
+ char *action;
+ char *acts;
+-char *varservice ="/service/";
++char *varservice ="/var/service/";
+ char **service;
+ char **servicex;
+ unsigned int services;
+--- a/runit-2.1.2/man/sv.8
++++ b/runit-2.1.2/man/sv.8
+@@ -30,7 +30,7 @@
+ .I service
+ doesn't start with a dot or slash and doesn't end with a slash, it is
+ searched in the default services directory
+-.IR /service/ ,
++.IR /var/service/ ,
+ otherwise relative to the current directory.
+ .P
+ .I command
+@@ -232,7 +232,7 @@
+ .TP
+ .B SVDIR
+ The environment variable $SVDIR overrides the default services directory
+-.IR /service/ .
++.IR /var/service/ .
+ .TP
+ .B SVWAIT
+ The environment variable $SVWAIT overrides the default 7 seconds to wait
+--- a/runit-2.1.2/man/runsvchdir.8
++++ b/runit-2.1.2/man/runsvchdir.8
+@@ -27,13 +27,13 @@
+ .IR dir .
+ .P
+ Normally 
+-.I /service
++.I /var/service
+ is a symlink to
+ .IR current ,
+ and
+ .BR runsvdir (8)
+ is running
+-.IR /service/ .
++.IR /var/service/ .
+ .SH EXIT CODES
+ .B runsvchdir
+ prints an error message and exits 111 on error.
+--- a/runit-2.1.2/man/utmpset.8
++++ b/runit-2.1.2/man/utmpset.8
+@@ -34,7 +34,7 @@
+ .I finish
+ scripts, e.g.:
+ .P
+- $ cat /service/getty-5/finish
++ $ cat /var/service/getty-5/finish
+  #!/bin/sh
+  exec utmpset \-w tty5
+  $
+--- a/runit-2.1.2/man/runsv.8
++++ b/runit-2.1.2/man/runsv.8
+@@ -157,9 +157,9 @@
+ .IR service /log/supervise/control.
+ .P
+ Example: to send a TERM signal to the socklog-unix service, either do
+-  # sv term /service/socklog-unix
++  # sv term /var/service/socklog-unix
+  or
+-  # printf t >/service/socklog-unix/supervise/control
++  # printf t >/var/service/socklog-unix/supervise/control
+ .P
+ .BR printf (1)
+ usually blocks if no
diff --git a/srcpkgs/runit/template b/srcpkgs/runit/template
index 68b400c1ef5c..bb63729559e2 100644
--- a/srcpkgs/runit/template
+++ b/srcpkgs/runit/template
@@ -25,8 +25,6 @@ pre_build() {
 
 	echo "$CC -D_GNU_SOURCE $CFLAGS" >conf-cc
 	echo "$CC $LDFLAGS -Wl,-z -Wl,noexecstack" >conf-ld
-	# set default service path to /var/service
-	sed -i -e 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c
 	# change type short to gid_t for getgroups(2) and setgroups(2)
 	sed -i -e 's:short x\[4\];$:gid_t x[4];:' chkshsgr.c
 }

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] runit: fix default service path in manpages
  2022-06-22  8:24 [PR PATCH] runit: fix default service path in manpages subnut
                   ` (3 preceding siblings ...)
  2022-06-22 10:15 ` [PR PATCH] [Updated] " subnut
@ 2022-06-22 10:15 ` subnut
  2022-06-22 10:16 ` subnut
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: subnut @ 2022-06-22 10:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]

There is an updated pull request by subnut against master on the void-packages repository

https://github.com/subnut/void-packages runit
https://github.com/void-linux/void-packages/pull/37639

runit: fix default service path in manpages
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/37639.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-37639.patch --]
[-- Type: text/x-diff, Size: 3124 bytes --]

From eae0fd035147b8540a7b4953b8008660e23dbd0a Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Wed, 22 Jun 2022 11:40:31 +0530
Subject: [PATCH] runit: added patch to change default service path

---
 srcpkgs/runit/patches/default_svdir.patch | 76 +++++++++++++++++++++++
 srcpkgs/runit/template                    |  2 -
 2 files changed, 76 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/runit/patches/default_svdir.patch

diff --git a/srcpkgs/runit/patches/default_svdir.patch b/srcpkgs/runit/patches/default_svdir.patch
new file mode 100644
index 000000000000..45627b538259
--- /dev/null
+++ b/srcpkgs/runit/patches/default_svdir.patch
@@ -0,0 +1,76 @@
+Set default service path to /var/service
+
+--- a/runit-2.1.2/src/sv.c
++++ b/runit-2.1.2/src/sv.c
+@@ -32,7 +32,7 @@
+ char *progname;
+ char *action;
+ char *acts;
+-char *varservice ="/service/";
++char *varservice ="/var/service/";
+ char **service;
+ char **servicex;
+ unsigned int services;
+--- a/runit-2.1.2/man/sv.8
++++ b/runit-2.1.2/man/sv.8
+@@ -30,7 +30,7 @@
+ .I service
+ doesn't start with a dot or slash and doesn't end with a slash, it is
+ searched in the default services directory
+-.IR /service/ ,
++.IR /var/service/ ,
+ otherwise relative to the current directory.
+ .P
+ .I command
+@@ -232,7 +232,7 @@
+ .TP
+ .B SVDIR
+ The environment variable $SVDIR overrides the default services directory
+-.IR /service/ .
++.IR /var/service/ .
+ .TP
+ .B SVWAIT
+ The environment variable $SVWAIT overrides the default 7 seconds to wait
+--- a/runit-2.1.2/man/runsvchdir.8
++++ b/runit-2.1.2/man/runsvchdir.8
+@@ -27,13 +27,13 @@
+ .IR dir .
+ .P
+ Normally 
+-.I /service
++.I /var/service
+ is a symlink to
+ .IR current ,
+ and
+ .BR runsvdir (8)
+ is running
+-.IR /service/ .
++.IR /var/service/ .
+ .SH EXIT CODES
+ .B runsvchdir
+ prints an error message and exits 111 on error.
+--- a/runit-2.1.2/man/utmpset.8
++++ b/runit-2.1.2/man/utmpset.8
+@@ -34,7 +34,7 @@
+ .I finish
+ scripts, e.g.:
+ .P
+- $ cat /service/getty-5/finish
++ $ cat /var/service/getty-5/finish
+  #!/bin/sh
+  exec utmpset \-w tty5
+  $
+--- a/runit-2.1.2/man/runsv.8
++++ b/runit-2.1.2/man/runsv.8
+@@ -157,9 +157,9 @@
+ .IR service /log/supervise/control.
+ .P
+ Example: to send a TERM signal to the socklog-unix service, either do
+-  # sv term /service/socklog-unix
++  # sv term /var/service/socklog-unix
+  or
+-  # printf t >/service/socklog-unix/supervise/control
++  # printf t >/var/service/socklog-unix/supervise/control
+ .P
+ .BR printf (1)
+ usually blocks if no
diff --git a/srcpkgs/runit/template b/srcpkgs/runit/template
index 68b400c1ef5c..bb63729559e2 100644
--- a/srcpkgs/runit/template
+++ b/srcpkgs/runit/template
@@ -25,8 +25,6 @@ pre_build() {
 
 	echo "$CC -D_GNU_SOURCE $CFLAGS" >conf-cc
 	echo "$CC $LDFLAGS -Wl,-z -Wl,noexecstack" >conf-ld
-	# set default service path to /var/service
-	sed -i -e 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c
 	# change type short to gid_t for getgroups(2) and setgroups(2)
 	sed -i -e 's:short x\[4\];$:gid_t x[4];:' chkshsgr.c
 }

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: runit: fix default service path in manpages
  2022-06-22  8:24 [PR PATCH] runit: fix default service path in manpages subnut
                   ` (4 preceding siblings ...)
  2022-06-22 10:15 ` subnut
@ 2022-06-22 10:16 ` subnut
  2022-06-22 10:18 ` [PR PATCH] [Updated] " subnut
  2022-06-22 10:19 ` subnut
  7 siblings, 0 replies; 9+ messages in thread
From: subnut @ 2022-06-22 10:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

New comment by subnut on void-packages repository

https://github.com/void-linux/void-packages/pull/37639#issuecomment-1162915676

Comment:
> all the `sed`s in pre_build should be `vsed`s and possibly be moved to `post_patch` (or turned into patches)

Okay, I've converted it into a patch.

Should I expand this PR to turn the remaining `sed`s into patches too?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] runit: fix default service path in manpages
  2022-06-22  8:24 [PR PATCH] runit: fix default service path in manpages subnut
                   ` (5 preceding siblings ...)
  2022-06-22 10:16 ` subnut
@ 2022-06-22 10:18 ` subnut
  2022-06-22 10:19 ` subnut
  7 siblings, 0 replies; 9+ messages in thread
From: subnut @ 2022-06-22 10:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]

There is an updated pull request by subnut against master on the void-packages repository

https://github.com/subnut/void-packages runit
https://github.com/void-linux/void-packages/pull/37639

runit: fix default service path in manpages
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/37639.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-37639.patch --]
[-- Type: text/x-diff, Size: 3124 bytes --]

From 4516bf16816be73b9d624b89998598c316b2eb23 Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Wed, 22 Jun 2022 11:40:31 +0530
Subject: [PATCH] runit: added patch to change default service path

---
 srcpkgs/runit/patches/default_svdir.patch | 76 +++++++++++++++++++++++
 srcpkgs/runit/template                    |  2 -
 2 files changed, 76 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/runit/patches/default_svdir.patch

diff --git a/srcpkgs/runit/patches/default_svdir.patch b/srcpkgs/runit/patches/default_svdir.patch
new file mode 100644
index 000000000000..45627b538259
--- /dev/null
+++ b/srcpkgs/runit/patches/default_svdir.patch
@@ -0,0 +1,76 @@
+Set default service path to /var/service
+
+--- a/runit-2.1.2/src/sv.c
++++ b/runit-2.1.2/src/sv.c
+@@ -32,7 +32,7 @@
+ char *progname;
+ char *action;
+ char *acts;
+-char *varservice ="/service/";
++char *varservice ="/var/service/";
+ char **service;
+ char **servicex;
+ unsigned int services;
+--- a/runit-2.1.2/man/sv.8
++++ b/runit-2.1.2/man/sv.8
+@@ -30,7 +30,7 @@
+ .I service
+ doesn't start with a dot or slash and doesn't end with a slash, it is
+ searched in the default services directory
+-.IR /service/ ,
++.IR /var/service/ ,
+ otherwise relative to the current directory.
+ .P
+ .I command
+@@ -232,7 +232,7 @@
+ .TP
+ .B SVDIR
+ The environment variable $SVDIR overrides the default services directory
+-.IR /service/ .
++.IR /var/service/ .
+ .TP
+ .B SVWAIT
+ The environment variable $SVWAIT overrides the default 7 seconds to wait
+--- a/runit-2.1.2/man/runsvchdir.8
++++ b/runit-2.1.2/man/runsvchdir.8
+@@ -27,13 +27,13 @@
+ .IR dir .
+ .P
+ Normally 
+-.I /service
++.I /var/service
+ is a symlink to
+ .IR current ,
+ and
+ .BR runsvdir (8)
+ is running
+-.IR /service/ .
++.IR /var/service/ .
+ .SH EXIT CODES
+ .B runsvchdir
+ prints an error message and exits 111 on error.
+--- a/runit-2.1.2/man/utmpset.8
++++ b/runit-2.1.2/man/utmpset.8
+@@ -34,7 +34,7 @@
+ .I finish
+ scripts, e.g.:
+ .P
+- $ cat /service/getty-5/finish
++ $ cat /var/service/getty-5/finish
+  #!/bin/sh
+  exec utmpset \-w tty5
+  $
+--- a/runit-2.1.2/man/runsv.8
++++ b/runit-2.1.2/man/runsv.8
+@@ -157,9 +157,9 @@
+ .IR service /log/supervise/control.
+ .P
+ Example: to send a TERM signal to the socklog-unix service, either do
+-  # sv term /service/socklog-unix
++  # sv term /var/service/socklog-unix
+  or
+-  # printf t >/service/socklog-unix/supervise/control
++  # printf t >/var/service/socklog-unix/supervise/control
+ .P
+ .BR printf (1)
+ usually blocks if no
diff --git a/srcpkgs/runit/template b/srcpkgs/runit/template
index 68b400c1ef5c..bb63729559e2 100644
--- a/srcpkgs/runit/template
+++ b/srcpkgs/runit/template
@@ -25,8 +25,6 @@ pre_build() {
 
 	echo "$CC -D_GNU_SOURCE $CFLAGS" >conf-cc
 	echo "$CC $LDFLAGS -Wl,-z -Wl,noexecstack" >conf-ld
-	# set default service path to /var/service
-	sed -i -e 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c
 	# change type short to gid_t for getgroups(2) and setgroups(2)
 	sed -i -e 's:short x\[4\];$:gid_t x[4];:' chkshsgr.c
 }

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] runit: fix default service path in manpages
  2022-06-22  8:24 [PR PATCH] runit: fix default service path in manpages subnut
                   ` (6 preceding siblings ...)
  2022-06-22 10:18 ` [PR PATCH] [Updated] " subnut
@ 2022-06-22 10:19 ` subnut
  7 siblings, 0 replies; 9+ messages in thread
From: subnut @ 2022-06-22 10:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]

There is an updated pull request by subnut against master on the void-packages repository

https://github.com/subnut/void-packages runit
https://github.com/void-linux/void-packages/pull/37639

runit: fix default service path in manpages
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/37639.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-runit-37639.patch --]
[-- Type: text/x-diff, Size: 3292 bytes --]

From f3534956944da8db35c33514a652be8f9744a616 Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Wed, 22 Jun 2022 11:40:31 +0530
Subject: [PATCH] runit: added patch to change default service path

---
 srcpkgs/runit/patches/default_svdir.patch | 76 +++++++++++++++++++++++
 srcpkgs/runit/template                    |  4 +-
 2 files changed, 77 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/runit/patches/default_svdir.patch

diff --git a/srcpkgs/runit/patches/default_svdir.patch b/srcpkgs/runit/patches/default_svdir.patch
new file mode 100644
index 000000000000..e94f327788ee
--- /dev/null
+++ b/srcpkgs/runit/patches/default_svdir.patch
@@ -0,0 +1,76 @@
+Set default service path to /var/service
+
+--- runit-2.1.2/src/sv.c
++++ runit-2.1.2/src/sv.c
+@@ -32,7 +32,7 @@
+ char *progname;
+ char *action;
+ char *acts;
+-char *varservice ="/service/";
++char *varservice ="/var/service/";
+ char **service;
+ char **servicex;
+ unsigned int services;
+--- runit-2.1.2/man/sv.8
++++ runit-2.1.2/man/sv.8
+@@ -30,7 +30,7 @@
+ .I service
+ doesn't start with a dot or slash and doesn't end with a slash, it is
+ searched in the default services directory
+-.IR /service/ ,
++.IR /var/service/ ,
+ otherwise relative to the current directory.
+ .P
+ .I command
+@@ -232,7 +232,7 @@
+ .TP
+ .B SVDIR
+ The environment variable $SVDIR overrides the default services directory
+-.IR /service/ .
++.IR /var/service/ .
+ .TP
+ .B SVWAIT
+ The environment variable $SVWAIT overrides the default 7 seconds to wait
+--- runit-2.1.2/man/runsvchdir.8
++++ runit-2.1.2/man/runsvchdir.8
+@@ -27,13 +27,13 @@
+ .IR dir .
+ .P
+ Normally 
+-.I /service
++.I /var/service
+ is a symlink to
+ .IR current ,
+ and
+ .BR runsvdir (8)
+ is running
+-.IR /service/ .
++.IR /var/service/ .
+ .SH EXIT CODES
+ .B runsvchdir
+ prints an error message and exits 111 on error.
+--- runit-2.1.2/man/utmpset.8
++++ runit-2.1.2/man/utmpset.8
+@@ -34,7 +34,7 @@
+ .I finish
+ scripts, e.g.:
+ .P
+- $ cat /service/getty-5/finish
++ $ cat /var/service/getty-5/finish
+  #!/bin/sh
+  exec utmpset \-w tty5
+  $
+--- runit-2.1.2/man/runsv.8
++++ runit-2.1.2/man/runsv.8
+@@ -157,9 +157,9 @@
+ .IR service /log/supervise/control.
+ .P
+ Example: to send a TERM signal to the socklog-unix service, either do
+-  # sv term /service/socklog-unix
++  # sv term /var/service/socklog-unix
+  or
+-  # printf t >/service/socklog-unix/supervise/control
++  # printf t >/var/service/socklog-unix/supervise/control
+ .P
+ .BR printf (1)
+ usually blocks if no
diff --git a/srcpkgs/runit/template b/srcpkgs/runit/template
index 68b400c1ef5c..36bbb3cae6c5 100644
--- a/srcpkgs/runit/template
+++ b/srcpkgs/runit/template
@@ -1,7 +1,7 @@
 # Template file for 'runit'
 pkgname=runit
 version=2.1.2
-revision=11
+revision=12
 build_style="gnu-makefile"
 wrksrc="admin"
 build_wrksrc="${pkgname}-${version}/src"
@@ -25,8 +25,6 @@ pre_build() {
 
 	echo "$CC -D_GNU_SOURCE $CFLAGS" >conf-cc
 	echo "$CC $LDFLAGS -Wl,-z -Wl,noexecstack" >conf-ld
-	# set default service path to /var/service
-	sed -i -e 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c
 	# change type short to gid_t for getgroups(2) and setgroups(2)
 	sed -i -e 's:short x\[4\];$:gid_t x[4];:' chkshsgr.c
 }

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-06-22 10:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22  8:24 [PR PATCH] runit: fix default service path in manpages subnut
2022-06-22  8:25 ` subnut
2022-06-22  8:58 ` classabbyamp
2022-06-22  8:58 ` classabbyamp
2022-06-22 10:15 ` [PR PATCH] [Updated] " subnut
2022-06-22 10:15 ` subnut
2022-06-22 10:16 ` subnut
2022-06-22 10:18 ` [PR PATCH] [Updated] " subnut
2022-06-22 10:19 ` subnut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).