<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 29, 2014 at 9:03 AM, Denis Shulyaka <span dir="ltr"><<a href="mailto:shulyaka@gmail.com" target="_blank">shulyaka@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm currently packaging a 2.11.1 version. Here is the link:<br>
<br>
<a href="http://shulyaka.org.ru/pub/tinycdb.tar.gz" target="_blank">http://shulyaka.org.ru/pub/tinycdb.tar.gz</a><br>
<a href="http://shulyaka.org.ru/pub/postfix.tar.gz" target="_blank">http://shulyaka.org.ru/pub/postfix.tar.gz</a></blockquote><div><br></div><div>these links are broken... no packages found.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
2014-09-29 2:04 GMT+04:00 W. Michael Petullo <<a href="mailto:mike@flyn.org">mike@flyn.org</a>>:<br>
<span class="">>> Wow! I'm happy that someone new joined the party. Toes it mean that binary<br>
>> packages for Barrier Breaker are going to be available? I'm asking because<br>
>> during the compilation I get the following error:<br>
>><br>
>> /mnt/trash/barrier_breaker-14.07-rc3/OpenWrt-SDK-ar71xx-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.8.3/../../../../mips-openwrt-linux-uclibc/bin/ld:<br>
>> skipping incompatible /usr/lib64/libc.so when searching for -lc<br>
>> collect2: error: ld returned 1 exit status<br>
>> Makefile:50: recipe for target 'master' failed<br>
><br>
> Postfix compiles fine on my build host (Fedora 20), but actually creating<br>
> the packages causes the following errors (here it looks like the script<br>
> is trying to manipulate my build host's root filesystem):<br>
><br>
>> Configuring postfix.<br>
>> postfix: error: to submit mail, use the Postfix sendmail command<br>
>> postfix: fatal: the postfix command is reserved for the superuser<br>
>> postfix: error: to submit mail, use the Postfix sendmail command<br>
>> postfix: fatal: the postfix command is reserved for the superuser<br>
>> postalias: fatal: open /etc/aliases.db: Permission denied<br>
>> grep: /etc/sysupgrade.conf: No such file or directory<br>
>> /home/mike/Source/openwrt/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx//usr/lib/opkg/info/postfix.postinst: line 24: [: -eq: unary operator expected<br>
>> /home/mike/Source/openwrt/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx//usr/lib/opkg/info/postfix.postinst: line 29: /etc/init.d/postfix: No such file or directory<br>
><br>
> The following is the postinst script, with some comments inline:<br>
<br>
</span>This has been fixed (with the help from Reinhard Schu) in the 2.11.1<br>
package. It was a bug in postinst script.<br>
<span class=""><br>
>> define Package/postfix/postinst<br>
>> #!/bin/sh<br>
>> if [ `grep -c postfix /etc/passwd` -eq 0 ]<br>
>> then<br>
>>  echo "postfix:x:34:" >> /etc/group<br>
>>  echo "postdrop:x:35:" >> /etc/group<br>
>>  echo "postfix:!:34:34::/var:/bin/false" >> /etc/passwd<br>
>> fi<br>
><br>
> Adding users often goes in the init.d script where we can make use of some<br>
> common shell functions. See, for example, lighttpd's use of user_exists<br>
> in lighttpd.init at:<br>
><br>
>         <a href="https://github.com/openwrt/packages/blob/master/net/lighttpd/files/lighttpd.init" target="_blank">https://github.com/openwrt/packages/blob/master/net/lighttpd/files/lighttpd.init</a><br>
<br>
</span>Thanks for the hint! I've applied it.<br>
<span class=""><br>
>> if [ ! -f /etc/services ] || [ `grep -c smtp /etc/services` -eq 0 ]<br>
>> then<br>
>>  echo "smtp            25/tcp          mail" >> /etc/services<br>
>>  echo "smtp            25/udp          mail" >> /etc/services<br>
>> fi<br>
><br>
> I think /etc/services always includes smtp on OpenWrt. Is this not<br>
> correct?<br>
<br>
</span>I think I just had a broken setup some time ago, it was completely<br>
empty. However now I can see a lot of services there so I think it is<br>
safe to remove. Thanks again for the hint!<br>
<span class=""><br>
>> if [ ! -f /etc/aliases ]<br>
>> then<br>
>>  ln -s /etc/postfix/aliases /etc/aliases<br>
>> fi<br>
><br>
> Why do we need /etc/aliases?<br>
<br>
</span>This is a default location hard built into postfix in src/util/sys_defs.h file:<br>
<br>
#define ALIAS_DB_MAP    DEF_DB_TYPE ":/etc/aliases"<br>
<br>
It can be redefined in the user config file. I was going to write a<br>
patch but thought /etc/aliases is where users would look for it, so I<br>
made a soft link. Do you think it is wrong?<br>
<span class=""><br>
>> postfix set-permissions<br>
>> postfix upgrade-configuration<br>
>> newaliases<br>
>> if [ `ps | grep "postfix/master" | grep -cv grep` -gt 0 ]<br>
>> then<br>
>>  postfix reload<br>
>> fi<br>
>> if [ `grep -c aliases /etc/sysupgrade.conf` -eq 0 ]<br>
>> then<br>
>>  echo "/etc/postfix/<a href="http://main.cf" target="_blank">main.cf</a>" >> /etc/sysupgrade.conf<br>
>>  echo "/etc/postfix/aliases" >> /etc/sysupgrade.conf<br>
>> fi<br>
>> /etc/init.d/postfix enable<br>
>> endef<br>
><br>
> Thanks,<br>
><br>
> --<br>
> Mike<br>
><br>
> :wq<br>
<br>
</span>Best regards,<br>
Denis Shulyaka<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
openwrt-devel mailing list<br>
<a href="mailto:openwrt-devel@lists.openwrt.org">openwrt-devel@lists.openwrt.org</a><br>
<a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel" target="_blank">https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel</a><br>
</div></div></blockquote></div><br></div></div>