Gentoo Archives: gentoo-commits

From: Ettore Di Giacinto <mudler@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/packagekit-base/files/, app-admin/packagekit-base/
Date: Sat, 09 Dec 2017 11:25:54
Message-Id: 1512818586.515f7b4a3864f843e21751472940443d8526a300.mudler@gentoo
1 commit: 515f7b4a3864f843e21751472940443d8526a300
2 Author: Ettore Di Giacinto <mudler <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 9 10:54:28 2017 +0000
4 Commit: Ettore Di Giacinto <mudler <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 9 11:23:06 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=515f7b4a
7
8 app-admin/packagekit-base: Version bump to 1.1.7
9
10 - Adapt elogind patch
11 - Drop networkmanager and connman support
12
13 Package-Manager: Portage-2.3.16, Repoman-2.3.6
14
15 app-admin/packagekit-base/Manifest | 1 +
16 .../packagekit-base-1.1.7-elogind-support.patch | 184 +++++++++++++++++++++
17 .../packagekit-base/packagekit-base-1.1.7.ebuild | 127 ++++++++++++++
18 3 files changed, 312 insertions(+)
19
20 diff --git a/app-admin/packagekit-base/Manifest b/app-admin/packagekit-base/Manifest
21 index f0feb037de8..fbaaeb3873c 100644
22 --- a/app-admin/packagekit-base/Manifest
23 +++ b/app-admin/packagekit-base/Manifest
24 @@ -2,3 +2,4 @@ DIST PackageKit-1.0.11.tar.xz 1427404 BLAKE2B 74455b4b070eb16a1310d77ec50225daa0
25 DIST PackageKit-1.1.1.tar.xz 1410632 BLAKE2B ffb9d96794dfafa5362277292a743dde0d66259801611043cfdb66e169f9cd377ad49a00bab8687bbacf5cb156eb83c0fc1d33bf13409a1f1af60b3a9ab88a1e SHA512 caf9b67f71a36479d32338c28343671e9586aade7a0f777b867772ad8da8e3206bf66a46b2fa2cba8f0f48af27db3888b68e336707db6f76c5e0dbed464e2874
26 DIST PackageKit-1.1.4.tar.xz 1424756 BLAKE2B a9eb82857b37fc84c8b7d5e71f0b51c4f1d9ef74702afb6e92e9e84e1ccf9e905dafafbda61a3ea737e94173f53486591bb66cf43b19b25004815f3abfd05d8c SHA512 fc04d58c46f7e7dbb1386d26627ea246b5f21b8483862788bb734b8a137e4cb1d41de0f471b46f6d649e29337f9605acba0568a845577b27a2ac0faaf391b187
27 DIST PackageKit-1.1.5.tar.xz 1418292 BLAKE2B 973cfaf1e6dd48bbf3ef5cfe421202804af584af227fb70c5835d70bc128da64fd4084dd2bc508ed63d2c46ac693d7b3fcb540992da4e13ea947696a75f870d9 SHA512 ecc6a4d39caa0a7ea2047f52f95980b23e61ae200e27559326f03302b1c0d798f9cbae53fcf2d397dca3d54e52f143e2e7aa4e3f0b2df8c39e53bd2993e86154
28 +DIST PackageKit-1.1.7.tar.xz 1431648 BLAKE2B 0cc64e7ac38d6641a1fbd98ffad2e7920eb7b3c86ea36d3ad036541886191c38deeeb7241f81ec3d29f8268b1c84ec500511895312c29c706403607215117d5e SHA512 0d0277e24feb63e94aeb5fec2c4306ccdf5935c2f62d5eef3be8db9f534eb302eff09ea0e020db48b2dd0af9ba6b31f7960d661d1040774dccf650ebf04c4f83
29
30 diff --git a/app-admin/packagekit-base/files/packagekit-base-1.1.7-elogind-support.patch b/app-admin/packagekit-base/files/packagekit-base-1.1.7-elogind-support.patch
31 new file mode 100644
32 index 00000000000..bb6b6103dde
33 --- /dev/null
34 +++ b/app-admin/packagekit-base/files/packagekit-base-1.1.7-elogind-support.patch
35 @@ -0,0 +1,184 @@
36 +--- a/config.h.in 2017-06-07 16:38:45.046910693 +0200
37 ++++ b/config.h.in 2017-06-07 16:39:06.973911120 +0200
38 +@@ -78,8 +78,8 @@
39 + /* Define to 1 if you have the <string.h> header file. */
40 + #undef HAVE_STRING_H
41 +
42 +-/* Build systemd code */
43 +-#undef HAVE_SYSTEMD
44 ++/* Build systemd-login code */
45 ++#undef HAVE_SYSTEMD_SD_LOGIN_H
46 +
47 + /* Define to 1 if you have the <sys/stat.h> header file. */
48 + #undef HAVE_SYS_STAT_H
49 +--- a/configure.ac 2017-06-06 09:03:57.171355965 +0200
50 ++++ b/configure.ac 2017-06-06 09:55:11.242384458 +0200
51 +@@ -254,7 +254,6 @@
52 + AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
53 + [has_systemdsystemunitdir=$with_systemdsystemunitdir],
54 + [has_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
55 +- AC_DEFINE(HAVE_SYSTEMD,1,[Build systemd code])
56 + AC_SUBST([systemdsystemunitdir], [$has_systemdsystemunitdir])
57 + fi
58 + AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$has_systemdsystemunitdir"])
59 +@@ -267,6 +266,24 @@
60 + AM_CONDITIONAL(ENABLE_OFFLINE_UPDATE, [test x$enable_systemd = xyes -a x$enable_offline_update = xyes])
61 +
62 + dnl ---------------------------------------------------------------------------
63 ++dnl - Use elogind instead of systemd-login
64 ++dnl ---------------------------------------------------------------------------
65 ++AC_ARG_ENABLE(elogind, AS_HELP_STRING([--enable-elogind],[enable elogind session tracker]),
66 ++ enable_elogind=$enableval,enable_elogind=no)
67 ++if test x$enable_elogind = xyes; then
68 ++ PKG_CHECK_MODULES(ELOGIND, [libelogind >= 229.4], [have_elogind=yes], [have_elogind=no])
69 ++else
70 ++ have_elogind=no
71 ++fi
72 ++
73 ++dnl ---------------------------------------------------------------------------
74 ++dnl --- Is systemd/sd-login.h, either from systemd or elogind, available?
75 ++dnl ---------------------------------------------------------------------------
76 ++if test -n "$has_systemdsystemunitdir" -o "x$have_elogind" != "xno" ; then
77 ++ AC_DEFINE(HAVE_SYSTEMD_SD_LOGIN_H,1,[Build systemd-login code])
78 ++fi
79 ++
80 ++dnl ---------------------------------------------------------------------------
81 + dnl - Generate man pages ? (default enabled)
82 + dnl ---------------------------------------------------------------------------
83 + AC_ARG_ENABLE(man_pages, AS_HELP_STRING([--disable-man-pages],[Disable man pages generation]), enable_man_pages=$enableval)
84 +@@ -629,6 +644,7 @@
85 + cflags: ${CFLAGS}
86 + cppflags: ${CPPFLAGS}
87 + Able to run locally: ${enable_local}
88 ++ Use elogind: ${enable_elogind}
89 + Use systemd: ${enable_systemd}
90 + Enable offline update: ${enable_offline_update}
91 + Networking stacks: ${networking_apis}
92 +--- a/src/Makefile.am
93 ++++ b/src/Makefile.am
94 +@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
95 + $(SQLITE_CFLAGS) \
96 + $(POLKIT_CFLAGS) \
97 + $(PYTHON_CFLAGS) \
98 ++ $(ELOGIND_CFLAGS) \
99 + $(SYSTEMD_CFLAGS) \
100 + -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
101 + -DBINDIR=\"$(bindir)\" \
102 +@@ -100,6 +101,7 @@ packagekit_direct_LDADD = \
103 + $(POLKIT_LIBS) \
104 + $(GIO_LIBS) \
105 + $(ARCHIVE_LIBS) \
106 ++ $(ELOGIND_LIBS) \
107 + $(SYSTEMD_LIBS)
108 +
109 + packagekit_direct_LDFLAGS = \
110 +@@ -128,6 +130,7 @@ packagekitd_LDADD = \
111 + $(POLKIT_LIBS) \
112 + $(GIO_LIBS) \
113 + $(ARCHIVE_LIBS) \
114 ++ $(ELOGIND_LIBS) \
115 + $(SYSTEMD_LIBS)
116 +
117 + packagekitd_LDFLAGS = \
118 +@@ -153,6 +156,7 @@ pk_self_test_LDADD = \
119 + $(POLKIT_LIBS) \
120 + $(GIO_LIBS) \
121 + $(ARCHIVE_LIBS) \
122 ++ $(ELOGIND_LIBS) \
123 + $(SYSTEMD_LIBS)
124 +
125 + pk_self_test_CPPFLAGS = \
126 +--- a/src/pk-engine.c 2017-06-06 09:12:23.828371176 +0200
127 ++++ b/src/pk-engine.c 2017-06-06 09:55:47.426385545 +0200
128 +@@ -98,7 +98,7 @@
129 + guint owner_id;
130 + GDBusNodeInfo *introspection;
131 + GDBusConnection *connection;
132 +-#ifdef HAVE_SYSTEMD
133 ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H
134 + GDBusProxy *logind_proxy;
135 + gint logind_fd;
136 + #endif
137 +@@ -281,7 +281,7 @@
138 + static void
139 + pk_engine_inhibit (PkEngine *engine)
140 + {
141 +-#ifdef HAVE_SYSTEMD
142 ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H
143 + g_autoptr(GError) error = NULL;
144 + g_autoptr(GUnixFDList) out_fd_list = NULL;
145 + g_autoptr(GVariant) res = NULL;
146 +@@ -331,7 +331,7 @@
147 + static void
148 + pk_engine_uninhibit (PkEngine *engine)
149 + {
150 +-#ifdef HAVE_SYSTEMD
151 ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H
152 + if (engine->priv->logind_fd == 0)
153 + return;
154 + g_debug ("closed logind fd %i", engine->priv->logind_fd);
155 +@@ -1830,7 +1830,7 @@
156 + }
157 + }
158 +
159 +-#ifdef HAVE_SYSTEMD
160 ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H
161 + /**
162 + * pk_engine_proxy_logind_cb:
163 + **/
164 +@@ -1872,7 +1872,7 @@
165 + /* save copy for emitting signals */
166 + engine->priv->connection = g_object_ref (connection);
167 +
168 +-#ifdef HAVE_SYSTEMD
169 ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H
170 + /* connect to logind */
171 + g_dbus_proxy_new (connection,
172 + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
173 +@@ -2031,7 +2031,7 @@
174 + if (engine->priv->connection != NULL)
175 + g_object_unref (engine->priv->connection);
176 +
177 +-#ifdef HAVE_SYSTEMD
178 ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H
179 + /* uninhibit */
180 + if (engine->priv->logind_fd != 0)
181 + close (engine->priv->logind_fd);
182 +--- a/src/pk-dbus.c 2017-06-06 09:12:13.254370858 +0200
183 ++++ b/src/pk-dbus.c 2017-06-06 10:09:17.249409857 +0200
184 +@@ -27,7 +27,7 @@
185 + #include <glib.h>
186 + #include <gio/gio.h>
187 +
188 +-#ifdef HAVE_SYSTEMD
189 ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H
190 + #include <systemd/sd-login.h>
191 + #endif
192 +
193 +@@ -177,7 +177,7 @@
194 + return cmdline;
195 + }
196 +
197 +-#ifdef HAVE_SYSTEMD
198 ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H
199 + /**
200 + * pk_dbus_get_session_systemd:
201 + **/
202 +@@ -220,7 +220,7 @@
203 + pk_dbus_get_session (PkDbus *dbus, const gchar *sender)
204 + {
205 + gchar *session = NULL;
206 +-#ifndef HAVE_SYSTEMD
207 ++#ifndef HAVE_SYSTEMD_SD_LOGIN_H
208 + g_autoptr(GError) error = NULL;
209 + #endif
210 + guint pid;
211 +@@ -250,7 +250,7 @@
212 + }
213 +
214 + /* get session from systemd or ConsoleKit */
215 +-#ifdef HAVE_SYSTEMD
216 ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H
217 + session = pk_dbus_get_session_systemd (pid);
218 + #else
219 + /* get session from ConsoleKit */
220
221 diff --git a/app-admin/packagekit-base/packagekit-base-1.1.7.ebuild b/app-admin/packagekit-base/packagekit-base-1.1.7.ebuild
222 new file mode 100644
223 index 00000000000..1dae7f2a4bd
224 --- /dev/null
225 +++ b/app-admin/packagekit-base/packagekit-base-1.1.7.ebuild
226 @@ -0,0 +1,127 @@
227 +# Copyright 1999-2017 Gentoo Foundation
228 +# Distributed under the terms of the GNU General Public License v2
229 +
230 +EAPI="6"
231 +
232 +# PackageKit supports 3.2+, but entropy and portage backends are untested
233 +# Future note: use --enable-python3
234 +PYTHON_COMPAT=( python2_7 )
235 +VALA_USE_DEPEND="vapigen"
236 +
237 +inherit autotools bash-completion-r1 multilib python-single-r1 systemd vala xdg
238 +
239 +MY_PN="PackageKit"
240 +MY_P=${MY_PN}-${PV}
241 +
242 +DESCRIPTION="Manage packages in a secure way using a cross-distro and cross-architecture API"
243 +HOMEPAGE="http://www.packagekit.org/"
244 +SRC_URI="https://www.freedesktop.org/software/${MY_PN}/releases/${MY_P}.tar.xz"
245 +
246 +LICENSE="GPL-2"
247 +SLOT="0/18"
248 +KEYWORDS="~alpha ~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
249 +IUSE="cron command-not-found elogind +introspection entropy systemd test vala"
250 +REQUIRED_USE="
251 + ${PYTHON_REQUIRED_USE}
252 + ?? ( elogind systemd )
253 + vala? ( introspection )
254 +"
255 +
256 +# While not strictly needed, consolekit is the alternative to systemd-login
257 +# or elogind to get current session's user.
258 +COMMON_DEPEND="
259 + >=app-shells/bash-completion-2
260 + dev-db/sqlite:3
261 + >=dev-libs/dbus-glib-0.74
262 + >=dev-libs/glib-2.46.0:2[${PYTHON_USEDEP}]
263 + >=sys-auth/polkit-0.98
264 + >=sys-apps/dbus-1.3.0
265 + ${PYTHON_DEPS}
266 + elogind? ( >=sys-auth/elogind-229.4 )
267 + introspection? ( >=dev-libs/gobject-introspection-0.9.9:= )
268 + systemd? ( >=sys-apps/systemd-204 )
269 +"
270 +# vala-common needed for eautoreconf
271 +DEPEND="${COMMON_DEPEND}
272 + >=dev-cpp/glibmm-2.4
273 + dev-libs/libxslt[${PYTHON_USEDEP}]
274 + dev-libs/vala-common
275 + >=dev-util/gtk-doc-am-1.11
276 + >=dev-util/intltool-0.35.0
277 + sys-devel/gettext
278 + virtual/pkgconfig
279 + vala? ( $(vala_depend) )
280 +"
281 +RDEPEND="${COMMON_DEPEND}
282 + >=app-portage/layman-2[${PYTHON_USEDEP}]
283 + >=sys-apps/portage-2.2[${PYTHON_USEDEP}]
284 + entropy? ( >=sys-apps/entropy-234[${PYTHON_USEDEP}] )
285 + !systemd? ( !elogind? ( sys-auth/consolekit ) )
286 +"
287 +
288 +PATCHES=(
289 + # Fixes QA Notices:
290 + # - https://github.com/gentoo/gentoo/pull/1760
291 + # - https://github.com/hughsie/PackageKit/issues/143
292 + "${FILESDIR}"/${PN}-1.1.1-cache-qafix.patch
293 +
294 + # Adds elogind support:
295 + # - https://bugs.gentoo.org/show_bug.cgi?id=620948
296 + "${FILESDIR}"/${P}-elogind-support.patch
297 +)
298 +
299 +S="${WORKDIR}/${MY_P}"
300 +
301 +src_prepare() {
302 + # Disable unittests not working with portage backend
303 + # console: requires terminal input
304 + sed -e 's:^\(.*/packagekit-glib2/control\)://\1:' \
305 + -e 's:^\(.*/packagekit-glib2/transaction-list\)://\1:' \
306 + -e 's:^\(.*/packagekit-glib2/client"\)://\1:' \
307 + -e 's:^\(.*/packagekit-glib2/package-sack\)://\1:' \
308 + -e 's:^\(.*/packagekit-glib2/task\)://\1:' \
309 + -e 's:^\(.*/packagekit-glib2/console\)://\1:' \
310 + -i lib/packagekit-glib2/pk-test-daemon.c || die
311 + sed -e 's:^\(.*/packagekit/spawn\)://\1:' \
312 + -e 's:^\(.*/packagekit/transaction-db\)://\1:' \
313 + -e 's:^\(.*/packagekit/backend\)://\1:' \
314 + -i src/pk-self-test.c || die
315 +
316 + eapply_user
317 + use vala && vala_src_prepare
318 + xdg_src_prepare
319 +
320 + # Needed by elogind patch:
321 + eautoreconf
322 +}
323 +
324 +src_configure() {
325 + econf \
326 + --disable-gstreamer-plugin \
327 + --disable-gtk-doc \
328 + --disable-gtk-module \
329 + --disable-schemas-compile \
330 + --disable-static \
331 + --enable-bash-completion \
332 + --enable-man-pages \
333 + --enable-nls \
334 + --enable-portage \
335 + --localstatedir=/var \
336 + $(use_enable command-not-found) \
337 + $(use_enable cron) \
338 + $(use_enable elogind) \
339 + $(use_enable entropy) \
340 + $(use_enable introspection) \
341 + $(use_enable systemd) \
342 + $(use_enable test daemon-tests) \
343 + $(use_enable test local) \
344 + $(use_enable vala) \
345 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
346 +}
347 +
348 +src_install() {
349 + emake DESTDIR="${D}" install
350 + prune_libtool_files --all
351 +
352 + dodoc AUTHORS ChangeLog MAINTAINERS NEWS README
353 +}