forked from pool/kauth
Accepting request 311856 from KDE:Frameworks5
Update to 5.11 OBS-URL: https://build.opensuse.org/request/show/311856 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kauth?expand=0&rev=22
This commit is contained in:
commit
7ce54c5dd7
@ -1,128 +0,0 @@
|
|||||||
From dbd50f94d0f5a794f89a537692973edab38d694d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hrvoje Senjan <hrvoje.senjan@gmail.com>
|
|
||||||
Date: Mon, 20 Apr 2015 02:29:19 +0200
|
|
||||||
Subject: [PATCH 1/1] Create reproducible builds
|
|
||||||
|
|
||||||
By using QHash we get randomness on each build of policy files, which is definately not needed for names, comments and descriptions. With QMap we get nice alphabetic
|
|
||||||
sorting, and builds of packages that use kauth_install_actions macro have identical builds.
|
|
||||||
|
|
||||||
REVIEW: 123430
|
|
||||||
---
|
|
||||||
src/backends/polkit-1/kauth-policy-gen-polkit1.cpp | 16 ++++++++--------
|
|
||||||
src/policy-gen/policy-gen.cpp | 6 +++---
|
|
||||||
src/policy-gen/policy-gen.h | 6 +++---
|
|
||||||
3 files changed, 14 insertions(+), 14 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/backends/polkit-1/kauth-policy-gen-polkit1.cpp b/src/backends/polkit-1/kauth-policy-gen-polkit1.cpp
|
|
||||||
index 2dfd6beb59fc99437b726181e2dbba2bb436c36a..b3a706e0e3bb8c2772f7ae4edec7f93d6a270ac3 100644
|
|
||||||
--- a/src/backends/polkit-1/kauth-policy-gen-polkit1.cpp
|
|
||||||
+++ b/src/backends/polkit-1/kauth-policy-gen-polkit1.cpp
|
|
||||||
@@ -39,7 +39,7 @@ const char policy_tag[] = ""
|
|
||||||
|
|
||||||
const char dent[] = " ";
|
|
||||||
|
|
||||||
-void output(QList<Action> actions, QHash<QString, QString> domain)
|
|
||||||
+void output(QList<Action> actions, QMap<QString, QString> domain)
|
|
||||||
{
|
|
||||||
QTextStream out(stdout);
|
|
||||||
out.setCodec("UTF-8");
|
|
||||||
@@ -47,11 +47,11 @@ void output(QList<Action> actions, QHash<QString, QString> domain)
|
|
||||||
out << header;
|
|
||||||
|
|
||||||
// Blacklisted characters + replacements
|
|
||||||
- QHash< QChar, QString > blacklist;
|
|
||||||
+ QMap< QChar, QString > blacklist;
|
|
||||||
blacklist.insert(QLatin1Char('&'), QLatin1String("&"));
|
|
||||||
|
|
||||||
if (domain.contains(QLatin1String("vendor"))) {
|
|
||||||
- QHash< QChar, QString >::const_iterator blI;
|
|
||||||
+ QMap< QChar, QString >::const_iterator blI;
|
|
||||||
QString vendor = domain[QLatin1String("vendor")];
|
|
||||||
for (blI = blacklist.constBegin(); blI != blacklist.constEnd(); ++blI) {
|
|
||||||
vendor.replace(blI.key(), blI.value());
|
|
||||||
@@ -69,13 +69,13 @@ void output(QList<Action> actions, QHash<QString, QString> domain)
|
|
||||||
out << dent << "<action id=\"" << action.name << "\" >\n";
|
|
||||||
|
|
||||||
// Not a typo, messages and descriptions are actually inverted
|
|
||||||
- for (QHash< QString, QString >::const_iterator i = action.messages.constBegin(); i != action.messages.constEnd(); ++i) {
|
|
||||||
+ for (QMap< QString, QString >::const_iterator i = action.messages.constBegin(); i != action.messages.constEnd(); ++i) {
|
|
||||||
out << dent << dent << "<description";
|
|
||||||
if (i.key() != QLatin1String("en")) {
|
|
||||||
out << " xml:lang=\"" << i.key() << '"';
|
|
||||||
}
|
|
||||||
|
|
||||||
- QHash< QChar, QString >::const_iterator blI;
|
|
||||||
+ QMap< QChar, QString >::const_iterator blI;
|
|
||||||
QString description = i.value();
|
|
||||||
for (blI = blacklist.constBegin(); blI != blacklist.constEnd(); ++blI) {
|
|
||||||
description.replace(blI.key(), blI.value());
|
|
||||||
@@ -84,8 +84,8 @@ void output(QList<Action> actions, QHash<QString, QString> domain)
|
|
||||||
out << '>' << description << "</description>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
- QHash< QString, QString >::const_iterator i;
|
|
||||||
- for (QHash< QString, QString >::const_iterator i = action.descriptions.constBegin();
|
|
||||||
+ QMap< QString, QString >::const_iterator i;
|
|
||||||
+ for (QMap< QString, QString >::const_iterator i = action.descriptions.constBegin();
|
|
||||||
i != action.descriptions.constEnd();
|
|
||||||
++i) {
|
|
||||||
out << dent << dent << "<message";
|
|
||||||
@@ -93,7 +93,7 @@ void output(QList<Action> actions, QHash<QString, QString> domain)
|
|
||||||
out << " xml:lang=\"" << i.key() << '"';
|
|
||||||
}
|
|
||||||
|
|
||||||
- QHash< QChar, QString >::const_iterator blI;
|
|
||||||
+ QMap< QChar, QString >::const_iterator blI;
|
|
||||||
QString message = i.value();
|
|
||||||
for (blI = blacklist.constBegin(); blI != blacklist.constEnd(); ++blI) {
|
|
||||||
message.replace(blI.key(), blI.value());
|
|
||||||
diff --git a/src/policy-gen/policy-gen.cpp b/src/policy-gen/policy-gen.cpp
|
|
||||||
index 99bb0855fa8e9543f45286c4595fdd984ab663b8..9f77af994053982772d64be03aa4162562458068 100644
|
|
||||||
--- a/src/policy-gen/policy-gen.cpp
|
|
||||||
+++ b/src/policy-gen/policy-gen.cpp
|
|
||||||
@@ -33,7 +33,7 @@
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
QList<Action> parse(QSettings &ini);
|
|
||||||
-QHash<QString, QString> parseDomain(QSettings &ini);
|
|
||||||
+QMap<QString, QString> parseDomain(QSettings &ini);
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
@@ -151,9 +151,9 @@ QList<Action> parse(QSettings &ini)
|
|
||||||
return actions;
|
|
||||||
}
|
|
||||||
|
|
||||||
-QHash<QString, QString> parseDomain(QSettings &ini)
|
|
||||||
+QMap<QString, QString> parseDomain(QSettings &ini)
|
|
||||||
{
|
|
||||||
- QHash<QString, QString> rethash;
|
|
||||||
+ QMap<QString, QString> rethash;
|
|
||||||
|
|
||||||
if (ini.childGroups().contains(QString::fromLatin1("Domain"))) {
|
|
||||||
if (ini.contains(QString::fromLatin1("Domain/Name"))) {
|
|
||||||
diff --git a/src/policy-gen/policy-gen.h b/src/policy-gen/policy-gen.h
|
|
||||||
index 5bdda1cffcfbf9a2220d3f85f0b5ca621a9d26f5..113d59b1731a4d1028e4e7be48955fba42e14d57 100644
|
|
||||||
--- a/src/policy-gen/policy-gen.h
|
|
||||||
+++ b/src/policy-gen/policy-gen.h
|
|
||||||
@@ -28,14 +28,14 @@
|
|
||||||
struct Action {
|
|
||||||
QString name;
|
|
||||||
|
|
||||||
- QHash<QString, QString> descriptions;
|
|
||||||
- QHash<QString, QString> messages;
|
|
||||||
+ QMap<QString, QString> descriptions;
|
|
||||||
+ QMap<QString, QString> messages;
|
|
||||||
|
|
||||||
QString policy;
|
|
||||||
QString policyInactive;
|
|
||||||
QString persistence;
|
|
||||||
};
|
|
||||||
|
|
||||||
-extern void output(QList<Action> actions, QHash<QString, QString> domain);
|
|
||||||
+extern void output(QList<Action> actions, QMap<QString, QString> domain);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
--
|
|
||||||
2.3.5
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:98f64842060eb5aad5c4f468a631cd8d5c118cf34b476a1c6809daf931c89d1c
|
|
||||||
size 81476
|
|
3
kauth-5.11.0.tar.xz
Normal file
3
kauth-5.11.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d04e217898e303f10589ea87317795c0b66fa5fa76fbe79e56f401978bc9afcb
|
||||||
|
size 81932
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jun 7 19:07:11 UTC 2015 - hrvoje.senjan@gmail.com
|
||||||
|
|
||||||
|
- Update to 5.11.0
|
||||||
|
* Make KAUTH_HELPER_INSTALL_ABSOLUTE_DIR available to all KAuth users
|
||||||
|
* For more details please see:
|
||||||
|
https://www.kde.org/announcements/kde-frameworks-5.11.0.php
|
||||||
|
- Drop 0001-Create-reproducible-builds.patch, merged upstream
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun May 3 19:49:43 UTC 2015 - hrvoje.senjan@gmail.com
|
Sun May 3 19:49:43 UTC 2015 - hrvoje.senjan@gmail.com
|
||||||
|
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
%bcond_without lang
|
%bcond_without lang
|
||||||
%define lname libKF5Auth5
|
%define lname libKF5Auth5
|
||||||
%define _tar_path 5.10
|
%define _tar_path 5.11
|
||||||
Name: kauth
|
Name: kauth
|
||||||
Version: 5.10.0
|
Version: 5.11.0
|
||||||
Release: 0
|
Release: 0
|
||||||
%define kf5_version %{version}
|
%define kf5_version %{version}
|
||||||
BuildRequires: cmake >= 2.8.12
|
BuildRequires: cmake >= 2.8.12
|
||||||
@ -40,8 +40,6 @@ Group: System/GUI/KDE
|
|||||||
Url: http://www.kde.org
|
Url: http://www.kde.org
|
||||||
Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
|
Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
|
||||||
Source1: baselibs.conf
|
Source1: baselibs.conf
|
||||||
# PATCH-FIX-UPSTREAM 0001-Create-reproducible-builds.patch
|
|
||||||
Patch0: 0001-Create-reproducible-builds.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -72,7 +70,6 @@ Development files.
|
|||||||
%lang_package -n %lname
|
%lang_package -n %lname
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake_kf5 -d build -- -DSYSCONF_INSTALL_DIR=%{_kf5_sysconfdir}
|
%cmake_kf5 -d build -- -DSYSCONF_INSTALL_DIR=%{_kf5_sysconfdir}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user