#!/bin/sh # test we are root if [ "$(id -u)" != "0" ]; then exit 1 fi export CFLAGS="-mtune=generic -Os -pipe" export CXXFLAGS="-mtune=generic -Os -pipe -fno-exceptions -fno-rtti " P=seatd V=0.9.1 SRC=$P-$V USER=`cat /etc/sysconfig/tcuser` LIST="compiletc submitqc git meson cmake scdoc-dev " for Z in $LIST do su -c "tce-load -i $Z" $USER done cd /tmp su -c "/usr/local/bin/wget -nc --no-check-certificate \ https://git.sr.ht/~kennylevinsen/$P/archive/$V.tar.gz" $USER tar xvf $V*gz cd $SRC mkdir build && cd build meson setup --prefix=/usr/local -Dstrip=true -Ddebug=false -Dman-pages=enabled \ -Dexamples=disabled -Dlibseat-logind=disabled -Dserver=enabled -Dexamples=disabled # to show settings as I could have used meson configure # libseat-seatd : YES # libseat-builtin: NO # libseat-systemd: NO # libseat-elogind: NO # server : YES # man-pages : YES # User defined options # debug : false # examples : disabled # libseat-logind : disabled # man-pages : enabled # prefix : /usr/local # server : enabled # strip : true ninja # seconds DESTDIR=/tmp/$P ninja install cd /tmp # dev ##### mkdir -p $P-dev/usr/local/lib mv $P/usr/local/include $P-dev/usr/local/ mv $P/usr/local/lib/pkgconfig $P-dev/usr/local/lib # doc ##### mkdir -p $P-doc/usr/local/share mv $P/usr/local/share/man $P-doc/usr/local/share/ # main ###### mkdir -p $P/usr/local/share/doc/$P cp $SRC/LICENSE $P/usr/local/share/doc/$P/ # submitqc wants to make 755....do it and fix it later by install script for suid chmod 755 $P/usr/local/bin/seatd* # tce.installed script ################ mkdir -p $P/usr/local/tce.installed cat >> $P/usr/local/tce.installed/$P <<'EOF' #!/bin/sh # members may move from either weston labwc sway to any of the 3 named # so delete existing socket and start afresh [ ! -f /run/seatd.sock ] || rm -rf /run/seatd.sock # make SUID rm -rf /usr/local/bin/seatd* LOOP=/tmp/tcloop/seatd/usr/local/bin cp $LOOP/seatd* /usr/local/bin chmod a+s /usr/local/bin/seatd* EOF chown -R root:staff $P/usr/local/tce.installed chmod 775 -R $P/usr/local/tce.installed # TCZ them ####### LIST="$P $P-dev $P-doc " for Z in $LIST do mksquashfs $Z $Z.tcz md5sum $Z.tcz > $Z.tcz.md5.txt cd $Z find . -not -type d | cut -c 2- | sort > /tmp/$Z.tcz.list cd /tmp done ls -hal echo 'Title: seatd-dev.tcz Description: dev files Version: 0.9.1 Author: Kenny Levinsen Original-site: https://git.sr.ht/~kennylevinsen/seatd/refs Copying-policy: Accompanied Size: 4.0K Extension_by: aus9 @linuxquestions.org Tags: seat sway weston labwc wayland Comments: development files Change-log: 2023/04/21 v 0.7.0 on 14x 2024/04/18 v 0.8.0 suid for both exes on 15x Current: 2025/02/19 start with a fresh socket+ suid by install script on 16x ' > $P-dev.tcz.info echo 'seatd.tcz scdoc-dev.tcz ' > $P-dev.tcz.dep echo 'Title: seatd-doc.tcz Description: dev files Version: 0.9.1 Author: Kenny Levinsen Original-site: https://git.sr.ht/~kennylevinsen/seatd/refs Copying-policy: Accompanied Size: 4.0K Extension_by: aus9 @linuxquestions.org Tags: seat sway weston labwc wayland Comments: man pages Change-log: 2023/04/21 v 0.7.0 on 14x 2024/04/18 v 0.8.0 suid for both exes on 15x Current: 2025/02/19 start with a fresh socket+ suid by install script on 16x ' > $P-doc.tcz.info echo 'man-db.tcz' > $P-doc.tcz.dep echo 'Title: seatd.tcz Description: seat management daemon Version: 0.9.1 Author: Kenny Levinsen Original-site: https://git.sr.ht/~kennylevinsen/seatd/refs Copying-policy: Accompanied Size: 32K Extension_by: aus9 @linuxquestions.org Tags: seat sway weston labwc wayland Comments: minimal seat management daemon, and a universal seat management library Socket will be created at /run/seatd.sock Install script will destroy any existing socket file and make executables SUID Examples seatd -g staff /run/seatd.sock & XDG_RUNTIME_DIR=/run/user/$(id -u) weston seatd -g staff /run/seatd.sock & XDG_RUNTIME_DIR=/run/user/$(id -u) labwc sway has its own setup under ~/.local/bin/z see sway-dot TCE Change-log: 2023/04/21 v 0.7.0 on 14x 2024/04/18 v 0.8.0 suid for both exes on 15x Current: 2025/02/19 start with a fresh socket+ suid by install script on 16x ' > $P.tcz.info readelf -d $P/usr/local/bin/* | grep 'NEEDED' # TCBS readelf -d $P/usr/local/lib/*.so | grep 'NEEDED' # same # no main dep submitqc --libs rm -rf *.zsync # pass1 submitqc changed my SUID ...so avoided by using install script