Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them
@ 2021-10-07 13:52 TinfoilSubmarine
  2021-10-07 14:04 ` [PR PATCH] [Updated] " TinfoilSubmarine
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: TinfoilSubmarine @ 2021-10-07 13:52 UTC (permalink / raw)
  To: ml

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

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

https://github.com/TinfoilSubmarine/void-packages vsv-fixes
https://github.com/void-linux/void-packages/pull/33406

vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them
<!-- 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
- [ ] 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
-->

Fixes https://github.com/void-linux/void-packages/issues/32076.

I added `runit-void` to `hostmakedepends` of all packages where `log/run` pointed to `/usr/bin/vlogger`. I also added tests for -L to ensure that if there is a service file that is a dangling symlink, we error and exit.

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

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

From 64c62f1d452786605100821052aa79ad49325cf3 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:35:14 -0400
Subject: [PATCH 01/12] bluez: include runit-void in hostmakedepends

---
 srcpkgs/bluez/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/bluez/template b/srcpkgs/bluez/template
index 7e886382522c..86cabb1c7e66 100644
--- a/srcpkgs/bluez/template
+++ b/srcpkgs/bluez/template
@@ -1,13 +1,13 @@
 # Template file for 'bluez'
 pkgname=bluez
 version=5.61
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-udevdir=/usr/lib/udev --disable-systemd
  --enable-sixaxis --enable-threads --enable-library --enable-deprecated
  --enable-external-ell $(vopt_enable mesh) $(vopt_enable nfc)
  $(vopt_enable experimental)"
-hostmakedepends="automake flex libtool pkg-config python3-docutils"
+hostmakedepends="automake flex libtool pkg-config python3-docutils runit-void"
 makedepends="cups-devel eudev-libudev-devel libglib-devel libical-devel
  readline-devel ell-devel $(vopt_if mesh json-c-devel)"
 short_desc="Bluetooth tools and daemons"

From 83b04e3a3f50b8d1cb90fbb3f98b7888089b0b07 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:36:14 -0400
Subject: [PATCH 02/12] caddy: include runit-void in hostmakedepends

---
 srcpkgs/caddy/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/caddy/template b/srcpkgs/caddy/template
index 3ace9a1870b3..55df8e8e3183 100644
--- a/srcpkgs/caddy/template
+++ b/srcpkgs/caddy/template
@@ -1,10 +1,11 @@
 # Template file for 'caddy'
 pkgname=caddy
 version=2.4.5
-revision=1
+revision=2
 build_style=go
 go_import_path=github.com/caddyserver/caddy/v2
 go_package="${go_import_path}/cmd/caddy"
+hostmakedepends="runit-void"
 short_desc="Fast, cross-platform HTTP/2 web server with automatic HTTPS"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="Apache-2.0"

From b6865663a7851529ae3d197097adbbb161f1fd38 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:37:07 -0400
Subject: [PATCH 03/12] dhcp: include runit-void in hostmakedepends

---
 srcpkgs/dhcp/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/dhcp/template b/srcpkgs/dhcp/template
index 2db18dcc60b0..8572e971de9f 100644
--- a/srcpkgs/dhcp/template
+++ b/srcpkgs/dhcp/template
@@ -1,10 +1,10 @@
 # Template file for 'dhcp'
 pkgname=dhcp
 version=4.4.2P1
-revision=2
+revision=3
 wrksrc="dhcp-${version/P/-P}"
 build_style=gnu-configure
-hostmakedepends="perl tar automake libtool"
+hostmakedepends="perl tar automake libtool runit-void"
 short_desc="Server from the Internet Software Consortium's implementation of DHCP"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MPL-2.0"

From 49c1fb0af76a65c7a67f6d9849cacb96cbead7fa Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:37:57 -0400
Subject: [PATCH 04/12] go-ipfs: include runit-void in hostmakedepends

---
 srcpkgs/go-ipfs/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/go-ipfs/template b/srcpkgs/go-ipfs/template
index 4a53dd948797..a6f5d1be67bc 100644
--- a/srcpkgs/go-ipfs/template
+++ b/srcpkgs/go-ipfs/template
@@ -1,11 +1,11 @@
 # Template file for 'go-ipfs'
 pkgname=go-ipfs
 version=0.8.0
-revision=1
+revision=2
 build_style=go
 go_import_path="github.com/ipfs/go-ipfs"
 go_package="${go_import_path}/cmd/ipfs"
-hostmakedepends="git"
+hostmakedepends="git runit-void"
 depends="fs-repo-migrations>=1.7.1"
 short_desc="Global versioned P2P merkle DAG file system"
 maintainer="Christopher Brannon <chris@the-brannons.com>"

From f4dcf5c90e173048991699482ed20bd082931aaa Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:38:15 -0400
Subject: [PATCH 05/12] lldpd: include runit-void in hostmakedepends

---
 srcpkgs/lldpd/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/lldpd/template b/srcpkgs/lldpd/template
index aa63aae2c8c4..b1f23d40c70c 100644
--- a/srcpkgs/lldpd/template
+++ b/srcpkgs/lldpd/template
@@ -1,10 +1,10 @@
 # Template file for 'lldpd'
 pkgname=lldpd
 version=1.0.11
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-privsep-chroot=/var/empty"
-hostmakedepends="pkg-config"
+hostmakedepends="pkg-config runit-void"
 makedepends="libpcap-devel libcap-devel libevent-devel readline-devel"
 short_desc="Broadcast 802.1AB neighbor announcements"
 maintainer="Zach Dykstra <dykstra.zachary@gmail.com>"

From 38c6c6e9a979f5d93632d1788b9f3fe87f9ffa44 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:38:31 -0400
Subject: [PATCH 06/12] minidlna: include runit-void in hostmakedepends

---
 srcpkgs/minidlna/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/minidlna/template b/srcpkgs/minidlna/template
index b112fb56efcc..f5c01067137c 100644
--- a/srcpkgs/minidlna/template
+++ b/srcpkgs/minidlna/template
@@ -1,7 +1,7 @@
 # Template file for 'minidlna'
 pkgname=minidlna
 version=1.3.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="
  --sbindir=/usr/bin
@@ -11,7 +11,7 @@ conf_files="/etc/minidlna.conf"
 make_dirs="
  /var/lib/minidlna 0750 minidlna minidlna
  /var/log/minidlna 0750 minidlna minidlna"
-hostmakedepends="pkg-config gettext"
+hostmakedepends="pkg-config gettext runit-void"
 makedepends="ffmpeg-devel libjpeg-turbo-devel sqlite-devel libexif-devel
  libid3tag-devel libvorbis-devel libflac-devel"
 short_desc="DLNA/UPnP-AV compliant media server"

From e9de4faafe69f2aee8b8b6f0451717dc081cf810 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:38:50 -0400
Subject: [PATCH 07/12] moby: include runit-void in hostmakedepends

---
 srcpkgs/moby/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/moby/template b/srcpkgs/moby/template
index 50e198d91574..4074b782df34 100644
--- a/srcpkgs/moby/template
+++ b/srcpkgs/moby/template
@@ -1,12 +1,12 @@
 # Template file for 'moby'
 pkgname=moby
 version=20.10.6
-revision=1
+revision=2
 _libnetwork_commit=b3507428be5b458cb0e2b4086b13531fb0706e46
 create_wrksrc=yes
 build_style=go
 go_import_path="github.com/docker/docker"
-hostmakedepends="pkg-config"
+hostmakedepends="pkg-config runit-void"
 makedepends="libbtrfs-devel device-mapper-devel libseccomp-devel"
 depends="containerd iptables xz"
 short_desc="Container engine for the Docker ecosystem"

From b8080e69b09a1803846a187675560eeb2bb2b2f5 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:39:08 -0400
Subject: [PATCH 08/12] synapse: include runit-void in hostmakedepends

---
 srcpkgs/synapse/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template
index f541e07ede83..1f4f2d30a5be 100644
--- a/srcpkgs/synapse/template
+++ b/srcpkgs/synapse/template
@@ -1,9 +1,9 @@
 # Template file for 'synapse'
 pkgname=synapse
 version=1.44.0
-revision=1
+revision=2
 build_style=python3-module
-hostmakedepends="python3-setuptools"
+hostmakedepends="python3-setuptools runit-void"
 depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-signedjson python3-pynacl python3-service_identity python3-Twisted
  python3-openssl python3-yaml python3-pyasn1 python3-pyasn1-modules

From 35cfcc89975e7f3d6295e7e46156d12173e3dea4 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:39:52 -0400
Subject: [PATCH 09/12] vnstat: include runit-void in hostmakedepends

---
 srcpkgs/vnstat/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/vnstat/template b/srcpkgs/vnstat/template
index 73c5ae382168..5f4f922e8282 100644
--- a/srcpkgs/vnstat/template
+++ b/srcpkgs/vnstat/template
@@ -1,9 +1,9 @@
 # Template file for 'vnstat'
 pkgname=vnstat
 version=2.8
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="automake libtool pkg-config"
+hostmakedepends="automake libtool pkg-config runit-void"
 makedepends="gd-devel sqlite-devel"
 checkdepends="check-devel"
 short_desc="Terminal based network traffic monitor"

From 8e5cc04c687da81b59eb2df2928ab08138c584d4 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:40:09 -0400
Subject: [PATCH 10/12] yggdrasil: include runit-void in hostmakedepends

---
 srcpkgs/yggdrasil/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/yggdrasil/template b/srcpkgs/yggdrasil/template
index 6e756e9d5239..2f67df04503d 100644
--- a/srcpkgs/yggdrasil/template
+++ b/srcpkgs/yggdrasil/template
@@ -1,11 +1,11 @@
 # Template file for 'yggdrasil'
 pkgname=yggdrasil
 version=0.4.0
-revision=1
+revision=2
 wrksrc="yggdrasil-go-${version}"
 build_style=go
 go_import_path=github.com/yggdrasil-network/yggdrasil-go
-hostmakedepends="git"
+hostmakedepends="git runit-void"
 short_desc="Experiment in scalable routing as an encrypted IPv6 overlay network"
 maintainer="Jan Christian Gruenhage <jan.christian@gruenhage.xyz>"
 license="LGPL-3.0-only"

From d52407563f19970200487297a8d36f5c45b87f2f Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:40:18 -0400
Subject: [PATCH 11/12] znc: include runit-void in hostmakedepends

---
 srcpkgs/znc/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/znc/template b/srcpkgs/znc/template
index bff3702aa131..4c8ff33d1ab9 100644
--- a/srcpkgs/znc/template
+++ b/srcpkgs/znc/template
@@ -1,7 +1,7 @@
 # Template file for 'znc'
 pkgname=znc
 version=1.8.2
-revision=7
+revision=8
 build_style=gnu-configure
 configure_args="
  --enable-python
@@ -9,7 +9,7 @@ configure_args="
  --enable-tcl
  --enable-cyrus
  --with-tcl=$XBPS_CROSS_BASE/usr/lib"
-hostmakedepends="pkg-config perl tar"
+hostmakedepends="pkg-config perl tar runit-void"
 makedepends="openssl-devel python3-devel tcl-devel libsasl-devel
  icu-devel zlib-devel perl"
 short_desc="Advanced IRC Bouncer"

From 6e4bef49c043460153c6610bfb651f704f4fc9d2 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:44:32 -0400
Subject: [PATCH 12/12] common/environment/setup: vsv throws error with
 dangling symlink

---
 common/environment/setup/install.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/common/environment/setup/install.sh b/common/environment/setup/install.sh
index a6b68435eb43..1a6099cdfb20 100644
--- a/common/environment/setup/install.sh
+++ b/common/environment/setup/install.sh
@@ -35,11 +35,18 @@ _vsv() {
 	chmod 755 ${PKGDESTDIR}/etc/sv/${service}/run
 	if [ -r ${PKGDESTDIR}/etc/sv/${service}/finish ]; then
 		chmod 755 ${PKGDESTDIR}/etc/sv/${service}/finish
+	elif [ -L ${PKGDESTDIR}/etc/sv/${service}/finish ]; then
+		msg_red "$pkgver: vsv: cannot operate on dangling symlink ${service}/finish\n"
+		return 1
+	fi
 	fi
 	ln ${LN_OPTS} /run/runit/supervise.${service} ${PKGDESTDIR}/etc/sv/${service}/supervise
 	if [ -r ${PKGDESTDIR}/etc/sv/${service}/log/run ]; then
 		chmod 755 ${PKGDESTDIR}/etc/sv/${service}/log/run
 		ln ${LN_OPTS} /run/runit/supervise.${service}-log ${PKGDESTDIR}/etc/sv/${service}/log/supervise
+	elif [ -L ${PKGDESTDIR}/etc/sv/${service}/log/run ]; then
+		msg_red "$pkgver: vsv: cannot operate on dangling symlink ${service}/log/run\n"
+		return 1
 	fi
 }
 

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

* Re: [PR PATCH] [Updated] vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them
  2021-10-07 13:52 [PR PATCH] vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them TinfoilSubmarine
@ 2021-10-07 14:04 ` TinfoilSubmarine
  2021-10-07 14:06 ` TinfoilSubmarine
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: TinfoilSubmarine @ 2021-10-07 14:04 UTC (permalink / raw)
  To: ml

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

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

https://github.com/TinfoilSubmarine/void-packages vsv-fixes
https://github.com/void-linux/void-packages/pull/33406

vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them
<!-- 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
- [ ] 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
-->

Fixes https://github.com/void-linux/void-packages/issues/32076.

I added `runit-void` to `hostmakedepends` of all packages where `log/run` pointed to `/usr/bin/vlogger`. I also added tests for -L to ensure that if there is a service file that is a dangling symlink, we error and exit.

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

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

From 64c62f1d452786605100821052aa79ad49325cf3 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:35:14 -0400
Subject: [PATCH 01/12] bluez: include runit-void in hostmakedepends

---
 srcpkgs/bluez/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/bluez/template b/srcpkgs/bluez/template
index 7e886382522c..86cabb1c7e66 100644
--- a/srcpkgs/bluez/template
+++ b/srcpkgs/bluez/template
@@ -1,13 +1,13 @@
 # Template file for 'bluez'
 pkgname=bluez
 version=5.61
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-udevdir=/usr/lib/udev --disable-systemd
  --enable-sixaxis --enable-threads --enable-library --enable-deprecated
  --enable-external-ell $(vopt_enable mesh) $(vopt_enable nfc)
  $(vopt_enable experimental)"
-hostmakedepends="automake flex libtool pkg-config python3-docutils"
+hostmakedepends="automake flex libtool pkg-config python3-docutils runit-void"
 makedepends="cups-devel eudev-libudev-devel libglib-devel libical-devel
  readline-devel ell-devel $(vopt_if mesh json-c-devel)"
 short_desc="Bluetooth tools and daemons"

From 83b04e3a3f50b8d1cb90fbb3f98b7888089b0b07 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:36:14 -0400
Subject: [PATCH 02/12] caddy: include runit-void in hostmakedepends

---
 srcpkgs/caddy/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/caddy/template b/srcpkgs/caddy/template
index 3ace9a1870b3..55df8e8e3183 100644
--- a/srcpkgs/caddy/template
+++ b/srcpkgs/caddy/template
@@ -1,10 +1,11 @@
 # Template file for 'caddy'
 pkgname=caddy
 version=2.4.5
-revision=1
+revision=2
 build_style=go
 go_import_path=github.com/caddyserver/caddy/v2
 go_package="${go_import_path}/cmd/caddy"
+hostmakedepends="runit-void"
 short_desc="Fast, cross-platform HTTP/2 web server with automatic HTTPS"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="Apache-2.0"

From b6865663a7851529ae3d197097adbbb161f1fd38 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:37:07 -0400
Subject: [PATCH 03/12] dhcp: include runit-void in hostmakedepends

---
 srcpkgs/dhcp/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/dhcp/template b/srcpkgs/dhcp/template
index 2db18dcc60b0..8572e971de9f 100644
--- a/srcpkgs/dhcp/template
+++ b/srcpkgs/dhcp/template
@@ -1,10 +1,10 @@
 # Template file for 'dhcp'
 pkgname=dhcp
 version=4.4.2P1
-revision=2
+revision=3
 wrksrc="dhcp-${version/P/-P}"
 build_style=gnu-configure
-hostmakedepends="perl tar automake libtool"
+hostmakedepends="perl tar automake libtool runit-void"
 short_desc="Server from the Internet Software Consortium's implementation of DHCP"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MPL-2.0"

From 49c1fb0af76a65c7a67f6d9849cacb96cbead7fa Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:37:57 -0400
Subject: [PATCH 04/12] go-ipfs: include runit-void in hostmakedepends

---
 srcpkgs/go-ipfs/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/go-ipfs/template b/srcpkgs/go-ipfs/template
index 4a53dd948797..a6f5d1be67bc 100644
--- a/srcpkgs/go-ipfs/template
+++ b/srcpkgs/go-ipfs/template
@@ -1,11 +1,11 @@
 # Template file for 'go-ipfs'
 pkgname=go-ipfs
 version=0.8.0
-revision=1
+revision=2
 build_style=go
 go_import_path="github.com/ipfs/go-ipfs"
 go_package="${go_import_path}/cmd/ipfs"
-hostmakedepends="git"
+hostmakedepends="git runit-void"
 depends="fs-repo-migrations>=1.7.1"
 short_desc="Global versioned P2P merkle DAG file system"
 maintainer="Christopher Brannon <chris@the-brannons.com>"

From f4dcf5c90e173048991699482ed20bd082931aaa Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:38:15 -0400
Subject: [PATCH 05/12] lldpd: include runit-void in hostmakedepends

---
 srcpkgs/lldpd/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/lldpd/template b/srcpkgs/lldpd/template
index aa63aae2c8c4..b1f23d40c70c 100644
--- a/srcpkgs/lldpd/template
+++ b/srcpkgs/lldpd/template
@@ -1,10 +1,10 @@
 # Template file for 'lldpd'
 pkgname=lldpd
 version=1.0.11
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-privsep-chroot=/var/empty"
-hostmakedepends="pkg-config"
+hostmakedepends="pkg-config runit-void"
 makedepends="libpcap-devel libcap-devel libevent-devel readline-devel"
 short_desc="Broadcast 802.1AB neighbor announcements"
 maintainer="Zach Dykstra <dykstra.zachary@gmail.com>"

From 38c6c6e9a979f5d93632d1788b9f3fe87f9ffa44 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:38:31 -0400
Subject: [PATCH 06/12] minidlna: include runit-void in hostmakedepends

---
 srcpkgs/minidlna/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/minidlna/template b/srcpkgs/minidlna/template
index b112fb56efcc..f5c01067137c 100644
--- a/srcpkgs/minidlna/template
+++ b/srcpkgs/minidlna/template
@@ -1,7 +1,7 @@
 # Template file for 'minidlna'
 pkgname=minidlna
 version=1.3.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="
  --sbindir=/usr/bin
@@ -11,7 +11,7 @@ conf_files="/etc/minidlna.conf"
 make_dirs="
  /var/lib/minidlna 0750 minidlna minidlna
  /var/log/minidlna 0750 minidlna minidlna"
-hostmakedepends="pkg-config gettext"
+hostmakedepends="pkg-config gettext runit-void"
 makedepends="ffmpeg-devel libjpeg-turbo-devel sqlite-devel libexif-devel
  libid3tag-devel libvorbis-devel libflac-devel"
 short_desc="DLNA/UPnP-AV compliant media server"

From e9de4faafe69f2aee8b8b6f0451717dc081cf810 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:38:50 -0400
Subject: [PATCH 07/12] moby: include runit-void in hostmakedepends

---
 srcpkgs/moby/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/moby/template b/srcpkgs/moby/template
index 50e198d91574..4074b782df34 100644
--- a/srcpkgs/moby/template
+++ b/srcpkgs/moby/template
@@ -1,12 +1,12 @@
 # Template file for 'moby'
 pkgname=moby
 version=20.10.6
-revision=1
+revision=2
 _libnetwork_commit=b3507428be5b458cb0e2b4086b13531fb0706e46
 create_wrksrc=yes
 build_style=go
 go_import_path="github.com/docker/docker"
-hostmakedepends="pkg-config"
+hostmakedepends="pkg-config runit-void"
 makedepends="libbtrfs-devel device-mapper-devel libseccomp-devel"
 depends="containerd iptables xz"
 short_desc="Container engine for the Docker ecosystem"

From b8080e69b09a1803846a187675560eeb2bb2b2f5 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:39:08 -0400
Subject: [PATCH 08/12] synapse: include runit-void in hostmakedepends

---
 srcpkgs/synapse/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template
index f541e07ede83..1f4f2d30a5be 100644
--- a/srcpkgs/synapse/template
+++ b/srcpkgs/synapse/template
@@ -1,9 +1,9 @@
 # Template file for 'synapse'
 pkgname=synapse
 version=1.44.0
-revision=1
+revision=2
 build_style=python3-module
-hostmakedepends="python3-setuptools"
+hostmakedepends="python3-setuptools runit-void"
 depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-signedjson python3-pynacl python3-service_identity python3-Twisted
  python3-openssl python3-yaml python3-pyasn1 python3-pyasn1-modules

From 35cfcc89975e7f3d6295e7e46156d12173e3dea4 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:39:52 -0400
Subject: [PATCH 09/12] vnstat: include runit-void in hostmakedepends

---
 srcpkgs/vnstat/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/vnstat/template b/srcpkgs/vnstat/template
index 73c5ae382168..5f4f922e8282 100644
--- a/srcpkgs/vnstat/template
+++ b/srcpkgs/vnstat/template
@@ -1,9 +1,9 @@
 # Template file for 'vnstat'
 pkgname=vnstat
 version=2.8
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="automake libtool pkg-config"
+hostmakedepends="automake libtool pkg-config runit-void"
 makedepends="gd-devel sqlite-devel"
 checkdepends="check-devel"
 short_desc="Terminal based network traffic monitor"

From 8e5cc04c687da81b59eb2df2928ab08138c584d4 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:40:09 -0400
Subject: [PATCH 10/12] yggdrasil: include runit-void in hostmakedepends

---
 srcpkgs/yggdrasil/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/yggdrasil/template b/srcpkgs/yggdrasil/template
index 6e756e9d5239..2f67df04503d 100644
--- a/srcpkgs/yggdrasil/template
+++ b/srcpkgs/yggdrasil/template
@@ -1,11 +1,11 @@
 # Template file for 'yggdrasil'
 pkgname=yggdrasil
 version=0.4.0
-revision=1
+revision=2
 wrksrc="yggdrasil-go-${version}"
 build_style=go
 go_import_path=github.com/yggdrasil-network/yggdrasil-go
-hostmakedepends="git"
+hostmakedepends="git runit-void"
 short_desc="Experiment in scalable routing as an encrypted IPv6 overlay network"
 maintainer="Jan Christian Gruenhage <jan.christian@gruenhage.xyz>"
 license="LGPL-3.0-only"

From d52407563f19970200487297a8d36f5c45b87f2f Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:40:18 -0400
Subject: [PATCH 11/12] znc: include runit-void in hostmakedepends

---
 srcpkgs/znc/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/znc/template b/srcpkgs/znc/template
index bff3702aa131..4c8ff33d1ab9 100644
--- a/srcpkgs/znc/template
+++ b/srcpkgs/znc/template
@@ -1,7 +1,7 @@
 # Template file for 'znc'
 pkgname=znc
 version=1.8.2
-revision=7
+revision=8
 build_style=gnu-configure
 configure_args="
  --enable-python
@@ -9,7 +9,7 @@ configure_args="
  --enable-tcl
  --enable-cyrus
  --with-tcl=$XBPS_CROSS_BASE/usr/lib"
-hostmakedepends="pkg-config perl tar"
+hostmakedepends="pkg-config perl tar runit-void"
 makedepends="openssl-devel python3-devel tcl-devel libsasl-devel
  icu-devel zlib-devel perl"
 short_desc="Advanced IRC Bouncer"

From ccbf3b6be41d69eebe985c49be2aab817a3ef73b Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:44:32 -0400
Subject: [PATCH 12/12] common/environment/setup: vsv throws error with
 dangling symlink

---
 common/environment/setup/install.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/environment/setup/install.sh b/common/environment/setup/install.sh
index a6b68435eb43..9b33392acb67 100644
--- a/common/environment/setup/install.sh
+++ b/common/environment/setup/install.sh
@@ -35,11 +35,17 @@ _vsv() {
 	chmod 755 ${PKGDESTDIR}/etc/sv/${service}/run
 	if [ -r ${PKGDESTDIR}/etc/sv/${service}/finish ]; then
 		chmod 755 ${PKGDESTDIR}/etc/sv/${service}/finish
+	elif [ -L ${PKGDESTDIR}/etc/sv/${service}/finish ]; then
+		msg_red "$pkgver: vsv: cannot operate on dangling symlink ${service}/finish\n"
+		return 1
 	fi
 	ln ${LN_OPTS} /run/runit/supervise.${service} ${PKGDESTDIR}/etc/sv/${service}/supervise
 	if [ -r ${PKGDESTDIR}/etc/sv/${service}/log/run ]; then
 		chmod 755 ${PKGDESTDIR}/etc/sv/${service}/log/run
 		ln ${LN_OPTS} /run/runit/supervise.${service}-log ${PKGDESTDIR}/etc/sv/${service}/log/supervise
+	elif [ -L ${PKGDESTDIR}/etc/sv/${service}/log/run ]; then
+		msg_red "$pkgver: vsv: cannot operate on dangling symlink ${service}/log/run\n"
+		return 1
 	fi
 }
 

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

* Re: [PR PATCH] [Updated] vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them
  2021-10-07 13:52 [PR PATCH] vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them TinfoilSubmarine
  2021-10-07 14:04 ` [PR PATCH] [Updated] " TinfoilSubmarine
@ 2021-10-07 14:06 ` TinfoilSubmarine
  2021-10-07 18:46 ` [PR REVIEW] " ahesford
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: TinfoilSubmarine @ 2021-10-07 14:06 UTC (permalink / raw)
  To: ml

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

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

https://github.com/TinfoilSubmarine/void-packages vsv-fixes
https://github.com/void-linux/void-packages/pull/33406

vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them
<!-- 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
- [ ] 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
-->

Fixes https://github.com/void-linux/void-packages/issues/32076.

I added `runit-void` to `hostmakedepends` of all packages where `log/run` pointed to `/usr/bin/vlogger`. I also added tests for -L to ensure that if there is a service file that is a dangling symlink, we error and exit.

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

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

From 4d574abc0095f5c3e265c3e51dc2c3abf4f835ab Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:35:14 -0400
Subject: [PATCH 01/12] bluez: include runit-void in hostmakedepends

---
 srcpkgs/bluez/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/bluez/template b/srcpkgs/bluez/template
index 7e886382522c..86cabb1c7e66 100644
--- a/srcpkgs/bluez/template
+++ b/srcpkgs/bluez/template
@@ -1,13 +1,13 @@
 # Template file for 'bluez'
 pkgname=bluez
 version=5.61
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-udevdir=/usr/lib/udev --disable-systemd
  --enable-sixaxis --enable-threads --enable-library --enable-deprecated
  --enable-external-ell $(vopt_enable mesh) $(vopt_enable nfc)
  $(vopt_enable experimental)"
-hostmakedepends="automake flex libtool pkg-config python3-docutils"
+hostmakedepends="automake flex libtool pkg-config python3-docutils runit-void"
 makedepends="cups-devel eudev-libudev-devel libglib-devel libical-devel
  readline-devel ell-devel $(vopt_if mesh json-c-devel)"
 short_desc="Bluetooth tools and daemons"

From 2730af630f8745c32587a100fd996fce1588d15d Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:36:14 -0400
Subject: [PATCH 02/12] caddy: include runit-void in hostmakedepends

---
 srcpkgs/caddy/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/caddy/template b/srcpkgs/caddy/template
index 3ace9a1870b3..55df8e8e3183 100644
--- a/srcpkgs/caddy/template
+++ b/srcpkgs/caddy/template
@@ -1,10 +1,11 @@
 # Template file for 'caddy'
 pkgname=caddy
 version=2.4.5
-revision=1
+revision=2
 build_style=go
 go_import_path=github.com/caddyserver/caddy/v2
 go_package="${go_import_path}/cmd/caddy"
+hostmakedepends="runit-void"
 short_desc="Fast, cross-platform HTTP/2 web server with automatic HTTPS"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="Apache-2.0"

From 3ec4cc8b5f9d837a4b9104c4630d930fd21a61a0 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:37:07 -0400
Subject: [PATCH 03/12] dhcp: include runit-void in hostmakedepends

---
 srcpkgs/dhcp/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/dhcp/template b/srcpkgs/dhcp/template
index 2db18dcc60b0..8572e971de9f 100644
--- a/srcpkgs/dhcp/template
+++ b/srcpkgs/dhcp/template
@@ -1,10 +1,10 @@
 # Template file for 'dhcp'
 pkgname=dhcp
 version=4.4.2P1
-revision=2
+revision=3
 wrksrc="dhcp-${version/P/-P}"
 build_style=gnu-configure
-hostmakedepends="perl tar automake libtool"
+hostmakedepends="perl tar automake libtool runit-void"
 short_desc="Server from the Internet Software Consortium's implementation of DHCP"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MPL-2.0"

From 1a6d2d54373b47cbb6432ee33e51fbc11a2392e3 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:37:57 -0400
Subject: [PATCH 04/12] go-ipfs: include runit-void in hostmakedepends

---
 srcpkgs/go-ipfs/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/go-ipfs/template b/srcpkgs/go-ipfs/template
index 4a53dd948797..a6f5d1be67bc 100644
--- a/srcpkgs/go-ipfs/template
+++ b/srcpkgs/go-ipfs/template
@@ -1,11 +1,11 @@
 # Template file for 'go-ipfs'
 pkgname=go-ipfs
 version=0.8.0
-revision=1
+revision=2
 build_style=go
 go_import_path="github.com/ipfs/go-ipfs"
 go_package="${go_import_path}/cmd/ipfs"
-hostmakedepends="git"
+hostmakedepends="git runit-void"
 depends="fs-repo-migrations>=1.7.1"
 short_desc="Global versioned P2P merkle DAG file system"
 maintainer="Christopher Brannon <chris@the-brannons.com>"

From 4b2d8c1bdf69af7f87447fced37ff9a53e5d54af Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:38:15 -0400
Subject: [PATCH 05/12] lldpd: include runit-void in hostmakedepends

---
 srcpkgs/lldpd/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/lldpd/template b/srcpkgs/lldpd/template
index aa63aae2c8c4..b1f23d40c70c 100644
--- a/srcpkgs/lldpd/template
+++ b/srcpkgs/lldpd/template
@@ -1,10 +1,10 @@
 # Template file for 'lldpd'
 pkgname=lldpd
 version=1.0.11
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-privsep-chroot=/var/empty"
-hostmakedepends="pkg-config"
+hostmakedepends="pkg-config runit-void"
 makedepends="libpcap-devel libcap-devel libevent-devel readline-devel"
 short_desc="Broadcast 802.1AB neighbor announcements"
 maintainer="Zach Dykstra <dykstra.zachary@gmail.com>"

From 49709df8647c445218e9e9ca6cd79c93a219d279 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:38:31 -0400
Subject: [PATCH 06/12] minidlna: include runit-void in hostmakedepends

---
 srcpkgs/minidlna/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/minidlna/template b/srcpkgs/minidlna/template
index b112fb56efcc..f5c01067137c 100644
--- a/srcpkgs/minidlna/template
+++ b/srcpkgs/minidlna/template
@@ -1,7 +1,7 @@
 # Template file for 'minidlna'
 pkgname=minidlna
 version=1.3.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="
  --sbindir=/usr/bin
@@ -11,7 +11,7 @@ conf_files="/etc/minidlna.conf"
 make_dirs="
  /var/lib/minidlna 0750 minidlna minidlna
  /var/log/minidlna 0750 minidlna minidlna"
-hostmakedepends="pkg-config gettext"
+hostmakedepends="pkg-config gettext runit-void"
 makedepends="ffmpeg-devel libjpeg-turbo-devel sqlite-devel libexif-devel
  libid3tag-devel libvorbis-devel libflac-devel"
 short_desc="DLNA/UPnP-AV compliant media server"

From cd3f4e98b0af17ccf52aa04de6efa9fe80a10ca6 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:38:50 -0400
Subject: [PATCH 07/12] moby: include runit-void in hostmakedepends

---
 srcpkgs/moby/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/moby/template b/srcpkgs/moby/template
index 50e198d91574..4074b782df34 100644
--- a/srcpkgs/moby/template
+++ b/srcpkgs/moby/template
@@ -1,12 +1,12 @@
 # Template file for 'moby'
 pkgname=moby
 version=20.10.6
-revision=1
+revision=2
 _libnetwork_commit=b3507428be5b458cb0e2b4086b13531fb0706e46
 create_wrksrc=yes
 build_style=go
 go_import_path="github.com/docker/docker"
-hostmakedepends="pkg-config"
+hostmakedepends="pkg-config runit-void"
 makedepends="libbtrfs-devel device-mapper-devel libseccomp-devel"
 depends="containerd iptables xz"
 short_desc="Container engine for the Docker ecosystem"

From 1a211ffe74da5dfeedbd2ed9b6f873a2d607ad9b Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:39:08 -0400
Subject: [PATCH 08/12] synapse: include runit-void in hostmakedepends

---
 srcpkgs/synapse/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/synapse/template b/srcpkgs/synapse/template
index f541e07ede83..1f4f2d30a5be 100644
--- a/srcpkgs/synapse/template
+++ b/srcpkgs/synapse/template
@@ -1,9 +1,9 @@
 # Template file for 'synapse'
 pkgname=synapse
 version=1.44.0
-revision=1
+revision=2
 build_style=python3-module
-hostmakedepends="python3-setuptools"
+hostmakedepends="python3-setuptools runit-void"
 depends="python3-jsonschema python3-frozendict python3-canonicaljson
  python3-signedjson python3-pynacl python3-service_identity python3-Twisted
  python3-openssl python3-yaml python3-pyasn1 python3-pyasn1-modules

From 61de32b8b896bfe819dc8ecc8b1fd36e25f3210d Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:39:52 -0400
Subject: [PATCH 09/12] vnstat: include runit-void in hostmakedepends

---
 srcpkgs/vnstat/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/vnstat/template b/srcpkgs/vnstat/template
index 73c5ae382168..5f4f922e8282 100644
--- a/srcpkgs/vnstat/template
+++ b/srcpkgs/vnstat/template
@@ -1,9 +1,9 @@
 # Template file for 'vnstat'
 pkgname=vnstat
 version=2.8
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="automake libtool pkg-config"
+hostmakedepends="automake libtool pkg-config runit-void"
 makedepends="gd-devel sqlite-devel"
 checkdepends="check-devel"
 short_desc="Terminal based network traffic monitor"

From 520af605b981a44edd470214e2abb7a1130664f8 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:40:09 -0400
Subject: [PATCH 10/12] yggdrasil: include runit-void in hostmakedepends

---
 srcpkgs/yggdrasil/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/yggdrasil/template b/srcpkgs/yggdrasil/template
index 6e756e9d5239..2f67df04503d 100644
--- a/srcpkgs/yggdrasil/template
+++ b/srcpkgs/yggdrasil/template
@@ -1,11 +1,11 @@
 # Template file for 'yggdrasil'
 pkgname=yggdrasil
 version=0.4.0
-revision=1
+revision=2
 wrksrc="yggdrasil-go-${version}"
 build_style=go
 go_import_path=github.com/yggdrasil-network/yggdrasil-go
-hostmakedepends="git"
+hostmakedepends="git runit-void"
 short_desc="Experiment in scalable routing as an encrypted IPv6 overlay network"
 maintainer="Jan Christian Gruenhage <jan.christian@gruenhage.xyz>"
 license="LGPL-3.0-only"

From 0c3583884ba379a506320c28fb869b55d4059ec6 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:40:18 -0400
Subject: [PATCH 11/12] znc: include runit-void in hostmakedepends

---
 srcpkgs/znc/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/znc/template b/srcpkgs/znc/template
index bff3702aa131..4c8ff33d1ab9 100644
--- a/srcpkgs/znc/template
+++ b/srcpkgs/znc/template
@@ -1,7 +1,7 @@
 # Template file for 'znc'
 pkgname=znc
 version=1.8.2
-revision=7
+revision=8
 build_style=gnu-configure
 configure_args="
  --enable-python
@@ -9,7 +9,7 @@ configure_args="
  --enable-tcl
  --enable-cyrus
  --with-tcl=$XBPS_CROSS_BASE/usr/lib"
-hostmakedepends="pkg-config perl tar"
+hostmakedepends="pkg-config perl tar runit-void"
 makedepends="openssl-devel python3-devel tcl-devel libsasl-devel
  icu-devel zlib-devel perl"
 short_desc="Advanced IRC Bouncer"

From 67a191e2b4be80c58c24ae5e74059d54ab8bc86f Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:44:32 -0400
Subject: [PATCH 12/12] common/environment/setup: vsv throws error with
 dangling symlink

---
 common/environment/setup/install.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/environment/setup/install.sh b/common/environment/setup/install.sh
index a6b68435eb43..9b33392acb67 100644
--- a/common/environment/setup/install.sh
+++ b/common/environment/setup/install.sh
@@ -35,11 +35,17 @@ _vsv() {
 	chmod 755 ${PKGDESTDIR}/etc/sv/${service}/run
 	if [ -r ${PKGDESTDIR}/etc/sv/${service}/finish ]; then
 		chmod 755 ${PKGDESTDIR}/etc/sv/${service}/finish
+	elif [ -L ${PKGDESTDIR}/etc/sv/${service}/finish ]; then
+		msg_red "$pkgver: vsv: cannot operate on dangling symlink ${service}/finish\n"
+		return 1
 	fi
 	ln ${LN_OPTS} /run/runit/supervise.${service} ${PKGDESTDIR}/etc/sv/${service}/supervise
 	if [ -r ${PKGDESTDIR}/etc/sv/${service}/log/run ]; then
 		chmod 755 ${PKGDESTDIR}/etc/sv/${service}/log/run
 		ln ${LN_OPTS} /run/runit/supervise.${service}-log ${PKGDESTDIR}/etc/sv/${service}/log/supervise
+	elif [ -L ${PKGDESTDIR}/etc/sv/${service}/log/run ]; then
+		msg_red "$pkgver: vsv: cannot operate on dangling symlink ${service}/log/run\n"
+		return 1
 	fi
 }
 

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

* Re: [PR REVIEW] vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them
  2021-10-07 13:52 [PR PATCH] vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them TinfoilSubmarine
  2021-10-07 14:04 ` [PR PATCH] [Updated] " TinfoilSubmarine
  2021-10-07 14:06 ` TinfoilSubmarine
@ 2021-10-07 18:46 ` ahesford
  2021-10-07 18:46 ` ahesford
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ahesford @ 2021-10-07 18:46 UTC (permalink / raw)
  To: ml

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

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/33406#discussion_r724441945

Comment:
```suggestion
	if [ -d ${PKGDESTDIR}/etc/sv/${service}/log ]; then
		ln ${LN_OPTS} /run/runit/supervise.${service}-log ${PKGDESTDIR}/etc/sv/${service}/log/supervise
		if [ -e ${PKGDESTDIR}/etc/sv/${service}/log/run ] && [ ! -L ${PKGDESTDIR}/etc/sv/${service}/log/run ]; then
			chmod 755 ${PKGDESTDIR}/etc/sv/${service}/log/run
		fi
```
Same logic applies here. If you makea  `log` directory, just make the supervise link regardless. Why bother being more sophisticated? Then, only set permissions of the run script exists and is not a symlink.

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

* Re: [PR REVIEW] vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them
  2021-10-07 13:52 [PR PATCH] vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them TinfoilSubmarine
                   ` (2 preceding siblings ...)
  2021-10-07 18:46 ` [PR REVIEW] " ahesford
@ 2021-10-07 18:46 ` ahesford
  2021-10-07 19:15 ` [PR PATCH] [Updated] " TinfoilSubmarine
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ahesford @ 2021-10-07 18:46 UTC (permalink / raw)
  To: ml

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

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/33406#discussion_r724439401

Comment:
```suggestion
	if [ -e ${PKGDESTDIR}/etc/sv/${service}/finish ] && [ ! -L ${PKGDESTDIR}/etc/sv/${service}/finish ]; then
		chmod 755 ${PKGDESTDIR}/etc/sv/${service}/finish
```
No need to fail if `finish` is a symlink, it is perfectly valid that the installed service might link somewhere else (for example, if two services in the same package share a script) but won't be valid at package build time. However, setting permissions is really only correct if the target exists and not a symlink, so guard this.

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

* Re: [PR PATCH] [Updated] vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them
  2021-10-07 13:52 [PR PATCH] vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them TinfoilSubmarine
                   ` (3 preceding siblings ...)
  2021-10-07 18:46 ` ahesford
@ 2021-10-07 19:15 ` TinfoilSubmarine
  2021-10-07 19:19 ` TinfoilSubmarine
  2021-10-29 13:40 ` [PR PATCH] [Merged]: vsv: properly handle symlinks in vsv leahneukirchen
  6 siblings, 0 replies; 8+ messages in thread
From: TinfoilSubmarine @ 2021-10-07 19:15 UTC (permalink / raw)
  To: ml

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

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

https://github.com/TinfoilSubmarine/void-packages vsv-fixes
https://github.com/void-linux/void-packages/pull/33406

vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them
<!-- 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
- [ ] 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
-->

Fixes https://github.com/void-linux/void-packages/issues/32076.

I added `runit-void` to `hostmakedepends` of all packages where `log/run` pointed to `/usr/bin/vlogger`. I also added tests for -L to ensure that if there is a service file that is a dangling symlink, we error and exit.

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

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

From 9c641da7ae018d86cbe3bb96f47b2b0e27355fca Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Thu, 7 Oct 2021 09:44:32 -0400
Subject: [PATCH] common/environment/setup: properly handle symlinks in vsv

---
 common/environment/setup/install.sh | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/common/environment/setup/install.sh b/common/environment/setup/install.sh
index a6b68435eb43..5f0571de14ae 100644
--- a/common/environment/setup/install.sh
+++ b/common/environment/setup/install.sh
@@ -20,6 +20,7 @@ done
 _vsv() {
 	local service="$1"
 	local LN_OPTS="-s"
+	local svdir="${PKGDESTDIR}/etc/sv/${service}"
 
 	if [ $# -lt 1 ]; then
 		msg_red "$pkgver: vsv: 1 argument expected: <service>\n"
@@ -32,14 +33,18 @@ _vsv() {
 
 	vmkdir etc/sv
 	vcopy "${FILESDIR}/$service" etc/sv
-	chmod 755 ${PKGDESTDIR}/etc/sv/${service}/run
-	if [ -r ${PKGDESTDIR}/etc/sv/${service}/finish ]; then
-		chmod 755 ${PKGDESTDIR}/etc/sv/${service}/finish
+	if [ ! -L $svdir/run ]; then
+		chmod 755 $svdir/run
 	fi
-	ln ${LN_OPTS} /run/runit/supervise.${service} ${PKGDESTDIR}/etc/sv/${service}/supervise
-	if [ -r ${PKGDESTDIR}/etc/sv/${service}/log/run ]; then
-		chmod 755 ${PKGDESTDIR}/etc/sv/${service}/log/run
-		ln ${LN_OPTS} /run/runit/supervise.${service}-log ${PKGDESTDIR}/etc/sv/${service}/log/supervise
+	if [ -e $svdir/finish ] && [ ! -L $svdir/finish ]; then
+		chmod 755 $svdir/finish
+	fi
+	ln ${LN_OPTS} /run/runit/supervise.${service} $svdir/supervise
+	if [ -d $svdir/log ]; then
+		ln ${LN_OPTS} /run/runit/supervise.${service}-log $svdir/log/supervise
+		if [ -e $svdir/log/run ] && [ ! -L $svdir/log/run ]; then
+			chmod 755 ${PKGDESTDIR}/etc/sv/${service}/log/run
+		fi
 	fi
 }
 

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

* Re: vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them
  2021-10-07 13:52 [PR PATCH] vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them TinfoilSubmarine
                   ` (4 preceding siblings ...)
  2021-10-07 19:15 ` [PR PATCH] [Updated] " TinfoilSubmarine
@ 2021-10-07 19:19 ` TinfoilSubmarine
  2021-10-29 13:40 ` [PR PATCH] [Merged]: vsv: properly handle symlinks in vsv leahneukirchen
  6 siblings, 0 replies; 8+ messages in thread
From: TinfoilSubmarine @ 2021-10-07 19:19 UTC (permalink / raw)
  To: ml

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

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/33406#issuecomment-938084535

Comment:
Incorporated suggestions and dropped package changes. Also added a similar guard to run. Should I revbump those packages so they have the `supervise.${service}-log` properly created, or just wait until they get updated eventually?

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

* Re: [PR PATCH] [Merged]: vsv: properly handle symlinks in vsv
  2021-10-07 13:52 [PR PATCH] vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them TinfoilSubmarine
                   ` (5 preceding siblings ...)
  2021-10-07 19:19 ` TinfoilSubmarine
@ 2021-10-29 13:40 ` leahneukirchen
  6 siblings, 0 replies; 8+ messages in thread
From: leahneukirchen @ 2021-10-29 13:40 UTC (permalink / raw)
  To: ml

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

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

vsv: properly handle symlinks in vsv
https://github.com/void-linux/void-packages/pull/33406

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
- [ ] 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
-->

Fixes https://github.com/void-linux/void-packages/issues/32076.

I added `runit-void` to `hostmakedepends` of all packages where `log/run` pointed to `/usr/bin/vlogger`. I also added tests for -L to ensure that if there is a service file that is a dangling symlink, we error and exit.

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

end of thread, other threads:[~2021-10-29 13:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 13:52 [PR PATCH] vsv: fix packages that have dangling log/run symlinks and make sure vsv properly handles them TinfoilSubmarine
2021-10-07 14:04 ` [PR PATCH] [Updated] " TinfoilSubmarine
2021-10-07 14:06 ` TinfoilSubmarine
2021-10-07 18:46 ` [PR REVIEW] " ahesford
2021-10-07 18:46 ` ahesford
2021-10-07 19:15 ` [PR PATCH] [Updated] " TinfoilSubmarine
2021-10-07 19:19 ` TinfoilSubmarine
2021-10-29 13:40 ` [PR PATCH] [Merged]: vsv: properly handle symlinks in vsv leahneukirchen

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