summaryrefslogtreecommitdiffstats
path: root/main/openrc
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-11-08 15:57:47 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-11-08 15:59:06 +0000
commit2328886972a8525946787dc3d663a59484dae204 (patch)
treece8be55934b229a774ea628e8fa7f7bb50a71e85 /main/openrc
parent3a47d1a31dc1dc827cb803b18a557b4e59096b2b (diff)
downloadaports-2328886972a8525946787dc3d663a59484dae204.tar.bz2
aports-2328886972a8525946787dc3d663a59484dae204.tar.xz
main/openrc: fix lxc detection
Diffstat (limited to 'main/openrc')
-rw-r--r--main/openrc/APKBUILD4
-rw-r--r--main/openrc/rc-sys-lxc.patch39
2 files changed, 42 insertions, 1 deletions
diff --git a/main/openrc/APKBUILD b/main/openrc/APKBUILD
index 2cf5d626a..eea2cc3f4 100644
--- a/main/openrc/APKBUILD
+++ b/main/openrc/APKBUILD
@@ -2,7 +2,7 @@
pkgname=openrc
pkgver=0.10.5
_ver=${pkgver/_git*/}
-pkgrel=3
+pkgrel=4
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git"
arch="all"
@@ -16,6 +16,7 @@ source="http://distfiles.gentoo.org/distfiles/$pkgname-$_ver.tar.bz2
0001-Force-root-be-rw-before-localmount.patch
swap-umount-tmpfs.patch
swap-ifexists.patch
+ rc-sys-lxc.patch
hostname.initd
hwdrivers.initd
@@ -67,6 +68,7 @@ md5sums="720341f7be2ec2f118a792e29e030e2d openrc-0.10.5.tar.bz2
4fd036ff07ed9ad7fb76af6a3ffc0695 0001-Force-root-be-rw-before-localmount.patch
c2af5e52da614a6cef02d1e4d537e360 swap-umount-tmpfs.patch
1c426b84d13a725ad493647b5253f239 swap-ifexists.patch
+4a2ec4d9d988423fdafc332d2174ecdf rc-sys-lxc.patch
c32e15b0858eef708497e7ee6355a055 hostname.initd
78e9f0df010ac8095c5e76a91a1d3b12 hwdrivers.initd
33ca3e558c42cdd17adccbc7807298f7 keymaps.initd
diff --git a/main/openrc/rc-sys-lxc.patch b/main/openrc/rc-sys-lxc.patch
new file mode 100644
index 000000000..c693245d3
--- /dev/null
+++ b/main/openrc/rc-sys-lxc.patch
@@ -0,0 +1,39 @@
+diff --git a/src/librc/librc.c b/src/librc/librc.c
+index d82880f..40b975a 100644
+--- a/src/librc/librc.c
++++ b/src/librc/librc.c
+@@ -168,7 +168,7 @@ file_regex(const char *file, const char *regex)
+ char *line = NULL;
+ size_t len = 0;
+ regex_t re;
+- bool retval = false;
++ bool retval = true;
+ int result;
+
+ if (!(fp = fopen(file, "r")))
+@@ -184,11 +184,21 @@ file_regex(const char *file, const char *regex)
+ }
+
+ while ((rc_getline(&line, &len, fp))) {
+- if (regexec(&re, line, 0, NULL, 0) == 0)
+- retval = true;
+- if (retval)
+- break;
++ char *str = line;
++ /* some /proc files have \0 separated content so we have to
++ loop through the 'line' */
++ do {
++ if (regexec(&re, str, 0, NULL, 0) == 0)
++ goto found;
++ str += strlen(str) + 1;
++ /* len is the size of allocated buffer and we don't
++ want call regexec BUFSIZE times. find next str */
++ while (*str == '\0' && str < line + len)
++ str++;
++ } while (str < line + len);
+ }
++ retval = false;
++found:
+ fclose(fp);
+ free(line);
+ regfree(&re);