Skip to content

Version numbering not monotonic? #128

Description

@gonzoleeman

Hi:

I maintain openlldp for SUSE, and I have a small version numbering problem. I was hoping it would be easy for you to fix.

I recently updated our distro's version of openlldp. We use the "branch-1.1" branch. The version there went from 1.1 to 1.1.1. Here's some of the changelog:

81411a85f9c4 (HEAD -> branch-1.1, origin/branch-1.1) fix lldpad netlink heap access overrun
dc4da3c694c2 Protect uses of select() from crash on too many file descriptors
f1dd9eb961fa (tag: v1.1.1) Release 1.1.1 branch
54a5041de398 lldpad: dcbx: prevent null dereference in dcbx_free_data
4d81b69fb1b4 dcbx: Fix use-after-free                                                                    <=== previous release
fb0e4f787a8c dcbx: Fix NULL pointer dereference
9ab568336bf6 dcbx: Fix leak when receiving legacy TLVs with mismatched mode
44006ebedf79 lldp: Reject frames with duplicate TLVs
55b5f7e15d55 dcbx: Free manifest in rchange callback
38af0df1a5dd dcbx: Avoid memory leak if ifup is called twice
554dda8033f6 ctrl_iface: Fix a memory leak in ctrl_iface_deinit
d37d1420c2f8 lldp: Avoid sending uninitialized data
8b903f5f95a5 lldptool: fix null pointer deference
796585335619 Revert "Use interface index instead of name in libconfig"
2a352d36e2ec Avoiding null pointer dereference
fae175635442 agent: reset frame status on message delete
f1488bbb0991 basman: use return address when pulling address
bcb3ef5ab848 8021Qaz: check for rx block validity
ff70e2edbf79 8021qaz: squelch initialization errors
cf7e43786749 macvtap: fix error condition
cadb2e55d3a7 vdp22: convert command parsing to null term
4c75fa274230 tx: rename variable
3e509921f642 tx: when operating in rx-only mode don't send a port shutdown pdu
3ac7ce9b8284 Merge pull request #70 from gonzoleeman/fix-rcvbuf-issue-v2
a6b182aa3b4d event_iface: only set rcv buf size if too small
85e55837a81d (tag: v1.1) vdp22: manpage typo

The problem is perhaps how the tarballs for each case are created. We use a system that is:

<BaseVersion>+<CommitsSinceBaseVersion>

So the old tarball was numbered 1.1+22, since it was 22 commits past version 1.1.

The new version was number 1.1.1+2, since it was 2 commits past version 1.1.1, and 4 commits newer than the previous tarball.

The problem is that the RPM command (and our "zypper" command, used for package management on SLE), both use the same dumb logic. They compare tuple against tuple:

zypper and rpm code thinks old version is newer:

old        new
---        ---
1          1
1          1
22         1             <== here's the problem
-          2

Long story short, going from 2-digit version numbers to 3-digit can cause semantic issues like this.

I believe a good solution might be to tag the HEAD as version 1.2.1. Would this be possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions