-
Notifications
You must be signed in to change notification settings - Fork 34
Cmake release targets #438
Conversation
109c0de
to
e0d625d
Compare
As far as I understand there are only 3 pre-defined components in debian repository layout: main, contrib and non-free. But this is relevant only for official repo. We in our case may choose any arbitrary value e.g. tango as we deploy to bintray. @picca could you please comment on this? |
@Ingvord I think you are free to choose whatever you like for the names. But I would just use one of the official ones. |
We need to find a way to pass the Tango library version to appveyor without having to modify the appveyor file at each new version. |
@bourtemb , Unfortunately cmake can set env properties only for its own process [1], so I can only imaging to extract version into a separate file and then do
Not sure if it will help with AppVeyor though, @NexeyaSGara could you please comment? Anyway extracting VERSION seems to be a good idea - it will be much easier than to automatically increment it... |
I think we could possibily read a file and then set the environment variable with the content. |
I would:
|
As for me this one is ready to be merged. I skipped the third point because as for now one needs to update version, tag repository and push it to perform a release (travis will deploy everything). So there is no need to over complicate cmake and anyway it is better to control release manually, for instance one could also check that RELEASE_NOTES are updated accordingly etc |
liblog4tango is now merged with libtango.
The database is not part of the Debian packages generated by this Pull Request.
In that case, you should also conflict with liblog4tango, -dev
What is the impact of declaring a package as conflicting with another one?
Does this mean that the user must remove the conflicting package(s) in order to install the new package?
Inspire yourself from this
https://wiki.debian.org/PackageTransition
I've seen there are packages named libtango7-dev in wheezy and libtango8-dev in wheezy and jessie so I think Igor is right to add these packages in the conflicting packages list.
Yes no problem, I just ask to add libtango-dev ;)
|
configure/cpack_linux.cmake
Outdated
elseif(CMAKE_BUILD_TYPE STREQUAL "RELEASE") | ||
set(CPACK_PACKAGE_NAME libtango9lts) | ||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libcos4, libzmq5 | libzmq3") | ||
set(CPACK_DEBIAN_PACKAGE_CONFLICTS "libtango7, libtango8, libtango9") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In release mode, it looks like there is no conflict with libtango7 and libtango8 since the library files installed by these packages have different names (E.g.: /usr/lib/x86_64-linux-gnu/libtango.so.8. See https://packages.debian.org/jessie/amd64/libtango8/filelist).
This would not be true for the development packages since there might be a conflict with the installed include files(?), so in DEBUG CMake mode, I would keep the conflicts with libtango7-dev and libtango8-dev.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I played a bit with the Stretch Debian packages which are currently on BinTray.
I have seen they do not install the include files and library in the same directories as the official Tango Debian packages.
Includes are installed under /usr/local/include instead of /usr/include/tango for the official package.
Libraries are installed under /usr/local/lib instead of /usr/lib/x86_64-linux-gnu directory.
So they actually do not fully conflict with each other this way... libtango9lts is getting higher priority in the default library path. The question is: do we keep it like that or do we install the library and include files at the same locations as the official Debian packages?
I also noticed that there does not seem to be big differences between libtango9lts and libtango9lts-dev.
The only difference I noticed being that libtango9lts-dev is installing the library compiled in DEBUG mode instead of RELEASE mode (so, with debugging symbols).
I was expecting libtango9-lts package to contain only the library and not the include files as it is currently done for the Debian libtango9 official package.
I would have expected include files to be only in -dev package.
There is also a conflict between libtango9lts and libtango9lts-dev packages because they are trying to install the same files.
I think the libtango9lts and libtango9lts-dev packages are actually 2 development packages, so I would rename them in libtango9lts-dev and libtango9lts-dev-dbg for instance.
Another possibility would be to install both the release and debug versions of the libraries in the same package. We would need to agree on where to install the debug version (in another directory, named debug for instance?).
The Tango developer could then use one version or the other by setting the appropriate LD_LIBRARY_PATH for instance.
These are just suggestions from a modest Debian user with very limited experience with Debian packages ;-)...
@bourtemb , thanks a lot for testing this PR. I have changed package names accordingly in c47f039 I think it is OK if we leave -dev and -dbg suffixes and install headers in both cases thus stress the difference between these packages and official ones (maybe we can add really release package at some point in the future) Not sure if we need to put headers in tango subfolder. If |
Fine with me but we need to update again the conflicts because the new -dev version (Result of RELEASE build) will be in conflict with all the libtango*-dev and liblog4tango-dev packages as well since it is installing the include files.
I know a guy who may have an opinion about that ;-) @chedburgh, would you like to comment on that? Actually, I was more worried about the potential issues which could arise if a user manages to install both libtango9 and libtango9lts-dev or libtango9lts-dbg. |
@bourtemb, @chedburgh , I have found this in our previous emails (from October 2017):
So I have changed the default installation path in 3c37bba to We can change it to tango9lts if you think it is necessary. Anyway if you have no other changes requests I would merge this one and then #423 to deliver the events patch ASAP |
Sorry, I did not get a notification when I was mentioned above. Catching up now OK, so, IMHO… (Sorry if I comment on something resolved, this is a long thread, and sorry if I stir up any controversy…) Regarding install locations. Headers should install to /usr/include/tango, and looking at the CMake files, it looks like the binaries install correctly to /usr/lib/x86_64-linux-gnu I think you have this correct in the patch? Local should NOT be in the path. Do not put the headers somewhere unusual (i.e. usr/include/tango-lts). You will regret having to support some unusual install location for headers at a later point. If a user wants to run multiple development installs, let them set it up themselves with source installs. If the user wants to install the headers somewhere with a version number, let them get the source and do it themselves. Do not over complicate the packages and install location for what power user should be able to manage themselves. PackagesThe development package should install the headers and anything else required for development. The binary package should NOT install headers, just the finished product (you do not compile against this package, you compile against the development package). A dbg package installs symbols etc. See A1 here Regarding the package names. In my opinion, I would simply have libtango9.deb and libtango9-dev.deb etc. They can just be made to conflict with the official debian packages as pica pointed out, and their version information will make them distinct from the official packages (i.e they will be versioned 9.2.8-pre-release-1 or something?). Unless you plan for the official packages to be called libtango9lts in future? Maintaining differently named packages can create confusion. Question, when a new official lts debian package release comes out, can they be made to conflict with these snapshot lts releases ok if they have a difference a package name? Header Include PathsSince we are talking about header paths.... These are could be improved. For example, tango.h includes tango_const.h with no path. It should look like this:
And device servers should include
This is a standard way of stopping filenames clashing. You are relying on gcc searching system includes last to make sure it picks up tango headers in the case where they may have the same name as a system header (or another badly installed development package). I understand how POGO is set up it works around this, but it is just a work around. Check other package headers, or system stuff, i.e. /usr/include/linux/raw.h, you will see they use the path. It would be great to move this to the standard way at some point. Why is this important? When you build against the debian package (or any system with a /usr/include header install) without a pogo build file, you have to supply additional paths that should not be nessacessy. See the debian rules for libhdbpp-cassandra here, I have to include the path /usr/include/tango so it will compile.. This is not obvious for new users. Edit: Corrected mistake libtango-dev.deb -> libtango9-dev.deb |
@chedburgh , Wow! Thanks for a such exhaustive comment!!! Honestly, I think we are over complicating things here... First of all include headers are controlled by pkg-config, so we can change it in the future. And I totally agree that default location must be preferred. I guess this is what we get from There is not so many users of these packages at the moment (even I do not use it... mainly because all of our Tango servers are in Java, i.e. maven). So it is not that critical to change rules afterwards. Do you use it for hdb++? And finally I firmly believe we do not decide rock solid solution here. This PR is just a starting point for continuous delivery. Everything can be altered next day if you want so :) |
Yes, sorry, I have a lot of opinions on release procedures (from bad experiences in the past). I agree on the headers, it is a separate change, but I wanted to bring it up, since it is a bit messy having to work around this, and it would improve the projects general acceptance if it included headers in a regular way. The hdb++ debian packages depend on the libtango debian package. I use docker to do much of my work with tango, and often I use the debian packages inside it. I looked at the CMake files. It appears you not building proper debian packages, instead a debug/release package? Are the headers in both? I can not tell what is in either. Are you intending to release these to testers? If possible, I would suggest using traditional debian packages, and I would name them in the same way, so a future debian packages can conflict against them. libtango9 - just the binary shared libraries You just need to version these correctly, i.e. 9.2.8a-build-45 etc, or similar. Why? Well, for example, I use docker images for compiling tango projects, I could easily run packages with the same name (simple script call for me). I could run my hdb++ testing images against these pre releases libraries, if they are named correctly (I do not really want development files for release images, or to support multiple package names for libtango). Just some suggestions! I can probably offer some CMake pointers if you decide to do any of this. |
This means we need to produce 3 packages aka artifacts from a single repo... that is something conterintuitve for me (my problem maybe). It is possible to do it in CMake? I totally agree - it is better to stay with standard way of doing things. I am just not sure I can do it alone. |
The hdb++ debian packages depend on the libtango debian package. I use docker to do much of my work with tango, and often I use the debian packages inside it.
Do you provide these packages and do you think that we should integrate them into Debian ?
If you have other packages do not hesitate to upload them into Debain mentors and I can help do the review :)
libtango9 - just the binary shared libraries
libtango-dev - the headers and other development files
libtango9-dbg - the debug symbols only
Now the -dbg packages are obsolet, and we generate automatically dbgsym during the debian build process.
BUT, I do not know if cpack use the standard debian tools in order to generates the Debain packages.
You just need to version these correctly, i.e. 9.2.8a-build-45 etc, or similar.
I use most of the time this
dch --bpo ""
dch -l soleil 'Rebuilt for SOLEIL'"
In order to generate the right changelog and version of my local packges.
Cheers
|
Yes, I believe you define components on the install rules, then use these components in the packaging rules. Let me see if I can come up with a quick example today. |
In that case what about integrating the debian directory in the tango sources.
then using a small shell script in order to generate the Debian package with the usual DEbian tools.
dpkg-buildpackage.
Maybe this is possible with cpack. (I do not know about this tool)
Cheers
|
Not yet, it has been my intention to submit them after I have had time to ensure the source package is created correctly, they are just binary packages hosted on bintray currently.
I have not seen reference to CPack creating these files when I did some searching last week. |
This would be the best solution. Use the full debian build process and files and just revision it correctly. |
Not yet, it has been my intention to submit them after I have had time to ensure the source package is created correctly, they are just binary packages hosted on bintray currently.
Great, it shold be nice to have this for Buster.
|
So, if I understood correctly, what we would need is a recipe to build libtango standard Debian packages with the Debian tools. |
So, if I understood correctly, what we would need is a recipe to build libtango standard Debian packages with the Debian tools.
Could you provide this Frédéric, please?
If you have the debian directory in the sources, you can do this
gbp-buildpackage
What do you want in fact.
A wait to geenrate packages on each commit ?
In that case you need to use the dch command in order to generate the right changelog numbers.
It is nice also to follow the dep14 instruction in order to manage the debian packaging.
https://lwn.net/Articles/620197/
Cheers
Fred
|
As I wrote in an e-mail involving some of the persons who commented on this ticket, it seems clear that making the things clean to build high quality Debian packages will require more time. So, for the moment, I would be in favour of accepting this pull request but we need to make it clear somehow in the web pages where we advertise the Debian packages (if such web pages exist) that this is an experimental development version. On Bintray, the Maturity is set to "Development" for this package, so hopefully, this is clear for the users. We can create nicer Debian packages (more in line with the official Debian packages) in the future using another dedicated Pull Request. I think the only thing missing now in this PR before the merge is a short description of the changes in the RELEASE NOTES. I think it is also important to inform the user that from now on, the include files will be installed in <install_prefix>/include/tango directory instead of <install_prefix>/include. |
make release aka increment version and git tag + make clean & make & make package & make deploy