Hello community, here is the log from the commit of package gconf2-branding-openSUSE for openSUSE:11.4 checked in at Mon Feb 21 23:15:52 CET 2011. -------- --- old-versions/11.4/all/gconf2-branding-openSUSE/gconf2-branding-SLED.changes 2011-02-18 14:39:07.000000000 +0100 +++ 11.4/gconf2-branding-openSUSE/gconf2-branding-SLED.changes 2011-02-21 23:14:51.815893000 +0100 @@ -1,0 +2,25 @@ +Mon Feb 21 14:12:02 CET 2011 - vuntz@opensuse.org + +- Remove support for building on openSUSE < 11.4: the changes we're + introducing here make it too hard to support the old scheme. +- The default background is now always openSUSE-default.xml: + + We do this to make sure that the setting on upgrades won't + cause any issue at all, even if the user chooses to explicitly + use the default wallpaper. + + openSUSE-default.xml is a symlink to either the static + wallpaper from desktop-data-openSUSE or to + openSUSE-default-dynamic.xml in openSUSE-dynamic-wallpaper. + + Use update-alternatives in openSUSE-dynamic-wallpaper %post and + %postun to update openSUSE-default.xml. Add appropriate + Requires. + + Make openSUSE-default-dynamic.xml a symlink to the current xml + file for the dynamic wallpaper (stripes.xml). + + Update gconf key for the default wallpaper to point to + openSUSE-default.xml. +- As a side-effect, this means we can get rid of all + %triggerin/%triggerpostun scripts, which were not really nice. +- Also, create the gnome-control-center xml file describing the + dynamic wallpaper from the one of the static version. This will + ensure consistency. + +------------------------------------------------------------------- gconf2-branding-SLES.changes: same change gconf2-branding-openSUSE.changes: same change calling whatdependson for 11.4-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gconf2-branding-SLED.spec ++++++ --- /var/tmp/diff_new_pack.KIbirp/_old 2011-02-21 23:15:08.000000000 +0100 +++ /var/tmp/diff_new_pack.KIbirp/_new 2011-02-21 23:15:08.000000000 +0100 @@ -25,32 +25,14 @@ %define branding_name openSUSE %define desktop_data openSUSE %define dynamic_file stripes/stripes.xml -%define dynamic_is_latest 1 %define desktop_data_ver 11.4 -# Note: when updating this, don't forget to also change everything that is -# related to the current dynamic background (dynamic_file, dynamic_is_latest, -# and where the previous dynamic background is installed) %define wallpaper_file openSUSE-default.xml -%if %suse_version == 1130 -%define dynamic_file IK/IK.xml -%define dynamic_is_latest 1 -%define desktop_data_ver 11.3 -%define wallpaper_file openSUSE113-1600x1200.jpg -%else # %%suse_version == 1130 -%if %suse_version == 1120 -%define dynamic_file daft/daft.xml -%define dynamic_is_latest 0 -%define desktop_data_ver 11.2 -%define wallpaper_file openSUSE112-1600x1200.png -%endif # %%suse_version == 1120 -%endif # %%suse_version == 1130 %endif # %%build_openSUSE %if %build_SLED %define branding_name SLED %define desktop_data SLED %define desktop_data_ver 11 %define dynamic_file nonexisting -%define dynamic_is_latest 0 %define wallpaper_file SLED110-1600x1200.png %endif %if %build_SLES @@ -58,7 +40,6 @@ %define desktop_data SLED %define desktop_data_ver 11 %define dynamic_file nonexisting -%define dynamic_is_latest 0 %define wallpaper_file SLED110-1600x1200.png %endif @@ -69,7 +50,7 @@ Group: System/GUI/GNOME Summary: SLED defaults for the GNOME configuration system Version: %{desktop_data_ver} -Release: 8.<RELEASE2> +Release: 8.<RELEASE3> Source: gconf2-branding_spec-prepare.sh # panel-default-setup.entries from gnome-panel (patched version): Source2: panel-default-setup.entries @@ -138,6 +119,8 @@ License: BSD3c(or similar) Summary: Dynamic wallpaper for GNOME, with SLED Look Group: System/GUI/GNOME +Requires(post): update-alternatives +Requires(postun): update-alternatives Supplements: packageand(desktop-data-%{desktop_data}:gnome-settings-daemon) Provides: desktop-data-SLED-extra-gnome = %{version} Obsoletes: desktop-data-SLED-extra-gnome < %{version} @@ -207,15 +190,32 @@ %endif %build +%if %suse_version < 1140 +echo "Sorry, the setup to install the default background only works on 11.4 and later when building this package." +false +%endif %install # dynamic backgrounds %if %build_openSUSE -install -d $RPM_BUILD_ROOT%{_datadir}/backgrounds $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties -# current dynamic background -cp -a stripes $RPM_BUILD_ROOT%{_datadir}/backgrounds/ -install -m0644 desktop-backgrounds-stripes.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/SLED-dynamic-wallpaper.xml -# old 11.0, 11.1, 11.2 dynamic backgrounds +# Here's the setup we use (assuming openSUSE for branding in this example): +# - /usr/share/wallpapers/openSUSE-default.xml is the default background +# - /usr/share/wallpapers/openSUSE-default.xml is a symlink (via +# update-alternatives) to either the background from desktop-data-openSUSE or +# /usr/share/wallpapers/openSUSE-default-dynamic.xml from openSUSE-dynamic-background +# - /usr/share/wallpapers/openSUSE-default-dynamic.xml is a symlink to the +# dynamic background matching the default background of the distribution we +# build against +# +# WARNING WARNING WARNING +# If we ever remove the dynamic background, then the +# SLED-default-dynamic.xml file should still be shipped, as a +# symlink to SLED-default-static.xml. +# +install -d $RPM_BUILD_ROOT%{_datadir}/backgrounds $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties $RPM_BUILD_ROOT%{_datadir}/wallpapers +ln -s %{_datadir}/backgrounds/%{dynamic_file} $RPM_BUILD_ROOT%{_datadir}/wallpapers/SLED-default-dynamic.xml +touch $RPM_BUILD_ROOT%{_datadir}/wallpapers/SLED-default.xml +# install dynamic backgrounds cp -a grass $RPM_BUILD_ROOT%{_datadir}/backgrounds/ install -m0644 desktop-backgrounds-grass.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-SLED-11.0-extra-gnome.xml cp -a glass $RPM_BUILD_ROOT%{_datadir}/backgrounds/ @@ -224,6 +224,10 @@ install -m0644 desktop-backgrounds-daft.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-SLED-11.2-extra-gnome.xml cp -a gnome-wallpaper-11.3/IK $RPM_BUILD_ROOT%{_datadir}/backgrounds/ install -m0644 gnome-wallpaper-11.3/desktop-backgrounds-IK.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-SLED-11.3-extra-gnome.xml +cp -a stripes $RPM_BUILD_ROOT%{_datadir}/backgrounds/ +# Do not install the xml file of current dynamic background for gnome-control-center; instead create one based on the static background +sed "s:SLED-default-static.xml:SLED-default-dynamic.xml:g" %{_datadir}/gnome-background-properties/desktop-data-SLED.xml > $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/SLED-dynamic-wallpaper.xml +###install -m0644 desktop-backgrounds-stripes.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/SLED-11.4-extra-gnome.xml %endif # # sound theme @@ -367,44 +371,16 @@ rm -rf $RPM_BUILD_ROOT %if %build_openSUSE -%if %dynamic_is_latest - -%triggerin -- SLED-dynamic-wallpaper -# If SLED-dynamic-wallpaper exists, we want nice dynamic background. -gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/backgrounds/%{dynamic_file}" || true - -%triggerpostun -- SLED-dynamic-wallpaper -# If SLED-dynamic-wallpaper exists, we want nice dynamic background. -if ! test -f %{_datadir}/backgrounds/%{dynamic_file} ; then - gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/wallpapers/%{wallpaper_file}" || true -fi -%else # %%dynamic_is_latest +%post -n SLED-dynamic-wallpaper +update-alternatives --install %{_datadir}/wallpapers/SLED-default.xml SLED-default.xml %{_datadir}/wallpapers/SLED-default-dynamic.xml 10 -%triggerin -- SLED-dynamic-wallpapers-old -# If SLED-dynamic-wallpaper exists, we want nice dynamic background. -gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/backgrounds/%{dynamic_file}" || true - -%triggerpostun -- SLED-dynamic-wallpapers-old -# If SLED-dynamic-wallpaper exists, we want nice dynamic background. -if ! test -f %{_datadir}/backgrounds/%{dynamic_file} ; then - gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/wallpapers/%{wallpaper_file}" || true +%postun -n SLED-dynamic-wallpaper +# Note: we don't use "$1 -eq 0", to avoid issues if the package gets renamed +if [ ! -f %{_datadir}/wallpapers/SLED-default-dynamic.xml ]; then + update-alternatives --remove SLED-default.xml %{_datadir}/wallpapers/SLED-default-dynamic.xml fi -%endif # %%dynamic_is_latest - -%post -if [ $1 == 1 ]; then - # If SLED-dynamic-wallpaper exists on install (not upgrade), we want nice dynamic background. - if test -f %{_datadir}/backgrounds/%{dynamic_file} ; then - gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/backgrounds/%{dynamic_file}" - fi -fi %endif # %%build_openSUSE %files @@ -424,11 +400,14 @@ %files -n SLED-dynamic-wallpaper %defattr(-,root,root) %doc COPYING -%{_datadir}/backgrounds/stripes/ -%{_datadir}/gnome-background-properties/SLED-dynamic-wallpaper.xml # FIXME: Should be owned by a different package: %dir %{_datadir}/backgrounds %dir %{_datadir}/gnome-background-properties +%{_datadir}/backgrounds/stripes/ +%{_datadir}/gnome-background-properties/SLED-dynamic-wallpaper.xml +%dir %{_datadir}/wallpapers +%ghost %{_datadir}/wallpapers/SLED-default.xml +%{_datadir}/wallpapers/SLED-default-dynamic.xml %files -n SLED-dynamic-wallpapers-old %defattr(-,root,root) ++++++ gconf2-branding-SLES.spec ++++++ --- /var/tmp/diff_new_pack.KIbirp/_old 2011-02-21 23:15:08.000000000 +0100 +++ /var/tmp/diff_new_pack.KIbirp/_new 2011-02-21 23:15:08.000000000 +0100 @@ -25,32 +25,14 @@ %define branding_name openSUSE %define desktop_data openSUSE %define dynamic_file stripes/stripes.xml -%define dynamic_is_latest 1 %define desktop_data_ver 11.4 -# Note: when updating this, don't forget to also change everything that is -# related to the current dynamic background (dynamic_file, dynamic_is_latest, -# and where the previous dynamic background is installed) %define wallpaper_file openSUSE-default.xml -%if %suse_version == 1130 -%define dynamic_file IK/IK.xml -%define dynamic_is_latest 1 -%define desktop_data_ver 11.3 -%define wallpaper_file openSUSE113-1600x1200.jpg -%else # %%suse_version == 1130 -%if %suse_version == 1120 -%define dynamic_file daft/daft.xml -%define dynamic_is_latest 0 -%define desktop_data_ver 11.2 -%define wallpaper_file openSUSE112-1600x1200.png -%endif # %%suse_version == 1120 -%endif # %%suse_version == 1130 %endif # %%build_openSUSE %if %build_SLED %define branding_name SLED %define desktop_data SLED %define desktop_data_ver 11 %define dynamic_file nonexisting -%define dynamic_is_latest 0 %define wallpaper_file SLED110-1600x1200.png %endif %if %build_SLES @@ -58,7 +40,6 @@ %define desktop_data SLED %define desktop_data_ver 11 %define dynamic_file nonexisting -%define dynamic_is_latest 0 %define wallpaper_file SLED110-1600x1200.png %endif @@ -69,7 +50,7 @@ Group: System/GUI/GNOME Summary: SLES defaults for the GNOME configuration system Version: %{desktop_data_ver} -Release: 8.<RELEASE2> +Release: 8.<RELEASE3> Source: gconf2-branding_spec-prepare.sh # panel-default-setup.entries from gnome-panel (patched version): Source2: panel-default-setup.entries @@ -138,6 +119,8 @@ License: BSD3c(or similar) Summary: Dynamic wallpaper for GNOME, with SLES Look Group: System/GUI/GNOME +Requires(post): update-alternatives +Requires(postun): update-alternatives Supplements: packageand(desktop-data-%{desktop_data}:gnome-settings-daemon) Provides: desktop-data-SLES-extra-gnome = %{version} Obsoletes: desktop-data-SLES-extra-gnome < %{version} @@ -207,15 +190,32 @@ %endif %build +%if %suse_version < 1140 +echo "Sorry, the setup to install the default background only works on 11.4 and later when building this package." +false +%endif %install # dynamic backgrounds %if %build_openSUSE -install -d $RPM_BUILD_ROOT%{_datadir}/backgrounds $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties -# current dynamic background -cp -a stripes $RPM_BUILD_ROOT%{_datadir}/backgrounds/ -install -m0644 desktop-backgrounds-stripes.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/SLES-dynamic-wallpaper.xml -# old 11.0, 11.1, 11.2 dynamic backgrounds +# Here's the setup we use (assuming openSUSE for branding in this example): +# - /usr/share/wallpapers/openSUSE-default.xml is the default background +# - /usr/share/wallpapers/openSUSE-default.xml is a symlink (via +# update-alternatives) to either the background from desktop-data-openSUSE or +# /usr/share/wallpapers/openSUSE-default-dynamic.xml from openSUSE-dynamic-background +# - /usr/share/wallpapers/openSUSE-default-dynamic.xml is a symlink to the +# dynamic background matching the default background of the distribution we +# build against +# +# WARNING WARNING WARNING +# If we ever remove the dynamic background, then the +# SLES-default-dynamic.xml file should still be shipped, as a +# symlink to SLES-default-static.xml. +# +install -d $RPM_BUILD_ROOT%{_datadir}/backgrounds $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties $RPM_BUILD_ROOT%{_datadir}/wallpapers +ln -s %{_datadir}/backgrounds/%{dynamic_file} $RPM_BUILD_ROOT%{_datadir}/wallpapers/SLES-default-dynamic.xml +touch $RPM_BUILD_ROOT%{_datadir}/wallpapers/SLES-default.xml +# install dynamic backgrounds cp -a grass $RPM_BUILD_ROOT%{_datadir}/backgrounds/ install -m0644 desktop-backgrounds-grass.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-SLES-11.0-extra-gnome.xml cp -a glass $RPM_BUILD_ROOT%{_datadir}/backgrounds/ @@ -224,6 +224,10 @@ install -m0644 desktop-backgrounds-daft.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-SLES-11.2-extra-gnome.xml cp -a gnome-wallpaper-11.3/IK $RPM_BUILD_ROOT%{_datadir}/backgrounds/ install -m0644 gnome-wallpaper-11.3/desktop-backgrounds-IK.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-SLES-11.3-extra-gnome.xml +cp -a stripes $RPM_BUILD_ROOT%{_datadir}/backgrounds/ +# Do not install the xml file of current dynamic background for gnome-control-center; instead create one based on the static background +sed "s:SLES-default-static.xml:SLES-default-dynamic.xml:g" %{_datadir}/gnome-background-properties/desktop-data-SLES.xml > $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/SLES-dynamic-wallpaper.xml +###install -m0644 desktop-backgrounds-stripes.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/SLES-11.4-extra-gnome.xml %endif # # sound theme @@ -367,44 +371,16 @@ rm -rf $RPM_BUILD_ROOT %if %build_openSUSE -%if %dynamic_is_latest - -%triggerin -- SLES-dynamic-wallpaper -# If SLES-dynamic-wallpaper exists, we want nice dynamic background. -gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/backgrounds/%{dynamic_file}" || true - -%triggerpostun -- SLES-dynamic-wallpaper -# If SLES-dynamic-wallpaper exists, we want nice dynamic background. -if ! test -f %{_datadir}/backgrounds/%{dynamic_file} ; then - gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/wallpapers/%{wallpaper_file}" || true -fi -%else # %%dynamic_is_latest +%post -n SLES-dynamic-wallpaper +update-alternatives --install %{_datadir}/wallpapers/SLES-default.xml SLES-default.xml %{_datadir}/wallpapers/SLES-default-dynamic.xml 10 -%triggerin -- SLES-dynamic-wallpapers-old -# If SLES-dynamic-wallpaper exists, we want nice dynamic background. -gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/backgrounds/%{dynamic_file}" || true - -%triggerpostun -- SLES-dynamic-wallpapers-old -# If SLES-dynamic-wallpaper exists, we want nice dynamic background. -if ! test -f %{_datadir}/backgrounds/%{dynamic_file} ; then - gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/wallpapers/%{wallpaper_file}" || true +%postun -n SLES-dynamic-wallpaper +# Note: we don't use "$1 -eq 0", to avoid issues if the package gets renamed +if [ ! -f %{_datadir}/wallpapers/SLES-default-dynamic.xml ]; then + update-alternatives --remove SLES-default.xml %{_datadir}/wallpapers/SLES-default-dynamic.xml fi -%endif # %%dynamic_is_latest - -%post -if [ $1 == 1 ]; then - # If SLES-dynamic-wallpaper exists on install (not upgrade), we want nice dynamic background. - if test -f %{_datadir}/backgrounds/%{dynamic_file} ; then - gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/backgrounds/%{dynamic_file}" - fi -fi %endif # %%build_openSUSE %files @@ -424,11 +400,14 @@ %files -n SLES-dynamic-wallpaper %defattr(-,root,root) %doc COPYING -%{_datadir}/backgrounds/stripes/ -%{_datadir}/gnome-background-properties/SLES-dynamic-wallpaper.xml # FIXME: Should be owned by a different package: %dir %{_datadir}/backgrounds %dir %{_datadir}/gnome-background-properties +%{_datadir}/backgrounds/stripes/ +%{_datadir}/gnome-background-properties/SLES-dynamic-wallpaper.xml +%dir %{_datadir}/wallpapers +%ghost %{_datadir}/wallpapers/SLES-default.xml +%{_datadir}/wallpapers/SLES-default-dynamic.xml %files -n SLES-dynamic-wallpapers-old %defattr(-,root,root) ++++++ gconf2-branding-openSUSE.spec ++++++ --- /var/tmp/diff_new_pack.KIbirp/_old 2011-02-21 23:15:08.000000000 +0100 +++ /var/tmp/diff_new_pack.KIbirp/_new 2011-02-21 23:15:08.000000000 +0100 @@ -25,32 +25,14 @@ %define branding_name openSUSE %define desktop_data openSUSE %define dynamic_file stripes/stripes.xml -%define dynamic_is_latest 1 %define desktop_data_ver 11.4 -# Note: when updating this, don't forget to also change everything that is -# related to the current dynamic background (dynamic_file, dynamic_is_latest, -# and where the previous dynamic background is installed) %define wallpaper_file openSUSE-default.xml -%if %suse_version == 1130 -%define dynamic_file IK/IK.xml -%define dynamic_is_latest 1 -%define desktop_data_ver 11.3 -%define wallpaper_file openSUSE113-1600x1200.jpg -%else # %%suse_version == 1130 -%if %suse_version == 1120 -%define dynamic_file daft/daft.xml -%define dynamic_is_latest 0 -%define desktop_data_ver 11.2 -%define wallpaper_file openSUSE112-1600x1200.png -%endif # %%suse_version == 1120 -%endif # %%suse_version == 1130 %endif # %%build_openSUSE %if %build_SLED %define branding_name SLED %define desktop_data SLED %define desktop_data_ver 11 %define dynamic_file nonexisting -%define dynamic_is_latest 0 %define wallpaper_file SLED110-1600x1200.png %endif %if %build_SLES @@ -58,7 +40,6 @@ %define desktop_data SLED %define desktop_data_ver 11 %define dynamic_file nonexisting -%define dynamic_is_latest 0 %define wallpaper_file SLED110-1600x1200.png %endif @@ -69,7 +50,7 @@ Group: System/GUI/GNOME Summary: openSUSE defaults for the GNOME configuration system Version: %{desktop_data_ver} -Release: 7.<RELEASE2> +Release: 14.<RELEASE2> Source: gconf2-branding_spec-prepare.sh # panel-default-setup.entries from gnome-panel (patched version): Source2: panel-default-setup.entries @@ -138,6 +119,8 @@ License: BSD3c(or similar) Summary: Dynamic wallpaper for GNOME, with openSUSE Look Group: System/GUI/GNOME +Requires(post): update-alternatives +Requires(postun): update-alternatives Supplements: packageand(desktop-data-%{desktop_data}:gnome-settings-daemon) Provides: desktop-data-openSUSE-extra-gnome = %{version} Obsoletes: desktop-data-openSUSE-extra-gnome < %{version} @@ -207,15 +190,32 @@ %endif %build +%if %suse_version < 1140 +echo "Sorry, the setup to install the default background only works on 11.4 and later when building this package." +false +%endif %install # dynamic backgrounds %if %build_openSUSE -install -d $RPM_BUILD_ROOT%{_datadir}/backgrounds $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties -# current dynamic background -cp -a stripes $RPM_BUILD_ROOT%{_datadir}/backgrounds/ -install -m0644 desktop-backgrounds-stripes.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/openSUSE-dynamic-wallpaper.xml -# old 11.0, 11.1, 11.2 dynamic backgrounds +# Here's the setup we use (assuming openSUSE for branding in this example): +# - /usr/share/wallpapers/openSUSE-default.xml is the default background +# - /usr/share/wallpapers/openSUSE-default.xml is a symlink (via +# update-alternatives) to either the background from desktop-data-openSUSE or +# /usr/share/wallpapers/openSUSE-default-dynamic.xml from openSUSE-dynamic-background +# - /usr/share/wallpapers/openSUSE-default-dynamic.xml is a symlink to the +# dynamic background matching the default background of the distribution we +# build against +# +# WARNING WARNING WARNING +# If we ever remove the dynamic background, then the +# openSUSE-default-dynamic.xml file should still be shipped, as a +# symlink to openSUSE-default-static.xml. +# +install -d $RPM_BUILD_ROOT%{_datadir}/backgrounds $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties $RPM_BUILD_ROOT%{_datadir}/wallpapers +ln -s %{_datadir}/backgrounds/%{dynamic_file} $RPM_BUILD_ROOT%{_datadir}/wallpapers/openSUSE-default-dynamic.xml +touch $RPM_BUILD_ROOT%{_datadir}/wallpapers/openSUSE-default.xml +# install dynamic backgrounds cp -a grass $RPM_BUILD_ROOT%{_datadir}/backgrounds/ install -m0644 desktop-backgrounds-grass.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-openSUSE-11.0-extra-gnome.xml cp -a glass $RPM_BUILD_ROOT%{_datadir}/backgrounds/ @@ -224,6 +224,10 @@ install -m0644 desktop-backgrounds-daft.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-openSUSE-11.2-extra-gnome.xml cp -a gnome-wallpaper-11.3/IK $RPM_BUILD_ROOT%{_datadir}/backgrounds/ install -m0644 gnome-wallpaper-11.3/desktop-backgrounds-IK.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-openSUSE-11.3-extra-gnome.xml +cp -a stripes $RPM_BUILD_ROOT%{_datadir}/backgrounds/ +# Do not install the xml file of current dynamic background for gnome-control-center; instead create one based on the static background +sed "s:openSUSE-default-static.xml:openSUSE-default-dynamic.xml:g" %{_datadir}/gnome-background-properties/desktop-data-openSUSE.xml > $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/openSUSE-dynamic-wallpaper.xml +###install -m0644 desktop-backgrounds-stripes.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/openSUSE-11.4-extra-gnome.xml %endif # # sound theme @@ -367,44 +371,16 @@ rm -rf $RPM_BUILD_ROOT %if %build_openSUSE -%if %dynamic_is_latest - -%triggerin -- openSUSE-dynamic-wallpaper -# If openSUSE-dynamic-wallpaper exists, we want nice dynamic background. -gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/backgrounds/%{dynamic_file}" || true - -%triggerpostun -- openSUSE-dynamic-wallpaper -# If openSUSE-dynamic-wallpaper exists, we want nice dynamic background. -if ! test -f %{_datadir}/backgrounds/%{dynamic_file} ; then - gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/wallpapers/%{wallpaper_file}" || true -fi -%else # %%dynamic_is_latest +%post -n openSUSE-dynamic-wallpaper +update-alternatives --install %{_datadir}/wallpapers/openSUSE-default.xml openSUSE-default.xml %{_datadir}/wallpapers/openSUSE-default-dynamic.xml 10 -%triggerin -- openSUSE-dynamic-wallpapers-old -# If openSUSE-dynamic-wallpaper exists, we want nice dynamic background. -gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/backgrounds/%{dynamic_file}" || true - -%triggerpostun -- openSUSE-dynamic-wallpapers-old -# If openSUSE-dynamic-wallpaper exists, we want nice dynamic background. -if ! test -f %{_datadir}/backgrounds/%{dynamic_file} ; then - gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/wallpapers/%{wallpaper_file}" || true +%postun -n openSUSE-dynamic-wallpaper +# Note: we don't use "$1 -eq 0", to avoid issues if the package gets renamed +if [ ! -f %{_datadir}/wallpapers/openSUSE-default-dynamic.xml ]; then + update-alternatives --remove openSUSE-default.xml %{_datadir}/wallpapers/openSUSE-default-dynamic.xml fi -%endif # %%dynamic_is_latest - -%post -if [ $1 == 1 ]; then - # If openSUSE-dynamic-wallpaper exists on install (not upgrade), we want nice dynamic background. - if test -f %{_datadir}/backgrounds/%{dynamic_file} ; then - gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/backgrounds/%{dynamic_file}" - fi -fi %endif # %%build_openSUSE %files @@ -424,11 +400,14 @@ %files -n openSUSE-dynamic-wallpaper %defattr(-,root,root) %doc COPYING -%{_datadir}/backgrounds/stripes/ -%{_datadir}/gnome-background-properties/openSUSE-dynamic-wallpaper.xml # FIXME: Should be owned by a different package: %dir %{_datadir}/backgrounds %dir %{_datadir}/gnome-background-properties +%{_datadir}/backgrounds/stripes/ +%{_datadir}/gnome-background-properties/openSUSE-dynamic-wallpaper.xml +%dir %{_datadir}/wallpapers +%ghost %{_datadir}/wallpapers/openSUSE-default.xml +%{_datadir}/wallpapers/openSUSE-default-dynamic.xml %files -n openSUSE-dynamic-wallpapers-old %defattr(-,root,root) ++++++ gconf2-branding.changes.in ++++++ --- /var/tmp/diff_new_pack.KIbirp/_old 2011-02-21 23:15:08.000000000 +0100 +++ /var/tmp/diff_new_pack.KIbirp/_new 2011-02-21 23:15:08.000000000 +0100 @@ -1,4 +1,29 @@ ------------------------------------------------------------------- +Mon Feb 21 14:12:02 CET 2011 - vuntz@opensuse.org + +- Remove support for building on openSUSE < 11.4: the changes we're + introducing here make it too hard to support the old scheme. +- The default background is now always openSUSE-default.xml: + + We do this to make sure that the setting on upgrades won't + cause any issue at all, even if the user chooses to explicitly + use the default wallpaper. + + openSUSE-default.xml is a symlink to either the static + wallpaper from desktop-data-openSUSE or to + openSUSE-default-dynamic.xml in openSUSE-dynamic-wallpaper. + + Use update-alternatives in openSUSE-dynamic-wallpaper %post and + %postun to update openSUSE-default.xml. Add appropriate + Requires. + + Make openSUSE-default-dynamic.xml a symlink to the current xml + file for the dynamic wallpaper (stripes.xml). + + Update gconf key for the default wallpaper to point to + openSUSE-default.xml. +- As a side-effect, this means we can get rid of all + %triggerin/%triggerpostun scripts, which were not really nice. +- Also, create the gnome-control-center xml file describing the + dynamic wallpaper from the one of the static version. This will + ensure consistency. + +------------------------------------------------------------------- Thu Feb 17 13:07:45 CET 2011 - vuntz@opensuse.org - Fix 11.4 dynamic wallpaper to really start at 7AM instead of ++++++ gconf2-branding.spec.in ++++++ --- /var/tmp/diff_new_pack.KIbirp/_old 2011-02-21 23:15:08.000000000 +0100 +++ /var/tmp/diff_new_pack.KIbirp/_new 2011-02-21 23:15:08.000000000 +0100 @@ -25,32 +25,14 @@ %define branding_name openSUSE %define desktop_data openSUSE %define dynamic_file stripes/stripes.xml -%define dynamic_is_latest 1 %define desktop_data_ver 11.4 -# Note: when updating this, don't forget to also change everything that is -# related to the current dynamic background (dynamic_file, dynamic_is_latest, -# and where the previous dynamic background is installed) %define wallpaper_file openSUSE-default.xml -%if %suse_version == 1130 -%define dynamic_file IK/IK.xml -%define dynamic_is_latest 1 -%define desktop_data_ver 11.3 -%define wallpaper_file openSUSE113-1600x1200.jpg -%else # %%suse_version == 1130 -%if %suse_version == 1120 -%define dynamic_file daft/daft.xml -%define dynamic_is_latest 0 -%define desktop_data_ver 11.2 -%define wallpaper_file openSUSE112-1600x1200.png -%endif # %%suse_version == 1120 -%endif # %%suse_version == 1130 %endif # %%build_openSUSE %if %build_SLED %define branding_name SLED %define desktop_data SLED %define desktop_data_ver 11 %define dynamic_file nonexisting -%define dynamic_is_latest 0 %define wallpaper_file SLED110-1600x1200.png %endif %if %build_SLES @@ -58,7 +40,6 @@ %define desktop_data SLED %define desktop_data_ver 11 %define dynamic_file nonexisting -%define dynamic_is_latest 0 %define wallpaper_file SLED110-1600x1200.png %endif @@ -135,6 +116,8 @@ License: BSD3c(or similar) Summary: Dynamic wallpaper for GNOME, with %{branding_name} Look Group: System/GUI/GNOME +Requires(post): update-alternatives +Requires(postun): update-alternatives Supplements: packageand(desktop-data-%{desktop_data}:gnome-settings-daemon) Provides: desktop-data-%{branding_name}-extra-gnome = %{version} Obsoletes: desktop-data-%{branding_name}-extra-gnome < %{version} @@ -202,15 +185,32 @@ %endif %build +%if %suse_version < 1140 +echo "Sorry, the setup to install the default background only works on 11.4 and later when building this package." +false +%endif %install # dynamic backgrounds %if %build_openSUSE -install -d $RPM_BUILD_ROOT%{_datadir}/backgrounds $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties -# current dynamic background -cp -a stripes $RPM_BUILD_ROOT%{_datadir}/backgrounds/ -install -m0644 desktop-backgrounds-stripes.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/%{branding_name}-dynamic-wallpaper.xml -# old 11.0, 11.1, 11.2 dynamic backgrounds +# Here's the setup we use (assuming openSUSE for branding in this example): +# - /usr/share/wallpapers/openSUSE-default.xml is the default background +# - /usr/share/wallpapers/openSUSE-default.xml is a symlink (via +# update-alternatives) to either the background from desktop-data-openSUSE or +# /usr/share/wallpapers/openSUSE-default-dynamic.xml from openSUSE-dynamic-background +# - /usr/share/wallpapers/openSUSE-default-dynamic.xml is a symlink to the +# dynamic background matching the default background of the distribution we +# build against +# +# WARNING WARNING WARNING +# If we ever remove the dynamic background, then the +# %{branding_name}-default-dynamic.xml file should still be shipped, as a +# symlink to %{branding_name}-default-static.xml. +# +install -d $RPM_BUILD_ROOT%{_datadir}/backgrounds $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties $RPM_BUILD_ROOT%{_datadir}/wallpapers +ln -s %{_datadir}/backgrounds/%{dynamic_file} $RPM_BUILD_ROOT%{_datadir}/wallpapers/%{branding_name}-default-dynamic.xml +touch $RPM_BUILD_ROOT%{_datadir}/wallpapers/%{branding_name}-default.xml +# install dynamic backgrounds cp -a grass $RPM_BUILD_ROOT%{_datadir}/backgrounds/ install -m0644 desktop-backgrounds-grass.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-%{branding_name}-11.0-extra-gnome.xml cp -a glass $RPM_BUILD_ROOT%{_datadir}/backgrounds/ @@ -219,6 +219,10 @@ install -m0644 desktop-backgrounds-daft.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-%{branding_name}-11.2-extra-gnome.xml cp -a gnome-wallpaper-11.3/IK $RPM_BUILD_ROOT%{_datadir}/backgrounds/ install -m0644 gnome-wallpaper-11.3/desktop-backgrounds-IK.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/desktop-data-%{branding_name}-11.3-extra-gnome.xml +cp -a stripes $RPM_BUILD_ROOT%{_datadir}/backgrounds/ +# Do not install the xml file of current dynamic background for gnome-control-center; instead create one based on the static background +sed "s:%{branding_name}-default-static.xml:%{branding_name}-default-dynamic.xml:g" %{_datadir}/gnome-background-properties/desktop-data-%{branding_name}.xml > $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/%{branding_name}-dynamic-wallpaper.xml +###install -m0644 desktop-backgrounds-stripes.xml $RPM_BUILD_ROOT%{_datadir}/gnome-background-properties/%{branding_name}-11.4-extra-gnome.xml %endif # # sound theme @@ -362,44 +366,16 @@ rm -rf $RPM_BUILD_ROOT %if %build_openSUSE -%if %dynamic_is_latest - -%triggerin -- %{branding_name}-dynamic-wallpaper -# If %{branding_name}-dynamic-wallpaper exists, we want nice dynamic background. -gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/backgrounds/%{dynamic_file}" || true - -%triggerpostun -- %{branding_name}-dynamic-wallpaper -# If %{branding_name}-dynamic-wallpaper exists, we want nice dynamic background. -if ! test -f %{_datadir}/backgrounds/%{dynamic_file} ; then - gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/wallpapers/%{wallpaper_file}" || true -fi -%else # %%dynamic_is_latest +%post -n %{branding_name}-dynamic-wallpaper +update-alternatives --install %{_datadir}/wallpapers/%{branding_name}-default.xml %{branding_name}-default.xml %{_datadir}/wallpapers/%{branding_name}-default-dynamic.xml 10 -%triggerin -- %{branding_name}-dynamic-wallpapers-old -# If %{branding_name}-dynamic-wallpaper exists, we want nice dynamic background. -gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/backgrounds/%{dynamic_file}" || true - -%triggerpostun -- %{branding_name}-dynamic-wallpapers-old -# If %{branding_name}-dynamic-wallpaper exists, we want nice dynamic background. -if ! test -f %{_datadir}/backgrounds/%{dynamic_file} ; then - gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/wallpapers/%{wallpaper_file}" || true +%postun -n %{branding_name}-dynamic-wallpaper +# Note: we don't use "$1 -eq 0", to avoid issues if the package gets renamed +if [ ! -f %{_datadir}/wallpapers/%{branding_name}-default-dynamic.xml ]; then + update-alternatives --remove %{branding_name}-default.xml %{_datadir}/wallpapers/%{branding_name}-default-dynamic.xml fi -%endif # %%dynamic_is_latest - -%post -if [ $1 == 1 ]; then - # If %{branding_name}-dynamic-wallpaper exists on install (not upgrade), we want nice dynamic background. - if test -f %{_datadir}/backgrounds/%{dynamic_file} ; then - gconftool-2 >/dev/null --direct --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.vendor --set\ - /desktop/gnome/background/picture_filename --type=string "%{_datadir}/backgrounds/%{dynamic_file}" - fi -fi %endif # %%build_openSUSE %files @@ -418,11 +394,14 @@ %files -n %{branding_name}-dynamic-wallpaper %defattr(-,root,root) %doc COPYING -%{_datadir}/backgrounds/stripes/ -%{_datadir}/gnome-background-properties/%{branding_name}-dynamic-wallpaper.xml # FIXME: Should be owned by a different package: %dir %{_datadir}/backgrounds %dir %{_datadir}/gnome-background-properties +%{_datadir}/backgrounds/stripes/ +%{_datadir}/gnome-background-properties/%{branding_name}-dynamic-wallpaper.xml +%dir %{_datadir}/wallpapers +%ghost %{_datadir}/wallpapers/%{branding_name}-default.xml +%{_datadir}/wallpapers/%{branding_name}-default-dynamic.xml %files -n %{branding_name}-dynamic-wallpapers-old %defattr(-,root,root) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org