Commit fee3b10f authored by Frank Lichtenheld's avatar Frank Lichtenheld Committed by Jari Aalto

Imported Debian patch 1.4-23

parent 8f47e6b0
......@@ -26,7 +26,7 @@ UnsharedLibReferences(XPM,Xpm,$(XPMSRC))
CUTE = -DSEND_MAIL /* cute feature :-) */
DEPLIBS = XawClientDepLibs XpmDepLib
LOCAL_LIBRARIES = XawClientLibs XpmLib MathLibrary
LOCAL_LIBRARIES = XawClientLibs XpmLib
EXTRA_DEFINES = -DUSE_X11 -DXONIXDIR=\"$(XONIXDIR)\" $(CUTE)
/* CDEBUGFLAGS = DebuggableCDebugFlags */
......
xonix (1.4-23) unstable; urgency=low
* QA upload.
+ Set maintainer to QA group.
* Replace build-dependency on xutils with xutils-dev.
* Bump debhelper compat level from unspecified to 7.
* Also exclude libselinux-dev from build deps on kfreebsd-amd64
(closes: #451115)
* Fix chown call in postinst.
* Fix path to scores file in man page.
-- Frank Lichtenheld <djpig@debian.org> Thu, 24 Jul 2008 02:57:31 +0200
xonix (1.4-22) unstable; urgency=low
* use debian maintainer numbering, not debian NMU numbering (Doh!)
-- Adrian Bridgett <bridgett@debian.org> Sun, 9 Jul 2006 10:05:26 +0100
xonix (1.4-21.2) unstable; urgency=low
* ack of NMU - thanks Baruch
* libselinux build dependency only required for Linux (closes: #336947)
* reverted "no-turnaround" change as it breaks on captured ground.
(closes: #252821)
-- Adrian Bridgett <bridgett@debian.org> Sun, 9 Jul 2006 09:33:33 +0100
xonix (1.4-21.1) unstable; urgency=low
* NMU
* Fix build issues of gcc 4.0
(closes: #259939)
* Other build issues:
- New build dependency on libxp-dev
- New build dependency on libselinux-dev
-- Baruch Even <baruch@debian.org> Tue, 9 Aug 2005 12:43:33 +0100
xonix (1.4-21) unstable; urgency=high
* incorporate security fix from security team (closes: #243948)
* Drop privileges before invoking external mailer command when
highscores are achieved. (CAN-2004-0157)
* ignore U-turns rather than killing the player (closes: #244103)
* hopefully update build dependencies
-- Adrian Bridgett <bridgett@debian.org> Mon, 3 May 2004 14:42:44 +0100
xonix (1.4-20) unstable; urgency=low
* rebuild to pickup libxaw7-dev (closes: #169987)
* use dpkg-statoverride not suidmanager
-- Adrian Bridgett <bridgett@debian.org> Sun, 5 Jan 2003 13:37:24 +0000
xonix (1.4-19) unstable; urgency=low
* patch from James Morrison so that xonix can compile on Hurd (closes: #107315)
* stop xonix losing scores - thanks to Norbert Warmuth <nwarmuth@privat.circular.de> (closes: #39600)
-- Adrian Bridgett <bridgett@debian.org> Tue, 7 Aug 2001 22:58:16 +0100
xonix (1.4-18) unstable; urgency=low
* add libxaw-dev to build-depends (closes: #102801)
* move high scores to /var/games (better FHS compliance)
-- Adrian Bridgett <bridgett@debian.org> Mon, 2 Jul 2001 22:46:18 +0100
xonix (1.4-17) unstable; urgency=low
* app-defaults files are conffiles
-- Adrian Bridgett <bridgett@debian.org> Sun, 4 Mar 2001 18:47:08 +0000
xonix (1.4-16) unstable; urgency=low
* added xutils to build-depends (closes: #86973)
* use new location of app-defaults (closes: #86323)
-- Adrian Bridgett <bridgett@debian.org> Sat, 3 Mar 2001 15:42:39 +0000
xonix (1.4-15) unstable; urgency=low
* add Build-Depends (closes: #84670)
-- Adrian Bridgett <bridgett@debian.org> Sun, 4 Feb 2001 18:32:18 +0000
xonix (1.4-14) unstable; urgency=low
* FHS (/usr/share/*)
* recompile to fix dependencies (closes: #67961)
-- Adrian Bridgett <bridgett@debian.org> Mon, 31 Jul 2000 21:50:33 +0100
xonix (1.4-13) unstable; urgency=low
* removed icon="none" from menu entry
* fixed one line description
-- Adrian Bridgett <bridgett@debian.org> Sat, 26 Dec 1998 16:39:40 +0000
xonix (1.4-12) unstable; urgency=low
* fixed score file handling (no longer a conffile)
* moved manpage to /usr/man/man6
-- Adrian Bridgett <adrian.bridgett@poboxes.com> Tue, 17 Mar 1998 22:22:11 +0000
xonix (1.4-11) unstable; urgency=low
* compress manpage
-- Adrian Bridgett <adrian.bridgett@poboxes.com> Thu, 12 Feb 1998 21:10:00 +0000
xonix (1.4-10) unstable; urgency=low
* allow GECOS (name) fields of ",,," (finally fixes 16321!)
-- Adrian Bridgett <adrian.bridgett@poboxes.com> Sat, 31 Jan 1998 13:09:04 +0000
xonix (1.4-9) unstable; urgency=low
* another attempt to stop losing high-score (16321)
-- Adrian Bridgett <adrian.bridgett@poboxes.com> Sun, 25 Jan 1998 16:07:45 +0000
xonix (1.4-8) unstable; urgency=low
* lock high score table and don't open it twice (fixes 16321 hopefully)
-- Adrian Bridgett <adrian.bridgett@poboxes.com> Tue, 20 Jan 1998 22:39:23 +0000
xonix (1.4-7) unstable; urgency=low
* -h
* fixed dependencies [#12645, #12898, #13067]
* updated to standards 2.3.0.0
* fixed scores permissions [#5879]
* new maintaner
-- Adrian Bridgett <adrian.bridgett@poboxes.com> Wed, 22 Oct 1997 19:16:04 +0000
xonix (1.4-6.1) unstable; urgency=low
* non-maintainer release.
* libc6 compile.
-- Martin Mitchell <martin@debian.org> Wed, 22 Oct 1997 20:42:43 +1000
xonix (1.4-6) unstable; urgency=low
* updated to Standards-Version 2.1.0.0.
-- Sven Rudolph <sr1@inf.tu-dresden.de> Thu, 24 Oct 1996 14:24:18 +0200
Wed Aug 21 16:46:35 1996 Sven Rudolph <sr1@inf.tu-dresden.de>
* debian.rules: set xonix and /var dir setgrp games (Bug#4219)
* debian.control: changed Priority: extra to optional
Wed Jul 24 22:25:19 1996 Sven Rudolph <sr1@inf.tu-dresden.de>
* 1.4-4 released
* debian.control: corrected extended description (Bug#3666)
* debian.rules: corrected multi-architecture support
Mon Jun 3 12:29:46 1996 Sven Rudolph <sr1@inf.tu-dresden.de>
* debian.control: changed Priority: Xtr to extra
Sun Jun 2 19:56:15 1996 Sven Rudolph <sr1@inf.tu-dresden.de>
* 1.4-3 released
* debian.control: added Architecture:, Section: and Priority:
* fixed permissions in /var (Bug#3184)
* fixed color in flyer.xpm (Bug#3175)
* debian.rules: handle Architecture: field
Thu Jan 25 22:19:43 1996 Sven Rudolph <sr1@inf.tu-dresden.de>
* added extended description (Bug#1966, Bug#1377)
* recompiled for ELF
* debian.control: adapted for ELF
Thu Sep 14 19:09:20 1995 Sven Rudolph <sr1@inf.tu-dresden.de>
* updated to version 1.4
Mon Sep 11 23:22:17 1995 Sven Rudolph <sr1@inf.tu-dresden.de>
* changed file locations according to FSSTND
* added Debian GNU/Linux package maintenance system files
Source: xonix
Section: games
Priority: extra
Maintainer: Debian QA Group <packages@qa.debian.org>
Build-Depends: debhelper (>= 7), xutils-dev, libxaw7-dev, libxpm-dev, libxt-dev, libxp-dev,
libselinux-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386]
Standards-Version: 3.5.8.0
Package: xonix
Architecture: any
Depends: ${shlibs:Depends}
Conflicts: suidmanager (<< 0.50)
Description: Carve up the screen whilst dodging monsters
A clone of the Xonix game for DOS:
Start with a rectangle, and munch corners off until you get below
the winning area: then proceed to the next level.
But beware of the roaming aliens!
This is Debian GNU/Linux's prepackaged version of xonix.
xonix was written by Torsten Schoenitz
<torsten_schoenitz@bonnie.heep.sax.de> and Joerg Wunsch
<joerg_wunsch@uriah.heep.sax.de>
This package was put together by Adrian Bridgett
<adrian.bridgett@poboxes.com> from sources obtained from:
ftp.inf.tu-dresden.de:/pub/people/wunsch/xonix-1.4.tar.gz
Copyright (c) 1995
Alfredo Herrera Hernandez <alf@narcisa.sax.de>
Torsten Schoenitz <torsten_schoenitz@bonnie.heep.sax.de>
Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS `AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
?package(xonix):command="/usr/games/xonix" needs="X11" \
section="Games/Action" title="Xonix"
#!/bin/sh
OLD=/var/lib/games/xonix/scores
OLD2=/var/lib/games/xonix.scores
SCORES=/var/games/xonix.scores
if [ ! -e $SCORES ]; then
if [ -e $OLD ]; then
mv $OLD $SCORES
rmdir /var/lib/games/xonix
elif [ -e $OLD2 ]; then
mv $OLD2 $SCORES
else
touch $SCORES
fi
chown root:games $SCORES
chmod 0664 $SCORES
fi
#DEBHELPER#
#!/bin/sh
if [ "$1" = "purge" ]; then
rm -f /var/lib/games/xonix.scores
rmdir /var/lib/games/xonix 2>/dev/null
rmdir /var/lib/games 2>/dev/null
fi
#DEBHELPER#
#!/usr/bin/make -f
#uses debhelper by Joey Hess
#export DH_VERBOSE=1
DEB=debian/xonix
build: build-stamp
build-stamp:
dh_testdir
xmkmf
$(MAKE) 'CDEBUGFLAGS=-g -Wall -O2 -D__unix' XONIXDIR=/var/games/xonix
touch build-stamp
clean:
dh_testdir
dh_testroot
dh_clean
[ ! -f Makefile ] || $(MAKE) clean
rm -f Makefile*
binary-indep: build
binary-arch: build
dh_testdir
dh_testroot
dh_clean
dh_installdirs usr/games etc/X11/app-defaults
dh_installdocs
dh_installmenu
dh_installchangelogs
dh_installman xonix.man
install -m644 -o root -g root Xonix.ad $(DEB)/etc/X11/app-defaults/Xonix
dh_compress
dh_fixperms
install -m2755 -o root -g games xonix $(DEB)/usr/games/xonix
dh_strip
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
......@@ -2,7 +2,7 @@
static char * flyer_xpm[] = {
"8 8 3 1",
" c forest green",
". g4 yellow c tomato",
". c yellow",
"X c black",
" .. ",
" .XX. ",
......
......@@ -52,8 +52,7 @@
#ifdef __unix
#define MAXSCORES 10 /* number of entries in high score table */
#define PATH_HIGHSCORE XONIXDIR "/scores"
#define PATH_TEMPSCORE XONIXDIR "/score_tmp"
#define PATH_HIGHSCORE "/var/games/xonix.scores"
#if defined(__unix) && !defined PATH_RMAIL
#define PATH_RMAIL "rmail" /* rely on the $PATH */
......@@ -61,6 +60,7 @@
#include <sys/types.h>
#include <sys/time.h>
#include <sys/file.h>
#include <pwd.h>
#include <string.h>
#include <stdlib.h>
......@@ -898,7 +898,6 @@ DisplayHighScore(void)
char *fullname = 0, *cp;
struct score_rec score_rec[MAXSCORES];
int i, numentries = 0;
char tempname[sizeof(PATH_TEMPSCORE) + 15];
char hugestring[MAXSCORES * 100];
Widget box1, box2, msg, headl, done, area;
......@@ -926,53 +925,62 @@ DisplayHighScore(void)
}
else
fullname = strdup(pw->pw_gecos);
if((cp = strchr(fullname, ','))) *cp = 0; /* remove trailing garbage */
cp = strchr(fullname, ',');
if (cp == fullname) {
free(fullname);
fullname = strdup("(No name)");
}
else if (cp != NULL)
*cp = 0; /* remove trailing garbage */
}
else
fullname = strdup("(No name)"); /* the strdup() allows to free() it */
/* try opening high score file, and read it */
if((high = fopen(PATH_HIGHSCORE, "r"))) {
for(i = 0; i < 10; i++) {
if((high=fopen(PATH_HIGHSCORE, "r")) && (flock(fileno(high),LOCK_EX)==0)){
for(i = 0; i < MAXSCORES; i++) {
char line[100];
if(fgets(line, 100, high) == NULL)
break;
if(sscanf(line, " %u %u%*[\t]%10[^\t]%*[\t]%64[^\t] %ld",
if(sscanf(line, "%u%*[\t]%u%*[\t]%10[^\t]%*[\t]%64[^\t]%*[\t]%ld",
&score_rec[i].score, &score_rec[i].level,
score_rec[i].login, score_rec[i].full,
&score_rec[i].tstamp)
!= 5) break; /* mangled entry */
<3 ) break; /* mangled entry */
}
numentries = i;
fclose(high);
}
if(numentries)
qsort(score_rec, numentries, sizeof(struct score_rec), compare);
/* make sure the new list will be world-readable */
(void)umask(umask(0) & ~0644);
sprintf(tempname, "%s.%d", PATH_TEMPSCORE, (int)getpid());
if((high = fopen(tempname, "w")) == NULL) {
fprintf(stderr, "xonix: cannot rewrite high score file\n");
else
{
if (high != NULL) {
fprintf(stderr, "xonix: cannot lock high score file\n");
fclose(high);
}
else
fprintf(stderr, "xonix: cannot open high score file\n");
free(fullname);
gameover_pending = 0;
return;
}
if(numentries)
qsort(score_rec, numentries, sizeof(struct score_rec), compare);
if(numentries >= MAXSCORES && gHighScore < score_rec[0].score) {
if(numentries >= MAXSCORES && gHighScore <= score_rec[0].score) {
/* sorry, not among top ten */
fclose(high);
(void)unlink(tempname);
free(fullname);
if(flock(fileno(high),LOCK_UN) != 0)
fprintf(stderr, "xonix: cannot unlock high score file\n");
fclose(high);
gameover_pending = 0;
return;
}
for(i = 0; i < numentries; i++) {
/* look where to put entry */
if(score_rec[i].score > gHighScore) break;
if(score_rec[i].score >= gHighScore) break;
}
#ifdef SEND_MAIL
......@@ -993,19 +1001,32 @@ DisplayHighScore(void)
tm = localtime(&sp->tstamp);
strftime(tbuf, 20, "%d-%b-%y", tm);
if((mail = popen(cmd, "w")) != NULL) {
fprintf(mail,
"To: %s (%s)\n"
"Subject: Lost xonix championship\n\n"
"Your previously held first rank in the local xonix score\n"
"table (%u points, level %u, dated %s) has been\n"
"vanished today by me with %u points.\n\n"
"\t\tpitying you\t%s (%s)\n",
sp->login, sp->full,
sp->score, sp->level, tbuf,
gHighScore,
pw->pw_name, fullname);
(void)pclose(mail);
/* format a text - fork and exec the processes so we can drop privileges */
switch( fork() ) {
case -1: /* Error */
perror(fork);
exit(1);
break;
case 0: /* Child */
setgid(pw->pw_gid);
setuid(pw->pw_uid);
if((mail = popen(cmd, "w")) != NULL) {
fprintf(mail,
"To: %s (%s)\n"
"Subject: Lost xonix championship\n\n"
"Your previously held first rank in the local xonix score\n"
"table (%u points, level %u, dated %s) has been\n"
"vanished today by me with %u points.\n\n"
"\t\tpitying you\t%s (%s)\n",
sp->login, sp->full,
sp->score, sp->level, tbuf,
gHighScore,
pw->pw_name, fullname);
(void)pclose(mail);
break;
default: /* parent */
break;
}
}
}
......@@ -1036,16 +1057,23 @@ DisplayHighScore(void)
score_rec[i].tstamp = time(NULL);
free(fullname);
if((high = freopen(PATH_HIGHSCORE, "w",high)) == NULL) {
fprintf(stderr, "xonix: cannot reopen high score file\n");
free(fullname);
gameover_pending = 0;
return;
}
for(i = 0; i < numentries; i++)
(void)fprintf(high, "%u\t%u\t%s\t%s\t%ld\n",
score_rec[i].score, score_rec[i].level,
score_rec[i].login, score_rec[i].full,
score_rec[i].tstamp);
if(flock(fileno(high),LOCK_UN) != 0)
fprintf(stderr, "xonix: cannot unlock high score file\n");
fclose(high);
if(rename(tempname, PATH_HIGHSCORE))
fprintf(stderr, "xonix: cannot install new highscore file\n");
/* create hugestring for highscore label */
hugestring[0] = 0;
for(i = 0; i < numentries; i++) {
......
......@@ -71,11 +71,10 @@ The default keys to immediately quit the game are `Q' and `Escape'.
Hitting `P' or iconizing the window with the window manager will pause
the game; de-iconizing will continue it.
On Posix-compliant systems, there is also a high-score file,
\fB$PROJECTROOT/\fP\fIlib/X11/xonix/scores\fP. It records the top ten
xonix players for that machine. As a special compile-time option,
a mail is sent to the previous xonix score leader when he's lost
his first rank.
There is also a high-score file, \fI/var/games/xonix.scores\fP. It
records the top ten xonix players for that machine. As a special
compile-time option, a mail is sent to the previous xonix score leader
when he's lost his first rank.
.SH WIDGETS
\fIXonix\fP uses the X Toolkit and the Athena Widget Set.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment