You are not logged in.

#1 2015-03-07 23:57:54

InfernoZeus
Member
Registered: 2015-03-07
Posts: 4

[SOLVED]makepkg modifies binary - different size in source tar/package

I'm using the following extremely straightforward PKGBUILD to try and package livestreamer-twitch-gui:

# Maintainer: Ben Fox-Moore <ben.foxmoore@gmail.com>
pkgname=livestreamer-twitch-gui
pkgver=v0.7.1
pkgrel=1
pkgdesc="A multi platform Twitch.tv browser for Livestreamer"
arch=('x86_64')
url="https://github.com/bastimeyer/livestreamer-twitch-gui"
license=('MIT')
depends=("livestreamer")
provides=('livestreamer-twitch-gui')
source_x86_64=("https://github.com/bastimeyer/livestreamer-twitch-gui/releases/download/$pkgver/livestreamer-twitch-gui-$pkgver-linux64.tar.gz")
sha256sums_x86_64=('b9350224f04c0028f87bd852f7f0aca2017000a07ec95fbbacbf49fe2b564ca7')

package() {
	cd "$srcdir/$pkgname"
	install -d "$pkgdir/usr/share/$pkgname"
	cp -R * "$pkgdir/usr/share/$pkgname"
}

however when I compare the size of files in the source tar livestreamer-twitch-gui-v0.7.1-linux64.tar.gz:

$ tar -ztvf livestreamer-twitch-gui-v0.7.1-linux64.tar.gz 
drwxr-xr-x 0/0               0 2015-02-10 19:00 livestreamer-twitch-gui/
-rwxr-xr-x 0/0             979 2015-02-10 18:59 livestreamer-twitch-gui/add-menuitem.sh
-rw-r--r-- 0/0        10485568 2015-02-10 18:59 livestreamer-twitch-gui/icudtl.dat
-rwxr-xr-x 0/0         4678264 2015-02-10 18:59 livestreamer-twitch-gui/libffmpegsumo.so
-rwxr-xr-x 0/0        73325950 2015-02-10 18:59 livestreamer-twitch-gui/livestreamer-twitch-gui
-rw-r--r-- 0/0         5770140 2015-02-10 18:59 livestreamer-twitch-gui/nw.pak
-rwxr-xr-x 0/0             450 2015-02-10 18:59 livestreamer-twitch-gui/remove-menuitem.sh
-rwxr-xr-x 0/0            1258 2015-02-10 18:59 livestreamer-twitch-gui/start.sh

with those in the generated package tar livestreamer-twitch-gui-v0.7.1-1-x86_64.pkg.tar.xz

$ tar -Jtvf livestreamer-twitch-gui-v0.7.1-1-x86_64.pkg.tar.xz 
-rw-r--r-- root/root       624 2015-03-08 00:34 .PKGINFO
-rw-r--r-- root/root      1286 2015-03-08 00:34 .MTREE
drwxr-xr-x root/root         0 2015-03-08 00:34 usr/
drwxr-xr-x root/root         0 2015-03-08 00:34 usr/share/
drwxr-xr-x root/root         0 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/
-rw-r--r-- root/root   5770140 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/nw.pak
-rwxr-xr-x root/root       450 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/remove-menuitem.sh
-rwxr-xr-x root/root   1264280 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/libffmpegsumo.so
-rwxr-xr-x root/root      1258 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/start.sh
-rwxr-xr-x root/root  72547728 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/livestreamer-twitch-gui
-rwxr-xr-x root/root       979 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/add-menuitem.sh
-rw-r--r-- root/root  10485568 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/icudtl.dat

you can see that both livestreamer-twitch-gui and libffmpegsumo.so have different sizes in the generated package from the source tar. Everything else stays the same. Obviously this causes issues when trying to install and run the package. Any ideas what might be causing this problem? Thanks!

Last edited by InfernoZeus (2015-03-08 00:46:00)

Offline

#2 2015-03-08 00:02:58

progandy
Member
Registered: 2012-05-17
Posts: 5,199

Re: [SOLVED]makepkg modifies binary - different size in source tar/package

By default makepkg runs strip on binaries. If this causes issues, disable it in the PKGBUILD with

options=(!strip)

By the way, if it is possible you should move the binaries to /usr/bin, and the libraries to /usr/lib. If necessary you could also put binaries and libraries in /usr/lib/$pkgname. If that is impossible you should install to /opt/$pkgname.

Last edited by progandy (2015-03-08 00:05:57)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2015-03-08 00:44:10

InfernoZeus
Member
Registered: 2015-03-07
Posts: 4

Re: [SOLVED]makepkg modifies binary - different size in source tar/package

Thanks for the super prompt reply! Adding the no strip option solved my problem perfectly smile

I did look at trying to split up the binaries/libraries/etc. but that's complicated by the libudev.so.0 issue. The source tar includes a script to solve the issue, but it expects the real binary to be in the same folder. There's also a couple of scripts and additional files that are looked for right next to the binary. I think for now I'll just move it all to /opt/$pkgname.

Thanks again.

Last edited by InfernoZeus (2015-03-08 00:45:36)

Offline

Board footer

Powered by FluxBB