* bug#42059: 26.3; OpenBSD now has posix_openpt(3)
@ 2020-06-26 9:52 YASUOKA Masahiko
2020-06-27 3:56 ` YASUOKA Masahiko
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: YASUOKA Masahiko @ 2020-06-26 9:52 UTC (permalink / raw)
To: 42059
OpenBSD now has posix_openpt(3), emacs should use that.
A diff is attached.
Currently emacs uses an old way which actually causes a problem. I am
using gnupg through Mew(*1) which run on emacs, Mew seems to create a
process without a pty regardless it specifies "process-connection-type
pty" properly. The pty is required to pass the passphrase.
*1) http://mew.org/
--- configure.ac.orig Fri Jun 26 18:33:33 2020
+++ configure.ac Thu Aug 22 07:25:23 2019
@@ -4620,11 +4620,11 @@ case $opsys in
AC_DEFINE(PTY_TTY_NAME_SPRINTF, [])
;;
- gnu | qnxnto )
+ gnu | openbsd | qnxnto )
AC_DEFINE(FIRST_PTY_LETTER, ['p'])
;;
- gnu-linux | gnu-kfreebsd | dragonfly | freebsd | openbsd | netbsd | darwin | nacl )
+ gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd | darwin | nacl )
dnl if HAVE_GRANTPT
if test "x$ac_cv_func_grantpt" = xyes; then
AC_DEFINE(UNIX98_PTYS, 1, [Define if the system has Unix98 PTYs.])
Configured using:
'configure --build=amd64-unknown-openbsd --without-sound
--with-x-toolkit=gtk3 --prefix=/usr/local --sysconfdir=/etc
--mandir=/usr/local/man --infodir=/usr/local/info
--localstatedir=/var --disable-silent-rules --disable-gtk-doc
'CFLAGS=-O2 -pipe -g -fno-pie' CPPFLAGS=-I/usr/local/include
'LDFLAGS=-L/usr/local/lib -nopie -g''
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK DBUS GSETTINGS GLIB NOTIFY
GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XDBE XIM THREADS LCMS2
Important settings:
value of $LC_CTYPE: ja_JP.UTF-8
value of $LANG: ja_JP.UTF-8
value of $XMODIFIERS:
locale-coding-system: utf-8-unix
Major mode: Summary
Minor modes in effect:
diff-auto-refine-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow emacsbug message rmc puny seq byte-opt gv bytecomp
byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec
password-cache epa derived epg epg-config gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils misearch multi-isearch anthy-conf
anthy-dic anthy vc-git diff-mode easy-mmode pp qp mew-varsx mew-unix
mew-auth mew-config mew-imap2 mew-imap mew-nntp2 mew-nntp mew-pop
mew-smtp mew-ssl mew-ssh mew-net mew-highlight mew-sort mew-fib
mew-ext mew-refile mew-demo mew-attach mew-draft mew-message
mew-thread mew-virtual mew-summary4 mew-summary3 mew-summary2
mew-summary mew-search mew-pick mew-passwd mew-scan mew-syntax mew-bq
mew-smime mew-pgp mew-header mew-exec mew-mark mew-mime mew-edit
mew-decode mew-encode mew-cache mew-minibuf mew-complete mew-addrbook
mew-local mew-vars3 mew-vars2 mew-vars mew-env mew-lang-jp mew-mule3
mew-mule mew-gemacs easymenu mew-key mew-func mew-blvs mew-const mew
elec-pair edmacro kmacro cl-loaddefs cl-lib time-date mule-util
japan-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
minibuffer cl-preloaded nadvice loaddefs button faces cus-face
macroexp files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
threads dbusbind kqueue lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 16 166712 13664)
(symbols 48 26580 2)
(miscs 40 396 845)
(strings 32 50253 1145)
(string-bytes 1 1271766)
(vectors 16 22102)
(vector-slots 8 838358 23398)
(floats 8 79 319)
(intervals 56 3324 0)
(buffers 992 16))
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#42059: 26.3; OpenBSD now has posix_openpt(3)
2020-06-26 9:52 bug#42059: 26.3; OpenBSD now has posix_openpt(3) YASUOKA Masahiko
@ 2020-06-27 3:56 ` YASUOKA Masahiko
2020-06-30 11:52 ` Mattias Engdegård
2020-07-01 11:23 ` Jeremie Courreges-Anglas
2 siblings, 0 replies; 9+ messages in thread
From: YASUOKA Masahiko @ 2020-06-27 3:56 UTC (permalink / raw)
To: 42059
On Fri, 26 Jun 2020 18:52:55 +0900 (JST)
YASUOKA Masahiko <yasuoka@yasuoka.net> wrote:
> OpenBSD now has posix_openpt(3), emacs should use that.
> A diff is attached.
>
> Currently emacs uses an old way which actually causes a problem. I am
> using gnupg through Mew(*1) which run on emacs, Mew seems to create a
> process without a pty regardless it specifies "process-connection-type
> pty" properly. The pty is required to pass the passphrase.
>
> *1) http://mew.org/
The patch I sent previously was reversed. Let me update it.
--- configure.ac.orig Thu Aug 22 07:25:23 2019
+++ configure.ac Fri Jun 26 18:33:33 2020
@@ -4620,11 +4620,11 @@ case $opsys in
AC_DEFINE(PTY_TTY_NAME_SPRINTF, [])
;;
- gnu | openbsd | qnxnto )
+ gnu | qnxnto )
AC_DEFINE(FIRST_PTY_LETTER, ['p'])
;;
- gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd | darwin | nacl )
+ gnu-linux | gnu-kfreebsd | dragonfly | freebsd | openbsd | netbsd | darwin | nacl )
dnl if HAVE_GRANTPT
if test "x$ac_cv_func_grantpt" = xyes; then
AC_DEFINE(UNIX98_PTYS, 1, [Define if the system has Unix98 PTYs.])
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#42059: 26.3; OpenBSD now has posix_openpt(3)
2020-06-26 9:52 bug#42059: 26.3; OpenBSD now has posix_openpt(3) YASUOKA Masahiko
2020-06-27 3:56 ` YASUOKA Masahiko
@ 2020-06-30 11:52 ` Mattias Engdegård
2020-06-30 13:49 ` YASUOKA Masahiko
2020-07-01 11:23 ` Jeremie Courreges-Anglas
2 siblings, 1 reply; 9+ messages in thread
From: Mattias Engdegård @ 2020-06-30 11:52 UTC (permalink / raw)
To: YASUOKA Masahiko; +Cc: 42059
Thanks for the patch! I'd be happy to apply it, but first: can you confirm that older OpenBSD versions are still able to build Emacs with that patch applied, or argue that this is a lesser problem?
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#42059: 26.3; OpenBSD now has posix_openpt(3)
2020-06-30 11:52 ` Mattias Engdegård
@ 2020-06-30 13:49 ` YASUOKA Masahiko
2020-06-30 14:24 ` Mattias Engdegård
2020-06-30 14:32 ` Eli Zaretskii
0 siblings, 2 replies; 9+ messages in thread
From: YASUOKA Masahiko @ 2020-06-30 13:49 UTC (permalink / raw)
To: mattiase; +Cc: 42059
On Tue, 30 Jun 2020 13:52:21 +0200
Mattias Engdegård <mattiase@acm.org> wrote:
> Thanks for the patch! I'd be happy to apply it, but first: can you
> confirm that older OpenBSD versions are still able to build Emacs with
> that patch applied, or argue that this is a lesser problem?
Although old versions might become not able to build Emacs with the
patch, I suggest Emacs should have the patch.
Firstly the versions are too old. posix_openpt(3) had been introduced
to OpenBSD at OpenBSD 5.3, it was 7 years ago and 14 versions before
the latest. It was 6 years ago when the last version which doesn't
have posix_openpt(3) became out of support.
Secondly the old way the old versions is using has another problem. It
caused an error when emacs opens some ptys. To solve this problem, in
any case, people need to use newer OpenBSD and newer Emacs.
Thanks,
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#42059: 26.3; OpenBSD now has posix_openpt(3)
2020-06-30 13:49 ` YASUOKA Masahiko
@ 2020-06-30 14:24 ` Mattias Engdegård
2020-06-30 15:36 ` Eli Zaretskii
2020-06-30 14:32 ` Eli Zaretskii
1 sibling, 1 reply; 9+ messages in thread
From: Mattias Engdegård @ 2020-06-30 14:24 UTC (permalink / raw)
To: YASUOKA Masahiko; +Cc: 42059
30 juni 2020 kl. 15.49 skrev YASUOKA Masahiko <yasuoka@yasuoka.net>:
> Although old versions might become not able to build Emacs with the
> patch, I suggest Emacs should have the patch.
>
> Firstly the versions are too old. posix_openpt(3) had been introduced
> to OpenBSD at OpenBSD 5.3, it was 7 years ago and 14 versions before
> the latest. It was 6 years ago when the last version which doesn't
> have posix_openpt(3) became out of support.
>
> Secondly the old way the old versions is using has another problem. It
> caused an error when emacs opens some ptys. To solve this problem, in
> any case, people need to use newer OpenBSD and newer Emacs.
Thank you for the detailed explanation, and I think applying your patch will be all right -- 7 years is a long time in the security-conscious OpenBSD world. It would probably need an update to the NEWS file, though.
Eli, do you have any objection to the patch by Yasuoka-san, assuming that it limits the OpenBSD support to version 5.3 or newer?
Presumably the patch would be for Emacs 28, unless there are strong security/reliability reasons for Emacs 27.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#42059: 26.3; OpenBSD now has posix_openpt(3)
2020-06-30 13:49 ` YASUOKA Masahiko
2020-06-30 14:24 ` Mattias Engdegård
@ 2020-06-30 14:32 ` Eli Zaretskii
1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2020-06-30 14:32 UTC (permalink / raw)
To: YASUOKA Masahiko; +Cc: mattiase, 42059
> Date: Tue, 30 Jun 2020 22:49:29 +0900 (JST)
> From: YASUOKA Masahiko <yasuoka@yasuoka.net>
> Cc: 42059@debbugs.gnu.org
>
> On Tue, 30 Jun 2020 13:52:21 +0200
> Mattias Engdegård <mattiase@acm.org> wrote:
> > Thanks for the patch! I'd be happy to apply it, but first: can you
> > confirm that older OpenBSD versions are still able to build Emacs with
> > that patch applied, or argue that this is a lesser problem?
>
> Although old versions might become not able to build Emacs with the
> patch, I suggest Emacs should have the patch.
>
> Firstly the versions are too old. posix_openpt(3) had been introduced
> to OpenBSD at OpenBSD 5.3, it was 7 years ago and 14 versions before
> the latest. It was 6 years ago when the last version which doesn't
> have posix_openpt(3) became out of support.
Would it be possible to contact the OpenBSD developers and/or the
persons who prepare the Emacs distros for OpenBSD, and ask for their
opinion about this? I mean, I wouldn't want to drop support for some
versions of an OS without at least consulting the relevant developers.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#42059: 26.3; OpenBSD now has posix_openpt(3)
2020-06-30 14:24 ` Mattias Engdegård
@ 2020-06-30 15:36 ` Eli Zaretskii
0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2020-06-30 15:36 UTC (permalink / raw)
To: Mattias Engdegård; +Cc: yasuoka, 42059
> From: Mattias Engdegård <mattiase@acm.org>
> Date: Tue, 30 Jun 2020 16:24:55 +0200
> Cc: 42059@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
>
> Thank you for the detailed explanation, and I think applying your patch will be all right -- 7 years is a long time in the security-conscious OpenBSD world. It would probably need an update to the NEWS file, though.
>
> Eli, do you have any objection to the patch by Yasuoka-san, assuming that it limits the OpenBSD support to version 5.3 or newer?
> Presumably the patch would be for Emacs 28, unless there are strong security/reliability reasons for Emacs 27.
As I wrote, I'd prefer to hear the opinions of OpenBSD maintainers, if
possible. I don't feel we know enough about that OS to make such
decisions on our own.
Alternatively, adding a compatibility feature whereby it would be
possible to build Emacs on OpenBSD without this change, would allow us
to go ahead even without asking the OpenBSD folks.
IOW, I don't want to drop support of old OpenBSD versions so easily.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#42059: 26.3; OpenBSD now has posix_openpt(3)
2020-06-26 9:52 bug#42059: 26.3; OpenBSD now has posix_openpt(3) YASUOKA Masahiko
2020-06-27 3:56 ` YASUOKA Masahiko
2020-06-30 11:52 ` Mattias Engdegård
@ 2020-07-01 11:23 ` Jeremie Courreges-Anglas
2020-07-01 14:24 ` Eli Zaretskii
2 siblings, 1 reply; 9+ messages in thread
From: Jeremie Courreges-Anglas @ 2020-07-01 11:23 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: mattiase, YASUOKA Masahiko, 42059
[-- Attachment #1: Type: text/plain, Size: 1251 bytes --]
Hi,
jca@OpenBSD.org here, I'm the maintainer of the GNU Emacs port in the
OpenBSD ports tree[0].
I can confirm what Yasuoka-san wrote, the OpenBSD project only provides
some kind of support for the two latest OpenBSD releases[1]. We highly
discourage the use of old OpenBSD releases.
As the maintainer of the Emacs port, OpenBSD 5.3 and older releases are
completely out of scope. I mostly care about our development branch, if
security fixes in Emacs need to be adressed in our stable releases,
I would probably handle them as patches backported from newer Emacs
versions, not as updates to newer Emacs versions.
So as far as I am concerned the proposed change can land in any upcoming
Emacs release, the sooner the better. Since Yasuoka-san is also an
OpenBSD developer he has already pushed this change in our Emacs port[2]
with my approval. Many thanks to him!
[0] https://cvsweb.openbsd.org/ports/editors/emacs/Makefile?rev=1.94&content-type=text/x-cvsweb-markup
[1] https://www.openbsd.org/faq/faq5.html#Flavors
[2] https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/editors/emacs/patches/patch-configure.diff?r1=1.17&r2=1.18&f=h
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#42059: 26.3; OpenBSD now has posix_openpt(3)
2020-07-01 11:23 ` Jeremie Courreges-Anglas
@ 2020-07-01 14:24 ` Eli Zaretskii
0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2020-07-01 14:24 UTC (permalink / raw)
To: Jeremie Courreges-Anglas; +Cc: mattiase, yasuoka, 42059-done
> From: Jeremie Courreges-Anglas <jca@wxcvbn.org>
> Cc: YASUOKA Masahiko <yasuoka@yasuoka.net>, mattiase@acm.org,
> 42059@debbugs.gnu.org
> Date: Wed, 01 Jul 2020 13:23:12 +0200
>
> As the maintainer of the Emacs port, OpenBSD 5.3 and older releases are
> completely out of scope. I mostly care about our development branch, if
> security fixes in Emacs need to be adressed in our stable releases,
> I would probably handle them as patches backported from newer Emacs
> versions, not as updates to newer Emacs versions.
Thank you very much for taking time to answer our questions. I've now
installed the patch on the master branch.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-07-01 14:24 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-26 9:52 bug#42059: 26.3; OpenBSD now has posix_openpt(3) YASUOKA Masahiko
2020-06-27 3:56 ` YASUOKA Masahiko
2020-06-30 11:52 ` Mattias Engdegård
2020-06-30 13:49 ` YASUOKA Masahiko
2020-06-30 14:24 ` Mattias Engdegård
2020-06-30 15:36 ` Eli Zaretskii
2020-06-30 14:32 ` Eli Zaretskii
2020-07-01 11:23 ` Jeremie Courreges-Anglas
2020-07-01 14:24 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).