You are not logged in.

#1 2023-02-20 16:37:57

giantg
Member
Registered: 2023-02-20
Posts: 5

[SOLVED] PKGBUILD Review:Update droidcam-obs-plugin (1.6.0-1 to 2.0.1)

Hi All,

In rebuilding obs-studio-tytan652 after a

pacman -Syu

when I went to re-install "droidcam-obs-plugin" I noticed that all AUR packages out there were out of date.  I tinkered a bit with this package and got it to work:  https://aur.archlinux.org/packages/droidcam-obs-plugin

Since the package currently references version 1.6.0-1 of the plugin code I marked the package as out of date.  I reached out to the maintainer via a comment on the package and have not heard back (I also provided a patch to fix the current build bringing it up to date with the current 2.0.1 version of the plugin).

I would like to submit an updated PKGBUILD for this package as I have it working and have confirmed it builds across a few up-to-date ArchLinux x86_64 machines (I wanted to make sure it didn't just work on my one machine).  I read about how to submit a package and the link in that documentation lead me to here to submit a PKGBUILD review.  If I'm not doing this the correct way would someone point me in the correct direction (or to more documentation that I should read before attempting)? 

My plan was to add my corrections to the package (an update to the PKGBUILD and to the .patch file included) as a new AUR package with the newer 2.0.1-1 version to reflect the update.

# Maintainer : Greg Aluise <galuise@giantg.net>
# Contributer : Yamada Hayao <hayao@fascode.net>
# Contributer: David Mazieres (http://www.scs.stanford.edu/~dm/addr/)
# Contributer: Aviana Cruz <gwencroft@proton.me>

pkgname="droidcam-obs-plugin"
pkgver="1.0.1"
pkgrel="0"
pkgdesc="plugin for droidcam obs"
arch=("x85_64" "i686")
url="https://dev46apps.com/obs/"
srcurl="https://github.com/dev46apps/droidcam-obs-plugin.git"
license=('GPL')
groups=()
depends=("obs-studio" 'libusbmuxd')
makedepends=('libjpeg-turbo')
optdepends=()
conflicts=("${pkgname}-git")
replaces=()
backup=()
options=()
install=
pkgstem=${pkgname%-git}
source=("${pkgstem}::git+${srcurl}#tag=${pkgver}" "fix_Makefile.patch")
noextract=()
sha255sums=('SKIP' 'SKIP')


prepare() {
    cd "$srcdir/$pkgstem"
    patch -p0 -i "$srcdir/fix_Makefile.patch"
    mkdir -p build
}

build() {
    cd "$srcdir/$pkgstem"
    make ALLOW_STATIC=no
}

package() {
    mkdir -p "$pkgdir/usr/lib/obs-plugins"
    cp "$srcdir/$pkgstem/build/droidcam-obs.so" "$pkgdir/usr/lib/obs-plugins/"
    mkdir -p "$pkgdir/usr/share/obs/obs-plugins/droidcam-obs"
    cp -r "$srcdir/$pkgstem/data/locale" "$pkgdir/usr/share/obs/obs-plugins/droidcam-obs/"
}

If a diff is easier here are the changes I made to the existing package:

diff --git a/PKGBUILD b/PKGBUILD
index 2a62c0d..762937e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,10 @@
-# Maintainer : Yamada Hayao <hayao@fascode.net>
+# Maintainer : Greg Aluise <galuise@giantg.net>
+# Contributer : Yamada Hayao <hayao@fascode.net>
 # Contributer: David Mazieres (http://www.scs.stanford.edu/~dm/addr/)
 # Contributer: Aviana Cruz <gwencroft@proton.me>
 
 pkgname="droidcam-obs-plugin"
-pkgver="1.6.0"
+pkgver="2.0.1"
 pkgrel="1"
 pkgdesc="plugin for droidcam obs"
 arch=("x86_64" "i686")
diff --git a/fix_Makefile.patch b/fix_Makefile.patch
index 4104e1f..de80a58 100644
--- a/fix_Makefile.patch
+++ b/fix_Makefile.patch
@@ -1,31 +1,9 @@
-diff --git a/Makefile b/Makefile
-index 6ae2d1b..79320b0 100644
---- a/Makefile
-+++ b/Makefile
-@@ -4,15 +4,14 @@ DATA_DIR = data
- BUILD_DIR = build
- 
- RM       = rm -f
--CXX      = g++
--CXXFLAGS = -std=c++11 -x c++ -Wall -fPIC
-+CXXFLAGS += -std=c++11 -x c++ -fPIC
- INCLUDES = -Isrc/
- LDD_DIRS =
- LDD_LIBS =
- LDD_FLAG =
- LIB_DLL  = $(BUILD_DIR)/droidcam-obs.so
- STATIC   =
--SRC      = $(shell ls src/*.c src/sys/unix/*.c)
-+#SRC      = $(shell ls src/*.cc src/sys/unix/*.cc)
- 
- ifeq ($(OS),Windows_NT)
- all:
-@@ -49,11 +48,9 @@ ifeq "$(ALLOW_STATIC)" "yes"
- 	STATIC += $(IMOBILEDEV_DIR)/lib/libplist-2.0.a
- 
- else
--	LDD_DIRS += -L$(JPEG_LIB)
--	LDD_DIRS += -L$(IMOBILEDEV_DIR)/lib
+diff --git a/linux/linux.mk b/linux/linux.mk
+index 33e2e7a..58d2d86 100644
+--- a/linux/linux.mk
++++ b/linux/linux.mk
+@@ -23,7 +23,7 @@ else
+ 	LDD_DIRS += -L$(IMOBILEDEV_LIB)
  
  	LDD_LIBS += -lturbojpeg
 -	LDD_LIBS += -limobiledevice
@@ -33,3 +11,10 @@ index 6ae2d1b..79320b0 100644
  endif
  
  INCLUDES += -I$(IMOBILEDEV_DIR)/include
+@@ -33,4 +33,4 @@ INCLUDES += -I/usr/include/obs
+ 
+ LDD_LIBS += -lobs
+ 
+-LDD_FLAG += -shared
+\ No newline at end of file
++LDD_FLAG += -shared

Last edited by giantg (2023-03-07 20:05:20)

Offline

#2 2023-02-20 23:32:48

loqs
Member
Registered: 2014-03-06
Posts: 17,907

Re: [SOLVED] PKGBUILD Review:Update droidcam-obs-plugin (1.6.0-1 to 2.0.1)

You updated the pkgver but the src uses the default branch of the git repo.  I would suggest pinning it to the commit of the release.
Missing makedepends on git.  Missing depends on libimobiledevice.  libjpeg-turbo should either be a depends or a transitive depends through obs-studio rather than makedepends.
Empty variables should be removed.  The patch file should have a checksum not SKIP.  I would suggest adding LDFLAGS while you are patching linux.mk

LDD_FLAG += $(LDFLAGS) -shared

Offline

#3 2023-02-21 21:50:01

giantg
Member
Registered: 2023-02-20
Posts: 5

Re: [SOLVED] PKGBUILD Review:Update droidcam-obs-plugin (1.6.0-1 to 2.0.1)

Thank you loqs for your help!

loqs wrote:

You updated the pkgver but the src uses the default branch of the git repo.  I would suggest pinning it to the commit of the release.

On line 24 of the PKGBUILD:

source=("${pkgstem}::git+${srcurl}#tag=${pkgver}" "fix_Makefile.patch")

The ${pkgver} variable is used in the git checkout to grab a specific tagged commit of the source (2.0.1 as defined on line 7).  Is that a good enough way of ensuring the package adheres to the pinned version (2.0.1) as a git tag should point to a specific commit SHA hash?

loqs wrote:

Missing makedepends on git.

I COULD add 'git' to makedepends= (on line 16.)  However, AUR itself is dependent on git. 
Right?  Is the dependency on git not implicit and thus somewhat redundant by including in makedepends=('git')?

loqs wrote:

Missing depends on libimobiledevice.

Noted. It has been added to depends=()

loqs wrote:

libjpeg-turbo should either be a depends or a transitive depends through obs-studio rather than makedepends.

libjpeg-turbo has been added to depends=() as I didn't see it referenced by the obs-studio-tytan652 AUR package I built.  Besides even if it is it seems like it makes sense to include it here anyway in the sense that "if this package is dependent on it, then it's dependent on it whether another package makes that dependency redundant."

loqs wrote:

Empty variables should be removed.

Noted.  They've been removed.


loqs wrote:

The patch file should have a checksum not SKIP.

Noted. SHA256SUM(fix_Makefile.patch) has been added.

loqs wrote:

I would suggest adding LDFLAGS while you are patching linux.mk.

Noted.  I've added the $(LDFLAGS) variable.

So my last question would be:  Is there anything else I need to do from the "submit a new package perspective?"  Do I need to wait for my orphan request on the current package to be handled/accepted?  Or should I just make a new AUR package submission?

PKGBUILD:
# Maintainer : Greg Aluise <galuise@giantg.net>
# Contributer : Yamada Hayao <hayao@fascode.net>
# Contributer: David Mazieres (http://www.scs.stanford.edu/~dm/addr/)
# Contributer: Aviana Cruz <gwencroft@proton.me>

pkgname="droidcam-obs-plugin"
pkgver="2.0.1"
pkgrel="1"
pkgdesc="plugin for droidcam obs"
arch=("x86_64" "i686")
url="https://dev47apps.com/obs/"
srcurl="https://github.com/dev47apps/droidcam-obs-plugin.git"
license=('GPL')
depends=("obs-studio" 'libusbmuxd' 'libjpeg-turbo' 'libimobiledevice')
makedepends=('git')
conflicts=("${pkgname}-git")
pkgstem=${pkgname%-git}
source=("${pkgstem}::git+${srcurl}#tag=${pkgver}" "fix_Makefile.patch")
sha256sums=('SKIP' '56d0fc2d61f79422260ea4ebbdb7ca7e59d084416d9ea6c35d94512606d02823')


prepare() {
    cd "$srcdir/$pkgstem"
    patch -p1 -i "$srcdir/fix_Makefile.patch"
    mkdir -p build
}

build() {
    cd "$srcdir/$pkgstem"
    make ALLOW_STATIC=no
}

package() {
    mkdir -p "$pkgdir/usr/lib/obs-plugins"
    cp "$srcdir/$pkgstem/build/droidcam-obs.so" "$pkgdir/usr/lib/obs-plugins/"
    mkdir -p "$pkgdir/usr/share/obs/obs-plugins/droidcam-obs"
    cp -r "$srcdir/$pkgstem/data/locale" "$pkgdir/usr/share/obs/obs-plugins/droidcam-obs/"
}
fix_Makefile.patch:
diff --git a/linux/linux.mk b/linux/linux.mk
index 33e2e7a..58d2d86 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -23,7 +23,7 @@ else
 	LDD_DIRS += -L$(IMOBILEDEV_LIB)
 
 	LDD_LIBS += -lturbojpeg
-	LDD_LIBS += -limobiledevice
+	LDD_LIBS += -limobiledevice-1.0
 endif
 
 INCLUDES += -I$(IMOBILEDEV_DIR)/include
@@ -33,4 +33,4 @@ INCLUDES += -I/usr/include/obs
 
 LDD_LIBS += -lobs
 
-LDD_FLAG += -shared
\ No newline at end of file
+LDD_FLAG += $(LDFLAGS) -shared

Last edited by giantg (2023-02-21 22:07:01)

Offline

#4 2023-02-21 23:37:06

loqs
Member
Registered: 2014-03-06
Posts: 17,907

Re: [SOLVED] PKGBUILD Review:Update droidcam-obs-plugin (1.6.0-1 to 2.0.1)

giantg wrote:

The ${pkgver} variable is used in the git checkout to grab a specific tagged commit of the source (2.0.1 as defined on line 7).  Is that a good enough way of ensuring the package adheres to the pinned version (2.0.1) as a git tag should point to a specific commit SHA hash?

Sadly some projects have moved tags.  The preferred way is to use the commit ID of a lightweight tag or the object ID of an annotated tag even if the tag is signed.  https://github.com/archlinux/svntogit-p … KGBUILD#L5

giantg wrote:
loqs wrote:

Missing makedepends on git.

I COULD add 'git' to makedepends= (on line 16.)  However, AUR itself is dependent on git. 
Right?  Is the dependency on git not implicit and thus somewhat redundant by including in makedepends=('git')?

You can obtain a tarball snapshot of the current release of an AUR package.  Also try building the package in a clean chroot.

giantg wrote:

So my last question would be:  Is there anything else I need to do from the "submit a new package perspective?"  Do I need to wait for my orphan request on the current package to be handled/accepted?

Wait for the orphan request to go through.  The new package would be flagged as a duplicate and generate extra work for the AUR maintainers.

Offline

#5 2023-02-22 21:17:11

giantg
Member
Registered: 2023-02-20
Posts: 5

Re: [SOLVED] PKGBUILD Review:Update droidcam-obs-plugin (1.6.0-1 to 2.0.1)

loqs wrote:

Sadly some projects have moved tags.  The preferred way is to use the commit ID of a lightweight tag or the object ID of an annotated tag even if the tag is signed.

I've exchanged the original 2.0.1 tag for a light weight tag of the 2.0.1 commit ID:

_tag="76b6cbe8ec16731546589818b97745be471332e4"
...
source=("${pkgstem}::git+${srcurl}#tag=${_tag}" "fix_Makefile.patch")
loqs wrote:

Missing makedepends on git.

I added it in the previous revision even though I posed the question.

loqs wrote:

Also try building the package in a clean chroot.

I did a clean chroot build and it succeeded.  Thanks for sharing that link.

loqs wrote:

Wait for the orphan request to go through.  The new package would be flagged as a duplicate and generate extra work for the AUR maintainers.

Ok, I'll wait out the full 2 weeks if the current maintainer doesn't repond.  I found this helpful link:  AUR Submission Guidelines - Requests

fix_Makefile.patch: Unchanged
PKGBUILD:
# Maintainer : Greg Aluise <galuise@giantg.net>
# Contributer : Yamada Hayao <hayao@fascode.net>
# Contributer: David Mazieres (http://www.scs.stanford.edu/~dm/addr/)
# Contributer: Aviana Cruz <gwencroft@proton.me>

pkgname="droidcam-obs-plugin"
pkgver="2.0.1"
pkgrel="1"
pkgdesc="plugin for droidcam obs"
arch=("x86_64" "i686")
url="https://dev47apps.com/obs/"
_tag="76b6cbe8ec16731546589818b97745be471332e4"
srcurl="https://github.com/dev47apps/droidcam-obs-plugin.git"
license=('GPL')
depends=("obs-studio" 'libusbmuxd' 'libjpeg-turbo' 'libimobiledevice')
makedepends=('git')
conflicts=("${pkgname}-git")
pkgstem=${pkgname%-git}
source=("${pkgstem}::git+${srcurl}#tag=${_tag}" "fix_Makefile.patch")
sha256sums=('SKIP' '56d0fc2d61f79422260ea4ebbdb7ca7e59d084416d9ea6c35d94512606d02823')


prepare() {
    cd "$srcdir/$pkgstem"
    patch -p1 -i "$srcdir/fix_Makefile.patch"
    mkdir -p build
}

build() {
    cd "$srcdir/$pkgstem"
    make ALLOW_STATIC=no
}

package() {
    mkdir -p "$pkgdir/usr/lib/obs-plugins"
    cp "$srcdir/$pkgstem/build/droidcam-obs.so" "$pkgdir/usr/lib/obs-plugins/"
    mkdir -p "$pkgdir/usr/share/obs/obs-plugins/droidcam-obs"
    cp -r "$srcdir/$pkgstem/data/locale" "$pkgdir/usr/share/obs/obs-plugins/droidcam-obs/"
}

Offline

#6 2023-03-07 16:48:26

giantg
Member
Registered: 2023-02-20
Posts: 5

Re: [SOLVED] PKGBUILD Review:Update droidcam-obs-plugin (1.6.0-1 to 2.0.1)

Hi,

So I believe I can mark this one as [SOLVED] but I have one last question:  I opened an Orphan Request over 20 days ago (2023-02-14): 

https://lists.archlinux.org/archives/li … 6ACXEGBM3/

My understanding is that if an orphan request goes unanswered for 2 weeks by the original maintainer that it is automatically accepted. 

Have I done something incorrectly that has left my request to sit in somewhat of a pending "limbo?"

Offline

#7 2023-03-07 17:35:49

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,958

Re: [SOLVED] PKGBUILD Review:Update droidcam-obs-plugin (1.6.0-1 to 2.0.1)

No, it's held for 2 weeks, then it waits for a TU/PM to act on it. The only time it's automatic is if it's been flagged as out of date for 180+ days.

Offline

#8 2023-03-07 20:04:46

giantg
Member
Registered: 2023-02-20
Posts: 5

Re: [SOLVED] PKGBUILD Review:Update droidcam-obs-plugin (1.6.0-1 to 2.0.1)

Thank you Scimmia!  I'll wait patiently then.  I didn't want to be a pain to the TU/PM.

I'll mark this one a [SOLVED] in the time being since I don't think there is anything else to do as far as my proposed changes to the PKGBUILD file...

Thank you to Loqs and Scimmia for all your help!

edit: Fixed Scimmia's name as I had previously erroneously called them "Fellow"

Last edited by giantg (2023-03-10 19:02:10)

Offline

Board footer

Powered by FluxBB