Thu, 20 Mar 2008
Fun with one-liners.
I recently had to make the same modification to 25 ports. In fact, I was resetting a maintainer because the address is bouncing. I don't want to have to make the same edit by hand to 25 different files, so here's what I used.
I keep a checkout of the ports tree in ~/freebsd/ports. Let's find all the ports I want to change and change them. This assumes I'm using the most up-to-date INDEX:
wxs@ack ~/freebsd/ports % make quicksearch key="rnoland@2hip.net" | grep "^Path:" | awk '{ print $2 "/Makefile" }' | xargs -L 1 sed -i '' -Ee 's/(MAINTAINER=.*)rnoland@2hip.net/\1ports@FreeBSD.org/'
So now that the changes are done we can generate the diff to send to my mentor for approval. I have to remove /home/wxs/freebsd/ports from the filenames (or wherever I happen to have $PORTSDIR set to, or /usr/ports if it is unset):
wxs@ack ~/freebsd/ports % make quicksearch key="rnoland@2hip.net" | grep "^Path:" | awk '{ print $2 "/Makefile" }' | xargs echo | sed 's#/home/wxs/freebsd/ports/##g' | xargs cvs diff -u | > /home/wxs/wip/rnoland.diff
These probably are not the most efficient way to do things, but it's far easier than doing it by hand.
posted at: 09:59 | tags: ports | path: /entries/geek | permanent link to this entry
Tue, 19 Feb 2008
Displaying ALL pkg-message files? (UPDATED)
I had a friend or two test out the patch I posted before. Turns out it was quite buggy. I didn't claim to give that one any extensive testing, but I'm fairly certain this one is less buggy. Feel free to test it out and let me know what you think.
I still plan on running with this when I get a new laptop in a week or two before I send-pr it. But feel free to test it out on your own and send me any reports of success or failure.
Index: bsd.commands.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.commands.mk,v retrieving revision 1.1 diff -u -u -r1.1 bsd.commands.mk --- bsd.commands.mk 4 Aug 2007 11:37:23 -0000 1.1 +++ bsd.commands.mk 20 Feb 2008 03:52:17 -0000 @@ -64,6 +64,7 @@ MV?= /bin/mv OBJCOPY?= /usr/bin/objcopy OBJDUMP?= /usr/bin/objdump +PAGER?= /usr/bin/less PASTE?= /usr/bin/paste PAX?= /bin/pax PRINTF?= /usr/bin/printf Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.589 diff -u -u -r1.589 bsd.port.mk --- bsd.port.mk 17 Oct 2007 10:12:24 -0000 1.589 +++ bsd.port.mk 20 Feb 2008 03:52:18 -0000 @@ -2313,6 +2313,7 @@ PKGMESSAGE?= ${PKGDIR}/pkg-message TMPPLIST?= ${WRKDIR}/.PLIST.mktmp +ALLPKGMSGS?= ${WRKDIR}/all-pkg-messages .for _CATEGORY in ${CATEGORIES} PKGCATEGORY?= ${_CATEGORY} @@ -3933,6 +3934,30 @@ .endif .endif +.if !target(collect-all-pkg-message) +collect-all-pkg-message: +.if defined(SHOW_ALL_PKG_MSGS) + @if [ -f ${PKGMESSAGE} ]; then \ + ${ECHO_MSG} "===> Collecting pkg-message for later display."; \ + ${ECHO_CMD} "pkg-message for ${PKGNAME}:" >> ${ALLPKGMSGS}; \ + ${CAT} ${PKGMESSAGE} >> ${ALLPKGMSGS}; \ + fi; +.else + @${DO_NADA} +.endif +.endif + +.if !target(display-all-pkg-message) +display-all-pkg-message: +.if defined(SHOW_ALL_PKG_MSGS) + @if [ ${WRKDIR} = `dirname ${ALLPKGMSGS}` -a -e ${ALLPKGMSGS} ]; then \ + ${PAGER} ${ALLPKGMSGS}; \ + fi; +.else + @${DO_NADA} +.endif +.endif + .if !target(security-check) .if !defined(OLD_SECURITY_CHECK) @@ -4109,13 +4134,15 @@ _INSTALL_DEP= build _INSTALL_SEQ= install-message check-conflicts \ run-depends lib-depends apply-slist pre-install \ - pre-install-script generate-plist check-already-installed + pre-install-script generate-plist collect-all-pkg-message \ + check-already-installed _INSTALL_SUSEQ= check-umask install-mtree pre-su-install \ pre-su-install-script do-install install-desktop-entries \ post-install post-install-script add-plist-info \ add-plist-docs add-plist-examples add-plist-data \ add-plist-post install-rc-script compress-man \ - install-ldconfig-file fake-pkg security-check + install-ldconfig-file fake-pkg security-check \ + display-all-pkg-message _PACKAGE_DEP= install _PACKAGE_SEQ= package-message pre-package pre-package-script \ do-package post-package-script @@ -4817,15 +4844,15 @@ dir=`${ECHO_CMD} $$dir | ${SED} -e 's/:.*//'`; \ if [ X${DEPENDS_PRECLEAN} != "X" ]; then \ target="clean $$target"; \ - depends_args="$$depends_args NOCLEANDEPENDS=yes"; \ + depends_args="$$depends_args NOCLEANDEPENDS=yes ALLPKGMSGS=${ALLPKGMSGS}"; \ fi; \ if [ X${DEPENDS_CLEAN} != "X" ]; then \ target="$$target clean"; \ - depends_args="$$depends_args NOCLEANDEPENDS=yes"; \ + depends_args="$$depends_args NOCLEANDEPENDS=yes ALLPKGMSGS=${ALLPKGMSGS}"; \ fi; \ else \ target="${DEPENDS_TARGET}"; \ - depends_args="${DEPENDS_ARGS}"; \ + depends_args="${DEPENDS_ARGS} ALLPKGMSGS=${ALLPKGMSGS}"; \ fi; \ if ${EXPR} "$$prog" : \\/ >/dev/null; then \ if [ -e "$$prog" ]; then \
posted at: 22:24 | tags: ports, freebsd | path: /entries/freebsd | permanent link to this entry
Fri, 08 Feb 2008
Displaying ALL pkg-message files?
One thing that often confuses new users to FreeBSD is the fact that pkg-message files fly past their terminal as the ports infrastructure does it's thing. Because of this they sometimes do not see important messages on steps which should be taken after the installation is complete. I set out to solve this recently and here is what I've come up with:
Index: bsd.commands.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.commands.mk,v retrieving revision 1.1 diff -u -u -r1.1 bsd.commands.mk --- bsd.commands.mk 4 Aug 2007 11:37:23 -0000 1.1 +++ bsd.commands.mk 9 Feb 2008 00:08:31 -0000 @@ -64,6 +64,7 @@ MV?= /bin/mv OBJCOPY?= /usr/bin/objcopy OBJDUMP?= /usr/bin/objdump +PAGER?= /usr/bin/less PASTE?= /usr/bin/paste PAX?= /bin/pax PRINTF?= /usr/bin/printf Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.589 diff -u -u -r1.589 bsd.port.mk --- bsd.port.mk 17 Oct 2007 10:12:24 -0000 1.589 +++ bsd.port.mk 9 Feb 2008 00:08:32 -0000 @@ -2313,6 +2313,7 @@ PKGMESSAGE?= ${PKGDIR}/pkg-message TMPPLIST?= ${WRKDIR}/.PLIST.mktmp +ALLPKGMSGS?= ${WRKDIR}/all-pkg-messages .for _CATEGORY in ${CATEGORIES} PKGCATEGORY?= ${_CATEGORY} @@ -3933,6 +3934,19 @@ .endif .endif +.if !target(collect-pkg-message) +collect-pkg-message: +.if defined(SHOW_ALL_PKG_MSGS) +.if exists(${PKGMESSAGE}) + @${ECHO_MSG} "===> Collecting pkg-message for later display." + @${ECHO_CMD} "pkg-message for ${PKGNAME}:" >> ${ALLPKGMSGS} + @${CAT} ${PKGMESSAGE} >> ${ALLPKGMSGS} +.endif +.else + @${DO_NADA} +.endif +.endif + .if !target(security-check) .if !defined(OLD_SECURITY_CHECK) @@ -4109,7 +4123,8 @@ _INSTALL_DEP= build _INSTALL_SEQ= install-message check-conflicts \ run-depends lib-depends apply-slist pre-install \ - pre-install-script generate-plist check-already-installed + pre-install-script generate-plist check-already-installed \ + collect-pkg-message _INSTALL_SUSEQ= check-umask install-mtree pre-su-install \ pre-su-install-script do-install install-desktop-entries \ post-install post-install-script add-plist-info \ @@ -4817,15 +4832,15 @@ dir=`${ECHO_CMD} $$dir | ${SED} -e 's/:.*//'`; \ if [ X${DEPENDS_PRECLEAN} != "X" ]; then \ target="clean $$target"; \ - depends_args="$$depends_args NOCLEANDEPENDS=yes"; \ + depends_args="$$depends_args NOCLEANDEPENDS=yes ALLPKGMSGS=${ALLPKGMSGS}"; \ fi; \ if [ X${DEPENDS_CLEAN} != "X" ]; then \ target="$$target clean"; \ - depends_args="$$depends_args NOCLEANDEPENDS=yes"; \ + depends_args="$$depends_args NOCLEANDEPENDS=yes ALLPKGMSGS=${ALLPKGMSGS}"; \ fi; \ else \ target="${DEPENDS_TARGET}"; \ - depends_args="${DEPENDS_ARGS}"; \ + depends_args="${DEPENDS_ARGS} ALLPKGMSGS=${ALLPKGMSGS}"; \ fi; \ if ${EXPR} "$$prog" : \\/ >/dev/null; then \ if [ -e "$$prog" ]; then \ @@ -5750,6 +5765,11 @@ .else @${DO_NADA} .endif +.if defined(SHOW_ALL_PKG_MSGS) + @if [ ${WRKDIR} = `dirname ${ALLPKGMSGS}` ]; then \ + ${PAGER} ${ALLPKGMSGS}; \ + fi; +.endif .endif # Depend is generally meaningless for arbitrary ports, but if someone wants
It's actually pretty simple. I just keep appending the pkg-messages to ${WRKDIR}/all-pkg-messages of the original port. The file location is passed to dependency builds, and at the very end it displays the entire contents of that file in $PAGER. To make sure not to break POLA I do most of the work inside checks of SHOW_ALL_PKG_MSGS definition. I'll probably send this off to my mentor to see what he thinks of it before I submit it to a wider audience. I'll also probably run with it when I build up my new work laptop so I can catch any problems that may crop up there. I also plan on coming up with a patch to provide similar functionality when using pkg_add(1).
Which brings me to my next point. In a few weeks I'll be starting a new job working on and with FreeBSD. It will be a lot of fun and a huge learning experience for me. I'm certainly looking forward to it, and to sharing all that I can here.
posted at: 20:18 | tags: freebsd, ports | path: /entries/freebsd | permanent link to this entry
Thu, 03 Jan 2008
Best. Commit. Evar!
revision 1.818 date: 2008/01/03 20:05:17; author: garga; state: Exp; lines: +1 -0 Please welcome Wesley Shieldsas a new ports committers. He sent a lot of good PRs and is recieving usual punnishment. I'll be his mentor. Approved by: portmgr Account created by: dhw
Of course, I already got my first spam at that address probably no more than 6 hours after that commit message. Silly spammers.
Now I can go forth and work on things (like the usual conventional commits after access is granted)!
posted at: 20:36 | tags: freebsd, ports | path: /entries/freebsd | permanent link to this entry
Thu, 27 Dec 2007
Now I've Gone and Done It.
I guess the cat's out of the bag now. I'm being punished with a ports commit bit.
And I was waiting to quote the commit to access... :)
posted at: 15:14 | tags: freebsd, ports | path: /entries/freebsd | permanent link to this entry
Fri, 21 Dec 2007
Unbreaking Ports on CURRENT!
Over the last few nights I've fixed the following ports on -CURRENT (with Pav's help committing them):
- games/dangerdeep
- devel/gccxml (just submitted, not committed yet)
- lang/llvm-gcc4 (just submitted, not committed yet)
- www/oops
- net/pppoa
- devel/py-bison
- math/py-matplotlib
- textproc/py-rxp
- lang/rexx-imc
- sysutils/xosview
- lang/g95
- lang/gcc-ooo
- lang/gpc
Of course, this was just the list that Pav sent to me when I volunteered to fix things broken on -CURRENT. There could be more, but I haven't checked the latest runs yet.
posted at: 22:43 | tags: freebsd, ports | path: /entries/freebsd | permanent link to this entry
Wed, 19 Dec 2007
Unbreaking Ports on -CURRENT.
After climbing tonight I spent a bit watching House (what a good show) on my DVR and am currently fixing up about a dozen ports that are broken on -CURRENT. The 4 I took care of tonight are simple fixes but on the list I was given there are some interesting ones and a note or two about them potentially being difficult.
I'm exhausted tonight and my elbow really hurts from climbing so I'm calling it a night early. Tomorrow night I'll hopefully be able to hammer out a few more of these. This weekend Michelle and I are driving to NC for Christmas. I'll be returning Christmas day and will have a quiet week at work the rest of that week, so hopefully I can catch up there.
posted at: 21:35 | tags: freebsd, ports | path: /entries/freebsd | permanent link to this entry
Fri, 14 Dec 2007
Portmaster and Deleted Ports. :(
I use Ion as my window manager of choice. I've used it for many years now and have grown to love it over everything else I've tried. However, that doesn't stop me from not liking the attitude of it's developer. For instance, see this thread on ports@ that resulted in the port being removed from the tree. Personally, I agree with it's removal but I'm still going to maintain my own local copy of the port because I couldn't find anything I liked as nice as Ion (dwm has promise but it's just not right for me).
Anyways, it has been a while since I updated rst so I decided to do so. I really like portmaster for updating my ports. I still use portupgrade also, mostly because it's still there on some of my machines but also because it has never really failed me in a long time. Below are two particular things I ran into with portmaster...
wxs@rst ~ % sudo portmaster -L [...] ===>>> imake-1.0.2_4,1 ===>>> intltool-0.36.2 ===>>> New version available: intltool-0.36.3 ===>>> ion-3rc-20070927 ===>>> The x11-wm/ion-3 port has been deleted: ===>>> Aborting update wxs@rst ~ %Listing all installed ports and searching for updates causes portmaster to abort since Ion's removal.
wxs@rst ~ % sudo portmaster -aD [...] ===>>> The x11-wm/ion-3 port has been deleted: ===>>> Aborting update ===>>> Child process 39419: wxs@rst ~ %Trying to update all ports that need updating causes portmaster to abort also. The other odd part is that it's not displaying the message explaining why it was deleted.
I've decided that adding an option to ignore deleted ports is what I want. I had thought putting a +IGNORE me file in /var/db/pkg/foo would cause it to skip the port, but that's not the case. Below is a patch that adds the option to ignore deleted ports. You can get it here if you want. The patch is relative to ${PORTSDIR}/ports-mgmt/portmaster and has been sent to the author for consideration. If he would rather it be done using +IGNOREME I'll look into that.
Index: files/portmaster.sh.in
===================================================================
RCS file: /home/ncvs/ports/ports-mgmt/portmaster/files/portmaster.sh.in,v
retrieving revision 1.26
diff -u -r1.26 portmaster.sh.in
--- files/portmaster.sh.in 12 Dec 2007 21:50:59 -0000 1.26
+++ files/portmaster.sh.in 14 Dec 2007 17:34:10 -0000
@@ -518,7 +518,13 @@
'
for l in `grep "^$sf" $pd/MOVED`; do
case "$l" in
- ${sf}\|\|*) fail "The $sf port has been deleted: ${l##*|}"
+ ${sf}\|\|*)
+ if [ -z "$IGNORE_DELETED" ]; then
+ fail "The $sf port has been deleted: ${l##*|}"
+ else
+ echo "===> The $sf port has been deleted: ${l##*|}"
+ echo "===> Ignoring deleted port."
+ fi
;;
${sf}\|*) newportdir=${l#*\|}
newportdir=${newportdir%%\|*}
@@ -997,7 +1003,7 @@
fi
# Save switches for potential child processes
-while getopts 'BCDGLRabde:fghilm:nop:r:stuvwx:' COMMAND_LINE_ARGUMENT ; do
+while getopts 'BCDGLRabde:fghiIlm:nop:r:stuvwx:' COMMAND_LINE_ARGUMENT ; do
case "${COMMAND_LINE_ARGUMENT}" in
B) NO_BACKUP=yes; ARGS="-B $ARGS" ;;
C) DONT_PRE_CLEAN=yes; ARGS="-C $ARGS" ;;
@@ -1016,6 +1022,7 @@
g) MAKE_PACKAGE=yes; ARGS="-g $ARGS" ;;
h) usage 0 ;;
i) INTERACTIVE_UPDATE=yes; ARGS="-i $ARGS" ;;
+ I) IGNORE_DELETED=yes ;;
l) LIST=yes ;;
m) PM_MAKE_ARGS=$OPTARG
export PM_MAKE_ARGS # For 'make checksum'
While I was at it I found that the last 7 entires (at the time of this writing) in MOVED were wrong. They incorrectly ended in | which caused portmaster to not be able to properly display the messages. Portmaster uses ${l##*|} expansion where $l is the line from MOVED which matches the port in question. These are now fixed.
posted at: 20:10 | tags: portmaster, freebsd, ports | path: /entries/freebsd | permanent link to this entry
Wed, 19 Sep 2007
Embedding Distfiles into Ports
A while ago I worked on a patch to embed distfile information into the +CONTENTS file of a FreeBSD package. More information is available here and a PR on the idea is open.
Kris thinks it's a bad idea to record that information in the package, and he's right. When you install a package you never download a distfile, so it doesn't belong in the package. When you install a port you should record it at that time in ${PORT_DBDIR}/${UNIQUENAME}. Doug wrote an initial patch for this which I used as a basis for mine since his wasn't working for me. I also expanded it a bit to include cleaning up that information on deinstall and removing the directory if it is empty. I also took the liberty to fix the rmconfig target to remove the directory only if it is empty.
I haven't done extensive testing of the patch but I think it's pretty solid. It properly records the information, removes the information upon deinstall, removes the directory if it's empty upon deinstall, and doesn't complain if that information is not available upon deinstall. The patch is available HERE and I've put it inline below if you care to read it there. The part that Doug wrote is the most complicated, and even that is pretty easy.
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.585
diff -u -r1.585 bsd.port.mk
--- bsd.port.mk 13 Sep 2007 23:29:48 -0000 1.585
+++ bsd.port.mk 20 Sep 2007 01:14:19 -0000
@@ -1060,6 +1060,8 @@
# Default: /var/db/pkg
# PORT_DBDIR - Where port configuration options are recorded.
# Default: /var/db/ports
+# DISTFILE_LIST - Where distfile information is recorded.
+# Default: ${PORT_DBDIR}/${UNIQUENAME}/distfiles
# NO_PKG_REGISTER
# - Don't register a port installation as a package.
# FORCE_PKG_REGISTER
@@ -1216,6 +1218,9 @@
# where 'make config' records user configuration options
PORT_DBDIR?= /var/db/ports
+# where distfile information is recorded
+DISTFILE_LIST?= ${PORT_DBDIR}/${UNIQUENAME}/distfiles
+
LDCONFIG_DIR= libdata/ldconfig
LDCONFIG32_DIR= libdata/ldconfig32
@@ -3809,6 +3814,22 @@
fi
.endif
+.if !target(record-distfile)
+.if defined(DIST_SUBDIR)
+PDS= ${DIST_SUBDIR}/
+.endif
+record-distfile:
+ @${ECHO_MSG} "===> Recording distfile information"
+ @${MKDIR} `${DIRNAME} ${DISTFILE_LIST}`
+ @>${DISTFILE_LIST}
+ @for file in ${ALLFILES}; do \
+ distsize=`${GREP} "^SIZE (${PDS}$${file})" ${MD5_FILE} | ${CUT} -f4 -d' '`; \
+ distsha256=`${GREP} "^SHA256 (${PDS}$${file})" ${MD5_FILE} | ${CUT} -f4 -d' '`; \
+ distmd5=`${GREP} "^MD5 (${PDS}$${file})" ${MD5_FILE} | ${CUT} -f4 -d' '`; \
+ ${ECHO_CMD} "DISTFILE:${PDS}$${file}:SIZE=$${distsize}:SHA256=$${distsha256}:MD5=$${distmd5}" >> ${DISTFILE_LIST}; \
+ done
+.endif
+
.if !target(install-mtree)
install-mtree:
@${MKDIR} ${PREFIX}
@@ -4084,7 +4105,7 @@
_INSTALL_SEQ= install-message check-conflicts \
run-depends lib-depends apply-slist pre-install \
pre-install-script generate-plist check-already-installed
-_INSTALL_SUSEQ= check-umask install-mtree pre-su-install \
+_INSTALL_SUSEQ= check-umask record-distfile install-mtree pre-su-install \
pre-su-install-script do-install install-desktop-entries \
post-install post-install-script add-plist-info \
add-plist-docs add-plist-examples add-plist-data \
@@ -4267,6 +4288,9 @@
if [ "x${PREFIX}" = "x$${prfx}" ]; then \
${ECHO_MSG} "===> Deinstalling $${p}"; \
${PKG_DELETE} -f $${p}; \
+ ${ECHO_MSG} "===> Removing distfile information"; \
+ ${RM} -f ${DISTFILE_LIST}; \
+ ${RMDIR} `${DIRNAME} ${DISTFILE_LIST}` 2> /dev/null || ${TRUE}; \
else \
${ECHO_MSG} "===> $${p} has a different PREFIX: $${prfx}, skipping"; \
fi; \
@@ -5904,11 +5928,11 @@
if [ `${ID} -u` != 0 -a "x${INSTALL_AS_USER}" = "x" ]; then \
${ECHO_MSG} "===> Switching to root credentials to remove ${_OPTIONSFILE} and `${DIRNAME} ${_OPTIONSFILE}`"; \
${SU_CMD} "${RM} -f ${_OPTIONSFILE} ; \
- ${RMDIR} `${DIRNAME} ${_OPTIONSFILE}`"; \
+ ${RMDIR} `${DIRNAME} ${_OPTIONSFILE}` 2> /dev/null || ${TRUE}"; \
${ECHO_MSG} "===> Returning to user credentials"; \
else \
${RM} -f ${_OPTIONSFILE}; \
- ${RMDIR} `${DIRNAME} ${_OPTIONSFILE}`; \
+ ${RMDIR} `${DIRNAME} ${_OPTIONSFILE}` 2> /dev/null || ${TRUE}; \
fi
.else
@${ECHO_MSG} "===> No user-specified options configured for ${PKGNAME}"
posted at: 21:25 | tags: freebsd, ports, userland, patch | path: /entries/freebsd | permanent link to this entry
Thu, 26 Jul 2007
Ports without root
The below statements are completely ignoring the DESTDIR stuff in bsd.port.mk. :)
You know those screens which pop up from time to time when building certain ports? The ones that have various options you can select? Well, those are called OPTIONS (shocker, I know) in the Makefile and are quite easy to use. In the backend they really get translated into a set of WITH_FOO and WITHOUT_FOO statements depending on the default or selected values. These are all stored in ${_OPTIONSFILE} which is really ${PORT_DBDIR}/${UNIQUENAME}/options (default value of /var/db/ports/foo/options, ignoring DESTDIR) and are just flat text files. If you really care take a look at config target in bsd.port.mk to see how they are read, parsed, generated and stored.
So I often do a lot of ports development in a version controlled environment somewhere in my home directory. This allows me to simply set ${PORTSDIR} to be $HOME/ports and I don't have to worry about permissions when testing out the build. The framework will download and build things for me without having to become root. The only thing I have to worry about is this OPTIONS business and (un)installation of the port. Let's just ignore the (un)installation problem right now and focus on how we can make OPTIONS work without having root access. This way you can at least build an individual port (assuming it has no dependencies or it's dependencies are already installed).
A quick glance through bsd.port.mk indicates that you can set ${PORT_DBDIR} to be anywhere you like. For our purposes it needs to be somewhere we can write to so $HOME/db/ports sounds like a good value. If you set this and try to build a port that uses OPTIONS you will find that you still need to enter the root password. A closer look at the config target indicates that you need to have a UID != 0 and have INSTALL_AS_USER defined in order for the ports framework to not automatically invoke su(1) on your behalf (and thus asking for your root password).
So if you set ${PORT_DBDIR} to somewhere that you can write to and define INSTALL_AS_USER it works. Personally, I think it should just check if ${_OPTIONSFILE} is writeable and only invoke su(1) if it isn't.
I'm looking at new places to live tonight so I might not be able to work/think about this more right away. I'm also planning on doing a full write up on what it takes to install ports as a regular user but that will have to come when I have more time. I suppose I should at least start reviewing the site/documentation I found a few years ago on this.
posted at: 16:02 | tags: ports, freebsd | path: /entries/freebsd | permanent link to this entry








