From 4cfe93afcaddd6932c92884a62afe4e67990b6f0e2f5bd05a54ce8041e0c5c9d Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Sat, 14 Apr 2012 09:33:31 +0000 Subject: [PATCH] Accepting request 113498 from home:vuntz:branches:X11:XOrg Split xdm out of xorg-x11; no change to the content OBS-URL: https://build.opensuse.org/request/show/113498 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xdm?expand=0&rev=1 --- .gitattributes | 23 ++ .gitignore | 1 + HOWTO.xdm | 36 +++ ...ix-missing-linking-dependency-on-ldl.patch | 32 +++ ...L_DLOPEN-is-required-for-dynamic-lin.patch | 33 +++ ...ol-export-dynamic-option-for-reverse.patch | 61 +++++ xdm-1.1.10.tar.bz2 | 3 + xdm-consolekit.diff | 243 ++++++++++++++++++ xdm-tolerant-hostname-changes.diff | 117 +++++++++ xdm.changes | 5 + xdm.spec | 164 ++++++++++++ xdm.tar.bz2 | 3 + 12 files changed, 721 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 HOWTO.xdm create mode 100644 U_xdm_Fix-missing-linking-dependency-on-ldl.patch create mode 100644 U_xdm_config-AC_LIBTOOL_DLOPEN-is-required-for-dynamic-lin.patch create mode 100644 U_xdm_config-use-libtool-export-dynamic-option-for-reverse.patch create mode 100644 xdm-1.1.10.tar.bz2 create mode 100644 xdm-consolekit.diff create mode 100644 xdm-tolerant-hostname-changes.diff create mode 100644 xdm.changes create mode 100644 xdm.spec create mode 100644 xdm.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/HOWTO.xdm b/HOWTO.xdm new file mode 100644 index 0000000..d23c7c5 --- /dev/null +++ b/HOWTO.xdm @@ -0,0 +1,36 @@ +Display Manager Scriptlets HOWTO +================================ + +To keep display manager specific code out of the generic +start script (/etc/init.d/xdm) as much as possible display +managers should provide a script file that provides anything +specific to this dm. + +At minimum the script file needs to provide: +here denotes the name of the file. This should +be the same as the pid file generated by the display +manager - without the .pid extent. + +# this function matches the command line argument. If it +finds a match it initializes any dm specific variables +and returns 0 (success) otherwise it returns 1 (fail). +At minimum it needs to set the full path the the display +manager binary. +It may set STARTPROC to a function that gets run prior to +starting a dm, RELOADPROC to a function that's run to reload +the DM configuration, PROBEPROC to a function that's run +when the DM status is probed. +Any those functions should return 0 on success or any other +value on failure. +Additionally it may initialize any other variables needed +by the DM. + +_vars() { + case $1 in + ) + DISPLAYMANAGER=/usr/bin/ + STARTPROC=_start # optional + RELOADPROC=_reload # optional + PROBEPROC=_probe # optional + .... +} diff --git a/U_xdm_Fix-missing-linking-dependency-on-ldl.patch b/U_xdm_Fix-missing-linking-dependency-on-ldl.patch new file mode 100644 index 0000000..67f845d --- /dev/null +++ b/U_xdm_Fix-missing-linking-dependency-on-ldl.patch @@ -0,0 +1,32 @@ +From c4031966dcbc47b2cc85b83ad78efcc64455cf72 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fernando=20Tarl=C3=A1=20Cardoso=20Lemos?= +Date: Sat, 19 Feb 2011 17:53:08 -0200 +Subject: [PATCH] Fix missing linking dependency on -ldl. + +Recent versions of GCC ship with a linker that doesn't add the deps +of the DSOs to the linking process. This behavior is also found in +GNU gold. This change fixes building with those linkers. + +Some references: + +http://wiki.debian.org/ToolChain/DSOLinking +https://fedoraproject.org/wiki/UnderstandingDSOLinkChange + +Signed-off-by: Alan Coopersmith +Reviewed-by: Gaetan Nadon +--- + configure.ac | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +--- xdm-1.1.10/configure.ac.orig 2011-08-25 13:56:01.551431000 +0200 ++++ xdm-1.1.10/configure.ac 2011-08-25 13:57:09.137351000 +0200 +@@ -462,6 +462,9 @@ AM_CONDITIONAL(HAS_XDM_AUTH, test x$xdma + + AC_SEARCH_LIBS(crypt, crypt) + ++# Function dl() comes from the C library or -ldl ++AC_SEARCH_LIBS([dlopen], [dl]) ++ + AC_SUBST(XDM_CFLAGS) + AC_SUBST(XDM_LIBS) + diff --git a/U_xdm_config-AC_LIBTOOL_DLOPEN-is-required-for-dynamic-lin.patch b/U_xdm_config-AC_LIBTOOL_DLOPEN-is-required-for-dynamic-lin.patch new file mode 100644 index 0000000..309a661 --- /dev/null +++ b/U_xdm_config-AC_LIBTOOL_DLOPEN-is-required-for-dynamic-lin.patch @@ -0,0 +1,33 @@ +From 50c96170ad42321310c346cf412f9ae7e80ec2a7 Mon Sep 17 00:00:00 2001 +From: Gaetan Nadon +Date: Sun, 29 Aug 2010 19:56:59 -0400 +Subject: [PATCH] config: AC_LIBTOOL_DLOPEN is required for dynamic linking + +It adds the following tests in the configuration : +checking for shl_load... no +checking for shl_load in -ldld... no +checking for dlopen... no +checking for dlopen in -ldl... yes +checking whether a program can dlopen itself... yes +checking whether a statically linked program can dlopen itself... no + +This has not resulted in any compiler/linker flags change on +a GNU/Linux platform. + +Signed-off-by: Gaetan Nadon +--- + configure.ac | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +--- xdm-1.1.10/configure.ac.orig 2011-08-25 12:46:19.795331000 +0200 ++++ xdm-1.1.10/configure.ac 2011-08-25 12:46:52.562458000 +0200 +@@ -40,7 +40,8 @@ AC_PROG_CC + AM_PROG_CC_C_O + AC_C_INLINE + AC_LIBTOOL_WIN32_DLL +-AM_PROG_LIBTOOL ++AC_LIBTOOL_DLOPEN ++AC_PROG_LIBTOOL + AC_PROG_INSTALL + + XORG_PROG_RAWCPP diff --git a/U_xdm_config-use-libtool-export-dynamic-option-for-reverse.patch b/U_xdm_config-use-libtool-export-dynamic-option-for-reverse.patch new file mode 100644 index 0000000..2ade70f --- /dev/null +++ b/U_xdm_config-use-libtool-export-dynamic-option-for-reverse.patch @@ -0,0 +1,61 @@ +From 8b7999f8e0f797a593ac2f4697ba3be983b421ae Mon Sep 17 00:00:00 2001 +From: Gaetan Nadon +Date: Mon, 30 Aug 2010 07:39:56 -0400 +Subject: [PATCH] config: use libtool -export-dynamic option for reverse dependencies + +This replaces -rdynamic which is a GNU/Linux only solution. + +"If symbols from your executable are needed to satisfy unresolved +references in a library you want to dlopen you will have to use +the flag -export-dynamic. You should use -export-dynamic while +linking the executable that calls dlopen." + +It is used by the xserver, in Xdmx for example. + +Signed-off-by: Gaetan Nadon +--- + Makefile.am | 5 ++++- + configure.ac | 9 --------- + 2 files changed, 4 insertions(+), 10 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index fa1b0c4..15abb8c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -45,7 +45,10 @@ AM_CFLAGS = $(CWARNFLAGS) + # + + xdm_CFLAGS = $(XDM_CFLAGS) +-xdm_LDADD = $(XDM_LIBS) $(XDM_LDFLAGS) ++# The xdm binary needs to export symbols so that they can be used from ++# libXdmGreet.so loaded through a dlopen call from session.c ++xdm_LDFLAGS = -export-dynamic ++xdm_LDADD = $(XDM_LIBS) + + xdm_SOURCES = \ + auth.c \ +--- xdm-1.1.10/configure.ac.orig 2011-08-25 12:23:38.000000000 +0200 ++++ xdm-1.1.10/configure.ac 2011-08-25 13:51:34.000000000 +0200 +@@ -408,14 +408,6 @@ if test "x$DYNAMIC_GREETER" = "xyes" ; t + + GREETER_CFLAGS="$GREETER_CFLAGS -DGREET_LIB" + +- # The xdm binary needs to export symbols so that they can be used from +- # libXdmGreet.so. Some platforms require extra flags to do this. +- # gcc should set these flags when -rdynamic is passed to it, other +- # compilers/linkers may need to be added +- if test "x$GCC" = "xyes"; then +- XDM_LDFLAGS="$XDM_LDFLAGS -rdynamic" +- fi +- + PKG_CHECK_MODULES(XDMGREET, xt x11 xext) + + GREETERLIB="${XDMLIBDIR}/libXdmGreet.so" +@@ -471,7 +463,6 @@ AC_SEARCH_LIBS(crypt, crypt) + + AC_SUBST(XDM_CFLAGS) + AC_SUBST(XDM_LIBS) +-AC_SUBST(XDM_LDFLAGS) + + # + # xdmshell diff --git a/xdm-1.1.10.tar.bz2 b/xdm-1.1.10.tar.bz2 new file mode 100644 index 0000000..ead4cf6 --- /dev/null +++ b/xdm-1.1.10.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1487f7168e65fb7ea8cf21e99cdec412e643680c5dac9688aad5f87beba4f97f +size 423578 diff --git a/xdm-consolekit.diff b/xdm-consolekit.diff new file mode 100644 index 0000000..ccdf54b --- /dev/null +++ b/xdm-consolekit.diff @@ -0,0 +1,243 @@ +--- + configure.ac | 14 ++++++++ + dm.h | 3 + + resource.c | 13 +++++++ + session.c | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + xdm.man.cpp | 6 +++ + 5 files changed, 135 insertions(+), 1 deletion(-) + +Index: xdm-1.1.10/configure.ac +=================================================================== +--- xdm-1.1.10.orig/configure.ac ++++ xdm-1.1.10/configure.ac +@@ -434,6 +434,20 @@ fi + + AM_CONDITIONAL(DYNAMIC_GREETER, test x$DYNAMIC_GREETER = xyes) + ++# ConsoleKit support ++AC_ARG_WITH(consolekit, AC_HELP_STRING([--with-consolekit], [Use ConsoleKit]), ++ [USE_CONSOLEKIT=$withval], [USE_CONSOLEKIT=yes]) ++if test x"$USE_CONSOLEKIT" != xno; then ++ PKG_CHECK_MODULES(CK_CONNECTOR, ck-connector, ++ [USE_CONSOLEKIT=yes], [USE_CONSOLEKIT=no]) ++ if test x"$USE_CONSOLEKIT" = xyes; then ++ AC_DEFINE([USE_CONSOLEKIT], 1, [Define to 1 to use ConsoleKit]) ++ XDM_CFLAGS="$XDM_CFLAGS $CK_CONNECTOR_CFLAGS" ++ XDM_LIBS="$XDM_LIBS $CK_CONNECTOR_LIBS" ++ fi ++fi ++dnl AM_CONDITIONAL(USE_CONSOLEKIT, test$USE_CONSOLEKIT = xyes) ++ + # + # XDM + # +Index: xdm-1.1.10/session.c +=================================================================== +--- xdm-1.1.10.orig/session.c ++++ xdm-1.1.10/session.c +@@ -67,6 +67,11 @@ extern int key_setnet(struct key_netstar + # endif + #endif /* USE_PAM */ + ++#ifdef USE_CONSOLEKIT ++#include ++#include ++#endif ++ + #ifdef __SCO__ + # include + #endif +@@ -514,6 +519,97 @@ UnsecureDisplay (struct display *d, Disp + } + } + ++#ifdef USE_CONSOLEKIT ++ ++static CkConnector *connector; ++ ++static int openCKSession(struct verify_info *verify, struct display *d) ++{ ++ int ret; ++ DBusError error; ++ char *remote_host_name = ""; ++ dbus_bool_t is_local; ++ char *display_name = ""; ++ char *display_device = ""; ++ char devtmp[16]; ++ ++ if (!use_consolekit) ++ return 1; ++ ++ is_local = d->displayType.location == Local; ++ if (d->peerlen > 0 && d->peer) ++ remote_host_name = d->peer; ++ if (d->name) ++ display_name = d->name; ++ /* how can we get the corresponding tty at best...? */ ++ if (d->windowPath) { ++ display_device = strchr(d->windowPath, ':'); ++ if (display_device && display_device[1]) ++ display_device++; ++ else ++ display_device = d->windowPath; ++ snprintf(devtmp, sizeof(devtmp), "/dev/tty%s", display_device); ++ display_device = devtmp; ++ } ++ ++ connector = ck_connector_new(); ++ if (!connector) { ++ LogOutOfMem("ck_connector"); ++ return 0; ++ } ++ ++ dbus_error_init(&error); ++ ret = ck_connector_open_session_with_parameters( ++ connector, &error, ++ "unix-user", &verify->uid, ++ "x11-display", &display_name, ++ "x11-display-device", &display_device, ++ "remote-host-name", &remote_host_name, ++ "is-local", &is_local, ++ NULL); ++ if (!ret) { ++ if (dbus_error_is_set(&error)) { ++ LogError("Dbus error: %s\n", error.message); ++ dbus_error_free(&error); ++ } else { ++ LogError("ConsoleKit error\n"); ++ } ++ LogError("console-kit-daemon not running?\n"); ++ ck_connector_unref(connector); ++ connector = NULL; ++ return 0; ++ } ++ ++ verify->userEnviron = setEnv(verify->userEnviron, ++ "XDG_SESSION_COOKIE", ck_connector_get_cookie(connector)); ++ return 1; ++} ++ ++static void closeCKSession(void) ++{ ++ DBusError error; ++ ++ if (!connector) ++ return; ++ ++ dbus_error_init(&error); ++ if (!ck_connector_close_session(connector, &error)) { ++ if (dbus_error_is_set(&error)) { ++ LogError("Dbus error: %s\n", error.message); ++ dbus_error_free(&error); ++ } else { ++ LogError("ConsoleKit close error\n"); ++ } ++ LogError("console-kit-daemon not running?\n"); ++ } ++ ck_connector_unref(connector); ++ connector = NULL; ++} ++#else ++#define openCKSession(v,d) 1 ++#define closeCKSession() ++#endif ++ + void + SessionExit (struct display *d, int status, int removeAuth) + { +@@ -528,6 +624,8 @@ SessionExit (struct display *d, int stat + } + #endif + ++ closeCKSession(); ++ + /* make sure the server gets reset after the session is over */ + if (d->serverPid >= 2 && d->resetSignal) + kill (d->serverPid, d->resetSignal); +@@ -610,6 +708,10 @@ StartClient ( + #ifdef USE_PAM + if (pamh) pam_open_session(pamh, 0); + #endif ++ ++ if (!openCKSession(verify, d)) ++ return 0; ++ + switch (pid = fork ()) { + case 0: + CleanUpChild (); +Index: xdm-1.1.10/dm.h +=================================================================== +--- xdm-1.1.10.orig/dm.h ++++ xdm-1.1.10/dm.h +@@ -323,6 +323,9 @@ extern char *randomFile; + extern char *prngdSocket; + extern int prngdPort; + # endif ++#ifdef USE_CONSOLEKIT ++extern int use_consolekit; ++#endif + + extern char *greeterLib; + extern char *willing; +Index: xdm-1.1.10/resource.c +=================================================================== +--- xdm-1.1.10.orig/resource.c ++++ xdm-1.1.10/resource.c +@@ -65,6 +65,9 @@ char *randomDevice; + char *prngdSocket; + int prngdPort; + #endif ++#ifdef USE_CONSOLEKIT ++int use_consolekit; ++#endif + + char *greeterLib; + char *willing; +@@ -196,6 +199,10 @@ struct dmResources { + "false"} , + { "willing", "Willing", DM_STRING, &willing, + ""} , ++#ifdef USE_CONSOLEKIT ++{ "consoleKit", "ConsoleKit", DM_BOOL, (char **) &use_consolekit, ++ "true"} , ++#endif + }; + + #define NUM_DM_RESOURCES (sizeof DmResources / sizeof DmResources[0]) +@@ -378,7 +385,11 @@ XrmOptionDescRec optionTable [] = { + {"-debug", "*debugLevel", XrmoptionSepArg, (caddr_t) NULL }, + {"-xrm", NULL, XrmoptionResArg, (caddr_t) NULL }, + {"-daemon", ".daemonMode", XrmoptionNoArg, "true" }, +-{"-nodaemon", ".daemonMode", XrmoptionNoArg, "false" } ++{"-nodaemon", ".daemonMode", XrmoptionNoArg, "false" }, ++#ifdef USE_CONSOLEKIT ++{"-consolekit", ".consoleKit", XrmoptionNoArg, "true" }, ++{"-noconsolekit", ".consoleKit", XrmoptionNoArg, "false" } ++#endif + }; + + static int originalArgc; +Index: xdm-1.1.10/xdm.man.cpp +=================================================================== +--- xdm-1.1.10.orig/xdm.man.cpp ++++ xdm-1.1.10/xdm.man.cpp +@@ -48,6 +48,8 @@ xdm \- X Display Manager with support fo + ] [ + .B \-session + .I session_program ++] [ ++.B \-noconsolekit + ] + .SH DESCRIPTION + .I Xdm +@@ -215,6 +217,10 @@ indicates the program to run as the sess + .IP "\fB\-xrm\fP \fIresource_specification\fP" + Allows an arbitrary resource to be specified, as in most + X Toolkit applications. ++.IP "\fB\-noconsolekit\fP" ++Specifies ``false'' as the value for the \fBDisplayManager.consoleKit\fP ++resource. ++This suppresses the session management using ConsoleKit. + .SH RESOURCES + At many stages the actions of + .I xdm diff --git a/xdm-tolerant-hostname-changes.diff b/xdm-tolerant-hostname-changes.diff new file mode 100644 index 0000000..b577318 --- /dev/null +++ b/xdm-tolerant-hostname-changes.diff @@ -0,0 +1,117 @@ +Index: xdm-1.1.10/auth.c +=================================================================== +--- xdm-1.1.10.orig/auth.c ++++ xdm-1.1.10/auth.c +@@ -769,7 +769,7 @@ writeAddr ( + } + + static void +-DefineLocal (FILE *file, Xauth *auth) ++DefineLocal (FILE *file, Xauth *auth, char **pLocalAddress) + { + char displayname[100]; + int len = _XGetHostname (displayname, sizeof(displayname)); +@@ -805,6 +805,9 @@ DefineLocal (FILE *file, Xauth *auth) + #endif + + writeAddr (FamilyLocal, len, displayname, file, auth); ++ ++ if (pLocalAddress && displayname) ++ *pLocalAddress = strdup(displayname); + } + + #ifdef HAS_GETIFADDRS +@@ -1238,7 +1241,7 @@ setAuthNumber (Xauth *auth, char *name) + } + + static void +-writeLocalAuth (FILE *file, Xauth *auth, char *name) ++writeLocalAuth (FILE *file, Xauth *auth, char *name, char **pLocalAddress) + { + int fd; + +@@ -1265,13 +1268,13 @@ writeLocalAuth (FILE *file, Xauth *auth, + DefineSelf (fd, file, auth); + close (fd); + #endif +- DefineLocal (file, auth); ++ DefineLocal (file, auth, pLocalAddress); + } + + #ifdef XDMCP + + static void +-writeRemoteAuth (FILE *file, Xauth *auth, XdmcpNetaddr peer, int peerlen, char *name) ++writeRemoteAuth (FILE *file, Xauth *auth, XdmcpNetaddr peer, int peerlen, char *name, char **pLocalAddress) + { + int family = FamilyLocal; + char *addr; +@@ -1290,7 +1293,7 @@ writeRemoteAuth (FILE *file, Xauth *auth + } + else + { +- writeLocalAuth (file, auth, name); ++ writeLocalAuth (file, auth, name, pLocalAddress); + } + } + +@@ -1314,6 +1317,7 @@ SetUserAuthorization (struct display *d, + #ifdef HAS_MKSTEMP + int fd; + #endif ++ char *localAddress = NULL; + + Debug ("SetUserAuthorization\n"); + auths = d->authorizations; +@@ -1406,10 +1410,10 @@ SetUserAuthorization (struct display *d, + { + magicCookie = i; + if (d->displayType.location == Local) +- writeLocalAuth (new, auths[i], d->name); ++ writeLocalAuth (new, auths[i], d->name,&localAddress); + #ifdef XDMCP + else +- writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name); ++ writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name, &localAddress); + #endif + break; + } +@@ -1427,10 +1431,10 @@ SetUserAuthorization (struct display *d, + !strncmp (auths[i]->name, "MIT-KERBEROS-5", 14)) + auths[i]->data_length = 0; + if (d->displayType.location == Local) +- writeLocalAuth (new, auths[i], d->name); ++ writeLocalAuth (new, auths[i], d->name, &localAddress); + #ifdef XDMCP + else +- writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name); ++ writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name, &localAddress); + #endif + auths[i]->data_length = data_len; + } +@@ -1475,6 +1479,12 @@ SetUserAuthorization (struct display *d, + verify->systemEnviron = setEnv (verify->systemEnviron, + "XAUTHORITY", envname); + } ++ if (localAddress) { ++ verify->userEnviron = setEnv (verify->userEnviron, ++ "XAUTHLOCALHOSTNAME",localAddress); ++ free(localAddress); ++ } ++ + XauUnlockAuth (name); + if (envname) + chown (envname, verify->uid, verify->gid); +@@ -1513,10 +1523,10 @@ RemoveUserAuthorization (struct display + for (i = 0; i < d->authNum; i++) + { + if (d->displayType.location == Local) +- writeLocalAuth (new, auths[i], d->name); ++ writeLocalAuth (new, auths[i], d->name, NULL); + #ifdef XDMCP + else +- writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name); ++ writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name,NULL); + #endif + } + doWrite = 1; diff --git a/xdm.changes b/xdm.changes new file mode 100644 index 0000000..4cbdadf --- /dev/null +++ b/xdm.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Fri Apr 13 08:46:08 UTC 2012 - vuntz@opensuse.org + +- Split xdm from xorg-x11. Initial version: 1.1.10. + diff --git a/xdm.spec b/xdm.spec new file mode 100644 index 0000000..2e55988 --- /dev/null +++ b/xdm.spec @@ -0,0 +1,164 @@ +# +# spec file for package xdm +# +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# 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 http://bugs.opensuse.org/ +# + +%define _dminitdir %{_libexecdir}/X11/displaymanagers + +Name: xdm +Version: 1.1.10 +Release: 0 +License: MIT +Summary: X Display Manager +Url: http://xorg.freedesktop.org/ +Group: System/X11/Utilities +Source0: http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.bz2 +Source1: xdm.tar.bz2 +Source2: HOWTO.xdm +Patch0: xdm-consolekit.diff +Patch1: xdm-tolerant-hostname-changes.diff +Patch2: U_xdm_config-AC_LIBTOOL_DLOPEN-is-required-for-dynamic-lin.patch +Patch3: U_xdm_config-use-libtool-export-dynamic-option-for-reverse.patch +Patch4: U_xdm_Fix-missing-linking-dependency-on-ldl.patch +BuildRequires: ConsoleKit-devel +%if 0%{?suse_version} >= 01140 +# Needed to create the man page symlink to init.d +BuildRequires: aaa_base-extras +%endif +# needed for patch0, patch2, patch3, patch4 +BuildRequires: libtool +BuildRequires: pam-devel +BuildRequires: pkg-config +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xau) +BuildRequires: pkgconfig(xaw7) +BuildRequires: pkgconfig(xdmcp) +BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(xft) +BuildRequires: pkgconfig(xinerama) +BuildRequires: pkgconfig(xmu) +BuildRequires: pkgconfig(xorg-macros) >= 1.4 +BuildRequires: pkgconfig(xpm) +BuildRequires: pkgconfig(xt) +Requires: ConsoleKit +Requires: logrotate +Requires: sessreg +Requires: xrdb +Requires: xterm +Recommends: dbus-1-x11 +# This was part of the xorg-x11 package up to version 7.6 +Conflicts: xorg-x11 <= 7.6 +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +Xdm manages a collection of X displays, which may be on the local host +or remote servers. + +%prep +%setup -q +cp %{SOURCE2} . +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +# needed for patch0, patch2, patch3, patch4 +autoreconf -fi + +%build +%configure \ + --disable-static \ + --with-pam \ + --with-xdmconfigdir=%{_sysconfdir}/X11/xdm \ + --with-xdmscriptdir=%{_sysconfdir}/X11/xdm +make %{?_smp_mflags} + +%install +%make_install +# Not used anymore by SuSE +rm %{buildroot}%{_sysconfdir}/X11/xdm/{GiveConsole,TakeConsole,Xsetup_0} + +pushd %{buildroot} +# SuSE default XDM configuration +tar xf %{SOURCE1} +%ifarch s390 s390x +sed -i -e "s+DISPLAYMANAGER_REMOTE_ACCESS=.*+DISPLAYMANAGER_REMOTE_ACCESS=\"yes\"+g" \ + -e "s+DISPLAYMANAGER_REMOTE_ACCESS=.*+DISPLAYMANAGER_REMOTE_ACCESS=\"no\"+g" \ + var/adm/fillup-templates/sysconfig.displaymanager +%endif +popd + +# Correct location (FHS-2.1) +ln -s %{_localstatedir}/lib/xdm/authdir %{buildroot}%{_sysconfdir}/X11/xdm/authdir +# bnc#223734 +rm %{buildroot}%{_libdir}/X11/xdm/libXdmGreet.la +# for FHS compliance (bnc#21857) +mv %{buildroot}%{_libdir}/X11/xdm/chooser %{buildroot}%{_bindir} +# fdo#35868 (closed INVALID, but because of above fix, we want it) +ln -s xdm.1%{?ext_man} %{buildroot}%{_mandir}/man1/chooser.1%{?ext_man} +# missing manual page +mkdir -p %{buildroot}%{_mandir}/man8 +ln -s ../man7/init.d.7%{?ext_man} %{buildroot}%{_mandir}/man8/rcxdm.8%{?ext_man} + +# Note: +# no %%stop_on_removal in %%preun +# no %%restart_on_update in %%postun +# => we don't want to end an existing session + +%post +%{fillup_and_insserv -Y xdm} +%{fillup_only -n displaymanager} + +%postun +%{insserv_cleanup} + +%files +%defattr(-,root,root) +%doc AUTHORS ChangeLog COPYING README +%doc HOWTO.xdm +%dir %{_dminitdir} +%{_dminitdir}/xdm +%{_dminitdir}/entrance.fallback +%{_dminitdir}/gdm.fallback +%{_dminitdir}/kdm.fallback +%{_dminitdir}/lxdm.fallback +%{_dminitdir}/slim.fallback +%{_dminitdir}/wdm.fallback +%config %{_sysconfdir}/X11/xdm/ +%config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/xdmcp +%{_sysconfdir}/init.d/xdm +%config %{_sysconfdir}/logrotate.d/xdm +%config %{_sysconfdir}/pam.d/xdm +%config %{_sysconfdir}/pam.d/xdm-np +%dir %{_localstatedir}/lib/xdm/ +%{_localstatedir}/adm/fillup-templates/sysconfig.displaymanager +%{_localstatedir}/lib/xdm/authdir/ +%ghost %{_localstatedir}/log/xdm.errors +%ghost %{_localstatedir}/run/xdm.pid +%{_bindir}/chooser +%{_bindir}/xdm +%{_bindir}/xdmshell +%{_sbindir}/rcxdm +%{_libdir}/X11/xdm/ +%dir %{_datadir}/X11/app-defaults +%{_datadir}/X11/app-defaults/Chooser +%{_mandir}/man1/chooser.1%{?ext_man} +%{_mandir}/man1/xdm.1%{?ext_man} +%{_mandir}/man8/rcxdm.8%{?ext_man} +%ifnarch %ix86 +%dir %{_libdir}/X11 +%endif + +%changelog diff --git a/xdm.tar.bz2 b/xdm.tar.bz2 new file mode 100644 index 0000000..dd8df49 --- /dev/null +++ b/xdm.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01ec22892e40adb7aa06fffc595e6c33acbc889b69537525ed4aa0e47e405e48 +size 18953