Re: CFT: FreeBSD Package Base

2019-04-30 Thread David Chisnall

On 29/04/2019 21:12, Joe Maloney wrote:

With CFT version you chose to build, and package individual components such as 
sendmail with a port option.  That does entirely solve the problem of being 
able to reinstall sendmail after the fact without a rebuild of the userland 
(base) port but perhaps base flavors could solve that problem assuming flavors 
could extend beyond python.


This sounds very much like local optimisation. It's now easy to create a 
custom base image.  Great.  But how do I express dependencies in ports 
on a specific base configuration? This is easy if I depend on a specific 
base package, but how does this work in your model?  For example, if I 
have a package that depends on a library that is an optional part of the 
base system, how do I express that pkg needs to either refuse to install 
it, or install a userland pkg that includes that library in place of my 
existing version as part of the install process?


More importantly for the container use case, if I want to take a 
completely empty jail and do pkg ins nginx (for example), what does the 
maintainer of the nginx port need to do to express the minimum set of 
the base system that needs to be installed to allow nginx to work?


One of the goals for the pkg base concept was to allow this kind of use 
case, easily creating a minimal environment required to run a single 
service. With a monolithic base package set, you're going to need some 
mechanism other than packages to express the specific base subset 
package that you need and I think that you need to justify why this 
mechanism is better than using small individual packages.


David
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: svn commit: r322875 - head/sys/dev/nvme

2017-08-25 Thread David Chisnall
On 25 Aug 2017, at 07:32, Mark Millard  wrote:
> 
> As I remember _Static_assert is from C11, not
> the older C99.

In pre-C11 dialects of C, _Static_assert is an identifier reserved for the 
implementation.  sys/cdefs.h defines it to generate a zero-length array if the 
condition is true or a negative-length array if it is false, emulating the 
behaviour (though giving less helpful error messages)

> 
> As I understand head/sys/dev/nvme/nvme.h use by
> C++ code could now reject attempts to use
> _Static_assert .

In C++, _Static_assert is an identifier reserved for the implementation, but in 
C++11 or newer static_assert is a keyword.  sys/cdefs.h defines _Static_assert 
to static_assert for newer versions of C++ and defines it to the 
C-before-11-compatible version for C++-before-11.

TL;DR: We have gone to a lot of effort to ensure that these keywords work in 
all C/C++ dialects, please use them, please report bugs if you find a case 
where they don’t work.

David

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

Re: 11.1-RELEASE has issue with system headers in pedantic mode (type nullability specifier)

2017-08-07 Thread David Chisnall
On 7 Aug 2017, at 16:20, Maxim Sobolev  wrote:
> 
> One way to defeat this would be to mark those headers with the #pragma
> clang system_header. As per:
> 
> https://clang.llvm.org/docs/UsersManual.html#id27

That won’t fix the issue, because base (as you can see from the passed compile 
command) is compiled with -Wsystem-headers, which issues warnings even in 
system headers.  This is increasingly unhelpful and must, for example, be 
turned off when compiling anything written in C++ because of warnings in libc++ 
headers.

David

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

Re: Problems with our libgcc_s.so in base [FYI: armv6 C++/g++6 example under stable/11 -r304029]

2016-08-22 Thread David Chisnall
On 21 Aug 2016, at 22:23, Mark Millard  wrote:
> 
> On armv6 (an rpi2) C++ by itself can have /lib/libgcc_s.so.1 not being 
> sufficient, for example with g++6 being used: 
> 
>> # g++6 -std=c++14 -O2 cpp_clocks_investigation.cpp
>> # ldd a.out
>> a.out:
>>libstdc++.so.6 => /usr/local/lib/gcc6/libstdc++.so.6 (0x2010)
>>libm.so.5 => /lib/libm.so.5 (0x20053000)
>>libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x20076000)
>>libc.so.7 => /lib/libc.so.7 (0x2030)
>> # ./a.out
>> /usr/local/lib/gcc6/libstdc++.so.6: Undefined symbol "__aeabi_uldivmod"
> 

The problem appears to be that we’ve not imported (all of?) the ARM-specific 
bits of compiler-rt.  For example, this function is provided upstream:

http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/arm/aeabi_uldivmod.S?revision=273500=markup

David



smime.p7s
Description: S/MIME cryptographic signature


Re: [CFT] Call for testing pkg 1.5.0

2015-04-01 Thread David Chisnall
On 1 Apr 2015, at 05:03, Rui Paulo rpa...@me.com wrote:
 
 That is expected.  WITH_PKG=devel is a make(1) option that only affects ports 
 (non-binary pkgs).

Are you sure?  I have it in make.conf on one of my systems where I never build 
ports manually (and don't even have a ports tree installed) and there I get 
this:

$ pkg -v
1.4.99.13

In a jail on the same machine without the make.conf entry, I get the stable 
version.  This is how I've been testing pkg-devel for a while.  Is there a 
different recommended way?

David

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


Re: FreeBSD 9.0-STABLE problem with the Adaptec Storage Manager

2012-07-06 Thread David Chisnall
On 6 Jul 2012, at 20:32, Sergey Kandaurov wrote:

 This is probably because the private symbol __collate_load_error changed
 to macro (i.e. removed) in r235785 after 9.0. If so, it might brake those
 older binaries which rely on that symbol, though it's still defined in
 Symbol.map. Probably David Chisnall could further comment on this.

This was accidentally removed in the xlocale refactoring.  I've restored it in 
r238182 and CC'd re@ for permission to merge to the 9.1 release branch.

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


Re: Why Are You Using FreeBSD?

2012-06-02 Thread David Chisnall
On 2 Jun 2012, at 03:56, Erich Dollansky wrote:

 But I have to mention one disadvantage. The ports are in no way linked to the 
 releases. This leads to situations in which a small change in a basic library 
 will result in a complete update of the installed ports. I expressed this 
 already many time here. It would be of advantage if the ports tree would also 
 have tags like the base system itself.

OpenBSD did this for a while, but they gave up because they weren't doing it 
well enough to recommend it and it did more harm to users to do it badly than 
not at all.

Ideally, you want to get security fixes for all installed applications, but 
nothing else, in this model.  There are two ways of doing this:

- Back-port security fixes to the version shipped with the base system
- Import the security-fixed version into the stable set.

The second option has the problem that you identified: if the new version 
depends on a newer library, then this cascades and you end up needing to import 
a new version of hundreds of ports.  

The first option has a much simpler disadvantage: it requires a huge amount of 
manpower.  Companies like Red Hat can do this because they charge their users a 
lot for this service.  We could probably do this if we had enough users willing 
to pay for the service, or if we restrict it to a set of packages that do their 
own security backports upstream.

The problem with the second option can be alleviated if we make it easier to 
have multiple versions of libraries installed at the same time (this is 
something that the PBI system in PC-BSD does, albeit in an ugly hackish way 
that could be improved significantly with a bit of assistance from rtld).  

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


Re: Why Are You Using FreeBSD?

2012-06-02 Thread David Chisnall
On 2 Jun 2012, at 12:01, Erich wrote:

 I would even accept to get the 'release' ports tree without security fixes 
 just to have a system which is up and running fast after I tried an upgrade 
 like what is happening at the moment with PNG dependent ports.

You have this already.  Just install the ports tree snapshot from the release...

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


Re: Why Are You Using FreeBSD?

2012-06-02 Thread David Chisnall
On 2 Jun 2012, at 12:19, Erich wrote:

 Hi,
 
 On 02 June 2012 PM 12:04:26 David Chisnall wrote:
 On 2 Jun 2012, at 12:01, Erich wrote:
 
 I would even accept to get the 'release' ports tree without security fixes 
 just to have a system which is up and running fast after I tried an upgrade 
 like what is happening at the moment with PNG dependent ports.
 
 You have this already.  Just install the ports tree snapshot from the 
 release...
 
 I know. I just what I would like to get is a direct method also people who 
 are just basic users can use it without many problems.

Run sysinstall, point it at the release CD / DVD, say 'install ports tree'...

Encouraging basic users to run insecure versions of applications, however, is 
something that I would strongly object to.

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


Re: Why Are You Using FreeBSD?

2012-05-31 Thread David Chisnall
Thanks to all who replied, both on and off list.  I've attempted to distill the 
replies that I got into a coherent summary.  I've put the draft on the wiki 
here:

http://wiki.freebsd.org/WhyUseFreeBSD

Feedback welcome!

David

On 30 May 2012, at 19:20, David Chisnall wrote:

 Hi Everyone,
 
 This is off-topic, so please feel free to disregard it, but I'm sending it to 
 this list in the hope that it will reach a largish number of users.  
 
 I am currently looking at updating some of our advocacy material (which 
 advertises exciting new features like SMP support), and before I do I'd like 
 to get a better feel for why the rest of you are using FreeBSD.  If you had 
 to list the three things you most like about FreeBSD, which would you pick?  
 Are they the same as when you first started using it?  
 
 David

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


Why Are You Using FreeBSD?

2012-05-30 Thread David Chisnall
Hi Everyone,

This is off-topic, so please feel free to disregard it, but I'm sending it to 
this list in the hope that it will reach a largish number of users.  

I am currently looking at updating some of our advocacy material (which 
advertises exciting new features like SMP support), and before I do I'd like to 
get a better feel for why the rest of you are using FreeBSD.  If you had to 
list the three things you most like about FreeBSD, which would you pick?  Are 
they the same as when you first started using it?  

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


libc++ has landed

2012-05-23 Thread David Chisnall
Hi Everyone,

I have just finished merging libc++ and all of the things that it depends on 
into 9-STABLE.  Since 9.1 is due to branch Real Soon Now™, it would be good if 
it could see a bit of testing before then.  Because it uses C++11, libc++ will 
only work if built with clang, so it is disabled in the default build for now.  
To build it, you will need to add the following to your /etc/src.conf:

CC=clang
CXX=clang++
CPP=clang-cpp
WITH_LIBCPLUSPLUS=yes

You can then just make  make install in lib/libcxxrt and lib/libc++.  This 
requires a (very) recent libc, containing the xlocale APIs, so you'll also need 
to reinstall lib/libc and include.  If you want to try mixing libstdc++ and 
libc++, then you will need to also recompile / install libstdc++ from stable.  
This depends on some rtld-elf fixes, so it's probably worth rebuilding world to 
make sure that you have everything.  

Once all of this is installed, there are two things you can test.  The simplest 
is the libstdc++ / libcxxrt combination.  To do this, just add this to 
/etc/libmap.conf:

libsupc++.so.1  libcxxrt.so.1

This will use libcxxrt instead of libsupc++.  These libraries implement the 
low-level parts of C++ (RTTI, exceptions, and so on).  The other thing that you 
can try is compiling other C++ code using libc++.  This is trivial to do with 
clang++, just add -stdlib=libc++ to both your CXXFLAGS and LDFLAGS.

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


Re: RELENG_9 fails to compile with WITH_LIBCPLUSPLUS=yes in /etc/src.conf

2012-05-23 Thread David Chisnall
On 23 May 2012, at 10:29, Trond Endrestøl wrote:

 CC='gcc' 

snip

 something as make buildworld runs smoothly 
 without WITH_LIBCPLUSPLUS=yes in /etc/src.conf.

You are trying to build C++11 code with a C++98 compiler.  If you want to build 
libc++, you must be using clang++.  There is a reason it's not enabled by 
default...

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