all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#46113] [PATCH] gnu: obs: Update obs to fb347c.
@ 2021-01-26 15:59 Andrew Tropin
  2021-01-26 16:26 ` Andrew Tropin
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Andrew Tropin @ 2021-01-26 15:59 UTC (permalink / raw)
  To: 46113


This version of obs adds support for OBS_PLUGINS*_PATH environment variables,
which are required to be able to load plugins, which are present in profile.

It will make it possible for following packages to work:
http://issues.guix.gnu.org/45961
http://issues.guix.gnu.org/45960

* gnu/packages/video.scm (obs): Update to fb347c.
---
 gnu/packages/video.scm | 116 ++++++++++++++++++++++-------------------
 1 file changed, 63 insertions(+), 53 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 28cde06f04..0f9b405261 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3076,62 +3076,72 @@ be used for realtime video capture via Linux-specific APIs.")
     (license (list license:lgpl2.1+ license:gpl2))))
 
 (define-public obs
-  (package
-    (name "obs")
-    (version "26.1.0")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/obsproject/obs-studio")
-                    (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "0p8wdzm9imn3s17arr206sz92g4pkacfcpfbwvhvgkrrs4w000bx"))))
-    (build-system cmake-build-system)
-    (arguments
-     `(#:configure-flags
-       (list (string-append "-DOBS_VERSION_OVERRIDE=" ,version)
-             "-DENABLE_UNIT_TESTS=TRUE")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'install 'wrap-executable
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (plugin-path (getenv "QT_PLUGIN_PATH")))
-               (wrap-program (string-append out "/bin/obs")
-                 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
-             #t)))))
-    (native-inputs
-     `(("cmocka" ,cmocka)
-       ("pkg-config" ,pkg-config)))
-    (inputs
-     `(("alsa-lib" ,alsa-lib)
-       ("curl" ,curl)
-       ("eudev" ,eudev)
-       ("ffmpeg" ,ffmpeg)
-       ("fontconfig" ,fontconfig)
-       ("freetype" ,freetype)
-       ("jack" ,jack-1)
-       ("jansson" ,jansson)
-       ("libx264" ,libx264)
-       ("libxcomposite" ,libxcomposite)
-       ("mbedtls" ,mbedtls-apache)
-       ("mesa" ,mesa)
-       ("pulseaudio" ,pulseaudio)
-       ("qtbase" ,qtbase)
-       ("qtsvg" ,qtsvg)
-       ("qtx11extras" ,qtx11extras)
-       ("speexdsp" ,speexdsp)
-       ("v4l-utils" ,v4l-utils)
-       ("zlib" ,zlib)))
-    (synopsis "Live streaming software")
-    (description "Open Broadcaster Software provides a graphical interface for
+  (let ((commit "fb347c3c62ced2ea302769e449d300fd923c2d4b")
+        (revision "1"))
+    (package
+      (name "obs")
+      (version (git-version "26.1.2" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/obsproject/obs-studio")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "017llgj1hlfvk2622qa44d8iz6d0kahhckn421dypj09a4n6aajz"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:configure-flags
+         (list (string-append "-DOBS_VERSION_OVERRIDE=" ,version)
+               "-DENABLE_UNIT_TESTS=TRUE")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'wrap-executable
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (plugin-path (getenv "QT_PLUGIN_PATH")))
+                 (wrap-program (string-append out "/bin/obs")
+                   `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
+               #t)))))
+      (native-inputs
+       `(("cmocka" ,cmocka)
+         ("pkg-config" ,pkg-config)))
+      (inputs
+       `(("alsa-lib" ,alsa-lib)
+         ("curl" ,curl)
+         ("eudev" ,eudev)
+         ("ffmpeg" ,ffmpeg)
+         ("fontconfig" ,fontconfig)
+         ("freetype" ,freetype)
+         ("jack" ,jack-1)
+         ("jansson" ,jansson)
+         ("libx264" ,libx264)
+         ("libxcomposite" ,libxcomposite)
+         ("mbedtls" ,mbedtls-apache)
+         ("mesa" ,mesa)
+         ("pulseaudio" ,pulseaudio)
+         ("qtbase" ,qtbase)
+         ("qtsvg" ,qtsvg)
+         ("qtx11extras" ,qtx11extras)
+         ("speexdsp" ,speexdsp)
+         ("v4l-utils" ,v4l-utils)
+         ("zlib" ,zlib)))
+      (native-search-paths
+       (list
+        (search-path-specification
+         (variable "OBS_PLUGINS_DATA_PATH")
+         (files '("share/obs/obs-plugins")))
+        (search-path-specification
+         (variable "OBS_PLUGINS_PATH")
+         (files '("lib/obs-plugins")))))
+      (synopsis "Live streaming software")
+      (description "Open Broadcaster Software provides a graphical interface for
 video recording and live streaming.  OBS supports capturing audio and video
 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
 and JACK.")
-    (home-page "https://obsproject.com")
-    (license license:gpl2+)))
+      (home-page "https://obsproject.com")
+      (license license:gpl2+))))
 
 (define-public libvdpau
   (package
-- 
2.30.0





^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#46113] [PATCH] gnu: obs: Update obs to fb347c.
  2021-01-26 15:59 [bug#46113] [PATCH] gnu: obs: Update obs to fb347c Andrew Tropin
@ 2021-01-26 16:26 ` Andrew Tropin
  2021-01-27  7:27   ` Alexey Abramov
  2021-01-26 21:10 ` Leo Famulari
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Andrew Tropin @ 2021-01-26 16:26 UTC (permalink / raw)
  To: 46113

It's a commit from master branch containing changes from PR:
https://github.com/obsproject/obs-studio/pull/4067

It's just few commits after 26.1.2 and it seems there is no any big
changes since that and should be safe to use.

I asked for 26.1.3 tag, but it seems that it won't happen in nearest
future: https://github.com/obsproject/obs-studio/issues/4100

As one of developers said to me, usually obs releases once in 3-4
months, that is why I decided to use a commit instead of tag.

The changes is needed to be able to specify plugin load path using
native-search-paths to be able to package obs plugins with guix.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#46113] [PATCH] gnu: obs: Update obs to fb347c.
  2021-01-26 15:59 [bug#46113] [PATCH] gnu: obs: Update obs to fb347c Andrew Tropin
  2021-01-26 16:26 ` Andrew Tropin
@ 2021-01-26 21:10 ` Leo Famulari
  2021-01-27  9:36 ` Andrew Tropin
  2021-01-27  9:45 ` [bug#46113] [PATCH] gnu: obs: Update " Andrew Tropin
  3 siblings, 0 replies; 10+ messages in thread
From: Leo Famulari @ 2021-01-26 21:10 UTC (permalink / raw)
  To: Andrew Tropin; +Cc: 46113

On Tue, Jan 26, 2021 at 06:59:39PM +0300, Andrew Tropin wrote:
> 
> This version of obs adds support for OBS_PLUGINS*_PATH environment variables,
> which are required to be able to load plugins, which are present in profile.
> 
> It will make it possible for following packages to work:
> http://issues.guix.gnu.org/45961
> http://issues.guix.gnu.org/45960

Thanks!

Your patch doesn't apply to the current master branch. Can you rebase it
and send a revision?




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#46113] [PATCH] gnu: obs: Update obs to fb347c.
  2021-01-26 16:26 ` Andrew Tropin
@ 2021-01-27  7:27   ` Alexey Abramov
  0 siblings, 0 replies; 10+ messages in thread
From: Alexey Abramov @ 2021-01-27  7:27 UTC (permalink / raw)
  To: Andrew Tropin; +Cc: 46113

Hi Adrew,

I patched obs here [1]. I checked the upstream patch, and noticed that it ammends AddExtraModulePaths function. With Guix the list of plugin directories will contain *two* locations with the very same plugins, one with the obs store and guix-profile, hence obs will print 'Duplicate library?' warning messages.

I packaged the main location to avoid such a message.

Footnotes:
[1]  https://issues.guix.gnu.org/45707

-- 
Alexey




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#46113] [PATCH] gnu: obs: Update obs to fb347c.
  2021-01-26 15:59 [bug#46113] [PATCH] gnu: obs: Update obs to fb347c Andrew Tropin
  2021-01-26 16:26 ` Andrew Tropin
  2021-01-26 21:10 ` Leo Famulari
@ 2021-01-27  9:36 ` Andrew Tropin
  2021-01-27  9:45 ` [bug#46113] [PATCH] gnu: obs: Update " Andrew Tropin
  3 siblings, 0 replies; 10+ messages in thread
From: Andrew Tropin @ 2021-01-27  9:36 UTC (permalink / raw)
  To: Alexey Abramov; +Cc: 46113


> I patched obs here [1]. I checked the upstream patch, and noticed that
> it ammends AddExtraModulePaths function. With Guix the list of plugin
> directories will contain *two* locations with the very same plugins,
> one with the obs store and guix-profile, hence obs will print
> 'Duplicate library?' warning messages.

It's very true, obs, will have same plugins in load paths twice, but
from what I found the problem will happen only during shutdown of obs,
when it will try to unload the same plugin twice, which doesn't affect
runtime anyhow. I had a small workaround for that (a separate
envirnoment variable, which toggles the loading of plugins from
INSTALL_PREFIX), but during review one of obs mantainers said that it's
an adhoc solution and better to solve this problem in general. The
comment from @kkartaltepe and related changes [fn:1].

The other solution was to check if OBS_PLUGINS_PATH is present and ommit
loading of builtin plugins in that case, but it will break in case
someone wants to specify just additional plugin load path (some non-guix
use case).

I decided to go without any fix to that problem as it is not directly
related to changeset I proposed and doesn't affect runtime, but it's
probably a good idea to report double free on shutdown issue to
upstream.

* Footnotes

[fn:1] https://github.com/obsproject/obs-studio/pull/4067 




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#46113] [PATCH] gnu: obs: Update to fb347c.
  2021-01-26 15:59 [bug#46113] [PATCH] gnu: obs: Update obs to fb347c Andrew Tropin
                   ` (2 preceding siblings ...)
  2021-01-27  9:36 ` Andrew Tropin
@ 2021-01-27  9:45 ` Andrew Tropin
  2021-02-02  0:48   ` Leo Famulari
  3 siblings, 1 reply; 10+ messages in thread
From: Andrew Tropin @ 2021-01-27  9:45 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 46113


This version of obs adds support for OBS_PLUGINS*_PATH environment variables,
which are required to be able to load plugins, which are present in profile.

It will make it possible for following packages to work:
http://issues.guix.gnu.org/45961
http://issues.guix.gnu.org/45960

* gnu/packages/video.scm (obs): Update to fb347c.
---
 gnu/packages/video.scm | 116 ++++++++++++++++++++++-------------------
 1 file changed, 63 insertions(+), 53 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 97cb7d6837..f9741dc843 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3077,62 +3077,72 @@ be used for realtime video capture via Linux-specific APIs.")
     (license (list license:lgpl2.1+ license:gpl2))))
 
 (define-public obs
-  (package
-    (name "obs")
-    (version "26.1.2")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/obsproject/obs-studio")
-                    (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "1k1asqiqw757v59ayx0w029ril947hs0lcp8n91knzjl891fr4nc"))))
-    (build-system cmake-build-system)
-    (arguments
-     `(#:configure-flags
-       (list (string-append "-DOBS_VERSION_OVERRIDE=" ,version)
-             "-DENABLE_UNIT_TESTS=TRUE")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'install 'wrap-executable
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (plugin-path (getenv "QT_PLUGIN_PATH")))
-               (wrap-program (string-append out "/bin/obs")
-                 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
-             #t)))))
-    (native-inputs
-     `(("cmocka" ,cmocka)
-       ("pkg-config" ,pkg-config)))
-    (inputs
-     `(("alsa-lib" ,alsa-lib)
-       ("curl" ,curl)
-       ("eudev" ,eudev)
-       ("ffmpeg" ,ffmpeg)
-       ("fontconfig" ,fontconfig)
-       ("freetype" ,freetype)
-       ("jack" ,jack-1)
-       ("jansson" ,jansson)
-       ("libx264" ,libx264)
-       ("libxcomposite" ,libxcomposite)
-       ("mbedtls" ,mbedtls-apache)
-       ("mesa" ,mesa)
-       ("pulseaudio" ,pulseaudio)
-       ("qtbase" ,qtbase)
-       ("qtsvg" ,qtsvg)
-       ("qtx11extras" ,qtx11extras)
-       ("speexdsp" ,speexdsp)
-       ("v4l-utils" ,v4l-utils)
-       ("zlib" ,zlib)))
-    (synopsis "Live streaming software")
-    (description "Open Broadcaster Software provides a graphical interface for
+  (let ((commit "fb347c3c62ced2ea302769e449d300fd923c2d4b")
+        (revision "1"))
+    (package
+      (name "obs")
+      (version (git-version "26.1.2" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/obsproject/obs-studio")
+                      (commit version)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "017llgj1hlfvk2622qa44d8iz6d0kahhckn421dypj09a4n6aajz"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:configure-flags
+         (list (string-append "-DOBS_VERSION_OVERRIDE=" ,version)
+               "-DENABLE_UNIT_TESTS=TRUE")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'wrap-executable
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (plugin-path (getenv "QT_PLUGIN_PATH")))
+                 (wrap-program (string-append out "/bin/obs")
+                   `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
+               #t)))))
+      (native-inputs
+       `(("cmocka" ,cmocka)
+         ("pkg-config" ,pkg-config)))
+      (inputs
+       `(("alsa-lib" ,alsa-lib)
+         ("curl" ,curl)
+         ("eudev" ,eudev)
+         ("ffmpeg" ,ffmpeg)
+         ("fontconfig" ,fontconfig)
+         ("freetype" ,freetype)
+         ("jack" ,jack-1)
+         ("jansson" ,jansson)
+         ("libx264" ,libx264)
+         ("libxcomposite" ,libxcomposite)
+         ("mbedtls" ,mbedtls-apache)
+         ("mesa" ,mesa)
+         ("pulseaudio" ,pulseaudio)
+         ("qtbase" ,qtbase)
+         ("qtsvg" ,qtsvg)
+         ("qtx11extras" ,qtx11extras)
+         ("speexdsp" ,speexdsp)
+         ("v4l-utils" ,v4l-utils)
+         ("zlib" ,zlib)))
+      (native-search-paths
+       (list
+        (search-path-specification
+         (variable "OBS_PLUGINS_DATA_PATH")
+         (files '("share/obs/obs-plugins")))
+        (search-path-specification
+         (variable "OBS_PLUGINS_PATH")
+         (files '("lib/obs-plugins")))))
+      (synopsis "Live streaming software")
+      (description "Open Broadcaster Software provides a graphical interface for
 video recording and live streaming.  OBS supports capturing audio and video
 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
 and JACK.")
-    (home-page "https://obsproject.com")
-    (license license:gpl2+)))
+      (home-page "https://obsproject.com")
+      (license license:gpl2+))))
 
 (define-public libvdpau
   (package
-- 
2.30.0





^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#46113] [PATCH] gnu: obs: Update to fb347c.
  2021-01-27  9:45 ` [bug#46113] [PATCH] gnu: obs: Update " Andrew Tropin
@ 2021-02-02  0:48   ` Leo Famulari
  2021-02-02 11:39     ` Andrew Tropin
  0 siblings, 1 reply; 10+ messages in thread
From: Leo Famulari @ 2021-02-02  0:48 UTC (permalink / raw)
  To: Andrew Tropin; +Cc: 46113

On Wed, Jan 27, 2021 at 12:45:30PM +0300, Andrew Tropin wrote:
> This version of obs adds support for OBS_PLUGINS*_PATH environment variables,
> which are required to be able to load plugins, which are present in profile.
> 
> It will make it possible for following packages to work:
> http://issues.guix.gnu.org/45961
> http://issues.guix.gnu.org/45960
> 
> * gnu/packages/video.scm (obs): Update to fb347c.

Thanks for this!

I'm wondering, instead of building from a Git commit, can we cherry-pick
the commit as a patch?

https://github.com/obsproject/obs-studio/commit/fb347c3c62ced2ea302769e449d300fd923c2d4b.patch

Does it work if we apply that to the 26.1.2 release?

It would be a little more precise.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#46113] [PATCH] gnu: obs: Update to fb347c.
  2021-02-02  0:48   ` Leo Famulari
@ 2021-02-02 11:39     ` Andrew Tropin
  2021-02-02 19:33       ` Leo Famulari
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Tropin @ 2021-02-02 11:39 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 46113

Hello Leo!

> Does it work if we apply that to the 26.1.2 release?

It should work, originally I wrote a patch for 26.1.2 and later rebased
the commit on master without any conflicts.

> It would be a little more precise.

There was a discussion on irc about it and at the end of the day I would
prefer to use the commit from master branch, rather than maintaining a
separate patch, which we will need to remove later, when 26.1.3 or
another version will be released.

There were not so many changes since 26.1.2 up to the fb347c, I fluently
went through them, they are mostly minor and were accepted after the
pretty strict code review process.

From what I know it should be safe to use this commit, but I can contact
upstream devs and additionally clarify that.

Overall I'm ok with using an exact patch, but prefer using a commit from
master. WDYT?


-- 
Best regards,
Andrew Tropin




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#46113] [PATCH] gnu: obs: Update to fb347c.
  2021-02-02 11:39     ` Andrew Tropin
@ 2021-02-02 19:33       ` Leo Famulari
  2021-02-02 19:43         ` Andrew Tropin
  0 siblings, 1 reply; 10+ messages in thread
From: Leo Famulari @ 2021-02-02 19:33 UTC (permalink / raw)
  To: Andrew Tropin; +Cc: 46113

On Tue, Feb 02, 2021 at 02:39:03PM +0300, Andrew Tropin wrote:
> > Does it work if we apply that to the 26.1.2 release?
> 
> It should work, originally I wrote a patch for 26.1.2 and later rebased
> the commit on master without any conflicts.
> 
> > It would be a little more precise.
> 
> There was a discussion on irc about it and at the end of the day I would
> prefer to use the commit from master branch, rather than maintaining a
> separate patch, which we will need to remove later, when 26.1.3 or
> another version will be released.
> 
> There were not so many changes since 26.1.2 up to the fb347c, I fluently
> went through them, they are mostly minor and were accepted after the
> pretty strict code review process.
> 
> From what I know it should be safe to use this commit, but I can contact
> upstream devs and additionally clarify that.
> 
> Overall I'm ok with using an exact patch, but prefer using a commit from
> master. WDYT?

Thanks for explaining the process you went through. Based on that, I
agree that your patch is good as proposed.

The patch file doesn't apply to current master. It looks like some other
changes regarding this plugins problem have been done to the obs package
since your changes were made.

Can you rebase it on your end and re-generate the patch? Or is it still
necessary?




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#46113] [PATCH] gnu: obs: Update to fb347c.
  2021-02-02 19:33       ` Leo Famulari
@ 2021-02-02 19:43         ` Andrew Tropin
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Tropin @ 2021-02-02 19:43 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 46113

> Thanks for explaining the process you went through. Based on that, I
> agree that your patch is good as proposed.
>
> The patch file doesn't apply to the current master. It looks like some other
> changes regarding this plugins problem have been done to the obs package
> since your changes were made.
>
> Can you rebase it on your end and re-generate the patch? Or is it still
> necessary?

I'll post to the related thread first https://issues.guix.gnu.org/45707
to discuss what we can do about that situation, and will post back here,
when we will reach some agreement.

-- 
Best regards,
Andrew Tropin




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-02-02 19:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26 15:59 [bug#46113] [PATCH] gnu: obs: Update obs to fb347c Andrew Tropin
2021-01-26 16:26 ` Andrew Tropin
2021-01-27  7:27   ` Alexey Abramov
2021-01-26 21:10 ` Leo Famulari
2021-01-27  9:36 ` Andrew Tropin
2021-01-27  9:45 ` [bug#46113] [PATCH] gnu: obs: Update " Andrew Tropin
2021-02-02  0:48   ` Leo Famulari
2021-02-02 11:39     ` Andrew Tropin
2021-02-02 19:33       ` Leo Famulari
2021-02-02 19:43         ` Andrew Tropin

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.