public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/R_overlay:gsoc13/next commit in: /
@ 2013-07-12 17:11 André Erdmann
  2013-07-12 17:11 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
  0 siblings, 1 reply; 13+ messages in thread
From: André Erdmann @ 2013-07-12 17:11 UTC (permalink / raw
  To: gentoo-commits

commit:     d742b562c460c6453784f9309f8f454dcbc22caf
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Fri Jul 12 17:10:32 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Fri Jul 12 17:10:32 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=d742b562

ebuild: enable default hooks, chown $work_root

---
 roverlay-9999.ebuild | 94 ++++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 83 insertions(+), 11 deletions(-)

diff --git a/roverlay-9999.ebuild b/roverlay-9999.ebuild
index 0e21409..bc4a80f 100644
--- a/roverlay-9999.ebuild
+++ b/roverlay-9999.ebuild
@@ -67,6 +67,39 @@ pkg_setup() {
 }
 
 pkg_config() {
+	## func
+	get_user_dir() {
+		if [[ -d "${1}" ]]; then
+			return 0
+		else
+			mkdir -m 0750 "${1}" && \
+				chown -h "${roverlay_user}:${roverlay_group}" "${1}" || \
+				die "failed to create '${1}'."
+		fi
+	}
+	# enable_hook ( hook_script_name, hook_name, **hook_destdir, **data_root )
+	enable_hook() {
+		local hook_src="${data_root?}/hooks/${1%.sh}.sh"
+		local hook_dest="${hook_destdir?}/${2%.sh}.sh"
+
+		if [[ ! -f "${hook_src}" ]]; then
+			die "hook script '${hook_src}' does not exist."
+		elif [[ -L "${hook_dest}" ]]; then
+			if [[ "$(readlink -f ${hook_dest})" == "${hook_src}" ]]; then
+				einfo "skipping ${2%.sh} - already set up"
+			else
+				ewarn "skipping ${2%.sh} - link to another script"
+			fi
+		elif [[ -e "${hook_dest}" ]]; then
+			ewarn "skipping hook ${2%.sh} - exists, but not a link"
+		else
+			ebegin "Adding hook ${1%.sh} as ${2%.sh}"
+			ln -sT "${hook_src}" "${hook_dest}" && \
+			chown -Ph "${roverlay_user}:${roverlay_group}" "${hook_dest}"
+			eend $? || die "failed to add hook ${2%.sh}"
+		fi
+	}
+
 	## vars
 	local DEFAULT_CONF_ROOT="${ROOT}etc/${PN}"
 
@@ -79,6 +112,8 @@ pkg_config() {
 	local conf_root
 	local work_root
 
+	local want_default_hooks=y
+
 	local input
 
 	## get user input
@@ -123,15 +158,9 @@ pkg_config() {
 			einfo "Import default config (${DEFAULT_CONF_ROOT})? (y/n) ['${want_conf_import}']"
 			input=; read input
 			case "${input}" in
-				'')
-					true
-				;;
-				'y'|'n')
-					want_conf_import="${input}"
-				;;
-				*)
-					die "answer '${input}' not understood."
-				;;
+				'') true ;;
+				'y'|'n') want_conf_import="${input}" ;;
+				*) die "answer '${input}' not understood." ;;
 			esac
 		;;
 	esac
@@ -141,12 +170,21 @@ pkg_config() {
 		echo
 	fi
 
+	einfo "Enable default overlay creation hooks (git history and metadata cache)? (y/n) ['${want_default_hooks}']"
+	input=; read input
+	case "${input}" in
+		'') true ;;
+		'y'|'n') want_default_hooks="${input}" ;;
+		*) die "answer '${input}' not understood." ;;
+	esac
+
 	einfo "Enter the directory for 'work' data (overlay, distfiles, mirror) ['${work_root}']:"
 
 	input=; read input
 	[[ -z "${input}" ]] || work_root="${input}"
 
-	einfo "Enter additional variables (VAR=VALUE) [optional]:"
+	# setting ADDITIONS_DIR here "breaks" hook activation
+	einfo "Enter additional config options (VAR=VALUE; use with care) [optional]:"
 	input=; read input
 
 	## print what would be done
@@ -159,17 +197,21 @@ pkg_config() {
 	einfo "- data root            : ${data_root} ${noconf}"
 	einfo "- config root          : ${conf_root}"
 	einfo "- import config        : ${want_conf_import}"
-	einfo "- additional variables : ${input:-<none>}"
+	einfo "- enable default hooks : ${want_default_hooks}"
+	einfo "- additional options   : ${input:-<none>}"
 	einfo
 	einfo "Press Enter to continue..."
 	read
 
 	## do it
+
+	# temporary config file - will be moved to its final location when done
 	ebegin "Creating temporary config file"
 	/usr/bin/roverlay-mkconfig -O "${T}/${PF}.config" \
 		-W "${work_root}" -D "${data_root}" -C "${conf_root}" -- ${input-}
 	eend $? || die
 
+	# import config
 	if [[ "${want_conf_import}" == "y" ]]; then
 		[[ -d "${conf_root}" ]] || mkdir -p "${conf_root}" || \
 			die "cannot create ${conf_root}"
@@ -182,16 +224,46 @@ pkg_config() {
 		eend $? || die
 	fi
 
+	# run "roverlay setupdirs"
 	ebegin "Creating directories"
 	/usr/bin/roverlay --config "${T}/${PF}.config" \
 		--target-uid ${roverlay_user} --target-gid ${roverlay_group} setupdirs
 	eend $? || die
 
+	# move config file
 	ebegin "Copying new config file to ${config_file}"
 	cp --preserve=mode,timestamps "${T}/${PF}.config" "${config_file}" && \
 	chown "${roverlay_user}:${roverlay_group}" "${config_file}"
 	eend $? || die
 
+	# adjust permissions for $work_root
+	if [[ ! -L "${work_root}" ]]; then
+		# ^ chmod doesn't work nicely for symlinks
+
+		ebegin "Adjusting permissions for ${work_root}"
+		chmod 0750 "${work_root}" && \
+			chown -h --from="root:root" \
+				"${roverlay_user}:${roverlay_group}" "${work_root}"
+		eend $? || die
+	fi
+
+	# enable hooks
+	if [[ "${want_default_hooks}" ]]; then
+		einfo "Activating default hooks"
+		if [[ ! -d "${conf_root}/files" ]]; then
+			ewarn "Skipping hook activation: ADDITIONS_DIR not in config root."
+		else
+			local hook_destdir="${conf_root}/files/hooks/overlay_success"
+
+			# non-recursive
+			get_user_dir "${hook_destdir%/*}"
+			get_user_dir "${hook_destdir}"
+
+			enable_hook {,50-}create-metadata-cache
+			enable_hook {,80-}git-commit-overlay
+		fi
+	fi
+
 	echo
 	einfo "Configuration for user '${roverlay_user}' is complete."
 	einfo "You can run '${PN} --print-config' (as user) to verify it."


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] proj/R_overlay:gsoc13/next commit in: /
@ 2013-07-23 18:34 André Erdmann
  0 siblings, 0 replies; 13+ messages in thread
From: André Erdmann @ 2013-07-23 18:34 UTC (permalink / raw
  To: gentoo-commits

commit:     e4e354cf31075c84ad76cda9a8899df3413b8db7
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Tue Jul 23 18:32:41 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Tue Jul 23 18:33:17 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=e4e354cf

update R-overlay.conf

added entry for LICENSE_MAP (+SHELL, HOOK_RESTRICT).

---
 R-overlay.conf | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/R-overlay.conf b/R-overlay.conf
index ce82822..d6bdc3d 100644
--- a/R-overlay.conf
+++ b/R-overlay.conf
@@ -1,7 +1,10 @@
 # R overlay -- config file for testing/running without installation
 
+SHELL = /bin/sh
+
 ADDITIONS_DIR = files
 HOOK          = files/hooks/mux.sh
+HOOK_RESTRICT = "* -user"
 ECLASS        = files/eclass/R-packages.eclass
 
 CACHEDIR      = workdir/cache
@@ -9,11 +12,13 @@ DISTFILES     = distfiles-root
 OVERLAY_DIR   = workdir/overlay
 #TMPDIR        = workdir/tmp
 
+LICENSE_MAP = config/license.map
+
 DISTDIR       = workdir/distroot
 # try hard links first, then fall back to symbolic ones
 DISTDIR_STRATEGY = "hardlink symlink"
 
-# distdir verfication is normally not needed
+# distdir verification is normally not needed
 DISTDIR_VERIFY = no
 
 # write description data from R packages to a directory


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] proj/R_overlay:gsoc13/next commit in: /
@ 2013-07-23 14:57 André Erdmann
  0 siblings, 0 replies; 13+ messages in thread
From: André Erdmann @ 2013-07-23 14:57 UTC (permalink / raw
  To: gentoo-commits

commit:     4f05f99377615d7ac0bb31019ab865b7f298c6f1
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Tue Jul 23 14:06:38 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Tue Jul 23 14:06:38 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=4f05f993

roverlay-9999.ebuild: set EGIT_BRANCH

set EGIT_BRANCH to gsoc13/next if PV starts with 99999

---
 roverlay-9999.ebuild | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/roverlay-9999.ebuild b/roverlay-9999.ebuild
index bc4a80f..e354d86 100644
--- a/roverlay-9999.ebuild
+++ b/roverlay-9999.ebuild
@@ -11,7 +11,7 @@ PYTHON_USE="ssl"
 inherit base python-distutils-ng git-2 user
 
 EGIT_REPO_URI='git://git.overlays.gentoo.org/proj/R_overlay.git'
-#EGIT_BRANCH='gsoc13/next'
+[[ "${PV}" != "99999"* ]] || EGIT_BRANCH=gsoc13/next
 
 DESCRIPTION="Automatically generated overlay of R packages (SoC2012)"
 HOMEPAGE="http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=summary"
@@ -49,8 +49,6 @@ src_compile() {
 }
 
 python_install_all() {
-	#newbin roverlay.py roverlay
-
 	# hooks etc. into /usr/share (architecture-independent data)
 	emake BUILDDIR="${S}/tmp" DESTDIR="${D}" \
 		install-data $(usex bzip2 install-config{-compressed,})


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] proj/R_overlay:master commit in: /
@ 2013-07-12 14:03 André Erdmann
  2013-07-12 14:03 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
  0 siblings, 1 reply; 13+ messages in thread
From: André Erdmann @ 2013-07-12 14:03 UTC (permalink / raw
  To: gentoo-commits

commit:     ad9c06ed19a4af7ef245c54feb3bd4f0a15cccf3
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Fri Jul 12 14:01:34 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Fri Jul 12 14:01:34 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=ad9c06ed

ebuild: set up roverlay via pkg_config()

---
 roverlay-9999.ebuild | 146 +++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 141 insertions(+), 5 deletions(-)

diff --git a/roverlay-9999.ebuild b/roverlay-9999.ebuild
index bcc4cec..0e21409 100644
--- a/roverlay-9999.ebuild
+++ b/roverlay-9999.ebuild
@@ -8,9 +8,10 @@ EAPI=4
 PYTHON_COMPAT="python2_7 python3_1 python3_2"
 PYTHON_USE="ssl"
 
-inherit base python-distutils-ng git-2
+inherit base python-distutils-ng git-2 user
 
 EGIT_REPO_URI='git://git.overlays.gentoo.org/proj/R_overlay.git'
+#EGIT_BRANCH='gsoc13/next'
 
 DESCRIPTION="Automatically generated overlay of R packages (SoC2012)"
 HOMEPAGE="http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=summary"
@@ -18,15 +19,15 @@ SRC_URI=""
 
 LICENSE="GPL-2+"
 SLOT="0"
-IUSE="bzip2 +prebuilt-documentation"
+IUSE="-bzip2 +prebuilt-documentation"
 
 KEYWORDS=""
 
-DEPEND="
-	dev-python/setuptools
+_CDEPEND="dev-python/setuptools"
+DEPEND="${_CDEPEND}
 	!prebuilt-documentation? ( >=dev-python/docutils-0.9 )
 "
-RDEPEND="
+RDEPEND="${_CDEPEND}
 	sys-apps/portage
 	virtual/python-argparse
 "
@@ -60,3 +61,138 @@ python_install_all() {
 	#  (due to the default config file)
 	keepdir /etc/${PN}/{files,package-rules.d}
 }
+
+pkg_setup() {
+	enewgroup roverlay
+}
+
+pkg_config() {
+	## vars
+	local DEFAULT_CONF_ROOT="${ROOT}etc/${PN}"
+
+	local roverlay_user="roverlay"
+	local roverlay_group="roverlay"
+	#local user_is_root
+	local want_conf_import
+
+	local data_root="${ROOT}usr/share/${PN}"
+	local conf_root
+	local work_root
+
+	local input
+
+	## get user input
+	einfo "Enter user/uid that will run ${PN} (user has to exist!) ['${roverlay_user}']:"
+	# input= not strictly needed
+	input=; read input
+	[[ -z "${input}" ]] || roverlay_user="${input}"
+
+	egetent passwd "${roverlay_user}" 1>/dev/null || \
+		die "no such user/uid: ${roverlay_user}"
+
+	case "${roverlay_user}" in
+		'0'|'root')
+			#user_is_root=y
+
+			work_root="${ROOT}var/${PN}"
+			conf_root="${DEFAULT_CONF_ROOT}"
+			config_file="${conf_root}/R-overlay.conf"
+
+			einfo "config root is ${conf_root}"
+			want_conf_import=n
+		;;
+		*)
+			#user_is_root=n
+
+			# get user config location
+			input="$(egethome ${roverlay_user})"
+			[[ -d "${input}" ]] || die "user has no home directory: ${input}"
+
+			work_root="${input}/${PN}"
+			conf_root="${work_root}/config"
+			config_file="${work_root}/R-overlay.conf"
+
+			if [[ ! -e "${conf_root}" ]]; then
+				einfo "config root is ${conf_root} (will be created)"
+				want_conf_import=y
+			else
+				einfo "config root is ${conf_root} (already exists)"
+				want_conf_import=n
+			fi
+
+			einfo "Import default config (${DEFAULT_CONF_ROOT})? (y/n) ['${want_conf_import}']"
+			input=; read input
+			case "${input}" in
+				'')
+					true
+				;;
+				'y'|'n')
+					want_conf_import="${input}"
+				;;
+				*)
+					die "answer '${input}' not understood."
+				;;
+			esac
+		;;
+	esac
+
+	if [[ -e "${config_file}" ]]; then
+		einfo "This will overwrite ${config_file}!"
+		echo
+	fi
+
+	einfo "Enter the directory for 'work' data (overlay, distfiles, mirror) ['${work_root}']:"
+
+	input=; read input
+	[[ -z "${input}" ]] || work_root="${input}"
+
+	einfo "Enter additional variables (VAR=VALUE) [optional]:"
+	input=; read input
+
+	## print what would be done
+	local noconf="(not configurable)"
+	echo
+	einfo "Configuration:"
+	einfo "- user/uid             : ${roverlay_user}"
+	einfo "- group/gid            : ${roverlay_group} ${noconf}"
+	einfo "- work root            : ${work_root}"
+	einfo "- data root            : ${data_root} ${noconf}"
+	einfo "- config root          : ${conf_root}"
+	einfo "- import config        : ${want_conf_import}"
+	einfo "- additional variables : ${input:-<none>}"
+	einfo
+	einfo "Press Enter to continue..."
+	read
+
+	## do it
+	ebegin "Creating temporary config file"
+	/usr/bin/roverlay-mkconfig -O "${T}/${PF}.config" \
+		-W "${work_root}" -D "${data_root}" -C "${conf_root}" -- ${input-}
+	eend $? || die
+
+	if [[ "${want_conf_import}" == "y" ]]; then
+		[[ -d "${conf_root}" ]] || mkdir -p "${conf_root}" || \
+			die "cannot create ${conf_root}"
+
+		ebegin "Importing default config (${DEFAULT_CONF_ROOT})"
+		cp -dRu --preserve=mode,timestamps \
+			"${DEFAULT_CONF_ROOT}"/* "${conf_root}"/ && \
+			chown -Rh --from="root:root" \
+				"${roverlay_user}:${roverlay_group}" "${conf_root}"
+		eend $? || die
+	fi
+
+	ebegin "Creating directories"
+	/usr/bin/roverlay --config "${T}/${PF}.config" \
+		--target-uid ${roverlay_user} --target-gid ${roverlay_group} setupdirs
+	eend $? || die
+
+	ebegin "Copying new config file to ${config_file}"
+	cp --preserve=mode,timestamps "${T}/${PF}.config" "${config_file}" && \
+	chown "${roverlay_user}:${roverlay_group}" "${config_file}"
+	eend $? || die
+
+	echo
+	einfo "Configuration for user '${roverlay_user}' is complete."
+	einfo "You can run '${PN} --print-config' (as user) to verify it."
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] proj/R_overlay:gsoc13/next commit in: /
@ 2013-07-11 16:44 André Erdmann
  0 siblings, 0 replies; 13+ messages in thread
From: André Erdmann @ 2013-07-11 16:44 UTC (permalink / raw
  To: gentoo-commits

commit:     8031d346aa4673c417a1be329392315105dbb99e
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Thu Jul 11 16:28:43 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Thu Jul 11 16:28:43 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=8031d346

setup.py: install roverlay-mkconfig

---
 setup.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/setup.py b/setup.py
index d15419c..d42b159 100755
--- a/setup.py
+++ b/setup.py
@@ -14,6 +14,7 @@ setup (
    entry_points = {
       'console_scripts': [
          'roverlay = roverlay.main:main_installed',
+         'roverlay-mkconfig = roverlay.config.mkconfig:make_config',
       ]
    },
    packages     = find_packages ( exclude=[ 'tests', 'tests.*' ] ),


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] proj/R_overlay:master commit in: /
@ 2013-07-11 10:36 André Erdmann
  2013-07-11 16:44 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
  0 siblings, 1 reply; 13+ messages in thread
From: André Erdmann @ 2013-07-11 10:36 UTC (permalink / raw
  To: gentoo-commits

commit:     0548f8ab06d87e83b4cc19230604b39ec9acfd95
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Thu Jul 11 10:36:00 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Thu Jul 11 10:36:00 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=0548f8ab

install fixup (#2)

---
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 60a2b09..d15419c 100755
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@ setup (
          'roverlay = roverlay.main:main_installed',
       ]
    },
-   packages     = find_packages(),
+   packages     = find_packages ( exclude=[ 'tests', 'tests.*' ] ),
    classifiers  = [
       #'Development Status :: 3 - Alpha',
       'Development Status :: 4 - Beta',


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] proj/R_overlay:master commit in: /
@ 2013-07-10 16:16 André Erdmann
  2013-07-10 15:10 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
  0 siblings, 1 reply; 13+ messages in thread
From: André Erdmann @ 2013-07-10 16:16 UTC (permalink / raw
  To: gentoo-commits

commit:     ef8f6d5a60a07577569feb62b3baeef11ee2b547
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Wed Jul 10 15:09:09 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Wed Jul 10 15:09:14 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=ef8f6d5a

Makefile: remove pydoc target temporarily

---
 Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 0ad337e..0c3be05 100644
--- a/Makefile
+++ b/Makefile
@@ -79,8 +79,10 @@ $(BUILDDIR):
 
 # generates selfdocs (using pydoc) in $(SELFDOC)/
 $(SELFDOC):
+	# pydoc target is broken currently..
+	@false
 	@install -d $(SELFDOC)/roverlay
-	@ln -sfT ../../roverlay $(SELFDOC)/roverlay
+	@ln -s ../../roverlay $(SELFDOC)/roverlay
 	$(PYDOC_SH) $(SELFDOC)
 
 # alias to $(SELFDOC)
@@ -90,7 +92,7 @@ htmldoc: $(SRC_DOCDIR)/rst/usage.rst
 	@install -d $(SRC_DOCDIR)/html
 	$(RST_HTML) $(SRC_DOCDIR)/rst/usage.rst $(SRC_DOCDIR)/html/usage.html
 
-generate-doc: pydoc htmldoc
+generate-doc: htmldoc
 
 generate-setuppy: $(GEN_SETUP_PY)
 	$(GEN_SETUP_PY)
@@ -99,7 +101,7 @@ generate-manifest: $(MANIFEST_GEN)
 	$(MANIFEST_GEN) > $(MANIFEST_TMP)
 	mv -- $(MANIFEST_TMP) $(MANIFEST)
 
-generate-files: generate-setuppy htmldoc pydoc generate-manifest
+generate-files: generate-setuppy generate-doc generate-manifest
 
 
 # creates a src tarball (.tar.bz2)


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] proj/R_overlay:master commit in: /
@ 2013-07-10 16:16 André Erdmann
  2013-07-10 15:10 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
  0 siblings, 1 reply; 13+ messages in thread
From: André Erdmann @ 2013-07-10 16:16 UTC (permalink / raw
  To: gentoo-commits

commit:     5f90ed490bc36a814c85ff690710abafdd325643
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Wed Jul 10 13:44:35 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Wed Jul 10 13:44:35 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=5f90ed49

change format of TODO file

---
 TODO | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/TODO b/TODO
index ca8ee6b..5db038f 100644
--- a/TODO
+++ b/TODO
@@ -1,13 +1,13 @@
 TODO list, most priority at the top.
 
- * Problem of tarballs which disappear when package is updated
- * Solve issue of depending on a newer version of a base package than what is
-   available in the currently installed version of R
- * Do-not-process feature to list packages we shouldn't even look at
- * Allow per-package keywords for:
+[x] Problem of tarballs which disappear when package is updated
+[ ] Solve issue of depending on a newer version of a base package than what is
+    available in the currently installed version of R
+[x] Do-not-process feature to list packages we shouldn't even look at
+[x] Allow per-package keywords for:
     - packages which require e.g. 64 bit only
     - packages present in multiple repositories
     - ?
- * Better way to deal with R suggestions
- * Handle slots in fuzzy dependency resolver
- * readline in depres_console
+[x] Better way to deal with R suggestions
+[x] Handle slots in fuzzy dependency resolver
+[ ] readline in depres_console


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] proj/R_overlay:gsoc13/next commit in: /
@ 2013-07-10 15:10 André Erdmann
  0 siblings, 0 replies; 13+ messages in thread
From: André Erdmann @ 2013-07-10 15:10 UTC (permalink / raw
  To: gentoo-commits

commit:     afd77696349d7d68ad26680564e00e62943f05cf
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Wed Jul 10 13:39:46 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Wed Jul 10 13:39:46 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=afd77696

update ebuild, Makefile

---
 Makefile             | 143 ++++++++++++++++++++++++++++++++-------------------
 roverlay-9999.ebuild |  37 +++++++------
 2 files changed, 112 insertions(+), 68 deletions(-)

diff --git a/Makefile b/Makefile
index 3981a92..0ad337e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,15 @@
 # Some make targets for testing / distribution
 
-# DESTDIR :=
-BINDIR          := $(DESTDIR)/usr/local/bin
+DESTDIR  := /
+DESTTREE := $(DESTDIR)usr/
+
+DATADIR  := $(DESTTREE)share
+BINDIR   := $(DESTTREE)bin
+CONFDIR  := $(DESTDIR)etc
+
+BUILDDIR := ./tmp
+
+
 PYMOD_FILE_LIST := ./roverlay_files.list
 
 MANIFEST      := MANIFEST
@@ -9,6 +17,7 @@ MANIFEST_TMP  := $(MANIFEST).tmp
 
 MANIFEST_GEN  := ./scripts/create_manifest.sh
 
+GEN_SETUP_PY  := ./scripts/gen_setuppy.sh
 SETUP_PY      := ./setup.py
 PKG_DISTDIR   := ./release
 
@@ -22,32 +31,39 @@ PYDOC_SH       = ./scripts/do_pydoc.sh
 
 RST_HTML       = ./scripts/roverlay_rst2html.sh
 
-DOCDIR        := ./doc
+SRC_DOCDIR    := ./doc
 
-SELFDOC       := $(DOCDIR)/pydoc
+SELFDOC       := $(SRC_DOCDIR)/pydoc
 
-.PHONY: $(MANIFEST_TMP) $(MANIFEST) \
-	default \
-	clean-log clean distclean _pyclean _pydoc_clean \
-	run-test run-sync test \
-	pydoc $(SELFDOC) docs htmldoc html \
-	pyver \
-	install install-all \
+.PHONY: default \
+	clean clean-log _pyclean _pydoc_clean distclean \
+	docs pydoc htmldoc \
+	check test \
+	generate-files \
+		generate-doc generate-setuppy generate-manifest \
+	release dist \
+	compress-config \
+	install-all install \
 		install-roverlay install-pymodules \
-	uninstall uninstall-all \
+		install-data install-config-common \
+		install-config-compressed install-config \
+	uninstall-all uninstall \
 		uninstall-roverlay uninstall-pymodules
 
 default:
 	@false
 
-pyver:
-	@$(PYTHON) --version
+check:
+	@true
 
-clean-log:
-	rm -rf -- $(LOGDIR)
+test: ./run_tests.sh
+	./run_tests.sh
 
 clean:
-	rm -rf build/
+	rm -rf ./build/ $(BUILDDIR)/
+
+clean-log:
+	rm -rf -- $(LOGDIR)
 
 _pyclean:
 	find . -name "*.pyc" -or -name "*.pyo" -delete
@@ -58,56 +74,48 @@ _pydoc_clean:
 
 distclean: clean _pyclean _pydoc_clean
 
-# generates docs in $(DOCDIR)/
-$(DOCDIR):
-	@mkdir $(DOCDIR)
-
-$(DOCDIR)/html: $(DOCDIR)
-	@mkdir $(DOCDIR)/html
-
-docs: $(SELFDOC) htmldoc
-
-$(SELFDOC)/roverlay:
-	test -d $(SELFDOC) || mkdir -p $(SELFDOC)
-	@ln -s ../../roverlay $(SELFDOC)/roverlay
+$(BUILDDIR):
+	@install -d $(BUILDDIR)
 
 # generates selfdocs (using pydoc) in $(SELFDOC)/
-$(SELFDOC): $(SELFDOC)/roverlay
+$(SELFDOC):
+	@install -d $(SELFDOC)/roverlay
+	@ln -sfT ../../roverlay $(SELFDOC)/roverlay
 	$(PYDOC_SH) $(SELFDOC)
 
 # alias to $(SELFDOC)
 pydoc: $(SELFDOC)
 
-html: $(DOCDIR)/html $(DOCDIR)/rst/usage.rst
-	$(RST_HTML) $(DOCDIR)/rst/usage.rst $(DOCDIR)/html/usage.html
+htmldoc: $(SRC_DOCDIR)/rst/usage.rst
+	@install -d $(SRC_DOCDIR)/html
+	$(RST_HTML) $(SRC_DOCDIR)/rst/usage.rst $(SRC_DOCDIR)/html/usage.html
 
-htmldoc: html
+generate-doc: pydoc htmldoc
 
-# sync all repos
-run-sync: $(ROVERLAY_MAIN)
-	$(PYTHON) $(ROVERLAY_MAIN) sync
+generate-setuppy: $(GEN_SETUP_PY)
+	$(GEN_SETUP_PY)
 
-# this is the 'default' test run command
-run-test: $(ROVERLAY_MAIN)
-	$(PYTHON) $(ROVERLAY_MAIN) --nosync --stats -O /tmp/overlay
-
-# sync and do a test run afterwards
-test: run-sync run-test
-
-$(MANIFEST_TMP): $(MANIFEST_GEN)
+generate-manifest: $(MANIFEST_GEN)
 	$(MANIFEST_GEN) > $(MANIFEST_TMP)
-
-# creates a MANIFEST file for setup.py
-$(MANIFEST): $(MANIFEST_TMP)
 	mv -- $(MANIFEST_TMP) $(MANIFEST)
 
+generate-files: generate-setuppy htmldoc pydoc generate-manifest
+
+
 # creates a src tarball (.tar.bz2)
 #  !!! does not include config files
-release: $(MANIFEST) $(SETUP_PY)
+release: generate-files
 	@echo "Note: the release tarball does not include any config files!"
-	@test -d $(PKG_DISTDIR) || @mkdir -- $(PKG_DISTDIR)
+	@install -d $(PKG_DISTDIR)
 	./$(SETUP_PY) sdist --dist-dir=$(PKG_DISTDIR) --formats=bztar
 
+dist: distclean release
+
+compress-config: $(BUILDDIR)
+	@install -d $(BUILDDIR)/config
+	cp -vLr -p --no-preserve=ownership config/simple-deprules.d $(BUILDDIR)/config/
+	bzip2 $(BUILDDIR)/config/simple-deprules.d/*
+	bzip2 -k -c config/license.map >  $(BUILDDIR)/config/license.map
 
 install-roverlay: ./roverlay.py
 	install -T -D -- ./roverlay.py $(BINDIR)/roverlay
@@ -115,17 +123,48 @@ install-roverlay: ./roverlay.py
 install-pymodules: ./setup.py
 	$(PYTHON) ./setup.py install --record $(PYMOD_FILE_LIST)
 
-install-all: install
+install-config-common:
+	install -m 0755 -d $(CONFDIR)/roverlay
+	install -m 0644 -t $(CONFDIR)/roverlay \
+		config/description_fields.conf config/repo.list
+	install -m 0644 -T \
+		config/R-overlay.conf.install $(CONFDIR)/roverlay/R-overlay.conf
+
+install-config-compressed: install-config-common
+	cp -vLr -p --no-preserve=ownership \
+		$(BUILDDIR)/config/simple-deprules.d $(BUILDDIR)/config/license.map \
+		$(CONFDIR)/roverlay/
+
+install-config: install-config-common
+	cp -vLr -p --no-preserve=ownership \
+		config/simple-deprules.d config/license.map \
+		$(CONFDIR)/roverlay/
+
+
+# license.map deprules
+
+install-data:
+	install -m 0755 -d \
+		$(DATADIR)/roverlay/shlib $(DATADIR)/roverlay/hooks \
+		$(DATADIR)/roverlay/eclass
+
+	install -m 0644 -t $(DATADIR)/roverlay/hooks files/hooks/*.sh
+	install -m 0644 -t $(DATADIR)/roverlay/shlib files/shlib/*.sh
+	chmod 0775 $(DATADIR)/roverlay/hooks/mux.sh
+
+	install -m 0644 -t $(DATADIR)/roverlay/eclass files/eclass/*.eclass
 
 install: install-pymodules install-roverlay
 
+install-all: install
+
 uninstall-roverlay:
 	rm -vf -- $(BINDIR)/roverlay
 
 uninstall-pymodules: $(PYMOD_FILE_LIST)
 	xargs rm -vrf < $(PYMOD_FILE_LIST)
 
-uninstall-all: uninstall
-
 uinstall:
 	@false
+
+uninstall-all: uninstall

diff --git a/roverlay-9999.ebuild b/roverlay-9999.ebuild
index 68c23fe..40266c8 100644
--- a/roverlay-9999.ebuild
+++ b/roverlay-9999.ebuild
@@ -1,10 +1,12 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
-EAPI="4"
+EAPI=4
+
 # python < 2.7 is not supported
 PYTHON_COMPAT="python2_7 python3_1 python3_2"
+PYTHON_USE="ssl"
 
 inherit base python-distutils-ng git-2
 
@@ -14,39 +16,42 @@ DESCRIPTION="Automatically generated overlay of R packages (SoC2012)"
 HOMEPAGE="http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=summary"
 SRC_URI=""
 
-LICENSE="GPL-2"
+LICENSE="GPL-2+"
 SLOT="0"
-IUSE="bzip2"
+IUSE="bzip2 +prebuilt-documentation"
 
 KEYWORDS=""
 
-DEPEND=""
-RDEPEND="${DEPEND:-}
+DEPEND="!prebuilt-documentation? ( >=dev-python/docutils-0.9 )"
+RDEPEND="
 	sys-apps/portage
 	virtual/python-argparse
 "
 
-_CONFDIR=/etc/${PN}
-
 python_prepare_all() {
 	if use bzip2; then
 		einfo "USE=bzip2: Compressing dependency rule files"
-		bzip2 config/simple-deprules.d/* || die "Cannot compress dependency rules!"
+		emake BUILDDIR="${S}/tmp" compress-config
 	fi
 	sed -f misc/sed_expression_roverlay_installed roverlay.py -i || \
 		die "sed expression, roverlay.py"
 	base_src_prepare
 }
 
+src_compile() {
+	python-distutils-ng_src_compile
+
+	if ! use prebuilt-documentation; then
+		emake htmldoc
+	fi
+}
+
 python_install_all() {
-	newbin roverlay.py roverlay
+	#newbin roverlay.py roverlay
 
-	insinto "${_CONFDIR}"
-	doins config/description_fields.conf config/repo.list
-	doins -r config/simple-deprules.d/
-	doins -r files/eclass/
-	newins config/R-overlay.conf.install R-overlay.conf
+	# hooks etc. into /usr/share (architecture-independent data)
+	emake BUILDDIR="${S}/tmp" DESTDIR="${D}" \
+		install-data $(usex bzip2 install-config{-compressed,})
 
-	doman  doc/man/roverlay.1
 	dohtml doc/html/*
 }


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] proj/R_overlay:master commit in: /
@ 2013-07-03 10:05 André Erdmann
  2013-07-02 21:09 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
  0 siblings, 1 reply; 13+ messages in thread
From: André Erdmann @ 2013-07-03 10:05 UTC (permalink / raw
  To: gentoo-commits

commit:     eeb1f8f01069f88a8619c47c6794697677b8b421
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Tue Jul  2 21:07:58 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Tue Jul  2 21:07:58 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=eeb1f8f0

run_tests.sh/run_tests.py

run_tests.py runs some tests from roverlay/tests.

run_tests.sh runs run_tests.py with both python2 and python3 as interpreter.

---
 run_tests.py | 10 ++++++++++
 run_tests.sh | 21 +++++++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/run_tests.py b/run_tests.py
new file mode 100755
index 0000000..b3156f1
--- /dev/null
+++ b/run_tests.py
@@ -0,0 +1,10 @@
+#!/usr/bin/python
+
+import unittest
+
+import tests.depres
+
+
+if __name__ == '__main__':
+   tests = tests.depres.suite()
+   unittest.TextTestRunner ( verbosity=2 ).run ( tests )

diff --git a/run_tests.sh b/run_tests.sh
new file mode 100755
index 0000000..48ed757
--- /dev/null
+++ b/run_tests.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+cd "${0%/*}" || exit
+
+TESTPY="${PWD}/run_tests.py"
+first=Y
+
+conf="${PWD}/R-overlay.conf"
+tconf="${conf}.tests"
+
+[ -e "${tconf}" ] || { ln -vs -- "${conf}" "${tconf}" && first=; } || exit
+
+for PYTHON in python2 python3; do
+   if which ${PYTHON} 1>/dev/null 2>/dev/null; then
+      [ -n "${first}" ] && first= || echo
+      echo "*** Running ${TESTPY##*/} with PYTHON=${PYTHON} ***"
+      echo
+      PYTHONPATH="${PWD}" ${PYTHON} "${TESTPY}"
+   else
+      echo "PYTHON=${PYTHON} not found." 1>&2
+   fi
+done


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] proj/R_overlay:master commit in: /
@ 2013-06-22 15:24 André Erdmann
  2013-06-22 15:23 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
  0 siblings, 1 reply; 13+ messages in thread
From: André Erdmann @ 2013-06-22 15:24 UTC (permalink / raw
  To: gentoo-commits

commit:     8a77ed87aa46126b1673290ebedb944ba1bcf3a0
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Sat Jun 22 15:21:34 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Sat Jun 22 15:21:34 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=8a77ed87

fix setup.py

This commit adds missing dirs to the package list in setup.py.
It also reflects the eclass/ -> files/eclass/ move in the ebuild, but that
doesn't mean that "this" version of roverlay can be installed without issues.

---
 roverlay-9999.ebuild | 2 +-
 setup.py             | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/roverlay-9999.ebuild b/roverlay-9999.ebuild
index d4da260..68c23fe 100644
--- a/roverlay-9999.ebuild
+++ b/roverlay-9999.ebuild
@@ -44,7 +44,7 @@ python_install_all() {
 	insinto "${_CONFDIR}"
 	doins config/description_fields.conf config/repo.list
 	doins -r config/simple-deprules.d/
-	doins -r eclass/
+	doins -r files/eclass/
 	newins config/R-overlay.conf.install R-overlay.conf
 
 	doman  doc/man/roverlay.1

diff --git a/setup.py b/setup.py
index a9aaf6d..3631094 100755
--- a/setup.py
+++ b/setup.py
@@ -16,14 +16,15 @@ core.setup (
 	packages     = (
 		'roverlay',
 		'roverlay/config',
+		'roverlay/db',
 		'roverlay/depres',
 		'roverlay/depres/simpledeprule',
 		'roverlay/ebuild',
 		'roverlay/overlay',
 		'roverlay/overlay/pkgdir',
-		'roverlay/overlay/pkgdir/manifest',
-		'roverlay/overlay/pkgdir/metadata',
 		'roverlay/overlay/pkgdir/distroot',
+		#'roverlay/overlay/pkgdir/manifest',
+		'roverlay/overlay/pkgdir/metadata',
 		'roverlay/packagerules',
 		'roverlay/packagerules/abstract',
 		'roverlay/packagerules/acceptors',
@@ -33,5 +34,7 @@ core.setup (
 		'roverlay/recipe',
 		'roverlay/remote',
 		'roverlay/rpackage',
+		'roverlay/tools',
+		'roverlay/util',
 	),
 )


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] proj/R_overlay:master commit in: /
@ 2013-06-22 15:24 André Erdmann
  2013-06-22 15:14 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
  0 siblings, 1 reply; 13+ messages in thread
From: André Erdmann @ 2013-06-22 15:24 UTC (permalink / raw
  To: gentoo-commits

commit:     ccd321d412b389ec5f66c6a8ca796310e319c153
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Sat Jun 22 15:11:24 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Sat Jun 22 15:11:24 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=ccd321d4

add workdir/ to gitignore

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 64690b0..0f7de68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,7 @@
 /overlay-root
 /created_overlay
 /desc-files
+/workdir
 
 # documentation files locally maintained (i.e. generated)
 /doc/pydoc


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

end of thread, other threads:[~2013-07-23 18:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-12 17:11 [gentoo-commits] proj/R_overlay:gsoc13/next commit in: / André Erdmann
2013-07-12 17:11 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
  -- strict thread matches above, loose matches on Subject: below --
2013-07-23 18:34 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-23 14:57 André Erdmann
2013-07-12 14:03 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-12 14:03 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-11 16:44 André Erdmann
2013-07-11 10:36 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-11 16:44 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-10 16:16 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-10 15:10 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-10 16:16 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-10 15:10 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-10 15:10 André Erdmann
2013-07-03 10:05 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-02 21:09 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-06-22 15:24 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-06-22 15:23 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-06-22 15:24 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-06-22 15:14 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann

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