You are not logged in.

#1 2015-02-08 22:53:45

gillecaluim
Member
Registered: 2014-11-02
Posts: 42

[SOLVED] updating aur package "install: cannot stat ...: No such file"

This is my first attempt at creating a new package so I decided to update the orphaned crtmpserver package and I'm getting an error where makepkg cannot locate a file...
I'm test building the package in /var/abs/local/rtmpd directory which contains two files PKGBUILD and rtmpd.service.
PKGBUILD:

pkgname=rtmpd-svn
pkgver=811
pkgrel=1.1
pkgdesc="High performance rtmp streaming server"
arch=('i686' 'x86_64')
url="http://www.rtmpd.com"
license=('GPL')
depends=('openssl')
makedepends=('subversion' 'cmake' 'lua')
provides=('crtmpserver')
conflicts=('crtmpserver')
_svntrunk='https://svn.rtmpd.com/crtmpserver/trunk'
_svnmod='crtmpserver'
_svnbuild='crtmpserver/crtmpserver'
source=('rtmpd.service')
md5sums=('SKIP')

build() {
 msg "Starting SVN checkout"
 svn co --non-interactive --no-auth-cache --username anonymous --password "" https://svn.rtmpd.com/crtmpserver/trunk crtmpserver
 cd $_svnmod/builders/cmake
 sh cleanup.sh
 cmake -DCRTMPSERVER_INSTALL_PREFIX=/usr
 make
}

package(){
 cd $_svnmod/builders/cmake
 make DESTDIR="$pkgdir" install
 install -dm644 "$pkgdir/etc/crtmpserver"
 mv "$pkgdir/usr/etc/crtmpserver.lua.sample" "$pkgdir/etc/crtmpserver"
 rm -rf "$pkgdir/usr/etc"
 install -D -m644 "rtmpd.service" "$pkgdir/usr/lib/systemd/system/rtmpd.service"
}

Here's the output from running makepkg

[ourhome@server rtmpd]$ makepkg > log
==> Making package: rtmpd-svn 811-1.1 (Sun Feb  8 14:42:27 PST 2015)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found rtmpd.service
==> Validating source files with md5sums...
    rtmpd.service ... Skipped
==> Extracting sources...
==> Starting build()...
==> Starting SVN checkout

A    crtmpserver/3rdparty
A    crtmpserver/3rdparty/lua-dev
A    crtmpserver/3rdparty/lua-dev/lundump.h
A    crtmpserver/3rdparty/lua-dev/lapi.h
......
A    crtmpserver/sources/androidapplestreaming/src/variantconnection.cpp
A    crtmpserver/sources/androidapplestreaming/src/jniwrapper.cpp
Checked out revision 811.
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
....
==> Entering fakeroot environment...
==> Starting package()...
....
Install the project...
-- Install configuration: "Debug"
-- Installing: /var/abs/local/rtmpd/pkg/rtmpd-svn/usr/lib/crtmpserver/libtinyxml.so
-- Installing: /var/abs/local/rtmpd/pkg/rtmpd-svn/usr/lib/crtmpserver/libcommon.so
-- Installing: /var/abs/local/rtmpd/pkg/rtmpd-svn/usr/lib/crtmpserver/libthelib.so
-- Installing: /var/abs/local/rtmpd/pkg/rtmpd-svn/usr/lib/crtmpserver/applications/flvplayback/libflvplayback.so
-- Installing: /var/abs/local/rtmpd/pkg/rtmpd-svn/usr/lib/crtmpserver/applications/appselector/libappselector.so
-- Installing: /var/abs/local/rtmpd/pkg/rtmpd-svn/usr/lib/crtmpserver/applications/samplefactory/libsamplefactory.so
-- Installing: /var/abs/local/rtmpd/pkg/rtmpd-svn/usr/lib/crtmpserver/applications/vptests/libvptests.so
-- Installing: /var/abs/local/rtmpd/pkg/rtmpd-svn/usr/lib/crtmpserver/applications/admin/libadmin.so
-- Installing: /var/abs/local/rtmpd/pkg/rtmpd-svn/usr/lib/crtmpserver/applications/proxypublish/libproxypublish.so
-- Installing: /var/abs/local/rtmpd/pkg/rtmpd-svn/usr/lib/crtmpserver/applications/stresstest/libstresstest.so
-- Installing: /var/abs/local/rtmpd/pkg/rtmpd-svn/usr/sbin/crtmpserver
-- Installing: /var/abs/local/rtmpd/pkg/rtmpd-svn/usr/etc/crtmpserver.lua.sample
-- Installing: /var/abs/local/rtmpd/pkg/rtmpd-svn/usr/man/man1/crtmpserver.1
install: cannot stat ‘rtmpd.service’: No such file or directory
==> ERROR: A failure occurred in package().
    Aborting...

and that's the mystery to me.  Makepkg finds rtmpd.service when it starts but cannot find it when it's time to package.
Where's it looking ?

Last edited by gillecaluim (2015-02-08 23:36:50)

Offline

#2 2015-02-08 23:04:22

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: [SOLVED] updating aur package "install: cannot stat ...: No such file"

The service file is in $srcdir, not $_svnmod/builders/cmake.

You're using an outdated PKGBUILD template too. The svn source should be included in the source array and not checked out manually during the build process.

EDIT: since this repository requires authentication, perhaps the correct format won't work.

Last edited by WorMzy (2015-02-08 23:07:59)


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

#3 2015-02-08 23:10:48

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,212

Re: [SOLVED] updating aur package "install: cannot stat ...: No such file"

Maybe change this line
install -D -m644 "rtmpd.service" "$pkgdir/usr/lib/systemd/system/rtmpd.service"
to
install -Dm644 "$srcdir"/rtmpd.service "$pkgdir"/usr/lib/systemd/system/rtmpd.service

Offline

#4 2015-02-08 23:34:44

gillecaluim
Member
Registered: 2014-11-02
Posts: 42

Re: [SOLVED] updating aur package "install: cannot stat ...: No such file"

Thanks,
adding "$srcdir" did the trick....I was using the latest bind PKGBUILD for a template and it didn't include "srcdir" for install source files....go figure?

Offline

Board footer

Powered by FluxBB