* Re: mlmmj on Solaris
@ 2006-09-25 20:07 Morten K. Poulsen
2006-09-25 21:08 ` Morten K. Poulsen
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Morten K. Poulsen @ 2006-09-25 20:07 UTC (permalink / raw)
To: mlmmj
Hi Rob,
I am sending the reply with CC to the list. I hope that's OK.
Rob Shepherd <rob@techniumcast.com> wrote:
> First, thanks for mlmmj. Neat.
You're welcome :)
> I have some notes regarding my recent experience with building mlmmj on
> Solaris 10.
Nice. I think you're the first to do that. Do you know if it is possible to get a shell account on a Solaris box anywhere, to test the next mlmmj release?
> 1.
> CFLAGS="-D_POSIX_PTHREAD_SEMANTICS"
>
> ...is required.
That is very strange. Mlmmj does not use threads or any kind of pthread library feature. What happens if you compile without?
> 2.
> /bin/sh in Solaris is Posix shell and is much more strict than /bin/sh
> on linux (which i think is just bash). mlmmj-make-ml.sh needs..
>
> #!/bin/bash
Which features of bash are needed in the script now? Would it be possible to change it to not use those features?
> 3.
> If mlmmj-maintd is not in the path, which does something different to
> what you might expect.
>
> [08:58:18][root@zorch-mail:/usr/local/mlmmj/bin]$ which mlmmj-maintd
> no mlmmj-maintd in /usr/sbin /usr/bin /opt/csw/bin /opt/csw/gcc3/bin
> /usr/ccs/bin /opt/SUNWspro/bin
>
> I added the ${prefix}/bin to the PATH at start of mlmmj-make-ml.sh
Hmmm, I guess the binaries should be found via a autoconf(?) variable like @textlibdir@. Would that work? Henne?
> 4.
> Aliases. I use a seperate aliases file /usr/local/mlmmj/etc/aliases.
> The form for this alias file, when used with postfix at least, does not
> use a ': ' seperator, rather just white space. I have adjusted my
> make-mlmmj-ml.sh. Another reason for using a seperate aliases file is
> that postfix (2.2.10 at least) is able to perform the spooling or
> command pipe with the uid of the aliases file. On solaris the user
> smmsp always exists, even if sendmail is not installed. I may then do...
>
> chown smmsp:smmsp /usr/local/mlmmj/etc/aliases
> chown -R smmsp:smmsp /var/spool/mlmmj
>
> ...and it runs as smmsp.
That is a nice feature. Perhaps the script could check the mailer, and write a seperate alias file if it is supported. A patch would be appreciated ;)
> Other than that, It's great. Keep up the good work.
Thanks :)
> Feel free to put my notes in a README.Solaris or whatever.
I will, if we can't find good solutions for the (few) issues. The thing about Postfix and separate alias file - will that work on any operating system?
Morten
--
Morten K. Poulsen <morten@afdelingp.dk>
http://www.afdelingp.dk/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mlmmj on Solaris
2006-09-25 20:07 mlmmj on Solaris Morten K. Poulsen
@ 2006-09-25 21:08 ` Morten K. Poulsen
2006-09-25 21:33 ` Magnus Naeslund(k)
2006-09-26 8:26 ` Magnus Naeslund(k)
2 siblings, 0 replies; 4+ messages in thread
From: Morten K. Poulsen @ 2006-09-25 21:08 UTC (permalink / raw)
To: mlmmj
Hi Rob,
Rob Shepherd <rob@techniumcast.com> wrote:
> Morten K. Poulsen wrote:
>> Nice. I think you're the first to do that. Do you know if it is possible
>> to get a shell account on a Solaris box anywhere, to test the next mlmmj
>> release?
>
> Yes. I'll see what I can do.
Cool, thanks.
>>> 1.
>>> CFLAGS="-D_POSIX_PTHREAD_SEMANTICS"
>>>
>>> ...is required.
>>
>> That is very strange. Mlmmj does not use threads or any kind of pthread
> library feature. What happens if you compile without?
>
> It's nothing to do with threads, rather Solaris compatability issues.
>
> log_oper.c: In function `log_oper':
> log_oper.c:76: error: too few arguments to function `ctime_r'
Ah, ok. We could change ctime_r to ctime, as we are not using threads. The Solaris version of ctime_r requires a buflen paremeter - not POSIX compliant.
>>> 2.
>>> /bin/sh in Solaris is Posix shell and is much more strict than /bin/sh
>>> on linux (which i think is just bash). mlmmj-make-ml.sh needs..
>>>
>>> #!/bin/bash
>>
>> Which features of bash are needed in the script now? Would it be
> possible to change it to not use those features?
>
> it fails first with 'let', don't know after that. I switched to bash.
Ok, any shell scripting gurus on the list? :)
>>> 3.
>>> If mlmmj-maintd is not in the path, which does something different to
>>> what you might expect.
[snip]
>> Hmmm, I guess the binaries should be found via a autoconf(?) variable
>> like @textlibdir@. Would that work? Henne?
>
> I'll let you figure that one out. :)
Ok, any autoconf gurus on the list? :)
>>> 4.
>>> Aliases. I use a seperate aliases file /usr/local/mlmmj/etc/aliases.
[snip]
>> That is a nice feature. Perhaps the script could check the mailer, and
>> write a seperate alias file if it is supported. A patch would be
>> appreciated ;)
[snip]
> I dislike user scripts which attempt to guess the environment and do
> what is best for the creator as opposed to the user.
[snip]
> I guess, the compile time options...
>
> --with-postfix-alias-file=%path/to/alias/file%
>
> will set the "lack of" ':' in the alias file, it's location and the fact
> that the user wants the make script to write it for him/her.
>
> --with-postfix-alias-user=%uid%
>
> will set the uid to write and own the files as.
Will that work for the distros? Søren, Andrea, Henne, ...?
[snip]
> Thinks outloud..... what needs to be done as this user... hmmm
>
> 1. creating the spool area.
> 2. writing the alias file.
> 3. running the maintd from cron.
>
> If we assume all operations are carried by root, then (1) can be done
> with a chown, (2) can be done with an su in the right place and (3) can
> be done with however one switches privs in c-code.
1. mlmmj-make-ml.sh -c will do that chown.
2. could also be a chown in mlmmj-make-ml.sh, I guess.
3. mlmmj-maintd does a setuid() to the owner of the list directory, if run as root.
Morten
--
Morten K. Poulsen <morten@afdelingp.dk>
http://www.afdelingp.dk/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mlmmj on Solaris
2006-09-25 20:07 mlmmj on Solaris Morten K. Poulsen
2006-09-25 21:08 ` Morten K. Poulsen
@ 2006-09-25 21:33 ` Magnus Naeslund(k)
2006-09-26 8:26 ` Magnus Naeslund(k)
2 siblings, 0 replies; 4+ messages in thread
From: Magnus Naeslund(k) @ 2006-09-25 21:33 UTC (permalink / raw)
To: mlmmj
Morten K. Poulsen wrote:
>>>> 2.
>>>> /bin/sh in Solaris is Posix shell and is much more strict than /bin/sh
>>>> on linux (which i think is just bash). mlmmj-make-ml.sh needs..
>>>>
>>>> #!/bin/bash
>>> Which features of bash are needed in the script now? Would it be
>> possible to change it to not use those features?
>>
>> it fails first with 'let', don't know after that. I switched to bash.
>
> Ok, any shell scripting gurus on the list? :)
>
Well, I don't want to claim such a title...
But does
/bin/sh -c "echo $((1+1))"
result in "2" for you, Rob?
If it does we could switch to using that syntax, since we're only using "let" in one place.
It works with zsh, tcsh, ksh and bash on my box.
Regards,
Magnus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mlmmj on Solaris
2006-09-25 20:07 mlmmj on Solaris Morten K. Poulsen
2006-09-25 21:08 ` Morten K. Poulsen
2006-09-25 21:33 ` Magnus Naeslund(k)
@ 2006-09-26 8:26 ` Magnus Naeslund(k)
2 siblings, 0 replies; 4+ messages in thread
From: Magnus Naeslund(k) @ 2006-09-26 8:26 UTC (permalink / raw)
To: mlmmj
[-- Attachment #1: Type: text/plain, Size: 605 bytes --]
Rob Shepherd wrote:
>> But does
>>
>> /bin/sh -c "echo $((1+1))"
>>
>> result in "2" for you, Rob?
>
>
> Yes it does.
>
> Send me an updated mlmmj-make-ml.sh with the updated scripting...
>
> I'll test it.
>
Ok this is a patch against mlmmj-1.2.12-RC3, tell me if you need the
patch against some other version.
You apply it by issuing these commands:
cd mlmmj-1.2.12-RC3
patch -p1 < mlmmj-let-go-1.diff
And then try "make" again.
Also, could you please use "Reply To All" when youre answering mails to
the mlmmj list? The list doesn't automatically gets a copy otherwise...
Regards,
Magnus
[-- Attachment #2: mlmmj-let-go-1.diff --]
[-- Type: text/x-patch, Size: 310 bytes --]
--- mlmmj-1.2.12-RC3-vanilla/src/mlmmj-make-ml.sh.in 2005-10-02 16:54:33.000000000 +0200
+++ mlmmj-1.2.12-RC3/src/mlmmj-make-ml.sh.in 2006-09-26 10:16:47.000000000 +0200
@@ -46,7 +46,7 @@
exit 1
esac
done
-let SHIFTVAL=$OPTIND-1
+SHIFTVAL=$(( $OPTIND - 1 ))
shift $SHIFTVAL
if [ -z "$SPOOLDIR" ]; then
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-09-26 8:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-25 20:07 mlmmj on Solaris Morten K. Poulsen
2006-09-25 21:08 ` Morten K. Poulsen
2006-09-25 21:33 ` Magnus Naeslund(k)
2006-09-26 8:26 ` Magnus Naeslund(k)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.