public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/eselect:extern commit in: modules/, /
@ 2014-11-22  6:47 Ben de Groot
  0 siblings, 0 replies; 4+ messages in thread
From: Ben de Groot @ 2014-11-22  6:47 UTC (permalink / raw
  To: gentoo-commits

commit:     4194fd722b41d916d4db80815c855911b16da583
Author:     Ben de Groot <yngwin <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 22 06:47:09 2014 +0000
Commit:     Ben de Groot <yngwin <AT> gentoo <DOT> org>
CommitDate: Sat Nov 22 06:47:09 2014 +0000
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 <yngwin@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 <ottxor@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="vim@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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/eselect:extern commit in: modules/, /
@ 2018-03-10 10:22 Ulrich Müller
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Müller @ 2018-03-10 10:22 UTC (permalink / raw
  To: gentoo-commits

commit:     69bb5c568747742622d813d1a6403f7c01dcde20
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  6 17:22:39 2018 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Mar  6 17:22:39 2018 +0000
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  <ulm@gentoo.org>
+
+	* 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 <yngwin@gentoo.org>
 
 	* 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="tetromino@gentoo.org"
 MAINTAINER="gnome@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"


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/eselect:extern commit in: modules/, /
@ 2018-08-30 16:45 Ulrich Müller
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Müller @ 2018-08-30 16:45 UTC (permalink / raw
  To: gentoo-commits

commit:     4f487d6cc395f03963f4bb7a68bde985dd73b4a3
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue May 29 17:10:45 2018 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Aug 30 16:44:55 2018 +0000
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  <ulm@gentoo.org>
+
+	* 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  <ulm@gentoo.org>
 
 	* 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="wxwidgets@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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/eselect:extern commit in: modules/, /
@ 2020-05-08  4:30 Mike Gilbert
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Gilbert @ 2020-05-08  4:30 UTC (permalink / raw
  To: gentoo-commits

commit:     f473cb298779981b8ec6c522165f41562d67548a
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri May  8 04:28:39 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri May  8 04:30:03 2020 +0000
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 <floppym <AT> 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 <yngwin@gentoo.org>
 
 Alexandre Rostovtsev <tetromino@gentoo.org>
     Modules:    gnome-shell-extensions
+
+Chris Pritchard <chris@christopherpritchard.co.uk>
+    Modules:    iptables

diff --git a/modules/iptables.eselect b/modules/iptables.eselect
new file mode 100644
index 0000000..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="chris@christopherpritchard.co.uk"
+MAINTAINER="base-system@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[@]}"
+}
+
+### set action ###
+
+describe_set() {
+	echo "Set a new iptables symlink target"
+}
+
+describe_set_parameters() {
+	echo "[--ipv6] <target>"
+}
+
+describe_set_options() {
+	echo "--ipv6: Forces creation of ip6tables symlinks"
+	echo "target : Target name or number (from 'list' action)"
+}
+
+do_set() {
+	local ipv6 ipv6_remove
+	if [[ ${1} == "--ipv6" ]]; then
+		ipv6=1
+		shift
+	fi
+	local target="${1}"
+
+	[[ -z ${target} ]] && die -q "You didn't tell me what to set the symlink to"
+	[[ ${#} -gt 2 ]] && die -q "Too many parameters"
+
+	if [[ -d ${EROOT}/var/lib/ip6tables ]]; then
+		ipv6=1
+		[[ -L ${EROOT}/sbin/ip6tables ]] && ipv6_remove=1
+	fi
+	if [[ -L ${EROOT}/sbin/iptables ]]; then
+		# existing symlink
+		remove_symlinks || die -q "Couldn't remove existing symlink"
+		set_symlinks "${target}" || die -q "Couldn't set a new symlink"
+	elif [[ -e ${EROOT}/sbin/iptables ]]; then
+		# we have something strange
+		die -q "${EROOT}/sbin/iptables exists but is not a symlink"
+	else
+		set_symlinks "${target}" || die -q "Couldn't set a new symlink"
+	fi
+}
+
+### unset action ###
+
+describe_unset() {
+	echo "Unset iptables symlink targets"
+}
+
+do_unset() {
+	remove_symlinks
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-08  4:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-22  6:47 [gentoo-commits] proj/eselect:extern commit in: modules/, / Ben de Groot
  -- strict thread matches above, loose matches on Subject: below --
2018-03-10 10:22 Ulrich Müller
2018-08-30 16:45 Ulrich Müller
2020-05-08  4:30 Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox