Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package backintime for openSUSE:Factory checked in at 2024-01-17 22:16:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/backintime (Old) and /work/SRC/openSUSE:Factory/.backintime.new.16006 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "backintime" Wed Jan 17 22:16:01 2024 rev:31 rq:1139333 version:1.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/backintime/backintime.changes 2023-11-13 22:21:31.920963305 +0100 +++ /work/SRC/openSUSE:Factory/.backintime.new.16006/backintime.changes 2024-01-17 22:16:09.400884751 +0100 @@ -1,0 +2,6 @@ +Sun Jan 7 23:31:02 UTC 2024 - Tejas Guruswamy <[email protected]> + +- Add backintime-python_location.patch to manually specify python and allow build on Leap 15.5 +- Re-add missing Group and Provides tags + +------------------------------------------------------------------- New: ---- backintime-python_location.patch BETA DEBUG BEGIN: New: - Add backintime-python_location.patch to manually specify python and allow build on Leap 15.5 - Re-add missing Group and Provides tags BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ backintime.spec ++++++ --- /var/tmp/diff_new_pack.prb0Lx/_old 2024-01-17 22:16:10.028907827 +0100 +++ /var/tmp/diff_new_pack.prb0Lx/_new 2024-01-17 22:16:10.028907827 +0100 @@ -1,7 +1,7 @@ # # spec file for package backintime # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,10 +16,17 @@ # +%if 0%{?suse_version} > 1500 +%define pythons python3 +%else +%{?sle15_python_module_pythons} +%endif + Name: backintime Version: 1.4.1 Release: 0 Summary: Backup tool for Linux inspired by the "flyback project" +Group: Productivity/Archiving/Backup License: GPL-2.0-or-later URL: https://github.com/bit-team/backintime Source0: https://github.com/bit-team/backintime/releases/download/v%{version}/%{name}-%{version}.tar.gz @@ -28,19 +35,30 @@ Source3: %{name}.png # PATCH-FEATURE-OPENSUSE %%{name}-polkit_priv_downgrade.patch boo#1007723 Patch0: %{name}-polkit_priv_downgrade.patch +# PATCH-FEATURE-UPSTREAM %%{name}-python_location.patch +Patch1: %{name}-python_location.patch +BuildRequires: %{python_module devel >= 3.8} +# TEST REQUIREMENTS (only works on real hardware) +#BuildRequires: %#{python_module packaging} +#BuildRequires: %#{python_module dbus-python} +#BuildRequires: %#{python_module keyring} +#BuildRequires: %#{python_module pyfakefs} +#BuildRequires: openssh +#BuildRequires: rsync +#BuildRequires: udev +# /TEST REQUIREMENTS +BuildConflicts: python3-devel < 3.8 BuildRequires: fdupes BuildRequires: hicolor-icon-theme -BuildRequires: python3-devel >= 3.8 +BuildRequires: python-rpm-macros BuildRequires: update-desktop-files +Requires: %{python_flavor}-dbus-python +Requires: %{python_flavor}-keyring +Requires: %{python_flavor}-packaging Requires: cron -Requires: dbus-1-python3 Requires: openssh -%if 0%{?suse_version} > 1500 Requires: pkexec -%endif Requires: python3 >= 3.8 -Requires: python3-keyring -Requires: python3-packaging Requires: rsync Recommends: encfs Recommends: sshfs @@ -65,13 +83,14 @@ %package qt Summary: Back In Time Qt5 GUI Requires: %{name} = %{version} -Requires: dbus-1-python3 +Requires: %{python_flavor}-dbus-python +Requires: %{python_flavor}-qt5 Requires: libqt5-qttranslations Requires: polkit -Requires: python3-qt5 # used as a fallback in case of missing icons Recommends: oxygen5-icon-theme -Obsoletes: backintime-qt4 +Obsoletes: backintime-qt4 < %{version} +Provides: backintime-qt4 = %{version}-%{release} %description qt This package has a Qt5 GUI for %{name}. @@ -81,6 +100,7 @@ %prep %setup -q %patch0 +%patch1 -p1 %build @@ -94,14 +114,14 @@ sed -i 's/Icon=document-save/Icon=backintime/g' qt/backintime-qt.desktop qt/backintime-qt-root.desktop # Fix shebangs -sed -i 's|/usr/bin/env python|#!/usr/bin/python|g' common/askpass.py +%python_expand sed -i "s|/usr/bin/env python|#!/usr/bin/$python|g" common/askpass.py pushd common -./configure --python3 +%python_expand ./configure --python="%{_bindir}/$python" make %{?_smp_mflags} popd pushd qt -./configure --python3 +%python_expand ./configure --python="%{_bindir}/$python" make %{?_smp_mflags} popd @@ -123,6 +143,11 @@ %find_lang %{name} --without-kde --without-gnome +#%#check # Only works on real hardware +#pushd common +#make test +#popd + %postun rm -f %{_sysconfdir}/udev/rules.d/99-backintime-*.rules @@ -138,7 +163,7 @@ %{_mandir}/man1/%{name}-askpass.1%{ext_man} %{_mandir}/man1/%{name}-config.1%{ext_man} %{_mandir}/man1/%{name}.1%{ext_man} -%{_sysconfdir}/xdg/autostart/backintime.desktop +%config %{_sysconfdir}/xdg/autostart/backintime.desktop %exclude %{_docdir}/%{name}-*/ %exclude %{_datadir}/%{name}/qt %exclude %{_datadir}/%{name}/plugins ++++++ backintime-python_location.patch ++++++ diff --git a/common/configure b/common/configure index 89a7beb5..587aaa0b 100755 --- a/common/configure +++ b/common/configure @@ -11,18 +11,20 @@ UNINSTALL_FILES="$(mktemp)" UNINSTALL_DIRS="$(mktemp)" #set default options -PYTHON="--python3" +PYTHON="python3" USR_BIN_FILES="backintime backintime-askpass" usage () { echo "Usage:" - echo "$0 [--python | --python3]" + echo "$0 [--python | --python3 | --python=PYTHON_BINARY]" echo "" echo "--python" echo "\tuse 'python' to start Python3" echo "--python3" echo "\tuse 'python3' to start Python3" + echo "--python=PYTHON_BINARY" + echo "\tuse PYTHON_BINARY to start Python3" } addInstallFiles () { @@ -113,7 +115,15 @@ onTravis () { unknown_args="" for arg in $*; do case $arg in - --python | --python3) PYTHON=$arg;; + --python=*) + PYTHON=$(echo $arg | cut -f2 -d'=') + ;; + --python3) + PYTHON="/usr/bin/python3" + ;; + --python) + PYTHON="/usr/bin/python" + ;; --help | -h) usage; exit 0;; *) unknown_args="$unknown_args $arg";; esac @@ -123,15 +133,12 @@ if [ -n "$unknown_args" ]; then echo "Unknown Arguments: $unknown_args" fi -#patch python command -#use 'python' or 'python3' to start Python Version 3.x -case $PYTHON in - --python) PYVERSION="" ;; - --python3) PYVERSION="3";; -esac -sed -e "s/^python3\? /python${PYVERSION} /g" \ - -e "s/^ssh-agent python3\? /ssh-agent python${PYVERSION} /g" \ - -i $USR_BIN_FILES +if [ -n "$(sed -e "s#^python3\? #${PYTHON} #gw /dev/stdout" -i $USR_BIN_FILES)" ] +then + echo "Replacement of python path with \"${PYTHON}\" successful." +else + echo "WARNING: Replacement of python path with \"${PYTHON}\" FAILED. Maybe you ran configure more than once?" +fi #check languages mos="" @@ -276,7 +283,7 @@ COVERAGE=$(which coverage 2>/dev/null) if onTravis && [ -n "${COVERAGE}" ]; then CMD="coverage run -p" else - CMD="python${PYVERSION}" + CMD="${PYTHON}" fi printf "test:\tunittest\n\n" >> ${MAKEFILE} @@ -324,7 +331,7 @@ done # check python version PYTHON_VERSION_REQUIRED="3.8" -PYTHON_VERSION_CURRENT=$(python${PYVERSION} --version | tr --delete 'Python ') +PYTHON_VERSION_CURRENT=$(${PYTHON} --version | tr --delete 'Python ') # Credits: https://unix.stackexchange.com/a/285928/136851 if [ "$(printf '%s\n' "$PYTHON_VERSION_REQUIRED" "$PYTHON_VERSION_CURRENT" | sort -V | head -n1)" != "$PYTHON_VERSION_REQUIRED" ]; then diff --git a/qt/configure b/qt/configure index 7ab4c1dc..0de87616 100755 --- a/qt/configure +++ b/qt/configure @@ -11,19 +11,21 @@ UNINSTALL_FILES="$(mktemp)" UNINSTALL_DIRS="$(mktemp)" #set default options -PYTHON="--python3" +PYTHON="python3" USR_BIN_FILES="backintime-qt backintime-qt_polkit" DBUS_SERVICE_FILES="net.launchpad.backintime.serviceHelper.service" usage () { echo "Usage:" - echo "$0 [--python | --python3]" + echo "$0 [--python | --python3 | --python=PYTHON_BINARY]" echo "" echo "--python" echo "\tuse 'python' to start Python3" echo "--python3" echo "\tuse 'python3' to start Python3" + echo "--python=PYTHON_BINARY" + echo "\tuse PYTHON_BINARY to start Python3" } addInstallFiles () { @@ -98,9 +100,17 @@ addNewline () { unknown_args="" for arg in $*; do case $arg in - --python | --python3) PYTHON=$arg;; - --help | -h) usage; exit 0;; - *) unknown_args="$unknown_args $arg";; + --python=*) + PYTHON=$(echo $arg | cut -f2 -d'=') + ;; + --python3) + PYTHON="/usr/bin/python3" + ;; + --python) + PYTHON="/usr/bin/python" + ;; + --help | -h) usage; exit 0;; + *) unknown_args="$unknown_args $arg";; esac done @@ -110,15 +120,13 @@ fi #patch python command #use 'python' or 'python3' to start Python Version 3.x -case $PYTHON in - --python) PYVERSION="" ;; - --python3) PYVERSION="3";; -esac -sed -e "s#^python3\? #python${PYVERSION} #g" \ - -e "s#^ssh-agent python3\? #ssh-agent python${PYVERSION} #g" \ - -i $USR_BIN_FILES -sed -e "s#^Exec=/usr/bin/python3\? #Exec=/usr/bin/python${PYVERSION} #g" \ - -i $DBUS_SERVICE_FILES +if [ -n "$(sed -e "s#^python3\? #${PYTHON} #gw /dev/stdout" -i $USR_BIN_FILES)" ] \ + && [ -n "$(sed -e "s#^Exec=/usr/bin/python3\? #Exec=${PYTHON} #gw /dev/stdout" -i $DBUS_SERVICE_FILES)" ] +then + echo "Replacement of python path with \"${PYTHON}\" successful." +else + echo "WARNING: Replacement of python path with \"${PYTHON}\" FAILED. Maybe you ran configure more than once?" +fi #start Makefile printf "PREFIX=/usr\n" >> ${MAKEFILE} @@ -233,7 +241,7 @@ done # check python version PYTHON_VERSION_REQUIRED="3.8" -PYTHON_VERSION_CURRENT=$(python${PYVERSION} --version | tr --delete 'Python ') +PYTHON_VERSION_CURRENT=$(${PYTHON} --version | tr --delete 'Python ') # Credits: https://unix.stackexchange.com/a/285928/136851 if [ "$(printf '%s\n' "$PYTHON_VERSION_REQUIRED" "$PYTHON_VERSION_CURRENT" | sort -V | head -n1)" != "$PYTHON_VERSION_REQUIRED" ]; then
