Hello community, here is the log from the commit of package PackageKit for openSUSE:Factory checked in at 2019-01-26 22:17:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/PackageKit (Old) and /work/SRC/openSUSE:Factory/.PackageKit.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "PackageKit" Sat Jan 26 22:17:41 2019 rev:182 rq:668676 version:1.1.12 Changes: -------- --- /work/SRC/openSUSE:Factory/PackageKit/PackageKit.changes 2018-12-28 12:33:36.788034947 +0100 +++ /work/SRC/openSUSE:Factory/.PackageKit.new.28833/PackageKit.changes 2019-01-26 22:17:41.771085171 +0100 @@ -1,0 +2,6 @@ +Mon Jan 7 08:15:52 UTC 2019 - [email protected] + +- Add PackageKit-systemd-timers.patch: Migrate from cron to + systemd timer (bsc#1115410). + +------------------------------------------------------------------- New: ---- PackageKit-systemd-timers.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ PackageKit.spec ++++++ --- /var/tmp/diff_new_pack.bYScLK/_old 2019-01-26 22:17:42.351084700 +0100 +++ /var/tmp/diff_new_pack.bYScLK/_new 2019-01-26 22:17:42.355084697 +0100 @@ -1,7 +1,7 @@ # # spec file for package PackageKit # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -45,6 +45,8 @@ Patch1: PackageKit-return-on-transactions-going-backwards.patch # PATCH-FIX-UPSTREAM PackageKit-remove-default-thread-check.patch gh#hughsie/PackageKit#303, bsc#1038425 [email protected] -- Remove pk_is_thread_default() check in pk_backend_is_eula_valid Patch2: PackageKit-remove-default-thread-check.patch +# PATCH-FEATURE-OPENSUSE PackageKit-systemd-timers.patch bsc#1115410 [email protected] -- Migrate from cron to systemd timers +Patch3: PackageKit-systemd-timers.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: gobject-introspection-devel @@ -75,7 +77,9 @@ Requires: %{name}-branding = %{version} Requires(post): %fillup_prereq Recommends: %{name}-lang +%if 0%{suse_version} < 1500 Suggests: cron +%endif # doc package only contained the website, and got removed in 0.7.4 Obsoletes: %{name}-doc < 0.7.4 # gtk+ 2 module was removed in 0.7.0 @@ -222,9 +226,14 @@ %prep %setup -q +%if 0%{suse_version} < 1500 %patch0 -p1 +%endif %patch1 -p1 %patch2 -p1 +%if 0%{suse_version} >= 1500 +%patch3 -p1 +%endif translation-update-upstream %build @@ -246,15 +255,20 @@ %else --disable-offline-update \ %endif +%if 0%{suse_version} >= 1500 + --disable-cron \ +%endif %{nil} make %{?_smp_mflags} %install %make_install find %{buildroot} -type f -name "*.la" -delete -print +%if 0%{suse_version} < 1500 # move the cron configuration to a sysconfig template install -d %{buildroot}%{_fillupdir} mv %{buildroot}%{_sysconfdir}/sysconfig/packagekit-background %{buildroot}%{_fillupdir}/sysconfig.packagekit-background +%endif # Prepare for update-alternatives mkdir -p %{buildroot}%{_sysconfdir}/alternatives ln -s -f %{_sysconfdir}/alternatives/gst-install-plugins-helper %{buildroot}/%{_libexecdir}/gst-install-plugins-helper @@ -276,14 +290,24 @@ %pre %service_add_pre packagekit.service +%if 0%{suse_version} >= 1500 +%service_add_pre packagekit-background.service +%service_add_pre packagekit-background.timer +%endif %if %{with offline_updates} %service_add_pre packagekit-offline-update.service %endif %post +%if 0%{suse_version} < 1500 %{fillup_only -n packagekit-background} +%endif %mime_database_post %service_add_post packagekit.service +%if 0%{suse_version} >= 1500 +%service_add_post packagekit-background.service +%service_add_post packagekit-background.timer +%endif %if %{with offline_updates} %service_add_post packagekit-offline-update.service %else @@ -298,6 +322,10 @@ %preun %service_del_preun packagekit.service +%if 0%{suse_version} >= 1500 +%service_del_preun packagekit-background.service +%service_del_preun packagekit-background.timer +%endif %if %{with offline_updates} %service_del_preun packagekit-offline-update.service %endif @@ -307,6 +335,10 @@ # Do not restart PackageKit on upgrade - it kills the transaction export DISABLE_RESTART_ON_UPDATE=yes %service_del_postun packagekit.service +%if 0%{suse_version} >= 1500 +%service_del_postun packagekit-background.service +%service_del_postun packagekit-background.timer +%endif %if %{with offline_updates} %service_del_postun packagekit-offline-update.service %endif @@ -343,12 +375,16 @@ %dir %{_libdir}/packagekit-backend %dir %{_usr}/lib/tmpfiles.d %{_datadir}/bash-completion/completions/pkcon +%if 0%{suse_version} < 1500 %{_sysconfdir}/cron.daily/packagekit-background.cron +%endif %{_sysconfdir}/dbus-1/system.d/org.freedesktop.PackageKit.conf %if %{BUILD_CNF} %{_sysconfdir}/profile.d/PackageKit.sh %endif +%if 0%{suse_version} < 1500 %{_fillupdir}/sysconfig.packagekit-background +%endif %{_bindir}/pkcon %{_bindir}/pkmon %{_libdir}/packagekit-backend/libpk_backend_dummy.so @@ -361,11 +397,18 @@ %{_datadir}/dbus-1/interfaces/org.freedesktop.PackageKit.xml %{_datadir}/PackageKit/helpers/test_spawn/search-name.sh %{_datadir}/PackageKit/pk-upgrade-distro.sh +%if 0%{suse_version} >= 1500 +%{_datadir}/PackageKit/packagekit-background.sh +%endif %verify(not md5 size mtime) %{_datadir}/PackageKit/transactions.db %{_datadir}/polkit-1/actions/org.freedesktop.packagekit.policy %{_datadir}/polkit-1/rules.d/org.freedesktop.packagekit.rules %{_datadir}/dbus-1/system-services/* %{_unitdir}/packagekit.service +%if 0%{suse_version} >= 1500 +%{_unitdir}/packagekit-background.service +%{_unitdir}/packagekit-background.timer +%endif %{_sbindir}/rcpackagekit %{_mandir}/man?/*%{ext_man} %{_tmpfilesdir}/PackageKit.conf ++++++ PackageKit-systemd-timers.patch ++++++ Index: PackageKit-1.1.12/data/Makefile.am =================================================================== --- PackageKit-1.1.12.orig/data/Makefile.am +++ PackageKit-1.1.12/data/Makefile.am @@ -9,12 +9,16 @@ SUBDIRS = \ upgradescriptdir = $(datadir)/PackageKit upgradescript_SCRIPTS = pk-upgrade-distro.sh +backgroundscriptdir = $(datadir)/PackageKit +backgroundscript_SCRIPTS = packagekit-background.sh + dbusdir = ${DBUS_SYS_DIR} dist_dbus_DATA = \ org.freedesktop.PackageKit.conf %.service: %.service.in Makefile $(AM_V_GEN)sed -e 's|\@libexecdir\@|$(libexecdir)|' \ + -e 's|\@datadir\@|$(datadir)|' \ -e 's|\@PACKAGEKIT_USER\@|$(PACKAGEKIT_USER)|' $< > [email protected] && mv [email protected] $@ servicemaindir = $(DBUS_SERVICES_DIR) @@ -23,14 +27,18 @@ servicemain_DATA = $(servicemain_in_ systemdservice_in_files = \ packagekit.service.in \ + packagekit-background.service.in \ packagekit-offline-update.service.in if HAVE_SYSTEMD systemdservicedir = $(systemdsystemunitdir) systemdservice_DATA = packagekit.service +systemdservice_DATA += packagekit-background.service if ENABLE_OFFLINE_UPDATE systemdservice_DATA += packagekit-offline-update.service endif +systemdtimerdir = $(systemdsystemunitdir) +systemdtimer_DATA = packagekit-background.timer endif @@ -54,9 +62,11 @@ EXTRA_DIST = \ $(servicetest_in_files) \ $(serviceapt_in_files) \ $(systemdservice_in_files) \ + $(systemdtimer_DATA) \ $(localcache_DATA) \ $(database_DATA) \ - $(upgradescript_SCRIPTS) + $(upgradescript_SCRIPTS) \ + $(backgroundscript_SCRIPTS) clean-local: rm -f *~ Index: PackageKit-1.1.12/data/packagekit-background.service.in =================================================================== --- /dev/null +++ PackageKit-1.1.12/data/packagekit-background.service.in @@ -0,0 +1,5 @@ +[Unit] +Description=Script to update the system with PackageKit + +[Service] +ExecStart=@datadir@/PackageKit/packagekit-background.sh Index: PackageKit-1.1.12/data/packagekit-background.sh =================================================================== --- /dev/null +++ PackageKit-1.1.12/data/packagekit-background.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright (C) 2008 Richard Hughes <[email protected]> +# +# Some material taken from yum-cron, Copyright 2007 Alec Habig <[email protected]> +# +# Licensed under the GNU General Public License Version 2 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[ -f /etc/sysconfig/packagekit-background ] && . /etc/sysconfig/packagekit-background + +# are we disabled? +if [ "$ENABLED" = "no" ]; then + exit 0 +fi + +# set default for SYSTEM_NAME +[ -z "$SYSTEM_NAME" ] && SYSTEM_NAME=$(hostname) + +PKTMP=$(mktemp /var/run/packagekit-cron.XXXXXX) +PKCON_OPTIONS="--background --noninteractive --plain" +if [ "$UPDATE_OFFLINE" = "yes" ]; then + ONLY_DOWNLOAD="--only-download" +else + ONLY_DOWNLOAD="" +fi + +# wait a random amount of time to avoid hammering the servers +[ -z "$SLEEP_MAX" ] && SLEEP_MAX=$RANDOM +sleep $(( $RANDOM % $SLEEP_MAX + 1 )) + +# do action +if [ "$CHECK_ONLY" = "yes" ]; then + pkcon $PKCON_OPTIONS get-updates &> $PKTMP + PKCON_RETVAL=$? +else + pkcon $PKCON_OPTIONS $ONLY_DOWNLOAD update &> $PKTMP + PKCON_RETVAL=$? + if [ $PKCON_RETVAL -eq 0 -a "$UPDATE_OFFLINE" = "yes" ]; then + pkcon $PKCON_OPTIONS offline-trigger &> $PKTMP + fi +fi + +# this is when seomthing useful was done +if [ $PKCON_RETVAL -ne 5 ]; then + # send email + if [ -n "$MAILTO" ]; then + mail -s "System updates available: $SYSTEM_NAME" $MAILTO < $PKTMP + else + # default behavior is to use cron's internal mailing of output from cron-script + cat $PKTMP + fi +fi + +rm -f $PKTMP + Index: PackageKit-1.1.12/data/packagekit-background.timer =================================================================== --- /dev/null +++ PackageKit-1.1.12/data/packagekit-background.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Systemd timer to update the system daily with PackageKit + +[Timer] +OnCalendar=daily +AccuracySec=12h +Persistent=true +Unit=package-background.service + +[Install] +WantedBy=timers.target
