old non-NWAM way: static ip: /etc/nodename, /etc/hosts and /etc/hostname., /etc/defaultrouter auto ip: touch /etc/dhcp.interface /etc/hostname6. /etc/resolv.conf, and make sure files dns mdns on /etc/nsswitch.conf hosts and ipnodes lines because sometimes this is added by dhcp (!!) opensolaris ips new way, nwamd: nwam in b130 does not really support static IP, but it's a few minutes' digging away from doing so, and I use it to do so. 1. set hostname WITH FQDN in /etc/nodename 2. svcadm enable network/dns/multicast 3. {hosts,ipnodes}: files mdns dns in /etc/nsswitch.conf 4. 0 static 1.2.3.4/24 in /etc/nwam/llp 5. in /etc/nwam/ulp/check_conditions mode 755 -----8<----- #! /usr/bin/bash if ifconfig 0 inet | tail +2 | /usr/gnu/bin/grep -q "inet 1\\.2\\.3\\.[0-9]* netmask ffffff00 "; then route add -net default route change -net default fi # workaround until b132 http://opensolaris.org/jive/message.jspa?messageID=466437#466437 # still does not work with aggrs until b135. in b135 if using aggr's, must create a User profile and remove the links that are members of the aggr. dladm up-aggr dladm up-vlan dladm up-vnic dladm init-linkprop -w -----8<----- 6. fix hosts file. I found: a. either don't make an ipv6 alias for localhost, or else don't use localhost in /etc/auto_home b. get rid of this host and host.local garbage in /etc/hosts. make sure hostname.f.q.d.n set in /etc/nodename is the first one returned for the 1.2.3.4 static address. 7. disable RIP crappo http://defect.opensolaris.org/bz/show_bug.cgi?id=5122 6907958 pfexec svcadm disable network/routing/route pfexec svcadm disable network/routing-setup default ciphers does not work with IOS. /etc/ssh/sshd_config: -----8<----- # (IOS) client "aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc", (Solaris) server "aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,arcfour" # Cipher ordering on the server side is not relevant. # Using CBC modes on the server side is not recommended # due to potential security issues in connection with the # SSH protocol version 2. Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes256-cbc -----8<----- how to run a CentOS domU http://hub.opensolaris.org/bin/view/Community+Group+xen/2008_11_dom0 http://mail.opensolaris.org/pipermail/xen-discuss/2010-January/005645.html -----8<----- $ pfexec pkg install xvm-gui $ pfexec svcadm enable milestone/xvm [set all clocks to UTC in /etc/{rtc_config,TIMEZONE} because of xen bugs in b130] [adjust dom0_mem=1663M in /rpool/boot/grub/menu.lst] [reboot] 576 pfexec lofiadm -a CentOS-5.5-x86_64-dvd.iso [<-- be careful to actually get dvd, not 8*cd ] /dev/lofi/2 578 pfexec mkdir /mnt/centos55 580 pfexec mount -F hsfs -o ro /dev/lofi/2 /mnt/centos55/ 581 pfexec share -o ro /mnt/centos55/ 588 pfexec pfexec zfs create -V 16G -b 32k -o compression=lzjb tub/vol-darkinung 589 pfexec virt-install --paravirt --nographics --name darkinung --ram 512 --os-type=linux -f /dev/zvol/dsk/tub/vol-darkinung -l nfs:200.1.1.186:/mnt/centos55 centos only has ext3. plan is, make a /boot, swap, /placeholder on the top of the disk and / on the bottom of the disk. install ext3 on bottom half of the disk, add xfs packages, migrate to xfs on top half taking care to use 32kB blocks (oops, impossible!) and 32kB-aligned partition table, reboot, delete ext3, resize xfs. if something goes awry: pfexec xm delete darkinung pfexec zfs destroy tub/vol-darkinung [go to 588] add xfs and update: yum install kmod-xfs-xen xfsdump xfsprogs yum clean all yum update glibc\* yum update yum\* rpm\* python\* yum clean all yum update shutdown -r now pygrub problems: virsh, start blah --console will not open the console until the kernel has control. virsh start blah in one window, and virsh console blah in another window, will let you interact with pygrub. xfsification: swapoff fdisk: move swap to [between boot and /] delete placeholder partition make 32kB-aligned xfs partition reboot mkfs.xfs -b size=4096 -d sunit=64,swidth=64 -l sunit=64 -L / -f /dev/xvda3 Filesystem "xvda3": Disabling barriers, trial barrier write failed <-- wtf asshole? this should work in xen/zvol for sure. guess it doesn't. mkdir /copy /copy/src /copy/dst mount --bind / /copy/src mount /dev/xvda3 /copy/dst (cd /copy/src && tar cf - .) | (cd /copy/dst && tar xpf -) brrk brrk this is not a faithful backup of a CentOS system because there are all kinds of xattr crappo for SELinux (http://danwalsh.livejournal.com/9737.html ). see fixfiles below. brrk brrk now two filesystems have LABEL=/ edit /etc/fstab and /copy/dst/etc/fstab not to use LABEL, and the latter file to swap which partition is mounted on / and have xfs root edit /boot/grub/menu.lst not to use LABEL mv /boot/initrd-`uname -r`.img /boot/initrd-`uname -r`.img-noxfs make a new /boot/grub/menu.lst entry for -noxfs mkinitrd -v -f --omit-scsi-modules --with=xennet --with=xfs --preload=xfs --fstab /copy/dst/etc/fstab --with=xenblk --preload=xenblk /boot/initrd-`uname -r`.img `uname -r` reboot. see ``pygrub problems'' above---you need to use two virsh's to see the pyGRUB boot menu. pyGRUB is still loading off /boot, though. pyGRUB does not need xfs support. at pyGRUB, 'e' edit the boot line and add ' enforcing=0' at the end of the kernel to turn off SELinux login as root, 'fixfiles relabel', and agree to clear /tmp. reboot again (will be without enforcing=0) remove ext3 partition with fdisk. expand xfs partition. write partition. remove ext3 from fstab also. reboot again. xfs_growfs / [poof] stop useless services: http://www.clubnix.net/index.php/Getting_Started:_Virtualisation_with_Xen_on_CentOS_using_Kickstart http://www.xen-support.com/?p=169 out the whole block to stop dnsmasq & virbr0 nfsification (still to do. I think it cannot work with SElinux though.): http://mike.neir.org/weblog/560 http://www.virtuatopia.com/index.php/CentOS_5_-_Build_a_Custom_Xen_Kernel_with_NFS_Root_Filesystem_(CONFIG_ROOT_NFS)_Support http://fedoraproject.org/wiki/StatelessLinux/NFSRoot <-- hints for mkinitrd https://fedoraproject.org/wiki/Dracut/Options#NFS <-- or maybe make dracut initrd instead of centos initrd -----8<----- How to copy an installed opensolaris / sxce: http://houst0n.wordpress.com/2009/06/07/dual-boot-sxce-and-opensolaris-2009-06/ 0. create rpool/ROOT/xxx at the destionation. set compression=lzjb 1. copy the rpool/ROOT/xxx filesystem using zfs send | zfs recv (on osol you may need pkg install SUNWnetcat) 2. copy path_to_inst driver_* zfs/zpool.cache from the working BE 3. touch /reconfigure 4. root filesystems should be canmount=noauto, mountpoint=/ edit /rpool/boot/grub/menu.lst (which is outside the BE) SXCE lu: findroot (BE_snv_130,0,a) osol: findroot (pool_rpool,0,a) both: bootfs rpool/ROOT/ kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS module$ /platform/i86pc/$ISADIR/boot_archive 5. osol did not come with a rescue miniroot when I did this. I need to figure out how to make one. SXCE had: kernel /boot/platform/i86pc/kernel/amd64/unix -s module /boot/amd64/x86.miniroot-safe ^^^^^old vvvvvnew http://opensolaris.org/jive/message.jspa?messageID=475869#475869 m.l.o.zfs-discuss [21191] 2010-04-20 1. Create the second root pool. # zpool create rpool2 c5t1d0s0 2. Create the new BE in the second root pool. # beadm create -p rpool2 osol2BE 3. Activate the new BE. # beadm activate 4. Install the boot blocks. 5. Test that the system boots from the second root pool. 6. Update BIOS and GRUB to boot from new pool. rtc in UTC: /etc/rtc_config /etc/default/init -- timezones and language /etc/default/login comment out CONSOLE= so 'ssh -l root ...' works /etc/default/login, /etc/default/su, /etc/default/cron be careful, /etc/default/su is sometimes 0 bytes. symlink to login if you like. For SXCE: PATH,SUPATH=/usr/xpg6/bin:/usr/xpg4/bin:/usr/sbin:/usr/bin:/usr/sfw/bin:/usr/gnu/bin:/usr/ccs/bin:/usr/X11R6/bin:/usr/dt/bin:/usr/openwin/bin For OpenSolaris/IPS: PATH,SUPATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin staring point: for t in /usr/*/{s,}bin /usr/*/*/{s,}bin; do ( cd $t && pwd -P ) ; done | sort | uniq be careful because almost all the /usr/*/bin in OpenSolaris are symlink farms to ../../bin for script compatibility and do no good in PATH. the default path is basically fine. you may want /usr/has/bin/vi if you hate VIM as much as I do, but solaris vi is pretty awful too. remove setting of PATH from /etc/skel/.profile and /root/.profile /etc/ssh/sshd_config PermitRootLogin yes X11Forwarding yes /etc/ssh/ssh_config ForwardX11 yes ForwardX11Trusted yes CheckHostIP no crontab -e root remove /usr/lib/update-manager/update-refresh.sh (no phoning home) /etc/hosts 127.0.0.1 localhost inventory.sun.com stops SunStudio/SunPro/SunWorkShop from phoning home installgrub -mv /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/cxtxdxs0 to install grub in the MBR, in the first sector of s0, and in ~30kB of filesystem empty area at the start of s0. typically on x86 s0 starts at cylinder 1 which is ~8MB from the start of the disk, but nothing goes between the start of the disk and s0 like you'd think it would---it all goes into the disk's sector 0 and the first few blocks of s0 edit /rpool/boot/grub/menu.lst $ISADIR is empty for 32-bit, or contains 'amd64' for 64-bit. you can force boot as one or the other by substituting emptystring or amd64 in the grub commandlines. the amd64 detection has in the past been broken in grub even when working in the kernel proper. i had to force failsafe to 32-bit: title Solaris failsafe findroot (pool_rpool,0,a) kernel$ /boot/platform/i86pc/kernel/unix -s module$ /boot/x86.miniroot-safe but i had weird problems with 4.5GB RAM on this Dell Dimension 5150 http://blog.jbit.net/2009/08/debian-squeeze-in-solaris-brandz-zone.html <-- improvement in lx26 brand at b131 postgres cheatsheet: -----8<----- http://blogs.sun.com/jkshah/entry/opensolaris_2008_11_and_postgresql need to make a dataset outside the zbe for postgres data so it'll escape beadm snapshotting/cloning once that's working within zones for image-update. setting mountpoints for zoned datasets is weird, though: http://mail.opensolaris.org/pipermail/zones-discuss/2009-January/004661.html outside the zone: zfs list -r tub/export/zone NAME USED AVAIL REFER MOUNTPOINT tub/export/zone 27.1G 335G 40.3K /export/zone tub/export/zone/awabagal 917M 335G 37.4K /export/zone/awabagal tub/export/zone/awabagal/ROOT 917M 335G 31.4K legacy tub/export/zone/awabagal/ROOT/zbe 917M 335G 2.72G legacy zfs create -o mountpoint=none tub/export/zone/awabagal/postgres-data zonecfg -z awabagal zonecfg:awabagal> add dataset zonecfg:awabagal:dataset> set name=tub/export/zone/awabagal/postgres-data zonecfg:awabagal:dataset> end zonecfg:awabagal> commit zonecfg:awabagal> exit inside the zone: zfs list NAME USED AVAIL REFER MOUNTPOINT tub 1.33T 335G 498K /tub tub/export 295G 335G 63.2M /export tub/export/zone 27.1G 335G 40.3K /export/zone tub/export/zone/awabagal 919M 335G 37.4K /export/zone/awabagal tub/export/zone/awabagal/ROOT 919M 335G 31.4K legacy tub/export/zone/awabagal/ROOT/zbe 919M 335G 2.73G legacy tub/export/zone/awabagal/postgres-data 31.4K 335G 31.4K none zfs set mountpoint=/var/postgres tub/export/zone/awabagal/postgres-data the /var/postgres directory is magical and hardcoded into the package. the rest, you do inside the zone: pkg install SUNWpostgr-83-server SUNWpostgr-83-client SUNWpostgr-jdbc SUNWpostgr-83-contrib SUNWpostgr-83-docs SUNWpostgr-83-devel SUNWpostgr-83-tcl SUNWpostgr-83-pl SUNWpgadmin3 svccfg import /var/svc/manifest/application/database/postgresql_83.xml svcadm enable postgresql_83:default_64bit add /usr/postgres/8.3/bin to {,SU}PATH in /etc/default/{login,su} a ``cluster'' is the postgres term for a data directory, which contains multiple databases the root user in a postgres database is called 'postgres' and is often the same name as the unix user under which the database runs but there does not seem to be any connection between the two, because postgres does not control client access by the filesystem permissions of the ``local'' UNIX socket, nor allow more than one local UNIX socket with different pg_hba.conf rights, nor use linux extensions that can tell a UNIX socket listener the userid of the client on the other end of his incoming connection. Any of these would be great. but they don't, so we have to use made-up passwords secured by the filesystem. start here: http://wiki.postgresql.org/wiki/Manual_Setup_at_the_Command_Line but initdb is already done for you by the SMF script. which leads you immediately here: http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html cd /var/postgres/8.3/data_64 vi pg_hba.conf uncomment the line that says 'local all postgres trust' add a line that says 'local all all md5' solaris, not surprising given their tradition, leaves this WIDE OPEN BY DEFAULT. close it. edit /etc/passwd and give the 'postgres' user a valid shell. su - postgres -c "pg_ctl reload -D $(pwd)" set a database superuser password psql -U postgres postgres <-- means default to 'postgres' database, and login as 'postgres' user. after the above pg_hba.conf lobotomizing, it should not ask for a password. postgres=# ALTER USER postgres WITH PASSWORD 'asdf'; <-- where asdf is the output of 'pwgen -s 32 1' there is no such thing as users now, so it will say ALTER ROLE postgres=# ^D vi pg_hba.conf comment out 'local all postgres trust', leaving only 'local all all md5' uncommented su - postgres -c "pg_ctl reload -D $(pwd)" psql -U postgres postgres Password for user postgres: asdf postgres=# now make one user and one database for each Django project: start here: http://www.postgresql.org/docs/current/static/user-manag.html http://www.postgresql.org/docs/current/static/sql-createrole.html http://docs.djangoproject.com/en/dev/topics/install/#get-your-database-running http://packages.python.org/django-jython/database-backends.html#postgresql psql -U postgres postgres Password for user postgres: asdf postgres=# CREATE DATABASE django_damagelog; CREATE DATABASE postgres=# CREATE ROLE django_damagelog WITH LOGIN; CREATE ROLE postgres=# ALTER ROLE django_damagelog WITH PASSWORD 'sdfg'; ALTER ROLE postgres=# GRANT ALL PRIVILEGES ON DATABASE django_damagelog TO django_damagelog; <-- django can do with less if you give up 'syncdb' command GRANT postgres=# ^D in settings.py: DATABASE_ENGINE = 'postgresql_psycopg2' <-- something else for Jython DATABASE_NAME = 'django_damagelog' DATABASE_USER = 'django_damagelog' DATABASE_PASSWORD = 'sdfg' DATABASE_HOST = '' DATABASE_PORT = '' -----8<----- infiniband: -----8<----- tavor -- (binary) --- memfull infinihost iii arbel -- Sun IB Updates 3 ($$$) (binary) --- memfree infinihost iii hermon -- (cddl) --- memfree connectx also, mellanox advertises some L3/L4 understanding of IPoIB in connectx that's missing from infinihost iii. perhaps the L4 preclass multiple interrupt stuff? I am not sure this really matters, even if it does really exist, because the RDMA stuff is not over IP. it seems many drivers are binary-only http://blogs.sun.com/RandomDude/entry/hca_line http://mail.opensolaris.org/pipermail/nfsrdma-discuss/2009-March/000037.html -- no arbel http://hub.opensolaris.org/bin/view/Main/no_source -- tavor listed under No Plans http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/sys/ib/adapters/hermon/ -- hermon source http://hub.opensolaris.org/bin/view/Community+Group+on/2008092302?viewer=code&language=en -- hermon CR http://echelog.matzon.dk/logs/browse/opensolaris/1272492000 [15:39:05] mbreitba: subnet manager (opensm - ofed) is running on another box that runs RHEL [15:39:24] Andys^: the X8DTTs have Mellanox on the MB [15:45:00] mbreitba: we're using SRP as the ULP [15:46:57] mbreitba: the connectx worked ok with snv 131 out of the box - took a lot of messing around - i have since re-written the driver [15:49:32] have those updates been pushed back into OSOL releases? [15:49:41] or were those private driver updates? [15:49:47] mbreitba: no. they are private. <-- [15:58:15] our favorite command is set copies=3 <-- BRRK BRRK, POSER / IDIOT WARNING. [15:58:57] no - 3 simple copies is perfect and obviates the need for raid in this setup [14:37:32] anyone using the hermon driver ? [14:37:36] (infiniband) [14:37:47] i can't figure out why the multipathing isnt working -----8<----- s10brand cheatsheet: -----8<----- pkgadd -d ~carton/solaris/sol-nv-b130-x86/Solaris_11/Product/ SUNWs10brandr SUNWs10brandu it's on the DVD in SXCE, not in the ``dev repository'' of course...there is no SXCE any more. perhaps this means no s10brand for u. try 'pkg install SUNWs10brand' 1. install the sol10 DVD into a virtualbox vdi 2. extract raw .dd from vdi 3. use 'disktype' package on ubuntu to read the disklabel of the .dd image (gparted cannot) note the offsets and sizes of the Solaris partition are relative to the MBR partition it's within. It says the boot partition ``includes label'' but it's referring to the Solaris VTOC label not the MBR label. sector 0 MBR label 1: sector n Solaris partition within MBR label sector n + 1 512-byte solaris vtoc label x: 0 -> points to sector n ``boot'' partition within solaris label. parts of grub (~25kB?) go here. y: o -> points to sector n + o ``root'' partition within solaris label. ZFS starts here. 4. use 'dd' to extract the 'y' partition above into an unlabelled file 5. zfs won't import it as a file vdev, but if you lofiadm -a, it will import the /dev/lofi/n. zpool import -f -R /a -d /dev/lofi rpool rpool-sol10 6. zfs snapshot -r rpool-sol10/ROOT/s10x_u8wos_08a@20100125-justinstalled zfs send -p -R rpool-sol10/ROOT/s10x_u8wos_08a@20100125-justinstalled | zfs recv -d tub/export/zone/t zfs destroy tub/export/zone/t/ROOT/s10x_u8wos_08a@20100125-justinstalled zfs destroy tub/export/zone/t/ROOT/s10x_u8wos_08a/var@20100125-justinstalled zfs rename tub/export/zone/t/ROOT/s10x_u8wos_08a tub/export/zone/s10x_u8wos_08a zfs set canmount=on tub/export/zone/s10x_u8wos_08a zfs set canmount=on tub/export/zone/s10x_u8wos_08a/var zfs snapshot -r tub/export/zone/s10x_u8wos_08a@20100126justinstalled zfs destroy tub/export/zone/t/ROOT zfs destroy tub/export/zone/t 7. bash-4.0# zoneadm -z tharawal install -d /export/zone/s10x_u8wos_08a/ -u bash-4.0# zoneadm -z tharawal boot bash-4.0# zlogin -C tharawal [Connected to zone 'tharawal' console] Reading ZFS config: done. Mounting ZFS filesystems: (6/6) Select a Locale 29. English, Australia (UTF-8) 8. no network. wtf? -----8<----- how to watch a zone boot without missing the first few bits: http://blogs.sun.com/observatory/entry/cloning_zones -----8<----- pfexec zoneadm -z myzoneclone ready pfexec zlogin -C myzoneclone [can also copy things into the zone at this point. it mounts all the zbe/whatever filesystems.] then, in another window: pfexec zoneadm -z myzoneclone boot -----8<----- how to fix keymaps in ancient Solaris with fully-proprietary Xsun server: -----8<----- Xsun uses the KIOCTYPE and KIOCLAYOUT ioctls on /dev/kbd to determine which layout file to use, based on the matching entries in /usr/openwin/etc/keytables/keytable.map . (If KIOCLAYOUT fails, it uses 0 for the layout--which is the case with most non-Sun keyboards.) The next Solaris version (whatever it will be called) will provide an "-l" option to kbd: $ kbd -l / type=4 / layout=34 (0x22) is there a /usr/openwin/share/etc/Keytables? To use an USB keyboard and/or mouse with a SPARC system that does not have USB support in the bootprom, you have to setup two variables in /etc/system, telling the system the physical device path for the USB keyboard and/or mouse, like this: set consconfig:usb_kb_path="/pci@1f,4000/pci@4/pci9710,35@6,1/keyboard@5" set consconfig:usb_ms_path="/pci@1f,4000/pci@4/pci9710,35@6/mouse@4" http://www.sun.com/desktop/whitepaper/Dual_FW_Whitepaper.pdf --- http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6303238 http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6280195 -- how to control text lookup of a key http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6280154 -- hunting for keytables all over the place --- I believe it is not necessary to do "sys-unconfig". As for x86 platform ther is a utility "kdmconfig". You can run kdmconfig to select Xsun and keyboard layout. Layout is set for console as well. Then run kdmconfig again and switch back to Xorg. The result is no change is made for desktop/Xorg, but only console keyboard is changed. you can do it manually as well by setting eeprom variable: bash-3.00# eeprom ... keyboard-layout=US-English e.g. bash-3.00# eeprom keyboard-layout=Spanish to get the list of available layouts run "kbd -s". or you can also edit: "/boot/solaris/bootenv.rc". As for kdmconfig the change is picked up inmediately after exiting kdmconfig. As for manual setting properties in boot/solaris/bootenv.rc via the eeprom(1M) you will probobly need to restart something to pickup the change or to reboot. Posted by Petr Hruska on January 03, 2008 at 02:21 PM UTC # Ups, forgot one thing: I believe keyboard layouts for console are located at: /usr/share/lib/keytables/ [note that USB keyboards, even generic ones, are considered Type 6 so they are listed as such in kbd -l and are in the type_6 directory, not the type_101 directory. then i think the actual layout is the file named layout_nn where nn is the output of kbd -l in hex. The names for eeprom/bootenv.rc variables come from kbd -s, and I don't know where is the table that maps these names to layouts.] --- set keyboard language LAYOUT= in /etc/default/kbd type 'dumpkeys' and look for shiftkeys+capslock and shiftkeys+leftctrl swap their key numbers and append to /usr/share/lib/keytables// the layouts are not complete. there is some base layout loaded in there at boot which they modify. dumpkeys shows the whole thing. edit /usr/dt/config/${LANG%.*}/sys.resources /usr/dt/config/C/sys.resources fix *ttyModes: erase ^H edit /usr/openwin/lib/locale/${LANG}/app-defaults/XTerm /usr/openwin/lib/app-defaults/XTerm add *VT100.eightBitInput: False *VT100.Translations: [...] remove Prior, Next, Home, End (to restore compiled-in default) add BackSpace: string(\177)\n to replace nonworking backarrowKey: false resource. --- i still don't know how to get rid of the ctrl-space grab. -- this is grabbed by a gnome keyboardwidget. use: iiim-properties you can turn it off easily. -----8<----- -----8<----- Sun has ECN support in Solaris 9. 2002. One needs to say "ndd -set /dev/tcp tcp_ecn_permitted 2" for an end-host to ask for ECN and needs to be done each boot. after opensolaris b134 it is similar to 'ipadm set-prop -p ecn=active tcp' and is supposed to survive reboots see http://arc.opensolaris.org/caselog/PSARC/2010/080/mail see http://hub.opensolaris.org/bin/view/Project+brussels/ndd_ipadm -----8<----- packages you want on a fresh IPS global install that are missing from a fresh IPS zone install this is for b130. for b13x and further, names are all changed to three levels of slashes and no more SUNW embarassment this is basic, basic shit and is <100MB, so just add it. your time and frustration is not worth stumbling into missing these things, and mine DEFINITELY isn't if I have to use your brokeass ``minified'' system. zlogin, then 'pkg install $(cat )' -----8<----- SUNWcpp SUNWrcmds SUNWgnu-coreutils SUNWgnu-diffutils SUNWgnu-findutils SUNWgnu-mp SUNWgnu-which SUNWgnutls SUNWgsed SUNWgtar SUNWman SUNWman-l10n-ja SUNWnetcat SUNWp7zip SUNWrsync SUNWscreen SUNWslocate SUNWtop SUNWunzip SUNWwget SUNWxorg-client-docs SUNWxorg-client-programs SUNWxorg-compatlinks SUNWzip SUNWgnu-emacs-x -----8<----- package systems -----8<----- sunfreeware, blastwave, opencsw ^^^^^^^ of those, use this one. it is based on GAR. http://automatthias.wordpress.com/2009/03/05/opencsw-is-where-the-goodness-is/ http://sourceforge.net/apps/trac/gar/wiki/WikiStart pkgsrc 2010-05-14 222 wget "ftp://ftp.netbsd.org/pub/pkgsrc/pkgsrc-2010Q1/pkgsrc.tar.gz" 223 mv pkgsrc pkgsrc-2010Q1.tar.gz 232 gunzip < ~/pkgsrc-2010Q1.tar.gz | gtar xpf - 160 export CVS_RSH=ssh 162 cvs update -Pd -r pkgsrc-2010Q1 > cvs-update 2>&1 & /etc/.../mk.conf: # preamble immedately below comes from /usr/pkgsrc/bootstrap/bootstrap. the rest is custom. # :r [--workdir]/mk.conf.example, remove duplication, verify our WRKOBJDIR preserved # then rm -rf [--workdir] # ignore [--workdir]/mk.conf .ifdef BSD_PKG_MK # begin pkgsrc settings ABI= 32 PKGSRC_COMPILER= sunpro [...] TOOLS_PLATFORM.sed?= /usr/pkg-2010Q1-a-01/bin/nbsed # end preamble, but the endif is further down below. WRKOBJDIR=/var/pkgsrc/wrkobj-2010Q1-a-01 # # directory layout: sources and binaries are detached, so there can be # more than one build connecting the two. # sources: # # /usr/pkgsrc # /var/pkgsrc/wrkobj-2010Q1-a-01 <-- set WRKOBJDIR in mk.conf, so it can be different # /var/pkgsrc/bootobj <-- --workdir. can rm -rf after bootstrap. # # binaries: # --prefix /usr/pkg-2010Q1-a-01 # --varbase /var/pkg-2010Q1-a-01 # --pkgdbdir /var/pkgsrc/pkg-2010Q1-a-01-db # --sysconfdir /etc/pkg-2010Q1-a-01 # --mk-fragment /etc/pkg-2010Q1-a-01/mk.conf # # the -01 is obviously a monotonically increasing revision/attempt marker # if updating /usr/pkgsrc or mk.conf PKG_OPTIONS and so on, and trying a # bulk build again, one might first rerun the bootstrap and increment # this attempt marker. # # I thought the 'a' might be a way-of-building discriminator, like # a - SunPro, 32-bit env CC=/opt/SunStudioExpress/bin/cc SUNWSPROBASE=/opt/SunStudioExpress ./bootstrap --abi=32 # b - SunPro, 64-bit # c - gcc, 32-bit # d - gcc, 64-bit # however I dunno if gcc can pick ABI. It might be forced one or the other # because the host gcc from ipkg 'gcc-dev' is one or the other. And of course # there are different versions of SunPro and of gcc. especially on sparc # there is gccfss (host gcc) while pkgsrc likes to try to use pkgsrc gcc. so # really we must use up letters and then say what kind of build we did with # that letter. The point would be to settle on a few ways-of-building, and # always do each attempt with all of the lettered ways-of-building to see # which ones produce the most packages, since honestly we do not really care # about anything else at this point. # # here is a first try at getting all the unfree licenses # grep ^LICENSE= */*/Makefile | sed -e 's/^[^:]*:LICENSE=[ ]*//' -e 's/AND //' | tr \ \\n |grep -- "-license$" |sort | uniq | sed -e 's/^/ /' -e 's/$/ \\/' ACCEPTABLE_LICENSES+= \ 3proxy-0.5-license \ [...] # most of the onerous licenses end in -license, but these don't: ACCEPTABLE_LICENSES+= \ fee-based-commercial-use \ generic-nonlicense \ missing \ no-advertisement \ no-advertising \ no-commercial-use \ no-profit \ teamspeak-license-200700213 PKG_RESUME_TRANSFERS=YES LIBDVDCSS_MASTER_SITES=http://www.videolan.org/pub/libdvdcss/ PKG_DEFAULT_OPTIONS+= inet6 idea PKG_OPTIONS.irssi= inet6 irssi-perl ssl PAPERSIZE=Letter [...] .endif -----8<----- How to use pkgbuild and a local IPS repository a.k.a. how to create the environment their source packages expect to build under -----8<----- overview Contributing OpenSolaris Packages: http://hub.opensolaris.org/bin/view/Community+Group+sw-porters/contributing 0. add the source juicer to the ipkg repository list see http://jucr.opensolaris.org/ pkg set-publisher -O http://jucr.opensolaris.org/contrib/ jucr-contrib Two paths: PATH A, JDS: -----8<----- 1. http://blogs.sun.com/mattman/entry/how_to_build_jds_on <-- 1year old as of 2010-05-10 retrieval this is based on http://hub.opensolaris.org/bin/view/Project+jds/building <-- >2years old a. pfexec pkg install ss-dev SUNWgnome-common-devel SUNWperl-xml-parser SUNWgnu-gettext SUNWgnome-xml-root SUNWgnome-xml SUNWgnome-xml-share SUNWdoxygen ***NOTE THAT ss-dev PHONES HOME.*** 14:16 <@carton> Bifrost: it is $0 and no clickthrough now. pfexec pkg install ss-dev, poof, installed. it autogenerates a uuid in ~/.sunstudio/user_info/activity_sun_studio_ceres_SunOS-i86pc.xml and batches up use data in there to blast toward sun chunkwise. 14:32 <@lopharin> THE SUN COMPILER WILLL PHONE HOME 14:32 <@carton> 127.1 inventory.sun.com in /etc/hosts stops it. *FOR NOW*. a0. if you are building other than JDS, you may want 'pfexec pkg install gcc-dev' which is gcc ***3.4.3*** (what?!), gdb, binutils. or you may find this is so old as to be a dangerous distraction. other options: gcc-43 is 4.3.3 as of b133 gccfss is 4.x with sunstudio backend, for sparc only. I think you should definitely try this on sparc rather than pkgsrc/gentoo/whatever gcc. developer/sunstudio12u1 - Studio compilers and tools for opensolaris developer/gcc/gcc-43 - gcc for opensolaris developer/gcc/gcc-dev-4 - gcc-43 plus tools ``3.4.3 is still the official GCC version used for building OpenSolaris. '' as of 2010-02-09, so building onnv itself with gcc really is a total joke. b. pfexec /usr/share/sgml/docbook/docbook-catalog-install.sh c. curl -o desktop-cbe-src-1.7.0-rc1.tar.bz2 http://dlc.sun.com/osol/jds/downloads/cbe/test/desktop-cbe-src-1.7.0-rc1.tar.bz2 <-- ~2years old as of 2010-05-10 retrieval d. fix things in cbe 1.7.0: cbe-install falsely detects SVR4 package architecture because of a check for /var/pkg/catalog. Remove this check. cbe-install remove check/dependency on SUNWsfwhea. it doesn't exist or isn't needed or something. fix CBEdiff.spec problem: pkgbuild: error: Installed (but unpackaged) file(s) found: pkgbuild: /opt/dtbld/share/locale pkgbuild: /opt/dtbld/share/locale/fr pkgbuild: /opt/dtbld/share/locale/fr/LC_MESSAGES pkgbuild: /opt/dtbld/share/locale/fr/LC_MESSAGES/diffutils.mo solution: add to %files section of CBEdiff.spec: %dir %{_prefix}/share/locale/*/LC_MESSAGES %{_prefix}/share/locale/*/LC_MESSAGES/diffutils.mo or add to %install section of CBEdiff.spec: rm -rf $RPM_BUILD_ROOT%{_datadir}/locale fix CBEgnuawk.spec, same as above fix CBEgnused.spec (this goes with CBEsed. package and spec name don't match.) comment out 'BuildRequires: SUNWgnome-base-libs-devel' e. run './cbe-install --gnome --kde --compiler /opt/SunStudioExpress/bin/cc' in interactive mode, because it craps out continuously 2. a. wget http://prdownloads.sourceforge.net/pkgbuild/pkgbuild-1.3.101.tar.bz2?download no idea why this is not in IPS. It is in cbe, but an ancient non-IPS version of it. $ pfexec pkgrm SFpkgbuild $ ./configure --prefix=/opt/dtbld/ $ make $ pfexec make install b. make /usr/share/aclocal/dirlist contain: /usr/sfw/share/aclocal /opt/dtbld/share/aclocal c. svn co svn+ssh://anon@svn.opensolaris.org/svn/jds/spec-files/trunk jds-spec-files-trunk- spec files for $whatever include stuff inside this directory. A reasonable place to put a spec file for your own package is in jds-spec-files-trunk-/specs mixed right in with all the GNOME ones. this becomes your cwd when invoking pkgtool. d. cd jds-spec-files-trunk-/manpages make cd ../po-sun make -----8<----- PATH B, just pkgbuild: -----8<----- 1. wget http://prdownloads.sourceforge.net/pkgbuild/pkgbuild-1.3.101.tar.bz2?download no idea why this is not in IPS. here are instructions for installing it: http://virtguru.wordpress.com/2009/12/09/personal_sourcejuicer_in_opensolaris_jeos/ always invoke it as 'pkgbuild --ips'. simon-sez flags. 2. pkgbuild's eclass/ or mk/ directory is part of the JDS port-gnome-to-solaris project svn co svn+ssh://anon@svn.opensolaris.org/svn/jds/spec-files/trunk/include spec-files/include I believe these are older or less relevant ones: svn co https://pkgbuild.svn.sourceforge.net/svnroot/pkgbuild/spec-files-extra/trunk spec-files-extra/ this set of includes, plus some basic build tools like libtool, yacc, patch, is called 'Desktop CBE': The OSD Common Build Environment (CBE) is a set of build tools required to build GNOME, Mozilla and Evolution on Solaris. here are more: http://blogs.sun.com/migi/entry/create_your_own_opensolaris_ips2 <-- gay videos. http://blogs.sun.com/jucr/entry/setting_up_your_own_build http://hub.opensolaris.org/bin/view/Project+jds/building http://blogs.sun.com/mattman/entry/how_to_build_jds_on here is some more mentioning of package names of common build dependencies: http://wikis.sun.com/display/OpenSolarisInfo/OpenSolaris+2008.11+Development+Environment+Guide -----8<----- 3. http://wikis.sun.com/display/OpenSolarisInfo/Create+a+Local+IPS+Repository BUT!!! they added more hoops to jump through. to fix ``publisher.prefix is required'': http://opensolaris.org/jive/thread.jspa?threadID=117934 pfexec pkgsend -s file:///var/pkg/repo create-repository --set-property publisher.prefix=pkgbuild then pkg set-publisher -O http://localhost:XXX/ pkgbuild <-- i cannot remember if this needs to match publisher.prefix or not. 4. development cycle is something like XXX . /opt/dtbld/bin/env.sh 420 vi packages/SOURCES/freeradius-server-solarisldap.patch 422 cd jds-spec-files-trunk-/specs 423 pkgtool --ips build-only freeradius-server.spec 424 less /tmp/freeradius-server.log 425 pfexec pkg install freeradius-server 513 pfexec svcadm clear network/radius/server 517 less /var/svc/log/network-radius-server\:default.log -----8<----- how to fix /dev/dsk symlinks when they're stopping /usr from mounting -----8<----- from snv_44 or so probably. I have not done this in a long time, and realistically separate /usr is not even sanely supported any longer. ok boot cdrom -s # mount /dev/dsk/c1t0d0s0 /a # cd /a/dev/dsk # rm c* # cd /a/dev/rdsk # rm c* # cd / # drvconfig -r /a/devices -p /a/etc/path_to_inst # devlinks -r /a # disks -r /a # tapes -r /a # ports -r /a # audlinks -r /a # cd / # umount /a # halt ok boot -r -----8<-----