/bin/sh - POSIX?

2017-03-07 Thread René J . V . Bertin
Hi,

Can someone please confirm whether /bin/sh is still POSIX compliant on 
10.12.latest (i.e. `/bin/sh --version` shows it's actually bash), please?

thanks,
René


Re: /bin/sh - POSIX?

2017-03-07 Thread j. van den hoff
On Tue, 07 Mar 2017 15:12:07 +0100, René J.V. Bertin   
wrote:



Hi,

Can someone please confirm whether /bin/sh is still POSIX compliant on  
10.12.latest (i.e. `/bin/sh --version` shows it's actually bash), please?


thanks,
René


from `man bash':

"If bash is invoked with the name sh, it tries to mimic the startup  
behavior of historical versions of sh
   as  closely as possible, while conforming to the POSIX standard as  
well."



whatever "tries" means exactly ... ;-). there is another hint somewhere  
else at "brace expansion" handling. my reading of that is that you would  
have to call `sh +B' or do `set +B' within your script to get _strict_  
`sh' compliance. -- but better read the manpage yourself ;-)


HTH
joerg


--
Using Opera's revolutionary email client: http://www.opera.com/mail/


Re: /bin/sh - POSIX?

2017-03-07 Thread Yongwei Wu
>From the man page:

Bash is largely compatible with `sh' and incorporates useful
features from the Korn shell `ksh' and the C shell `csh'.  It is
intended to be a conformant implementation of the IEEE POSIX Shell and
Tools portion of the IEEE POSIX specification (IEEE Standard 1003.1).
It offers functional improvements over `sh' for both interactive and
programming use.

and

Starting Bash with the `--posix' command-line option or executing `set
-o posix' while Bash is running will cause Bash to conform more closely
to the POSIX standard by changing the behavior to match that specified
by POSIX in areas where the Bash default differs.

When invoked as `sh', Bash enters POSIX mode after reading the
startup files.

On 7 March 2017 at 22:12, René J.V. Bertin  wrote:
> Hi,
>
> Can someone please confirm whether /bin/sh is still POSIX compliant on 
> 10.12.latest (i.e. `/bin/sh --version` shows it's actually bash), please?
>
> thanks,
> René



-- 
Yongwei Wu
URL: http://wyw.dcweb.cn/


Re: /bin/sh - POSIX?

2017-03-07 Thread René J . V . Bertin
Thanks. This doesn't really answer the question if /bin/sh is still bash but I 
suppose there is little chance that has changed since 10.9 .

R.


Re: /bin/sh - POSIX?

2017-03-07 Thread Julien Salort
René J.V. Bertin  wrote:

> Thanks. This doesn't really answer the question if /bin/sh is still bash
> but I suppose there is little chance that has changed since 10.9 .

I am running Sierra 10.12.3.

% /bin/sh --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)
Copyright (C) 2007 Free Software Foundation, Inc.

HTH,

-- 
http://www.juliensalort.org



`port self update` fails

2017-03-07 Thread Rasku, Stephen (GE Digital)
I am trying to do a “selfupdate” but it’s failing.  Note that our company may 
be blocking outgoing pings so that might explain the problematic 
ping/traceroute results.  I am able to get to rsync.macports.org but it 
re-directs to distfiles.macports.org.  Usually I am behind a proxy but I ran 
this test on our external network.

Is there any way I can fix this?
 
$ sudo port -d selfupdate 
DEBUG: Copying /Users/212434537/Library/Preferences/com.apple.dt.Xcode.plist to 
/opt/local/var/macports/home/Library/Preferences
DEBUG: MacPorts sources location: 
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs
--->  Updating MacPorts base sources using rsync
DEBUG: system: /usr/bin/rsync -rtzv --delete-after 
rsync://rsync.macports.org/macports/release/tarballs/base.tar 
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs
rsync: failed to connect to rsync.macports.org: No route to host (65)
rsync error: error in socket IO (code 10) at 
/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-51/rsync/clientserver.c(106)
 [receiver=2.6.9]
Command failed: /usr/bin/rsync -rtzv --delete-after 
rsync://rsync.macports.org/macports/release/tarballs/base.tar 
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs
Exit code: 10
$ sudo /usr/bin/rsync -rtzv --delete-after 
rsync://rsync.macports.org/macports/release/tarballs/base.tar 
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs
rsync: failed to connect to rsync.macports.org: No route to host (65)
rsync error: error in socket IO (code 10) at 
/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-51/rsync/clientserver.c(106)
 [receiver=2.6.9]
$ ping rsync.macports.org
PING ftp.rrze.uni-erlangen.de (131.188.12.211): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
^C
$ traceroute rsync.macports.org
traceroute to ftp.rrze.uni-erlangen.de (131.188.12.211), 64 hops max, 52 byte 
packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
$ route get rsync.macports.org
   route to: ftp.rrze.uni-erlangen.de
destination: ftp.rrze.uni-erlangen.de
gateway: 172.16.21.1
  interface: en0
  flags: 
 recvpipe  sendpipe  ssthresh  rtt,msecrttvar  hopcount  mtu expire
   0 0 0 0 0 0  1500 0 
$ host rsync.macports.org
rsync.macports.org is an alias for nue.de.rsync.macports.org.
nue.de.rsync.macports.org is an alias for ftp.fau.de.
ftp.fau.de is an alias for ftp.rrze.uni-erlangen.de.
ftp.rrze.uni-erlangen.de has address 131.188.12.211
ftp.rrze.uni-erlangen.de has IPv6 address 2001:638:a000:1021:21::1

…Stephen



Unsubscribe from GE's commercial electronic messages: 
http://sc.ge.com/*casl-unsubscribe 
Désabonner des messages électroniques commerciaux de GE: 
http://sc.ge.com/*lcap-desabonnement


Re: /bin/sh - POSIX?

2017-03-07 Thread j. van den hoff
On Tue, 07 Mar 2017 15:41:42 +0100, René J.V. Bertin   
wrote:


Thanks. This doesn't really answer the question if /bin/sh is still bash  
but I suppose there is little chance that has changed since 10.9 .


right. and I would have thought _that_ part of your original mail (the  
main part seemingly was concerned with POSIX compliance, no?) you had  
already answered yourself via issuing `/bin/sh --version'?





R.



--
Using Opera's revolutionary email client: http://www.opera.com/mail/


Re: Is Macports down?

2017-03-07 Thread Dave Horsfall
On Tue, 7 Mar 2017, Dave Horsfall wrote:

> Thanks; that nails it to my back yard, then :-(

A posting on an unrelated subject reminded me about something: I recently 
upgraded my broadband service from ADSL (copper) to fibre, and a new 
router was supplied.  I've since discovered that the router (a Sagemcomm 
F@st 5355), get this, *does not pass outbound UDP packets*!  (And I cannot 
configure its firewall to do so.)  So things like NTP and TRACEROUTE etc 
are stuffed...

So, my question is: is UDP used anywhere in the update process?

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


Re: Is Macports down?

2017-03-07 Thread Daniel J. Luke
On Mar 7, 2017, at 10:55 AM, Dave Horsfall  wrote:
> On Tue, 7 Mar 2017, Dave Horsfall wrote:
> A posting on an unrelated subject reminded me about something: I recently 
> upgraded my broadband service from ADSL (copper) to fibre, and a new 
> router was supplied.  I've since discovered that the router (a Sagemcomm 
> F@st 5355), get this, *does not pass outbound UDP packets*!  (And I cannot 
> configure its firewall to do so.)  So things like NTP and TRACEROUTE etc 
> are stuffed...

DNS uses udp (and some tcp). I'd be really surprised if it blocked /all/ udp 
packets (and if so, I would get my provider to replace it or let me replace it 
with something that didn't suck).

> So, my question is: is UDP used anywhere in the update process?

The rsync itself uses tcp

-- 
Daniel J. Luke





fail to destroot port with only makefile

2017-03-07 Thread db
I'm trying to port a client that comes with only a makefile, but fail to 
destroot it, although it sort of does if I sudo manually. I attach the log.

https://github.com/tldr-pages/tldr-cpp-client/blob/master/Makefile



main.log
Description: Binary data


Re: fail to destroot port with only makefile

2017-03-07 Thread Ryan Schmidt

On Mar 7, 2017, at 10:15, db wrote:

> I'm trying to port a client that comes with only a makefile, but fail to 
> destroot it, although it sort of does if I sudo manually. I attach the log.
> 
> https://github.com/tldr-pages/tldr-cpp-client/blob/master/Makefile
> 
> 

The Makefile does not support DESTDIR. Ideally, fix the Makefile to support 
DESTDIR and submit that to the developers.

This question is better asked on macports-dev, since it's about developing 
ports, not using existing ports.

Re: `port self update` fails

2017-03-07 Thread Ryan Schmidt

> On Mar 7, 2017, at 09:32, Rasku, Stephen (GE Digital)  
> wrote:
> 
> I am trying to do a “selfupdate” but it’s failing.

Has it ever worked?

> Note that our company may be blocking outgoing pings so that might explain 
> the problematic ping/traceroute results.

Tell your company to fix that; that's broken and it will interfere with 
MacPorts being able to determine what server is closest to you for fastest 
service.

> I am able to get to rsync.macports.org but it re-directs to 
> distfiles.macports.org.

rsync.macports.org is an rsync server, not a web server, so there's no reason 
to access it in a web browser. If you do, it will, for historical reasons, 
redirect to distfiles.

> Usually I am behind a proxy but I ran this test on our external network.
> 
> Is there any way I can fix this?
> 
> $ sudo port -d selfupdate 
> DEBUG: Copying /Users/212434537/Library/Preferences/com.apple.dt.Xcode.plist 
> to /opt/local/var/macports/home/Library/Preferences
> DEBUG: MacPorts sources location: 
> /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs
> --->  Updating MacPorts base sources using rsync
> DEBUG: system: /usr/bin/rsync -rtzv --delete-after 
> rsync://rsync.macports.org/macports/release/tarballs/base.tar 
> /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs
> rsync: failed to connect to rsync.macports.org: No route to host (65)

Consult your network administrator.




Re: /bin/sh - POSIX?

2017-03-07 Thread René J . V . Bertin
On Tuesday March 07 2017 16:32:37 j. van den hoff wrote:

> right. and I would have thought _that_ part of your original mail (the  
> main part seemingly was concerned with POSIX compliance, no?) you had  
> already answered yourself via issuing `/bin/sh --version'?

Indeed, but on 10.9 . I needed to be certain that there had been no changes no 
matter how unlikely that seemed (or not, given Apple's allergy towards GPL'ed 
software).

R.


Re: Is Macports down?

2017-03-07 Thread Dave Horsfall
On Tue, 7 Mar 2017, Daniel J. Luke wrote:

> DNS uses udp (and some tcp). I'd be really surprised if it blocked /all/ 
> udp packets (and if so, I would get my provider to replace it or let me 
> replace it with something that didn't suck).

To clarify: DNS works OK, but nothing else on UDP does.  I added a rule 
that's supposed to allow all outbound UDP, but nope.  And yes, a router of 
a different brand is on its way...  This Sagemcom 5355 seems to be 
designed for the gamer brigade.

> > So, my question is: is UDP used anywhere in the update process?
> 
> The rsync itself uses tcp

Thanks.

Anyway, this is getting OT now, so thanks to all for your assistance;
MacPorts is OK after all, and the problem is definitely local.

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


Re: `port self update` fails

2017-03-07 Thread Rasku, Stephen (GE Digital)


On 2017-03-07, 8:33 AM, "Ryan Schmidt"  wrote:

> On Mar 7, 2017, at 09:32, Rasku, Stephen (GE Digital) 
 wrote:
> 
> I am trying to do a “selfupdate” but it’s failing.

Has it ever worked?

It used to work.

> Note that our company may be blocking outgoing pings so that might 
explain the problematic ping/traceroute results.

Tell your company to fix that; that's broken and it will interfere with 
MacPorts being able to determine what server is closest to you for fastest 
service.

Unfortunately, that’s not going to accomplish anything.  It’s a company policy 
and the company has over 300k employees.  I have zero chance of influencing 
this.

> I am able to get to rsync.macports.org but it re-directs to 
distfiles.macports.org.

rsync.macports.org is an rsync server, not a web server, so there's no 
reason to access it in a web browser. If you do, it will, for historical 
reasons, redirect to distfiles.

> Usually I am behind a proxy but I ran this test on our external network.
> 
> Is there any way I can fix this?
> 
> $ sudo port -d selfupdate 
> DEBUG: Copying 
/Users/212434537/Library/Preferences/com.apple.dt.Xcode.plist to 
/opt/local/var/macports/home/Library/Preferences
> DEBUG: MacPorts sources location: 
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs
> --->  Updating MacPorts base sources using rsync
> DEBUG: system: /usr/bin/rsync -rtzv --delete-after 
rsync://rsync.macports.org/macports/release/tarballs/base.tar 
/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs
> rsync: failed to connect to rsync.macports.org: No route to host (65)

Consult your network administrator.

OK, thanks.




Unsubscribe from GE's commercial electronic messages: 
http://sc.ge.com/*casl-unsubscribe 
Désabonner des messages électroniques commerciaux de GE: 
http://sc.ge.com/*lcap-desabonnement


Re: fail to destroot port with only makefile

2017-03-07 Thread db
On 7 Mar 2017, at 17:29, Ryan Schmidt  wrote:
> The Makefile does not support DESTDIR. Ideally, fix the Makefile to support 
> DESTDIR and submit that to the developers.

MacPorts Guide links to 
http://www.gnu.org/prep/standards/html_node/DESTDIR.html, where it states 'You 
should not set the value of DESTDIR in your Makefile at all'. Eventually, I used
destroot.argsprefix=${destroot}${prefix}

> This question is better asked on macports-dev, since it's about developing 
> ports, not using existing ports.

Sorry, I thought macports-dev was for MacPorts devs only. It's not very 
practical, I'd rather get mail from topics I start, reply to or am interested 
in, instead of being subscribed to 2 lists.

Re: fail to destroot port with only makefile

2017-03-07 Thread Ryan Schmidt

On Mar 7, 2017, at 12:37, db wrote:

> On 7 Mar 2017, at 17:29, Ryan Schmidt wrote:
>> The Makefile does not support DESTDIR. Ideally, fix the Makefile to support 
>> DESTDIR and submit that to the developers.
> 
> MacPorts Guide links to 
> http://www.gnu.org/prep/standards/html_node/DESTDIR.html, where it states 
> 'You should not set the value of DESTDIR in your Makefile at all'.

That's correct, the Makefile should not set DESTDIR at all, but it should do 
the right thing if the user running the Makefile sets it; this Makefile does 
not and should be fixed.

> Eventually, I used
> destroot.argsprefix=${destroot}${prefix}

That can be an acceptable workaround. Sometimes it has side effects. I don't 
know if it does with this port.


>> This question is better asked on macports-dev, since it's about developing 
>> ports, not using existing ports.
> 
> Sorry, I thought macports-dev was for MacPorts devs only. It's not very 
> practical, I'd rather get mail from topics I start, reply to or am interested 
> in, instead of being subscribed to 2 lists.

If you're writing a Portfile, you're a MacPorts dev.




Re: Trac login

2017-03-07 Thread Geoff Down


On Tue, Mar 7, 2017, at 03:42 AM, Ryan Schmidt wrote:
> 
> > On Mar 6, 2017, at 15:44, Geoff Down wrote:
> > 10.4.11 .That's also why I can't access Trac via Github.
> 
> Safari on Tiger can access GitHub, but not MacPorts' new servers, because
> MacPorts' new servers use SNI which Safari on Tiger does not understand.
> You can work around this problem by using a more modern browser, such as
> TenFourFox.

That's good to know - I wasn't aware of that browser.
 
> 
> We don't rely on just one server; we have a network of mirrors, in
> addition to the original upstream server(s). The problem is that we are
> not automatically mirroring distfiles, ever since moving off macOS Forge.
> It's on my to do list and is tracked at
> https://trac.macports.org/ticket/53347 . But I've manually mirrored this
> distfile for you now, and it should show up on our mirror network soon.
> 
I greatly appreciate you going out of your way to help.
Cheers,
Geoff

-- 
http://www.fastmail.com - Does exactly what it says on the tin



Re: fail to destroot port with only makefile

2017-03-07 Thread db
On 7 Mar 2017, at 20:00, Ryan Schmidt  wrote:
> That can be an acceptable workaround. Sometimes it has side effects. I don't 
> know if it does with this port.

Can you give an example?

Something strange I found is that file copy fails silently, no log whatsoever, 
pre- and post-destroot.

post-destroot {
file copy ${worksrcpath}/autocomplete/complete.bash \
~/.tldr.complete
}

Re: Is Macports down?

2017-03-07 Thread Brandon Allbery
On Tue, Mar 7, 2017 at 10:59 AM, Daniel J. Luke  wrote:

> DNS uses udp (and some tcp). I'd be really surprised if it blocked /all/
> udp packets (and if so, I would get my provider to replace it or let me
> replace it with something that didn't suck).


Usuually this is trying to force you to use the provider's DNS. That said,
video and most audio streaming is UDP... are they trying to force you to
pay more for those?

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net


Re: /bin/sh - POSIX?

2017-03-07 Thread Brandon Allbery
On Tue, Mar 7, 2017 at 11:38 AM, René J.V. Bertin 
wrote:

> Indeed, but on 10.9 . I needed to be certain that there had been no
> changes no matter how unlikely that seemed (or not, given Apple's allergy
> towards GPL'ed software).


Not GPL in general, just GPL3. Which is why they ship the last GPL2 bash. I
would not expect them to replace this unless someone comes up with a
feature complete bash clone (at least up to the last GPL2 version) with an
acceptable license; too many of Apple's own scripts would break.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net


Re: fail to destroot port with only makefile

2017-03-07 Thread Ryan Schmidt

On Mar 7, 2017, at 13:27, db wrote:

> On 7 Mar 2017, at 20:00, Ryan Schmidt wrote:
>> That can be an acceptable workaround. Sometimes it has side effects. I don't 
>> know if it does with this port.
> 
> Can you give an example?

Suppose the program builds a dynamic library. The absolute path of the final 
installation location, including the prefix, will be recorded in the library's 
install_name. The build system therefore needs to know the difference between 
the prefix (/opt/local) and the destroot / destdir (the staging directory where 
files will be installed, prior to being copied by MacPorts to the real 
destination).


> Something strange I found is that file copy fails silently, no log 
> whatsoever, pre- and post-destroot.
> 
> post-destroot {
>file copy ${worksrcpath}/autocomplete/complete.bash \
>~/.tldr.complete
> }

In the destroot phase, you should not be attempting to modify anything outside 
of the ${destroot} directory. Only items in the destroot will be properly 
recorded by MacPorts as belonging to that port. I'm not certain, but hopefully 
MacPorts would prevent you from placing files outside of that directory.

If you need to install config files and such for the user to modify, you can do 
so in the activate phase (post-activate block). However, you should not attempt 
to do anything in the user's home directory. The user installing the port is 
not necessarily the user, or the only user, using the software.

It's likely that in Tcl "~" does not have the special meaning that it does on 
the shell.




Re: Surf port

2017-03-07 Thread Justin C. Walker

On Mar 4, 2017, at 12:07 , Mojca Miklavec wrote:

> On 27 February 2017 at 11:16, Mojca Miklavecwrote:
>> On 27 February 2017 at 11:07, Mojca Miklavec wrote:
>>> 
>>> I just figured out that k3dsurf depends on qt3-mac which doesn't
>>> compile on > 10.6, but one can still install qt3 and compile k3dsurf
>>> against qt3. That one uses X11, so it won't look nice, but that's
>>> still better than nothing.
>> 
>> I just tried that and it works. Not out of the box, but I got an
>> X11-based application running after some really minor modifications.
>> 
>> Feel free to file a ticket for that (to make k3dsurf work against qt3).
> 
> I committed some changes to make k3dsurf work. I didn't test on 10.12,
> but it should hopefully work (with X11).

Thanks, Mojca!  Worked great.

Now all I need is a little documentation :-}

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income

Experience is what you get
  when you don't get what you want.






Re: /bin/sh - POSIX?

2017-03-07 Thread Yongwei Wu
I think people paid more attention to the first part of your question
(whether /bin/sh is POSIX compliant) than the second part in
parentheses (whether it is bash—I completely misunderstood that part).

On 7 March 2017 at 22:41, René J.V. Bertin  wrote:
> Thanks. This doesn't really answer the question if /bin/sh is still bash but 
> I suppose there is little chance that has changed since 10.9 .
>
> R.



-- 
Yongwei Wu
URL: http://wyw.dcweb.cn/