Skip to content

Commit

Permalink
Use full URLs for better RSS compatability.
Browse files Browse the repository at this point in the history
  • Loading branch information
jperkin committed Apr 11, 2012
1 parent 922d908 commit 4a440e8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 26 deletions.
59 changes: 35 additions & 24 deletions _posts/2009-09-12-pkgsrc-on-solaris.markdown
Expand Up @@ -48,35 +48,40 @@ a sandbox. This has a number of benefits:
* It's easier to catch package mistakes, e.g. unpackaged files. * It's easier to catch package mistakes, e.g. unpackaged files.
* It avoids pollution from the host environment which may produce bad packages * It avoids pollution from the host environment which may produce bad packages


For creating a zone, I wrote the following [`create-zone`](/files/solaris-pkgsrc/create-zone) script: For creating a zone, I wrote the following
[`create-zone`](http://www.perkin.org.uk/files/solaris-pkgsrc/create-zone)
script:


{% highlight bash %} {% highlight bash %}
{% include solaris-pkgsrc/create-zone %} {% include solaris-pkgsrc/create-zone %}
{% endhighlight %} {% endhighlight %}


And the corresponding [`delete-zone`](/files/solaris-pkgsrc/delete-zone) script is: And the corresponding
[`delete-zone`](http://www.perkin.org.uk/files/solaris-pkgsrc/delete-zone)
script is:


{% highlight bash %} {% highlight bash %}
{% include solaris-pkgsrc/delete-zone %} {% include solaris-pkgsrc/delete-zone %}
{% endhighlight %} {% endhighlight %}


If you want to use them then there are some variables to set at the top, and If you want to use them then there are some variables to set at the top, and
you may want to scan through them for additional bits to change, for example you may want to scan through them for additional bits to change, for example
[`create-zone`](/files/solaris-pkgsrc/create-zone) copies my ssh public key [`create-zone`](http://www.perkin.org.uk/files/solaris-pkgsrc/create-zone)
which will most likely be wrong for your setup :-) copies my ssh public key which will most likely be wrong for your setup :-)


One additional piece of configuration for One additional piece of configuration for
[`create-zone`](/files/solaris-pkgsrc/create-zone) is an optional SMF xml file. [`create-zone`](http://www.perkin.org.uk/files/solaris-pkgsrc/create-zone) is
I use this file to disable inetd inside the zone for additional security, like an optional SMF xml file. I use this file to disable inetd inside the zone for
so: additional security, like so:


{% highlight xml %} {% highlight xml %}
{% include solaris-pkgsrc/vm-generic.xml %} {% include solaris-pkgsrc/vm-generic.xml %}
{% endhighlight %} {% endhighlight %}


The file should be named <yourzonename>.xml. Mine is named The file should be named <yourzonename>.xml. Mine is named
[`vm-generic.xml`](/files/solaris-pkgsrc/vm-generic.xml) and I then create [`vm-generic.xml`](http://www.perkin.org.uk/files/solaris-pkgsrc/vm-generic.xml)
symlinks to it for each VM I want with that default configuration. and I then create symlinks to it for each VM I want with that default
configuration.


## Fetch pkgsrc ## Fetch pkgsrc


Expand Down Expand Up @@ -109,7 +114,7 @@ $ cvs update
## pkgsrc configuration ## pkgsrc configuration


pkgsrc is configured using a `mk.conf` file, pkgsrc is configured using a `mk.conf` file,
[this](/files/solaris-pkgsrc/mk.conf) is mine: [this](http://www.perkin.org.uk/files/solaris-pkgsrc/mk.conf) is mine:


{% highlight text %} {% highlight text %}
{% include solaris-pkgsrc/mk.conf %} {% include solaris-pkgsrc/mk.conf %}
Expand All @@ -121,10 +126,11 @@ guide to understand what it all means.


As I do a lot of pkgsrc development I have a number of virtual machines up and As I do a lot of pkgsrc development I have a number of virtual machines up and
running doing various bits and pieces. Obviously I don't want to copy that running doing various bits and pieces. Obviously I don't want to copy that
[mk.conf](/files/solaris-pkgsrc/mk.conf) around, so I also have a small [mk.conf](http://www.perkin.org.uk/files/solaris-pkgsrc/mk.conf) around, so I
[fragment](/files/solaris-pkgsrc/mk-include.conf) file which is appended to also have a small
each virtual machine's `mk.conf` (using the `--mk-fragment` argument to [fragment](http://www.perkin.org.uk/files/solaris-pkgsrc/mk-include.conf) file
`bootstrap`) and includes the global copy: which is appended to each virtual machine's `mk.conf` (using the
`--mk-fragment` argument to `bootstrap`) and includes the global copy:


{% highlight text %} {% highlight text %}
{% include solaris-pkgsrc/mk-include.conf %} {% include solaris-pkgsrc/mk-include.conf %}
Expand All @@ -151,7 +157,8 @@ and installed for this setup. If you have a large installation then `pkg_chk`
has extra features to make it possible to share `pkgchk.conf` across a number of has extra features to make it possible to share `pkgchk.conf` across a number of
machines and configure packages on a per-host, per-OS etc basis. machines and configure packages on a per-host, per-OS etc basis.


Thus, a sample [`pkgchk.conf`](/files/solaris-pkgsrc/pkgchk.conf): Thus, a sample
[`pkgchk.conf`](http://www.perkin.org.uk/files/solaris-pkgsrc/pkgchk.conf):
{% highlight bash %} {% highlight bash %}
{% include solaris-pkgsrc/pkgchk.conf %} {% include solaris-pkgsrc/pkgchk.conf %}
{% endhighlight %} {% endhighlight %}
Expand All @@ -163,23 +170,26 @@ use :-)
## Build scripts ## Build scripts


Once everything is set up, I have two scripts to build then update my packages, Once everything is set up, I have two scripts to build then update my packages,
intuitively called [`build-packages`](/files/solaris-pkgsrc/build-packages): intuitively called
[`build-packages`](http://www.perkin.org.uk/files/solaris-pkgsrc/build-packages):


{% highlight bash %} {% highlight bash %}
{% include solaris-pkgsrc/build-packages %} {% include solaris-pkgsrc/build-packages %}
{% endhighlight %} {% endhighlight %}


and [`update-packages`](/files/solaris-pkgsrc/update-packages): and
[`update-packages`](http://www.perkin.org.uk/files/solaris-pkgsrc/update-packages):


{% highlight bash %} {% highlight bash %}
{% include solaris-pkgsrc/update-packages %} {% include solaris-pkgsrc/update-packages %}
{% endhighlight %} {% endhighlight %}


These are pretty simple as all the hard work has all been done. These are pretty simple as all the hard work has all been done.
[`build-packages`](/files/solaris-pkgsrc/build-packages) is ran inside the [`build-packages`](http://www.perkin.org.uk/files/solaris-pkgsrc/build-packages)
zone, then [`update-packages`](/files/solaris-pkgsrc/update-packages) on the is ran inside the zone, then
main host. These scripts hardcode the name of the branch currently used, so [`update-packages`](http://www.perkin.org.uk/files/solaris-pkgsrc/update-packages)
you will need to update this when moving to newer releases. on the main host. These scripts hardcode the name of the branch currently
used, so you will need to update this when moving to newer releases.


## Quick recap ## Quick recap


Expand Down Expand Up @@ -234,9 +244,10 @@ $ /content/scripts/update-packages
$ /content/scripts/delete-zone vm0 $ /content/scripts/delete-zone vm0
{% endhighlight %} {% endhighlight %}


This should do the lot. Once [`build-packages`](/files/solaris-pkgsrc/build-packages) has finished you should, if you This should do the lot. Once
configured your email address in build.conf, get an email with the bulk build [`build-packages`](http://www.perkin.org.uk/files/solaris-pkgsrc/build-packages)
results which looks similar to this: has finished you should, if you configured your email address in build.conf,
get an email with the bulk build results which looks similar to this:


<http://mail-index.netbsd.org/pkgsrc-bulk/2009/08/23/msg006883.html> <http://mail-index.netbsd.org/pkgsrc-bulk/2009/08/23/msg006883.html>


Expand Down
Expand Up @@ -32,8 +32,8 @@ $ pkgin avail | wc -l


Ok, so the headline might be slightly mis-leading, this isn't really apt-get Ok, so the headline might be slightly mis-leading, this isn't really apt-get
but a tool which is very similar. This is work which builds upon my [previous but a tool which is very similar. This is work which builds upon my [previous
post](/blog/2009/09/pkgsrc-on-solaris/) using pkgsrc to build binary packages post](http://www.perkin.org.uk/posts/pkgsrc-on-solaris.html) using pkgsrc to
on Solaris. build binary packages on Solaris.


See [http://imil.net/pkgin/](http://imil.net/pkgin/) for more information on See [http://imil.net/pkgin/](http://imil.net/pkgin/) for more information on
pkgin. pkgin.
Expand Down

0 comments on commit 4a440e8

Please sign in to comment.