...
 
Commits (833)
# Maintainer:
# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
pkgname=hplip
pkgver=3.14.3
pkgrel=1
pkgdesc='Drivers for HP printers'
arch=all
url='http://hplipopensource.com'
license='GPL'
depends='python py-dbus'
makedepends='libjpeg-turbo-dev net-snmp-dev cups-dev libusbx-dev python-dev'
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
disable_upgrade.patch"
_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
local i
cd "$_builddir"
update_config_sub || return 1
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"
./configure --prefix=/usr \
--disable-qt4 \
--disable-scan-build \
--disable-fax-build \
--disable-dbus-build \
--enable-cups-ppd-install \
--enable-foomatic-ppd-install \
--enable-foomatic-drv-install \
|| return 1
make || return 1
}
package() {
make -C "$_builddir" DESTDIR="$pkgdir" install || return 1
cd "$pkgdir"
rm -rf etc/sane.d etc/xdg usr/share/hal etc/init.d etc/udev
find . -name \*.la -delete
}
md5sums="a0ae59a75d202b92738dc24610b98428 hplip-3.14.3.tar.gz
65bddd5951bd2d12a26bbf7b51bcab27 disable_upgrade.patch"
sha256sums="1805b103639b51b9d908921e1e77db66c6e78b792aa51e405a5415e8e1c55e6e hplip-3.14.3.tar.gz
b3f8d91a07216e6aad4dbfdb79ae19496b03c29f56444059b9b93a32c86ceb8e disable_upgrade.patch"
sha512sums="c51ee7ff1255d56b271a2d2072fb7cdf62ccece323fe4814cdfb2a93fa97144dd83343f09bc5fdcc7e757c3ba16d3158c239689e0324fb2d9295917f94153dea hplip-3.14.3.tar.gz
57e14c581e82a0dd44344524dc4eb4d845843cf0775b60475541cabfb9d67a4fdab501be3977f8ca9888fbbee4d0392e6068c788e7a85cf4c1add5848be21ae7 disable_upgrade.patch"
--- a/upgrade.py 2013-10-31 12:46:54.000000000 +0100
+++ b/upgrade.py 2013-12-04 14:58:03.000000000 +0100
@@ -134,6 +134,11 @@ except getopt.GetoptError, e:
if os.getenv("HPLIP_DEBUG"):
log.set_level('debug')
+
+log.error("HPLIP upgrade is disabled by Alpine Linux for security reasons, see https://bugs.archlinux.org/task/38083")
+clean_exit(1)
+
+
for o, a in opts:
if o in ('-h', '--help'):
usage()
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lsyncd
pkgver=2.1.5
pkgrel=0
pkgdesc="Live Syncing (Mirror) Daemon"
url="http://code.google.com/p/lsyncd/"
arch="all"
license="GPLv2+"
depends="rsync"
depends_dev=
makedepends="$depends_dev lua lua-dev"
install=""
subpackages="$pkgname-doc"
source="http://lsyncd.googlecode.com/files/lsyncd-$pkgver.tar.gz
fix-realpath.patch
lpostcmd.patch
$pkgname.initd"
_builddir="$srcdir"/lsyncd-$pkgver
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
|| return 1
make || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
mkdir -p "$pkgdir/etc/lsyncd"
cp "$_builddir"/examples/*.lua \
"$pkgdir"/etc/lsyncd/
install -Dm755 "$srcdir/$pkgname.initd" \
"$pkgdir/etc/init.d/$pkgname" || return 1
}
md5sums="fb10547494ec5ec662fe88343047c364 lsyncd-2.1.5.tar.gz
a14565df7274ebd0b605301ca39ae885 fix-realpath.patch
5e0456755ffef5b3b0ebed597ad50d09 lpostcmd.patch
ad321a708d6565096d40c9715c8e5693 lsyncd.initd"
sha256sums="4a793056c4ed833edb59436d7711bb65f7e38a4d8d44371cc9dc5eb91fbc461f lsyncd-2.1.5.tar.gz
26454c77bb005c165c10b05b232c587669d35ab98e0ac889a11923106126f98e fix-realpath.patch
0a104143bbb754f8e9effbab6f5430be66497d1ef8313ae2c35531de4cb924c1 lpostcmd.patch
b14d545d1c3e66d6b430d241dcc134a8e8e504c03d01b249c89cb4777adab313 lsyncd.initd"
sha512sums="7be939e979525f8e4687432ffe952b1d09b8a34b4d7f92ebe86b5cddb765dbd602258682612529e9cc51305d6d001e72de9e6da62761397df23ecda30fd6a12b lsyncd-2.1.5.tar.gz
2cebaf59d960321c2eda4ef1e0d850f62eb7eedb7ba8922a5db33a7f78c769d1a52839fbb597ae06ba576632e2abc7b92a6ba2eaf58b71b93bc877db83e25576 fix-realpath.patch
ffc97c1e7dcc3a15181f4ae6e8cd0e882a540657081621173fed10f19e05344eb09b1af1359b495d5787385f4f2a24eca5103b8cc85ee63963e18c9c73e173de lpostcmd.patch
241ccc78e59bbf6aba38bdfc2705ff1b9c78b55b7f711ae76851406f7a928a66b6c4dab1bda2e4eeb781627ca5bd3a1507efa9ccf99961431fd5de25b93d0a4f lsyncd.initd"
--- a/lsyncd.c
+++ b/lsyncd.c
@@ -171,19 +171,7 @@
get_realpath( const char * rpath )
{
// uses c-library to get the absolute path
-#ifdef __GLIBC__
- // in case of GLIBC the task is easy.
return realpath( rpath, NULL );
-#else
-# warning having to use old style realpath()
- // otherwise less so and requires PATH_MAX limit
- char buf[ PATH_MAX] ;
- char *asw = realpath( rpath, buf );
- if( !asw )
- { return NULL; }
-
- return s_strdup( asw );
-#endif
}
--- a/examples/lpostcmd.lua
+++ b/examples/lpostcmd.lua
@@ -25,7 +25,7 @@
-- uses rawget to test if "isPostcmd" has been set without
-- triggering an error if not.
local isPostcmd = rawget(event, "isPostcmd")
- if event.isPostcmd then
+ if isPostcmd then
spawn(event, "/usr/bin/ssh",
config.host, config.postcmd)
return
@@ -75,13 +75,3 @@
return default.rsync.prepare(config)
end
}
-
-
-sync {
- rsyncpostcmd,
- source = "src",
- host = "beetle",
- targetdir = "/path/to/trg",
- postcmd = "/usr/local/bin/restart-servelt.sh",
-}
-
#!/sbin/runscript
command=/usr/bin/lsyncd
pidfile=/var/run/lsyncd/${SVCNAME}.pid
conf=/etc/lsyncd/${SVCNAME}.lua
: ${exec_user:=root}
: ${exec_group:=root}
start_stop_daemon_args="--user $exec_user --group $exec_group --chdir /etc/lsyncd"
depend() {
need net
after firewall
}
start_pre() {
checkpath --directory ${pidfile%/*} --owner ${exec_user}:${exec_group}
command_args="$conf -pidfile $pidfile $command_args"
}
From 1e2eb721ed696412c7aafc9538b3e45ac5c96ef9 Mon Sep 17 00:00:00 2001
From: Carlo Landmeter <clandmeter@gmail.com>
Date: Tue, 15 Apr 2014 09:51:53 +0000
Subject: [PATCH] alpinelinux: set correct lxc_arch for x86
---
templates/lxc-alpine.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in
index d8c6674..7a22d5e 100644
--- a/templates/lxc-alpine.in
+++ b/templates/lxc-alpine.in
@@ -362,6 +362,7 @@ apk_arch=$arch
case "$arch" in
i[3-6]86)
apk_arch=x86
+ lxc_arch=x86
;;
x86)
lxc_arch=i686
--
1.9.2
From aa0337f7856feefab804c8a7bba4eaca205d3bab Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 20 Feb 2014 09:48:37 +0000
Subject: [PATCH 1/2] lua: Do not link Lua module to the Lua core library
Modules should not link to the Lua core library.
See http://lua-users.org/wiki/BuildingModules under
"Do Not Link Modules to the Lua Core Libraries"
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
src/lua-lxc/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lua-lxc/Makefile.am b/src/lua-lxc/Makefile.am
index 7bbaf61..540238f 100644
--- a/src/lua-lxc/Makefile.am
+++ b/src/lua-lxc/Makefile.am
@@ -18,7 +18,7 @@ core_so_LDFLAGS = \
-L$(top_srcdir)/src/lxc \
-Wl,-soname,core.so.$(firstword $(subst ., ,$(VERSION)))
-core_so_LDADD = -llxc $(LUA_LIBS)
+core_so_LDADD = -llxc
lxc.lua:
--
1.8.5.4
From 882bdfc07672202fbade0d8e38d26cf0a5309b5d Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 20 Feb 2014 10:30:22 +0000
Subject: [PATCH 2/2] lxc-alpine: add support for architecture arm
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
templates/lxc-alpine.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in
index afda971..d8c6674 100644
--- a/templates/lxc-alpine.in
+++ b/templates/lxc-alpine.in
@@ -368,6 +368,9 @@ case "$arch" in
;;
x86_64|"")
;;
+ arm*)
+ apk_arch=armhf
+ ;;
*)
die "unsupported architecture: $arch"
;;
--
1.8.5.4
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lxc
pkgver=1.0.2
_mypkgver=${pkgver/_rc/.rc}
pkgrel=1
pkgdesc="linux containers - tools"
url="http://lxc.sourceforge.net/"
arch="all"
license="GPL"
depends="bash"
depends_dev="libcap-dev"
makedepends="$depends_dev lvm2 util-linux automake autoconf libtool lua5.2-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-lvm lua5.2-lxc:_lua52
$pkgname-templates $pkgname-libs"
source="https://github.com/lxc/lxc/archive/lxc-$_mypkgver.tar.gz
version.patch
lxc.initd
0001-alpinelinux-set-correct-lxc_arch-for-x86.patch
"
_builddir="${srcdir}/lxc-lxc-${_mypkgver}"
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
./autogen.sh
}
build() {
cd "$_builddir"
LUA_VERSION=5.2 \
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-apparmor \
--enable-lua \
--with-lua-pc=lua5.2 \
--with-distro=alpine \
|| return 1
make VERSION=$pkgver || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
install -d "$pkgdir"/var/lib/lxc
install -Dm755 "$srcdir"/lxc.initd "$pkgdir"/etc/init.d/lxc
}
lvm() {
pkgdesc="linux containers lvm support"
depends="lvm2 util-linux lxc"
arch="noarch"
mkdir "$subpkgdir"
}
_lua52() {
pkgdesc="Lua 5.2 module for LXC"
for i in lib share; do
mkdir -p "$subpkgdir"/usr/$i || return 1
mv "$pkgdir"/usr/$i/lua "$subpkgdir"/usr/$i/ || return 1
done
}
templates() {
pkgdesc="Templates for LXC"
arch="noarch"
mkdir -p "$subpkgdir"/usr/share/lxc
mv "$pkgdir"/usr/share/lxc/templates "$subpkgdir"/usr/share/lxc/
}
dev() {
default_dev
#fix abuild smartness
mv "$subpkgdir"/usr/bin/lxc-config \
"$pkgdir"/usr/bin/ || return 1
}
md5sums="ae877b4006c2e2edfa5cb1a718455588 lxc-1.0.2.tar.gz
79e90616b5049a472ccdcb5b1dcdd8b1 version.patch
1268d4b3e6ed004a47216b8714d09bfd lxc.initd
b93cda6f092211535cf87fa841d611aa 0001-alpinelinux-set-correct-lxc_arch-for-x86.patch"
sha256sums="705d098bb7bf8f739e2b40dd216da5c58ae558827084f1464bc0e3d911a8e8a3 lxc-1.0.2.tar.gz
b6d85fb23940d2511b3951de56b2532843c0e03ec1613548366361cc0c1a46b9 version.patch
bc108a722dc359a24c48837ef7012c776b1d20a533ae0e2231f75081dad4e2f5 lxc.initd
64bf7588bb0b7c4cd214eb1b89bd8426173dedec16e90b791d795a5d1234ad2b 0001-alpinelinux-set-correct-lxc_arch-for-x86.patch"
sha512sums="275052ce94c737bfe26b32d0557af90d8939e087f8003bf0ec364e016e1e377a33a6caeda7274507816f58e12aaaea7196bbee5aea25ea50e7446ecf89a7f20c lxc-1.0.2.tar.gz
e2ffcbf55447291a8434a4f37255c3a6a119bc4116c75d205006aa2b070bf6be28535cf6107bead14bbf64bf9fa415346ab544bd1c15e1add7d1c6380e6b2def version.patch
6618ceb59f1927bb82ad1a0fe0a7d4c452ced7855d8f0953556fce9154f30a4c5afbd7a2ab07fb26e6e793b07d4c8f906f8dc27c1defe0580dcf1545c80d1d60 lxc.initd
65f688f98b0b6879c6616006f8a39cce7e406c19976487f8ed41fba27beeda4a13f0182960f677d919d4441d436f0cc79a2d34fa0fff86183553e4c266cc5e70 0001-alpinelinux-set-correct-lxc_arch-for-x86.patch"
diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in
index 962d274..ce7226f 100644
--- a/templates/lxc-alpine.in
+++ b/templates/lxc-alpine.in
@@ -1,20 +1,99 @@
#!/bin/sh
+key_sha256sums="9c102bcc376af1498d549b77bdbfa815ae86faa1d2d82f040e616b18ef2df2d4 alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub
+2adcf7ce224f476330b5360ca5edb92fd0bf91c92d83292ed028d7c4e26333ab alpine-devel@lists.alpinelinux.org-4d07755e.rsa.pub"
+
+get_static_apk () {
+ wget="wget -q -O -"
+ pkglist=alpine-keys:apk-tools-static
+ auto_repo_dir=
+
+ if [ -z "$repository" ]; then
+ url=http://wiki.alpinelinux.org/cgi-bin/dl.cgi
+ if [ -z "$release" ]; then
+ echo -n "Determining the latest release... "
+ release=$($wget $url/.latest.$apk_arch.txt | \
+ cut -d " " -f 3 | cut -d / -f 1 | uniq)
+ if [ -z "$release" ]; then
+ echo failed
+ return 1
+ fi
+ echo $release
+ fi
+ auto_repo_dir=$release/main
+ repository=$url/$auto_repo_dir
+ pkglist=$pkglist:alpine-mirrors
+ fi
+
+ rootfs="$1"
+ echo "Using static apk from $repository/$apk_arch"
+ wget="$wget $repository/$apk_arch"
+
+ # parse APKINDEX to find the current versions
+ static_pkgs=$($wget/APKINDEX.tar.gz | \
+ tar -Oxz APKINDEX | \
+ awk -F: -v pkglist=$pkglist '
+ BEGIN { split(pkglist,pkg) }
+ $0 != "" { f[$1] = $2 }
+ $0 == "" { for (i in pkg)
+ if (pkg[i] == f["P"])
+ print(f["P"] "-" f["V"] ".apk") }')
+ [ "$static_pkgs" ] || return 1
+
+ mkdir -p "$rootfs" || return 1
+ for pkg in $static_pkgs; do
+ echo "Downloading $pkg"
+ $wget/$pkg | tar -xz -C "$rootfs"
+ done
+
+ # clean up .apk meta files
+ rm -f "$rootfs"/.[A-Z]*
+
+ # verify checksum of the key
+ keyname=$(echo $rootfs/sbin/apk.static.*.pub | sed 's/.*\.SIGN\.RSA\.//')
+ checksum=$(echo "$key_sha256sums" | grep -w "$keyname")
+ if [ -z "$checksum" ]; then
+ echo "ERROR: checksum is missing for $keyname"
+ return 1
+ fi
+ (cd $rootfs/etc/apk/keys && echo "$checksum" | sha256sum -c -) || return 1
+
+ # verify the static apk binary signature
+ APK=$rootfs/sbin/apk.static
+ openssl dgst -verify $rootfs/etc/apk/keys/$keyname \
+ -signature "$APK.SIGN.RSA.$keyname" "$APK" || return 1
+
+ if [ "$auto_repo_dir" ]; then
+ mirror_list=$rootfs/usr/share/alpine-mirrors/MIRRORS.txt
+ mirror_count=$(wc -l $mirror_list | cut -d " " -f 1)
+ repository=$(sed $(expr $RANDOM % $mirror_count + 1)\!d \
+ $mirror_list)$auto_repo_dir
+ echo "Selecting mirror $repository"
+ fi
+}
+
install_alpine() {
rootfs="$1"
shift
mkdir -p "$rootfs"/etc/apk || return 1
- cp -r ${keys_dir:-/etc/apk/keys} "$rootfs"/etc/apk/
+ : ${keys_dir:=/etc/apk/keys}
+ if ! [ -d "$rootfs"/etc/apk/keys ] && [ -d "$keys_dir" ]; then
+ cp -r "$keys_dir" "$rootfs"/etc/apk/keys
+ fi
if [ -n "$repository" ]; then
echo "$repository" > "$rootfs"/etc/apk/repositories
else
cp /etc/apk/repositories "$rootfs"/etc/apk/repositories || return 1
+ if [ -n "$release" ]; then
+ sed -i -e "s:/[^/]\+/\([^/]\+\)$:/$release/\1:" \
+ "$rootfs"/etc/apk/repositories
+ fi
fi
opt_arch=
if [ -n "$apk_arch" ]; then
opt_arch="--arch $apk_arch"
fi
- ${APK:-apk} add -U --initdb --root $rootfs $opt_arch "$@" alpine-base
+ $APK add -U --initdb --root $rootfs $opt_arch "$@" alpine-base
}
configure_alpine() {
@@ -109,6 +188,7 @@ EOF
lxc.tty = 4
lxc.pts = 1024
lxc.utsname = $hostname
+lxc.cap.drop = sys_module mac_admin mac_override sys_time
# When using LXC with apparmor, uncomment the next line to run unconfined:
#lxc.aa_profile = unconfined
@@ -129,7 +209,7 @@ lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 5:2 rwm
# rtc
-lxc.cgroup.devices.allow = c 254:0 rwm
+lxc.cgroup.devices.allow = c 254:0 rm
# mounts point
lxc.mount.entry=proc proc proc nodev,noexec,nosuid 0 0
@@ -148,8 +228,10 @@ die() {
usage() {
cat >&2 <<EOF
-Usage: $(basename $0) [-h|--help] [-r|--repository <url>] [-a|--arch <arch>]
- -p|--path <path> -n|--name <name> [PKG...]
+Usage: $(basename $0) [-h|--help] [-r|--repository <url>]
+ [-R|--release <release>] [-a|--arch <arch>]
+ [--rootfs <rootfs>] -p|--path <path> -n|--name <name>
+ [PKG...]
EOF
}
@@ -165,6 +247,14 @@ optarg_check() {
}
default_path=@LXCPATH@
+release=
+arch=$(uname -m)
+
+# template mknods, requires root
+if [ $(id -u) -ne 0 ]; then
+ echo "$(basename $0): must be run as root" >&2
+ exit 1
+fi
while [ $# -gt 0 ]; do
opt="$1"
@@ -179,6 +269,11 @@ while [ $# -gt 0 ]; do
name=$1
shift
;;
+ --rootfs)
+ optarg_check $opt "$1"
+ rootfs=$1
+ shift
+ ;;
-p|--path)
optarg_check $opt "$1"
path=$1
@@ -189,6 +284,11 @@ while [ $# -gt 0 ]; do
repository=$1
shift
;;
+ -R|--release)
+ optarg_check $opt "$1"
+ release=$1
+ shift
+ ;;
-a|--arch)
optarg_check $opt "$1"
arch=$1
@@ -217,9 +317,11 @@ if [ -z "${path}" ]; then
path="${default_path}/${name}"
fi
-rootfs=`awk -F= '$1 ~ /^lxc.rootfs/ { print $2 }' "$path/config" 2>/dev/null`
if [ -z "$rootfs" ]; then
- rootfs="${path}/rootfs"
+ rootfs=`awk -F= '$1 ~ /^lxc.rootfs/ { print $2 }' "$path/config" 2>/dev/null`
+ if [ -z "$rootfs" ]; then
+ rootfs="${path}/rootfs"
+ fi
fi
lxc_arch=$arch
@@ -234,6 +336,11 @@ case "$arch" in
*) die "unsupported architecture: $arch";;
esac
+: ${APK:=apk}
+if ! which $APK >/dev/null; then
+ get_static_apk "$rootfs" || die "Failed to download a valid static apk"
+fi
+
install_alpine "$rootfs" "$@" || die "Failed to install rootfs for $name"
configure_alpine "$rootfs" "$name" || die "Failed to configure $name"
copy_configuration "$path" "$rootfs" "$name"
--- ./src/lxc/lxc-destroy.in.orig 2013-04-15 07:38:58.383545701 +0000
+++ ./src/lxc/lxc-destroy.in 2013-04-15 07:42:22.552123148 +0000
@@ -137,10 +137,10 @@
btrfs subvolume delete "$rootdev"
else
# In case rootfs is not under $lxc_path/$lxc_name, remove it
- rm -rf --one-file-system --preserve-root $rootdev
+ find $rootdev -xdev -delete
fi
fi
fi
# recursively remove the container to remove old container configuration
-rm -rf --one-file-system --preserve-root $lxc_path/$lxc_name
+find $lxc_path/$lxc_name -xdev -delete
--- ./src/lxc/lxc-shutdown.in.orig 2013-04-15 07:43:04.709177850 +0000
+++ ./src/lxc/lxc-shutdown.in 2013-04-15 07:45:43.213958405 +0000
@@ -118,11 +118,21 @@
exit 1
fi
+signal_reboot=INT
+signal_poweroff=PWR
+init_exe=$(readlink -f /proc/$pid/exe)
+case ${init_exe} in
+ */busybox)
+ signal_reboot=TERM
+ signal_poweroff=USR2
+ ;;
+esac
+
if [ $reboot -eq 1 ]; then
- kill -s INT $pid
+ kill -s $signal_reboot $pid
exit 0
else
- kill -s PWR $pid
+ kill -s $signal_poweroff $pid
fi
if [ $dowait -eq 0 ]; then
This diff is collapsed.
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/files/lxc.initd.2,v 1.5 2012/07/21 05:07:15 flameeyes Exp $
CONTAINER=${SVCNAME#*.}
command="/usr/bin/lxc-start"
pidfile="/var/run/lxc/$CONTAINER.pid"
extra_started_commands="reboot"
depend() {
need localmount
after firewall net
}
lxc_get_configfile() {
local i
for i in /var/lib/lxc/${CONTAINER}/config \
/etc/lxc/${CONTAINER}.conf \
/etc/lxc/${CONTAINER}/config; do
if [ -f "$i" ]; then
echo "$i"
return 0
fi
done
eerror "Unable to find a suitable configuration file."
eerror "If you set up the container in a non-standard"
eerror "location, please set the CONFIGFILE variable."
return 1
}
lxc_get_var() {
awk 'BEGIN { FS="[ \t]*=[ \t]*" } $1 == "'$1'" { print $2; exit }' ${CONFIGFILE}
}
checkconfig() {
if [ ${CONTAINER} = ${SVCNAME} ]; then
eerror "You have to create an init script for each container:"
eerror " ln -s lxc /etc/init.d/lxc.container"
return 1
fi
CONFIGFILE=${CONFIGFILE:-$(lxc_get_configfile)}
# no need to output anything, the function takes care of that.
[ -z "${CONFIGFILE}" ] && return 1
utsname=$(lxc_get_var lxc.utsname)
if [ "${CONTAINER}" != "${utsname}" ]; then
eerror "You should use the same name for the service and the"
eerror "lxc.utsname. Right now the lxc.utsname is set to ${utsname}"
return 1
fi
}
start() {
checkconfig || return 1
rm -f /var/log/lxc/${CONTAINER}.log
rootpath=$(lxc_get_var lxc.rootfs)
checkpath -d ${pidfile%/*}
ebegin "Starting container ${CONTAINER}"
start-stop-daemon --start $command \
--pidfile $pidfile \
-- \
--daemon \
--pidfile $pidfile \
--name ${CONTAINER} \
--rcfile ${CONFIGFILE} \
--logpriority WARN \
--logfile /var/log/lxc/${CONTAINER}.log \
|| eend $? || return $?
lxc-wait -n ${CONTAINER} -t 5 -s RUNNING
eend $?
}
stop() {
checkconfig || return 1
ebegin "Stopping container ${CONTAINER}"
start-stop-daemon --stop --pidfile ${pidfile} \
--retry ${POWEROFF_SIGNAL:-SIGUSR2}/${TIMEOUT:-30} \
--progress
eend $?
}
reboot() {
checkconfig || return 1
ebegin "Sending reboot signal to container $CONTAINER"
start-stop-daemon --signal ${RESTART_SIG:-SIGTERM} \
--pidfile ${pidfile}
eend $?
}
Fix version so apk-tools understand the .so version
(1.0.0.rc4 -> 1.0.0_rc4)
diff --git a/configure.ac b/configure.ac
index 498d69a..f52bf8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,7 +8,8 @@ m4_define([lxc_version_beta], [rc4])
m4_define([lxc_version_base], [lxc_version_major.lxc_version_minor.lxc_version_micro])
m4_define([lxc_version],
- [ifelse(lxc_version_beta, [], [lxc_version_base], [lxc_version_base.lxc_version_beta])])
+ [ifelse(lxc_version_beta, [], [lxc_version_base],
+ [lxc_version_base[_]lxc_version_beta])])])
AC_INIT([lxc], [lxc_version])
# Automatically generated by apkbuild-cpan, template 1
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-boolean
_pkgreal=boolean
pkgver=0.30
pkgrel=0
pkgdesc="Boolean support for Perl"
url="http://search.cpan.org/dist/boolean/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends=" "
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/I/IN/INGY/$_pkgreal-$pkgver.tar.gz"
_builddir="$srcdir/$_pkgreal-$pkgver"
prepare() {
cd "$_builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}
build() {
cd "$_builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
make && make test
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}
md5sums="f4f23302481e82402048a91a8fa2e078 boolean-0.30.tar.gz"
sha256sums="f46e7a6121d5728ef2ce285a82d1dde94f6dfa0b846a612db75b1dcd37b9fc7f boolean-0.30.tar.gz"
sha512sums="6ed9b40ddddeb6be401a7b79962569c4f443d8e9bac0282ad62e1cfebc897970cc8c35ea6c41187a158449211695bb88ac52d0edc46ae834f368336ac7fa5d3d boolean-0.30.tar.gz"
# Automatically generated by apkbuild-cpan, template 1
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-class-mix
_pkgreal=Class-Mix
pkgver=0.005
pkgrel=0
pkgdesc="dynamic class mixing"
url="http://search.cpan.org/dist/Class-Mix/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends="perl-params-classify"
cpanmakedepends=" "
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/Z/ZE/ZEFRAM/$_pkgreal-$pkgver.tar.gz"
_builddir="$srcdir/$_pkgreal-$pkgver"
prepare() {
cd "$_builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
perl Build.PL installdirs=vendor || return 1
}
build() {
cd "$_builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
./Build && ./Build test
}
package() {
cd "$_builddir"
./Build install destdir="$pkgdir" || return 1
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}
md5sums="7d6c4e70dea13678d845898a4a1565c0 Class-Mix-0.005.tar.gz"
sha256sums="054d0db62df90f22601f2a18fc84e9ca026d81601f5940b2fcc543e39d69b36b Class-Mix-0.005.tar.gz"
sha512sums="9486a8ec4f6b1a5483610cdac110eed219bb849e8895a350309167206f8caef4209abbbc340a467f4c3b2ca3afc6e2b49b66601110517b66684689f4d88d20c9 Class-Mix-0.005.tar.gz"
# Automatically generated by apkbuild-cpan, template 1
# Contributor: Francesco Colista <francesco.colista@gmail.com>
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=perl-convert-asn1
_pkgreal=Convert-ASN1
pkgver=0.26
pkgrel=0
pkgdesc="Convert between perl data structures and ASN.1 encoded packets"
url="http://search.cpan.org/dist/Convert-ASN1/"