Re: Installing Matlab

2013-02-15 Thread Tijl Coosemans
On 14-02-2013 22:42, Vijay Kaul wrote:
 I was wondering if anyone has had any recent (or not-so-recent)
 experience installing Matlab on FreeBSD/PC-BSD? (Yes, I know about
 octave.)
 
  I'm not entirely new to *nix, but I'm novice enough that I can't seem
 to get this to work.
 
  Perhaps the shortest and simplest solution would be if Mathworks own
 installer would function, but that runs as a Java Web Start
 application, and I can't seem to get that working in Opera, Firefox,
 or Konqueror.
 
  The automatic rout having failed, I've downloaded the files manually,
 and I've tried to run the install script; however, it's failed as
 well. I found this site:
 http://matrossi.blogspot.com/2011/08/installing-matlab-2011a-on-freebsd.html,
 which claims installation instructions for PC-BSD8.2 boiling down to:
 open up the shell scripts and take /bin/sh -- /compat/linux/bin/sh.
 Well, that seems to help a bit, but it also fails because the install
 script determines my architecture to be x68, while the downloads are
 for (what they call) a64. (My system is indeed a 64-bit system.
 Perhaps the above instructions were for an x86 system.)
 
  I feel like if I could modify the install script sufficiently, the
 install would work. My bash scripting is weak, though, and I worry
 about screwing up my system and/or the installation. There are only a
 few functions in there that are looking for architecture type, usually
 with the output from uname. I think fixing those would work...?
 
  Could anyone help me get past this point?
 
  Thanks in advance! And please, if there's any info I can provide that
 would be helpful, please just let me know.
 
  Output of uname -a:
  FreeBSD pcbsd-8517 9.1-RELEASE FreeBSD 9.1-RELEASE #2: Tue Nov 27
 03:45:16 UTC 2012
 root@darkstar:/usr/obj/pcbsd-build90/fbsd-source/9.1/sys/GENERIC amd64
 
  The install script in question: http://pastebin.com/QkEH1vkF

Try creating this link:

ln -s ../usr/bin/expr /compat/linux/bin/expr

Without this link Linux scripts run the FreeBSD expr which isn't fully
compatible.



signature.asc
Description: OpenPGP digital signature


pkg_add problems after upgrading to 9.1-RELEASE and a fix

2013-02-15 Thread Eduardo Morras

Hi all, yesterday i updated my server to 9.1-RELEASE from 8.3. After that, 
while recompiling the ports and packages i get a lot off errors trying to get 
9.1-RELESASE packages and all recompiled from ports. 

The problem is that there's no 9.1-RELEASE directory in ftp.freebsd.org server. 
I solved it after changing the path to fetch from 9-STABLE instead. A better 
fix i think it's to add that directory or make a ln to stable.

The url where add the fault directory is:

ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/

the fault directoy is :

ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.1-release/

An example of the error is:

root@camibar:/usr/ports/www # pkg_add -r zen-cart
Error: Unable to get 
ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.1-release/Latest/zen-cart.tbz:
 File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 
'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.1-release/Latest/zen-cart.tbz'
 by URL

I made the recompilation of ports with portmaster as noted in 'man portmaster' 
with this options (from memory, it's not a cp)

#portmaster -P -R -D `cat /root/installed_ports_list`

Thanks In Advance

---   ---
Eduardo Morras emorr...@yahoo.es
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Problem with GPA after updating

2013-02-15 Thread Gerard
FreeBSD-8.3 STABLE
gpg (GnuPG) 2.0.19
libgcrypt 1.5.0
gpa 0.9.3

When attempting to run 'gpa', I am greeted with an error message. The
message can be viewed here: http://www.seibercom.net/logs/gpa_error.png

It seems to indicate that there is a problem with the GPG library
returning an unexpected value.

I have tried rebuilding 'gnupg', 'gpgme' and 'gpa'. Is there something
else I should be looking into?

Thanks!

-- 
Gerard
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Installing Matlab

2013-02-15 Thread Tijl Coosemans
On 15-02-2013 10:36, Tijl Coosemans wrote:
 On 14-02-2013 22:42, Vijay Kaul wrote:
 I was wondering if anyone has had any recent (or not-so-recent)
 experience installing Matlab on FreeBSD/PC-BSD? (Yes, I know about
 octave.)

  I'm not entirely new to *nix, but I'm novice enough that I can't seem
 to get this to work.

  Perhaps the shortest and simplest solution would be if Mathworks own
 installer would function, but that runs as a Java Web Start
 application, and I can't seem to get that working in Opera, Firefox,
 or Konqueror.

  The automatic rout having failed, I've downloaded the files manually,
 and I've tried to run the install script; however, it's failed as
 well. I found this site:
 http://matrossi.blogspot.com/2011/08/installing-matlab-2011a-on-freebsd.html,
 which claims installation instructions for PC-BSD8.2 boiling down to:
 open up the shell scripts and take /bin/sh -- /compat/linux/bin/sh.
 Well, that seems to help a bit, but it also fails because the install
 script determines my architecture to be x68, while the downloads are
 for (what they call) a64. (My system is indeed a 64-bit system.
 Perhaps the above instructions were for an x86 system.)

  I feel like if I could modify the install script sufficiently, the
 install would work. My bash scripting is weak, though, and I worry
 about screwing up my system and/or the installation. There are only a
 few functions in there that are looking for architecture type, usually
 with the output from uname. I think fixing those would work...?

  Could anyone help me get past this point?

  Thanks in advance! And please, if there's any info I can provide that
 would be helpful, please just let me know.

  Output of uname -a:
  FreeBSD pcbsd-8517 9.1-RELEASE FreeBSD 9.1-RELEASE #2: Tue Nov 27
 03:45:16 UTC 2012
 root@darkstar:/usr/obj/pcbsd-build90/fbsd-source/9.1/sys/GENERIC amd64

  The install script in question: http://pastebin.com/QkEH1vkF
 
 Try creating this link:
 
 ln -s ../usr/bin/expr /compat/linux/bin/expr
 
 Without this link Linux scripts run the FreeBSD expr which isn't fully
 compatible.

And also, the Linux compatibility layer is 32bit so you need the x86
version of Matlab.



signature.asc
Description: OpenPGP digital signature


Re: Fun Scripting Problem

2013-02-15 Thread Giorgos Keramidas
On 2013-02-13 12:27, Tim Daneliuk tun...@tundraware.com wrote:
 I know how to do this in Python, but I really want to do it in
 straight Bourne shell.  I have some ideas, but I thought I'd
 give you folks a crack at this Big Fun:

 a)  You have a directory of files - say they're logs - generated
 at nondeterministic intervals.  You may get more than one a day,
 more than one a month, none, or hundreds.

 b) To conserve space, you want to keep the last file generated
in any given month (the archive goes back for an unspecified
number of years), and delete all the files generated prior to
that last file in that same month.

 c) Bonus points if the problem is solved generally for either files
or directories generated as described above.

 These are not actually logs, and no, I don't think logrotate can
 do this ... or can it?

You can try using stat/date to print the month in which each file was
modified, e.g:

freefall:/home/keramida$ stat -f '%m %N' prs.tar.bz2
1359910210 prs.tar.bz2

freefall:/home/keramida$ date -f '%s' -j '1359910210' '+%Y-%m'
2013-02

Having the mtime of the file in seconds since the epoch (1359910210)
should be easy to sort through, e.g. you can find the last modification
time with a 'sort -n | tail -1' pipe:

freefall:/home/keramida/w/doc-head/el_GR.ISO8859-7/share$ touch 
xml/glossary.ent

freefall:/home/keramida/w/doc-head/el_GR.ISO8859-7/share$ find xml -exec 
stat -f '%m %N' {} +
1360060289 xml
1360060288 xml/navibar.l10n.ent
1360060288 xml/trademarks.ent
1360060288 xml/libcommon.xsl
1360060288 xml/header.l10n.ent
 = 1360942284 xml/glossary.ent
1360060289 xml/freebsd.dsl
1360060289 xml/teams.ent
1360060289 xml/freebsd.ent
1360060289 xml/l10n.ent
1360060289 xml/mailing-lists.ent
1360060289 xml/newsgroups.ent
1360060289 xml/translators.ent
1360060289 xml/catalog.xml
1360060289 xml/entities.ent
1360060289 xml/catalog
1360060289 xml/urls.ent

freefall:/home/keramida/w/doc-head/el_GR.ISO8859-7/share$ find xml -exec 
stat -f '%m %N' {} + | sort -n | tail -1
1360942284 xml/glossary.ent

Then you can convert the epoch-based times to '%Y-%m' timestamps in a
loop, e.g.:

freefall:/home/keramida/w/doc-head/el_GR.ISO8859-7/share$ find xml \
 -exec stat -f '%m %N' {} + | while read mtime fname ; do
 echo ${mtime} $( date -f '%s' -j ${mtime} '+%Y-%m' ) ${fname}
 done
1360060289 2013-02 xml
1360060288 2013-02 xml/navibar.l10n.ent
1360060288 2013-02 xml/trademarks.ent
1360060288 2013-02 xml/libcommon.xsl
1360060288 2013-02 xml/header.l10n.ent
1360942284 2013-02 xml/glossary.ent
1360060289 2013-02 xml/freebsd.dsl
1360060289 2013-02 xml/teams.ent
1360060289 2013-02 xml/freebsd.ent
1360060289 2013-02 xml/l10n.ent
1360060289 2013-02 xml/mailing-lists.ent
1360060289 2013-02 xml/newsgroups.ent
1360060289 2013-02 xml/translators.ent
1360060289 2013-02 xml/catalog.xml
1360060289 2013-02 xml/entities.ent
1360060289 2013-02 xml/catalog
1360060289 2013-02 xml/urls.ent

Having the mtime in seconds as the first column is still conducive to
sorting / tail:

freefall:/home/keramida/w/doc-head/el_GR.ISO8859-7/share$ find xml \
 -exec stat -f '%m %N' {} + | while read mtime fname ; do
  echo ${mtime} $( date -f '%s' -j ${mtime} '+%Y-%m' ) ${fname};
 done | sort -n | tail -1
1360942284 2013-02 xml/glossary.ent

From that point it should be trivial to select all files whose timestamp
is smaller than or equal to 1360942284 - one month of seconds.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem with GPA after updating

2013-02-15 Thread Lowell Gilbert
Gerard ger...@mcom.com writes:

 FreeBSD-8.3 STABLE
 gpg (GnuPG) 2.0.19
 libgcrypt 1.5.0
 gpa 0.9.3

 When attempting to run 'gpa', I am greeted with an error message. The
 message can be viewed here: http://www.seibercom.net/logs/gpa_error.png

 It seems to indicate that there is a problem with the GPG library
 returning an unexpected value.

 I have tried rebuilding 'gnupg', 'gpgme' and 'gpa'. Is there something
 else I should be looking into?

Hard to say (especially because I can't see the error message). 
Your subject line implies that this started happening after an upgrade.
Perhaps you failed to update a dependency somewhere, or missed a
notice in UPDATING (perhaps the required rebuild of everything depending
on gnutls in a 20130205 entry)?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: vmstat -w not honored

2013-02-15 Thread Lowell Gilbert
Fleuriot Damien m...@my.gd writes:

 I'm running 8.3-STABLE and apparently, vmstat won't honor both -i
 (interrupts) and -w (repeat display every wait delay seconds) flags at
 the same time.
 The problem also arises with -z.

 The manual doesn't mention these flags being incompatible with -w.

They are. And with -c as well. *Only* the actual VM-related information
display supports the looping. [The full set of flags incompatible with 
w and c is: f, i, m, s, z.

 Anyone knows if this is intended behavior ?

A better question would be whether it would actually be useful to
change. In theory, other display routines could be modified to
repeat. But their output formats would have to change, to fit all of the
output on a single line. That would be a lot less readable for humans.

If you've got an idea for what it could look like, I'd be happy to
implement it for you. It would also have to figure out what the results
would be if multiple kinds of output (e.g., interrupt counts *and*
virtual memory) were specified. For the one-shot types of output, you
can get more than one in a single command. 

 I wanna make sure before filling a PR, either to get this fixed or the man 
 pages adjusted.

Well, the following patch will at least warn the user about it at run time:

--- vmstat.c(revision 246551)
+++ vmstat.c(working copy)
@@ -304,6 +304,8 @@
reps = -1;
} else if (reps)
interval = 1 * 1000;
+if (interval  !(todo  VMSTAT))
+warnx(Ignoring repeat request: cannot repeat on this type of 
output);
 
if (todo  FORKSTAT)
doforkst();
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org