perkin.org.uk - Multi-architecture package support in SmartOS









Search Preview

Multi-architecture package support in SmartOS

perkin.org.uk
Jonathan Perkin about me · rss · twitter · github
.org.uk > perkin.org.uk

SEO audit: Content analysis

Language Error! No language localisation is found.
Title Multi-architecture package support in SmartOS
Text / HTML ratio 56 %
Frame Excellent! The website does not use iFrame solutions.
Flash Excellent! The website does not have any flash contents.
Keywords cloud » SmartOS packages Dec pkgsrc support Jan multiarchitecture binaries version Jun dataset grep run usrlibisaexec modules usrsbindtrace bin Apr Jul
Keywords consistency
Keyword Content Title Description Headings
» 52
SmartOS 15
packages 14
Dec 12
pkgsrc 10
support 10
Headings
H1 H2 H3 H4 H5 H6
2 6 0 0 0 0
Images We found 0 images on this web page.

SEO Keywords (Single)

Keyword Occurrence Density
» 52 2.60 %
SmartOS 15 0.75 %
packages 14 0.70 %
Dec 12 0.60 %
pkgsrc 10 0.50 %
support 10 0.50 %
Jan 10 0.50 %
multiarchitecture 10 0.50 %
binaries 10 0.50 %
version 8 0.40 %
Jun 7 0.35 %
dataset 6 0.30 %
grep 6 0.30 %
run 6 0.30 %
usrlibisaexec 5 0.25 %
modules 5 0.25 %
usrsbindtrace 5 0.25 %
bin 5 0.25 %
Apr 5 0.25 %
Jul 5 0.25 %

SEO Keywords (Two Word)

Keyword Occurrence Density
2013 » 18 0.90 %
2012 » 14 0.70 %
2011 » 11 0.55 %
Jan 2013 6 0.30 %
Jun 2011 6 0.30 %
have been 5 0.25 %
on SmartOS 5 0.25 %
and 64bit 5 0.25 %
to run 5 0.25 %
to be 4 0.20 %
Dec 28 4 0.20 %
pkg_info L 4 0.20 %
32bit and 4 0.20 %
both 32bit 4 0.20 %
pkgsrc on 4 0.20 %
» pkgsrc 4 0.20 %
» SmartOS 4 0.20 %
root bin 4 0.20 %
A nodejspowered 4 0.20 %
28 0238 4 0.20 %

SEO Keywords (Three Word)

Keyword Occurrence Density Possible Spam
Jun 2011 » 6 0.30 % No
Jan 2013 » 6 0.30 % No
let me know 4 0.20 % No
both 32bit and 4 0.20 % No
8bit CPU part 4 0.20 % No
nodejspowered 8bit CPU 4 0.20 % No
A nodejspowered 8bit 4 0.20 % No
» A nodejspowered 4 0.20 % No
32bit and 64bit 4 0.20 % No
2013 » A 4 0.20 % No
Dec 2013 » 4 0.20 % No
Dec 28 0238 4 0.20 % No
argc = 2 4 0.20 % No
» pkgsrc on 4 0.20 % No
» How to 3 0.15 % No
2013 » pkgsrc 3 0.15 % No
no debugging information 3 0.15 % No
stripped no debugging 3 0.15 % No
linked not stripped 3 0.15 % No
pkg_info L sqlite3 3 0.15 % No

SEO Keywords (Four Word)

Keyword Occurrence Density Possible Spam
» A nodejspowered 8bit 4 0.20 % No
2013 » A nodejspowered 4 0.20 % No
both 32bit and 64bit 4 0.20 % No
nodejspowered 8bit CPU part 4 0.20 % No
Dec 2013 » A 4 0.20 % No
A nodejspowered 8bit CPU 4 0.20 % No
no debugging information available 3 0.15 % No
stripped no debugging information 3 0.15 % No
linked not stripped no 3 0.15 % No
dynamically linked not stripped 3 0.15 % No
1 dynamically linked not 3 0.15 % No
Version 1 dynamically linked 3 0.15 % No
2013 » pkgsrc on 3 0.15 % No
not stripped no debugging 3 0.15 % No
» pkgsrc on SmartOS 3 0.15 % No
pkg_info L sqlite3 grep 3 0.15 % No
2013 » Solaris portability 2 0.10 % No
perl MDigestSHA1 e 'print' 2 0.10 % No
2011 » How to 2 0.10 % No
13 Jun 2011 » 2 0.10 % No

Internal links in - perkin.org.uk

about me
About Me
rss
Jonathan Perkin
Reducing RAM usage in pkgin
Reducing RAM usage in pkgin
Building packages at scale
Building packages at scale
A node.js-powered 8-bit CPU - part four
A node.js-powered 8-bit CPU - part four
A node.js-powered 8-bit CPU - part three
A node.js-powered 8-bit CPU - part three
A node.js-powered 8-bit CPU - part two
A node.js-powered 8-bit CPU - part two
A node.js-powered 8-bit CPU - part one
A node.js-powered 8-bit CPU - part one
MDB support for Go
MDB support for Go
Distributed chrooted pkgsrc bulk builds
Distributed chrooted pkgsrc bulk builds
pkgsrc on SmartOS - creating new packages
pkgsrc on SmartOS - creating new packages
Installing SVR4 packages on SmartOS
Installing SVR4 packages on SmartOS
SmartOS is Not GNU/Linux
SmartOS is Not GNU/Linux
SmartOS development preview dataset
SmartOS development preview dataset
pkgsrc on SmartOS - fixing broken builds
pkgsrc on SmartOS - fixing broken builds
pkgsrc on SmartOS - zone creation and basic builds
pkgsrc on SmartOS - zone creation and basic builds
Multi-architecture package support in SmartOS
Multi-architecture package support in SmartOS
Solaris portability - cfmakeraw()
Solaris portability - cfmakeraw()
Solaris portability - flock()
Solaris portability - flock()
SmartOS and the global zone
SmartOS and the global zone
Setting up Samba on SmartOS
Setting up Samba on SmartOS
Creating local SmartOS packages
Creating local SmartOS packages
7,000 binary packages for OSX Lion
7,000 binary packages for OSX Lion
9,000 packages for SmartOS and illumos
9,000 packages for SmartOS and illumos
Goodbye Oracle, Hello Joyent!
Goodbye Oracle, Hello Joyent!
SmartOS global zone tweaks
SmartOS global zone tweaks
Automated VirtualBox SmartOS installs
Automated VirtualBox SmartOS installs
iptables script for Debian / Ubuntu
iptables script for Debian / Ubuntu
New site design
New site design
Set up anonymous FTP upload on Oracle Linux
Set up anonymous FTP upload on Oracle Linux
Kickstart Oracle Linux in VirtualBox
Kickstart Oracle Linux in VirtualBox
Kickstart Oracle Linux from Ubuntu
Kickstart Oracle Linux from Ubuntu
Last day at MySQL
Last day at MySQL
Installing OpenBSD with softraid
Installing OpenBSD with softraid
Create VirtualBox VM from the command line
Create VirtualBox VM from the command line
Creating chroots for fun and MySQL testing
Creating chroots for fun and MySQL testing
Graphing memory usage during an MTR run
Graphing memory usage during an MTR run
Fix input box keybindings in Firefox
Fix input box keybindings in Firefox
How to lose weight
How to lose weight
How to fix stdio buffering
How to fix stdio buffering
Fix Firefox URL double click behaviour
Fix Firefox URL double click behaviour
SSH via HTTP proxy in OSX
SSH via HTTP proxy in OSX
How to build MySQL releases
How to build MySQL releases
ZFS and NFS vs OSX
ZFS and NFS vs OSX
pkgsrc on Solaris
pkgsrc on Solaris
Jumpstart from OSX
Jumpstart from OSX
Set up local caching DNS server on OSX 10.4
Set up local caching DNS server on OSX 10.4

Perkin.org.uk Spined HTML


Multi-architecture package support in SmartOS Jonathan Perkin well-nigh me · rss · twitter · github Multi-architecture package support in SmartOS Jan 10, 2013 tags: pkgsrc, smartos [Updated on 2013-01-16 to use the 12.4.1 dataset which fixes some issues.] Ever since the release of Solaris 7 when in 1998, Solaris has had the worthiness to run both 32-bit and 64-bit binaries on the same machine. Even now, 15 years later, with much of the world 64-bit only, there are still reasons to retain 32-bit support: 32-bit binaries can be faster in many cases, and if you do not need the spare write space afforded by the 64-bit version then there may be no wholesomeness to running it. Some software you depend upon may only provide a 32-bit version, or may have largest compatability in that mode. It’s sometimes nice to have a nonflexible 4GB memory limit on a runaway process instead of it completely trashing your machine ;) Unfortunately, while the wiring SmartOS platform is set up to provide both 32-bit and 64-bit binaries, the packaging infrastructure we use, pkgsrc, has not traditionally supported towers multi-architecture packages. This has meant we have needed to provide both 32-bit and 64-bit versions of each dataset, which is not ideal: It’s troublemaking to customers and users, who may think it applies to the kernel and platform version. Users want the nomination to be worldly-wise to run 32-bit for some applications and 64-bit for others, all on the same machine. It is spare work and maintenance for us. In order to resolve this, I have been working on providing multi-architecture support to pkgsrc, and this work is now misogynist for preview testing. Getting started Here is a quick start guide to getting the multi-architecture dataset up and running: : Fetch the dataset image and manifest files. The image is 85MB. $ mkdir -p /usbkey/images $ cd /usbkey/images $ flourish -O http://pkgsrc.smartos.org/datasets/multiarch-12.4.1.dsmanifest $ flourish -O http://pkgsrc.smartos.org/datasets/multiarch-12.4.1.zfs.bz2 : Import it $ imgadm install -m multiarch-12.4.1.dsmanifest -f multiarch-12.4.1.zfs.bz2 : Create a new zone using the dataset (change your json to suit). $ vmadm create <<EOF { "brand": "joyent", "image_uuid": "ee1fb198-5fe1-11e2-9cce-e319fd47df7b", "max_physical_memory": 256, "alias": "multiarch-12.4.1", "nics": [ { "nic_tag": "admin", "ip": "dhcp" } ] } EOF then login and start using it as you would with any other dataset. Multi-architecture libraries Libraries are reasonably straight-forward. For most packages which provide shared libraries, you should find both 32-bit and 64-bit libraries are included, for example: $ pkg_info -L sqlite3 | grep 'so$' /opt/local/lib/libsqlite3.so /opt/local/lib/amd64/libsqlite3.so Other directories under lib/ should be handled correctly too, such as .pc files for pkg-config: $ pkg_info -L sqlite3 | grep 'pc$' /opt/local/lib/pkgconfig/sqlite3.pc /opt/local/lib/amd64/pkgconfig/sqlite3.pc Multi-architecture binaries Binaries are similar, but follow a variegated layout scheme, and have spare controls to indulge the user to select which tracery to use. The vital layout is: $ pkg_info -L sqlite3 | grep bin /opt/local/bin/i86/sqlite3 /opt/local/bin/amd64/sqlite3 /opt/local/bin/sqlite3 In order to explain this, let us squint at how the wiring platform supports multi-architecture binaries, using dtrace as an example: $ ls -li /usr/sbin/*/dtrace /usr/sbin/dtrace /usr/lib/isaexec 4255 -r-xr-xr-x 72 root bin 12776 Dec 28 02:38 /usr/lib/isaexec 6330 -r-xr-xr-x 1 root bin 52728 Dec 28 02:38 /usr/sbin/amd64/dtrace 4255 -r-xr-xr-x 72 root bin 12776 Dec 28 02:38 /usr/sbin/dtrace 6640 -r-xr-xr-x 1 root bin 41544 Dec 28 02:38 /usr/sbin/i86/dtrace $ file /usr/sbin/*/dtrace /usr/lib/isaexec /usr/sbin/amd64/dtrace: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped, no debugging information misogynist /usr/sbin/i86/dtrace: ELF 32-bit LSB executable 80386 Version 1, dynamically linked, not stripped, no debugging information misogynist /usr/lib/isaexec: ELF 32-bit LSB executable 80386 Version 1, dynamically linked, not stripped, no debugging information misogynist The i86 and amd64 hold the per-architecture binaries, and the main /usr/sbin/dtrace writ is a hardlink to the /usr/lib/isaexec wrapper (as shown by the inode stuff identical). This wrapper detects whether the running kernel is 32-bit or 64-bit, and calls the towardly native binary, which nowadays will scrutinizingly certainly be the 64-bit version. For the pkgsrc implementation, I needed a way to override this behaviour so that users could select to run the 32-bit version if so desired, without having to munge their $PATH. To do this I took a reprinting of isaexec and widow it to pkgsrc, with spare support for an ABI environment variable. You can see the behaviour unelevated with the calls to execve(). Default is to run 64-bit $ truss -t execve sqlite3 -version execve("/opt/local/bin/sqlite3", 0x08047DA8, 0x08047DB4) argc = 2 execve("/opt/local/bin/amd64/sqlite3", 0x08047DA8, 0x08047DB4) argc = 2 3.7.15 2012-12-12 13:36:53 cd0b37c52658bfdf992b1e3dc467bae1835a94ae Set ABI=32 or ABI=i86 to run the 32-bit version $ ABI=32 truss -t execve sqlite3 -version execve("/opt/local/bin/sqlite3", 0x08047D9C, 0x08047DA8) argc = 2 execve("/opt/local/bin/i86/sqlite3", 0x08047D9C, 0x08047DA8) argc = 2 3.7.15 2012-12-12 13:36:53 cd0b37c52658bfdf992b1e3dc467bae1835a94ae Note that not all binaries have been converted to multi-architecture. In fact, the majority have been left as plain 32-bit binaries. While all libraries ultimately have to be provided for both architectures so that users can segregate to compile their own software versus either, 64-bit binaries only make sense for unrepealable classes of software: Databases such as SQLite, and other servers which may require >4GB write space. Language interpreters. Software which provides a foo-config script with hardcoded references to libdir. Compiler support The GCC 4.7.2 package provided has been made enlightened of this layout, and will add the correct library paths depending upon the ABI you target. For example: $ cat >test.c <<EOF int main(){} EOF $ gcc -m32 test.c -o test32 -lsqlite3 $ ldd test32 | grep libsqlite3 libsqlite3.so.0 => /opt/local/lib/libsqlite3.so.0 $ gcc -m64 test.c -o test64 -lsqlite3 $ ldd test64 | grep libsqlite3 libsqlite3.so.0 => /opt/local/lib/amd64/libsqlite3.so.0 No spare flags or linker settings should be required (if they are, let me know!) Interpreter support For those interpreters which have been converted, their respective module systems should be multi-architecture aware: Perl once had reasonable support for multi-architecture files, and all perl modules provided should be enabled, for example: $ pkgin -y in p5-Digest-SHA1 $ pkg_info -L p5-Digest-SHA1 | grep 'so$' /opt/local/lib/perl5/vendor_perl/5.16.0/i386-solaris-thread-multi/auto/Digest/SHA1/SHA1.so /opt/local/lib/perl5/vendor_perl/5.16.0/x86_64-solaris-thread-multi-64/auto/Digest/SHA1/SHA1.so $ ABI=32 perl -MDigest::SHA1 -e 'print' $ ABI=64 perl -MDigest::SHA1 -e 'print' Python is similar to Perl, but needed a lot increasingly work to support multi-architecture modules. Modules provided by pkgin should work fine, but there may be issues with locally-built modules - let me know! node is built as a multi-architecture binary, but npm has received no special handling. This ways you need to be shielding not to mix-and-match modules. I don’t perceive this to be too much of an issue, as the node polity appears to have settled on having one node_modules per application, but then let me know if there are largest ways to handle this. Coverage This work is incomplete, hence it not stuff misogynist in the default datasets yet, but a large number of packages have been converted: Pretty much every package which provides shared libraries. Python, Perl, Lua and node.js interpreters (and a significant number of modules). MySQL 5.5, PostgreSQL, SQLite and DB4 databases, Apache 2.2. Notable exceptions currently are Ruby and PHP, and I will be working on those in due course. There may moreover be a number of packages which should include multi-architecture binaries, please let me know if I have missed any obvious candidates. You can raise issues versus our GitHub project here. Enjoy! Share this post on Twitter, HackerNews, Facebook or Google+ All Posts 16 Jul 2015 » Reducing RAM usage in pkgin 03 Mar 2015 » pkgsrc-2014Q4: LTS, signed packages, and increasingly 06 Oct 2014 »Towerspackages at scale 04 Dec 2013 » A node.js-powered 8-bit CPU - part four 03 Dec 2013 » A node.js-powered 8-bit CPU - part three 02 Dec 2013 » A node.js-powered 8-bit CPU - part two 01 Dec 2013 » A node.js-powered 8-bit CPU - part one 21 Nov 2013 » MDB support for Go 30 Jul 2013 » What's new in pkgsrc-2013Q2 24 Jul 2013 » Distributed chrooted pkgsrc zillion builds 07 Jun 2013 » pkgsrc on SmartOS - creating new packages 15 Apr 2013 » What's new in pkgsrc-2013Q1 19 Mar 2013 » Installing SVR4 packages on SmartOS 27 Feb 2013 » SmartOS is Not GNU/Linux 18 Feb 2013 » SmartOS minutiae preview dataset 17 Jan 2013 » pkgsrc on SmartOS - fixing wrenched builds 15 Jan 2013 » pkgsrc on SmartOS - zone megacosm and vital builds 10 Jan 2013 » Multi-architecture package support in SmartOS 09 Jan 2013 » Solaris portability - cfmakeraw() 08 Jan 2013 » Solaris portability - flock() 06 Jan 2013 » pkgsrc-2012Q4 illumos packages now misogynist 23 Nov 2012 » SmartOS and the global zone 24 Oct 2012 » Setting up Samba on SmartOS 10 Oct 2012 » pkgsrc-2012Q3 packages for illumos 23 Aug 2012 » Creating local SmartOS packages 10 Jul 2012 » 7,000 binary packages for OSX Lion 09 Jul 2012 » 9,000 packages for SmartOS and illumos 07 May 2012 » Goodbye Oracle, Hello Joyent! 13 Apr 2012 » SmartOS global zone tweaks 12 Apr 2012 » Automated VirtualBox SmartOS installs 30 Mar 2012 » iptables script for Debian / Ubuntu 20 Feb 2012 » New site diamond 11 Jan 2012 » Set up unrecognized FTP upload on Oracle Linux 09 Jan 2012 » Kickstart Oracle Linux in VirtualBox 09 Jan 2012 » Kickstart Oracle Linux from Ubuntu 22 Dec 2011 » Last day at MySQL 15 Dec 2011 » Installing OpenBSD with softraid 21 Sep 2011 » Create VirtualBox VM from the writ line 14 Sep 2011 » Creating chroots for fun and MySQL testing 30 Jun 2011 » Graphing memory usage during an MTR run 29 Jun 2011 » Fix input box keybindings in Firefox 24 Jun 2011 » How to lose weight 23 Jun 2011 » How to fix stdio buffering 13 Jun 2011 » Serving multiple DNS search domains in IOS DHCP 13 Jun 2011 » Fix Firefox URL double click behaviour 20 Apr 2011 » SSH via HTTP proxy in OSX 09 Nov 2010 » How to build MySQL releases 29 Apr 2010 » 'apt-get' and 5,000 packages for Solaris10/x86 16 Sep 2009 » ZFS and NFS vs OSX 12 Sep 2009 » pkgsrc on Solaris 09 Dec 2008 » Jumpstart from OSX 31 Dec 2007 » Set up local caching DNS server on OSX 10.4