summaryrefslogtreecommitdiffstats
path: root/desktop/weston
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/weston')
-rw-r--r--desktop/weston/README96
-rw-r--r--desktop/weston/slack-desc2
-rw-r--r--desktop/weston/weston-10.0.0-elogind.patch13
-rw-r--r--desktop/weston/weston-7.0.0-nopam.patch160
-rw-r--r--desktop/weston/weston.SlackBuild66
-rw-r--r--desktop/weston/weston.info8
6 files changed, 51 insertions, 294 deletions
diff --git a/desktop/weston/README b/desktop/weston/README
index 49412fa858..bff7472f5e 100644
--- a/desktop/weston/README
+++ b/desktop/weston/README
@@ -1,11 +1,3 @@
-Weston: reference implementation of a Wayland compositor.
-==========================================================
-
-This README is current as of Weston 7.0.0.
-
-Introduction
-------------
-
Weston is the reference implementation of a Wayland compositor, as well
as a useful environment in and of itself.
@@ -19,85 +11,17 @@ A small suite of example or demo clients are also provided: though they
can be useful in themselves, their main purpose is to be an example or
test case for others building compositors or clients.
+Optional Dependencies:
-Slackware-specific Information
-------------------------------
-
-*****************************************
-IMPORTANT: MANUAL INTERVENTION REQUIRED.
-*****************************************
-
-This SlackBuild of Weston takes a fairly "hands off" approach, and there
-are a few things users need to be aware of.
-
-Firstly, it is, by default, patched to remove the PAM dependency. This
-necessitates the elimination of the "-u" option of `weston-launch`, as
-PAM is required for that feature to function.
-
-To launch Weston, here are some required steps.
-
-1. You must add a group to your system called "weston-launch". You may
-do so, for instance, by running the following as root:
-
- # groupadd weston-launch
-
-2. Add users to the "weston-launch" group that you would like to be able
-to run weston-launch:
-
- # usermod -a -G weston-launch $USER
-
-3. The `weston-launch` must be setuid root. This comes with the standard
-warnings associated with doing so.
-
- # chmod +s /usr/bin/weston-launch
-
-4. If you do not have another script exporting XDG_RUNTIME_DIR, you
-should enable the one that comes with this SlackBuild:
-
- # chmod +x /etc/profile.d/weston.sh
- (or .csh, depending on your shell)
-
-Once you've logged out and back in as a normal user that has been
-added to the "weston-launch" group from a virtual console, you should
-be able to run `weston-launch` from that virtual console, and Weston
-will then launch and run directly in that console.
-
-You can use the Ctrl+Alt+Backspace keyboard combination to kill Weston.
-
-
-PAM
----
-
-Ordinarily, PAM is a mandatory dependency for Weston. This SlackBuild
-of Weston is, by default, patched to remove that dependency. If you
-happen to have PAM installed on your system and would like to build
-Weston with PAM support, make sure the USE_PAM variable is set to
-"true" (nb: nothing else, such as "1", "yes", "on", etc. will work)
-before running the SlackBuild. For example:
-
- # USE_PAM=true ./weston.SlackBuild
-
-
-Optional Dependencies
----------------------
-
-Above and beyond the hard dependencies listed in the .info file, Weston
-contains many optional dependencies. Kindly consult the documentation
-for a complete list.
-
-At the present time, the only optional dependency that this SlackBuild
-accounts for is colord, which is disabled by default. That is because
-colord pulls in many large dependencies, most of which are present on
--current (at the time of writing) but not on 14.2, so disabling it seems
-like a sensible default on a balance of convenience.
-
-If you would like to enable colord functionality in this SlackBuild,
-set the USE_COLORD variable to "true" before running the SlackBuild.
+At the present time, the only optional dependency for this SlackBuild is
+colord, which is disabled by default. That is because colord pulls in
+many dependencies.
+If you would like to enable colord functionality in this SlackBuild, set
+the USE_COLORD variable to "true" before running the SlackBuild.
-Known Issues
-------------
+NOTE:
-I have not had success getting Weston to launch with the proprietary
-nvidia drivers in use. YMMV. I have had the best luck with the Intel
-KMS drivers.
+Weston 10.x is the last version of Weston to be supported on Slackware
+15.0, as greater versions require a version of wayland-protocols which
+is more recent than provided by Slackware 15.0.
diff --git a/desktop/weston/slack-desc b/desktop/weston/slack-desc
index 041f15f591..c75b5f5c7a 100644
--- a/desktop/weston/slack-desc
+++ b/desktop/weston/slack-desc
@@ -14,6 +14,6 @@ weston:
weston: Out of the box, Weston provides a very basic desktop or a
weston: full-featured environment for non-desktop users.
weston:
-weston: IMPORTANT: Please read README.Slackware before attempting to run.
+weston: IMPORTANT: Please read README.SBo before attempting to run.
weston:
weston: Homepage: http://wayland.freedesktop.org/
diff --git a/desktop/weston/weston-10.0.0-elogind.patch b/desktop/weston/weston-10.0.0-elogind.patch
new file mode 100644
index 0000000000..776f15497c
--- /dev/null
+++ b/desktop/weston/weston-10.0.0-elogind.patch
@@ -0,0 +1,13 @@
+diff -Naur weston-10.0.0/libweston/meson.build weston-10.0.0-elogind/libweston/meson.build
+--- weston-10.0.0/libweston/meson.build 2022-02-01 16:59:57.000000000 -0500
++++ weston-10.0.0-elogind/libweston/meson.build 2022-03-28 23:44:39.649373893 -0400
+@@ -157,6 +157,9 @@
+ systemd_dep = dependency('', required: false)
+ if get_option('launcher-logind')
+ systemd_dep = dependency('libsystemd', version: '>= 209', required: false)
++ if not systemd_dep.found()
++ systemd_dep = dependency('libelogind', version: '>= 209', required: false)
++ endif
+ if systemd_dep.found()
+ config_h.set('HAVE_SYSTEMD_LOGIN_209', '1')
+ else
diff --git a/desktop/weston/weston-7.0.0-nopam.patch b/desktop/weston/weston-7.0.0-nopam.patch
deleted file mode 100644
index 8ad7b3639c..0000000000
--- a/desktop/weston/weston-7.0.0-nopam.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-diff -Naur weston-7.0.0.orig/libweston/meson.build weston-7.0.0/libweston/meson.build
---- weston-7.0.0.orig/libweston/meson.build 2019-08-23 16:59:16.000000000 -0400
-+++ weston-7.0.0/libweston/meson.build 2019-10-17 22:22:55.415927653 -0400
-@@ -199,16 +199,11 @@
- )
-
- if get_option('weston-launch')
-- dep_pam = cc.find_library('pam')
--
-- if not cc.has_function('pam_open_session', dependencies: dep_pam)
-- error('pam_open_session not found for weston-launch')
-- endif
-
- executable(
- 'weston-launch',
- 'weston-launch.c',
-- dependencies: [dep_pam, systemd_dep, dep_libdrm],
-+ dependencies: [systemd_dep, dep_libdrm],
- include_directories: include_directories('..'),
- install: true
- )
-diff -Naur weston-7.0.0.orig/libweston/weston-launch.c weston-7.0.0/libweston/weston-launch.c
---- weston-7.0.0.orig/libweston/weston-launch.c 2019-08-23 16:59:16.000000000 -0400
-+++ weston-7.0.0/libweston/weston-launch.c 2019-10-17 22:52:18.991891665 -0400
-@@ -51,7 +51,6 @@
-
- #include <pwd.h>
- #include <grp.h>
--#include <security/pam_appl.h>
-
- #ifdef HAVE_SYSTEMD_LOGIN
- #include <systemd/sd-login.h>
-@@ -100,8 +99,6 @@
- #endif
-
- struct weston_launch {
-- struct pam_conv pc;
-- pam_handle_t *ph;
- int tty;
- int ttynr;
- int sock[2];
-@@ -193,47 +190,6 @@
- }
-
- static int
--pam_conversation_fn(int msg_count,
-- const struct pam_message **messages,
-- struct pam_response **responses,
-- void *user_data)
--{
-- return PAM_SUCCESS;
--}
--
--static int
--setup_pam(struct weston_launch *wl)
--{
-- int err;
--
-- wl->pc.conv = pam_conversation_fn;
-- wl->pc.appdata_ptr = wl;
--
-- err = pam_start("login", wl->pw->pw_name, &wl->pc, &wl->ph);
-- if (err != PAM_SUCCESS) {
-- fprintf(stderr, "failed to start pam transaction: %d: %s\n",
-- err, pam_strerror(wl->ph, err));
-- return -1;
-- }
--
-- err = pam_set_item(wl->ph, PAM_TTY, ttyname(wl->tty));
-- if (err != PAM_SUCCESS) {
-- fprintf(stderr, "failed to set PAM_TTY item: %d: %s\n",
-- err, pam_strerror(wl->ph, err));
-- return -1;
-- }
--
-- err = pam_open_session(wl->ph, 0);
-- if (err != PAM_SUCCESS) {
-- fprintf(stderr, "failed to open pam session: %d: %s\n",
-- err, pam_strerror(wl->ph, err));
-- return -1;
-- }
--
-- return 0;
--}
--
--static int
- setup_launcher_socket(struct weston_launch *wl)
- {
- if (socketpair(AF_LOCAL, SOCK_SEQPACKET, 0, wl->sock) < 0) {
-@@ -431,14 +387,6 @@
- close(wl->signalfd);
- close(wl->sock[0]);
-
-- if (wl->new_user) {
-- err = pam_close_session(wl->ph, 0);
-- if (err)
-- fprintf(stderr, "pam_close_session failed: %d: %s\n",
-- err, pam_strerror(wl->ph, err));
-- pam_end(wl->ph, err);
-- }
--
- if (ioctl(wl->tty, KDSKBMUTE, 0) &&
- ioctl(wl->tty, KDSKBMODE, wl->kb_mode))
- fprintf(stderr, "failed to restore keyboard mode: %s\n",
-@@ -660,15 +608,6 @@
- setenv("HOME", wl->pw->pw_dir, 1);
- setenv("SHELL", wl->pw->pw_shell, 1);
-
-- env = pam_getenvlist(wl->ph);
-- if (env) {
-- for (i = 0; env[i]; ++i) {
-- if (putenv(env[i]) != 0)
-- fprintf(stderr, "putenv %s failed\n", env[i]);
-- }
-- free(env);
-- }
--
- /*
- * We open a new session, so it makes sense
- * to run a new login shell
-@@ -739,8 +678,6 @@
- help(const char *name)
- {
- fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
-- fprintf(stderr, " -u, --user Start session as specified username,\n"
-- " e.g. -u joe, requires root.\n");
- fprintf(stderr, " -t, --tty Start session on alternative tty,\n"
- " e.g. -t /dev/tty4, requires -u option.\n");
- fprintf(stderr, " -v, --verbose Be verbose\n");
-@@ -754,7 +691,6 @@
- int i, c;
- char *tty = NULL;
- struct option opts[] = {
-- { "user", required_argument, NULL, 'u' },
- { "tty", required_argument, NULL, 't' },
- { "verbose", no_argument, NULL, 'v' },
- { "help", no_argument, NULL, 'h' },
-@@ -766,11 +702,7 @@
- while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) {
- switch (c) {
- case 'u':
-- wl.new_user = optarg;
-- if (getuid() != 0) {
-- fprintf(stderr, "weston: Permission denied. -u allowed for root only\n");
-- exit(EXIT_FAILURE);
-- }
-+ fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n");
- break;
- case 't':
- tty = optarg;
-@@ -822,9 +754,6 @@
- if (setup_tty(&wl, tty) < 0)
- exit(EXIT_FAILURE);
-
-- if (wl.new_user && setup_pam(&wl) < 0)
-- exit(EXIT_FAILURE);
--
- if (setup_launcher_socket(&wl) < 0)
- exit(EXIT_FAILURE);
-
diff --git a/desktop/weston/weston.SlackBuild b/desktop/weston/weston.SlackBuild
index d44a73d774..362c5d6954 100644
--- a/desktop/weston/weston.SlackBuild
+++ b/desktop/weston/weston.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Weston
-# Copyright 2019-2020 Logan Rathbone <poprocks@gmail.com>
+# Copyright 2019-2023 Logan Rathbone <poprocks@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=weston
-VERSION=${VERSION:-7.0.0}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-10.0.5}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -60,18 +67,11 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.?z
cd $PRGNAM-$VERSION
-# If you have PAM installed on your system and would like to make use
-# of it, run this as USE_PAM=true ./weston.Slackbuild
-# otherwise, a patch will be applied to remove the PAM dependency.
-
-USE_PAM=${USE_PAM:-false}
-
-if [ "$USE_PAM" != 'true' ]; then
- patch -p1 < $CWD/weston-7.0.0-nopam.patch
-fi
+# Patches
+patch -p1 < $CWD/weston-10.0.0-elogind.patch
# Make sure ownerships and permissions are sane:
chown -R root:root .
@@ -81,27 +81,18 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# "./configure"
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-meson build/ \
+meson \
+ --buildtype=release \
--prefix=/usr \
--mandir=man \
--libdir=lib${LIBDIRSUFFIX} \
- -Dlauncher-logind=false \
- -Dbackend-rdp=false \
-Dsystemd=false \
- -Dpipewire=false \
- -Dsimple-dmabuf-drm=auto \
- -Dcolor-management-colord=${USE_COLORD:-false}
-
-# "make"
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-ninja -C build
-
-# "make install"
-DESTDIR=$PKG ninja -C build/ install
+ -Dcolor-management-colord=${USE_COLORD:-false} \
+ build/
+"${NINJA:=ninja}" -v -C build/
+DESTDIR=$PKG $NINJA -C build/ install
# strip
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
@@ -171,16 +162,6 @@ EOF
# config-ify the profile.d stuff
-# FIXME - I tried many things to try to creatively preserve the perms
-# of weston-launch as well (ie, in case someone suid's it and wants to
-# keep it that way upon upgrade), but this is really difficult if not
-# impossible to implement with Slackware's packaging system without
-# allowing for stray binaries (which would have been setuid by the
-# user) lingering around, which I'd really rather avoid, for safety.
-#
-# At this juncture, users will simply have to manually setuid-root the
-# binary upon each upgrade.
-
cat << EOF >> $PKG/install/doinst.sh
preserve_perms etc/profile.d/${PRGNAM}.sh.new
preserve_perms etc/profile.d/${PRGNAM}.csh.new
@@ -189,11 +170,10 @@ EOF
# Install some documentation and finish up.
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING README.md CONTRIBUTING.md $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CONTRIBUTING.md COPYING DCO-1.1.txt README.md notes.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/desktop/weston/weston.info b/desktop/weston/weston.info
index b9bf225c8f..b3623924e4 100644
--- a/desktop/weston/weston.info
+++ b/desktop/weston/weston.info
@@ -1,10 +1,10 @@
PRGNAM="weston"
-VERSION="7.0.0"
+VERSION="10.0.5"
HOMEPAGE="https://wayland.freedesktop.org/"
-DOWNLOAD="https://wayland.freedesktop.org/releases/weston-7.0.0.tar.xz"
-MD5SUM="cbfda483bc2501d0831af3f33c707850"
+DOWNLOAD="https://gitlab.freedesktop.org/wayland/weston/-/releases/10.0.5/downloads/weston-10.0.5.tar.xz"
+MD5SUM="f2e3ff33a0cdc51b77c91fd363aa191a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="libinput libwebp libxkbcommon wayland wayland-protocols"
+REQUIRES=""
MAINTAINER="Logan Rathbone"
EMAIL="poprocks@gmail.com"