Re: c++11 question: clang++ 3.3 header not found

2013-08-27 Thread Quark




- Original Message -
> From: Tijl Coosemans 
> To: Quark 
> Cc: "freebsd-questions@freebsd.org" 
> Sent: Tuesday, 27 August 2013 1:41 PM
> Subject: Re: c++11 question: clang++ 3.3  header not found
> 
> On Tue, 27 Aug 2013 15:22:49 +0800 (SGT) Quark wrote:
>>  % uname -a
>>  FreeBSD cobalt 9.2-RC3 FreeBSD 9.2-RC3 #0 r254795: Sat Aug 24 20:25:04 UTC 
> 2013     r...@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>> 
>>  % clang++ --version
>>  FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
>>  Target: x86_64-unknown-freebsd9.2
>>  Thread model: posix
>> 
>>  test program
>>  #include 
>>  #include 
>> 
>>  int main( int argc, char* argv[])
>>  {
>>          auto f = std::async( [] () {
>>                          std::cout << "Hello, World!" 
> << std::endl;
>>                          });
>>          f.wait();
>>          return 0;
>>  }
>> 
>> 
>>  error received is
>>  % clang++ -otest test.cc
>> 
>>  test.cc:2:10: fatal error: 'future' file not found
>>  #include 
>>           ^
>>  1 error generated.
>> 
>>  I guess clang is re-using system headers which belong to older gcc 4.2
>>  I also have gcc48 installed, how can I make clang to refer gcc48 headers?
> 
> There two C++ runtime libraries, the old gcc libstdc++ which is used by
> default and the new C++11 libc++.  You can use the latter like this:
> 
> clang++ -std=c++11 -stdlib=libc++ -otest test.cc
> 

thanks, it worked.
___
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"


Fwd: c++11 question: clang++ 3.3 header not found

2013-08-27 Thread Константин Беседин
AFAIK, the easiest way to get C++11 support in clang is to use libc++ (see
http://blogs.freebsdish.org/theraven/2013/01/03/the-new-c-stack-in-9-1/).
See also
https://lists.freebsd.org/pipermail/freebsd-toolchain/2013-May/000841.html .


2013/8/27 Quark 

> % uname -a
> FreeBSD cobalt 9.2-RC3 FreeBSD 9.2-RC3 #0 r254795: Sat Aug 24 20:25:04 UTC
> 2013 r...@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>
> % clang++ --version
> FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
> Target: x86_64-unknown-freebsd9.2
> Thread model: posix
>
> test program
> #include 
> #include 
>
> int main( int argc, char* argv[])
> {
> auto f = std::async( [] () {
> std::cout << "Hello, World!" << std::endl;
> });
> f.wait();
> return 0;
> }
>
>
> error received is
> % clang++ -otest test.cc
>
> test.cc:2:10: fatal error: 'future' file not found
> #include 
>  ^
> 1 error generated.
>
> I guess clang is re-using system headers which belong to older gcc 4.2
> I also have gcc48 installed, how can I make clang to refer gcc48 headers?
> ___
> 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"
>
___
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: c++11 question: clang++ 3.3 header not found

2013-08-27 Thread Tijl Coosemans
On Tue, 27 Aug 2013 15:22:49 +0800 (SGT) Quark wrote:
> % uname -a
> FreeBSD cobalt 9.2-RC3 FreeBSD 9.2-RC3 #0 r254795: Sat Aug 24 20:25:04 UTC 
> 2013     r...@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
> 
> % clang++ --version
> FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
> Target: x86_64-unknown-freebsd9.2
> Thread model: posix
> 
> test program
> #include 
> #include 
> 
> int main( int argc, char* argv[])
> {
>         auto f = std::async( [] () {
>                         std::cout << "Hello, World!" << std::endl;
>                         });
>         f.wait();
>         return 0;
> }
> 
> 
> error received is
> % clang++ -otest test.cc
> 
> test.cc:2:10: fatal error: 'future' file not found
> #include 
>          ^
> 1 error generated.
> 
> I guess clang is re-using system headers which belong to older gcc 4.2
> I also have gcc48 installed, how can I make clang to refer gcc48 headers?

There two C++ runtime libraries, the old gcc libstdc++ which is used by
default and the new C++11 libc++.  You can use the latter like this:

clang++ -std=c++11 -stdlib=libc++ -otest test.cc


signature.asc
Description: PGP signature


Re: c++11 question: clang++ 3.3 header not found

2013-08-27 Thread Quark
list, please pardon
my stupid mail client hung, giving me impression that e-mail was not sent.
apologies for spam.


- Original Message -
> From: Quark 
> To: "freebsd-questions@freebsd.org" 
> Cc: 
> Sent: Tuesday, 27 August 2013 12:52 PM
> Subject: c++11 question: clang++ 3.3  header not found
> 
> % uname -a
> FreeBSD cobalt 9.2-RC3 FreeBSD 9.2-RC3 #0 r254795: Sat Aug 24 20:25:04 UTC 
> 2013 
>     r...@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
> 
> % clang++ --version
> FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
> Target: x86_64-unknown-freebsd9.2
> Thread model: posix
> 
> test program
> #include 
> #include 
> 
> int main( int argc, char* argv[])
> {
>         auto f = std::async( [] () {
>                         std::cout << "Hello, World!" << 
> std::endl;
>                         });
>         f.wait();
>         return 0;
> }
> 
> 
> error received is
> % clang++ -otest test.cc
> 
> test.cc:2:10: fatal error: 'future' file not found
> #include 
>          ^
> 1 error generated.
> 
> I guess clang is re-using system headers which belong to older gcc 4.2
> I also have gcc48 installed, how can I make clang to refer gcc48 headers?
> ___
> 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"
> 
___
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"


c++11 and clang question

2013-08-27 Thread Quark
% uname -a
FreeBSD cobalt 9.2-RC3 FreeBSD 9.2-RC3 #0 r254795: Sat Aug 24 20:25:04 UTC 2013 
    r...@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

% clang++ --version
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: x86_64-unknown-freebsd9.2
Thread model: posix

// test.cc
#include 
#include 

int main( int argc, char* argv[])
{
        auto f = std::async( [] () {
                        std::cout << "Hello, World!" << std::endl;
                        });
        f.wait();
        return 0;
}

% clang++ -v -otest test.cc
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: x86_64-unknown-freebsd9.2
Thread model: posix
 "/usr/bin/clang++" -cc1 -triple x86_64-unknown-freebsd9.2 -emit-obj 
-mrelax-all -disable-free -main-file-name test.cc -mrelocation-model static 
-mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables 
-target-cpu x86-64 -v -resource-dir /usr/bin/../lib/clang/3.3 
-fdeprecated-macro -fdebug-compilation-dir /home/mshaikh -ferror-limit 19 
-fmessage-length 168 -mstackrealign -fobjc-runtime=gnustep 
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions 
-fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops 
-o /tmp/test-jIvr1p.o -x c++ test.cc
clang -cc1 version 3.3 based upon LLVM 3.3 default target 
x86_64-unknown-freebsd9.2
ignoring nonexistent directory "/usr/include/c++/4.2/backward/backward"
ignoring nonexistent directory "/usr/bin/../lib/clang/3.3/include"
ignoring duplicate directory "/usr/include/c++/4.2"
ignoring duplicate directory "/usr/include/c++/4.2/backward"
ignoring duplicate directory "/usr/include/c++/4.2/backward"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.2
 /usr/include/c++/4.2/backward
 /usr/include/clang/3.3
 /usr/include
End of search list.
test.cc:2:10: fatal error: 'future' file not found
#include 
         ^
1 error generated.

clang is re-using system headers which belong to older gcc 4.2
Can clang be educated to refer gcc48 headers, installed via pkg_add?
___
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"


clang and c++11 question

2013-08-27 Thread Quark
% uname -a
FreeBSD cobalt.corp.nai.org 9.2-RC3 FreeBSD 9.2-RC3 #0 r254795: Sat Aug 24 
20:25:04 UTC 2013     r...@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  
amd64


% clang++ --version
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: x86_64-unknown-freebsd9.2
Thread model: posix

clang 3.3 is C++11 feature complete, but it fails to find  and/or 
 headers.
since it is looking in system compiler path, which is old gcc4.2, not C++11 
ready

how to make clang refer headers from gcc48's installation( via pkg_add)?
___
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"


c++11 question: clang++ 3.3 header not found

2013-08-27 Thread Quark
% uname -a
FreeBSD cobalt 9.2-RC3 FreeBSD 9.2-RC3 #0 r254795: Sat Aug 24 20:25:04 UTC 2013 
    r...@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

% clang++ --version
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: x86_64-unknown-freebsd9.2
Thread model: posix

test program
#include 
#include 

int main( int argc, char* argv[])
{
        auto f = std::async( [] () {
                        std::cout << "Hello, World!" << std::endl;
                        });
        f.wait();
        return 0;
}


error received is
% clang++ -otest test.cc

test.cc:2:10: fatal error: 'future' file not found
#include 
         ^
1 error generated.

I guess clang is re-using system headers which belong to older gcc 4.2
I also have gcc48 installed, how can I make clang to refer gcc48 headers?
___
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"


C++11 not working anymore with clang 3.2

2013-07-06 Thread David Demelier
Hello there,

I've installed the c++ (libc++ library) like this :

make -C /usr/src/lib/libcxxrt all install
make CXX=clang -C /usr/src/lib/libc++ all install

Then, I was able to compile with clang++ using -std=c++11 -stdlib=libc++.

And now, after the clang-3.2 update I can't build anymore, I get this error:

/usr/local/bin/ld: CMakeFiles/irccd.dir/Irccd.cpp.o: undefined reference to 
symbol '__cxa_free_exception@@CXXABI_1.3'
/usr/local/bin/ld: note: '__cxa_free_exception@@CXXABI_1.3' is defined in DSO 
//lib/libcxxrt.so.1 so try adding it to the linker command line
//lib/libcxxrt.so.1: could not read symbols: Invalid operation
clang: error: linker command failed with exit code 1 (use -v to see 
invocation)
*** [irccd/irccd] Error code 1

I've also tried recompiling libc++ and libcxxrt with the last clang++ but it 
didn't help.

Regards,

___
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: script or c prog to record live audio?

2013-05-06 Thread Gary Kline
On Mon, May 06, 2013 at 11:40:06PM -0400, rpratt wrote:
> On Mon, 6 May 2013 16:19:02 -0700
> Gary Kline  wrote:
> > I've been meaning to ask one of the Nix lists if there is a script that
> > will record something from kuow.org
> 
> To play audio stream:
> 
> mplayer -playlist 'http://shoutcast.kuow.org:8002/listen.pls'
> 
> To dump the audio stream to file:
> 
> mplayer -dumpstream -dumpfile foo.mp3 -playlist '... URL ...'
> 
> No need to reinvent wheels.  See man page for more description and many other
> options.
> 
> Enjoy,
> Randy

right on the money; about  reinventing wheels; I can cron the 
dumpstream  {=news= to me!} and play back whenever!  

{i wasnt kidding when I said I was getting Old.  my bed is singing
siren songs.}

tx muchly,

gary


> ___
> 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"

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

___
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: script or c prog to record live audio?

2013-05-06 Thread Gary Kline
On Mon, May 06, 2013 at 07:24:29PM -0500, Joshua Isom wrote:
> On 5/6/2013 6:19 PM, Gary Kline wrote:
> >
> >guys,
> >
> >I've been meaning to ask one of the Nix lists if there is a script that
> >will record something from kuow.org while I watch one of my favorite tv
> >broadcasts.  most  of the time, nothing is on tv, but  this one radio
> >broadcast, "AR" co-insides with "NOVA" at 21:00.
> >
> >anybody know?
> >
> >
> >
> 
> The hackish way I've done before is use wireshark do dump the
> network stream.  In reality, I think you might be able to get by
> with fetch.  I just tried and fetch closes the connection before
> buffering, using telnet does the transmit.  The trick is mp3 streams
> are just inefficient mp3's.  Maybe wget would work.  You can add a
> cron job to start it and another to kill it.


I'm checking fetch out now; I know a bit about  wireshark and have
used wget frequently.  but, nutshell, this might be  a serious
hack!  still, since it's only for me, no problem.  

thanks for the datapoints! 

> ___
> 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"

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

___
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: script or c prog to record live audio?

2013-05-06 Thread rpratt
On Mon, 6 May 2013 16:19:02 -0700
Gary Kline  wrote:
> I've been meaning to ask one of the Nix lists if there is a script that
> will record something from kuow.org

To play audio stream:

mplayer -playlist 'http://shoutcast.kuow.org:8002/listen.pls'

To dump the audio stream to file:

mplayer -dumpstream -dumpfile foo.mp3 -playlist '... URL ...'

No need to reinvent wheels.  See man page for more description and many other
options.

Enjoy,
Randy
___
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: script or c prog to record live audio?

2013-05-06 Thread Joshua Isom

On 5/6/2013 6:19 PM, Gary Kline wrote:


guys,

I've been meaning to ask one of the Nix lists if there is a script that
will record something from kuow.org while I watch one of my favorite tv
broadcasts.  most  of the time, nothing is on tv, but  this one radio
broadcast, "AR" co-insides with "NOVA" at 21:00.

anybody know?





The hackish way I've done before is use wireshark do dump the network 
stream.  In reality, I think you might be able to get by with fetch.  I 
just tried and fetch closes the connection before buffering, using 
telnet does the transmit.  The trick is mp3 streams are just inefficient 
mp3's.  Maybe wget would work.  You can add a cron job to start it and 
another to kill it.

___
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"


script or c prog to record live audio?

2013-05-06 Thread Gary Kline

guys,

I've been meaning to ask one of the Nix lists if there is a script that
will record something from kuow.org while I watch one of my favorite tv
broadcasts.  most  of the time, nothing is on tv, but  this one radio
broadcast, "AR" co-insides with "NOVA" at 21:00.  

anybody know?



-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

___
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: C++ headers

2013-04-14 Thread David Demelier
Le dimanche 14 avril 2013 13:26:17 Shane Ambler a écrit :
> On 13/04/2013 21:45, Jason Lenthe wrote:
> >> Is it possible to get C++11 support on FreeBSD? Currently the 9.1-RELEASE
> >> has some compiler C++11 capable but the /usr/include/c++ headers lacks
> >> some c++11 features (and missing headers).
> >> 
> >> Is there any port of c++11 available?
> > 
> > There sure is.  Just get the latest version of gcc or clang from the
> > ports collection.
> 
> The new C++11 libs are planned to be part of 10.0 base install
> 
> You can build 9.1 with the new libs by adding WITH_LIBCPLUSPLUS=yes to
> your src.conf before building world. Which needs to be built with clang.
> 
> For more info see https://wiki.freebsd.org/NewC++Stack

Thanks you very much, anyway I always use clang. It's definitely the best 
compiler :).

Regards,

-- 
David Demelier
___
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: C++ headers

2013-04-13 Thread Shane Ambler

On 13/04/2013 21:45, Jason Lenthe wrote:

Is it possible to get C++11 support on FreeBSD? Currently the 9.1-RELEASE has
some compiler C++11 capable but the /usr/include/c++ headers lacks some c++11
features (and missing headers).

Is there any port of c++11 available?


There sure is.  Just get the latest version of gcc or clang from the
ports collection.


The new C++11 libs are planned to be part of 10.0 base install

You can build 9.1 with the new libs by adding WITH_LIBCPLUSPLUS=yes to
your src.conf before building world. Which needs to be built with clang.

For more info see https://wiki.freebsd.org/NewC++Stack


___
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: C++ headers

2013-04-13 Thread Jason Lenthe
> Is it possible to get C++11 support on FreeBSD? Currently the 9.1-RELEASE has 
> some compiler C++11 capable but the /usr/include/c++ headers lacks some c++11 
> features (and missing headers).
> 
> Is there any port of c++11 available?

There sure is.  Just get the latest version of gcc or clang from the
ports collection.

___
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"


C++ headers

2013-04-13 Thread David Demelier
Hello folks,

Is it possible to get C++11 support on FreeBSD? Currently the 9.1-RELEASE has 
some compiler C++11 capable but the /usr/include/c++ headers lacks some c++11 
features (and missing headers).

Is there any port of c++11 available?

Regards,

-- 
David Demelier
___
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: pkg -c/pkg -j question

2013-02-13 Thread Matthew Seaman
On 13/02/2013 15:58, Arthur Chance wrote:
> A question for pkgng gurus. When using pkg -c or pkg -j to work within
> chroots or jails, how much of the pkg infrastructure needs to be present
> in the chroot/jail?
> 
> The reason I ask is because I'm thinking of building a server which has
> all services running in jails, with the necessary packages being
> manipulated from above.

You need /bin/sh in each jail for pkg to be able to workout what ${ABI}
should be.

You need /var/db/pkg and /var/cache/pkg available and writable in the
jail / chroot (ie. relative to the chroot or root of the jail)

That's basically it.

You might run into problems running some package scripts if you're
trying to manage a chroot designed for a very different CPU arch / OS
version than your system is running: this is something we haven't really
put much thought into yet.

Cheers,

Matthew

PS.  This sort of question is what the new freebsd-...@freebsd.org list
is for.


___
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"


pkg -c/pkg -j question

2013-02-13 Thread Arthur Chance
A question for pkgng gurus. When using pkg -c or pkg -j to work within 
chroots or jails, how much of the pkg infrastructure needs to be present 
in the chroot/jail?


The reason I ask is because I'm thinking of building a server which has 
all services running in jails, with the necessary packages being 
manipulated from above.

___
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: Entry level C++ projects

2013-01-12 Thread C. P. Ghost
On Sat, Jan 12, 2013 at 11:10 AM, alwin doss  wrote:
> Hi All,
>
> I am a C++ developer and I want to contribute to FreeBSD.
> There are so many applications.
> Is there any C++ project which is simple enough to start with.
>
> Thanks in advance for your help.

Hi Alwin,

there's indeed a lot to do, though it's mostly in plain C.
If you want to help, please check out the PR-Database:

http://www.freebsd.org/cgi/query-pr-summary.cgi

and pick one problem report. Then try to fix it, and submit
a (working) patch as a follow-up. That's an excellent way to
get acquainted with the system and get some practice. ;-)

> Alwin Doss
> God's Beloved

Kind regards,
-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/
___
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"


Entry level C++ projects

2013-01-12 Thread alwin doss
Hi All,

I am a C++ developer and I want to contribute to FreeBSD.
There are so many applications.
Is there any C++ project which is simple enough to start with.

Thanks in advance for your help.

--
Alwin Doss
God's Beloved
___
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: Using the new C++11 stack on 9.1

2012-12-31 Thread Herbert J. Skuhra
On Mon, 31 Dec 2012 11:39:27 +0100
Marcus Karlsson  wrote:

> Hello.
> 
> I was very happy when I received the 9.1 announcement in my mailbox,
> especially when I read about the inclusion of the new C++11 stack
> including LLVM libc++ and libcxxrt. So I decided to test it on a 9.1
> system:
> 
> clang++ foo.cc -stdlib=libc++
> 
> However, the compilation fails:
> 
> /usr/bin/ld: cannot find -lc++
> 
> It's available in the source tree for 9.1, my assumption is that it's
> just not installed by default.

# echo "WITH_LIBCPLUSPLUS=" >> /etc/src.conf

And rebuilding world/clang.

-- 
Herbert
___
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"


Using the new C++11 stack on 9.1

2012-12-31 Thread Marcus Karlsson
Hello.

I was very happy when I received the 9.1 announcement in my mailbox,
especially when I read about the inclusion of the new C++11 stack
including LLVM libc++ and libcxxrt. So I decided to test it on a 9.1
system:

clang++ foo.cc -stdlib=libc++

However, the compilation fails:

/usr/bin/ld: cannot find -lc++

It's available in the source tree for 9.1, my assumption is that it's
just not installed by default.

What should I do in order to use it? I have not found much documentation
on it other than it will be the default in 10.

Marcus
___
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: which C function is best to check for directory EXISTANCE?

2012-12-18 Thread Karl Vogel
>> On Tue, 18 Dec 2012 16:26:10 -0800, 
>> Gary Kline  said:

G> which C function is best to check for the existence of a *directory*?
G> say that I am want to make postitve that "/tmp/foo/" exists.  ALso:
G> which will make sure that the directory AND file
G> "tmp/foo/filename12345" exists and that I have read access to it?

   I'd just call open() with O_RDONLY and if it fails, check errno for
   EACCESS (you don't have permission) or ENOENT (doesn't exist).

-- 
Karl Vogel  I don't speak for the USAF or my company

USELESS PHRASES WHEN SPEAKING TO A COP #9:
"You're not gonna check the trunk, are you?"
___
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: which C function is best to check for directory EXISTANCE?

2012-12-18 Thread Polytropon
On Tue, 18 Dec 2012 16:26:10 -0800, Gary Kline wrote:
> 
>   which C function is best to check for the existence of a 
>   *directory*?  say that I am want to make postitve that "/tmp/foo/"
>   exists.

That can be done with the opendir() function; its manpage
lists other interesting "follow-up functions" to work with.



>   ALso: which will make sure that the directory AND ffile 
>   "tmp/foo/filename12345" exists and that I have read access to it?

You can use readdir() and parse its output. If you already know
the file name, use a fopen() call for the mode you're trying to
open it with (e. g. "r" or "w") to see if the permissions are
set accordingly. Also ferror() can be used to test for specific
errors that may occur during file operations.



>   in other words, can playing around with access() and stat() be
>   best?

That also sounds possible. In case you're going to continue to
operate with the file in question, certain functions sound better.
But for the "pure testing", access() and stat() provide sufficient
functionality.


> is there any new dirstat("PATh") that would work?

$ man dirstat
No manual entry for dirstat

:-)



>   just want to see which way is best?

Depends. :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
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"


which C function is best to check for directory EXISTANCE?

2012-12-18 Thread Gary Kline

which C function is best to check for the existence of a 
*directory*?  say that I am want to make postitve that "/tmp/foo/"
exists.

ALso: which will make sure that the directory AND ffile 
"tmp/foo/filename12345" exists and that I have read access to it?
in other words, can playing around with access() and stat() be
best?  is there any new dirstat("PATh") that would work?

just want to see which way is best?

dank mucho, y'all!

gary


-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-24 Thread Warren Block

On Sat, 24 Nov 2012, Matthias Apitz wrote:


El día Wednesday, November 21, 2012 a las 09:19:24PM -0700, Warren Block 
escribió:


On Wed, 21 Nov 2012, Warren Block wrote:


The fdisk/bsdlabel section of my disk setup article has been rewritten
to use gpart.  Feedback welcome.

http://www.wonkity.com/~wblock/docs/html/disksetup.html


Hi Warren,

When the page is opened with konqueror of KDE 3.5.10 the JS functions
for Table Of Content generator are generating in an endless loop the links.


That's... unexpected.  It's a stock AsciiDoc-generated feature.  The
PDF version is at: http://www.wonkity.com/~wblock/docs/pdf/disksetup.pdf___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-23 Thread Matthias Apitz
El día Wednesday, November 21, 2012 a las 09:19:24PM -0700, Warren Block 
escribió:

> On Wed, 21 Nov 2012, Warren Block wrote:
> 
> 
> The fdisk/bsdlabel section of my disk setup article has been rewritten 
> to use gpart.  Feedback welcome.
> 
> http://www.wonkity.com/~wblock/docs/html/disksetup.html

Hi Warren,

When the page is opened with konqueror of KDE 3.5.10 the JS functions
for Table Of Content generator are generating in an endless loop the links.

HIH

matthias
-- 
Matthias Apitz   |  /"\ ASCII Ribbon Campaign: www.asciiribbon.org
E-mail: g...@unixarea.de |  \ / - No HTML/RTF in E-mail
WWW: http://www.unixarea.de/ |   X  - No proprietary attachments
phone: +49-170-4527211   |  / \ - Respect for open standards
___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-22 Thread Warren Block

On Fri, 23 Nov 2012, Shane Ambler wrote:


On 22/11/2012 14:49, Warren Block wrote:

On Wed, 21 Nov 2012, Warren Block wrote:


Got a chance to set up a scratch drive and check this.  Turns out
I left out the step of creating a "slice" (MBR partition) to hold
the FreeBSD partitions.  Also, GPT labels cannot be used in an
MBR. Fixed below.  I will probably add this to my disk setup
article because it has come up more than once.


The fdisk/bsdlabel section of my disk setup article has been
rewritten to use gpart.  Feedback welcome.

http://www.wonkity.com/~wblock/docs/html/disksetup.html


Something I meant to ask before - is there any benefit to following the
steps described in
http://www.aisecure.net/2012/01/16/rootzfs/


My guide is based on using UFS.  ZFS or other filesystems will also 
benefit from block alignment, but the methods to get there can be 
different.



The step of using gnop is meant to trick zfs into believing the disk has
4K sector size to improve performance, which I would think zfs would be
able to figure out by talking to the disk.


Unless ZFS is put on a bare, unpartitioned disk, configuration for 
performance is better left to the user.  It's a pain to correct 
automatic configs when they guess wrong.



Does partitioning hide the sector size or would the step of aligning
the partition start to a 4k sector unhide the 4k size?
Or are these steps just a waste of time?


It's not about hiding the device's native block size, it's about getting 
the filesystem to do aligned I/O so the device can just read or write 
a single 4K block instead of part of one and part of another.

___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-22 Thread Shane Ambler

On 22/11/2012 14:49, Warren Block wrote:

On Wed, 21 Nov 2012, Warren Block wrote:


Got a chance to set up a scratch drive and check this.  Turns out
I left out the step of creating a "slice" (MBR partition) to hold
the FreeBSD partitions.  Also, GPT labels cannot be used in an
MBR. Fixed below.  I will probably add this to my disk setup
article because it has come up more than once.


The fdisk/bsdlabel section of my disk setup article has been
rewritten to use gpart.  Feedback welcome.

http://www.wonkity.com/~wblock/docs/html/disksetup.html


Something I meant to ask before - is there any benefit to following the
steps described in
http://www.aisecure.net/2012/01/16/rootzfs/

Abbreviated the steps are -
gpart add -t freebsd-zfs -l disk0 ada0
gnop create -S 4096 /dev/gpt/disk0
zpool create zroot /dev/gpt/disk0.nop
zpool export zroot
gnop destroy /dev/gpt/disk0.nop
zpool import zroot

The step of using gnop is meant to trick zfs into believing the disk has
4K sector size to improve performance, which I would think zfs would be
able to figure out by talking to the disk.

Does partitioning hide the sector size or would the step of aligning
the partition start to a 4k sector unhide the 4k size?
Or are these steps just a waste of time?

___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-22 Thread Warren Block

On Thu, 22 Nov 2012, Leslie Jensen wrote:


Warren Block skrev 2012-11-22 05:19:

On Wed, 21 Nov 2012, Warren Block wrote:


Got a chance to set up a scratch drive and check this.  Turns out I
left out the step of creating a "slice" (MBR partition) to hold the
FreeBSD partitions.  Also, GPT labels cannot be used in an MBR. Fixed
below.  I will probably add this to my disk setup article because it
has come up more than once.


The fdisk/bsdlabel section of my disk setup article has been rewritten
to use gpart.  Feedback welcome.

http://www.wonkity.com/~wblock/docs/html/disksetup.html


Thank you very much for your work on this. I have found this conversation and 
your article very informative.


I've already installed W7 on my SSD but I let the installation program create 
the windows (MBR) partition.


I'm going to install FreeBSD 9.1 as soon as it is ready so I want to ask if 
it is straight forward if I follow your instructions for creating the bsd 
slice and partitions, or if I need to check anything in order to get the 
correct alignment?


The process should be correct, but it's new, so there may still be 
unexpected inaccuracy.


As far as alignment on MBR, the trick is to use -a when creating the 
FreeBSD partitions.  MBR slices are aligned to CHS values, pretty much 
assuring they will not be aligned to 4K boundaries.  Using -a4k when 
creating FreeBSD partitions inside those misaligned slices will make 
sure the partitions are correctly aligned.

___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-22 Thread Leslie Jensen


Thank you very much for your work on this. I have found this 
conversation and your article very informative.


I've already installed W7 on my SSD but I let the installation program 
create the windows (MBR) partition.


I'm going to install FreeBSD 9.1 as soon as it is ready so I want to ask 
if it is straight forward if I follow your instructions for creating the 
bsd slice and partitions, or if I need to check anything in order to get 
the correct alignment?


Thanks

/Leslie


Warren Block skrev 2012-11-22 05:19:

On Wed, 21 Nov 2012, Warren Block wrote:


Got a chance to set up a scratch drive and check this.  Turns out I
left out the step of creating a "slice" (MBR partition) to hold the
FreeBSD partitions.  Also, GPT labels cannot be used in an MBR. Fixed
below.  I will probably add this to my disk setup article because it
has come up more than once.


The fdisk/bsdlabel section of my disk setup article has been rewritten
to use gpart.  Feedback welcome.

http://www.wonkity.com/~wblock/docs/html/disksetup.html
___
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"

___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-21 Thread Warren Block

On Wed, 21 Nov 2012, Warren Block wrote:

Got a chance to set up a scratch drive and check this.  Turns out I 
left out the step of creating a "slice" (MBR partition) to hold the 
FreeBSD partitions.  Also, GPT labels cannot be used in an MBR. 
Fixed below.  I will probably add this to my disk setup article 
because it has come up more than once.


The fdisk/bsdlabel section of my disk setup article has been rewritten 
to use gpart.  Feedback welcome.


http://www.wonkity.com/~wblock/docs/html/disksetup.html
___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-21 Thread Warren Block

On Tue, 20 Nov 2012, Snow Mountains wrote:


2012/11/20 Warren Block :

On Tue, 20 Nov 2012, Snow Mountains wrote:


Just one small problem. Here I got this:

# gpart create -s bsd ada2s1
gpart: geom 'ada2s1': File exists
# gpart set -a active -i 1 ada2s1
gpart: index '1': No such file or directory

Expected? Anyway, is it any way to but FreeBSD on something like s2?



Sorry, typo.  FreeBSD does not have to be the first slice.

# gpart create -s bsd ada2s2
# gpart set -a active -i 1 ada2s2


Hm, still doesn't work. Look:

# gpart destroy -F ada2
ada2 destroyed
# gpart create -s mbr ada2
ada2 created
# gpart bootcode -b /boot/mbr ada2
bootcode written to ada2
# gpart add -t ntfs -b 2048 -s 30g ada2
ada2s1 added
# gpart create -s bsd ada2s2
gpart: arg0 'ada2s2': Invalid argument


Got a chance to set up a scratch drive and check this.  Turns out I left 
out the step of creating a "slice" (MBR partition) to hold the FreeBSD 
partitions.  Also, GPT labels cannot be used in an MBR.  Fixed below.  I 
will probably add this to my disk setup article because it has come up 
more than once.




Create the MBR partitioning scheme:

# gpart create -s mbr ada2

Add MBR bootcode:

# gpart bootcode -b /boot/mbr ada2

Add the Windows 7 partition, forcing it to start at block 2048 because 
"-a" is not going to do what is expected for slices because of 
decades-old CHS stuff:


# gpart add -t ntfs -b 2048 -s 30g ada2

Create the FreeBSD slice:

# gpart add -t freebsd ada2
# gpart create -s bsd ada2s2

Set this MBR slice active and add FreeBSD bootcode:

# gpart set -a active -i 2 ada2
# gpart bootcode -b /boot/boot ada2s2

Add the FreeBSD partitions.  -a will work here, aligning the partitions.

# gpart add -t freebsd-ufs -a 4k -s 3g ada2s2
# gpart add -t freebsd-ufs -a 4k -s 1g ada2s2
# gpart add -t freebsd-ufs -a 4k   ada2s2

Note: can't use GPT labels... since this is MBR.
___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-19 Thread Snow Mountains
2012/11/20 Warren Block :
> I know I've seen that, but can't recall what causes it.  You can try
> retasting before creating the BSD partitions:
>
> # true > /dev/ada2
> # gpart create -s bsd ada2s2

Sorry, no difference:

# gpart show ada2
=>   63  468862065  ada2  MBR  (223G)
 63   2016- free -  (1M)
   2079   62914509 1  ntfs  (30G)
   62916588  405945540- free -  (193G)

# true > /dev/ada2
# gpart create -s bsd ada2s2
gpart: arg0 'ada2s2': Invalid argument

S.
___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-19 Thread Warren Block

On Tue, 20 Nov 2012, Snow Mountains wrote:


2012/11/20 Warren Block :

On Tue, 20 Nov 2012, Snow Mountains wrote:


Just one small problem. Here I got this:

# gpart create -s bsd ada2s1
gpart: geom 'ada2s1': File exists
# gpart set -a active -i 1 ada2s1
gpart: index '1': No such file or directory

Expected? Anyway, is it any way to but FreeBSD on something like s2?



Sorry, typo.  FreeBSD does not have to be the first slice.

# gpart create -s bsd ada2s2
# gpart set -a active -i 1 ada2s2


Hm, still doesn't work. Look:

# gpart destroy -F ada2
ada2 destroyed
# gpart create -s mbr ada2
ada2 created
# gpart bootcode -b /boot/mbr ada2
bootcode written to ada2
# gpart add -t ntfs -b 2048 -s 30g ada2
ada2s1 added
# gpart create -s bsd ada2s2
gpart: arg0 'ada2s2': Invalid argument


I know I've seen that, but can't recall what causes it.  You can try 
retasting before creating the BSD partitions:


# true > /dev/ada2
# gpart create -s bsd ada2s2
___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-19 Thread Snow Mountains
2012/11/20 Warren Block :
> On Tue, 20 Nov 2012, Snow Mountains wrote:
>
>> Just one small problem. Here I got this:
>>
>> # gpart create -s bsd ada2s1
>> gpart: geom 'ada2s1': File exists
>> # gpart set -a active -i 1 ada2s1
>> gpart: index '1': No such file or directory
>>
>> Expected? Anyway, is it any way to but FreeBSD on something like s2?
>
>
> Sorry, typo.  FreeBSD does not have to be the first slice.
>
> # gpart create -s bsd ada2s2
> # gpart set -a active -i 1 ada2s2

Hm, still doesn't work. Look:

# gpart destroy -F ada2
ada2 destroyed
# gpart create -s mbr ada2
ada2 created
# gpart bootcode -b /boot/mbr ada2
bootcode written to ada2
# gpart add -t ntfs -b 2048 -s 30g ada2
ada2s1 added
# gpart create -s bsd ada2s2
gpart: arg0 'ada2s2': Invalid argument

S.
___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-19 Thread Warren Block

On Tue, 20 Nov 2012, Snow Mountains wrote:


Just one small problem. Here I got this:

# gpart create -s bsd ada2s1
gpart: geom 'ada2s1': File exists
# gpart set -a active -i 1 ada2s1
gpart: index '1': No such file or directory

Expected? Anyway, is it any way to but FreeBSD on something like s2?


Sorry, typo.  FreeBSD does not have to be the first slice.

# gpart create -s bsd ada2s2
# gpart set -a active -i 1 ada2s2
___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-19 Thread Snow Mountains
2012/11/19 Warren Block :
> On Mon, 19 Nov 2012, Snow Mountains wrote:
>
>> 2012/11/18 Shane Ambler :
>>>
>>> On 18/11/2012 06:49, Snow Mountains wrote:
>>>
 Could you recommend a reliable document on how to do a correct block
 alignment for new FreeBSD 9 install? FreeBSD Handbook doesn't
 mention this at all, although I can find a lot of (not quite
 consistent) advises on the net on how to do it with gpart/newfs.
>>>
>>>
>>> Over the last week there has been a discussion with the subject
>>> "Advanced Format Drive ?" on this list that has been discussing that.
>>> If you only just signed up then you can search for it in the mail
>>> archives.
>>
>>
>> There is a lot of useful info there, and I also found a lot of useful
>> tips from Warren Block on how to create swap as a file, how to use
>> tmpfs, about noatime etc.
>
>
> I didn't say anything about noatime, and personally have not done that on
> SSDs.
>
>
>> However, nowhere I can found anything that
>> could explain me for sure how to do this BEFORE that:
>>
>> I've got 240G Kingston SSD. I want this:
>>
>> win7:
>>  ada2s1 ~ 30G empty (probably for experimental little win7 install in
>> the future)
>>
>> freebsd9:
>>  ada2s2a ~3G for /
>>  ada2s2d ~80G the for /usr (separated for easier backup)
>>  ada2s2f ~ the rest for storage
>>
>> How to do this with gpart, respecting 4g alignment etc? Can anybody
>> share the exact commands to achieve this?
>
>
> That's "4K".
>
> Most of the following is shown in the new Handbook gmirror section:
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-mirror.html
>
> Create the MBR partitioning scheme:
>
> # gpart create -s mbr ada2
>
> Add MBR bootcode:
>
> # gpart bootcode -b /boot/mbr ada2
>
> Add the Windows 7 partition, forcing it to start at block 2048 because "-a"
> is not going to do what is expected for slices because of decades-old CHS
> stuff:
>
> # gpart add -t ntfs -b 2048 -s 30g ada2
>
> Create the FreeBSD slice:
>
> # gpart create -s bsd ada2s1
>
> Set this slice active and add FreeBSD bootcode:
>
> # gpart set -a active -i 1 ada2s1

Warren, great, thank you!

Just one small problem. Here I got this:

# gpart create -s bsd ada2s1
gpart: geom 'ada2s1': File exists
# gpart set -a active -i 1 ada2s1
gpart: index '1': No such file or directory

Expected? Anyway, is it any way to but FreeBSD on something like s2?

Sergi
___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-19 Thread Warren Block

On Mon, 19 Nov 2012, Snow Mountains wrote:


2012/11/18 Shane Ambler :

On 18/11/2012 06:49, Snow Mountains wrote:


Could you recommend a reliable document on how to do a correct block
alignment for new FreeBSD 9 install? FreeBSD Handbook doesn't
mention this at all, although I can find a lot of (not quite
consistent) advises on the net on how to do it with gpart/newfs.


Over the last week there has been a discussion with the subject
"Advanced Format Drive ?" on this list that has been discussing that.
If you only just signed up then you can search for it in the mail archives.


There is a lot of useful info there, and I also found a lot of useful
tips from Warren Block on how to create swap as a file, how to use
tmpfs, about noatime etc.


I didn't say anything about noatime, and personally have not done that 
on SSDs.



However, nowhere I can found anything that
could explain me for sure how to do this BEFORE that:

I've got 240G Kingston SSD. I want this:

win7:
 ada2s1 ~ 30G empty (probably for experimental little win7 install in
the future)

freebsd9:
 ada2s2a ~3G for /
 ada2s2d ~80G the for /usr (separated for easier backup)
 ada2s2f ~ the rest for storage

How to do this with gpart, respecting 4g alignment etc? Can anybody
share the exact commands to achieve this?


That's "4K".

Most of the following is shown in the new Handbook gmirror section:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-mirror.html

Create the MBR partitioning scheme:

# gpart create -s mbr ada2

Add MBR bootcode:

# gpart bootcode -b /boot/mbr ada2

Add the Windows 7 partition, forcing it to start at block 2048 because 
"-a" is not going to do what is expected for slices because of 
decades-old CHS stuff:


# gpart add -t ntfs -b 2048 -s 30g ada2

Create the FreeBSD slice:

# gpart create -s bsd ada2s1

Set this slice active and add FreeBSD bootcode:

# gpart set -a active -i 1 ada2s1
# gpart bootcode -b /boot/boot ada2s1

Add the FreeBSD partitions.  -a will work here, aligning the partitions.

# gpart add -t freebsd-ufs -a 4k -l dxrootfs -s 3g ada2s1
# gpart add -t freebsd-ufs -a 4k -l dxvarfs  -s 1g ada2s1
# gpart add -t freebsd-ufs -a 4k -l dxusrfsada2s1

Note the use of GPT labels.  The "dx" is just random go-fast letters 
added because I believe it is a mistake to have duplicate labels and try 
to keep them all unique.  Pick your own.


/etc/fstab entries are /dev/gpt/dxrootfs, /dev/gpt/dxvarfs, 
/dev/gpt/dxusrfs.

___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-19 Thread Snow Mountains
2012/11/18 Shane Ambler :
> On 18/11/2012 06:49, Snow Mountains wrote:
>
>> Could you recommend a reliable document on how to do a correct block
>> alignment for new FreeBSD 9 install? FreeBSD Handbook doesn't
>> mention this at all, although I can find a lot of (not quite
>> consistent) advises on the net on how to do it with gpart/newfs.
>
> Over the last week there has been a discussion with the subject
> "Advanced Format Drive ?" on this list that has been discussing that.
> If you only just signed up then you can search for it in the mail archives.

There is a lot of useful info there, and I also found a lot of useful
tips from Warren Block on how to create swap as a file, how to use
tmpfs, about noatime etc. However, nowhere I can found anything that
could explain me for sure how to do this BEFORE that:

I've got 240G Kingston SSD. I want this:

win7:
  ada2s1 ~ 30G empty (probably for experimental little win7 install in
the future)

freebsd9:
  ada2s2a ~3G for /
  ada2s2d ~80G the for /usr (separated for easier backup)
  ada2s2f ~ the rest for storage

How to do this with gpart, respecting 4g alignment etc? Can anybody
share the exact commands to achieve this?

SergiM
___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-17 Thread Shane Ambler

On 18/11/2012 06:49, Snow Mountains wrote:


Could you recommend a reliable document on how to do a correct block
alignment for new FreeBSD 9 install? FreeBSD Handbook doesn't
mention this at all, although I can find a lot of (not quite
consistent) advises on the net on how to do it with gpart/newfs.



Over the last week there has been a discussion with the subject
"Advanced Format Drive ?" on this list that has been discussing that.
If you only just signed up then you can search for it in the mail archives.


___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-17 Thread Snow Mountains
2012/11/17 ill...@gmail.com :
> On 17 November 2012 12:26, Snow Mountains  wrote:
>> * How will FreeBSD 9 behave in such situations? Any special tweaking needed?
>
> I wouldn't expect any special behaviour, though you need to take care
> with block alignment.  Perhaps in the future FreeBSD will have a
> blocksize/erase-blocksize aware formatting & partitioning tool(s),
> but at the moment, you need to make sure those are correctly
> aligned if you want good performance from 4k blocksize drives
> (& SSDs will probably still need to be aligned to whatever the
> erase block size is).

illoai, thank you for the answer! I'll certainly go with SSD in that case.

Could you recommend a reliable document on how to do a correct block
alignment for new FreeBSD 9 install? FreeBSD Handbook doesn't mention
this at all, although I can find a lot of (not quite consistent)
advises on the net on how to do it with gpart/newfs.

Sergi
___
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: FreeBSD on SSD on ASUS P5KPL-C

2012-11-17 Thread ill...@gmail.com
On 17 November 2012 12:26, Snow Mountains  wrote:
> Hello,
>
> I'm about to upgrade hardware on my desktop and to install FreeBSD 9
> on it. I have ASUS P5KPL-C and want to buy a SSD or SATA-III 6Gb/s
> drive for it.
>
> Please advise me:
>
> * does it make sense to buy SSD drive for a mb that supports 4x SATA
> 3Gb/s (of couse, expecting a possible future mb upgrade)?
>

If you want SSD, by all means.  For me the price/benefit
ration is definitely not there.  For you, perhaps different.

> * if SSD is capable of working at greater speed, will it simply
> operate on maximum 3Gb/s on P5KPL-C?
>

Yes, it will simply use the slower speed of the controller.

> * the same question for SATA-III 6Gb/s. Will it simply operate on 3Gb on my 
> mb?
>

Yes.

> * How will FreeBSD 9 behave in such situations? Any special tweaking needed?
>

I wouldn't expect any special behaviour, though you need to take care
with block alignment.  Perhaps in the future FreeBSD will have a
blocksize/erase-blocksize aware formatting & partitioning tool(s),
but at the moment, you need to make sure those are correctly
aligned if you want good performance from 4k blocksize drives
(& SSDs will probably still need to be aligned to whatever the
erase block size is).

Good luck.

-- 
--
___
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"


FreeBSD on SSD on ASUS P5KPL-C

2012-11-17 Thread Snow Mountains
Hello,

I'm about to upgrade hardware on my desktop and to install FreeBSD 9
on it. I have ASUS P5KPL-C and want to buy a SSD or SATA-III 6Gb/s
drive for it.

Please advise me:

* does it make sense to buy SSD drive for a mb that supports 4x SATA
3Gb/s (of couse, expecting a possible future mb upgrade)?

* if SSD is capable of working at greater speed, will it simply
operate on maximum 3Gb/s on P5KPL-C?

* the same question for SATA-III 6Gb/s. Will it simply operate on 3Gb on my mb?

* How will FreeBSD 9 behave in such situations? Any special tweaking needed?

Thank you very much for your explanations,

Sergi M.
___
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"


bsdlabel: partition c doesn't cover the whole unit!

2012-11-10 Thread
Hello.

I´ve seen bin/165789: looks like this is my problem; however I thoght I´d ask, 
just to be sure.

# uname -v
FreeBSD 8.3-RELEASE-p3 #1: Wed Jun 20 10:03:11 CEST 2012 
r...@x..it:/usr/obj/usr/src/sys/X 
# fdisk /dev/aacd1
*** Working on device /dev/aacd1 ***
parameters extracted from in-core disklabel are:
cylinders=218526 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=218526 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 3510620127 (1714169 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:

The data for partition 3 is:

The data for partition 4 is:

# bsdlabel /dev/aacd1s1
# /dev/aacd1s1:
8 partitions:
#  size offsetfstype   [fsize bsize bps/cpg]
  b:   33554432  0  swap    
  c: 3510620127  0unused0 0 # "raw" part, don't edit
  d: 1738530816   335544324.2BSD0 0 0
bsdlabel: partition c doesn't cover the whole unit!
bsdlabel: An incorrect partition c may cause problems for standard system 
utilities


To me it looks like aacd1s1d covers whole aacd1s1.
Before I start populating this disk, is it safe?

 Bye & Thanks
av.

___
NOCC, http://nocc.sourceforge.net


___
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: Converting C++ to C

2012-02-24 Thread Robert Bonomi

"Julian H. Stacey"  wrote;
> per...@pluto.rain.com wrote:
> > Reason:  I want to make what I think would be a fairly minor
> > change to a small (1100-line) C++ program, but I don't know C++
> > -- only C -- and I don't understand the program well enough
> > to mess with it.  I suspect I would be able to figure out an
> > equivalent C program.
> > 
> > In case it matters, I'm using FreeBSD 8.1.
>
> One of the lists recently (maybe 2/3 weeks ago) carried a thread
> listing many C compilers past & present.  It started by discussing
> Clang V. GCC I can't remember which list, I don't think it was
> questions@ maybe hackers@ or current@.

There _was_ a recent discussion on 'questions' -- I'm the 'guilty party' 
responsible for naming a lot of the 'historical' ones.

That aside, for the OP:

 C code generated from C++ will _not_ be very readable.

 Basically, -everything- in C++ would get turned into a function invocation
 in the generated C.  With the _name_ of each such function having an encoded
 representation of the type of each argument to that function (see 'function
 name mangling).  And the "simple" elementary data types tend to end up as 
 something like: "**struct foo {bar value; (*(**struct foo)baz())[];}".
 Some of the mayhem: _everything_ is 'double indirect' pointers, to support 
 run-time automatic garbage collection; 'methods' of acting on data elements
 are pointers to functions, embedded in the data-element structure, even
 basic 'four function calculator' arithmetic ops (they can be 'overlaid'
 to do differnt things on different data types  -- the '+' operator may
 mean 'concatenation' when applied to two strings, or '+=' maay mean 
 'append item to list, in the contest of 'list += item', even though both
 would *still* mean 'addition' when used with numeric items.)

 One would be far better off spending some time to learn the basics of C++
 syntax -- to be able to 'read' the existing code and understand what it's
 doing.  After that, if what you want to modiy -is- truely a 'minor' change,
 adding some 'C-tyee' code to implement it is probably not that bad.

___
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: Converting C++ to C

2012-02-24 Thread Da Rock

On 02/24/12 22:07, Julian H. Stacey wrote:

per...@pluto.rain.com wrote:

Some early implementations of C++ operated as preprocessors
that emitted C code.  Is there any current tool that will do
that?  I didn't recognize any such option in the g++ manpage,
although I suppose it's possible that one of the -fdump-tree-
options would come close enough.

Reason:  I want to make what I think would be a fairly minor
change to a small (1100-line) C++ program, but I don't know C++
-- only C -- and I don't understand the program well enough
to mess with it.  I suspect I would be able to figure out an
equivalent C program.

In case it matters, I'm using FreeBSD 8.1.

One of the lists recently (maybe 2/3 weeks ago) carried a thread
listing many C compilers past&  present.  It started by discussing
Clang V. GCC I can't remember which list, I don't think it was
questions@ maybe hackers@ or current@.

Questions. I started it... :)
___
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: Converting C++ to C

2012-02-24 Thread Mehmet Erol Sanliturk
On Fri, Feb 24, 2012 at 4:37 AM,  wrote:

> Some early implementations of C++ operated as preprocessors
> that emitted C code.  Is there any current tool that will do
> that?  I didn't recognize any such option in the g++ manpage,
> although I suppose it's possible that one of the -fdump-tree-
> options would come close enough.
>
> Reason:  I want to make what I think would be a fairly minor
> change to a small (1100-line) C++ program, but I don't know C++
> -- only C -- and I don't understand the program well enough
> to mess with it.  I suspect I would be able to figure out an
> equivalent C program.
>
> In case it matters, I'm using FreeBSD 8.1.
>

http://www.comeaucomputing.com/
http://www.comeaucomputing.com/tryitout/
http://www.comeaucomputing.com/faqs/genfaq.html#ccompiler

http://stackoverflow.com/questions/737257/code-convert-from-c-to-c


Thank you very much .

Mehmet Erol Sanliturk
___
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: Converting C++ to C

2012-02-24 Thread Julian H. Stacey
per...@pluto.rain.com wrote:
> Some early implementations of C++ operated as preprocessors
> that emitted C code.  Is there any current tool that will do
> that?  I didn't recognize any such option in the g++ manpage,
> although I suppose it's possible that one of the -fdump-tree-
> options would come close enough.
> 
> Reason:  I want to make what I think would be a fairly minor
> change to a small (1100-line) C++ program, but I don't know C++
> -- only C -- and I don't understand the program well enough
> to mess with it.  I suspect I would be able to figure out an
> equivalent C program.
> 
> In case it matters, I'm using FreeBSD 8.1.

One of the lists recently (maybe 2/3 weeks ago) carried a thread
listing many C compilers past & present.  It started by discussing
Clang V. GCC I can't remember which list, I don't think it was
questions@ maybe hackers@ or current@.

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
 Reply below not above, cumulative like a play script, & indent with "> ".
 Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.
Mail from @yahoo dumped @berklix.  http://berklix.org/yahoo/
___
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"


Converting C++ to C

2012-02-24 Thread perryh
Some early implementations of C++ operated as preprocessors
that emitted C code.  Is there any current tool that will do
that?  I didn't recognize any such option in the g++ manpage,
although I suppose it's possible that one of the -fdump-tree-
options would come close enough.

Reason:  I want to make what I think would be a fairly minor
change to a small (1100-line) C++ program, but I don't know C++
-- only C -- and I don't understand the program well enough
to mess with it.  I suspect I would be able to figure out an
equivalent C program.

In case it matters, I'm using FreeBSD 8.1.
___
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: (c)dialog working differently during boot in script called by rc system than after boot?

2012-02-23 Thread Robarrght
Thank you, Dan.  That was exactly what I was missing.
I added:

export TERM=cons25

to the rc.d script and now my script works as it should, when I want
it to do so.

I appreciate your help, very much!
Robarrght

On Thu, Feb 23, 2012 at 3:32 PM, Dan Busarow  wrote:
>
> On Feb 23, 2012, at 11:21 AM, Robarrght wrote:
>
>> (Background)
>> I have a script that uses dialog or cdialog (system, not devel,) to
>> prompt for network settings on my FreeBSD 8.2-RELEASE box.  When I
>> make certain changes with the script, a reboot is required.  But, this
>> would not be necessary if I ran the script during boot, before
>> networking is setup.  I've hooked up my script to the rc boot system.
>>
>> (Issue)
>> The trouble is that when the rc.d system runs the script, instead of
>> the proper dialog boxes working as expected, all I get is a cleared
>> out black screen with a white arrow locked dead center that won't
>> move.  After boot, the script works normally.  I even have the script
>> running in getty on a virtual console, where it works like a champ.
>
> Looks like your TERM variable is not set when booting.  Not a big surprise 
> really.  Try setting
>
> TERM=cons25
>
> in your script before it calls dialog
>
> Dan
>
>
>
>>
>> So, what is the hangup?  Are there dependencies that (c)dialog needs
>> which aren't started yet?
>>
>> (Troubleshooting)
>> If I simply run
>> dialog --msgbox "Test message" 6 25
>> in the rc.d file, instead of having it call my script, I get the same
>> bad behavior.  That suggests that it is not my script, but the
>> environment ... right?
>> I have played with the order of when the test dialog message (my rc.d
>> file) is ordered and even when it goes way at the end, after cron
>> starts up, (which is getting pretty close to the end,) no improvement.
>>
>> I've seen this work on an older FreeBSD 6.2-STABLE box.  But, when I
>> cranked one of those up and tried the same simple dialog test directly
>> out of the rc.d script, it yielded a black and white ascii only
>> version of the message box.  That was an improvement over what I'm
>> getting on my current FreeBSD 8.2-RELEASE version.  But, I wish I knew
>> what the former magic was.
>>
>> Does anyone out there see what I'm missing?
>>
>> Thank you,
>> Robarrght
>> ___
>> 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"
>
>
___
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: (c)dialog working differently during boot in script called by rc system than after boot?

2012-02-23 Thread Dan Busarow

On Feb 23, 2012, at 11:21 AM, Robarrght wrote:

> (Background)
> I have a script that uses dialog or cdialog (system, not devel,) to
> prompt for network settings on my FreeBSD 8.2-RELEASE box.  When I
> make certain changes with the script, a reboot is required.  But, this
> would not be necessary if I ran the script during boot, before
> networking is setup.  I've hooked up my script to the rc boot system.
> 
> (Issue)
> The trouble is that when the rc.d system runs the script, instead of
> the proper dialog boxes working as expected, all I get is a cleared
> out black screen with a white arrow locked dead center that won't
> move.  After boot, the script works normally.  I even have the script
> running in getty on a virtual console, where it works like a champ.

Looks like your TERM variable is not set when booting.  Not a big surprise 
really.  Try setting

TERM=cons25

in your script before it calls dialog

Dan



> 
> So, what is the hangup?  Are there dependencies that (c)dialog needs
> which aren't started yet?
> 
> (Troubleshooting)
> If I simply run
> dialog --msgbox "Test message" 6 25
> in the rc.d file, instead of having it call my script, I get the same
> bad behavior.  That suggests that it is not my script, but the
> environment ... right?
> I have played with the order of when the test dialog message (my rc.d
> file) is ordered and even when it goes way at the end, after cron
> starts up, (which is getting pretty close to the end,) no improvement.
> 
> I've seen this work on an older FreeBSD 6.2-STABLE box.  But, when I
> cranked one of those up and tried the same simple dialog test directly
> out of the rc.d script, it yielded a black and white ascii only
> version of the message box.  That was an improvement over what I'm
> getting on my current FreeBSD 8.2-RELEASE version.  But, I wish I knew
> what the former magic was.
> 
> Does anyone out there see what I'm missing?
> 
> Thank you,
> Robarrght
> ___
> 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"


___
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: (c)dialog working differently during boot in script called by rc system than after boot?

2012-02-23 Thread CyberLeo Kitsana
On 02/23/2012 12:21 PM, Robarrght wrote:
> Does anyone out there see what I'm missing?

Setting TERM in your script's environment? To my knowledge, the boot
scripts have a VERY minimal environment.

Tried on 9.0-RELEASE:

$ dialog --msgbox "Test message" 6 25

shows a message, whereas

$ TERM="" dialog --msgbox "Test message" 6 25

shows a black screen.

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net


Furry Peace! - http://.fur.com/peace/
___
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"


(c)dialog working differently during boot in script called by rc system than after boot?

2012-02-23 Thread Robarrght
(Background)
I have a script that uses dialog or cdialog (system, not devel,) to
prompt for network settings on my FreeBSD 8.2-RELEASE box.  When I
make certain changes with the script, a reboot is required.  But, this
would not be necessary if I ran the script during boot, before
networking is setup.  I've hooked up my script to the rc boot system.

(Issue)
The trouble is that when the rc.d system runs the script, instead of
the proper dialog boxes working as expected, all I get is a cleared
out black screen with a white arrow locked dead center that won't
move.  After boot, the script works normally.  I even have the script
running in getty on a virtual console, where it works like a champ.

So, what is the hangup?  Are there dependencies that (c)dialog needs
which aren't started yet?

(Troubleshooting)
If I simply run
dialog --msgbox "Test message" 6 25
in the rc.d file, instead of having it call my script, I get the same
bad behavior.  That suggests that it is not my script, but the
environment ... right?
I have played with the order of when the test dialog message (my rc.d
file) is ordered and even when it goes way at the end, after cron
starts up, (which is getting pretty close to the end,) no improvement.

I've seen this work on an older FreeBSD 6.2-STABLE box.  But, when I
cranked one of those up and tried the same simple dialog test directly
out of the rc.d script, it yielded a black and white ascii only
version of the message box.  That was an improvement over what I'm
getting on my current FreeBSD 8.2-RELEASE version.  But, I wish I knew
what the former magic was.

Does anyone out there see what I'm missing?

Thank you,
Robarrght
___
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:[SOLVED] bash LC_COLLATE or LC_ALL set “C” not sort in dictionary order.

2012-02-01 Thread Edward Martinez

On 01/31/12 12:22, Robert Bonomi wrote:

`


Edward wrote:

On 01/31/12 06:31, Robert Bonomi wrote:

   Hi,

   Been trying to get BASH to sort set characters in  dictionary order.
  I typed "locale" and it shows LC_COLLATE and LC_ALL are set to "C"
thought that was enough to work,
  however when i type metacharacters:  set character; any character,
something like this:

  ls  [a-cx-y]*

   bash does not sort in dictionary order; file   "Binarc" does not
list.


*OF*COURSE* it doesn't.  Unix is _case_sensitive_.  You specified a lower-
case only (in the C locale) pattern.  Naturally, it doesn't match a file
with an upper-case character in it.

Note: in the 'C' locale, characters are sorted on the underlying byte value.
Thus you will get all the upper-case matches before any lower-case match.

To get upper-and-lower case files in the C locale, you will have to use:
ls [A-CX-Ya-cx-y]*

IF you speciy a different charset for collating, you _may_ get upper/lower
case characters sorted adjacently.  See the specifications for the charset
in question.



  Thanks for reply!

   I meant LC_COLLATE being  set to en_US.UTF-8 not C.

AH.  you lied (not necessarily maliciously, or intentionally) about the
nature of the problem.  disregard my rant.

The short answer to the revised situation is 'it depends on how the charset
collating sequence is deifined'.  AND _which_ release of FreeBSD you are
using, and thus which version of bash.

   I have been digging around and discovered  linux's bash is  not 
working correctly on this matter and numerous  users  have file bug 
reports about it.  FreeBSD's bash is fine:


   https://bugs.archlinux.org/task/24553
   https://bugs.launchpad.net/ubuntu/+source/bash/+bug/120687
   http://teaching.idallen.com/net2003/06w/notes/character_sets.txt

i will continue using either character classes and upper/lower case 
charsets when defining wildcards

   thanks for the help.

___
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: bash LC_COLLATE or LC_ALL set “C” not sort in dictionary order.

2012-01-31 Thread Jerry
On Tue, 31 Jan 2012 12:05:57 -0800
Edward Martinez articulated:

>   I meant LC_COLLATE being  set to en_US.UTF-8 not C.  linux and 
> solaris  shows both  upper and lowercase when set characters like 
> [a-cx-y] and others   are used. when LC_COLLATE is set to
> en_US.UTF-8. I thought it could be also done in FreeBSD's  bash
> when LC_COLLATE  is  set to en_US.UTF-8

What version of Bash?

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

___
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: bash LC_COLLATE or LC_ALL set “C” not sort in dictionary order.

2012-01-31 Thread Edward Martinez

On 01/31/12 06:31, Robert Bonomi wrote:

 From owner-freebsd-questi...@freebsd.org  Tue Jan 31 05:45:47 2012
Date: Tue, 31 Jan 2012 04:45:36 -0800
From: Edward Martinez
To: FreeBSD Questions
Subject: bash  LC_COLLATE or LC_ALL set =?windows-1252?q?=93C=94_not__sort?=
  =?windows-1252?q?_in_dictionary_order=2E?=




  Hi,

  Been trying to get BASH to sort set characters in  dictionary order.
 I typed "locale" and it shows LC_COLLATE and LC_ALL are set to "C"
thought that was enough to work,
 however when i type metacharacters:  set character; any character,
something like this:

 ls  [a-cx-y]*

  bash does not sort in dictionary order; file   "Binarc" does not
list.


*OF*COURSE* it doesn't.  Unix is _case_sensitive_.  You specified a lower-
case only (in the C locale) pattern.  Naturally, it doesn't match a file
with an upper-case character in it.

Note: in the 'C' locale, characters are sorted on the underlying byte value.
Thus you will get all the upper-case matches before any lower-case match.

To get upper-and-lower case files in the C locale, you will have to use:
   ls [A-CX-Ya-cx-y]*

IF you speciy a different charset for collating, you _may_ get upper/lower
case characters sorted adjacently.  See the specifications for the charset
in question.



Thanks for reply!

 I meant LC_COLLATE being  set to en_US.UTF-8 not C.  linux and 
solaris  shows both  upper and lowercase when set characters like 
[a-cx-y] and others   are used. when LC_COLLATE is set to  en_US.UTF-8.
 I thought it could be also done in FreeBSD's  bash  when   
LC_COLLATE  is  set to en_US.UTF-8


in linux LC_COLLATE is set to en_US,UTF-8
eam@localhost ~/testdir $ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
*LC_COLLATE=en_US.UTF-8*
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=


And when i type the following it shows both:

eam@localhost ~/testdir $ ls [a-cx-y]*
bincar  Bincar

eam@localhost ~/testdir $ ls [a-z]*
bincar  Bincar  file  File  zcar









___
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: bash LC_COLLATE or LC_ALL set “C” not sort in dictionary order.

2012-01-31 Thread Robert Bonomi
> From owner-freebsd-questi...@freebsd.org  Tue Jan 31 05:45:47 2012
> Date: Tue, 31 Jan 2012 04:45:36 -0800
> From: Edward Martinez 
> To: FreeBSD Questions 
> Subject: bash  LC_COLLATE or LC_ALL set =?windows-1252?q?=93C=94_not__sort?=
>  =?windows-1252?q?_in_dictionary_order=2E?=
>
>
>
>
>  Hi,
>
>  Been trying to get BASH to sort set characters in  dictionary order.
> I typed "locale" and it shows LC_COLLATE and LC_ALL are set to "C" 
> thought that was enough to work,
> however when i type metacharacters:  set character; any character, 
> something like this:
>
> ls  [a-cx-y]*
>
>  bash does not sort in dictionary order; file   "Binarc" does not  
> list.
>

*OF*COURSE* it doesn't.  Unix is _case_sensitive_.  You specified a lower-
case only (in the C locale) pattern.  Naturally, it doesn't match a file 
with an upper-case character in it.

Note: in the 'C' locale, characters are sorted on the underlying byte value.
Thus you will get all the upper-case matches before any lower-case match.

To get upper-and-lower case files in the C locale, you will have to use:
  ls [A-CX-Ya-cx-y]* 

IF you speciy a different charset for collating, you _may_ get upper/lower
case characters sorted adjacently.  See the specifications for the charset
in question.

___
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"


bash LC_COLLATE or LC_ALL set “C” not sort in dictionary order.

2012-01-31 Thread Edward Martinez




Hi,

Been trying to get BASH to sort set characters in  dictionary order.
   I typed "locale" and it shows LC_COLLATE and LC_ALL are set to "C" 
thought that was enough to work,
   however when i type metacharacters:  set character; any character, 
something like this:


   ls  [a-cx-y]*

bash does not sort in dictionary order; file   "Binarc" does not  
list.


Am I leaving something out?




___
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: OT: C|Net's Download.com adware, spyware, malware hijinkx.

2011-12-11 Thread Chad Perrin
On Sun, Dec 11, 2011 at 05:32:00AM -0600, Ryan Coleman wrote:
> On Dec 10, 2011, at 12:30 AM, Polytropon wrote:
> > On Fri, 9 Dec 2011 13:05:05 -0600, Ryan Coleman wrote:
> >> 
> >> So, wait, Firefox is Malware? Did you notice that with FF4
> >> they changed it so that you didn't get prompted on launch
> >> it overrides your default but instead it's a checkbox inside
> >> the installer?
> > 
> > I've never installed something in "Windows" so my
> > opinion has limited fact-backup here. I don't even
> > see from your post _what_ they changed in FF4 - the
> > default browser? The home page? Additional toolbars?
> > Some advertising? Hmmm…
> 
> You no longer are prompted on first load of the program to change your
> default browser. That's done for you on the installation program.
> 
> Which is *EXACTLY WHAT I SAID*

I understand your point, but what you said exactly was only that it
"overrides your default", and not what default was overridden.
___
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: OT: C|Net's Download.com adware, spyware, malware hijinkx.

2011-12-11 Thread Ryan Coleman

On Dec 10, 2011, at 12:30 AM, Polytropon wrote:

> On Fri, 9 Dec 2011 13:05:05 -0600, Ryan Coleman wrote:
>> 
>> On Dec 9, 2011, at 12:03 PM, Polytropon wrote:
>> 
>>> On Fri, 9 Dec 2011 09:38:59 -0600, Ryan Coleman wrote:
 It's still not malware, it's bloatware. Why would you
 not go to the development website to get the program anyway?
>>> 
>>> Uninvitedly adding toolbars, changing web browser
>>> home page and default search engine are - in my
>>> opinion - malicious acts, so the term "malware"
>>> may be correct here. Maybe the term "spyware" is
>>> also appropriate, depending on what the "additions"
>>> actually do behind the curtain.
>>> 
>>> Note an important thing: When careless users will
>>> notice the change, they will maybe blame the authors
>>> of the original software, not the distributor.
>>> This could do damage to F/O products, at least
>>> in "Windows" land.
>>> 
>>> Luckily, those who build from source or use
>>> precompiled packages from a trustworthy
>>> vendor don't have to care for that stuff. :-)
>> 
>> So, wait, Firefox is Malware? Did you notice that with FF4
>> they changed it so that you didn't get prompted on launch
>> it overrides your default but instead it's a checkbox inside
>> the installer?
> 
> I've never installed something in "Windows" so my
> opinion has limited fact-backup here. I don't even
> see from your post _what_ they changed in FF4 - the
> default browser? The home page? Additional toolbars?
> Some advertising? Hmmm…

You no longer are prompted on first load of the program to change your default 
browser. That's done for you on the installation program.

Which is *EXACTLY WHAT I SAID*

___
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: OT: C|Net's Download.com adware, spyware, malware hijinkx.

2011-12-09 Thread Polytropon
On Fri, 9 Dec 2011 13:05:05 -0600, Ryan Coleman wrote:
> 
> On Dec 9, 2011, at 12:03 PM, Polytropon wrote:
> 
> > On Fri, 9 Dec 2011 09:38:59 -0600, Ryan Coleman wrote:
> >> It's still not malware, it's bloatware. Why would you
> >> not go to the development website to get the program anyway?
> > 
> > Uninvitedly adding toolbars, changing web browser
> > home page and default search engine are - in my
> > opinion - malicious acts, so the term "malware"
> > may be correct here. Maybe the term "spyware" is
> > also appropriate, depending on what the "additions"
> > actually do behind the curtain.
> > 
> > Note an important thing: When careless users will
> > notice the change, they will maybe blame the authors
> > of the original software, not the distributor.
> > This could do damage to F/O products, at least
> > in "Windows" land.
> > 
> > Luckily, those who build from source or use
> > precompiled packages from a trustworthy
> > vendor don't have to care for that stuff. :-)
> 
> So, wait, Firefox is Malware? Did you notice that with FF4
> they changed it so that you didn't get prompted on launch
> it overrides your default but instead it's a checkbox inside
> the installer?

I've never installed something in "Windows" so my
opinion has limited fact-backup here. I don't even
see from your post _what_ they changed in FF4 - the
default browser? The home page? Additional toolbars?
Some advertising? Hmmm...

However, installing proprietary stuff "along with"
the desired F/O software and changing user settings
without dialog or notification _could_ deserve the
term "malware" to apply. It's _not_ that those are
a dependency!


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
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: OT: C|Net's Download.com adware, spyware, malware hijinkx.

2011-12-09 Thread Ryan Coleman

On Dec 9, 2011, at 12:03 PM, Polytropon wrote:

> On Fri, 9 Dec 2011 09:38:59 -0600, Ryan Coleman wrote:
>> It's still not malware, it's bloatware. Why would you
>> not go to the development website to get the program anyway?
> 
> Uninvitedly adding toolbars, changing web browser
> home page and default search engine are - in my
> opinion - malicious acts, so the term "malware"
> may be correct here. Maybe the term "spyware" is
> also appropriate, depending on what the "additions"
> actually do behind the curtain.
> 
> Note an important thing: When careless users will
> notice the change, they will maybe blame the authors
> of the original software, not the distributor.
> This could do damage to F/O products, at least
> in "Windows" land.
> 
> Luckily, those who build from source or use
> precompiled packages from a trustworthy
> vendor don't have to care for that stuff. :-)

So, wait, Firefox is Malware? Did you notice that with FF4 they changed it so 
that you didn't get prompted on launch it overrides your default but instead 
it's a checkbox inside the installer?

--
Ryan___
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: OT: C|Net's Download.com adware, spyware, malware hijinkx.

2011-12-09 Thread Polytropon
On Fri, 9 Dec 2011 09:38:59 -0600, Ryan Coleman wrote:
> It's still not malware, it's bloatware. Why would you
> not go to the development website to get the program anyway?

Uninvitedly adding toolbars, changing web browser
home page and default search engine are - in my
opinion - malicious acts, so the term "malware"
may be correct here. Maybe the term "spyware" is
also appropriate, depending on what the "additions"
actually do behind the curtain.

Note an important thing: When careless users will
notice the change, they will maybe blame the authors
of the original software, not the distributor.
This could do damage to F/O products, at least
in "Windows" land.

Luckily, those who build from source or use
precompiled packages from a trustworthy
vendor don't have to care for that stuff. :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
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: OT: C|Net's Download.com adware, spyware, malware hijinkx.

2011-12-09 Thread Ryan Coleman

On Dec 9, 2011, at 9:41 AM, Chris Brennan wrote:

> On Fri, Dec 9, 2011 at 10:38 AM, Ryan Coleman  
> wrote:
> Yeah, someone on my LUG list tried to claim that the TCLUG list was the 
> reason for the /. article…
> 
> stupid peons…
> 
> It's still not malware, it's bloatware. Why would you not go to the 
> development 
> website to get the program anyway?
> 
> Some people just don't get that idea, they stumble onto a piece of software 
> they like and don't bother to think much farther beyond that, as long as it 
> works for them, they don't care.

I should add that I often go to download.com for things like winrar, putty, 
etc., but I know enough to NOT use the Adobe Downloader from adobe.com, check 
to make sure there's no extra stuff riding along…

We have a problem here in Minnesota with Zebra mussels. Tanker ships from 
Europe didn't filter their ballast water and now we have them in our lakes. 
They rode tankers from Europe to the Great Lakes, fishing boats from the Great 
Lakes to smaller lakes… and now it's an infestation.
Why? Because they were too busy to take time to figure out what they were 
doing. 
[http://www.dnr.state.mn.us/invasives/aquaticanimals/zebramussel/index.html]___
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: OT: C|Net's Download.com adware, spyware, malware hijinkx.

2011-12-09 Thread Chris Brennan
On Fri, Dec 9, 2011 at 10:38 AM, Ryan Coleman  wrote:

Yeah, someone on my LUG list tried to claim that the TCLUG list was the
>
reason for the /. article…
>
> stupid peons…
>
> It's still not malware, it's bloatware. Why would you not go to the
> development

website to get the program anyway?


Some people just don't get that idea, they stumble onto a piece of software
they like and don't bother to think much farther beyond that, as long as it
works for them, they don't care.

> --
> Chris Brennan
> A: Yes.
> >Q: Are you sure?
> >>A: Because it reverses the logical flow of conversation.
> >>>Q: Why is top posting frowned upon?
> http://xkcd.com/84/ | http://xkcd.com/149/ | http://xkcd.com/549/
> GPG: D5B20C0C (6741 8EE4 6C7D 11FB 8DA8  9E4A EECD 9A84 D5B2 0C0C)


___
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: OT: C|Net's Download.com adware, spyware, malware hijinkx.

2011-12-09 Thread Ryan Coleman

On Dec 9, 2011, at 9:35 AM, Chris Brennan wrote:

> Sorry for the cross post I hadn't seen any chatter about this on the lists.
> It
> would seem that Download.com got caught with their pants down and were
> re-wrapping F/OSS with their own installer and bundling adware, spyware
> and malware with it.
> 
> NMap's author, over at insecure.org got pretty hot about it and has
> collected considerable information on the topic since he learned about it on 
> Monday.


Yeah, someone on my LUG list tried to claim that the TCLUG list was the reason 
for the /. article…

stupid peons…

It's still not malware, it's bloatware. Why would you not go to the development 
website to get the program anyway?

--
Ryan___
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"


OT: C|Net's Download.com adware, spyware, malware hijinkx.

2011-12-09 Thread Chris Brennan
Sorry for the cross post I hadn't seen any chatter about this on the lists.
It
would seem that Download.com got caught with their pants down and were
re-wrapping F/OSS with their own installer and bundling adware, spyware
and malware with it.

NMap's author, over at insecure.org got pretty hot about it and has
collected
considerable information on the topic since he learned about it on Monday.

http://insecure.org/news/download-com-fiasco.html

http://seclists.org/nmap-hackers/2011/5

http://seclists.org/nmap-hackers/2011/6

Again, sorry for the cross post, but I know how I would feel if this were
done
to me (I'd be pretty pissed!) So flame me later for cross-posting and if
your a
software developer who also makes software for Windows users, then go and
check your stuff if it's listed on download.com.

So far, paint.net's software, VLC, NMap and emergeDesktop were affected.
Being a part of emergeDesktop's community, I know the author their has
instructed the community to not download his software from download.com,
I'm not sure what steps have been taken for paint.net and VLC though.

> --
> Chris Brennan
> A: Yes.
> >Q: Are you sure?
> >>A: Because it reverses the logical flow of conversation.
> >>>Q: Why is top posting frowned upon?
> http://xkcd.com/84/ | http://xkcd.com/149/ | http://xkcd.com/549/
> GPG: D5B20C0C (6741 8EE4 6C7D 11FB 8DA8  9E4A EECD 9A84 D5B2 0C0C)

___
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"


Custom compiler/{C,CXX,F}FLAGS and /etc/make.conf - how to?

2011-11-09 Thread Vladimir Kushnir

Dear ALL,
The subject says it all. I'm trying to push out of my box every ounce of 
performance, perhaps even with (yet experimental) path64 compiler. So my 
question is as simple as that: what is the precise spell to put in 
make.comf to get (while not disrupting the ports infrastructure!) 
-march=amdfam10 if compiler is lang/gcc46 and -march=barcelona for path64 
(perhaps yet another flags as well if toolchain supports them)?


TIA,
Vladimir

___
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: Is it safe to interrupt (Ctrl + C) while building a port or kernel?

2011-11-03 Thread Conrad J. Sabatier
On Thu, 3 Nov 2011 13:48:47 -0500 (CDT)
Robert Bonomi  wrote:
[snip] 
> I am likely _not_ the typical user -- I run a monolithic kernel, with 
> everything I need 'compiled in'; *no* loadable modules.  Yeah, it can
> be a nuisance if I need something that isn't compiled in, but I don't
> get ny unexpected surprises.  It also does wonders as far as reducing
> the required 'root partition' size.  I run a 64mb(!!) partition, with
> less than 1/2 of it occupied by the system install.  With the running
> kernel, a copy of the prior running one as a fall-back, and a GENERIC
> for worst-case recovery.

If you don't use modules, why build them at all?  Just set
"NO_MODULES=yes" in /etc/make.conf and save yourself that much time.

-- 
Conrad J. Sabatier
conr...@cox.net
___
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: Is it safe to interrupt (Ctrl + C) while building a port or kernel?

2011-11-03 Thread RW
On Thu, 3 Nov 2011 12:20:46 -0500 (CDT)
Robert Bonomi wrote:

> > From owner-freebsd-questi...@freebsd.org  Thu Nov  3 12:10:08 2011
> > From: =?koi8-r?B?4c7Uz84g68zF09M=?= 
> > To: freebsd-questions@freebsd.org
> > Date: Thu, 03 Nov 2011 21:10:19 +0400
> > Subject: Is it safe to interrupt (Ctrl + C) while building a port
> > or kernel?
>>
> > Is it clear to interrupt the building process just by pressing Ctrl
> > + ?
> 
> Yes.

Whilst it's not strictly-speaking "building", I would avoid interrupting
an install.
___
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: Is it safe to interrupt (Ctrl + C) while building a port or kernel?

2011-11-03 Thread Conrad J. Sabatier
On Thu, 03 Nov 2011 22:48:26 +0400
Антон Клесс  wrote:

> 03.11.2011, 21:20, "Robert Bonomi" :
> 
> >>   If it's so, do I need to run "make clean" before I start "make"
> >> one more time?
> >  Authoritative answer:  "It depends".
> >
> >  On what you 'did wrong", and what it takes to fix it.
> >
> >  e.g.,  if you're building a kernel the 'classial' way, that is
> > 'configure, make depend, cd , make',  and realize you left
> > something out of the config file, after you edit the config file,
> > you have to rerun _all_ those steps.
> 
> Does it matter, if I always use "make buildkernel make installkernel"
> way to rebuild kernels?
> 
> >  make buildkernel
> 
> ..
> oh! something wrong!
>  + 
> ..
> mistake fixed!
> 
> >  make buildkernel
> >  make installkernel
> 
> - is right?

That's fine, yes.  But I wouldn't do an unconditional installkernel
after buildkernel (suppose buildkernel failed in some way)?

Either include both targets in the same make command:

make buildkernel installkernel

Or make the second conditional on the outcome of the first:

make buildkernel && make installkernel

You might also save yourself some time by using "-DNO_CLEAN" after
changing your kernel config.

-- 
Conrad J. Sabatier
conr...@cox.net
___
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: Is it safe to interrupt (Ctrl + C) while building a port or kernel?

2011-11-03 Thread Erik Trulsson
On Thu, Nov 03, 2011 at 01:48:47PM -0500, Robert Bonomi wrote:
> 
> On Thu, 03 Nov 2011 18:29:06 +0100, Damien Fleuriot  > On 11/3/11 6:20 PM, Robert Bonomi wrote:
> > >> From owner-freebsd-questi...@freebsd.org  Thu Nov  3 12:10:08 2011
> > >> From: =?koi8-r?B?4c7Uz84g68zF09M=?= 
> > >> To: freebsd-questions@freebsd.org
> > >> Date: Thu, 03 Nov 2011 21:10:19 +0400
> > >> Subject: Is it safe to interrupt (Ctrl + C) while building a port or 
> > >> kernel?
> > >>
> > >> Sometimes, while building process of some port or system kernel are in 
> > >> progress, you suddenly remember that you did something wrong and have to 
> > >> stop, solve your mistake and start one more time.
> > >>
> > >> Is it clear to interrupt the building process just by pressing Ctrl + 
> > >> ?
> > > 
> > > Yes.
> > > 
> > >> If it's so, do I need to run "make clean" before I start "make" one more 
> > >> time?
> > > 
> > > Authoritative answer:  "It depends".
> > > 
> > > On what you 'did wrong", and what it takes to fix it.
> > > 
> > > e.g.,  if you're building a kernel the 'classial' way, that is 'configure,
> > > make depend, cd , make',  and realize you left something out of the config
> > > file, after you edit the config file, you have to rerun _all_ those steps.
> > > 
> >
> > Is it even advisable to build the kernel the "old" way ?
> 
> On a slow processor, it makes a *BIG* differnence.
> Even more so if you build everything you need into the kernel.
> 
> 'make buildkernel' always recompiles an relinks *everything*. whether or
> not any dependenies for the module have changed.

If that is a problem then just use 'make -DNO_CLEAN buildkernel' and
it won't reompile stuff that doesn't need to be recompiled.  (Works for
buildworld as well.)


-- 

Erik Trulsson
ertr1...@student.uu.se
___
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: Is it safe to interrupt (Ctrl + C) while building a port or kernel?

2011-11-03 Thread Warren Block

On Thu, 3 Nov 2011, ? ? wrote:


Is it clear to interrupt the building process just by pressing Ctrl + ?

If it's so, do I need to run "make clean" before I start "make" one more time?


With ports, a "make clean" before rebuilding is a good idea.  The build 
might not be able to continue cleanly, or might have to build 
differently, depending on what was changed.


For /usr/src, I just remove /usr/obj/usr and build again, but also use 
devel/ccache so there's not much penalty for doing that.

___
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: Is it safe to interrupt (Ctrl + C) while building a port or kernel?

2011-11-03 Thread Robert Bonomi

On Thu, 03 Nov 2011 18:29:06 +0100, Damien Fleuriot  On 11/3/11 6:20 PM, Robert Bonomi wrote:
> >> From owner-freebsd-questi...@freebsd.org  Thu Nov  3 12:10:08 2011
> >> From: =?koi8-r?B?4c7Uz84g68zF09M=?= 
> >> To: freebsd-questions@freebsd.org
> >> Date: Thu, 03 Nov 2011 21:10:19 +0400
> >> Subject: Is it safe to interrupt (Ctrl + C) while building a port or 
> >> kernel?
> >>
> >> Sometimes, while building process of some port or system kernel are in 
> >> progress, you suddenly remember that you did something wrong and have to 
> >> stop, solve your mistake and start one more time.
> >>
> >> Is it clear to interrupt the building process just by pressing Ctrl + ?
> > 
> > Yes.
> > 
> >> If it's so, do I need to run "make clean" before I start "make" one more 
> >> time?
> > 
> > Authoritative answer:  "It depends".
> > 
> > On what you 'did wrong", and what it takes to fix it.
> > 
> > e.g.,  if you're building a kernel the 'classial' way, that is 'configure,
> > make depend, cd , make',  and realize you left something out of the config
> > file, after you edit the config file, you have to rerun _all_ those steps.
> > 
>
> Is it even advisable to build the kernel the "old" way ?

On a slow processor, it makes a *BIG* differnence.
Even more so if you build everything you need into the kernel.

'make buildkernel' always recompiles an relinks *everything*. whether or
not any dependenies for the module have changed.

I've tried 'make buildkernel' on a 'loaded' 486 box, and had it take
close to TWENTY FOUR HOURS to complete.  With one minor tweak to the
config file, e.g. changing one of the 'shared memory' constants,  and
it is _another_ 24+ hours.  *Lots* of it building loadable modules that
I have no need for, nor any intention of ever useing.

Using the 'old' way, a first-time kernel build was under 40 minutes, and
a 'tweak' re-build was under 15.

That box is long gone, but on a 733mhz PIII I can go from editing a config
file to running on the new kernel in less than 5 minutes (wall clock).  The 
largest part of that time is running 'make depend'. (Second-largest is the
rebooting. :)

I don't know about anybody else, but _I_ consider that speed differential
a *big* advantage to the 'old way'. :)

I am likely _not_ the typical user -- I run a monolithic kernel, with 
everything I need 'compiled in'; *no* loadable modules.  Yeah, it can
be a nuisance if I need something that isn't compiled in, but I don't
get ny unexpected surprises.  It also does wonders as far as reducing
the required 'root partition' size.  I run a 64mb(!!) partition, with
less than 1/2 of it occupied by the system install.  With the running
kernel, a copy of the prior running one as a fall-back, and a GENERIC
for worst-case recovery.
___
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: Is it safe to interrupt (Ctrl + C) while building a port or kernel?

2011-11-03 Thread Антон Клесс
03.11.2011, 21:20, "Robert Bonomi" :

>>   If it's so, do I need to run "make clean" before I start "make" one more 
>> time?
>  Authoritative answer:  "It depends".
>
>  On what you 'did wrong", and what it takes to fix it.
>
>  e.g.,  if you're building a kernel the 'classial' way, that is 'configure,
>  make depend, cd , make',  and realize you left something out of the config
>  file, after you edit the config file, you have to rerun _all_ those steps.

Does it matter, if I always use "make buildkernel make installkernel" way to 
rebuild kernels?

>  make buildkernel

..
oh! something wrong!
 + 
..
mistake fixed!

>  make buildkernel
>  make installkernel

- is right?
___
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: Is it safe to interrupt (Ctrl + C) while building a port or kernel?

2011-11-03 Thread Damien Fleuriot


On 11/3/11 6:20 PM, Robert Bonomi wrote:
>> From owner-freebsd-questi...@freebsd.org  Thu Nov  3 12:10:08 2011
>> From: =?koi8-r?B?4c7Uz84g68zF09M=?= 
>> To: freebsd-questions@freebsd.org
>> Date: Thu, 03 Nov 2011 21:10:19 +0400
>> Subject: Is it safe to interrupt (Ctrl + C) while building a port or kernel?
>>
>> Sometimes, while building process of some port or system kernel are in 
>> progress, you suddenly remember that you did something wrong and have to 
>> stop, solve your mistake and start one more time.
>>
>> Is it clear to interrupt the building process just by pressing Ctrl + ?
> 
> Yes.
> 
>> If it's so, do I need to run "make clean" before I start "make" one more 
>> time?
> 
> Authoritative answer:  "It depends".
> 
> On what you 'did wrong", and what it takes to fix it.
> 
> e.g.,  if you're building a kernel the 'classial' way, that is 'configure,
> make depend, cd , make',  and realize you left something out of the config
> file, after you edit the config file, you have to rerun _all_ those steps.
> 

Is it even advisable to build the kernel the "old" way ?

I feel safer with "cd /usr/src && make buildkernel"
___
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: Is it safe to interrupt (Ctrl + C) while building a port or kernel?

2011-11-03 Thread Robert Bonomi
> From owner-freebsd-questi...@freebsd.org  Thu Nov  3 12:10:08 2011
> From: =?koi8-r?B?4c7Uz84g68zF09M=?= 
> To: freebsd-questions@freebsd.org
> Date: Thu, 03 Nov 2011 21:10:19 +0400
> Subject: Is it safe to interrupt (Ctrl + C) while building a port or kernel?
>
> Sometimes, while building process of some port or system kernel are in 
> progress, you suddenly remember that you did something wrong and have to 
> stop, solve your mistake and start one more time.
>
> Is it clear to interrupt the building process just by pressing Ctrl + ?

Yes.

> If it's so, do I need to run "make clean" before I start "make" one more time?

Authoritative answer:  "It depends".

On what you 'did wrong", and what it takes to fix it.

e.g.,  if you're building a kernel the 'classial' way, that is 'configure,
make depend, cd , make',  and realize you left something out of the config
file, after you edit the config file, you have to rerun _all_ those steps.

___
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"


Is it safe to interrupt (Ctrl + C) while building a port or kernel?

2011-11-03 Thread Антон Клесс
Sometimes, while building process of some port or system kernel are in 
progress, you suddenly remember that you did something wrong and have to stop, 
solve your mistake and start one more time.

Is it clear to interrupt the building process just by pressing Ctrl + ?

If it's so, do I need to run "make clean" before I start "make" one more time?


Thank you!
___
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: OT: Old books (before c. 2009) for the price of shipping

2011-11-02 Thread Julian H. Stacey
parv wrote:
> I have following books (bought before 2009) that need to be disposed
> of, one way or another within next 7-8 days.  If you are interested
> in any of them, contact me privately about the shipping payment (to
> be shipped from Allentown, Pennsylvania, USA via USPS) & your list
> ...
> 
>   * Sed & Awk
> -- Dale Doughberty & Arnold Robbins
> 
>   * The New Korn Shell Command and Programming Language
> -- Morris I Bolsky, David G Korn
> 
>   * Sendmail
> -- O'Reilly - Bryan Costales with Eric Allman
> 
>   * Java in a Nutshell
> -- O'Reilly - David Flangan
> 
>   * Core Java, Volume 1 - Fundamentals
> -- Cay S. Horstmann, Gary Cornell
> 
>   * Managed C++ and .Net Development
> -- Stephen R G Fraser, Forward by Arthur Laksberg
> 
>   * Counter Hack - A Step by Step Guide to Computer Attacks and Effective 
> Defenses
> -- Ed Skoudis
> 
>   * Scene of the Cybercrime: Computer Forensics Handbook
> -- Debra Littlejohn Shinder, Ed Tiltel
> 
>   * Cybercrime Vandalizing the Information Society
> -- Steven Furnell
> 
>   * Codes, Ciphers and Other Cryptic and Clandestine Communication:
> 400 Ways to Send Secret Messages from Hieroglyphs to the Internet
> -- Fred B Wrixon
> 
> 
>   - parv

Suggestions:

Use them to seed a new BSD user group in your area:
Location, your favourite bar/ cafe. 

Or find a nearby similar user group. find a nearby member & drop
them all off with member to take to give away at next monthly meeting
of which ever club.

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
 Reply below, not above;  Indent with "> ";  Cumulative like a play script.
 Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.
___
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: OT: Old books (before c. 2009) for the price of shipping

2011-11-02 Thread Jerry
On Tue, 1 Nov 2011 19:20:30 -1000
parv articulated:

> I have following books (bought before 2009) that need to be disposed
> of, one way or another within next 7-8 days.  If you are interested
> in any of them, contact me privately about the shipping payment (to
> be shipped from Allentown, Pennsylvania, USA via USPS) & your list
> ...
> 
>   * Sed & Awk
> -- Dale Doughberty & Arnold Robbins
> 
>   * The New Korn Shell Command and Programming Language
> -- Morris I Bolsky, David G Korn
> 
>   * Sendmail
> -- O'Reilly - Bryan Costales with Eric Allman
> 
>   * Java in a Nutshell
> -- O'Reilly - David Flangan
> 
>   * Core Java, Volume 1 - Fundamentals
> -- Cay S. Horstmann, Gary Cornell
> 
>   * Managed C++ and .Net Development
> -- Stephen R G Fraser, Forward by Arthur Laksberg
> 
>   * Counter Hack - A Step by Step Guide to Computer Attacks and
> Effective Defenses -- Ed Skoudis
> 
>   * Scene of the Cybercrime: Computer Forensics Handbook
> -- Debra Littlejohn Shinder, Ed Tiltel
> 
>   * Cybercrime Vandalizing the Information Society
> -- Steven Furnell
> 
>   * Codes, Ciphers and Other Cryptic and Clandestine Communication:
> 400 Ways to Send Secret Messages from Hieroglyphs to the Internet
> -- Fred B Wrixon

I actually own several of those books including my favorite door stop,
"Sendmail". In any case, why don't you try contributing then to a
library or perhaps a local school? You could conceivably get some sort
of tax write off for your efforts too.

-- 
Jerry ✌
jerry+f...@seibercom.net

Disclaimer: off-list followups get on-list replies or ignored.
Do not CC this poster. Please do not ignore the "Reply-To" header.

http://www.catb.org/~esr/faqs/smart-questions.html
___
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"


OT: Old books (before c. 2009) for the price of shipping

2011-11-01 Thread parv
I have following books (bought before 2009) that need to be disposed
of, one way or another within next 7-8 days.  If you are interested
in any of them, contact me privately about the shipping payment (to
be shipped from Allentown, Pennsylvania, USA via USPS) & your list
...

  * Sed & Awk
-- Dale Doughberty & Arnold Robbins

  * The New Korn Shell Command and Programming Language
-- Morris I Bolsky, David G Korn

  * Sendmail
-- O'Reilly - Bryan Costales with Eric Allman

  * Java in a Nutshell
-- O'Reilly - David Flangan

  * Core Java, Volume 1 - Fundamentals
-- Cay S. Horstmann, Gary Cornell

  * Managed C++ and .Net Development
-- Stephen R G Fraser, Forward by Arthur Laksberg

  * Counter Hack - A Step by Step Guide to Computer Attacks and Effective 
Defenses
-- Ed Skoudis

  * Scene of the Cybercrime: Computer Forensics Handbook
-- Debra Littlejohn Shinder, Ed Tiltel

  * Cybercrime Vandalizing the Information Society
-- Steven Furnell

  * Codes, Ciphers and Other Cryptic and Clandestine Communication:
400 Ways to Send Secret Messages from Hieroglyphs to the Internet
-- Fred B Wrixon


  - parv


-- 

___
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: need to check for hex in C: how/

2011-10-17 Thread perryh
Matthew Seaman  wrote:

> '32/' is not any sort of syntax I've ever seen before to
> indicate hexadecimal.

I suspect it's a typo, intending '32.'  My fingers are forever
mixing up slashes and periods, since the keys are adjacent
(on a US/English keyboard, dunno about other arrangements).
___
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: need to check for hex in C: how/

2011-10-16 Thread Robert Bonomi

> Date: Sun, 16 Oct 2011 16:06:54 -0700
> From: Gary Kline 
> Subject: Re: need to check for hex in C: how/
>
> this will bbe my 'sanity-checck' of sorts.  the ck function will
> have something like:
>
> if ((char)x == 'a')
> {
> }
>

And, you deserve what happens if you use that kind of flawed checking. :)
___
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: need to check for hex in C: how/

2011-10-16 Thread Polytropon
On Sun, 16 Oct 2011 16:06:54 -0700, Gary Kline wrote:
> this will bbe my 'sanity-checck' of sorts.  the ck function will
> have something like:
> 
> if ((char)x == 'a')
> {
> }

I'm not sure this is required. Many functions that deal with
characters (in this case: letters) do operate on (int) instead
of (char). For example getc() and getchar(), but also getch()
from NCurses do so. It's common to simply compare those (int)
value to character constants without casting them to (char)
before comparison.

-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
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: need to check for hex in C: how/

2011-10-16 Thread Gary Kline
On Sun, Oct 16, 2011 at 11:58:03PM +0200, Polytropon wrote:
> Date: Sun, 16 Oct 2011 23:58:03 +0200
> From: Polytropon 
> Subject: Re: need to check for hex in C: how/
> To: Gary Kline 
> Cc: FreeBSD Mailing List 
> X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2)
> 
> On Sun, 16 Oct 2011 14:26:31 -0700, Gary Kline wrote:
> > 
> > if n == 15 and x is the int. i can say 
> > 
> > if ((int)x == 15)  Or to check if x == 'A' i can cast x to (char)x.
> > 
> > what's the syntax to chec if x is , say, 32/
> 
> The integer types are automatically casted, no matter if
> you compare (int) or (char) to a numerical or character
> value.
> 
> int i;
> char c;
> 
> if(i == 32 || i == ' ') ...
> if(c == 32 || c == ' ') ...
> 
> Functions or macros that deal with characters usually
> do return (int), even though one would expect (char).
> 
> 

this will bbe my 'sanity-checck' of sorts.  the ck function will
have something like:

if ((char)x == 'a')
{
}


> 
> 
> -- 
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...
> ___
> 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"

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
   Journey Toward the Dawn, E-Book: http://www.thought.org
  The 8.51a release of Jottings: http://jottings.thought.org

___
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: need to check for hex in C: how/

2011-10-16 Thread Gary Kline
On Sun, Oct 16, 2011 at 11:07:59PM +0100, Matthew Seaman wrote:
> Date: Sun, 16 Oct 2011 23:07:59 +0100
> From: Matthew Seaman 
> Subject: Re: need to check for hex in C: how/
> To: freebsd-questions@freebsd.org
> 
> On 16/10/2011 22:26, Gary Kline wrote:
> > if n == 15 and x is the int. i can say 
> > 
> > if ((int)x == 15)  Or to check if x == 'A' i can cast x to (char)x.
> > 
> > what's the syntax to chec if x is , say, 32/
> 
> In C code you can write an integer constant in hexadecimal by prefixing
> it with 0x -- so 0x32 is the hexadecimal constant equal to decimal 50.
> 
>  if ( x == 0x32 ) ...
> 
> I guess that's what you're asking; '32/' is not any sort of syntax I've
> ever seen before to indicate hexadecimal.


touche.  we've got (char), (int), (long), and (long long); i
always assumed there was a (hex).  your ( x ==0x[hex]) will
insure things don't fault because of, say, 'bad memory' or
the like:)
thankee,

gary

> 
>   Cheers,
> 
>   Matthew
> 
> Tempted to interpret it as 32 shillings old money (£1.60 in decimal coinage)
> 
> -- 
> Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
>   Flat 3
> PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
> JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW
> 



-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
   Journey Toward the Dawn, E-Book: http://www.thought.org
  The 8.51a release of Jottings: http://jottings.thought.org

___
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: need to check for hex in C: how/

2011-10-16 Thread Matthew Seaman
On 16/10/2011 22:26, Gary Kline wrote:
> if n == 15 and x is the int. i can say 
> 
> if ((int)x == 15)  Or to check if x == 'A' i can cast x to (char)x.
> 
> what's the syntax to chec if x is , say, 32/

In C code you can write an integer constant in hexadecimal by prefixing
it with 0x -- so 0x32 is the hexadecimal constant equal to decimal 50.

 if ( x == 0x32 ) ...

I guess that's what you're asking; '32/' is not any sort of syntax I've
ever seen before to indicate hexadecimal.

Cheers,

Matthew

Tempted to interpret it as 32 shillings old money (£1.60 in decimal coinage)

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: need to check for hex in C: how/

2011-10-16 Thread Polytropon
On Sun, 16 Oct 2011 14:26:31 -0700, Gary Kline wrote:
> 
> if n == 15 and x is the int. i can say 
> 
> if ((int)x == 15)  Or to check if x == 'A' i can cast x to (char)x.
> 
> what's the syntax to chec if x is , say, 32/

The integer types are automatically casted, no matter if
you compare (int) or (char) to a numerical or character
value.

int i;
char c;

if(i == 32 || i == ' ') ...
if(c == 32 || c == ' ') ...

Functions or macros that deal with characters usually
do return (int), even though one would expect (char).




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
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: need to check for hex in C: how/

2011-10-16 Thread Robert Bonomi
> From owner-freebsd-questi...@freebsd.org  Sun Oct 16 16:27:46 2011
> Date: Sun, 16 Oct 2011 14:26:31 -0700
> From: Gary Kline 
> To: FreeBSD Mailing List 
> Cc: 
> Subject: need to check for hex in C: how/
>
>
> if n == 15 and x is the int. i can say 
>
> if ((int)x == 15)  Or to check if x == 'A' i can cast x to (char)x.
>
> what's the syntax to chec if x is , say, 32/

The advice from my computer-science professor was 'try it and find out'.

It doesn't matter what anybody _says_ it is, the only thing that 
matters is what the computer (or, to be precise, the compiler) accepts?

Now, for some information that you could/should get from any elementary
book on C programming ("The C Programming Language", by Kerningan and
Ritchie [r.i.p., this last week] is recommended):

In general, you don't need _any_ explicit casts for those situations.

C does 'automatic' promotion of numeric items so they have comparable 
'width' for comparisons.

For more details, see the 'fine manual' mentioned above.

___
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"


need to check for hex in C: how/

2011-10-16 Thread Gary Kline

if n == 15 and x is the int. i can say 

if ((int)x == 15)  Or to check if x == 'A' i can cast x to (char)x.

what's the syntax to chec if x is , say, 32/



-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
   Journey Toward the Dawn, E-Book: http://www.thought.org
  The 8.51a release of Jottings: http://jottings.thought.org

___
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: Simplest way to deny access to a class C

2011-03-04 Thread Patrick Gibson
The original question had to do with requests to a web server, and it
would not be practical nor typical to route all http traffic through
inetd.

As well, tcpwrappers require manual work; mod_security and fail2ban
are both ban automatically based on specified criteria and patterns.
While mod_security only works for Apache, fail2ban works for any
service that writes out to a log file. We have it watching our
instances of Apache, Postfix, Cyrus IMAP, and sshd services for
repeated login failure within a short period of time. It has done
wonders.

Patrick

On Fri, Mar 4, 2011 at 4:30 PM, Outback Dingo  wrote:
>
>
> On Fri, Mar 4, 2011 at 7:14 PM, Patrick Gibson 
> wrote:
>>
>> fail2ban by default only bans an IP for 10 minutes, and that's
>> configurable. It can also email you anytime it imposes a ban, so one
>> can keep an eye on things at least in the beginning to see if it's
>> causing a problem for legitimate users.
>>
>> On Thu, Mar 3, 2011 at 4:02 PM, Gary Gatten  wrote:
>> > Be careful of automated responses.  What if someone spoofs IP's of legit
>> > users / customers / whatever and your automated response blocks them?  Not
>> > good.
>> >
>> > I thought about blockingwell, never mind - might pi$$ someone off
>> > and attract unwanted attention...
>> >
>> > -Original Message-
>> > From: owner-freebsd-questi...@freebsd.org
>> > [mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Patrick Gibson
>> > Sent: Thursday, March 03, 2011 5:58 PM
>> > To: Jorge Biquez
>> > Cc: freebsd-questions@freebsd.org
>> > Subject: Re: Simplest way to deny access to a class C
>> >
>> > You might consider mod_security (/usr/ports/www/mod_security) which
>> > can be set up to ban hosts based on behaviour or characteristics.
>> >
>> > Or fail2ban (/usr/ports/security/py-fail2ban) is really great, too, in
>> > that it scans whatever logs you want, and can trigger a block in your
>> > firewall if enough violating log entries are found within a particular
>> > period of time. Everything is totally configurable, and there are
>> > plenty of examples that come with it.
>> >
>> > Patrick
>> >
>> >
>> > On Thu, Mar 3, 2011 at 8:59 AM, Jorge Biquez 
>> > wrote:
>> >> Hello all.
>> >>
>> >> I am sorry in advance if this question sounds too stupid.
>> >>
>> >> I have a small server for personal use of webpages running:
>> >>
>> >> 7.3-PRERELEASE FreeBSD 7.3-PRERELEASE #0
>> >>
>> >> it is working fine , no problem very stable.
>> >>
>> >> I just need to block some IP class C address that are always trying to
>> >> "discover" directories or applications under the web server. They do
>> >> not do
>> >> and can not do anything since this server has nothing installed but i
>> >> am
>> >> tired of seeing in the logs all the intents they do every 2-3 seconds.
>> >>
>> >> I have not installed any kind of firewall yet.
>> >> What do you think is the best way to accomplish this task? If possible
>> >> the
>> >> easiest one. I do not want to do anything else but just bloc IP's, at
>> >> this
>> >> moment at least.
>
> I wonder why nobodies mentioned a quite simple method with tcpwrappers and
> hosts.allow / hosts.deny also
>
>
>>
>> >>
>> >> Thanks in advance.
>> >>
>> >> Jorge Biquez
>> >>
>> >> ___
>> >> 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"
>> >>
>> > ___
>> > 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"
>> >
>> >
>> >
>> >
>> >
>> > 
>> > 
>> > 
>> > "This email is intended to be reviewed by only the intended recipient
>> >  and may contain information that is privileged and/or confidential.
>> >  If you are not the intended recipient, you are hereby notified that
>> >  any review, use, dissemination, disclosure or copying of this email
>> >  and its attachments, if any, is strictly prohibited.  If you have
>> >  received this email in error, please immediately notify the sender by
>> >  return email and delete this email from your system."
>> > 
>> >
>> >
>> ___
>> 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"
>
>
___
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: Simplest way to deny access to a class C

2011-03-04 Thread Gary Gatten
Null (bogus) route that /24 seems the most simple to me: 5 seconds and no 
upgrades or add ons.

- Original Message -
From: Jorge Biquez [mailto:jbiq...@intranet.com.mx]
Sent: Friday, March 04, 2011 08:07 PM
To: freebsd-questions@freebsd.org 
Subject: Re: Simplest way to deny access to a class C


>
>I wonder why nobodies mentioned a quite simple method with tcpwrappers and
>hosts.allow / hosts.deny also

Hello.

I guess something simple could work For some reason, don ask me 
why becasue I did not find why, the:

Order Deny, Allow
Deny IP
Allow all

under httpd.conf and outsite as .htaccess does not work but for now 
teh thing is simple, to block a class C, those guys are stupiod and 
programmed bad an application (I guess) and are pointing to one of my 
domains... since 4 weeks ago I am receiving this kind of access:

189.254.19.93 - - [04/Mar/2011:19:43:48 -0600] "OPTIONS / HTTP/1.1" 
200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:43:48 -0600] "PROPFIND 
/Backup-usuarios HTTP/1.1" 301 323 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:43:48 -0600] "PROPFIND 
/Backup-usuarios/ HTTP/1.1" 200 40833 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:13 -0600] "OPTIONS / HTTP/1.1" 
200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:13 -0600] "PROPFIND 
/Backup-usuarios HTTP/1.1" 301 323 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:13 -0600] "PROPFIND 
/Backup-usuarios/ HTTP/1.1" 200 40833 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:19 -0600] "OPTIONS / HTTP/1.1" 
200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:19 -0600] "PROPFIND 
/Backup-usuarios HTTP/1.1" 301 323 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:19 -0600] "PROPFIND 
/Backup-usuarios/ HTTP/1.1" 200 40833 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:34 -0600] "OPTIONS / HTTP/1.1" 
200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:34 -0600] "PROPFIND 
/Backup-usuarios HTTP/1.1" 301 323 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:34 -0600] "PROPFIND 
/Backup-usuarios/ HTTP/1.1" 200 40833 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:45:06 -0600] "OPTIONS / HTTP/1.1" 
200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:45:06 -0600] "PROPFIND 
/Backup-usuarios HTTP/1.1" 301 323 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:45:06 -0600] "PROPFIND 
/Backup-usuarios/ HTTP/1.1" 200 40833 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"

They change IP's , from the same Class C. No trying to do anything 
else, hack or send email
So I decided to block the Class C. I guess that with the deny, allow 
directives under Apache would be enough but they do not work. I am 
under Apache 1.3x and all works fine but that directives do not. I 
tried , read and not be able to make them work so that's why I 
decided to block them and block others, those yes are trying to hack, 
the simplest way. anyway I will see if the:

>hosts.allow / hosts.deny

would help.  If needed I would upgrade to latest version of FreeBSD 
Apache or whatever needed. Even when they do not do anything my 
server, a 386 that has been running Freebsd the last 13 years since 
Freebsd 3.x is supporting this extra load and besides they are 
wasting my bandwidth. I can not do anything and no problem but I'd 
like to solve this and continue learning Freebsd.

Thanks for your time.

Jorge Biquez

___
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"








"This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system."


___
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: Simplest way to deny access to a class C

2011-03-04 Thread Jorge Biquez




I wonder why nobodies mentioned a quite simple method with tcpwrappers and
hosts.allow / hosts.deny also


Hello.

I guess something simple could work For some reason, don ask me 
why becasue I did not find why, the:


Order Deny, Allow
Deny IP
Allow all

under httpd.conf and outsite as .htaccess does not work but for now 
teh thing is simple, to block a class C, those guys are stupiod and 
programmed bad an application (I guess) and are pointing to one of my 
domains... since 4 weeks ago I am receiving this kind of access:


189.254.19.93 - - [04/Mar/2011:19:43:48 -0600] "OPTIONS / HTTP/1.1" 
200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:43:48 -0600] "PROPFIND 
/Backup-usuarios HTTP/1.1" 301 323 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:43:48 -0600] "PROPFIND 
/Backup-usuarios/ HTTP/1.1" 200 40833 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:13 -0600] "OPTIONS / HTTP/1.1" 
200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:13 -0600] "PROPFIND 
/Backup-usuarios HTTP/1.1" 301 323 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:13 -0600] "PROPFIND 
/Backup-usuarios/ HTTP/1.1" 200 40833 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:19 -0600] "OPTIONS / HTTP/1.1" 
200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:19 -0600] "PROPFIND 
/Backup-usuarios HTTP/1.1" 301 323 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:19 -0600] "PROPFIND 
/Backup-usuarios/ HTTP/1.1" 200 40833 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:34 -0600] "OPTIONS / HTTP/1.1" 
200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:34 -0600] "PROPFIND 
/Backup-usuarios HTTP/1.1" 301 323 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:44:34 -0600] "PROPFIND 
/Backup-usuarios/ HTTP/1.1" 200 40833 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:45:06 -0600] "OPTIONS / HTTP/1.1" 
200 - "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:45:06 -0600] "PROPFIND 
/Backup-usuarios HTTP/1.1" 301 323 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"
189.254.19.93 - - [04/Mar/2011:19:45:06 -0600] "PROPFIND 
/Backup-usuarios/ HTTP/1.1" 200 40833 "-" "Microsoft-WebDAV-MiniRedir/5.1.2600"


They change IP's , from the same Class C. No trying to do anything 
else, hack or send email
So I decided to block the Class C. I guess that with the deny, allow 
directives under Apache would be enough but they do not work. I am 
under Apache 1.3x and all works fine but that directives do not. I 
tried , read and not be able to make them work so that's why I 
decided to block them and block others, those yes are trying to hack, 
the simplest way. anyway I will see if the:



hosts.allow / hosts.deny


would help.  If needed I would upgrade to latest version of FreeBSD 
Apache or whatever needed. Even when they do not do anything my 
server, a 386 that has been running Freebsd the last 13 years since 
Freebsd 3.x is supporting this extra load and besides they are 
wasting my bandwidth. I can not do anything and no problem but I'd 
like to solve this and continue learning Freebsd.


Thanks for your time.

Jorge Biquez

___
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: Simplest way to deny access to a class C

2011-03-04 Thread Robison, Dave


Check out portsentry perhaps?

I used to use it quite a bit. Whenever someone would hit one of a number 
of defined ports, I'd automatically add a rule denying them in IPFW and 
also drop their route to a non-existent IP on my class C.




On 03/04/11 16:14, Patrick Gibson wrote:

fail2ban by default only bans an IP for 10 minutes, and that's
configurable. It can also email you anytime it imposes a ban, so one
can keep an eye on things at least in the beginning to see if it's
causing a problem for legitimate users.

On Thu, Mar 3, 2011 at 4:02 PM, Gary Gatten  wrote:

Be careful of automated responses.  What if someone spoofs IP's of legit users 
/ customers / whatever and your automated response blocks them?  Not good.

I thought about blockingwell, never mind - might pi$$ someone off and 
attract unwanted attention...

-Original Message-
From: owner-freebsd-questi...@freebsd.org 
[mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Patrick Gibson
Sent: Thursday, March 03, 2011 5:58 PM
To: Jorge Biquez
Cc: freebsd-questions@freebsd.org
Subject: Re: Simplest way to deny access to a class C

You might consider mod_security (/usr/ports/www/mod_security) which
can be set up to ban hosts based on behaviour or characteristics.

Or fail2ban (/usr/ports/security/py-fail2ban) is really great, too, in
that it scans whatever logs you want, and can trigger a block in your
firewall if enough violating log entries are found within a particular
period of time. Everything is totally configurable, and there are
plenty of examples that come with it.

Patrick


On Thu, Mar 3, 2011 at 8:59 AM, Jorge Biquez  wrote:

Hello all.

I am sorry in advance if this question sounds too stupid.

I have a small server for personal use of webpages running:

7.3-PRERELEASE FreeBSD 7.3-PRERELEASE #0

it is working fine , no problem very stable.

I just need to block some IP class C address that are always trying to
"discover" directories or applications under the web server. They do not do
and can not do anything since this server has nothing installed but i am
tired of seeing in the logs all the intents they do every 2-3 seconds.

I have not installed any kind of firewall yet.
What do you think is the best way to accomplish this task? If possible the
easiest one. I do not want to do anything else but just bloc IP's, at this
moment at least.

Thanks in advance.

Jorge Biquez

___
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"


___
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"








"This email is intended to be reviewed by only the intended recipient
  and may contain information that is privileged and/or confidential.
  If you are not the intended recipient, you are hereby notified that
  any review, use, dissemination, disclosure or copying of this email
  and its attachments, if any, is strictly prohibited.  If you have
  received this email in error, please immediately notify the sender by
  return email and delete this email from your system."




___
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"




--
Dave Robison
Sales Solution Architect II
FIS Banking Solutions
510/621-2089 (w)
530/518-5194 (c)
510/621-2020 (f)
da...@vicor.com
david.robi...@fisglobal.com

_

The information contained in this message is proprietary and/or confidential. 
If you are not the intended recipient, please: (i) delete the message and all 
copies; (ii) do not disclose, distribute or use the message in any manner; and 
(iii) notify the sender immediately. In addition, please be aware that any 
message addressed to our domain is subject to archiving and review by persons 
other than the intended recipient. Thank you.
_
___
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: Simplest way to deny access to a class C

2011-03-04 Thread Outback Dingo
On Fri, Mar 4, 2011 at 7:14 PM, Patrick Gibson wrote:

> fail2ban by default only bans an IP for 10 minutes, and that's
> configurable. It can also email you anytime it imposes a ban, so one
> can keep an eye on things at least in the beginning to see if it's
> causing a problem for legitimate users.
>
> On Thu, Mar 3, 2011 at 4:02 PM, Gary Gatten  wrote:
> > Be careful of automated responses.  What if someone spoofs IP's of legit
> users / customers / whatever and your automated response blocks them?  Not
> good.
> >
> > I thought about blockingwell, never mind - might pi$$ someone off and
> attract unwanted attention...
> >
> > -Original Message-
> > From: owner-freebsd-questi...@freebsd.org [mailto:
> owner-freebsd-questi...@freebsd.org] On Behalf Of Patrick Gibson
> > Sent: Thursday, March 03, 2011 5:58 PM
> > To: Jorge Biquez
> > Cc: freebsd-questions@freebsd.org
> > Subject: Re: Simplest way to deny access to a class C
> >
> > You might consider mod_security (/usr/ports/www/mod_security) which
> > can be set up to ban hosts based on behaviour or characteristics.
> >
> > Or fail2ban (/usr/ports/security/py-fail2ban) is really great, too, in
> > that it scans whatever logs you want, and can trigger a block in your
> > firewall if enough violating log entries are found within a particular
> > period of time. Everything is totally configurable, and there are
> > plenty of examples that come with it.
> >
> > Patrick
> >
> >
> > On Thu, Mar 3, 2011 at 8:59 AM, Jorge Biquez 
> wrote:
> >> Hello all.
> >>
> >> I am sorry in advance if this question sounds too stupid.
> >>
> >> I have a small server for personal use of webpages running:
> >>
> >> 7.3-PRERELEASE FreeBSD 7.3-PRERELEASE #0
> >>
> >> it is working fine , no problem very stable.
> >>
> >> I just need to block some IP class C address that are always trying to
> >> "discover" directories or applications under the web server. They do not
> do
> >> and can not do anything since this server has nothing installed but i am
> >> tired of seeing in the logs all the intents they do every 2-3 seconds.
> >>
> >> I have not installed any kind of firewall yet.
> >> What do you think is the best way to accomplish this task? If possible
> the
> >> easiest one. I do not want to do anything else but just bloc IP's, at
> this
> >> moment at least.
>

I wonder why nobodies mentioned a quite simple method with tcpwrappers and
hosts.allow / hosts.deny also




> >>
> >> Thanks in advance.
> >>
> >> Jorge Biquez
> >>
> >> ___
> >> 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"
> >>
> > ___
> > 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"
> >
> >
> >
> >
> >
> > 
> > 
> > 
> > "This email is intended to be reviewed by only the intended recipient
> >  and may contain information that is privileged and/or confidential.
> >  If you are not the intended recipient, you are hereby notified that
> >  any review, use, dissemination, disclosure or copying of this email
> >  and its attachments, if any, is strictly prohibited.  If you have
> >  received this email in error, please immediately notify the sender by
> >  return email and delete this email from your system."
> > 
> >
> >
> ___
> 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"
>
___
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: Simplest way to deny access to a class C

2011-03-04 Thread Patrick Gibson
fail2ban by default only bans an IP for 10 minutes, and that's
configurable. It can also email you anytime it imposes a ban, so one
can keep an eye on things at least in the beginning to see if it's
causing a problem for legitimate users.

On Thu, Mar 3, 2011 at 4:02 PM, Gary Gatten  wrote:
> Be careful of automated responses.  What if someone spoofs IP's of legit 
> users / customers / whatever and your automated response blocks them?  Not 
> good.
>
> I thought about blockingwell, never mind - might pi$$ someone off and 
> attract unwanted attention...
>
> -Original Message-
> From: owner-freebsd-questi...@freebsd.org 
> [mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Patrick Gibson
> Sent: Thursday, March 03, 2011 5:58 PM
> To: Jorge Biquez
> Cc: freebsd-questions@freebsd.org
> Subject: Re: Simplest way to deny access to a class C
>
> You might consider mod_security (/usr/ports/www/mod_security) which
> can be set up to ban hosts based on behaviour or characteristics.
>
> Or fail2ban (/usr/ports/security/py-fail2ban) is really great, too, in
> that it scans whatever logs you want, and can trigger a block in your
> firewall if enough violating log entries are found within a particular
> period of time. Everything is totally configurable, and there are
> plenty of examples that come with it.
>
> Patrick
>
>
> On Thu, Mar 3, 2011 at 8:59 AM, Jorge Biquez  wrote:
>> Hello all.
>>
>> I am sorry in advance if this question sounds too stupid.
>>
>> I have a small server for personal use of webpages running:
>>
>> 7.3-PRERELEASE FreeBSD 7.3-PRERELEASE #0
>>
>> it is working fine , no problem very stable.
>>
>> I just need to block some IP class C address that are always trying to
>> "discover" directories or applications under the web server. They do not do
>> and can not do anything since this server has nothing installed but i am
>> tired of seeing in the logs all the intents they do every 2-3 seconds.
>>
>> I have not installed any kind of firewall yet.
>> What do you think is the best way to accomplish this task? If possible the
>> easiest one. I do not want to do anything else but just bloc IP's, at this
>> moment at least.
>>
>> Thanks in advance.
>>
>> Jorge Biquez
>>
>> ___
>> 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"
>>
> ___
> 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"
>
>
>
>
>
> 
> 
> 
> "This email is intended to be reviewed by only the intended recipient
>  and may contain information that is privileged and/or confidential.
>  If you are not the intended recipient, you are hereby notified that
>  any review, use, dissemination, disclosure or copying of this email
>  and its attachments, if any, is strictly prohibited.  If you have
>  received this email in error, please immediately notify the sender by
>  return email and delete this email from your system."
> 
>
>
___
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: Simplest way to deny access to a class C

2011-03-04 Thread David Brodbeck
On Thu, Mar 3, 2011 at 4:02 PM, Gary Gatten  wrote:
> Be careful of automated responses.  What if someone spoofs IP's of legit 
> users / customers / whatever and your automated response blocks them?  Not 
> good.

Fortunately this is a relatively low risk with fail2ban, because to
spoof a failed SSH connection you need to spoof a whole three-way TCP
handshake.This could happen, but only if the attacker is on the
same subnet as the affected customer or can intercept all their
traffic for a man-in-the-middle attack.  A bigger risk is customers
fat-fingering their password repeatedly and locking themselves out. ;)
___
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: Simplest way to deny access to a class C

2011-03-04 Thread krad
On 4 March 2011 02:43, Jorge Biquez  wrote:

> Thank you all for your time and comments.
>
> I guess that I will install a firewall, that way I can also block those
> Class C's from sending tons of emails to non existing accounts
> I will read the website to see the best options.  Any suggestion is more
> than welcome.
>
> Jorge Biquez
>
>
> At 06:02 p.m. 03/03/2011, you wrote:
>
>> Be careful of automated responses.  What if someone spoofs IP's of legit
>> users / customers / whatever and your automated response blocks them?  Not
>> good.
>>
>> I thought about blockingwell, never mind - might pi$$ someone off and
>> attract unwanted attention...
>>
>> -Original Message-
>> From: owner-freebsd-questi...@freebsd.org [mailto:
>> owner-freebsd-questi...@freebsd.org] On Behalf Of Patrick Gibson
>> Sent: Thursday, March 03, 2011 5:58 PM
>> To: Jorge Biquez
>> Cc: freebsd-questions@freebsd.org
>> Subject: Re: Simplest way to deny access to a class C
>>
>> You might consider mod_security (/usr/ports/www/mod_security) which
>> can be set up to ban hosts based on behaviour or characteristics.
>>
>> Or fail2ban (/usr/ports/security/py-fail2ban) is really great, too, in
>> that it scans whatever logs you want, and can trigger a block in your
>> firewall if enough violating log entries are found within a particular
>> period of time. Everything is totally configurable, and there are
>> plenty of examples that come with it.
>>
>> Patrick
>>
>>
>> On Thu, Mar 3, 2011 at 8:59 AM, Jorge Biquez 
>> wrote:
>> > Hello all.
>> >
>> > I am sorry in advance if this question sounds too stupid.
>> >
>> > I have a small server for personal use of webpages running:
>> >
>> > 7.3-PRERELEASE FreeBSD 7.3-PRERELEASE #0
>> >
>> > it is working fine , no problem very stable.
>> >
>> > I just need to block some IP class C address that are always trying to
>> > "discover" directories or applications under the web server. They do not
>> do
>> > and can not do anything since this server has nothing installed but i am
>> > tired of seeing in the logs all the intents they do every 2-3 seconds.
>> >
>> > I have not installed any kind of firewall yet.
>> > What do you think is the best way to accomplish this task? If possible
>> the
>> > easiest one. I do not want to do anything else but just bloc IP's, at
>> this
>> > moment at least.
>> >
>> > Thanks in advance.
>> >
>> > Jorge Biquez
>> >
>> > ___
>> > 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"
>> >
>> ___
>> 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"
>>
>>
>>
>>
>>
>> 
>> 
>> 
>> "This email is intended to be reviewed by only the intended recipient
>>  and may contain information that is privileged and/or confidential.
>>  If you are not the intended recipient, you are hereby notified that
>>  any review, use, dissemination, disclosure or copying of this email
>>  and its attachments, if any, is strictly prohibited.  If you have
>>  received this email in error, please immediately notify the sender by
>>  return email and delete this email from your system."
>> 
>>
>> ___
>> 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"
>>
>
> ___
> 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"
>


you might wamt to look at geoip as well. you can open  up services to specif
regions then, or block other regions. Can be controversial though.
___
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"


  1   2   3   4   5   6   7   8   9   10   >