* [gentoo-osx] some portage-prefix patches
@ 2006-07-25 13:04 Michael Haubenwallner
2006-07-25 13:11 ` Grobian
2006-08-01 13:06 ` exg
0 siblings, 2 replies; 8+ messages in thread
From: Michael Haubenwallner @ 2006-07-25 13:04 UTC (permalink / raw
To: gentoo-osx@lists.gentoo.org
[-- Attachment #1: Type: text/plain, Size: 2340 bytes --]
Hi,
after some time using portage-prefix-2.1.14 with some patches now, its
time for me to post these (partially) very useful patches...
Hopefully they will make it at least to the list at once...
[00-check-offset-prefix.patch] (minor)
Just a simple configure-commandline check for valid domain-prefix.
[01-defaultpath.patch] (minor)
Also add "${prefix}/lib/portage/bin" to DEFAULT_PATH, to simplify the
bootstrap process.
[02-ebuildenv-ROOT.patch] (minor)
Moved trailing 'os.sep' from EDEST to ROOT.
[03-eprefix-function.patch] (normal)
Well, eprefix() was not yet present in 2.1.14, but may be already
somewhere in svn (if it exists somewhere).
To get this yet trivial implementation work, [10-portageq-root.patch] is
required.
[04-interactive-ebuild.patch] (enhancement)
The most interesting one: Add interactive-feature to portage, usage:
FEATURES=interactive emerge package
FEATURES=interactive ebuild package.ebuild [unpack|compile|install|...]
[05-checked-binaries.patch] (normal)
Use the binaries figured out by configure for sandbox/bash/mv/prelink.
[06-env-conf+ext.patch] (enhancement)
[07-env-dup.patch] (enhancement)
This two patches are real enhancements, required for my
baselayout-prefix package, which i will eventually post separately
(package & patches).
[08-cnf-typo.patch] (minor)
Just a typo in cnf/Makefile.in, which prevents installation of
PREFIX/etc/make.conf.example
[09-wget-bootstrap.patch] (minor)
Use the wget found by configure, not PREFIX/usr/bin/wget per default in
make.globals. This makes bootstrap easier.
[10-portageq-root.patch] (normal)
Do not pass ROOT to 'portageq', or portageq will try to create
${ROOT}${EPREFIX}/var/tmp, which incorrectly results to
${EDEST}/${EPREFIX}${EPREFIX}/var/tmp
Figured out this with an improved sandbox.
[11-rpath-autofix.patch] (normal)
Do the "Auto fixing rpath" thing for to-be-merged files, not for already
merged ones.
[12-readonly-tree.patch] (normal)
Fix situations where the ebuild cannot be copied twice if tree is
readonly. Maybe the second ebuild-cp could be removed.
best regards, haubi
--
Michael Haubenwallner SALOMON Automation GmbH
Forschung & Entwicklung A-8114 Friesach bei Graz
mailto:michael.haubenwallner@salomon.at http://www.salomon.at
No HTML/MIME please, see http://expita.com/nomime.html
[-- Attachment #2: 00-check-offset-prefix.patch --]
[-- Type: text/x-patch, Size: 1875 bytes --]
diff -ruN portage-prefix-2.1.14.orig/configure.in portage-prefix-2.1.14/configure.in
--- portage-prefix-2.1.14.orig/configure.in 2006-07-13 11:08:56.000000000 +0200
+++ portage-prefix-2.1.14/configure.in 2006-07-13 11:09:50.000000000 +0200
@@ -9,10 +9,22 @@
dnl AC_ARG_VAR(portagegroup, the group that portage will operate under [defaults to 'portage'])
case "${prefix}" in
- '') AC_MSG_ERROR([bad value ${prefix} for --prefix, must not be empty]) ;;
- */) AC_MSG_ERROR([bad value ${prefix} for --prefix, must not end with '/']) ;;
+ '') AC_MSG_ERROR([bad value '${prefix}' for --prefix, must not be empty]) ;;
+ */) AC_MSG_ERROR([bad value '${prefix}' for --prefix, must not end with '/']) ;;
/*|NONE) ;;
- *) AC_MSG_ERROR([bad value ${prefix} for --prefix, must start with /]) ;;
+ *) AC_MSG_ERROR([bad value '${prefix}' for --prefix, must start with /]) ;;
+esac
+
+AC_ARG_WITH(offset-prefix,
+AC_HELP_STRING([--with-offset-prefix], [specify the installation prefix for all packages , defaults to '']),
+[DOMAIN_PREFIX=$withval],
+[DOMAIN_PREFIX=''])
+
+case "${DOMAIN_PREFIX}" in
+ '') ;;
+ */) AC_MSG_ERROR([bad value '${DOMAIN_PREFIX}' for --with-offset-prefix, must not end with /]) ;;
+ /*) ;;
+ *) AC_MSG_ERROR([bad value '${DOMAIN_PREFIX}' for --with-offset-prefix, must start with /]) ;;
esac
AC_CANONICAL_BUILD
@@ -195,11 +207,6 @@
AC_MSG_ERROR([error finding the user id of ${rootuser}])
fi
-AC_ARG_WITH(offset-prefix,
-AC_HELP_STRING([--with-offset-prefix], [specify the installation prefix for all packages , defaults to /]),
-[DOMAIN_PREFIX=$withval],
-[DOMAIN_PREFIX='/'])
-
DEFAULT_PATH="${DOMAIN_PREFIX}/usr/bin:${DOMAIN_PREFIX}/usr/sbin:${DOMAIN_PREFIX}/bin:${DOMAIN_PREFIX}/sbin:${prefix}/bin"
AC_ARG_WITH(default-path,
AC_HELP_STRING([--with-default-path], [specify the PATH available to the portage build environment ]),
[-- Attachment #3: 01-defaultpath.patch --]
[-- Type: text/x-patch, Size: 1451 bytes --]
diff -ruN portage-prefix-2.1.14.orig/configure portage-prefix-2.1.14/configure
--- portage-prefix-2.1.14.orig/configure 2006-07-13 11:08:56.000000000 +0200
+++ portage-prefix-2.1.14/configure 2006-07-13 11:09:50.000000000 +0200
@@ -7010,7 +7010,7 @@
DOMAIN_PREFIX='/'
fi;
-DEFAULT_PATH="${DOMAIN_PREFIX}/usr/bin:${DOMAIN_PREFIX}/usr/sbin:${DOMAIN_PREFIX}/bin:${DOMAIN_PREFIX}/sbin:${prefix}/bin"
+DEFAULT_PATH="${prefix}/lib/portage/bin:${DOMAIN_PREFIX}/usr/bin:${DOMAIN_PREFIX}/usr/sbin:${DOMAIN_PREFIX}/bin:${DOMAIN_PREFIX}/sbin:${prefix}/bin"
# Check whether --with-default-path or --without-default-path was given.
if test "${with_default_path+set}" = set; then
diff -ruN portage-prefix-2.1.14.orig/configure.in portage-prefix-2.1.14/configure.in
--- portage-prefix-2.1.14.orig/configure.in 2006-07-13 11:09:50.000000000 +0200
+++ portage-prefix-2.1.14/configure.in 2006-07-13 11:09:50.000000000 +0200
@@ -207,7 +207,7 @@
AC_MSG_ERROR([error finding the user id of ${rootuser}])
fi
-DEFAULT_PATH="${DOMAIN_PREFIX}/usr/bin:${DOMAIN_PREFIX}/usr/sbin:${DOMAIN_PREFIX}/bin:${DOMAIN_PREFIX}/sbin:${prefix}/bin"
+DEFAULT_PATH="${prefix}/lib/portage/bin:${DOMAIN_PREFIX}/usr/bin:${DOMAIN_PREFIX}/usr/sbin:${DOMAIN_PREFIX}/bin:${DOMAIN_PREFIX}/sbin:${prefix}/bin"
AC_ARG_WITH(default-path,
AC_HELP_STRING([--with-default-path], [specify the PATH available to the portage build environment ]),
[DEFAULT_PATH="${DEFAULT_PATH}":$withval],
[-- Attachment #4: 02-ebuildenv-ROOT.patch --]
[-- Type: text/x-patch, Size: 1129 bytes --]
diff -ruN portage-prefix-2.1.14.orig/pym/portage.py portage-prefix-2.1.14/pym/portage.py
--- portage-prefix-2.1.14.orig/pym/portage.py 2006-07-13 11:08:57.000000000 +0200
+++ portage-prefix-2.1.14/pym/portage.py 2006-07-13 11:09:51.000000000 +0200
@@ -2364,7 +2364,7 @@
# due to how it's coded... Don't overwrite this so we can use it.
mysettings["PORTAGE_DEBUG"]=str(debug)
- mysettings["ROOT"] = normalize_path(myroot+portage_const.EPREFIX)
+ mysettings["ROOT"] = normalize_path(myroot+portage_const.EPREFIX)+os.sep
mysettings["STARTDIR"] = getcwd()
mysettings["EBUILD"] = ebuild_path
@@ -2427,7 +2427,7 @@
mysettings["PORTAGE_BUILDDIR"] = os.path.join(mysettings["BUILD_PREFIX"], mysettings["PF"])
mysettings["WORKDIR"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "work")
- mysettings["EDEST"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image") + os.sep
+ mysettings["EDEST"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image")
mysettings["D"] = os.path.normpath(mysettings["EDEST"]+portage_const.EPREFIX)
mysettings["T"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "temp")
[-- Attachment #5: 03-eprefix-function.patch --]
[-- Type: text/x-patch, Size: 614 bytes --]
diff -ruN portage-prefix-2.1.14.orig/bin/ebuild.sh portage-prefix-2.1.14/bin/ebuild.sh
--- portage-prefix-2.1.14.orig/bin/ebuild.sh 2006-07-13 11:08:55.000000000 +0200
+++ portage-prefix-2.1.14/bin/ebuild.sh 2006-07-13 11:09:51.000000000 +0200
@@ -153,6 +153,16 @@
fi
}
+eprefix() {
+ [ $# -eq 1 ] || die "eprefix: needs exactly one argument"
+ if has_version "$1"; then
+ echo "${EPREFIX}"
+ else
+ eerror "eprefix: $1 not installed"
+ fi
+ return 0
+}
+
has_version() {
if [ "${EBUILD_PHASE}" == "depend" ]; then
die "portageq calls (has_version calls portageq) are not allowed in the global scope"
[-- Attachment #6: 04-interactive-ebuild.patch --]
[-- Type: text/x-patch, Size: 6723 bytes --]
diff -ruN portage-prefix-2.1.14.orig/bin/ebuild.sh portage-prefix-2.1.14/bin/ebuild.sh
--- portage-prefix-2.1.14.orig/bin/ebuild.sh 2006-07-13 11:09:51.000000000 +0200
+++ portage-prefix-2.1.14/bin/ebuild.sh 2006-07-13 11:09:51.000000000 +0200
@@ -815,14 +815,14 @@
}
dyn_setup() {
- [ "$(type -t pre_pkg_setup)" == "function" ] && pre_pkg_setup
- pkg_setup
- [ "$(type -t post_pkg_setup)" == "function" ] && post_pkg_setup
+ [ "$(type -t pre_pkg_setup)" == "function" ] && call-interactive pre_pkg_setup
+ call-interactive pkg_setup
+ [ "$(type -t post_pkg_setup)" == "function" ] && call-interactive post_pkg_setup
}
dyn_unpack() {
trap "abort_unpack" SIGINT SIGQUIT
- [ "$(type -t pre_src_unpack)" == "function" ] && pre_src_unpack
+ [ "$(type -t pre_src_unpack)" == "function" ] && call-interactive pre_src_unpack
local newstuff="no"
if [ -e "${WORKDIR}" ]; then
local x
@@ -849,7 +849,7 @@
if [ -e "${WORKDIR}" ]; then
if [ "$newstuff" == "no" ]; then
echo ">>> WORKDIR is up-to-date, keeping..."
- [ "$(type -t post_src_unpack)" == "function" ] && post_src_unpack
+ [ "$(type -t post_src_unpack)" == "function" ] && call-interactive post_src_unpack
return 0
fi
fi
@@ -859,12 +859,12 @@
fi
cd "${WORKDIR}" || die "Directory change failed: \`cd '${WORKDIR}'\`"
echo ">>> Unpacking source..."
- src_unpack
+ call-interactive src_unpack
touch "${PORTAGE_BUILDDIR}/.unpacked" || die "IO Failure -- Failed 'touch .unpacked' in ${PORTAGE_BUILDDIR}"
echo ">>> Source unpacked."
cd "${PORTAGE_BUILDDIR}"
- [ "$(type -t post_src_unpack)" == "function" ] && post_src_unpack
+ [ "$(type -t post_src_unpack)" == "function" ] && call-interactive post_src_unpack
trap SIGINT SIGQUIT
}
@@ -1029,7 +1029,7 @@
dyn_compile() {
trap "abort_compile" SIGINT SIGQUIT
- [ "$(type -t pre_src_compile)" == "function" ] && pre_src_compile
+ [ "$(type -t pre_src_compile)" == "function" ] && call-interactive pre_src_compile
[ "${CFLAGS-unset}" != "unset" ] && export CFLAGS
[ "${CXXFLAGS-unset}" != "unset" ] && export CXXFLAGS
@@ -1071,7 +1071,7 @@
echo ">>> It appears that ${PN} is already compiled; skipping."
echo ">>> (clean to force compilation)"
trap SIGINT SIGQUIT
- [ "$(type -t post_src_compile)" == "function" ] && post_src_compile
+ [ "$(type -t post_src_compile)" == "function" ] && call-interactive post_src_compile
return
fi
if [ -d "${S}" ]; then
@@ -1085,7 +1085,7 @@
#our libtool to create problematic .la files
export PWORKDIR="$WORKDIR"
echo ">>> Compiling source in ${srcdir} ..."
- src_compile
+ call-interactive src_compile
echo ">>> Source compiled."
#|| abort_compile "fail"
cd "${PORTAGE_BUILDDIR}"
@@ -1113,16 +1113,16 @@
touch DEBUGBUILD
fi
- [ "$(type -t post_src_compile)" == "function" ] && post_src_compile
+ [ "$(type -t post_src_compile)" == "function" ] && call-interactive post_src_compile
trap SIGINT SIGQUIT
}
dyn_test() {
- [ "$(type -t pre_src_test)" == "function" ] && pre_src_test
+ [ "$(type -t pre_src_test)" == "function" ] && call-interactive pre_src_test
if [ "${PORTAGE_BUILDDIR}/.tested" -nt "${WORKDIR}" ]; then
echo ">>> It appears that ${PN} has already been tested; skipping."
- [ "$(type -t post_src_test)" == "function" ] && post_src_test
+ [ "$(type -t post_src_test)" == "function" ] && call-interactive post_src_test
return
fi
trap "abort_test" SIGINT SIGQUIT
@@ -1135,19 +1135,19 @@
elif ! hasq test $FEATURES; then
echo ">>> Test phase [not enabled]: ${CATEGORY}/${PF}"
else
- src_test
+ call-interactive src_test
fi
cd "${PORTAGE_BUILDDIR}"
touch .tested || die "Failed to 'touch .tested' in ${PORTAGE_BUILDDIR}"
- [ "$(type -t post_src_test)" == "function" ] && post_src_test
+ [ "$(type -t post_src_test)" == "function" ] && call-interactive post_src_test
trap SIGINT SIGQUIT
}
dyn_install() {
[ -z "$PORTAGE_BUILDDIR" ] && die "${FUNCNAME}: PORTAGE_BUILDDIR is unset"
trap "abort_install" SIGINT SIGQUIT
- [ "$(type -t pre_src_install)" == "function" ] && pre_src_install
+ [ "$(type -t pre_src_install)" == "function" ] && call-interactive pre_src_install
rm -rf "${PORTAGE_BUILDDIR}/image"
mkdir "${PORTAGE_BUILDDIR}/image"
if [ -d "${S}" ]; then
@@ -1161,12 +1161,12 @@
#some packages uses an alternative to $S to build in, cause
#our libtool to create problematic .la files
export PWORKDIR="$WORKDIR"
- src_install
+ call-interactive src_install
touch "${PORTAGE_BUILDDIR}/.installed"
echo ">>> Completed installing ${PF} into ${D}"
echo
cd ${PORTAGE_BUILDDIR}
- [ "$(type -t post_src_install)" == "function" ] && post_src_install
+ [ "$(type -t post_src_install)" == "function" ] && call-interactive post_src_install
trap SIGINT SIGQUIT
}
@@ -1176,12 +1176,29 @@
return 1
fi
- [ "$(type -t pre_pkg_preinst)" == "function" ] && pre_pkg_preinst
+ [ "$(type -t pre_pkg_preinst)" == "function" ] && call-interactive pre_pkg_preinst
declare -r D=${IMAGE}
- pkg_preinst
+ call-interactive pkg_preinst
- [ "$(type -t post_pkg_preinst)" == "function" ] && post_pkg_preinst
+ [ "$(type -t post_pkg_preinst)" == "function" ] && call-interactive post_pkg_preinst
+}
+
+call-interactive() {
+ if ! hasq interactive ${FEATURES}; then
+ $1
+ return $?
+ fi
+
+ ( echo 'unset ENV'
+ set
+ export -p
+ shopt -p
+ echo "export PS1='INTERACTIVE ${PN} $1 \$ '"
+ echo 'unset ENV'
+ ) >> ${T}/interactive-environment
+ export PS1="INTERACTIVE ${PN} $1 \$ "
+ ${BASH} --rcfile ${T}/interactive-environment -s || die
}
dyn_help() {
@@ -1662,21 +1679,21 @@
for myarg in $*; do
case $myarg in
nofetch)
- pkg_nofetch
+ call-interactive pkg_nofetch
exit 1
;;
prerm|postrm|postinst|config)
export SANDBOX_ON="0"
if [ "$PORTAGE_DEBUG" != "1" ]; then
- [ "$(type -t pre_pkg_${myarg})" == "function" ] && pre_pkg_${myarg}
- pkg_${myarg}
- [ "$(type -t post_pkg_${myarg})" == "function" ] && post_pkg_${myarg}
+ [ "$(type -t pre_pkg_${myarg})" == "function" ] && call-interactive pre_pkg_${myarg}
+ call-interactive pkg_${myarg}
+ [ "$(type -t post_pkg_${myarg})" == "function" ] && call-interactive post_pkg_${myarg}
#Allow non-zero return codes since they can be caused by &&
else
set -x
- [ "$(type -t pre_pkg_${myarg})" == "function" ] && pre_pkg_${myarg}
- pkg_${myarg}
- [ "$(type -t post_pkg_${myarg})" == "function" ] && post_pkg_${myarg}
+ [ "$(type -t pre_pkg_${myarg})" == "function" ] && call-interactive pre_pkg_${myarg}
+ call-interactive pkg_${myarg}
+ [ "$(type -t post_pkg_${myarg})" == "function" ] && call-interactive post_pkg_${myarg}
#Allow non-zero return codes since they can be caused by &&
set +x
fi
[-- Attachment #7: 05-checked-binaries.patch --]
[-- Type: text/x-patch, Size: 811 bytes --]
diff -ruN portage-prefix-2.1.14.orig/pym/portage_const.py portage-prefix-2.1.14/pym/portage_const.py
--- portage-prefix-2.1.14.orig/pym/portage_const.py 2006-07-13 11:08:57.000000000 +0200
+++ portage-prefix-2.1.14/pym/portage_const.py 2006-07-13 11:09:52.000000000 +0200
@@ -31,10 +31,10 @@
EBUILD_SH_BINARY = PORTAGE_BIN_PATH+"/ebuild.sh"
MISC_SH_BINARY = PORTAGE_BIN_PATH + "/misc-functions.sh"
-SANDBOX_BINARY = "sandbox"
-BASH_BINARY = "bash"
-MOVE_BINARY = "mv"
-PRELINK_BINARY = "prelink"
+SANDBOX_BINARY = "@SANDBOX@"
+BASH_BINARY = "@BASH@"
+MOVE_BINARY = "@MV@"
+PRELINK_BINARY = "@PRELINK@"
WORLD_FILE = PRIVATE_PATH + "/world"
MAKE_CONF_FILE = EPREFIX+"/etc/make.conf"
[-- Attachment #8: 08-cnf-typo.patch --]
[-- Type: text/x-patch, Size: 945 bytes --]
--- portage-prefix-2.1.14/cnf/Makefile.in.orig 2006-07-14 13:03:27.000000000 +0200
+++ portage-prefix-2.1.14/cnf/Makefile.in 2006-07-14 12:55:26.000000000 +0200
@@ -29,7 +29,7 @@
; $(INSTALL_cnfsubst) $(srcdir)/make.globals $(DESTDIR)$(sysconfdir)/make.globals \
; echo "$(INSTALL_cnfsubst) $(srcdir)/make.conf $(DESTDIR)$(sysconfdir)/make.conf.example" \
; $(INSTALL_cnfsubst) $(srcdir)/make.conf $(DESTDIR)$(sysconfdir)/make.conf.example \
- : echo "$(INSTALL_cnfsubst) $(srcdir)/dispatch-conf.conf $(DESTDIR)$(sysconfdir)/dispatch-conf.conf" \
+ ; echo "$(INSTALL_cnfsubst) $(srcdir)/dispatch-conf.conf $(DESTDIR)$(sysconfdir)/dispatch-conf.conf" \
; $(INSTALL_cnfsubst) $(srcdir)/dispatch-conf.conf $(DESTDIR)$(sysconfdir)/dispatch-conf.conf \
; echo "$(INSTALL_cnfsubst) $(srcdir)/etc-update.conf $(DESTDIR)$(sysconfdir)/etc-update.conf" \
; $(INSTALL_cnfsubst) $(srcdir)/etc-update.conf $(DESTDIR)$(sysconfdir)/etc-update.conf
[-- Attachment #9: 09-wget-bootstrap.patch --]
[-- Type: text/x-patch, Size: 679 bytes --]
--- portage-prefix-2.1.14/cnf/make.globals.orig 2006-07-14 13:03:41.000000000 +0200
+++ portage-prefix-2.1.14/cnf/make.globals 2006-07-14 13:04:02.000000000 +0200
@@ -29,8 +29,8 @@
PORTAGE_TMPDIR=@DOMAIN_PREFIX@/var/tmp
# Fetching command (5 tries, passive ftp for firewall compatibility)
-FETCHCOMMAND="@DOMAIN_PREFIX@/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
-RESUMECOMMAND="@DOMAIN_PREFIX@/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
+FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
+RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
# Default user options
FEATURES="sandbox distlocks metadata-transfer"
[-- Attachment #10: 10-portageq-root.patch --]
[-- Type: text/x-patch, Size: 897 bytes --]
--- portage-prefix-2.1.14/bin/ebuild.sh.orig 2006-07-19 22:19:43.000000000 +0200
+++ portage-prefix-2.1.14/bin/ebuild.sh 2006-07-19 22:20:01.000000000 +0200
@@ -169,7 +169,7 @@
fi
# return shell-true/shell-false if exists.
# Takes single depend-type atoms.
- if @PORTAGE_BASE@/bin/portageq 'has_version' "${ROOT}" "$1"; then
+ if portageq 'has_version' "${ROOT%${EPREFIX}/}/" "$1"; then
return 0
else
return 1
@@ -180,7 +180,7 @@
if [ "${EBUILD_PHASE}" == "depend" ]; then
die "portageq calls are not allowed in the global scope"
fi
- @PORTAGE_BASE@/bin/portageq "$@"
+ ROOT="${ROOT%${EPREFIX}/}/" @PORTAGE_BASE@/bin/portageq "$@"
}
@@ -195,7 +195,7 @@
fi
# returns the best/most-current match.
# Takes single depend-type atoms.
- @PORTAGE_BASE@/bin/portageq 'best_version' "${ROOT}" "$1"
+ portageq 'best_version' "${ROOT%${EPREFIX}/}/" "$1"
}
with_bindir() {
[-- Attachment #11: 11-rpath-autofix.patch --]
[-- Type: text/x-patch, Size: 723 bytes --]
--- portage-prefix-2.1.14/bin/misc-functions.sh.orig 2006-07-24 11:39:56.000000000 +0200
+++ portage-prefix-2.1.14/bin/misc-functions.sh 2006-07-24 11:40:09.000000000 +0200
@@ -50,7 +50,7 @@
# Don't want paths that point to the tree where the package was built
# (older, broken libtools would do this). Also check for null paths
# because the loader will search $PWD when it finds null paths.
- f=$(scanelf -qyRF '%r %p' "${D}" | grep -E "(${PORTAGE_BUILDDIR}|: |::|^:|^ )")
+ f=$(for f in $(scanelf -qyRF '%r %p' "${D}" | grep -E "(${PORTAGE_BUILDDIR}|: |::|^:|^ )"); do echo "${D}${f}"; done)
if [[ -n ${f} ]] ; then
echo -ne '\a\n'
echo "QA Notice: the following files contain insecure RUNPATH's"
[-- Attachment #12: 12-readonly-tree.patch --]
[-- Type: text/x-patch, Size: 774 bytes --]
--- portage-prefix-2.1.14/bin/ebuild.sh.orig 2006-07-24 17:21:11.000000000 +0200
+++ portage-prefix-2.1.14/bin/ebuild.sh 2006-07-24 17:22:23.000000000 +0200
@@ -1064,7 +1064,7 @@
if [ ! -e "build-info" ]; then
mkdir build-info
fi
- cp "${EBUILD}" "build-info/${PF}.ebuild"
+ cp -f "${EBUILD}" "build-info/${PF}.ebuild"
if [ "${PORTAGE_BUILDDIR}/.compiled" -nt "${WORKDIR}" ]; then
echo ">>> It appears that ${PN} is already compiled; skipping."
@@ -1104,7 +1104,7 @@
export -p | sed 's:declare -rx:declare -x:' >> environment
bzip2 -9 environment
- cp "${EBUILD}" "${PF}.ebuild"
+ cp -f "${EBUILD}" "${PF}.ebuild"
if [[ " ${FEATURES} " == *" nostrip "* ]] || \
[[ " ${RESTRICT} " == *" nostrip "* ]] || \
[[ " ${RESTRICT} " == *" strip "* ]]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-osx] some portage-prefix patches
2006-07-25 13:04 [gentoo-osx] some portage-prefix patches Michael Haubenwallner
@ 2006-07-25 13:11 ` Grobian
2006-07-25 22:43 ` m h
2006-08-01 13:06 ` exg
1 sibling, 1 reply; 8+ messages in thread
From: Grobian @ 2006-07-25 13:11 UTC (permalink / raw
To: gentoo-osx
On 25-07-2006 15:04:47 +0200, Michael Haubenwallner wrote:
> Hi,
>
> after some time using portage-prefix-2.1.14 with some patches now, its
> time for me to post these (partially) very useful patches...
>
> Hopefully they will make it at least to the list at once...
Wow. Thanks Michael!
Time is not my best friend at the moment, but I hope these patches can
give a new "impulse" to the prefix portage development!
--
gentoo-osx@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-osx] some portage-prefix patches
2006-07-25 13:11 ` Grobian
@ 2006-07-25 22:43 ` m h
0 siblings, 0 replies; 8+ messages in thread
From: m h @ 2006-07-25 22:43 UTC (permalink / raw
To: gentoo-osx
Cool to see some activity on the list!
Does anyone have a diff from prefix to the portage code it was based
on? I'm interested in seeing how big the patch is. Also since normal
portage appears to have some activity it might be nice to try to keep
in sync with it.
On 7/25/06, Grobian <grobian@gentoo.org> wrote:
> On 25-07-2006 15:04:47 +0200, Michael Haubenwallner wrote:
> > Hi,
> >
> > after some time using portage-prefix-2.1.14 with some patches now, its
> > time for me to post these (partially) very useful patches...
> >
> > Hopefully they will make it at least to the list at once...
>
> Wow. Thanks Michael!
>
> Time is not my best friend at the moment, but I hope these patches can
> give a new "impulse" to the prefix portage development!
> --
> gentoo-osx@gentoo.org mailing list
>
>
--
gentoo-osx@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-osx] some portage-prefix patches
2006-07-25 13:04 [gentoo-osx] some portage-prefix patches Michael Haubenwallner
2006-07-25 13:11 ` Grobian
@ 2006-08-01 13:06 ` exg
2006-08-01 14:12 ` Grobian
2006-08-01 15:53 ` Michael Haubenwallner
1 sibling, 2 replies; 8+ messages in thread
From: exg @ 2006-08-01 13:06 UTC (permalink / raw
To: gentoo-osx
> [01-defaultpath.patch] (minor)
> Also add "${prefix}/lib/portage/bin" to DEFAULT_PATH, to simplify the
> bootstrap process.
I do not see how it can aid bootstrap.
> [02-ebuildenv-ROOT.patch] (minor)
> Moved trailing 'os.sep' from EDEST to ROOT.
What is it needed for?
> [03-eprefix-function.patch] (normal)
> Well, eprefix() was not yet present in 2.1.14, but may be already
> somewhere in svn (if it exists somewhere).
> To get this yet trivial implementation work, [10-portageq-root.patch] is
> required.
What is a constant function that always returns the value of EPREFIX if
the input pkg is in the vdb useful for?
> [04-interactive-ebuild.patch] (enhancement)
> The most interesting one: Add interactive-feature to portage, usage:
> FEATURES=interactive emerge package
> FEATURES=interactive ebuild package.ebuild [unpack|compile|install|...]
This is not prefix specific; you should send it to the
gentoo-portage-dev mailing list.
> [11-rpath-autofix.patch] (normal)
> Do the "Auto fixing rpath" thing for to-be-merged files, not for already
> merged ones.
Ditto.
> [12-readonly-tree.patch] (normal)
> Fix situations where the ebuild cannot be copied twice if tree is
> readonly. Maybe the second ebuild-cp could be removed.
Ditto.
> [05-checked-binaries.patch] (normal)
> Use the binaries figured out by configure for sandbox/bash/mv/prelink.
No, we want a path lookup for those to have some flexibility, especially
for bash.
> [08-cnf-typo.patch] (minor)
> Just a typo in cnf/Makefile.in, which prevents installation of
> PREFIX/etc/make.conf.example
Applied.
> [09-wget-bootstrap.patch] (minor)
> Use the wget found by configure, not PREFIX/usr/bin/wget per default in
> make.globals. This makes bootstrap easier.
I do not see how, given that we bootstrap wget too.
> [10-portageq-root.patch] (normal)
> Do not pass ROOT to 'portageq', or portageq will try to create
> ${ROOT}${EPREFIX}/var/tmp, which incorrectly results to
> ${EDEST}/${EPREFIX}${EPREFIX}/var/tmp
> Figured out this with an improved sandbox.
I don't think it's the right place to fix it, I'll look into the
problem. How have you figured it out exactly?
--
Emanuele
--
gentoo-osx@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-osx] some portage-prefix patches
2006-08-01 13:06 ` exg
@ 2006-08-01 14:12 ` Grobian
2006-08-01 15:53 ` Michael Haubenwallner
1 sibling, 0 replies; 8+ messages in thread
From: Grobian @ 2006-08-01 14:12 UTC (permalink / raw
To: gentoo-osx
exg, thanks for looking into this. One thing I can answer:
On 01-08-2006 15:06:59 +0200, exg@gentoo.org wrote:
> > [03-eprefix-function.patch] (normal)
> > Well, eprefix() was not yet present in 2.1.14, but may be already
> > somewhere in svn (if it exists somewhere).
> > To get this yet trivial implementation work, [10-portageq-root.patch] is
> > required.
>
> What is a constant function that always returns the value of EPREFIX if
> the input pkg is in the vdb useful for?
It's simply a preparation for multi-prefix support, e.g.
eprefix myapplication
that would allow to have a --with-mylib=$(eprefix sys-libs/mylib) in
your configure or something.
At least that was the cool idea we once had, iirc.
--
Fabian Groffen
Gentoo for Mac OS X Project
--
gentoo-osx@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-osx] some portage-prefix patches
2006-08-01 13:06 ` exg
2006-08-01 14:12 ` Grobian
@ 2006-08-01 15:53 ` Michael Haubenwallner
2006-08-03 12:04 ` Michael Haubenwallner
2006-08-03 12:53 ` Michael Haubenwallner
1 sibling, 2 replies; 8+ messages in thread
From: Michael Haubenwallner @ 2006-08-01 15:53 UTC (permalink / raw
To: gentoo-osx
Thanks for looking through/applying the patches!
Which repository do you use ?
There've been discussions on the list where to host the repository - did
I miss something ?
On Tue, 2006-08-01 at 15:06 +0200, exg@gentoo.org wrote:
> > [01-defaultpath.patch] (minor)
> > Also add "${prefix}/lib/portage/bin" to DEFAULT_PATH, to simplify
> the
> > bootstrap process.
>
> I do not see how it can aid bootstrap.
Well, I do not use the bootstrap-script from the tree, but keep using my
toolsbox, which very-initially was used to bootstrap prefix-portage.
Here I install portage (and bash,wget,sandbox,python,...) to a different
prefix than the domain-prefix I give to portage's configure, to have a
fully portage-managed prefix.
It was a bit easier for me to have this in default path too.
>
> > [02-ebuildenv-ROOT.patch] (minor)
> > Moved trailing 'os.sep' from EDEST to ROOT.
>
> What is it needed for?
This is to be compatible with upstream-portage: in some ebuilds I found
tweaks using "${ROOT}usr/bin", failing if ROOT doesn't have trailing
slash (sys-devel/libperl, dev-lang/perl, net-nds/openldap, ...).
The removal from EDEST is not really necessary, just for some
double-slash prettyness.
> > [04-interactive-ebuild.patch] (enhancement)
> > The most interesting one: Add interactive-feature to portage, usage:
> > FEATURES=interactive emerge package
> > FEATURES=interactive ebuild package.ebuild [unpack|compile|
> install|...]
>
> This is not prefix specific; you should send it to the
> gentoo-portage-dev mailing list.
> > [11-rpath-autofix.patch] (normal)
> > Do the "Auto fixing rpath" thing for to-be-merged files, not for
> already
> > merged ones.
>
> Ditto.
>
Sure, but I do not have this patches for upstream-portage yet, as I need
and use them for prefix-portage.
How much has portage-prefix-2.1.14 to do with official portage-2.1 (from
the SVN-POV) ?
> > [12-readonly-tree.patch] (normal)
> > Fix situations where the ebuild cannot be copied twice if tree is
> > readonly. Maybe the second ebuild-cp could be removed.
>
> Ditto.
For the readonly tree I have to say that I have an improved sandbox,
also wrapping the stat()-call, removing write-permission on readonly
files. Will paste the sandbox-patches soon, but I'm unsure yet if they
are ready for upstream-sandbox.
>
> > [05-checked-binaries.patch] (normal)
> > Use the binaries figured out by configure for
> sandbox/bash/mv/prelink.
>
> No, we want a path lookup for those to have some flexibility,
> especially
> for bash.
Can't remember what the real issue was to me, will do some more testing
without this patch.
>
> > [09-wget-bootstrap.patch] (minor)
> > Use the wget found by configure, not PREFIX/usr/bin/wget per default
> in
> > make.globals. This makes bootstrap easier.
>
> I do not see how, given that we bootstrap wget too.
Ditto.
>
> > [10-portageq-root.patch] (normal)
> > Do not pass ROOT to 'portageq', or portageq will try to create
> > ${ROOT}${EPREFIX}/var/tmp, which incorrectly results to
> > ${EDEST}/${EPREFIX}${EPREFIX}/var/tmp
> > Figured out this with an improved sandbox.
>
> I don't think it's the right place to fix it, I'll look into the
> problem. How have you figured it out exactly?
I have a patched sandbox which can prevent creation of ${D}${EPREFIX}
-haubi-
--
Michael Haubenwallner SALOMON Automation GmbH
Forschung & Entwicklung A-8114 Friesach bei Graz
mailto:michael.haubenwallner@salomon.at http://www.salomon.at
No HTML/MIME please, see http://expita.com/nomime.html
--
gentoo-osx@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-osx] some portage-prefix patches
2006-08-01 15:53 ` Michael Haubenwallner
@ 2006-08-03 12:04 ` Michael Haubenwallner
2006-08-03 12:53 ` Michael Haubenwallner
1 sibling, 0 replies; 8+ messages in thread
From: Michael Haubenwallner @ 2006-08-03 12:04 UTC (permalink / raw
To: gentoo-osx
Have done more tests now without some patches:
On Tue, 2006-08-01 at 17:53 +0200, Michael Haubenwallner wrote:
<snip>
> > > [05-checked-binaries.patch] (normal)
> > > Use the binaries figured out by configure for
> > sandbox/bash/mv/prelink.
> >
> > No, we want a path lookup for those to have some flexibility,
> > especially
> > for bash.
>
> Can't remember what the real issue was to me, will do some more testing
> without this patch.
The test for variable 'sandbox_capable' in portage_exec.py relies on
having full path in SANDBOX_BINARY, otherways portage always spits
red("!!! Problem with sandbox binary. Disabling...\n\n")
Path-lookup seems to work for bash & mv, did not use prelink yet.
> >
> > > [09-wget-bootstrap.patch] (minor)
> > > Use the wget found by configure, not PREFIX/usr/bin/wget per default
> > in
> > > make.globals. This makes bootstrap easier.
> >
> > I do not see how, given that we bootstrap wget too.
>
> Ditto.
I do bootstrapping into a separate bootstrap-prefix, giving portage a
completely different '--with-offset-prefix' than it is installed into.
Thus the make.globals setting won't point to a real existing wget
without this patch, and I'd have to create an extra entry in make.conf,
potentially to be forgotten to be removed after 'emerge system' for the
empty domain-prefix.
-haubi-
--
Michael Haubenwallner SALOMON Automation GmbH
Forschung & Entwicklung A-8114 Friesach bei Graz
mailto:michael.haubenwallner@salomon.at http://www.salomon.at
No HTML/MIME please, see http://expita.com/nomime.html
--
gentoo-osx@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-osx] some portage-prefix patches
2006-08-01 15:53 ` Michael Haubenwallner
2006-08-03 12:04 ` Michael Haubenwallner
@ 2006-08-03 12:53 ` Michael Haubenwallner
1 sibling, 0 replies; 8+ messages in thread
From: Michael Haubenwallner @ 2006-08-03 12:53 UTC (permalink / raw
To: gentoo-osx
On Tue, 2006-08-01 at 17:53 +0200, Michael Haubenwallner wrote:
> On Tue, 2006-08-01 at 15:06 +0200, exg@gentoo.org wrote:
> > > [01-defaultpath.patch] (minor)
> > > Also add "${prefix}/lib/portage/bin" to DEFAULT_PATH, to simplify
> > the
> > > bootstrap process.
> >
> > I do not see how it can aid bootstrap.
>
> Well, I do not use the bootstrap-script from the tree, but keep using my
> toolsbox, which very-initially was used to bootstrap prefix-portage.
> Here I install portage (and bash,wget,sandbox,python,...) to a different
> prefix than the domain-prefix I give to portage's configure, to have a
> fully portage-managed prefix.
> It was a bit easier for me to have this in default path too.
Now I have my problem again, which caused this patch:
.../sys-devel/patch/patch-2.5.9-r1.ebuild: line 38: emake: command not found
Found: ${prefix}/lib/portage/bin is set as DEFAULT_PATH by
bootstrap-prefix.sh into ${ROOT}/etc/make.conf.
Why not let portage itself know of its paths, rather than having the
"user" set them too ?
-haubi-
--
Michael Haubenwallner SALOMON Automation GmbH
Forschung & Entwicklung A-8114 Friesach bei Graz
mailto:michael.haubenwallner@salomon.at http://www.salomon.at
No HTML/MIME please, see http://expita.com/nomime.html
--
gentoo-osx@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-08-03 12:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-25 13:04 [gentoo-osx] some portage-prefix patches Michael Haubenwallner
2006-07-25 13:11 ` Grobian
2006-07-25 22:43 ` m h
2006-08-01 13:06 ` exg
2006-08-01 14:12 ` Grobian
2006-08-01 15:53 ` Michael Haubenwallner
2006-08-03 12:04 ` Michael Haubenwallner
2006-08-03 12:53 ` Michael Haubenwallner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox