View Full Version : [SOLVED] dockbarx rpm is empty
mehlberlin
13th July 2010, 09:04 PM
Hi,
i try to build a rpm for dockbarx (http://gnome-look.org/content/show.php?content=101604).
rpmbuild creates the rpm without an error, but the rpm contains no files.
what is wrong?
S307G0qm
best regards.
Dies
13th July 2010, 09:07 PM
...
what is wrong?
...
Nothing.
If you want rpm to include files then you need to specify them in the %files section...
mehlberlin
13th July 2010, 11:07 PM
Nothing.
If you want rpm to include files then you need to specify them in the %files section...
rpmbuild shows me :
copying build/lib/dockbarx/__init__.py -> RPM_BUILD_ROOT/usr/lib/python2.6/site-packages/dockbarx
when I add %{python_sitelib}/dockbarx/* to the %files section
rpmbuild stops the build process and tells me File not found: /home/mehl/rpmbuild/BUILDROOT/dockbarx-0.39-4.fc13.i386/usr/lib/python2.6/site-packages/dockbarx
leigh123linux
14th July 2010, 10:26 AM
Hi,
i try to build a rpm for dockbarx (http://gnome-look.org/content/show.php?content=101604).
rpmbuild creates the rpm without an error, but the rpm contains no files.
what is wrong?
S307G0qm
best regards.
Your buildroot macro is wrong
Change
%install
%{__python} setup.py install --root=RPM_BUILD_ROOT to
%install
%{__python} setup.py install --root=$RPM_BUILD_ROOT
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
Name: dockbarx
Version: 0.39
Release: 4%{?dist}
Summary: A TaskBar with grouping and group manipulation
Group: User Interface/Desktops
License: GPLv3
URL: http://gnome-look.org/content/show.php?content=101604
Source0: http://gnome-look.org/CONTENT/content-files/101604-dockbarx_0.39.4.tar.gz
BuildRoot: %{_tmppath}/%{name}_%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel
BuildArchitectures: noarch
Requires: gnome-python2-applet, gnome-python2-libwnck, numpy, python2-keybinder
%description
This is a branch of DockBar
(a TaskBar with grouping and group manipulation)
with some extra features added.
Authors:
--------
Dockbar is made by Aleksey Shaferov.
DockbarX branch is developed by Matias Särs.
The icon is made by BigRZA.
"Human Bar" theme is made by bigRZA.
"Gaia" is made by Izobalax.
The button image used in "Default" and
"New" themes are is made by Sami Rissanen (st6).
%prep
%setup -q -n dockbarx_0.39.4
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc CHANGELOG README
%{_bindir}/dbx_preference.py
%{_bindir}/dockbarx_factory.py
%{_prefix}/lib/bonobo/servers/GNOME_DockBarXApplet.server
%{_datadir}/applications/dbx_preference.desktop
%{_datadir}/icons/hicolor/*x*/apps/
%dir %{_datadir}/dockbarx
%{_datadir}/dockbarx/*
%exclude %{_datadir}/locale/de/LC_MESSAGES/dockbarx-themes.mo
%exclude %{_datadir}/locale/ru/LC_MESSAGES/dockbarx-themes.mo
%exclude %{_datadir}/locale/sv/LC_MESSAGES/dockbarx-themes.mo
%dir %{python_sitelib}/dockbarx
%{python_sitelib}/dockbarx/*
%{python_sitelib}/Dockbarx-0.3.1-py?.?.egg-info
mehlberlin
15th July 2010, 01:21 PM
Your buildroot macro is wrong
Change
...
to
%install
%{__python} setup.py install --root=$RPM_BUILD_ROOT
Thanks, that helped and runs me into the next problem.
I checked the generated rpm with rpmlint, which reported an error
standard-dir-owned-by-package /usr/bin
I tried
%attr(-,root,root) %{_bindir}
whithout success
leigh123linux
17th July 2010, 05:07 PM
Thanks, that helped and runs me into the next problem.
I checked the generated rpm with rpmlint, which reported an error
standard-dir-owned-by-package /usr/binI tried
%attr(-,root,root) %{_bindir} whithout success
Why the problem?, I posted a working spec file without the directory ownership problem.
You caused it by adding %{_bindir} to the files section, it should be
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc CHANGELOG README
%{_bindir}/dbx_preference.py
%{_bindir}/dockbarx_factory.pyHere's a cleaner specfile
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
Name: dockbarx
Version: 0.39
Release: 4%{?dist}
Summary: A TaskBar with grouping and group manipulation
Group: User Interface/Desktops
License: GPLv3
URL: http://gnome-look.org/content/show.php?content=101604
Source0: http://gnome-look.org/CONTENT/content-files/101604-dockbarx_0.39.4.tar.gz
BuildRoot: %{_tmppath}/%{name}_%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel
BuildArchitectures: noarch
Requires: gnome-python2-applet, gnome-python2-libwnck, numpy, python2-keybinder
%description
This is a branch of DockBar
(a TaskBar with grouping and group manipulation)
with some extra features added.
Authors:
--------
Dockbar is made by Aleksey Shaferov.
DockbarX branch is developed by Matias Särs.
The icon is made by BigRZA.
"Human Bar" theme is made by bigRZA.
"Gaia" is made by Izobalax.
The button image used in "Default" and
"New" themes are is made by Sami Rissanen (st6).
%prep
%setup -q -n dockbarx_0.39.4
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT
#remove shebangs
for lib in %{buildroot}%{python_sitelib}/dockbarx/*.py; do
sed '/\/usr\/bin\/env/d' $lib > $lib.new &&
touch -r $lib $lib.new &&
mv $lib.new $lib
done
for lib in %{buildroot}%{python_sitelib}/dockbarx/*.py; do
sed '/\/usr\/bin\/python/d' $lib > $lib.new &&
touch -r $lib $lib.new &&
mv $lib.new $lib
done
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc CHANGELOG README
%{_bindir}/dbx_preference.py
%{_bindir}/dockbarx_factory.py
%{_prefix}/lib/bonobo/servers/GNOME_DockBarXApplet.server
%{_datadir}/applications/dbx_preference.desktop
%{_datadir}/icons/hicolor/*x*/apps/
%dir %{_datadir}/dockbarx
%{_datadir}/dockbarx/*
%exclude %{_datadir}/locale/de/LC_MESSAGES/dockbarx-themes.mo
%exclude %{_datadir}/locale/ru/LC_MESSAGES/dockbarx-themes.mo
%exclude %{_datadir}/locale/sv/LC_MESSAGES/dockbarx-themes.mo
%dir %{python_sitelib}/dockbarx
%{python_sitelib}/dockbarx/*
%{python_sitelib}/Dockbarx-0.3.1-py?.?.egg-info
%changelog
* Sat Jul 17 2010 Leigh Scott <leigh123linux@googlemail.com> - 0.39-4
- added to stop rpmlint
[leigh@localhost SPECS]$ rpmlint /home/leigh/rpmbuild/RPMS/noarch/dockbarx-0.39-4.fc13.noarch.rpm
dockbarx.noarch: W: spelling-error %description -l en_US bigRZA -> bigger, bigamy, bighead
dockbarx.noarch: W: spurious-executable-perm /usr/share/dockbarx/themes/Gaia.tar.gz
dockbarx.noarch: E: script-without-shebang /usr/share/applications/dbx_preference.desktop
dockbarx.noarch: W: no-manual-page-for-binary dbx_preference.py
dockbarx.noarch: W: no-manual-page-for-binary dockbarx_factory.py
dockbarx.noarch: E: invalid-desktopfile /usr/share/applications/dbx_preference.desktop value "0.39" for key "Version" in group "Desktop Entry" is not a known version
1 packages and 0 specfiles checked; 2 errors, 4 warnings.
[leigh@localhost SPECS]$
mehlberlin
18th July 2010, 09:55 AM
Thank you very much.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.