Hello everyone,

The existing x11/cde recipe still builds its pinned May snapshot, but
it fails to package current CDE sources. Over the past few months, CDE
has moved several installed files and made dtterm terminfo installation
an explicit step. The attached diff updates the port for those changes.

The update builds CDE upstream commit
1b27530c01818084d0a1f89d988b1dadec294780, which includes the dtksh
iconv header fix. I used 2.5.4pre1 as the OpenBSD snapshot version.

The port keeps /usr/local/dt and its existing backdrops and palettes
symlinks. Creating those links before the staged install lets pkg_add -u
upgrade existing installations without file collisions. The packing list
moves DtFuncs.dtsh, and three existing patches have refreshed context.

How dtterm and its terminfo entry are installed

A regular CDE make install now installs the dtterm executable and
dtterm.ti, the source description of the terminal's capabilities.
Compiling that description into a terminfo database is a separate step.

The old CDE install ran tic automatically. The OpenBSD port kept that
write inside the staging tree by passing a staged TERMINFO path through
FAKE_FLAGS. Upstream made this step explicit because a plain invocation
of tic can write to the build host's database or fall back to
$HOME/.terminfo during a staged install.

For a direct source install with ncurses, an installer can run
make install-terminfo TERMINFO=/path/to/terminfo to choose the database.
For a package build, DESTDIR is the staging root and TERMINFO is the
absolute path the database will have on the installed system. The updated
port calls the target from its post-install hook:

cd ${WRKBUILD} && ${MAKE_PROGRAM} install-terminfo \
    DESTDIR="${WRKINST}" TERMINFO="${TRUEPREFIX}/share/terminfo"

The compiled entry goes into the staging tree and is included in the
package at /usr/local/dt/share/terminfo/d/dtterm. Users get it with
pkg_add. I verified it with:

infocmp -A /usr/local/dt/share/terminfo dtterm

Upstream also made the dtterm executable's setuid-root mode configurable
with --enable-dtterm-setuid and --disable-dtterm-setuid. That option
controls the executable's permissions. The OpenBSD packing list retains
mode 4755 for bin/dtterm.

Upstream install-terminfo change:
https://sourceforge.net/p/cdesktopenv/code/ci/ecf1de2785dfc51e706e532906cbdfa4f36aceb5/ [1]

Upstream dtterm permissions change:
https://sourceforge.net/p/cdesktopenv/code/ci/4e6da6351eea302a5d5b8a3f15f029bccb4409a2/ [2]

Testing

I tested on OpenBSD 8.0-current/amd64 with motif-2.3.8p3. Clean
installation and an upgrade from the signed cde-2.5.4pre0p2 package
passed, including preservation of a modified X resource and local
backdrop and palette files. As an ordinary user I ran dtwm and launched
a shell in dtterm under Xvfb.

Two diagnostics also occur with the published package. The bundled dtksh
suite reported 59 errors in the same 15 groups on both binaries. One
additional timing assertion appeared on the final run in a group that
already failed. I repeated the 100 ms sleep check 30 times per binary,
and all 60 isolated checks passed.

The library dependency checker flagged liblmdb.so.1 for the infolib
validator on both packages. The runtime linker resolved liblmdb.so.1.0.

Source distfile

The diff uses the port's existing distfiles site. The new tarball still
needs mirroring there. I generated and verified it on OpenBSD
8.0-current/amd64 using Git 2.56.1 and the base-system gzip.
The SHA-256 in distinfo is for the compressed file.

git clone https://git.code.sf.net/p/cdesktopenv/code cdesktopenv
cd cdesktopenv
rev=1b27530c01818084d0a1f89d988b1dadec294780
git -c tar.umask=0022 archive --format=tar \
    --mtime="$(git show -s --format=%cI "$rev")" \
    --prefix=cde-2.5.4pre1/ "$rev:cde" |
    /usr/bin/gzip -n -9 > cde-2.5.4pre1.tar.gz
sha256 cde-2.5.4pre1.tar.gz

Expected SHA-256:
38db000ac17fbe039bd4181f13f91bf7b94818ba28ff454e4361157b2dca6dd5

Expected size: 56881859 bytes.

GNU gzip compresses the same tar stream into different bytes, so it
produces a different distfile checksum.

Would someone be willing to review the update and mirror the distfile
if the snapshot is suitable?

Thanks,
Reaper

Links:
------
[1] https://sourceforge.net/p/cdesktopenv/code/ci/ecf1de2785dfc51e706e532906cbdfa4f36aceb5/ [2] https://sourceforge.net/p/cdesktopenv/code/ci/4e6da6351eea302a5d5b8a3f15f029bccb4409a2/
diff --git x11/cde/Makefile x11/cde/Makefile
index fa77c65..3d837cd 100644
--- x11/cde/Makefile
+++ x11/cde/Makefile
@@ -1,8 +1,7 @@
 COMMENT=		Common Desktop Environment
 
-# 2026-05-17
-DISTNAME=		cde-2.5.4pre0
-REVISION=		2
+# 2026-11-27, upstream Git commit 1b27530c01818084d0a1f89d988b1dadec294780
+DISTNAME=		cde-2.5.4pre1
 
 CATEGORIES=		x11
 
@@ -84,8 +83,6 @@ CONFIGURE_ARGS=		--with-tcl=${MODTCL_LIBDIR} \
 
 DEBUG_PACKAGES=		${BUILD_PACKAGES}
 
-FAKE_FLAGS=		TERMINFO="${DESTDIR}${TRUEPREFIX}/share/terminfo"
-
 # not pre-configure to prevent running configure twice (configure.ac timestamp change)
 post-patch:
 	for p in `find ${WRKSRC} -type f | xargs grep -l '/usr/bin/X11'`; do \
@@ -100,10 +97,16 @@ pre-configure:
 	@${MODTCL_TCLSH_ADJ} ${WRKSRC}/programs/dtdocbook/tcl/docbook.tcl
 	@${SUBST_CMD} ${WRKSRC}/programs/dtlogin/Makefile.am
 
+# Keep the existing resource links so pkg_add can upgrade older installations.
 pre-install:
-	mkdir -p ${PREFIX}/share/terminfo
+.for d in backdrops palettes
+	${INSTALL_DATA_DIR} ${PREFIX}/share/${d}
+	ln -s share/${d} ${PREFIX}/${d}
+.endfor
 
 post-install:
+	cd ${WRKBUILD} && ${MAKE_PROGRAM} install-terminfo \
+	    DESTDIR="${WRKINST}" TERMINFO="${TRUEPREFIX}/share/terminfo"
 	${INSTALL_DATA_DIR} ${PREFIX}/share/{doc/cde,examples}/
 	mv ${WRKINST}/etc/cde ${PREFIX}/share/examples/
 .for d in CONTRIBUTORS COPYING HISTORY README.md
diff --git x11/cde/distinfo x11/cde/distinfo
index 226b3d9..2704a6c 100644
--- x11/cde/distinfo
+++ x11/cde/distinfo
@@ -1,2 +1,2 @@
-SHA256 (cde-2.5.4pre0.tar.gz) = 75dWIaOy4gJCXTPNdm5oNQAVoPqkV/QKydEcs6CrbeQ=
-SIZE (cde-2.5.4pre0.tar.gz) = 58211595
+SHA256 (cde-2.5.4pre1.tar.gz) = ONsACsF/vgOb1BgfE/kb97lIGLoo/0VOQ2EVey3KbdU=
+SIZE (cde-2.5.4pre1.tar.gz) = 56881859
diff --git x11/cde/patches/patch-configure_ac x11/cde/patches/patch-configure_ac
index 9f0ede5..7ee6a45 100644
--- x11/cde/patches/patch-configure_ac
+++ x11/cde/patches/patch-configure_ac
@@ -3,16 +3,16 @@ Prevent picking up include/vista.h from databases/qdbm which breaks the build
 Index: configure.ac
 --- configure.ac.orig
 +++ configure.ac
-@@ -67,7 +67,7 @@ dnl locations of libs/includes if not in 'standard' pl
+@@ -67,7 +67,7 @@ dnl locations of libs/includes if not in
  dnl linux (/usr/...).  We build these up based on where X11 is, and
  dnl other things as we go along.
  EXTRA_LIBS=""
 -EXTRA_INCS=""
 +EXTRA_INCS="-I${LOCALBASE}/include"
  
- # pam currently only works on netbsd (9.2 tested) and linux
- supports_pam=no
-@@ -600,8 +600,8 @@ dnl shouldn't be modified.  It suggests that you creat
+ dnl Use Motif's advertised compiler interface when pkg-config metadata is
+ dnl available. Some Motif implementations expose dependencies such as Xft
+@@ -709,8 +709,8 @@ dnl shouldn't be modified.  It suggests
  dnl variable and presumably add those to your Makefile.am files.  We
  dnl have 192 of these currently, so... The user will just have to
  dnl deal, or modify them here directly.
diff --git x11/cde/patches/patch-programs_dtlogin_Makefile_am x11/cde/patches/patch-programs_dtlogin_Makefile_am
index 077a980..5e8fdb9 100644
--- x11/cde/patches/patch-programs_dtlogin_Makefile_am
+++ x11/cde/patches/patch-programs_dtlogin_Makefile_am
@@ -13,9 +13,9 @@ Index: programs/dtlogin/Makefile.am
 +DEF_USER_PATH = /usr/bin:/bin:/usr/sbin:/sbin:${LOCALBASE}/bin:$(XBINDIR)
 +DEF_SYSTEM_PATH = /usr/bin:/bin:/usr/sbin:/sbin:${LOCALBASE}/bin:$(XBINDIR)
  
- DEF_BM_PATH = $(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B
- DEF_PM_PATH = $(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B
-@@ -72,6 +72,7 @@ if OPENBSD
+ DEF_BM_PATH = $(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B:$(CDE_DATA_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_DATA_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_DATA_TOP)/appconfig/icons/%L/%B:$(CDE_DATA_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_DATA_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_DATA_TOP)/appconfig/icons/C/%B
+ DEF_PM_PATH = $(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B:$(CDE_DATA_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_DATA_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_DATA_TOP)/appconfig/icons/%L/%B:$(CDE_DATA_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_DATA_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_DATA_TOP)/appconfig/icons/C/%B
+@@ -75,6 +75,7 @@ if OPENBSD
  XBINDIR = /usr/X11R6/bin
  AM_CFLAGS += -DHASDES -DHASXDMAUTH
  dtlogin_SOURCES += xdmauth.c
diff --git x11/cde/patches/patch-programs_dtlogin_session_c x11/cde/patches/patch-programs_dtlogin_session_c
index 2f5eb2b..e0693b4 100644
--- x11/cde/patches/patch-programs_dtlogin_session_c
+++ x11/cde/patches/patch-programs_dtlogin_session_c
@@ -3,7 +3,7 @@ Use setusercontext(3) to set up the user session in dtlogin, like xenodm(1).
 Index: programs/dtlogin/session.c
 --- programs/dtlogin/session.c.orig
 +++ programs/dtlogin/session.c
-@@ -103,6 +103,12 @@
+@@ -107,6 +107,12 @@
  #include <Dt/SvcPam.h>
  #endif
  
@@ -16,7 +16,7 @@ Index: programs/dtlogin/session.c
  int ApplyFontPathMods(struct display *d, Display *dpy); // fontpath.c
  
  #ifdef SIA
-@@ -350,6 +356,62 @@ ErrorHandler( Display *dpy, XErrorEvent *event )
+@@ -354,6 +360,62 @@ ErrorHandler( Display *dpy, XErrorEvent
  
      Display 		*dpy;
  
@@ -79,7 +79,7 @@ Index: programs/dtlogin/session.c
  void
  ManageSession( struct display *d )
  {
-@@ -401,6 +463,10 @@ ManageSession( struct display *d )
+@@ -405,6 +467,10 @@ ManageSession( struct display *d )
  	 */
  
  	dpy = XOpenDisplay(d->name);
@@ -90,7 +90,7 @@ Index: programs/dtlogin/session.c
  	for (i = ScreenCount(dpy) - 1; i >= 0; i--)
  	{
  	    Window	tmproot = RootWindow(dpy, i);
-@@ -1388,7 +1454,41 @@ StartClient( struct verify_info *verify, struct displa
+@@ -1392,7 +1458,41 @@ StartClient( struct verify_info *verify,
  #endif /* SUNAUTH */
  
  
diff --git x11/cde/pkg/PLIST x11/cde/pkg/PLIST
index 84351bc..cbc3f73 100644
--- x11/cde/pkg/PLIST
+++ x11/cde/pkg/PLIST
@@ -5576,6 +5576,8 @@ config/svc/
 config/svc/CDE.lcx
 config/sys.dtprofile
 copyright
+dtksh/
+dtksh/DtFuncs.dtsh
 include/
 include/Dt/
 include/Dt/Action.h
@@ -5737,8 +5739,6 @@ lib/cde/
 lib/cde/dtdocbook/
 lib/cde/dtdocbook/tcl/
 lib/cde/dtdocbook/tcl/docbook.tcl
-lib/dtksh/
-lib/dtksh/DtFuncs.dtsh
 @static-lib lib/libDtHelp.a
 lib/libDtHelp.la
 @lib lib/libDtHelp.so.${LIBDtHelp_VERSION}

Reply via email to