diff --git a/crossfire-c99.patch b/crossfire-c99.patch new file mode 100644 index 0000000..2978abd --- /dev/null +++ b/crossfire-c99.patch @@ -0,0 +1,27 @@ +Declare make_perma_dead and unmake_perma_dead in a shared header file, +so that they can be called from server/resurrection.c without an +implicit function declaration. This improves compatibility with +future compilers. + +Fixed upstream via: + +commit 0980e69c30ce0b04cc33d24daa9917c2ee9be665 +Author: partmedia +Date: Sun Apr 13 17:27:41 2014 +0000 + + Add missing prototypes for permadeath functions. + + git-svn-id: svn://svn.code.sf.net/p/crossfire/code/server/trunk@19336 282e97 +7c-c81d-0410-88c4-b93c2d0d6712 + +diff -ur crossfire-server-1.71.0.orig/include/account_char.h crossfire-server-1.71.0/include/account_char.h +--- crossfire-server-1.71.0.orig/include/account_char.h 2014-04-06 00:30:40.000000000 +0200 ++++ crossfire-server-1.71.0/include/account_char.h 2023-01-03 16:54:56.152855130 +0100 +@@ -36,4 +36,7 @@ + struct account_char_struct *next; + } Account_Char; + ++int make_perma_dead(object *op); ++int unmake_perma_dead(char *account, char *player); ++ + #endif /* OBJECT_H */ diff --git a/crossfire.spec b/crossfire.spec index 6b1885c..4df5165 100644 --- a/crossfire.spec +++ b/crossfire.spec @@ -9,12 +9,12 @@ Name: crossfire Version: 1.71.0 -Release: 8%{?dist} +Release: 33%{?dist} Summary: Server for hosting crossfire games -Group: Amusements/Games # All files GPLv2+ except server/daemon.c which also has MIT attributions -License: GPLv2+ and MIT +License: GPL-2.0-or-later and MIT URL: http://crossfire.real-time.com + Source0: http://downloads.sourceforge.net/crossfire/%{name}-%{version}.tar.bz2 Source1: http://downloads.sourceforge.net/crossfire/%{name}-%{version}.arch.tar.bz2 Source2: crossfire.service @@ -29,25 +29,24 @@ Source10: logwatch.serviceconf.crossfire #Patch0: crossfire-1.10.0-log-login.patch #Patch1: crossfire-1.11.0-curl.patch Patch2: crossfire-1.71.0-snprintf-formatting.patch +Patch3: crossfire-c99.patch Requires: crossfire-maps BuildRequires: gcc BuildRequires: checkpolicy perl-generators selinux-policy-devel hardlink BuildRequires: libXt-devel BuildRequires: libXext-devel BuildRequires: libXaw-devel -BuildRequires: python2-devel +BuildRequires: perl(FileHandle) +BuildRequires: python3-devel BuildRequires: autoconf flex +BuildRequires: systemd-rpm-macros +BuildRequires: make +BuildRequires: libxcrypt-devel Requires: %{name}-plugins -#Requires(post): /sbin/chkconfig -#Requires(post): /sbin/service -#Requires(preun): /sbin/chkconfig -#Requires(preun): /sbin/service -#Requires(postun): /sbin/service -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units -Requires(post): systemd-sysv +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd Provides: crossfire-devel = %{version}-%{release} Obsoletes: crossfire-devel < %{version}-%{release} @@ -61,7 +60,6 @@ public or private network. %package doc Summary: Documentation files for Crossfire -Group: Documentation # Don't require the base package. The docs can be used without the # base package, and in fact include docs for both the client and # server packages. @@ -70,21 +68,18 @@ Documentation files for the crossfire game. #%package devel #Summary: Development files for writing crossfire plugins -#Group: Development/Libraries #Requires: %%{name} = %%{version}-%%{release} #%description devel #Development files for writing crossfire plugins. %package plugins Summary: Plugin modules for the crossfire game server -Group: Amusements/Games Requires: %{name} = %{version}-%{release} %description plugins Plugin modules for the crossfire game server. %package client-images Summary: Image cache for crossfire clients -Group: Amusements/Games # No version dependency for the client since the images are pretty # ignorant of the client version. Requires: crossfire-client @@ -94,18 +89,16 @@ don't have to be downloaded from the server. %package selinux Summary: SELinux policy files for crossfire -Group: Amusements/Games Requires: %{name} = %{version}-%{release} Requires: selinux-policy >= %{selinux_policyver} Requires(post): /usr/sbin/semodule /usr/sbin/semanage /sbin/fixfiles -Requires(preun): /sbin/service /usr/sbin/semodule /usr/sbin/semanage /sbin/fixfiles +Requires(preun): /usr/sbin/semodule /usr/sbin/semanage /sbin/fixfiles Requires(postun): /usr/sbin/semodule %description selinux selinux policy files for the Crossfire game server %package logwatch Summary: logwatch scripts for the Crossfire game server -Group: Amusements/Games Requires: %{name} = %{version}-%{release} logwatch %description logwatch logwatch scripts for the Crossfire game server @@ -115,21 +108,27 @@ logwatch scripts for the Crossfire game server %setup -q -a 1 -n crossfire-server-%{version} #%%patch0 -p0 #%patch1 -p0 -%patch2 -p0 +%patch -P2 -p0 +%patch -P3 -p1 mkdir SELinux cp %{SOURCE5} %{SOURCE6} %{SOURCE7} SELinux mv arch/ lib/ -%{__sed} -i 's#\r##' utils/player_dl.pl.in +sed -i 's#\r##' utils/player_dl.pl.in # Don't use a hardcoded /tmp directory for building the image archive -%{__sed} -i "s#^\$TMPDIR=.*#\$TMPDIR=\"`pwd`\";#" lib/adm/collect_images.pl +sed -i "s#^\$TMPDIR=.*#\$TMPDIR=\"`pwd`\";#" lib/adm/collect_images.pl # Don't map stdio streams to / # This is fixed in CVS, but didn't make it into the 1.9.1 release. -%{__sed} -i 's# (void) open ("/", O_RDONLY);# (void) open ("/var/log/crossfire/crossfire.log", O_RDONLY);#' server/daemon.c +sed -i 's# (void) open ("/", O_RDONLY);# (void) open ("/var/log/crossfire/crossfire.log", O_RDONLY);#' server/daemon.c # Change the location of the tmp directory -%{__sed} -i "s@^#define TMPDIR \"/tmp\"@#define TMPDIR \"%{_var}/games/%{name}/tmp\"@" include/config.h +sed -i "s@^#define TMPDIR \"/tmp\"@#define TMPDIR \"%{_var}/games/%{name}/tmp\"@" include/config.h + +# Create a sysusers.d config file +cat >crossfire.sysusers.conf </dev/null || groupadd -r crossfire -getent passwd crossfire >/dev/null || \ -useradd -r -g crossfire -d %{_datadir}/%{name} -s /sbin/nologin \ - -c "Daemon account for the crossfire server" crossfire -exit 0 %post -#/sbin/chkconfig --add crossfire if [ $1 -eq 1 ] ; then # Initial installation /bin/systemctl daemon-reload >/dev/null 2>&1 || : @@ -254,10 +246,6 @@ done /sbin/service %{name} condrestart > /dev/null 2>&1 || : %preun -#if [ "$1" -le "0" ]; then -# /sbin/service crossfire stop > /dev/null 2>&1 -# /sbin/chkconfig --del crossfire -#fi if [ $1 -eq 0 ] ; then # Package removal, not upgrade /bin/systemctl --no-reload disable crossfire.service > /dev/null 2>&1 || : @@ -267,8 +255,6 @@ fi %preun selinux if [ "$1" -lt "1" ] ; then - # Disable the policy and restart the daemon - /sbin/service %{name} condrestart > /dev/null 2>&1 || : # Unload the module /usr/sbin/semanage port -d -t %{name}_port_t -p tcp 13327 >/dev/null 2>&1 || : for variant in %{selinux_variants} ; do @@ -298,20 +284,11 @@ if [ "$1" -ge "1" ] ; then done fi -%triggerun -- crossfire < 1.60.0-2 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply crossfire -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save crossfire >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del crossfire >/dev/null 2>&1 || : -/bin/systemctl try-restart crossfire.service >/dev/null 2>&1 || : - - %files +%license COPYING +%doc README NEWS AUTHORS #%%{_bindir}/crossedit #%%{_bindir}/crossfire %{_bindir}/crossfire-server @@ -336,9 +313,8 @@ fi %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %{_mandir}/man6/* -#%%{_initrddir}/%%{name} %{_unitdir}/%{name}.service -%doc README NEWS AUTHORS COPYING +%{_sysusersdir}/crossfire.conf %files doc %doc doc/Developers doc/playbook* doc/scripts doc/spell-docs doc/spoiler doc/spoiler-html doc/*.txt @@ -365,6 +341,81 @@ fi %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 1.71.0-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 1.71.0-32 +- Add sysusers.d config file to allow rpm to create users/groups automatically + +* Sat Feb 01 2025 Björn Esser - 1.71.0-31 +- Add explicit BR: libxcrypt-devel + +* Thu Jan 16 2025 Fedora Release Engineering - 1.71.0-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Jul 17 2024 Fedora Release Engineering - 1.71.0-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jan 24 2024 Fedora Release Engineering - 1.71.0-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 1.71.0-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jul 19 2023 Fedora Release Engineering - 1.71.0-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Mar 01 2023 Gwyn Ciesla = 1.71.0-25 +- migrated to SPDX license + +* Thu Jan 19 2023 Fedora Release Engineering - 1.71.0-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Jan 03 2023 Florian Weimer - 1.71.0-23 +- C99 compatibility fix + +* Wed Jul 20 2022 Fedora Release Engineering - 1.71.0-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 1.71.0-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 1.71.0-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 1.71.0-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 1.71.0-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Apr 01 2020 Jitka Plesnikova - 1.71.0-17 +- Add perl(FileHandle) for build + +* Tue Jan 28 2020 Fedora Release Engineering - 1.71.0-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Aug 15 2019 Gwyn Ciesla - 1.71.0-15 +- Fix FTBTS + +* Tue Aug 06 2019 Gwyn Ciesla - 1.71.0-14 +- Python 3. + +* Wed Jul 24 2019 Fedora Release Engineering - 1.71.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Jun 19 2019 Gwyn Ciesla - 1.71.0-12 +- Fix FTBFS due to hardlink path. + +* Wed Mar 20 2019 Peter Robinson - 1.71.0-11 +- Drop legacy bits, use %%license + +* Thu Jan 31 2019 Fedora Release Engineering - 1.71.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jan 14 2019 Björn Esser - 1.71.0-9 +- Rebuilt for libcrypt.so.2 (#1666033) + * Thu Jul 12 2018 Fedora Release Engineering - 1.71.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild