Page 1 of 1

[SOLVED] Trying package mpv, issues with libmpv subpackages

PostPosted: Jul 30th, '15, 21:32
by katnatek
Hi i am packaging mpv based on a (modified to mageia) fedora's spec, the build finish fine but when i try to install the libmpv and libmpv-devel in my system i got this
Code: Select all
error: falló el desempaquetado de archivos : cpio: read
ERROR: 'unpack' failed for libmpv-devel-0.9.2-1bdk.mga5


that must be like

Code: Select all
error: fail unpacking files : cpio: read
ERROR: 'unpack' failed for libmpv-devel-0.9.2-1bdk.mga5


This is the spec

Code: Select all
Name:           mpv
Version:        0.9.2
Release:        %mkrel 1
Summary:        Movie player playing most video formats and DVDs
License:        GPLv2+
URL:            http://%{name}.io/
Source0:        %{name}-%{version}.tar.gz

# set defaults for Fedora
Patch0:         %{name}-config.patch

BuildRequires:  aalib-devel
BuildRequires:  alsa-lib-devel
BuildRequires:  libbzip2-devel
BuildRequires:  liblua-devel
BuildRequires:  desktop-file-utils
BuildRequires:  libffmpeg-devel
BuildRequires:  libffmpeg
BuildRequires:  lcms2-devel
BuildRequires:  libcdio-devel
BuildRequires:  libcdio-paranoia-devel
BuildRequires:  libgl-devel
BuildRequires:  libxscrnsaver-devel
BuildRequires:  libxinerama-devel
BuildRequires:  libxv-devel
BuildRequires:  libass-devel
BuildRequires:  libbluray-devel
BuildRequires:  libdvdnav-devel
BuildRequires:  libguess-devel
BuildRequires:  libquvi-devel
BuildRequires:  libsmbclient-devel
BuildRequires:  libva-devel
BuildRequires:  libvdpau-devel
BuildRequires:  libwayland-devel
BuildRequires:  libxkbcommon-devel
BuildRequires:  liblirc-devel
BuildRequires:  libncurses-devel
BuildRequires:  libpulseaudio-devel
BuildRequires:  python-docutils
BuildRequires:   python
BuildRequires:  libwayland-devel
Requires:       hicolor-icon-theme

%description
Mpv is a movie player based on MPlayer and mplayer2. It supports a wide variety
of video file formats, audio and video codecs, and subtitle types. Special
input URL types are available to read input from a variety of sources other
than disk files. Depending on platform, a variety of different video and audio
output methods are supported.

%package -n libmpv
Summary: Dynamic library for Mpv frontends

%description -n libmpv
This package contains the dynamic library libmpv, which provides access to Mpv.

%package -n libmpv-devel
Summary: Development package for libmpv
Requires: libmpv%{_isa} = %{version}-%{release}
Requires: pkgconfig

%description -n libmpv-devel
Libmpv development header files and libraries.

%prep
%setup -q
python %{_builddir}/%{name}-%{version}/bootstrap.py
%patch0 -p1

%build
CCFLAGS="%{optflags}" \
%{_builddir}/%{name}-%{version}/waf configure \
    --prefix="%{_prefix}" \
    --bindir="%{_bindir}" \
    --libdir="%{_libdir}" \
    --mandir="%{_mandir}" \
    --docdir="%{_docdir}/%{name}" \
    --confdir="%{_sysconfdir}/%{name}" \
    --disable-sdl1 --disable-sdl2 \
    --disable-build-date \
    --enable-libmpv-shared

%{_builddir}/%{name}-%{version}/waf build --verbose %{?_smp_mflags}

%install
%{_builddir}/%{name}-%{version}/waf --destdir=%{buildroot} install %{?_smp_mflags}

# Default config files
install -Dpm 644 etc/example.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
install -Dpm 644 etc/input.conf %{buildroot}%{_sysconfdir}/%{name}/input.conf

desktop-file-install etc/mpv.desktop

for RES in 16 32 64; do
  install -Dpm 644 etc/mpv-icon-8bit-${RES}x${RES}.png %{buildroot}%{_datadir}/icons/hicolor/${RES}x${RES}/apps/%{name}.png
done


%post
update-desktop-database &>/dev/null || :
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
update-desktop-database &> /dev/null || :
if [ $1 -eq 0 ] ; then
  touch --no-create %{_datadir}/icons/hicolor &>/dev/null
  gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor &>/dev/null || :
  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi

%posttrans
gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor &>/dev/null || :
glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :

%post -n libmpv -p /sbin/ldconfig

%postun -n libmpv -p /sbin/ldconfig

%files
%doc LICENSE README.md Copyright
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_mandir}/man1/%{name}.*
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %{_sysconfdir}/%{name}/encoding-profiles.conf
%config(noreplace) %{_sysconfdir}/%{name}/input.conf

%files -n libmpv
%doc LICENSE README.md Copyright
%{_libdir}/libmpv.so.*

%files -n libmpv-devel
%{_includedir}/%{name}
%{_libdir}/libmpv.so
%{_libdir}/pkgconfig/mpv.pc


Hope you can help me with this

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Jul 31st, '15, 16:56
by doktor5000
Sounds like a corrupt package, you should run another build for that. If that does not help, please upload the src.rpm somewhere and post a link here.

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Jul 31st, '15, 20:21
by katnatek
I even re-download the tar.gz and still the same :S
Here is the src.rpm
http://ftp.blogdrake.net/RPMS/mpv-0.9.2-1bdk.mga5.src.rpm

May be the spec requires more work if compares with mageia's mplayer spec, but i can't say what of that spec can import to this :)

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Aug 1st, '15, 17:32
by doktor5000
Hmmm, works just fine after after a normal build

Code: Select all
┌─[doktor5000@Mageia5]─[17:02:45]─[~/rpmbuild/SPECS]
└──╼  bm -la mpv.spec
creating package list
processing package mpv-0.9.2-%mkrel 1
building source and binary packages
Executing(%prep): /bin/sh -e /home/doktor5000/rpmbuild/BUILDROOT/rpm-tmp.YvhBNt

[...]

Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/doktor5000/rpmbuild/BUILDROOT/mpv-0.9.2-1.mga5.x86_64
Wrote: /home/doktor5000/rpmbuild/SRPMS/mpv-0.9.2-1.mga5.src.rpm
Wrote: /home/doktor5000/rpmbuild/RPMS/x86_64/mpv-0.9.2-1.mga5.x86_64.rpm
Wrote: /home/doktor5000/rpmbuild/RPMS/x86_64/libmpv-0.9.2-1.mga5.x86_64.rpm
Wrote: /home/doktor5000/rpmbuild/RPMS/x86_64/libmpv-devel-0.9.2-1.mga5.x86_64.rpm
Wrote: /home/doktor5000/rpmbuild/RPMS/x86_64/mpv-debuginfo-0.9.2-1.mga5.x86_64.rpm
Executing(%clean): /bin/sh -e /home/doktor5000/rpmbuild/BUILDROOT/rpm-tmp.aXZfaQ
+ umask 022
+ cd /home/doktor5000/rpmbuild/BUILD
+ cd mpv-0.9.2
+ /usr/bin/rm -rf /home/doktor5000/rpmbuild/BUILDROOT/mpv-0.9.2-1.mga5.x86_64
+ exit 0
succeeded!


Code: Select all
┌─[doktor5000@Mageia5]─[17:00:13]─[~]
└──╼ mpv --version
mpv 0.9.2 (C) 2000-2015 mpv/MPlayer/mplayer2 projects
 built on UNKNOWN
ffmpeg library versions:
   libavutil       54.7.100
   libavcodec      56.1.100
   libavformat     56.4.101
   libswscale      3.0.100
   libavfilter     5.1.100
   libswresample   1.1.100


There are further issues with the spec, but none related to your build failure. Will post more details later.

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Aug 3rd, '15, 19:36
by katnatek
Try install libmpv and or libmpv-devel, i don't have issues with the mpv install ;)

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Aug 4th, '15, 18:55
by doktor5000
Sorry, was an oversight. Also works fine :)

Code: Select all
┌─[doktor5000@Mageia5]─[18:47:54]─[~]
└──╼ sudo LC_ALL=C urpmi libmpv-0.9.2-1.mga5.x86_64 libmpv-devel-0.9.2-1.mga5.x86_64

The following packages have bad signatures:
/home/doktor5000/rpmbuild/RPMS/x86_64/libmpv-0.9.2-1.mga5.x86_64.rpm: Medium without key (OK ((none)))
/home/doktor5000/rpmbuild/RPMS/x86_64/libmpv-devel-0.9.2-1.mga5.x86_64.rpm: Medium without key (OK ((none)))
Do you want to continue installation ? (y/N) y
installing libmpv-0.9.2-1.mga5.x86_64.rpm libmpv-devel-0.9.2-1.mga5.x86_64.rpm from /home/doktor5000/rpmbuild/RPMS/x86_64
Preparing...                     ################################################################################################################################################################################
      1/2: libmpv                ################################################################################################################################################################################
      2/2: libmpv-devel          ################################################################################################################################################################################
┌─[doktor5000@Mageia5]─[18:48:13]─[~]
└──╼


FWIW, for the adaptions to the .spec file, you used architecture-dependent BuildRequires which resolve to i586 packages.
Please read https://wiki.mageia.org/en/Packaging_gu ... ldRequires for some explanation on that.

I've adjusted that, looks like this now:

Code: Select all
BuildRequires:   aalib-devel
BuildRequires:   pkgconfig(alsa)
BuildRequires:   bzip2-devel
BuildRequires:   pkgconfig(lua)
BuildRequires:   desktop-file-utils
BuildRequires:   ffmpeg-devel
BuildRequires:   lcms2-devel
BuildRequires:   pkgconfig(libcdio)
BuildRequires:   pkgconfig(libcdio_paranoia)
BuildRequires:   pkgconfig(gl)
BuildRequires:   pkgconfig(caca)
BuildRequires:   pkgconfig(xscrnsaver)
BuildRequires:   pkgconfig(xinerama)
BuildRequires:   pkgconfig(xv)
BuildRequires:   pkgconfig(libass)
BuildRequires:   pkgconfig(libbluray)
BuildRequires:   pkgconfig(libpng)
BuildRequires:   pkgconfig(dvdnav)
BuildRequires:   pkgconfig(dvdread)
BuildRequires:   pkgconfig(libguess)
BuildRequires:   pkgconfig(libquvi-0.9)
BuildRequires:   pkgconfig(smbclient)
BuildRequires:   pkgconfig(libva)
BuildRequires:   pkgconfig(vdpau)
BuildRequires:   pkgconfig(wayland-server)
BuildRequires:   pkgconfig(xkbcommon)
BuildRequires:   pkgconfig(liblircclient0)
BuildRequires:   pkgconfig(ncurses)
BuildRequires:   pkgconfig(libpulse)
BuildRequires:   python-docutils
BuildRequires:   python
BuildRequires:   waf
BuildRequires:   waf-python3


In any case, you will probably be better off if you try to rebuild one of the existing packages,
e.g. from OpenMandriva/Rosa or from Fedora: http://pkgs.org/search/mpv

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Aug 4th, '15, 19:49
by katnatek
I'am start to think that is permissions or another issue, i change my uid and guid as suggested in erratas, also i think https://bugs.mageia.org/show_bug.cgi?id=16467 bites me :( , last i use a ntfs partition to create my rpms but until upgrade to mageia 5 i was packaging without issues, i continue my investigation and let you know what in the $HELL is happen :D

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Aug 5th, '15, 00:57
by katnatek
By the moment this mystery remain, i solve another packaging issue, as suspect was permissions on ntfs partition, i erase the from fstab and re-add with diskdrake.

I let you this release based in suse package with few things of the fedora's spec, this is more close to your recommendations but i not do a deep check ;)

http://ftp.blogdrake.net/RPMS/mpv-0.9.2-2bdk.mga5.src.rpm

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Aug 6th, '15, 21:12
by katnatek
By the moment the only weird i detect, is that if the package contain simbolic link the install crash with the same error

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Aug 6th, '15, 21:44
by doktor5000
You should really try to build the packages on top of a native linux filesystem for comparison.

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Aug 7th, '15, 02:04
by katnatek
I test with a small package with one symbolic link, building the package from ntfs partitition makes the installl crash, building the package from ext4 the install works fine.

But i am packaging from the ntfs since mageia 1 without issues, i hope this new clue point us to the solution :D

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Aug 7th, '15, 19:22
by doktor5000
Nope, not really - maybe you haven't packaged something containing symlinks before.
Use some native linux filesystem for packaging, anything else will only create errors nobody else can reproduce.
And be sure nobody will try to fix such self-inflicted issues.

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Aug 7th, '15, 20:18
by katnatek
doktor5000 wrote:Nope, not really - maybe you haven't packaged something containing symlinks before.
Use some native linux filesystem for packaging, anything else will only create errors nobody else can reproduce.
And be sure nobody will try to fix such self-inflicted issues.


The test package is one that i package since mageia 1 (but for a time i work from a VM), i do some test with different versions of that package in blogdrake's repository and version from mageia 3 and above don't install in current system.

The self-inflicted is for lack of space in mageia's partition and because i share the ntfs partition with windows install.

This is first time i found with this, but well i think you can close this, at less i know what to do whit that "problematic" packages.

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Aug 8th, '15, 11:38
by ozky

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Aug 8th, '15, 23:42
by katnatek


Thanks for it, as long as this weird issue comes to light i consider my time well inverted :), may be would rise with other package but this hit the jackpot :)

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Aug 9th, '15, 08:45
by ozky
There is also bug in our bugzilla to get it to Mageia.
https://bugs.mageia.org/show_bug.cgi?id=14943

Re: Trying package mpv, issues with libmpv subpackages

PostPosted: Aug 10th, '15, 19:00
by katnatek
I simlinked BUILDROOT to a directory in the mageia's partition and now i can install without issues packages (build for me) with simlinks.

Re: [SOLVED] Trying package mpv, issues with libmpv subpacka

PostPosted: Sep 15th, '15, 14:08
by setlec
Awesome work guys! this is probably one of the best media player so far. Thank you for your work