/usr/ports Going Back to the Past2008年05月13日 22時32分52秒

The cause of downgrading problem is that /usr/ports went back to the past. I always keep some snapshots of /usr/ports with geom_uzip. The latest snapshot is mounted at startup via fstab. I recently started upgrading ports and the fstab entry existed for the snapshot. I forgot to unmount the snapshot before I run port-upgrading tools. That resulted ports+ to report wrong upgrades via "test" command.

Ports+ uses GNU make to generate upgrading rules with their dependency. Therefore, it keeps track of intermediate files via timestamps. If ports+ detect that the INDEX file is newer than ones of ports+, it processes it. Otherwise, ports+ intermediate files are up to date. This assumption is valid for active portsnap and csup/cvsup users. If for some reason, the INDEX file becomes older like my case, ports+ will not find it because the modification date is still older than ones of ports+.

It still seems 1.95 Release is more stable than 1.100 Release. I am suspecting some breakage in recursive-dependencies in 1.100 Release.

Possible Bugs in Ports+-1.1002008年05月12日 21時54分47秒

I have seen some strange errors on Ports+ 1.100 Release. If anyone is using 1.100 release, you may consider downgrading to 1.95 Release.

At least, I have seen some ports planned for upgrade by ports+ test but in fact, version number is going down by that operation. In another word, ports+ may not parsing version number correctly. I have not fully analyzed so that this could be my operational mistakes.

I am not aware of any user of ports+, though.

ports+-1.100 Released2008年04月24日 17時08分40秒

ports+1.100.tar.gz is released. Some of changes are: 1. reimplemented calling of "make build-depends-list run-depends-list" to allow parallzation, and 2. Store ports+ files under /usr/local/share/ports+ and maintain local data under /var/db/ports+. The archive is in the FreeBSD port style.


# cd /usr/ports/ports-mgmt
# fetch http://www.ne.jp/asahi/export/uyota/src/ports+-1.100.tar.gz
# tar xfz ports+1.100.tar.gz
# cd ports+
# pkg_delete /var/db/pkg/ports+*
# make install
===>  Extracting for ports+-1.100
===>  Patching for ports+-1.100
===>  Configuring for ports+-1.100
===>  Installing for ports+-1.100
===>   ports+-1.100 depends on executable: gmake - found
===>   ports+-1.100 depends on executable: gawk - found
===>   Generating temporary packing list
===>  Checking if ports-mgmt/ports+ already installed
install  -o root -g wheel -m 555 /usr/ports/ports-mgmt/ports+/files/ports+.sh /u
sr/local/sbin/ports+
install  -o root -g wheel -m 444 /usr/ports/ports-mgmt/ports+/files/GNUmakefile
/usr/local/share/ports+
install  -o root -g wheel -m 444 /usr/ports/ports-mgmt/ports+/files/README /usr/
local/share/ports+
install  -o root -g wheel -m 444 /usr/ports/ports-mgmt/ports+/files/*.awk /usr/l
ocal/share/ports+
install  -o root -g wheel -m 444 /usr/ports/ports-mgmt/ports+/files/ports+.1 /us
r/local/man/man1
if [ ! -f /usr/local/etc/ports+.conf ]; then  install  -o root -g wheel -m 444 /
usr/ports/ports-mgmt/ports+/files/ports+.conf /usr/local/etc;  fi
===>   Compressing manual pages for ports+-1.100
===>   Registering installation for ports+-1.100

I stopped daily updating of my /usr/ports. As a result, I update ports+ less frequently. So, I decided to publish this release. There is no real feature changes from the last version, indeed.

One of things I attempted to ports+ was to construct full dependencies within ports+ but turned out very expensive for each invocation of program. It seems that using INDEX file is a better way in terms of performance.

ports+-1.95 Released2008年02月16日 19時15分14秒

ports+1.95.tar.gz is released. The archive is in the FreeBSD port style. There are two major bug fixes.

One of the bug was that Ports+ was not saving off dynamic libraries to compat directory. This will result all applications that uses such libraries upgraded via previous versions of Ports+ fail to start.

The other bug is that if no "+IGNOREME" file exists, Ports+ try to read "/var/db/pkg/*/+IGNOREME" as a file and failed.


# cd /usr/ports
# mkdir local
# cd local
# fetch http://www.ne.jp/asahi/export/uyota/src/ports+-1.95.tar.gz
# tar xfz ports+1.95.tar.gz
# cd ports+
# pkg_delete /var/db/pkg/ports+*
# make install
===>  Extracting for ports+-1.95
===>  Patching for ports+-1.95
===>  Configuring for ports+-1.95
===>  Installing for ports+-1.95
===>   ports+-1.95 depends on executable: gmake - found
===>   ports+-1.95 depends on executable: gawk - found
===>   Generating temporary packing list
===>  Checking if ports-mgmt/ports+ already installed
install  -o root -g wheel -m 555 /usr/ports/local/ports+/files/ports+.sh /usr/local/sbin/ports+
install  -o root -g wheel -m 444 /usr/ports/local/ports+/files/GNUmakefile /usr/local/ports+
install  -o root -g wheel -m 444 /usr/ports/local/ports+/files/README /usr/local/ports+
install  -o root -g wheel -m 444 /usr/ports/local/ports+/files/ports+.1 /usr/local/man/man1
if [ ! -f /usr/local/etc/ports+.conf ]; then
install  -o root -g wheel -m 444 /usr/ports/local/ports+/files/ports+.conf /usr/local/etc;
fi
===>   Compressing manual pages for ports+-1.95
===>   Registering installation for ports+-1.95

These bugs are quite serious and upgrading to 1.95 is rather mandatory.

Daily Ports+ #9: Install v.s. Upgrade2008年02月14日 20時34分25秒

If you give "-n" option to ports+, you can see the exact commands to be executed.

Indeed, installing a new package is relatively simple.


# ports+ -n /usr/ports/misc/shc
(cd /usr/ports/misc/shc && MAKEFLAGS="" MFLAGS="" lockf /var/db/pkg/shc-3.8.6+lo
ck make  install && touch /var/db/pkg/shc-3.8.6/ports++install

Ports+ simply uses the FreeBSD port system to build and install. On the other hand, Ports+ will start building required packages as many as -j option where the Ports builds one by one.

Upgrading is rather more difficult. The Ports system doesn't have a way.


# ports+ -n /var/db/pkg/xterm-229_1
(cd /usr/ports/x11/xterm &&  echo xterm-229_1 to xterm-232 && MAKEFLAGS="" MFLAG
S="" lockf /var/db/pkg/xterm-232+lock make  build && ( [ -f /usr/local/ports+/xt
erm-229_1.tar ] || (cd /usr/local/ports+/ && pkg_create -b xterm-229_1.tar)) &&
lockf /var/db/pkg/ports++pkg+lock sh -c '(MAKEFLAGS="" MFLAGS="" lockf /var/db/p
kg/xterm-232+lock make  deinstall reinstall && find /var/db/pkg/ -name "+CONTENT
S" | xargs grep -l xterm-229_1 | xargs sed -i.ports+ -e "/pkgdep/s^xterm-229_1^x
term-232^g") || pkg_add -f /usr/local/ports+/xterm-229_1.tar'; ls -d /var/db/pkg
/xterm-232 >gt;/dev/null 2>gt;&1  && touch /var/db/pkg/xterm-232/ports++upgrade)

Ports+ first build a package and see if it is successful. If so, it will make a backup and install the new one. These conditions will not be too complicated in other languages. But using "Make" and shell script in it, all conditions need to be expressed with "&&" and "||" in a single line fashion. That makes hard to read.

Daily Ports+ #8: Fixing Broken Library2008年02月12日 13時22分16秒

A bug was found on ports+-1.93. The problem is that some of dynamic libraries was not kept in the compat so that all programs require them could not start.

% seamonkey
/libexec/ld-elf.so.1: Shared object "libicui18n.so.36" not found, required by "l
ibglib-2.0.so.0"

Just in case for that ever happens, Ports+ leaves package backups under /usr/local/ports+, at this moment. These will be deleted once 'ports+ clean' is executed; it is better to leave them for a while.

The fix is easy. Extract these libraries and put them under /usr/local/lib/compat for applications to load.


# cd /usr/local/ports+/
# tar xvf icu-3.6.tar '*libicu*'
x lib/libicudata.so.36.0
x lib/libicudata.so
x lib/libicudata.so.36
x lib/libicuuc.so.36.0
x lib/libicuuc.so
x lib/libicuuc.so.36
x lib/libicui18n.so.36.0
x lib/libicui18n.so
x lib/libicui18n.so.36
x lib/libicule.so.36.0
x lib/libicule.so
x lib/libicule.so.36
x lib/libiculx.so.36.0
x lib/libiculx.so
x lib/libiculx.so.36
x lib/libicuio.so.36.0
x lib/libicuio.so
x lib/libicuio.so.36
x lib/libicutu.so.36.0
x lib/libicutu.so.36
x lib/libicutu.so
# cd lib
# mv *.36* /usr/local/lib/compat
# cd ..
# rm -rf lib

This fixed the problem.

I will have to look into the cause of this. This was the first failure of save copying libraries over the past 9 months. This may take a while to find the root of this problem.

Ports+: Bug Warning2008年02月11日 19時51分35秒

In the ports+-1.93 release, there is a bug that it does not copy dynamic library files for devel/icu. I happened to see it when ports+ was upgrading icu-3.6 to icu-3.8.1.

Ports+ leaves a backup copy at /usr/local/ports+ unless you run "ports+ clean." You can extract libraries out of it and put them under /usr/local/bin/compat.

I will update the exact steps of this recover within a day.

Daily Ports+ #7: fontforge error2008年02月01日 19時39分42秒

Sometimes, ports+ fails because original distributer has problems. Some of them doesn't fail while using portupgrade. I do not know the exact differences but it fails on ports+. I suspect that recursive "Make" is related.

# ports+ /var/db/pkg/fontforge-20080109_1
...
mkdir /usr/local/libdata/pkgconfig
install  -o root -g wheel -m 444 fontforge.pc /usr/local/libdata/pkgconfig
mkdir -p /usr/local/include/fontforge
install  -o root -g wheel -m 444 ./inc/*.h /usr/local/include/fontforge
( for file in ./fontforge/*.h ; do if grep GGadget $file >/dev/null 2>&1 ; then
echo pointless >/dev/null ; else install  -o root -g wheel -m 444 $file /usr/loc
al/include/fontforge ; fi ; done )
( cd po ; make install )
make: don't know how to make w. Stop
gmake[1]: *** [install_po] Error 2
gmake[1]: Leaving directory `/ports/tmp/usr/ports/print/fontforge/work/fontforge
-20080109'
*** Error code 2

Stop in /usr/ports/print/fontforge.
*** Error code 1

Stop in /usr/ports/print/fontforge.
gmake: *** [/var/db/pkg/fontforge-20080109_2] Error 1

This time, "make" failed because it doesn't know how to make target "w" according to "make: don't know how to make w. Stop." This is GNU make calling BSD make passing incompatible flags.

Based on the error output, the error comes from the fontforge distribution. So, I take a look.


# vi /ports/tmp/usr/ports/print/fontforge/work/fontforge-20080109/Makefile

install_po:
        ( cd po ; make install )

In their make file, they call "make" hard corded. Interestingly, they use "${MAKE}" in many other places. Anyway, when calling make recursively, "${MAKE}" needs to be used such that child processes are called with the same "make" as their parent. For instance, "make" on FreeBSD is BSD make and fontforge is expecting GNU make. That is the cause of the failure.

For instance, adding "printenv" to the make file displayed that "-w" was passed to BSD make.


# vi /ports/tmp/usr/ports/print/fontforge/work/fontforge-20080109/Makefile

install_po:
        ( cd po ; printenv; make install ) 
# ports+ /var/db/pkg/fontforge-20080109_1 | grep FLAGS
MFLAGS=-w

On GNU make, -w option is to "Print a message containing the working directory before and after other processing." On the other hand, BSD make does not have this option and treat this as if they were a target.

This misuse of recursive make needs to be reported back to the fontforge developers.

Previous.

ports+-1.93 Released2008年01月27日 11時50分25秒

ports+1.93.tar.gz is released. Most of changes are cleanups. Eliminated some of echoing and extra output to standard out. They were mostly for debug use. The archive is in the FreeBSD port style.


# cd /usr/ports
# mkdir local
# cd local
# fetch http://www.ne.jp/asahi/export/uyota/src/ports+-1.93.tar.gz
# tar xfz ports+1.93.tar.gz
# cd ports+
# make install
===>  Extracting for ports+-1.93
===>  Patching for ports+-1.93
===>  Configuring for ports+-1.93
===>  Installing for ports+-1.93
===>   ports+-1.93 depends on executable: gmake - found
===>   ports+-1.93 depends on executable: gawk - found
===>   Generating temporary packing list
===>  Checking if ports-mgmt/ports+ already installed
install  -o root -g wheel -m 555 /usr/ports/local/ports+/files/ports+.sh /usr/local/sbin/ports+
install  -o root -g wheel -m 444 /usr/ports/local/ports+/files/GNUmakefile /usr/local/ports+
install  -o root -g wheel -m 444 /usr/ports/local/ports+/files/README /usr/local/ports+
install  -o root -g wheel -m 444 /usr/ports/local/ports+/files/ports+.1 /usr/local/man/man1
if [ ! -f /usr/local/etc/ports+.conf ]; then
install  -o root -g wheel -m 444 /usr/ports/local/ports+/files/ports+.conf /usr/local/etc;
fi
===>   Compressing manual pages for ports+-1.93
===>   Registering installation for ports+-1.93

There are still environment variable leak from GNU make to BSD make. I thought I had fixed once in 1.90 release but had not.

Daily Ports+ #6: PORTS+_IGNORE or +IGNOREME2008年01月22日 07時25分07秒

Sometime, one needs to avoid upgrading some packages. I have had setup ports+ to ignore clisp due to build failure. I also have others that I don't want to upgrade due to some library reasons, incompatibility reasons, or others.

Ports+ has configuration file. Its default path is /usr/local/etc/ports+.conf. You can add entries to PORTS+_IGNORE.


# grep clisp /usr/local/etc/ports+.conf
PORTS+_IGNORE += clisp.* # build fails

Because the implementation of ports+ is in GNU awk, you specify in the regular expression. That is slightly different from shell wild-card expansions. If any entries in PORTS+_IGNORE matches in either package name or <category>/<portname>, they are ignored from upgrading.

Once I comment it out with #, ports+ test shows that it will upgrade when you say so.


# grep clisp /usr/local/etc/ports+.conf
# PORTS+_IGNORE += clisp.* # build fails
# ports+ test
# upgrade clisp-2.41a to clisp-2.43

It still fails on build so that I want ignore clisp. You can create an _IGNOREME file in the package database directory. Ports+ ignores all packages that +IGNOREME is on. This time I use +IGNOREME so that it is compatible with portugprade and portmaster.

# touch /var/db/pkg/clisp-2.41a/+IGNOREME
# ports+ test

This time, ports+ test does not show any upgrade candidates.

+IGNOREME is the preferred way for most cases as they are compatible with other port upgrading tools. One of these exceptional cases are probably when you need to exclude a set of packages like rubygem.*, .*linux.*, and so on.

Previous. Next.