Your message dated Mon, 22 Apr 2013 18:18:06 +0000
with message-id <[email protected]>
and subject line Bug#705797: fixed in packagekit 0.8.7-2
has caused the Debian Bug report #705797,
regarding [packagekit] Re: RFH: Port packagekit to !linux
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
705797: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=705797
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: packagekit
Version: 0.8.7-1
Severity: important
Tags: patch
User: [email protected]
Usertags: kfreebsd


On Thu, 18 Apr 2013, Matthias Klumpp wrote:
PackageKit in it's newest version doesn't build on !linux
architectures, due to Linux specific functions, and I don't have the
knowledge to make it work on !linux.

There are two problematic parts.

The first one is a try to auto-kill a spawned agent process,
when the master process suddenly dies. In normal case,
it is signaled from master.
There is no counter part functionality on (k)FreeBSD.

The second one is wait for agent process finish.
The packagekit code uses unnecessary complex function to achieve it.
The simple waitpid() suffices everywhere.

The patch is attached.

Petr
--- packagekit-0.8.7.orig/lib/packagekit-glib2/pk-spawn-polkit-agent.c
+++ packagekit-0.8.7/lib/packagekit-glib2/pk-spawn-polkit-agent.c
@@ -21,7 +21,9 @@
 
 #include <stdio.h>
 #include <sys/types.h>
+#ifdef __linux__
 #include <sys/prctl.h>
+#endif
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
@@ -68,13 +70,14 @@ fork_agent (pid_t *pid, const char *path
 		*pid = n_agent_pid;
 		return 0;
 	}
+#ifdef __linux__
 
 	/* In the child:
 	 *
 	 * Make sure the agent goes away when the parent dies */
 	if (prctl (PR_SET_PDEATHSIG, SIGTERM) < 0)
 		_exit (EXIT_FAILURE);
-
+#endif
 	/* Check whether our parent died before we were able
 	 * to set the death signal */
 	if (getppid () != parent_pid)
@@ -175,22 +178,16 @@ fd_wait_for_event (int fd, int event, ui
 }
 
 static int
-wait_for_terminate (pid_t pid, siginfo_t *status) {
-	siginfo_t dummy;
-
+wait_for_terminate (pid_t pid) {
+        int status;
 	g_assert (pid >= 1);
 
-	if (!status)
-		status = &dummy;
-
 	for (;;) {
-		zero(*status);
-		if (waitid(P_PID, pid, status, WEXITED) < 0) {
+		if (waitpid(pid, &status, 0) < 0) {
 			if (errno == EINTR)
 				continue;
 			return -errno;
 		}
-
 		return 0;
 	}
 }
@@ -242,6 +239,6 @@ pk_polkit_agent_close (void) {
 	/* Inform agent that we are done */
 	kill (agent_pid, SIGTERM);
 	kill (agent_pid, SIGCONT);
-	wait_for_terminate (agent_pid, NULL);
+	wait_for_terminate (agent_pid);
 	agent_pid = 0;
 }

--- End Message ---
--- Begin Message ---
Source: packagekit
Source-Version: 0.8.7-2

We believe that the bug you reported is fixed in the latest version of
packagekit, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthias Klumpp <[email protected]> (supplier of updated packagekit package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 22 Apr 2013 18:18:08 +0200
Source: packagekit
Binary: packagekit packagekit-tools packagekit-docs libpackagekit-glib2-16 
libpackagekit-glib2-dev gir1.2-packagekitglib-1.0 packagekit-gtk3-module 
gstreamer0.10-packagekit browser-plugin-packagekit python3-packagekit 
packagekit-backend-aptcc packagekit-backend-smart packagekit-dbg
Architecture: source amd64 all
Version: 0.8.7-2
Distribution: experimental
Urgency: low
Maintainer: Matthias Klumpp <[email protected]>
Changed-By: Matthias Klumpp <[email protected]>
Description: 
 browser-plugin-packagekit - Plugin to install missing plugins using PackageKit
 gir1.2-packagekitglib-1.0 - GObject introspection data for the PackageKit GLib 
library
 gstreamer0.10-packagekit - GStreamer plugin to install codecs using PackageKit
 libpackagekit-glib2-16 - Library for accessing PackageKit using GLib
 libpackagekit-glib2-dev - Library for accessing PackageKit using GLib 
(development files)
 packagekit - Provides a package management service
 packagekit-backend-aptcc - APT backend for PackageKit
 packagekit-backend-smart - Smart backend for PackageKit
 packagekit-dbg - Debugging symbols for PackageKit
 packagekit-docs - Documentation for PackageKit
 packagekit-gtk3-module - Install fonts automatically using PackageKit
 packagekit-tools - Provides PackageKit command-line tools
 python3-packagekit - PackageKit backend Python bindings
Closes: 705797
Changes: 
 packagekit (0.8.7-2) experimental; urgency=low
 .
   * Make PackageKit compile on non-Linux platforms (Closes: #705797)
     - Thanks to Petr Salinger for the patch!
Checksums-Sha1: 
 6288a0fff3fa7f309442544b9c3acc3933269989 3302 packagekit_0.8.7-2.dsc
 11cc27872ba11ba0aac7c893ec47b0b244393114 19466 packagekit_0.8.7-2.debian.tar.gz
 e9816bd027d4365da7bce5a881303c5800859864 779562 packagekit_0.8.7-2_amd64.deb
 05dc8522f3c7e921f07fd4b4f5e48b4fcf307482 74178 
packagekit-tools_0.8.7-2_amd64.deb
 f843c2c7a6929636eb99013d36866cb69fb058f5 480584 packagekit-docs_0.8.7-2_all.deb
 16e9a43ff3c71a9e8fb64119c12c36d96006ec4c 141022 
libpackagekit-glib2-16_0.8.7-2_amd64.deb
 bafaccec669ac4a31b6fc877dbd70dd9eff9c667 86946 
libpackagekit-glib2-dev_0.8.7-2_amd64.deb
 d36eac9605891055e243420dda56398cb3a99461 46052 
gir1.2-packagekitglib-1.0_0.8.7-2_amd64.deb
 d1887a75d00612deda5975a6f113ff09f8a671c3 20222 
packagekit-gtk3-module_0.8.7-2_amd64.deb
 b18ac4ec387c0cdbb0103eae505323e457694b01 19950 
gstreamer0.10-packagekit_0.8.7-2_amd64.deb
 781dda22147abc3b2ae28c27e7cddaba37f53395 34518 
browser-plugin-packagekit_0.8.7-2_amd64.deb
 8f8f394fcc2653340306843774ecf0b5ce120e18 29194 
python3-packagekit_0.8.7-2_all.deb
 ffa19ff64d550e9558fb961b3b1790cd1d8aec94 124626 
packagekit-backend-aptcc_0.8.7-2_amd64.deb
 7ede06aa210b65d59ed51dbe09244e0a6be66c74 28474 
packagekit-backend-smart_0.8.7-2_amd64.deb
 90dbe0fd825114d917b473c84ef1022082a8075c 1830548 
packagekit-dbg_0.8.7-2_amd64.deb
Checksums-Sha256: 
 ba1f9908dbeff498ddd6dea776b31ba68c989449a1724a372663b0c509097416 3302 
packagekit_0.8.7-2.dsc
 efe8c27ac4bb1ece22bd52a6ece67adeebaa1dcdff57bc3df254bfa5fc00daab 19466 
packagekit_0.8.7-2.debian.tar.gz
 fb7c22b6896a102577934d05cea8c3c39a80ec97d6535effe031b4beb01db601 779562 
packagekit_0.8.7-2_amd64.deb
 b260909ccd526c1a5951aa5825422b191e45d172cfde05c00907e417c7156d50 74178 
packagekit-tools_0.8.7-2_amd64.deb
 ab0bb5d2736cbb7f5d534c37473e11201c94b72b76022e4ce405bd74ddff5462 480584 
packagekit-docs_0.8.7-2_all.deb
 1b3258ec5d5affe1e9f7049ce636596643f54502d98ec58fe449c18d25303fa1 141022 
libpackagekit-glib2-16_0.8.7-2_amd64.deb
 7ba11a710e1d6338d285a9296ed67fe634d22518f35289eb79ded8bb48899374 86946 
libpackagekit-glib2-dev_0.8.7-2_amd64.deb
 9d93bde5c4009d1f668583199c6bca6c47c26f5302fe4cd932e9d115e3cf93d3 46052 
gir1.2-packagekitglib-1.0_0.8.7-2_amd64.deb
 e4dc6168925175816e6f04920b46a336278f74ba6aa2188a6aeb88a9d8f588cc 20222 
packagekit-gtk3-module_0.8.7-2_amd64.deb
 b6daba20dfc6387ecd60885ed87cfd585c2739e066ac235386e0de3dc2ad7de7 19950 
gstreamer0.10-packagekit_0.8.7-2_amd64.deb
 5b8c4e4c05b02509fda3d96c7804c844757a2faf5d896ca527bd5fce873d82f1 34518 
browser-plugin-packagekit_0.8.7-2_amd64.deb
 783c6033e9aa715893ec2f1f97049baf57f04e71f8d6b49f2594d7f90e60b46f 29194 
python3-packagekit_0.8.7-2_all.deb
 aebdc8ac086d33ad0bdf9df681120506daf63db78588284fd7401c25903f88df 124626 
packagekit-backend-aptcc_0.8.7-2_amd64.deb
 aa98204fe9c693a56c7548c82682bd715596995f6ee5953fb104fe7c938a7887 28474 
packagekit-backend-smart_0.8.7-2_amd64.deb
 55cfa6de15cd1df4149366e29687bbb89704694992801e3f7029be37a6b09f8d 1830548 
packagekit-dbg_0.8.7-2_amd64.deb
Files: 
 44fd4051ff7ad5788d5cc2ea5908c590 3302 admin optional packagekit_0.8.7-2.dsc
 fb840c0750f1eb68a0ba48750e979c22 19466 admin optional 
packagekit_0.8.7-2.debian.tar.gz
 62c548b0a0830f956e200ab64b6a614f 779562 admin optional 
packagekit_0.8.7-2_amd64.deb
 7a66194aba59c7eae3be4231570dab9e 74178 libs optional 
packagekit-tools_0.8.7-2_amd64.deb
 27a678cbb1ebd07d183a32a79551c199 480584 doc optional 
packagekit-docs_0.8.7-2_all.deb
 64147521b88c852a20b1ff27a0071fe6 141022 libs optional 
libpackagekit-glib2-16_0.8.7-2_amd64.deb
 92704a3dbde58c577de445d1a4c378a3 86946 libdevel optional 
libpackagekit-glib2-dev_0.8.7-2_amd64.deb
 08e0526d126d42cf7cb16a73c2191553 46052 introspection optional 
gir1.2-packagekitglib-1.0_0.8.7-2_amd64.deb
 7451c575bead2a8a6107b419b7e42406 20222 libs optional 
packagekit-gtk3-module_0.8.7-2_amd64.deb
 63703300f5e66184ab8063357bfdceae 19950 libs optional 
gstreamer0.10-packagekit_0.8.7-2_amd64.deb
 3aa10cc650324bcce425e49656c90710 34518 web optional 
browser-plugin-packagekit_0.8.7-2_amd64.deb
 0ba099b29a1e1c780f62a5bdb10079a9 29194 python optional 
python3-packagekit_0.8.7-2_all.deb
 90c789b56e0e9f24bac89677acd331a2 124626 admin optional 
packagekit-backend-aptcc_0.8.7-2_amd64.deb
 9870d7292ef68cf87cebe1e2f1095bd4 28474 admin optional 
packagekit-backend-smart_0.8.7-2_amd64.deb
 86450d35a26ccbe40d8fd3c61ce8bbb7 1830548 debug extra 
packagekit-dbg_0.8.7-2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBAgAGBQJRdXeeAAoJEElMil+/TezrCGUP/ReM+gjbUh25gvCyKrvscNNK
67s37gyZVMHThKtpnPb60Ak5LaLFkyid8ucIffqVhV7nqi5KiyWAWR2MoN5/+jwP
lBLnMqX5dbvOh3p2gKODfHgF18VUW+y+aoHCSUu3fkyePqHiqVY7klO3pRzU+ZSP
a/80UT+gXTeI7OTbtc2JjWyXks0yuMZufgfb2pnw5uaSxu8cC1ArKBAdlnDRANJi
jEnLFoi3RRtCMmBSiGBwT6azcjbNGgsUF9g1QiMXFQLHCZRD9Q+I8//Pdn3AUgyz
NrFaxavQM9AbDnNSt31evAZtd8JHMrl7qGkEaq5jJWYcoQnfWDukDMzEYwEYkL98
ksn6tWx0V+FGzrn2APDg/7zRyzIVmvIgsEnMLb0lANodxvGJnJovMHkq9GIdJ0XY
ofYjbxhMmkXyR8LAjrwuW2ebeMeo/b6E96JVtDPazfd+aIv5Q+PAJsW9RF6BBG1o
v7enRowUGkB4XIZZta0l9CX2PlDEphaxccpSrOXJgTCWgon/j/EOTaEb70btpVIg
IBlQ/7x1lfFf3oOpkIOj3Uun1hfyLRWG1nSo0uujbpR6iwuEZeH8/mjClIgBgdn4
HghLxgXbHlY8ZYulJgpiAGCcXf8TwtmUeJzMTiMK7nF/fXKBXZzEh9mS0ub1TxDd
Y7750fkv4r66ZVJxxb2y
=oorZ
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to