Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package lxqt-sudo for openSUSE:Factory checked in at 2023-04-20 15:13:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lxqt-sudo (Old) and /work/SRC/openSUSE:Factory/.lxqt-sudo.new.2023 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lxqt-sudo" Thu Apr 20 15:13:58 2023 rev:16 rq:1079670 version:1.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/lxqt-sudo/lxqt-sudo.changes 2022-11-06 12:42:57.861654826 +0100 +++ /work/SRC/openSUSE:Factory/.lxqt-sudo.new.2023/lxqt-sudo.changes 2023-04-20 15:14:47.854045960 +0200 @@ -1,0 +2,6 @@ +Sat Apr 15 18:48:54 UTC 2023 - Shawn Dunn <[email protected]> + +- Update to 1.3.0: + * Added support for `doas` backend + +------------------------------------------------------------------- Old: ---- lxqt-sudo-1.2.0.tar.xz lxqt-sudo-1.2.0.tar.xz.asc New: ---- lxqt-sudo-1.3.0.tar.xz lxqt-sudo-1.3.0.tar.xz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lxqt-sudo.spec ++++++ --- /var/tmp/diff_new_pack.hsLAQU/_old 2023-04-20 15:14:48.378048364 +0200 +++ /var/tmp/diff_new_pack.hsLAQU/_new 2023-04-20 15:14:48.382048381 +0200 @@ -1,7 +1,7 @@ # # spec file for package lxqt-sudo # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: lxqt-sudo -Version: 1.2.0 +Version: 1.3.0 Release: 0 Summary: GUI frontend for sudo License: LGPL-2.1-only @@ -28,7 +28,7 @@ Source2: %{name}.keyring BuildRequires: cmake >= 3.1.0 BuildRequires: gcc-c++ -BuildRequires: lxqt-build-tools-devel >= 0.11.0 +BuildRequires: lxqt-build-tools-devel >= 0.13.0 BuildRequires: pkgconfig BuildRequires: cmake(KF5WindowSystem) BuildRequires: pkgconfig(Qt5Widgets) >= 5.15.0 @@ -62,8 +62,10 @@ %doc AUTHORS %{_bindir}/%{name} %{_bindir}/lxsu* +%{_bindir}/lxdoas %{_mandir}/man?/%{name}.* %{_mandir}/man?/lxsu*.* +%{_mandir}/man?/lxdoas* %files lang -f %{name}.lang %dir %{_datadir}/lxqt ++++++ lxqt-sudo-1.2.0.tar.xz -> lxqt-sudo-1.3.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-sudo-1.2.0/CHANGELOG new/lxqt-sudo-1.3.0/CHANGELOG --- old/lxqt-sudo-1.2.0/CHANGELOG 2022-11-05 09:32:20.000000000 +0100 +++ new/lxqt-sudo-1.3.0/CHANGELOG 2023-04-15 17:54:02.000000000 +0200 @@ -1,3 +1,7 @@ +lxqt-sudo-1.3.0 / 2023-04-15 +============================= + * Added support for doas(1) backend. + lxqt-sudo-1.2.0 / 2022-11-05 ============================= * Updated translations and bumped the version. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-sudo-1.2.0/CMakeLists.txt new/lxqt-sudo-1.3.0/CMakeLists.txt --- old/lxqt-sudo-1.2.0/CMakeLists.txt 2022-11-05 09:32:20.000000000 +0100 +++ new/lxqt-sudo-1.3.0/CMakeLists.txt 2023-04-15 17:54:02.000000000 +0200 @@ -15,7 +15,7 @@ option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF) # Minimum Versions -set(LXQT_MINIMUM_VERSION "1.2.0") +set(LXQT_MINIMUM_VERSION "1.3.0") set(QT_MINIMUM_VERSION "5.15.0") find_package(Qt5Widgets ${QT_MINIMUM_VERSION} REQUIRED) @@ -29,6 +29,7 @@ set ( LINK_LXSU "lxsu") set ( LINK_LXSUDO "lxsudo") +set ( LINK_LXDOAS "lxdoas") set ( HDRS passworddialog.h @@ -81,23 +82,31 @@ target_compile_definitions(lxqt-sudo PRIVATE "LXQTSUDO_SUDO=\"sudo\"" PRIVATE "LXQTSUDO_SU=\"su\"" + PRIVATE "LXQTSUDO_DOAS=\"doas\"" PRIVATE "LXQTSUDO=\"lxqt-sudo\"" PRIVATE "LXQTSUDO_LXSU=\"${LINK_LXSU}\"" PRIVATE "LXQTSUDO_LXSUDO=\"${LINK_LXSUDO}\"" + PRIVATE "LXQTSUDO_LXDOAS=\"${LINK_LXDOAS}\"" PRIVATE "LXQT_VERSION=\"${LXQT_VERSION}\"" ) -add_custom_command(TARGET lxqt-sudo POST_BUILD - COMMAND ln -f -s lxqt-sudo "${LINK_LXSU}" - WORKING_DIRECTORY . - COMMENT "Creating ${LINK_LXSU} symlink" -) - -add_custom_command(TARGET lxqt-sudo POST_BUILD - COMMAND ln -f -s lxqt-sudo "${LINK_LXSUDO}" - WORKING_DIRECTORY . - COMMENT "Creating ${LINK_LXSUDO} symlink" -) +foreach(LINK IN ITEMS ${LINK_LXSU} ${LINK_LXSUDO} ${LINK_LXDOAS}) + add_custom_command(TARGET lxqt-sudo POST_BUILD + COMMAND ln -f -s lxqt-sudo "${LINK}" + WORKING_DIRECTORY . + COMMENT "Creating ${LINK} symlink" + ) + install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/${LINK}" + DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT Runtime + ) + install(FILES + "man/${LINK}.1" + DESTINATION "${CMAKE_INSTALL_MANDIR}/man1" + COMPONENT Runtime + ) +endforeach() install(TARGETS lxqt-sudo @@ -105,17 +114,12 @@ COMPONENT Runtime ) install(FILES - "${CMAKE_CURRENT_BINARY_DIR}/${LINK_LXSU}" "${CMAKE_CURRENT_BINARY_DIR}/${LINK_LXSUDO}" - DESTINATION "${CMAKE_INSTALL_BINDIR}" - COMPONENT Runtime -) -install(FILES ${DESKTOP_FILES} DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications" COMPONENT Runtime ) install(FILES - man/lxqt-sudo.1 "man/${LINK_LXSU}.1" "man/${LINK_LXSUDO}.1" + man/lxqt-sudo.1 DESTINATION "${CMAKE_INSTALL_MANDIR}/man1" COMPONENT Runtime ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-sudo-1.2.0/man/lxdoas.1 new/lxqt-sudo-1.3.0/man/lxdoas.1 --- old/lxqt-sudo-1.2.0/man/lxdoas.1 1970-01-01 01:00:00.000000000 +0100 +++ new/lxqt-sudo-1.3.0/man/lxdoas.1 2023-04-20 15:14:48.478048821 +0200 @@ -0,0 +1 @@ +symbolic link to lxqt-sudo.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-sudo-1.2.0/man/lxqt-sudo.1 new/lxqt-sudo-1.3.0/man/lxqt-sudo.1 --- old/lxqt-sudo-1.2.0/man/lxqt-sudo.1 2022-11-05 09:32:20.000000000 +0100 +++ new/lxqt-sudo-1.3.0/man/lxqt-sudo.1 2023-04-15 17:54:02.000000000 +0200 @@ -1,16 +1,18 @@ .TH lxqt-sudo 1 "" "" "LXQt\ Module" .SH NAME -\fBlxqt-sudo\fR, \fBlxsu\fR \- execute a command as privileged user +\fBlxqt-sudo\fR, \fBlxsu\fR, \fBlxdoas\fR \- execute a command as privileged user .SH SYNOPSIS \fBlxqt-sudo\fR \fIoption\fR [\fIcommand\fR [\fIarguments\fR]] .br \fBlxsu\fR [\fIoption\fR] [\fIcommand\fR [\fIarguments\fR]] .br \fBlxsudo\fR [\fIoption\fR] [\fIcommand\fR [\fIarguments\fR]] +.br +\fBlxdoas\fR [\fIoption\fR] [\fIcommand\fR [\fIarguments\fR]] .SH DESCRIPTION -\fBlxqt-sudo\fR (and symlinks \fBlxsu\fR, \fBlxsudo\fR) is a graphical QT frontend for plain \fBsudo(8)\fR or \fBsu(1)\fR (for requesting optional password in GUI fashion). +\fBlxqt-sudo\fR (and symlinks \fBlxsu\fR, \fBlxsudo\fR, \fBlxdoas\fR) is a graphical QT frontend for plain \fBsudo(8)\fR, \fBsu(1)\fR or \fBdoas(1)\fR (for requesting optional password in GUI fashion). .br -When invoked it simply spawns child \fIsudo\fR or \fIsu\fR process with requested \fIcommand\fR (and optional \fIarguments\fR). If \fIsudo\fR/\fIsu\fR requests user's password, +When invoked it simply spawns child \fIsudo\fR, \fIsu\fR or \fIdoas\fR process with requested \fIcommand\fR (and optional \fIarguments\fR). If \fIsudo\fR/\fIsu\fR/\fIdoas\fR requests user's password, the GUI password dialog is shown and (after submit) the password is provided to backend. .br .SH OPTIONS @@ -20,13 +22,15 @@ .br -v|--version Print version information. .br - -s|--su Use \fIsu\fR as backend (default for \fBlxqt-sudo\fR & \fBlxsudo\fR is \fIsudo\fR, for \fBlxsu\fR is \fIsu\fR). + -s|--su Use \fIsu\fR as backend (default for \fBlxqt-sudo\fR & \fBlxsudo\fR is \fIsudo\fR, for \fBlxsu\fR \fIsu\fR, for \fBlxdoas\fR \fIdoas\fR). +.br + -d|--sudo Use \fIsudo\fR as backend (default for \fBlxqt-sudo\fR & \fBlxsudo\fR is \fIsudo\fR, for \fBlxsu\fR \fIsu\fR, for \fBlxdoas\fR \fIdoas\fR). .br - -d|--sudo Use \fIsudo\fR as backend (default for \fBlxqt-sudo\fR & \fBlxsudo\fR is \fIsudo\fR, for \fBlxsu\fR is \fIsu\fR). + -a|--doas Use \fIdoas\fR as backend (default for \fBlxqt-sudo\fR & \fBlxsudo\fR is \fIsudo\fR, for \fBlxsu\fR \fIsu\fR, for \fBlxdoas\fR \fIdoas\fR). .SH "REPORTING BUGS" Report bugs to https://github.com/lxqt/lxqt/issues .SH "SEE ALSO" -\fBsudo(8)\fR \fBsu(1)\fR +\fBsudo(8)\fR \fBsu(1)\fR \fBdoas(1)\fR .SH AUTHOR This manual page was created by \fBPalo Kisa\fR \fI<[email protected]>\fR for \fBLXQt\fR project. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-sudo-1.2.0/sudo.cpp new/lxqt-sudo-1.3.0/sudo.cpp --- old/lxqt-sudo-1.2.0/sudo.cpp 2022-11-05 09:32:20.000000000 +0100 +++ new/lxqt-sudo-1.3.0/sudo.cpp 2023-04-15 17:54:02.000000000 +0200 @@ -61,9 +61,11 @@ const QString app_version{QStringLiteral(LXQT_VERSION)}; const QString app_lxsu{QStringLiteral(LXQTSUDO_LXSU)}; const QString app_lxsudo{QStringLiteral(LXQTSUDO_LXSUDO)}; + const QString app_lxdoas{QStringLiteral(LXQTSUDO_LXDOAS)}; const QString su_prog{QStringLiteral(LXQTSUDO_SU)}; const QString sudo_prog{QStringLiteral(LXQTSUDO_SUDO)}; + const QString doas_prog{QStringLiteral(LXQTSUDO_DOAS)}; const QString pwd_prompt_end{QStringLiteral(": ")}; const QChar nl{QLatin1Char('\n')}; @@ -73,15 +75,16 @@ QTextStream(stderr) << err << '\n'; QTextStream(stdout) << QObject::tr("Usage: %1 option [command [arguments...]]\n\n" - "GUI frontend for %2/%3\n\n" + "GUI frontend for %2/%3/%4\n\n" "Arguments:\n" " option:\n" " -h|--help Print this help.\n" " -v|--version Print version information.\n" " -s|--su Use %3(1) as backend.\n" " -d|--sudo Use %2(8) as backend.\n" + " -a|--doas Use %4(1) as backend.\n" " command Command to run.\n" - " arguments Optional arguments for command.\n\n").arg(app_master).arg(sudo_prog).arg(su_prog); + " arguments Optional arguments for command.\n\n").arg(app_master).arg(sudo_prog).arg(su_prog).arg(doas_prog); if (!err.isEmpty()) QMessageBox(QMessageBox::Critical, app_master, err, QMessageBox::Ok).exec(); } @@ -155,6 +158,8 @@ mArgs.removeAt(0); if (app_lxsu == cmd) mBackend = BACK_SU; + else if (app_lxdoas == cmd) + mBackend = BACK_DOAS; else if (app_lxsudo == cmd || app_master == cmd) mBackend = BACK_SUDO; mRet = mPwdFd = mChildPid = 0; @@ -186,6 +191,10 @@ { mBackend = BACK_SUDO; mArgs.removeAt(0); + } else if (QStringLiteral("-a") == arg1 || QStringLiteral("--doas") == arg1) + { + mBackend = BACK_DOAS; + mArgs.removeAt(0); } } //any other arguments we simply forward to su/sudo @@ -242,6 +251,7 @@ switch (backEnd) { case BACK_SU : rv = su_prog; break; case BACK_SUDO : rv = sudo_prog; break; + case BACK_DOAS : rv = doas_prog; break; //: shouldn't be actually used but keep as short as possible in translations just in case. case BACK_NONE : rv = tr("unset"); } @@ -251,8 +261,22 @@ void Sudo::child() { - int params_cnt = 3 //1. su/sudo & "shell command" & last nullptr - + (BACK_SU == mBackend ? 1 : 3); //-c for su | -E /bin/sh -c for sudo + int params_cnt = 3; //su/sudo & "shell command" & last nullptr + switch (mBackend) + { + case BACK_SU: + params_cnt += 1; // -c for su + break; + case BACK_SUDO: + params_cnt += 3; // --preserve-env=... /bin/sh -c for sudo + break; + case BACK_DOAS: + params_cnt += 2; // /bin/sh -c for sudo + break; + case BACK_NONE: + break; + } + std::unique_ptr<char const *[]> params{new char const *[params_cnt]}; const char ** param_arg = params.get() + 1; @@ -269,6 +293,9 @@ *(param_arg++) = preserve_env_param.c_str(); //preserve environment *(param_arg++) = "/bin/sh"; break; + case BACK_DOAS: + *(param_arg++) = "/bin/sh"; + [[fallthrough]]; case BACK_SU: case BACK_NONE: env_workarounds(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-sudo-1.2.0/sudo.h new/lxqt-sudo-1.3.0/sudo.h --- old/lxqt-sudo-1.2.0/sudo.h 2022-11-05 09:32:20.000000000 +0100 +++ new/lxqt-sudo-1.3.0/sudo.h 2023-04-15 17:54:02.000000000 +0200 @@ -44,6 +44,7 @@ BACK_NONE , BACK_SUDO , BACK_SU + , BACK_DOAS }; public: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-sudo-1.2.0/translations/lxqt-sudo_ca.ts new/lxqt-sudo-1.3.0/translations/lxqt-sudo_ca.ts --- old/lxqt-sudo-1.2.0/translations/lxqt-sudo_ca.ts 2022-11-05 09:32:20.000000000 +0100 +++ new/lxqt-sudo-1.3.0/translations/lxqt-sudo_ca.ts 2023-04-15 17:54:02.000000000 +0200 @@ -31,7 +31,7 @@ <message> <location filename="../passworddialog.ui" line="109"/> <source>A program LXQt sudo calls in background to elevate privileges.</source> - <translation type="unfinished">Un programa LXQt sudo demana en segon pla elevar privilegis.</translation> + <translation>Un programa LXQt sudo demana en segon pla elevar privilegis.</translation> </message> <message> <location filename="../passworddialog.ui" line="119"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-sudo-1.2.0/translations/lxqt-sudo_it.ts new/lxqt-sudo-1.3.0/translations/lxqt-sudo_it.ts --- old/lxqt-sudo-1.2.0/translations/lxqt-sudo_it.ts 2022-11-05 09:32:20.000000000 +0100 +++ new/lxqt-sudo-1.3.0/translations/lxqt-sudo_it.ts 2023-04-15 17:54:02.000000000 +0200 @@ -31,7 +31,7 @@ <message> <location filename="../passworddialog.ui" line="109"/> <source>A program LXQt sudo calls in background to elevate privileges.</source> - <translation>Chiamata in background da un programma LXQt sudo per elevare i privilegi.</translation> + <translation type="unfinished">Chiamata in background da un programma LXQt sudo per elevare i privilegi.</translation> </message> <message> <location filename="../passworddialog.ui" line="119"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxqt-sudo-1.2.0/translations/lxqt-sudo_oc.ts new/lxqt-sudo-1.3.0/translations/lxqt-sudo_oc.ts --- old/lxqt-sudo-1.2.0/translations/lxqt-sudo_oc.ts 1970-01-01 01:00:00.000000000 +0100 +++ new/lxqt-sudo-1.3.0/translations/lxqt-sudo_oc.ts 2023-04-15 17:54:02.000000000 +0200 @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="oc"> +<context> + <name>PasswordDialog</name> + <message> + <location filename="../passworddialog.ui" line="6"/> + <source>LXQt sudo</source> + <translation>sudo de LXQt</translation> + </message> + <message> + <location filename="../passworddialog.ui" line="42"/> + <source>Copy command to clipboard</source> + <translation>Copiar la comanda al quichapapièrs</translation> + </message> + <message> + <location filename="../passworddialog.ui" line="45"/> + <source>&Copy</source> + <translation>&Copiar</translation> + </message> + <message> + <location filename="../passworddialog.ui" line="83"/> + <source>The requested action needs administrative privileges.<br>Please enter your password.</source> + <translation>Lâaccion demandada requerÃs los privilègis administratius.<br>Picatz lo senhal.</translation> + </message> + <message> + <location filename="../passworddialog.ui" line="106"/> + <source>LXQt sudo backend</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../passworddialog.ui" line="109"/> + <source>A program LXQt sudo calls in background to elevate privileges.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../passworddialog.ui" line="119"/> + <source>Command:</source> + <translation>Comanda :</translation> + </message> + <message> + <location filename="../passworddialog.ui" line="126"/> + <source>Password:</source> + <translation>Senhal :</translation> + </message> + <message> + <location filename="../passworddialog.ui" line="133"/> + <source>Enter password</source> + <translation>Picar lo senhal</translation> + </message> + <message> + <location filename="../passworddialog.cpp" line="60"/> + <source>Attempt #%1</source> + <translation>Ensag #%1</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../sudo.cpp" line="75"/> + <source>Usage: %1 option [command [arguments...]] + +GUI frontend for %2/%3 + +Arguments: + option: + -h|--help Print this help. + -v|--version Print version information. + -s|--su Use %3(1) as backend. + -d|--sudo Use %2(8) as backend. + command Command to run. + arguments Optional arguments for command. + +</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../sudo.cpp" line="92"/> + <source>%1 version %2 +</source> + <translation>%1 version %2 +</translation> + </message> +</context> +<context> + <name>Sudo</name> + <message> + <location filename="../sudo.cpp" line="195"/> + <source>%1: no command to run provided!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../sudo.cpp" line="202"/> + <source>%1: no backend chosen!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../sudo.cpp" line="219"/> + <source>Syscall error, failed to fork: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../sudo.cpp" line="246"/> + <source>unset</source> + <extracomment>shouldn't be actually used but keep as short as possible in translations just in case.</extracomment> + <translation>pas definit</translation> + </message> + <message> + <location filename="../sudo.cpp" line="295"/> + <source>%1: Detected attempt to inject privileged command via LC_ALL env(%2). Exiting! +</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../sudo.cpp" line="337"/> + <source>Syscall error, failed to bring pty to non-block mode: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../sudo.cpp" line="345"/> + <source>Syscall error, failed to fdopen pty: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../sudo.cpp" line="314"/> + <source>%1: Failed to exec '%2': %3 +</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../sudo.cpp" line="376"/> + <source>Child '%1' process failed! +%2</source> + <translation>Fracà s del processús filh « %1 Â» ! +%2</translation> + </message> +</context> +</TS>
