How to make a Samba .distversion file

Steve French smfrench at gmail.com
Tue Sep 27 18:22:02 UTC 2016


It was a little more time consuming than I expected to wade through
the waf code, but
I created a simple patch to build just the ".distversion" file and it
did exactly what I wanted - now "smbd -V" displays the version I want
(samba major/minor version followed by git short tag), and none of the
package is otherwise changed.

Will send patch now

On Tue, Sep 27, 2016 at 11:41 AM, Steve French <smfrench at gmail.com> wrote:
> Changing samba_dist.py to use xz and a well known name would work, but
> this version of python (2.7) didn't support xz files ...
>
> On Tue, Sep 27, 2016 at 11:07 AM, Steve French <smfrench at gmail.com> wrote:
>> I was able to generate a .distversion but there are two problems in
>> trying to do the following sequence (presumably would be common
>> scenario)
>>
>> 1) make dist from within the git tree to construct the .distversion
>> file and put it in a tar.xz file with the build tree
>> 2) copy the tar.xz file to $(RPMDIR)/SOURCES
>> 3) rpmbuild -ba samba.spec
>>
>>
>> The problem with that is
>> 1) you don't know the exact name of the rpm file that "make dist" will
>> generate (we need to copy it to something well known that will match
>> what was put in the spec file, like "samba.tar.xz")
>> 2) "make dist" looks like it builds hundreds of doc files (is it
>> supposed to do that?) not just .distversion before doing the tar
>> 3) It builds a tar.gz instead of the normal tar.xz, presumably
>> rpmbuild expects tar.xz not tar.gz (at least that is what we have been
>> using and rpmbuild seems happy with the newer tar.xz)
>>
>> On Tue, Sep 27, 2016 at 9:45 AM, Andrew Bartlett <abartlet at samba.org> wrote:
>>> On Tue, 2016-09-27 at 03:08 -0500, Steve French wrote:
>>>> If trying to get Samba to build with a version tag that includes the
>>>> git hash (trailing string), it looks like it can already do this if
>>>> you have a ".distversion" file in the root directory of the build
>>>> (since with rpmbuild you won't be in the git tree at that point, as
>>>> you have created a tar.gz) - but how is a valid .distversion file
>>>> generated.  "make dist" didn't seem to do what I expected (built a
>>>> lot
>>>> of documents, and an invalid .distversion).
>>>>
>>>> What is the format of .distversion and is there a script which
>>>> trivially generates it?
>>>
>>> It is controlled by the VERSION file and generated by make dist (waf
>>> dist) from ./wscript.
>>>
>>> Andrew Bartlett
>>>
>>> --
>>> Andrew Bartlett                       http://samba.org/~abartlet/
>>> Authentication Developer, Samba Team  http://samba.org
>>> Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba
>>>
>>
>>
>>
>> --
>> Thanks,
>>
>> Steve
>
>
>
> --
> Thanks,
>
> Steve



-- 
Thanks,

Steve



More information about the samba-technical mailing list