Bug#746011: trackballs: guile-2.0 support likely needs some more work

2016-02-22 Thread Hans de Goede

Hi,

Fedora trackballs maintainer here. While doing some work on the Fedora
trackballs package, I noticed that Debian's trackballs pkg now has
guile-2.0 support, which is great.

Fedora has had an incomplete guile-2.0 patch for a while now:
http://pkgs.fedoraproject.org/cgit/rpms/trackballs.git/tree/trackballs-1.1.4-guile20.patch

But we never got around to finishing this and moving from our
compat-guile18 pkg to using the default guile-2.0 in Fedora.
Note I did not write this patch.

Comparing the Fedora and Debian patches, it seems that the Debian
patch is more complete when it comes to the C-guile glue side, but
you only patch lv1.scm (*) when it comes to modifying the actual
guile code. The Fedora patch has a different approach for the
problem in lv1.scm, on top of that it identifies the same problem
in a number of other .scm files. The Debian pkg should probably patch
these other .scm files too. Besides that the Fedora patch identifies
some other problems in a few .scm files.

I personally do not know guile at all. But I think it would be good
for someone to take a look at the Fedora changes to the .scm files
and apply some of these to the Debian pkg. For Fedora I'm going to
stick with compat-guile18 for now.

Regards,

Hans

p.s.

I'm currently creating a trackballs.appdata.xml file, this should show
up in http://pkgs.fedoraproject.org/cgit/rpms/trackballs.git/tree/ soon,
feel free to add it to the Debian pkg while you are at it because of
the guile changes :)


*) In 0002-lv1.scm-move-illegal-expression-context-define-to-th.patch



Bug#651896: PATCH: njam drop DGA support, fixing SDL_VIDEODRIVER parsing issues

2011-12-13 Thread Hans de Goede

Hi,

I'm the Fedora maintainer of njam, where the
SDL_VIDEODRIVER bug has also been reported, see:
https://bugzilla.redhat.com/show_bug.cgi?id=767015

I've written a patch (attached) to fix this, the
code in question is only used for DGA support,
and the use of DGA has been deprecated by Xorg
upstream  for a long long time now, so the patch
simply removes the DGA support code.

Regards,

Hans
diff -up njam-1.25-src/src/njam.cpp~ njam-1.25-src/src/njam.cpp
--- njam-1.25-src/src/njam.cpp~ 2011-12-13 20:18:40.0 +0100
+++ njam-1.25-src/src/njam.cpp  2011-12-13 20:29:08.795427328 +0100
@@ -55,7 +55,6 @@ int main(int argc, char *argv[])
 {
bool Fullscreen = true;
bool SWSurface = true;
-   bool UseDGA = false;
gid_t realgid;

highscore_fp = fopen(/var/lib/games/njam.hs, r+);
@@ -76,8 +75,6 @@ int main(int argc, char *argv[])
Fullscreen = false; // use njam.exe 
-w windowed mode
else if (argv[i][1] == 'h')
SWSurface = false;  // use -h for 
hardware surfaces
-   else if (argv[i][1] == 'd')
-   UseDGA = true;
else
ok = false;
}
@@ -89,7 +86,6 @@ int main(int argc, char *argv[])
printf(Usage:  njam -[w|d|h]\n\n);
printf(-w  start in Windowed mode (as opposed 
to fullscreen).\n);;
printf(-h  use Hardware surfaces (faster, 
doesn't work well with all graphic cards).\n);
-   printf(-d  use DGA driver on Linux, (much 
faster, but must run as root).\n);
return 1;
}
}
@@ -118,7 +114,7 @@ int main(int argc, char *argv[])
 #endif
 
NjamEngine Engine;
-   if (!Engine.Init(Fullscreen, SWSurface, UseDGA))
+   if (!Engine.Init(Fullscreen, SWSurface))
{
LogFile(Failed.\n);
return 1;
@@ -171,12 +167,6 @@ NjamEngine::NjamEngine()
 //-
 NjamEngine::~NjamEngine()
 {
-#ifdef __linux__
-   char bufsdl[30];
-   sprintf(bufsdl, SDL_VIDEODRIVER=%s, linux_sdl_driver);
-   putenv(bufsdl);
-#endif
-
if (script_file)
fclose(script_file);
 
@@ -345,7 +335,7 @@ void NjamEngine::DoScript(void) // load
 }
 }
 //-
-bool NjamEngine::Init(bool Fullscreen, bool SoftwareSurface, bool UseDGA)
+bool NjamEngine::Init(bool Fullscreen, bool SoftwareSurface)
 {
 #ifdef __linux__
// Check if $HOME/.njam-levels exists and if it doesn't create it
@@ -353,20 +343,6 @@ bool NjamEngine::Init(bool Fullscreen, b
char *home = NjamGetHomeDir();
snprintf(buf, sizeof(buf), %s/.njam-levels, home? home:);
NjamCheckAndCreateDir(buf);
-   
-   sprintf(linux_sdl_driver, x11\0);
-   char *driver_name = getenv(SDL_VIDEODRIVER);
-   if (driver_name)
-   sprintf(linux_sdl_driver, %s\0, driver_name);
-
-   if (UseDGA)
-   {
-   printf(You must be root to run DGA\nType ./njam -? for 
help\n);
-   putenv(SDL_VIDEODRIVER=dga);
-   }
-#else
-   if (UseDGA)
-   printf(Parameter -d is ignored for non-Linux platforms.\n);
 #endif
 
LogFile(Initializing SDL: VIDEO  AUDIO..., true);
diff -up njam-1.25-src/src/njam.h~ njam-1.25-src/src/njam.h
--- njam-1.25-src/src/njam.h~   2011-12-13 20:18:40.0 +0100
+++ njam-1.25-src/src/njam.h2011-12-13 20:29:31.131148076 +0100
@@ -112,7 +112,6 @@ private:
 
bool m_SDL; // whether SDL 
is initialized or not
bool m_AudioAvailable;  // so we know wheter to try to 
play music/sfx
-   char linux_sdl_driver[10];
SDL_Surface *m_Screen;
 
tGameOptions m_GameOptions;
@@ -202,7 +201,7 @@ private:
 public:
NjamEngine();
~NjamEngine();
-   bool Init(bool,bool,bool);  // initialize 
everything except for networking
+   bool Init(bool,bool);   // initialize 
everything except for networking
void Start();   // start the music and 
main menu loop
 };
 //-


Bug#595171: CVE-2010-1519

2010-09-10 Thread Hans de Goede

Hi,

I had a quick search about this problem. Seems the fedora side [0]
 has a bit more detail but not much. Probably we can share patch with
 Hans who is working on a Fedora solution.

snip

 [0] https://bugzilla.redhat.com/show_bug.cgi?id=623831

Just a quick update that I've a patch which I believe fixes this,
the patch is self explanatory (with the help of some comments
I put in there). See:
https://bugzilla.redhat.com/attachment.cgi?id=446504


Cheers,

Hans



--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#579948: [parted-devel] Some debugging info

2010-06-21 Thread Hans de Goede

Hi,

I did not realize that partitions starts must be
cylinder aligned on Sun, ack for the patch reverting
the Sun disklabel part of my patch.

Regards,

Hans


On 06/20/2010 11:03 AM, Jurij Smakov wrote:

On Tue, Jun 15, 2010 at 07:53:21PM +0100, Colin Watson wrote:

On Mon, Jun 14, 2010 at 08:40:12PM +0200, Karel Zak wrote:

On Mon, Jun 14, 2010 at 01:06:09PM +0100, Colin Watson wrote:

parted-devel, can anyone comment on this?  It seems to me that either
(a) _get_lax_constraint should be using ped_alignment_any for its start
alignment, rather than aligning to sectors * heads boundaries, or (b)
Sun labels really and truly require cylinder alignment, in which case
requests to use optimal alignment shouldn't be honoured.


The begin of the partition has to be defined in cylinders:

 struct __attribute__ ((packed)) _SunRawPartition {
 u_int32_t   start_cylinder; /* where the part starts... */
 u_int32_t   num_sectors;/* ...and it's length */
 };

IMHO it does not make sense to use non-cylinder alignment here.


In that case, I think that the sun part of
723ea23c5df68cbe67d1f518ef484f4c77f516fa should be reverted.  CCing Hans
since that was his change.


I have tried this patch out (by building custom
libparted0-udeb_2.2-7_sparc.udeb and parted-udeb_2.2-7_sparc.udeb, and
fetching/installing them during installation, before partitioning
step). Unfortunately, I still get 16.8GB partitions, even though their
size is now calculated correctly, so I don't get free space gaps as
before. Example from the installer log:

parted_server: Closing infifo and outfifo
parted_server: main_loop: iteration 75
parted_server: Opening infifo
/bin/perform_recipe: IN: NEW_PARTITION =dev=sdb primary ext2
0-72908881919 beginning 10001
parted_server: Read command: NEW_PARTITION
parted_server: command_new_partition()
parted_server: Note =dev=sdb as changed
parted_server: Opening outfifo
parted_server: requested partition with type primary
parted_server: requested partition with file system ext2
parted_server: add_primary_partition(disk(142410400),0-195312)
parted_server: OUT: OK


parted_server: OUT: 1   0-16845373439   16845373440 primary ext2
/dev/sdb1



From: Colin Watsoncjwat...@ubuntu.com
Date: Tue, 15 Jun 2010 19:49:40 +0100
Subject: [PATCH] sun: revert implement disk flag operations

This reverts the libparted/labels/sun.c part of
723ea23c5df68cbe67d1f518ef484f4c77f516fa.  Sun disk labels do not appear
to be able to handle non-cylinder alignment
(http://bugs.debian.org/579948).
---
  libparted/labels/sun.c |   47 +--
  1 files changed, 1 insertions(+), 46 deletions(-)

diff --git a/libparted/labels/sun.c b/libparted/labels/sun.c
index 177a47c..e14a81d 100644
--- a/libparted/labels/sun.c
+++ b/libparted/labels/sun.c
@@ -109,7 +109,6 @@ struct _SunPartitionData {
  struct _SunDiskData {
PedSector   length; /* This is based on cyl - alt-cyl */
SunRawLabel raw_label;
-   int cylinder_alignment;
  };

  static PedDiskType sun_disk_type;
@@ -191,7 +190,6 @@ sun_alloc (const PedDevice* dev)
PED_ASSERT (bios_geom-cylinders == (PedSector) (dev-length / 
cyl_size),
  return NULL);
sun_specific-length = ped_round_down_to (dev-length, cyl_size);
-sun_specific-cylinder_alignment = 1;

label =sun_specific-raw_label;
memset(label, 0, sizeof(SunRawLabel));
@@ -258,42 +256,6 @@ sun_free (PedDisk *disk)
  }

  static int
-sun_disk_set_flag (PedDisk *disk, PedDiskFlag flag, int state)
-{
-SunDiskData *disk_specific = disk-disk_specific;
-switch (flag) {
-case PED_DISK_CYLINDER_ALIGNMENT:
-disk_specific-cylinder_alignment = !!state;
-return 1;
-default:
-return 0;
-}
-}
-
-static int
-sun_disk_get_flag (const PedDisk *disk, PedDiskFlag flag)
-{
-SunDiskData *disk_specific = disk-disk_specific;
-switch (flag) {
-case PED_DISK_CYLINDER_ALIGNMENT:
-return disk_specific-cylinder_alignment;
-default:
-return 0;
-}
-}
-
-static int
-sun_disk_is_flag_available (const PedDisk *disk, PedDiskFlag flag)
-{
-switch (flag) {
-case PED_DISK_CYLINDER_ALIGNMENT:
-   return 1;
-default:
-   return 0;
-}
-}
-
-static int
  _check_geometry_sanity (PedDisk* disk, SunRawLabel* label)
  {
PedDevice*  dev = disk-dev;
@@ -804,10 +766,7 @@ sun_partition_align (PedPartition* part, const 
PedConstraint* constraint)
  {
  PED_ASSERT (part != NULL, return 0);

-SunDiskData *disk_specific = part-disk-disk_specific;
-
-if (disk_specific-cylinder_alignment
-_ped_partition_attempt_align (part, constraint,
+if (_ped_partition_attempt_align (part, constraint,
  

Bug#559274: xfig: buffer overflow in read .fig file

2009-12-04 Thread Hans de Goede

Hi all,

I'm the Fedora package maintainer of xfig,
I've created a patch for xfig-3.2.5b, which fixes this overflow. Note that
after this xfig will still crash on plane.fig, going into a recursive function
call loop inside u_bound.c, till it exceeds its maximum stack size.

This may caused be caused by the use of an uninitialzed variable
resolution (for 1.3 files) inside f_read.c:readfp_fig() when calling
scale_figure().

Given that this other bug has lingered for quite a long while, I'm wondering
if 1.3 format support is still functional at all, and if it would not be
better to simply disable it ?

Can anyone provide me with some valid 1.3 format files to see how much work it
will be to fix 1.3 format support ?

See:
https://bugzilla.redhat.com/show_bug.cgi?id=543905

For discussion and:
https://bugzilla.redhat.com/attachment.cgi?id=376059action=edit

For the patch.

Regards,

Hans



--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#428154: Fix for londonlaw not working with current python-twisted

2007-09-23 Thread Hans de Goede

Hi all,

I'm a Fedora contributer and today I've been working on packaging londonlaw. 
While searching for a problem for the server not starting with recent 
python-twisted bug, I found the Debian bug report.


I've managed to fix this issue now and I would like to share my fix with you, 
see the attached patch.


Regards,

Hans
diff -up londonlaw-0.2.1/londonlaw/server/Game.py~ londonlaw-0.2.1/londonlaw/server/Game.py
--- londonlaw-0.2.1/londonlaw/server/Game.py~	2007-09-23 10:34:43.0 +0200
+++ londonlaw-0.2.1/londonlaw/server/Game.py	2007-09-23 10:34:43.0 +0200
@@ -20,6 +20,7 @@ import sets
 
 from twisted.python import components
 from twisted.python import log
+from zope import interface
 
 from londonlaw.common.protocol import *
 from londonlaw.common.map import *
@@ -32,7 +33,7 @@ class GameError(Exception):
pass
 
 
-class IGameListener(components.Interface):
+class IGameListener(interface.Interface):
def announceHistory(self, history):
   pass
 


Bug#428154: Fix for londonlaw not working with current python-twisted

2007-09-23 Thread Hans de Goede

Reinhard Tartler wrote:

Hans de Goede [EMAIL PROTECTED] writes:


Hi all,

I'm a Fedora contributer and today I've been working on packaging
londonlaw. While searching for a problem for the server not starting
with recent python-twisted bug, I found the Debian bug report.

I've managed to fix this issue now and I would like to share my fix with
you, see the attached patch.

Regards,

Hans


Thank you very much for your patch. A first test confirmed that I could
start a server. I'd like to adress the other issue in the debian BTS and
do a quick gametest to see that the package actually works and will make
an upload to debian.

Btw, do you happen to know what happened to Paul (londonlaw upstream)?
He doesn't respond to my emails, so he seems to have fallen of the
planet to me :(



I don't know what happened to him, I just started looking at londonlaw today.

Regards,

Hans



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]