From 2168077d11bc9da6bbb0bbf16197c6fd000f2f0f Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Dec 2010 11:23:33 +0100 Subject: [PATCH] xbps-src: added new var 'system_groups' for pkgs requiring new system groups. --- xbps-src/shutils/metadata.sh | 8 ++++---- xbps-src/shutils/metadata_scripts.sh | 8 +++++++- xbps-src/shutils/tmpl_funcs.sh.in | 3 ++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/xbps-src/shutils/metadata.sh b/xbps-src/shutils/metadata.sh index e940c950796..53dabcd0a77 100644 --- a/xbps-src/shutils/metadata.sh +++ b/xbps-src/shutils/metadata.sh @@ -54,10 +54,10 @@ xbps_write_metadata_pkg() fi setup_tmpl ${sourcepkg} unset run_depends conf_files noarch triggers replaces \ - revision openrc_services system_accounts \ + revision openrc_services system_accounts system_groups \ preserve keep_empty_dirs xml_entries sgml_entries \ xml_catalogs sgml_catalogs gconf_entries gconf_schemas \ - gtk_iconcache_dirs font_dirs + gtk_iconcache_dirs font_dirs dkms_modules . $XBPS_SRCPKGDIR/${sourcepkg}/${subpkg}.template pkgname=${subpkg} set_tmpl_common_vars @@ -303,9 +303,9 @@ _EOF fi # - # If package sets $system_accounts, add shadow rundep. + # If package sets $system_accounts or $system_groups, add shadow rundep. # - if [ -n "$system_accounts" ]; then + if [ -n "$system_accounts" -o -n "$system_groups" ]; then Add_dependency run shadow fi diff --git a/xbps-src/shutils/metadata_scripts.sh b/xbps-src/shutils/metadata_scripts.sh index eaad1ced9d8..ea9d25f924b 100644 --- a/xbps-src/shutils/metadata_scripts.sh +++ b/xbps-src/shutils/metadata_scripts.sh @@ -92,6 +92,13 @@ _EOF echo "export openrc_services=\"${openrc_services}\"" >> $tmpf fi + # + # Handle system groups. + # + if [ -n "${system_groups}" ]; then + _add_trigger system-accounts + echo "export system_groups=\"${system_groups}\"" >> $tmpf + fi # # Handle system accounts. # @@ -118,7 +125,6 @@ _EOF unset homedir shell descr groups done fi - # # Handle GNU Info files. # diff --git a/xbps-src/shutils/tmpl_funcs.sh.in b/xbps-src/shutils/tmpl_funcs.sh.in index 3fc55176f12..9d0f0bf42a4 100644 --- a/xbps-src/shutils/tmpl_funcs.sh.in +++ b/xbps-src/shutils/tmpl_funcs.sh.in @@ -74,7 +74,8 @@ reset_tmpl_vars() only_for_archs conf_files keep_libtool_archives \ noarch subpackages sourcepkg gtk_iconcache_dirs \ abi_depends api_depends triggers openrc_services \ - replaces system_accounts build_wrksrc create_wrksrc \ + replaces system_accounts system_groups \ + build_wrksrc create_wrksrc \ ignore_vdeps_dir noverifyrdeps conflicts dkms_modules \ gconf_entries gconf_schemas stow_copy stow_copy_files \ pre_remove post_remove post_stow do_build do_install \