This is a static archive of our old Q&A Site. Please post any new questions and answers at

Generate rpm with a custom build number


I'm running on RHEL 7.2, i'm wondering if there's a way to set the Release number (which is defined om the spec file) as a variable like the Version number which is being generated by the and is written to the config.h , I'd like to set a kind of BUILD_NUMBER variable somewhere, and it'll take the value of the exported variable during the execution.

asked 14 Feb '16, 14:27

alex1312's gravatar image

accept rate: 0%

One Answer:


Sure. You'd just need to set a variable (e.g., BUILD_NUMBER) and then AC_SUBST it (all in and then change the Release line in packaging/rpm/SPECS/ to reference the variable (Release: @[email protected]). You could add the build number to other .in files too if desired.

Of course you'd need to autogen and configure again to regenerate wireshark.spec.

answered 17 Feb '16, 08:00

JeffMorriss's gravatar image

JeffMorriss ♦
accept rate: 27%