Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-server/ut2004-ded/, games-server/ut2004-ded/files/
Date: Fri, 27 Dec 2019 00:26:20
Message-Id: 1577406353.8901773bdbd36ccf9157642a98e5f39fd0245e54.chewi@gentoo
1 commit: 8901773bdbd36ccf9157642a98e5f39fd0245e54
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 27 00:19:18 2019 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 27 00:25:53 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8901773b
7
8 Revert "games-server/ut2004-ded: drop vulnerable package"
9
10 This reverts commit 5e1e96c14effb4f076191f9d8023547cb7e15ff4.
11
12 This package was dropped because of CVE-2008-6441 and
13 CVE-2008-7011. However, UT2004 was reported to *not* be vulnerable to
14 the former and the latter was almost certainly fixed in 3369.3. I
15 cannot find any release notes but the published workaround related to
16 3369.2 and 3369.3 was built just three days after the vulnerability
17 was announced.
18
19 Bug: https://bugs.gentoo.org/285010
20 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
21
22 games-server/ut2004-ded/Manifest | 3 +
23 games-server/ut2004-ded/files/ut2004-ded.confd | 6 ++
24 games-server/ut2004-ded/files/ut2004-ded.initd | 13 ++++
25 games-server/ut2004-ded/metadata.xml | 11 +++
26 .../ut2004-ded/ut2004-ded-3369.3-r2.ebuild | 88 ++++++++++++++++++++++
27 5 files changed, 121 insertions(+)
28
29 diff --git a/games-server/ut2004-ded/Manifest b/games-server/ut2004-ded/Manifest
30 new file mode 100644
31 index 00000000000..7be18ac0efa
32 --- /dev/null
33 +++ b/games-server/ut2004-ded/Manifest
34 @@ -0,0 +1,3 @@
35 +DIST dedicatedserver3339-bonuspack.zip 914213907 BLAKE2B 883253d9817b4ee7f9594bf611e9d440d7e90c8cd43d34b366cfb4e781d4ad78e2812a0aa4f5acaed4880b1bc47f0dffed6fbb0caf9cc53477c01bc92d891325 SHA512 353161a7c811ac5c688c6438e3ecfad1aa37bcfd13a3e17f2a9deaf510eda9311a423524bd4635fcf972001cfe24c1a1b71a2bb6a060c37a24351f3bce0c7f26
36 +DIST ut2004-lnxpatch3369-2.tar.bz2 22465217 BLAKE2B 9852f9d55804b7f2927a31be86aee1552aaebeb38d2a40fb206154c236e9d6eff47f7594024c0d9b25c7216d3ca62571b1f89f23f72ee9e135b2e6451bcb006a SHA512 0d6f26d5a811efd64be8c304e928e03f546d9a8eaba6b074843e2b7e76e0670b39df95200a2fe2040d72bbd204c7157ed0115649a5c85396a76d9e0b7ec284b1
37 +DIST ut2004-v3369-3-linux-dedicated.7z 5013927 BLAKE2B 72d24d7bc37c777f3697b767a03e052ad9b547005dd6da73833e439496e87a9c1ebbe01f88d62b29a41b2bf6380a3b3bd745e6883fbb6d0f2b7e52998d4af276 SHA512 3b2a7b64934a3647c02c9fec48565c5c2c35370d635b2af4059eb76587bfa13f46e6a4e14fdb0494ba7a4182497ed5963601986f4fcfa318e69a8a8a8c0178cf
38
39 diff --git a/games-server/ut2004-ded/files/ut2004-ded.confd b/games-server/ut2004-ded/files/ut2004-ded.confd
40 new file mode 100644
41 index 00000000000..e82238b93de
42 --- /dev/null
43 +++ b/games-server/ut2004-ded/files/ut2004-ded.confd
44 @@ -0,0 +1,6 @@
45 +# User and group the server should run as.
46 +ut2004_ded_user="nobody"
47 +ut2004_ded_group="nobody"
48 +
49 +# Any extra options you want to pass to the server.
50 +ut2004_ded_opts="DM-Deck17"
51
52 diff --git a/games-server/ut2004-ded/files/ut2004-ded.initd b/games-server/ut2004-ded/files/ut2004-ded.initd
53 new file mode 100644
54 index 00000000000..c4cf9810cd1
55 --- /dev/null
56 +++ b/games-server/ut2004-ded/files/ut2004-ded.initd
57 @@ -0,0 +1,13 @@
58 +#!/sbin/openrc-run
59 +# Copyright 1999-2019 Gentoo Authors
60 +# Distributed under the terms of the GNU General Public License v2
61 +
62 +pidfile="/var/run/${RC_SVCNAME}.pid"
63 +command_background="true"
64 +command_user="${ut2004_ded_user}:${ut2004_ded_group}"
65 +command="ut2004-ded"
66 +command_args="${ut2004_ded_opts}"
67 +
68 +depend() {
69 + need net
70 +}
71
72 diff --git a/games-server/ut2004-ded/metadata.xml b/games-server/ut2004-ded/metadata.xml
73 new file mode 100644
74 index 00000000000..6c721750729
75 --- /dev/null
76 +++ b/games-server/ut2004-ded/metadata.xml
77 @@ -0,0 +1,11 @@
78 +<?xml version="1.0" encoding="UTF-8"?>
79 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
80 +<pkgmetadata>
81 +<maintainer type="project">
82 + <email>games@g.o</email>
83 + <name>Gentoo Games Project</name>
84 +</maintainer>
85 +<longdescription>
86 +Unreal Tounament 2004 is a first-person 3-D shooter and sequel to the 2003 Game of the Year, Unreal Tournament 2003. The game was ported to Linux by Ryan "icculus" Gordon under contract from Epic Games and the Linux installer was released in the retail box. This is the dedicated server portion of the game and does not require the retail discs to use.
87 +</longdescription>
88 +</pkgmetadata>
89
90 diff --git a/games-server/ut2004-ded/ut2004-ded-3369.3-r2.ebuild b/games-server/ut2004-ded/ut2004-ded-3369.3-r2.ebuild
91 new file mode 100644
92 index 00000000000..63f7dcb5240
93 --- /dev/null
94 +++ b/games-server/ut2004-ded/ut2004-ded-3369.3-r2.ebuild
95 @@ -0,0 +1,88 @@
96 +# Copyright 1999-2019 Gentoo Authors
97 +# Distributed under the terms of the GNU General Public License v2
98 +
99 +EAPI=7
100 +
101 +inherit check-reqs eutils
102 +
103 +BONUSPACK_P="dedicatedserver3339-bonuspack.zip"
104 +PATCH_P="ut2004-lnxpatch${PV%.*}-2.tar.bz2"
105 +DESCRIPTION="Unreal Tournament 2004 Linux Dedicated Server"
106 +HOMEPAGE="https://liandri.beyondunreal.com/Unreal_Tournament_2004"
107 +SRC_URI="
108 + https://ut2004.ut-files.com/Entire_Server_Download/${BONUSPACK_P}
109 + https://ut2004.ut-files.com/Patches/Linux/${PATCH_P}
110 + https://dev.gentoo.org/~chewi/distfiles/ut2004-v${PV/./-}-linux-dedicated.7z
111 +"
112 +
113 +LICENSE="ut2003"
114 +SLOT="0"
115 +KEYWORDS="-* ~amd64 ~x86"
116 +RESTRICT="bindist mirror strip"
117 +
118 +BDEPEND="
119 + app-arch/p7zip
120 + app-arch/unzip
121 +"
122 +
123 +RDEPEND="
124 + !games-fps/ut2004
125 + !games-fps/ut2004-data
126 + games-fps/ut2004-bonuspack-ece
127 + games-fps/ut2004-bonuspack-mega
128 + sys-libs/glibc
129 +"
130 +
131 +CHECKREQS_DISK_BUILD="2G"
132 +QA_PREBUILT="*"
133 +
134 +S="${WORKDIR}"
135 +DIR="/opt/${PN%-ded}"
136 +
137 +src_prepare() {
138 + default
139 +
140 + if use amd64; then
141 + mv ut2004-ucc-bin-09192008/ucc-bin{-linux-amd64,} || die
142 + fi
143 +
144 + cp -r UT2004-Patch/* ./ || die
145 + mv ut2004-ucc-bin-09192008/ucc-bin System/ || die
146 + rm -r System/{ut2004-bin*,*.dll,*.exe} UT2004-Patch/ ut2004-ucc-bin-09192008/ || die
147 +
148 + # In ut2004-bonuspack-ece.
149 + rm \
150 + Animations/{MechaSkaarjAnims,MetalGuardAnim,NecrisAnim,ONSBPAnimations}.ukx \
151 + Help/BonusPackReadme.txt \
152 + Maps/ONS-{Adara,Aridoom,Ascendancy,IslandHop,Tricky,Urban}.ut2 \
153 + Sounds/{CicadaSnds,DistantBooms,ONSBPSounds}.uax \
154 + StaticMeshes/{BenMesh02,BenTropicalSM01,HourAdara,ONS-BPJW1,PC_UrbanStatic}.usx \
155 + System/{ONS-{Adara,IslandHop,Tricky,Urban},OnslaughtBP}.int \
156 + System/xaplayersl3.upl \
157 + Textures/{AW-2k4XP,BenTex02,BenTropical01,BonusParticles,CicadaTex,Construction_S,HourAdaraTexor,ONSBP{_DestroyedVehicles,Textures},PC_UrbanTex,UT2004ECEPlayerSkins}.utx \
158 + || die
159 +
160 + # In ut2004-bonuspack-mega.
161 + rm System/{Manifest.in[it],Packages.md5} || die
162 +}
163 +
164 +src_install() {
165 + insinto "${DIR}"
166 + doins -r *
167 + fperms +x "${DIR}"/System/ucc-bin
168 +
169 + make_wrapper ${PN} "./ucc-bin server" "${DIR}"/System
170 + newconfd "${FILESDIR}"/${PN}.confd ${PN}
171 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
172 +}
173 +
174 +pkg_postinst() {
175 + elog "You should take the time to edit the default server INI. Consult the INI"
176 + elog "Reference at https://unrealadmin.org/server_ini_reference/ut2004 for"
177 + elog "assistance in adjusting ${DIR}/System/Default.ini."
178 + elog
179 + elog "To have your server authenticate properly to the central server, you"
180 + elog "MUST visit https://www.unrealadmin.org/server_cdkey and request a key."
181 + elog "This is not required if you want an unlisted private server with"
182 + elog "[DoUplink=False]."
183 +}