Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] monkey: fix the runit service.
@ 2021-03-18 22:54 mobinmob
  2021-03-19 17:50 ` ericonr
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: mobinmob @ 2021-03-18 22:54 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages monkey
https://github.com/void-linux/void-packages/pull/29575

monkey: fix the runit service.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [X] I generally don't use the affected packages but briefly tested this PR

`monkey` drops privileges to the default user which is defined in the configure stage correctly as `_monkey`. The chpst incocation uses the wrong user/group (`monkey`), is not needed and fails consistently.



<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] 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/29575.patch is attached

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

From 9a6b7923a69cf731d8efcba01f256c025f7a97a6 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 19 Mar 2021 00:49:45 +0200
Subject: [PATCH] monkey: fix the runit service.

---
 srcpkgs/monkey/files/monkey/run | 2 +-
 srcpkgs/monkey/template         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/monkey/files/monkey/run b/srcpkgs/monkey/files/monkey/run
index f499f3d2507a..95dad012d94d 100644
--- a/srcpkgs/monkey/files/monkey/run
+++ b/srcpkgs/monkey/files/monkey/run
@@ -1,2 +1,2 @@
 #!/bin/sh
-exec chpst -u monkey:monkey monkey
+exec monkey
diff --git a/srcpkgs/monkey/template b/srcpkgs/monkey/template
index e910e31586f6..4037c1815258 100644
--- a/srcpkgs/monkey/template
+++ b/srcpkgs/monkey/template
@@ -1,7 +1,7 @@
 # Template file for 'monkey'
 pkgname=monkey
 version=1.6.9
-revision=3
+revision=4
 build_style=configure
 configure_args="--prefix=/usr --sbindir=/usr/bin
  --libdir=/usr/lib$XBPS_TARGET_WORDSIZE/$pkgname

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

* Re: monkey: fix the runit service.
  2021-03-18 22:54 [PR PATCH] monkey: fix the runit service mobinmob
@ 2021-03-19 17:50 ` ericonr
  2021-03-19 18:18 ` mobinmob
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ericonr @ 2021-03-19 17:50 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29575#issuecomment-803007001

Comment:
Can you mention the justification in the commit message? I couldn't find a `setuid` or `seteuid` call in their code, so, if you know where it happens, could you also link to it (code from the https://github.com/monkey/monkey/tree/v1.6.9 tag, of course)?

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

* Re: monkey: fix the runit service.
  2021-03-18 22:54 [PR PATCH] monkey: fix the runit service mobinmob
  2021-03-19 17:50 ` ericonr
@ 2021-03-19 18:18 ` mobinmob
  2021-03-19 18:25 ` [PR PATCH] [Updated] " mobinmob
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mobinmob @ 2021-03-19 18:18 UTC (permalink / raw)
  To: ml

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

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/29575#issuecomment-803022327

Comment:
I found the problem while creating a [66 service for monkey](https://github.com/mobinmob/void-66-services/pull/81/files). I followed the runit service, but I got permission issues in the log indicating that the daemon was not able to create necessary files - which is understandable, because there is no `monkey` user. When reading the configuration file, I came across this:

```
# User:
    # -----
    # If you want the webserver to run as a process of a defined user, you can
    # define it in this variable. For the change of user to work, it's necessary
    # to execute Monkey with root privileges. If it's started by a user that
    # that doesn't have root privileges, this variable will be omitted.

    User _monkey
```
I have no reason to doubt the validity of the comments which also exist in the official [documentation](http://monkey-project.com/documentation/1.6/configuration/server.html). A cursory check with ps also confirms that the daemon runs from the `_monkey` user.


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

* Re: [PR PATCH] [Updated] monkey: fix the runit service.
  2021-03-18 22:54 [PR PATCH] monkey: fix the runit service mobinmob
  2021-03-19 17:50 ` ericonr
  2021-03-19 18:18 ` mobinmob
@ 2021-03-19 18:25 ` mobinmob
  2021-03-19 18:25 ` [PR PATCH] [Merged]: " ericonr
  2021-03-19 18:25 ` ericonr
  4 siblings, 0 replies; 6+ messages in thread
From: mobinmob @ 2021-03-19 18:25 UTC (permalink / raw)
  To: ml

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

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

https://github.com/mobinmob/void-packages monkey
https://github.com/void-linux/void-packages/pull/29575

monkey: fix the runit service.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [X] I generally don't use the affected packages but briefly tested this PR

`monkey` drops privileges to the default user which is defined in the configure stage correctly as `_monkey`. The chpst invocation uses the wrong user/group (`monkey`), is not needed and fails consistently.



<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] 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/29575.patch is attached

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

From 386f9d584f3df2b12cc6646b58d49f1208c40b74 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Fri, 19 Mar 2021 00:49:45 +0200
Subject: [PATCH] monkey: fix the runit service: -remove the chpst invocation,
 because a) the 'monkey' user does not exist and b) the daemon drops
 privileges to the _monkey user by itself.

---
 srcpkgs/monkey/files/monkey/run | 2 +-
 srcpkgs/monkey/template         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/monkey/files/monkey/run b/srcpkgs/monkey/files/monkey/run
index f499f3d2507a..95dad012d94d 100644
--- a/srcpkgs/monkey/files/monkey/run
+++ b/srcpkgs/monkey/files/monkey/run
@@ -1,2 +1,2 @@
 #!/bin/sh
-exec chpst -u monkey:monkey monkey
+exec monkey
diff --git a/srcpkgs/monkey/template b/srcpkgs/monkey/template
index e910e31586f6..4037c1815258 100644
--- a/srcpkgs/monkey/template
+++ b/srcpkgs/monkey/template
@@ -1,7 +1,7 @@
 # Template file for 'monkey'
 pkgname=monkey
 version=1.6.9
-revision=3
+revision=4
 build_style=configure
 configure_args="--prefix=/usr --sbindir=/usr/bin
  --libdir=/usr/lib$XBPS_TARGET_WORDSIZE/$pkgname

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

* Re: [PR PATCH] [Merged]: monkey: fix the runit service.
  2021-03-18 22:54 [PR PATCH] monkey: fix the runit service mobinmob
                   ` (2 preceding siblings ...)
  2021-03-19 18:25 ` [PR PATCH] [Updated] " mobinmob
@ 2021-03-19 18:25 ` ericonr
  2021-03-19 18:25 ` ericonr
  4 siblings, 0 replies; 6+ messages in thread
From: ericonr @ 2021-03-19 18:25 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

monkey: fix the runit service.
https://github.com/void-linux/void-packages/pull/29575

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [X] I generally don't use the affected packages but briefly tested this PR

`monkey` drops privileges to the default user which is defined in the configure stage correctly as `_monkey`. The chpst invocation uses the wrong user/group (`monkey`), is not needed and fails consistently.



<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] 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
-->


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

* Re: monkey: fix the runit service.
  2021-03-18 22:54 [PR PATCH] monkey: fix the runit service mobinmob
                   ` (3 preceding siblings ...)
  2021-03-19 18:25 ` [PR PATCH] [Merged]: " ericonr
@ 2021-03-19 18:25 ` ericonr
  4 siblings, 0 replies; 6+ messages in thread
From: ericonr @ 2021-03-19 18:25 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29575#issuecomment-803026955

Comment:
Perfect, thanks!

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

end of thread, other threads:[~2021-03-19 18:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 22:54 [PR PATCH] monkey: fix the runit service mobinmob
2021-03-19 17:50 ` ericonr
2021-03-19 18:18 ` mobinmob
2021-03-19 18:25 ` [PR PATCH] [Updated] " mobinmob
2021-03-19 18:25 ` [PR PATCH] [Merged]: " ericonr
2021-03-19 18:25 ` ericonr

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).