Options for 64-bit time_t support on 32-bit architectures

2019-07-18 Thread Florian Weimer
There is an effort under way to enhance glibc so that it can use the
Y2038 support in the kernel.  The result will be that more 32-bit
architectures can use a 64-bit time_t.  (Currently, it's x86-64 x32
only.)

Originally, the plan was to support both ABIs in glibc for building
new applications, similar to what is currently possible with
-D_FILE_OFFSET_BITS=64 for changing the size of off_t.  However, this
turned out to be difficult to implement, and so far, no one has posted
patches which appear to be reasonably correct and complete.

The latest proposal is a single-ABI mode for development:

  

Old binaries with a 32-bit time_t will continue to run, but new
binaries built against a current glibc will always use a 64-bit time_t
under this approach.

The consequence is that in order to build 32-bit-time_t libraries
(Gtk, for example), an old glibc needs to be kept around.  In
practice, it would probably mean that it is impossible to maintain a
set of 32-bit-time_t libraries in a classic distribution build
environment (with a unified buildroot and native builds).

I do not have a strong opinion about this because I personally do not
care about 32-bit architectures at all (sorry).  I would like to
solicit Debian's feedback on this matter.

Do you want to build 32-bit libraries (besides glibc) which are
compatible with legacy applications, with a 32-bit time_t, in the
future?  Or is a world where time_t is pretty much always 64 bit
something that would be acceptable?



Bug#932384: libc6: utmp broken

2019-07-18 Thread Thorsten Glaser
On Thu, 18 Jul 2019, Thorsten Glaser wrote:

> glibc maintainers: unsure why screen works but not the example
> code given that screen isn’t sgid… maybe you should have a look
> at that, it still doesn’t work with the correct utmp permissions.

This might also be a bug in the example program; if so, reassign
to manpages-dev (= 5.01-1), cf. #932382

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

**

Mit der tarent Academy bieten wir auch Trainings und Schulungen in den
Bereichen Softwareentwicklung, Agiles Arbeiten und Zukunftstechnologien an.

Besuchen Sie uns auf www.tarent.de/academy. Wir freuen uns auf Ihren Kontakt.

**



Processed: Re: Bug#932384: libc6: utmp broken

2019-07-18 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> reassign 932380 initscripts
Bug #932380 [screen] screen: Utmp slot not found -> not removed
Bug reassigned from package 'screen' to 'initscripts'.
No longer marked as found in versions screen/4.6.2-3.
Ignoring request to alter fixed versions of bug #932380 to the same values 
previously set
> found 932380 2.95-1
Bug #932380 [initscripts] screen: Utmp slot not found -> not removed
Marked as found in versions sysvinit/2.95-1.
> notfound 932380 2.93-8
Bug #932380 [initscripts] screen: Utmp slot not found -> not removed
Ignoring request to alter found versions of bug #932380 to the same values 
previously set
> retitle 932380 initscripts: /etc/init.d/bootmisc.sh: wrong /var/run/utmp 
> permissions
Bug #932380 [initscripts] screen: Utmp slot not found -> not removed
Changed Bug title to 'initscripts: /etc/init.d/bootmisc.sh: wrong /var/run/utmp 
permissions' from 'screen: Utmp slot not found -> not removed'.
> severity 932380 important
Bug #932380 [initscripts] initscripts: /etc/init.d/bootmisc.sh: wrong 
/var/run/utmp permissions
Severity set to 'important' from 'normal'
> unblock 932380 by 932384
Bug #932380 [initscripts] initscripts: /etc/init.d/bootmisc.sh: wrong 
/var/run/utmp permissions
932380 was blocked by: 932384
932380 was not blocking any bugs.
Removed blocking bug(s) of 932380: 932384
> block 932384 by 932380
Bug #932384 [libc6] libc6: utmp broken
932384 was not blocked by any bugs.
932384 was not blocking any bugs.
Added blocking bug(s) of 932384: 932380
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
932380: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932380
932384: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932384
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Re: Bug#932384: libc6: utmp broken

2019-07-18 Thread Thorsten Glaser
reassign 932380 initscripts
found 932380 2.95-1
notfound 932380 2.93-8
retitle 932380 initscripts: /etc/init.d/bootmisc.sh: wrong /var/run/utmp 
permissions
severity 932380 important
unblock 932380 by 932384
block 932384 by 932380
thanks

On Thu, 18 Jul 2019, Thorsten Glaser wrote:

> After hitting #932380

I’ve had a look at what was recently updated, found initscripts
as something that matches a recursive grep for utmp in /etc, and
sure, the diff between 2.93-8 and 2.95-1 in etc/init.d/bootmisc.sh
contains this:

-   chmod 664 /var/run/utmp
+   chmod 644  "${utmp}" || log_warning_msg "failed to chmod 
${utmp}"

So there we are.

Dmitry: please also move the chmod BELOW the chown, as chown
is known to sometimes reset permissions (in some documented
cases, not a bug):

tglase@tglase:~ $ diff -u /etc/init.d/bootmisc.sh bootmisc.sh
--- /etc/init.d/bootmisc.sh 2019-05-15 13:03:46.0 +0200
+++ bootmisc.sh 2019-07-18 17:51:51.887830376 +0200
@@ -33,8 +33,8 @@
 
readonly utmp='/var/run/utmp'
if > "${utmp}" ; then
-   chmod 644  "${utmp}" || log_warning_msg "failed to chmod 
${utmp}"
chgrp utmp "${utmp}" || log_warning_msg "failed to chgrp 
${utmp}"
+   chmod 664  "${utmp}" || log_warning_msg "failed to chmod 
${utmp}"
return 0
else
log_failure_msg "failed to truncate ${utmp}"

XTaran: after “sudo chmod 664 /var/run/utmp” GNU screen works as
intended again, closing your bug.

glibc maintainers: unsure why screen works but not the example
code given that screen isn’t sgid… maybe you should have a look
at that, it still doesn’t work with the correct utmp permissions.

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

**

Mit der tarent Academy bieten wir auch Trainings und Schulungen in den
Bereichen Softwareentwicklung, Agiles Arbeiten und Zukunftstechnologien an.

Besuchen Sie uns auf www.tarent.de/academy. Wir freuen uns auf Ihren Kontakt.

**



Re: Bug#932384: libc6: utmp broken

2019-07-18 Thread Thorsten Glaser
On Thu, 18 Jul 2019, Thorsten Glaser wrote:

> utmp entries cannot be added (and the GNU screen source code contains
> curse^Wcomplaints about the GNU API for utmp lacking the ability to
> return success/error information, so the applications cannot even de‐
> tect this!), while the file is set up correctly:

After some more experimentation:

• this affects buster(!)
• it works as root but not as regular user

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

**

Mit der tarent Academy bieten wir auch Trainings und Schulungen in den
Bereichen Softwareentwicklung, Agiles Arbeiten und Zukunftstechnologien an.

Besuchen Sie uns auf www.tarent.de/academy. Wir freuen uns auf Ihren Kontakt.

**



Processed: Re: Bug#932380: screen: Utmp slot not found -> not removed

2019-07-18 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> block 932380 by 932384
Bug #932380 [screen] screen: Utmp slot not found -> not removed
932380 was not blocked by any bugs.
932380 was not blocking any bugs.
Added blocking bug(s) of 932380: 932384
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
932380: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932380
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#932384: libc6: utmp broken

2019-07-18 Thread Thorsten Glaser
Package: libc6
Version: 2.28-10
Severity: important

After hitting #932380 I looked at the source code of GNU screen,
saw it uses the getutline(3) function, and compiled the example
from its manpage.

The output is not what I expected:

tglase@tglase:~ $ ./a.out
before adding entry:
tglase   :0   2019-07-18 16:07
after adding entry:
tglase   :0   2019-07-18 16:07
after removing entry:
tglase   :0   2019-07-18 16:07

This is the same, no matter whether I’m in GNU screen in xterm,
or just in xterm, or even on the Linux text console:

tglase@tglase:~ $ ./a.out
before adding entry:
tglase   tty2 2019-07-18 17:25
tglase   :0   2019-07-18 16:07
after adding entry:
tglase   tty2 2019-07-18 17:25
tglase   :0   2019-07-18 16:07
after removing entry:
tglase   tty2 2019-07-18 17:25
tglase   :0   2019-07-18 16:07

utmp entries cannot be added (and the GNU screen source code contains
curse^Wcomplaints about the GNU API for utmp lacking the ability to
return success/error information, so the applications cannot even de‐
tect this!), while the file is set up correctly:

tglase@tglase:~ $ ll /var/run/utmp
-rw-r--r-- 1 root utmp 4608 Jul 18 17:26 /var/run/utmp
tglase@tglase:~ $ w | cat
 17:27:33 up  1:21,  1 user,  load average: 1.35, 1.68, 2.12
USER TTY  FROM LOGIN@   IDLE   JCPU   PCPU WHAT
tglase   :0   -16:07   ?xdm?  14:24   0.03s 
/usr/bin/ck-launch-session /usr/bin/monkeysphere-validation-agent /bin/mksh 
/usr/share/tarent/autokde.d/loadenv.sh icewm-session


-- System Information:
Debian Release: bullseye/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'buildd-unstable'), (500, 'unstable'), 
(100, 'experimental')
Architecture: x32 (x86_64)
Foreign Architectures: i386, amd64

Kernel: Linux 4.19.0-5-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/lksh
Init: sysvinit (via /sbin/init)