From 32e9d3dd09a415bbf00f0af0c9c2b036bdcfa70d95f1090eb42eef1130819a92 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Sat, 1 Mar 2025 17:44:20 +0000 Subject: [PATCH] - Make build recipe compatible with POSIX sh OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xinit?expand=0&rev=73 --- .gitattributes | 23 ++ .gitignore | 1 + keygen.1 | 15 + keygen.c | 99 +++++++ xinit-1.4.3.tar.xz | 3 + xinit-client-session.patch | 40 +++ xinit-suse.patch | 149 ++++++++++ xinit-tarball.patch | 107 +++++++ xinit-tolerant-hostname-changes.patch | 12 + xinit.changes | 391 ++++++++++++++++++++++++++ xinit.diff | 13 + xinit.spec | 129 +++++++++ xinit.tar.bz2 | 3 + 13 files changed, 985 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 keygen.1 create mode 100644 keygen.c create mode 100644 xinit-1.4.3.tar.xz create mode 100644 xinit-client-session.patch create mode 100644 xinit-suse.patch create mode 100644 xinit-tarball.patch create mode 100644 xinit-tolerant-hostname-changes.patch create mode 100644 xinit.changes create mode 100644 xinit.diff create mode 100644 xinit.spec create mode 100644 xinit.tar.bz2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/keygen.1 b/keygen.1 new file mode 100644 index 0000000..2334f16 --- /dev/null +++ b/keygen.1 @@ -0,0 +1,15 @@ +.TH keygen 1 2011-04-05 University XAuth + +.SH NAME +keygen \- generate magic cookies for xauth + +.SH SYNOPSIS +.B keygen + +.SH DESCRIPTION +Prints a newly generated random key for +.B xauth +on the standard output. + +.SH SEE ALSO +xauth(7) diff --git a/keygen.c b/keygen.c new file mode 100644 index 0000000..dfd5b4a --- /dev/null +++ b/keygen.c @@ -0,0 +1,99 @@ +/* + +Copyright 1992 by the University of Edinburgh, Department of Computer Science + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of the University of Edinburgh not be used +in advertising or publicity pertaining to distribution of the software +without specific, written prior permission. The University of Edinburgh +makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +*/ +/* Little utility to generate magic cookies for xauth. */ + +#include +#include +#include +#include +#include +#ifdef Solaris +#include +#else +#include +#endif + +#if defined(hpux) || defined(Solaris) +#define srandom srand +#define random rand +#endif + +static long keys[4]; + +static void generate(seed) +int seed; +{ int i; + srandom(seed); + for (i = 0; i < 4; i++) keys[i] ^= random(); +} + + +int main() +{ int hostid; + int uid; + int gid; + int pid; + int ppid; + int pgrp; + struct timeval tv; +#ifdef Solaris + struct statvfs fs; +#else + struct statfs fs; +#endif + +#if !defined(hpux) && !defined(Solaris) + hostid = gethostid(); +#endif + uid = getuid(); + gid = getgid(); + pid = getpid(); + ppid = getppid(); +#ifdef linux + pgrp = getpgrp(); +#else + pgrp = getpgrp(0); +#endif + (void) gettimeofday(&tv, NULL); +#ifdef Solaris + (void) statvfs(".", &fs); +#else + (void) statfs(".", &fs); +#endif + +#ifndef hpux + generate(hostid); +#endif + generate(uid); + generate(gid); + generate(pid); + generate(pid); + generate(pgrp); + generate(tv.tv_sec); + generate(tv.tv_usec); + generate(fs.f_blocks); + generate(fs.f_bfree); + generate(fs.f_bavail); + generate(fs.f_files); + generate(fs.f_ffree); + + if (+printf("%08lx%08lx%08lx%08lx\n", + keys[0], keys[1], keys[2], keys[3]) < 0 + || +fflush (stdout) < 0) +{ perror ("write"); return +EXIT_FAILURE; } +else return +EXIT_SUCCESS; +} + diff --git a/xinit-1.4.3.tar.xz b/xinit-1.4.3.tar.xz new file mode 100644 index 0000000..4dc2e2e --- /dev/null +++ b/xinit-1.4.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86409f21a6a31148d2c1c17bf5f2d904eb5ef455f9dc67c49fbd0c10ab18fd5a +size 158348 diff --git a/xinit-client-session.patch b/xinit-client-session.patch new file mode 100644 index 0000000..c47ff32 --- /dev/null +++ b/xinit-client-session.patch @@ -0,0 +1,40 @@ +Index: xinit-1.4.3/xinit.c +=================================================================== +--- xinit-1.4.3.orig/xinit.c ++++ xinit-1.4.3/xinit.c +@@ -90,6 +90,7 @@ static char xserverrcbuf[256]; + + #define TRUE 1 + #define FALSE 0 ++#define ERR_EXIT 1 + + static char *default_server = "X"; + static char *default_display = ":0"; /* choose most efficient */ +@@ -570,6 +571,8 @@ startClient(char *client_argv[]) + { + clientpid = fork(); + if (clientpid == 0) { ++ int fd; ++ + set_environment(); + setWindowPath(); + +@@ -577,7 +580,17 @@ startClient(char *client_argv[]) + Error("cannot change uid"); + _exit(EXIT_FAILURE); + } +- setpgid(0, getpid()); ++ ++ fd = open ("/dev/null", O_RDONLY); ++ if (fd < 0) { ++ Error("cannot open /dev/null: %s\n", strerror(errno)); ++ _exit(ERR_EXIT); ++ } ++ close (STDIN_FILENO); ++ dup2 (fd, STDIN_FILENO); ++ close (fd); ++ setsid(); ++ + Execute(client_argv); + Error("Unable to run program \"%s\"", client_argv[0]); + diff --git a/xinit-suse.patch b/xinit-suse.patch new file mode 100644 index 0000000..ac1a733 --- /dev/null +++ b/xinit-suse.patch @@ -0,0 +1,149 @@ +Index: xinit-1.4.3/startx.cpp +=================================================================== +--- xinit-1.4.3.orig/startx.cpp ++++ xinit-1.4.3/startx.cpp +@@ -59,11 +59,103 @@ userclientrc=$HOME/.xinitrc + [ -f "${XINITRC}" ] && userclientrc="${XINITRC}" + sysclientrc=XINITDIR/xinitrc + ++XCOMM ++XCOMM check for installed servers ++XCOMM ++ ++#ifdef linux ++ ++INSTALLED_SERVERS=`ls -1 /usr/bin/Xorg /usr/X11R6/bin/XFree86 /usr/X11R6/bin/Xorg* 2>/dev/null` ++ ++ ++if [ -z "$INSTALLED_SERVERS" ]; then ++ ++ echo "" ++ echo "You did not install any X-Server \(e.g. Xorg\)!" ++ echo "Please install at least one server to start X." ++ echo "I'm aborting now." ++ exit 1 ++fi ++ ++ ++XCOMM ++XCOMM perhaps a windowmanager is specified? ++XCOMM ++XCOMM ++XCOMM find wmlist utility, else take twm as default (always there :-)) ++XCOMM ++type wmlist >/dev/null 2>&1 && WMLIST="`for i in $(wmlist); do echo $i; done | sort`" ++test -z "$WMLIST" && WMLIST="twm" ++ ++test "$1" = "--" || { test -n "$1" && WANTEDWM=`basename "$1"` ; } ++ ++XCOMM ++XCOMM User could have set a list of window manager in WINDOWMANAGERLIST. ++XCOMM go through wms and check if user specified a reachable one. ++XCOMM ++ ++for WM in $WMLIST $WINDOWMANAGERLIST ++do ++ test "$WM" = "$WANTEDWM" && { ++XCOMM ++XCOMM is it reachable via $PATH? ++XCOMM ++ type $WM >/dev/null 2>&1 || { ++ ++ echo "`basename $0`: error: the requested window manager '$1' could not be found!" ++ echo "Window manager must be one of (currently installed window amangers):" ++ for i in $WMLIST; do echo $i; done ++ exit 1 ++ } ++XCOMM ++XCOMM OK, we got it, this will be the override for WINDOWMANAGER ++XCOMM ++ export WINDOWMANAGER=$WM ++ shift 1 ++ break ++ } ++done ++ ++unset WINDOWMANAGERLIST WMLIST WANTEDWM WM ++ ++XCOMM ++XCOMM check symlink ++XCOMM ++ ++if [ ! -L /usr/bin/X ]; then ++ ++ echo "" ++ echo "There is no link /usr/bin/X to X server (/usr/bin/Xorg)!" ++ echo "Please link the files as mentioned above or install the X-Server again." ++ echo "I'm aborting now." ++ exit 1 ++fi ++ ++XCOMM ++XCOMM check if the Xorg file is an executable or an accidentally copied script or similar things ++XCOMM ++ ++if [ ! -x /usr/bin/X ]; then ++ ++ echo "" ++ echo "The file Xorg (binary of X-Server) doesn't seem to be a binary file." ++ echo "Please check it or / and install a new X-Server-binary." ++ echo "I'm aborting now." ++ exit 1 ++fi ++ ++#endif /* linux */ ++ ++XCOMM set $DISPLAYMANAGER_XSERVER $DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN ++. /etc/sysconfig/displaymanager ++ + userserverrc=$HOME/.xserverrc + [ -f "${XSERVERRC}" ] && userserverrc="${XSERVERRC}" + sysserverrc=$xinitdir/xserverrc + defaultclient=$xterm ++XCOMM set X Server accordingly (Xorg/Xgl) + defaultserver=$xserver ++test -n "$DISPLAYMANAGER_XSERVER" && defaultserver=/usr/bin/$DISPLAYMANAGER_XSERVER + defaultclientargs="" + defaultserverargs="" + defaultdisplay="" +@@ -317,6 +409,10 @@ EOF + done + fi + ++XCOMM handle TCP port 6000 ++test "$DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN" != "yes" && \ ++ serverargs="$serverargs -nolisten tcp" ++ + case "$(uname -s)" in + CYGWIN_NT*|Darwin) + eval $xinit \"$client\" $clientargs -- \"$server\" $display $serverargs +@@ -327,6 +423,12 @@ CYGWIN_NT*|Darwin) + esac + retval=$? + ++if [ "$retval" != 0 -a ! -u "/usr/bin/Xorg" ]; then ++ echo "-------------------------------------------------------------------------------------------" ++ echo "xinit failed. /usr/bin/Xorg is not setuid, maybe that's the reason?" ++ echo "If so either use a display manager (strongly recommended) or adjust /etc/permissions.local and run \"chkstat --system --set\" afterwards" ++fi ++ + if [ "$enable_xauth" = 1 ] ; then + if [ "$removelist" != "" ]; then + $xauth remove $removelist +Index: xinit-1.4.3/xinitrc.cpp +=================================================================== +--- xinit-1.4.3.orig/xinitrc.cpp ++++ xinit-1.4.3/xinitrc.cpp +@@ -47,8 +47,10 @@ if [ -d $xinitdir/xinitrc.d ] ; then + unset f + fi + +-$twm & ++if [ -x /usr/X11R6/bin/fvwm -o -x /usr/bin/fvwm]; then ++ exec fvwm ++fi + $xclock -geometry 50x50-1+1 & + $xterm -geometry 80x50+494+51 & + $xterm -geometry 80x20+494-0 & +-exec $xterm -geometry 80x66+0+0 -name login ++exec $twm diff --git a/xinit-tarball.patch b/xinit-tarball.patch new file mode 100644 index 0000000..f6eabbf --- /dev/null +++ b/xinit-tarball.patch @@ -0,0 +1,107 @@ +diff -u -r ../old/etc/X11/xinit/xinitrc ./etc/X11/xinit/xinitrc +--- ../old/etc/X11/xinit/xinitrc 2020-08-23 17:36:47.813664000 +0200 ++++ ./etc/X11/xinit/xinitrc 2020-09-08 12:57:08.577438000 +0200 +@@ -27,7 +27,11 @@ + # Source common code shared between the + # X session and X init scripts + # +-. /etc/X11/xinit/xinitrc.common ++if [ -r /etc/X11/xinit/xinitrc.common ]; then ++ . /etc/X11/xinit/xinitrc.common ++elif [ -r /usr/etc/X11/xinit/xinitrc.common ]; then ++ . /usr/etc/X11/xinit/xinitrc.common ++fi + + # + # Special for twm +diff -u -r ../old/etc/X11/xinit/xinitrc.common ./etc/X11/xinit/xinitrc.common +--- ../old/etc/X11/xinit/xinitrc.common 2020-03-24 12:39:54.076007000 +0100 ++++ ./etc/X11/xinit/xinitrc.common 2020-09-08 12:56:59.193451000 +0200 +@@ -1,4 +1,4 @@ +-# /etc/X11/xinit/xinitrc.common ++# /usr/etc/X11/xinit/xinitrc.common + # + # Common code used in X session and X init scripts. + # File shall be sourced but not executed by the scripts. +@@ -15,6 +15,7 @@ + # Some common user and system files, + # + XETCDIR=/etc/X11 ++ XUSRETCDIR=/usr/etc/X11 + xdefaults=$HOME/.Xdefaults + xresources=$HOME/.Xresources + xmodmap=$HOME/.Xmodmap +@@ -37,9 +38,15 @@ + # + # Run user xinit scripts. + # +-for script in /etc/X11/xinit/xinitrc.d/*; do ++for script in /usr/etc/X11/xinit/xinitrc.d/* \ ++ /etc/X11/xinit/xinitrc.d/*; do + test -e $script || continue + test -d $script && continue ++ # higher priority for /etc/X11/xinit/xinitrc.d ... ++ if echo $script | grep -q ^/usr; then ++ sname=$(basename $script) ++ test -e /etc/X11/xinit/xinitrc.d/$sname && continue ++ fi + case "$script" in + .*) continue ;; + *.rpm*) continue ;; +@@ -140,7 +147,11 @@ + # + # Start the XIM server + # +-XIMFILE=/etc/X11/xim ++if [ -r /etc/X11/xim ]; then ++ XIMFILE=/etc/X11/xim ++elif [ -r /usr/etc/X11/xim ]; then ++ XIMFILE=/usr/etc/X11/xim ++fi + test -r $HOME/.xim && XIMFILE=$HOME/.xim + test -r $XIMFILE && source $XIMFILE + +@@ -167,12 +178,16 @@ + # apply system's xkb first + if test -s $XETCDIR/Xkbmap; then + test -r $XETCDIR/Xkbmap && cat $XETCDIR/Xkbmap | xkbcomp - $DISPLAY ++ elif test -s $XUSRETCDIR/Xkbmap; then ++ test -r $XUSRETCDIR/Xkbmap && cat $XUSRETCDIR/Xkbmap | xkbcomp - $DISPLAY + fi + test -r "$xkbmap" && cat "$xkbmap" | xkbcomp - $DISPLAY + elif test -s "$xmodmap"; then + test -r "$xmodmap" && xmodmap "$xmodmap" + elif test -s $XETCDIR/Xkbmap ; then + test -r $XETCDIR/Xkbmap && cat $XETCDIR/Xkbmap | xkbcomp - $DISPLAY ++elif test -s $XUSRETCDIR/Xkbmap ; then ++ test -r $XUSRETCDIR/Xkbmap && cat $XUSRETCDIR/Xkbmap | xkbcomp - $DISPLAY + fi + + # +@@ -182,6 +197,9 @@ + if test -r $XETCDIR/Xresources ; then + xrdb -nocpp -load -retain $XETCDIR/Xresources + xrdb -I$HOME -merge "$xdefaults" ++ elif test -r $XUSRETCDIR/Xresources ; then ++ xrdb -nocpp -load -retain $XUSRETCDIR/Xresources ++ xrdb -I$HOME -merge "$xdefaults" + else + xrdb -I$HOME -load -retain "$xdefaults" + fi +@@ -192,11 +210,16 @@ + if test -r $XETCDIR/Xresources ; then + xrdb -nocpp -load -retain $XETCDIR/Xresources + xrdb -I$HOME -merge "$xresources" ++ elif test -r $XUSRETCDIR/Xresources ; then ++ xrdb -nocpp -load -retain $XUSRETCDIR/Xresources ++ xrdb -I$HOME -merge "$xresources" + else + xrdb -I$HOME -load -retain "$xresources" + fi + elif test -r $XETCDIR/Xresources ; then + xrdb -nocpp -load -retain $XETCDIR/Xresources ++elif test -r $XUSRETCDIR/Xresources ; then ++ xrdb -nocpp -load -retain $XUSRETCDIR/Xresources + fi + + # prevent gnome-session from failing (boo#1163262) diff --git a/xinit-tolerant-hostname-changes.patch b/xinit-tolerant-hostname-changes.patch new file mode 100644 index 0000000..a273b9b --- /dev/null +++ b/xinit-tolerant-hostname-changes.patch @@ -0,0 +1,12 @@ +Index: xinit-1.4.3/startx.cpp +=================================================================== +--- xinit-1.4.3.orig/startx.cpp ++++ xinit-1.4.3/startx.cpp +@@ -412,6 +412,7 @@ fi + XCOMM handle TCP port 6000 + test "$DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN" != "yes" && \ + serverargs="$serverargs -nolisten tcp" ++export XAUTHLOCALHOSTNAME=`hostname` + + case "$(uname -s)" in + CYGWIN_NT*|Darwin) diff --git a/xinit.changes b/xinit.changes new file mode 100644 index 0000000..3817aea --- /dev/null +++ b/xinit.changes @@ -0,0 +1,391 @@ +------------------------------------------------------------------- +Sat Mar 1 09:57:47 UTC 2025 - Jan Engelhardt + +- Make build recipe compatible with POSIX sh + +------------------------------------------------------------------- +Sun Jan 5 21:33:42 UTC 2025 - Stefan Dirsch + +- Update to version 1.4.3 + * Reindent startx after !6 + * Remove Xdmx from suggested Xserver list + * Mark global variables as static since there's only one source file + * Clear -Wunused-parameter warnings from clang + * Use ptrdiff_t to store results of pointer subtraction + * Use asprintf() if available + * Don't exit with failure on SIGTERM regardless. + * darwin: Remove bashism from 10-tmpdirs script + * Modernized shell scripts + * startx: Assign XSERVERRC to correct userserverrc + * add closing quote to /dev/random mcookie hex +- adjusted xinit-suse.patch +- refreshed xinit-client-session.patch +- refreshed xinit-tolerant-hostname-changes.patch + +------------------------------------------------------------------- +Mon Dec 23 16:55:44 UTC 2024 - Dominique Leuenberger + +- Properly comment %patch 5 out: '#' still expands the macro, which + makes build fail with rpm 4.20. Use %dnl instead. + +------------------------------------------------------------------- +Thu Jul 4 12:02:51 UTC 2024 - Stefan Dirsch + +- xinitrc.common: no longer start nvidia-settings in background in + order to avoid a zombie process under certain circumstances + (boo#1227313) + +------------------------------------------------------------------- +Mon Feb 26 12:17:30 UTC 2024 - Dominique Leuenberger + +- Use %patch -P N instead of deprecated %patchN. + +------------------------------------------------------------------- +Thu May 11 12:24:21 UTC 2023 - Stefan Dirsch + +- revert previous change; cpp is not needed for xinit, but only for + xdm package + +------------------------------------------------------------------- +Thu May 11 12:16:19 UTC 2023 - Stefan Dirsch + +- since xrdb no longer requires cpp, it needs to be reqired here now + +------------------------------------------------------------------- +Sun Dec 4 22:01:40 UTC 2022 - Stefan Dirsch + +- Update to version 1.4.2 + * Fix spelling/wording issues + * gitlab CI: add a basic build test + * gitlab CI: stop requiring Signed-off-by in commits + * man page: Update remote display example from rsh to ssh + * Remove non-portable grep usage from startx + * Don't wait for X to finish starting if it has died + * stop unsetting DBUS_SESSION_BUS_ADDRESS variable + * darwin: Drop support for macOS 10.7 and earlier + * darwin: Ensure we launch the user startx from $HOME + * darwin: Specify +extension GLX when the user requests IGLX support + * darwin: Wait for font_cache to complete to avoid a race with `xset fb=` + * man: Restore non-SCO UNIX bits of the man page + * startx: use uname -n instead of hostname + * startx: Source XINITRC and XSERVERRC variables + * startx: don't attempt to catch SIGKILL +- supersedes xinit-nolonger-unset-dbus-session.patch +- refreshed xinit-suse.patch + +------------------------------------------------------------------- +Wed Apr 21 09:10:30 UTC 2021 - Dirk Müller + +- modernize spec file (move license to licensedir, use https) + +------------------------------------------------------------------- +Sun Oct 4 09:47:55 UTC 2020 - Fabian Vogt + +- Properly track the compatibility symlink + +------------------------------------------------------------------- +Tue Sep 8 23:09:02 UTC 2020 - Stefan Dirsch + +- simplified UsrEtcMove enable/disable logic in specfile + +------------------------------------------------------------------- +Tue Sep 8 11:36:36 UTC 2020 - Stefan Dirsch + +- xinit-tarball.patch/xinit.spec + * reenabled move to /usr/etc/X11/xinit + * fixed remaining issues mentioned in boo#1173052, comment#6 + and boo#1176212, comment#7 + +------------------------------------------------------------------- +Tue Sep 8 09:44:08 UTC 2020 - Stefan Dirsch + +- reverted move to /usr/etc/X11/xinit for now (boo#1173052, comment#6) + +------------------------------------------------------------------- +Sat Sep 5 02:48:39 UTC 2020 - Stefan Dirsch + +- moved xinit files to /usr/etc/X11/xinit and removed xinitrc + skeleton (boo#1173052) +- xinit-tarball.patch + * adjust tarball contenct to /usr/etc move (boo#1173052) + +------------------------------------------------------------------- +Sun Aug 23 15:38:01 UTC 2020 - Stefan Dirsch + +- xinitrc: SuSE --> SUSE (boo#1175123) + +------------------------------------------------------------------- +Tue Mar 24 11:41:07 UTC 2020 - Stefan Dirsch + +- /etc/X11/xinit/xinitrc.common + * prevent gnome-session from failing by setting + XDG_SESSION_TYPE to 'x11' (boo#1163262) + +------------------------------------------------------------------- +Mon Mar 4 10:47:26 UTC 2019 - Stefan Dirsch + +- Update to version 1.4.1 + * This release fixes a bug when too many arguments are supplied + to the program and improves the man pages. + +------------------------------------------------------------------- +Sat Sep 15 13:40:18 UTC 2018 - sndirsch@suse.com + +- xinit-nolonger-unset-dbus-session.patch + * no longer unset DBUS_SESSION_BUS_ADDRESS variable to prevent + gnome-session (and probably other DEs or programs, except of + Plasma) from launching a new D-Bus session, while systemd has + already launched its own. Unsetting it broke user systemd + services that use D-Bus (e.g. PulseAudio), because X uses + another D-Bus session (boo#1108549) + +------------------------------------------------------------------- +Wed Jul 11 11:16:48 UTC 2018 - fcrozat@suse.com + +- Do not check /var/lib/X11/X anymore, it is obsolete + (FATE#325524). + +------------------------------------------------------------------- +Wed Apr 4 14:27:04 UTC 2018 - sndirsch@suse.com + +- Update to version 1.4.0 + * autogen.sh: use quoted string variables + * Remove SCO support for SHELL_CMD and startx man page. + * Remove support for ancient A/UX 3.0 support + * Remove left over $(launchagents_DATA) in CLEANFILES + * startx: Pass -keeptty when telling the server to start on the current tty + * startx: Fix startx picking an already used display number when -nolock is used + * remove bogus \/ escapes + * launchd: Install binaries into libexecdir + * startx: Add -listen tcp if nolisten_tcp is disabled for XQuartz + * startx: Add support for enabling IGLX for XQuartz + * startx: Don't use GNU expr extensions + * autogen: add default patch prefix + * startx: fix comment typo + * startx: don't init defaultdisplay to :0 + * autogen.sh: use exec instead of waiting for configure to finish + * xinit: check for correct fork error code + +------------------------------------------------------------------- +Wed Jun 1 12:37:18 UTC 2016 - mstaudt@suse.com + +- xinitrc.common: Add plasma* in list of fallback WMs + +------------------------------------------------------------------- +Wed Jun 1 10:43:56 UTC 2016 - mstaudt@suse.com + +- xinitrc.common: Add comments, make error messages clearer. + Don't filter out twm, as it's only installed on request. + Don't expand fallback WINDOWMANAGER. + +------------------------------------------------------------------- +Wed Jun 1 07:36:25 UTC 2016 - werner@suse.de + +- xinit.tar.bz2: skip twm and xsession desktops + +------------------------------------------------------------------- +Tue May 31 16:46:51 UTC 2016 - werner@suse.de + +- xinit.tar.bz2: + simplify bash code of /etc/X11/xinit/xinitrc.common to avoid that + already set WINDOWMANAGER variable becomes stripped (bsc#981437) + +------------------------------------------------------------------- +Fri Apr 1 08:39:03 UTC 2016 - eich@suse.com + +- xinit.tar.bz2: + update /etc/X11/xinit/xinitrc.common to make sure numbered scripts + are run sequentially. All non-numbered scripts will still be run in + background to avoid stalling on non-daemonizing 'services' (boo#973559). + +------------------------------------------------------------------- +Sun May 10 01:21:00 UTC 2015 - Led + +- fix bashism in startx script +- update patches: + * xinit-suse.patch + +------------------------------------------------------------------- +Wed Mar 18 11:47:43 UTC 2015 - sndirsch@suse.com + +- fixed bugnumer reference in previous changelog entry + +------------------------------------------------------------------- +Wed Mar 11 13:30:04 UTC 2015 - werner@suse.de + +- Allow WINDOWMANAGER to be a command line string (bsc#921172) + +------------------------------------------------------------------- +Wed Jan 28 09:35:36 UTC 2015 - sndirsch@suse.com + +- startx.cpp: + * /usr/X11R6/bin/X --> /usr/bin/X + * /var/X11R6/bin/X --> /var/lib/X11/X +- refreshed patches + +------------------------------------------------------------------- +Fri Jan 23 17:07:35 UTC 2015 - sndirsch@suse.com + +- apparently with release 1.3.4 xinit needs cc1plus; otherwise + generation of startx fails and results in a file with a size + of 0 bytes + +------------------------------------------------------------------- +Wed Jan 21 09:40:03 UTC 2015 - sndirsch@suse.com + +- Fixed some more spacing and minor issues in adapted patches + +------------------------------------------------------------------- +Tue Jan 20 17:44:43 UTC 2015 - sfalken@opensuse.org + +- Fixed some spacing and single quote vs backtick issues + in patches + +------------------------------------------------------------------- +Mon Jan 19 17:12:31 UTC 2015 - sfalken@opensuse.org + +- Corrections to variable names in xinit-suse.patch and + xinit-tolerant-hostname-changes.patch + +------------------------------------------------------------------- +Sun Jan 18 17:38:28 UTC 2015 - sfalken@opensuse.org + +- Update to version 1.3.4: + + Changes from 1.3.3 + - Fix warnings about parameters to startServer & startClient + shadowing globals + - Pass files to cpp via CLI arg instead of stdin to workaround + gcc 4.8 change (fdo#69439) + - Remove unixware / sco support + - Bump required util-macros version to 1.19 + - Replace $RAWCPPFLAGS with $TRADITIONALCPPFLAGS when processing + cpp files + - Under Linux start X on the current VT (rh#806491) + - startx; Pass vtX as long as the user did not specify one + - configure: Drop AM_MAINTAINER_MODE + - autogen.sh: Honor NOCONFIGURE=1 + - startx: Make the bugzilla reference in a comment survive cpp + processing (fdo#83019) + - Remove hardcoded path to OpenSSL for OpenBSD + + Patches refactored/renamed for version change + + Added: + - xinit-client-session.patch + - xinit-tolerant-hostname-changes.patch + - xinit-suse.patch + - xinit-1.3.4.tar.bz2 + + Modified: + - xinit-client-session.patch + + Dropped: + - xinit-tolerant-hostname-changes.diff + - xinit-suse.diff + - xinit-1.3.3.tar.bz2 + +------------------------------------------------------------------- +Wed Dec 17 20:36:15 UTC 2014 - dimstar@opensuse.org + +- On openSUSE > 13.2, xterm has been split into xterm-bin for the + program and xterm for the app launcher. We only need the program, + so conditionall Require xterm-bin. + +------------------------------------------------------------------- +Tue Sep 9 07:54:00 UTC 2014 - sndirsch@suse.com + +- add info to run chkstat after modifying /etc/permissions.local + in order to run startx (bnc#895647) + +------------------------------------------------------------------- +Wed Jan 8 13:57:53 UTC 2014 - lnussel@suse.de + +- don't call the obsolete wmlist. Read /usr/share/xsessions instead. + +------------------------------------------------------------------- +Mon Sep 16 15:09:42 UTC 2013 - sndirsch@suse.com + +- fixed loading of .xkb files (bnc#840408) + +------------------------------------------------------------------- +Thu Sep 12 19:53:48 UTC 2013 - zaitor@opensuse.org + +- Update to version 1.3.3: + + Add Apple copyright/license notice from launchd files to + COPYING. + + Use pid_t instead of int for type of pids. + + Check for openssl as mkcookie fallback on all platforms, not + just OpenBSD. + + Declare processTimeout() as taking a const string arg. + + If we have to forcibly kill the Xserver on Solaris, reset + kbd_mode. + + Add printf attributes suggested by gcc. + + install: Use sysconfdir instead of libdir for config files. + + man: Set correct config file location in man page. + + privileged_startx: use root:wheel instead of 0:0. + + XQuartz: Fix an issue where -dpi was not being passed to the + server despite being set. + + Annotate Fatal and Fatalx as _X_NORETURN. + + darwin: Silence a syslog message from defaults. + + laucnhd: + - Silence some syslog spam. + - Fix the destination of moved-aside directories in + privileged_startx. + - Load privileged_startx properly on Tiger. + - Provide more verbose error reporting for launchd checkin + failures. + - Don't provide the LaunchAgent on Tiger. + + launchd/privileged_startx: Improved error resolution. +- Add pkgconfig(xproto) BuildRequires, new dependency. + +------------------------------------------------------------------- +Wed Dec 5 09:40:27 UTC 2012 - werner@suse.de + +- Move xinitrc.d sourcing part to xinit.common to make it work + even with xdm session scripts +- Detect other running X server in xserverrc + +------------------------------------------------------------------- +Mon Jul 2 09:34:48 UTC 2012 - werner@suse.de + +- Allow xinitrc scripts to be sourced (bnc#750980) + +------------------------------------------------------------------- +Sun Apr 15 15:16:28 UTC 2012 - vuntz@opensuse.org + +- Move /etc/X11/Xresources from xorg-x11 to this package (in + xinit.tar.bz2), since this is the base package using this file. + +------------------------------------------------------------------- +Sat Apr 14 22:02:54 UTC 2012 - dimstar@opensuse.org + +- Update to version 1.3.2: + + Use default clientargs, serverargs, and display if none were + set + + launchd: Add an option (--with-launchagent-xserver) to set the + default X11 server + + startx: Choose an unused $DISPLAY by default on all platforms + (fdo#1789) + + Include and unconditionally + (fdo#40632) + + darwin: Buildfix for Tiger which doesn't have posix_spawn +- Changes from version 1.3.1: + + launchd: Brownbag fix string compare + + launchd: console_redirect: Actually read and log the remaining + data when we get EV_EOF + + launchd: Enable stdout/stderr redirection to ASL + + launchd: Fix an array-index-out-of-bounds crasher + + launchd: Log messages to ASL rather than fprintf + + launchd: Reorganized layout of launchd sources + + launchd: Set the correct id for privileged_startx + + launchd: Silence clang static analyzer + + launchd: syslog: Use facility org.x rather than user + + launchd: Update console redirection to work with libdispatch + + privileged_startx: Prefer /usr/bin/mktemp + + Rename launchd-id-prefix to bundle-id-prefix + + Use XORG_MANPAGE_SECTIONS rather than cpprules.in to build man + pages + + Build system fixes. +- Rebase xinit.diff. + +------------------------------------------------------------------- +Fri Apr 13 08:46:08 UTC 2012 - vuntz@opensuse.org + +- Split xinit from xorg-x11. Initial version: 1.3.0. + diff --git a/xinit.diff b/xinit.diff new file mode 100644 index 0000000..a5ceb33 --- /dev/null +++ b/xinit.diff @@ -0,0 +1,13 @@ +Index: Makefile.am +=================================================================== +--- Makefile.am.orig ++++ Makefile.am +@@ -24,6 +24,8 @@ if LAUNCHD + SUBDIRS += launchd + endif + ++XINITDIR = /etc/X11/xinit ++ + bin_PROGRAMS = xinit + bin_SCRIPTS = startx + diff --git a/xinit.spec b/xinit.spec new file mode 100644 index 0000000..9e51bab --- /dev/null +++ b/xinit.spec @@ -0,0 +1,129 @@ +# +# spec file for package xinit +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%if 0%{?suse_version} >= 1550 +%define UsrEtcMove 1 +%endif +Name: xinit +Version: 1.4.3 +Release: 0 +Summary: X Window System initializer +License: MIT +Group: System/X11/Utilities +URL: https://xorg.freedesktop.org/ +Source0: https://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.xz +Source1: xinit.tar.bz2 +Source2: keygen.c +Source3: keygen.1 +Patch0: xinit.diff +Patch1: xinit-client-session.patch +Patch2: xinit-suse.patch +Patch3: xinit-tolerant-hostname-changes.patch +Patch5: xinit-tarball.patch +# needed for patch0 +BuildRequires: gcc-c++ +BuildRequires: libtool +BuildRequires: pkgconfig +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xorg-macros) >= 1.8 +BuildRequires: pkgconfig(xproto) >= 7.0.17 +Requires: setxkbmap +Requires: xauth +Requires: xmodmap +Requires: xrdb +Requires: xsetroot +# This was part of the xorg-x11 package up to version 7.6 +Conflicts: xorg-x11 <= 7.6 +%if 0%{?suse_version} > 1320 +Requires: xterm-bin +%else +Requires: xterm +%endif + +%description +The xinit program is used to start the X Window System server and a +first client program on systems that are not using a display manager +such as xdm or in environments that use multiple window systems. +When this first client exits, xinit will kill the X server and then +terminate. + +%prep +%setup -q +%if 0%{?UsrEtcMove} +sed -i 's+%{_sysconfdir}/X11+%{_libexecdir}+' %{PATCH0} +%endif +%patch -P 0 +%patch -P 1 -p1 +%patch -P 2 -p1 +%patch -P 3 -p1 +### patch is applied later in %install section +%dnl %patch -P 5 -p0 +# needed for patch0 +autoreconf -fi + +%build +%if 0%{?UsrEtcMove} +%configure --with-xinitdir=%{_libexecdir}/xinit +%else +%configure +%endif +%make_build +gcc %{optflags} -o keygen %{SOURCE2} + +%install +%make_install +install -m 0644 %{SOURCE3} %{buildroot}%{_mandir}/man1 +install -m 0711 keygen %{buildroot}%{_bindir}/keygen +cd %{buildroot} +tar -xf %{SOURCE1} +%if 0%{?UsrEtcMove} +patch -p0 < %{PATCH5} +mkdir -p %{buildroot}%{_libexecdir}/xinit +mv etc/X11/xinit/{xinitrc,xserverrc} %{buildroot}%{_libexecdir}/xinit +mkdir -p usr%{_sysconfdir}/X11/xinit/xinitrc.d +mv etc/X11/Xresources usr%{_sysconfdir}/X11 +mv etc/X11/xinit/xinitrc.common usr%{_sysconfdir}/X11/xinit +# Compatibility symlink for user xinitrc files +ln -s %{_prefix}%{_sysconfdir}/X11/xinit/xinitrc.common etc/X11/xinit/xinitrc.common +rmdir etc/X11/xinit/xinitrc.d +%endif + +%files +%license COPYING +%doc ChangeLog README.md +%if 0%{?UsrEtcMove} +%dir %{_distconfdir}/X11 +%{_distconfdir}/X11/xinit/ +%{_distconfdir}/X11/Xresources +%dir %{_libexecdir}/xinit +%attr(0755,root,root) %{_libexecdir}/xinit/xinitrc +%attr(0755,root,root) %{_libexecdir}/xinit/xserverrc +%dir %{_sysconfdir}/X11/xinit/ +%config %{_sysconfdir}/X11/xinit/xinitrc.common +%else +%config %{_sysconfdir}/X11/xinit/ +%config %{_sysconfdir}/X11/Xresources +%endif +%{_bindir}/keygen +%{_bindir}/startx +%{_bindir}/xinit +%{_mandir}/man1/keygen.1%{?ext_man} +%{_mandir}/man1/startx.1%{?ext_man} +%{_mandir}/man1/xinit.1%{?ext_man} + +%changelog diff --git a/xinit.tar.bz2 b/xinit.tar.bz2 new file mode 100644 index 0000000..64600ce --- /dev/null +++ b/xinit.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9cb5221038c48acd89f787e586dbe13b48ea03276130d4a09232e843dc9e69d8 +size 4945