FreeBSD Bugzilla – Attachment 254519 Details for
Bug 282326
[NEW PORT] x11/sx: Start an X.Org Server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
x11/sx: Start an X.Org Server
sx.patch (text/plain), 5.77 KB, created by
Vlad Biley
on 2024-10-26 04:41:03 UTC
(
hide
)
Description:
x11/sx: Start an X.Org Server
Filename:
MIME Type:
Creator:
Vlad Biley
Created:
2024-10-26 04:41:03 UTC
Size:
5.77 KB
patch
obsolete
>From 1b5c2a7216b8a8718b505fb557c103fdd4bb07d3 Mon Sep 17 00:00:00 2001 >From: Vlad Biley <bileslav@gmail.com> >Date: Sat, 26 Oct 2024 07:25:03 +0300 >Subject: [PATCH 1/1] x11/sx: Add new port > >sx is a simple alternative to both xinit(1) and startx(1) for starting an Xorg >server. It started life as a proof of concept while attempting to learn how both >xinit and startx worked while taking up the offer presented in startx: "Site >administrators are STRONGLY urged to write nicer versions". It is not a direct >replacement however as it provides a different, more limited, interface: > >* The server's command-line is hard coded and not exposed to the user. >* The server doesn't listen on anything except unix domain sockets. >* The server starts on the first available tty. >* $DISPLAY is coupled to the tty user logged in on. >* xauth entries are overwritten if the displayname is identical. >* Corresponding xauth entries are unconditionally removed when the server exits. >* The server uses the -noreset flag. >* While $XAUTHORITY is still honoured, $XDG_DATA_HOME/sx/xauthority is used by > default instead of $HOME/.Xauthority. >* Very little proxy error checking is used preferring instead to let each tool > speak for itself. >* None of the typical /usr/local/etc/X11/xinit infrastructure is directly used. >* Neither $XINITRC is honoured nor .xinitrc used. >* The $XDG_CONFIG_HOME/sx/sxrc file is used instead of .xinitrc and is required > to be executable. > >Author's design choice of coupling the tty number to Xorg's vt argument and >$DISPLAY is patched in this FreeBSD port. See Earnestly/sx#7 for more details. >--- > x11/sx/Makefile | 20 ++++++++++++++++++++ > x11/sx/distinfo | 3 +++ > x11/sx/files/patch-sx | 25 +++++++++++++++++++++++++ > x11/sx/pkg-descr | 24 ++++++++++++++++++++++++ > x11/sx/pkg-message | 1 + > x11/sx/pkg-plist | 2 ++ > 6 files changed, 75 insertions(+) > create mode 100644 x11/sx/Makefile > create mode 100644 x11/sx/distinfo > create mode 100644 x11/sx/files/patch-sx > create mode 100644 x11/sx/pkg-descr > create mode 100644 x11/sx/pkg-message > create mode 100644 x11/sx/pkg-plist > >diff --git a/x11/sx/Makefile b/x11/sx/Makefile >new file mode 100644 >index 000000000000..98a6119d7556 >--- /dev/null >+++ b/x11/sx/Makefile >@@ -0,0 +1,20 @@ >+PORTNAME=sx >+PORTVERSION=3.0 >+CATEGORIES=x11 >+ >+MAINTAINER=bileslav@gmail.com >+COMMENT=Start an X.Org Server >+ >+LICENSE=MIT >+LICENSE_FILE=${WRKSRC}/LICENSE >+ >+RUN_DEPENDS=xauth:x11/xauth \ >+ Xorg:x11-servers/xorg-server >+ >+NO_BUILD=yes >+ >+USE_GITHUB=yes >+GH_ACCOUNT=Earnestly >+GH_TAGNAME=89ba7b1 >+ >+.include <bsd.port.mk> >diff --git a/x11/sx/distinfo b/x11/sx/distinfo >new file mode 100644 >index 000000000000..3cbb1b3e744f >--- /dev/null >+++ b/x11/sx/distinfo >@@ -0,0 +1,3 @@ >+TIMESTAMP = 1729907526 >+SHA256 (Earnestly-sx-3.0-89ba7b1_GH0.tar.gz) = 1609d541b7a88ba3d3bc3be7c51bc1fbd0b345e24633cd810f5fbe47376bd3ca >+SIZE (Earnestly-sx-3.0-89ba7b1_GH0.tar.gz) = 3558 >diff --git a/x11/sx/files/patch-sx b/x11/sx/files/patch-sx >new file mode 100644 >index 000000000000..4b144f28b8d6 >--- /dev/null >+++ b/x11/sx/files/patch-sx >@@ -0,0 +1,25 @@ >+--- sx.orig 2024-03-10 10:26:45 UTC >++++ sx >+@@ -1,4 +1,4 @@ >+-#!/bin/sh -- >++#!/usr/bin/env sh >+ # sx - start an xorg server >+ # requires xauth Xorg /dev/urandom >+ >+@@ -18,7 +18,7 @@ tty=$(tty) >+ >+ stty=$(stty -g) >+ tty=$(tty) >+-tty=${tty#/dev/tty} >++tty=${tty#/dev/ttyv} >+ >+ cfgdir=${XDG_CONFIG_HOME:-$HOME/.config}/sx >+ datadir=${XDG_DATA_HOME:-$HOME/.local/share}/sx >+@@ -41,6 +41,6 @@ xauth add :"$tty" MIT-MAGIC-COOKIE-1 "$(od -An -N16 -t >+ trap 'DISPLAY=:$tty "${@:-$cfgdir/sxrc}" & wait "$!"' USR1 >+ >+ xauth add :"$tty" MIT-MAGIC-COOKIE-1 "$(od -An -N16 -tx /dev/urandom | tr -d ' ')" >+-(trap '' USR1 && exec Xorg :"$tty" vt"$tty" -keeptty -noreset -auth "$XAUTHORITY") & >++(trap '' USR1 && exec Xorg :"$tty" -keeptty -noreset -auth "$XAUTHORITY") & >+ server=$! >+ wait "$server" >diff --git a/x11/sx/pkg-descr b/x11/sx/pkg-descr >new file mode 100644 >index 000000000000..f94a9414b9b6 >--- /dev/null >+++ b/x11/sx/pkg-descr >@@ -0,0 +1,24 @@ >+sx is a simple alternative to both xinit(1) and startx(1) for starting an Xorg >+server. It started life as a proof of concept while attempting to learn how both >+xinit and startx worked while taking up the offer presented in startx: "Site >+administrators are STRONGLY urged to write nicer versions". It is not a direct >+replacement however as it provides a different, more limited, interface: >+ >+* The server's command-line is hard coded and not exposed to the user. >+* The server doesn't listen on anything except unix domain sockets. >+* The server starts on the first available tty. >+* $DISPLAY is coupled to the tty user logged in on. >+* xauth entries are overwritten if the displayname is identical. >+* Corresponding xauth entries are unconditionally removed when the server exits. >+* The server uses the -noreset flag. >+* While $XAUTHORITY is still honoured, $XDG_DATA_HOME/sx/xauthority is used by >+ default instead of $HOME/.Xauthority. >+* Very little proxy error checking is used preferring instead to let each tool >+ speak for itself. >+* None of the typical /usr/local/etc/X11/xinit infrastructure is directly used. >+* Neither $XINITRC is honoured nor .xinitrc used. >+* The $XDG_CONFIG_HOME/sx/sxrc file is used instead of .xinitrc and is required >+ to be executable. >+ >+Author's design choice of coupling the tty number to Xorg's vt argument and >+$DISPLAY is patched in this FreeBSD port. See Earnestly/sx#7 for more details. >diff --git a/x11/sx/pkg-message b/x11/sx/pkg-message >new file mode 100644 >index 000000000000..68dc68564346 >--- /dev/null >+++ b/x11/sx/pkg-message >@@ -0,0 +1 @@ >+The small NOTES section of sx(1) is a must-read. >diff --git a/x11/sx/pkg-plist b/x11/sx/pkg-plist >new file mode 100644 >index 000000000000..dc33b0377dbc >--- /dev/null >+++ b/x11/sx/pkg-plist >@@ -0,0 +1,2 @@ >+bin/sx >+share/man/man1/sx.1.gz >-- >2.47.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 282326
:
254519
|
254641
|
254826
|
254827
|
254912