CLOUDSTACK-9065: Packaging RPM, add option for package release version, cleanup and lint#1075
Conversation
* lint * adjust exit codes (1 for usage, 2 for maven, 3 for rpmbuild) * variable naming consistency * add option for package release version * revise synopsis and usage
(...) |
|
LGTM |
There was a problem hiding this comment.
@davidamorimfaria, what are the implications in giving a release number? For example, giving 4.6 or nothing will reflect in a different package or is it just for the final RPM file name?
For the looks on the code, it seems to be only the file name. :)
No big deal, I'm just curious. I will take some time to test your PR today.
There was a problem hiding this comment.
Quick answer, the release is the versioning for the package. Not necessarily related to the content of the package. The filename is changed, and also the metadata of the RPM, in the "Release" section.
There was a problem hiding this comment.
Wilder,
This does not affect the contents in any way, just makes it easier to use with "yum/apt-get update" for e.g. when you want to issue updates.
It will come in handy as newer jenkins (as well as manual) built packages will now be able to gracefully upgrade old ones.
I used to fiddle around with cloud.spec to achieve the same and the idea was discussed last year with ke4qqq & spark404 but we never got anywhere. :)
Good job @davidamorimfaria !
Sent from the Delta quadrant using Borg technology!
Nux!
www.nux.ro
----- Original Message -----
From: "Wilder Rodrigues" notifications@github.com
To: "apache/cloudstack" cloudstack@noreply.github.com
Cc: "NuxRo" nux@li.nux.ro
Sent: Wednesday, 18 November, 2015 07:58:40
Subject: Re: [cloudstack] CLOUDSTACK-9065: Packaging RPM, add option for package release version, cleanup and lint
(#1075)echo ""
- echo "Examples: ./package.sh -p|--pack oss|OSS"
- echo " ./package.sh -p|--pack noredist|NOREDIST"
- echo " ./package.sh (Default OSS)"
- exit 1
- echo "Examples: ./package.sh --pack oss"
- echo " ./package.sh --pack noredist"
- echo " ./package.sh --pack oss --distribution centos7 --release
42"@davidamorimfaria, what are the implications in giving a release number? For
example, giving 4.6 or nothing will reflect in a different package or is it
just for the final RPM file name?For the looks on the code, it seems to be only the file name. :)
No big deal, I'm just curious. I will take some time to test your PR today.
Reply to this email directly or view it on GitHub:
https://github.com/apache/cloudstack/pull/1075/files#r45169717
|
Quick question: were the generated packages installed successfully? Cheers, |
|
This is the package release version number, nothing to do with the thing that is packaged. Its purpose is to allow for this script to be used with an automated package builder, and thus create a unique package version with each iteration, for example using a jenkins job number instead of always being "1". Also, having a distinct package version makes the package directly usable in a yum repository without having to nuke the repodata because of signature mismatches for files that were rebuild using the same name (and package version). It is also not only the file name that is changed. If you inspect the repo you will see it in the "Release" details: |
|
As for installing the package, having distinct package version numbers allows one to update packages instead of having to remove and install them in succession if they have the same version and release numbers. I haven't installed it yet, but the content should be the same, only filename and rpm metadata are modified. |
CLOUDSTACK-9065: Packaging RPM, add option for package release version, cleanup and lintIn package.sh * lint * adjust exit codes (1 for usage, 2 for maven, 3 for rpmbuild) * fix variable naming for consistency * add option for package release version * revise synopsis and usage * pr/1075: Refactor package.sh: * lint * adjust exit codes (1 for usage, 2 for maven, 3 for rpmbuild) * variable naming consistency * add option for package release version * revise synopsis and usage Signed-off-by: Remi Bergsma <github@remi.nl>

In package.sh