[gentoo-commits] proj/eselect:extern commit in: modules/
commit: 4fd0650ed9ef4cec5477038fcfb2e59db2cf2b93 Author: Patrick McLean sony com> AuthorDate: Sat May 9 02:21:40 2020 + Commit: Patrick McLean gentoo org> CommitDate: Sat May 9 02:22:21 2020 + URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=4fd0650e modules/iptables.eselect: Complete rewrite, solve issues in bug #721578 Signed-off-by: Patrick McLean sony.com> modules/iptables.eselect | 320 +++ 1 file changed, 214 insertions(+), 106 deletions(-) diff --git a/modules/iptables.eselect b/modules/iptables.eselect index f94b25c..e3e5906 100644 --- a/modules/iptables.eselect +++ b/modules/iptables.eselect @@ -2,43 +2,128 @@ # Copyright 2005-2020 Gentoo Authors # Distributed under the terms of the GNU GPL version 2 or later -DESCRIPTION="Manage the iptables and ip6tables symlink" -AUTHOR="ch...@christopherpritchard.co.uk" +inherit package-manager + +DESCRIPTION="Manage the iptables/arptables/ebtables symlinks" MAINTAINER="base-sys...@gentoo.org" -VERSION="20200319" +VERSION="20200508" + +# a simple list of symlinks does for iptables +IPTABLES_SYMLINKS=( + "iptables-xml" + "iptables" "iptables-restore" "iptables-save" +) +IP6TABLES_SYMLINKS=( + "ip6tables" "ip6tables-restore" "ip6tables-save" +) + +# for arptables and ebtables we map names to legacy targets +ARPTABLES_TARGETS=( + "arptables-legacy" + "xtables-nft-multi" +) +declare -A ARPTABLES_SYMLINKS=( + [arptables]="arptables-legacy" + [arptables-restore]="arptables-legacy-restore" + [arptables-save]="arptables-legacy-save" +) + +EBTABLES_TARGETS=( + "ebtables-legacy" + "xtables-nft-multi" +) +declare -A EBTABLES_SYMLINKS=( + [ebtables]="ebtables-legacy" + [ebtables-restore]="ebtables-legacy-restore" + [ebtables-save]="ebtables-legacy-save" +) -IPTABLES_TARGETS=("iptables" "iptables-restore" "iptables-save") -IP6TABLES_TARGETS=("ip6tables" "ip6tables-restore" "ip6tables-save") +# get which module is running +get_module() { + local module + module="${BASH_SOURCE[0]##*/}" -# find a list of xtables symlink targets + printf -- '%s\n' "${module%.eselect}" +} + +# find a list of symlink targets for the current module find_targets() { - local f - for f in "${EROOT}"/sbin/xtables-*-multi; do - [[ -f ${f} ]] && basename "${f}" - done + local module target + + module="$(get_module)" + case "${module}" in + iptables) + for target in "${EROOT}"/sbin/xtables-*-multi; do + [[ -x ${target} ]] && printf -- '%s\n' "${target##*/}" + done + ;; + arptables) + for target in "${ARPTABLES_TARGETS[@]}"; do + [[ -x ${EROOT}/sbin/${target} ]] && printf -- '%s\n' "${target}" + done + ;; + ebtables) + for target in "${EBTABLES_TARGETS[@]}"; do + [[ -x ${EROOT}/sbin/${target} ]] && printf -- '%s\n' "${target}" + done + ;; + *) die "Invalid module name ${module}" + esac } -# remove the iptables symlink -remove_symlinks() { - local ipt - for ipt in "${IPTABLES_TARGETS[@]}"; do - rm -f "${EROOT}/sbin/${ipt}" &>/dev/null - done - if [[ -n ${ipv6} && -n ${ipv6_remove} ]]; then - local ip6t - for ip6t in "${IP6TABLES_TARGETS[@]}"; do - rm -f "${EROOT}/sbin/${ip6t}" &>/dev/null - done - fi +# get the list of symlinks for the current module +get_symlinks_list() { + local module + module="$(get_module)" + + case "${module}" in + iptables) + printf -- '%s\n' "${IPTABLES_SYMLINKS[@]}" + + if [[ ${1} == -a ]] || has_version 'net-firewall/iptables[ipv6]' + then + printf -- '%s\n' "${IP6TABLES_SYMLINKS[@]}" + fi + ;; + arptables) printf -- '%s\n' "${!ARPTABLES_SYMLINKS[@]}";; + ebtables) printf -- '%s\n' "${!EBTABLES_SYMLINKS[@]}";; + *) die "Invalid module name ${module}" + esac +} + +# get the symlink target given a symlink name and the target implementation +get_symlink_target() { + local link="${1}" target="${2}" module + module="$(get_module)" + + case "${module}" in + iptables) printf -- '%s\n' "${target}";; + arptables) + if [[ ${target} == *-legacy ]]; then + printf -- '%s\n' "${ARPTABLES_SYMLINKS[${link}]}" + else + printf -- '%s\n' "${target}" +
[gentoo-commits] proj/eselect:extern commit in: modules/, /
commit: f473cb298779981b8ec6c522165f41562d67548a Author: Mike Gilbert gentoo org> AuthorDate: Fri May 8 04:28:39 2020 + Commit: Mike Gilbert gentoo org> CommitDate: Fri May 8 04:30:03 2020 + URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=f473cb29 iptables.eselect: new module Bug: https://bugs.gentoo.org/698746 Signed-off-by: Mike Gilbert gentoo.org> AUTHORS | 3 + modules/iptables.eselect | 175 +++ 2 files changed, 178 insertions(+) diff --git a/AUTHORS b/AUTHORS index 77f5bdb..ded9cae 100644 --- a/AUTHORS +++ b/AUTHORS @@ -36,3 +36,6 @@ Ben de Groot Alexandre Rostovtsev Modules:gnome-shell-extensions + +Chris Pritchard +Modules:iptables diff --git a/modules/iptables.eselect b/modules/iptables.eselect new file mode 100644 index 000..f94b25c --- /dev/null +++ b/modules/iptables.eselect @@ -0,0 +1,175 @@ +# -*-eselect-*- vim: ft=eselect +# Copyright 2005-2020 Gentoo Authors +# Distributed under the terms of the GNU GPL version 2 or later + +DESCRIPTION="Manage the iptables and ip6tables symlink" +AUTHOR="ch...@christopherpritchard.co.uk" +MAINTAINER="base-sys...@gentoo.org" +VERSION="20200319" + +IPTABLES_TARGETS=("iptables" "iptables-restore" "iptables-save") +IP6TABLES_TARGETS=("ip6tables" "ip6tables-restore" "ip6tables-save") + +# find a list of xtables symlink targets +find_targets() { + local f + for f in "${EROOT}"/sbin/xtables-*-multi; do + [[ -f ${f} ]] && basename "${f}" + done +} + +# remove the iptables symlink +remove_symlinks() { + local ipt + for ipt in "${IPTABLES_TARGETS[@]}"; do + rm -f "${EROOT}/sbin/${ipt}" &>/dev/null + done + if [[ -n ${ipv6} && -n ${ipv6_remove} ]]; then + local ip6t + for ip6t in "${IP6TABLES_TARGETS[@]}"; do + rm -f "${EROOT}/sbin/${ip6t}" &>/dev/null + done + fi +} + +# set the iptables symlink +set_symlinks() { + local target="${1}" + + if is_number "${target}" && [[ ${target} -ge 1 ]]; then + local -a targets + readarray -t targets <<< "$(find_targets)" + target=${targets[$((target-1))]} + fi + + if [[ -z ${target} || ! -f ${EROOT}/sbin/${target} ]]; then + die -q "Target \"${target}\" doesn't appear to be valid!" + fi + + local ipt + for ipt in "${IPTABLES_TARGETS[@]}"; do + ln -s "${target}" "${EROOT}/sbin/${ipt}" + done + + if [[ -n ${ipv6} ]]; then + local ip6t + for ip6t in "${IP6TABLES_TARGETS[@]}"; do + ln -s "${target}" "${EROOT}/sbin/${ip6t}" + done + fi +} + +### show action ### + +describe_show() { + echo "Show the current iptables symlink" +} + +do_show() { + local ipv6 + if [[ -d ${EROOT}/var/lib/ip6tables ]]; then + ipv6=1 + fi + write_list_start "Current iptables symlinks:" + local ipt all_unset=1 + for ipt in "${IPTABLES_TARGETS[@]}"; do + if [[ -L ${EROOT}/sbin/${ipt} ]]; then + local ipta + ipta=$(canonicalise "${EROOT}/sbin/${ipt}") + write_kv_list_entry "${ipt}" "${ipta%/}" + all_unset=0 + else + write_kv_list_entry "${ipt}" "(unset)" + fi + done + if [[ ${ipv6} -eq 1 ]]; then + write_list_start "Current ip6tables symlinks:" + local ip6t + for ip6t in "${IP6TABLES_TARGETS[@]}"; do + if [[ -L ${EROOT}/sbin/${ip6t} ]]; then + local ipta + ipta=$(canonicalise "${EROOT}/sbin/${ip6t}") + write_kv_list_entry "${ip6t}" "${ipta%/}" + all_unset=0 + else + write_kv_list_entry "${ip6t}" "(unset)" + fi + done + fi + return "${all_unset}" +} +### list action ### + +describe_list() { + echo "List available iptables symlink targets" +} + +do_list() { + local ipv6 + local -a targets + readarray -t targets <<< "$(find_targets)" + if [[ -L ${EROOT}/var/lib/ip6tables ]]; then + ipv6=1 + fi + write_list_start "Available iptables symlink targets:" + local i + for (( i = 0; i < ${#targets[@]}; i++ )); do + # highlight the target where the symlink is pointing to + [[ ${targets[i]} = \ + $(basename "$(canonicalise "${EROOT}/sbin/iptables")") ]] \ + && targets[i]=$(highlight_marker "${targets[i]}") + done + write_numbered_list -m "(none found)" "${targets[@]}"
[gentoo-commits] proj/eselect:extern commit in: modules/
commit: 401eb00243cf700210d11b58d3603bc41545b141 Author: Ulrich Müller gentoo org> AuthorDate: Thu Aug 30 16:48:18 2018 + Commit: Ulrich Müller gentoo org> CommitDate: Thu Aug 30 16:48:18 2018 + URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=401eb002 wxwidgets.eselect: Update version number. modules/wxwidgets.eselect | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/wxwidgets.eselect b/modules/wxwidgets.eselect index b1abc1c..dc13704 100644 --- a/modules/wxwidgets.eselect +++ b/modules/wxwidgets.eselect @@ -6,7 +6,7 @@ inherit config multilib DESCRIPTION="Manage the system default wxWidgets profile" MAINTAINER="wxwidg...@gentoo.org" -VERSION="20140423" +VERSION="20180529" WXCONFFILE="${EROOT}"/var/lib/wxwidgets/current
[gentoo-commits] proj/eselect:extern commit in: modules/, /
commit: 4f487d6cc395f03963f4bb7a68bde985dd73b4a3 Author: Ulrich Müller gentoo org> AuthorDate: Tue May 29 17:10:45 2018 + Commit: Ulrich Müller gentoo org> CommitDate: Thu Aug 30 16:44:55 2018 + URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=4f487d6c wxwidgets.eselect: Fix libdir usage. * modules/wxwidgets.eselect: Inherit multilib library (bug 552500). (get_confdir): New function, outputs path of wx config dir. (do_list, do_set, do_update): Use it. ChangeLog | 6 ++ modules/wxwidgets.eselect | 12 +--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6de155b..b12c381 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-05-29 Ulrich Müller + + * modules/wxwidgets.eselect: Inherit multilib library (bug 552500). + (get_confdir): New function, outputs path of wx config dir. + (do_list, do_set, do_update): Use it. + 2018-03-06 Ulrich Müller * modules/gnome-shell-extensions.eselect: Inherit tests library. diff --git a/modules/wxwidgets.eselect b/modules/wxwidgets.eselect index 55d49d2..b1abc1c 100644 --- a/modules/wxwidgets.eselect +++ b/modules/wxwidgets.eselect @@ -1,15 +1,18 @@ # -*-eselect-*- vim: ft=eselect -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -inherit config +inherit config multilib DESCRIPTION="Manage the system default wxWidgets profile" MAINTAINER="wxwidg...@gentoo.org" VERSION="20140423" WXCONFFILE="${EROOT}"/var/lib/wxwidgets/current -WXCONFDIR="${EROOT}"/usr/lib/wx/config + +get_confdir() { + echo "${EROOT}/usr/$(get_libdir)/wx/config" +} find_targets() { local conf @@ -89,6 +92,7 @@ describe_list() { } do_list() { + local WXCONFDIR=$(get_confdir) local i targets currconf targets=( $(find_targets) ) [[ -e ${WXCONFFILE} ]] && currconf=$(load_config ${WXCONFFILE} WXCONFIG) @@ -123,6 +127,7 @@ do_set() { [[ ! -w "${EROOT}"/var/lib/ ]] \ && die -q "You need write permission to /var/lib to perform this action." + local WXCONFDIR=$(get_confdir) set_config "${1}" } @@ -133,6 +138,7 @@ describe_update() { do_update() { [[ ! -e ${WXCONFFILE} ]] && do_set none + local WXCONFDIR=$(get_confdir) currconf=$(load_config ${WXCONFFILE} WXCONFIG) # if current config is valid leave it alone
[gentoo-commits] proj/eselect:extern commit in: modules/
commit: 235ec226de279967e6bd38fccbe2c6f074f498c3 Author: Alexandre Rostovtsev gentoo org> AuthorDate: Sat Nov 5 06:13:42 2011 + Commit: Ulrich Müller gentoo org> CommitDate: Tue Mar 6 16:58:08 2018 + URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=235ec226 gnome-shell-extensions.eselect: Retroactively import version 20110911. Taken from: https://dev.gentoo.org/~tetromino/distfiles/eselect-gnome-shell-extensions/eselect-gnome-shell-extensions-20110911.tar.xz modules/gnome-shell-extensions.eselect | 305 + 1 file changed, 305 insertions(+) diff --git a/modules/gnome-shell-extensions.eselect b/modules/gnome-shell-extensions.eselect new file mode 100644 index 000..2b73c57 --- /dev/null +++ b/modules/gnome-shell-extensions.eselect @@ -0,0 +1,305 @@ +# -*-eselect-*- vim: ft=eselect +# Copyright 2009-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 or later +# $Id: $ + +DESCRIPTION="Manage default settings for systemwide GNOME Shell extensions" +AUTHOR="tetrom...@gentoo.org" +MAINTAINER="gn...@gentoo.org" +SVN_DATE='$Date: 2011/09/11 18:00:00 -0400 $' +VERSION=$(svn_date_to_version "${SVN_DATE}") + +# +# Basic idea: eselect manages a gschema override file located in +# /etc/eselect/gnome-shell-extensions/ that overrides GNOME Shell's +# 'disabled-extensions' or 'enabled-extensions' (depending on +# current shell version) GSettings key; the override file is +# symlinked from /usr/share/glib-2.0/schemas/ +# + +gse_prepare() { + XDG_DATA_DIRS=${XDG_DATA_DIRS:="${EROOT}/usr/local/share:${EROOT}/usr/share"} + ETCDIR="${EROOT}/etc/eselect/gnome-shell-extensions" + SCHEMADIR="${EROOT}/usr/share/glib-2.0/schemas" + OVERRIDE_FILE="eselect-gnome-shell-extensions.gschema.override" + CONFIG_FILE="config" + if [[ ! -d "${SCHEMADIR}" ]]; then + die -q "No ${SCHEMADIR} directory." + elif [[ ! -d "${ETCDIR}" ]]; then + die -q "No ${ETCDIR} directory." + fi + + warnings=() + errors=() + available=() + available_dirs=() + enabled=() + + if [[ -e "${ETCDIR}/${CONFIG_FILE}" ]]; then + source "${ETCDIR}/${CONFIG_FILE}" || die -q "Failed to source ${ETCDIR}/${CONFIG_FILE}" + enabled=( "${enabled_saved[@]}" ) + fi +} + +has() { + # Copied from portage's isolated-functions.sh + local needle=$1 + shift + + local x + for x in "$@"; do + [[ "${x}" = "${needle}" ]] && return 0 + done + return 1 +} + +gse_print_warnings() { + local n + + for (( n = 0; n < ${#warnings[@]}; ++n )); do + write_warning_msg "${warnings[n]}" + done + + for (( n = 0; n < ${#errors[@]}-1; ++n )); do + write_error_msg "${errors[n]}" + done + [[ ${#errors[@]} = 0 ]] && return + die -q "${errors[n]}" +} + +gse_die() { + errors=( "${errors[@]}" "$@" ) + gse_print_warnings + die # should not happen... +} + +gse_read_available() { + local d + + gse_prepare + # Do not expand * to '*' if $p is empty + shopt -s nullglob + + for p in $(echo "${XDG_DATA_DIRS}" | tr -s ':' '\n'); do + pushd "${p}/gnome-shell/extensions" &> /dev/null || continue + for d in *; do + local full_d="${p}/gnome-shell/extensions/${d}" + # skip invalid extension directories + if ! [[ -d "${d}" && -f "${d}/metadata.json" && -s "${d}/metadata.json" ]]; then + warnings=( "${warnings[@]}" "${full_d} is not a valid extension" ) + continue + fi + # earlier entries in XDG_DATA_DIRS take precedence + if has "${d}" "${available[@]}"; then + warnings=( "${warnings[@]}" "Skipping ${full_d}" ) + continue + fi + available_dirs=( "${available_dirs[@]}" "${full_d}" ) + available=( "${available[@]}" "${d}" ) + done + popd > /dev/null + done + # Sort $available + if [[ -n "${available[@]}" ]]; then + eval available=( $(printf '%q\n' "${available[@]}" | sort ) ) + fi +} + +gse_write_config_file() { + local f="${ETCDIR}/${CONFIG_FILE}" + + # Sort and uniquefy $enabled + eval enabled_saved=( $(printf '%q\n' "${enabled[@]}" | sort -u ) ) + + if [[ -e "${f}" ]]; then + [[ -f "${f}" && -w "${f}" ]] || gse_die "${f} is not writable" + else + [[ -w "${ETCDIR}" ]] || gse_die "${ETCDIR} is not writable" + fi + + cat > "${f}" <=gnome-shell-3.1.90 uses 'enabled-extensions' key +
[gentoo-commits] proj/eselect:extern commit in: modules/
commit: 584b5a7d957c93a0bc620e3e15bc763ecc9d3a28 Author: Alexandre Rostovtsev gentoo org> AuthorDate: Sun Dec 11 23:20:39 2011 + Commit: Ulrich Müller gentoo org> CommitDate: Tue Mar 6 16:58:42 2018 + URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=584b5a7d gnome-shell-extensions.eselect: Retroactively import version 20111211. Taken from: https://dev.gentoo.org/~tetromino/distfiles/eselect-gnome-shell-extensions/eselect-gnome-shell-extensions-20111211.tar.xz modules/gnome-shell-extensions.eselect | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/gnome-shell-extensions.eselect b/modules/gnome-shell-extensions.eselect index 2b73c57..41123a2 100644 --- a/modules/gnome-shell-extensions.eselect +++ b/modules/gnome-shell-extensions.eselect @@ -6,7 +6,7 @@ DESCRIPTION="Manage default settings for systemwide GNOME Shell extensions" AUTHOR="tetrom...@gentoo.org" MAINTAINER="gn...@gentoo.org" -SVN_DATE='$Date: 2011/09/11 18:00:00 -0400 $' +SVN_DATE='$Date: 2011/12/11 19:00:00 -0400 $' VERSION=$(svn_date_to_version "${SVN_DATE}") # @@ -38,6 +38,18 @@ gse_prepare() { if [[ -e "${ETCDIR}/${CONFIG_FILE}" ]]; then source "${ETCDIR}/${CONFIG_FILE}" || die -q "Failed to source ${ETCDIR}/${CONFIG_FILE}" enabled=( "${enabled_saved[@]}" ) + # Handle the *.gnome.org → *.gcampax.github.com renaming in 3.2.2 + local e + for e in "${enabled_saved[@]}"; do + case "${e}" in + *.gnome.org ) + local renamed_e=${e/%.gnome.org/.gcampax.github.com} + if ! has "${renamed_e}" "${enabled[@]}"; then + enabled=( "${enabled[@]}" "${renamed_e}" ) + fi + ;; + esac + done fi }
[gentoo-commits] proj/eselect:extern commit in: modules/
commit: ac014b5457ebd04df8be3d0923b9658c48410478 Author: Alexandre Rostovtsev gentoo org> AuthorDate: Sun Sep 11 18:32:40 2011 + Commit: Ulrich Müller gentoo org> CommitDate: Tue Mar 6 16:59:55 2018 + URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=ac014b54 gnome-shell-extensions.eselect: Retroactively import version 20120911. Taken from: https://dev.gentoo.org/~tetromino/distfiles/eselect-gnome-shell-extensions/eselect-gnome-shell-extensions-20120911.tar.xz modules/gnome-shell-extensions.eselect | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gnome-shell-extensions.eselect b/modules/gnome-shell-extensions.eselect index 41123a2..788b459 100644 --- a/modules/gnome-shell-extensions.eselect +++ b/modules/gnome-shell-extensions.eselect @@ -6,7 +6,7 @@ DESCRIPTION="Manage default settings for systemwide GNOME Shell extensions" AUTHOR="tetrom...@gentoo.org" MAINTAINER="gn...@gentoo.org" -SVN_DATE='$Date: 2011/12/11 19:00:00 -0400 $' +SVN_DATE='$Date: 2012/09/11 15:00:00 -0400 $' VERSION=$(svn_date_to_version "${SVN_DATE}") # @@ -169,7 +169,7 @@ gse_write_override_file() { [org.gnome.shell] ${key}=[${value}] EOF - glib-compile-schemas "${SCHEMADIR}" || gse_die "Failed to compile schemas in ${SCHEMADIR}" + glib-compile-schemas "${SCHEMADIR}" &> /dev/null || gse_die "'glib-compile-schemas \"${SCHEMADIR}\"' failed" } gse_get_name() {
[gentoo-commits] proj/eselect:extern commit in: modules/, /
commit: 69bb5c568747742622d813d1a6403f7c01dcde20 Author: Ulrich Müller gentoo org> AuthorDate: Tue Mar 6 17:22:39 2018 + Commit: Ulrich Müller gentoo org> CommitDate: Tue Mar 6 17:22:39 2018 + URL:https://gitweb.gentoo.org/proj/eselect.git/commit/?id=69bb5c56 gnome-shell-extensions.eselect: Do not call eval. * modules/gnome-shell-extensions.eselect: Inherit tests library. (has): Remove, it is inherited from tests now. (gse_read_available, gse_write_config_file): Do not call eval, fixes bug #643498. (VERSION): Update. Remove SVN keywords. ChangeLog | 8 modules/gnome-shell-extensions.eselect | 27 +-- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index d8a4855..6de155b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2018-03-06 Ulrich Müller+ + * modules/gnome-shell-extensions.eselect: Inherit tests library. + (has): Remove, it is inherited from tests now. + (gse_read_available, gse_write_config_file): Do not call eval, + fixes bug #643498. + (VERSION): Update. Remove SVN keywords. + 2014-11-22 Ben de Groot * modules/vi.eselect: apply patch from 1.1.7-r1 diff --git a/modules/gnome-shell-extensions.eselect b/modules/gnome-shell-extensions.eselect index 788b459..fe9af12 100644 --- a/modules/gnome-shell-extensions.eselect +++ b/modules/gnome-shell-extensions.eselect @@ -1,13 +1,13 @@ # -*-eselect-*- vim: ft=eselect -# Copyright 2009-2011 Gentoo Foundation +# Copyright 2009-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 or later -# $Id: $ + +inherit tests DESCRIPTION="Manage default settings for systemwide GNOME Shell extensions" AUTHOR="tetrom...@gentoo.org" MAINTAINER="gn...@gentoo.org" -SVN_DATE='$Date: 2012/09/11 15:00:00 -0400 $' -VERSION=$(svn_date_to_version "${SVN_DATE}") +VERSION="20180306" # # Basic idea: eselect manages a gschema override file located in @@ -53,18 +53,6 @@ gse_prepare() { fi } -has() { - # Copied from portage's isolated-functions.sh - local needle=$1 - shift - - local x - for x in "$@"; do - [[ "${x}" = "${needle}" ]] && return 0 - done - return 1 -} - gse_print_warnings() { local n @@ -113,7 +101,8 @@ gse_read_available() { done # Sort $available if [[ -n "${available[@]}" ]]; then - eval available=( $(printf '%q\n' "${available[@]}" | sort ) ) + local IFS=$'\n' + available=( $(echo "${available[*]}" | sort ) ) fi } @@ -121,7 +110,9 @@ gse_write_config_file() { local f="${ETCDIR}/${CONFIG_FILE}" # Sort and uniquefy $enabled - eval enabled_saved=( $(printf '%q\n' "${enabled[@]}" | sort -u ) ) + local ifs_save=${IFS} IFS=$'\n' + enabled_saved=( $(echo "${enabled[*]}" | sort -u ) ) + IFS=${ifs_save} if [[ -e "${f}" ]]; then [[ -f "${f}" && -w "${f}" ]] || gse_die "${f} is not writable"
[gentoo-commits] proj/eselect:extern commit in: modules/
commit: abc77eb3cee687b3743160126eb8b2f070fc9e96 Author: Ben de Groot yngwin AT gentoo DOT org AuthorDate: Thu Feb 26 06:52:43 2015 + Commit: Ben de Groot yngwin AT gentoo DOT org CommitDate: Thu Feb 26 06:52:43 2015 + URL: http://sources.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=abc77eb3 Add neovim as option to vi.eselect --- modules/vi.eselect | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/vi.eselect b/modules/vi.eselect index 573ab11..2d25859 100644 --- a/modules/vi.eselect +++ b/modules/vi.eselect @@ -1,16 +1,17 @@ # -*-eselect-*- vim: ft=eselect -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 DESCRIPTION=Manage /usr/bin/vi implementations MAINTAINER=v...@gentoo.org -VERSION=1.1.8 +VERSION=1.1.9 # find a list of vi symlink targets, best first find_targets() { local f for f in \ ${EROOT}/usr/bin/vim \ + ${EROOT}/usr/bin/nvim \ ${EROOT}/usr/bin/nvi \ ${EROOT}/usr/bin/elvis \ ${EROOT}/usr/bin/vile \
[gentoo-commits] proj/eselect:extern commit in: modules/
commit: ed6aba2197f929f3a406479a3a6fcd4afcad1a82 Author: Michał Górny mgorny AT gentoo DOT org AuthorDate: Mon Dec 8 22:57:42 2014 + Commit: Michał Górny mgorny AT gentoo DOT org CommitDate: Mon Dec 8 22:58:21 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=ed6aba21 opengl: create xorg.conf.d directory if missing --- modules/opengl.eselect | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/opengl.eselect b/modules/opengl.eselect index 40b448e..6e3df4f 100644 --- a/modules/opengl.eselect +++ b/modules/opengl.eselect @@ -17,7 +17,7 @@ DESCRIPTION=Manage the OpenGL implementation used by your system MAINTAINER=x...@gentoo.org SVN_DATE='$Date$' VERSION=$(svn_date_to_version ${SVN_DATE} ) -EBUILD_VERSION=1.3.0 +EBUILD_VERSION=1.3.1 # Our data ENV_FILE=${EROOT}/etc/env.d/000opengl @@ -143,6 +143,7 @@ set_new_implementation() { store_config ${ENV_FILE} LDPATH ${ldpath} store_config ${ENV_FILE} OPENGL_PROFILE ${gl_implem} + mkdir -p ${XORGD_FILE%/*} || die write_xorg_confd ${xorgmodpath[@]} ${XORGD_FILE} do_action env update /dev/null
[gentoo-commits] proj/eselect:extern commit in: modules/
commit: 5016bc0e375b70c576539812c7c1d110a49bd5c6 Author: Michał Górny mgorny AT gentoo DOT org AuthorDate: Sun Jan 4 09:59:13 2015 + Commit: Michał Górny mgorny AT gentoo DOT org CommitDate: Sun Jan 4 09:59:13 2015 + URL: http://sources.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=5016bc0e opengl: write section to xorg.conf.d only if non-empty Write the Files section only if there's at least one ModulePath to write. The empty section isn't necessary and blocks processing other Files sections. --- modules/opengl.eselect | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/opengl.eselect b/modules/opengl.eselect index 6e3df4f..bdb387b 100644 --- a/modules/opengl.eselect +++ b/modules/opengl.eselect @@ -66,11 +66,13 @@ get_implementations() { # outputs the file contents to stderr write_xorg_confd() { local dir - echo 'Section Files' - for dir; do - echo ModulePath \${dir}\ - done - echo 'EndSection' + if [[ -n ${@} ]]; then + echo 'Section Files' + for dir; do + echo ModulePath \${dir}\ + done + echo 'EndSection' + fi } set_new_implementation() {
[gentoo-commits] proj/eselect:extern commit in: modules/
commit: 2ffcd1ddd6ff4a65a01133b2ed46597a6d4863e8 Author: Michał Górny mgorny AT gentoo DOT org AuthorDate: Sun Dec 7 23:48:58 2014 + Commit: Michał Górny mgorny AT gentoo DOT org CommitDate: Mon Dec 8 22:57:28 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=2ffcd1dd opengl: rewrite not to play with symlinks Rewrite eselect-opengl to manipulate configuration files only. Properly configuring the dynamic linker and xorg server, we can avoid doing anything with libGL.so and related files, and guarantee that everything is built against xorg-x11 implementation. --- modules/opengl.eselect | 201 + 1 file changed, 37 insertions(+), 164 deletions(-) diff --git a/modules/opengl.eselect b/modules/opengl.eselect index 3f59a19..40b448e 100644 --- a/modules/opengl.eselect +++ b/modules/opengl.eselect @@ -17,10 +17,11 @@ DESCRIPTION=Manage the OpenGL implementation used by your system MAINTAINER=x...@gentoo.org SVN_DATE='$Date$' VERSION=$(svn_date_to_version ${SVN_DATE} ) -EBUILD_VERSION=1.2.1 +EBUILD_VERSION=1.3.0 # Our data -ENV_FILE=${EROOT}/etc/env.d/03opengl +ENV_FILE=${EROOT}/etc/env.d/000opengl +XORGD_FILE=${EROOT}/etc/X11/xorg.conf.d/20opengl.conf PREFIX=${EROOT}/usr DST_PREFIX=${EROOT}/usr unset IGNORE_MISSING @@ -42,7 +43,7 @@ get_current_implementation() { } get_implementations() { - local ret + local -a ret local libdir local dir local dir_name @@ -52,124 +53,32 @@ get_implementations() { for dir in ${PREFIX}/${libdir}/opengl/* ; do dir_name=$(basename ${dir}) [[ -d ${dir} ${dir_name} != global ]] || continue - has ${dir_name} ${ret} continue - ret=${ret:+${ret} }${dir_name} + has ${dir_name} ${ret[@]} continue + ret+=( ${dir_name} ) done done - echo ${ret} -} - -# 1: file -# 2: workdir -upgrade_file() { - local file=$1 - local filename - local workdir=$2 - local linkfile=$(relative_name ${file} ${workdir}) - - [[ -f ${file} ]] || return - filename=$(basename ${file}) - - if [[ -f ${filename} || ( -L ${filename} ! -e ${filename} ) ]] ; then - rm -f ${filename}* || die -q Failed to delete ${workdir}/${filename} - fi - - #echo DEBUG: ln -s \${linkfile}\ \${filename}\ - if [[ x${REMOVE_ONLY} == xfalse ]]; then - ln -s ${linkfile} ${filename} || die -q Failed to create symlink ${workdir}/${filename} - fi -} - -setup_soname_symlinks() { - local file=$1 - local target=$2 - local soname - local scanner - - # if we have .so or dylib we need to make its soname symlinked - # in order to be easy to find and faster to grab - if [[ ${file} == *.so || ${file} == *.dylib ]] ; then - [[ ${file} == *.so ]] scanner=scanelf || scanner=scanmacho - soname=$(${scanner} -qBF '%S#p' ${file} | head -n1) - [[ ${file} == *.so ]] soname=${file%/*}/${soname} - upgrade_file ${soname} ${target} - fi -} - -setup_lib_symlinks() { - local profile_libdir=$1 - local target=$2 - local file - - mkdir -p ${target} || die Failed to create ${target} - - pushd ${target} /dev/null - # Note that lafiles are removed here and never enabled again - for file in libGL{,core}.la ; do - rm -f ${file}* || die -q Failed to delete ${file} - done - - for file in ${profile_libdir}/lib{EGL,GL*,OpenVG}{,core}.{so,dylib,a}; do - upgrade_file ${file} ${target} - setup_soname_symlinks ${file} ${target} - done - popd /dev/null -} - -setup_extensions_symlinks() { - local src=$1 - local target=$2 - - if [[ -e ${src} ]] ; then - mkdir -p ${target} || die Failed to create ${target} - pushd ${target} /dev/null - # First remove old cruft symlinks - for file in lib{wfb,glx,dri,dri2}.{so,dylib,a}; do - rm -f ${file} || die -q Failed to delete ${targetdir}/${file} - done - - # regenerate symlinks - for file in ${src}/*.{so,dylib,a}; do - upgrade_file ${file} ${target} - setup_soname_symlinks ${file} ${target} - done - popd /dev/null - fi + has xorg-x11 ${ret[@]} || ret+=( xorg-x11 ) + echo ${ret[*]} } -setup_includes_symlinks() { - local target=$1 - local files=$2 - local file - local mdir=$3 - local sdir - - shift 2 - mkdir
[gentoo-commits] proj/eselect:extern commit in: modules/, /
commit: 4194fd722b41d916d4db80815c855911b16da583 Author: Ben de Groot yngwin AT gentoo DOT org AuthorDate: Sat Nov 22 06:47:09 2014 + Commit: Ben de Groot yngwin AT gentoo DOT org CommitDate: Sat Nov 22 06:47:09 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=4194fd72 vi.eselect: add qvim as option (bug #529528) --- ChangeLog | 1 + modules/vi.eselect | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ebab7dc..d8a4855 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2014-11-22 Ben de Groot yng...@gentoo.org * modules/vi.eselect: apply patch from 1.1.7-r1 + * modules/vi.eselect: add qvim as option (bug #529528) 2014-04-23 Christoph Junghans ott...@gentoo.org diff --git a/modules/vi.eselect b/modules/vi.eselect index 70ce1c8..573ab11 100644 --- a/modules/vi.eselect +++ b/modules/vi.eselect @@ -1,11 +1,10 @@ # -*-eselect-*- vim: ft=eselect -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 DESCRIPTION=Manage /usr/bin/vi implementations MAINTAINER=v...@gentoo.org -SVN_DATE='$Date$' -VERSION=$(svn_date_to_version ${SVN_DATE} ) +VERSION=1.1.8 # find a list of vi symlink targets, best first find_targets() { @@ -16,6 +15,7 @@ find_targets() { ${EROOT}/usr/bin/elvis \ ${EROOT}/usr/bin/vile \ ${EROOT}/usr/bin/gvim \ + ${EROOT}/usr/bin/qvim \ ${EROOT}/usr/bin/xvile \ ${EROOT}/bin/busybox \ ; do
[gentoo-commits] proj/eselect:extern commit in: /, modules/
commit: 911b8edaa0b019edb840a5c49a344ac638c86202 Author: Ben de Groot yngwin AT gentoo DOT org AuthorDate: Sat Nov 22 06:43:37 2014 + Commit: Ben de Groot yngwin AT gentoo DOT org CommitDate: Sat Nov 22 06:43:37 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=911b8eda vi.eselect: apply patch from 1.1.7-r1 --- AUTHORS| 3 +++ ChangeLog | 4 modules/vi.eselect | 52 ++-- 3 files changed, 33 insertions(+), 26 deletions(-) diff --git a/AUTHORS b/AUTHORS index fb58161..c1e3a1e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -30,3 +30,6 @@ Chí-Thanh Christopher Nguyễn chith...@gentoo.org Christoph Junghans ott...@gentoo.org Modules:awk, timezone + +Ben de Groot yng...@gentoo.org + Modules:vi diff --git a/ChangeLog b/ChangeLog index 9c1945a..ebab7dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-11-22 Ben de Groot yng...@gentoo.org + + * modules/vi.eselect: apply patch from 1.1.7-r1 + 2014-04-23 Christoph Junghans ott...@gentoo.org * modules/wxwidgets.eselect: add prefix (mac) support (bug #508438) diff --git a/modules/vi.eselect b/modules/vi.eselect index 8fc600f..70ce1c8 100644 --- a/modules/vi.eselect +++ b/modules/vi.eselect @@ -11,13 +11,13 @@ VERSION=$(svn_date_to_version ${SVN_DATE} ) find_targets() { local f for f in \ - ${ROOT}/usr/bin/vim \ - ${ROOT}/usr/bin/nvi \ - ${ROOT}/usr/bin/elvis \ - ${ROOT}/usr/bin/vile \ - ${ROOT}/usr/bin/gvim \ - ${ROOT}/usr/bin/xvile \ - ${ROOT}/bin/busybox \ + ${EROOT}/usr/bin/vim \ + ${EROOT}/usr/bin/nvi \ + ${EROOT}/usr/bin/elvis \ + ${EROOT}/usr/bin/vile \ + ${EROOT}/usr/bin/gvim \ + ${EROOT}/usr/bin/xvile \ + ${EROOT}/bin/busybox \ ; do if [[ -f ${f} ]] ; then echo $(basename ${f} ) @@ -27,8 +27,8 @@ find_targets() { # try to remove the vi, ex, view and man vi symlinks remove_symlinks() { - rm -f ${ROOT}/usr/bin/{vi,ex,view} /dev/null \ - rm -f ${ROOT}/usr/share/man/man1/{vi,ex,view}.1{,.gz,.bz2,.lzma} /dev/null + rm -f ${EROOT}/usr/bin/{vi,ex,view} /dev/null \ + rm -f ${EROOT}/usr/share/man/man1/{vi,ex,view}.1{,.gz,.bz2,.lzma} /dev/null } # set a man page symlink @@ -36,7 +36,7 @@ set_man_symlink() { local target=${1} link_name=${2} x extension for x in .1 .1.bz2 .1.gz .1.lzma ; do - if [[ -e /usr/share/man/man1/${target}${x} ]] ; then + if [[ -e ${EROOT}/usr/share/man/man1/${target}${x} ]] ; then extension=${x} break fi @@ -48,7 +48,7 @@ set_man_symlink() { fi ln -s ${target}${extension} \ - ${ROOT}/usr/share/man/man1/${link_name}${extension} + ${EROOT}/usr/share/man/man1/${link_name}${extension} } # set the vi, ex, view, and man vi symlinks @@ -61,9 +61,9 @@ set_symlinks() { local dir if [[ ${target} == busybox ]]; then - dir=${ROOT}/bin + dir=${EROOT}/bin else - dir=${ROOT}/usr/bin + dir=${EROOT}/usr/bin fi if [[ -f ${dir}/${target} ]] ; then @@ -75,12 +75,12 @@ set_symlinks() { set_man_symlink ${target} view # it's not okay if these fail - target=$(relative_name ${dir}/${target} ${ROOT}/usr/bin) - ln -s ${target} ${ROOT}/usr/bin/vi \ + target=$(relative_name ${dir}/${target} ${EROOT}/usr/bin) + ln -s ${target} ${EROOT}/usr/bin/vi \ || die Couldn't set ${target} /usr/bin/vi symlink - ln -s ${target} ${ROOT}/usr/bin/ex \ + ln -s ${target} ${EROOT}/usr/bin/ex \ || die Couldn't set ${target} /usr/bin/ex symlink - ln -s ${target} ${ROOT}/usr/bin/view \ + ln -s ${target} ${EROOT}/usr/bin/view \ || die Couldn't set ${target} /usr/bin/view symlink else die -q Target \${1}\ doesn't appear to be valid! @@ -97,9 +97,9 @@ do_show() { [[ -z ${@} ]] || die -q Too many parameters write_list_start Current vi implementation: - if [[ -L ${ROOT}/usr/bin/vi ]] ; then - write_kv_list_entry $(basename $(canonicalise ${ROOT}/usr/bin/vi ) ) - elif [[ -e ${ROOT}/usr/bin/vi ]] ; then + if [[ -L ${EROOT}/usr/bin/vi ]] ; then + write_kv_list_entry $(basename $(canonicalise ${EROOT}/usr/bin/vi ) ) + elif [[ -e ${EROOT}/usr/bin/vi ]] ;
[gentoo-commits] proj/eselect:extern commit in: /, modules/
commit: 2774da49bd3beffe7fe956e50f3c61ab4c2fd145 Author: Christoph Junghans ottxor AT gentoo DOT org AuthorDate: Wed Apr 23 17:49:57 2014 + Commit: Christoph Junghans ottxor AT gentoo DOT org CommitDate: Wed Apr 23 17:49:57 2014 + URL: http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=2774da49 Add support for mac --- ChangeLog | 4 modules/wxwidgets.eselect | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f0f5c6a..9c1945a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-04-23 Christoph Junghans ott...@gentoo.org + + * modules/wxwidgets.eselect: add prefix (mac) support (bug #508438) + 2013-03-11 Christoph Junghans ott...@gentoo.org * modules/xvmc.eselect: add myself as maintainer, diff --git a/modules/wxwidgets.eselect b/modules/wxwidgets.eselect index 4be13e9..55d49d2 100644 --- a/modules/wxwidgets.eselect +++ b/modules/wxwidgets.eselect @@ -1,12 +1,12 @@ # -*-eselect-*- vim: ft=eselect -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit config DESCRIPTION=Manage the system default wxWidgets profile MAINTAINER=wxwidg...@gentoo.org -VERSION=20131230 +VERSION=20140423 WXCONFFILE=${EROOT}/var/lib/wxwidgets/current WXCONFDIR=${EROOT}/usr/lib/wx/config @@ -165,7 +165,7 @@ do_update() { i=1 case ${component} in toolkit) - for opt in base gtk2; do + for opt in base gtk2 mac; do if [[ ${opt} == ${wxtoolkit[0]} ]]; then continue else