ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Getting values into version_extra, VCSVERSION and VCSBRANCH

From: Richard Sharpe <realrichardsharpe@xxxxxxxxx>
Date: Tue, 10 Jan 2017 21:16:02 -0800
On Tue, Jan 10, 2017 at 5:44 PM, Jeff Morriss <jeff.morriss.ws@xxxxxxxxx> wrote:
> On 01/10/2017 07:53 PM, Richard Sharpe wrote:
>>
>> Now that my dissector generator is working well enough to handle the
>> vagaries of the ten or so XDR files we have I am working on getting
>> RPMs generated.
>>
>> I want the version info returned by get_ws_vcs_version_info to:
>>
>> 1. Return some additional info in the version string, like
>> 2.3.0-SOMEHASH where SOMEHASH is, say, the MD5 sum of all the XDR
>> files used.
>>
>> 2. The git hash and branch
>>
>> However, I would like this all to happen in the SPEC file that is used
>> to build RPMs.
>>
>> Has anyone done that?
>
>
> No but do you want the RPM version to also reflect that version information?
>
> If so you'd have to update the version information in `configure.ac` before
> generating the RPM (if you use our SPEC file and build process). To do that
> you'd want to update `version_extra` before running autogen.sh.

At the moment I am using sed to do that, but hadn't realized that it
would affect the RPM name as well. The hash I am using is going to
make the RPM names look ugly.

I wanted something that involves no modifications to the main
wireshark sources so that upstream changes are easy to pull in, and
what I have now is a single additional shell script that should not
collide with anything in Wireshark.

I am going to have to think carefully about the version string because
it should be clear to developers that there are differences and it
should be easy to track the RPM and version of Wireshark back to the
change in the suppliers of the XDR files causing the change.

> If you're not worried about the RPM version then you should be able to patch
> make-version.pl in the SPEC File with the info you want (in the lines before
> the SPEC file calls `make`).
>
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    https://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
>             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe



-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)