[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#821954: marked as done (libdrm: Patch to _just_ compile on hurd (no functionality implied) , close it)



Your message dated Thu, 21 Apr 2016 10:32:07 +0200
with message-id <20160421083207.GD2889@betterave.cristau.org>
and subject line Re: Bug#821954: libdrm: diff for NMU version 2.4.67-1.1
has caused the Debian Bug report #821954,
regarding libdrm: Patch to _just_ compile on hurd (no functionality implied) , close it
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
821954: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821954
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libdrm
Version: 2.4.67-1
Severity: normal
Tags: patch pending

Dear maintainer,

I've prepared an NMU for libdrm (versioned as 2.4.67-1.1) and
uploaded it to DELAYED/5. Please feel free to tell me if I
should delay it longer.

This NMU ports libdrm to hurd. This will help us to compile e.g
gst-plugins-bad1.0 which will help us to remove obsolete binary
packages and eventually libpng 1.2...

The patch has been written in a way to only change code on hurd,
all other archs are unaffected.

--
tobi

Regards.
diff -u libdrm-2.4.67/debian/changelog libdrm-2.4.67/debian/changelog
--- libdrm-2.4.67/debian/changelog
+++ libdrm-2.4.67/debian/changelog
@@ -1,3 +1,10 @@
+libdrm (2.4.67-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Patch for hurd. (Closes: #xxxxxx) 
+
+ -- Tobias Frost <tobi@debian.org>  Wed, 20 Apr 2016 21:19:56 +0200
+
 libdrm (2.4.67-1) unstable; urgency=medium
 
   * New upstream release.
diff -u libdrm-2.4.67/debian/patches/series libdrm-2.4.67/debian/patches/series
--- libdrm-2.4.67/debian/patches/series
+++ libdrm-2.4.67/debian/patches/series
@@ -1,0 +2 @@
+02_hurd.patch
only in patch2:
unchanged:
--- libdrm-2.4.67.orig/debian/patches/02_hurd.patch
+++ libdrm-2.4.67/debian/patches/02_hurd.patch
@@ -0,0 +1,147 @@
+--- a/include/drm/drm.h
++++ b/include/drm/drm.h
+@@ -42,10 +42,19 @@
+ #include <asm/ioctl.h>
+ typedef unsigned int drm_handle_t;
+ 
++#elif defined(__gnu_hurd__)
++#include <stdint.h>
++#include <mach/i386/ioccom.h>
++
+ #else /* One of the BSDs */
+ 
+ #include <sys/ioccom.h>
+ #include <sys/types.h>
++
++#endif
++
++#if !defined(__linux__)
++
+ typedef int8_t   __s8;
+ typedef uint8_t  __u8;
+ typedef int16_t  __s16;
+--- a/xf86drm.h
++++ b/xf86drm.h
+@@ -58,7 +58,11 @@
+ 
+ #else /* One of the *BSDs */
+ 
++#if defined(__gnu_hurd__)
++#include <mach/i386/ioccom.h>
++#else
+ #include <sys/ioccom.h>
++#endif
+ #define DRM_IOCTL_NR(n)         ((n) & 0xff)
+ #define DRM_IOC_VOID            IOC_VOID
+ #define DRM_IOC_READ            IOC_OUT
+--- a/xf86drm.c
++++ b/xf86drm.c
+@@ -103,6 +103,16 @@
+ 
+ #define memclear(s) memset(&s, 0, sizeof(s))
+ 
++/* for systems like hurd which does not have PATH_MAX.
++ Usage is only for string manipulation, so it is save to define it.
++ 1kB will be plenty space...*/
++#ifndef PATH_MAX
++#define MY_PATH_MAX (1024)
++#else
++#define MY_PATH_MAX PATH_MAX
++#endif
++
++
+ static drmServerInfoPtr drm_server_info;
+ 
+ void drmSetServerInfo(drmServerInfoPtr info)
+@@ -2835,14 +2845,15 @@
+ static int drmParseSubsystemType(int maj, int min)
+ {
+ #ifdef __linux__
+-    char path[PATH_MAX + 1];
+-    char link[PATH_MAX + 1] = "";
++
++    char path[MY_PATH_MAX + 1];
++    char link[MY_PATH_MAX + 1] = "";
+     char *name;
+ 
+-    snprintf(path, PATH_MAX, "/sys/dev/char/%d:%d/device/subsystem",
++    snprintf(path, MY_PATH_MAX, "/sys/dev/char/%d:%d/device/subsystem",
+              maj, min);
+ 
+-    if (readlink(path, link, PATH_MAX) < 0)
++    if (readlink(path, link, MY_PATH_MAX) < 0)
+         return -errno;
+ 
+     name = strrchr(link, '/');
+@@ -2857,18 +2868,19 @@
+ #warning "Missing implementation of drmParseSubsystemType"
+     return -EINVAL;
+ #endif
++
+ }
+ 
+ static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info)
+ {
+ #ifdef __linux__
+-    char path[PATH_MAX + 1];
++    char path[MY_PATH_MAX + 1];
+     char data[128 + 1];
+     char *str;
+     int domain, bus, dev, func;
+     int fd, ret;
+ 
+-    snprintf(path, PATH_MAX, "/sys/dev/char/%d:%d/device/uevent", maj, min);
++    snprintf(path, MY_PATH_MAX, "/sys/dev/char/%d:%d/device/uevent", maj, min);
+     fd = open(path, O_RDONLY);
+     if (fd < 0)
+         return -errno;
+@@ -2949,11 +2961,11 @@
+                                  drmPciDeviceInfoPtr device)
+ {
+ #ifdef __linux__
+-    char path[PATH_MAX + 1];
++    char path[MY_PATH_MAX + 1];
+     unsigned char config[64];
+     int fd, ret;
+ 
+-    snprintf(path, PATH_MAX, "/sys/class/drm/%s/device/config", d_name);
++    snprintf(path, MY_PATH_MAX, "/sys/class/drm/%s/device/config", d_name);
+     fd = open(path, O_RDONLY);
+     if (fd < 0)
+         return -errno;
+@@ -3082,7 +3094,7 @@
+     DIR *sysdir;
+     struct dirent *dent;
+     struct stat sbuf;
+-    char node[PATH_MAX + 1];
++    char node[MY_PATH_MAX + 1];
+     int node_type, subsystem_type;
+     int maj, min;
+     int ret, i, node_count;
+@@ -3118,7 +3130,7 @@
+         if (node_type < 0)
+             continue;
+ 
+-        snprintf(node, PATH_MAX, "%s/%s", DRM_DIR_NAME, dent->d_name);
++        snprintf(node, MY_PATH_MAX, "%s/%s", DRM_DIR_NAME, dent->d_name);
+         if (stat(node, &sbuf))
+             continue;
+ 
+@@ -3198,7 +3210,7 @@
+     DIR *sysdir;
+     struct dirent *dent;
+     struct stat sbuf;
+-    char node[PATH_MAX + 1];
++    char node[MY_PATH_MAX + 1];
+     int node_type, subsystem_type;
+     int maj, min;
+     int ret, i, node_count, device_count;
+@@ -3220,7 +3232,7 @@
+         if (node_type < 0)
+             continue;
+ 
+-        snprintf(node, PATH_MAX, "%s/%s", DRM_DIR_NAME, dent->d_name);
++        snprintf(node, MY_PATH_MAX, "%s/%s", DRM_DIR_NAME, dent->d_name);
+         if (stat(node, &sbuf))
+             continue;
+ 

--- End Message ---
--- Begin Message ---
On Thu, Apr 21, 2016 at 07:32:26 +0200, Tobias Frost wrote:

> On Wed, 20 Apr 2016 22:09:58 +0200 Julien Cristau <jcristau@debian.org>
> wrote:
> > On Wed, Apr 20, 2016 at 21:31:51 +0200, Tobias Frost wrote:
> > 
> > > Package: libdrm
> > > Version: 2.4.67-1
> > > Severity: normal
> > > Tags: patch pending
> > > 
> 
> > Also, when did hurd grow DRM support?  It doesn't make sense to build
> > libdrm without that...
> 
> Then it probably makes sense to declare the Architectures: in d/control
> appropriately, doesn't it? 
> 
Maybe.  I'm not sure there's much point.

> NMU canceled.
> 
Thanks.

Cheers,
Julien

--- End Message ---

Reply to: