diff options
author | Jesper Schmitz Mouridsen <jsm@FreeBSD.org> | 2019-03-28 17:59:33 +0000 |
---|---|---|
committer | Jesper Schmitz Mouridsen <jsm@FreeBSD.org> | 2019-03-28 17:59:33 +0000 |
commit | 0f8e28c12e469870992158896963ee2faa40c239 (patch) | |
tree | 2e9eaf3c10f8a452ca373d484cab9d6c2788cc79 /security/lxqt-sudo | |
parent | 2a6023aa50c64a03f931db8832a268dabbef10ac (diff) | |
download | ports-0f8e28c12e469870992158896963ee2faa40c239.tar.gz ports-0f8e28c12e469870992158896963ee2faa40c239.zip |
Upgrade the LXQt desktop environment to 0.14.0
Upstream announcement https://forum.lxqt.org/t/release-lxqt-0-14-0/572
Approved by: miwi (mentor)
Differential Revision: https://reviews.freebsd.org/D19056
Notes
Notes:
svn path=/head/; revision=497047
Diffstat (limited to 'security/lxqt-sudo')
-rw-r--r-- | security/lxqt-sudo/Makefile | 5 | ||||
-rw-r--r-- | security/lxqt-sudo/distinfo | 6 | ||||
-rw-r--r-- | security/lxqt-sudo/files/patch-sudo.cpp | 86 | ||||
-rw-r--r-- | security/lxqt-sudo/pkg-plist | 27 |
4 files changed, 98 insertions, 26 deletions
diff --git a/security/lxqt-sudo/Makefile b/security/lxqt-sudo/Makefile index 372f93b1f385..948aff0b1b85 100644 --- a/security/lxqt-sudo/Makefile +++ b/security/lxqt-sudo/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= lxqt-sudo -PORTVERSION= 0.13.0 -PORTREVISION= 2 +PORTVERSION= 0.14.0 CATEGORIES= security MASTER_SITES= LXQT @@ -14,7 +13,7 @@ LICENSE= LGPL21+ RUN_DEPENDS= sudo:security/sudo -USES= cmake compiler:c++11-lib gettext kde:5 lxqt qt:5 \ +USES= cmake compiler:c++14-lang gettext kde:5 lxqt qt:5 \ pkgconfig tar:xz USE_QT= buildtools_build qmake_build core dbus gui svg widgets \ x11extras xml diff --git a/security/lxqt-sudo/distinfo b/security/lxqt-sudo/distinfo index 0e07ef4d0ac2..3c9a24e8977f 100644 --- a/security/lxqt-sudo/distinfo +++ b/security/lxqt-sudo/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1527328596 -SHA256 (lxqt/lxqt-sudo-0.13.0.tar.xz) = 8e05adf4926eead9fa3015be54a76f67ebf3f7c40e1dea0bcafbcf4c38e548c8 -SIZE (lxqt/lxqt-sudo-0.13.0.tar.xz) = 16208 +TIMESTAMP = 1548968509 +SHA256 (lxqt/lxqt-sudo-0.14.0.tar.xz) = a322e169a5b6c5decbabe837fad428ac9013d9173723f6e0525a62b11bd1a123 +SIZE (lxqt/lxqt-sudo-0.14.0.tar.xz) = 27684 diff --git a/security/lxqt-sudo/files/patch-sudo.cpp b/security/lxqt-sudo/files/patch-sudo.cpp index 791d5159c9d1..90b6b023d2ac 100644 --- a/security/lxqt-sudo/files/patch-sudo.cpp +++ b/security/lxqt-sudo/files/patch-sudo.cpp @@ -1,9 +1,9 @@ ---- sudo.cpp.orig 2018-05-21 19:10:17 UTC +--- sudo.cpp.orig 2019-01-25 23:40:04 UTC +++ sudo.cpp -@@ -36,7 +36,13 @@ - #include <QSocketNotifier> - #include <QDebug> +@@ -38,7 +38,13 @@ #include <QThread> + #include <QProcessEnvironment> + #include <QTimer> +#if defined(__linux__) #include <pty.h> +#elif defined(__FreeBSD__) @@ -14,7 +14,7 @@ #include <unistd.h> #include <memory> #include <csignal> -@@ -52,6 +58,9 @@ namespace +@@ -56,6 +62,9 @@ namespace const QString su_prog{QStringLiteral(LXQTSUDO_SU)}; const QString sudo_prog{QStringLiteral(LXQTSUDO_SUDO)}; @@ -24,37 +24,83 @@ const QString pwd_prompt_end{QStringLiteral(": ")}; const QChar nl{QLatin1Char('\n')}; -@@ -179,6 +188,10 @@ void Sudo::child() - if (BACK_SU == mBackend) - { - program = su_prog.toStdString(); -+#ifdef __FreeBSD__ -+ *(param_arg++) = "-m"; -+ *(param_arg++) = "root"; +@@ -240,27 +249,39 @@ QString Sudo::backendName (backend_t backEnd) + void Sudo::child() + { + int params_cnt = 3 //1. su/sudo & "shell command" & last nullptr ++#ifndef __FreeBSD__ + + (BACK_SU == mBackend ? 1 : 3); //-c for su | -E /bin/sh -c for sudo ++#else ++ + (BACK_SU == mBackend ? 3 : 3); +#endif - *(param_arg++) = "-c"; //run command + std::unique_ptr<char const *[]> params{new char const *[params_cnt]}; + const char ** param_arg = params.get() + 1; + + std::string program = backendName().toLocal8Bit().data(); ++ if (BACK_SU == mBackend) ++ { ++ *(param_arg++) = "-m"; ++ *(param_arg++) = "root"; ++ *(param_arg++) = "-c"; ++ } + if (BACK_SUDO == mBackend) + { ++ + *(param_arg++) = "-E"; //preserve environment + *(param_arg++) = "/bin/sh"; ++ *(param_arg++) = "-c"; //run command + } +- *(param_arg++) = "-c"; //run command + + params[0] = program.c_str(); +- + // Note: we force the su/sudo to communicate with us in the simplest + // locale and then set the locale back for the command +- char const * const env_lc_all = getenv("LC_ALL"); ++ + std::string command; ++#ifndef __FreeBSD__ ++ char const * const env_lc_all = getenv("LC_ALL"); + if (env_lc_all == nullptr) + { +- command = "unset LC_ALL; "; ++ command = "unset LC_ALL;"; } else { -@@ -200,7 +213,6 @@ void Sudo::child() + // Note: we need to check if someone is not trying to inject commands +@@ -276,6 +297,9 @@ void Sudo::child() + } + command += "exec "; + command += squashedArgs().toLocal8Bit().data(); ++#else ++ command = squashedArgs().toLocal8Bit().data(); ++#endif + *(param_arg++) = command.c_str(); + + *param_arg = nullptr; +@@ -283,12 +307,11 @@ void Sudo::child() + setenv("LC_ALL", "C", 1); + env_workarounds(); +- setsid(); //session leader execvp(params[0], const_cast<char **>(params.get())); - //exec never returns in case of success QTextStream{stderr, QIODevice::WriteOnly} << tr("%1: Failed to exec '%2': %3\n").arg(app_master).arg(params[0]).arg(strerror(errno)); ++ exit(1); -@@ -277,8 +289,13 @@ int Sudo::parent() - lxqtApp->quit(); + } + +@@ -354,7 +377,11 @@ int Sudo::parent() + } } else { -- if (line.endsWith(pwd_prompt_end)) +#ifdef __FreeBSD__ + if( line.endsWith(pwd_prompt_end_c_locale) || line.endsWith(pwd_prompt_end)) +#else -+ if(line.endsWith(pwd_prompt_end)) + if (line.endsWith(pwd_prompt_end)) +#endif { -+ //if now echo is turned off, su/sudo requests password struct termios tios; - //loop to be sure we don't miss the flag (we can afford such small delay in "normal" output processing) diff --git a/security/lxqt-sudo/pkg-plist b/security/lxqt-sudo/pkg-plist index 5849219c64c6..0def51648493 100644 --- a/security/lxqt-sudo/pkg-plist +++ b/security/lxqt-sudo/pkg-plist @@ -4,3 +4,30 @@ bin/lxsudo man/man1/lxqt-sudo.1.gz man/man1/lxsu.1.gz man/man1/lxsudo.1.gz +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_ar.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_ca.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_cs.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_cy.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_da.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_de.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_el.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_es.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_fi.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_fr.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_gl.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_he.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_hu.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_id.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_it.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_ja.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_lt.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_nb_NO.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_nl.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_pl.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_pt.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_ru.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_sk.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_tr.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_uk.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_zh_CN.qm +%%LXQT_TRANSLATIONS%%/lxqt-sudo/lxqt-sudo_zh_TW.qm |