# spec file for package epoptes # used most code from SUSE spec (2016) and other from Wei-Lun Chao (2022) # Used code from openSUSE spec from Frank Schütte too Name: epoptes Version: 23.01 Release: 11%{?dist} License: GPLv3+ Summary: Computer lab management tool Url: http://www.epoptes.org Source0: https://github.com/%{name}/%{name}/archive/refs/tags/v%{version}.tar.gz Source1: epoptes.rpmlintrc Source2: epoptes-server.service Source3: epoptes-client.service Source4: epoptes.sysusers Source5: epoptes.sysconfig Source6: epoptes-client.sysconfig Patch1: epoptes-client_sysconfig_support.patch Patch2: epoptes_config.py_sysconfig_support.patch BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: systemd-rpm-macros %{?sysusers_requires_compat} BuildRequires: intltool BuildRequires: python-twisted BuildRequires: python3-distutils-extra BuildRequires: openssl Requires: iperf Requires: python-twisted # WARNING: Must find python-pycha for F37+ or package it too (https://src.fedoraproject.org/rpms/pychart) Requires: python3-notify2 Requires: python-netifaces Requires: socat Requires: openssl Requires: x11vnc Requires: xset Requires: xwininfo Requires: gtk3 Requires: xdg-desktop-portal-gtk Requires: python3-gobject Requires: tigervnc Requires: avahi Conflicts: %{name} < %{version}-%{release} BuildArch: noarch %description Epoptes (Επόπτης - a Greek word for overseer) is an open source computer lab management and monitoring tool. It allows for screen broadcasting and monitoring, remote command execution, message sending, imposing restrictions like screen locking or sound muting the clients and much more! Visit http://epoptes.org for more information. %package client Summary: Epoptes client Requires: librsvg2 Requires: iperf Requires: socat Requires: x11vnc Requires: xset Requires: xwininfo Requires: openssl Conflicts: %{name}-client < %{version}-%{release} %description client This is a client part of Epoptes Computer lab management tool %prep %setup -q %patch 1 %patch 2 %build %py3_build %install %py3_install %__mkdir_p %{buildroot}%{_unitdir}/%{name} %__install -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}-server.service %__install -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}-client.service %__install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_sysusersdir}/%{name}.conf %__mkdir_p %{buildroot}%{_sysconfdir}/sysconfig/%{name}/ %__install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/%{name} %__install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/%{name} # Ugly workaround to fix find_lang macro not finding .mo files due to unusual location %__mkdir_p %{buildroot}%{_datadir}/locale %__cp -r ./build/mo/* %{buildroot}%{_datadir}/locale # Another ugly workaround to configure client with avahi name (hostmane.local) SERVER_NAME=$(%__cat /proc/sys/kernel/hostname) CLIENT_FILE=%{buildroot}%{_sysconfdir}/sysconfig/%{name}/%{name}-client.sysconfig echo -e "\nSERVER=$SERVER_NAME.local\n" >> "$CLIENT_FILE" %find_lang %{name} --all-name --with-man %pre %sysusers_create_compat %{SOURCE3} %post %__mkdir_p %{_sysconfdir}/%{name}/ if ! [ -f %{_sysconfdir}/%{name}/server.key ] || ! [ -f %{_sysconfdir}/%{name}/server.crt ]; then openssl req -batch -x509 -nodes -newkey rsa:4096 -days $(($(date --utc +%s) / 86400 + 3652)) -keyout %{_sysconfdir}/%{name}/server.key -out %{_sysconfdir}/%{name}/server.crt; chmod 600 %{_sysconfdir}/%{name}/server.key fi %systemd_post %{name}-server.service %post client %systemd_post %{name}-client.service %preun %systemd_preun %{name}-server.service %preun client %systemd_preun %{name}-client.service %postun %systemd_postun_with_restart %{name}-server.service %__rm -rf %{_sysconfdir}/%{name}/ %postun client %systemd_postun_with_restart %{name}-client.service %files -f %{name}.lang %license COPYING LICENSE %doc README.md %{_bindir}/%{name} %{_unitdir}/%{name}-server.service %{_sysusersdir}/%{name}.conf %{_sysconfdir}/sysconfig/%{name}/%{name}.sysconfig %{python3_sitelib}/%{name}/*.py %{python3_sitelib}/%{name}/__pycache__/*.pyc %{python3_sitelib}/%{name}/common/*.py %{python3_sitelib}/%{name}/common/__pycache__/*.pyc %{python3_sitelib}/%{name}/core/*.py %{python3_sitelib}/%{name}/core/__pycache__/*.pyc %{python3_sitelib}/%{name}/daemon/*.py %{python3_sitelib}/%{name}/daemon/__pycache__/*.pyc %{python3_sitelib}/%{name}/ui/*.py %{python3_sitelib}/%{name}/ui/__pycache__/*.pyc %{_datadir}/ltsp/plugins/ltsp-build-client/common/040-epoptes-certificate %{python3_sitelib}/twisted/plugins/*.py %{python3_sitelib}/twisted/plugins/__pycache__/*.pyc %{_datadir}/%{name}/ %{_mandir}/man1/%{name}.1* %ghost %{python3_sitelib}/*.egg-info %files client %{_sysconfdir}/sysconfig/%{name}/%{name}-client.sysconfig %{_sbindir}/%{name}-client %{_datadir}/%{name}-client/*.py %{_datadir}/%{name}-client/*.ui %{_datadir}/%{name}-client/endsession %{_datadir}/%{name}-client/get-display %{_datadir}/%{name}-client/receive-terminals %{_datadir}/%{name}-client/share-terminal %{_datadir}/%{name}-client/lock.svg %{_sysconfdir}/xdg/autostart/%{name}-client.desktop %{_unitdir}/%{name}-client.service %{_mandir}/man8/%{name}-client.8.* %changelog * Wed Jun 14 2023 Xoloitzcuintle 23.01-11 - Fixed server systemd service not starting - Recreate some patches and applied them - Configure client to use avahi provided name * Mon Jun 12 2023 Xoloitzcuintle 23.01-10 - Organized files section - Added sysusers file - Added sysconfig files from Frank Schütte openSUSE package - Moved certificate generation from epoptes systemd service to spec - Fixed certificate deletion * Fri Jun 09 2023 Geraldo Simiao 23.01-5 - fixing systemd services key * Wed Jun 07 2023 Geraldo Simiao 23.01-4 - adjusted the services macros * Wed Jun 07 2023 Geraldo Simiao 23.01-3 - removed tightvnc patch and requires and changed other dependencies names for correct ones * Tue Jun 06 2023 Geraldo Simiao 23.01-2 - first build for fedora 37 and 38 * Wed Feb 24 2016 cyberorg@opensuse.org - update to 0.5.9_bzr0.509 - add support for tightvncviewer as tigervnc lack needed feature https://github.com/TigerVNC/tigervnc/issues/227 - add _service thanks lbsousajr@gmail.com * Thu Oct 1 2015 cyberorg@opensuse.org - Regenerate certificates if it is still old style - Add python-netifaces dep * Wed Sep 30 2015 cyberorg@opensuse.org - Update to bzr revision 436 - Add openssl.cnf to add CommonName, new socat requires it * Thu Sep 24 2015 cyberorg@opensuse.org - use tightvncviewer as other vncviewers are brokenn bnc #939259 * Mon Mar 2 2015 lbsousajr@gmail.com - Fix VNC viewer related requirements from official repositories. Old requirement tightvncviewer is broken since openSUSE 13.2. + For openSUSE 13.2 and newer, now requires package tigervnc. + For openSUSE 13.1, now requires package tightvnc. * Mon Dec 15 2014 lbsousajr@gmail.com - Add new patch to fix epoptes-client's script get-display in openSUSE new contexts: + systemd-logind has replaced ConsoleKit. + XAUTHORITY file may not be found at ~/.Xauthority. GDM/GNOME and KDE store this file in different paths. * Thu Dec 11 2014 lbsousajr@gmail.com - Small changes in file epoptes-client.service: + Don't fail if file /etc/default/epoptes-client can't be read. + Run command "epoptes-client -c" also if certificate file exists, but is empty. * Thu Dec 11 2014 lbsousajr@gmail.com - More improvements on file epoptes-client-enable-wol@.service: + Simplify dependencies. + Don't fail if file /etc/default/epoptes-client can't be read. + Replace /bin/sh invocation with systemd directives. * Wed Dec 10 2014 lbsousajr@gmail.com - Drop epoptes-client if-up.d/if-down.d scripts for openSUSE 13.2+, since its new Wicked network management tool doesn't support starting these scripts. Fortunately, now both Wicked and NetworkManager services trigger network-online.target, so we can just add it as a dependency for epoptes-client.service. This one now must be enabled explicitly (systemctl enable epoptes-client). - For the same reason, we don't build package epoptes-client-nm-dispatcher for openSUSE 13.2+. - epoptes-client-fetch-certificate.service was merged into epoptes-client.service at ExecStartPre level. - epoptes-client-ethtool@.service was enhanced and renamed to epoptes-client-enable-wol@.service. It must be enabled explicitly for openSUSE 13.2+. * Mon Dec 8 2014 lbsousajr@gmail.com - Drop non-systemd init scripts, and fix latest rpmlint warnings. * Mon Jun 9 2014 cyberorg@opensuse.org - update to bzr snapshot, new feature: network benchmark * Thu Dec 19 2013 lbsousajr@gmail.com - Add workaround patch to fix broadcasting problems in multiseat context (LP #978050). + Needed until epoptes-client system daemon can handle properly multiple seats/displays. * Thu Dec 19 2013 lbsousajr@gmail.com - Add patch to keep standalone clients reconnecting to server when connection is lost. LTSP clients are not affected. * Wed Dec 18 2013 lbsousajr@gmail.com - Include ifup scripts by default in package epoptes-client, since it's openSUSE's default network configuration method. - New package epoptes-client-nm-dispatcher includes the other dispatcher scripts for NetworkManager. * Sun Dec 15 2013 lars@linux-schulserver.de - add SuSEfirewall2 file to allow epoptes' port to be opened via YaST SuSEfirewall module * Thu Dec 12 2013 lbsousajr@gmail.com - Add patch to enable shutdown/reboot dbus calls for systemd-logind * Thu Dec 12 2013 lbsousajr@gmail.com - Big cleanup in epoptes.spec + Drop support for Fedora and older versions of [open]SUSE * Thu Dec 12 2013 cyberorg@opensuse.org - add rcepoptes-server for old-school control - add epoptes-debian-only-functions.patch * Tue Dec 10 2013 lbsousajr@gmail.com - Introduce ifup/NetworkManager dispatcher scripts to start epoptes-client*.service when network is online Needed until we get a stable way to enable epoptes-client*.service at boot. It currently fails to wait for network to be online. * Mon Dec 9 2013 lbsousajr@gmail.com - Restore package architecture for SLE_11_SP3 (see also: http://comments.gmane.org/gmane.linux.suse.opensuse.buildservice/9427) - Add "BuildRequires: systemd" when needed * Mon Dec 9 2013 lbsousajr@gmail.com - Package cleanup: + Change package architecture to noarch + Remove uneeded explicit library dependencies + Filter desktopfile-without-binary rpmlint warnings (see also: https://bugzilla.redhat.com/show_bug.cgi?id=991278) * Wed Dec 4 2013 lbsousajr@gmail.com - New upstream version: 0.5.7 * Fri Jul 19 2013 lars@linux-schulserver.de - specfile cleanup - added rpmlintrc * Thu Dec 13 2012 cyberorg@opensuse.org - fix fedora reqs * Sat Aug 25 2012 cyberorg@opensuse.org - Test fedora package * Sat Aug 25 2012 cyberorg@opensuse.org - Initial package for openSUSE