binary patching support
This commit is contained in:
parent
b660c5f1b0
commit
7a3eb21954
@ -43,6 +43,7 @@ DATADIR = $(DESTDIR)$(PREFIX)/share
|
|||||||
SCRIPTDIR = $(DATADIR)/$(NAME)
|
SCRIPTDIR = $(DATADIR)/$(NAME)
|
||||||
SCRIPTGRPDIR = $(SCRIPTDIR)/cmdgrp
|
SCRIPTGRPDIR = $(SCRIPTDIR)/cmdgrp
|
||||||
SCRIPTLIBDIR = $(SCRIPTDIR)/lib
|
SCRIPTLIBDIR = $(SCRIPTDIR)/lib
|
||||||
|
SCRIPTPATCHDIR = $(SCRIPTDIR)/patch
|
||||||
LICENSEDIR = $(DATADIR)/licenses/$(NAME)
|
LICENSEDIR = $(DATADIR)/licenses/$(NAME)
|
||||||
KF2MAINDIR = $(GAMEDIR)/$(NAME)
|
KF2MAINDIR = $(GAMEDIR)/$(NAME)
|
||||||
KF2BETADIR = $(GAMEDIR)/$(NAME)-beta
|
KF2BETADIR = $(GAMEDIR)/$(NAME)-beta
|
||||||
@ -87,6 +88,7 @@ filesystem:
|
|||||||
test -d '$(RSYSLOGDIR)' || install -m 755 -d '$(RSYSLOGDIR)'
|
test -d '$(RSYSLOGDIR)' || install -m 755 -d '$(RSYSLOGDIR)'
|
||||||
test -d '$(SCRIPTGRPDIR)' || install -m 755 -d '$(SCRIPTGRPDIR)'
|
test -d '$(SCRIPTGRPDIR)' || install -m 755 -d '$(SCRIPTGRPDIR)'
|
||||||
test -d '$(SCRIPTLIBDIR)' || install -m 755 -d '$(SCRIPTLIBDIR)'
|
test -d '$(SCRIPTLIBDIR)' || install -m 755 -d '$(SCRIPTLIBDIR)'
|
||||||
|
test -d '$(SCRIPTPATCHDIR)' || install -m 755 -d '$(SCRIPTPATCHDIR)'
|
||||||
test -d '$(BASHCOMPDIR)' || install -m 755 -d '$(BASHCOMPDIR)'
|
test -d '$(BASHCOMPDIR)' || install -m 755 -d '$(BASHCOMPDIR)'
|
||||||
|
|
||||||
install: filesystem build
|
install: filesystem build
|
||||||
|
@ -25,6 +25,7 @@ readonly ScriptVersion=$(rpm -q --queryformat '%{VERSION}' "$ScriptName")
|
|||||||
|
|
||||||
readonly GrpDir=":DEFINE_PREFIX:/share/kf2-srv/cmdgrp"
|
readonly GrpDir=":DEFINE_PREFIX:/share/kf2-srv/cmdgrp"
|
||||||
readonly LibDir=":DEFINE_PREFIX:/share/kf2-srv/lib"
|
readonly LibDir=":DEFINE_PREFIX:/share/kf2-srv/lib"
|
||||||
|
readonly PatchDir=":DEFINE_PREFIX:/share/kf2-srv/patch"
|
||||||
|
|
||||||
readonly InstallDir=":DEFINE_PREFIX:/games/kf2-srv${KF2POSTFIX}"
|
readonly InstallDir=":DEFINE_PREFIX:/games/kf2-srv${KF2POSTFIX}"
|
||||||
readonly AppBin="$InstallDir/Binaries/Win64/KFGameSteamServer.bin.x86_64"
|
readonly AppBin="$InstallDir/Binaries/Win64/KFGameSteamServer.bin.x86_64"
|
||||||
|
@ -60,6 +60,7 @@ function game_update ()
|
|||||||
elif updates_aviable; then
|
elif updates_aviable; then
|
||||||
instance_stop
|
instance_stop
|
||||||
steamcmd +login $SteamLogin +force_install_dir $InstallDir +app_update $AppServerNum $BetaArg +exit
|
steamcmd +login $SteamLogin +force_install_dir $InstallDir +app_update $AppServerNum $BetaArg +exit
|
||||||
|
apply_patch
|
||||||
instance_start
|
instance_start
|
||||||
else
|
else
|
||||||
echo "Server is up to date"
|
echo "Server is up to date"
|
||||||
@ -96,6 +97,7 @@ function game_validate ()
|
|||||||
fi
|
fi
|
||||||
instance_stop
|
instance_stop
|
||||||
steamcmd +login $SteamLogin +force_install_dir $InstallDir +app_update $AppServerNum $BetaArg validate +exit
|
steamcmd +login $SteamLogin +force_install_dir $InstallDir +app_update $AppServerNum $BetaArg validate +exit
|
||||||
|
apply_patch
|
||||||
fix_steamclient_so
|
fix_steamclient_so
|
||||||
instance_start
|
instance_start
|
||||||
}
|
}
|
||||||
@ -200,6 +202,7 @@ function first_install ()
|
|||||||
fix_steamclient_so
|
fix_steamclient_so
|
||||||
ln -s "$InstanceConfigDir" "$DefaultConfigDir/instances"
|
ln -s "$InstanceConfigDir" "$DefaultConfigDir/instances"
|
||||||
make_default_instance
|
make_default_instance
|
||||||
|
apply_patch
|
||||||
echo "KF2 succesfully installed"
|
echo "KF2 succesfully installed"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -275,6 +278,13 @@ function make_default_instance () # $1: Dir
|
|||||||
fix_ini_eol "$InstanceDir"
|
fix_ini_eol "$InstanceDir"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function apply_patch ()
|
||||||
|
{
|
||||||
|
if [[ -x "$PatchDir/kf2-ranked-patch" ]]; then
|
||||||
|
"$PatchDir/kf2-ranked-patch" "$AppBin"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function fix_ini_eol () # $1: Dir
|
function fix_ini_eol () # $1: Dir
|
||||||
{
|
{
|
||||||
find "$1" \( -type l -o -type f \) -name '*.ini' | \
|
find "$1" \( -type l -o -type f \) -name '*.ini' | \
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Killing Floor 2 Beta Server Daemon - %i
|
Description=Killing Floor 2 Beta Server Daemon - %i
|
||||||
After=kf2-srv-force-attr.service
|
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
|
|
||||||
@ -13,7 +12,7 @@ StandardError=syslog
|
|||||||
SyslogIdentifier=kf2-srv-beta/%i
|
SyslogIdentifier=kf2-srv-beta/%i
|
||||||
EnvironmentFile=/etc/kf2-srv/instances-beta/%i/instance.conf
|
EnvironmentFile=/etc/kf2-srv/instances-beta/%i/instance.conf
|
||||||
ExecStart=:DEFINE_PREFIX:/games/kf2-srv-beta/Binaries/Win64/KFGameSteamServer.bin.x86_64 ${Map}?Difficulty=${Difficulty}?GameLength=${Length}?Game=${Game}?Mutator=${Mutators}?${Args} configsubdir=instances/%i -webadminport=${PortWeb} -queryport=${PortQuery} -port=${PortGame}
|
ExecStart=:DEFINE_PREFIX:/games/kf2-srv-beta/Binaries/Win64/KFGameSteamServer.bin.x86_64 ${Map}?Difficulty=${Difficulty}?GameLength=${Length}?Game=${Game}?Mutator=${Mutators}?${Args} configsubdir=instances/%i -webadminport=${PortWeb} -queryport=${PortQuery} -port=${PortGame}
|
||||||
Restart=always
|
Restart=on-failure
|
||||||
|
|
||||||
NoNewPrivileges=yes
|
NoNewPrivileges=yes
|
||||||
PrivateTmp=true
|
PrivateTmp=true
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Killing Floor 2 Server Daemon - %i
|
Description=Killing Floor 2 Server Daemon - %i
|
||||||
After=kf2-srv-force-attr.service
|
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
|
|
||||||
@ -13,7 +12,7 @@ StandardError=syslog
|
|||||||
SyslogIdentifier=kf2-srv/%i
|
SyslogIdentifier=kf2-srv/%i
|
||||||
EnvironmentFile=/etc/kf2-srv/instances/%i/instance.conf
|
EnvironmentFile=/etc/kf2-srv/instances/%i/instance.conf
|
||||||
ExecStart=:DEFINE_PREFIX:/games/kf2-srv/Binaries/Win64/KFGameSteamServer.bin.x86_64 ${Map}?Difficulty=${Difficulty}?GameLength=${Length}?Game=${Game}?Mutator=${Mutators}?${Args} configsubdir=instances/%i -webadminport=${PortWeb} -queryport=${PortQuery} -port=${PortGame}
|
ExecStart=:DEFINE_PREFIX:/games/kf2-srv/Binaries/Win64/KFGameSteamServer.bin.x86_64 ${Map}?Difficulty=${Difficulty}?GameLength=${Length}?Game=${Game}?Mutator=${Mutators}?${Args} configsubdir=instances/%i -webadminport=${PortWeb} -queryport=${PortQuery} -port=${PortGame}
|
||||||
Restart=always
|
Restart=on-failure
|
||||||
|
|
||||||
NoNewPrivileges=yes
|
NoNewPrivileges=yes
|
||||||
PrivateTmp=true
|
PrivateTmp=true
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
%global steamuser steam
|
%global steamuser steam
|
||||||
|
|
||||||
Name: kf2-srv
|
Name: kf2-srv
|
||||||
Version: 0.16.0
|
Version: 0.17.0
|
||||||
Release: 1%{dist}
|
Release: 1%{dist}
|
||||||
Summary: Killing Floor 2 server
|
Summary: Killing Floor 2 server
|
||||||
Group: Amusements/Games
|
Group: Amusements/Games
|
||||||
@ -68,6 +68,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%attr(0775,root,root) %dir %{_datadir}/%{name}/cmdgrp
|
%attr(0775,root,root) %dir %{_datadir}/%{name}/cmdgrp
|
||||||
%attr(0755,root,root) %dir %{_datadir}/%{name}/cmdgrp/*
|
%attr(0755,root,root) %dir %{_datadir}/%{name}/cmdgrp/*
|
||||||
%attr(0775,root,root) %dir %{_datadir}/%{name}/lib
|
%attr(0775,root,root) %dir %{_datadir}/%{name}/lib
|
||||||
|
%attr(0775,root,root) %dir %{_datadir}/%{name}/patch
|
||||||
%attr(0664,root,%{steamuser}) %config(noreplace) %{_sysconfdir}/%{name}/instance.conf.template
|
%attr(0664,root,%{steamuser}) %config(noreplace) %{_sysconfdir}/%{name}/instance.conf.template
|
||||||
%attr(0664,root,%{steamuser}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
|
%attr(0664,root,%{steamuser}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
|
||||||
%attr(0640,root,%{steamuser}) %config(noreplace) %{_sysconfdir}/%{name}/bot.conf
|
%attr(0640,root,%{steamuser}) %config(noreplace) %{_sysconfdir}/%{name}/bot.conf
|
||||||
@ -100,6 +101,9 @@ if [[ $1 == 1 ]]; then # Install
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Feb 21 2021 GenZmeY <genzmey@gmail.com> - 0.17.0-1
|
||||||
|
- Binary patching support.
|
||||||
|
|
||||||
* Mon Sep 21 2020 GenZmeY <genzmey@gmail.com> - 0.16.0-1
|
* Mon Sep 21 2020 GenZmeY <genzmey@gmail.com> - 0.16.0-1
|
||||||
- remove force-attr daemon;
|
- remove force-attr daemon;
|
||||||
- log cmg group;
|
- log cmg group;
|
||||||
|
Loading…
Reference in New Issue
Block a user