Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package sshuttle for openSUSE:Factory 
checked in at 2021-06-22 20:45:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sshuttle (Old)
 and      /work/SRC/openSUSE:Factory/.sshuttle.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sshuttle"

Tue Jun 22 20:45:04 2021 rev:10 rq:901279 version:1.0.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/sshuttle/sshuttle.changes        2021-02-19 
23:45:23.519370844 +0100
+++ /work/SRC/openSUSE:Factory/.sshuttle.new.2625/sshuttle.changes      
2021-06-22 20:45:12.902841331 +0200
@@ -1,0 +2,17 @@
+Fri Jun 18 10:08:51 UTC 2021 - Loic Devulder <[email protected]>
+
+- Sshuttle service should be started after firewalld 
+
+-------------------------------------------------------------------
+Thu Jun 10 16:24:33 UTC 2021 - Loic Devulder <[email protected]>
+
+- Fix fix-shebang.patch to use /bin/bash and /bin/sh, as older
+  distributions don't have /usr/bin/bash
+
+-------------------------------------------------------------------
+Wed Jun  9 14:25:01 UTC 2021 - Loic Devulder <[email protected]>
+
+- Add support for a systemd service, this is useful if we want to
+  start sshuttle VPN at boot time.
+
+-------------------------------------------------------------------

New:
----
  sshuttle.service
  sysconfig.sshuttle

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

Other differences:
------------------
++++++ sshuttle.spec ++++++
--- /var/tmp/diff_new_pack.womP94/_old  2021-06-22 20:45:13.542842036 +0200
+++ /var/tmp/diff_new_pack.womP94/_new  2021-06-22 20:45:13.546842040 +0200
@@ -16,6 +16,10 @@
 #
 
 
+#Compat macro for new _fillupdir macro introduced in Nov 2017
+%if ! %{defined _fillupdir}
+  %define _fillupdir /var/adm/fillup-templates
+%endif
 %global pythons python3
 Name:           sshuttle
 Version:        1.0.5
@@ -25,6 +29,8 @@
 Group:          Development/Languages/Python
 URL:            https://github.com/sshuttle/sshuttle
 Source0:        
https://files.pythonhosted.org/packages/source/s/sshuttle/sshuttle-%{version}.tar.gz
+Source1:        %{name}.service
+Source2:        sysconfig.%{name}
 Patch0:         fix-pytest.patch
 Patch1:         fix-shebang.patch
 BuildRequires:  fdupes
@@ -38,6 +44,7 @@
 %if 0%{?suse_version} >= 1550
 BuildRequires:  python3-setuptools_scm
 %endif
+Requires(post): %fillup_prereq
 
 %description
 Transparent proxy server that works as a poor man's VPN. Forwards over ssh.
@@ -54,7 +61,7 @@
   TCP-over-TCP, which has terrible performance.
 
 %prep
-%setup -q -n sshuttle-%{version}
+%setup -q -n %{name}-%{version}
 %patch0
 %patch1 -p1
 
@@ -73,21 +80,49 @@
 %python3_install
 
 %if (0%{?suse_version} >= 1320 || 0%{?suse_version} == 1310)
-mkdir -pm0755  %{buildroot}/%{_mandir}/man1/
-install -m0644 docs/_build/man/sshuttle.1 %{buildroot}/%{_mandir}/man1/
+install -d -m 755 %{buildroot}%{_mandir}/man1
+install -m0644 docs/_build/man/%{name}.1 %{buildroot}/%{_mandir}/man1/
 %endif
 
-%fdupes %{buildroot}/%{python3_sitelib}/sshuttle/
+%fdupes %{buildroot}/%{python3_sitelib}/%{name}/
+
+# systemd service
+install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
+install -d -m 755 %{buildroot}%{_sbindir}
+ln -sf service %{buildroot}%{_sbindir}/rc%{name}
+
+# sysconfig file
+install -d -m 755 %{buildroot}%{_fillupdir}
+install -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}
 
 %check
 %pytest
 
+%pre
+getent group %{name} > /dev/null || groupadd -r %{name}
+getent passwd %{name} > /dev/null || useradd -r -g %{name} -d 
%{_localstatedir}/lib/%{name} -s /sbin/nologin -c "%{name} user" %{name}
+install -d -m 755 -o %{name} -g %{name} %{_localstatedir}/lib/%{name}
+%service_add_pre %{name}.service
+
+%post
+%service_add_post %{name}.service
+%fillup_only %{name}
+
+%preun
+%service_del_preun %{name}.service
+
+%postun
+%service_del_postun %{name}.service
+
 %files
-%{python3_sitelib}/sshuttle*
-%{_bindir}/sshuttle
+%{python3_sitelib}/%{name}*
+%{_bindir}/%{name}
 %{_bindir}/sudoers-add
 %if (0%{?suse_version} >= 1320 || 0%{?suse_version} == 1310)
-%{_mandir}/man1/sshuttle.1%{?ext_man}
+%{_mandir}/man1/%{name}.1%{?ext_man}
 %endif
+%{_sbindir}/rc%{name}
+%{_unitdir}/%{name}.service
+%{_fillupdir}/sysconfig.%{name}
 
 %changelog

++++++ fix-shebang.patch ++++++
--- /var/tmp/diff_new_pack.womP94/_old  2021-06-22 20:45:13.574842071 +0200
+++ /var/tmp/diff_new_pack.womP94/_new  2021-06-22 20:45:13.574842071 +0200
@@ -9,7 +9,7 @@
 +++ sshuttle-1.0.3/bin/sudoers-add     2020-07-29 01:11:17.238524565 +0200
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env bash
-+#!/usr/bin/bash
++#!/bin/bash
  # William Mantly <[email protected]>
  # MIT License
  # https://github.com/wmantly/sudoers-add
@@ -19,7 +19,7 @@
 +++ sshuttle-1.0.3/run 2020-07-29 01:11:02.334557774 +0200
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env sh
-+#!/usr/bin/sh
++#!/bin/sh
  set -e
  export PYTHONPATH="$(dirname $0):$PYTHONPATH"
  export PATH="$(dirname $0)/bin:$PATH"

++++++ sshuttle.service ++++++
[Unit]
Description=Simple VPN connection with sshuttle
After=network-online.target firewalld.service
Documentation=man:sshuttle

[Service]
Type=simple
EnvironmentFile=/etc/sysconfig/sshuttle
User=sshuttle
ExecStart=/usr/bin/sshuttle $SSHUTTLE_OPTS --remote ${VPN_USER}@${VPN_SERVER} 
${NETWORK_TO_ACCESS}
Restart=on-failure

[Install]
WantedBy=multi-user.target
++++++ sysconfig.sshuttle ++++++
## Path:        Network/VPN
## Description: settings to connect to a simple VPN network using sshuttle

## Type:        string
## Default      ""
# User used to connect to the jumper host
VPN_USER=""

## Type:        string
## Default      ""
# Jumper host
VPN_SERVER=""

## Type:        string
## Default      ""
# List of subnet(s) network to access, in this form: a.b.c.d/netmask
NETWORK_TO_ACCESS=""

## Type:        string
## Default      ""
# Extra option(s) that could be useful
SSHUTTLE_OPTS=""

Reply via email to