Hello community, here is the log from the commit of package systemd-rpm-macros for openSUSE:Factory checked in at 2017-03-21 22:42:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/systemd-rpm-macros (Old) and /work/SRC/openSUSE:Factory/.systemd-rpm-macros.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "systemd-rpm-macros" Tue Mar 21 22:42:35 2017 rev:18 rq:479261 version:3 Changes: -------- --- /work/SRC/openSUSE:Factory/systemd-rpm-macros/systemd-rpm-macros.changes 2017-01-19 10:35:34.899060237 +0100 +++ /work/SRC/openSUSE:Factory/.systemd-rpm-macros.new/systemd-rpm-macros.changes 2017-03-21 22:42:43.372679196 +0100 @@ -1,0 +2,16 @@ +Fri Mar 10 11:54:11 UTC 2017 - f...@suse.com + +- Kill preset macros + + The last users have been fixed so these macros are no more used by + any package. + + The introduction of them was a bad idea and only the branding preset + package is still using a similar mechanism but at least it's now + self contained in this package. Also the package calls now a shell + script instead of rpm macros. + + Upstream is working on making this completely obsolete so the preset + branding package could be cleaned up for good. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ macros.systemd ++++++ --- /var/tmp/diff_new_pack.W6elBx/_old 2017-03-21 22:42:44.068580878 +0100 +++ /var/tmp/diff_new_pack.W6elBx/_new 2017-03-21 22:42:44.068580878 +0100 @@ -19,17 +19,6 @@ # %postun # %service_del_postun demo.service # -### -# -# When a package install systemd preset files, it should use the following macros: -# -# %pre -p /bin/bash -# %systemd_preset_pre -# -# %posttrans -p /bin/bash -# %systemd_preset_posttrans -# -### # This is for systemctl %systemd_requires \ @@ -282,116 +271,3 @@ [ -x /usr/lib/systemd/systemd-binfmt ] && \ /usr/lib/systemd/systemd-binfmt %{?*} || : \ %{nil} - -%systemd_preset_pre() \ -if ! test -f /usr/lib/systemd/system-preset/99-default-disable.preset ; then \ - mkdir -p /usr/lib/systemd/system-preset; \ - touch /usr/lib/systemd/system-preset/systemd_preset-skip.rpm-tmp; \ -else \ - cd /usr/lib/systemd/system-preset; \ - declare -a PRESET_FILES; \ - declare -A PRESETS; \ - PRESET_FILES=(*.preset); \ - if ! test -f systemd_preset-old.rpm-tmp ; then \ - for ((i=${#PRESET_FILES[@]}-1 ; i>= 0 ; i-- )) ; do \ - FILE=${PRESET_FILES[i]}; \ - exec 3<"$FILE"; \ - while read -u3 ENABLE SERVICE PAD ; do \ - if test -z "$SERVICE" ; then \ - continue; \ - fi; \ - case "$ENABLE" in \ - enable|disable) \ - PRESETS[$SERVICE]=$ENABLE;; \ - esac; \ - done; \ - exec 3<&-; \ - done; \ - exec 3>systemd_preset-old.rpm-tmp; \ - for PRESET in "${!PRESETS[@]}" ; do \ - echo >&3 "${PRESETS[$PRESET]} $PRESET"; \ - done; \ - exec 3>&-; \ - fi; \ -fi; \ -%{nil} - -%systemd_preset_posttrans() \ -if test -f /usr/lib/systemd/system-preset/systemd_preset-skip.rpm-tmp ; then \ - rm -f /usr/lib/systemd/system-preset/systemd_preset-{old,skip}.rpm-tmp; \ -fi; \ -cd /usr/lib/systemd/system-preset; \ -if test -f systemd_preset-old.rpm-tmp ; then \ - declare -a PRESET_FILES; \ - declare -A PRESETS_OLD; \ - declare -A PRESETS_OLD_WILDCARD; \ - declare -A PRESETS; \ - declare -A PRESETS_WILDCARD; \ - exec 3<systemd_preset-old.rpm-tmp; \ - while read -u3 ENABLE SERVICE PAD ; do \ - if test -z "$SERVICE" ; then \ - continue; \ - fi; \ - case "$ENABLE" in \ - enable|disable) \ - case $SERVICE in \ - *"*"*|*"?"*) PRESETS_OLD_WILDCARD[$SERVICE]=$ENABLE;; \ - *) PRESETS_OLD[$SERVICE]=$ENABLE;; \ - esac;; \ - esac; \ - done; \ - exec 3<&-; \ - PRESET_FILES=(*.preset); \ - for ((i=${#PRESET_FILES[@]}-1 ; i>= 0 ; i-- )) ; do \ - FILE=${PRESET_FILES[i]}; \ - exec 3<"$FILE"; \ - while read -u3 ENABLE SERVICE PAD ; do \ - if test -z "$SERVICE" ; then \ - continue; \ - fi; \ - case "$ENABLE" in \ - enable|disable) \ - case $SERVICE in \ - *"*"*|*"?"*) PRESETS_WILDCARD[$SERVICE]=$ENABLE;; \ - *) PRESETS[$SERVICE]=$ENABLE;; \ - esac;; \ - esac; \ - done; \ - exec 3<&-; \ - done; \ - if test -x /usr/bin/systemctl ; then \ - /usr/bin/systemctl --type=service,socket list-unit-files; \ - fi >systemd_preset-states.rpm-tmp; \ - exec 3<systemd_preset-states.rpm-tmp; \ - read -u3 PAD; \ - while read -u3 SERVICE ENABLE PAD ; do \ - if test -z "$SERVICE" ; then \ - break; \ - fi; \ - ENABLE_OLD=enable; \ - for PRESET in "${!PRESETS_OLD_WILDCARD[@]}" ; do \ - case "$SERVICE" in \ - $PRESET) ENABLE_OLD=${PRESETS_OLD_WILDCARD[$PRESET]};; \ - esac; \ - done; \ - if test -n "${PRESETS_OLD[$SERVICE]}" ; then \ - ENABLE_OLD="${PRESETS_OLD[$SERVICE]}"; \ - fi; \ - ENABLE_NEW=enable; \ - for PRESET in "${!PRESETS_WILDCARD[@]}" ; do \ - case "$SERVICE" in \ - $PRESET) ENABLE_NEW=${PRESETS_WILDCARD[$PRESET]};; \ - esac; \ - done; \ - if test -n "${PRESETS[$SERVICE]}" ; then \ - ENABLE_NEW="${PRESETS[$SERVICE]}"; \ - fi; \ - if test "$ENABLE_OLD" != "$ENABLE_NEW" ; then \ - echo "Resetting $SERVICE to the new default: $ENABLE_NEW"; \ - /usr/bin/systemctl preset "$SERVICE" || :; \ - fi; \ - done; \ - exec 3<&-; \ - rm -f systemd_preset-old.rpm-tmp systemd_preset-states.rpm-tmp; \ -fi; \ -%{nil}