FS#27925 - [packagekit] Support for proxy

Attached to Project: Community Packages
Opened by Daniel Apolinario (dapolinario) - Friday, 13 January 2012, 11:46 GMT
Last edited by Jonathan Conder (PirateJonno) - Monday, 26 November 2012, 01:40 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Jonathan Conder (PirateJonno)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: PackageKit does not support proxy. Please add the patch you sent me earlier.

Additional info:
* package version(s): packagekit 0.6.19-4
This task depends upon

Closed by  Jonathan Conder (PirateJonno)
Monday, 26 November 2012, 01:40 GMT
Reason for closing:  Fixed
Additional comments about closing:  The comment section has drifted off-topic. If you're still having trouble, open a new bug. I can't guarantee I'll have time to fix anything though.
Comment by Daniel Apolinario (dapolinario) - Friday, 13 January 2012, 11:50 GMT
Attached to the output from /usr/lib/PackageKit/packagekitd.
Comment by Daniel Apolinario (dapolinario) - Wednesday, 18 January 2012, 11:33 GMT
PackageKit is not working with the proxy. I configured the the file /etc/PackageKit/PackageKit.conf and NetworkManager. With that patch applied to the previous version, it worked, now it does not.
Comment by Jonathan Conder (PirateJonno) - Wednesday, 18 January 2012, 19:01 GMT
have you tried the latest version? it should be patched by default
Comment by Daniel Apolinario (dapolinario) - Wednesday, 18 January 2012, 19:31 GMT
PackageKit 0.6.21-1 is not working with the proxy. I configured the the file /etc/PackageKit/PackageKit.conf and NetworkManager. What would be the correct way?
Comment by Jonathan Conder (PirateJonno) - Thursday, 19 January 2012, 02:43 GMT
Ok. Try replacing the current patch with this one (using ABS). If it works for you I'll change the package too
Comment by Daniel Apolinario (dapolinario) - Thursday, 19 January 2012, 09:23 GMT
The patch did not work.
The output was:

danielr ~ $ sudo /usr/lib/PackageKit/packagekitd
Failed to load any of the specified backends:: alpm
Comment by Jonathan Conder (PirateJonno) - Saturday, 21 January 2012, 04:32 GMT
Sorry, that was a typo. Change "pk_backend_initialize_environment" on line 232 of the patch to "pk_backend_configure_environment."
Comment by Daniel Apolinario (dapolinario) - Monday, 23 January 2012, 10:02 GMT
It worked! Thank you!
Now another problem (I do not know if I have to open another ticket), but how do I disable signature verification?
Comment by Jonathan Conder (PirateJonno) - Monday, 23 January 2012, 10:16 GMT
That is another bug which I have fixed but not packaged up yet. See the first patch I linked at https://bugs.archlinux.org/task/28052
Comment by Jonathan Conder (PirateJonno) - Tuesday, 24 January 2012, 02:05 GMT
Should be fixed in packagekit 0.6.21-2
Comment by Daniel Apolinario (dapolinario) - Tuesday, 24 January 2012, 09:17 GMT
dmesg and / var / log / messages.log returned after an upgrade package:

Jan 24 07:13:36 localhost kernel: [ 533.646508] packagekitd[3202]: segfault at 41ed ip b71fb824 sp b59feb80 error 4 in libc-2.15.so[b71b8000+19c000]
Comment by Jonathan Conder (PirateJonno) - Tuesday, 24 January 2012, 09:24 GMT
sorry, that isn't enough information for me to work on. if you can reproduce it can you run
# gdb /usr/lib/PackageKit/packagekitd
(as root, make sure no other instances of packagekitd are running first), then type
run
and do whatever it is that causes the crash. Then type
bt
and send me the output. To quit type
q
Comment by Daniel Apolinario (dapolinario) - Tuesday, 24 January 2012, 09:42 GMT
Output of gdb:

[Thread 0xb5fffb40 (LWP 3737) exited]
[New Thread 0xb5fffb40 (LWP 5763)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5fffb40 (LWP 5763)]
0xb7a2d824 in vfprintf () from /lib/libc.so.6
(gdb) bt
#0 0xb7a2d824 in vfprintf () from /lib/libc.so.6
#1 0xb7ae91f1 in __vasprintf_chk () from /lib/libc.so.6
#2 0xb7c14896 in g_vasprintf () from /usr/lib/libglib-2.0.so.0
#3 0xb7bf20a6 in g_string_append_vprintf () from /usr/lib/libglib-2.0.so.0
#4 0xb7bf21fb in g_string_append_printf () from /usr/lib/libglib-2.0.so.0
#5 0xb6b1df1c in ?? () from /usr/lib/packagekit-backend/libpk_backend_alpm.so
#6 0x0806d62a in ?? ()
#7 0xb7bf6344 in ?? () from /usr/lib/libglib-2.0.so.0
#8 0xb7eebd4c in start_thread () from /lib/libpthread.so.0
#9 0xb7ad303e in clone () from /lib/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further
Comment by Jonathan Conder (PirateJonno) - Tuesday, 24 January 2012, 10:26 GMT
unfortunately that didn't help much. it would be great if you could rebuild packagekit, but change the PKGBUILD in the following ways:
1) add '!strip' to the options array
options=('!libtool' '!strip')
2) put CFLAGS='-g -O0' at the end of make -s (on line 51)
make -s CFLAGS='-g -O0'

then repeat those gdb commands. Thanks.
Also you might want to just run /usr/lib/PackageKit/packagekitd (as root) first and see if it prints out anything unusual. It will keep running in the background afterwards: to kill it safely use the following command:
dbus-send --system --dest=org.freedesktop.PackageKit /org/freedesktop/PackageKit org.freedesktop.PackageKit.SuggestDaemonQuit
Comment by Daniel Apolinario (dapolinario) - Tuesday, 24 January 2012, 10:52 GMT
Output of gdb:

(packagekitd:24195): PackageKit-alpm-DEBUG: call to waitpid succeeded

[Thread 0xb5fffb40 (LWP 24209) exited]
[New Thread 0xb5fffb40 (LWP 26235)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5fffb40 (LWP 26235)]
0xb7a25824 in vfprintf () from /lib/libc.so.6
(gdb) bt
#0 0xb7a25824 in vfprintf () from /lib/libc.so.6
#1 0xb7ae11f1 in __vasprintf_chk () from /lib/libc.so.6
#2 0xb7c0c896 in g_vasprintf () from /usr/lib/libglib-2.0.so.0
#3 0xb7bea0a6 in g_string_append_vprintf () from /usr/lib/libglib-2.0.so.0
#4 0xb7bea1fb in g_string_append_printf () from /usr/lib/libglib-2.0.so.0
#5 0xb6b147c9 in pk_backend_get_files_thread (self=0x80cd800)
at pk-backend-packages.c:348
#6 0x08071012 in pk_backend_thread_setup (thread_data=0x80c8748)
at pk-backend.c:2556
#7 0xb7bee344 in ?? () from /usr/lib/libglib-2.0.so.0
#8 0xb7ee3d4c in start_thread () from /lib/libpthread.so.0
#9 0xb7acb03e in clone () from /lib/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further
Comment by Jonathan Conder (PirateJonno) - Wednesday, 25 January 2012, 02:17 GMT
Hopefully this will fix it for you (apply it after the first alpm.patch).

If not it could be tricky to track down:
what packages in particular were you updating when it happened?
is your computer i686 or x86_64?
Comment by Daniel Apolinario (dapolinario) - Wednesday, 25 January 2012, 09:33 GMT
The patch did not work. The gdb returned:


(packagekitd:28012): PackageKit-alpm-DEBUG: call to waitpid succeeded

[Thread 0xb5fffb40 (LWP 28030) exited]
[New Thread 0xb5fffb40 (LWP 28044)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5fffb40 (LWP 28044)]
0xb7a25824 in vfprintf () from /lib/libc.so.6
(gdb) bt
#0 0xb7a25824 in vfprintf () from /lib/libc.so.6
#1 0xb7ae11f1 in __vasprintf_chk () from /lib/libc.so.6
#2 0xb7c0c896 in g_vasprintf () from /usr/lib/libglib-2.0.so.0
#3 0xb7bea0a6 in g_string_append_vprintf () from /usr/lib/libglib-2.0.so.0
#4 0xb7bea1fb in g_string_append_printf () from /usr/lib/libglib-2.0.so.0
#5 0xb6b147c5 in pk_backend_get_files_thread (self=0x80cd800)
at pk-backend-packages.c:350
#6 0x08071012 in pk_backend_thread_setup (thread_data=0x80cc450)
at pk-backend.c:2556
#7 0xb7bee344 in ?? () from /usr/lib/libglib-2.0.so.0
#8 0xb7ee3d4c in start_thread () from /lib/libpthread.so.0
#9 0xb7acb03e in clone () from /lib/libc.so.6

About the questions:
With any package is the problem.
I have two machines, one i686 and one x86_64, and two in the same problem.
Comment by Jonathan Conder (PirateJonno) - Friday, 27 January 2012, 02:38 GMT
This is really weird. Try this patch instead. Then run /usr/lib/PackageKit/packagekitd (as root) and send me the output (or the last few lines before it crashes at least)
Comment by Daniel Apolinario (dapolinario) - Friday, 27 January 2012, 09:16 GMT
The patch did not work. The packagekitd returned:

(packagekitd:14601): PackageKit-alpm-DEBUG: adding database entry 'devede'
(packagekitd:14601): PackageKit-alpm-DEBUG: writing devede-3.21.0-1 DESC information back to db
(packagekitd:14601): PackageKit-alpm-DEBUG: writing devede-3.21.0-1 FILES information back to db
(packagekitd:14601): PackageKit-alpm-DEBUG: adding entry 'devede' in 'local' cache
(packagekitd:14601): PackageKit-alpm-DEBUG: running ldconfig
(packagekitd:14601): PackageKit-alpm-DEBUG: executing "/sbin/ldconfig" under chroot "/"
(packagekitd:14601): PackageKit-alpm-DEBUG: call to waitpid succeeded
(packagekitd:14601): PackageKit-alpm-WARNING **: package: <libftdi;0.19-1;i686;installed> file: usr/

The dmesg returned:
packagekitd[14638]: segfault at 41ed ip b7135824 sp b56fe6e0 error 4 in libc-2.15.so[b70f2000+19c000]

Comment by Jonathan Conder (PirateJonno) - Saturday, 28 January 2012, 03:07 GMT
It wasn't supposed to work, only to provide me with more information. This one does the same thing, if you could repeat what you did before, but this time just send me the whole output. I take it that it doesn't crash until at least the second package? What happens if you try to update just one package?
Comment by Daniel Apolinario (dapolinario) - Sunday, 29 January 2012, 19:40 GMT
Detailing the process.
The settings for the proxy are correct!

The problem is when I update or install a package.

When I update a package, the warning window that appears warning that the system has been updated does not appear, but the package has been updated. At this time the segmentation fault appears already mentioned.

When I install a package, the buttons are locked and gives segmentation fault mentioned, but when I search the package, it is installed perfectly.
Comment by Jonathan Conder (PirateJonno) - Monday, 30 January 2012, 08:23 GMT
Ok, but what about the output? What happens when there is more than one package?
Comment by Daniel Apolinario (dapolinario) - Monday, 30 January 2012, 08:29 GMT
I tested the package with DeVeDe, there are several packages, and it happens the same way as detailed above.
Comment by Jonathan Conder (PirateJonno) - Monday, 30 January 2012, 08:53 GMT
and the output?
Comment by Daniel Apolinario (dapolinario) - Monday, 30 January 2012, 09:08 GMT
The same output above. The problem is the same for both update and to install packages (one or more).

The dmesg returned:
packagekitd[14638]: segfault at 41ed ip b7135824 sp b56fe6e0 error 4 in libc-2.15.so[b70f2000+19c000]
Comment by Jonathan Conder (PirateJonno) - Monday, 30 January 2012, 10:12 GMT
what I mean is: could you apply the latest alpm2.patch and send me the whole output of running packagekitd as root? (see comment dated Saturday, 28 January 2012, 15:07 GMT+12)
Comment by Daniel Apolinario (dapolinario) - Monday, 30 January 2012, 10:37 GMT
I tried to install the package hunspell-de, hunspell and hunspell-en-es to test more than one package.
Dmesg did not return any segmentation fault.

The gdb returned:

(packagekitd:27784): PackageKit-alpm-DEBUG: call to waitpid succeeded

[Thread 0xb5fffb40 (LWP 29392) exited]
[New Thread 0xb5fffb40 (LWP 29394)]

(packagekitd:27784): PackageKit-alpm-WARNING **: package: <hunspell-de;20110609-1;any;installed> file: /usr/

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5fffb40 (LWP 29394)]
0xb7a24824 in vfprintf () from /lib/libc.so.6
(gdb) bt
#0 0xb7a24824 in vfprintf () from /lib/libc.so.6
#1 0xb7ae01f1 in __vasprintf_chk () from /lib/libc.so.6
#2 0xb7c0b896 in g_vasprintf () from /usr/lib/libglib-2.0.so.0
#3 0xb7be4c13 in g_strdup_vprintf () from /usr/lib/libglib-2.0.so.0
#4 0xb7bceafe in g_logv () from /usr/lib/libglib-2.0.so.0
#5 0xb7bcee93 in g_log () from /usr/lib/libglib-2.0.so.0
#6 0xb6b127d9 in pk_backend_get_files_thread (self=0x80cd800)
at pk-backend-packages.c:350
#7 0x08071012 in pk_backend_thread_setup (thread_data=0x80cd388)
at pk-backend.c:2556
#8 0xb7bed344 in ?? () from /usr/lib/libglib-2.0.so.0
#9 0xb7ee2d4c in start_thread () from /lib/libpthread.so.0
#10 0xb7aca03e in clone () from /lib/libc.so.6
Comment by Jonathan Conder (PirateJonno) - Thursday, 16 February 2012, 01:32 GMT
Sorry for the lack of activity. I hope to have some more time to look into this soon. In the meantime I think I may have fixed the progress bar issue on i686. See https://bbs.archlinux.org/viewtopic.php?pid=1058476#p1058476 for details.

Loading...