Opened 14 years ago

Last modified 13 years ago

#152 new task

Sync Perl module patches for Jabber with upstream

Reported by: Owned by:
Priority: minor Milestone:
Component: jabber Keywords:


See PerlModulePatches for a current list of our patches to XML::Stream, Net::XMPP, and Net::Jabber, and their upstream status. We should file bugs for the patches that aren’t upstream, and we should merge the newer upstream versions of XML::Stream and Net::XMPP.

Change History (5)

comment:1 Changed 14 years ago by

  • Cc added

I've cataloged most/all of the changes from between the barnowl versions and the upstream versions (see I'll start with the Net::Jabber ones, because it's the shortest:

The differences from the upstream version to be merged into the barnowl version (see are all either spacing changes or changes from Obj->new(...) to new Obj().

There's a single patch for submission upstream (though the upstream development seems to be dead), made by nelhage (see

comment:2 Changed 14 years ago by

For XMPP::Stream, I split the changes from the barnowl version to the newest upstream version into three categories.

The first category is composed of minor changes, such as documentation, licence, spelling, spacing, etc. (

The second category ( of minor changes:

  • A work-around for windows that, while unnecessary for linux/mac barnowl, shouldn't break anything
  • A change that uses $self->{SIDS}->{$sid}->{to} in place of $self->{SIDS}->{$sid}->{hostname} when available -- it seems to me like this shouldn't break anything (given that the developers thought that this should be used in preference to $self->{SIDS}->{$sid}->{hostname}, and fall back on that), but I'm not completely sure
  • a change of $self->get_cdata() to $child->children() -- I'm not sure what this does or why this changed. I don't think it breaks anything, but I haven't checked.

The last category ( contains only one change, which adds some new things and removes some barnowl things (see commit by asedeno, I'm not sure if it fixed the problem that commit was intended to fix. I'm not sure how to test thisIf it doesn't, we should submit a patch upstream.

comment:3 in reply to: ↑ description Changed 14 years ago by

The last comment should say Net::Stream, not XMPP::Stream.

Net:XMPP had the largest number of changes (pulling from upstream version 1.02), so I broke it up into five commits.

  • There were a large number of minor refactorings (e.g., changes of Log5 to Log1, moving the location of the init code to a different method in the same file, adding a few minor functions, defining a bunch of debug variables, commenting out a line in an an if statement (this one should be checked to make sure it doesn't break anything)). The second commit consists of these changes (see
  • The third commit consists of a bunch of changes of UNIVERSAL::isa($jid,...) to $jid->isa(...), and one more significant change that seems to remove a for loop. I'm not sure if removing the for loop does bad things with references; this should be checked, and, if it breaks things, a patch should be submitted upstream. I'm not sure what UNIVERSAL::* is, but I'm guessing that this is just convention. (see

comment:4 Changed 14 years ago by

It looks like you are treating this problem as “pick the right changes from the upstream version to merge into our version”?

This is backwards. We are downstream and they are upstream, so we need to figure out which of _our_ changes to apply to their version.

That’s what I started to figure out at PerlModulePatches, which I linked from the original description of this ticket. Let’s finish that process so we can get a cleanly separated stack of patches on top of upstream, instead of producing a single unreviewable commit on top of the current patched version (which will make things suck for us next time we want to merge a new upstream version).

(In general, two-way merges do not work; you cannot compare patched version A of some software to patched version B, and expect to figure out how to combine them into patched version A+B. You need to do a three-way merge, based on patched version A, patched version B, _and_ the unpatched version that they both descended from.

For example, if you look carefully at the ancestry of the two print statements you mentioned in your last commit, you notice that they were not added by upstream, but rather removed by us. But your methodology provides no way to distinguish those situations.)

As you can see on PerlModulePatches, many of the changes we need were upstreamed in the current development versions of the modules, so we should maybe start with the latest development releases instead of the latest stable releases. The development releases also support SSL CA verification (#139).

comment:5 Changed 13 years ago by

  • Priority changed from major to minor

This will no longer be relevant to BarnOwl when davidben finishes his AnyEvent::XMPP branch.

Note: See TracTickets for help on using tickets.