Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 385113 - net-fs/autofs-5: automount map directory is '/etc' instead of '/etc/autofs'
Summary: net-fs/autofs-5: automount map directory is '/etc' instead of '/etc/autofs'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Peter Volkov (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2011-09-30 17:56 UTC by Alberto Casari
Modified: 2011-10-14 20:14 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge-info.txt,4.69 KB, text/plain)
2011-10-05 16:08 UTC, Alberto Casari
Details
Build log without '/etc/autofs' directory (autofs-etc.log,29.20 KB, text/plain)
2011-10-05 16:17 UTC, Alberto Casari
Details
Build log with '/etc/autofs' directory (autofs-etc-autofs.log,29.61 KB, text/plain)
2011-10-05 16:24 UTC, Alberto Casari
Details
Patch to autofs-5.0.6-r3.ebuild (autofs-5.0.6-r3.ebuild.patch,421 bytes, patch)
2011-10-14 09:40 UTC, Dustin Polke
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Casari 2011-09-30 17:56:10 UTC
Automount map files should be installed in '/etc/autofs' directory
instead of '/etc' since 'auto.master' is installed there(see 'ebuild').

Reproducible: Always

Steps to Reproduce:
1.emerge 'net-fs/autofs-5.0.6-r2'
2.
3.
Actual Results:  
/etc/autofs/auto.master
/etc/auto.misc
/etc/auto.net
/etc/auto.smb
/etc/autofs_ldap_auth.conf

Expected Results:  
/etc/autofs/auto.master
/etc/autofs/auto.misc
/etc/autofs/auto.net
/etc/autofs/auto.smb
/etc/autofs/autofs_ldap_auth.conf

Add '--with-mapdir=/etc/autofs' to 'econf' resolves the issue.
Comment 1 Dustin Polke 2011-10-05 11:52:19 UTC
Please attach full build.log and post your emerge --info
Comment 2 Alberto Casari 2011-10-05 16:08:28 UTC
Created attachment 288871 [details]
emerge --info

This is the 'emerge --info' you requested
Comment 3 Alberto Casari 2011-10-05 16:17:26 UTC
Created attachment 288873 [details]
Build log without '/etc/autofs' directory

Build log _without_ '/etc/autofs' directory
Comment 4 Alberto Casari 2011-10-05 16:24:29 UTC
Created attachment 288875 [details]
Build log with '/etc/autofs' directory

This is the build log _with_ '/etc/autofs' directory,
and this is a macro passed to 'gcc':
-DAUTOFS_MAP_DIR=\"/etc/autofs\"

And this is the build log _without_ '/etc/autofs' directory,
for instance when you install 'autofs' for the first time,
and this is a macro passed to 'gcc':
-DAUTOFS_MAP_DIR=\"/etc\"
Comment 5 Dustin Polke 2011-10-05 16:31:32 UTC
Peter,

this issue seems to be similar to bug #361481.
I can't figure out why this behaves differently on similar machines, but safest
way is to specify the correct dir by adding '--with-mapdir=/etc/autofs' to
econf as proposed by albecasari.

Should we add an elog message as well to get users attention in case they need
to migrate misplaced config files (I don't know if autofs even worked with such
a configuration...)?
Comment 6 Dustin Polke 2011-10-14 09:40:54 UTC
Created attachment 289785 [details, diff]
Patch to autofs-5.0.6-r3.ebuild

Peter,
if you want to add a elog message as well, please let me know. I will then come up with something.
Comment 7 Peter Volkov (RETIRED) gentoo-dev 2011-10-14 20:14:44 UTC
Dustin, ./aclocal.m4 has following function:

dnl Check the location of the autofs maps directory
dnl --------------------------------------------------------------------------
AC_DEFUN(AF_MAP_D,
[if test -z "$mapdir"; then
  for map_d in /etc/autofs /etc; do
    if test -z "$mapdir"; then
      if test -d "$map_d"; then
        mapdir="$map_d"
      fi
    fi
  done
fi])

Thus if /etc/autofs exists files will go there (and it does not exist on new installations). So the fix is correct. Commited into 5.0.6-r4. Thank you guys.