syncpackage: fails with JSON error in chroot

Bug #1042754 reported by Martin-Éric Racine
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python Keyring
Fix Released
Undecided
Unassigned
python-keyring (Ubuntu)
Fix Released
Undecided
Marc Deslauriers
Oneiric
Fix Released
Undecided
Marc Deslauriers
Precise
Fix Released
Undecided
Marc Deslauriers
Quantal
Fix Released
Undecided
Marc Deslauriers
Raring
Fix Released
Undecided
Marc Deslauriers

Bug Description

$ syncpackage cups-pdf
Traceback (most recent call last):
  File "/usr/bin/syncpackage", line 750, in <module>
    main()
  File "/usr/bin/syncpackage", line 650, in main
    Launchpad.login(**kwargs)
  File "/usr/lib/python2.7/dist-packages/ubuntutools/lp/lpapicache.py", line 66, in login
    version=api_version)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 539, in login_with
    credential_save_failed, version)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 342, in _authorize_token_and_login
    authorization_engine.unique_consumer_id)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/credentials.py", line 282, in load
    return self.do_load(unique_key)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/credentials.py", line 336, in do_load
    'launchpadlib', unique_key)
  File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 37, in get_password
    return _keyring_backend.get_password(service_name, username)
  File "/usr/lib/python2.7/dist-packages/keyring/backend.py", line 375, in get_password
    password = self.decrypt(password_encrypted).decode('utf-8')
  File "/usr/lib/python2.7/dist-packages/keyring/backend.py", line 549, in decrypt
    data = json.loads(password_encrypted)
  File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: ubuntu-dev-tools 0.143
Uname: Linux 3.2.0-3-686-pae i686
NonfreeKernelModules: cpufreq_stats cpufreq_conservative cpufreq_powersave cpufreq_userspace parport_pc ppdev lp parport bnep rfcomm bluetooth binfmt_misc uinput ecryptfs dm_crypt dm_mod snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_hwdep arc4 snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq iwl4965 iwl_legacy snd_seq_device snd_timer snd joydev mac80211 cfg80211 soundcore acpi_cpufreq iTCO_wdt iTCO_vendor_support mperf i2c_i801 pcmcia rng_core yenta_socket pcmcia_rsrc coretemp dell_wmi sparse_keymap pcmcia_core psmouse processor battery ac evdev serio_raw ext4 crc16 jbd2 mbcache btrfs crc32c libcrc32c zlib_deflate usbhid hid sg sd_mod crc_t10dif dell_laptop rfkill power_supply ata_generic dcdbas i915 ata_piix libata sdhci_pci sdhci firewire_ohci scsi_mod i2c_algo_bit drm_kms_helper drm uhci_hcd ehci_hcd firewire_core crc_itu_t mmc_core tg3 libphy video thermal wmi button usbcore i2c_core thermal_sys usb_common
ApportVersion: 2.5.1-0ubuntu2
Architecture: i386
Date: Tue Aug 28 16:53:01 2012
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=fi_FI:en
 TERM=xterm
 PATH=(custom, user)
 LANG=fi_FI.UTF-8
 SHELL=/bin/bash
SourcePackage: ubuntu-dev-tools
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Martin-Éric Racine (q-funk) wrote :
Revision history for this message
Stefano Rivera (stefanor) wrote :

Sounds like you need to delete and recreate the credential file.

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Could it be a good idea for the package's README or man pages to explain how?

Revision history for this message
Stefano Rivera (stefanor) wrote :

Which package? This was a change in python-keyring, and your bug is failed against ubuntu-dev-tools.

Looking at the source, it should have manually migrated your keyring:

https://bitbucket.org/kang/python-keyring-lib/src/6e6fa0815446/keyring/backend.py#cl-548

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Yes, because syncpackage is what fails. If you think that the cause is somewhere else, just reassign it to the right package.

affects: ubuntu-dev-tools (Ubuntu) → python-keyring (Ubuntu)
Changed in python-keyring (Ubuntu Oneiric):
assignee: nobody → Marc Deslauriers (mdeslaur)
Changed in python-keyring (Ubuntu Precise):
assignee: nobody → Marc Deslauriers (mdeslaur)
Changed in python-keyring (Ubuntu Quantal):
assignee: nobody → Marc Deslauriers (mdeslaur)
Changed in python-keyring (Ubuntu Raring):
assignee: nobody → Marc Deslauriers (mdeslaur)
Changed in python-keyring (Ubuntu Oneiric):
status: New → Confirmed
Changed in python-keyring (Ubuntu Precise):
status: New → Confirmed
Changed in python-keyring (Ubuntu Quantal):
status: New → Confirmed
Changed in python-keyring (Ubuntu Raring):
status: New → Confirmed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-keyring - 0.9.2-1ubuntu1

---------------
python-keyring (0.9.2-1ubuntu1) raring; urgency=low

  * SECURITY UPDATE: insecure default file permissions (LP: #1031465)
    - debian/patches/file_permissions.patch: set appropriate file
      permissions on database file.
    - CVE number pending
  * debian/patches/fix_migration.patch: fix migration code so old databases
    get upgraded when a key is read. (LP: #1042754)
  * debian/patches/fix_unlock.patch: fix unlocking an existing keyring.
 -- Marc Deslauriers <email address hidden> Mon, 19 Nov 2012 09:40:11 -0500

Changed in python-keyring (Ubuntu Raring):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-keyring - 0.9.2-0ubuntu0.12.04.2

---------------
python-keyring (0.9.2-0ubuntu0.12.04.2) precise-security; urgency=low

  * SECURITY UPDATE: CryptedFileKeyring format is insecure (LP: #1004845)
    - Rebuild python-keyring 0.9.2 from Ubuntu 12.10 as a security update
      for Ubuntu 12.04.
    - debian/patches/crypto_compat.patch: include PBKDF2() directly to be
      compatible with the older version of python-crypto in Ubuntu 12.04.
    - CVE-2012-4571
  * SECURITY UPDATE: insecure default file permissions (LP: #1031465)
    - debian/patches/file_permissions.patch: set appropriate permissions on
      database directory.
    - CVE number pending
  * debian/patches/fix_migration.patch: fix migration code so old
    databases get upgraded when a key is read. (LP: #1042754)
  * debian/patches/fix_unlock.patch: fix unlocking an existing keyring.
 -- Marc Deslauriers <email address hidden> Mon, 19 Nov 2012 12:50:49 -0500

Changed in python-keyring (Ubuntu Precise):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-keyring - 0.9.2-1ubuntu0.2

---------------
python-keyring (0.9.2-1ubuntu0.2) quantal-security; urgency=low

  * SECURITY UPDATE: insecure default file permissions (LP: #1031465)
    - debian/patches/file_permissions.patch: set appropriate permissions on
      database directory.
    - CVE number pending
  * debian/patches/fix_migration.patch: fix migration code so old databases
    get upgraded when a key is read. (LP: #1042754)
  * debian/patches/fix_unlock.patch: fix unlocking an existing keyring.
 -- Marc Deslauriers <email address hidden> Mon, 19 Nov 2012 11:41:19 -0500

Changed in python-keyring (Ubuntu Quantal):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-keyring - 0.9.2-0ubuntu0.11.10.2

---------------
python-keyring (0.9.2-0ubuntu0.11.10.2) oneiric-security; urgency=low

  * SECURITY UPDATE: CryptedFileKeyring format is insecure (LP: #1004845)
    - Rebuild python-keyring 0.9.2 from Ubuntu 12.10 as a security update
      for Ubuntu 11.10.
    - debian/patches/crypto_compat.patch: include PBKDF2() directly to be
      compatible with the older version of python-crypto in Ubuntu 11.10.
    - debian/control, debian/rules, debian/*install: get rid of
      python3-keyring binary package as it didn't ship in Ubuntu 11.10.
    - CVE-2012-4571
  * SECURITY UPDATE: insecure default file permissions (LP: #1031465)
    - debian/patches/file_permissions.patch: set appropriate permissions on
      database directory.
    - CVE number pending
  * debian/patches/fix_migration.patch: fix migration code so old
    databases get upgraded when a key is read. (LP: #1042754)
  * debian/patches/fix_unlock.patch: fix unlocking an existing keyring.
 -- Marc Deslauriers <email address hidden> Mon, 19 Nov 2012 12:54:34 -0500

Changed in python-keyring (Ubuntu Oneiric):
status: Confirmed → Fix Released
Revision history for this message
Jason R. Coombs (jaraco) wrote :

I've applied the contributed patch and re-released keyring as 0.9.3 (also 0.10.1).

Changed in python-keyring:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.