Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Fix utempter
@ 2022-12-09 18:37 leahneukirchen
  2022-12-14 22:43 ` sbromberger
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: leahneukirchen @ 2022-12-09 18:37 UTC (permalink / raw)
  To: ml

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

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

https://github.com/leahneukirchen/void-packages utempter
https://github.com/void-linux/void-packages/pull/40988

Fix utempter
<!-- Uncomment relevant sections and delete options which are not applicable -->

utempter was not installed setgid `utmp`, so it didn't work.

Enable utempter for screen and tmux.

ping @sgn and @steinex.

#### Testing the changes
- I tested the changes in this PR: **YES***
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

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


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

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

From e8f9b5aaa5b37d5b8fad1b68c9187e5929c83175 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 9 Dec 2022 19:21:45 +0100
Subject: [PATCH 1/3] libutempter: install helper binary setgid utmp.

Else it doesn't work.
---
 srcpkgs/libutempter/INSTALL  | 6 ++++++
 srcpkgs/libutempter/template | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/libutempter/INSTALL

diff --git a/srcpkgs/libutempter/INSTALL b/srcpkgs/libutempter/INSTALL
new file mode 100644
index 000000000000..fc3bfaad1442
--- /dev/null
+++ b/srcpkgs/libutempter/INSTALL
@@ -0,0 +1,6 @@
+case "${ACTION}" in
+post)
+	chgrp utmp usr/lib/utempter/utempter
+	chmod g+s usr/lib/utempter/utempter
+	;;
+esac
diff --git a/srcpkgs/libutempter/template b/srcpkgs/libutempter/template
index f2999ccebd32..3a89e4126cfc 100644
--- a/srcpkgs/libutempter/template
+++ b/srcpkgs/libutempter/template
@@ -1,7 +1,7 @@
 # Template file for 'libutempter'
 pkgname=libutempter
 version=1.2.1
-revision=1
+revision=2
 build_style=gnu-makefile
 short_desc="Library interface to record user sessions in utmp/wtmp files"
 maintainer="Orphaned <orphan@voidlinux.org>"

From 2d1a83f68dd45868b21930dbddb4347650765e72 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 9 Dec 2022 19:30:06 +0100
Subject: [PATCH 2/3] tmux: use libutempter.

---
 srcpkgs/tmux/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/tmux/template b/srcpkgs/tmux/template
index 7b0c26a66313..55aab2e19567 100644
--- a/srcpkgs/tmux/template
+++ b/srcpkgs/tmux/template
@@ -1,10 +1,11 @@
 # Template file for 'tmux'
 pkgname=tmux
 version=3.3a
-revision=1
+revision=2
 build_style=gnu-configure
+configure_args="--enable-utempter"
 hostmakedepends="byacc automake pkg-config"
-makedepends="libevent-devel ncurses-devel"
+makedepends="libevent-devel libutempter-devel ncurses-devel"
 depends="ncurses-base"
 short_desc="Terminal Multiplexer"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"

From bf99f39f0569d7f48b6c3710b5f83075b4800d6a Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 9 Dec 2022 19:34:38 +0100
Subject: [PATCH 3/3] screen: use libutempter.

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

diff --git a/srcpkgs/screen/template b/srcpkgs/screen/template
index 6e33ba3d5c50..00b84edea6c5 100644
--- a/srcpkgs/screen/template
+++ b/srcpkgs/screen/template
@@ -1,13 +1,13 @@
 # Template file for 'screen'
 pkgname=screen
 version=4.9.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--with-sys-screenrc=/etc/screenrc --enable-pam
  --enable-colors256 --enable-rxvt_osc --enable-telnet
  --enable-use-locale --with-socket-dir=/run/screens --with-pty-group=5"
 hostmakedepends="automake"
-makedepends="pam-devel ncurses-devel"
+makedepends="libutempter-devel ncurses-devel pam-devel"
 conf_files="/etc/screenrc /etc/skel/.screenrc"
 short_desc="GNU screen manager with VT100/ANSI terminal emulation"
 maintainer="Frank Steinborn <steinex@nognu.de>"

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

* Re: Fix utempter
  2022-12-09 18:37 [PR PATCH] Fix utempter leahneukirchen
@ 2022-12-14 22:43 ` sbromberger
  2022-12-14 23:39 ` vincele
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sbromberger @ 2022-12-14 22:43 UTC (permalink / raw)
  To: ml

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

New comment by sbromberger on void-packages repository

https://github.com/void-linux/void-packages/pull/40988#issuecomment-1352319505

Comment:
ref https://github.com/void-linux/void-packages/issues/40972

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

* Re: Fix utempter
  2022-12-09 18:37 [PR PATCH] Fix utempter leahneukirchen
  2022-12-14 22:43 ` sbromberger
@ 2022-12-14 23:39 ` vincele
  2022-12-14 23:47 ` vincele
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vincele @ 2022-12-14 23:39 UTC (permalink / raw)
  To: ml

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

New comment by vincele on void-packages repository

https://github.com/void-linux/void-packages/pull/40988#issuecomment-1352364036

Comment:
I think I have this problem:

<pre>
$ screen /dev/ttyUSB0 1500000
/dev/null/utmp: Not a directory
[screen is terminating]
</pre>

My screen version is still at 4.9.0_1

<pre>
$ xbps-query screen
architecture: x86_64-musl
build-options: ~multiuser 
conf_files:
	/etc/screenrc
	/etc/skel/.screenrc
filename-sha256: 2434acac0bbcc05aa899b470d8e34b23b9c5a9f51d5d59b1562f5628708ef778
filename-size: 557KB
homepage: http://www.gnu.org/s/screen/
install-date: 2022-12-12 22:34 CET
install-script: 688B
installed_size: 898KB
license: GPL-3.0-or-later
maintainer: Frank Steinborn <steinex@nognu.de>
metafile-sha256: c9352d316e60e03d78309afcc84e3704c4e8fdcb6aaeb0f90e49409a5ba5bdde
pkgname: screen
pkgver: screen-4.9.0_1
repository: https://repo-default.voidlinux.org/current/musl
run_depends:
	ncurses-libs>=5.8_1
	pam-libs>=1.1.6_3
	musl>=1.1.24_7
shlib-requires:
	libncursesw.so.6
	libpam.so.0
	libc.so
short_desc: GNU screen manager with VT100/ANSI terminal emulation
source-revisions: screen:217a65562c
state: installed
</pre>


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

* Re: Fix utempter
  2022-12-09 18:37 [PR PATCH] Fix utempter leahneukirchen
  2022-12-14 22:43 ` sbromberger
  2022-12-14 23:39 ` vincele
@ 2022-12-14 23:47 ` vincele
  2022-12-15  8:52 ` vincele
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vincele @ 2022-12-14 23:47 UTC (permalink / raw)
  To: ml

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

New comment by vincele on void-packages repository

https://github.com/void-linux/void-packages/pull/40988#issuecomment-1352364036

Comment:
I think I have this problem:

<pre>
$ screen /dev/ttyUSB0 1500000
/dev/null/utmp: Not a directory
[screen is terminating]
$ screen -ln /dev/ttyUSB0 1500000
/dev/null/utmp: Not a directory
[screen is terminating]
$ screen -l /dev/ttyUSB0 1500000
/dev/null/utmp: Not a directory
[screen is terminating]
</pre>

But nor `-l` nor `-ln` seem to have any effect on that. I may have misunderstood their intent, though.

<pre>
       -l and -ln
            turns login mode on or off (for /etc/utmp updating).  This can
            also be defined through the deflogin .screenrc command.
</pre>

My screen version is still at 4.9.0_1

<pre>
$ xbps-query screen
architecture: x86_64-musl
build-options: ~multiuser 
conf_files:
	/etc/screenrc
	/etc/skel/.screenrc
filename-sha256: 2434acac0bbcc05aa899b470d8e34b23b9c5a9f51d5d59b1562f5628708ef778
filename-size: 557KB
homepage: http://www.gnu.org/s/screen/
install-date: 2022-12-12 22:34 CET
install-script: 688B
installed_size: 898KB
license: GPL-3.0-or-later
maintainer: Frank Steinborn <steinex@nognu.de>
metafile-sha256: c9352d316e60e03d78309afcc84e3704c4e8fdcb6aaeb0f90e49409a5ba5bdde
pkgname: screen
pkgver: screen-4.9.0_1
repository: https://repo-default.voidlinux.org/current/musl
run_depends:
	ncurses-libs>=5.8_1
	pam-libs>=1.1.6_3
	musl>=1.1.24_7
shlib-requires:
	libncursesw.so.6
	libpam.so.0
	libc.so
short_desc: GNU screen manager with VT100/ANSI terminal emulation
source-revisions: screen:217a65562c
state: installed
</pre>

My naive question is: wouldn't it make sense to compile screen without utmp support ?

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

* Re: Fix utempter
  2022-12-09 18:37 [PR PATCH] Fix utempter leahneukirchen
                   ` (2 preceding siblings ...)
  2022-12-14 23:47 ` vincele
@ 2022-12-15  8:52 ` vincele
  2022-12-15 22:59 ` [PR PATCH] [Merged]: " leahneukirchen
  2022-12-15 23:18 ` vincele
  5 siblings, 0 replies; 7+ messages in thread
From: vincele @ 2022-12-15  8:52 UTC (permalink / raw)
  To: ml

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

New comment by vincele on void-packages repository

https://github.com/void-linux/void-packages/pull/40988#issuecomment-1352364036

Comment:
I think I have this problem:

<pre>
$ screen /dev/ttyUSB0 1500000
/dev/null/utmp: Not a directory
[screen is terminating]
$ screen -ln /dev/ttyUSB0 1500000
/dev/null/utmp: Not a directory
[screen is terminating]
$ screen -l /dev/ttyUSB0 1500000
/dev/null/utmp: Not a directory
[screen is terminating]
</pre>

But nor `-l` nor `-ln` seem to have any effect on that. I may have misunderstood their intent, though.

<pre>
       -l and -ln
            turns login mode on or off (for /etc/utmp updating).  This can
            also be defined through the deflogin .screenrc command.
</pre>

My screen version is still at 4.9.0_1

<pre>
$ xbps-query screen
architecture: x86_64-musl
build-options: ~multiuser 
conf_files:
	/etc/screenrc
	/etc/skel/.screenrc
filename-sha256: 2434acac0bbcc05aa899b470d8e34b23b9c5a9f51d5d59b1562f5628708ef778
filename-size: 557KB
homepage: http://www.gnu.org/s/screen/
install-date: 2022-12-12 22:34 CET
install-script: 688B
installed_size: 898KB
license: GPL-3.0-or-later
maintainer: Frank Steinborn <steinex@nognu.de>
metafile-sha256: c9352d316e60e03d78309afcc84e3704c4e8fdcb6aaeb0f90e49409a5ba5bdde
pkgname: screen
pkgver: screen-4.9.0_1
repository: https://repo-default.voidlinux.org/current/musl
run_depends:
	ncurses-libs>=5.8_1
	pam-libs>=1.1.6_3
	musl>=1.1.24_7
shlib-requires:
	libncursesw.so.6
	libpam.so.0
	libc.so
short_desc: GNU screen manager with VT100/ANSI terminal emulation
source-revisions: screen:217a65562c
state: installed
</pre>

My naive question is: wouldn't it make sense to compile screen without utmp support ?

EDIT:
That may not be as easy as I thought:
<pre>
$ ./xbps-src show-options screen
=> screen-4.9.0_1: the following build options are set:
   multiuser:  (OFF)
</pre>

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

* Re: [PR PATCH] [Merged]: Fix utempter
  2022-12-09 18:37 [PR PATCH] Fix utempter leahneukirchen
                   ` (3 preceding siblings ...)
  2022-12-15  8:52 ` vincele
@ 2022-12-15 22:59 ` leahneukirchen
  2022-12-15 23:18 ` vincele
  5 siblings, 0 replies; 7+ messages in thread
From: leahneukirchen @ 2022-12-15 22:59 UTC (permalink / raw)
  To: ml

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

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

Fix utempter
https://github.com/void-linux/void-packages/pull/40988

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

utempter was not installed setgid `utmp`, so it didn't work.

Enable utempter for screen and tmux.

ping @sgn and @steinex.

#### Testing the changes
- I tested the changes in this PR: **YES***
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

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


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

* Re: Fix utempter
  2022-12-09 18:37 [PR PATCH] Fix utempter leahneukirchen
                   ` (4 preceding siblings ...)
  2022-12-15 22:59 ` [PR PATCH] [Merged]: " leahneukirchen
@ 2022-12-15 23:18 ` vincele
  5 siblings, 0 replies; 7+ messages in thread
From: vincele @ 2022-12-15 23:18 UTC (permalink / raw)
  To: ml

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

New comment by vincele on void-packages repository

https://github.com/void-linux/void-packages/pull/40988#issuecomment-1353837534

Comment:
The new version does not have this problem any more.
Thanks @leahneukirchen 

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

end of thread, other threads:[~2022-12-15 23:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-09 18:37 [PR PATCH] Fix utempter leahneukirchen
2022-12-14 22:43 ` sbromberger
2022-12-14 23:39 ` vincele
2022-12-14 23:47 ` vincele
2022-12-15  8:52 ` vincele
2022-12-15 22:59 ` [PR PATCH] [Merged]: " leahneukirchen
2022-12-15 23:18 ` vincele

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