Great Circle Associates Majordomo-Workers
(September 1996)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: Majordomo 1.94 Beta 3, whee!!
From: "Randall S. Winchester" <rsw @ Glue . umd . edu>
Date: Wed, 25 Sep 1996 00:21:28 -0400 (EDT)
To: Chan Wilson <cwilson @ slurp . neu . sgi . com>
Cc: majordomo-workers @ GreatCircle . COM
In-reply-to: <199609232206.AAA19971@slurp.neu.sgi.com>


I have used majordomo for a number of years now, and there is one part of
the installation that has always erked me, and that I have always changed
myself through various releases. It would look alot cleaner to have all the 
perl scripts and such in the bin directory. One could go further and
suggest that some of the files get put into an "etc" directory. However, I
do not like going to the top of the majordmomo tree and seeing this:

Log                   digest.send@          man/
Tools/                digest@               new-list@
archive.pl@           lists/                request-answer*
archive2.pl@          logsummary.pl@        resend*
archive_mh.pl@        majordomo*            sample.cf 
bin/                  majordomo.cf          sequencer@
bounce-remind*        majordomo.pl*         shlock.pl*
config-test*          majordomo_version.pl* wrapper*
config_parse.pl*      makeindex.pl@         

I want to see something more like this:

Log    Tools/ bin/   lists/ man/   

Then inside of bin I would expect to see this:

approve*              digest.send@          medit*
archive.pl@           digest@               new-list@
archive2.pl@          logsummary.pl@        request-answer*
archive_mh.pl@        majordomo*            resend*
bounce*               majordomo.cf          sample.cf 
bounce-remind*        majordomo.pl*         sequencer@
config-test*          majordomo_version.pl* shlock.pl*
config_parse.pl*      makeindex.pl@         wrapper

In particular we have a number of our own additions which would otherwise
add to the untidiness of the top directory.

Please consider adding support for this in the release. 

Thanks,
Randall

The patches to make this work are pretty straight forward, and follow:

===================================================================
RCS file: RCS/Makefile,v
retrieving revision 1.1
diff -c -r1.1 Makefile
*** 1.1	1996/09/25 03:46:16
--- Makefile	1996/09/25 03:54:14
***************
*** 37,43 ****
  # passed to processes run by "wrapper"
  
  W_PATH = 	/bin:/usr/bin:/usr/ucb
! W_BIN =		$(W_HOME)
  W_SHELL =	/bin/csh
  W_MAJORDOMO_CF =	$(W_BIN)/majordomo.cf
  
--- 37,46 ----
  # passed to processes run by "wrapper"
  
  W_PATH = 	/bin:/usr/bin:/usr/ucb
! # If you want the scripts in a seperate directory instead of the top dir.
! W_BIN =		$(W_HOME)/bin
! # else the old way of throwing everything in one pile.
! # W_BIN =		$(W_HOME)
  W_SHELL =	/bin/csh
  W_MAJORDOMO_CF =	$(W_BIN)/majordomo.cf
  
***************
*** 153,167 ****
  	$(W_USER) $(W_GROUP), do a \n\
  		$(CHOWN) $(W_CHOWN) $(W_HOME)\n"; \
  		ls -lLnd $(W_HOME); echo "")
! 	@test -d $(W_BIN)/bin || mkdir $(W_BIN)/bin
  
! 	@echo "Copying tools to $(W_BIN)/bin"
  
  	@for file in $(BINBIN); do \
  		chmod +x tmp/$$file ; \
  		$(CHOWN) $(W_CHOWN) tmp/$$file ; \
! 		rm -f $(W_BIN)/bin/$$file; \
! 		mv tmp/$$file $(W_BIN)/bin ; \
  	done
  
  	@echo "Copying Majordomo files to $(W_BIN)"
--- 156,170 ----
  	$(W_USER) $(W_GROUP), do a \n\
  		$(CHOWN) $(W_CHOWN) $(W_HOME)\n"; \
  		ls -lLnd $(W_HOME); echo "")
! 	@test -d $(W_HOME)/bin || mkdir $(W_HOME)/bin
  
! 	@echo "Copying tools to $(W_HOME)/bin"
  
  	@for file in $(BINBIN); do \
  		chmod +x tmp/$$file ; \
  		$(CHOWN) $(W_CHOWN) tmp/$$file ; \
! 		rm -f $(W_HOME)/bin/$$file; \
! 		mv tmp/$$file $(W_HOME)/bin ; \
  	done
  
  	@echo "Copying Majordomo files to $(W_BIN)"
***************
*** 173,186 ****
  		mv tmp/$$file $(W_BIN) ; \
  	done
  
! 	@echo "Copying archiving and other tools to $(W_BIN)/Tools"
  
! 	@test -d $(W_BIN)/Tools || mkdir $(W_BIN)/Tools
  	@for file in $(TOOLS); do \
  		chmod +x tmp/$$file ; \
  		$(CHOWN) $(W_CHOWN) tmp/$$file ; \
! 		rm -f $(W_BIN)/Tools/$$file ; \
! 		mv tmp/$$file $(W_BIN)/Tools ; \
  	done
  
  	@rm -rf tmp	
--- 176,189 ----
  		mv tmp/$$file $(W_BIN) ; \
  	done
  
! 	@echo "Copying archiving and other tools to $(W_HOME)/Tools"
  
! 	@test -d $(W_HOME)/Tools || mkdir $(W_HOME)/Tools
  	@for file in $(TOOLS); do \
  		chmod +x tmp/$$file ; \
  		$(CHOWN) $(W_CHOWN) tmp/$$file ; \
! 		rm -f $(W_HOME)/Tools/$$file ; \
! 		mv tmp/$$file $(W_HOME)/Tools ; \
  	done
  
  	@rm -rf tmp	
***************
*** 211,239 ****
  
  
  install-man:
! 	@echo "Copying manual pages to $(W_BIN)/man/man[18]"
! 	@test -w $(W_BIN)/man || mkdir $(W_BIN)/man
! 	@test -w $(W_BIN)/man/man1 || mkdir $(W_BIN)/man/man1
! 	@test -w $(W_BIN)/man/man8 || mkdir $(W_BIN)/man/man8
! 	@cp Doc/man/approve.1 $(W_BIN)/man/man1
! 	@cp Doc/man/digest.1 $(W_BIN)/man/man1
! 	@cp Doc/man/majordomo.8 $(W_BIN)/man/man8
  
  
  install-shared: install-wrapper-shared install-scripts
  
  install-wrapper-shared: wrapper
! 	@test -d $(W_BIN)/wrappers || mkdir $(W_BIN)/wrappers
! 	@test -d $(W_BIN)/wrappers/$(W_GROUP) || mkdir $(W_BIN)/wrappers/$(W_GROUP)
  	strip wrapper
! 	cp wrapper $(W_BIN)/wrappers/$(W_GROUP)/wrapper.$(ARCHCMD)
! 	cp wrapper.sh $(W_BIN)/wrappers/$(W_GROUP)/wrapper
  	@echo 'run make permissions-shared' as root to set permissions
  
  permissions-shared:
! 	$(CHOWN) $(W_CHOWN) $(W_BIN)/wrappers/$(W_GROUP)/wrapper.$(ARCHCMD)
! 	$(CHOWN) $(W_CHOWN) $(W_BIN)/.
! 	chmod $(W_CHMOD) $(W_BIN)/wrappers/$(W_GROUP)/wrapper.$(ARCHCMD)
  
  wrapper: wrapper.c
  	cc  $(WRAPPER_FLAGS) -o wrapper wrapper.c
--- 214,242 ----
  
  
  install-man:
! 	@echo "Copying manual pages to $(W_HOME)/man/man[18]"
! 	@test -w $(W_HOME)/man || mkdir $(W_HOME)/man
! 	@test -w $(W_HOME)/man/man1 || mkdir $(W_HOME)/man/man1
! 	@test -w $(W_HOME)/man/man8 || mkdir $(W_HOME)/man/man8
! 	@cp Doc/man/approve.1 $(W_HOME)/man/man1
! 	@cp Doc/man/digest.1 $(W_HOME)/man/man1
! 	@cp Doc/man/majordomo.8 $(W_HOME)/man/man8
  
  
  install-shared: install-wrapper-shared install-scripts
  
  install-wrapper-shared: wrapper
! 	@test -d $(W_HOME)/wrappers || mkdir $(W_HOME)/wrappers
! 	@test -d $(W_HOME)/wrappers/$(W_GROUP) || mkdir $(W_HOME)/wrappers/$(W_GROUP)
  	strip wrapper
! 	cp wrapper $(W_HOME)/wrappers/$(W_GROUP)/wrapper.$(ARCHCMD)
! 	cp wrapper.sh $(W_HOME)/wrappers/$(W_GROUP)/wrapper
  	@echo 'run make permissions-shared' as root to set permissions
  
  permissions-shared:
! 	$(CHOWN) $(W_CHOWN) $(W_HOME)/wrappers/$(W_GROUP)/wrapper.$(ARCHCMD)
! 	$(CHOWN) $(W_CHOWN) $(W_HOME)/.
! 	chmod $(W_CHMOD) $(W_HOME)/wrappers/$(W_GROUP)/wrapper.$(ARCHCMD)
  
  wrapper: wrapper.c
  	cc  $(WRAPPER_FLAGS) -o wrapper wrapper.c
===================================================================
RCS file: RCS/sample.cf,v
retrieving revision 1.1
diff -c -r1.1 sample.cf
*** 1.1	1996/09/25 03:55:25
--- sample.cf	1996/09/25 03:56:34
***************
*** 10,16 ****
  #
  $whoami_owner = "Majordomo-Owner\@$whereami";
  
! # $homedir -- Where can I find my extra .pl files, like majordomo.pl?
  # the environment variable HOME is set by the wrapper
  #
  if ( defined $ENV{"HOME"}) {
--- 10,16 ----
  #
  $whoami_owner = "Majordomo-Owner\@$whereami";
  
! # $homedir -- Where can I find the top of the majordomo tree?
  # the environment variable HOME is set by the wrapper
  #
  if ( defined $ENV{"HOME"}) {
***************
*** 18,23 ****
--- 18,30 ----
  } else {
       $homedir = "/usr/test/majordomo";
  }
+ 
+ # $bindir -- Where can I find my extra .pl files, like majordomo.pl?
+ # If bindir is in $homedir/bin then the Makefile needs to reflect this also.
+ # to make wrapper happy.
+ #
+ $bindir = "$homedir/bin";
+ # $bindir = "$homedir";
  
  # $listdir -- Where are the mailing lists?
  #
===================================================================
RCS file: RCS/config-test,v
retrieving revision 1.1
diff -c -r1.1 config-test
*** 1.1	1996/09/25 03:58:22
--- config-test	1996/09/25 03:59:29
***************
*** 69,75 ****
  
  print "\n--==> Majordomo home directory is $homedir.\n";
  
! unshift(@INC, $homedir);
  
  &header("Include directories");
  foreach (@INC) {
--- 69,75 ----
  
  print "\n--==> Majordomo home directory is $homedir.\n";
  
! unshift(@INC, $bindir);
  
  &header("Include directories");
  foreach (@INC) {
***************
*** 210,216 ****
  print "your majordomo.cf file...";
  
  open($cf, $cf) || &bad("Couldn't open $cf for reading, $!");
! open(S, 'sample.cf') || &bad("Couldn't open sample.cf for reading, $!");
  
  while (<S>) {
      next if !/^($\w+)/;
--- 210,216 ----
  print "your majordomo.cf file...";
  
  open($cf, $cf) || &bad("Couldn't open $cf for reading, $!");
! open(S, 'sample.cf') || open(S, 'bin/sample.cf') || &bad("Couldn't open sample.cf for reading, $!");
  
  while (<S>) {
      next if !/^($\w+)/;
===================================================================
RCS file: RCS/bounce-remind,v
retrieving revision 1.1
diff -c -r1.1 bounce-remind
*** 1.1	1996/09/25 04:01:03
--- bounce-remind	1996/09/25 04:01:48
***************
*** 33,39 ****
  chdir("$homedir");
  
  # All these should be in the standard PERL library
! unshift(@INC, $homedir);
  
  # Set these here so that they can be interploated on the $mailer command line.
  $sender = "nobody\@$whereami";
--- 33,39 ----
  chdir("$homedir");
  
  # All these should be in the standard PERL library
! unshift(@INC, $bindir);
  
  # Set these here so that they can be interploated on the $mailer command line.
  $sender = "nobody\@$whereami";
===================================================================
RCS file: RCS/majordomo,v
retrieving revision 1.1
diff -c -r1.1 majordomo
*** 1.1	1996/09/25 04:01:03
--- majordomo	1996/09/25 04:01:57
***************
*** 58,64 ****
  print STDERR "$0: starting\n" if $DEBUG;
  
  # All these should be in the standard PERL library
! unshift(@INC, $homedir);
  require "ctime.pl";		# To get MoY definitions for month abbrevs
  require "majordomo_version.pl";	# What version of Majordomo is this?
  require "majordomo.pl";		# all sorts of general-purpose Majordomo subs
--- 58,64 ----
  print STDERR "$0: starting\n" if $DEBUG;
  
  # All these should be in the standard PERL library
! unshift(@INC, $bindir);
  require "ctime.pl";		# To get MoY definitions for month abbrevs
  require "majordomo_version.pl";	# What version of Majordomo is this?
  require "majordomo.pl";		# all sorts of general-purpose Majordomo subs
===================================================================
RCS file: RCS/medit,v
retrieving revision 1.1
diff -c -r1.1 medit
*** 1.1	1996/09/25 04:01:03
--- medit	1996/09/25 04:02:02
***************
*** 29,35 ****
  require "$cf"  || die 'require of majordomo.cf failed';
  
  # All these should be in the standard PERL library
! unshift(@INC, $homedir);
  require "shlock.pl";		# NNTP-style file locking
  require "majordomo.pl";
  
--- 29,35 ----
  require "$cf"  || die 'require of majordomo.cf failed';
  
  # All these should be in the standard PERL library
! unshift(@INC, $bindir);
  require "shlock.pl";		# NNTP-style file locking
  require "majordomo.pl";
  
===================================================================
RCS file: RCS/request-answer,v
retrieving revision 1.1
diff -c -r1.1 request-answer
*** 1.1	1996/09/25 04:01:03
--- request-answer	1996/09/25 04:02:08
***************
*** 26,32 ****
  require "$cf"  || die 'require of majordomo.cf failed';
  
  chdir($homedir) || die("Can't chdir(\"$homedir\"): $!");
! unshift(@INC, $homedir);
  require "shlock.pl";
  require "majordomo.pl";
  
--- 26,32 ----
  require "$cf"  || die 'require of majordomo.cf failed';
  
  chdir($homedir) || die("Can't chdir(\"$homedir\"): $!");
! unshift(@INC, $bindir);
  require "shlock.pl";
  require "majordomo.pl";
  
===================================================================
RCS file: RCS/resend,v
retrieving revision 1.1
diff -c -r1.1 resend
*** 1.1	1996/09/25 04:01:03
--- resend	1996/09/25 04:02:31
***************
*** 92,98 ****
  
  chdir($homedir) || die("Can't chdir(\"$homedir\"): $!");
  
! unshift(@INC, $homedir);
  require "ctime.pl";  # For logging purposes
  require "majordomo.pl";
  require "majordomo_version.pl";
--- 92,98 ----
  
  chdir($homedir) || die("Can't chdir(\"$homedir\"): $!");
  
! unshift(@INC, $bindir);
  require "ctime.pl";  # For logging purposes
  require "majordomo.pl";
  require "majordomo_version.pl";
===================================================================
RCS file: contrib/RCS/archive.pl,v
retrieving revision 1.1
diff -c -r1.1 contrib/archive.pl
*** 1.1	1996/09/25 02:12:21
--- contrib/archive.pl	1996/09/25 02:12:37
***************
*** 50,56 ****
  # Written by Alan Millar August 25 1993.  
  
  # All these should be in the standard PERL library
! unshift(@INC, $homedir);
  require "majordomo.pl";		# all sorts of general-purpose Majordomo subs
  require "shlock.pl";		# NNTP-style file locking
  
--- 50,56 ----
  # Written by Alan Millar August 25 1993.  
  
  # All these should be in the standard PERL library
! unshift(@INC, $bindir);
  require "majordomo.pl";		# all sorts of general-purpose Majordomo subs
  require "shlock.pl";		# NNTP-style file locking
  
===================================================================
RCS file: contrib/RCS/archive2.pl,v
retrieving revision 1.1
diff -c -r1.1 contrib/archive2.pl
*** 1.1	1996/09/25 02:12:44
--- contrib/archive2.pl	1996/09/25 02:13:00
***************
*** 57,63 ****
  eval(`cat $cf`);
  
  # All these should be in the standard PERL library
! unshift(@INC, $homedir);
  require "ctime.pl";		# To get MoY definitions for month abbrevs
  require "majordomo_version.pl";	# What version of Majordomo is this?
  require "majordomo.pl";		# all sorts of general-purpose Majordomo subs
--- 57,63 ----
  eval(`cat $cf`);
  
  # All these should be in the standard PERL library
! unshift(@INC, $bindir);
  require "ctime.pl";		# To get MoY definitions for month abbrevs
  require "majordomo_version.pl";	# What version of Majordomo is this?
  require "majordomo.pl";		# all sorts of general-purpose Majordomo subs
===================================================================
RCS file: contrib/RCS/digest,v
retrieving revision 1.1
diff -c -r1.1 contrib/digest
*** 1.1	1996/09/25 02:08:47
--- contrib/digest	1996/09/25 02:51:35
***************
*** 22,28 ****
  &init;
  &readconfig;
  
! require "shlock.pl";
  
  $sendmail_command = "/usr/lib/sendmail" if ! defined $sendmail_command ;
  
--- 22,32 ----
  &init;
  &readconfig;
  
! if (-f "shlock.pl") {
!         require "shlock.pl";
! } else {
!         require "bin/shlock.pl";
! }
  
  $sendmail_command = "/usr/lib/sendmail" if ! defined $sendmail_command ;
  
===================================================================
RCS file: contrib/RCS/digest.num,v
retrieving revision 1.1
diff -c -r1.1 contrib/digest.num
*** 1.1	1996/09/25 02:18:56
--- contrib/digest.num	1996/09/25 02:19:41
***************
*** 14,19 ****
--- 14,20 ----
  eval(`cat $cf`) || die "eval of majordomo.cf failed $@";
  # chdir("$homedir");
  
+ unshift(@INC, $bindir);
  require "shlock.pl";
  require "config_parse.pl";
  require "getopt.pl";
===================================================================
RCS file: contrib/RCS/new-list,v
retrieving revision 1.1
diff -c -r1.1 contrib/new-list
*** 1.1	1996/09/25 02:11:42
--- contrib/new-list	1996/09/25 02:12:06
***************
*** 25,31 ****
  require "$cf"  || die 'require of majordomo.cf failed';
  
  chdir($homedir) || die("Can't chdir(\"$homedir\"): $!");
! unshift(@INC, $homedir);
  require "majordomo.pl";
  
  &ParseMailHeader(STDIN, *hdrs);
--- 25,31 ----
  require "$cf"  || die 'require of majordomo.cf failed';
  
  chdir($homedir) || die("Can't chdir(\"$homedir\"): $!");
! unshift(@INC, $bindir);
  require "majordomo.pl";
  
  &ParseMailHeader(STDIN, *hdrs);
===================================================================
RCS file: contrib/RCS/sequencer,v
retrieving revision 1.1
diff -c -r1.1 contrib/sequencer
*** 1.1	1996/09/25 02:16:39
--- contrib/sequencer	1996/09/25 02:16:57
***************
*** 58,64 ****
  eval(`cat $cf`)  || die 'eval of majordomo.cf failed';
  
  chdir($homedir) || die("Can't chdir(\"$homedir\"): $!");
! unshift(@INC, $homedir);
  require "majordomo.pl";
  require "majordomo_version.pl";
  require "getopts.pl";
--- 58,64 ----
  eval(`cat $cf`)  || die 'eval of majordomo.cf failed';
  
  chdir($homedir) || die("Can't chdir(\"$homedir\"): $!");
! unshift(@INC, $bindir);
  require "majordomo.pl";
  require "majordomo_version.pl";
  require "getopts.pl";







References:
Indexed By Date Previous: Majordomo Bombing
From: Evan Champion <evanc@synapse.net>
Next: Preliminary patch to call beta 4.
From: Chan Wilson <cwilson@slurp.neu.sgi.com>
Indexed By Thread Previous: Re: Majordomo 1.94 Beta 3, whee!!
From: "Randall S. Winchester" <rsw@Glue.umd.edu>
Next: Re: Majordomo 1.94 Beta 3, whee!!
From: "Steven K. Buehler" <skb@sbcomp.net>

Google
 
Search Internet Search www.greatcircle.com