Hello community,

here is the log from the commit of package powerline for openSUSE:Factory 
checked in at 2018-08-12 20:52:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/powerline (Old)
 and      /work/SRC/openSUSE:Factory/.powerline.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "powerline"

Sun Aug 12 20:52:47 2018 rev:5 rq:628569 version:2.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/powerline/powerline.changes      2018-03-04 
12:49:39.338037524 +0100
+++ /work/SRC/openSUSE:Factory/.powerline.new/powerline.changes 2018-08-12 
20:52:52.405162912 +0200
@@ -1,0 +2,8 @@
+Fri Aug 10 10:18:25 UTC 2018 - [email protected]
+
+- add powerline-2.6-gcc7_fixes.patch 
+- add powerline-py2v3-fix.patch fixes boo#1101303
+- cleanup spec
+- correctly install systemd service
+
+-------------------------------------------------------------------

New:
----
  powerline-2.6-gcc7_fixes.patch
  powerline-py2v3-fix.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ powerline.spec ++++++
--- /var/tmp/diff_new_pack.RsnHD2/_old  2018-08-12 20:52:52.817163748 +0200
+++ /var/tmp/diff_new_pack.RsnHD2/_new  2018-08-12 20:52:52.821163756 +0200
@@ -16,43 +16,30 @@
 #
 
 
+%define powerline_python_sitelib %{python3_sitelib}
 Name:           powerline
 Version:        2.6
 Release:        0
 Summary:        Status line and prompt utility
 License:        MIT
 Group:          System/Console
-Url:            https://github.com/powerline/powerline
+URL:            https://github.com/powerline/powerline
 Source0:        
https://github.com/powerline/powerline/archive/%{version}/powerline-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-
-%if 0%{?suse_version} >= 1330
+Patch0:         powerline-2.6-gcc7_fixes.patch
+Patch1:         powerline-py2v3-fix.patch
+BuildRequires:  fdupes
+BuildRequires:  fontconfig
 BuildRequires:  python3-Sphinx
 BuildRequires:  python3-base
 BuildRequires:  python3-setuptools
-%else
-BuildRequires:  python
-BuildRequires:  python-Sphinx
-BuildRequires:  python-setuptools
-%endif
-BuildRequires:  fdupes
-BuildRequires:  fontconfig
 BuildRequires:  sed
+BuildRequires:  systemd-rpm-macros
 BuildRequires:  tmux
 BuildRequires:  vim-base
-%if 0%{?suse_version} >= 1330
-%define powerline_python_sitelib %{python3_sitelib}
-%else
-%define powerline_python_sitelib %{python_sitelib}
-%endif
-%if 0%{?suse_version} >= 1330
-Requires:       python3
-#Requires:       python3-pygit2
-%else
-Requires:       python
-Requires:       python-pygit2
-%endif
 Requires:       powerline-fonts
+Requires:       python3
+Recommends:     python3-pygit2
+%{?systemd_requires}
 
 %description
 Powerline is a status line plugin for vim, and provides status lines and 
prompts
@@ -60,79 +47,72 @@
 Qtile.
 
 %package fonts
-BuildArch:      noarch
 Summary:        Powerline Fonts
 Group:          System/Console
 Requires:       fontconfig
+BuildArch:      noarch
 
 %description fonts
 This package provides the powerline fonts.
 
 %package docs
-BuildArch:      noarch
 Summary:        Documentation for powerline
 Group:          System/Console
+BuildArch:      noarch
 
 %description docs
 This package provides the powerline documentation.
 
 %package -n vim-plugin-powerline
-BuildArch:      noarch
 Summary:        Powerline VIM plugin
 Group:          System/Console
 Requires:       powerline
 Requires:       vim
+BuildArch:      noarch
 
 %description -n vim-plugin-powerline
 Powerline is a status line plugin for vim, and provides status lines and
 prompts.
 
 %package -n tmux-powerline
-BuildArch:      noarch
 Summary:        Powerline for tmux
 Group:          System/Console
 Requires:       powerline
 Requires:       tmux
+BuildArch:      noarch
 
 %description -n tmux-powerline
 Powerline for tmux.
 
 Add
 
-    source /usr/share/tmux/powerline.conf
+    source %{_datadir}/tmux/powerline.conf
 
 to your ~/.tmux.conf file.
 
 %prep
-%setup -q
+%autosetup -p1
 
-%if 0%{?suse_version} >= 1330
 # Change shebang in all relevant files in this directory and all subdirectories
-find -type f -exec sed -i '1s=^#!/usr/bin/\(python\|env 
python\)[23]\?=#!%{__python3}=' {} +
-%endif
+find -type f -exec sed -i '1s=^#!%{_bindir}/\(python\|env 
python\)[23]\?=#!%{_bindir}/python3=' {} +
 
 %build
 
 %install
-sed -i -e "/DEFAULT_SYSTEM_CONFIG_DIR/ s@None@'/etc/xdg'@" powerline/config.py
-sed -i -e "/TMUX_CONFIG_DIRECTORY/ s@BINDINGS_DIRECTORY@'/usr/share'@" 
powerline/config.py
-%if 0%{?suse_version} >= 1330
+sed -i -e "/DEFAULT_SYSTEM_CONFIG_DIR/ s@None@'%{_sysconfdir}/xdg'@" 
powerline/config.py
+sed -i -e "/TMUX_CONFIG_DIRECTORY/ s@BINDINGS_DIRECTORY@'%{_prefix}/share'@" 
powerline/config.py
 CFLAGS="%{optflags}" \
 python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} --optimize=1
-%else
-CFLAGS="%{optflags}" \
-python setup.py install --prefix=%{_prefix} --root=%{buildroot} --optimize=1
-%endif
 
 # build docs
 pushd docs
-make html SPHINXBUILD=/usr/bin/sphinx-build
+make html
 rm _build/html/.buildinfo
 # A structure gets initialized while building the docs with os.environ.
 # This works around an rpmlint error with the build dir being in a file.
 sed -i -e 's/abuild/user/g' _build/html/develop/extensions.html
 
-make man SPHINXBUILD=/usr/bin/sphinx-build
+make man
 popd
 
 # config
@@ -150,9 +130,9 @@
 ln -s %{_datadir}/fontconfig/conf.avail/10-powerline-symbols.conf 
%{buildroot}/%{_sysconfdir}/fonts/conf.d/10-powerline-symbols.conf
 
 # manpages
-install -d -m0755 %{buildroot}/%{_datadir}/man/man1
+install -d -m0755 %{buildroot}/%{_mandir}/man1
 for f in powerline-config.1 powerline-daemon.1 powerline-lint.1 powerline.1; do
-       install -m0644 "docs/_build/man/$f" 
"%{buildroot}/%{_datadir}/man/man1/$f"
+       install -m0644 "docs/_build/man/$f" "%{buildroot}/%{_mandir}/man1/$f"
 done
 
 # awesome
@@ -205,25 +185,45 @@
 install -d -m0755 %{buildroot}/%{_datadir}/%{name}/zsh
 mv 
%{buildroot}/%{powerline_python_sitelib}/powerline/bindings/zsh/powerline.zsh 
%{buildroot}/%{_datadir}/%{name}/zsh
 
+# systemd
+install -d -m 0755 %{buildroot}%{_unitdir}
+install -m 0644 powerline/dist/systemd/powerline-daemon.service 
%{buildroot}%{_unitdir}/powerline.service
+install -d -m 0755 %{buildroot}%{_sbindir}
+ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcpowerline
+
 # cleanup
 rm -rf %{buildroot}/%{powerline_python_sitelib}/%{name}/config_files
 find %{buildroot}/%{powerline_python_sitelib}/%{name}/bindings -name 
"*.py[a-z]" -delete
 
 %fdupes %{buildroot}%{powerline_python_sitelib}
 
+%pre
+%service_add_pre powerline.service
+
+%post
+%service_add_post powerline.service
+
+%preun
+%service_del_preun powerline.service
+
+%postun
+%service_del_postun powerline.service
+
 %files
-%defattr(-,root,root)
-%doc LICENSE README.rst
+%license LICENSE
+%doc README.rst
 %config %{_sysconfdir}/xdg/%{name}
 %{_bindir}/powerline
 %{_bindir}/powerline-config
 %{_bindir}/powerline-daemon
 %{_bindir}/powerline-render
 %{_bindir}/powerline-lint
-%{_mandir}/man1/powerline.1*
-%{_mandir}/man1/powerline-config.1*
-%{_mandir}/man1/powerline-daemon.1*
-%{_mandir}/man1/powerline-lint.1*
+%{_sbindir}/rcpowerline
+%{_mandir}/man1/powerline.1%{?ext_man}
+%{_mandir}/man1/powerline-config.1%{?ext_man}
+%{_mandir}/man1/powerline-daemon.1%{?ext_man}
+%{_mandir}/man1/powerline-lint.1%{?ext_man}
+%{_unitdir}/powerline.service
 %dir %{_datadir}/%{name}
 %dir %{_datadir}/%{name}/awesome
 %{_datadir}/%{name}/awesome/powerline.lua
@@ -248,20 +248,19 @@
 %{powerline_python_sitelib}/*
 
 %files fonts
-%defattr(-,root,root)
-%doc LICENSE README.rst
+%license LICENSE
+%doc README.rst
 %{_sysconfdir}/fonts/conf.d/10-powerline-symbols.conf
 %{_datadir}/fontconfig/conf.avail/10-powerline-symbols.conf
 %dir %{_datadir}/fonts/truetype
 %{_datadir}/fonts/truetype/PowerlineSymbols.otf
 
 %files docs
-%defattr(-,root,root)
 %doc docs/_build/html
 
 %files -n vim-plugin-powerline
-%defattr(-,root,root)
-%doc LICENSE README.rst
+%license LICENSE
+%doc README.rst
 %dir %{_datadir}/vim/site/autoload
 %dir %{_datadir}/vim/site/autoload/powerline
 %{_datadir}/vim/site/autoload/powerline/debug.vim
@@ -269,8 +268,8 @@
 %{_datadir}/vim/site/plugin/powerline.vim
 
 %files -n tmux-powerline
-%defattr(-,root,root)
-%doc LICENSE README.rst
+%license LICENSE
+%doc README.rst
 %dir %{_datadir}/tmux
 %{_datadir}/tmux/powerline*.conf
 

++++++ powerline-2.6-gcc7_fixes.patch ++++++
Index: powerline-2.6/client/powerline.c
===================================================================
--- powerline-2.6.orig/client/powerline.c
+++ powerline-2.6/client/powerline.c
@@ -71,7 +71,7 @@ inline size_t true_sun_len(const struct
 #endif
 
 #define ADDRESS_SIZE sizeof(ADDRESS_TEMPLATE) + (sizeof(uid_t) * 4)
-#define NUM_ARGS_SIZE (sizeof(int) * 2)
+#define NUM_ARGS_SIZE (sizeof(int) * 2 + 1)
 #define BUF_SIZE 4096
 #define NEW_ARGV_SIZE 200
 
Index: powerline-2.6/client/powerline.c
===================================================================
--- powerline-2.6.orig/client/powerline.c
+++ powerline-2.6/client/powerline.c
@@ -42,7 +42,7 @@ void do_write(int sd, const char *raw, s
        }
 }
 
-inline size_t true_sun_len(const struct sockaddr_un *ptr) {
+static inline size_t true_sun_len(const struct sockaddr_un *ptr) {
 #ifdef __linux__
        /* Because SUN_LEN uses strlen and abstract namespace paths begin
         * with a null byte, SUN_LEN is broken for these. Passing the full
++++++ powerline-py2v3-fix.patch ++++++
Index: powerline-2.5/powerline/bindings/vim/plugin/powerline.vim
===================================================================
--- powerline-2.5.orig/powerline/bindings/vim/plugin/powerline.vim
+++ powerline-2.5/powerline/bindings/vim/plugin/powerline.vim
@@ -26,14 +26,14 @@ if exists('g:powerline_pycmd')
                let s:pyeval = g:powerline_pyeval
                let s:has_python = 1
        endif
-elseif has('python')
-       let s:has_python = 1
-       let s:pycmd = 'py'
-       let s:pyeval = get(g:, 'powerline_pyeval', 'pyeval')
 elseif has('python3')
        let s:has_python = 1
        let s:pycmd = 'py3'
        let s:pyeval = get(g:, 'powerline_pyeval', 'py3eval')
+elseif has('python')
+       let s:has_python = 1
+       let s:pycmd = 'py'
+       let s:pyeval = get(g:, 'powerline_pyeval', 'pyeval')
 else
        let s:has_python = 0
 endif

Reply via email to