diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,29 @@ +lxqt-sudo (0.14.1-2ubuntu1) focal; urgency=low + + * Merge from Debian unstable. Remaining changes: + - Updated build deps for liblxqt0-dev. + - Using the debhelper-compat. + - Added upstream metadata. + - Updated rules. + - Updated copyright. + - Run wrap and sort. + + -- Raman Sarda Sat, 15 Feb 2020 23:01:05 +0530 + +lxqt-sudo (0.14.1-2) unstable; urgency=medium + + * Set HOME right, don't strip TERM (Closes: #928941) + + -- Alf Gaida Mon, 13 May 2019 19:56:39 +0200 + +lxqt-sudo (0.14.1-1) unstable; urgency=medium + + * Cherry-picking new upstream version 0.14.1. + * Bumped minimum version liblxqt0-dev (>= 0.14.1~) + * Extended package description a bit + + -- Alf Gaida Sun, 24 Feb 2019 22:25:49 +0100 + lxqt-sudo (0.14.1-0ubuntu1) disco; urgency=medium * New upstream release. @@ -5,6 +31,19 @@ -- Simon Quigley Sat, 09 Mar 2019 13:20:31 -0600 +lxqt-sudo (0.14.0-1) unstable; urgency=medium + + * Cherry-picking new upstream version 0.14.0. + * Bumped Standards to 4.3.0, no changes needed + * Dropped d/compat, use debhelper-compat = 12, no changes needed + * Fixed years in d/copyright + * Bumped minimum version liblxqt0-dev (>= 0.14.0~) + * Removed obsolete PULL_TRANSLATIONS= OFF from dh_auto_configure + * Added l10n-package, moved from lxqt-l10n + * Added d/upstream/metadata + + -- Alf Gaida Sun, 27 Jan 2019 19:32:15 +0100 + lxqt-sudo (0.14.0-0ubuntu1) disco; urgency=medium * New upstream release. @@ -16,6 +55,14 @@ -- Simon Quigley Sat, 26 Jan 2019 00:55:00 -0600 +lxqt-sudo (0.13.0-1) unstable; urgency=medium + + * Cherry-picking new upstream version 0.13.0. + * Bumped build dependency liblxqt0-dev to >= 0.13.0~ + * Bumped year in copyright + + -- Alf Gaida Fri, 25 May 2018 00:02:41 +0200 + lxqt-sudo (0.13.0-0ubuntu2) cosmic; urgency=medium * Change Uploaders to Ubuntu uploaders. @@ -161,3 +208,4 @@ * Initial release (Closes:#795801) -- Alf Gaida Wed, 23 Sep 2015 00:06:05 +0200 + diff --git a/debian/compat b/debian/compat deleted file mode 100644 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/debian/control b/debian/control --- a/debian/control +++ b/debian/control @@ -4,9 +4,9 @@ Uploaders: Simon Quigley Section: x11 Priority: optional -Build-Depends: debhelper (>= 12), +Build-Depends: debhelper-compat (= 12), libkf5windowsystem-dev, - liblxqt0-dev (>= 0.14.0), + liblxqt0-dev (>= 0.14.1~), libqt5svg5-dev, libqt5x11extras5-dev, libx11-dev @@ -36,4 +36,10 @@ Breaks: lxqt-sudo (<< 0.11.0) Replaces: lxqt-sudo (<< 0.11.0) Description: Language package for lxqt-sudo - This package contains the l10n files needed by lxqt-sudo. + lxqt-sudo is a graphical QT frontend for plain sudo(8) (for requesting + optional password in GUI fashion). When invoked it simply spawns child sudo + process with requested command (and arguments). If sudo requests user's + password, the GUI password dialog is shown and (after submit) the password is + provided to sudo. + . + This package contains the l10n files needed by the lxqt-sudo. diff --git a/debian/copyright b/debian/copyright --- a/debian/copyright +++ b/debian/copyright @@ -3,11 +3,11 @@ Source: https://github.com/lxqt/lxqt-sudo Files: * -Copyright: 2015-2018 LXQt team +Copyright: 2015-2019 LXQt team License: LGPL-2.1+ Files: debian/* -Copyright: 2015-2018 Alf Gaida +Copyright: 2015-2019 Alf Gaida 2015 Andrew Lee (李健秋) 2015 ChangZhuo Chen (陳昌倬) License: LGPL-2.1+ diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +set-home-and-term.patch diff --git a/debian/patches/set-home-and-term.patch b/debian/patches/set-home-and-term.patch new file mode 100644 --- /dev/null +++ b/debian/patches/set-home-and-term.patch @@ -0,0 +1,106 @@ +From 1b63d191048ad201880f40edc8342b329dcc08dd Mon Sep 17 00:00:00 2001 +From: Palo Kisa +Date: Mon, 13 May 2019 12:17:44 +0200 +Subject: sudo: Fix (re)setting HOME and TERMwith sudo backend + +With the -E (--preserve-env) parameter and our stripped environment sudo +does not set HOME. With explicitly defining the list of preserved env +vars (--preserve-env=FOO,BAH..) sudo sets the HOME correctly in the +priviledged process. TERM was added to the preserved env vars too. + +Note: This needs at least sudo v1.8.21 +(https://www.sudo.ws/repos/sudo/rev/a6bc511a2e81). + + +--- + sudo.cpp | 35 +++++++++++++++++++++++++---------- + 1 file changed, 25 insertions(+), 10 deletions(-) + +--- a/sudo.cpp ++++ b/sudo.cpp +@@ -46,6 +46,7 @@ + #include + #include + #include ++#include + + namespace + { +@@ -89,7 +90,7 @@ + "DISPLAY" + , "LANG", "LANGUAGE", "LC_ADDRESS", "LC_ALL", "LC_COLLATE", "LC_CTYPE", "LC_IDENTIFICATION", "LC_MEASUREMENT" + , "LC_MESSAGES", "LC_MONETARY", "LC_NAME", "LC_NUMERIC", "LC_PAPER", "LC_TELEPHONE", "LC_TIME" +- , "PATH", "QT_PLATFORM_PLUGIN", "QT_QPA_PLATFORMTHEME", "WAYLAND_DISPLAY", "XAUTHLOCALHOSTNAME", "XAUTHORITY" ++ , "PATH", "QT_PLATFORM_PLUGIN", "QT_QPA_PLATFORMTHEME", "TERM", "WAYLAND_DISPLAY", "XAUTHLOCALHOSTNAME", "XAUTHORITY" + }; + static constexpr char const * const * const ALLOWED_END = ALLOWED_VARS + sizeof (ALLOWED_VARS) / sizeof (ALLOWED_VARS[0]); + struct assert_helper +@@ -102,24 +103,27 @@ + }; + assert_helper h; + +- inline void env_workarounds() ++ inline std::string env_workarounds() + { + std::cerr << LXQTSUDO << ": Stripping child environment except for: "; +- std::copy(ALLOWED_VARS, ALLOWED_END - 1, std::ostream_iterator{std::cerr, ", "}); +- std::cerr << *(ALLOWED_END - 1) << '\n'; // printing the last separately to avoid trailing comma ++ std::ostringstream left_env_params; ++ std::copy(ALLOWED_VARS, ALLOWED_END - 1, std::ostream_iterator{left_env_params, ","}); ++ left_env_params << *(ALLOWED_END - 1); // printing the last separately to avoid trailing comma ++ std::cerr << left_env_params.str() << '\n'; + // cleanup environment, because e.g.: + // - pcmanfm-qt will not start if the DBUS_SESSION_BUS_ADDRESS is preserved + // - Qt apps may change user's config files permissions if the XDG_* are preserved + for (auto const & key : QProcessEnvironment::systemEnvironment().keys()) + { + auto const & i = std::lower_bound(ALLOWED_VARS, ALLOWED_END, key, [] (char const * const a, QString const & b) { +- return b > a; +- }); ++ return b > a; ++ }); + if (i == ALLOWED_END || key != *i) + { + unsetenv(key.toLatin1().data()); + } + } ++ return left_env_params.str(); + } + + inline QString quoteShellArg(const QString& arg, bool userFriendly) +@@ -245,10 +249,23 @@ + const char ** param_arg = params.get() + 1; + + std::string program = backendName().toLocal8Bit().data(); +- if (BACK_SUDO == mBackend) ++ ++ std::string preserve_env_param; ++ switch (mBackend) + { +- *(param_arg++) = "-E"; //preserve environment +- *(param_arg++) = "/bin/sh"; ++ case BACK_SUDO: ++ preserve_env_param = "--preserve-env="; ++ ++ preserve_env_param += env_workarounds(); ++ ++ *(param_arg++) = preserve_env_param.c_str(); //preserve environment ++ *(param_arg++) = "/bin/sh"; ++ break; ++ case BACK_SU: ++ case BACK_NONE: ++ env_workarounds(); ++ break; ++ + } + *(param_arg++) = "-c"; //run command + +@@ -282,8 +299,6 @@ + + setenv("LC_ALL", "C", 1); + +- env_workarounds(); +- + setsid(); //session leader + execvp(params[0], const_cast(params.get())); + diff --git a/debian/rules b/debian/rules --- a/debian/rules +++ b/debian/rules @@ -8,8 +8,10 @@ %: dh ${@} --buildsystem cmake +override_dh_missing: + dh_missing --fail-missing + override_dh_auto_configure: dh_auto_configure -- \ - -DPULL_TRANSLATIONS=OFF \ -DUPDATE_TRANSLATIONS=OFF \ -DCMAKE_BUILD_TYPE=RelWithDebInfo diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,6 @@ +Name: lxqt-sudo +Bug-Database: https://github.com/lxqt/lxqt-sudo/issues +Bug-Submit: https://github.com/lxqt/lxqt-sudo/issues/new +Changelog: https://github.com/lxqt/lxqt-sudo/blob/master/CHANGELOG +Repository: https://github.com/lxqt/lxqt-sudo +Repository-Browser: https://github.com/lxqt/lxqt-sudo