* [PR PATCH] 66: clean default $PATH, change system-dir.
@ 2021-02-15 19:23 mobinmob
2021-02-15 19:30 ` [PR PATCH] [Updated] " mobinmob
` (17 more replies)
0 siblings, 18 replies; 19+ messages in thread
From: mobinmob @ 2021-02-15 19:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2152 bytes --]
There is a new pull request by mobinmob against master on the void-packages repository
https://github.com/mobinmob/void-packages 66
https://github.com/void-linux/void-packages/pull/28783
66: clean default $PATH, change system-dir.
<!-- Mark items with [x] where applicable -->
#### General
#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
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
-->
There are two significant changes in the commit.
1. The default $PATH 66 uses for the services contains too many paths. This reduces it to just /usr/bin:/usr/sbin, which is what runsvdir uses by default.
2. The default directory for the system-dir, which is where 66 stores the trees created and information about enabled services, is `/var/lib/66`. But 66 can be used to boot a system and /var may not be in the root filesystem or mounted early, so boot will fail. This update, changes service-dir to `/usr/lib/66`. Users that upgrade from an earlier version or revision should either copy the contents of the old system-dir to the new or create trees again and enable services.
@gspe @flexibeast @Obarun
A patch file from https://github.com/void-linux/void-packages/pull/28783.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-66-28783.patch --]
[-- Type: text/x-diff, Size: 2238 bytes --]
From 8562a75c53353957da96b1ebef88f46d8e0f8b5e Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 15:55:47 +0200
Subject: [PATCH] 66: clean default $PATH, change system-dir.
---
srcpkgs/66/INSTALL.msg | 10 ++++++----
srcpkgs/66/template | 12 ++++++++++--
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/srcpkgs/66/INSTALL.msg b/srcpkgs/66/INSTALL.msg
index 4eb62e16d37..6b99e71aa81 100644
--- a/srcpkgs/66/INSTALL.msg
+++ b/srcpkgs/66/INSTALL.msg
@@ -1,4 +1,6 @@
-CAUTION: 66 v0.6.0.0 has changes to the way the log and env options
-are handled in the frontend service file. Please consult the
-documentation and make the appropriate changes before restarting
-or enabling your services, especially complex module services.
+CAUTION: package revision 0.6.1.1_2 changes the default system-dir
+from /var/lib/66 to /usr/lib/66. The change requires user intervention.
+Users who upgrade from an earlier version should either copy the
+contents of the old dir to the new one after installation, or recreate
+trees and re-enable services. That should be done before rebooting/halting
+the system.
\ No newline at end of file
diff --git a/srcpkgs/66/template b/srcpkgs/66/template
index 1a81ba6b898..9623ea2e90a 100644
--- a/srcpkgs/66/template
+++ b/srcpkgs/66/template
@@ -1,14 +1,15 @@
# Template file for '66'
pkgname=66
version=0.6.1.1
-revision=1
+revision=2
wrksrc="66-v${version}"
build_style=configure
configure_args="--prefix=/usr
--with-sysdeps=${XBPS_CROSS_BASE}/usr/lib/skalibs/sysdeps
--with-lib=${XBPS_CROSS_BASE}/usr/lib
--with-s6-log-timestamp=iso
- --with-s6-log-user=_s6log"
+ --with-s6-log-user=_s6log
+ --with-system-dir=/usr/lib/66"
hostmakedepends="pkg-config lowdown"
makedepends="oblibs-devel skalibs-devel execline-devel s6-devel s6-rc-devel"
short_desc="Small tools built around s6 and s6-rc programs"
@@ -23,6 +24,13 @@ conf_files="/etc/66/init /etc/66/init.conf"
system_accounts="_s6log"
+pre_configure() {
+
+ # Clean the default $PATH for service scripts
+ vsed -i "s@PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin@PATH=/usr/bin:usr/sbin@" \
+ "${wrksrc}/skel/init.conf"
+}
+
post_install() {
vdoc README.md
vlicense LICENSE
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PR PATCH] [Updated] 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
@ 2021-02-15 19:30 ` mobinmob
2021-02-16 16:03 ` ericonr
` (16 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mobinmob @ 2021-02-15 19:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2157 bytes --]
There is an updated pull request by mobinmob against master on the void-packages repository
https://github.com/mobinmob/void-packages 66
https://github.com/void-linux/void-packages/pull/28783
66: clean default $PATH, change system-dir.
<!-- Mark items with [x] where applicable -->
#### General
#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
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
-->
There are two significant changes in the commit.
1. The default $PATH 66 uses for the services contains too many paths. This reduces it to just /usr/bin:/usr/sbin, which is what runsvdir uses by default.
2. The default directory for the system-dir, which is where 66 stores the trees created and information about enabled services, is `/var/lib/66`. But 66 can be used to boot a system and /var may not be in the root filesystem or mounted early, so boot will fail. This update, changes service-dir to `/usr/lib/66`. Users that upgrade from an earlier version or revision should either copy the contents of the old system-dir to the new or create trees again and enable services.
@gspe @flexibeast @Obarun
A patch file from https://github.com/void-linux/void-packages/pull/28783.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-66-28783.patch --]
[-- Type: text/x-diff, Size: 2211 bytes --]
From 3abcd10a0b98491a7240354317b278a0789acdc3 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 15:55:47 +0200
Subject: [PATCH] 66: clean default $PATH, change system-dir.
---
srcpkgs/66/INSTALL.msg | 10 ++++++----
srcpkgs/66/template | 12 ++++++++++--
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/srcpkgs/66/INSTALL.msg b/srcpkgs/66/INSTALL.msg
index 4eb62e16d37..703a9c6eb6c 100644
--- a/srcpkgs/66/INSTALL.msg
+++ b/srcpkgs/66/INSTALL.msg
@@ -1,4 +1,6 @@
-CAUTION: 66 v0.6.0.0 has changes to the way the log and env options
-are handled in the frontend service file. Please consult the
-documentation and make the appropriate changes before restarting
-or enabling your services, especially complex module services.
+CAUTION: package revision 0.6.1.1_2 changes the default system-dir
+from /var/lib/66 to /usr/lib/66. The change requires user intervention.
+Users who upgrade from an earlier version should either copy the
+contents of the old dir to the new one after installation, or re-create
+trees and re-enable services. That should be done before rebooting/halting
+the system.
diff --git a/srcpkgs/66/template b/srcpkgs/66/template
index 1a81ba6b898..9623ea2e90a 100644
--- a/srcpkgs/66/template
+++ b/srcpkgs/66/template
@@ -1,14 +1,15 @@
# Template file for '66'
pkgname=66
version=0.6.1.1
-revision=1
+revision=2
wrksrc="66-v${version}"
build_style=configure
configure_args="--prefix=/usr
--with-sysdeps=${XBPS_CROSS_BASE}/usr/lib/skalibs/sysdeps
--with-lib=${XBPS_CROSS_BASE}/usr/lib
--with-s6-log-timestamp=iso
- --with-s6-log-user=_s6log"
+ --with-s6-log-user=_s6log
+ --with-system-dir=/usr/lib/66"
hostmakedepends="pkg-config lowdown"
makedepends="oblibs-devel skalibs-devel execline-devel s6-devel s6-rc-devel"
short_desc="Small tools built around s6 and s6-rc programs"
@@ -23,6 +24,13 @@ conf_files="/etc/66/init /etc/66/init.conf"
system_accounts="_s6log"
+pre_configure() {
+
+ # Clean the default $PATH for service scripts
+ vsed -i "s@PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin@PATH=/usr/bin:usr/sbin@" \
+ "${wrksrc}/skel/init.conf"
+}
+
post_install() {
vdoc README.md
vlicense LICENSE
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
2021-02-15 19:30 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-16 16:03 ` ericonr
2021-02-16 16:20 ` mobinmob
` (15 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2021-02-16 16:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 354 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28783#issuecomment-779935323
Comment:
Does that make `/usr/lib/66` receive writes all the time? Maybe `/etc` is a better place? That said, `/var/lib` even holds the random seed from runit, so I'm not sure how likely it is to be a separate mount point.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
2021-02-15 19:30 ` [PR PATCH] [Updated] " mobinmob
2021-02-16 16:03 ` ericonr
@ 2021-02-16 16:20 ` mobinmob
2021-02-16 18:55 ` [PR PATCH] [Updated] " mobinmob
` (14 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mobinmob @ 2021-02-16 16:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 897 bytes --]
New comment by mobinmob on void-packages repository
https://github.com/void-linux/void-packages/pull/28783#issuecomment-779946896
Comment:
> Does that make `/usr/lib/66` receive writes all the time? Maybe `/etc` is a better place? That said, `/var/lib` even holds the random seed from runit, so I'm not sure how likely it is to be a separate mount point.
Not all the time, no :) Regular writes will happen in /run/66 (tmpfs) and /var/log/ for the services after stage1/boot tree - early boot log is saved under /run/66. The contents of system dir do not change all the time, only on user configuration changes.
User configuration is already done in /etc/66. I can use the same for system-dir if it is a better option - it will certainly work.
The change is prompted by a failure to boot a voidlinux system installed via voidvault, which uses btrfs subvolumes for some /var subdirectories.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PR PATCH] [Updated] 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (2 preceding siblings ...)
2021-02-16 16:20 ` mobinmob
@ 2021-02-16 18:55 ` mobinmob
2021-02-16 18:58 ` mobinmob
` (13 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mobinmob @ 2021-02-16 18:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2156 bytes --]
There is an updated pull request by mobinmob against master on the void-packages repository
https://github.com/mobinmob/void-packages 66
https://github.com/void-linux/void-packages/pull/28783
66: clean default $PATH, change system-dir.
<!-- Mark items with [x] where applicable -->
#### General
#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
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
-->
There are two significant changes in the commit.
1. The default $PATH 66 uses for the services contains too many dirs. This reduces it to just /usr/bin:/usr/sbin, which is what runsvdir uses by default.
2. The default directory for the system-dir, which is where 66 stores the trees created and information about enabled services, is `/var/lib/66`. But 66 can be used to boot a system and /var may not be in the root filesystem or mounted early, so boot will fail. This update, changes service-dir to `/usr/lib/66`. Users that upgrade from an earlier version or revision should either copy the contents of the old system-dir to the new or create trees again and enable services.
@gspe @flexibeast @Obarun
A patch file from https://github.com/void-linux/void-packages/pull/28783.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-66-28783.patch --]
[-- Type: text/x-diff, Size: 2211 bytes --]
From e624460da8ebde54e6a738be88231be1a3568411 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 15:55:47 +0200
Subject: [PATCH] 66: clean default $PATH, change system-dir.
---
srcpkgs/66/INSTALL.msg | 10 ++++++----
srcpkgs/66/template | 12 ++++++++++--
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/srcpkgs/66/INSTALL.msg b/srcpkgs/66/INSTALL.msg
index 4eb62e16d37..48212a333c1 100644
--- a/srcpkgs/66/INSTALL.msg
+++ b/srcpkgs/66/INSTALL.msg
@@ -1,4 +1,6 @@
-CAUTION: 66 v0.6.0.0 has changes to the way the log and env options
-are handled in the frontend service file. Please consult the
-documentation and make the appropriate changes before restarting
-or enabling your services, especially complex module services.
+CAUTION: package revision 0.6.1.1_2 changes the default system-dir
+from /var/lib/66 to /etc/66/lib. The change requires user intervention.
+Users who upgrade from an earlier version should either copy the
+contents of the old dir to the new one after installation, or re-create
+trees and re-enable services. That should be done before rebooting/halting
+the system.
diff --git a/srcpkgs/66/template b/srcpkgs/66/template
index 1a81ba6b898..6c1a3aa22fc 100644
--- a/srcpkgs/66/template
+++ b/srcpkgs/66/template
@@ -1,14 +1,15 @@
# Template file for '66'
pkgname=66
version=0.6.1.1
-revision=1
+revision=2
wrksrc="66-v${version}"
build_style=configure
configure_args="--prefix=/usr
--with-sysdeps=${XBPS_CROSS_BASE}/usr/lib/skalibs/sysdeps
--with-lib=${XBPS_CROSS_BASE}/usr/lib
--with-s6-log-timestamp=iso
- --with-s6-log-user=_s6log"
+ --with-s6-log-user=_s6log
+ --with-system-dir=/etc/66/lib"
hostmakedepends="pkg-config lowdown"
makedepends="oblibs-devel skalibs-devel execline-devel s6-devel s6-rc-devel"
short_desc="Small tools built around s6 and s6-rc programs"
@@ -23,6 +24,13 @@ conf_files="/etc/66/init /etc/66/init.conf"
system_accounts="_s6log"
+pre_configure() {
+
+ # Clean the default $PATH for service scripts
+ vsed -i "s@PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin@PATH=/usr/bin:usr/sbin@" \
+ "${wrksrc}/skel/init.conf"
+}
+
post_install() {
vdoc README.md
vlicense LICENSE
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (3 preceding siblings ...)
2021-02-16 18:55 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-16 18:58 ` mobinmob
2021-02-16 18:59 ` mobinmob
` (12 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mobinmob @ 2021-02-16 18:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 352 bytes --]
New comment by mobinmob on void-packages repository
https://github.com/void-linux/void-packages/pull/28783#issuecomment-780049763
Comment:
@ericonr I changed the system-dir to` /etc/66/lib`. That is seperate enough from the other subdirs of `/etc/66`. The `/usr/lib/66` was a bad choice, since it already has a static lib inside.
@flexibeast @gspe
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (4 preceding siblings ...)
2021-02-16 18:58 ` mobinmob
@ 2021-02-16 18:59 ` mobinmob
2021-02-24 4:21 ` [PR REVIEW] " ericonr
` (11 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mobinmob @ 2021-02-16 18:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 349 bytes --]
New comment by mobinmob on void-packages repository
https://github.com/void-linux/void-packages/pull/28783#issuecomment-780049763
Comment:
@ericonr I changed the system-dir to` /etc/66/lib`. That is seperate enough from the other subdirs of `/etc/66`. `/usr/lib/66` was a bad choice, since it already has a static lib inside.
@flexibeast @gspe
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PR REVIEW] 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (5 preceding siblings ...)
2021-02-16 18:59 ` mobinmob
@ 2021-02-24 4:21 ` ericonr
2021-02-24 4:21 ` ericonr
` (10 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2021-02-24 4:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 256 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28783#discussion_r581613331
Comment:
```suggestion
vsed -i "s@PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin@PATH=/usr/bin:/usr/sbin@" \
```
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PR REVIEW] 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (6 preceding siblings ...)
2021-02-24 4:21 ` [PR REVIEW] " ericonr
@ 2021-02-24 4:21 ` ericonr
2021-02-24 9:47 ` [PR PATCH] [Updated] " mobinmob
` (9 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2021-02-24 4:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 236 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28783#discussion_r581613383
Comment:
And maybe `/usr/local/bin`... Might make sense to leave as is, now that I think about it.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PR PATCH] [Updated] 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (7 preceding siblings ...)
2021-02-24 4:21 ` ericonr
@ 2021-02-24 9:47 ` mobinmob
2021-02-24 9:49 ` [PR REVIEW] " mobinmob
` (8 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mobinmob @ 2021-02-24 9:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2156 bytes --]
There is an updated pull request by mobinmob against master on the void-packages repository
https://github.com/mobinmob/void-packages 66
https://github.com/void-linux/void-packages/pull/28783
66: clean default $PATH, change system-dir.
<!-- Mark items with [x] where applicable -->
#### General
#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
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
-->
There are two significant changes in the commit.
1. The default $PATH 66 uses for the services contains too many dirs. This reduces it to just /usr/bin:/usr/sbin, which is what runsvdir uses by default.
2. The default directory for the system-dir, which is where 66 stores the trees created and information about enabled services, is `/var/lib/66`. But 66 can be used to boot a system and /var may not be in the root filesystem or mounted early, so boot will fail. This update, changes service-dir to `/usr/lib/66`. Users that upgrade from an earlier version or revision should either copy the contents of the old system-dir to the new or create trees again and enable services.
@gspe @flexibeast @Obarun
A patch file from https://github.com/void-linux/void-packages/pull/28783.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-66-28783.patch --]
[-- Type: text/x-diff, Size: 4728 bytes --]
From b3ca024e650e1de5193edac9e3deee8a5f8eac99 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 15:55:47 +0200
Subject: [PATCH] 66: clean default $PATH, change system-dir.
---
srcpkgs/66/INSTALL.msg | 10 ++--
...021570c3037d716a1cb5d95eb06727d1745a5.diff | 47 +++++++++++++++++++
srcpkgs/66/template | 13 ++++-
3 files changed, 64 insertions(+), 6 deletions(-)
create mode 100644 srcpkgs/66/patches/e14021570c3037d716a1cb5d95eb06727d1745a5.diff
diff --git a/srcpkgs/66/INSTALL.msg b/srcpkgs/66/INSTALL.msg
index 4eb62e16d37..48212a333c1 100644
--- a/srcpkgs/66/INSTALL.msg
+++ b/srcpkgs/66/INSTALL.msg
@@ -1,4 +1,6 @@
-CAUTION: 66 v0.6.0.0 has changes to the way the log and env options
-are handled in the frontend service file. Please consult the
-documentation and make the appropriate changes before restarting
-or enabling your services, especially complex module services.
+CAUTION: package revision 0.6.1.1_2 changes the default system-dir
+from /var/lib/66 to /etc/66/lib. The change requires user intervention.
+Users who upgrade from an earlier version should either copy the
+contents of the old dir to the new one after installation, or re-create
+trees and re-enable services. That should be done before rebooting/halting
+the system.
diff --git a/srcpkgs/66/patches/e14021570c3037d716a1cb5d95eb06727d1745a5.diff b/srcpkgs/66/patches/e14021570c3037d716a1cb5d95eb06727d1745a5.diff
new file mode 100644
index 00000000000..001ee8097c2
--- /dev/null
+++ b/srcpkgs/66/patches/e14021570c3037d716a1cb5d95eb06727d1745a5.diff
@@ -0,0 +1,47 @@
+diff --git a/src/66/66-inservice.c b/src/66/66-inservice.c
+index cfe5995e4fb861b749edca9a324f0207f26facc7..03fda5587df20e796300333c2db9d4847b1aa5b9 100644
+--- a/src/66/66-inservice.c
++++ b/src/66/66-inservice.c
+@@ -621,6 +621,7 @@ static void info_display_envfile(char const *field,ss_resolve_t *res)
+
+ FOREACH_SASTR(&list,pos) {
+
++ ssize_t upstream = 0 ;
+ sa.len = 0 ;
+ salink.len = newlen ;
+ if (!stralloc_cats(&salink,"/") ||
+@@ -630,8 +631,25 @@ static void info_display_envfile(char const *field,ss_resolve_t *res)
+ if (!file_readputsa_g(&sa,salink.s))
+ log_dieusys(LOG_EXIT_SYS,"read environment file") ;
+
+- if (NOFIELD) {
++ /** Remove warning message */
++ if (list.s[pos] == '.') {
++
++ char t[sa.len + 1] ;
++
++ upstream = str_contain(sa.s,"[ENDWARN]") ;
+
++ if (upstream == -1)
++ log_die(LOG_EXIT_SYS,"invalid upstream configuration file! Do you have modified it? Tries to enable the service again.") ;
++
++ auto_strings(t,sa.s + upstream) ;
++
++ sa.len = 0 ;
++
++ if (!auto_stra(&sa,t))
++ log_die_nomem("stralloc") ;
++ }
++
++ if (NOFIELD) {
+
+ char *m = "environment variables from: " ;
+ size_t mlen = strlen(m) ;
+@@ -640,6 +658,7 @@ static void info_display_envfile(char const *field,ss_resolve_t *res)
+ if (!stralloc_inserts(&sa,0,msg) ||
+ !stralloc_0(&sa))
+ log_die_nomem("stralloc") ;
++
+ }
+
+ if (pos)
diff --git a/srcpkgs/66/template b/srcpkgs/66/template
index 1a81ba6b898..cb04869f766 100644
--- a/srcpkgs/66/template
+++ b/srcpkgs/66/template
@@ -1,14 +1,15 @@
# Template file for '66'
pkgname=66
version=0.6.1.1
-revision=1
+revision=2
wrksrc="66-v${version}"
build_style=configure
configure_args="--prefix=/usr
--with-sysdeps=${XBPS_CROSS_BASE}/usr/lib/skalibs/sysdeps
--with-lib=${XBPS_CROSS_BASE}/usr/lib
--with-s6-log-timestamp=iso
- --with-s6-log-user=_s6log"
+ --with-s6-log-user=_s6log
+ --with-system-dir=/etc/66/lib"
hostmakedepends="pkg-config lowdown"
makedepends="oblibs-devel skalibs-devel execline-devel s6-devel s6-rc-devel"
short_desc="Small tools built around s6 and s6-rc programs"
@@ -18,11 +19,19 @@ homepage="http://web.obarun.org/software/"
changelog="https://framagit.org/Obarun/66/raw/master/NEWS.md"
distfiles="https://framagit.org/Obarun/66/-/archive/v${version}/66-v${version}.tar.bz2"
checksum=4f80d94851a8c26e9666ea0f274890fc3abb6185ca1fe9fd8e2ad71e27a2ade9
+patch_args=" -Np1"
conf_files="/etc/66/init /etc/66/init.conf"
system_accounts="_s6log"
+pre_configure() {
+
+ # Clean the default $PATH for service scripts
+ vsed -i "s@PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin@PATH=/usr/bin:usr/sbin@" \
+ "${wrksrc}/skel/init.conf"
+}
+
post_install() {
vdoc README.md
vlicense LICENSE
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PR REVIEW] 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (8 preceding siblings ...)
2021-02-24 9:47 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-24 9:49 ` mobinmob
2021-02-24 9:51 ` mobinmob
` (7 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mobinmob @ 2021-02-24 9:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 376 bytes --]
New review comment by mobinmob on void-packages repository
https://github.com/void-linux/void-packages/pull/28783#discussion_r581811841
Comment:
In the runit supervision tree, the default $PATH is [/usr/bin:/usr/sbin](https://github.com/void-linux/void-runit/blob/master/2#L4). Is there a reason to have a different path for an s6 supervision tree in the same distribution?
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (9 preceding siblings ...)
2021-02-24 9:49 ` [PR REVIEW] " mobinmob
@ 2021-02-24 9:51 ` mobinmob
2021-02-24 12:41 ` [PR PATCH] [Updated] " mobinmob
` (6 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mobinmob @ 2021-02-24 9:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 220 bytes --]
New comment by mobinmob on void-packages repository
https://github.com/void-linux/void-packages/pull/28783#issuecomment-784951964
Comment:
I rebased on current master and added a small upstream patch (ui improvement).
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PR PATCH] [Updated] 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (10 preceding siblings ...)
2021-02-24 9:51 ` mobinmob
@ 2021-02-24 12:41 ` mobinmob
2021-02-24 12:48 ` mobinmob
` (5 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mobinmob @ 2021-02-24 12:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2156 bytes --]
There is an updated pull request by mobinmob against master on the void-packages repository
https://github.com/mobinmob/void-packages 66
https://github.com/void-linux/void-packages/pull/28783
66: clean default $PATH, change system-dir.
<!-- Mark items with [x] where applicable -->
#### General
#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
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
-->
There are two significant changes in the commit.
1. The default $PATH 66 uses for the services contains too many dirs. This reduces it to just /usr/bin:/usr/sbin, which is what runsvdir uses by default.
2. The default directory for the system-dir, which is where 66 stores the trees created and information about enabled services, is `/var/lib/66`. But 66 can be used to boot a system and /var may not be in the root filesystem or mounted early, so boot will fail. This update, changes service-dir to `/usr/lib/66`. Users that upgrade from an earlier version or revision should either copy the contents of the old system-dir to the new or create trees again and enable services.
@gspe @flexibeast @Obarun
A patch file from https://github.com/void-linux/void-packages/pull/28783.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-66-28783.patch --]
[-- Type: text/x-diff, Size: 4768 bytes --]
From 0ca30ca670a0bb3d344c485057334ea0594ba699 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Mon, 15 Feb 2021 15:55:47 +0200
Subject: [PATCH] 66: clean default $PATH, change system-dir.
---
srcpkgs/66/INSTALL.msg | 10 ++--
...021570c3037d716a1cb5d95eb06727d1745a5.diff | 47 +++++++++++++++++++
srcpkgs/66/template | 15 ++++--
3 files changed, 65 insertions(+), 7 deletions(-)
create mode 100644 srcpkgs/66/patches/e14021570c3037d716a1cb5d95eb06727d1745a5.diff
diff --git a/srcpkgs/66/INSTALL.msg b/srcpkgs/66/INSTALL.msg
index 4eb62e16d376..48212a333c1e 100644
--- a/srcpkgs/66/INSTALL.msg
+++ b/srcpkgs/66/INSTALL.msg
@@ -1,4 +1,6 @@
-CAUTION: 66 v0.6.0.0 has changes to the way the log and env options
-are handled in the frontend service file. Please consult the
-documentation and make the appropriate changes before restarting
-or enabling your services, especially complex module services.
+CAUTION: package revision 0.6.1.1_2 changes the default system-dir
+from /var/lib/66 to /etc/66/lib. The change requires user intervention.
+Users who upgrade from an earlier version should either copy the
+contents of the old dir to the new one after installation, or re-create
+trees and re-enable services. That should be done before rebooting/halting
+the system.
diff --git a/srcpkgs/66/patches/e14021570c3037d716a1cb5d95eb06727d1745a5.diff b/srcpkgs/66/patches/e14021570c3037d716a1cb5d95eb06727d1745a5.diff
new file mode 100644
index 000000000000..001ee8097c28
--- /dev/null
+++ b/srcpkgs/66/patches/e14021570c3037d716a1cb5d95eb06727d1745a5.diff
@@ -0,0 +1,47 @@
+diff --git a/src/66/66-inservice.c b/src/66/66-inservice.c
+index cfe5995e4fb861b749edca9a324f0207f26facc7..03fda5587df20e796300333c2db9d4847b1aa5b9 100644
+--- a/src/66/66-inservice.c
++++ b/src/66/66-inservice.c
+@@ -621,6 +621,7 @@ static void info_display_envfile(char const *field,ss_resolve_t *res)
+
+ FOREACH_SASTR(&list,pos) {
+
++ ssize_t upstream = 0 ;
+ sa.len = 0 ;
+ salink.len = newlen ;
+ if (!stralloc_cats(&salink,"/") ||
+@@ -630,8 +631,25 @@ static void info_display_envfile(char const *field,ss_resolve_t *res)
+ if (!file_readputsa_g(&sa,salink.s))
+ log_dieusys(LOG_EXIT_SYS,"read environment file") ;
+
+- if (NOFIELD) {
++ /** Remove warning message */
++ if (list.s[pos] == '.') {
++
++ char t[sa.len + 1] ;
++
++ upstream = str_contain(sa.s,"[ENDWARN]") ;
+
++ if (upstream == -1)
++ log_die(LOG_EXIT_SYS,"invalid upstream configuration file! Do you have modified it? Tries to enable the service again.") ;
++
++ auto_strings(t,sa.s + upstream) ;
++
++ sa.len = 0 ;
++
++ if (!auto_stra(&sa,t))
++ log_die_nomem("stralloc") ;
++ }
++
++ if (NOFIELD) {
+
+ char *m = "environment variables from: " ;
+ size_t mlen = strlen(m) ;
+@@ -640,6 +658,7 @@ static void info_display_envfile(char const *field,ss_resolve_t *res)
+ if (!stralloc_inserts(&sa,0,msg) ||
+ !stralloc_0(&sa))
+ log_die_nomem("stralloc") ;
++
+ }
+
+ if (pos)
diff --git a/srcpkgs/66/template b/srcpkgs/66/template
index 1a81ba6b8986..a89b5257868a 100644
--- a/srcpkgs/66/template
+++ b/srcpkgs/66/template
@@ -1,14 +1,15 @@
# Template file for '66'
pkgname=66
version=0.6.1.1
-revision=1
+revision=2
wrksrc="66-v${version}"
build_style=configure
configure_args="--prefix=/usr
--with-sysdeps=${XBPS_CROSS_BASE}/usr/lib/skalibs/sysdeps
--with-lib=${XBPS_CROSS_BASE}/usr/lib
--with-s6-log-timestamp=iso
- --with-s6-log-user=_s6log"
+ --with-s6-log-user=_s6log
+ --with-system-dir=/etc/66/lib"
hostmakedepends="pkg-config lowdown"
makedepends="oblibs-devel skalibs-devel execline-devel s6-devel s6-rc-devel"
short_desc="Small tools built around s6 and s6-rc programs"
@@ -18,11 +19,19 @@ homepage="http://web.obarun.org/software/"
changelog="https://framagit.org/Obarun/66/raw/master/NEWS.md"
distfiles="https://framagit.org/Obarun/66/-/archive/v${version}/66-v${version}.tar.bz2"
checksum=4f80d94851a8c26e9666ea0f274890fc3abb6185ca1fe9fd8e2ad71e27a2ade9
+patch_args=" -Np1"
-conf_files="/etc/66/init /etc/66/init.conf"
+conf_files="/etc/66/init.conf"
system_accounts="_s6log"
+pre_configure() {
+
+ # Clean the default $PATH for service scripts
+ vsed -i "s@PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin@PATH=/usr/bin:/usr/sbin@" \
+ "${wrksrc}/skel/init.conf"
+}
+
post_install() {
vdoc README.md
vlicense LICENSE
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (11 preceding siblings ...)
2021-02-24 12:41 ` [PR PATCH] [Updated] " mobinmob
@ 2021-02-24 12:48 ` mobinmob
2021-02-24 12:49 ` [PR REVIEW] " mobinmob
` (4 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mobinmob @ 2021-02-24 12:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 184 bytes --]
New comment by mobinmob on void-packages repository
https://github.com/void-linux/void-packages/pull/28783#issuecomment-785051986
Comment:
Also removed /etc/66/init from conf_files.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PR REVIEW] 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (12 preceding siblings ...)
2021-02-24 12:48 ` mobinmob
@ 2021-02-24 12:49 ` mobinmob
2021-02-24 13:32 ` mobinmob
` (3 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mobinmob @ 2021-02-24 12:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 193 bytes --]
New review comment by mobinmob on void-packages repository
https://github.com/void-linux/void-packages/pull/28783#discussion_r581931123
Comment:
Added the missing slash, thank you @ericonr .
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (13 preceding siblings ...)
2021-02-24 12:49 ` [PR REVIEW] " mobinmob
@ 2021-02-24 13:32 ` mobinmob
2021-02-24 14:15 ` [PR REVIEW] " mobinmob
` (2 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mobinmob @ 2021-02-24 13:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 225 bytes --]
New comment by mobinmob on void-packages repository
https://github.com/void-linux/void-packages/pull/28783#issuecomment-784951964
Comment:
I rebased on current master and added a small upstream patch (nice ui improvement).
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PR REVIEW] 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (14 preceding siblings ...)
2021-02-24 13:32 ` mobinmob
@ 2021-02-24 14:15 ` mobinmob
2021-02-24 15:04 ` ericonr
2021-02-24 15:16 ` [PR PATCH] [Merged]: " ericonr
17 siblings, 0 replies; 19+ messages in thread
From: mobinmob @ 2021-02-24 14:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 351 bytes --]
New review comment by mobinmob on void-packages repository
https://github.com/void-linux/void-packages/pull/28783#discussion_r581811841
Comment:
In the runit supervision tree, the default $PATH is [/usr/bin:/usr/sbin](https://github.com/void-linux/void-runit/blob/master/2#L4). Is there a reason to have a different path for an s6 supervision tree?
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PR REVIEW] 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (15 preceding siblings ...)
2021-02-24 14:15 ` [PR REVIEW] " mobinmob
@ 2021-02-24 15:04 ` ericonr
2021-02-24 15:16 ` [PR PATCH] [Merged]: " ericonr
17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2021-02-24 15:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 244 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28783#discussion_r582034692
Comment:
Ah, sorry! Yes, it probably makes sense to leave as is, and PATH can be fixed in the login shell.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PR PATCH] [Merged]: 66: clean default $PATH, change system-dir.
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
` (16 preceding siblings ...)
2021-02-24 15:04 ` ericonr
@ 2021-02-24 15:16 ` ericonr
17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2021-02-24 15:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2003 bytes --]
There's a merged pull request on the void-packages repository
66: clean default $PATH, change system-dir.
https://github.com/void-linux/void-packages/pull/28783
Description:
<!-- Mark items with [x] where applicable -->
#### General
#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
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
-->
There are two significant changes in the commit.
1. The default $PATH 66 uses for the services contains too many dirs. This reduces it to just /usr/bin:/usr/sbin, which is what runsvdir uses by default.
2. The default directory for the system-dir, which is where 66 stores the trees created and information about enabled services, is `/var/lib/66`. But 66 can be used to boot a system and /var may not be in the root filesystem or mounted early, so boot will fail. This update, changes service-dir to `/usr/lib/66`. Users that upgrade from an earlier version or revision should either copy the contents of the old system-dir to the new or create trees again and enable services.
@gspe @flexibeast @Obarun
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2021-02-24 15:16 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15 19:23 [PR PATCH] 66: clean default $PATH, change system-dir mobinmob
2021-02-15 19:30 ` [PR PATCH] [Updated] " mobinmob
2021-02-16 16:03 ` ericonr
2021-02-16 16:20 ` mobinmob
2021-02-16 18:55 ` [PR PATCH] [Updated] " mobinmob
2021-02-16 18:58 ` mobinmob
2021-02-16 18:59 ` mobinmob
2021-02-24 4:21 ` [PR REVIEW] " ericonr
2021-02-24 4:21 ` ericonr
2021-02-24 9:47 ` [PR PATCH] [Updated] " mobinmob
2021-02-24 9:49 ` [PR REVIEW] " mobinmob
2021-02-24 9:51 ` mobinmob
2021-02-24 12:41 ` [PR PATCH] [Updated] " mobinmob
2021-02-24 12:48 ` mobinmob
2021-02-24 12:49 ` [PR REVIEW] " mobinmob
2021-02-24 13:32 ` mobinmob
2021-02-24 14:15 ` [PR REVIEW] " mobinmob
2021-02-24 15:04 ` ericonr
2021-02-24 15:16 ` [PR PATCH] [Merged]: " 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).