You are not logged in.

#1 2020-03-01 17:31:43

definitellynotspammer
Member
Registered: 2016-06-07
Posts: 53

[Solved] Can't figure out why $pkgdir is missing some files

So I am extracting a deb package. Then I copy some directories from $srcdir to $pkgdir.

Issue is that some files will not appear in copied directories. I did "diff" and this is what it shows:

$ diff -qr pkg/jellyfin-bin/usr/lib/jellyfin/bin src/usr/lib/jellyfin/bin
Only in src/usr/lib/jellyfin/bin: System.IO.Compression.Native.a
Only in src/usr/lib/jellyfin/bin: System.Native.a
Only in src/usr/lib/jellyfin/bin: System.Net.Http.Native.a
Only in src/usr/lib/jellyfin/bin: System.Net.Security.Native.a
Only in src/usr/lib/jellyfin/bin: System.Security.Cryptography.Native.OpenSsl.a

How is it possible that these files just don't want to get into $pkgdir? I assume this part of "makepkg" is causing it:

==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...

But I can't find any documentation regarding what are these actions and what is being done under the hood.

Can anyone advise, please?

EDIT: Use this flag to keep *.a files in $pkgdir

options=('staticlibs')

Last edited by definitellynotspammer (2020-03-01 17:48:12)

Offline

#2 2020-03-01 17:36:00

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

Re: [Solved] Can't figure out why $pkgdir is missing some files

You have not included the PKGBUILD so others can recreate your issue.
Without that at a guess

  -> Removing static library files...
man 5 PKGBUILD wrote:

           staticlibs
               Leave static library (.a) files in packages. Specify
               !staticlibs to remove them (if they have a shared counterpart).

Did the removed static libraries have matching shared libraries?

Last edited by loqs (2020-03-01 17:38:28)

Offline

#3 2020-03-01 17:39:08

definitellynotspammer
Member
Registered: 2016-06-07
Posts: 53

Re: [Solved] Can't figure out why $pkgdir is missing some files

loqs wrote:

You have not included the PKGBUILD so others can recreate your issue.

Here it is (I commented out parts that are not needed to recreate this issue):

# Maintainer: Erikas Rudinskas <erikmnkl@gmail.com>

pkgname=jellyfin-bin
pkgver=10.4.3
_pkgver="$pkgver-1"
pkgrel=1
pkgdesc='The Free Software Media System'
arch=('x86_64' 'aarch64' 'armv7h')
url='https://github.com/jellyfin/jellyfin'
license=('GPL2')
depends=('ffmpeg' 'sqlite')
# source=('jellyfin.conf'
#         'jellyfin.service'
#         'jellyfin.sysusers'
#         'jellyfin.tmpfiles')
source_x86_64=("https://repo.jellyfin.org/releases/server/debian/versions/${pkgver}/jellyfin_${_pkgver}_amd64.deb")
source_aarch64=("https://repo.jellyfin.org/releases/server/debian/versions/${pkgver}/jellyfin_${_pkgver}_arm64.deb")
source_armv7h=("https://repo.jellyfin.org/releases/server/debian/versions/${pkgver}/jellyfin_${_pkgver}_armhf.deb")
# sha256sums=('9f8dafb06676f972fca88cc1cedf5936518b5a7556628482aeea2c7f2f485678'
#             '0f8511673816daf528625366b6c27bc7e6182e4ac789191c87474667398376e2'
#             '9bc1ddb77c73d46cc4078356b5773e5a776ebf8b47a1c820ad5fb17591ad5228'
#             'b7faa4b0c756cdb361ef5b04fddfdc416b00f1246bb3a19a34bf4d185a6a7e5a')
sha256sums_x86_64=('280ed014e11247bafa38a75819bf65872f40c127e1814138963b1d1ed1060b14')
sha256sums_aarch64=('5ed67317f12d55b83c547319ee30cc2e8c3aa4103967115a1171237a9d7ef388')
sha256sums_armv7h=('83c767663a7ccfb518900854fa3ab7b2550904fe7757ead29d93e71840cbbd86')

package() {
	tar -xf data.tar.xz

	cp -r -fHip "$srcdir"/usr "$pkgdir"/usr
	rm -r "$pkgdir"/usr/share
	
	# install -Dm 644 jellyfin.service -t "$pkgdir"/usr/lib/systemd/system/
	# install -Dm 644 jellyfin.sysusers "$pkgdir"/usr/lib/sysusers.d/jellyfin.conf
	# install -Dm 644 jellyfin.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/jellyfin.conf
	# install -Dm 644 jellyfin.conf "$pkgdir"/etc/conf.d/jellyfin
}

Offline

#4 2020-03-01 17:47:13

definitellynotspammer
Member
Registered: 2016-06-07
Posts: 53

Re: [Solved] Can't figure out why $pkgdir is missing some files

This did the trick. Thanks everyone!

options=('staticlibs')

Offline

#5 2020-03-01 17:50:14

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

Re: [Solved] Can't figure out why $pkgdir is missing some files

As I mentioned in my edit the package provides static and shared versions of those libraries.  If you want to keep the static version as well in the package specify staticlibs in the options array

options=(staticlibs)

Edit:
Posting at the same time,  glad the issue is solved.

Last edited by loqs (2020-03-01 17:50:41)

Offline

Board footer

Powered by FluxBB