commit etc-update for openSUSE:Factory
Hello community, here is the log from the commit of package etc-update for openSUSE:Factory checked in at 2018-04-27 16:08:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/etc-update (Old) and /work/SRC/openSUSE:Factory/.etc-update.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "etc-update" Fri Apr 27 16:08:34 2018 rev:5 rq:601518 version:2.3.31 Changes: -------- --- /work/SRC/openSUSE:Factory/etc-update/etc-update.changes 2015-11-16 18:51:37.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.etc-update.new/etc-update.changes 2018-04-27 16:08:36.051878450 +0200 @@ -1,0 +2,14 @@ +Thu Apr 26 08:14:14 UTC 2018 - tchvatal@suse.com + +- Add patch etc-update-opensuse.patch to really work on Leap + +------------------------------------------------------------------- +Wed Apr 25 11:32:34 UTC 2018 - tchvatal@suse.com + +- Version update to 2.3.31: + * Few small fixes + * Update to support archlinux config files out of the box +- Use full portage archive in order to allow "automatic" updating + instead of copying files + +------------------------------------------------------------------- Old: ---- GPL-2 etc-update etc-update.1 etc-update.conf New: ---- etc-update-opensuse.patch portage-2.3.31.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ etc-update.spec ++++++ --- /var/tmp/diff_new_pack.rj19mI/_old 2018-04-27 16:08:36.671855711 +0200 +++ /var/tmp/diff_new_pack.rj19mI/_new 2018-04-27 16:08:36.671855711 +0200 @@ -1,7 +1,7 @@ # # spec file for package etc-update # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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 @@ -17,19 +17,16 @@ Name: etc-update -Requires: bash -Version: 2.2.24 +Version: 2.3.31 Release: 0 -Url: https://wiki.gentoo.org/wiki/Handbook:X86/Portage/Tools#etc-update -Source0: %name -Source1: %name.1 -Source2: %name.conf -Source3: GPL-2 Summary: Configuration file update handler -License: GPL-2.0 +License: GPL-2.0-only Group: System/Base +URL: https://wiki.gentoo.org/wiki/Handbook:X86/Portage/Tools#etc-update +Source0: https://github.com/gentoo/portage/archive/portage-%{version}.tar.gz +Patch0: etc-update-opensuse.patch +Requires: bash BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description etc-update is supposed to be run after merging a new package to see if there @@ -42,25 +39,22 @@ etc-update. %prep -cp %_sourcedir/* . +%setup -q -n portage-portage-%{version} +%patch0 -p1 %build -echo "Nothing to do..." +: %install -install -D -m 0755 %name "%{buildroot}"/%{_sbindir}/%name -install -D -m 0644 %name.conf "%{buildroot}"%{_sysconfdir}/%name.conf -sed -i -e "s/VERSION/%{version}/" %name.1 -install -D -m 0644 %name.1 "%{buildroot}"/%{_mandir}/man1/%name.1 - -%clean -rm -rf "%{buildroot}" +install -D -m 0755 bin/%{name} %{buildroot}/%{_sbindir}/%{name} +install -D -m 0644 cnf/%{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf +sed -i -e "s/VERSION/%{version}/" man/%{name}.1 +install -D -m 0644 man/%{name}.1 %{buildroot}/%{_mandir}/man1/%{name}.1 %files -%defattr(-,root,root) -%doc GPL-2 -%{_sbindir}/%name -%config(noreplace) %{_sysconfdir}/%name.conf +%license LICENSE +%{_sbindir}/%{name} +%config(noreplace) %{_sysconfdir}/%{name}.conf %{_mandir}/man1/%{name}* %changelog ++++++ etc-update-opensuse.patch ++++++ Index: portage-portage-2.3.31/bin/etc-update =================================================================== --- portage-portage-2.3.31.orig/bin/etc-update +++ portage-portage-2.3.31/bin/etc-update @@ -32,11 +32,12 @@ get_config() { "${PORTAGE_CONFIGROOT}"etc/etc-update.conf) } -OS_RELEASE_ID=$(cat /etc/os-release 2>/dev/null | grep '^ID=' | cut -d'=' -f2) +OS_RELEASE_ID=$(cat /etc/os-release 2>/dev/null | grep '^ID=' | cut -d'=' -f2 | sed -e 's/"//g') case $OS_RELEASE_ID in - suse|opensuse) OS_FAMILY='suse' NEW_EXT='rpmnew';; - arch|manjaro|antergos) OS_FAMILY='arch' NEW_EXT='pacnew';; + suse|opensuse|opensuse-leap|opensuse-tumbleweed) OS_FAMILY='rpm' ;; + fedora|rhel) OS_FAMILY='rpm' ;; + arch|manjaro|antergos) OS_FAMILY='arch' ;; *) OS_FAMILY='gentoo' ;; esac @@ -53,18 +54,32 @@ if [[ $OS_FAMILY == 'gentoo' ]]; then get_live_file() { echo "${rpath}/${rfile:10}" } -elif [[ $OS_FAMILY == 'suse' ]] || [[ $OS_FAMILY == 'arch' ]]; then +elif [[ $OS_FAMILY == 'arch' ]]; then + get_basename() { + printf -- '%s\n' "${1%.pacnew}" + } + get_basename_find_opt() { + printf -- '%s\n' "${1}.pacnew" + } + get_scan_regexp() { + echo "s:\(^.*/\)\(.*\)\(\.pacnew\):\1\2\3$b\1$b\3$b\2:" + } + get_live_file() { + printf -- '%s\n' "${cfg_file%.pacnew}" + } +# In rpm we have rpmsave rpmorig and rpmnew +elif [[ $OS_FAMILY == 'rpm' ]]; then get_basename() { - printf -- '%s\n' "${1%.${NEW_EXT}}" + printf -- '%s\n' "${1}" |sed -e 's/\.rpmsave$//' -e 's/\.rpmnew$//' -e 's/\.rpmorig$//' } get_basename_find_opt() { - printf -- '%s\n' "${1}.${NEW_EXT}" + printf -- '%s\n' "${1}.rpm????" } get_scan_regexp() { - echo "s:\(^.*/\)\(.*\)\(\.rpmnew\):\1\2\3$b\1$b\3$b\2:" + echo "s:\(^.*/\)\(.*\)\(\.\(rpmnew|rpmsave|rpmorig\)\):\1\2\3$b\1$b\3$b\2:" } get_live_file() { - printf -- '%s\n' "${cfg_file%.${NEW_EXT}}" + printf -- '%s\n' "${cfg_file}" |sed -e 's/\.rpmsave$//' -e 's/\.rpmnew$//' -e 's/\.rpmorig$//' } fi @@ -557,7 +572,7 @@ do_merge() { local file="${1}" local ofile="${2}" - local mfile="${TMP}/${2}.merged" + local mfile="${TMP}/${2#/}.merged" local -i my_input=0 if [[ -L ${file} && -L ${ofile} ]] ; then @@ -754,10 +769,10 @@ while [[ -n $1 ]] ; do done ${SET_X} && set -x -if [[ $OS_FAMILY == 'suse' ]]; then +if [[ $OS_FAMILY == 'rpm' ]]; then PORTAGE_CONFIGROOT='/' PORTAGE_TMPDIR='/tmp' - CONFIG_PROTECT='/etc' + CONFIG_PROTECT='/etc /usr/share' CONFIG_PROTECT_MASK='' [[ -f /etc/sysconfig/etc-update ]] && . /etc/sysconfig/etc-update elif [[ $OS_FAMILY == 'arch' ]]; then
participants (1)
-
root@hilbert.suse.de