Bug 243283 - graphics/libdrm: update to 2.4.100
Summary: graphics/libdrm: update to 2.4.100
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL: https://reviews.freebsd.org/D23141
Keywords: buildisok, needs-qa, patch
Depends on:
Blocks:
 
Reported: 2020-01-12 02:12 UTC by voidanix
Modified: 2020-06-02 09:42 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments
libdrm2.4.100 (28.09 KB, patch)
2020-01-12 02:12 UTC, voidanix
no flags Details | Diff
libdrm2.4.100 (31.54 KB, patch)
2020-01-12 02:18 UTC, voidanix
no flags Details | Diff
libdrm2.4.100 (31.57 KB, patch)
2020-01-12 23:35 UTC, voidanix
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description voidanix 2020-01-12 02:12:01 UTC
Created attachment 210647 [details]
libdrm2.4.100
Comment 1 voidanix 2020-01-12 02:18:40 UTC
Created attachment 210648 [details]
libdrm2.4.100

Remove files that should have been deleted
Comment 2 Jan Beich freebsd_committer 2020-01-12 02:41:23 UTC
Comment on attachment 210648 [details]
libdrm2.4.100

Alternative version: https://github.com/myfreeweb/freebsd-ports-dank/commit/90125516c6c7

> -PORTEPOCH=	1
> +PORTEPOCH=	2

Why?

>  #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
[...]
>  #else
> -    struct stat sbuf;
> -    char buf[PATH_MAX + 1];
> +    stat_t sbuf;
> +    char buf[DRM_NODE_NAME_MAX];
>      const char *dev_name = drmGetDeviceName(type);
>      unsigned int maj, min;
>      int n;
>  
> +    if (!dev_name)
> +        return NULL;
> +
>      if (fstat(fd, &sbuf))
>          return NULL;
>  
>      maj = major(sbuf.st_rdev);
>      min = minor(sbuf.st_rdev);
>  
>      if (!drmNodeIsDRM(maj, min) || !S_ISCHR(sbuf.st_mode))
>          return NULL;
>  
>      if (!dev_name)
>          return NULL;

Looks bogus:
- POSIX fstat() writes |struct stat| into the 2nd argument
- dev_name is already tested against NULL a few lines later
- buf[DRM_NODE_NAME_MAX] maybe too small to fit dev_name + DRM_DIR_NAME
Comment 3 voidanix 2020-01-12 23:35:12 UTC
Created attachment 210672 [details]
libdrm2.4.100

Do not bump PORTEPOCH, slightly adjust the patch

PORTEPOCH was bumped by me as a hack for `pkg upgrade` on my host, sorry about that
Comment 4 Automation User 2020-01-27 02:19:56 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/112439877
Comment 5 Emmanuel Vadot freebsd_committer 2020-06-02 09:42:24 UTC
I've just commited 2.4.102 in r537533.