Пытался собрать menulibre в OBS (osc build openSUSE_13.1 x86_64 menulibre.spec --clean), нарвался на ошибку:
68s] + cd menulibre-2.0.5
68s] + python3 ./setup.py build
69s] Unable to init server
69s] Unable to init server
69s]
69s] (setup.py:21190): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
69s] Traceback (most recent call last):
69s] File "/usr/lib/python3.3/site-packages/DistUtilsExtra/auto.py", line 348, in __external_mod
69s] mod = __import__(module)
69s] ImportError: No module named 'util'
69s]
69s] During handling of the above exception, another exception occurred:
69s]
69s] Traceback (most recent call last):
69s] File "./setup.py", line 195, in <module>
69s] cmdclass={'install': InstallAndUpdateDataDirectory}
69s] File "/usr/lib/python3.3/site-packages/DistUtilsExtra/auto.py", line 98, in setup
69s] __requires(attrs, src_all)
69s] File "/usr/lib/python3.3/site-packages/DistUtilsExtra/auto.py", line 470, in __requires
69s] __add_imports(imports, s, attrs)
69s] File "/usr/lib/python3.3/site-packages/DistUtilsExtra/auto.py", line 411, in __add_imports
69s] elif node.module and __external_mod(cur_module, node.module, attrs):
69s] File "/usr/lib/python3.3/site-packages/DistUtilsExtra/auto.py", line 353, in __external_mod
69s] mod = __import__(cur_module + '.' + module)
69s] File "/home/abuild/rpmbuild/BUILD/menulibre-2.0.5/menulibre/__init__.py", line 23, in <module>
69s] from menulibre import MenulibreApplication
69s] File "/home/abuild/rpmbuild/BUILD/menulibre-2.0.5/menulibre/MenulibreApplication.py", line 152, in <module>
69s] if util.getDefaultMenuPrefix() == 'xfce-':
69s] File "/home/abuild/rpmbuild/BUILD/menulibre-2.0.5/menulibre/util.py", line 66, in getDefaultMenuPrefix
69s] processes = getProcessList()
69s] File "/home/abuild/rpmbuild/BUILD/menulibre-2.0.5/menulibre/util.py", line 49, in getProcessList
69s] if process.username == username:
69s] File "/usr/lib64/python3.3/site-packages/psutil/__init__.py", line 368, in username
69s] return pwd.getpwuid(self.uids.real).pw_name
69s] KeyError: 'getpwuid(): uid not found: 105'
70s] error: Bad exit status from /var/tmp/rpm-tmp.hClAm0 (%build)
70s]
70s]
70s] RPM build errors:
70s] Bad exit status from /var/tmp/rpm-tmp.hClAm0 (%build)
The buildroot was: /var/tmp/build-root/openSUSE_13.1-x86_64
Что делать с ImportError: No module named ‘util’? ума не приложу.
С горем пополам собрал, используя rpmbuild -ba menulibre.spec. Пришлось добавить несколько команд в спек, исправить ошибки сборки:
find: ‘/home/andrey/rpmbuild/BUILDROOT/menulibre-2.0.5-0.x86_64/usr/share/locale/’: No such file or directory
find: ‘/home/andrey/rpmbuild/BUILDROOT/menulibre-2.0.5-0.x86_64/usr/share/help/’: No such file or directory
No translations found for menulibre in /home/andrey/rpmbuild/BUILDROOT/menulibre-2.0.5-0.x86_64
ERROR: Can’t find /home/andrey/rpmbuild/BUILDROOT/menulibre-2.0.5-0.x86_64/usr/share/applications/menulibre.desktop
File “/usr/lib64/python3.3/encodings/ascii.py”, line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 57: ordinal not in range(128)
ошибка: Неверный код возврата из /var/tmp/rpm-tmp.nhGB8J (%install)
install -dm 0755 %{buildroot}%{_datadir}/locale
cp -a build/mo/* %{buildroot}%{_datadir}/locale/
install -Dm 0644 build/share/applications/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
export LC_ALL=en_US.UTF-8
Часть лога сборки:
+ exit 0
Provides: menulibre = 2.0.5-0
Requires(interp): /bin/sh /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(post): /bin/sh
Requires(postun): /bin/sh
Requires: /usr/bin/python3 python(abi) = 3.3 typelib(GLib) typelib(GMenu) typelib(GObject) typelib(Gdk) typelib(GdkPixbuf) typelib(Gio) typelib(Gtk) typelib(Gtk) = 3.0 typelib(Pango)
Processing files: menulibre-lang-2.0.5-0.noarch
Provides: menulibre-lang = 2.0.5-0 menulibre-lang-all = 2.0.5
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Supplements: packageand(bundle-lang-other:menulibre)
Проверка на неупакованный(е) файл(ы): /usr/lib/rpm/check-files /home/andrey/rpmbuild/BUILDROOT/menulibre-2.0.5-0.x86_64
Записан: /home/andrey/rpmbuild/SRPMS/menulibre-2.0.5-0.src.rpm
Записан: /home/andrey/rpmbuild/RPMS/noarch/menulibre-2.0.5-0.noarch.rpm
Записан: /home/andrey/rpmbuild/RPMS/noarch/menulibre-lang-2.0.5-0.noarch.rpm
Выполняется(%clean): /bin/sh -e /var/tmp/rpm-tmp.XBOO1D
+ umask 022
+ cd /home/andrey/rpmbuild/BUILD
+ cd menulibre-2.0.5
+ rm -rf /home/andrey/rpmbuild/BUILDROOT/menulibre-2.0.5-0.x86_64
+ rm -rf filelists
Вот спек:
#
# spec file for package menulibre
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: menulibre
Version: 2.0.5
Release: 0
License: GPL-3.0
Summary: An advanced menu editor that provides modern features in a clean, easy-to-use interface
Url: http://smdavis.us/projects/menulibre/
Group: System/GUI/Other
Source: https://launchpad.net/menulibre/2.0/%{version}/+download/%{name}-%{version}.tar.gz
BuildRequires: gettext-runtime
BuildRequires: girepository-1_0
BuildRequires: gnome-menus
BuildRequires: intltool
BuildRequires: python-setuptools
BuildRequires: python3
BuildRequires: python3-base
BuildRequires: python3-distutils-extra
BuildRequires: python3-gobject
BuildRequires: python3-psutil
BuildRequires: typelib-1_0-GdkPixbuf-2_0
BuildRequires: typelib-1_0-GMenu-3_0
BuildRequires: typelib-1_0-Gtk-3_0
BuildRequires: xdg-utils
Requires: gdk-pixbuf-loader-rsvg
Requires: gnome-icon-theme-symbolic
Requires: python3
Requires: python3-gobject
Requires: python3-psutil
#Requires: typelib-1_0-GMenu-3_0
#Requires: typelib-1_0-GdkPixbuf-2_0
#Requires: typelib-1_0-Gtk-3_0
#Requires: typelib-1_0-Pango-1_0
Requires: psutils
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
An advanced menu editor that provides modern features in a clean, easy-to-use
interface. All without GNOME dependencies, so even lightweight systems can
benefit from the sanity that MenuLibre offers. MenuLibre is your one-stop shop
for menus in Linux, whether you use Gnome, LXDE, XFCE, or Unity.
%lang_package
%prep
%setup -q
%build
python3 ./setup.py build
%install
rm -rf %{buildroot}
#nstall -dm 0755 %{buildroot}%{_datadir}/locale
#p -a build/mo/* %{buildroot}%{_datadir}/locale/
install -Dm 0644 build/share/applications/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
export LC_ALL=en_US.UTF-8
python3 ./setup.py install --skip-build \
--prefix="%{_prefix}" \
--root="%{buildroot}" \
--record-rpm=files.lst
rm -rf %{buildroot}%{_datadir}/doc
%find_lang %{name}
%clean
rm -rf %{buildroot}
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%files
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.svg
%{_datadir}/pixmaps/%{name}.png
%{_mandir}/man?/%{name}.*
%{python3_sitelib}/%{name}-%{version}-py%{py3_ver}.egg-info
%{python3_sitelib}/%{name}/
%{python3_sitelib}/%{name}_lib/
%{_datadir}/%{name}/ui/
%files lang -f %{name}.lang
%changelog
Может кто-нибудь, что-нибудь подскажет: “Почему не идёт сборка в OBS?”. Заранее благодарен.