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

Bug#765578: vlc: FTBFS on Hurd



Package: vlc
Version: 2.2.0~pre4-1
Severity: important
Tags: patch
User: debian-hurd@lists.debian.org
Usertags: hurd

Dear Maintainer,

{
 vlc (2.1.5-1)
   * Fix FTBFS on hurd. (Closes: #742183)

 vlc (2.2.0~pre3-1)
   * Remove hurd.patch, because this is a bug in Hurd and not in VLC.
}

attached debdiff fixes FTBFS on Hurd by reintroducing hurd.patch,
replacing PATH_MAX and disabling smbclient plugin.

 * Fix FTBFS on Hurd.
   + Disable smbclient. Currently samba FTBFS due to lack of record file
     locking, see #748943.
   + Reintroduce hurd.patch, see #742183.
   + Add hurd-path_max.patch, replacing unsupported PATH_MAX.

Thanks for considering,
-- 
G..e
diff -Nru vlc-2.2.0~pre4/debian/changelog vlc-2.2.0~pre4/debian/changelog
--- vlc-2.2.0~pre4/debian/changelog	2014-10-06 22:26:42.000000000 +0000
+++ vlc-2.2.0~pre4/debian/changelog	2014-10-16 10:57:33.000000000 +0000
@@ -1,3 +1,13 @@
+vlc (2.2.0~pre4-2) UNRELEASED; urgency=medium
+
+  * Fix FTBFS on Hurd.
+    + Disable smbclient. Currently samba FTBFS due to lack of record file
+      locking, see #748943.
+    + Reintroduce hurd.patch, see #742183.
+    + Add hurd-path_max.patch, replacing unsupported PATH_MAX.
+
+ -- Gabriele Giacone <1o5g4r8o@gmail.com>  Tue, 14 Oct 2014 22:26:54 +0000
+
 vlc (2.2.0~pre4-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru vlc-2.2.0~pre4/debian/control vlc-2.2.0~pre4/debian/control
--- vlc-2.2.0~pre4/debian/control	2014-10-06 16:26:28.000000000 +0000
+++ vlc-2.2.0~pre4/debian/control	2014-10-15 00:40:16.000000000 +0000
@@ -80,7 +80,7 @@
                libshine-dev (>= 3.0.0),
                libshout3-dev,
                libsidplay2-dev,
-               libsmbclient-dev,
+               libsmbclient-dev [linux-any kfreebsd-any],
                libspeex-dev (>= 1.0.5),
                libspeexdsp-dev (>= 1.0.5),
                libssh2-1-dev,
@@ -327,7 +327,7 @@
  podcasts, and multimedia streams from various network sources.
 
 Package: vlc-plugin-samba
-Architecture: any
+Architecture: linux-any kfreebsd-any
 Breaks: vlc-nox (<< 2.2.0~pre2-2~)
 Replaces: vlc-nox (<< 2.2.0~pre2-2~)
 Depends: vlc-nox (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
diff -Nru vlc-2.2.0~pre4/debian/patches/hurd-path_max.patch vlc-2.2.0~pre4/debian/patches/hurd-path_max.patch
--- vlc-2.2.0~pre4/debian/patches/hurd-path_max.patch	1970-01-01 00:00:00.000000000 +0000
+++ vlc-2.2.0~pre4/debian/patches/hurd-path_max.patch	2014-10-16 10:45:33.000000000 +0000
@@ -0,0 +1,17 @@
+Description: Replace PATH_MAX, unsupported on Hurd, with fixed size as in
+ src/posix/filesystem.c
+Author: Gabriele Giacone <1o5g4r8o@gmail.com>
+--- a/modules/gui/skins2/src/theme_loader.cpp
++++ b/modules/gui/skins2/src/theme_loader.cpp
+@@ -509,7 +509,10 @@ int tar_extract_all( TAR *t, char *prefi
+     union tar_buffer buffer;
+     int   len, err, getheader = 1, remaining = 0;
+     FILE  *outfile = NULL;
+-    char  fname[BLOCKSIZE + PATH_MAX];
++
++    long path_max = pathconf (".", _PC_PATH_MAX);
++    size_t maxsize = (path_max == -1 || path_max > 4096) ? 4096 : path_max;
++    char  fname[BLOCKSIZE + maxsize];
+ 
+     while( 1 )
+     {
diff -Nru vlc-2.2.0~pre4/debian/patches/hurd.patch vlc-2.2.0~pre4/debian/patches/hurd.patch
--- vlc-2.2.0~pre4/debian/patches/hurd.patch	1970-01-01 00:00:00.000000000 +0000
+++ vlc-2.2.0~pre4/debian/patches/hurd.patch	2014-10-16 10:45:42.000000000 +0000
@@ -0,0 +1,40 @@
+Description: Fix FTBFS on GNU/Hurd
+ On Hurd, due to a missing implementation _POSIX_TIMERS = 0,
+ _POSIX_MONOTONIC_CLOCK [0] and _POSIX_CLOCK_SELECTION = 200809L. Such
+ combination is considered non POSIX-compliant by vlc upstream which
+ don't accept patches to workaround it. More info at [1,2].
+ .
+ [0] http://anonscm.debian.org/viewvc/pkg-glibc/glibc-package/trunk/debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff?revision=5951&view=markup
+ [1] https://lists.debian.org/debian-hurd/2014/02/msg00112.html
+ [2] https://lists.debian.org/debian-hurd/2014/02/msg00118.html
+Author: Gabriele Giacone <1o5g4r8o@gmail.com>
+Forwarded: not-needed
+--- a/src/posix/thread.c
++++ b/src/posix/thread.c
+@@ -300,7 +300,7 @@ void vlc_cond_init (vlc_cond_t *p_condva
+ 
+     if (unlikely(pthread_condattr_init (&attr)))
+         abort ();
+-#if (_POSIX_CLOCK_SELECTION > 0)
++#if (_POSIX_TIMERS > 0) && (_POSIX_CLOCK_SELECTION > 0)
+     vlc_clock_setup ();
+     pthread_condattr_setclock (&attr, vlc_clock_id);
+ #endif
+@@ -874,7 +874,7 @@ mtime_t mdate (void)
+  */
+ void mwait (mtime_t deadline)
+ {
+-#if (_POSIX_CLOCK_SELECTION > 0)
++#if (_POSIX_TIMERS > 0) && (_POSIX_CLOCK_SELECTION > 0)
+     vlc_clock_setup ();
+     /* If the deadline is already elapsed, or within the clock precision,
+      * do not even bother the system timer. */
+@@ -901,7 +901,7 @@ void msleep (mtime_t delay)
+ {
+     struct timespec ts = mtime_to_ts (delay);
+ 
+-#if (_POSIX_CLOCK_SELECTION > 0)
++#if (_POSIX_TIMERS > 0) && (_POSIX_CLOCK_SELECTION > 0)
+     vlc_clock_setup ();
+     while (clock_nanosleep (vlc_clock_id, 0, &ts, &ts) == EINTR);
+ 
diff -Nru vlc-2.2.0~pre4/debian/patches/series vlc-2.2.0~pre4/debian/patches/series
--- vlc-2.2.0~pre4/debian/patches/series	1970-01-01 00:00:00.000000000 +0000
+++ vlc-2.2.0~pre4/debian/patches/series	2014-10-16 10:43:23.000000000 +0000
@@ -0,0 +1,2 @@
+hurd.patch
+hurd-path_max.patch
diff -Nru vlc-2.2.0~pre4/debian/rules vlc-2.2.0~pre4/debian/rules
--- vlc-2.2.0~pre4/debian/rules	2014-10-06 16:26:28.000000000 +0000
+++ vlc-2.2.0~pre4/debian/rules	2014-10-15 00:40:34.000000000 +0000
@@ -89,7 +89,6 @@
 	--enable-shine \
 	--enable-shout \
 	--enable-skins2 \
-	--enable-smbclient \
 	--enable-speex \
 	--enable-svg \
 	--enable-taglib \
@@ -183,9 +182,9 @@
 
 # Linux and kFreeBSD specific flags (disabled on Hurd)
 ifeq (,$(filter-out linux kfreebsd,$(DEB_HOST_ARCH_OS)))
-confflags += --enable-libva --enable-vcd
+confflags += --enable-libva --enable-vcd --enable-smbclient
 else
-confflags += --disable-libva --disable-vcd
+confflags += --disable-libva --disable-vcd --disable-smbclient
 removeplugins += cdda libvaapi vcd
 endif
 

Reply to: