[Bug 1228610] New: Mail Makefile error finding alias directory

https://bugzilla.suse.com/show_bug.cgi?id=1228610 Bug ID: 1228610 Summary: Mail Makefile error finding alias directory Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.5 Hardware: x86-64 OS: openSUSE Leap 15.5 Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: screening-team-bugs@suse.de Reporter: marc@marcchamberlin.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- The macro shell script for ALIAS_FILE is searching for a file. Instead it should be searching for a directory. Change the ALIAS_FILE environment variable in /etc/mail/Makefile from ALIAS_FILE = $(shell find $(ETC)aliases.d/ -type f) to ALIAS_FILE = $(shell find $(ETC)aliases.d/ -type d) Recommend changing the name of this environment variable to ALIAS_DIR to avoid confusion. -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1228610 https://bugzilla.suse.com/show_bug.cgi?id=1228610#c1 --- Comment #1 from Dr. Werner Fink <werner@suse.com> --- (In reply to Marc Chamberlin from comment #0)
The macro shell script for ALIAS_FILE is searching for a file. Instead it should be searching for a directory. Change the ALIAS_FILE environment variable in /etc/mail/Makefile from
ALIAS_FILE = $(shell find $(ETC)aliases.d/ -type f)
to
ALIAS_FILE = $(shell find $(ETC)aliases.d/ -type d)
Recommend changing the name of this environment variable to ALIAS_DIR to avoid confusion.
Guess: you are talking about sendmail ... in the Makefile the current code is: # # newaliases # SHELL = /bin/sh ALIAS_FILE = $(shell find $(ETC)aliases.d/ -type f) $(ETC)aliases.db: $(ETC)aliases $(ALIAS_FILE) @echo "Rebuilding $@." sendmail $(CONF) -bi test -e $@ && touch $@ chmod --reference=$< $@ couls you please explain why make should check for changed directories below /etc/aliases.d/ instead of added alias files? The alias command allows to use lines like :include: /etc/aliases.d/name where ``name'' is a file AFAICR -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1228610 https://bugzilla.suse.com/show_bug.cgi?id=1228610#c2 --- Comment #2 from Marc Chamberlin <marc@marcchamberlin.com> --- Yes, I am using sendmail. $(ETC)aliases.d/ is a directory, NOT a file. The find command is being told to look for a file, -f and not for a directory (which would use -d instead) and thus fails. Simply change the -f to a -d and all will be fine. To avoid confusion in the I also recommended changing the name of the environment variable from ALIAS_FILE to ALIAS_DIR -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1228610 https://bugzilla.suse.com/show_bug.cgi?id=1228610#c3 --- Comment #3 from Marc Chamberlin <marc@marcchamberlin.com> --- (In reply to Marc Chamberlin from comment #2)
Yes, I am using sendmail. $(ETC)aliases.d/ is a directory, NOT a file. The find command is being told to look for a file, -f and not for a directory (which would use -d instead) and thus fails. Simply change the -f to a -d and all will be fine.
To avoid confusion in the I also recommended changing the name of the environment variable from ALIAS_FILE to ALIAS_DIR
Oops mistyped the second to last sentence, should be - To avoid confusion in the script,... -- You are receiving this mail because: You are on the CC list for the bug.

https://bugzilla.suse.com/show_bug.cgi?id=1228610 https://bugzilla.suse.com/show_bug.cgi?id=1228610#c4 --- Comment #4 from Dr. Werner Fink <werner@suse.com> --- OK .. example /suse/werner> cd /tmp/ /tmp> mkdir -p a /tmp> touch a/b /tmp> find /tmp/a -type f /tmp/a/b /tmp> indeed /tmp/a is a directory but I'd like to find files *below* that directoyy. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com