Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Please unblock package synaptic As discussed in #818366 > If somebody comes up with a decent Wayland detection and (also > graphical) error message to the user explaining how to get a working > synaptic, the release team is considering letting synaptic back in if > this happens soon. I'd like to ask RT to unblock this NMU. It adds both console and GUI warning to user who want to run synaptic as root on Wayland. Full changelog is: * Non-maintainer upload. * configure.in: Miss bumping version str to 0.84.5. * synaptic-pkexec: Do not use pkexec under Wayland; warn users instead. * gsynaptic: Show possible reason when failed to init gtk debdiff is in attachment, and can also be viewed at: https://github.com/mvo5/synaptic/pull/39 I'll only upload after ack, and downgrade the severity of #818366. unblock synaptic/0.84.5+nmu1 -- Shengjing Zhu
diff -Nru synaptic-0.84.5/configure.in synaptic-0.84.5+nmu1/configure.in --- synaptic-0.84.5/configure.in 2018-11-08 15:50:31.000000000 +0800 +++ synaptic-0.84.5+nmu1/configure.in 2019-04-13 17:48:32.000000000 +0800 @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(configure.in) -AM_INIT_AUTOMAKE(synaptic, 0.84.5) +AM_INIT_AUTOMAKE(synaptic, 0.84.5+nmu1) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE diff -Nru synaptic-0.84.5/debian/changelog synaptic-0.84.5+nmu1/debian/changelog --- synaptic-0.84.5/debian/changelog 2018-11-08 15:50:31.000000000 +0800 +++ synaptic-0.84.5+nmu1/debian/changelog 2019-04-13 17:48:32.000000000 +0800 @@ -1,3 +1,12 @@ +synaptic (0.84.5+nmu1) unstable; urgency=medium + + * Non-maintainer upload. + * configure.in: Miss bumping version str to 0.84.5. + * synaptic-pkexec: Do not use pkexec under Wayland; warn users instead. + * gsynaptic: Show possible reason when failed to init gtk + + -- Shengjing Zhu <z...@debian.org> Sat, 13 Apr 2019 17:48:32 +0800 + synaptic (0.84.5) unstable; urgency=medium [ Jeremy Bicha ] diff -Nru synaptic-0.84.5/debian/control synaptic-0.84.5+nmu1/debian/control --- synaptic-0.84.5/debian/control 2018-11-08 15:50:31.000000000 +0800 +++ synaptic-0.84.5+nmu1/debian/control 2019-04-13 17:48:32.000000000 +0800 @@ -11,7 +11,7 @@ Package: synaptic Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, hicolor-icon-theme, policykit-1 +Depends: ${shlibs:Depends}, ${misc:Depends}, hicolor-icon-theme, policykit-1, zenity Conflicts: menu (<< 2.1.11) Recommends: libgtk2-perl (>= 1:1.130), xdg-utils Suggests: dwww, menu, deborphan, apt-xapian-index, tasksel, software-properties-gtk diff -Nru synaptic-0.84.5/debian/patches/00list synaptic-0.84.5+nmu1/debian/patches/00list --- synaptic-0.84.5/debian/patches/00list 2018-11-08 15:50:31.000000000 +0800 +++ synaptic-0.84.5+nmu1/debian/patches/00list 2019-04-13 17:48:32.000000000 +0800 @@ -1,3 +0,0 @@ -01_ubuntu_changelog -#10_ubuntu_maintenance_gui - diff -Nru synaptic-0.84.5/debian/synaptic-pkexec synaptic-0.84.5+nmu1/debian/synaptic-pkexec --- synaptic-0.84.5/debian/synaptic-pkexec 2018-11-08 15:50:31.000000000 +0800 +++ synaptic-0.84.5+nmu1/debian/synaptic-pkexec 2019-04-13 17:48:32.000000000 +0800 @@ -1,2 +1,19 @@ #!/bin/sh -pkexec "/usr/sbin/synaptic" "$@" + +USING_WAYLAND=0 +if [ ! "x${WAYLAND_DISPLAY}" = "x" ]; then + USING_WAYLAND=1 +fi +if [ "x${XDG_SESSION_TYPE}" = "xwayland" ]; then + USING_WAYLAND=1 +fi + +if [ "x${USING_WAYLAND}" = "x1" ]; then + # Running wayland; start synaptic without pkexec + zenity --warning --width=500 --text \ + "You are using Wayland environment, Synaptic will continue without administrative privileges.\\n\ +To make Synaptic fully functional, please restart your session without Wayland." + exec "/usr/sbin/synaptic" "$@" +else + pkexec "/usr/sbin/synaptic" "$@" +fi diff -Nru synaptic-0.84.5/gtk/gsynaptic.cc synaptic-0.84.5+nmu1/gtk/gsynaptic.cc --- synaptic-0.84.5/gtk/gsynaptic.cc 2018-11-08 15:50:31.000000000 +0800 +++ synaptic-0.84.5+nmu1/gtk/gsynaptic.cc 2019-04-13 17:48:32.000000000 +0800 @@ -409,7 +409,14 @@ #endif #endif - gtk_init(&argc, &argv); + if (!gtk_init_check(&argc, &argv)) { + std::cout << + _("Failed to initialize GTK.\n") << + "\n" << + _("Probably you're running Synaptic on Wayland with root permission.\n") << + _("Please restart your session without Wayland, or run Synaptic without root permission\n"); + exit(1); + }; //XSynchronize(dpy, 1); // read the cmdline
signature.asc
Description: PGP signature