Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 621850 - app-admin/logrotate: version not set in binary & bzip2 compression feature
Summary: app-admin/logrotate: version not set in binary & bzip2 compression feature
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chema Alonso Josa (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-15 19:06 UTC by Luke McKee
Modified: 2017-08-28 15:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
logrotate-3.12.2.ebuild (logrotate-3.12.2.ebuild,2.09 KB, text/plain)
2017-06-15 19:06 UTC, Luke McKee
Details
$PORTDIR/app-admin/logrotate/metadata.xml (metadata.xml,1.17 KB, text/plain)
2017-06-15 19:07 UTC, Luke McKee
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke McKee 2017-06-15 19:06:14 UTC
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.
Comment 1 Luke McKee 2017-06-15 19:07:21 UTC
Created attachment 476618 [details]
$PORTDIR/app-admin/logrotate/metadata.xml

Has information on new use flag bzip2
Comment 2 Luke McKee 2017-06-17 19:49:47 UTC
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."
Comment 3 Chema Alonso Josa (RETIRED) gentoo-dev 2017-06-20 15:13:06 UTC
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
Comment 4 Chema Alonso Josa (RETIRED) gentoo-dev 2017-07-02 14:28:12 UTC
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
Comment 5 Luke McKee 2017-08-13 07:38:53 UTC
thanks guys.
Comment 6 Chema Alonso Josa (RETIRED) gentoo-dev 2017-08-28 15:45:35 UTC
The bzip2 compression feature has been reverted in favor of using the configuration file, please look at bug #627698