Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 645454 - app-forensics/rkhunter: Non-existent pathname: /var/lib/rkhunter/tmp
Summary: app-forensics/rkhunter: Non-existent pathname: /var/lib/rkhunter/tmp
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Palimaka (kensington)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-23 15:43 UTC by Jordy Zomer
Modified: 2018-03-17 23:55 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jordy Zomer 2018-01-23 15:43:39 UTC
Hi,

After installing rkhunter on a fresh Gentoo install you get the following error when trying to run it:

Gentoo / # rkhunter  -c
Invalid TMPDIR configuration option: Non-existent pathname: /var/lib/rkhunter/tmp

Fix: Create the tmp directory 

Kind Regards,

Jordy Zomer
Comment 1 Jordy Zomer 2018-01-23 16:04:34 UTC
Hi,

Created a potential fix:

 > diff -Naur rkhunter-1.4.4.ebuild rkhunter-1.4.5.ebuild                                                                     rkhunter
--- rkhunter-1.4.4.ebuild	2018-01-23 17:02:20.000000000 +0100
+++ rkhunter-1.4.5.ebuild	2018-01-23 17:03:46.000000000 +0100
@@ -53,6 +53,10 @@

 	newbashcomp "${FILESDIR}/${PN}.bash-completion" ${PN}

+	# Bug 645454: If the tmp dir doesn't exist, make it
+  	if [ -d "/var/lib/${PN}/tmp" ]; then
+	 	mkdir "/var/lib/${PN}/tmp"
+ 	fi
 }

 pkg_postinst() {

I could maintain this package if needed.

Kind Regards,

Jordy Zomer
Comment 2 Jordy Zomer 2018-01-23 16:30:01 UTC
Created a proper fix:

> diff -Naur rkhunter-1.4.4.ebuild rkhunter-1.4.5.ebuild                                                                     rkhunter
--- rkhunter-1.4.4.ebuild	2018-01-23 17:02:20.000000000 +0100
+++ rkhunter-1.4.5.ebuild	2018-01-23 17:29:02.000000000 +0100
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2

 EAPI=6
@@ -53,6 +53,8 @@

 	newbashcomp "${FILESDIR}/${PN}.bash-completion" ${PN}

+  # Create TMP dir (BUG: 645454)
+  dodir /var/lib/${PN}/tmp
 }

 pkg_postinst() {
Comment 3 Larry the Git Cow gentoo-dev 2018-03-17 23:53:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61e995b755727e286d140d8d721340959c434b6c

commit 61e995b755727e286d140d8d721340959c434b6c
Author:     Michael Palimaka <kensington@gentoo.org>
AuthorDate: 2018-03-17 23:52:36 +0000
Commit:     Michael Palimaka <kensington@gentoo.org>
CommitDate: 2018-03-17 23:53:43 +0000

    app-forensics/rkhunter: version bump 1.4.6
    
    Also, add a patch to disable insecure file downloads.
    
    Bug: https://bugs.gentoo.org/623150
    Closes: https://bugs.gentoo.org/645454
    Closes: https://bugs.gentoo.org/648470
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-forensics/rkhunter/Manifest                    |  1 +
 .../rkhunter/files/rkhunter-1.4.6-conf.patch       | 38 +++++++++++++
 .../files/rkhunter-1.4.6-no-insecure-web.patch     | 46 ++++++++++++++++
 app-forensics/rkhunter/rkhunter-1.4.6.ebuild       | 63 ++++++++++++++++++++++
 4 files changed, 148 insertions(+)
Comment 4 Michael Palimaka (kensington) gentoo-dev 2018-03-17 23:55:17 UTC
I copied the Fedora approach and did this:
-#TMPDIR=/var/lib/rkhunter/tmp
+TMPDIR=/var/lib/rkhunter