Re: [SOLVED] building ceph rpms, "ceph --version" returns no version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Robert,

Thanks for your help, I have solved this. In case anyone is experiencing this same problem, here is my solution:

[user@host ~]$ cd ~/Development/
[user@host Development]$ git clone -b $BRANCH https://github.com/ceph/ceph.git
[user@host Development]$ git clone https://github.com/ceph/ceph-build.git
[user@host Development]$ cd ceph/
[user@host Development]$ ./do_autogen.sh
[user@host Development]$ ../ceph-build/do_release.sh /tmp/release
[user@host Development]$ y # if asked to remove a write-protected file
[user@host Development]$ cp ceph-$CEPH_VERSION.tar.bz2 ~/rpmbuild/SOURCES/
[user@host Development]$ cp rpm/init-ceph.in-fedora.patch ~/rpmbuild/SOURCES/
[user@host Development]$ sed -i '/URL:/aPackager:       $YOUR_NAME' ceph.spec
[user@host Development]$ sed -i '/URL:/aVendor:         $YOUR_INSTITUTION' ceph.spec
[user@host Development]$ cp ceph.spec ~/rpmbuild/SPECS/
[user@host Development]$ cd ~
[user@host ~]$ rpmbuild -ba ~/rpmbuild/SPECS/ceph.spec

This process will create a new tarball (actually two tarballs, a *.tar.gz and a *.tar.bz2) that has the correct code to allow ceph daemons to report their version. It uses a lookup table to generate the version number, if the SHA1 of the HEAD commit matches an entry in the table, a proper version number is used, if not, the version number is based on the SHA1.

Where I went wrong was I git cloned the code and created a tarball of the ~/Development/ceph directory with the option ' --exclude-vcs' to reduce the amount of tarring required.

The build process is reasonably well documented on: https://github.com/ceph/ceph/blob/master/doc/dev/release-process.rst, but not all the steps are applicable to a basic build infrastructure one may have in one's own institution.

Best wishes,
Bruno


Bruno Canning
Scientific Computing Department
STFC Rutherford Appleton Laboratory
Harwell Oxford
Didcot
OX11 0QX
UK

-----Original Message-----
From: Robert LeBlanc [mailto:robert@xxxxxxxxxxxxx] 
Sent: 10 December 2015 05:49
To: Canning, Bruno (STFC,RAL,SC)
Cc: ceph-users@xxxxxxxxxxxxxx
Subject: Re:  building ceph rpms, "ceph --version" returns no version

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

You actually have to walk through part of the make process before you can build the tarball so that the version is added to the source files.

I believe the steps are:
./autogen.sh
./configure
make dist-[gzip|bzip2|lzip|xz]

Then you can copy the SPEC file (should already have the version in it as well as the ceph_ver.h file, I think this is the money maker you are looking for) and go about your normal compilation. This creates a tarball that is used to put on the website I think.
-----BEGIN PGP SIGNATURE-----
Version: Mailvelope v1.3.2
Comment: https://www.mailvelope.com

wsFcBAEBCAAQBQJWaRJTCRDmVDuy+mK58QAAmo4P/j4wkz6B1urR7G1QZmpd
7m+YxrlCfUZk31n58bDc4hXZOW0Y/5Qv6k1ELjw46wIqZAp/pE3AIagBIkTw
TufKDxWfBjnsMDe1smopz/T0M+ByY9s8hOnu+ry0KERXjTjarPmbbUHG2QVY
rB9oYGE4W+r0Cyek2CpUCkFXiPv5mxvMCmMBVBXTuSjOvpKi4JYLGZ1z91lx
FkfQMN8vE2Z3fIrp0aQUuJyQI/GaF8Qg9SEix7BguxjAGXyk7vyOL6z8j+8b
guDixym3aFvXpEYC26wdpoIbRB3chyfRim0AFQ/TgpSzDW6Di1OV8d7Zrtqe
nWUwuJsNYIWPJ+Zgzpa+CjrYBuVPZhf+TqSLRO6Xc27twsXCwZIHYy8sDOmJ
gfwEkmx6VmfJwpsPZPxfZBeCa0Ku3FlJI/HnYUVrZ268KpOLh8vyqQzJH0WJ
maxaCAnmsMNo5C3lXJK2MZG0sx7BEx4RcMECAJ9WOPoHF4D+0aGRbFbV3aL4
OFIy439uLpMTI/4RGxfr9O4T1LYR3FvBCd8VWHZn+kbvrx9L2Gydz+hjlcuS
yztGzzjuXUiCpnmRi7I6z1Myf2+D2ZbGkx4q+8s3c8zg/7TwrNdEXG+l9Qqw
+q1CbKWyX8u3MJfHWB5S6UMc3tPkMgWml7sV4OUEbEfeMU/znbKTniqa9C9M
Po6n
=nE/8
-----END PGP SIGNATURE-----
----------------
Robert LeBlanc
PGP Fingerprint 79A2 9CA4 6CC4 45DD A904  C70E E654 3BB2 FA62 B9F1


On Wed, Dec 9, 2015 at 10:01 AM,  <bruno.canning@xxxxxxxxxx> wrote:
> Hi All,
>
>
>
> Long story short:
>
>
>
> I have built ceph hammer RPMs, everything seems to work OK but running 
> “ceph --version” does not report the version number. I don’t get a 
> version number returned from “service ceph status”, either. I’m 
> concerned that other components in our system my rely on ceph 
> --version returning a value, so I would like to fix this. Can anyone help, please?
>
>
>
> The back story:
>
>
>
> We need ceph hammer binaries that contain the most recent 
> contributions from sponce (https://github.com/ceph/ceph/pull/6322) as 
> we are using
> libradosstriper1 with ceph. As these changes were merged into the 
> hammer branch after the latest hammer release, we have had to build our own RPMs.
>
>
>
> To do this, I did a git clone of the hammer branch shortly after this 
> pull request was merged. I then tarballed the directory with the “--exclude-vcs”
> option, modified the supplied .spec file by changeing the value of 
> “Version:” from “@VERSION@” to “0.94.5” and the value of “Release” 
> from “@RPM_RELEASE@%{?dist}” to “1%{?dist}” and built the RPMs. I have 
> since noticed the problem with ceph --version.
>
>
>
> The answer looks to be found somewhere in one of these files, but I’m 
> coming at this as a system administrator, not a programmer, so it is 
> all rather
> confusing:
>
> ceph-0.94.5/src/common/version.h
>
> ceph-0.94.5/src/common/version.cc
>
> ceph-0.94.5/CMakeLists.txt
>
> ceph-0.94.5/src/ceph_ver.c
>
> ceph-0.94.5/src/ceph_ver.h.in.cmake
>
>
>
> Many thanks in advance,
>
> Bruno
>
>
>
> Bruno Canning
>
> Scientific Computing Department
>
> STFC Rutherford Appleton Laboratory
>
> Harwell Oxford
>
> Didcot
>
> OX11 0QX
>
>
> _______________________________________________
> ceph-users mailing list
> ceph-users@xxxxxxxxxxxxxx
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux