pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/kpty
Module Name: pkgsrc
Committed By: jperkin
Date: Mon May 9 19:44:16 UTC 2022
Modified Files:
pkgsrc/devel/kpty: Makefile PLIST distinfo
pkgsrc/devel/kpty/patches: patch-src_kpty.cpp
Added Files:
pkgsrc/devel/kpty/patches: patch-src_kgrantpty.c
Log Message:
kpty: Fixes for non-openpty bitrotted code.
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 pkgsrc/devel/kpty/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/kpty/PLIST
cvs rdiff -u -r1.14 -r1.15 pkgsrc/devel/kpty/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/kpty/patches/patch-src_kgrantpty.c
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/kpty/patches/patch-src_kpty.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/kpty/Makefile
diff -u pkgsrc/devel/kpty/Makefile:1.33 pkgsrc/devel/kpty/Makefile:1.34
--- pkgsrc/devel/kpty/Makefile:1.33 Mon Apr 25 04:55:47 2022
+++ pkgsrc/devel/kpty/Makefile Mon May 9 19:44:16 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.33 2022/04/25 04:55:47 markd Exp $
+# $NetBSD: Makefile,v 1.34 2022/05/09 19:44:16 jperkin Exp $
DISTNAME= kpty-${KF5VER}
CATEGORIES= devel
@@ -11,6 +11,16 @@ LICENSE= gnu-lgpl-v2.1
USE_TOOLS+= msgmerge
+CFLAGS.SunOS+= -D__EXTENSIONS__
+
+.include "../../mk/bsd.prefs.mk"
+
+PLIST_VARS+= grantpty
+
+.if ${OPSYS} == "SunOS"
+PLIST.grantpty= yes
+.endif
+
.include "../../lang/python/tool.mk"
.include "../../devel/kcoreaddons/buildlink3.mk"
.include "../../devel/ki18n/buildlink3.mk"
Index: pkgsrc/devel/kpty/PLIST
diff -u pkgsrc/devel/kpty/PLIST:1.4 pkgsrc/devel/kpty/PLIST:1.5
--- pkgsrc/devel/kpty/PLIST:1.4 Mon Apr 25 04:55:47 2022
+++ pkgsrc/devel/kpty/PLIST Mon May 9 19:44:16 2022
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2022/04/25 04:55:47 markd Exp $
+@comment $NetBSD: PLIST,v 1.5 2022/05/09 19:44:16 jperkin Exp $
include/KF5/KPty/KPty
include/KF5/KPty/KPtyDevice
include/KF5/KPty/KPtyProcess
@@ -14,6 +14,7 @@ lib/cmake/KF5Pty/KF5PtyTargets.cmake
lib/libKF5Pty.so
lib/libKF5Pty.so.5
lib/libKF5Pty.so.${PKGVERSION}
+${PLIST.grantpty}libexec/kf5/kgrantpty
qt5/mkspecs/modules/qt_KPty.pri
share/locale/af/LC_MESSAGES/kpty5.mo
share/locale/ar/LC_MESSAGES/kpty5.mo
Index: pkgsrc/devel/kpty/distinfo
diff -u pkgsrc/devel/kpty/distinfo:1.14 pkgsrc/devel/kpty/distinfo:1.15
--- pkgsrc/devel/kpty/distinfo:1.14 Mon Apr 25 04:55:47 2022
+++ pkgsrc/devel/kpty/distinfo Mon May 9 19:44:16 2022
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.14 2022/04/25 04:55:47 markd Exp $
+$NetBSD: distinfo,v 1.15 2022/05/09 19:44:16 jperkin Exp $
BLAKE2s (kpty-5.93.0.tar.xz) = 8db60fd2b426ad20ccf7f15acbad24615f5f572f489ceb5472eefe2ddf92cbb4
SHA512 (kpty-5.93.0.tar.xz) = 0d28e2a8bc3cee75f2ba00ddb63306152e166845c890b21ebf6eb10e7e9826de68c461a9c8492bf888e7f49aa41d1ccc635415e84b781b2e5bbd57bb77767d0d
Size (kpty-5.93.0.tar.xz) = 59144 bytes
SHA1 (patch-src_ConfigureCheck.cmake) = aa44e7b76545c450bc41265a8077877e9f69506b
-SHA1 (patch-src_kpty.cpp) = 88b3039792040cabb9c2d31b748f8b1b2efd87f6
+SHA1 (patch-src_kgrantpty.c) = 81787e45e3399871387d9f665b5430500bf96992
+SHA1 (patch-src_kpty.cpp) = da6e41dbfc4256e2474d144dc4b14aa32523e6b1
SHA1 (patch-src_kptydevice.cpp) = 7c9dcf4ce662996286444c393a1f377bbbf88511
Index: pkgsrc/devel/kpty/patches/patch-src_kpty.cpp
diff -u pkgsrc/devel/kpty/patches/patch-src_kpty.cpp:1.2 pkgsrc/devel/kpty/patches/patch-src_kpty.cpp:1.3
--- pkgsrc/devel/kpty/patches/patch-src_kpty.cpp:1.2 Tue Mar 30 10:58:23 2021
+++ pkgsrc/devel/kpty/patches/patch-src_kpty.cpp Mon May 9 19:44:16 2022
@@ -1,10 +1,70 @@
-$NetBSD: patch-src_kpty.cpp,v 1.2 2021/03/30 10:58:23 markd Exp $
+$NetBSD: patch-src_kpty.cpp,v 1.3 2022/05/09 19:44:16 jperkin Exp $
NetBSD loginx() complains if ut_type not set before calling
---- src/kpty.cpp.orig 2021-03-06 16:29:41.000000000 +0000
+--- src/kpty.cpp.orig 2022-04-02 10:26:01.000000000 +0000
+++ src/kpty.cpp
-@@ -496,6 +496,9 @@ void KPty::login(const char *user, const
+@@ -10,6 +10,7 @@
+
+ #include "kpty_p.h"
+
++#include <QFile>
+ #include <QProcess>
+ #include <kpty_debug.h>
+
+@@ -168,7 +169,7 @@ KPtyPrivate::~KPtyPrivate()
+ bool KPtyPrivate::chownpty(bool grant)
+ {
+ return !QProcess::execute(QFile::decodeName(CMAKE_INSTALL_PREFIX "/" KDE_INSTALL_LIBEXECDIR_KF "/kgrantpty"),
+- QStringList() << (grant ? "--grant" : "--revoke") << QString::number(masterFd));
++ QStringList() << (grant ? QStringLiteral("--grant") : QStringLiteral("--revoke")) << QString::number(masterFd));
+ }
+ #endif
+
+@@ -260,6 +261,7 @@ bool KPty::open()
+ }
+ #endif // HAVE_PTSNAME || TIOCGPTN
+
++#if 0
+ // Linux device names, FIXME: Trouble on other systems?
+ for (const char *s3 = "pqrstuvwxyzabcde"; *s3; s3++) {
+ for (const char *s4 = "0123456789abcdef"; *s4; s4++) {
+@@ -289,8 +291,10 @@ bool KPty::open()
+
+ qCWarning(KPTY_LOG) << "Can't open a pseudo teletype";
+ return false;
++#endif
+
+ gotpty:
++#if 0
+ QFileInfo info(d->ttyName.data());
+ if (!info.exists()) {
+ return false; // this just cannot happen ... *cough* Yeah right, I just
+@@ -302,14 +306,15 @@ gotpty:
+ && !d->chownpty(true)) {
+ qCWarning(KPTY_LOG) << "chownpty failed for device " << ptyName << "::" << d->ttyName << "\nThis means the communication can be eavesdropped." << endl;
+ }
++#endif
+
+ grantedpt:
+
+-#ifdef HAVE_REVOKE
++#if HAVE_REVOKE
+ revoke(d->ttyName.data());
+ #endif
+
+-#ifdef HAVE_UNLOCKPT
++#if HAVE_UNLOCKPT
+ unlockpt(d->masterFd);
+ #elif defined(TIOCSPTLCK)
+ int flag = 0;
+@@ -502,11 +507,14 @@ void KPty::login(const char *user, const
+ #endif
+
+ #if HAVE_UTMPX
+- gettimeofday(&l_struct.ut_tv, 0);
++ gettimeofday(&l_struct.ut_tv, nullptr);
+ #else
l_struct.ut_time = time(0);
#endif
@@ -14,7 +74,7 @@ NetBSD loginx() complains if ut_type not
#if HAVE_LOGIN
#if HAVE_LOGINX
::loginx(&l_struct);
-@@ -503,9 +506,6 @@ void KPty::login(const char *user, const
+@@ -514,9 +522,6 @@ void KPty::login(const char *user, const
::login(&l_struct);
#endif
#else
@@ -24,3 +84,12 @@ NetBSD loginx() complains if ut_type not
#if HAVE_STRUCT_UTMP_UT_PID
l_struct.ut_pid = getpid();
#if HAVE_STRUCT_UTMP_UT_SESSION
+@@ -605,7 +610,7 @@ void KPty::logout()
+ ut->ut_type = DEAD_PROCESS;
+ #endif
+ #if HAVE_UTMPX
+- gettimeofday(&(ut->ut_tv), 0);
++ gettimeofday(&(ut->ut_tv), nullptr);
+ pututxline(ut);
+ }
+ endutxent();
Added files:
Index: pkgsrc/devel/kpty/patches/patch-src_kgrantpty.c
diff -u /dev/null pkgsrc/devel/kpty/patches/patch-src_kgrantpty.c:1.1
--- /dev/null Mon May 9 19:44:16 2022
+++ pkgsrc/devel/kpty/patches/patch-src_kgrantpty.c Mon May 9 19:44:16 2022
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_kgrantpty.c,v 1.1 2022/05/09 19:44:16 jperkin Exp $
+
+Don't include C++ headers in a C file.
+
+--- src/kgrantpty.c.orig 2022-04-02 10:26:01.000000000 +0000
++++ src/kgrantpty.c
+@@ -27,7 +27,7 @@
+
+ #include <config-pty.h>
+
+-#include <cerrno>
++#include <errno.h>
+ #include <grp.h>
+ #include <stdio.h>
+ #include <stdlib.h>
Home |
Main Index |
Thread Index |
Old Index