You are not logged in.
I installed jamin-cvs using yaourt but when I ran it, I got segmentation fault and this problem has been encountered by others as well described on the repository page. However one of the users has written a patch and diff file which make it work. My question is how do you apply this patch during installation? How do you edit the PKGBUILD with the patch? And what is the role of the diff file?
Last edited by d_fajardo (2017-08-25 16:19:00)
Offline
https://wiki.archlinux.org/index.php/Patching_in_ABS
Mod note: Moving to AUR Issues,
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Hi WorMzy. Thanks for the lead. I tried following the wiki and this is what I got.
First of all this is the PKGBUILD:
pkgname=jamin-cvs
pkgver=0.98.3
pkgrel=6
pkgdesc="A JACK Audio Connection Kit Audio Mastering interface"
arch=('i686' 'x86_64')
url="http://jamin.sourceforge.net/"
license=('GPL')
depends=('jack' 'libxml2' 'gtk2' 'swh-plugins' 'fftw' 'liblo')
makedepends=('perl-xml-parser' 'ladspa' 'cvs' 'intltool')
conflicts=('jamin')
provides=('jamin')
options=('!libtool')
install=${pkgname}.install
source=()
md5sums=()
build() {
LDFLAGS="-ldl"
cd "$srcdir"
msg ""
msg ""
msg "Connecting to svs server ..."
msg ""
msg "Press ENTER when asked for password"
cvs -d:pserver:anonymous@jamin.cvs.sourceforge.net:/cvsroot/jamin login
cvs -z3 -d:pserver:anonymous@jamin.cvs.sourceforge.net:/cvsroot/jamin co -P jamin
cd ${srcdir}/jamin
./autogen.sh --prefix=/usr --libdir=/usr/lib
make
}
package() {
cd ${srcdir}/jamin
make DESTDIR=${pkgdir} install
}
And this is how I edited it base on my understanding:
pkgname=jamin-cvs
pkgver=0.98.3
pkgrel=6
pkgdesc="A JACK Audio Connection Kit Audio Mastering interface"
arch=('i686' 'x86_64')
url="http://jamin.sourceforge.net/"
license=('GPL')
depends=('jack' 'libxml2' 'gtk2' 'swh-plugins' 'fftw' 'liblo')
makedepends=('perl-xml-parser' 'ladspa' 'cvs' 'intltool')
conflicts=('jamin')
provides=('jamin')
options=('!libtool')
install=${pkgname}.install
source=('typefix.patch')
md5sums=('a0a18224447f431503471b3dfe1b715c')
prepare() {
cd "$srcdir"
patch -Np1 -i "${srcdir}/typefix.patch"
}
build() {
LDFLAGS="-ldl"
cd "$srcdir"
msg ""
msg ""
msg "Connecting to svs server ..."
msg ""
msg "Press ENTER when asked for password"
cvs -d:pserver:anonymous@jamin.cvs.sourceforge.net:/cvsroot/jamin login
cvs -z3 -d:pserver:anonymous@jamin.cvs.sourceforge.net:/cvsroot/jamin co -P jamin
cd ${srcdir}/jamin
./autogen.sh --prefix=/usr --libdir=/usr/lib
make
}
package() {
cd ${srcdir}/jamin
make DESTDIR=${pkgdir} install
}
Then the installation continues but I get this from the terminal:
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/gtkmeter.c b/src/gtkmeter.c
|index dda8dc9..c1aa9a6 100644
|--- a/src/gtkmeter.c
|+++ b/src/gtkmeter.c
--------------------------
File to patch:
It is obvious I'm not doing it right. What is the right way of doing it?
Offline
It's not your fault, that's a very odd PKGBUILD that you're working with. It's downloading the source files in the build() function instead of following the PKGBUILD standards.
You're trying to patch the source before it's been downloaded, you need to run the patch command after the cvs commands but before autogen.sh.
That original PKGBUILD really needs fixing though, if there really is no way of correctly specifying the download in the source array then this should at least be done in prepara() instead of build(). It's also missing a pkgver() function.
Last edited by Slithery (2017-08-22 22:40:02)
Offline
From PKGBUILD(5):
Currently makepkg supports the Bazaar, Git, Subversion, and Mercurial version control systems. For other
version control systems, manual cloning of upstream repositories must be done in the prepare() function.
CVS is pretty old but at the very least the download should be performed in the prepare() function as slithery said.
EDIT: Is the maintainer still active? If this patch is so necessary, why hasn't it been added to the package already?
Last edited by eschwartz (2017-08-23 01:22:25)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
I don't know if this is still actively manahged. According to the repo page jamin-cvs, the last update was 2016-04-23 and I guess you are right. If this is actively managed, the patch should already be incorporated.
My alternative is to compile from source which I can get from jamin.
From your comments, the question now is can I download the source, write my own PKGBUILD for it and install it from my computer? I can try installing it directly without PKGBUILD but I'd like pacman to be able to account for the packages I install. Besides that really is the Arch way.
Offline
Well, sure you can write your own PKGBUILD. But you might as well use the existing one, and just fix it.
If you cannot reach the maintainer, you can file an orphan request and take over maintenance.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
But you might as well use the existing one, and just fix it.
How do you fix it?
I don't have enough experience to be a maintainer.
Offline
Just move the cvs checkout block to the beginning of prepare() before it runs `patch`:
prepare() {
cd "$srcdir"
msg ""
msg ""
msg "Connecting to svs server ..."
msg ""
msg "Press ENTER when asked for password"
cvs -d:pserver:anonymous@jamin.cvs.sourceforge.net:/cvsroot/jamin login
cvs -z3 -d:pserver:anonymous@jamin.cvs.sourceforge.net:/cvsroot/jamin co -P jamin
cd jamin
patch -Np1 -i "${srcdir}/typefix.patch"
}
EDIT: Sorry! It would really help to cd into the cvs clone before using `patch`.
Last edited by eschwartz (2017-08-23 20:33:14)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Thanks Eschwartz. I can see what you're getting at. I tried it but with no luck. The problem is once the actual source files are downloaded, then the actually installation directory changes. Instead of $srcdir, the actual source files to patch are located in $srcdir/jamin/src and I tried to point typefix.patch but not working. Terminal complains cannot find the files to patch. Any update?
Offline
Instead of $srcdir, the actual source files to patch are located in $srcdir/jamin/src and I tried to point typefix.patch but not working. Terminal complains cannot find the files to patch. Any update?
Just cd into the correct directory before applying the patch.
Offline
The upstream developers also have a git repo on their sourceforge page. It is hidden behind the gtk3 link.
Offline
Sorry. I can't get it to work. Just reflects my inexperience in all of this. I practically copied the typefix.patch within the different levels of the source directory but I'm still getting this:
ogging in to :pserver:anonymous@jamin.cvs.sourceforge.net:2401/cvsroot/jamin
CVS password:
? jamin/typefix.patch
? jamin/src/typefix.patch
cvs checkout: Updating jamin
cvs checkout: Updating jamin/controller
cvs checkout: Updating jamin/data
cvs checkout: Updating jamin/examples
cvs checkout: Updating jamin/pixmaps
cvs checkout: Updating jamin/po
cvs checkout: Updating jamin/src
cvs checkout: Updating jamin/test
cvs checkout: Updating jamin/test/files
cvs checkout: Updating jamin/www
cvs checkout: Updating jamin/www/lib
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/gtkmeter.c b/src/gtkmeter.c
|index dda8dc9..c1aa9a6 100644
|--- a/src/gtkmeter.c
|+++ b/src/gtkmeter.c
--------------------------
File to patch:
And here is my updated PKGBUILD:
pkgname=jamin-cvs
pkgver=0.98.3
pkgrel=6
pkgdesc="A JACK Audio Connection Kit Audio Mastering interface"
arch=('i686' 'x86_64')
url="http://jamin.sourceforge.net/"
license=('GPL')
depends=('jack' 'libxml2' 'gtk2' 'swh-plugins' 'fftw' 'liblo')
makedepends=('perl-xml-parser' 'ladspa' 'cvs' 'intltool')
conflicts=('jamin')
provides=('jamin')
options=('!libtool')
install=${pkgname}.install
source=('typefix.patch')
md5sums=('a0a18224447f431503471b3dfe1b715c')
prepare() {
LDFLAGS="-ldl"
cd "$srcdir/jamin"
msg ""
msg ""
msg "Connecting to svs server ..."
msg ""
msg "Press ENTER when asked for password"
cvs -d:pserver:anonymous@jamin.cvs.sourceforge.net:/cvsroot/jamin login
cvs -z3 -d:pserver:anonymous@jamin.cvs.sourceforge.net:/cvsroot/jamin co -P jamin
patch -Np1 -i "${srcdir}/jamin/src/typefix.patch"
}
build() {
cd ${srcdir}/jamin
./autogen.sh --prefix=/usr --libdir=/usr/lib
make
}
package() {
cd ${srcdir}/jamin
make DESTDIR=${pkgdir} install
}
I can see from the tmp directory that the files needing to be patched are in /src/jamin/src directory. I have copied the patch there but still getting the flags.
Offline
Because that's not what we said. You changed directories to $srcdir/jamin before cloning the cvs repo, then didn't change directories into the clone before running patch.
I did update my example BTW.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Thanks Eschwartz. It worked with one small adjustment. I still needed to copy the patch to the src directory but after that it was fine and no segmentation fault when I run the program.
Cheers!
Offline
Uh, the src directory should already contain it, because makepkg itself will symlink all files in the source=() array into "$srcdir".
And of course a proper patch is listed in the source array in order to work on other peoples' computers.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline