This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: email.sh exit code 1 postinstall script with no-admin (was: Bug in strftime %z) (was: Possible defect in email.exe re: sent timestamp)
- From: Bob Doskuno <bigbob2k01 at yahoo dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Fri, 9 Jan 2015 21:24:39 +0000 (UTC)
- Subject: Re: email.sh exit code 1 postinstall script with no-admin (was: Bug in strftime %z) (was: Possible defect in email.exe re: sent timestamp)
- Authentication-results: sourceware.org; auth=none
- References: <20150108152638 dot GQ4190 at calimero dot vinschen dot de>
- Reply-to: Bob Doskuno <bigbob2k01 at yahoo dot com>
On Thursday, January 8, 2015 10:27 AM, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
On Jan 7 22:50, Corinna Vinschen wrote:
> Hi Christian,
>
>
> thanks for the testcase!
>
> On Dec 19 19:44, Christian Franke wrote:
...
> > > > $ ./strftest 1419010000
> > 2014-12-19 18:26:40 +0200 (CET)
> >
> > $ ./strftest 1436200000
> > 2015-07-06 18:26:40 +0053 (CEST)
>
> Surprisingly this is an old problem which exists in this form since 2011.
> Weird that nobody noticed it so far. Or I missed earlier bug reports :}
I uploaded a snapshot containing the fixes in tzload and strftime to
https://cygwin.com/snapshots/ Please give it a try.
======================
I didn't try the snapshot, but I did try email.
Now, running setup (with no-admin) gives a postinstall script error. Sending a couple test emails worked, but there seems to be an invalid assumption, that the user will have admin, in the postinstall script, giving:
Package: _/Unknown package
email.sh exit code 1
/var/log/setup.log.full excerpt:
2015/01/09 11:50:41 running: C:\cygwin64\bin\bash.exe --norc --noprofile "/etc/postinstall/email.sh"
chown: changing ownership of '/etc/defaults/etc/email/email.address.template': Permission denied
chown: changing ownership of '/etc/defaults/etc/email/email.conf': Permission denied
chown: changing ownership of '/etc/defaults/etc/email/email.help': Permission denied
chown: changing ownership of '/etc/defaults/etc/email/email.sig': Permission denied
chown: changing ownership of '/etc/defaults/etc/email/mime.types': Permission denied
2015/01/09 11:50:44 abnormal exit: exit code=1
Excerpt from /etc/postinstall/email.sh where error happens:
SYSTEMUID=$(sed -ne '/^[^:]*:[^:]*:[0-9]*:[0-9]*:[^:]*,S-1-5-18:.*:/{s/[^:]*:[^:]*:\([0-9]*\):.*$/\1/p;q}' /etc/passwd)
ADMINSGID=$(sed -ne '/^[^:]*:S-1-5-32-544:.*:/{s/[^:]*:[^:]*:\([0-9]*\):.*$/\1/p;q}' /etc/group)
setfacl -m u::rw-,g::rw-,o:r-- /etc/defaults/etc/email/*
if [ -n "${SYSTEMUID}" -a -n "${ADMINSGID}" ]
then
chown "${SYSTEMUID}:${ADMINSGID}" /etc/defaults/etc/email/*
else
...
This is using cygwin 1.7.34-003 x86_64.
>>> Q: Why is a top posting reminder annoying?
>> A: Because many irrelevant results appear in searches for "email"
> Q: Are you sure?
A: Somewhat. :)
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple