Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
OpenSolaris Study Group 2012.01                                           S                          IPS                  ...
www.opensolaris.org   2
IPS.  .  .  .  ..  .    .  .        Solaris.  .        www.opensolaris.org   3
.  .    sunsite  .      Solaris10.  .    Blastwave.  .    pkg.opensolaris.org/contrib.      sourcejuicer  .    Spec File E...
..    Solaris11    OpenIndiana.    Solaris11    OpenIndiana    .      OpenSolaris          www.opensolaris.org   5
..  . Solaris11 OpenIndiana..  .  ...      www.opensolaris.org   6
..    PRIMARY    .    release rc dev 3                    S11    OI   2      .       release    .      .       rc    .    ...
.    www.opensolaris.org   8
..    PRIMARY                        PRIMARY    /usr                       PRIMARY         www.opensolaris.org            ...
.  .  .        opensolaris.gr.jp          opensolaris.jp.  .         .         .                        sourceforge    .  ...
.....                          spec..    www.opensolaris.org          11
CBE:Common Build Environmentwww.opensolaris.org        12
CBE:Common Build Environment.                                 Common Build Environment  .    **.                          ...
.    .                                          1    .        CBE                         IPS.    .                  IPS  ...
OSD CBE                                       3                                                                      local...
CBE.CBE.  http://kohju.justplayer.com/Tips_OpenSolaris_IPS_Solaris11CBE.html  http://t.co/5T6GWBkN              Zone      ...
IPS                      # netstat -an | grep LISTEN | grep *.80                            *.80                *.*       ...
.                              HOME   3  . ~/spec-files-extra.   spec-file-extra SFE spec  . ~/spec-files-jucr.   sourceju...
jposug                          spec..    http://sourceforge.jp/projects/jposug/wiki/    http://bit.ly/ifICpV..       SFE*...
spec                      spec                        IPSwww.opensolaris.org           20
pkgbuild            spec                                      pkgbuild                 pkgtool            •            •  ...
spec                   pkgsend manifest.  .    spec            RedHat Linux  .                       perl                 ...
workjposug spec ~/work/jposug/contrib-spec-files |-- bin            ← 便利スクリプト群 |   |-- mk-Requires.pl |   |-- pkgsend_manif...
specspec 1. メタ情報セクション                メタ情報を記述する 2. %prep/%setupセクション        アーカイブを展開し、ディレクトリを作成する。 3. %buildセクション          ...
%include Solaris.incName:             nano                                          パッケージの名前Summary:          GNU nano tex...
%prep/%setup %prep rm -rf %name-%version %setup -q -n nano-%version                  tar ball%setup                       ...
%build %build export CFLAGS="%optflags" export LDFLAGS="%{_ldflags}" ./configure --prefix=%{_prefix}                           ...
%install%installrm -rf $RPM_BUILD_ROOTmake install DESTDIR=$RPM_BUILD_ROOTrm -f $RPM_BUILD_ROOT%{_infodir}/dir            ...
%files %files %defattr (-, root, bin) %dir %attr (0755, root, bin) %{_bindir} %{_bindir}/* %{_infodir}/* %dir %attr(0755, r...
%changelog%changelog* Thu Oct 23 2008 - andras _dot_ barna _at_ gmail _dot_ com- new version, add --enable-all, add SFEncu...
specspec wget http://jucr.opensolaris.org/help/nano.spec                                       <pre> </pre>  %filescopyrig...
% pkgtool build-only --sourcedirs=`pwd` --ips --download nano.specINFO:   IPS packages will be installed by default from h...
PASS               work-specwww.opensolaris.org               33
pkg               pkg        publisher % pkg publisher -a 発行元                                  タイプ 状態     URI opensolaris....
www.opensolaris.org   35
IPSwww.opensolaris.org         36
.Solaris  ..        Studio12 gcc  ..        SUN            GNU  .  .        PostgreSQL 8.1/8.2/8.3                        ...
.                      .                      .                          PATH                      .                      ...
spec                            #1 # # spec file for package eb # # This file and all modifications and additions to the pris...
spec                                #2 Summary:                     the library for accessing to the EPWING format Diction...
spec                       #3 BuildRequires: %{pnm_buildrequires_SUNWxcu4} BuildRequires: %{pnm_buildrequires_SUNWgmake}  ...
spec                            #4 # OpenSolaris IPS Package Manifest Fields Meta(info.maintainer):       pkglabo.justplay...
spec                          #5 %build CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d  ` if test "x$CPUS" = "x" -...
spec      #6  --includedir=%{_includedir}   --mandir=%{_mandir} gmake -j$CPUSconfigure                              enable...
spec           #7 %ifarch amd64 sparcv9 cd ../%{name}-%{tarball_version}-64 export CFLAGS="%optflags64" ./configure   --prefi...
spec                       #8 %install cd %{name}-%{tarball_version} gmake install DESTDIR=$RPM_BUILD_ROOT                ...
%{?pkgbuild_postprocess:    %pkgbuild_postprocess     -v    -c    "%{version}:%{jds_  version}:%{name}:$RPM_ARCH:%(date +%...
~/work/tmp/php-5.1.6                        パッチ当て済みのディレクトリ ~/work/tmp/php-5.1.6.orig                   パッチ当て前のディレクトリ gdiff...
gcc                gcc BuildRequires:    SUNWgnu-automake-19 BuildRequires:    SUNWlibtool BuildRequires:    SUNWgcc Build...
postinstall scriptIPS        Post Install Script.    ....               pkg             class                             ...
#1BuildRequired                                1 WARNING: skipping package eb: required package SUNWgnu-gettext not instal...
#2       CBE                     SourceJuicer                        Juicer pkgbuild: checking host system type... i386-pc...
#3Juicer              linker                 configure pkgbuild: checking for objdump... no pkgbuild: checking how to reco...
IPS                            IPSwww.opensolaris.org               54
IPS                                              #1             pkg/server                                        pkg inst...
IPS                              #2ReadOnly  pkgsend                                  pkg install.   Package Data         ...
IPSIPS                           svccfg                                           man pkg.depotd pkg/readonly      リードオンリー...
.   pkg.depotd python                                                                            Internet.                ...
zfs,pkg.depotd         Apache 1         pkg.depotd 1                                  ZFS zfs create rpool/export/pkglabo/...
Apache ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass /dev        http://inner-server/ Pro...
Internet                   .   pkg.depotd     pkgsend                                            .                        ...
OpenSolarisJapan OpenSolaris Users Group Leader        www.opensolaris.org            62
Upcoming SlideShare
Loading in …5
×

Solaris11/OpenIndiana パッケージ作成

4,169 views

Published on

Solaris11/OpenIndianaのパッケージ作成方法。

jposug有志主導のバイナリレポジトリを立てるに当たり、その方針などの草案をまとめてあります。

後半は技術的にSFEの環境を利用し、specファイルを作成、実際にレポジトリを作る話が書いてあります。

Published in: Technology
  • Be the first to comment

Solaris11/OpenIndiana パッケージ作成

  1. 1. OpenSolaris Study Group 2012.01 S IPS OpenSolaris Users Group Leader /TAKI, Yasushiwww.opensolaris.org 1
  2. 2. www.opensolaris.org 2
  3. 3. IPS. . . . .. . . . Solaris. . www.opensolaris.org 3
  4. 4. . . sunsite . Solaris10. . Blastwave. . pkg.opensolaris.org/contrib. sourcejuicer . Spec File Extra . spec . Source Juicer. . OpenIndiana contrib OI www.opensolaris.org 4
  5. 5. .. Solaris11 OpenIndiana. Solaris11 OpenIndiana . OpenSolaris www.opensolaris.org 5
  6. 6. .. . Solaris11 OpenIndiana.. . ... www.opensolaris.org 6
  7. 7. .. PRIMARY . release rc dev 3 S11 OI 2 . release . . rc . release . devhttp://*/release/ Internet http:// /OS /release/ www.opensolaris.org 7
  8. 8. . www.opensolaris.org 8
  9. 9. .. PRIMARY PRIMARY /usr PRIMARY www.opensolaris.org 9
  10. 10. . . . opensolaris.gr.jp opensolaris.jp. . . . sourceforge . http://sourceforge.jp/projects/jposug Solaris11/OpenIndiana. . . www.opensolaris.org 10
  11. 11. ..... spec.. www.opensolaris.org 11
  12. 12. CBE:Common Build Environmentwww.opensolaris.org 12
  13. 13. CBE:Common Build Environment. Common Build Environment . **. PATH 1 spec.. tar ball. . BUILD.sh . configure make www.opensolaris.org 13
  14. 14. . . 1 . CBE IPS. . IPS . spec .. spec www.opensolaris.org 14
  15. 15. OSD CBE 3 localIPS pkgsend pkg install pkg/server(IPS Build Server IPS Server Test Server www.opensolaris.org 15
  16. 16. CBE.CBE. http://kohju.justplayer.com/Tips_OpenSolaris_IPS_Solaris11CBE.html http://t.co/5T6GWBkN Zone CBE CBE IPSCBE OS Solaris11 OpenIndiana www.opensolaris.org 16
  17. 17. IPS # netstat -an | grep LISTEN | grep *.80 *.80 *.* 0 0 49152 0 LISTEN Listen PID pfiles VirtualBoxwww.opensolaris.org 17
  18. 18. . HOME 3 . ~/spec-files-extra. spec-file-extra SFE spec . ~/spec-files-jucr. sourcejuicer SFE ~/packages packages/ |-- BUILD ← tar ballから展開。ビルドディレクトリ |-- PKGMAPS | |-- copyright ← copyright宇が保存される | |-- depend ← SVr4用の依存関係ファイルの保存 | |-- manifest ← IPS、pkgsend用 manifest | |-- pkginfo ← SVr4用のpkginfo(メタ情報)ファイル | |-- proto ← SVr4用のproto(ファイル一覧)ファイル | `-- scripts ← SVr4 PKG用、IPS登録用のスクリプト |-- PKGS ← パッケージの仮想root |-- SOURCES ← tar ball、パッチ、追加ファイルなど |-- SPECS ← include用のspecファイル `-- SPKGS ← ソースパッケージ(rpmのsrpmに相当) www.opensolaris.org 18
  19. 19. jposug spec.. http://sourceforge.jp/projects/jposug/wiki/ http://bit.ly/ifICpV.. SFE*.spec.. www.opensolaris.org 19
  20. 20. spec spec IPSwww.opensolaris.org 20
  21. 21. pkgbuild spec pkgbuild pkgtool • • URL spec • .spec • .tar.gz • • • 1. URL URL 2. pkgbuild( 1. pkgtool 3.IPS SVr4 pkg pkgbuild 2. 3. 4. 5. • spec --svr4 • copyright --ips •1. IPS manifest 1. SVR4 proto/pkginfo/depend2. IPS 2. pkg www.opensolaris.org 21
  22. 22. spec pkgsend manifest. . spec RedHat Linux . perl experimental. rpm spec . Spec File Extra SFE SFE spec SVr4. . IPS pkgsend manifest . 1. .spec . 2. . 3. 4. pkgsend 5. manifest 6. 7. www.opensolaris.org 22
  23. 23. workjposug spec ~/work/jposug/contrib-spec-files |-- bin ← 便利スクリプト群 | |-- mk-Requires.pl | |-- pkgsend_manifest.sh | `-- specbuild.sh ← pkgbuildのオススメオプションが入ってるもの |-- manifests ← specファイルでは作れないmanifest群 | |-- GNUmakefile | |-- JPCenvcmds.lst | |-- JPCenvcmds.manifest | 割愛 `-- specs ← specファイル群 |-- SFE*.spec |-- ext-sources← その他のファイル群 | `-- SFE*-xxx.ini |-- copyright ← copyrightファイル群 | `-- SFE*.copyright |-- patches ← パッチファイル群 | `-- SFE*-01-kohju.diff |-- include ← 全体で使うファイル www.opensolaris.org 23
  24. 24. specspec 1. メタ情報セクション メタ情報を記述する 2. %prep/%setupセクション アーカイブを展開し、ディレクトリを作成する。 3. %buildセクション パッチや、ビルドのためのスクリプトを書きます。 4. %installセクション 仮のroot/にインストールします。 5. %files セクション インストール構造を示します。 6. %changelogセクション 更新履歴を記載する www.opensolaris.org 24
  25. 25. %include Solaris.incName: nano パッケージの名前Summary: GNU nano text editor サマリーVersion: 2.0.9 バージョン名License: GPLv2 ライセンス名(意味コードではない)Url: http://www.nano-editor.org WEBサイトSource: http://www.nano-editor.org/dist/v2.0/%{name}-%{version}.tar.gz ファイル配布URLGroup: Editor グループDistribution: OpenSolaris 参照)Vendor: OpenSolaris Community http://opensolaris.org/os/community/ sw-porters/contributing/ipsclass/BuildRoot: %{_tmppath}/%{name}-%{version}-buildSUNW_Basedir: %{_basedir}SUNW_Copyright: %{name}.copyright# OpenSolaris IPS Manifest FieldsMeta(info.upstream): Chris Allegretta ソースコード・メンテナーMeta(info.maintainer): Peter Jones パッケージ・メンテナーMeta(info.repository_url): svn://svn.sv.gnu.org/nano/trunk/nano/ レポジトリのURLMeta(info.classification): Editor IPS Class(Groupと一緒)%description 説明文GNU nano is an effort to provide a Pico-like editor, but also includes some features thatwere missing in the original, such as search and replace, goto line or internationalizationsupport. www.opensolaris.org 25
  26. 26. %prep/%setup %prep rm -rf %name-%version %setup -q -n nano-%version tar ball%setup tar cd www.opensolaris.org 26
  27. 27. %build %build export CFLAGS="%optflags" export LDFLAGS="%{_ldflags}" ./configure --prefix=%{_prefix} --bindir=%{_bindir} --mandir=%{_mandir} --infodir=%{_infodir} --sysconfdir=%{_sysconfdir} --enable-all makeconfigure && make configure make patch www.opensolaris.org 27
  28. 28. %install%installrm -rf $RPM_BUILD_ROOTmake install DESTDIR=$RPM_BUILD_ROOTrm -f $RPM_BUILD_ROOT%{_infodir}/dir make install configure && make DESTDIR=$RPM_BUILD_ROOT ROOT www.opensolaris.org 28
  29. 29. %files %files %defattr (-, root, bin) %dir %attr (0755, root, bin) %{_bindir} %{_bindir}/* %{_infodir}/* %dir %attr(0755, root, sys) %{_datadir} %dir %attr(0755, root, bin) %{_mandir} %dir %attr(0755, root, bin) %{_mandir}/* %{_mandir}/*/* %dir %attr(0755, root, bin) %{_basedir}/share/nano %{_basedir}/share/nano/* %dir %attr(0755, root, bin) %{_basedir}/share/locale %{_basedir}/share/locale/*meta basedir www.opensolaris.org 29
  30. 30. %changelog%changelog* Thu Oct 23 2008 - andras _dot_ barna _at_ gmail _dot_ com- new version, add --enable-all, add SFEncursesw for utf-8* Wed Jul 5 2006 - laca _at_ sun _dot_ com- delete -share subpkg- update file attributes* Fri Feb 3 2006 - mike kiedrowski (lakeside-AT-cybrzn-DOT-com)- Initial version www.opensolaris.org 30
  31. 31. specspec wget http://jucr.opensolaris.org/help/nano.spec <pre> </pre> %filescopyrightspec tar.gz tar.gz copyright http://www.nano-editor.org/dist/v2.0/nano-2.0.9.tar.gz gtar zxf nano-2.0.9.tar.gz cp nano-2.0.9/COPYING nano.copyrightpatch www.opensolaris.org 31
  32. 32. % pkgtool build-only --sourcedirs=`pwd` --ips --download nano.specINFO: IPS packages will be installed by default from http://localhost:80/INFO: Copying %used or %included spec files to SPECS directoryINFO: Processing spec filesINFO: Finding sourcesINFO: Running pkgbuild -ba [...] nano.spec (nano)INFO: nano PASSEDSummary: package | status | details---------------------------------+-------------+------------------------------- nano | PASSED | /tmp/nano.log IPS www.opensolaris.org 32
  33. 33. PASS work-specwww.opensolaris.org 33
  34. 34. pkg pkg publisher % pkg publisher -a 発行元 タイプ 状態 URI opensolaris.org (優先) 起点 online http://pkg.opensolaris.org/dev/ contrib 起点 online http://pkg.opensolaris.org/contrib/ mypkgs (無効) 起点 online http://192.168.199.61/ enable % pkg set-publisher --enable mypkgspkg % pkg refresh --full mypkgs % pkg list -a pkg://mypkgs/* NAME (PUBLISHER) VERSION STATE UFIX nano (mypkgs) 2.0.9-0.111 known ---- contents www.opensolaris.org 34
  35. 35. www.opensolaris.org 35
  36. 36. IPSwww.opensolaris.org 36
  37. 37. .Solaris .. Studio12 gcc .. SUN GNU . . PostgreSQL 8.1/8.2/8.3 so. . . PATH www.opensolaris.org 37
  38. 38. . . . PATH . configure MAKE . . gcc . . . pending contrib . CPUwww.opensolaris.org 38
  39. 39. spec #1 # # spec file for package eb # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # %include Solaris.inc~/package/SPECS/Solaris.inc %{_basedir} Solaris.inc prod.inc options.inc %define _prefix /usr %define tarball_version 4.4.1 Name: eb IPS_package_name: library/text/ebIPS_package_name IPS %package www.opensolaris.org 39
  40. 40. spec #2 Summary: the library for accessing to the EPWING format Dictionaries Version: 4.4.1 License: Modified BSDL Url: http://www.sra.co.jp/people/m-kasahr/eb/ Source: ftp://ftp.sra.co.jp/pub/misc/%{name}/%{name}-%{tarball_ version}.tar.bz2 Distribution: OpenSolaris Vendor: OpenSolaris Community #SUNW_Basedir: %{_basedir} SUNW_Basedir: /Solaris10 /usr SUNWapch22u /SUNWapch22r /usr SPARSE ZONE /usr global zone inheritancespec SVr4 OpenSolaris SUNW_Copyright: %{name}.copyright BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %{pnm_buildrequires_SUNWbtool} BuildRequires: %{pnm_buildrequires_SUNWbinutils} www.opensolaris.org 40
  41. 41. spec #3 BuildRequires: %{pnm_buildrequires_SUNWxcu4} BuildRequires: %{pnm_buildrequires_SUNWgmake} configure GNU Solaris Requires: %{pnm_requires_SUNWzlib} Requires: %{pnm_requires_SUNWgnu-gettext} Requires: CBE CBESFE IPS Solaris10 PKG BuildRequires: Requires: %{pnm } spec include/packagenames*.incSVR4 root user IPSIPS www.opensolaris.org 41
  42. 42. spec #4 # OpenSolaris IPS Package Manifest Fields Meta(info.maintainer): pkglabo.justplayer.com <pkgadmin@justplayer.com> Meta(info.upstream): Motoyuki Kasahara <m-kasahr@sra.co.jp> # Meta(info.repository_url): [open source code repository] Meta(info.classification): System Libraries %description EB library is for accessing to the EPWING format Dictionaries %prep %setup -c -n %name-%version %ifarch amd64 sparcv9 rm -rf %{name}-%{tarball_version}-64 cp -rp %{name}-%{tarball_version} %{name}-%{tarball_version}-64 %endif 64bit1. %setup eb-4.4.12. eb-4.4.1 eb-4.4.1-64 32bit eb-4.4.1 64bit eb-4.4.1-64 pwd www.opensolaris.org 42
  43. 43. spec #5 %build CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ` if test "x$CPUS" = "x" -o $CPUS = 0; then CPUS=1 fiCPU gmake -j cd %{name}-%{tarball_version} %ifarch sparc %define target sparc-sun-solaris %else %define target i386-sun-solaris %endif ./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} --libdir=%{_libdir} --bindir=%{_bindir} www.opensolaris.org 43
  44. 44. spec #6 --includedir=%{_includedir} --mandir=%{_mandir} gmake -j$CPUSconfigure enable disablewith without CBE CPU www.opensolaris.org 44
  45. 45. spec #7 %ifarch amd64 sparcv9 cd ../%{name}-%{tarball_version}-64 export CFLAGS="%optflags64" ./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} --libdir=%{_libdir}/%{_arch64} --bindir=%{_bindir}/%{_arch64} --includedir=%{_includedir} --mandir=%{_mandir} gmake -j$CPUS %endif64 64 2 www.opensolaris.org 45
  46. 46. spec #8 %install cd %{name}-%{tarball_version} gmake install DESTDIR=$RPM_BUILD_ROOT root DESTDIR= ROOT INSTALL_DIR Makefile.in aclocal %ifarch amd64 sparcv9 cd ../%{name}-%{tarball_version}-64 gmake install DESTDIR=$RPM_BUILD_ROOT cd .. %endif64 SMF MANIFESTconfig ROOT www.opensolaris.org 46
  47. 47. %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_ version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}%cleanrm -rf $RPM_BUILD_ROOT%files%defattr (-, root, bin)%dir %attr (0755, root, bin) %{_bindir}%{_bindir}/*%dir %attr(0755, root, bin) %{_libdir}%{_libdir}/*%dir %attr(0755, root, bin) %{_prefix}/include/eb%{_prefix}/include/eb/*%dir %attr(0755, root, bin) %{_prefix}/share%{_prefix}/share/*%{_sysconfdir}/eb.conf%changelog* Wed May 6 2009 TAKI, Yasushi <taki@justplayer.com>- Initial Revision* Mon Mar 8 2010 TAKI, Yasushi <taki@justplayer.com>- delete sub packages www.opensolaris.org 47
  48. 48. ~/work/tmp/php-5.1.6 パッチ当て済みのディレクトリ ~/work/tmp/php-5.1.6.orig パッチ当て前のディレクトリ gdiff -urN php-5.1.6.orig php-5.1.6 > patches/php51-01-kohju.diff 1spec Source: http://museum.php.net/%{tarball_name}5/%{tarball_name}- %{tarball_version}.tar.bz2 Source1: php51-php5.1.conf Patch1: %{name}-01-kohju.diff %setup -c -n %name-%version %patch1 -p0 %build www.opensolaris.org 48
  49. 49. gcc gcc BuildRequires: SUNWgnu-automake-19 BuildRequires: SUNWlibtool BuildRequires: SUNWgcc BuildRequires: SUNWgnu-automake-110 BuildRequires: SUNWgmake BuildRequires: SUNWbison BuildRequires: SUNWflexlex BuildRequires: SUNWaconf%build export CC=gcc export CFLAGS="%gcc_optflags" export CXX=g++ export CXXFLAGS="%gcc_cxx_optflags" export LDFLAGS="%_ldflags"Python export PYCC_CC=gcc export PYCC_CXX=g++configure --with-gcc www.opensolaris.org 49
  50. 50. postinstall scriptIPS Post Install Script. .... pkg class SMF manifest.. zfs autosnap SMF roleadd enable/disable www.opensolaris.org 50
  51. 51. #1BuildRequired 1 WARNING: skipping package eb: required package SUNWgnu-gettext not installed WARNING: and no spec file specified on the command line provides it INFO: Hint: use the --autodeps to locate spec files for dependencies automatically Summary: package | status | details ---------------------------------+-------------+------------------------------- eb | DEP_FAILED | Dependency check failed/tmp/eb.log INFO: Checking dependencies of eb WARNING: skipping package eb: required package SUNWgnu-gettext not installed WARNING: and no spec file specified on the command line provides it INFO: Hint: use the --autodeps to locate spec files for dependencies automatically WARNING: eb wont be built as it requires SUNWgnu-gettext BuildRequires juicer SUNWgnu-gettext SUNWgnu-gettext SVr4 www.opensolaris.org 51
  52. 52. #2 CBE SourceJuicer Juicer pkgbuild: checking host system type... i386-pc-solaris2.11 pkgbuild: checking for a sed that does not truncate output... /usr/bin/sed pkgbuild: checking for grep that handles long lines and -e... configure: error: no acceptable grep could be found in /opt/jdsbld/bin:/usr/ccs/bin:/usr/gnu/bin:/usr/ bin:/usr/sbin:/bin:/usr/sfw/bin:/opt/SunStudioExpress/bin:/usr/xpg4/bin pkgbuild: Bad exit status from /var/tmp/pkgbuild-bld/pkgbuild-tmp-2.9172 (%build)configure grep CBE pkgbuild: checking for a sed that does not truncate output... /opt/dtbld/bin/sed pkgbuild: checking for grep that handles long lines and -e... /usr/xpg4/bin/grep pkgbuild: checking for egrep... /usr/xpg4/bin/grep -E pkgbuild: checking for fgrep... /usr/xpg4/bin/grep -F pkgbuild: checking for non-GNU ld... /usr/ccs/bin/ldgrep /usr/xpg4/bin/grep pkg search /usr/xpg4/bin/grep SUNWxcu4 IPS pkg contents -m SUNWxcu4 | grep legacy legacy BuildRequire www.opensolaris.org 52
  53. 53. #3Juicer linker configure pkgbuild: checking for objdump... no pkgbuild: checking how to recognize dependent libraries... pass_all pkgbuild: checking for ar... no pkgbuild: checking for strip... no pkgbuild: checking for ranlib... no pkgbuild: checking command to parse link -dump -symbols output from /opt/SunStudioExpress/bin/cc object... failed BuildRequires www.opensolaris.org 53
  54. 54. IPS IPSwww.opensolaris.org 54
  55. 55. IPS #1 pkg/server pkg install pkgsend http or https http or https Client pkg install Build Machine Clientpkgsend www.opensolaris.org 55
  56. 56. IPS #2ReadOnly pkgsend pkg install. Package Data http or https Client pkg install pkg/inst_. root Client Rewritable Data pkg/writable_root www.opensolaris.org 56
  57. 57. IPSIPS svccfg man pkg.depotd pkg/readonly リードオンリー。trueにすると、pkgsendできなくなります。 pkg/content_root ドキュメントルート。デザインを変更するときのコンポーネントはここに 保存(IPSは、httpdとして起動している)。デフォルトは、/usr/share/lib/pkg pkg/inst_root レポジトリの実体が入ります。レポジトリデータはこの場所にあるので、 ここをコピーすることにより、レポジトリの複製が可能です。デフォルトは/var/pkg/repo。 pkg/writable_root リライタブルな一次データが入ります。デフォルトは inst_root と同じ 場所を利用します。カラのディレクトリを指定すると勝手に作り、inst_rootをread only filesystemに設置することが可能になります。 pkg/log_access アクセスログ。 pkg/log_errors エラーログ。 pkg/port LISTENポート番号。 pkg/proxy_base Proxyサーバを経由したとき、実際に参照されるURL。 pkg/threads 受付スレッドの本数。デフォルトは10なので最大同時10人しかアクセスで きません。 pfexec svccfg -s pkg/server "setprop pkg/port=10000" pfexec svcadm refresh pkg/server pfexec svcadm restart pkg/server www.opensolaris.org 57
  58. 58. . pkg.depotd python Internet. Apache Apache worker prefork.. Apache (/dev /release . mod_proxy pkg.depotd pkg.depotd 1 Internet mod_proxy_balancer . apache pkg.depotd . Reverse Proxy DMZ mod_mem_cache/ . mod_disk_cachepkg.depotd pkg.depotd pkg.depotd pkg/writable_root ramdisk www.opensolaris.org 58
  59. 59. zfs,pkg.depotd Apache 1 pkg.depotd 1 ZFS zfs create rpool/export/pkglabo/dev zfs set mountpoint=/var/pkg/repo rpool/export/pkglabo/dev zfs set readonly=on rpool/export/pkglabo/devreadonly writable touch /var/pkg/repo.cfg svccfg -s application/pkg/server setprop pkg/proxy_base = “http://pkglabo.justplayer. com/dev” svccfg -s application/pkg/server setprop pkg/readonly = true svccfg -s application/pkg/server setprop pkg/cfg_file = “/var/pkg/repo.cfg” svccfg -s application/pkg/server setprop pkg/writable_root = “/var/pkg/wrepo” svcadm refresh application/pkg/server svcadm enable application/pkg/server www.opensolaris.org 59
  60. 60. Apache ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass /dev http://inner-server/ ProxyPassReverse /dev http://inner-server/Apache mod_rewrite RewriteCond %{REQUEST_URI} ^/dev$ [NC] RewriteRule ^/dev /dev/ [R=301] RewriteCond %{REQUEST_URI} ^/dev/ [NC] RewriteRule ^/dev/(.*) http://inner-server/$1 [P] www.opensolaris.org 60
  61. 61. Internet . pkg.depotd pkgsend . Apache . . Reverse Proxy pkgsend IPS /dev/ . IPSBacknet IPS pkgsend . /release/ IPS Server zfs send IPS Server IPS Server /release/ /dev/ zfs send IPS Server www.opensolaris.org 61
  62. 62. OpenSolarisJapan OpenSolaris Users Group Leader www.opensolaris.org 62

×