https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&user=Fabled&feedformat=atomAlpine Linux - User contributions [en]2024-03-28T13:41:28ZUser contributionsMediaWiki 1.40.0https://wiki.alpinelinux.org/w/index.php?title=TODO:py3_packages&diff=13956TODO:py3 packages2017-09-27T07:32:17Z<p>Fabled: /* APKBUILD */</p>
<hr />
<div>Most of the Python packages in Alpine don’t support Python 3, although the packaged module supports it.<br />
We would like to support Python 3 wherever it’s possible and would be happy if you can help us with it!<br />
<br />
== Explanation ==<br />
<br />
Python 2 and 3 installs modules into different directories, the compiled bytecode (<tt>*.pyc</tt> files) is different and native extensions are linked against different Python shared library.<br />
Therefore to support both versions, we need to build two packages.<br />
Since the source is the same, we do it as one APKBUILD that provides two subpackages: <tt>py2-</tt> and <tt>py3-</tt>.<br />
Base package <tt>py-</tt> is then a metapackage that pulls <tt>py2-</tt> subpackage if <tt>python2</tt> is installed or <tt>py3-</tt> subpackage if <tt>python3</tt> is installed.<br />
<br />
== How to do it ==<br />
<br />
Before you start, prepare your environment for building packages ([[Creating_an_Alpine_package#Setup_your_system_and_account|Creating an Alpine package]]).<br />
<br />
# Take some package from the list below. Higher priority have packages with some compiled code (those have <tt>arch="all"</tt>).<br />
# Check if the Python package is compatible with Python 3. Tip: When you look into the package’s <tt>setup.py</tt> file, there are usually declared some classifiers like <tt>Programming Language :: Python :: 2</tt> and <tt>Programming Language :: Python :: 3</tt>.<br />
## If it’s '''not''' compatible with Python 3, then write it into the table below as a note.<br />
## If it’s compatible with Python 3, then continue with next steps.<br />
# Check if requirements in the package’s <tt>setup.py</tt> corresponds with the abuild’s <tt>depends</tt>. Some Python packages have additional dependencies depending on the Python version (for Alpine is relevant just 2.7 and 3.5).<br />
# Adjust the APKBUILD (see below).<br />
# Try to build it.<br />
# If everything is okay, commit the change (use commit message like ''<repo>/<pkgname>: add py2/py3 subpackages'').<br />
# Send pull request to https://github.com/alpinelinux/aports.<br />
<br />
If you have any questions, then don’t hesitate to ask on IRC [irc://irc.freenode.net/alpine-devel #alpine-devel]!<br />
<br />
=== APKBUILD ===<br />
<br />
APKBUILD for a package supporting both Python 2 and Python 3 should look like this:<br />
<br />
<pre><br />
pkgname=py-foo<br />
_pkgname=PyFoo<br />
pkgver=1.0.0<br />
pkgrel=1<br />
pkgdesc="A package description"<br />
url="https://github.com/example/foo"<br />
arch="noarch"<br />
license="MIT"<br />
depends="py-bar"<br />
makedepends="python2-dev python3-dev py-setuptools"<br />
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"<br />
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"<br />
builddir="$srcdir/$_pkgname-$pkgver"<br />
<br />
build() {<br />
cd "$builddir"<br />
python2 setup.py build<br />
python3 setup.py build<br />
}<br />
<br />
package() {<br />
mkdir -p "$pkgdir"<br />
}<br />
<br />
_py2() {<br />
replaces="$pkgname"<br />
depends="${depends//py-/py2-}"<br />
_py python2<br />
}<br />
<br />
_py3() {<br />
depends="${depends//py-/py3-}"<br />
_py python3<br />
}<br />
<br />
_py() {<br />
local python="$1"<br />
pkgdesc="$pkgdesc (for $python)"<br />
depends="$depends $python"<br />
install_if="$pkgname=$pkgver-r$pkgrel $python"<br />
<br />
cd "$builddir"<br />
$python setup.py install --prefix=/usr --root="$subpkgdir"<br />
}<br />
</pre><br />
<br />
* If the package contains some compiled code (native extensions), then add <tt>arch="all"</tt> into the <tt>_py()</tt> function (between pkgdesc and depends).<br />
* If the package doesn’t have any dependencies, then omit <tt>depends=""</tt> in the <tt>_py2()</tt> and <tt>_py3()</tt> functions.<br />
* If the package uses variable <tt>_builddir</tt>, then replace it with <tt>builddir</tt> (the former is older format).<br />
<br />
Notes:<br />
* _pkgname is the package’s real name on PyPI.<br />
<br />
== List of abuilds without Python 3 support ==<br />
<br />
=== main ===<br />
<br />
{|class="wikitable"<br />
! Pkgname<br />
! Notes<br />
|-<br />
| py-alabaster<br />
|<br />
|-<br />
| py-avahi<br />
|<br />
|-<br />
| py-babel<br />
|<br />
|-<br />
| py-backports.ssl_match_hostname<br />
| Not needed for >=py3.4<br />
|-<br />
| py-bluez<br />
|<br />
|-<br />
| py-boto<br />
|<br />
|-<br />
| py-cairo<br />
|<br />
|-<br />
| py-cliapp<br />
|<br />
|-<br />
| py-configshell<br />
|<br />
|-<br />
| py-country<br />
|<br />
|-<br />
| py-dbus<br />
|<br />
|-<br />
| py-django<br />
|<br />
|-<br />
| py-django-contact-form<br />
|<br />
|-<br />
| py-django-djblets<br />
|<br />
|-<br />
| py-django-extra-views<br />
|<br />
|-<br />
| py-django-haystack<br />
|<br />
|-<br />
| py-django-oscar<br />
|<br />
|-<br />
| py-django-pipeline<br />
|<br />
|-<br />
| py-django-registation<br />
|<br />
|-<br />
| py-django-simple-captcha<br />
|<br />
|-<br />
| py-django-sorl-thumbnail<br />
|<br />
|-<br />
| py-django-tables2<br />
|<br />
|-<br />
| py-django-treebeard<br />
|<br />
|-<br />
| py-django-widget-tweaks<br />
|<br />
|-<br />
| py-ediarpc<br />
|<br />
|-<br />
| py-egenix-mx-base<br />
| doesn’t support py3<br />
|-<br />
| py-exifread<br />
|<br />
|-<br />
| py-eyed3<br />
|<br />
|-<br />
| py-factory-boy<br />
|<br />
|-<br />
| py-farstream0.1<br />
|<br />
|-<br />
| py-feedparser<br />
|<br />
|-<br />
| py-flask-assets<br />
|<br />
|-<br />
| py-flask-script<br />
|<br />
|-<br />
| py-flask-wtf<br />
|<br />
|-<br />
| py-flup<br />
|<br />
|-<br />
| py-funcsigs<br />
|<br />
|-<br />
| py-fuse<br />
|<br />
|-<br />
| py-gamin<br />
|<br />
|-<br />
| py-gdbm<br />
|<br />
|-<br />
| py-genshi<br />
|<br />
|-<br />
| py-gflags<br />
|<br />
|-<br />
| py-gnome<br />
|<br />
|-<br />
| py-gnome-bonobo<br />
|<br />
|-<br />
| py-gnome-gconf<br />
|<br />
|-<br />
| py-gnome-gnomevfs<br />
|<br />
|-<br />
| py-gnome-libgnome<br />
|<br />
|-<br />
| py-gnutls<br />
|<br />
|-<br />
| py-gobject<br />
|<br />
|-<br />
| py-gobject3<br />
|<br />
|-<br />
| py-google-api-python-client<br />
|<br />
|-<br />
| py-gst0.10<br />
|<br />
|-<br />
| py-gtk<br />
|<br />
|-<br />
| py-gtk-demo<br />
|<br />
|-<br />
| py-gunicorn<br />
|<br />
|-<br />
| py-gv<br />
|<br />
|-<br />
| py-hgtools<br />
|<br />
|-<br />
| py-hiredis<br />
|<br />
|-<br />
| py-hoedown<br />
|<br />
|-<br />
| py-httplib2<br />
|<br />
|-<br />
| py-icu<br />
|<br />
|-<br />
| py-imagesize<br />
|<br />
|-<br />
| py-imaging<br />
|<br />
|-<br />
| py-irc<br />
|<br />
|-<br />
| py-irc-scripts<br />
|<br />
|-<br />
| py-jwt<br />
|<br />
|-<br />
| py-larch<br />
|<br />
|-<br />
| py-ldb<br />
|<br />
|-<br />
| py-libmount<br />
|<br />
|-<br />
| py-libproxy<br />
|<br />
|-<br />
| py-libxml2<br />
|<br />
|-<br />
| py-libxslt<br />
|<br />
|-<br />
| py-lockfile<br />
|<br />
|-<br />
| py-mako<br />
|<br />
|-<br />
| py-mccabe<br />
|<br />
|-<br />
| py-meld3<br />
|<br />
|-<br />
| py-mock<br />
|<br />
|-<br />
| py-munkres<br />
|<br />
|-<br />
| py-musicbrainzngs<br />
|<br />
|-<br />
| py-mutagen<br />
|<br />
|-<br />
| py-mysqldb<br />
|<br />
|-<br />
| py-newt<br />
|<br />
|-<br />
| py-nose<br />
|<br />
|-<br />
| py-oauth2<br />
|<br />
|-<br />
| py-oauth2client<br />
|<br />
|-<br />
| py-parsing<br />
|<br />
|-<br />
| py-pbr<br />
|<br />
|-<br />
| py-pep8<br />
|<br />
|-<br />
| py-pgen<br />
|<br />
|-<br />
| py-phonenumbers<br />
|<br />
|-<br />
| py-pillow<br />
|<br />
|-<br />
| py-purl<br />
|<br />
|-<br />
| py-pygments<br />
|<br />
|-<br />
| py-pylast<br />
|<br />
|-<br />
| py-redis<br />
|<br />
|-<br />
| py-roman<br />
|<br />
|-<br />
| py-rrd<br />
|<br />
|-<br />
| py-rsa<br />
|<br />
|-<br />
| py-samba<br />
|<br />
|-<br />
| py-simpleparse<br />
|<br />
|-<br />
| py-singledispatch<br />
| Not needed for >=py3.3<br />
|-<br />
| py-snowballstemmer<br />
|<br />
|-<br />
| py-sphinx<br />
|<br />
|-<br />
| py-sphinx_rtd_theme<br />
|<br />
|-<br />
| py-subversion<br />
|<br />
|-<br />
| py-talloc<br />
|<br />
|-<br />
| py-tdb<br />
|<br />
|-<br />
| py-templayer<br />
|<br />
|-<br />
| py-tevent<br />
|<br />
|-<br />
| py-tracing<br />
|<br />
|-<br />
| py-ttystatus<br />
|<br />
|-<br />
| py-twisted<br />
|<br />
|-<br />
| py-twitter<br />
|<br />
|-<br />
| py-unbound<br />
|<br />
|-<br />
| py-unidecode<br />
|<br />
|-<br />
| py-uritemplate<br />
|<br />
|-<br />
| py-urlgrabber<br />
|<br />
|-<br />
| py-urlnorm<br />
|<br />
|-<br />
| py-urwid<br />
|<br />
|-<br />
| py-urwid-examples<br />
|<br />
|-<br />
| py-vobject<br />
|<br />
|-<br />
| py-webassets<br />
|<br />
|-<br />
| py-wtforms<br />
|<br />
|-<br />
| py-xml<br />
|<br />
|-<br />
|}<br />
<br />
=== community ===<br />
<br />
{|class="wikitable"<br />
! Pkgname<br />
! Notes<br />
|-<br />
| py-acme<br />
|<br />
|-<br />
| py-argh<br />
|<br />
|-<br />
| py-configargparse<br />
|<br />
|-<br />
| py-crcmod<br />
|<br />
|-<br />
| py-dialog<br />
|<br />
|-<br />
| py-distutils-extra<br />
|<br />
|-<br />
| py-django-appconf<br />
|<br />
|-<br />
| py-django-compressor<br />
|<br />
|-<br />
| py-django1.5<br />
| [https://www.djangoproject.com/download/#supported-versions unmaintained version]<br />
|-<br />
| py-ethtool<br />
|<br />
|-<br />
| py-gammu<br />
|<br />
|-<br />
| py-gpiozero<br />
|<br />
|-<br />
| py-graphviz<br />
|<br />
|-<br />
| py-gtkglext<br />
|<br />
|-<br />
| py-impacket<br />
|<br />
|-<br />
| py-ipaddr<br />
|<br />
|-<br />
| py-jellyfish<br />
|<br />
|-<br />
| py-libplist<br />
|<br />
|-<br />
| py-libteam<br />
|<br />
|-<br />
| py-livereload<br />
|<br />
|-<br />
| py-lz4<br />
|<br />
|-<br />
| py-mechanize<br />
|<br />
|-<br />
| py-ndg_httpsclient<br />
|<br />
|-<br />
| py-numpy<br />
|<br />
|-<br />
| py-opencl<br />
|<br />
|-<br />
| py-opengl-accelerate<br />
|<br />
|-<br />
| py-parsedatetime<br />
|<br />
|-<br />
| py-pathtools<br />
|<br />
|-<br />
| py-pysqlite<br />
|<br />
|-<br />
| py-rencode<br />
|<br />
|-<br />
| py-rpigpio<br />
|<br />
|-<br />
| py-rpm<br />
|<br />
|-<br />
| py-rtslib<br />
|<br />
|-<br />
| py-sensehat<br />
|<br />
|-<br />
| py-skywriter-hat<br />
|<br />
|-<br />
| py-slowaes<br />
|<br />
|-<br />
| py-sphinx-autobuild<br />
|<br />
|-<br />
| py-tempita<br />
|<br />
|-<br />
| py-udev<br />
|<br />
|-<br />
| py-watchdog<br />
|<br />
|-<br />
| py-zope-component<br />
|<br />
|-<br />
| py-zope-event<br />
|<br />
|-<br />
| py2-impacket<br />
|<br />
|-<br />
| py2-pysqlite<br />
|<br />
|-<br />
| py2-tempita<br />
|-<br />
|}</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=APKBUILD_Reference&diff=13022APKBUILD Reference2016-11-15T11:11:53Z<p>Fabled: </p>
<hr />
<div>APKBUILDs are the scripts that are created in order to build Alpine packages using the [[abuild]] tool.<br />
<br />
This page is intended to serve as a reference for creating APKBUILDs; if this is your first time creating a package for Alpine Linux, please see [[Creating an Alpine package]].<br />
<br />
= Legend =<br />
The following notes will assist you in understanding this document.<br />
<br />
In description text:<br />
* If a variable is not prefixed with a ''$'', it will be represented by italics (i.e., ''srcdir'' ).<br />
* Functions will also be represented by italics, but will also end with a pair of parentheses (i.e., ''build()'' ).<br />
* Shell commands will be represented <code>like this</code>.<br />
<br />
<br />
= Variables =<br />
{{Note|Variables that contain a path (e.g. ''$srcdir'' and ''$pkgdir'') should always be quoted using double quotes (i.e., ''"$srcdir"''). This is done to prevent things from breaking, should the user have the APKBUILD in a directory path that contains spaces.}}<br />
{{Note|All arbitrary variable and function names should be prefixed with an underscore character ( _ ) to avoid name clashes with the internals of abuild (for example, ''_luaversions'').}}<br />
<br />
== abuild-defined variables ==<br />
The following variables are defined by abuild:<br />
<br />
==== startdir ====<br />
: The directory where the APKBUILD script is.<br />
==== srcdir ====<br />
: The directory where sources, from the ''source'' variable, are downloaded to and unpacked to.<br />
==== pkgdir ====<br />
: This directory should receive the files for the main package. For example, a normal [http://en.wikipedia.org/wiki/GNU_build_system autotools] package would have <code>make DESTDIR="$pkgdir" install</code> in the ''package()'' function.<br />
==== subpkgdir ====<br />
: This directory should receive the files for a subpackage. This variable should only be used from subpackage functions.<br />
==== builddir ====<br />
: This variable should point to the directory inside the ''srcdir'' where the main package source is unpacked. This is typically ''$srcdir/$pkgname-$pkgver''. It’s used by the default ''prepare()'' function as a working directory when applying patches.<br />
<br />
<br />
== User-defined variables ==<br />
The following variables should be defined by the user:<br />
==== arch ====<br />
: Package architecture(s) to build for. Can be one of: '''x86, x86_64, armhf, aarch64, all''', or '''noarch''', where '''all''' means all architectures, and '''noarch''' means it's architecture-independent (e.g., a pure-python package).<br />
: {{Tip|To determine if your APKBUILD can use '''noarch''': First specify '''all''' and then build the package by executing <code>abuild -r</code>. Watch the output towards the end for warnings saying that '''noarch''' can be used. If the main package and all subpackages, if you have any subpackages, give a warning saying that '''noarch''' can be used, then you can use '''noarch'''.}}<br />
==== depends ====<br />
: Run-time dependency package(s) that are not shared-object dependencies. Shared objects dependencies are auto-detected and should not be specified here.<br />
==== depends_dev ====<br />
: Run-time dependency package(s) for the '''$pkgname-dev''' subpackage.<br />
<br />
: {{Note|From ncopa on IRC: To find out if you need to add a package to depends_dev have a look at *requires* in usr/lib/pkgconfig/*.pc. With libtool it gets more complicated, but we should delete the .la files. Also check if there are any /usr/bin/*-configure #!/bin/bash #!/usr/bin/perl or Python. Sometimes scripts or similar are generated at build time (i.e autoconf automake) then you normally don't need add those to depends_dev. You can also just add all -dev makedepends to depends_dev but it will slow the build process a little bit (more build dependencies).}}<br />
==== giturl ====<br />
:Git repository from which <code>abuild checkout</code> checks out. You can checkout a specific branch in git by adding <code>-b $branch</code>.<br />
==== install ====<br />
: There are 6 different types of install scripts. Install scripts are named '''$pkgname.action''', where '''action''' can be: '''pre-install, post-install, pre-upgrade, post-upgrade, pre-deinstall''', or '''post-deinstall'''. For example, if ''pkgname'' is set to '''mypackage''' and ''install'' is set to '''$pkgname.post-install''', then a script named '''mypackage.post-install''' must exist along-side the APKBUILD.<br />
<br />
: First, a few notes regarding install scripts:<br />
<blockquote>{{Note|When using install scripts, ''$install'' should be included in ''source'' so that checksums can be generated and used for the install scripts specified in ''install''. For example:<br />
<pre><br />
install="$pkgname.pre-install $pkgname.post-install"<br />
source="http://....<br />
$install"<br />
</pre>}}<br />
{{Note|Always use <code>/bin/sh</code> for the command-line interpreter on the [http://en.wikipedia.org/wiki/Shebang_%28Unix%29 shebang line] of your install scripts.}}</blockquote><br />
<br />
The following are the different types of install scripts in detail:<br />
<br />
===== $pkgname.pre-install =====<br />
: This script is executed ''before installing'' the package. Typical use is when the package needs a group and a user to be created. For example:<br />
<blockquote><pre><br />
#!/bin/sh<br />
<br />
addgroup -S clamav 2>/dev/null<br />
adduser -S -D -H -s /bin/false -G clamav -g clamav clamav 2>/dev/null<br />
<br />
exit 0<br />
</pre><br />
{{Note|If the script exits with a failure (e.g., if the user already exists), the package will not be installed and <code>apk</code> will exit with failure, hence the <code>exit 0</code> at the end.}}</blockquote><br />
<br />
===== $pkgname.post-install =====<br />
: This script is executed ''after installing'' the package.<br />
<br />
===== $pkgname.pre-upgrade =====<br />
: This script is executed ''before upgrading/downgrading/reinstalling'' the package. Note that exiting with failure will not cause apk to exit with failure, but will mark the package as broken.<br />
<br />
===== $pkgname.post-upgrade =====<br />
: This script is executed ''after upgrading/downgrading/reinstalling'' the package.<br />
<br />
===== $pkgname.pre-deinstall =====<br />
: This script is executed ''before uninstalling'' the package.<br />
: {{Note|If the script exits with failure, <code>apk</code> will not uninstall the package.}}<br />
<br />
===== $pkgname.post-deinstall =====<br />
: This script is executed ''after uninstalling'' the package.<br />
<br />
==== install_if ====<br />
:install_if can be used when a package needs to be installed when some packages are already installed or are in the dependency tree. As example we could take open-vm-tools. Currently it contains the userspace tools and separate packages for the kernel modules (grsec and vserver). When we install the userspace tools, apk should automatically install the correct kernel modules and will need to figure out for which kernel. This is where install_if jumps in. For any of the kernel modules package we would use:<br />
<br />
:<pre>install_if="linux-${_flavor}=${_kernelver} open-vm-tools"</pre><br />
<br />
:This will automatically install the package when the specified packages are installed or are in dependency tree.<br />
<br />
==== license ====<br />
: License(s) for the package.<br />
==== makedepends ====<br />
: Build-time dependency package(s).<br />
==== md5sums ====<br />
: Checksums for the files/URLs listed in ''source''. The checksums are normally generated and updated by executing <code>abuild checksum</code> and should be the last item in the APKBUILD.<br />
==== options ====<br />
: Build-time options for the package. Can be: '''!strip''' - to avoid stripping symbols from binaries.<br />
==== pkgdesc ====<br />
: A brief, one-line description of what the package does.<br />
<br />
: Here's an example from the OpenSSH client package:<br />
: <pre>pkgdesc="Port of OpenBSD's free SSH release - client"</pre><br />
==== pkggroups ====<br />
: System group(s) to be created during build-time. System group(s) should also be created in the '''[[APKBUILD Reference#.24pkgname.pre-install|$pkgname.pre-install]]''' script, so that the system group(s) are also created prior to package installation for run-time use.<br />
==== pkgname ====<br />
: The name of the package. All letters should be lowercase.<br />
: {{Note|When creating an APKBUILD of a module or library for another package, we use some common package prefixes, such as: ''lua-'', ''perl-'', ''php-'', and ''py-''. Search aports for other common prefixes.}}<br />
<br />
==== pkgrel ====<br />
: Alpine package release number. Starts at 0 (zero). Always increment ''pkgrel'' when making updates to an aport; reset ''pkgrel'' to 0 (zero) when incrementing ''pkgver''.<br />
==== pkgusers ====<br />
: System user(s) to be created during build-time. System user(s) should also be created in the '''[[APKBUILD Reference#.24pkgname.pre-install|$pkgname.pre-install]]''' script, so that the system user(s) are also created prior to package installation for run-time use.<br />
==== pkgver ====<br />
: The version of the software being packaged.<br />
==== provides ====<br />
: List of package names (and optionally version info) this package provides.<br />
<br />
: If package with a version is provided (provides='foo=1.2') apk will consider it as an alternate name and it will automatically consider the package for installation by the alternate name, and conflict with other packages having the same name, or provides.<br />
<br />
: If version is not provided (provides='foo'), apk will consider it as virtual package name. Several package with same non-versioned provides can be installed simultaneously. However, none of them will be installed by default when requested by the virtual name - instead, error message is given and user is asked to choose which package providing the virtual name should be installed.<br />
==== replaces ====<br />
: Package(s) that this package replaces. This package will "take over" files owned by packages listed in the ''replaces'' variable. This is useful when files move from one package to another, or when a package gets renamed.<br />
==== replaces_priority ====<br />
: The priority of the replaces. If multiple packages replace each other, then will the package with highest ''replaces_priority'' win.<br />
==== source ====<br />
: The source variable is not only used to list the remote source files to fetch, it is also used to list the local files that abuild will need in order to build the apk. Examples of such local files include: init.d files, conf.d files, install files (see [[APKBUILD Reference#install|install variable]]), patches, and all other necessary files.<br />
<br />
: Here are few things to note:<br />
<br />
:* When you are finished adding local and/or remote files to ''source'', you can execute the following command to add their checksums to the APKBUILD file:<br />
:: {{Cmd|abuild checksum}}<br />
:: {{Note|When later updating the content of ''source'', or updating a file that is listed in ''source'', you must also update their checksums again with the same command.}}<br />
<br />
:* When the remote file is hosted at SourceForge, it's best to specify the special mirrors link used by SourceForge:<br />
:: <pre>http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz</pre><br />
:: (or similar depending on the package).<br />
<br />
:* You can set target filename (eg 'save as...') by prefixing the URI with ''filename::''. This is useful when the remote filename is not specified in the URI (ie, does not end in '/software-1.0.tar.gz'), such as:<br />
:: <pre>http://oss.example.org/?get=software&ver=1.0</pre><br />
:: or when the filename is braindead, like githubs' download tags:<br />
:: <pre>https://github.com/software/software/archive/v$pkgver.tar.gz</pre><br />
:: The above two examples needs a target filename prefix:<br />
:: <pre>$pkgname-$pkgver.tar.gz::http://oss.example.org/?get=software&ver=$pkgver</pre><br />
:: and:<br />
:: <pre>$pkgname-$pkgver.tar.gz::https://github.com/software/software/archive/v$pkgver.tar.gz</pre><br />
<br />
:* abuild currently supports the following protocols for remote file retrieval:<br />
:** http<br />
:** https<br />
:** ftp<br />
<br />
:* abuild currently supports the following archive types/archive file extensions:<br />
:** .tar.gz / .tgz<br />
:** .tar.bz2<br />
:** .tar.lzma<br />
:** .tar.xz<br />
:** .zip<br />
<br />
:: {{Note|Legacy APKBUILD scripts define ''source'' variable as "saveas-[brain-dead-url]/[target-filename]" format instead of the modern [target-filename]::[brain-dead-url].<br />''BAD'': source&#61;"saveas-http://releases.ddvtech.com/download.php?pack&#61;libmist_dist&ver&#61;RC/$pkgname-$pkgver.tar.gz"<br />''GOOD'': source&#61;$pkgname-$pkgver.tar.gz::http://releases.ddvtech.com/download.php?pack&#61;libmist_dist&ver&#61;RC"}}<br />
<br />
==== subpackages ====<br />
: Subpackages built from this APKBUILD. abuild will parse this variable and try to find a subpackage split function. The split function must ''move'' files that do not belong in the main package, from ''$pkgdir'' to ''$subpkgdir''. Files and directories can also be ''copied'' from ''$startdir'' and ''$srcdir'' to ''$subpkgdir''.<br />
<br />
: The split function can be specified in 1 of 3 different methods:<br />
:# subpkgname:'''splitfunc'''<br />
:# $pkgname-'''splitfunc'''<br />
:# '''splitfunc'''<br />
<br />
: {{Note|Split function names '''cannot''' use hyphens; use the first method above if the subpackage name contains a hyphen (-) character, like this: ''subpkg-name:subpkg_name'', where <code>subpkg-name</code> is the name of the '''subpackage''' and <code>subpkg_name</code> is the name of the '''subpackage's split function'''.}}<br />
<br />
: {{Tip|For more information, see the [[APKBUILD_examples:Subpackages|Subpackages example]].}}<br />
<br />
==== triggers ====<br />
: Apk-tools can "monitor" directories and execute a trigger if any package installed/uninstalled any file in the monitored dir. The triggers are always execute after the apk action (install, uninstall, upgrade).<br />
<br />
: The triggers are specified in the format: ''scriptname''=''pathlist'' where ''scriptname'' is the (sub)package name + .trigger suffix and pathlist is : separated list of the dirs to monitor.<br />
<br />
: The '''triggers''' variable must include the triggers for subpackages too if they have any.<br />
<br />
: It is possible to use wildcards (*) in the dir list.<br />
<br />
==== url ====<br />
: The homepage for the package. This is to help users find upstream documentation and other information regarding the package.<br />
<br />
= Functions =<br />
{{Note|All functions should consider the current working directory as undefined, and should therefore use the [[APKBUILD Reference#abuild-defined_variables|abuild-defined directory variables]] to their advantage.}}<br />
<br />
== abuild-defined functions ==<br />
The following functions are provided by abuild and can be overridden:<br />
<br />
==== fetch() ====<br />
: Downloads remote sources listed in ''source'' to ''SRCDEST'' (''SRCDEST'' is configured in ''/etc/abuild.conf'') and creates symlinks in ''$srcdir''.<br />
==== unpack() ====<br />
: Unpacks .tgz, .tar.gz, .tar.bz2, .tar.lzma, .tar.xz, and .zip archives in ''$srcdir'' to ''$srcdir''.<br />
==== dev() ====<br />
: Subpackage function for the '''$pkgname-dev''' package. Without specifying a custom ''dev()'' function, abuild will call it's internal ''dev()'' function, which in turn calls ''default_dev()'', which will move ''"$pkgdir"/usr/include'', ''*.a'', ''*.la'' and similar files to ''$subpkgdir''.<br />
==== doc() ====<br />
: Subpackage function for the '''$pkgname-doc''' package. Without specifying a custom ''doc()'' function, abuild will call it's internal ''doc()'' function, which in turn calls ''default_doc()'', which will move ''"$pkgdir"/usr/share/doc'', ''"$pkgdir"/usr/share/man'' and similar to ''$subpkgdir''.<br />
<br />
== User-defined functions ==<br />
The following functions should be defined by the user: <br />
<br />
==== prepare() ====<br />
: '''''Optional''.''' Used for build preparation: patches, etc, should be applied here. This function is available for your convenience.<br />
==== build() ====<br />
: '''Required.''' This is the compilation stage. This function will be called as the current user (unless the ''package()'' function is missing - for compatibility reasons). If no compilation is needed, this function can contain a single line: <code>return 0</code><br />
==== package() ====<br />
: '''Required.''' This is the packaging stage. Here, the built application and support files should be installed into '''$pkgdir'''. If this is a metapackage, this function can contain a single line: <code>mkdir -p "$pkgdir"</code><br />
<br />
{{Note|Building in fakeroot will reduce performance for parallel builds dramatically. It is for this reason that we split the build and package process into two separate functions.}}<br />
<br />
= Examples =<br />
The [[APKBUILD examples]] page will assist you in understanding how to create an APKBUILD.<br />
<br />
[[Category:Development]]</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:Releases&diff=11563Alpine Linux:Releases2016-01-06T15:07:59Z<p>Fabled: </p>
<hr />
<div>There are several releases of Alpine Linux available at the same time. There is no fixed release cycle but rather every 6 month we make a snapshot of '''[[Edge|edge]]''' and make a release. We support each stable release for a certain time, normally for 2 years. We can do security fixes beyond that on request and when patches are available.<br />
<br />
The latest release of Alpine Linux is: '''3.3.0''' [http://alpinelinux.org/posts/Alpine-3.3.0-released.html Release notes], [http://git.alpinelinux.org/cgit/aports/log/?h=v3.3.0 git log]<br />
<br />
{| cellpadding="5" border="1" class="wikitable"<br />
|-<br />
! Branch<br />
! Branch Date<br />
! Latest Release<br />
! Previous minor releases<br />
! Directory name<br />
! Updates<br />
! End of Support<br />
|-<br />
| '''[[edge]]'''<br />
| current<br />
| rolling<br />
| -<br />
| [http://nl.alpinelinux.org/alpine/edge/ edge]<br />
| development<br />
| n/a<br />
|-<br />
| '''v3.3'''<br />
| [http://git.alpinelinux.org/cgit/aports/log/?h=3.3-stable 2016-01-06]<br />
| [http://alpinelinux.org/posts/Alpine-3.3.1-released.html 3.3.1]<br />
| [http://alpinelinux.org/posts/Alpine-3.3.0-released.html 3.3.0]<br />
| [http://nl.alpinelinux.org/alpine/v3.3/ v3.3]<br />
| bugfixes<br />
| <span style="color: green;">2017-11-01</span><br />
|-<br />
| '''v3.2'''<br />
| [http://git.alpinelinux.org/cgit/aports/log/?h=3.2-stable 2015-05-26]<br />
| [http://alpinelinux.org/posts/Alpine-3.2.3-released.html 3.2.3]<br />
| [http://alpinelinux.org/posts/Alpine-3.2.0-released.html 3.2.0], [http://alpinelinux.org/posts/Alpine-3.2.1-released.html 3.2.1], [http://alpinelinux.org/posts/Alpine-3.2.2-released.html 3.2.2]<br />
| [http://nl.alpinelinux.org/alpine/v3.2/ v3.2]<br />
| bugfixes<br />
| <span style="color: green;">2017-05-01</span><br />
|-<br />
| '''v3.1'''<br />
| [http://git.alpinelinux.org/cgit/aports/log/?h=3.1-stable 2014-12-10]<br />
| [http://alpinelinux.org/posts/Alpine-3.1.4-released.html 3.1.4]<br />
| [http://alpinelinux.org/release-3.1.0 3.1.0], [http://alpinelinux.org/release-3.1.1 3.1.1], [http://alpinelinux.org/posts/Alpine-3.1.2-released.html 3.1.2], [http://alpinelinux.org/posts/Alpine-3.1.3-released.html 3.1.3], [http://alpinelinux.org/posts/Alpine-3.1.4-released.html 3.1.4]<br />
| [http://nl.alpinelinux.org/alpine/v3.1/ v3.1]<br />
| security only<br />
| <span style="color: green;">2016-11-01</span><br />
|-<br />
| '''v3.0'''<br />
| [http://git.alpinelinux.org/cgit/aports/log/?h=3.0-stable 2014-06-04]<br />
| [http://alpinelinux.org/release-3.0.6 3.0.6]<br />
| [http://alpinelinux.org/release-3.0.0 3.0.0], [http://alpinelinux.org/release-3.0.1 3.0.1], [http://alpinelinux.org/release-3.0.2 3.0.2], [http://alpinelinux.org/release-3.0.3 3.0.3], [http://alpinelinux.org/release-3.0.4 3.0.4], [http://alpinelinux.org/release-3.0.5 3.0.5]<br />
| [http://nl.alpinelinux.org/alpine/v3.0/ v3.0]<br />
| security only<br />
| <span style="color: green;">2016-05-01</span><br />
|-<br />
| '''v2.7'''<br />
| [http://git.alpinelinux.org/cgit/aports/log/?h=2.7-stable 2013-11-08]<br />
| [http://alpinelinux.org/release-2.7.9 2.7.9]<br />
| [http://alpinelinux.org/release-2.7.0 2.7.0], [http://alpinelinux.org/release-2.7.1 2.7.1], [http://alpinelinux.org/release-2.7.2 2.7.2], [http://alpinelinux.org/release-2.7.3 2.7.3], [http://alpinelinux.org/release-2.7.4 2.7.4], [http://alpinelinux.org/release-2.7.5 2.7.5], [http://alpinelinux.org/release-2.7.6 2.7.6], [http://alpinelinux.org/release-2.7.7 2.7.7], [http://alpinelinux.org/release-2.7.8 2.7.8]<br />
| [http://nl.alpinelinux.org/alpine/v2.7/ v2.7]<br />
| security only<br />
| <span style="color: orange;">2015-11-01</span><br />
|-<br />
| '''v2.6'''<br />
| [http://git.alpinelinux.org/cgit/aports/log/?h=2.6-stable 2013-05-17]<br />
| [http://alpinelinux.org/release-2.6.6 2.6.6]<br />
| [http://alpinelinux.org/release-2.6.0 2.6.0], [http://alpinelinux.org/release-2.6.1 2.6.1], [http://alpinelinux.org/release-2.6.2 2.6.2], [http://alpinelinux.org/release-2.6.3 2.6.3], [http://alpinelinux.org/release-2.6.4 2.6.4], [http://alpinelinux.org/release-2.6.5 2.6.5]<br />
| [http://nl.alpinelinux.org/alpine/v2.6/ v2.6]<br />
| on request only<br />
| <span style="color: red;">2015-05-01</span><br />
|-<br />
| '''v2.5'''<br />
| [http://git.alpinelinux.org/cgit/aports/log/?h=2.5-stable 2012-11-07]<br />
| [http://alpinelinux.org/release-2.5.4 2.5.4]<br />
| [http://alpinelinux.org/release-2.5.0 2.5.0], [http://alpinelinux.org/release-2.5.1 2.5.1], [http://alpinelinux.org/release-2.5.2 2.5.2], [http://alpinelinux.org/release-2.5.3 2.5.3]<br />
| [http://nl.alpinelinux.org/alpine/v2.5/ v2.5]<br />
| on request only<br />
| <span style="color: red;">2014-11-01</span><br />
|-<br />
| '''v2.4'''<br />
| [http://git.alpinelinux.org/cgit/aports/log/?h=2.4-stable 2012-05-02]<br />
| [http://alpinelinux.org/release-2.4.11 2.4.11]<br />
| [http://alpinelinux.org/node/13811 2.4.0], [http://alpinelinux.org/node/13812 2.4.1], [http://alpinelinux.org/node/13845 2.4.2], [http://alpinelinux.org/node/13906 2.4.3], [http://alpinelinux.org/release-2.4.4 2.4.4], [http://alpinelinux.org/release-2.4.5 2.4.5], [http://alpinelinux.org/release-2.4.6 2.4.6], [http://alpinelinux.org/release-2.4.7 2.4.7], 2.4.8, [http://alpinelinux.org/node/14664 2.4.9], [http://alpinelinux.org/release-2.4.10 2.4.10]<br />
| [http://nl.alpinelinux.org/alpine/v2.4/ v2.4]<br />
| on request only<br />
| <span style="color: red;">2014-05-01</span><br />
|-<br />
| '''v2.3'''<br />
| [http://git.alpinelinux.org/cgit/aports/log/?h=2.3-stable 2011-11-01]<br />
| [http://alpinelinux.org/node/13503 2.3.6]<br />
| [http://alpinelinux.org/node/6841 2.3.0], [http://alpinelinux.org/node/6866 2.3.1], [http://alpinelinux.org/node/6911 2.3.2], [http://alpinelinux.org/node/6999 2.3.3], [http://alpinelinux.org/node/13466 2.3.4 & 2.3.5]<br />
| [http://nl.alpinelinux.org/alpine/v2.3/ v2.3]<br />
| on request only<br />
| <span style="color: red;">2013-11-01</span><br />
|-<br />
| '''v2.2'''<br />
| [http://git.alpinelinux.org/cgit/aports/log/?h=2.2-stable 2011-05-03]<br />
| [http://alpinelinux.org/node/6455 2.2.3]<br />
| [http://alpinelinux.org/node/5237 2.2.0], [http://lists.alpinelinux.org/alpine-devel/1618.html 2.2.1], [http://alpinelinux.org/node/5955 2.2.2]<br />
| [http://nl.alpinelinux.org/alpine/v2.2/ v2.2]<br />
| on request only<br />
| <span style="color: red;">2013-05-01</span><br />
|-<br />
| '''v2.1'''<br />
| [http://git.alpinelinux.org/cgit/aports/log/?h=2.1-stable 2010-11-01]<br />
| [http://alpinelinux.org/node/5236 2.1.6]<br />
| [[Release_Notes_for_Alpine_2.1.0|2.1.0]], [[Release_Notes_for_Alpine_2.1.1|2.1.1]], [[Release_Notes_for_Alpine_2.1.2|2.1.2]], [[Release_Notes_for_Alpine_2.1.3|2.1.3]], [http://alpinelinux.org/node/5230 2.1.4], [http://alpinelinux.org/node/5235 2.1.5]<br />
| [http://nl.alpinelinux.org/alpine/v2.1/ v2.1]<br />
| on request only<br />
| <span style="color: red;">2012-11-01</span><br />
|-<br />
| '''v2.0'''<br />
| [http://git.alpinelinux.org/cgit/aports/log/?h=2.0-stable 2010-08-16]<br />
| [http://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_2.0.3 2.0.3]<br />
| [[Release_Notes_for_Alpine_2.0.0|2.0.0]], [[Release_Notes_for_Alpine_2.0.1|2.0.1]], [[Release_Notes_for_Alpine_2.0.2|2.0.2]]<br />
| [http://nl.alpinelinux.org/alpine/v2.0/ v2.0]<br />
| on request only<br />
| <span style="color: red;">2012-04-01</span><br />
|}<br />
<br />
An archive for [[older releases]] is also available.</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=RPI_Video_Receiver&diff=10254RPI Video Receiver2015-01-15T13:25:29Z<p>Fabled: </p>
<hr />
<div>= Rasperry Pi Video Receiver =<br />
<br />
Main benefits of using Alpine Linux is that the SD/MMC is mounted read-only always. It will not wear out, and it's safe to power-off the device any time. Additionally the boot process has been made pro-looking so that only the splash screen is displayed.<br />
<br />
The boot time is about 60 seconds. It should speed up with ~10 seconds after https://bugs.freedesktop.org/show_bug.cgi?id=64766 is fixed.<br />
<br />
Quick demo:<br />
* Format SD/MMC with one primary partition, FAT32 file system<br />
* Extract http://nl.alpinelinux.org/alpine/v3.1/releases/armhf/alpine-rpi-3.1.1-armhf.rpi.tar.gz to SD/MMC<br />
* Extract http://dev.alpinelinux.org/~tteras/rpi-video-decoder.tar.gz on top of that<br />
<br />
The overlay image contains the following changes:<br />
* fbsplash.ppm provide the splash screen with alpine logo<br />
* cmdline.txt has "blacklist=fbcon" appended to disable video console<br />
* and a default overlay is provided to play BBC world news<br />
* root password is set to 'rpi'<br />
<br />
The configuration overlay basically is constructed as:<br />
<nowiki><br />
apk add openssh chrony omxplayer<br />
vi /etc/network/interfaces # eth0 configured for dhcp<br />
vi /etc/conf.d/omxplayer # to configure TV-channel URL<br />
rc-update add networking<br />
rc-update add chronyd<br />
rc-update add sshd<br />
rc-update add omxplayer<br />
rc<br />
rm /etc/ssh/ssh_host_* # so you get new ssh key on boot<br />
lbu commit</nowiki></div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Tutorials_and_Howtos&diff=10253Tutorials and Howtos2015-01-15T13:20:57Z<p>Fabled: /* Complete Solutions */</p>
<hr />
<div>[[Image:package_edutainment.svg|right|link=]]<br />
{{TOC left}}<br />
'''Welcome to Tutorials and Howtos, a place of basic and advanced configuration tasks for your Alpine Linux.'''<br />
<br />
The tutorials are hands-on and the reader is expected to try and achieve the goals described in each step, possibly with the help of a good example. The output in one step is the starting point for the following step.<br />
<br />
Howtos are smaller articles explaining how to perform a particular task with Alpine Linux.<br />
<br />
We encourage people to send in both complete articles as well as requesting topics to be covered. If you think you have the skills and knowledge to write an Alpine Linux related article please do so on this Wiki. If you want to request a topic, please add your request in this page's [[Talk:Tutorials_and_Howtos|Discussion]].<br />
<br />
{{Clear}}<br />
== Storage ==<br />
<br />
* [[Alpine local backup|Alpine local backup (lbu)]] ''(Permanently store your modifications in case your box needs reboot)'' <!-- Installation and Storage --><br />
** [[Back Up a Flash Memory Installation]] <!-- Installation and Storage --><br />
** [[Manually editing a existing apkovl]]<br />
<br />
* [[Setting up disks manually]] <!-- Installation and Storage --><br />
* [[Setting up a software RAID1 array]]<br />
<!-- ** [[Setting up a /var partition on software IDE raid1]] Obsolete, Installation and Storage --> <br />
* [[Raid Administration]]<br />
* [[Setting up encrypted volumes with LUKS]]<br />
* [[Setting up LVM on LUKS]]<br />
* [[Setting up Logical Volumes with LVM]]<br />
** [[Setting up LVM on GPT-labeled disks]]<br />
** [[Installing on GPT LVM]]<br />
* [[Filesystems|Formatting HD/Floppy/Other]] <!-- just a stub --><br />
<br />
* [[Setting up iSCSI]]<br />
** [[iSCSI Raid and Clustered File Systems]]<br />
* [[High performance SCST iSCSI Target on Linux software Raid]] ''(deprecated)'' <!-- solution --><br />
* [[Linux iSCSI Target (TCM)]]<br />
* [[Disk Replication with DRBD]] <!-- draft --><br />
<br />
* [[Burning ISOs]] <!-- just some links now --><br />
* [[Bootmanagers]]<br />
* [[Migrating data]]<br />
<br />
== Networking ==<br />
<br />
* [[Configure Networking]]<br />
* [[Connecting to a wireless access point]]<br />
* [[Bonding]]<br />
* [[Vlan]]<br />
* [[Bridge]]<br />
* [[How to configure static routes]]<br />
<br />
* [[Alpine Wall]] - [[How-To Alpine Wall]] - [[Alpine Wall User's Guide]] ''(a new firewall management framework)''<br />
<br />
* [[Using serial modem]]<br />
* [[Using HSDPA modem]]<br />
* [[Setting up Satellite Internet Connection]]<br />
* [[Using Alpine on Windows domain with IPSEC isolation]]<br />
<br />
* [[Setting up a ssh-server]] ''(Using ssh is a good way to administer your box remotely)'' <!-- Server and Networking --><br />
* [[How to setup a wireless access point]] ''(Setting up Secure Wireless AP w/ WPA encryption with bridge to wired network)''<br />
* [[Setting up a OpenVPN server with Alpine]] ''(Allowing single users or devices to remotely connect to your network)''<br />
<!-- [[Using Racoon for Remote Sites]] is a different VPN tunnelling method, but that article is just a stub --><br />
* [[Experiences with OpenVPN-client on ALIX.2D3]] <!-- solution --><br />
<br />
* [[Generating SSL certs with ACF]] <!-- Generating SSL certs with ACF 1.9 --><br />
* [[Setting up unbound DNS server]]<br />
* [[Setting up nsd DNS server]]<br />
* [[TinyDNS Format]]<br />
* [[Fault Tolerant Routing with Alpine Linux]] <!-- solution --><br />
* [[Freeradius Active Directory Integration]]<br />
* [[Multi_ISP]] ''(Dual-ISP setup with load-balancing and automatic failover)''<br />
* [[OwnCloud]] ''(Installing OwnCloud)''<br />
<br />
* [[Apache with php-fpm]]<br />
* [[Seafile: setting up your own private cloud]]<br />
<br />
== Post-Install ==<br />
<!-- If you edit this, please coordinate with Installation#Post-Install and Developer_Documentation#Package_management. Note that these three sections are not exact duplicates. --><br />
<br />
* [[Alpine Linux package management|Package Management (apk)]] ''(How to add/remove packages on your Alpine)''<br />
<!-- [[Alpine Linux package management#Local_Cache|How to enable APK caching]] --><br />
** [[Comparison with other distros]]<br />
* [[Alpine local backup|Alpine local backup (lbu)]] ''(Permanently store your modifications in case your box needs reboot)''<br />
** [[Back Up a Flash Memory Installation]] <!-- new --><br />
** [[Manually editing a existing apkovl]]<br />
* [[Alpine Linux Init System|Init System (OpenRC)]] ''(Configure a service to automatically boot at next reboot)''<br />
** [[Multiple Instances of Services]]<br />
<!-- [[Writing Init Scripts]] --><br />
* [[Upgrading Alpine]]<br />
<!-- Obsolete<br />
[[Upgrading Alpine - v1.9.x]]<br />
[[Upgrading Alpine - CD v1.8.x]]<br />
[[Upgrading Alpine - HD v1.8.x]]<br />
[[Upgrade to repository main|Upgrading to signed repositories]]<br />
--><br />
<br />
* [[Setting up a ssh-server]] ''(Using ssh is a good way to administer your box remotely)''<br />
* [[setup-acf]] ''(Configures ACF (webconfiguration) so you can manage your box through https)''<br />
* [[Changing passwords for ACF|Changing passwords]]<br />
* [[Ansible]] ''(Configuration management)''<br />
<br />
* [[Enable Serial Console on Boot]]<br />
* [[Error message on boot: Address space collision: host bridge window conflicts with Adaptor ROM]]<br />
<br />
== Virtualization==<br />
<br />
* [[Xen Dom0]] ''(Setting up Alpine as a dom0 for Xen hypervisor)''<br />
* [[Xen Dom0 on USB or SD]]<br />
* [[Create Alpine Linux PV DomU]]<br />
* [[Xen PCI Passthrough]]<br />
* [[Xen LiveCD]]<br />
* [[LXC]] ''(Setting up a Linux container in Alpine Linux)''<br />
<br />
== Desktop Environment ==<br />
<br />
* [[XFCE Setup]] and [[Xfce Desktop|Desktop Ideas]]<br />
* [[EyeOS]] ''(Cloud Computing Desktop)''<br />
* [[Oneye]] ''(Cloud Computing Desktop - Dropbox Alternative)''<br />
* [[Owncloud]] ''(Cloud Computing Desktop - Dropbox Alternative)''<br />
** (to be merged with [[OwnCloud]] ''(Your personal Cloud for storing and sharing your data on-line)'')<br />
* [[Gnome Setup]]<br />
* [[Awesome(wm) Setup]]<br />
* [[Suspend on LID close]]<br />
<br />
== Applications ==<br />
<br />
=== Telephony ===<br />
* [[Setting up Zaptel/Asterisk on Alpine]]<br />
** [[Setting up Streaming an Asterisk Channel]]<br />
* [[Freepbx on Alpine Linux]]<br />
* [[FreePBX_V3]] ''(FreeSWITCH, Asterisk GUI web acces tool)''<br />
* [[2600hz]] ''(FreeSWITCH, Asterisk GUI web access tool)''<br />
* [[Kamailio]] ''(SIP Server, formerly OpenSER)''<br />
<br />
=== Mail ===<br />
* [[Hosting services on Alpine]] ''(Hosting mail, webservices and other services)''<br />
** [[Hosting Web/Email services on Alpine]]<br />
* [[ISP Mail Server HowTo]] <!-- solution, Mail --><br />
** [[ISP Mail Server Upgrade 2.x]]<br />
** [[ISP Mail Server 2.x HowTo]] ''(Beta, please test)''<br />
* [[Roundcube]] ''(Webmail system)''<br />
* [[Setting up postfix with virtual domains]]<br />
* [[Protecting your email server with Alpine]]<br />
* [[Setting up clamsmtp]]<br />
* [[Setting up dovecot with imap and ssl]]<br />
<br />
=== HTTP ===<br />
* [[Lighttpd]]<br />
** [[Lighttpd Https access]]<br />
** [[Setting Up Lighttpd with PHP]]<br />
** [[Setting Up Lighttpd With FastCGI]]<br />
* [[Cherokee]]<br />
* [[Nginx]]<br />
* [[Apache]]<br />
** [[Setting Up Apache with PHP]]<br />
** [[Apache authentication: NTLM Single Signon]]<br />
<br />
* [[High Availability High Performance Web Cache]] ''(uCarp + HAProxy for High Availability Services such as Squid web proxy)'' <!-- solution, Server --><br />
<br />
* [[Setting up Transparent Squid Proxy]] <!-- draft --><br />
** [[SqStat]] ''(Script to look at active squid users connections)''<br />
** [[Obtaining user information via SNMP]] ''(Using squark-auth-snmp as a Squid authentication helper)'' <!-- Networking and Server, <== Using squark-auth-snmp --><br />
* [[Setting up Explicit Squid Proxy]]<br />
<br />
* [[Drupal]] ''(Content Management System (CMS) written in PHP)''<br />
* [[WordPress]] ''(Web software to create website or blog)''<br />
* [[MediaWiki]] ''(Free web-based wiki software application)''<br />
* [[DokuWiki]]<br />
* [[Darkhttpd]]<br />
<br />
=== Other Servers ===<br />
* [[Setting up a ssh-server]] ''(Using ssh is a good way to administer your box remotely)''<br />
<br />
* [[Setting up a nfs-server]]<br />
* [[Phpizabi]] ''(Social Networking Platform)''<br />
* [[Statusnet]] ''(Microblogging Platform)''<br />
* [[Pastebin]] ''(Pastebin software application)''<br />
* [[Setting up Transmission (bittorrent) with Clutch WebUI]]<br />
<br />
* [[Redmine]] ''(Project management system)''<br />
* [[Request-Tracker]] ''(Ticket system)''<br />
* [[OsTicket]] ''(Ticket system)''<br />
* [[Setting up trac wiki|Trac]] ''(Enhanced wiki and issue tracking system for software development projects)''<br />
<br />
* [[Cgit]]<br />
** [[Setting up a git repository server with gitolite and cgit]] <!-- doesn't exist yet --><br />
* [[Roundcube]] ''(Webmail system)''<br />
* [[Glpi]] ''(Manage inventory of technical resources)''<br />
<br />
* [[How to setup a Alpine Linux mirror]]<br />
* [[Cups]]<br />
* [[NgIRCd]] ''(Server for Internet Relay Chat/IRC)''<br />
* [[OpenVCP]] ''(VServer Control Panel)''<br />
* [[Mahara]] ''(E-portfolio and social networking system)''<br />
* [[Chrony and GPSD | Using chrony, gpsd, and a garmin LVC 18 as a Stratum 1 NTP source ]]<br />
* [[Sending SMS using gnokii]]<br />
<br />
=== Monitoring ===<br />
* [[Traffic monitoring]] <!-- Networking and Monitoring --><br />
* [[Setting up traffic monitoring using rrdtool (and snmp)]] <!-- Monitoring --><br />
* [[Setting up monitoring using rrdtool (and rrdcollect)]]<br />
* [[Setting up Cacti|Cacti]] ''(Front-end for rrdtool networking monitor)''<br />
* [[Setting up Zabbix|Zabbix]] ''(Monitor and track the status of network services and hardware)''<br />
* [[Setting up A Network Monitoring and Inventory System]] ''(Nagios + OpenAudit and related components)'' <!-- draft, solution, Networking and Monitoring and Server --><br />
** [[Setting up NRPE daemon]] ''(Performs remote Nagios checks)'' <!-- Networking and Monitoring --><br />
* [[Setting up Smokeping|Smokeping]] ''(Network latency monitoring)'' <!-- Networking and Monitoring --><br />
** [[Setting up MRTG and Smokeping to Monitor Bandwidth Usage and Network Latency]]<br />
* [[Setting Up Fprobe And Ntop|Ntop]] ''(NetFlow collection and analysis using a remote fprobe instance)'' <!-- Networking and Monitoring --><br />
* [[Cvechecker]] ''(Compare installed packages for Common Vulnerabilities Exposure)'' <!-- Monitoring and Security --><br />
<br />
* [[IP Accounting]] <!-- Networking and Monitoring --><br />
* [[Obtaining user information via SNMP]] ''(Using squark-auth-snmp as a Squid authentication helper)'' <!-- Networking and Server, <== Using squark-auth-snmp --><br />
* [[SqStat]] ''(Script to look at active squid users connections)''<br />
<br />
* [[Piwik]] ''(A real time web analytics software program)''<br />
* [[Awstats]] ''(Free log file analyzer)''<br />
* [[Intrusion Detection using Snort]]<br />
** [[Intrusion Detection using Snort, Sguil, Barnyard and more]]<br />
* [[Dglog]] ''(Log analyzer for the web content filter DansGuardian)''<br />
<br />
* [[Webmin]] ''(A web-based interface for Linux system)''<br />
* [[PhpPgAdmin]] ''(Web-based administration tool for PostgreSQL)''<br />
* [[PhpMyAdmin]] ''(Web-based administration tool for MYSQL)''<br />
* [[PhpSysInfo]] ''(A simple application that displays information about the host it's running on)''<br />
* [[Linfo]]<br />
<br />
* [[Setting up lm_sensors]]<br />
<br />
* [[ZoneMinder video camera security and surveillance]]<br />
<br />
== Misc ==<br />
<br />
* [[:Category:Shell]]<br />
* [[:Category:Programming]]<br />
* [[Running glibc programs]]<br />
* [[:Category:Drivers]]<br />
* [[:Category:Multimedia]]<br />
<br />
== Complete Solutions ==<br />
* [[Replacing non-Alpine Linux with Alpine remotely]]<br />
* [[High performance SCST iSCSI Target on Linux software Raid]]<br />
* [[Fault Tolerant Routing with Alpine Linux]]<br />
* [[Experiences with OpenVPN-client on ALIX.2D3]]<br />
<br />
* [[ISP Mail Server HowTo]] ''(Postfix+PostfixAdmin+DoveCot+Roundcube+ClamAV+Spamd - A full-serivce ISP mail server)''<br />
** [[ISP Mail Server Upgrade 2.x]]<br />
** [[ISP Mail Server 2.x HowTo]] ''(Beta, please test)''<br />
* [[High Availability High Performance Web Cache]] ''(uCarp + HAProxy for High Availability Services such as Squid web proxy)''<br />
* [[Setting up A Network Monitoring and Inventory System]] ''(Nagios + OpenAudit and related components)'' <!-- draft --><br />
* [[Streaming Security Camera Video with VLC]]<br />
* [[Dynamic Multipoint VPN (DMVPN)]] combined with [[Small_Office_Services]]<br />
* [[RPI Video Receiver]] ''(network video decoder using Rasperry Pi and omxplayer)''<br />
<br />
<br />
<!--<br />
This does not attempt to be complete. Is it useful to have these listed here? I find them more accessible if grouped with their topics; also, an up-to-date list of all Draft or Obsolete pages can be found at [[Project:Wiki maintenance]].<br />
<br />
== Drafts ==<br />
Currently unfinished/works-in-progress.<br />
* [[Using Racoon for Remote Sites]]<br />
* [[Setting up Transparent Squid Proxy]] ''(Covers Squid proxy and URL Filtering system)''<br />
** [[Obtaining user information via SNMP]] ''(Using the Squark Squid authentication helper)'' [!-- no longer a draft --]<br />
* [[Setting up Streaming an Asterisk Channel]]<br />
* [[Setting up A Network Monitoring and Inventory System]] ''(Nagios + OpenAudit and related components)''<br />
* [[Intrusion Detection using Snort]] ''(Installing and configuring Snort and related applications on Alpine 2.0.x)''<br />
* [[IP Accounting]] ''(Installing and configuring pmacct for IP Accounting, Netflow/sFlow collector)''<br />
* [[Disk Replication with DRBD]]<br />
--></div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=RPI_Video_Receiver&diff=10249RPI Video Receiver2015-01-07T06:55:25Z<p>Fabled: Created page with "= Rasperry Pi Video Receiver = Main benefits of using Alpine Linux is that the SD/MMC is mounted read-only always. It will not wear out, and it's safe to power-off the device..."</p>
<hr />
<div>= Rasperry Pi Video Receiver =<br />
<br />
Main benefits of using Alpine Linux is that the SD/MMC is mounted read-only always. It will not wear out, and it's safe to power-off the device any time. Additionally the boot process has been made pro-looking so that only the splash screen is displayed.<br />
<br />
The boot time is about 60 seconds. It should speed up with ~10 seconds after https://bugs.freedesktop.org/show_bug.cgi?id=64766 is fixed.<br />
<br />
Quick demo:<br />
* Format SD/MMC with one primary partition, FAT32 file system<br />
* Extract http://nl.alpinelinux.org/alpine/v3.1/releases/armhf/alpine-rpi-3.1.1-armhf.rpi.tar.gz to SD/MMC<br />
* Extract http://dev.alpinelinux.org/~tteras/rpi-video-decoder.tar.gz on top of that<br />
<br />
The overlay image contains the following changes:<br />
* fbsplash.ppm provide the splash screen with alpine logo<br />
* cmdline.txt has "blacklist=fbcon" appended to disable video console<br />
* and a default overlay is provided to play BBC world news<br />
* root password is set to 'rpi'<br />
<br />
The configuration overlay basically is constructed as:<br />
<code><br />
apk add openssh chrony omxplayer<br />
vi /etc/network/interfaces # eth0 configured for dhcp<br />
vi /etc/conf.d/omxplayer # to configure TV-channel URL<br />
rc-update add networking<br />
rc-update add chronyd<br />
rc-update add sshd<br />
rc-update add omxplayer<br />
rc<br />
rm /etc/ssh/ssh_host_* # so you get new ssh key on boot<br />
lbu commit<br />
</code></div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:IRC_Availability&diff=10192Alpine Linux:IRC Availability2014-10-08T08:36:53Z<p>Fabled: </p>
<hr />
<div><br />
{{Draft| WIP.}}<br />
{{Expand| More developers are encouraged to add their irc availability.}}<br />
<br />
=== Developers availability table ===<br />
<br />
Note: Table below is intended to give a rough idea when you are more likely to find us on IRC.<br />
<br />
{| cellpadding="5" border="1" class="wikitable"<br />
|-<br />
! Time (NZST) <br />
| +12 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23 || 00 || 01 || 02 || 03 || 04 || 05 || 06 || 07 || 08 || 09 || 10 || 11<br />
|-<br />
! Time (IST) <br />
| +5:30 || 05:30 || 06:30 || 07:30 || 08:30 || 09:30 || 10:30 || 11:30 || 12:30 || 13:30 || 14:30 || 15:30 || 16:30 || 17:30 || 18:30 || 19:30 || 20:30 || 21:30 || 22:30 || 23:30 || 00:30 || 01:30 || 02:30 || 03:30 || 04:30<br />
|-<br />
! Time (BST) <br />
| +1 || 01 || 02 || 03 || 04 || 05 || 06 || 07 || 08 || 09 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23 || 00<br />
|-<br />
! Time (PDT) <br />
| -7 || 17 || 18 || 19 || 20 || 21 || 22 || 23 || 00 || 01 || 02 || 03 || 04 || 05 || 06 || 07 || 08 || 09 || 10 || 11 || 12 || 13 || 14 || 15 || 16<br />
|-<br />
! Time (UTC) || Offset|| 00 || 01 || 02 || 03 || 04 || 05 || 06 || 07 || 08 || 09 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23 <br />
|-<br />
| Name || Offset || || || || || || || || || || || || || || || || || || || || || || || || <br />
|-<br />
| N.Copa || +2 || || || || || || || ?? || XX || XX || XX || XX || XX || XX || XX || ?? || || || || || || || || || <br />
|-<br />
| T.Teräs || +3 || || || || || || ?? || XX || XX || XX || ?? || XX || XX || XX || ?? || || || || || || || || || || <br />
|}<br />
<br />
'''Legends:''' <br><br />
'''XX''' means "very likely";<br />
'''??''' means "some likelihood".<br />
<br />
'''Devs'''<br />
* N.Copa (GMT +2) (Monday-Friday)<br />
* T.Teräs (GMT +3) (Monday-Friday)<br />
<br />
'''Infra Admins'''<br />
* N.Copa (GMT +2) (Monday-Friday)<br />
* Clandmeter (GMT +2)<br />
<br />
'''IRC Ops'''<br />
* N.Copa (GMT +2) (Monday-Friday)<br />
* Clandmeter (GMT +2)<br />
* Kanini<br />
* Rnalrd<br />
<br />
'''IRC channels affecting AlpineLinux development:'''<br />
# Freenode<br />
## #musl<br />
## #busybox<br />
## #uclibc</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:IRC_Availability&diff=10191Alpine Linux:IRC Availability2014-10-08T08:34:20Z<p>Fabled: /* Developers availability table */</p>
<hr />
<div><br />
{{Draft| WIP.}}<br />
{{Expand| More developers are encouraged to add their irc availability.}}<br />
<br />
=== Developers availability table ===<br />
<br />
Note: Table below is intended to give a rough idea when you are more likely to find us on IRC.<br />
<br />
{| cellpadding="5" border="1" class="wikitable"<br />
|-<br />
! Time (NZST) <br />
| +12 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23 || 00 || 01 || 02 || 03 || 04 || 05 || 06 || 07 || 08 || 09 || 10 || 11<br />
|-<br />
! Time (IST) <br />
| +5:30 || 05:30 || 06:30 || 07:30 || 08:30 || 09:30 || 10:30 || 11:30 || 12:30 || 13:30 || 14:30 || 15:30 || 16:30 || 17:30 || 18:30 || 19:30 || 20:30 || 21:30 || 22:30 || 23:30 || 00:30 || 01:30 || 02:30 || 03:30 || 04:30<br />
|-<br />
! Time (BST) <br />
| +1 || 01 || 02 || 03 || 04 || 05 || 06 || 07 || 08 || 09 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23 || 00<br />
|-<br />
! Time (PDT) <br />
| -7 || 17 || 18 || 19 || 20 || 21 || 22 || 23 || 00 || 01 || 02 || 03 || 04 || 05 || 06 || 07 || 08 || 09 || 10 || 11 || 12 || 13 || 14 || 15 || 16<br />
|-<br />
! Time (UTC) || Offset|| 00 || 01 || 02 || 03 || 04 || 05 || 06 || 07 || 08 || 09 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23 <br />
|-<br />
| Name || Offset || || || || || || || || || || || || || || || || || || || || || || || || <br />
|-<br />
| N.Copa || +2 || || || || || || || ?? || XX || XX || XX || XX || XX || XX || XX || ?? || || || || || || || || || <br />
|-<br />
| T.Teräs || +3 || || || || || || ?? || XX || XX || XX || XX || XX || XX || XX || ?? || || || || || || || || || || <br />
|}<br />
<br />
'''Legends:''' <br><br />
'''XX''' means "very likely";<br />
'''??''' means "some likelihood".<br />
<br />
'''Devs'''<br />
* N.Copa (GMT +2) (Monday-Friday)<br />
* T.Teräs (GMT +3) (Monday-Friday)<br />
<br />
'''Infra Admins'''<br />
* N.Copa (GMT +2) (Monday-Friday)<br />
* Clandmeter (GMT +2)<br />
<br />
'''IRC Ops'''<br />
* N.Copa (GMT +2) (Monday-Friday)<br />
* Clandmeter (GMT +2)<br />
* Kanini<br />
* Rnalrd<br />
<br />
'''IRC channels affecting AlpineLinux development:'''<br />
# Freenode<br />
## #musl<br />
## #busybox<br />
## #uclibc</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:IRC_Availability&diff=10190Alpine Linux:IRC Availability2014-10-08T08:34:02Z<p>Fabled: </p>
<hr />
<div><br />
{{Draft| WIP.}}<br />
{{Expand| More developers are encouraged to add their irc availability.}}<br />
<br />
=== Developers availability table ===<br />
<br />
Note: Table below is intended to give a rough idea when you are more likely to find us on IRC.<br />
<br />
{| cellpadding="5" border="1" class="wikitable"<br />
|-<br />
! Time (NZST) <br />
| +12 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23 || 00 || 01 || 02 || 03 || 04 || 05 || 06 || 07 || 08 || 09 || 10 || 11<br />
|-<br />
! Time (IST) <br />
| +5:30 || 05:30 || 06:30 || 07:30 || 08:30 || 09:30 || 10:30 || 11:30 || 12:30 || 13:30 || 14:30 || 15:30 || 16:30 || 17:30 || 18:30 || 19:30 || 20:30 || 21:30 || 22:30 || 23:30 || 00:30 || 01:30 || 02:30 || 03:30 || 04:30<br />
|-<br />
! Time (BST) <br />
| +1 || 01 || 02 || 03 || 04 || 05 || 06 || 07 || 08 || 09 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23 || 00<br />
|-<br />
! Time (PDT) <br />
| -7 || 17 || 18 || 19 || 20 || 21 || 22 || 23 || 00 || 01 || 02 || 03 || 04 || 05 || 06 || 07 || 08 || 09 || 10 || 11 || 12 || 13 || 14 || 15 || 16<br />
|-<br />
! Time (UTC) || Offset|| 00 || 01 || 02 || 03 || 04 || 05 || 06 || 07 || 08 || 09 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23 <br />
|-<br />
| Name || Offset || || || || || || || || || || || || || || || || || || || || || || || || <br />
|-<br />
| N.Copa || +2 || || || || || || || ?? || XX || XX || XX || XX || XX || XX || XX || ?? || || || || || || || || || <br />
| T.Teräs || +3 || || || || || || ?? || XX || XX || XX || XX || XX || XX || XX || ?? || || || || || || || || || || <br />
|}<br />
<br />
'''Legends:''' <br><br />
'''XX''' means "very likely";<br />
'''??''' means "some likelihood".<br />
<br />
'''Devs'''<br />
* N.Copa (GMT +2) (Monday-Friday)<br />
* T.Teräs (GMT +3) (Monday-Friday)<br />
<br />
'''Infra Admins'''<br />
* N.Copa (GMT +2) (Monday-Friday)<br />
* Clandmeter (GMT +2)<br />
<br />
'''IRC Ops'''<br />
* N.Copa (GMT +2) (Monday-Friday)<br />
* Clandmeter (GMT +2)<br />
* Kanini<br />
* Rnalrd<br />
<br />
'''IRC channels affecting AlpineLinux development:'''<br />
# Freenode<br />
## #musl<br />
## #busybox<br />
## #uclibc</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:Contribute&diff=9618Alpine Linux:Contribute2013-12-11T07:49:06Z<p>Fabled: </p>
<hr />
<div>[[Image:kuser.png|left|link=]]<br />
__NOTOC__<br />
There are many ways that ''you'' can contribute. Whether you are a normal user, a geek, or a hardcore developer, the one and most important thing you can do is to actually '''use''' Alpine Linux.<br />
<br />
The list below explains some of the ways that you can contribute.<br />
<br />
<br />
= Contribute quality =<br />
* Submit '''[http://bugs.alpinelinux.org/ bug reports]'''. New issues can also be created by emailing alpine (at) bugs (dot) alpinelinux (dot) org.<br />
* Suggest new '''[[Project:Ideas|features/ideas]]''' and '''[[FAQ#Can_you_build_an_apk_package_for_....3F|packages]]'''<br />
* Submit new '''[[Creating_an_Alpine_package|packages]]''' that you've created, or '''[[Development using git|patches]]''' to existing packages. For more information about developing on Alpine Linux, read our [[Developer Documentation]].<br />
* Submit '''[[Special:NewFiles|artwork]]''' (icons, backgrounds, logos)<br />
* Correct '''spelling and grammar''' mistakes in the documentation<br />
* Help '''[[Project:Wiki_maintenance|maintain]]''' the wiki<br />
<br />
= Contribute documentation =<br />
* Help write good '''[[Tutorials_and_Howtos|documentation]]'''<br />
* '''Translate''' the documentation (and program texts) into another language<br />
* '''Proofread''' existing documentation, follow the examples, and make corrections<br />
* Create diagrams, '''screenshots''', and graphics for the documentation<br />
* Develop style, formatting, spelling, and grammar conventions for documenters<br />
* Expand the '''[[Glossary]]''' of technical terms (so non-geeks can understand)<br />
* Convert documentation into more formats<br />
<br />
= Contribute support =<br />
* '''Answer questions''' on the wiki, [[mailing lists]], and [[IRC]] channels<br />
* Contribute to (or start) an online support group<br />
* Write '''HOWTOs''' and post them in the [[Tutorials and Howtos]] or your own blog<br />
<br />
= Contribute publicity =<br />
{{Tip|As Alpine Linux gets more popular, there will be more people wanting to contribute.}}<br />
* '''[[Project:Listings|Link to]]''' the Alpine Linux web site<br />
* Write '''reviews'''<br />
* Convince people to choose Open Source products when possible<br />
* Write about new ways of using an Open Source application<br />
<br />
= Contribute appreciation =<br />
* Be '''polite''' when reporting bugs or asking for new features; after all, the developers have no obligation to do it<br />
* '''Express''' your appreciation to developers (through [http://wiki.alpinelinux.org/wiki/Mailing_lists e-mail], [http://bugs.alpinelinux.org/ bug reports], and [http://wiki.alpinelinux.org/wiki/IRC IRC])<br />
* Send the programmers post cards<br />
* Give the project or [[Alpine_Linux:Developers|a developer a donation/gift]] (some have wish lists for this)</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:Contribute&diff=9617Alpine Linux:Contribute2013-12-11T07:47:50Z<p>Fabled: </p>
<hr />
<div>[[Image:kuser.png|left|link=]]<br />
__NOTOC__<br />
There are many ways that ''you'' can contribute. Whether you are a normal user, a geek, or a hardcore developer, the one and most important thing you can do is to actually '''use''' Alpine Linux.<br />
<br />
The list below explains some of the ways that you can contribute.<br />
<br />
<br />
= Contribute quality =<br />
* Submit '''[http://bugs.alpinelinux.org/ bug reports]'''. New issues can also be created by emailing alpine (at) bugs (dot) alpinelinux (dot) org.<br />
* Suggest new '''[[Project:Ideas|features/ideas]]''' and '''[[FAQ#Can_you_build_an_apk_package_for_....3F|packages]]'''<br />
* Submit new '''[[Creating_an_Alpine_package|packages]]''' that you've created, or '''[[Development using git|patches]]''' to existing packages. For more information about developing on Alpine Linux, read our [[Developer Documentation]].<br />
* Submit '''[[Special:NewFiles|artwork]]''' (icons, backgrounds, logos)<br />
* Correct '''spelling and grammar''' mistakes in the documentation<br />
* Help '''[[Project:Wiki_maintenance|maintain]]''' the wiki<br />
<br />
= Contribute documentation =<br />
* Help write good '''[[Tutorials_and_Howtos|documentation]]'''<br />
* '''Translate''' the documentation (and program texts) into another language<br />
* '''Proofread''' existing documentation, follow the examples, and make corrections<br />
* Create diagrams, '''screenshots''', and graphics for the documentation<br />
* Develop style, formatting, spelling, and grammar conventions for documenters<br />
* Expand the '''[[Glossary]]''' of technical terms (so non-geeks can understand)<br />
* Convert documentation into more formats<br />
<br />
= Contribute support =<br />
* '''Answer questions''' on the wiki, [[mailing lists]], and [[IRC]] channels<br />
* Contribute to (or start) an online support group<br />
* Write '''HOWTOs''' and post them in the [[Tutorials and Howtos]] or your own blog<br />
<br />
= Contribute publicity =<br />
{{Tip|As Alpine Linux gets more popular, there will be more people wanting to contribute.}}<br />
* '''[[Project:Listings|Link to]]''' the Alpine Linux web site<br />
* Write '''reviews'''<br />
* Convince people to choose Open Source products when possible<br />
* Write about new ways of using an Open Source application<br />
<br />
= Contribute appreciation =<br />
* Be '''polite''' when reporting bugs or asking for new features; after all, the developers have no obligation to do it<br />
* '''Express''' your appreciation to developers (through [[Mailing_lists|e-mail]], [http://bugs.alpinelinux.org/ bug reports], and [[IRC]])<br />
* Send the programmers post cards<br />
* Give a project or developer a gift (some have wish lists for this)</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:Contribute&diff=9616Alpine Linux:Contribute2013-12-11T07:46:50Z<p>Fabled: </p>
<hr />
<div>[[Image:kuser.png|left|link=]]<br />
__NOTOC__<br />
There are many ways that ''you'' can contribute. Whether you are a normal user, a geek, or a hardcore developer, the one and most important thing you can do is to actually '''use''' Alpine Linux.<br />
<br />
The list below explains some of the ways that you can contribute.<br />
<br />
<br />
= Contribute quality =<br />
* Submit '''[http://bugs.alpinelinux.org/ bug reports]'''. New issues can also be created by emailing alpine (at) bugs (dot) alpinelinux (dot) org.<br />
* Suggest new '''[[Project:Ideas|features/ideas]]''' and '''[[FAQ#Can_you_build_an_apk_package_for_....3F|packages]]'''<br />
* Submit new '''[[Creating_an_Alpine_package|packages]]''' that you've created, or '''[[Development using git|patches]]''' to existing packages. For more information about developing on Alpine Linux, read our [[Developer Documentation]].<br />
* Submit '''[[Special:NewFiles|artwork]]''' (icons, backgrounds, logos)<br />
* Correct '''spelling and grammar''' mistakes in the documentation<br />
* Help '''[[Project:Wiki_maintenance|maintain]]''' the wiki<br />
<br />
= Contribute documentation =<br />
* Help write good '''[[Tutorials_and_Howtos|documentation]]'''<br />
* '''Translate''' the documentation (and program texts) into another language<br />
* '''Proofread''' existing documentation, follow the examples, and make corrections<br />
* Create diagrams, '''screenshots''', and graphics for the documentation<br />
* Develop style, formatting, spelling, and grammar conventions for documenters<br />
* Expand the '''[[Glossary]]''' of technical terms (so non-geeks can understand)<br />
* Convert documentation into more formats<br />
<br />
= Contribute support =<br />
* '''Answer questions''' on the wiki, [[mailing lists]], and [[IRC]] channels<br />
* Contribute to (or start) an online support group<br />
* Write '''HOWTOs''' and post them in the [[Tutorials and Howtos]] or your own blog<br />
<br />
= Contribute publicity =<br />
{{Tip|As Alpine Linux gets more popular, there will be more people wanting to contribute.}}<br />
* '''[[Project:Listings|Link to]]''' the Alpine Linux web site<br />
* Write '''reviews'''<br />
* Convince people to choose Open Source products when possible<br />
* Write about new ways of using an Open Source application<br />
<br />
= Contribute appreciation =<br />
* Be '''polite''' when reporting bugs or asking for new features; after all, the developers have no obligation to do it<br />
* '''Express''' your appreciation to developers (through [http://wiki.alpinelinux.org/wiki/Mailing_lists e-mail], [http://bugs.alpinelinux.org/ bug reports], and [http://wiki.alpinelinux.org/wiki/IRC IRC])<br />
* Send the programmers post cards<br />
* Give the project or [[Alpine_Linux:Developers|a developer a donation/gift]] (some have wish lists for this)</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:Developers&diff=9615Alpine Linux:Developers2013-12-11T07:42:07Z<p>Fabled: Protected "Alpine Linux:Developers": Contains information that should be modifiable by admins only ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))</p>
<hr />
<div>= Supporting Developers =<br />
<br />
Supporting developers CAN and WILL:<br />
* Encourage them to continue working on the project<br />
* Be a reward about something they did and you find useful<br />
* Remind that people care about the project<br />
* Books/etc can improve know-how of the project developers<br />
<br />
It does NOT:<br />
* Entitle you to get priority support<br />
* Entitle you to receive private support<br />
* Ensure that your feature request will get priority<br />
* Ensure that your feature request will be done<br />
<br />
== Timo Teräs ==<br />
<br />
Email: timo.teras@iki.fi<br />
<br />
Working mostly on:<br />
* apk-tools<br />
* ARM port, musl support<br />
* DMVPN: opennhrp, ipsec-tools, linux kernel ipsec support, openssl<br />
* kamailio, Asterisk, DAHDI, zaphfc<br />
<br />
Accepts:<br />
* Books on programming, algorithms and/or security (inquire if you need titles, or have something you can send)<br />
* Coffee and single malts (within EU to avoid import tax)<br />
* Paypal donations</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:Developers&diff=9614Alpine Linux:Developers2013-12-11T07:40:43Z<p>Fabled: Created page with "= Supporting Developers = Supporting developers CAN and WILL: * Encourage them to continue working on the project * Be a reward about something they did and you find useful *..."</p>
<hr />
<div>= Supporting Developers =<br />
<br />
Supporting developers CAN and WILL:<br />
* Encourage them to continue working on the project<br />
* Be a reward about something they did and you find useful<br />
* Remind that people care about the project<br />
* Books/etc can improve know-how of the project developers<br />
<br />
It does NOT:<br />
* Entitle you to get priority support<br />
* Entitle you to receive private support<br />
* Ensure that your feature request will get priority<br />
* Ensure that your feature request will be done<br />
<br />
== Timo Teräs ==<br />
<br />
Email: timo.teras@iki.fi<br />
<br />
Working mostly on:<br />
* apk-tools<br />
* ARM port, musl support<br />
* DMVPN: opennhrp, ipsec-tools, linux kernel ipsec support, openssl<br />
* kamailio, Asterisk, DAHDI, zaphfc<br />
<br />
Accepts:<br />
* Books on programming, algorithms and/or security (inquire if you need titles, or have something you can send)<br />
* Coffee and single malts (within EU to avoid import tax)<br />
* Paypal donations</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=User:Fabled&diff=9362User:Fabled2013-09-25T09:17:42Z<p>Fabled: /* Bootstrapping new architectures */</p>
<hr />
<div>==Bootstrapping new architectures==<br />
<br />
abuild, since 2.17.0, more or less supports creating cross-compiler and cross-compiling.<br />
That still needs a little bit of polishing, same goes to my scripts.<br />
All my scripts and example configs are located at http://dev.alpinelinux.org/~tteras/bootstrap<br />
<br />
# Decide on toolchain name (triplet), and update gcc aport to add proper configure flags for it<br />
# Create cross compiler<br />
#* Write abuild-createcross-$ARCH.conf for it, and use createcross-toolchain.sh to create a cross-compiler.<br />
# Cross compile minimal system image<br />
#* With above generated toolchain, you can use crossbuild-alpine-bootstrap.sh to create the minimal image.<br />
# Setup new box<br />
#* If running on new hardware, you also need to prepare kernel images, initramfs and modloop to create the initial bootimage.<br />
#* If running as vserver guest, you can just install the .apks from previous step.<br />
#* Setup builder.</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=User:Fabled&diff=9149User:Fabled2013-07-05T14:52:57Z<p>Fabled: /* Bootstrapping new architectures */</p>
<hr />
<div>==Bootstrapping new architectures==<br />
<br />
# Create cross compiler<br />
#* I decided to use crosstool-ng as build cross-compiler is tricky<br />
#** Wrote patch to support musl as C-library<br />
#** Wrote patch to enable building toolchains with PIE as default<br />
#* Create crosstool-ng .config, [http://dev.alpinelinux.org/~tteras/crosstool-ng-alpine-arm.config My ARM config]<br />
#** NOTE: for some reason binutils gold linker crashes when compiling gcc, so needed to keep it disabled.<br />
#* run 'ct-ng build' to build the new tool chain<br />
# Cross compile minimal system image<br />
#* abuild and core APKBUILDs modified to support cross building<br />
#* Wrote [http://dev.alpinelinux.org/~tteras/crossbuild-alpine-bootstrap.sh crossbuild-alpine-bootstrap.sh] to invoke abuild with cross-compiler<br />
#* Cross-building script uses abuild.conf overlay to define new target [http://dev.alpinelinux.org/~tteras/abuild-cross-armel.conf My ARM overlay]<br />
#* This produces all core .apk files for the target platform that can be used to boot qemu, qemu-user target or native hardware<br />
# Rebuild system and setup builder<br />
#* Decided to use qemu-user for ARM as it the fastest option available for us (no fast native hardware yet)<br />
#* Setup qemu-arm support for target chroot<br />
#*# apk --arch x86 --root $chroot/qemu --initdb add qemu-arm<br />
#*# cd $chroot/lib ; ln -s ../qemu/lib/ld-* .<br />
#*# ldconfig -r $chroot /qemu/lib /qemu/usr/lib<br />
#*# create binfmt_misc mapping<br />
#*# seems qemu-user needs to access /proc/sys/vm/mmap_min_addr or it does not work<br />
#* Setup target main chroot<br />
#** apk --arch arm --root $chroot --initdb add alpine-base build-base<br />
#** enter chroot</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=User:Fabled&diff=9148User:Fabled2013-07-05T14:44:35Z<p>Fabled: Created page with "==Bootstrapping new architectures== # Create cross compiler #* I decided to use crosstool-ng as build cross-compiler is tricky #** Wrote patch to support musl as C-library #*..."</p>
<hr />
<div>==Bootstrapping new architectures==<br />
<br />
# Create cross compiler<br />
#* I decided to use crosstool-ng as build cross-compiler is tricky<br />
#** Wrote patch to support musl as C-library<br />
#** Wrote patch to enable building toolchains with PIE as default<br />
#* TODO: post crosstool-ng .config used (TODO)<br />
#** NOTE: for some reason binutils gold linker crashes when compiling gcc, so needed to keep it disabled.<br />
# Cross compile minimal system image<br />
#* abuild and core APKBUILDs modified to support cross building<br />
#* Wrote crossbuild-alpine-bootstrap.sh to invoke abuild with cross-compiler<br />
#* Cross-building script uses abuild.conf overlay to define new target<br />
#* TODO: post crossbuild-alpine-bootstrap.sh and abuild-cross-armel.conf<br />
#* This produces all core .apk files for the target platform that can be used to boot qemu, qemu-user target or native hardware<br />
# Rebuild system and setup builder<br />
#* Decided to use qemu-user for ARM as it the fastest option available for us (no fast native hardware yet)<br />
#* Setup qemu-arm support for target chroot<br />
#*# apk --arch x86 --root $chroot/qemu --initdb add qemu-arm<br />
#*# cd $chroot/lib ; ln -s ../qemu/lib/ld-* .<br />
#*# ldconfig -r $chroot /qemu/lib /qemu/usr/lib<br />
#*# create binfmt_misc mapping<br />
#*# seems qemu-user needs to access /proc/sys/vm/mmap_min_addr or it does not work<br />
#* Setup target main chroot<br />
#** apk --arch arm --root $chroot --initdb add alpine-base build-base<br />
#** enter chroot</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=APKBUILD_Reference&diff=9141APKBUILD Reference2013-06-20T13:58:27Z<p>Fabled: </p>
<hr />
<div>APKBUILDs are the scripts that are created in order to build Alpine packages using the [[abuild]] tool.<br />
<br />
This page is intended to serve as a reference for creating APKBUILDs; if this is your first time creating a package for Alpine Linux, please see [[Creating an Alpine package]].<br />
<br />
= Legend =<br />
The following notes will assist you in understanding this document.<br />
<br />
In description text:<br />
* If a variable is not prefixed with a ''$'', it will be represented by italics (i.e., ''srcdir'' ).<br />
* Functions will also be represented by italics, but will also end with a pair of parentheses (i.e., ''build()'' ).<br />
* Shell commands will be represented <code>like this</code>.<br />
<br />
<br />
= Variables =<br />
{{Note|Variables that contain a path (e.g. ''$srcdir'' and ''$pkgdir'') should always be quoted using double quotes (i.e., ''"$srcdir"''). This is done to prevent things from breaking, should the user have the APKBUILD in a directory path that contains spaces.}}<br />
{{Note|All arbitrary variable and function names should be prefixed with an underscore character ( _ ) to avoid name clashes with the internals of abuild (for example, ''_builddir'').}}<br />
<br />
== abuild-defined variables ==<br />
The following variables are defined by abuild:<br />
<br />
==== startdir ====<br />
: The directory where the APKBUILD script is.<br />
==== srcdir ====<br />
: The directory where sources, from the ''source'' variable, are downloaded to and unpacked to.<br />
==== pkgdir ====<br />
: This directory should receive the files for the main package. For example, a normal [http://en.wikipedia.org/wiki/GNU_build_system autotools] package would have <code>make DESTDIR="$pkgdir" install</code> in the ''package()'' function.<br />
==== subpkgdir ====<br />
: This directory should receive the files for a subpackage. This variable should only be used from subpackage functions.<br />
<br />
{{Tip|''_builddir'' is not defined by abuild; instead this should be defined by hand when it's needed. You might define it as:<br />
<br />
_builddir{{=}}"$srcdir/$pkgname-$pkgver"<br />
}}<br />
<br />
== User-defined variables ==<br />
The following variables should be defined by the user:<br />
==== arch ====<br />
: Package architecture(s) to build for. Can be one of: '''x86, x86_64, all''', or '''noarch''', where '''all''' means all architectures, and '''noarch''' means it's architecture-independent (e.g., a pure-python package).<br />
: {{Tip|To determine if your APKBUILD can use '''noarch''': First specify '''all''' and then build the package by executing <code>abuild -r</code>. Watch the output towards the end for warnings saying that '''noarch''' can be used. If the main package and all subpackages, if you have any subpackages, give a warning saying that '''noarch''' can be used, then you can use '''noarch'''.}}<br />
==== depends ====<br />
: Run-time dependency package(s) that are not shared-object dependencies. Shared objects dependencies are auto-detected and should not be specified here.<br />
==== depends_dev ====<br />
: Run-time dependency package(s) for the '''$pkgname-dev''' subpackage.<br />
<br />
: {{Note|From ncopa on IRC: To find out if you need to add a package to depends_dev have a look at *requires* in usr/lib/pkgconfig/*.pc. With libtool it gets more complicated, but we should delete the .la files. Also check if there are any /usr/bin/*-configure #!/bin/bash #!/usr/bin/perl or Python. Sometimes scripts or similar are generated at build time (i.e autoconf automake) then you normally don't need add those to depends_dev. You can also just add all -dev makedepends to depends_dev but it will slow the build process a little bit (more build dependencies).}}<br />
<br />
==== install ====<br />
: There are 6 different types of install scripts. Install scripts are named '''$pkgname.action''', where '''action''' can be: '''pre-install, post-install, pre-upgrade, post-upgrade, pre-deinstall''', or '''post-deinstall'''. For example, if ''pkgname'' is set to '''mypackage''' and ''install'' is set to '''$pkgname.post-install''', then a script named '''mypackage.post-install''' must exist along-side the APKBUILD.<br />
<br />
: First, a few notes regarding install scripts:<br />
<blockquote>{{Note|When using install scripts, ''$install'' should be included in ''source'' so that checksums can be generated and used for the install scripts specified in ''install''. For example:<br />
<pre><br />
install="$pkgname.pre-install $pkgname.post-install"<br />
source="http://....<br />
$install"<br />
</pre>}}<br />
{{Note|Always use <code>/bin/sh</code> for the command-line interpreter on the [http://en.wikipedia.org/wiki/Shebang_%28Unix%29 shebang line] of your install scripts.}}</blockquote><br />
<br />
The following are the different types of install scripts in detail:<br />
<br />
===== $pkgname.pre-install =====<br />
: This script is executed ''before installing'' the package. Typical use is when the package needs a user/group to be created. For example:<br />
<blockquote><pre><br />
#!/bin/sh<br />
adduser -H -s /bin/false -D clamav 2>/dev/null<br />
exit 0<br />
</pre><br />
{{Note|If the script exits with a failure (e.g., if the user already exists), the package will not be installed and <code>apk</code> will exit with failure, hence the <code>exit 0</code> at the end.}}</blockquote><br />
<br />
===== $pkgname.post-install =====<br />
: This script is executed ''after installing'' the package.<br />
<br />
===== $pkgname.pre-upgrade =====<br />
: This script is executed ''before upgrading'' the package.<br />
<br />
===== $pkgname.post-upgrade =====<br />
: This script is executed ''after upgrading'' the package.<br />
<br />
===== $pkgname.pre-deinstall =====<br />
: This script is executed ''before uninstalling'' the package.<br />
: {{Note|If the script exits with failure, <code>apk</code> will not uninstall the package.}}<br />
<br />
===== $pkgname.post-deinstall =====<br />
: This script is executed ''after uninstalling'' the package.<br />
<br />
==== license ====<br />
: License(s) for the package.<br />
==== makedepends ====<br />
: Build-time dependency package(s).<br />
==== md5sums ====<br />
: Checksums for the files/URLs listed in ''source''. The checksums are normally generated and updated by executing <code>abuild checksum</code> and should be the last item in the APKBUILD.<br />
==== options ====<br />
: Build-time options for the package. Can be: '''!strip''' - to avoid stripping symbols from binaries.<br />
==== pkgdesc ====<br />
: A brief, one-line description of what the package does.<br />
<br />
: Here's an example from the OpenSSH client package:<br />
: <pre>pkgdesc="Port of OpenBSD's free SSH release - client"</pre><br />
==== pkggroups ====<br />
: System group(s) to be created during build-time. System group(s) should also be created in the '''[[APKBUILD Reference#.24pkgname.pre-install|$pkgname.pre-install]]''' script, so that the system group(s) are also created prior to package installation for run-time use.<br />
==== pkgname ====<br />
: The name of the package. All letters should be lowercase.<br />
: {{Note|When creating an APKBUILD of a module or library for another package, we use some common package prefixes, such as: ''lua-'', ''perl-'', ''php-'', and ''py-''. Search aports for other common prefixes.}}<br />
<br />
==== pkgrel ====<br />
: Alpine package release number. Starts at 0 (zero). Always increment ''pkgrel'' when making updates to an aport; reset ''pkgrel'' to 0 (zero) when incrementing ''pkgver''.<br />
==== pkgusers ====<br />
: System user(s) to be created during build-time. System user(s) should also be created in the '''[[APKBUILD Reference#.24pkgname.pre-install|$pkgname.pre-install]]''' script, so that the system user(s) are also created prior to package installation for run-time use.<br />
==== pkgver ====<br />
: The version of the software being packaged.<br />
==== provides ====<br />
: Add documentation.<br />
==== replaces ====<br />
: Package(s) that this package replaces. This package will "take over" files owned by packages listed in the ''replaces'' variable. This is useful when files move from one sub-/package to another, or when a package gets renamed.<br />
==== source ====<br />
: The source variable is not only used to list the remote source files to fetch, it is also used to list the local files that abuild will need in order to build the apk. Examples of such local files include: init.d files, conf.d files, install files (see [[APKBUILD Reference#install|install variable]]), patches, and all other necessary files.<br />
<br />
: Here are few things to note:<br />
<br />
:* When you are finished adding local and/or remote files to ''source'', you can execute the following command to add their checksums to the APKBUILD file:<br />
:: {{Cmd|abuild checksum}}<br />
:: {{Note|When later updating the content of ''source'', or updating a file that is listed in ''source'', you must also update their checksums again with the same command.}}<br />
<br />
:* When the remote file is hosted at SourceForge, it's best to specify the special mirrors link used by SourceForge:<br />
:: <pre>http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz</pre><br />
:: (or similar depending on the package).<br />
<br />
:* You can set target filename (eg 'save as...') by prefixing the URI with ''filename::''. This is useful when the remote filename is not specified in the URI (ie, does not end in '/software-1.0.tar.gz'), such as:<br />
:: <pre>http://oss.example.org/?get=software&ver=1.0</pre><br />
:: or when the filename is braindead, like githubs' download tags:<br />
:: <pre>https://github.com/software/software/archive/v$pkgver.tar.gz</pre><br />
:: The above two examples needs a target filename prefix:<br />
:: <pre>software-$pkgver.tar.gz::<http://oss.example.org/?get=software&ver=$pkgver</pre><br />
:: and:<br />
:: <pre>software-$pkgver.tar.gz::https://github.com/software/software/archive/v$pkgver.tar.gz</pre><br />
<br />
:* abuild currently supports the following protocols for remote file retrieval:<br />
:** http<br />
:** https<br />
:** ftp<br />
<br />
:* abuild currently supports the following archive types/archive file extensions:<br />
:** .tar.gz / .tgz<br />
:** .tar.bz2<br />
:** .tar.lzma<br />
:** .tar.xz<br />
:** .zip<br />
<br />
==== subpackages ====<br />
: Subpackages built from this APKBUILD. abuild will parse this variable and try to find a subpackage split function. The split function must ''move'' files that do not belong in the main package, from ''$pkgdir'' to ''$subpkgdir''. Files and directories can also be ''copied'' from ''$startdir'' and ''$srcdir'' to ''$subpkgdir''.<br />
<br />
: The split function can be specified in 1 of 3 different methods:<br />
:# subpkgname:'''splitfunc'''<br />
:# $pkgname-'''splitfunc'''<br />
:# '''splitfunc'''<br />
<br />
: {{Note|Split function names '''cannot''' use hyphens; use the first method above if the subpackage name contains a hyphen (-) character, like this: ''subpkg-name:subpkg_name'', where <code>subpkg-name</code> is the name of the '''subpackage''' and <code>subpkg_name</code> is the name of the '''subpackage's split function'''.}}<br />
<br />
: {{Tip|For more information, see the [[APKBUILD_examples:Subpackages|Subpackages example]].}}<br />
<br />
==== triggers ====<br />
: Apk-tools can "monitor" directories and execute a trigger if any package installed/uninstalled any file in the monitored dir. The triggers are always execute after the apk action (install, uninstall, upgrade).<br />
<br />
: The triggers are specified in the format: ''scriptname''=''pathlist'' where ''scriptname'' is the (sub)package name + .trigger suffix and pathlist is : separated list of the dirs to monitor.<br />
<br />
: The '''triggers''' variable must include the triggers for subpackages too if they have any.<br />
<br />
: It is possible to use wildcards (*) in the dir list.<br />
<br />
==== url ====<br />
: The homepage for the package. This is to help users find upstream documentation and other information regarding the package.<br />
<br />
==== install_if ====<br />
:install_if can be used when a package needs to be installed when some packages are already installed or are in the dependency tree. As example we could take open-vm-tools. Currently it contains the userspace tools and separate packages for the kernel modules (grsec and vserver). When we install the userspace tools, apk should automatically install the correct kernel modules and will need to figure out for which kernel. This is where install_if jumps in. For any of the kernel modules package we would use:<br />
<br />
:<pre>install_if="linux-${_flavor}=${_kernelver} open-vm-tools"</pre><br />
<br />
:This will automatically install the package when the specified packages are installed or are in dependency tree.<br />
<br />
= Functions =<br />
{{Note|All functions should consider the current working directory as undefined, and should therefore use the [[APKBUILD Reference#abuild-defined_variables|abuild-defined directory variables]] to their advantage.}}<br />
<br />
== abuild-defined functions ==<br />
The following functions are provided by abuild and can be overridden:<br />
<br />
==== fetch() ====<br />
: Downloads remote sources listed in ''source'' to ''SRCDEST'' (''SRCDEST'' is configured in ''/etc/abuild.conf'') and creates symlinks in ''$srcdir''.<br />
==== unpack() ====<br />
: Unpacks .tgz, .tar.gz, .tar.bz2, .tar.lzma, .tar.xz, and .zip archives in ''$srcdir'' to ''$srcdir''.<br />
==== dev() ====<br />
: Subpackage function for the '''$pkgname-dev''' package. Without specifying a custom ''dev()'' function, abuild will call it's internal ''dev()'' function, which in turn calls ''default_dev()'', which will move ''"$pkgdir"/usr/include'', ''*.a'', ''*.la'' and similar files to ''$subpkgdir''.<br />
==== doc() ====<br />
: Subpackage function for the '''$pkgname-doc''' package. Without specifying a custom ''doc()'' function, abuild will call it's internal ''doc()'' function, which in turn calls ''default_doc()'', which will move ''"$pkgdir"/usr/share/doc'', ''"$pkgdir"/usr/share/man'' and similar to ''$subpkgdir''.<br />
<br />
== User-defined functions ==<br />
The following functions should be defined by the user: <br />
<br />
==== prepare() ====<br />
: '''''Optional''.''' Used for build preparation: patches, etc, should be applied here. This function is available for your convenience.<br />
==== build() ====<br />
: '''Required.''' This is the compilation stage. This function will be called as the current user (unless the ''package()'' function is missing - for compatibility reasons). If no compilation is needed, this function can contain a single line: <code>return 0</code><br />
==== package() ====<br />
: '''Required.''' This is the packaging stage. Here, the built application and support files should be installed into '''$pkgdir'''. If this is a metapackage, this function can contain a single line: <code>mkdir -p "$pkgdir" && return 0</code><br />
<br />
{{Note|Building in fakeroot will reduce performance for parallel builds dramatically. It is for this reason that we split the build and package process into two separate functions.}}<br />
<br />
<br />
= Examples =<br />
The [[APKBUILD examples]] page will assist you in understanding how to create an APKBUILD.<br />
<br />
[[Category:Development]]</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Alpine_Wall&diff=5986Alpine Wall2011-12-30T07:02:46Z<p>Fabled: fix typo</p>
<hr />
<div>This page outlines a plan for replacing the current Alpine firewall<br />
management solution, which is based on Shorewall version 3.<br />
<br />
== Proposal ==<br />
<br />
We evaluated serveral existing open source projects, none of which<br />
satisfied our demanding taste. The existing solutions are either too<br />
tied to specific (router) distributions, targeted to home users (with<br />
too many assumptions built-in), or depedent on bloated frameworks<br />
(usually Perl). Moreover, we would like to keep management of firewall<br />
settings and activation of such settings as two separate workflows,<br />
which would facilitate centralized management of firewall rules.<br />
<br />
As no readily available solution was found, the proposal is to<br />
implement a new management framework for <code>iptables</code>, which<br />
would integrate with the<br />
[[Alpine Configuration Framework Design|Alpine Configuration Framework]]<br />
(ACF). The framework is hereafter referred to as the Alpine Linux<br />
Firewall (ALF).<br />
<br />
== Design ==<br />
<br />
ALF would consist of three major components: data model, front-end,<br />
and back-end. It also implements a plug-in architecture, which allows<br />
extending the data model and functionality, in order to simplify<br />
common organization-specific administrative tasks.<br />
<br />
The '''data model''' would describe the firewall configuration using<br />
concepts and terminology that is roughly compatible with Shorewall. It<br />
would also borrow some useful concepts from other firewall solutions<br />
we evaluated, such as the Service concept as defined in the<br />
[http://www.turtlefirewall.com/manual-en/x161.html Turtle Firewall]<br />
(but generalized a bit). ALF plug-ins can contain schema extension<br />
modules augmenting the basic model provided by the framework.<br />
<br />
The '''back-end''' is responsible for translating the model's data<br />
into configuration files, most notably the files that can be read by<br />
<code>iptables-restore</code> and<br />
<code>ip6tables-restore</code>. Moreover, it can produce files into<br />
e.g. <code>/etc/modprobe.d</code> and <code>/etc/sysctl.d</code> if<br />
necessary. When a plug-in extends the data model, it must also provide<br />
a back-end module that interprets model extension and translates the<br />
data into <code>iptables</code> and other rules. The framework<br />
includes a module for interpreting the base model. The framework is<br />
responsible for ordering and aggregating the results produced by all<br />
modules into actual configuration files.<br />
<br />
The '''front-end''' is essentially an ACF module which allows editing<br />
the data model and activating the changes with the help of the<br />
back-end. The front-end implements also a fallback mechanism that<br />
prevents the operator from locking himself out by a faulty<br />
configuration. The configuration data is stored in text files which<br />
can be directly edited. The front-end provides a command line tool for<br />
validating and activating the configuration after manual changes.<br />
<br />
== Base Model ==<br />
<br />
The basic data model could roughly look like as follows:<br />
<br />
;Zone<br />
; <code>interface*, subnet*</code><br />
;Service<br />
; <code>(protocol, port*)+</code><br />
;Forwarding policy<br />
; <code>Zone:in, Zone:out, accept/reject/drop, masq_on/masq_off</code><br />
;Filtering rule<br />
; <code>Zone:in, Zone:out, Service, accept/reject/drop, conn_limit?, flow_limit?</code><br />
;NAT rule<br />
; <code>snat/dnat, Zone:in, Zone:out, Service, ip4_range, port_range?</code><br />
<br />
Subnets in zone definitions can be declared using IPv4/IPv6 addresses<br />
(CIDR notation) or domain names. A domain name can resolve to one or<br />
more IP addresses.<br />
<br />
== Implementation Considerations ==<br />
<br />
The data model should preferably be based on some existing format,<br />
such as JSON, XML, or YAML. In order to allow extensions to the data<br />
model, ALF must define some kind of schema language. This language<br />
would embed the necessary information the front-end needs to<br />
automatically generate a user interface for the extension. For<br />
example, the help texts shown to the user would be placed in the<br />
schema modules.<br />
<br />
Ideally, the base model would be described using the very same<br />
language as the model extensions, but it would impose quite demanding<br />
requirements on the language, e.g. support for complex data types. If<br />
we select this approach and model the data using XML, we could use XML<br />
Schema as the basis. There is also an (expired) Internet Draft on<br />
[http://tools.ietf.org/html/draft-zyp-json-schema-03 JSON Schema], but<br />
there seems to be no existing validator implementation in C or Lua.<br />
<br />
Even though elegant from architecture point of view, it is unlikely<br />
that support for complex data types would be required by typical<br />
extensions. In most cases, a set of global variables of primitive<br />
types would suffice. Therefore, we could just use a very simple<br />
language for declaring such variables or implement support for a<br />
limited subset of some well-known schema language. In this<br />
alternative, the base model would not be described using this language<br />
but rather hard-coded into the front-end.<br />
<br />
The back-end modules are responsible for translating the configuration<br />
data into configuration file fragments. As regards their<br />
implementation, we have two alternatives. The first alternative is to<br />
implement them as Lua functions invoked by the framework in a defined<br />
way. The framework would provide a library that allows the said<br />
functions to access the data model, and also otherwise assists in<br />
their implementation. The functions would report the results back to<br />
the framework, which finally would translate them into target files.<br />
<br />
In the second alternative, the back-end modules would be implemented<br />
using a template language rather than a general-purpose programming<br />
language. An example of a firewall-related template language is<br />
[http://ferm.foo-projects.org/download/2.1/ferm.html ferm], which<br />
unfortunately is implemented in Perl. Ferm also lacks certain<br />
capabilities required to implement e.g. the Zone and Service concepts<br />
conveniently. However, we could introduce a new template language that<br />
would better suit our purposes. Such a language would eliminate some<br />
redundancy from the back-end modules which necessarily comes with the<br />
use of a general-purpose language. On the other hand, developing and<br />
maintaining such a language would take effort and might make the<br />
framework initially more difficult to use.<br />
<br />
The back-end will contain functionality for domain name resolution. In<br />
the data model, hosts of groups thereof can be identified by their<br />
domain names. The back-end will resolve these to IP addresses, which<br />
will be stored in the target files, so there will be no need to<br />
resolve anything when activating the configuration during boot.</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Request_Tracker&diff=5466Request Tracker2011-06-29T13:19:20Z<p>Fabled: </p>
<hr />
<div>This guide will get Request Tracker 4 setup working, with support for emails sent to an mlmmj mailing list to be inserted first into the ticket system, then sent on to mlmmj. It is intended for a HelpDesk-type deployment. This howto assumes that you have a working postfix setup already. <br /><br />
<br />
Note: This document has been tested on Alpine Linux 2.2.2, but contains some packages which are currently in the [[http://wiki.alpinelinux.org/wiki/Upgrading_to_Edge edge/testing repository]].<br /><br />
Note: Use a computer with at least 512MB of RAM.<br /><br />
<br />
== Initial package installation and setup ==<br />
<br />
* add edge/main repository to /etc/apk/repositories<br />
{{Cmd|printf "http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories<br />
apk update}}<br />
* {{Cmd|apk add lighttpd fcgi postgresql rt4 postfix postfix-pcre mlmmj}}<br />
* Edit ''/etc/lighttpd/lighttpd.conf'' and enable fastcgi<br />
* {{Cmd|/etc/init.d/postgresql setup}}<br />
* {{Cmd|/etc/init.d/postgresql start}}<br />
* {{Cmd|su - postgres -c "createuser -P"}}<br />
Enter name of role to add: '''rt_user'''<br />
Enter password for new role: '''''rtpass'''''<br />
Enter it again: '''''rtpass'''''<br />
Shall the new role be a superuser? (y/n) '''n'''<br />
Shall the new role be allowed to create databases? (y/n) '''y'''<br />
Shall the new role be allowed to create more new roles? (y/n) '''y'''<br />
<br />
== Setup RT4 environment ==<br />
* {{Cmd|cp /etc/rt4/RT_Config.pm /etc/rt4/RT_SiteConfig.pm}}<br />
* {{Cmd|chmod 644 /etc/rt4/RT_SiteConfig.pm}}<br />
* Setup RT_SiteConfig.pm with proper queue name, link to your organization's homepage, support postgresql, set outbound email defaults.<br />
** /etc/rt4/RT_SiteConfig.pm:<br />
Set($rtname, 'support');<br />
Set($Organization, 'example.com');<br />
Set($WebDomain, 'fqdn.in.example.com');<br />
Set($OwnerEmail, 'RTAdmin@example.com');<br />
Set($LogoLinkURL, 'http://www.example.com/');<br />
Set($LogoAltText, 'Example.com Support');<br />
# Set($LogoURL, '');<br />
<br />
Set($DatabaseType, 'Pg');<br />
Set($DatabaseUser, 'rt_user');<br />
Set($DatabasePassword, 'rtpass');<br />
Set($DatabaseName, 'support_rt');<br />
<br />
Set($LogToSyslog, 'warning');<br />
<br />
Set($MailCommand, 'sendmailpipe');<br />
Set($SendmailArguments , '-fpostmaster@example.com -oi -t');<br />
Set($ParseNewMessageForTicketCCs, 1);<br />
Set($UseTransactionBatch, 1);<br />
Set($CorrespondAddress, 'support@example.com');<br />
Set($CommentAddress, 'support@example.com');<br />
Set($RecordOutgoingEmail, 0);<br />
Set($ForwardFromUser, 1);<br />
Set($SetOutgoingMailFrom, 1);<br />
Set($FriendlyFromLineFormat, '"%s" <%s>');<br />
* {{Cmd|/usr/sbin/rt-setup-database --action init}}<br />
* {{Cmd|rt-server}}<br />
* Test and make sure that you can access rt using the built-in webserver first.<br />
** Tools -> Config -> Users -> Create<br />
** Username: Support-lists, Email: support-lists@example.com, etc -> Create<br />
** Tools -> Config -> Groups -> Create<br />
** Name: Support Users, etc -> Create<br />
** Tools -> Configuration -> Queues -> Create... Give it a name like 'support', and set support-list@example.com to be both reply and comment addresses. Remember the name 'support' which you'll use in the next sections (including the email address)<br />
<br />
== Modify Postfix Configuration for RT4 and mlmmj ==<br />
<br />
* adduser mlmmj<br />
* mkdir /var/spool/mlmmj<br />
* mlmmj-make-ml.sh -L support-list<br />
* Support sending bcc to list<br />
** touch /var/spool/mlmmj/support-list/control/tocc<br />
* Allow support@example.com to send to list without being subscribed to it<br />
** mlmmj-sub -L /var/spool/mlmmj/support-list -a support@example.com -n<br />
* Add to ''/etc/postfix/master.cf'':<br />
rt4 unix - n n - - pipe flags=DORhu user=lighttpd argv=/usr/bin/rt-mailgate --queue $nexthop --action correspond --url http://fqdn.in.example.com/<br />
mlmmj unix - n n - - pipe flags=DORhu user=mlmmj argv=/usr/bin/mlmmj-recieve -F -L /var/spool/mlmmj/$nexthop<br />
* Add to ''/etc/postfix/main.cf'':<br />
myhostname = mx1.example.com<br />
mydomain = mx1.example.com<br />
relay_domains = example.com<br />
recipient_delimiter = +<br />
transport_maps = hash:/etc/postfix/transport<br />
* Create ''/etc/postfix/transport'' (and run "postmap transport" after editing):<br />
support@example.com rt4:support<br />
support-list@example.com mlmmj:support-list<br />
postmaster@example.com local:<br />
example.com error:No such mailbox.<br />
* Edit ''/etc/postfix/aliases'' for the postmaster alias (and run "newaliases")<br />
* Allow users to create tickets by email by checking all General Rights for group Everyone in Tools -> Configuration -> Global -> Group Rights<br />
<br />
== Lighttpd configuration ==<br />
<br />
* Stop rt-server<br />
* /etc/lightttpd/lighttpd.conf:<br />
include "rt4.conf"<br />
* /etc/lighttpd/rt4.conf:<br />
server.modules += ("mod_fastcgi")<br />
<br />
$HTTP["host"] == "fqdn.in.example.com" {<br />
server.document-root = "/usr/share/rt4/html"<br />
index.file-names = ( "index.html" ) <br />
<br />
fastcgi.server = ( "/" =><br />
((<br />
"bin-path" => "/usr/sbin/rt-server.fcgi",<br />
"socket" => "/var/run/lighttpd/rt4.socket",<br />
"check-local" => "disable",<br />
"fix-root-scriptname" => "enable"<br />
)),<br />
)<br />
}<br />
* {{Cmd|/etc/init.d/lighttpd start}}<br />
<br />
== Final RT4 configuration ==<br />
<br />
* Login to http://fqdn.in.example.com (your RT server)<br />
** Add AdminCC for Support Users to support queue<br />
** New template called 'Support Users Correspondence' (anyone you add to Support Users group will have their outbound email rewritten to 'Support Team' instead of their realname<br />
{ <br />
my $output = undef;<br />
my $groups = $Transaction->CreatorObj->OwnGroups();<br />
while( my $group = $groups->Next ) {<br />
my $queue = $Ticket->QueueObj;<br />
my $realname = $queue->Description;<br />
my $email = $queue->CorrespondAddress || RT->Config->Get('CorrespondAddress');<br />
$output = 'From: "' . $realname . '" <' . $email . '>' if $group->Name eq 'Support Team';<br />
}<br />
$output;<br />
}<br />
RT-Attach-Message: yes <br />
<br />
{$Transaction->Content()}<br />
* Test that inbound and outbound emails, creating tickets by email and replying to ticket emails works as expected:<br />
** Emails from end-users should be sent to support@example.com<br />
** Those emails are either created as a new ticket in RT, or if the subject line contains a ticket ID, then it's inserted into the appropriate ticket<br />
** Ticket comments and correspondence will be sent on to support-list@example.com, which is an mlmmj list, which can be subscribed to using support-list+subscribe@example.com<br />
** The RT4 web interface is available at http://fqdn.in.example.com</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3062Replacing non-Alpine Linux with Alpine remotely2009-09-19T07:06:34Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Use alpine-1.9.0_rc4 or later.<br />
<br />
'''CAUTION: Practice on a computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
Prerequisites:<br />
* SSH access to the remote box (needs to have SSH server running)<br />
* Alpine Linux supported hardware<br />
* Adventurous mind<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/{default,boot,sysinit,shutdown} root/.ssh<br />
<br />
You can also use default Alpine configuration files. In this case you should use ssh key to authorize yourself (as root password is empty, and ssh has empty passwords disabled).<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
Copy over your ssh authorized_keys:<br />
cp -a /root/.ssh/authorized_keys root/.ssh<br />
<br />
Create /etc/network/interfaces with network configuration (unless it was previously copied over). It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
'''Make sure there is no whitespace at end of lines''' in interfaces file. Busybox ifup is very picky.<br />
<br />
And create /etc/resolv.conf with the nameserver configuratio like:<br />
nameserver dns.ip.ad.dr<br />
<br />
Create the apk world (var/lib/apk/world) with essential packages:<br />
mkdir -p var/lib/apk<br />
echo "alpine-base iproute2 openssh" > var/lib/apk/world<br />
<br />
'''Double check the IP configuration and ssh keys.'''<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/{hwclock,modules,sysctl,hostname,bootmisc,syslog} etc/runlevels/boot/<br />
ln -s /etc/init.d/{devfs,dmesg,mdev,hwdrivers} etc/runlevels/sysinit/<br />
ln -s /etc/init.d/{networking,sshd} etc/runlevels/default/<br />
ln -s /etc/init.d/{mount-ro,killprocs,savecache} etc/runlevels/shutdown/<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
Verify finally the overlay with "tar tzf" to see that it contains everything in proper places.<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) and hda2 (/) with both having ext3 filesystems. If you don't have ext3 on / or /boot, then you might be able to disable swap and reformat the swap partition as ext3 and use that.<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda # on some older systems its /usr/lib/syslinux/mbr.bin<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type; kernel and initrd are relative to partition root):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /grsec<br />
append initrd=/grsec.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==<br />
<br />
Reboot the box. And wait for it to come alive again. If it doesn't, tough luck. So dry practice with local box, with as identical hardware as possible.<br />
<br />
Once back in the box, we are running in Alpine Linux from tmpfs. So just do a regular installation of Alpine from network via ssh connection.<br />
<br />
Edit /etc/apk/repositories to contain your favorite Alpine mirror or just:<br />
http://dl-3.alpinelinux.org/alpine/v1.9/packages/main<br />
<br />
Finally run:<br />
/etc/init.d/modloop stop<br />
apk update<br />
setup-disk<br />
<br />
After hard disk setup is complete, '''copy ssh_authorized_keys to hard disk'''.<br />
<br />
Reboot once more, and you have the server with native Alpine hard disk installation.</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3061Replacing non-Alpine Linux with Alpine remotely2009-09-19T07:03:50Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Use alpine-1.9.0_rc4 or later.<br />
<br />
'''CAUTION: Practice on a computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
Prerequisites:<br />
* SSH access to the remote box (needs to have SSH server running)<br />
* Alpine Linux supported hardware<br />
* Adventurous mind<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/{default,boot,sysinit,shutdown} root/.ssh<br />
<br />
You can also use default Alpine configuration files. In this case you should use ssh key to authorize yourself (as root password is empty, and ssh has empty passwords disabled).<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
Copy over your ssh authorized_keys:<br />
cp -a /root/.ssh/authorized_keys root/.ssh<br />
<br />
Create /etc/network/interfaces with network configuration (unless it was previously copied over). It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
'''Make sure there is no whitespace at end of lines''' in interfaces file. Busybox ifup is very picky.<br />
<br />
And create /etc/resolv.conf with the nameserver configuratio like:<br />
nameserver dns.ip.ad.dr<br />
<br />
Create the apk world (var/lib/apk/world) with essential packages:<br />
mkdir -p var/lib/apk<br />
echo "alpine-base iproute2 openssh" > var/lib/apk/world<br />
<br />
'''Double check the IP configuration and ssh keys.'''<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/{hwclock,modules,sysctl,hostname,bootmisc,syslog} etc/runlevels/boot/<br />
ln -s /etc/init.d/{devfs,dmesg,mdev} etc/runlevels/sysinit/<br />
ln -s /etc/init.d/{networking,sshd} etc/runlevels/default/<br />
ln -s /etc/init.d/{mount-ro,killprocs,savecache} etc/runlevels/shutdown/<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
Verify finally the overlay with "tar tzf" to see that it contains everything in proper places.<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) and hda2 (/) with both having ext3 filesystems. If you don't have ext3 on / or /boot, then you might be able to disable swap and reformat the swap partition as ext3 and use that.<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda # on some older systems its /usr/lib/syslinux/mbr.bin<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type; kernel and initrd are relative to partition root):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /grsec<br />
append initrd=/grsec.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==<br />
<br />
Reboot the box. And wait for it to come alive again. If it doesn't, tough luck. So dry practice with local box, with as identical hardware as possible.<br />
<br />
Once back in the box, we are running in Alpine Linux from tmpfs. So just do a regular installation of Alpine from network via ssh connection.<br />
<br />
Edit /etc/apk/repositories to contain your favorite Alpine mirror or just:<br />
http://dl-3.alpinelinux.org/alpine/v1.9/packages/main<br />
<br />
Finally run:<br />
/etc/init.d/modloop stop<br />
apk update<br />
setup-disk<br />
<br />
After hard disk setup is complete, '''copy ssh_authorized_keys to hard disk'''.<br />
<br />
Reboot once more, and you have the server with native Alpine hard disk installation.</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3059Replacing non-Alpine Linux with Alpine remotely2009-09-17T18:19:38Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice on a computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
Prerequisites:<br />
* SSH access to the remote box (needs to have SSH server running)<br />
* Alpine Linux supported hardware<br />
* Adventurous mind<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default etc/runlevels/boot root/.ssh<br />
<br />
You can also use default Alpine configuration files. In this case you should use ssh key to authorize yourself (as root password is empty, and ssh has empty passwords disabled).<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
Copy over your ssh authorized_keys:<br />
cp -a /root/.ssh/authorized_keys root/.ssh<br />
<br />
Create /etc/network/interfaces with network configuration (unless it was previously copied over). It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
'''Make sure there is no whitespace at end of lines''' in interfaces file. Busybox ifup is very picky.<br />
<br />
And create /etc/resolv.conf with the nameserver configuratio like:<br />
nameserver dns.ip.ad.dr<br />
<br />
Create the apk world (var/lib/apk/world) with essential packages:<br />
mkdir -p var/lib/apk<br />
echo "alpine-base iproute2 openssh" > var/lib/apk/world<br />
<br />
'''Double check the IP configuration and ssh keys.'''<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/hostname etc/runlevels/boot/hostname<br />
ln -s /etc/init.d/bootmisc etc/runlevels/default/bootmisc<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
Verify finally the overlay with "tar tzf" to see that it contains everything in proper places.<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) and hda2 (/) with both having ext3 filesystems. If you don't have ext3 on / or /boot, then you might be able to disable swap and reformat the swap partition as ext3 and use that.<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda # on some older systems its /usr/lib/syslinux/mbr.bin<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, generally hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type; kernel and initrd are relative to partition root):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /grsec<br />
append initrd=/grsec.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==<br />
<br />
Reboot, the box. And wait for it to come alive again. If it doesn't, tough luck. So dry practice with local box, with as identical hardware as possible.<br />
<br />
Once back in the box, we are running in Alpine Linux from tmpfs. So just do a regular installation of Alpine from network via ssh connection.<br />
<br />
Edit /etc/apk/repositories to contain your favorite Alpine mirror or just:<br />
http://dl-3.alpinelinux.org/alpine/v1.9/packages/main<br />
<br />
Finally run:<br />
/etc/init.d/modloop stop<br />
apk update<br />
setup-disk<br />
<br />
After hard disk setup is complete, '''copy ssh_authorized_keys to hard disk'''.<br />
<br />
Caution: apparently on some chipset sda might get detected again as hda after hard-disk install. This is due to modules.aliases sorting issue. It'll get fixed for 1.9.0_rc4.<br />
<br />
Reboot once more, and you have the server with native Alpine hard disk installation.</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3053Replacing non-Alpine Linux with Alpine remotely2009-09-17T07:02:36Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice on a computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
Prerequisites:<br />
* SSH access to the remote box (needs to have SSH server running)<br />
* Alpine Linux supported hardware<br />
* Adventurous mind<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default etc/runlevels/boot root/.ssh<br />
<br />
You can also use default Alpine configuration files. In this case you should use ssh key to authorize yourself (as root password is empty, and ssh has empty passwords disabled).<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
Copy over your ssh authorized_keys:<br />
cp -a /root/.ssh/authorized_keys root/.ssh<br />
<br />
Create /etc/network/interfaces with network configuration (unless it was previously copied over). It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
'''Make sure there is no whitespace at end of lines''' in interfaces file. Busybox ifup is very picky.<br />
<br />
And create /etc/resolv.conf with the nameserver configuratio like:<br />
nameserver dns.ip.ad.dr<br />
<br />
Create the apk world (var/lib/apk/world) with essential packages:<br />
mkdir -p var/lib/apk<br />
echo "alpine-base iproute2 openssh" > var/lib/apk/world<br />
<br />
'''Double check the IP configuration and ssh keys.'''<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/hostname etc/runlevels/boot/hostname<br />
ln -s /etc/init.d/bootmisc etc/runlevels/default/bootmisc<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
Verify finally the overlay with "tar tzf" to see that it contains everything in proper places.<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) and hda2 (/) with both having ext3 filesystems. If you don't have ext3 on / or /boot, then you might be able to disable swap and reformat the swap partition as ext3 and use that.<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda # on some older systems its /usr/lib/syslinux/mbr.bin<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, generally hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type; kernel and initrd are relative to partition root):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /grsec<br />
append initrd=/grsec.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==<br />
<br />
Reboot, the box. And wait for it to come alive again. If it doesn't, tough luck. So dry practice with local box, with as identical hardware as possible.<br />
<br />
Once back in the box, we are running in Alpine Linux from tmpfs. So just do a regular installation of Alpine from network via ssh connection.<br />
<br />
Edit /etc/apk/repositories to contain your favorite Alpine mirror or just:<br />
http://dl-3.alpinelinux.org/alpine/v1.9/packages/main<br />
<br />
Finally run:<br />
/etc/init.d/modloop stop<br />
apk update<br />
setup-disk<br />
<br />
After hard disk setup is complete, '''copy ssh_authorized_keys to hard disk'''.<br />
<br />
Reboot once more, and you have the server with native Alpine hard disk installation.</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3052Replacing non-Alpine Linux with Alpine remotely2009-09-17T05:18:16Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice on a computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
Prerequisites:<br />
* SSH access to the remote box (needs to have SSH server running)<br />
* Alpine Linux supported hardware<br />
* Adventurous mind<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default etc/runlevels/boot root/.ssh<br />
<br />
You can also use default Alpine configuration files. In this case you should use ssh key to authorize yourself (as root password is empty, and ssh has empty passwords disabled).<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
Copy over your ssh authorized_keys:<br />
cp -a /root/.ssh/authorized_keys root/.ssh<br />
<br />
Create /etc/network/interfaces with network configuration (unless it was previously copied over). It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
And create /etc/resolv.conf with the nameserver configuratio like:<br />
nameserver dns.ip.ad.dr<br />
<br />
Create the apk world (var/lib/apk/world) with essential packages:<br />
mkdir -p var/lib/apk<br />
echo "alpine-base iproute2 openssh" > var/lib/apk/world<br />
<br />
'''Double check the IP configuration and ssh keys.'''<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/hostname etc/runlevels/boot/hostname<br />
ln -s /etc/init.d/bootmisc etc/runlevels/default/bootmisc<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
Verify finally the overlay with "tar tzf" to see that it contains everything in proper places.<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) and hda2 (/) with both having ext3 filesystems. If you don't have ext3 on / or /boot, then you might be able to disable swap and reformat the swap partition as ext3 and use that.<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda # on some older systems its /usr/lib/syslinux/mbr.bin<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, generally hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type; kernel and initrd are relative to partition root):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /grsec<br />
append initrd=/grsec.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==<br />
<br />
Reboot, the box. And wait for it to come alive again. If it doesn't, tough luck. So dry practice with local box, with as identical hardware as possible.<br />
<br />
Once back in the box, we are running in Alpine Linux from tmpfs. So just do a regular installation of Alpine from network via ssh connection.<br />
<br />
Edit /etc/apk/repositories to contain your favorite Alpine mirror or just:<br />
http://dl-3.alpinelinux.org/alpine/v1.9/packages/main<br />
<br />
Finally run:<br />
/etc/init.d/modloop stop<br />
apk update<br />
setup-disk<br />
<br />
After hard disk setup is complete, copy ssh_authorized_keys to hard disk.<br />
<br />
Reboot once more, and you have the server with native Alpine hard disk installation.</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3051Replacing non-Alpine Linux with Alpine remotely2009-09-17T05:17:38Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice on a computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
Prerequisites:<br />
* SSH access to the remote box (needs to have SSH server running)<br />
* Alpine Linux supported hardware<br />
* Adventurous mind<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default etc/runlevels/boot root/.ssh<br />
<br />
You can also use default Alpine configuration files. In this case you should use ssh key to authorize yourself (as root password is empty, and ssh has empty passwords disabled).<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
Copy over your ssh authorized_keys:<br />
cp -a /root/.ssh/authorized_keys root/.ssh<br />
<br />
Create /etc/network/interfaces with network configuration (unless it was previously copied over). It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
And create /etc/resolv.conf with the nameserver configuratio like:<br />
nameserver dns.ip.ad.dr<br />
<br />
Create the apk world (var/lib/apk/world) with essential packages:<br />
mkdir -p var/lib/apk<br />
echo "alpine-base iproute2 openssh" > var/lib/apk/world<br />
<br />
'''Double check the IP configuration and ssh keys.'''<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/hostname etc/runlevels/boot/hostname<br />
ln -s /etc/init.d/bootmisc etc/runlevels/default/bootmisc<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
Verify finally the overlay with "tar tzf" to see that it contains everything in proper places.<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) and hda2 (/) with both having ext3 filesystems. If you don't have ext3 on / or /boot, then you might be able to disable swap and reformat the swap partition as ext3 and use that.<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda # on some older systems its /usr/lib/syslinux/mbr.bin<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, generally hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type; kernel and initrd are relative to partition root):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /grsec<br />
append initrd=/grsec.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==<br />
<br />
Reboot, the box. And wait for it to come alive again. If it doesn't, tough luck. So dry practice with local box, with as identical hardware as possible.<br />
<br />
Once back in the box, we are running in Alpine Linux from tmpfs. So just do a regular installation of Alpine from network via ssh connection.<br />
<br />
Edit /etc/apk/repositories to contain your favorite Alpine mirror or just:<br />
http://dl-3.alpinelinux.org/alpine/v1.9/packages/main<br />
<br />
Finally run:<br />
/etc/init.d/modloop stop<br />
apk update<br />
setup-disk<br />
<br />
Reboot once more, and you have the server with native Alpine hard disk installation.</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3044Replacing non-Alpine Linux with Alpine remotely2009-09-16T12:34:26Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice on a computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
Prerequisites:<br />
* SSH access to the remote box (needs to have SSH server running)<br />
* Alpine Linux supported hardware<br />
* Adventurous mind<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default etc/runlevels/boot root/.ssh<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
If you copy over passwd, replace default shell to be /bin/sh for everyone. You might also end up with inconsistent user/group id's for standard Alpine Installation. Consider copying passwd, group and shadow from a running Alpine Linux box. You can also just use all default config files for passwd etc. Then you must use ssh key to authorize yourself (as root password is empty, and ssh has empty passwords disabled).<br />
<br />
Copy over your ssh authorized_keys:<br />
cp -a my_authorized_keys root/.ssh<br />
<br />
The file network/interfaces might not necessarily exists. Some distributions use different configuration file for network. If it does not exists, you need to create it. It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
Create the apk world (var/lib/apk/world) with essential packages:<br />
alpine-base iproute2 openssh<br />
<br />
'''Double check the IP configuration and ssh keys.'''<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/hostname etc/runlevels/boot/hostname<br />
ln -s /etc/init.d/bootmisc etc/runlevels/default/bootmisc<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
Verify finally the overlay with "tar tzf" to see that it contains everything in proper places.<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) and hda2 (/) with both having ext3 filesystems.<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, generally hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type; kernel and initrd are relative to partition root):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /grsec<br />
append initrd=/grsec.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==<br />
<br />
Reboot, the box. And wait for it to come alive again. If it doesn't, tough luck. So dry practice with local box, with as identical hardware as possible.<br />
<br />
Once back in the box, we are running in Alpine Linux from tmpfs. So just do a regular installation of Alpine from network via ssh connection.<br />
<br />
Edit /etc/apk/repositories to contain your favorite Alpine mirror or just:<br />
http://dl-3.alpinelinux.org/alpine/v1.9/packages/main<br />
<br />
Finally run:<br />
/etc/init.d/modloop stop<br />
apk update<br />
setup-disk<br />
<br />
Reboot once more, and you have the server with native Alpine hard disk installation.</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3043Replacing non-Alpine Linux with Alpine remotely2009-09-16T12:22:22Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice on a computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
Prerequisites:<br />
* SSH access to the remote box (needs to have SSH server running)<br />
* Alpine Linux supported hardware<br />
* Adventurous mind<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default etc/runlevels/boot root/.ssh<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
If you copy over passwd, replace default shell to be /bin/sh for everyone. You might also end up with inconsistent user/group id's for standard Alpine Installation. Consider copying passwd, group and shadow from a running Alpine Linux box. You can also just use all default config files for passwd etc. Then you must use ssh key to authorize yourself (as root password is empty, and ssh has empty passwords disabled).<br />
<br />
Copy over your ssh authorized_keys:<br />
cp -a my_authorized_keys root/.ssh<br />
<br />
The file network/interfaces might not necessarily exists. Some distributions use different configuration file for network. If it does not exists, you need to create it. It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
Create the apk world (var/lib/apk/world) with essential packages:<br />
alpine-base iproute2 openssh<br />
<br />
'''Double check the IP configuration and ssh keys.'''<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/hostname etc/runlevels/boot/hostname<br />
ln -s /etc/init.d/bootmisc etc/runlevels/default/bootmisc<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
Verify finally the overlay with "tar tzf" to see that it contains everything in proper places.<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) sand hda2 (/).<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, generally hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type; kernel and initrd are relative to partition root):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /grsec<br />
append initrd=/grsec.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==<br />
<br />
Reboot, the box. And wait for it to come alive again. If it doesn't, tough luck. So dry practice with local box, with as identical hardware as possible.<br />
<br />
Once back in the box, we are running in Alpine Linux from tmpfs. So just do a regular installation of Alpine from network via ssh connection.<br />
<br />
Edit /etc/apk/repositories to contain your favorite Alpine mirror or just:<br />
http://dl-3.alpinelinux.org/alpine/v1.9/packages/main<br />
<br />
Finally run:<br />
/etc/init.d/modloop stop<br />
apk update<br />
setup-disk<br />
<br />
Reboot once more, and you have the server with native Alpine hard disk installation.</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3042Replacing non-Alpine Linux with Alpine remotely2009-09-16T12:20:05Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice with computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
'''WARNING: UNTESTED INSTRUCTION. WRITING IN PROGRESS.'''<br />
<br />
Prerequisites:<br />
* SSH access to the remote box (needs to have SSH server running)<br />
* Alpine Linux supported hardware<br />
* Adventurous mind<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default etc/runlevels/boot root/.ssh<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
If you copy over passwd, replace default shell to be /bin/sh for everyone. You might also end up with inconsistent user/group id's for standard Alpine Installation. Consider copying passwd, group and shadow from a running Alpine Linux box. You can also just use all default config files for passwd etc. Then you must use ssh key to authorize yourself (as root password is empty, and ssh has empty passwords disabled).<br />
<br />
Copy over your ssh authorized_keys:<br />
cp -a my_authorized_keys root/.ssh<br />
<br />
The file network/interfaces might not necessarily exists. Some distributions use different configuration file for network. If it does not exists, you need to create it. It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
Create the apk world (var/lib/apk/world) with essential packages:<br />
alpine-base iproute2 openssh<br />
<br />
'''Double check the IP configuration and ssh keys.'''<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/hostname etc/runlevels/boot/hostname<br />
ln -s /etc/init.d/bootmisc etc/runlevels/default/bootmisc<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
Verify finally the overlay with "tar tzf" to see that it contains everything in proper places.<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) sand hda2 (/).<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, generally hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type; kernel and initrd are relative to partition root):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /grsec<br />
append initrd=/grsec.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==<br />
<br />
Reboot, the box. And wait for it to come alive again. If it doesn't, tough luck. So dry practice with local box, with as identical hardware as possible.<br />
<br />
Once back in the box, we are running in Alpine Linux from tmpfs. So just do a regular installation of Alpine from network via ssh connection.<br />
<br />
Edit /etc/apk/repositories to contain your favorite Alpine mirror or just:<br />
http://dl-3.alpinelinux.org/alpine/v1.9/packages/main<br />
<br />
Finally run:<br />
/etc/init.d/modloop stop<br />
apk update<br />
setup-disk</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3041Replacing non-Alpine Linux with Alpine remotely2009-09-16T12:07:48Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice with computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
'''WARNING: UNTESTED INSTRUCTION. WRITING IN PROGRESS.'''<br />
<br />
Prerequisites:<br />
* SSH access to the remote box (needs to have SSH server running)<br />
* Alpine Linux supported hardware<br />
* Adventurous mind<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default etc/runlevels/boot root/.ssh<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
Copy over your ssh authorized_keys:<br />
cp -a my_authorized_keys root/.ssh<br />
<br />
If you copy over passwd, replace default shell to be /bin/sh for everyone.<br />
<br />
You can copy the network/interfaces might not necessarily exists. Some distributions use different configuration file for network. If it does not exists, you need to create it. It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
Create the apk world (var/lib/apk/world) with essential packages:<br />
alpine-base iproute2 openssh<br />
<br />
'''Double check IP configuration.'''<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/hostname etc/runlevels/boot/hostname<br />
ln -s /etc/init.d/bootmisc etc/runlevels/default/bootmisc<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) sand hda2 (/).<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, generally hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type; kernel and initrd are relative to partition root):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /grsec<br />
append initrd=/grsec.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==<br />
<br />
Reboot, the box. And wait for it to come alive again. If it doesn't, tough luck. So dry practice with local box, with as identical hardware as possible.<br />
<br />
Once back in the box, we are running in Alpine Linux from tmpfs. So just do a regular installation of Alpine from network via ssh connection.<br />
<br />
Edit /etc/apk/repositories to contain your favorite Alpine mirror or just:<br />
http://dl-3.alpinelinux.org/alpine/v1.9/packages/main<br />
<br />
Finally run:<br />
/etc/init.d/modloop stop<br />
apk update<br />
setup-disk</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3040Replacing non-Alpine Linux with Alpine remotely2009-09-16T11:57:25Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice with computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
'''WARNING: UNTESTED INSTRUCTION. WRITING IN PROGRESS.'''<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default etc/runlevels/boot root/.ssh<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
If you copy over passwd, replace default shell to be /bin/sh for everyone.<br />
<br />
You can copy the network/interfaces might not necessarily exists. Some distributions use different configuration file for network. If it does not exists, you need to create it. It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
Create the apk world (var/lib/apk/world) with essential packages:<br />
alpine-base iproute2 openssh<br />
<br />
'''Double check IP information.'''<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/hostname etc/runlevels/boot/hostname<br />
ln -s /etc/init.d/bootmisc etc/runlevels/default/bootmisc<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) sand hda2 (/).<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, generally hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type; kernel and initrd are relative to partition root):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /grsec<br />
append initrd=/grsec.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3039Replacing non-Alpine Linux with Alpine remotely2009-09-16T11:28:11Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice with computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
'''WARNING: UNTESTED INSTRUCTION. WRITING IN PROGRESS.'''<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default root/.ssh<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
You can copy the network/interfaces might not necessarily exists. Some distributions use different configuration file for network. If it does not exists, you need to create it. It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
Create the apk world (var/lib/apk/world) with essential packages:<br />
alpine-base iproute2 openssh<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) sand hda2 (/).<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, generally hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type; kernel and initrd are relative to partition root):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /grsec<br />
append initrd=/grsec.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3038Replacing non-Alpine Linux with Alpine remotely2009-09-16T11:25:25Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice with computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
'''WARNING: UNTESTED INSTRUCTION. WRITING IN PROGRESS.'''<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default root/.ssh<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
You can copy the network/interfaces might not necessarily exists. Some distributions use different configuration file for network. If it does not exists, you need to create it. It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
Create the apk world (var/lib/apk/world) with essential packages:<br />
alpine-base iproute2 openssh<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) sand hda2 (/).<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, generally hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type; kernel and initrd are relative to partition root):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /grsec<br />
append initrd=/profile.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3037Replacing non-Alpine Linux with Alpine remotely2009-09-16T11:16:14Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice with computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
'''WARNING: UNTESTED INSTRUCTION. WRITING IN PROGRESS.'''<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default root/.ssh<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
You can copy the network/interfaces might not necessarily exists. Some distributions use different configuration file for network. If it does not exists, you need to create it. It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) sand hda2 (/).<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, generally hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type; kernel and initrd are relative to partition root):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /grsec<br />
append initrd=/profile.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3036Replacing non-Alpine Linux with Alpine remotely2009-09-16T11:05:16Z<p>Fabled: </p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice with computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
'''WARNING: UNTESTED INSTRUCTION. WRITING IN PROGRESS.'''<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default root/.ssh<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
You can copy the network/interfaces might not necessarily exists. Some distributions use different configuration file for network. If it does not exists, you need to create it. It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) sand hda2 (/).<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, generally hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /boot/grsec<br />
append initrd=/boot/profile.gz alpine_dev=sda2:ext3 modloop=grsec.cmg modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3035Replacing non-Alpine Linux with Alpine remotely2009-09-16T11:01:52Z<p>Fabled: add stuff</p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice with computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
'''WARNING: UNTESTED INSTRUCTION. WRITING IN PROGRESS.'''<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default root/.ssh<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
You can copy the network/interfaces might not necessarily exists. Some distributions use different configuration file for network. If it does not exists, you need to create it. It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
We need to copy over two sets of information: the boot kernel (kernel, initramdisk and boot configuration) and operating system boot data (overlay, apk packages and kernel modules). These can reside on same partition if they fit. However, /boot is usually small, so you might want to put the apks on separate partition. This guide assumes they are on hda1 (/boot) sand hda2 (/).<br />
<br />
We start with the easy task. Place the overlay file and the "apks" directory from cd-rom image to root of current installation:<br />
cp host.apkovl.tar.gz /<br />
cp -a /cdrom/apks /<br />
cp -a /cdrom/boot/grsec.cmg /<br />
<br />
Next we make the Alpine Linux kernel bootable (requires syslinux) and use fdisk to mark the /boot partition as bootable (if not done already):<br />
cp -a /cdrom/boot/grsec{,.gz} /boot<br />
dd if=/usr/share/syslinux/mbr.bin of=/dev/hda<br />
fdisk /dev/hda<br />
<br />
Create /boot/extlinux.conf with contents like (alpine_dev needs special care, generally hard-disks are sd* in alpine due to new kernel and libata; you also need to check the filesystem type):<br />
timeout 20<br />
prompt 1<br />
default grsec<br />
label grsec<br />
kernel /boot/grsec<br />
append initrd=/boot/profile.gz alpine_dev=sda2:ext3 modules=loop,cramfs,sd-mod,usb-storage,ext3 quiet<br />
<br />
Finally make the /boot partition bootable by extlinux.<br />
extlinux -i /boot<br />
<br />
== Install Alpine on hard-disk ==</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Replacing_non-Alpine_Linux_with_Alpine_remotely&diff=3034Replacing non-Alpine Linux with Alpine remotely2009-09-16T09:50:22Z<p>Fabled: intial text</p>
<hr />
<div>Instructions to replace running Linux installation with Alpine Linux, remotely using ssh connection only.<br />
<br />
Tested using alpine-1.9.0_rc2.<br />
<br />
'''CAUTION: Practice with computer with physical access first. If something goes wrong, the remote box will very likely be left into unusable state.'''<br />
<br />
'''WARNING: UNTESTED INSTRUCTION. WRITING IN PROGRESS.'''<br />
<br />
== Create apk overlay suitable for hard disk based tmpfs boot ==<br />
<br />
The first step is to create Alpine configuration file with basic configuration of the host. We need the new box to start networking and ssh in the beginning so we can reconnect to it after reboot.<br />
<br />
Create basic layout for the overlay:<br />
mkdir overlay<br />
cd overlay<br />
mkdir -p etc/ssh etc/network etc/runlevels/default root/.ssh<br />
<br />
If you want to keep the existing host identity (e.g. SSH key), you can copy them over:<br />
cp -a /etc/{passwd,group,shadow,gshadow,hostname,resolv.conf,network/interfaces,ssh} etc/<br />
<br />
You can copy the network/interfaces might not necessarily exists. Some distributions use different configuration file for network. If it does not exists, you need to create it. It should look something like:<br />
auto lo<br />
iface lo inet loopback<br />
<br />
auto eth0<br />
iface eth0 inet static<br />
address ip.ad.dr.es<br />
netmask 255.255.255.0<br />
gateway gw.ad.dr.es<br />
<br />
Finally, make the essential services start up automatically and create the overlay file:<br />
ln -s /etc/init.d/networking etc/runlevels/default/networking<br />
ln -s /etc/init.d/sshd etc/runlevels/default/sshd<br />
tar czf ../host.apkovl.tar.gz *<br />
<br />
== Install Alpine cd-rom image on hard disk ==<br />
<br />
== Install Alpine on hard-disk ==</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Setting_up_a_/var_partition_on_software_IDE_raid1&diff=3033Setting up a /var partition on software IDE raid12009-09-16T09:33:43Z<p>Fabled: fix typoes</p>
<hr />
<div>This document will show how to create harddisk mirroring using cheap IDE disks.<br />
<br />
This document was written for alpine-1.8.3<br />
<br />
I will setup swap on a raid1 for maximum reliability. If you prefer maximum speed, you don't need configure any raid devices for swap. Just add 2 swap partitions on different disks and linux will stripe them automatically.<br />
<br />
The downside is that at the moment one disk fails, the system will go down. Thats why I choose to put the swap on raid1.<br />
<br />
== Setting up the RAID ==<br />
Set up a raid array as described [[Setting up a software raid1 array|here]].<br />
In this document two raid arrays are configured: md0 for swap (512MB) and md1 for /var. <br />
<br />
It is generally a good idea to use LVM so you are able to easily extend your data storage in future. LVM is not discussed here.<br />
<br />
== Create filesystem ==<br />
Now we can create swapspace and the filesystem for /var.<br />
mkswap /dev/md0<br />
swapon /dev/md0<br />
<br />
You can verify that swap was really activated with ''free''. It should display how much swapspace you have.<br />
free<br />
<br />
We need to install the software to create the filesystem ("format" the partition). I will use '''ext3''' here so I install ''e2fsprogs''. If you prefer reiserfs or xfs you will have to install ''xfsprogs'' or ''reiserfsprogs'' instead.<br />
apk_add e2fsprogs<br />
<br />
If you use an Alpine release older than 1.3.8 you will need to manually create a link to /etc/mtab.<br />
ln -fs /proc/mounts /etc/mtab<br />
<br />
Create the filesystem. The -j option makes it ext'''3'''. Without the -j option it will become non-journaling ext'''2'''. This step might take some time if your partition is big.<br />
mke2fs -j /dev/md1<br />
<br />
<br />
Now edit /etc/fstab and add your new partitions. Mine looks like this:<br />
none /proc proc defaults 0 0<br />
none /sys sysfs defaults 0 0<br />
udev /dev tmpfs size=100k 0 0<br />
none /dev/pts devpts defaults 0 0<br />
tmpfs /dev/shm tmpfs defaults 0 0<br />
/dev/cdrom /media/cdrom iso9660 ro 0 0<br />
/dev/fd0 /media/floppy vfat noauto 0 0<br />
/dev/usba1 /media/usb vfat noauto 0 0<br />
none /proc/bus/usb usbfs noauto 0 0<br />
<br />
/dev/md0 swap swap defaults 0 0<br />
/dev/md1 /var ext3 defaults 0 0<br />
<br />
== Move the data ==<br />
Now you should stop all services running that put anything in /var (syslog for example). If you have booted on a clean installation and not run setup-alpine, then no services should be running. However, some packages might have created dirs in /var so we need to backup /var mount the new and move all backed up dirs back to the raided /var.<br />
<br />
mv /var /var.tmp<br />
mkdir /var<br />
mount /var<br />
mv /var.tmp/* /var<br />
rmdir /var.tmp<br />
<br />
Verify that everyting looks ok with the ''df'' utility.<br />
~ $ df<br />
Filesystem 1k-blocks Used Available Use% Mounted on<br />
none 255172 23544 231628 9% /<br />
udev 100 0 100 0% /dev<br />
/dev/cdrom 142276 142276 0 100% /media/cdrom<br />
/dev/md1 37977060 181056 35866876 1% /var<br />
<br />
== Survive reboots ==<br />
Now we have everything up and running. We need to make sure that everything will be restored during next reboot.<br />
<br />
Create an initscript that will mount /var for you during boot. I call it /etc/init.d/mountdisk and it looks like this:<br />
#!/sbin/runscript<br />
<br />
start() {<br />
ebegin "Mounting /var"<br />
mount /var<br />
eend $?<br />
}<br />
<br />
stop() {<br />
ebegin "Unmounting /var"<br />
umount /var<br />
eend $?<br />
}<br />
<br />
Make it exectutable:<br />
chmod +x /etc/init.d/mountdisk<br />
<br />
'''NOTE:''' Since Alpine-1.7.3 there is a ''localmount'' script shipped so you will not need to create your own ''mountdisk'' script.<br />
<br />
And that /var is mounted *after* raid is created. The -k option will make alpine to unmount the /Var partition during boot. Also add start of swap too boot<br />
rc_add -k -s 06 mountdisk<br />
rc_add -k -s 06 swap<br />
<br />
The /dev/md* device nodes will not be created automatically so we need to put the on floppy too.<br />
lbu include /dev/md*<br />
<br />
If you have users on the server and want /home to be permanent, you can create a directory /var/home and create links to /var/home.<br />
mkdir /var/home<br />
mv /home/* /var/home/<br />
ln -s /var/home/* /home/<br />
<br />
'''NOTE:''' You cannot just replace /home with a link that points to /var/home since the base has a /home directory. When the boot tries to copy the config from floppy it will fail because of the already existing /home directory.<br />
<br />
Make sure the links are stored to floppy:<br />
lbu include /home/*<br />
<br />
Also remember to move any newly created users to /var/home and create a link:<br />
adduser bob<br />
mv /home/bob /var/home/<br />
ln -s /var/home/bob /home/bob<br />
lbu include /home/bob<br />
<br />
Save to floppy:<br />
lbu commit floppy<br />
<br />
== Test it works ==<br />
Reboot computer. Now should the raid start and /var should be mounted. Check with df:<br />
~ $ df<br />
Filesystem 1k-blocks Used Available Use% Mounted on<br />
none 255172 23976 231196 9% /<br />
mdev 100 0 100 0% /dev<br />
/dev/cdrom 140932 140932 0 100% /media/cdrom<br />
/dev/md1 37977060 180984 35866948 1% /var<br />
<br />
== Upgrades ==<br />
Since the package database is placed on disk, you cannot update by simply replacing the CDROM. You will have to either run the upgrade on the new CDROM or run ''apk_add -u ... && update-conf'' manually.</div>Fabledhttps://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:Documentation&diff=3032Alpine Linux:Documentation2009-09-16T08:57:47Z<p>Fabled: /* Installation */</p>
<hr />
<div>== User Documentation ==<br />
Documentation how to install and use the Alpine distro.<br />
<br />
* [[Installing Alpine on CD]]<br />
* [[Installing Alpine on USB]]<br />
* [[Installing Alpine on Compact Flash]]<br />
* [[Upgrading Alpine]]<br />
* [[Alpine package management]] ''(How to add/remove packages on your Alpine)''<br />
* [[Alpine boot services]] ''(Configure a service to automatically boot at next reboot)''<br />
* [[Alpine local backup]] ''(Permanently store your modifications in case your box needs reboot)''<br />
* [[Comparison with Gentoo and Debian]]<br />
* Submitting [http://bugs.alpinelinux.org Problem Reports]<br />
<br />
=== HOWTOS ===<br />
<br />
==== Installation ====<br />
* [[Bootstrapping Alpine on Soekris net4xxx]]<br />
* [[Bootstrapping Alpine on PC Engines ALIX.3]]<br />
* [[Setting up a software raid1 array]]<br />
* [[Setting up Logical Volumes with LVM]]<br />
* [[Setting up a /var partition on software IDE raid1]]<br />
* [[Native Harddisk Install]]<br />
* [[Installing XUbuntu using Alpine boot floppy]]<br />
* [[Replacing non-Alpine Linux with Alpine remotely]]<br />
<br />
==== Networking ====<br />
* [[Setting up a OpenVPN-server with Alpine]]<br />
* [[Setting up traffic monitoring using rrdtool (and snmp)]]<br />
* [[Setting up Zaptel/Asterisk on Alpine]]<br />
* [[Using HSDPA modem]]<br />
* [[Using Alpine on Windows domain with IPSEC isolation]]<br />
* [[Using Racoon for Remote Sites]]<br />
<br />
==== Misc ====<br />
* [[Setting up lm_sensors]]<br />
* [[Setting up Satellite Internet Connection]]<br />
* [[Setting up Streaming an Asterisk Channel]]<br />
* [[Formatting HD/Floppy/Other]]<br />
* [[Setting up Transmission (bittorrent) with Clutch WebUI]]<br />
* [[Hosting_services_on_Alpine]] ''(This applies to hosting mail, webservices and other services)''<br />
** [[Setting_up_postfix_with_virtual_domains]]<br />
** [[Protecting your email server with Alpine]]<br />
** [[Hosting Web/Email services on Alpine]]<br />
** [[Setting_up_trac_wiki]]<br />
* [[Running Alpinelinux As a QEMU networked Guest ]]<br />
* [[Screen on console]]<br />
* [[Using espeak on AlpineLinux]]<br />
* [[Generating SSL certs with ACF]]<br />
* [[Setting up a ssh-server]]<br />
* [[Changing passwords]]<br />
* [[Multiple Instances of Services]]<br />
<br />
==== iSCSI ====<br />
* [[iSCSI Target and Initiator Configuration]]<br />
* [[iSCSI Raid and Clustered File Systems]]<br />
<br />
=== Vserver ===<br />
* [[Setting up a basic vserver]]<br />
<br />
== Developer Documentation ==<br />
Documentation how to build and modify the Alpine distro.<br />
<br />
* [[Alpine Package Testing Suite]]<br />
* [[Alpine Configuration Framework Design]] (Why ACF is the way it is)<br />
* [[Development using git]]<br />
* [[Installing Alpine on a virtual machine]]<br />
* [[Writing User Documentation for ACF]]<br />
<br />
=== Alpine 1.9.x build system ===<br />
After Alpine 1.8 is released we will switch to a new build system. Those docs here below is for bulding packages in Alpine 1.9 and later.<br />
<br />
* [[Setting up the build environment]]<br />
* [[Creating an Alpine package]]<br />
* [[Creating_an_Alpine_1.9_iso]] (This page is experimental and might go away or move in the future)<br />
<br />
=== Obsolete docs ===<br />
* [[Setting up the build environment 1.7]]<br />
* [[Newbie Guide to Building an apk]]<br />
* [[Creating patches]]<br />
<br />
== Misc. References ==<br />
Other useful references.<br />
<br />
* http://www.metoffice.gov.uk/research/nwp/external/fcm/doc/user_guide/working_practices.html - Some guidelines on use of Trac and SVN</div>Fabled