Compare commits

..

31 Commits

Author SHA1 Message Date
Aaron Rainbolt
0cb178423e
Update build deps 2025-07-31 16:33:36 -05:00
Aaron Rainbolt
fd268f6b00
Bump Standards-Version 2025-07-31 16:32:49 -05:00
Aaron Rainbolt
fbe3ac6a44
Update copyright file 2025-07-31 16:32:22 -05:00
Aaron Rainbolt
b423a369d7
Bump version for new upstream release 2025-07-31 16:31:23 -05:00
321e0b5077 Update Standards-Version to 4.7.1, no changes needed. 2025-02-21 17:04:13 -06:00
768eb12128 No-change rebuild for lxqt-build-tools C++17 -> C++20. 2025-02-21 16:53:07 -06:00
f7a1bf9ad9 Upload to Plucky 2024-11-15 15:34:45 -06:00
52c1d9a920 Make Lintian happy 2024-11-05 18:21:44 -06:00
03cbed1a58 New upstream version. 2024-11-05 18:15:40 -06:00
146074a151 Update the patch to pass through env vars. 2024-11-05 18:14:07 -06:00
Aaron Rainbolt
4205318af5 Release to Oracular 2024-08-15 16:43:22 -05:00
Aaron Rainbolt
45476314b6 PPA build 2024-06-27 16:26:33 -05:00
Aaron Rainbolt
6a15c4a9ef Adjust deps 2024-06-27 16:26:17 -05:00
Aaron Rainbolt
6810234f8f Bump Standards-Version 2024-06-27 16:22:44 -05:00
Aaron Rainbolt
66ccff86ad Drop enable-bidirectional-communication.patch 2024-06-27 16:22:01 -05:00
Aaron Rainbolt
73d3ada062 Update copyright file 2024-06-27 16:20:21 -05:00
Aaron Rainbolt
f0eb459607 Bump version for new upstream release 2024-06-27 16:19:40 -05:00
6f34f5cdc2 Add bidirectional communication patch 2024-01-11 13:57:16 -06:00
06b152504d Upload to Noble. 2023-11-12 19:13:54 -06:00
88a7bd0ea1 Update copyright years. 2023-11-12 19:12:07 -06:00
c58cc73098 Bump build dependencies. 2023-11-12 19:11:47 -06:00
5cff75e023 New upstream release. 2023-11-12 19:11:22 -06:00
46d06f9171 Add a -E option, exposing all environment variables (LP: #2039093). 2023-11-12 19:10:24 -06:00
d81b1c7857 Upload to Mantic. 2023-08-11 09:52:05 -05:00
b9fa753636 Install new lxqtdoas binary. 2023-08-11 09:44:59 -05:00
57bbb02b3c Bump build dependencies. 2023-08-10 16:43:37 -05:00
40fe6cb0c8 New upstream release. 2023-08-10 16:39:47 -05:00
Aaron Rainbolt
96907a596d Updated copyright file. 2023-02-16 23:00:21 -06:00
Aaron Rainbolt
16f77640b3 Removed override_dh_missing. 2023-02-16 20:23:24 -06:00
Aaron Rainbolt
225f120d7e Bumped Standards-Version. 2023-02-16 20:22:52 -06:00
Aaron Rainbolt
11a2e40441 Revert a sync from Debian.
This reverts commit 3f6e60c63fabf715e01e329904279a9cd195cdac.
2023-02-16 20:20:50 -06:00
10 changed files with 252 additions and 95 deletions

6
debian/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
/*.debhelper
/*.log
/*.substvars
/files
/lxqt-sudo/

101
debian/changelog vendored
View File

@ -1,17 +1,94 @@
lxqt-sudo (1.2.0-1) unstable; urgency=medium lxqt-sudo (2.2.0-0ubuntu1) questing; urgency=medium
* New upstream release. * New upstream release.
* Sort Depends in d/control. - Update build dependencies.
* Sort d/copyright. * Update copyright file.
* Update d/watch for GitHub. * Update Standards-Version to 4.7.2, no changes needed.
-- ChangZhuo Chen (陳昌倬) <czchen@debian.org> Sat, 17 Dec 2022 23:58:51 +0800 -- Aaron Rainbolt <arraybolt3@ubuntu.com> Thu, 31 Jul 2025 16:30:59 -0500
lxqt-sudo (1.1.0-2) unstable; urgency=medium lxqt-sudo (2.1.0-0ubuntu3) plucky; urgency=medium
* Merge to unstable. * Update Standards-Version to 4.7.1, no changes needed.
-- ChangZhuo Chen (陳昌倬) <czchen@debian.org> Sat, 19 Nov 2022 09:32:56 +0800 -- Simon Quigley <tsimonq2@ubuntu.com> Fri, 21 Feb 2025 16:53:25 -0600
lxqt-sudo (2.1.0-0ubuntu2) plucky; urgency=medium
* No-change rebuild for lxqt-build-tools C++17 -> C++20.
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 03 Jan 2025 03:59:31 -0600
lxqt-sudo (2.1.0-0ubuntu1) plucky; urgency=medium
* New upstream version.
- Bump build dependencies.
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 15 Nov 2024 15:33:17 -0600
lxqt-sudo (2.0.0-0ubuntu2) plucky; urgency=medium
* Update the patch to pass through env vars.
-- Simon Quigley <tsimonq2@ubuntu.com> Wed, 16 Oct 2024 17:09:37 -0500
lxqt-sudo (2.0.0-0ubuntu1) oracular; urgency=medium
* New upstream release.
* Update copyright file.
* Drop enable-bidirectional-communication.patch, applied upstream.
* Bump Standards-Version to 4.7.0, no changes necessary.
* Adjust dependencies.
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Thu, 15 Aug 2024 16:43:15 -0500
lxqt-sudo (1.4.0-0ubuntu2) noble; urgency=medium
* Patch in bidirectional communication support (see
https://github.com/lxqt/lxqt-sudo/pull/210)
* Updated copyright file.
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Thu, 11 Jan 2024 19:26:41 +0000
lxqt-sudo (1.4.0-0ubuntu1) noble; urgency=medium
* New upstream release.
* Bump build dependencies.
* Update copyright years.
-- Simon Quigley <tsimonq2@ubuntu.com> Sun, 12 Nov 2023 19:13:47 -0600
lxqt-sudo (1.3.0-0ubuntu1.1) mantic; urgency=medium
* Add a -E option, exposing all environment variables (LP: #2039093).
-- Simon Quigley <tsimonq2@ubuntu.com> Wed, 11 Oct 2023 12:02:21 -0500
lxqt-sudo (1.3.0-0ubuntu1) mantic; urgency=medium
* New upstream release.
* Bump build dependencies.
* Install new lxqtdoas binary.
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 11 Aug 2023 09:51:31 -0500
lxqt-sudo (1.2.0-1ubuntu1) lunar; urgency=medium
* Reverted a sync from Debian.
* Bumped Standards-Version to 4.6.2, no changes necessary.
* Removed obsolete 'override_dh_missing' section from debian/rules.
* Updated copyright file.
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Thu, 16 Feb 2023 20:20:33 -0600
lxqt-sudo (1.2.0-0ubuntu1) lunar; urgency=medium
* New upstream release.
* Fix the watch file, for real this time.
* Lubuntuify the package slightly, to make debhelper happy.
* Bump build dependencies in debian/control.
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 18 Nov 2022 18:51:41 -0600
lxqt-sudo (1.1.0-1) experimental; urgency=medium lxqt-sudo (1.1.0-1) experimental; urgency=medium
@ -26,14 +103,6 @@ lxqt-sudo (1.1.0-1) experimental; urgency=medium
-- Aaron Rainbolt <arraybolt3@gmail.com> Wed, 13 Jul 2022 19:57:33 -0500 -- Aaron Rainbolt <arraybolt3@gmail.com> Wed, 13 Jul 2022 19:57:33 -0500
lxqt-sudo (1.0.0-1) unstable; urgency=medium
* New upstream release
* Bumped Standards-Version to 4.6.0, no changes needed
* Update debian/copyright
-- S. 7 <severusseptimius7@gmail.com> Thu, 25 Nov 2021 18:19:55 +0200
lxqt-sudo (0.16.0-1) unstable; urgency=medium lxqt-sudo (0.16.0-1) unstable; urgency=medium
[ Alf Gaida ] [ Alf Gaida ]

29
debian/control vendored
View File

@ -1,5 +1,6 @@
Source: lxqt-sudo Source: lxqt-sudo
Maintainer: LXQt Packaging Team <pkg-lxqt-devel@lists.alioth.debian.org> Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
Original-Maintainer: LXQt Packaging Team <pkg-lxqt-devel@lists.alioth.debian.org>
Uploaders: Alf Gaida <agaida@siduction.org>, Uploaders: Alf Gaida <agaida@siduction.org>,
ChangZhuo Chen (陳昌倬) <czchen@debian.org>, ChangZhuo Chen (陳昌倬) <czchen@debian.org>,
Andrew Lee (李健秋) <ajqlee@debian.org>, Andrew Lee (李健秋) <ajqlee@debian.org>,
@ -8,23 +9,22 @@ Uploaders: Alf Gaida <agaida@siduction.org>,
Section: x11 Section: x11
Priority: optional Priority: optional
Build-Depends: debhelper-compat (= 13), Build-Depends: debhelper-compat (= 13),
libkf5windowsystem-dev, libkf6windowsystem-dev,
liblxqt1-dev (>= 1.2.0~), liblxqt2-dev (>= 2.2.0),
libqt5svg5-dev, libx11-dev,
libqt5x11extras5-dev, qt6-svg-dev (>= 6.6.0)
libx11-dev Standards-Version: 4.7.2
Standards-Version: 4.6.1 Vcs-Browser: https://git.lubuntu.me/Lubuntu/lxqt-sudo-packaging
Vcs-Browser: https://salsa.debian.org/cgit/pkg-team/lxqt-sudo Vcs-Git: https://git.lubuntu.me/Lubuntu/lxqt-sudo-packaging.git
Vcs-Git: https://salsa.debian.org/lxqt-team/lxqt-sudo.git Debian-Vcs-Browser: https://salsa.debian.org/cgit/pkg-team/lxqt-sudo
Debian-Vcs-Git: https://salsa.debian.org/lxqt-team/lxqt-sudo.git
Homepage: https://github.com/lxqt/lxqt-sudo Homepage: https://github.com/lxqt/lxqt-sudo
Rules-Requires-Root: no Rules-Requires-Root: no
Package: lxqt-sudo Package: lxqt-sudo
Architecture: any Architecture: any
Depends: ${misc:Depends}, Depends: ${misc:Depends}, ${shlibs:Depends}
${shlibs:Depends} Recommends: lxqt-qtplugin, lxqt-sudo-l10n
Recommends: lxqt-sudo-l10n,
lxqt-qtplugin
Description: Graphical Qt frontend for plain sudo Description: Graphical Qt frontend for plain sudo
lxqt-sudo is a graphical Qt frontend for plain sudo(8) (for requesting 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 optional password in GUI fashion). When invoked it simply spawns child sudo
@ -36,8 +36,7 @@ Package: lxqt-sudo-l10n
Architecture: all Architecture: all
Multi-Arch: foreign Multi-Arch: foreign
Section: localization Section: localization
Depends: ${misc:Depends}, Depends: qt6-translations-l10n, ${misc:Depends}
qttranslations5-l10n
Description: Language package for lxqt-sudo Description: Language package for lxqt-sudo
The l10n files for lxqt-sudo. The l10n files for lxqt-sudo.
. .

10
debian/copyright vendored
View File

@ -3,14 +3,16 @@ Upstream-Name: lxqt-sudo
Source: https://github.com/lxqt/lxqt-sudo Source: https://github.com/lxqt/lxqt-sudo
Files: * Files: *
Copyright: 2015-2022 LXQt team Copyright: 2015-2025 LXQt team
2015-2018 Palo Kisa <palo.kisa@gmail.com>
License: LGPL-2.1+ License: LGPL-2.1+
Files: debian/* Files: debian/*
Copyright: 2015-2019 Alf Gaida <agaida@siduction.org> Copyright: 2021-2025 Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
2015-2019 Alf Gaida <agaida@siduction.org>
2015 Andrew Lee (李健秋) <ajqlee@debian.org> 2015 Andrew Lee (李健秋) <ajqlee@debian.org>
2015-2022 ChangZhuo Chen (陳昌倬) <czchen@debian.org> 2015 ChangZhuo Chen (陳昌倬) <czchen@debian.org>
2021-2022 Lubuntu Developers <lubuntu-devel@lists.ubuntu.com> 2025 Aaron Rainbolt <arraybolt3@ubuntu.com>
License: LGPL-2.1+ License: LGPL-2.1+
License: LGPL-2.1+ License: LGPL-2.1+

View File

@ -1,6 +1,8 @@
usr/bin/lxdoas
usr/bin/lxqt-sudo usr/bin/lxqt-sudo
usr/bin/lxsu usr/bin/lxsu
usr/bin/lxsudo usr/bin/lxsudo
usr/share/man/man1/lxdoas.1
usr/share/man/man1/lxqt-sudo.1 usr/share/man/man1/lxqt-sudo.1
usr/share/man/man1/lxsu.1 usr/share/man/man1/lxsu.1
usr/share/man/man1/lxsudo.1 usr/share/man/man1/lxsudo.1

View File

@ -0,0 +1,82 @@
Description: Add a -E option, exposing all environment variables
Some system tools (such as ubuntu-release-upgrader) read XDG* (etc.), so allow the user to opt-in to preserving those.
Author: Simon Quigley <tsimonq2@lubuntu.me>
Origin: upstream
Forwarded: https://github.com/lxqt/lxqt-sudo/pull/204
Last-Update: 2023-10-11
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/sudo.cpp
+++ b/sudo.cpp
@@ -84,6 +84,7 @@ namespace
" -s|--su Use %3(1) as backend.\n"
" -d|--sudo Use %2(8) as backend.\n"
" -a|--doas Use %4(1) as backend.\n"
+ " -E|--keep-env Preserve all existing environment variables.\n"
" command Command to run.\n"
" arguments Optional arguments for command.\n\n").arg(app_master).arg(sudo_prog).arg(su_prog).arg(doas_prog);
if (!err.isEmpty())
@@ -114,8 +115,13 @@ namespace
};
assert_helper h;
- inline std::string env_workarounds()
+ inline std::string env_workarounds(bool preserveEnv)
{
+ if (preserveEnv) {
+ std::cerr << LXQTSUDO << ": Preserving all environment variables.\n";
+ return "";
+ }
+
std::cerr << LXQTSUDO << ": Stripping child environment except for: ";
std::ostringstream left_env_params;
std::copy(ALLOWED_VARS, ALLOWED_END - 1, std::ostream_iterator<const char *>{left_env_params, ","});
@@ -196,6 +202,10 @@ int Sudo::main()
{
mBackend = BACK_DOAS;
mArgs.removeAt(0);
+ } else if (QStringLiteral("-E") == arg1 || QStringLiteral("--keep-env") == arg1)
+ {
+ mPreserveEnv = true;
+ mArgs.removeAt(0);
}
}
//any other arguments we simply forward to su/sudo
@@ -287,11 +297,13 @@ void Sudo::child()
switch (mBackend)
{
case BACK_SUDO:
- preserve_env_param = "--preserve-env=";
-
- preserve_env_param += env_workarounds();
-
- *(param_arg++) = preserve_env_param.c_str(); //preserve environment
+ if(!mPreserveEnv) {
+ preserve_env_param = "--preserve-env=";
+ preserve_env_param += env_workarounds(mPreserveEnv);
+ } else {
+ preserve_env_param = "--preserve-env";
+ }
+ *(param_arg++) = preserve_env_param.c_str();
*(param_arg++) = "/bin/sh";
break;
case BACK_DOAS:
@@ -299,7 +311,7 @@ void Sudo::child()
[[fallthrough]];
case BACK_SU:
case BACK_NONE:
- env_workarounds();
+ env_workarounds(mPreserveEnv);
break;
}
--- a/sudo.h
+++ b/sudo.h
@@ -81,6 +81,7 @@ private:
int mChildPid;
int mPwdFd;
int mRet;
+ bool mPreserveEnv = false;
};
#endif //SUDO_H

1
debian/patches/series vendored Normal file
View File

@ -0,0 +1 @@
bypass-envvar-allowlist.patch

3
debian/rules vendored
View File

@ -7,9 +7,6 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%: %:
dh ${@} --buildsystem cmake dh ${@} --buildsystem cmake
override_dh_missing:
dh_missing --fail-missing
override_dh_auto_configure: override_dh_auto_configure:
dh_auto_configure -- \ dh_auto_configure -- \
-DUPDATE_TRANSLATIONS=OFF \ -DUPDATE_TRANSLATIONS=OFF \

9
debian/watch vendored
View File

@ -1,6 +1,5 @@
version=4 version=4
opts="searchmode=plain, \
# See https://davesteele.github.io/development/2015/05/02/debian-watch-file-format-for-signed-github-source-tars/ for GitHub workaround for releases page. pgpsigurlmangle=s/$/.asc/, \
uversionmangle=s/(\d+\.\d+\.\d+).*/$1/" \
opts="downloadurlmangle=s/archive\/refs\/tags\/@ANY_VERSION@@ARCHIVE_EXT@/releases\/download\/$1\/@PACKAGE@-$1\.tar\.xz/,filenamemangle=s/@ANY_VERSION@@ARCHIVE_EXT@/@PACKAGE@-$1\.tar\.xz/,pgpsigurlmangle=s/$/.asc/" \ https://api.github.com/repos/lxqt/@PACKAGE@/releases https:\/\/github.com\/lxqt\/@PACKAGE@\/releases\/download\/@ANY_VERSION@\/@PACKAGE@-@ANY_VERSION@.tar.xz
https://github.com/lxqt/@PACKAGE@/tags .*/@ANY_VERSION@@ARCHIVE_EXT@