fakeroot issue while creating a package

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

fakeroot issue while creating a package

Postby prestigrado » Mon Jun 05, 2017 8:28 am

Hello,

I've developed an app (Qt based) and I'm trying to create a binary package for it, on my raspberry-pi.
I followed the steps described in the wiki (created the dir, placed the source tarball in it, filled-in the PKGBUILD script)

So, launching makepkg, the sources gets compiled as expected,
and the executable is produced.

Then enters the fakeroot environment to perform the fake install:
Code: Select all
==> Making package: echoes 0.12-1 (Sun Jun  4 21:08:03 UTC 2017)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found echoes-0.12.tar.gz
==> Validating source files with md5sums...
    echoes-0.12.tar.gz ... Passed
==> Extracting sources...
  -> Extracting echoes-0.12.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
Project MESSAGE: /usr/lib/qt/mkspecs/linux-g++
Project MESSAGE: Building for *NIX
Project MESSAGE: Found fftw3.h
Project MESSAGE: Found paplay (pulseaudio)
Project MESSAGE: target aux desktop sounds icons fonts
make: Nothing to be done for 'first'.
==> Entering fakeroot environment...
==> Starting package()...
install -m 755 -p echoes /usr/bin/echoes
install: cannot create regular file '/usr/bin/echoes': Permission denied
make: [Makefile:1033: install_target] Error 1 (ignored)
strip /usr/bin/echoes
strip: '/usr/bin/echoes': No such file
make: [Makefile:1034: install_target] Error 1 (ignored)
mkdir: cannot create directory '/usr/share/echoes': Permission denied
make: *** [Makefile:1042: install_aux] Error 1
==> ERROR: A failure occurred in package().
    Aborting...


But the fake install fails as shown above. :roll:

Then took a look of fakeroot's manpage, since I never used fakeroot before.
I followed the example described in the manpage and it worked nicely.

But any attempt to copy or create a file under the fake /usr/bin fails with "permission denied".
I wonder why, since I expect that in a faked root environment those operations under /usr/bin should succeed.

Thank you in advance for help me solve this problem.
prestigrado
 
Posts: 3
Joined: Mon Jun 05, 2017 8:23 am

Re: fakeroot issue while creating a package

Postby WarheadsSE » Mon Jun 05, 2017 4:53 pm

Can you post the relevant line of install from the PKGBUILD?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6716
Joined: Mon Oct 18, 2010 2:12 pm

Re: fakeroot issue while creating a package

Postby prestigrado » Mon Jun 05, 2017 8:34 pm

sure. But it's the same taken from the example PKGBUILD.proto
While $pkgname and $pkgver are defined in the same file, I've not yet idea
about the origin of $pkgdir


Code: Select all
package() {
   cd "$pkgname-$pkgver"
   make DESTDIR="$pkgdir/" install
}
prestigrado
 
Posts: 3
Joined: Mon Jun 05, 2017 8:23 am

Re: fakeroot issue while creating a package

Postby WarheadsSE » Tue Jun 06, 2017 3:05 pm

Is your Makefile observing `DESTDIR` ?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6716
Joined: Mon Oct 18, 2010 2:12 pm

Re: fakeroot issue while creating a package

Postby prestigrado » Tue Jun 06, 2017 4:31 pm

bingo!

no, it was observing another variable called INSTALL_ROOT :oops:

I needed just to replace the name DESTDIR with INSTALL_ROOT to be able to create the package :D

Thanks you a lot for your essential support!
prestigrado
 
Posts: 3
Joined: Mon Jun 05, 2017 8:23 am


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 4 guests