diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-06-06 12:08:39 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-06-06 12:08:39 +0000 |
commit | d23eac883f7d3e3f659ce044d8bc9fa433cad080 (patch) | |
tree | 13a74a9a4247ba553687367168f7b300d326f0ee /testing/cfengine/alpinelinux.patch | |
parent | 56f383ebc4b5c983208b8b513964a3472ed37e7c (diff) | |
download | aports-d23eac883f7d3e3f659ce044d8bc9fa433cad080.tar.bz2 aports-d23eac883f7d3e3f659ce044d8bc9fa433cad080.tar.xz |
testing/cfengine: new aport
CFEngine Configuration Management
http://cfengine.com/
Diffstat (limited to 'testing/cfengine/alpinelinux.patch')
-rw-r--r-- | testing/cfengine/alpinelinux.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/testing/cfengine/alpinelinux.patch b/testing/cfengine/alpinelinux.patch new file mode 100644 index 0000000000..40c95aa412 --- /dev/null +++ b/testing/cfengine/alpinelinux.patch @@ -0,0 +1,72 @@ +diff --git a/masterfiles/libraries/cfengine_stdlib.cf b/masterfiles/libraries/cfengine_stdlib.cf +index 13d554f..24529e8 100644 +--- a/masterfiles/libraries/cfengine_stdlib.cf ++++ b/masterfiles/libraries/cfengine_stdlib.cf +@@ -2047,6 +2047,31 @@ package_update_command => "/usr/bin/pacman -S --noconfirm --noprogressbar --need + + ## + ++body package_method alpinelinux ++{ ++ package_changes => "individual"; ++ ++ package_list_command => "/sbin/apk info -v"; ++ ++ # Remember to escape special characters like | ++ ++ package_list_name_regex => "([^\s]+)-.*"; ++ package_list_version_regex => "[^\s]+-([^\s]+).*"; ++ ++ package_name_regex => "([^\s]+)-.*"; ++ package_version_regex => "[^\s]+-([^\s]+).*"; ++ ++ package_installed_regex => ".*"; ++ ++ package_name_convention => "$(name)-$(version)"; ++ ++ ++ package_add_command => "/sbin/apk add"; ++ package_delete_command => "/sbin/apk del"; ++} ++ ++## ++ + # Single bundle for all the similar managers simplifies promises + + body package_method generic +@@ -2186,6 +2211,18 @@ archlinux:: + package_add_command => "/usr/bin/pacman -S --noconfirm --noprogressbar --needed"; + package_delete_command => "/usr/bin/pacman -Rs --noconfirm"; + package_update_command => "/usr/bin/pacman -S --noconfirm --noprogressbar --needed"; ++ ++alpinelinux:: ++ package_changes => "individual"; ++ package_list_command => "/sbin/apk info -v"; ++ package_list_name_regex => "([^\s]+)-.*"; ++ package_list_version_regex => "[^\s]+-([^\s]+).*"; ++ package_name_regex => "([^\s]+)-.*"; ++ package_version_regex => "[^\s]+-([^\s]+).*"; ++ package_installed_regex => ".*"; ++ package_name_convention => "$(name)-$(version)"; ++ package_add_command => "/sbin/apk add"; ++ package_delete_command => "/sbin/apk del"; + } + + ## +diff --git a/src/sysinfo.c b/src/sysinfo.c +index 557f449..56046ba 100644 +--- a/src/sysinfo.c ++++ b/src/sysinfo.c +@@ -819,6 +819,12 @@ void OSClasses(void) + SetFlavour("UnitedLinux"); + } + ++ if (cfstat("/etc/alpine-release", &statbuf) != -1) ++ { ++ CfOut(cf_verbose, "", "This appears to be an AlpineLinux system.\n"); ++ SetFlavour("alpinelinux"); ++ } ++ + if (cfstat("/etc/gentoo-release", &statbuf) != -1) + { + CfOut(cf_verbose, "", "This appears to be a gentoo system.\n"); |