diff --git a/.gitignore b/.gitignore index 3165a23..4a70622 100644 --- a/.gitignore +++ b/.gitignore @@ -65,50 +65,3 @@ wesnoth-1.8.4.tar.bz2 /wesnoth-1.15.16.tar.bz2 /wesnoth-1.15.17.tar.bz2 /wesnoth-1.15.18.tar.bz2 -/wesnoth-1.16.0.tar.bz2 -/wesnoth-1.16.1.tar.bz2 -/wesnoth-1.17.0.tar.bz2 -/wesnoth-1.17.1.tar.bz2 -/wesnoth-1.17.2.tar.bz2 -/wesnoth-1.17.3.tar.bz2 -/wesnoth-1.17.4.tar.bz2 -/wesnoth-1.17.5.tar.bz2 -/wesnoth-1.17.6.tar.bz2 -/wesnoth-1.17.7.tar.bz2 -/wesnoth-1.17.13.tar.bz2 -/wesnoth-1.17.14.tar.bz2 -/wesnoth-1.17.15.tar.bz2 -/wesnoth-1.17.16.tar.bz2 -/wesnoth-1.17.17.tar.bz2 -/wesnoth-1.17.18.tar.bz2 -/wesnoth-1.17.19.tar.bz2 -/wesnoth-1.17.20.tar.bz2 -/wesnoth-1.17.21.tar.bz2 -/wesnoth-1.17.22.tar.bz2 -/wesnoth-1.17.23.tar.bz2 -/wesnoth-1.17.24.tar.bz2 -/wesnoth-1.17.25.tar.bz2 -/wesnoth-1.17.26.tar.bz2 -/wesnoth-1.18.0.tar.bz2 -/wesnoth-1.18.2.tar.bz2 -/wesnoth-1.19.3.tar.bz2 -/wesnoth-1.19.4.tar.bz2 -/wesnoth-1.19.5.tar.bz2 -/wesnoth-1.19.6.tar.bz2 -/wesnoth-1.19.7.tar.bz2 -/wesnoth-1.19.8.tar.bz2 -/wesnoth-1.19.9.tar.bz2 -/wesnoth-1.19.10.tar.bz2 -/wesnoth-1.19.11.tar.bz2 -/wesnoth-1.19.12.tar.bz2 -/wesnoth-1.19.13.tar.bz2 -/wesnoth-1.19.14.tar.bz2 -/wesnoth-1.19.15.tar.bz2 -/wesnoth-1.19.16.tar.bz2 -/wesnoth-1.19.17.tar.bz2 -/wesnoth-1.19.19.tar.bz2 -/wesnoth-1.19.20.tar.bz2 -/wesnoth-1.19.21.tar.bz2 -/wesnoth-1.19.22.tar.bz2 -/wesnoth-1.19.23.tar.bz2 -/wesnoth-1.19.24.tar.bz2 diff --git a/scons-env.patch b/scons-env.patch deleted file mode 100644 index e65f502..0000000 --- a/scons-env.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- SConstruct~ 2022-08-20 19:55:18.000000000 -0500 -+++ SConstruct 2022-08-29 13:05:11.190269320 -0500 -@@ -156,6 +156,8 @@ - if term is not None: - env['ENV']['TERM'] = term - -+env['ENV']['RPM_ARCH'] = os.environ.get('RPM_ARCH') -+ - if env["PLATFORM"] == "win32": - env.Tool("mingw") - else: ---- SConstruct~ 2022-08-29 13:07:36.530924323 -0500 -+++ SConstruct 2022-08-29 13:49:44.704642566 -0500 -@@ -157,6 +157,7 @@ - env['ENV']['TERM'] = term - - env['ENV']['RPM_ARCH'] = os.environ.get('RPM_ARCH') -+env['ENV']['RPM_PACKAGE_RELEASE'] = os.environ.get('RPM_PACKAGE_RELEASE') - - if env["PLATFORM"] == "win32": - env.Tool("mingw") ---- SConstruct~ 2022-08-29 13:51:15.051986273 -0500 -+++ SConstruct 2022-08-29 14:37:04.799779582 -0500 -@@ -158,6 +158,7 @@ - - env['ENV']['RPM_ARCH'] = os.environ.get('RPM_ARCH') - env['ENV']['RPM_PACKAGE_RELEASE'] = os.environ.get('RPM_PACKAGE_RELEASE') -+env['ENV']['RPM_PACKAGE_VERSION'] = os.environ.get('RPM_PACKAGE_VERSION') - - if env["PLATFORM"] == "win32": - env.Tool("mingw") ---- SConstruct~ 2022-08-29 14:38:32.967011222 -0500 -+++ SConstruct 2022-08-29 15:30:25.994786731 -0500 -@@ -159,6 +159,7 @@ - env['ENV']['RPM_ARCH'] = os.environ.get('RPM_ARCH') - env['ENV']['RPM_PACKAGE_RELEASE'] = os.environ.get('RPM_PACKAGE_RELEASE') - env['ENV']['RPM_PACKAGE_VERSION'] = os.environ.get('RPM_PACKAGE_VERSION') -+env['ENV']['RPM_PACKAGE_NAME'] = os.environ.get('RPM_PACKAGE_NAME') - - if env["PLATFORM"] == "win32": - env.Tool("mingw") diff --git a/sources b/sources index 2b95d6c..f504866 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wesnoth-1.19.24.tar.bz2) = c82b65d8ae74156bdf8fbb4ab7bcb7ffda0688d7d4cb5d12177a31f297a116288aae8cdc03abff0de80a1099561019ce44ff33d7f0f75953c23d12da74a7d6fb +SHA512 (wesnoth-1.15.18.tar.bz2) = b8257f4035afaa033837ffdf3db59b2fcb14af6919aed4fede3d2ffbb44a4c6198968d345f0c5f26bfd544b9a1dc8cc7bbfca85a76b0c6f4a8f5a49051b0c262 diff --git a/wesnoth.spec b/wesnoth.spec index cf7cc67..1cce0d5 100644 --- a/wesnoth.spec +++ b/wesnoth.spec @@ -1,14 +1,16 @@ +%global _hardened_build 1 +%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') + Name: wesnoth -Version: 1.19.24 -Release: 5%{?dist} +Version: 1.15.18 +Release: 1%{?dist} Summary: Turn-based strategy game with a fantasy theme -License: GPL-2.0-or-later +License: GPLv2+ URL: http://www.wesnoth.org Source0: http://www.%{name}.org/files/%{name}-%{version}.tar.bz2 Source1: wesnothd.service Source2: %{name}.sysconfig -Patch0: scons-env.patch Requires: wesnoth-data = %{version} BuildRequires: gcc-c++ @@ -20,6 +22,7 @@ BuildRequires: dbus-devel BuildRequires: freetype-devel BuildRequires: libpng-devel BuildRequires: fribidi-devel +BuildRequires: /usr/bin/python BuildRequires: python%{python3_pkgversion}-devel BuildRequires: desktop-file-utils BuildRequires: gettext @@ -30,7 +33,6 @@ BuildRequires: readline-devel BuildRequires: python3-scons BuildRequires: openssl-devel BuildRequires: libvorbis-devel -BuildRequires: libcurl-devel BuildRequires: systemd %description @@ -54,6 +56,10 @@ friends--or strangers--and fight multi-player epic fantasy battles. %package server Summary: %{summary} Requires: %{name} = %{version}-%{release} +Requires(pre): /usr/sbin/useradd +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd %description server This package contains the binaries for running a Wesnoth server @@ -80,13 +86,7 @@ This package contains the data files for Wesnoth. ##%endif %prep -%autosetup -p0 - -# Create a sysusers.d config file. -# Upstream provides a file that we don't like. -cat >wesnoth-server.sysusers.conf < /dev/null || : %post server @@ -168,17 +158,30 @@ install -m0644 -D wesnoth-server.sysusers.conf %{buildroot}%{_sysusersdir}/wesno %{_bindir}/wml* %{python3_sitelib}/wesnoth %{_datadir}/wesnoth/data/tools +# Exclude Python 2 bits until ported, per upstream. +%exclude %{python3_sitelib}/wesnoth/wml* +%exclude %{_datadir}/wesnoth/data/tools/wmlflip +%exclude %{_datadir}/wesnoth/data/tools/scoutDefault.py +%exclude %{_datadir}/wesnoth/data/tools/journeylifter +%exclude %{_datadir}/wesnoth/data/tools/wmlvalidator +%exclude %{_datadir}/wesnoth/data/tools/rmtrans/rmtrans.py +%exclude %{_datadir}/wesnoth/data/tools/wesnoth/wmlparser2.py +%exclude %{_datadir}/wesnoth/data/tools/wesnoth/wmlgrammar.py +%exclude %{_datadir}/wesnoth/data/tools/wesnoth/wmldata.py +%exclude %{_datadir}/wesnoth/data/tools/wesnoth/wmltools.py +%exclude %{_datadir}/wesnoth/data/tools/wesnoth/wmliterator.py +%exclude %{_datadir}/wesnoth/data/tools/wesnoth/wmlparser.py +%exclude %{_datadir}/wesnoth/data/tools/trackplacer +%exclude %{_datadir}/wesnoth/data/tools/expand-terrain-macros.py %files server %config(noreplace) %{_sysconfdir}/sysconfig/wesnoth %{_sbindir}/wesnothd %{_sbindir}/campaignd -%attr(0700,wesnothd,wesnothd) %dir /run/wesnothd/ -%ghost /run/wesnothd/socket +%attr(0700,wesnothd,wesnothd) %dir /var/run/wesnothd/ +%ghost /var/run/wesnothd/socket %{_unitdir}/wesnothd.service -%{_tmpfilesdir}/wesnothd.tmpfiles.conf -%exclude %{_prefix}/lib/sysusers.d/wesnothd.sysusers.conf -%{_sysusersdir}/wesnoth-server.conf +%{_tmpfilesdir}/wesnothd.conf %files data -f LANGFILES %{_datadir}/applications/org.wesnoth.Wesnoth.desktop @@ -190,235 +193,6 @@ install -m0644 -D wesnoth-server.sysusers.conf %{buildroot}%{_sysusersdir}/wesno %{_mandir}/*/man6/wesnoth*.6* %changelog -* Wed Jul 22 2026 Python Maint - 1.19.24-5 -- Rebuilt for Python 3.15.0b4 ABI change - -* Fri Jul 17 2026 Fedora Release Engineering - 1.19.24-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild - -* Sat Jun 13 2026 Yaakov Selkowitz - 1.19.24-3 -- Rebuilt for openssl 4.0 - -* Thu Jun 04 2026 Python Maint - 1.19.24-2 -- Rebuilt for Python 3.15 - -* Thu May 21 2026 Gwyn Ciesla - 1.19.24-1 -- 1.19.24 - -* Thu Apr 23 2026 Gwyn Ciesla - 1.19.23-1 -- 1.19.23 - -* Tue Mar 24 2026 Gwyn Ciesla - 1.19.22-1 -- 1.19.22 - -* Thu Feb 26 2026 Gwyn Ciesla - 1.19.21-1 -- 1.19.21 - -* Wed Jan 21 2026 Gwyn Ciesla - 1.19.20-1 -- 1.19.20 - -* Sat Jan 17 2026 Fedora Release Engineering - 1.19.19-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Thu Jan 15 2026 Gwyn Ciesla - 1.19.19-2 -- Patch for Boost 1.90.0 - -* Fri Jan 02 2026 Gwyn Ciesla - 1.19.19-1 -- 1.19.19 - -* Tue Oct 21 2025 Gwyn Ciesla - 1.19.17-1 -- 1.19.17 - -* Mon Sep 22 2025 Gwyn Ciesla - 1.19.16-1 -- 1.19.16 - -* Fri Sep 19 2025 Python Maint - 1.19.15-2 -- Rebuilt for Python 3.14.0rc3 bytecode - -* Tue Aug 19 2025 Gwyn Ciesla - 1.19.15-1 -- 1.19.15 - -* Fri Aug 15 2025 Python Maint - 1.19.14-3 -- Rebuilt for Python 3.14.0rc2 bytecode - -* Fri Jul 25 2025 Fedora Release Engineering - 1.19.14-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Mon Jul 21 2025 Gwyn Ciesla - 1.19.14-1 -- 1.19.14 - -* Mon Jun 16 2025 Gwyn Ciesla - 1.19.13-1 -- 1.19.13 - -* Tue Jun 03 2025 Python Maint - 1.19.12-2 -- Rebuilt for Python 3.14 - -* Wed May 21 2025 Gwyn Ciesla - 1.19.12-1 -- 1.19.12 - -* Tue May 06 2025 Gwyn Ciesla - 1.19.11-1 -- 1.19.11 - -* Mon Mar 17 2025 Gwyn Ciesla - 1.19.10-1 -- 1.19.10 - -* Mon Mar 10 2025 Zbigniew Jędrzejewski-Szmek - 1.19.9-2 -- Add sysusers.d config file to allow rpm to create users/groups automatically - -* Tue Feb 18 2025 Gwyn Ciesla - 1.19.9-1 -- 1.19.9 - -* Thu Jan 23 2025 Gwyn Ciesla - 1.19.8-1 -- 1.19.8 - -* Sun Jan 19 2025 Fedora Release Engineering - 1.19.7-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Thu Dec 19 2024 Gwyn Ciesla - 1.19.7-1 -- 1.19.7 - -* Tue Nov 26 2024 Gwyn Ciesla - 1.19.6-1 -- 1.19.6 - -* Wed Oct 23 2024 Gwyn Ciesla - 1.19.5-1 -- 1.19.5 - -* Mon Sep 23 2024 Gwyn Ciesla - 1.19.4-1 -- 1.19.4 - -* Fri Aug 23 2024 Gwyn Ciesla - 1.19.3-1 -- 1.19.3 - -* Wed Jul 31 2024 Gwyn Ciesla - 1.18.2-1 -- 1.18.2 - -* Sat Jul 20 2024 Fedora Release Engineering - 1.18.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Tue Jul 09 2024 Zbigniew Jędrzejewski-Szmek - 1.18.0-3 -- Rebuilt for the bin-sbin merge - -* Sat Jun 08 2024 Python Maint - 1.18.0-2 -- Rebuilt for Python 3.13 - -* Mon Mar 18 2024 Gwyn Ciesla - 1.18.0-1 -- 1.18.0 - -* Wed Feb 21 2024 Gwyn Ciesla - 1.17.26-1 -- 1.17.26 - -* Mon Jan 22 2024 Gwyn Ciesla - 1.17.25-1 -- 1.17.25 - -* Thu Jan 18 2024 Jonathan Wakely - 1.17.24-2 -- Rebuilt for Boost 1.83 - -* Mon Dec 18 2023 Gwyn Ciesla - 1.17.24-1 -- 1.17.24 - -* Tue Nov 28 2023 Gwyn Ciesla - 1.17.23-1 -- 1.17.23 - -* Wed Oct 18 2023 Gwyn Ciesla - 1.17.22-1 -- 1.17.22 - -* Tue Sep 19 2023 Gwyn Ciesla - 1.17.21-1 -- 1.17.21 - -* Wed Aug 23 2023 Gwyn Ciesla - 1.17.20-1 -- 1.17.20 - -* Sat Jul 22 2023 Fedora Release Engineering - 1.17.19-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Mon Jul 17 2023 Gwyn Ciesla - 1.17.19-1 -- 1.17.19 - -* Mon Jun 26 2023 Python Maint - 1.17.18-2 -- Rebuilt for Python 3.12 - -* Tue Jun 20 2023 Gwyn Ciesla - 1.17.18-1 -- 1.17.18 - -* Wed Jun 14 2023 Python Maint - 1.17.17-3 -- Rebuilt for Python 3.12 - -* Thu May 25 2023 Gwyn Ciesla - 1.17.17-2 -- Workaround for BZ 1981728. - -* Mon May 22 2023 Gwyn Ciesla - 1.17.17-1 -- 1.17.17 - -* Mon Apr 24 2023 Gwyn Ciesla - 1.17.16-1 -- 1.17.16 - -* Mon Apr 17 2023 Gwyn Ciesla - 1.17.15-1 -- 1.17.15 - -* Mon Mar 20 2023 Gwyn Ciesla - 1.17.14-1 -- 1.17.14 - -* Fri Mar 03 2023 Gwyn Ciesla - 1.17.13-3 -- migrated to SPDX license - -* Thu Feb 23 2023 Kalev Lember - 1.17.13-2 -- Rebuilt for Boost 1.81 - -* Tue Feb 21 2023 Gwyn Ciesla - 1.17.13-1 -- 1.17.13 - -* Mon Feb 20 2023 Jonathan Wakely - 1.17.7-3 -- Rebuilt for Boost 1.81 - -* Sat Jan 21 2023 Fedora Release Engineering - 1.17.7-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Mon Aug 22 2022 Gwyn Ciesla - 1.17.7-1 -- 1.17.7 - -* Sat Jul 23 2022 Fedora Release Engineering - 1.17.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jul 20 2022 Gwyn Ciesla - 1.17.6-1 -- 1.17.6 - -* Tue Jun 21 2022 Gwyn Ciesla - 1.17.5-1 -- 1.17.5 - -* Mon Jun 13 2022 Python Maint - 1.17.4-2 -- Rebuilt for Python 3.11 - -* Mon May 16 2022 Gwyn Ciesla - 1.17.4-1 -- 1.17.4 - -* Wed May 04 2022 Thomas Rodgers - 1.17.3-2 -- Rebuilt for Boost 1.78 - -* Mon Apr 18 2022 Gwyn Ciesla - 1.17.3-1 -- 1.17.3 - -* Mon Mar 21 2022 Gwyn Ciesla - 1.17.2-1 -- 1.17.2 - -* Tue Feb 22 2022 Gwyn Ciesla - 1.17.1-1 -- 1.17.1 - -* Sat Jan 22 2022 Fedora Release Engineering - 1.17.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Tue Jan 18 2022 Gwyn Ciesla - 1.17.0-1 -- 1.17.0 - -* Tue Nov 09 2021 Gwyn Ciesla - 1.16.1-1 -- 1.16.1 - -* Fri Oct 29 2021 Kalev Lember - 1.16.0-2 -- Remove Python 2 workarounds as everything has been ported to Python 3 -- Drop post/preun/postun requires on systemd - -* Sun Oct 24 2021 Gwyn Ciesla - 1.16.0-1 -- 1.16.0 - * Mon Sep 27 2021 Gwyn Ciesla - 1.15.18-1 - 1.15.18 diff --git a/wesnothd.init b/wesnothd.init new file mode 100755 index 0000000..a644e5d --- /dev/null +++ b/wesnothd.init @@ -0,0 +1,106 @@ +#!/bin/sh +# +# wesnothd This shell script takes care of starting and stopping +# the Wesnoth game server. +# +# chkconfig: - 15 85 +# description: The Wesnoth server supports playing networked \ +# multi-player games. +# processname: wesnothd +# config: /etc/sysconfig/wesnothd +# pidfile: /var/run/wesnothd.pid + +### BEGIN INIT INFO +# Provides: lsb-wesnothd +# Required-Start: $local_fs $network $remote_fs +# Required-Stop: $local_fs $network $remote_fs +# Default-Start: +# Default-Stop: 0 1 6 +# Short-Description: start and stop Wesnoth server +# Description: wesnothd enables hosting online Wesnoth games +### END INIT INFO + + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ "$NETWORKING" = "no" ] && exit 0 + +exec="/usr/sbin/wesnothd" +prog=$(basename $exec) +pidfile=/var/run/$prog.pid +socketfile=/var/run/wesnothd/socket + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + +start() { + echo -n $"Starting Wesnoth game server: " + if [ -n "`/sbin/pidof $prog`" ]; then + echo -n $"$prog already running" + failure + echo + return 1 + fi + [ -p $socketfile ] && rm -f $socketfile + daemon --user wesnothd $exec --daemon $WESNOTHD_OPTIONS >/dev/null 2>&1 + retval=$? + if [ $retval -eq 0 ]; then + success + touch $lockfile + pidofproc $prog > $pidfile + else + failure + fi + echo + return $retval +} + +stop() { + echo -n $"Stopping Wesnoth game server: " + killproc $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +fdr_status() { + status $prog +} + +case "$1" in + start|stop|restart|reload) + $1 + ;; + force-reload) + force_reload + ;; + status) + fdr_status + ;; + condrestart|try-restart) + [ ! -f $lockfile ] || restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}" + exit 2 +esac