Created attachment 476616 [details] logrotate-3.12.2.ebuild I was setting up virtualmin/webmin on gentoo and it wouldn't install due to logrotate having version "UNKNOWN" in the binary. https://www.virtualmin.com/node/7676 I have attached a replacement ebuild that uses sed to set the version using the configure script, that since moving to github has UNKNOWN set for it's verison. I've also added a use flag so logrotate can use bzip2 instead of gzip for logfile compression.
Created attachment 476618 [details] $PORTDIR/app-admin/logrotate/metadata.xml Has information on new use flag bzip2
emperor caveat: FYI I don't know if the sed will work if you use a -r1 etc in the ebuild file name. It uses ${PV}. Oh scratch that $PVR does that - not so $PV it's all good. "PV Package version (excluding revision, if any), for example 6.3. It should reflect the upstream versioning scheme."
Thanks for the report and your code. Current version of logrotate is being stabilized these days [1] and, apparently the next version of logrotate will be released at the end of this month [2] so I am going to wait for the new release to include your changes. [1] https://bugs.gentoo.org/show_bug.cgi?id=620522 [2] https://github.com/logrotate/logrotate/issues/130
The only place I've found the UNKNOWN string in the code is in the git-version-gen file inside the build-aux directory. The configure script downloaded in the tarball contains the variable PACKAGE_VERSION defined to the current package version, so I think the binary gets the correct version information. Probably there is something I am missing. $ logrotate -v logrotate 3.12.3 - Copyright (C) 1995-2001 Red Hat, Inc. This may be freely redistributed under the terms of the GNU Public License [...] On the other hand. I've applied the proposed bzip2 use flag patch: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f902818573513baad78ba32fb46ca7946ffd8d03
thanks guys.
The bzip2 compression feature has been reverted in favor of using the configuration file, please look at bug #627698