crux-commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
September 2006
- 1 participants
- 180 discussions
Author: sip
Date: 2006-09-05 10:08:12 +0200 (Tue, 05 Sep 2006)
New Revision: 1815
Added:
crux-2.2/ports/opt/apache-tomcat/pre-install
Modified:
crux-2.2/ports/opt/apache-tomcat/.footprint
crux-2.2/ports/opt/apache-tomcat/.md5sum
crux-2.2/ports/opt/apache-tomcat/Pkgfile
crux-2.2/ports/opt/apache-tomcat/README
crux-2.2/ports/opt/apache-tomcat/tomcat
Log:
apache-tomcat: run as tomcat user. see README
Modified: crux-2.2/ports/opt/apache-tomcat/.footprint
===================================================================
--- crux-2.2/ports/opt/apache-tomcat/.footprint 2006-09-05 07:44:37 UTC (rev 1814)
+++ crux-2.2/ports/opt/apache-tomcat/.footprint 2006-09-05 08:08:12 UTC (rev 1815)
@@ -16,6 +16,7 @@
-rw-r--r-- root/root usr/lib/tomcat/bin/jmxaccessor-tasks.xml
-rw-r--r-- root/root usr/lib/tomcat/bin/jsvc.tar.gz
-rwxr-xr-x root/root usr/lib/tomcat/bin/setclasspath.sh
+-rwxr-xr-x root/root usr/lib/tomcat/bin/setenv.sh
-rwxr-xr-x root/root usr/lib/tomcat/bin/shutdown.sh
-rwxr-xr-x root/root usr/lib/tomcat/bin/startup.sh
-rw-r--r-- root/root usr/lib/tomcat/bin/tomcat-juli.jar
@@ -43,17 +44,17 @@
drwxr-xr-x root/root usr/lib/tomcat/conf/
drwxr-xr-x root/root usr/lib/tomcat/conf/Catalina/
drwxr-xr-x root/root usr/lib/tomcat/conf/Catalina/localhost/
--rw------- root/root usr/lib/tomcat/conf/Catalina/localhost/host-manager.xml
--rw------- root/root usr/lib/tomcat/conf/Catalina/localhost/manager.xml
--rw------- root/root usr/lib/tomcat/conf/catalina.policy
--rw------- root/root usr/lib/tomcat/conf/catalina.properties
--rw------- root/root usr/lib/tomcat/conf/context.xml
--rw------- root/root usr/lib/tomcat/conf/logging.properties
--rw------- root/root usr/lib/tomcat/conf/server-minimal.xml
--rw------- root/root usr/lib/tomcat/conf/server.xml
--rw------- root/root usr/lib/tomcat/conf/tomcat-users.xml
--rw------- root/root usr/lib/tomcat/conf/web.xml
-drwxr-xr-x root/root usr/lib/tomcat/logs/
+-rw-r----- root/tomcat usr/lib/tomcat/conf/Catalina/localhost/host-manager.xml
+-rw-r----- root/tomcat usr/lib/tomcat/conf/Catalina/localhost/manager.xml
+-rw-r----- root/tomcat usr/lib/tomcat/conf/catalina.policy
+-rw-r----- root/tomcat usr/lib/tomcat/conf/catalina.properties
+-rw-r----- root/tomcat usr/lib/tomcat/conf/context.xml
+-rw-r----- root/tomcat usr/lib/tomcat/conf/logging.properties
+-rw-r----- root/tomcat usr/lib/tomcat/conf/server-minimal.xml
+-rw-r----- root/tomcat usr/lib/tomcat/conf/server.xml
+-rw-r----- root/tomcat usr/lib/tomcat/conf/tomcat-users.xml
+-rw-r----- root/tomcat usr/lib/tomcat/conf/web.xml
+drwxr-xr-x tomcat/tomcat usr/lib/tomcat/logs/
drwxr-xr-x root/root usr/lib/tomcat/server/
drwxr-xr-x root/root usr/lib/tomcat/server/classes/
drwxr-xr-x root/root usr/lib/tomcat/server/lib/
@@ -117,7 +118,7 @@
drwxr-xr-x root/root usr/lib/tomcat/shared/
drwxr-xr-x root/root usr/lib/tomcat/shared/classes/
drwxr-xr-x root/root usr/lib/tomcat/shared/lib/
-drwxr-xr-x root/root usr/lib/tomcat/temp/
+drwxr-xr-x tomcat/tomcat usr/lib/tomcat/temp/
-rw-r--r-- root/root usr/lib/tomcat/temp/bugzilla37035-safeToDelete.tmp (EMPTY)
drwxr-xr-x root/root usr/lib/tomcat/webapps/
drwxr-xr-x root/root usr/lib/tomcat/webapps/ROOT/
Modified: crux-2.2/ports/opt/apache-tomcat/.md5sum
===================================================================
--- crux-2.2/ports/opt/apache-tomcat/.md5sum 2006-09-05 07:44:37 UTC (rev 1814)
+++ crux-2.2/ports/opt/apache-tomcat/.md5sum 2006-09-05 08:08:12 UTC (rev 1815)
@@ -1,2 +1,2 @@
994d39c0d2f462c79288e0249991dd49 apache-tomcat-5.5.17.tar.gz
-2eb91361638de7dcaa970af2e7f26652 tomcat
+6a4fee28c02ed61727e696193569b91e tomcat
Modified: crux-2.2/ports/opt/apache-tomcat/Pkgfile
===================================================================
--- crux-2.2/ports/opt/apache-tomcat/Pkgfile 2006-09-05 07:44:37 UTC (rev 1814)
+++ crux-2.2/ports/opt/apache-tomcat/Pkgfile 2006-09-05 08:08:12 UTC (rev 1815)
@@ -20,7 +20,23 @@
rm $PKG/usr/lib/tomcat/{RUNNING.txt,LICENSE,RELEASE-NOTES}
find $PKG -name *.bat|xargs rm -f
find $PKG -name *.exe|xargs rm -f
-
mkdir -p $PKG/etc/rc.d
install -m 755 tomcat $PKG/etc/rc.d
+
+ # Adjust for non-root setup
+ chown tomcat.tomcat $PKG/usr/lib/tomcat/logs
+ chown tomcat.tomcat $PKG/usr/lib/tomcat/temp
+
+ for f in $PKG/usr/lib/tomcat/conf/*.* $PKG/usr/lib/tomcat/conf/Catalina/localhost/*; do
+ chown root.tomcat $f
+ chmod 640 $f
+ done
+
+ cat << EOF > $PKG/usr/lib/tomcat/bin/setenv.sh
+#!/bin/sh
+# Setup envirnoment variables for tomcat
+export JAVA_HOME=/usr/lib/java
+EOF
+
+ chmod 755 $PKG/usr/lib/tomcat/bin/setenv.sh
}
Modified: crux-2.2/ports/opt/apache-tomcat/README
===================================================================
--- crux-2.2/ports/opt/apache-tomcat/README 2006-09-05 07:44:37 UTC (rev 1814)
+++ crux-2.2/ports/opt/apache-tomcat/README 2006-09-05 08:08:12 UTC (rev 1815)
@@ -1,19 +1,30 @@
README file for apache-tomcat port
-CAUTION
-This port is best suited for a test / developement environment;
-you should really use a dedicated local user for running the
-tomcat server on a production environment.
+NOTES FOR 5.5.17-2
+ The port 5.5.17-2 introduces a couple of relevant changes:
+
+ - Tomcat now runs under a 'tomcat' user instead of root.
+ You may need to adjust permissions on custom config files
+ under $TOMCAT_DIR/conf if you have created any.
+ - The JAVA_HOME variable is now set in $TOMCAT_DIR/bin/setenv.sh,
+ which is read by tomcat startup/shutdown scripts.
+PRE-INSTALL
+ Execute the pre-install script, or manually add a 'tomcat'
+ user and group.
+
NOTES
-Starting from the 5.5.x series the default tomcat installation
-requires Java 1.5; compatibilities addons are available, feel
-free to provide them as a separate addon port.
+ Starting from the 5.5.x series the default tomcat installation
+ requires Java 1.5; compatibilities addons are available, feel
+ free to provide them as a separate addon port.
-The web administration interface is also removed from the
-standard installation; again, if needed please provide it
-through a dedicated port to avoid adding unnecessary stuff here.
+ The web administration interface is also removed from the
+ standard installation; again, if needed please provide it
+ through a dedicated port to avoid adding unnecessary stuff here.
POST-INSTALL
-Set up your JAVA_HOME environment variable
-pointing to j2sdk installation path (ie in /etc/profile)
+ Set up a manager user/role in, $TOMCAT_HOME/conf/tomcat-users.xml,
+ ie:
+ <tomcat-users>
+ <user name="manager" password="verysecret" roles="manager" />
+ </tomcat-users>
Added: crux-2.2/ports/opt/apache-tomcat/pre-install
===================================================================
--- crux-2.2/ports/opt/apache-tomcat/pre-install (rev 0)
+++ crux-2.2/ports/opt/apache-tomcat/pre-install 2006-09-05 08:08:12 UTC (rev 1815)
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+gr=`grep tomcat /etc/group`
+if [ "$gr" = "" ]; then
+ groupadd tomcat
+fi
+
+us=`grep tomcat /etc/passwd`
+if [ "$us" = "" ]; then
+ useradd -s /bin/bash -g tomcat tomcat
+ passwd -l tomcat
+fi
Property changes on: crux-2.2/ports/opt/apache-tomcat/pre-install
___________________________________________________________________
Name: svn:executable
+ *
Modified: crux-2.2/ports/opt/apache-tomcat/tomcat
===================================================================
--- crux-2.2/ports/opt/apache-tomcat/tomcat 2006-09-05 07:44:37 UTC (rev 1814)
+++ crux-2.2/ports/opt/apache-tomcat/tomcat 2006-09-05 08:08:12 UTC (rev 1815)
@@ -5,14 +5,15 @@
case "$1" in
start)
- /usr/lib/tomcat/bin/startup.sh
+ su - tomcat -c /usr/lib/tomcat/bin/startup.sh
;;
stop)
- /usr/lib/tomcat/bin/shutdown.sh
+ su - tomcat -c /usr/lib/tomcat/bin/shutdown.sh
;;
restart)
- /usr/lib/tomcat/bin/shutdown.sh
- /usr/lib/tomcat/bin/startup.sh
+ su - tomcat -c /usr/lib/tomcat/bin/shutdown.sh
+ sleep 4
+ su - tomcat -c /usr/lib/tomcat/bin/startup.sh
;;
*)
echo "usage: $0 start|stop|restart"
1
0
Author: jw
Date: 2006-09-05 09:44:37 +0200 (Tue, 05 Sep 2006)
New Revision: 1814
Modified:
tools/udev-rules/25-lfs.rules
Log:
udev-rules: restrict access to input/event* and input/ts*
Modified: tools/udev-rules/25-lfs.rules
===================================================================
--- tools/udev-rules/25-lfs.rules 2006-09-05 07:40:28 UTC (rev 1813)
+++ tools/udev-rules/25-lfs.rules 2006-09-05 07:44:37 UTC (rev 1814)
@@ -74,9 +74,9 @@
KERNEL=="mice", MODE="0644", NAME="input/%k" SYMLINK="mouse"
KERNEL=="mouse*", MODE="0644", NAME="input/%k"
-KERNEL=="event*", MODE="0644", NAME="input/%k"
+KERNEL=="event*", MODE="0600", NAME="input/%k"
KERNEL=="js*", MODE="0644", NAME="input/%k"
-KERNEL=="ts*", MODE="0644", NAME="input/%k"
+KERNEL=="ts*", MODE="0600", NAME="input/%k"
KERNEL=="psaux", MODE="0644"
KERNEL=="js", MODE="0644"
1
0
Author: jw
Date: 2006-09-05 09:40:28 +0200 (Tue, 05 Sep 2006)
New Revision: 1813
Added:
tools/udev-rules/
tools/udev-rules/05-udev-early.rules
tools/udev-rules/25-lfs.rules
tools/udev-rules/26-modprobe.rules
tools/udev-rules/27-firmware.rules
tools/udev-rules/60-persistent-storage.rules
tools/udev-rules/81-cdrom.rules
tools/udev-rules/CHANGELOG.upstream
tools/udev-rules/README
Log:
udev-rules: import to svn
Added: tools/udev-rules/05-udev-early.rules
===================================================================
--- tools/udev-rules/05-udev-early.rules (rev 0)
+++ tools/udev-rules/05-udev-early.rules 2006-09-05 07:40:28 UTC (rev 1813)
@@ -0,0 +1,3 @@
+# sysfs is populated after the event is sent
+ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
+ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
Added: tools/udev-rules/25-lfs.rules
===================================================================
--- tools/udev-rules/25-lfs.rules (rev 0)
+++ tools/udev-rules/25-lfs.rules 2006-09-05 07:40:28 UTC (rev 1813)
@@ -0,0 +1,136 @@
+# /etc/udev/rules.d/25-lfs.rules: Rule definitions for LFS.
+
+# Core kernel devices
+
+KERNEL=="ptmx", MODE="0666", GROUP="tty"
+KERNEL=="random", MODE="0444"
+KERNEL=="urandom", MODE="0444"
+KERNEL=="kmem", MODE="0640", GROUP="kmem"
+KERNEL=="mem", MODE="0640", GROUP="kmem"
+KERNEL=="port", MODE="0640", GROUP="kmem"
+KERNEL=="null", MODE="0666"
+KERNEL=="zero", MODE="0666"
+KERNEL=="full", MODE="0666"
+KERNEL=="aio", MODE="0444"
+KERNEL=="kmsg", MODE="0600"
+KERNEL=="rtc", MODE="0666"
+
+# Comms devices
+
+KERNEL=="ttyS[0-9]*", GROUP="dialout"
+KERNEL=="ttyUSB[0-9]*", GROUP="dialout"
+KERNEL=="rfcomm[0-9]*", GROUP="dialout"
+KERNEL=="tty[BCDEFHILMPRSTUVWX][0-9]*", GROUP="dialout"
+KERNEL=="ttyS[ACIR][0-9]*", GROUP="dialout"
+KERNEL=="ttyUSB[0-9]*", GROUP="dialout"
+KERNEL=="ttyACM[0-9]*", GROUP="dialout"
+KERNEL=="ippp[0-9]*", GROUP="dialout"
+KERNEL=="isdn[0-9]*", GROUP="dialout"
+KERNEL=="isdnctrl[0-9]*", GROUP="dialout"
+KERNEL=="capi", NAME="capi20", SYMLINK="isdn/capi20"
+KERNEL=="capi?*", NAME="capi/%n", GROUP="dialout"
+KERNEL=="dcbri[0-9]*", GROUP="dialout"
+KERNEL=="ircomm[0-9]*", GROUP="dialout"
+
+# TTY's
+
+KERNEL=="tty", MODE="0666", GROUP="tty"
+KERNEL=="tty[0-9]*", MODE="0666", GROUP="tty"
+KERNEL=="vcs*", MODE="0600"
+KERNEL=="console", MODE="0622", GROUP="tty"
+
+# ALSA devices go in their own subdirectory
+
+KERNEL=="controlC[0-9]*", GROUP="audio", NAME="snd/%k"
+KERNEL=="hw[CD0-9]*", GROUP="audio", NAME="snd/%k"
+KERNEL=="pcm[CD0-9cp]*", GROUP="audio", NAME="snd/%k"
+KERNEL=="midiC[D0-9]*", GROUP="audio", NAME="snd/%k"
+KERNEL=="timer", GROUP="audio", NAME="snd/%k"
+KERNEL=="seq", GROUP="audio", NAME="snd/%k"
+
+# Sound devices
+
+KERNEL=="admmidi*", GROUP="audio"
+KERNEL=="adsp*", GROUP="audio"
+KERNEL=="aload*", GROUP="audio"
+KERNEL=="amidi*", GROUP="audio"
+KERNEL=="amixer*", GROUP="audio"
+KERNEL=="audio*", GROUP="audio"
+KERNEL=="dmfm*", GROUP="audio"
+KERNEL=="dmmidi*", GROUP="audio"
+KERNEL=="dsp*", GROUP="audio"
+KERNEL=="midi*", GROUP="audio"
+KERNEL=="mixer*", GROUP="audio"
+KERNEL=="music", GROUP="audio"
+KERNEL=="sequencer*", GROUP="audio"
+
+# Printing devices
+
+KERNEL=="lp[0-9]*", GROUP="lp"
+KERNEL=="parport[0-9]*", GROUP="lp"
+KERNEL=="irlpt[0-9]*", GROUP="lp"
+
+# Input devices go in their own subdirectory
+
+KERNEL=="mice", MODE="0644", NAME="input/%k" SYMLINK="mouse"
+KERNEL=="mouse*", MODE="0644", NAME="input/%k"
+KERNEL=="event*", MODE="0644", NAME="input/%k"
+KERNEL=="js*", MODE="0644", NAME="input/%k"
+KERNEL=="ts*", MODE="0644", NAME="input/%k"
+
+KERNEL=="psaux", MODE="0644"
+KERNEL=="js", MODE="0644"
+KERNEL=="djs", MODE="0644"
+
+# USB devices go in their own subdirectory
+
+SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k; X=$${X#usbdev}; B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", NAME="%c"
+KERNEL=="hiddev*", NAME="usb/%k"
+KERNEL=="auer*", NAME="usb/%k"
+KERNEL=="legousbtower*", NAME="usb/%k"
+KERNEL=="dabusb*", NAME="usb/%k"
+BUS=="usb", KERNEL=="lp[0-9]*", GROUP="lp", NAME="usb/%k"
+
+# DRI devices are managed by the X server, so prevent udev from creating them
+
+KERNEL=="card*", NAME=""
+
+# Video devices
+
+KERNEL=="fb[0-9]*", MODE="0620", GROUP="video"
+KERNEL=="agpgart", GROUP="video"
+KERNEL=="video[0-9]*", GROUP="video"
+KERNEL=="radio[0-9]*", GROUP="video"
+KERNEL=="vbi[0-9]*", GROUP="video"
+KERNEL=="vtx[0-9]*", GROUP="video"
+
+# Storage/memory devices
+
+KERNEL=="fd[0-9]*", GROUP="floppy"
+KERNEL=="ram[0-9]*", GROUP="disk"
+KERNEL=="raw[0-9]*", GROUP="disk", NAME="raw/%k"
+KERNEL=="hd*", GROUP="disk"
+KERNEL=="sd[a-z]", GROUP="disk"
+KERNEL=="sd[a-z][0-9]*", GROUP="disk"
+KERNEL=="sd[a-i][a-z]", GROUP="disk"
+KERNEL=="sd[a-i][a-z][0-9]*", GROUP="disk"
+KERNEL=="dasd[0-9]*", GROUP="disk"
+KERNEL=="loop[0-9]*", GROUP="disk"
+KERNEL=="md[0-9]*", GROUP="disk"
+
+# dmsetup and lvm2 related programs create devicemapper devices so we prevent
+# udev from creating them
+
+KERNEL=="dm-*", OPTIONS+="ignore_device"
+KERNEL=="device-mapper", OPTIONS+="ignore_device"
+
+KERNEL=="ht[0-9]*", GROUP="tape"
+KERNEL=="nht[0-9]*", GROUP="tape"
+KERNEL=="pt[0-9]*", GROUP="tape"
+KERNEL=="npt[0-9]*", GROUP="tape"
+KERNEL=="st[0-9]*", GROUP="tape"
+KERNEL=="nst[0-9]*", GROUP="tape"
+
+# Network devices
+
+KERNEL=="tun", NAME="net/%k"
Added: tools/udev-rules/26-modprobe.rules
===================================================================
--- tools/udev-rules/26-modprobe.rules (rev 0)
+++ tools/udev-rules/26-modprobe.rules 2006-09-05 07:40:28 UTC (rev 1813)
@@ -0,0 +1,18 @@
+# /etc/udev/rules.d/26-modprobe.rules: Rules that require modprobe.
+
+# Generic rule to allow loading modular drivers for existing hardware
+
+ACTION=="add", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
+
+# SCSI devices require different modules, dependent on their SYSFS{type}. All
+# of them require 'sg' though.
+#
+# module name sysfs types
+# sd 0 (TYPE_DISK), 7 (TYPE_MOD), 14 (TYPE_MOD)
+# st/osst 1 (TYPE_TAPE)
+# sr 4 (TYPE_WORM), 5 (TYPE_ROM)
+
+SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
+SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="1", RUN+="/sbin/modprobe st"
+SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
+SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"
Added: tools/udev-rules/27-firmware.rules
===================================================================
--- tools/udev-rules/27-firmware.rules (rev 0)
+++ tools/udev-rules/27-firmware.rules 2006-09-05 07:40:28 UTC (rev 1813)
@@ -0,0 +1,3 @@
+# /etc/udev/rules.d/27-firmware.rules: Load firmware for devices that need it
+
+ACTION=="add", SUBSYSTEM=="firmware", RUN+="firmware.sh"
Added: tools/udev-rules/60-persistent-storage.rules
===================================================================
--- tools/udev-rules/60-persistent-storage.rules (rev 0)
+++ tools/udev-rules/60-persistent-storage.rules 2006-09-05 07:40:28 UTC (rev 1813)
@@ -0,0 +1,49 @@
+# persistent storage links: /dev/{disk,tape}/{by-id,by-uuid,by-label,by-path,by-name}
+# scheme based on "Linux persistent device names", 2004, Hannes Reinecke <hare(a)suse.de>
+
+ACTION!="add", GOTO="persistent_storage_end"
+SUBSYSTEM!="block", GOTO="persistent_storage_end"
+
+# skip rules for inappropriate block devices
+KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_storage_end"
+
+# never access removable ide devices, the drivers are causing event loops on open()
+KERNEL=="hd*[!0-9]", SYSFS{removable}=="1", DRIVER=="ide-cs|ide-floppy", GOTO="persistent_storage_end"
+KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_storage_end"
+
+# for partitions import parent information
+KERNEL=="*[0-9]", IMPORT{parent}=="ID_*"
+
+# by-id (hardware serial number)
+KERNEL=="hd*[!0-9]", IMPORT{program}="ata_id --export $tempnode"
+KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
+KERNEL=="hd*[0-9]", IMPORT{parent}=="ID_*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
+
+KERNEL=="sd*[!0-9]|sr*|st*", SYSFS{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394"
+KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="usb_id -x"
+KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
+KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
+KERNEL=="dasd*[!0-9]", IMPORT{program}="dasd_id --export $tempnode"
+KERNEL=="sd*[!0-9]|sr*|dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
+KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
+KERNEL=="st*", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
+
+# by-path (shortest physical path)
+KERNEL=="*[!0-9]|sr*", IMPORT{program}="path_id %p", SYMLINK+="disk/by-path/$env{ID_PATH}"
+KERNEL=="st*", IMPORT{program}="path_id %p", SYMLINK+="tape/by-path/$env{ID_PATH}"
+KERNEL=="sr*|st*", GOTO="persistent_storage_end"
+KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
+
+# by-label/by-uuid (filesystem properties)
+KERNEL=="*[!0-9]", SYSFS{removable}=="1", GOTO="persistent_storage_end"
+IMPORT{program}="vol_id --export $tempnode"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
+
+# BIOS Enhanced Disk Device
+KERNEL=="*[!0-9]", IMPORT{program}="edd_id --export $tempnode"
+KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
+KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
+
+
+LABEL="persistent_storage_end"
Added: tools/udev-rules/81-cdrom.rules
===================================================================
--- tools/udev-rules/81-cdrom.rules (rev 0)
+++ tools/udev-rules/81-cdrom.rules 2006-09-05 07:40:28 UTC (rev 1813)
@@ -0,0 +1,3 @@
+# /etc/udev/rules.d/81-cdrom.rules: Set CD-ROM permissions.
+
+ACTION=="add", SUBSYSTEM=="block", ENV{ID_TYPE}=="cd", GROUP="cdrom"
Added: tools/udev-rules/CHANGELOG.upstream
===================================================================
--- tools/udev-rules/CHANGELOG.upstream (rev 0)
+++ tools/udev-rules/CHANGELOG.upstream 2006-09-05 07:40:28 UTC (rev 1813)
@@ -0,0 +1,24 @@
+dnicholson - Jul 14, 2006
+ * Fixed usbdev PROGRAM so that it works with the BusyBox sh. Thanks
+ to Anthony Wright.
+
+n/a - Jul 12, 2006
+ * Added options so temporary nodes are not created with device-mapper
+ * Adapted cdrom rules to identify CD-ROM drives correctly by adding
+ SUBSYSTEM=="block" test.
+ * Added simple 81-cdrom.rules file to set cdrom group ownership
+
+n/a - Jun 07, 2006
+ * Removed nvidia rules
+ * Removed bug reporting rule
+ * Moved Debian-based persistent CD-ROM rules to contrib
+ * Adapted firmware rule to udev-093
+
+n/a - May 15, 2006
+ * Part one of 25-lfs.rules rewrite
+ * Some minor tweaking of the layout
+
+n/a - May 12, 2006
+ * Initial import of the udev-config directory.
+ * Reorganized and modularized the rules files.
+ * Added explanatory comments
Added: tools/udev-rules/README
===================================================================
--- tools/udev-rules/README (rev 0)
+++ tools/udev-rules/README 2006-09-05 07:40:28 UTC (rev 1813)
@@ -0,0 +1,3 @@
+udev rules for CRUX http://crux.nu
+
+Based on the rules from Linux From Scratch, http://www.linuxfromscratch.org/
1
0
Author: jue
Date: 2006-09-04 21:02:00 +0200 (Mon, 04 Sep 2006)
New Revision: 1812
Added:
tools/prt-utils/trunk/lib/
tools/prt-utils/trunk/lib/prtverify/
tools/prt-utils/trunk/lib/prtverify/00_prtverify_lib.awk
tools/prt-utils/trunk/lib/prtverify/05_file_check.awk
tools/prt-utils/trunk/lib/prtverify/10_file_check_clean_repo.awk
tools/prt-utils/trunk/lib/prtverify/20_evil_cmds.awk
tools/prt-utils/trunk/lib/prtverify/20_maintainer_email.awk
tools/prt-utils/trunk/lib/prtverify/20_missing_deps.awk
tools/prt-utils/trunk/lib/prtverify/20_pkgfile_headers.awk
tools/prt-utils/trunk/lib/prtverify/20_pkgfile_vars.awk
tools/prt-utils/trunk/lib/prtverify/20_port_name_match.awk
tools/prt-utils/trunk/lib/prtverify/20_release_number.awk
tools/prt-utils/trunk/lib/prtverify/30_file_conflict.awk
tools/prt-utils/trunk/lib/prtverify/30_file_permissions.awk
tools/prt-utils/trunk/lib/prtverify/30_invalid_dirs.awk
tools/prt-utils/trunk/lib/prtverify/30_junk_files.awk
tools/prt-utils/trunk/lib/prtverify/30_suid_sgid.awk
tools/prt-utils/trunk/lib/prtverify/30_system_users.awk
tools/prt-utils/trunk/lib/prtverify/90_mk_footprint_db.awk
tools/prt-utils/trunk/lib/prtverify/prtverify.wl
tools/prt-utils/trunk/prtverify.1
tools/prt-utils/trunk/prtverify.in
Modified:
tools/prt-utils/trunk/Makefile
Log:
prt-utils: added prtverify
Modified: tools/prt-utils/trunk/Makefile
===================================================================
--- tools/prt-utils/trunk/Makefile 2006-09-04 18:11:43 UTC (rev 1811)
+++ tools/prt-utils/trunk/Makefile 2006-09-04 19:02:00 UTC (rev 1812)
@@ -3,11 +3,13 @@
TOOLS = prtcreate prtrej prtsweep prtcheck prtwash pkgexport pkgsize \
prtorphan prtcheckmissing oldfiles finddeps dllist \
- findredundantdeps pkg_installed revdep portspage pkgfoster
+ findredundantdeps pkg_installed revdep portspage pkgfoster \
+ prtverify
PREFIX = /usr
MANDIR = $(PREFIX)/man
BINDIR = $(PREFIX)/bin
+LIBDIR = $(PREFIX)/lib
CONFDIR = /etc
all:
@@ -44,12 +46,27 @@
fi; \
done
-install: install-man install-bin # install-conf
+install-lib:
+ for tool in $(TOOLS); do \
+ if [ -d lib/$$tool ]; then \
+ mkdir -p $(DESTDIR)$(LIBDIR)/$$tool; \
+ cp lib/$$tool/* $(DESTDIR)$(LIBDIR)/$$tool; \
+ chmod 644 $(DESTDIR)$(LIBDIR)/$$tool/*; \
+ fi; \
+ done
-dist:
+prtverify:
+ sed "s|@@LIBDIR@@|$(LIBDIR)|" prtverify.in $< > prtverify
+
+install: prtverify install-man install-bin install-lib # install-conf
+
+clean:
+ rm -f prtverify
+
+dist: clean
@rm -rf ${NAME}-${VERSION}
@mkdir .${NAME}-${VERSION}
- @cp * .${NAME}-${VERSION}
+ @cp -r * .${NAME}-${VERSION}
@mv .${NAME}-${VERSION} ${NAME}-${VERSION}
@tar czf ${NAME}-${VERSION}.tar.gz ${NAME}-${VERSION}
@rm -rf ${NAME}-${VERSION}
Added: tools/prt-utils/trunk/lib/prtverify/00_prtverify_lib.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/00_prtverify_lib.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/00_prtverify_lib.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,70 @@
+#
+# 00_prtverify_lib.awk
+#
+# Version 0.1.6 - 2006-08-30
+# J�rgen Daubert <jue at jue dot li>
+#
+# Utility functions for prtverify
+
+
+function fullpath(dir, cmd)
+{
+ cmd = "cd " dir " && pwd"
+ cmd | getline dir
+ close(cmd)
+ return dir
+}
+
+function collectionport(path)
+{
+ sub(/\/$/, "", path)
+ return substr(path, match(path, /[^/]+\/[^/]+$/))
+}
+
+function perror(level,message, d,i,l,m,p,w)
+{
+ l = 25
+ w[INFO] = "INFO "
+ w[WARN] = "WARN "
+ w[ERROR] = "ERROR "
+ w[FATAL] = "FATAL "
+
+ p = substr(COLLPORT, 1, l)
+ for (i=1; i<=l-length(p); i++)
+ d = d "."
+ m = sprintf("%s %s %s %s", w[level], p, d, message)
+ if (! (m in WLIST))
+ print m
+}
+
+function loglevel_ok(level)
+{
+ return and(LOG_LEVEL,level)
+}
+
+function usr_error(message)
+{
+ print "===== ", message > "/dev/stderr"
+}
+
+
+BEGIN {
+
+ if (! LOG_LEVEL)
+ LOG_LEVEL = 15
+
+ if (LOG_LEVEL <1 || LOG_LEVEL >15) {
+ LOG_LEVEL = 15
+ usr_error("Invalid loglevel, using " LOG_LEVEL)
+ }
+
+ INFO = 8
+ WARN = 4
+ ERROR = 2
+ FATAL = 1
+
+ PKGFILE = ".*\\/Pkgfile"
+ FOOTPRINT = ".*\\/\\.footprint"
+ MD5SUM = ".*\\/\\.md5sum"
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/05_file_check.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/05_file_check.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/05_file_check.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,58 @@
+#
+# 05_file_check.awk
+#
+# Version 0.1.8 - 2006-08-30
+# J�rgen Daubert <jue at jue dot li>
+#
+# Tests for the mandatory port files
+#
+# Sets some global variables
+# - PORTDIR the full path of the port
+# - PORT the name of the port
+# - COLLPORT a shortcut for Collection/Port like core/gcc
+#
+# PORT_FILES and WHITE_LIST are set by prtverify
+
+
+
+function readwhitelist(file, line)
+{
+ if (system("test -f " file) != 0)
+ return
+ while ((getline line < file) > 0)
+ WLIST[line]
+}
+
+
+BEGIN {
+
+ PORTDIR = ARGV[1]
+ if (system("test -d " PORTDIR) != 0) {
+ usr_error(PORTDIR " is not a directory, ignoring")
+ exit
+ }
+
+ PORTDIR = fullpath(PORTDIR)
+ PORT = gensub(/^.*\//, "", 1, PORTDIR)
+ COLLPORT = collectionport(PORTDIR)
+
+ delete ARGV
+ ARGC = 1
+
+ split(PORT_FILES, af)
+
+ for (f in af) {
+ p = PORTDIR "/" af[f]
+ if (system("test -f " p) == 0)
+ ARGV[ARGC++] = p
+ else
+ if(loglevel_ok(FATAL))
+ perror(FATAL, "file not found: " af[f])
+ }
+
+ if (ARGC == 1)
+ exit
+
+ readwhitelist(WHITE_LIST)
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/10_file_check_clean_repo.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/10_file_check_clean_repo.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/10_file_check_clean_repo.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,32 @@
+#
+# 10_file_check_clean_repo.awk
+#
+# Version 0.1.0 - 2006-08-07
+# Johannes Winkelmann, jw at smts dot ch
+#
+# Tests for invalid files in a clean repo
+
+
+function list_files(dir,af, cmd,f)
+{
+ cmd = "ls -1A --color=none " dir
+ delete af
+ while (cmd | getline f)
+ af[f]
+ close(cmd)
+}
+
+
+BEGIN {
+
+ if (loglevel_ok(FATAL)) {
+
+ list_files(PORTDIR, af)
+
+ for (f in af) {
+ if (f ~ "(.(tar.(bz2|gz)|tgz|zip|rar|svn)|CVS|REPO|index.hml)$")
+ perror(FATAL, "invalid file/directory: " f)
+ }
+ }
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/20_evil_cmds.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/20_evil_cmds.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/20_evil_cmds.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,47 @@
+#
+# 20_evil_cmds.awk
+#
+# Version 0.1.2 - 2006-07-14
+# J�rgen Daubert <jue at jue dot li>
+#
+# Two test to find malicious rm and cd commands like 'rm -rf /usr'.
+#
+# Because there are often cases where we need a rm inside the workdir,
+# it's not posssible to expect always a $PKG in front of the rm parameter.
+# Best would be to interpret the whole build function to see where we are
+# in the filesystem. For now it should be sufficent to have a look at the
+# cd command too, to find something like 'cd /usr && rm -rf .'
+#
+# The test for rm is a bit complicated, because we often have multiline
+# commands with rm.
+
+
+loglevel_ok(FATAL) && FILENAME ~ PKGFILE {
+
+ if (match($0, /\<rm\>/)) {
+
+ a = substr($0, RSTART)
+
+ while ($0 ~ /\\$/) {
+ getline
+ a = a $0
+ gsub(/\\/, "", a)
+ }
+
+ split(a, ab)
+
+ for (i in ab) {
+ if (ab[i] ~ /^\//)
+ perror(FATAL, "Use of rm outside the workdir, Pkgfile line " NR)
+ }
+ }
+
+
+ if ($0 ~ /\<cd\>/) {
+ for (c=1; c<=NF; c++) {
+ if ($c == "cd" && $(c+1) ~ /^\//)
+ perror(FATAL, "Use of cd to go outside the workdir, Pkgfile line " NR)
+ }
+ }
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/20_maintainer_email.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/20_maintainer_email.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/20_maintainer_email.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,17 @@
+#
+# 20_maintainer_email.awk
+#
+# Version 0.1.0 - 2006-09-02
+# J�rgen Daubert <jue at jue dot li>
+#
+# Checks the Maintainer header for invalid characters
+
+
+loglevel_ok(WARN) && FILENAME ~ PKGFILE {
+
+ if ( $0 ~ ("^# Maintainer:") ) {
+ if ( p = match($0, /[<>@]+/) )
+ perror(WARN, "invalid email address: " substr($0, p))
+ }
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/20_missing_deps.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/20_missing_deps.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/20_missing_deps.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,31 @@
+#
+# 20_missing_deps.awk
+#
+# Version 0.1 - 2006-08-26
+# J�rgen Daubert <jue at jue dot li>
+
+
+BEGIN {
+
+ if (DEP_PORTS) {
+ split(DEP_PORTS, ac)
+ for (i in ac)
+ DEP_MAP[ac[i]]
+ }
+}
+
+
+loglevel_ok(ERROR) && FILENAME ~ PKGFILE && DEP_PORTS {
+
+ if ( $0 ~ ("^# Depends on:") ) {
+
+ split($0, ac, /:[[:space:]]*/)
+ split(ac[2], ad, /[[:space:]]*,[[:space:]]*|[[:space:]]+/)
+
+ for (d in ad) {
+ if (ad[d] !~ /^ *$/ && ! (ad[d] in DEP_MAP))
+ perror(ERROR, "missing dependency: " ad[d])
+ }
+ }
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/20_pkgfile_headers.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/20_pkgfile_headers.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/20_pkgfile_headers.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,38 @@
+#
+# 20_pkgfile_headers.awk
+#
+# Version 0.1.1 - 2006-08-24
+# J�rgen Daubert <jue at jue dot li>
+
+
+BEGIN {
+
+ pkgfile_headers["Description"] = 0
+ pkgfile_headers["URL"] = 0
+ pkgfile_headers["Maintainer"] = 0
+}
+
+
+loglevel_ok(ERROR) && FILENAME ~ PKGFILE {
+
+ for (h in pkgfile_headers) {
+ if ( $0 ~ ("^# " h ":") ) {
+ pkgfile_headers[h] = 1
+ split($0, ac, ":")
+ if (! ac[2])
+ perror(ERROR, "empty header found: " h)
+ }
+ }
+}
+
+
+END {
+
+ if (loglevel_ok(ERROR)) {
+ for (h in pkgfile_headers) {
+ if (! pkgfile_headers[h])
+ perror(ERROR, "header not found: " h)
+ }
+ }
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/20_pkgfile_vars.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/20_pkgfile_vars.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/20_pkgfile_vars.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,35 @@
+#
+# 20_pkgfile_vars.awk
+#
+# Version 0.1.2 - 2006-07-14
+# J�rgen Daubert <jue at jue dot li>
+
+
+BEGIN {
+
+ pkgfile_vars["name"] = 0
+ pkgfile_vars["version"] = 0
+ pkgfile_vars["release"] = 0
+ pkgfile_vars["source"] = 0
+}
+
+
+loglevel_ok(ERROR) && FILENAME ~ PKGFILE {
+
+ for (v in pkgfile_vars) {
+ if ( $1 ~ ("^" v "=") )
+ pkgfile_vars[v] = 1
+ }
+}
+
+
+END {
+
+ if (loglevel_ok(ERROR)) {
+ for (v in pkgfile_vars) {
+ if (! pkgfile_vars[v])
+ perror(ERROR, "variable not found: " v)
+ }
+ }
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/20_port_name_match.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/20_port_name_match.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/20_port_name_match.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,16 @@
+#
+# 20_port_name_match.awk
+#
+# Version 0.1.1 - 2006-07-14
+# J�rgen Daubert <jue at jue dot li>
+
+
+loglevel_ok(ERROR) && FILENAME ~ PKGFILE {
+
+ if ($1 ~ /^name=/) {
+ split($1, an, "=")
+ if (an[2] != PORT)
+ perror(ERROR, "variable name do not match the portname: " an[2])
+ }
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/20_release_number.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/20_release_number.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/20_release_number.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,18 @@
+#
+# 20_release_number.awk
+#
+# Version 0.1.2 - 2006-07-14
+# J�rgen Daubert <jue at jue dot li>
+#
+# only integer numbers >= 1 are valid for the release variable
+
+
+loglevel_ok(ERROR) && FILENAME ~ PKGFILE {
+
+ if ($1 ~ /^release=/) {
+ split($1, an, "=")
+ if (an[2] !~ /^[1-9][0-9]*$/)
+ perror(ERROR, "variable release contains invalid characters: " an[2])
+ }
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/30_file_conflict.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/30_file_conflict.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/30_file_conflict.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,30 @@
+#
+# 30_file_conflict.awk
+#
+# Version 0.1.0 - 2006-08-31
+# J�rgen Daubert <jue at jue dot li>
+
+
+BEGIN {
+
+ if (FOOTPRINTDB) {
+ while ((getline l < FOOTPRINTDB) > 0) {
+ split(l, am, "\t")
+ file_conflict[am[1]] = am[2]
+ }
+ close(file)
+ }
+}
+
+
+loglevel_ok(ERROR) && FILENAME ~ FOOTPRINT {
+
+ if ($3 in file_conflict) {
+ split(file_conflict[$3], am, ":")
+ for (i in am) {
+ if (am[i] != COLLPORT)
+ perror(ERROR, "file conflict found: " am[i] " -> " $3)
+ }
+ }
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/30_file_permissions.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/30_file_permissions.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/30_file_permissions.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,16 @@
+#
+# 30_file_permissions.awk
+#
+# Version 0.1.1 - 2006-07-14
+# J�rgen Daubert <jue at jue dot li>
+
+
+loglevel_ok(FATAL) && FILENAME ~ FOOTPRINT {
+
+ if ($1 ~ /^d.......w./)
+ perror(FATAL, "world writable directory found: " $3)
+
+ if ($1 ~ /^-.......w./)
+ perror(FATAL, "world writable file found: " $3)
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/30_invalid_dirs.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/30_invalid_dirs.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/30_invalid_dirs.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,25 @@
+#
+# 30_invalid_dirs.awk
+#
+# Version 0.1.2 - 2006-07-16
+# J�rgen Daubert <jue at jue dot li>
+
+
+BEGIN {
+
+ invalid_dirs[1] = "^usr/share/man/$"
+ invalid_dirs[2] = "^usr/local/$"
+ invalid_dirs[3] = "^usr/share/locale/$"
+ invalid_dirs[4] = "^usr/info/$"
+ invalid_dirs[5] = "^usr/libexec/$"
+}
+
+
+loglevel_ok(ERROR) && FILENAME ~ FOOTPRINT {
+
+ for (d in invalid_dirs) {
+ if ($3 ~ invalid_dirs[d])
+ perror(ERROR, "directory not allowed: " $3)
+ }
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/30_junk_files.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/30_junk_files.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/30_junk_files.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,25 @@
+#
+# 30_junk_files.awk
+#
+# Version 0.1.2 - 2006-07-14
+# J�rgen Daubert <jue at jue dot li>
+
+
+BEGIN {
+
+ # Perl junk files
+ junk_files[1] = ".*/perl./.*/(perllocal\\.pod|\\.packlist|[^/]+\\.bs)$"
+
+ # GNU junk files
+ junk_files[2] = "AUTHORS|BUGS|COPYING|ChangeLog|INSTALL|NEWS|README|THANKS|TODO"
+}
+
+
+loglevel_ok(WARN) && FILENAME ~ FOOTPRINT {
+
+ for (f in junk_files) {
+ if ($3 ~ junk_files[f])
+ perror(WARN, "junk file found: " $3)
+ }
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/30_suid_sgid.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/30_suid_sgid.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/30_suid_sgid.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,16 @@
+#
+# 30_suid_sgid.awk
+#
+# Version 0.1 - 2006-07-24
+# J�rgen Daubert <jue at jue dot li>
+
+
+loglevel_ok(INFO) && FILENAME ~ FOOTPRINT {
+
+ if ($1 ~ /^...s....../)
+ perror(INFO, "suid file found: " $3)
+
+ if ($1 ~ /^......s.../)
+ perror(INFO, "sgid file found: " $3)
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/30_system_users.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/30_system_users.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/30_system_users.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,29 @@
+#
+# 30_system_users.awk
+#
+# Version 0.1.1 2006-07-14
+# J�rgen Daubert <jue at jue dot li>
+
+
+loglevel_ok(ERROR+INFO) && FILENAME ~ FOOTPRINT {
+
+ split($2, au, "/")
+ warned = 0
+
+ if (loglevel_ok(ERROR)) {
+
+ if (au[1] ~ /[1-9][0-9]*/) {
+ perror(ERROR, "invalid user: " $2 " -> " $3)
+ warned = 1
+ }
+
+ if (au[2] ~ /[1-9][0-9]*/)
+ perror(ERROR, "invalid group: " $2 " -> " $3)
+ }
+
+ if (! warned && loglevel_ok(INFO) && $3 ~ /^(lib|sbin|usr)\//) {
+ if (au[1] !~ /root/)
+ perror(INFO, "file not owned by root: " $2 " -> " $3)
+ }
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/90_mk_footprint_db.awk
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/90_mk_footprint_db.awk (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/90_mk_footprint_db.awk 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,57 @@
+#
+# 90_mk_footprint_db.awk
+#
+# Version 0.1.0 - 2006-08-31
+# J�rgen Daubert <jue at jue dot li>
+#
+# Creates a temporary file with all footprints and
+# the owners of those
+#
+# File format:
+# <file-name> coll1/port1:coll2/port2:...
+#
+# Needed variables:
+# - FOOTPRINTDB the name of the temporary file
+#
+# Requires:
+# - 00_prtverify_lib.awk
+#
+# Usage example:
+# gawk -v FOOTPRINTDB=<file> \
+# -f 00_prtverify_lib.awk \
+# -f 90_mk_footprint_db.awk \
+# /usr/ports/{core,opt,contrib}/*/.footprint
+
+
+function beginfile(name)
+{
+ sub(/\/\.footprint/, "", name)
+ name = fullpath(name)
+ COLLPORT = collectionport(name)
+}
+
+
+BEGIN {
+ FS = "\t"
+}
+
+
+FNR == 1 {
+ beginfile(FILENAME)
+}
+
+FILENAME ~ FOOTPRINT && $3 !~ /\/$/ {
+ sub(/ -> .*/, "", $3)
+ if (! ($3 in fc_map))
+ fc_map[$3] = COLLPORT
+ else
+ fc_map[$3] = fc_map[$3] ":" COLLPORT
+}
+
+
+END {
+
+ for (i in fc_map)
+ print i "\t" fc_map[i] > FOOTPRINTDB
+}
+
Added: tools/prt-utils/trunk/lib/prtverify/prtverify.wl
===================================================================
--- tools/prt-utils/trunk/lib/prtverify/prtverify.wl (rev 0)
+++ tools/prt-utils/trunk/lib/prtverify/prtverify.wl 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,8 @@
+WARN core/autoconf ............ junk file found: usr/share/autoconf/INSTALL
+WARN core/automake ............ junk file found: usr/share/automake-1.9/COPYING
+WARN core/automake ............ junk file found: usr/share/automake-1.9/INSTALL
+FATAL core/filesystem .......... world writable directory found: tmp/
+FATAL core/filesystem .......... world writable directory found: var/lock/
+FATAL core/filesystem .......... world writable directory found: var/spool/mail/
+FATAL core/filesystem .......... world writable directory found: var/tmp/
+
Added: tools/prt-utils/trunk/prtverify.1
===================================================================
--- tools/prt-utils/trunk/prtverify.1 (rev 0)
+++ tools/prt-utils/trunk/prtverify.1 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,72 @@
+.TH prtverify 1 "Sep 02 2006" "prtverify 0.4.0" ""
+.SH NAME
+prtverify \- utility to check CRUX ports for typical errors
+.SH SYNOPSIS
+\fBprtverify [options] <port> ...\fP
+.SH DESCRIPTION
+\fBprtverify\fP is a shell script which calls gawk with a bunch of
+small modules, each of them containing one or more tests.
+
+Following tests are implemented yet:
+
+.TP
+.B port
+ - missing files Pkgfile/.footprint/.md5sum
+ - invalid files/directories (-m clean-repo option)
+.TP
+.B Pkgfile
+ - existence of name/version/release/source variables
+ - existence of Description/Maintainer/URL headers
+ - empty Description/Maintainer/URL headers
+ - invalid email address in Maintainer header
+ - match of portname to name variable
+ - wrong release number
+ - cd/rm command outside the work directory
+ - missing dependencies (-m missing-deps option)
+.TP
+.B .footprint
+ - world writable files/directories
+ - junk files like perllocal.pod
+ - invalid directories like /usr/info
+ - invalid users
+ - files not owned by root
+ - SUID/SGID files
+ - file-conflicts with other ports (-m file-conflict option)
+.SH OPTIONS
+.TP
+.B -l <loglevel>
+All test are categorized into 4 levels, from FATAL to INFO, which
+can be used to adjust the output of prtverify.
+Set loglevel to 8 for INFO, 4 for WARN, 2 for ERROR and 1 for FATAL
+errors. Sum them up to show combined loglevels, e.g. 12 for WARN
+and INFO errors. Default is 15, which shows all error messages.
+.TP
+.B -m clean-repo
+If this mode is set, an additional test for invalid files
+like *.pkg.tar.gz or invalid directories like .svn is selected.
+Only sensible for clean repositories, of course.
+.TP
+.B -m missing-deps -c <path_to_collection> [-c <path_to_collection> ...]
+Adds a test for missing dependencies. The test takes the arguments set
+by the 'Depends on'-header and looks for a complying directory in the
+path specified by the -c option. Multiple -c options are allowed.
+.TP
+.B -m file-conflict -c <path_to_collection> [-c <path_to_collection> ...]
+Adds a test for file-conflicts with other ports. The ports .footprint
+entries are compared with a list of files from the ports specified
+with the -c options.
+
+\fBNote:\fP the test is very time-consuming if you run it over a large
+number of collections !
+.SH WHITELIST
+To avoid messages for errors which are known and accepted \fBprtverify\fP
+uses a whitelist to hide those.
+The whitelist is located at \fI/usr/lib/prtverify/prtverify.wl\fP.
+.SH FILES
+ \fI/usr/lib/prtverify/*.awk\fP
+ \fI/usr/lib/prtverify/prtverify.wl\fP
+.SH CREDITS
+I'd like to thanks Johannes Winkelmann for the initial idea for such a tool
+and for many suggestions and contributions.
+.SH AUTHOR
+J�rgen Daubert <juergen.daubert(a)t-online.de>
Added: tools/prt-utils/trunk/prtverify.in
===================================================================
--- tools/prt-utils/trunk/prtverify.in (rev 0)
+++ tools/prt-utils/trunk/prtverify.in 2006-09-04 19:02:00 UTC (rev 1812)
@@ -0,0 +1,167 @@
+#!/bin/sh
+#
+# prtverify
+# Version 0.4.0 - 2006-09-02
+# J�rgen Daubert <jue at jue dot li>
+
+
+MODDIR=@@LIBDIR@@/prtverify
+WHITELIST=$MODDIR/prtverify.wl
+PORTFILES='Pkgfile .footprint .md5sum'
+LOGLEVEL=15
+TESTS=$MODDIR/[023]*.awk
+
+
+### Functions
+
+checkargs() {
+ if [ $1 -lt 1 ]; then
+ usage
+ fi
+}
+
+perror() {
+ echo "===== Error: $1" > /dev/stderr
+ exit -1
+}
+
+usage() {
+ echo "Usage: ${0##*/} [options] port ...
+options:
+ -l loglevel
+ -m clean-repo
+ -m missing-deps -c path_to_collection [-c path_to_collection ...]
+ -m file-conflict -c path_to_collection [-c path_to_collection ...]
+See prtverify(1) for a detailed description of all options."
+ exit 0
+}
+
+checkcollections() {
+ local dir
+ if [ -z "$COLLECTIONS" ]; then
+ perror "Need one or more collection. Use -c option to set."
+ fi
+
+ for dir in $COLLECTIONS; do
+ if [ ! -d $dir ]; then
+ perror "$dir is not a directory"
+ continue
+ fi
+ stat $dir/*/Pkgfile > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ perror "$dir is not a CRUX port-collection directory"
+ fi
+ done
+}
+
+cleanup() {
+ rm -f $FPDB
+ exit 0
+}
+
+checkmode() {
+ case $1 in
+ clean-repo)
+ TESTS=$MODDIR/[0123]*.awk
+ ;;
+ file-conflict)
+ MODE_FC=1
+ ;;
+ missing-deps)
+ MODE_MD=1
+ ;;
+ *) usage
+ ;;
+ esac
+}
+
+getoptions() {
+ local option
+ while getopts :l:m:c: option
+ do
+ case $option in
+ l) LOGLEVEL="$OPTARG"
+ ;;
+ m) checkmode "$OPTARG"
+ ;;
+ c) COLLECTIONS="$COLLECTIONS $OPTARG"
+ ;;
+ *) usage
+ ;;
+ esac
+ done
+ shift $(($OPTIND - 1))
+
+ PORTS=$@
+}
+
+findmodules() {
+ local mod
+ for mod in $TESTS; do
+ MODULES="$MODULES -f $mod"
+ done
+}
+
+mkfootprintdb() {
+ local dir files
+ FPDB=$(mktemp -p ${TMPDIR:-/tmp} prtverify.XXXXXXXX)
+
+ for dir in $COLLECTIONS; do
+ files="$files $dir/*/.footprint"
+ done
+
+ gawk \
+ -v FOOTPRINTDB="$FPDB" \
+ -f $MODDIR/00_prtverify_lib.awk \
+ -f $MODDIR/90_mk_footprint_db.awk \
+ $files
+}
+
+mkportslist() {
+ local dir
+ for dir in $COLLECTIONS; do
+ DEPPORTS="$DEPPORTS `ls -1 --color=none $dir`"
+ done
+}
+
+runtests() {
+ local dir
+ checkargs $#
+
+ for dir in $@; do
+ gawk \
+ -v LOG_LEVEL=$LOGLEVEL \
+ -v FOOTPRINTDB="$FPDB" \
+ -v PORT_FILES="$PORTFILES" \
+ -v WHITE_LIST="$WHITELIST" \
+ -v DEP_PORTS="$DEPPORTS" \
+ $MODULES $dir
+ done
+}
+
+main() {
+ checkargs $#
+ getoptions $@
+
+ if [ $MODE_FC ] || [ $MODE_MD ]; then
+ checkcollections
+ if [ $MODE_FC ]; then
+ mkfootprintdb
+ fi
+ if [ $MODE_MD ]; then
+ mkportslist
+ fi
+ fi
+
+ findmodules
+ runtests $PORTS
+ cleanup
+}
+
+### Main
+
+trap "cleanup" SIGHUP SIGINT SIGQUIT SIGTERM
+
+main "$@"
+
+# End of file
1
0
Author: jw
Date: 2006-09-04 20:11:43 +0200 (Mon, 04 Sep 2006)
New Revision: 1811
Modified:
crux-2.2/ports/opt/python-xlib/Pkgfile
Log:
python-xlib: add maintainer field
Modified: crux-2.2/ports/opt/python-xlib/Pkgfile
===================================================================
--- crux-2.2/ports/opt/python-xlib/Pkgfile 2006-09-03 19:10:23 UTC (rev 1810)
+++ crux-2.2/ports/opt/python-xlib/Pkgfile 2006-09-04 18:11:43 UTC (rev 1811)
@@ -1,6 +1,6 @@
# Description: python interface to xlib
# URL: http://python-xlib.sourceforge.net
-# Packager: Johannes Winkelmann, jw at tks6 dot net
+# Maintainer: Johannes Winkelmann, jw at tks6 dot net
# Depends on: python x11
name=python-xlib
1
0
Author: jaeger
Date: 2006-09-03 21:10:23 +0200 (Sun, 03 Sep 2006)
New Revision: 1810
Added:
crux-2.2/ports/opt/gob/
crux-2.2/ports/opt/gob/.footprint
crux-2.2/ports/opt/gob/.md5sum
crux-2.2/ports/opt/gob/Pkgfile
Log:
gob: initial import, version 2.0.14
Added: crux-2.2/ports/opt/gob/.footprint
===================================================================
--- crux-2.2/ports/opt/gob/.footprint (rev 0)
+++ crux-2.2/ports/opt/gob/.footprint 2006-09-03 19:10:23 UTC (rev 1810)
@@ -0,0 +1,9 @@
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/gob2
+drwxr-xr-x root/root usr/man/
+drwxr-xr-x root/root usr/man/man1/
+-rw-r--r-- root/root usr/man/man1/gob2.1.gz
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/aclocal/
+-rw-r--r-- root/root usr/share/aclocal/gob2.m4
Added: crux-2.2/ports/opt/gob/.md5sum
===================================================================
--- crux-2.2/ports/opt/gob/.md5sum (rev 0)
+++ crux-2.2/ports/opt/gob/.md5sum 2006-09-03 19:10:23 UTC (rev 1810)
@@ -0,0 +1 @@
+f8721af6f4e90ff48bd7cb4c96a5a94c gob2-2.0.14.tar.gz
Added: crux-2.2/ports/opt/gob/Pkgfile
===================================================================
--- crux-2.2/ports/opt/gob/Pkgfile (rev 0)
+++ crux-2.2/ports/opt/gob/Pkgfile 2006-09-03 19:10:23 UTC (rev 1810)
@@ -0,0 +1,16 @@
+# Description: The GObject Builder
+# URL: http://www.5z.com/jirka/gob.html
+# Maintainer: Matt Housh, jaeger at morpheus dot net
+# Depends on: bison, flex, glib, gtk
+
+name=gob
+version=2.0.14
+release=1
+source=(http://ftp.5z.com/pub/$name/gob2-$version.tar.gz)
+
+build() {
+ cd gob2-$version
+ ./configure --prefix=/usr
+ make
+ make DESTDIR=$PKG install
+}
1
0
Author: jaeger
Date: 2006-09-03 20:44:39 +0200 (Sun, 03 Sep 2006)
New Revision: 1809
Added:
crux-2.2/ports/opt/avahi/
crux-2.2/ports/opt/avahi/.footprint
crux-2.2/ports/opt/avahi/.md5sum
crux-2.2/ports/opt/avahi/Pkgfile
crux-2.2/ports/opt/avahi/pre-install
crux-2.2/ports/opt/avahi/rc.avahi
crux-2.2/ports/opt/dbus/
crux-2.2/ports/opt/dbus/.footprint
crux-2.2/ports/opt/dbus/.md5sum
crux-2.2/ports/opt/dbus/Pkgfile
crux-2.2/ports/opt/dbus/pre-install
crux-2.2/ports/opt/dbus/rc.dbus
crux-2.2/ports/opt/hal/
crux-2.2/ports/opt/hal/.footprint
crux-2.2/ports/opt/hal/.md5sum
crux-2.2/ports/opt/hal/Pkgfile
crux-2.2/ports/opt/hal/pre-install
crux-2.2/ports/opt/hal/rc.hald
Log:
avahi, dbus, hal: initial imports, versions 0.6.13, 0.62, 0.5.7
Added: crux-2.2/ports/opt/avahi/.footprint
===================================================================
--- crux-2.2/ports/opt/avahi/.footprint (rev 0)
+++ crux-2.2/ports/opt/avahi/.footprint 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,175 @@
+drwxr-xr-x root/root etc/
+drwxr-xr-x root/root etc/rc.d/
+-rwxr-xr-x root/root etc/rc.d/avahi
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/avahi-bookmarks
+-rwxr-xr-x root/root usr/bin/avahi-browse
+lrwxrwxrwx root/root usr/bin/avahi-browse-domains -> avahi-browse
+-rwxr-xr-x root/root usr/bin/avahi-discover
+-rwxr-xr-x root/root usr/bin/avahi-discover-standalone
+-rwxr-xr-x root/root usr/bin/avahi-publish
+lrwxrwxrwx root/root usr/bin/avahi-publish-address -> avahi-publish
+lrwxrwxrwx root/root usr/bin/avahi-publish-service -> avahi-publish
+-rwxr-xr-x root/root usr/bin/avahi-resolve
+lrwxrwxrwx root/root usr/bin/avahi-resolve-address -> avahi-resolve
+lrwxrwxrwx root/root usr/bin/avahi-resolve-host-name -> avahi-resolve
+-rwxr-xr-x root/root usr/bin/avahi-set-host-name
+drwxr-xr-x root/root usr/etc/
+drwxr-xr-x root/root usr/etc/avahi/
+-rw-r--r-- root/root usr/etc/avahi/avahi-daemon.conf
+-rwxr-xr-x root/root usr/etc/avahi/avahi-dnsconfd.action
+-rw-r--r-- root/root usr/etc/avahi/hosts
+drwxr-xr-x root/root usr/etc/avahi/services/
+-rw-r--r-- root/root usr/etc/avahi/services/ssh.service
+drwxr-xr-x root/root usr/etc/dbus-1/
+drwxr-xr-x root/root usr/etc/dbus-1/system.d/
+-rw-r--r-- root/root usr/etc/dbus-1/system.d/avahi-dbus.conf
+drwxr-xr-x root/root usr/include/
+drwxr-xr-x root/root usr/include/avahi-client/
+-rw-r--r-- root/root usr/include/avahi-client/client.h
+-rw-r--r-- root/root usr/include/avahi-client/lookup.h
+-rw-r--r-- root/root usr/include/avahi-client/publish.h
+drwxr-xr-x root/root usr/include/avahi-common/
+-rw-r--r-- root/root usr/include/avahi-common/address.h
+-rw-r--r-- root/root usr/include/avahi-common/alternative.h
+-rw-r--r-- root/root usr/include/avahi-common/cdecl.h
+-rw-r--r-- root/root usr/include/avahi-common/defs.h
+-rw-r--r-- root/root usr/include/avahi-common/domain.h
+-rw-r--r-- root/root usr/include/avahi-common/error.h
+-rw-r--r-- root/root usr/include/avahi-common/gccmacro.h
+-rw-r--r-- root/root usr/include/avahi-common/llist.h
+-rw-r--r-- root/root usr/include/avahi-common/malloc.h
+-rw-r--r-- root/root usr/include/avahi-common/rlist.h
+-rw-r--r-- root/root usr/include/avahi-common/simple-watch.h
+-rw-r--r-- root/root usr/include/avahi-common/strlst.h
+-rw-r--r-- root/root usr/include/avahi-common/thread-watch.h
+-rw-r--r-- root/root usr/include/avahi-common/timeval.h
+-rw-r--r-- root/root usr/include/avahi-common/watch.h
+drwxr-xr-x root/root usr/include/avahi-compat-howl/
+drwxr-xr-x root/root usr/include/avahi-compat-howl/corby/
+-rw-r--r-- root/root usr/include/avahi-compat-howl/corby/buffer.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/corby/channel.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/corby/corby.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/corby/message.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/corby/object.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/corby/orb.h
+drwxr-xr-x root/root usr/include/avahi-compat-howl/discovery/
+-rw-r--r-- root/root usr/include/avahi-compat-howl/discovery/discovery.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/discovery/text_record.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/howl.h
+drwxr-xr-x root/root usr/include/avahi-compat-howl/rendezvous/
+-rw-r--r-- root/root usr/include/avahi-compat-howl/rendezvous/rendezvous.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/rendezvous/text_record.h
+drwxr-xr-x root/root usr/include/avahi-compat-howl/salt/
+-rw-r--r-- root/root usr/include/avahi-compat-howl/salt/address.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/salt/debug.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/salt/interface.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/salt/platform.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/salt/salt.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/salt/signal.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/salt/socket.h
+-rw-r--r-- root/root usr/include/avahi-compat-howl/salt/time.h
+drwxr-xr-x root/root usr/include/avahi-compat-libdns_sd/
+-rw-r--r-- root/root usr/include/avahi-compat-libdns_sd/dns_sd.h
+drwxr-xr-x root/root usr/include/avahi-core/
+-rw-r--r-- root/root usr/include/avahi-core/core.h
+-rw-r--r-- root/root usr/include/avahi-core/log.h
+-rw-r--r-- root/root usr/include/avahi-core/lookup.h
+-rw-r--r-- root/root usr/include/avahi-core/publish.h
+-rw-r--r-- root/root usr/include/avahi-core/rr.h
+drwxr-xr-x root/root usr/include/avahi-glib/
+-rw-r--r-- root/root usr/include/avahi-glib/glib-malloc.h
+-rw-r--r-- root/root usr/include/avahi-glib/glib-watch.h
+drwxr-xr-x root/root usr/lib/
+-rw-r--r-- root/root usr/lib/libavahi-client.a
+-rwxr-xr-x root/root usr/lib/libavahi-client.la
+lrwxrwxrwx root/root usr/lib/libavahi-client.so -> libavahi-client.so.3.2.0
+lrwxrwxrwx root/root usr/lib/libavahi-client.so.3 -> libavahi-client.so.3.2.0
+-rwxr-xr-x root/root usr/lib/libavahi-client.so.3.2.0
+-rw-r--r-- root/root usr/lib/libavahi-common.a
+-rwxr-xr-x root/root usr/lib/libavahi-common.la
+lrwxrwxrwx root/root usr/lib/libavahi-common.so -> libavahi-common.so.3.4.2
+lrwxrwxrwx root/root usr/lib/libavahi-common.so.3 -> libavahi-common.so.3.4.2
+-rwxr-xr-x root/root usr/lib/libavahi-common.so.3.4.2
+-rw-r--r-- root/root usr/lib/libavahi-core.a
+-rwxr-xr-x root/root usr/lib/libavahi-core.la
+lrwxrwxrwx root/root usr/lib/libavahi-core.so -> libavahi-core.so.4.0.4
+lrwxrwxrwx root/root usr/lib/libavahi-core.so.4 -> libavahi-core.so.4.0.4
+-rwxr-xr-x root/root usr/lib/libavahi-core.so.4.0.4
+-rw-r--r-- root/root usr/lib/libavahi-glib.a
+-rwxr-xr-x root/root usr/lib/libavahi-glib.la
+lrwxrwxrwx root/root usr/lib/libavahi-glib.so -> libavahi-glib.so.1.0.1
+lrwxrwxrwx root/root usr/lib/libavahi-glib.so.1 -> libavahi-glib.so.1.0.1
+-rwxr-xr-x root/root usr/lib/libavahi-glib.so.1.0.1
+-rw-r--r-- root/root usr/lib/libdns_sd.a
+-rwxr-xr-x root/root usr/lib/libdns_sd.la
+lrwxrwxrwx root/root usr/lib/libdns_sd.so -> libdns_sd.so.1.0.0
+lrwxrwxrwx root/root usr/lib/libdns_sd.so.1 -> libdns_sd.so.1.0.0
+-rwxr-xr-x root/root usr/lib/libdns_sd.so.1.0.0
+-rw-r--r-- root/root usr/lib/libhowl.a
+-rwxr-xr-x root/root usr/lib/libhowl.la
+lrwxrwxrwx root/root usr/lib/libhowl.so -> libhowl.so.0.0.0
+lrwxrwxrwx root/root usr/lib/libhowl.so.0 -> libhowl.so.0.0.0
+-rwxr-xr-x root/root usr/lib/libhowl.so.0.0.0
+drwxr-xr-x root/root usr/lib/pkgconfig/
+-rw-r--r-- root/root usr/lib/pkgconfig/avahi-client.pc
+-rw-r--r-- root/root usr/lib/pkgconfig/avahi-compat-howl.pc
+-rw-r--r-- root/root usr/lib/pkgconfig/avahi-compat-libdns_sd.pc
+-rw-r--r-- root/root usr/lib/pkgconfig/avahi-core.pc
+-rw-r--r-- root/root usr/lib/pkgconfig/avahi-glib.pc
+drwxr-xr-x root/root usr/lib/python2.4/
+drwxr-xr-x root/root usr/lib/python2.4/site-packages/
+drwxr-xr-x root/root usr/lib/python2.4/site-packages/avahi/
+-rwxr-xr-x root/root usr/lib/python2.4/site-packages/avahi/ServiceTypeDatabase.py
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/avahi/SimpleGladeApp.py
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/avahi/SimpleGladeApp.pyc
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/avahi/SimpleGladeApp.pyo
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/avahi/__init__.py
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/avahi/__init__.pyc
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/avahi/__init__.pyo
+drwxr-xr-x root/root usr/sbin/
+-rwxr-xr-x root/root usr/sbin/avahi-daemon
+-rwxr-xr-x root/root usr/sbin/avahi-dnsconfd
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/applications/
+-rw-r--r-- root/root usr/share/applications/avahi-discover.desktop
+drwxr-xr-x root/root usr/share/avahi/
+-rw-r--r-- root/root usr/share/avahi/avahi-service.dtd
+drwxr-xr-x root/root usr/share/avahi/interfaces/
+-rw-r--r-- root/root usr/share/avahi/interfaces/avahi-discover.glade
+drwxr-xr-x root/root usr/share/avahi/introspection/
+-rw-r--r-- root/root usr/share/avahi/introspection/AddressResolver.introspect
+-rw-r--r-- root/root usr/share/avahi/introspection/DomainBrowser.introspect
+-rw-r--r-- root/root usr/share/avahi/introspection/EntryGroup.introspect
+-rw-r--r-- root/root usr/share/avahi/introspection/HostNameResolver.introspect
+-rw-r--r-- root/root usr/share/avahi/introspection/RecordBrowser.introspect
+-rw-r--r-- root/root usr/share/avahi/introspection/Server.introspect
+-rw-r--r-- root/root usr/share/avahi/introspection/ServiceBrowser.introspect
+-rw-r--r-- root/root usr/share/avahi/introspection/ServiceResolver.introspect
+-rw-r--r-- root/root usr/share/avahi/introspection/ServiceTypeBrowser.introspect
+-rw-r--r-- root/root usr/share/avahi/service-types
+-rw-r--r-- root/root usr/share/avahi/service-types.db
+drwxr-xr-x root/root usr/share/man/
+drwxr-xr-x root/root usr/share/man/man1/
+-rw-r--r-- root/root usr/share/man/man1/avahi-bookmarks.1.gz
+lrwxrwxrwx root/root usr/share/man/man1/avahi-browse-domains.1.gz -> avahi-browse.1.gz
+-rw-r--r-- root/root usr/share/man/man1/avahi-browse.1.gz
+-rw-r--r-- root/root usr/share/man/man1/avahi-discover.1.gz
+lrwxrwxrwx root/root usr/share/man/man1/avahi-publish-address.1.gz -> avahi-publish.1.gz
+lrwxrwxrwx root/root usr/share/man/man1/avahi-publish-service.1.gz -> avahi-publish.1.gz
+-rw-r--r-- root/root usr/share/man/man1/avahi-publish.1.gz
+lrwxrwxrwx root/root usr/share/man/man1/avahi-resolve-address.1.gz -> avahi-resolve.1.gz
+lrwxrwxrwx root/root usr/share/man/man1/avahi-resolve-host-name.1.gz -> avahi-resolve.1.gz
+-rw-r--r-- root/root usr/share/man/man1/avahi-resolve.1.gz
+-rw-r--r-- root/root usr/share/man/man1/avahi-set-host-name.1.gz
+drwxr-xr-x root/root usr/share/man/man5/
+-rw-r--r-- root/root usr/share/man/man5/avahi-daemon.conf.5.gz
+-rw-r--r-- root/root usr/share/man/man5/avahi.hosts.5.gz
+-rw-r--r-- root/root usr/share/man/man5/avahi.service.5.gz
+drwxr-xr-x root/root usr/share/man/man8/
+-rw-r--r-- root/root usr/share/man/man8/avahi-daemon.8.gz
+-rw-r--r-- root/root usr/share/man/man8/avahi-dnsconfd.8.gz
+-rw-r--r-- root/root usr/share/man/man8/avahi-dnsconfd.action.8.gz
+drwxr-xr-x root/root var/
+drwxr-xr-x root/root var/run/
Added: crux-2.2/ports/opt/avahi/.md5sum
===================================================================
--- crux-2.2/ports/opt/avahi/.md5sum (rev 0)
+++ crux-2.2/ports/opt/avahi/.md5sum 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,2 @@
+d1000689979105cc95b9ca102284aae4 avahi-0.6.13.tar.gz
+9379c518fad18582698babf08bc14f84 rc.avahi
Added: crux-2.2/ports/opt/avahi/Pkgfile
===================================================================
--- crux-2.2/ports/opt/avahi/Pkgfile (rev 0)
+++ crux-2.2/ports/opt/avahi/Pkgfile 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,32 @@
+# Description: A system that facilitates service discovery on local networks
+# URL: http://avahi.org/
+# Maintainer: Matt Housh, jaeger at crux dot nu
+# Depends on: libdaemon, dbus, pygtk, libglade
+
+name=avahi
+version=0.6.13
+release=1
+source=(http://avahi.org/download/$name-$version.tar.gz \
+ rc.$name)
+
+build() {
+ cd $name-$version
+ ./configure --prefix=/usr \
+ --localstatedir=/var \
+ --disable-qt3 \
+ --disable-qt4 \
+ --disable-doxygen-doc \
+ --disable-doxygen-dot \
+ --with-avahi-user=avahi \
+ --with-avahi-group=avahi \
+ --with-distro=none \
+ --disable-mono \
+ --disable-monodoc \
+ --enable-compat-howl \
+ --enable-compat-libdns_sd \
+ --with-dbus-sys=/usr/etc/dbus-1/system.d
+ make
+ make DESTDIR=$PKG install
+ install -D -o root -g root -m 0755 $SRC/rc.$name \
+ $PKG/etc/rc.d/$name
+}
Added: crux-2.2/ports/opt/avahi/pre-install
===================================================================
--- crux-2.2/ports/opt/avahi/pre-install (rev 0)
+++ crux-2.2/ports/opt/avahi/pre-install 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# check for avahi group or add one
+getent group avahi || /usr/sbin/groupadd -g 84 avahi
+
+# check for avahi user or add one
+getent passwd avahi || /usr/sbin/useradd -g avahi -u 84 -d /var/empty -s /bin/false -c "Avahi User" avahi
+
+# lock the account
+/usr/bin/passwd -l avahi
Property changes on: crux-2.2/ports/opt/avahi/pre-install
___________________________________________________________________
Name: svn:executable
+ *
Added: crux-2.2/ports/opt/avahi/rc.avahi
===================================================================
--- crux-2.2/ports/opt/avahi/rc.avahi (rev 0)
+++ crux-2.2/ports/opt/avahi/rc.avahi 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,20 @@
+#
+# /etc/rc.d/avahi: start/stop avahi daemon
+#
+
+case $1 in
+ start)
+ /usr/sbin/avahi-daemon -D -s
+ ;;
+ stop)
+ killall -q /usr/sbin/avahi-daemon
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 [start|stop|restart]"
+ ;;
+esac
Added: crux-2.2/ports/opt/dbus/.footprint
===================================================================
--- crux-2.2/ports/opt/dbus/.footprint (rev 0)
+++ crux-2.2/ports/opt/dbus/.footprint 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,114 @@
+drwxr-xr-x root/root etc/
+drwxr-xr-x root/root etc/rc.d/
+-rwxr-xr-x root/root etc/rc.d/dbus
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/dbus-binding-tool
+-rwxr-xr-x root/root usr/bin/dbus-cleanup-sockets
+-rwxr-xr-x root/root usr/bin/dbus-daemon
+-rwxr-xr-x root/root usr/bin/dbus-launch
+-rwxr-xr-x root/root usr/bin/dbus-monitor
+-rwxr-xr-x root/root usr/bin/dbus-send
+-rwxr-xr-x root/root usr/bin/dbus-viewer
+drwxr-xr-x root/root usr/etc/
+drwxr-xr-x root/root usr/etc/dbus-1/
+-rw-r--r-- root/root usr/etc/dbus-1/session.conf
+-rw-r--r-- root/root usr/etc/dbus-1/system.conf
+drwxr-xr-x root/root usr/etc/dbus-1/system.d/
+drwxr-xr-x root/root usr/include/
+drwxr-xr-x root/root usr/include/dbus-1.0/
+drwxr-xr-x root/root usr/include/dbus-1.0/dbus/
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-address.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-bus.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-connection.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-errors.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-glib-bindings.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-glib-error-enum.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-glib-lowlevel.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-glib.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-gtype-specialized.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-macros.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-memory.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-message.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-pending-call.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-protocol.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-server.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-shared.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-signature.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-threads.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus-types.h
+-rw-r--r-- root/root usr/include/dbus-1.0/dbus/dbus.h
+drwxr-xr-x root/root usr/lib/
+drwxr-xr-x root/root usr/lib/dbus-1.0/
+drwxr-xr-x root/root usr/lib/dbus-1.0/include/
+drwxr-xr-x root/root usr/lib/dbus-1.0/include/dbus/
+-rw-r--r-- root/root usr/lib/dbus-1.0/include/dbus/dbus-arch-deps.h
+-rw-r--r-- root/root usr/lib/libdbus-1.a
+-rwxr-xr-x root/root usr/lib/libdbus-1.la
+lrwxrwxrwx root/root usr/lib/libdbus-1.so -> libdbus-1.so.2.0.0
+lrwxrwxrwx root/root usr/lib/libdbus-1.so.2 -> libdbus-1.so.2.0.0
+-rwxr-xr-x root/root usr/lib/libdbus-1.so.2.0.0
+-rw-r--r-- root/root usr/lib/libdbus-glib-1.a
+-rwxr-xr-x root/root usr/lib/libdbus-glib-1.la
+lrwxrwxrwx root/root usr/lib/libdbus-glib-1.so -> libdbus-glib-1.so.2.0.0
+lrwxrwxrwx root/root usr/lib/libdbus-glib-1.so.2 -> libdbus-glib-1.so.2.0.0
+-rwxr-xr-x root/root usr/lib/libdbus-glib-1.so.2.0.0
+drwxr-xr-x root/root usr/lib/pkgconfig/
+-rw-r--r-- root/root usr/lib/pkgconfig/dbus-1.pc
+-rw-r--r-- root/root usr/lib/pkgconfig/dbus-glib-1.pc
+drwxr-xr-x root/root usr/lib/python2.4/
+drwxr-xr-x root/root usr/lib/python2.4/site-packages/
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus.pth
+drwxr-xr-x root/root usr/lib/python2.4/site-packages/dbus/
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/__init__.py
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/__init__.pyc
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/__init__.pyo
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/_dbus.py
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/_dbus.pyc
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/_dbus.pyo
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/_util.py
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/_util.pyc
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/_util.pyo
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/dbus_bindings.a
+-rwxr-xr-x root/root usr/lib/python2.4/site-packages/dbus/dbus_bindings.la
+-rwxr-xr-x root/root usr/lib/python2.4/site-packages/dbus/dbus_bindings.so
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/dbus_glib_bindings.a
+-rwxr-xr-x root/root usr/lib/python2.4/site-packages/dbus/dbus_glib_bindings.la
+-rwxr-xr-x root/root usr/lib/python2.4/site-packages/dbus/dbus_glib_bindings.so
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/decorators.py
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/decorators.pyc
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/decorators.pyo
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/exceptions.py
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/exceptions.pyc
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/exceptions.pyo
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/glib.py
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/glib.pyc
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/glib.pyo
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/introspect_parser.py
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/introspect_parser.pyc
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/introspect_parser.pyo
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/matchrules.py
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/matchrules.pyc
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/matchrules.pyo
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/proxies.py
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/proxies.pyc
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/proxies.pyo
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/service.py
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/service.pyc
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/service.pyo
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/types.py
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/types.pyc
+-rw-r--r-- root/root usr/lib/python2.4/site-packages/dbus/types.pyo
+drwxr-xr-x root/root usr/man/
+drwxr-xr-x root/root usr/man/man1/
+-rw-r--r-- root/root usr/man/man1/dbus-cleanup-sockets.1.gz
+-rw-r--r-- root/root usr/man/man1/dbus-daemon.1.gz
+-rw-r--r-- root/root usr/man/man1/dbus-launch.1.gz
+-rw-r--r-- root/root usr/man/man1/dbus-monitor.1.gz
+-rw-r--r-- root/root usr/man/man1/dbus-send.1.gz
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/dbus-1/
+drwxr-xr-x root/root usr/share/dbus-1/services/
+drwxr-xr-x root/root var/
+drwxr-xr-x root/root var/run/
+drwxr-xr-x root/root var/run/dbus/
Added: crux-2.2/ports/opt/dbus/.md5sum
===================================================================
--- crux-2.2/ports/opt/dbus/.md5sum (rev 0)
+++ crux-2.2/ports/opt/dbus/.md5sum 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,2 @@
+ba7692f63d0e9f1ef06703dff56cb650 dbus-0.62.tar.gz
+85ab55dfd2008265d900b1cb1570a434 rc.dbus
Added: crux-2.2/ports/opt/dbus/Pkgfile
===================================================================
--- crux-2.2/ports/opt/dbus/Pkgfile (rev 0)
+++ crux-2.2/ports/opt/dbus/Pkgfile 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,27 @@
+# Description: A message system
+# URL: http://freedesktop.org/wiki/Software_2fdbus
+# Maintainer: Matt Housh, jaeger at crux dot nu
+# Depends on: expat, glib, gtk, libxml2
+
+name=dbus
+version=0.62
+release=1
+source=(http://dbus.freedesktop.org/releases/$name-$version.tar.gz \
+ rc.$name)
+
+build() {
+ cd $name-$version
+ ./configure --prefix=/usr \
+ --localstatedir=/var \
+ --enable-glib \
+ --enable-gtk \
+ --enable-python \
+ --with-dbus-user=messagebus \
+ --disable-mono \
+ --disable-mono-docs \
+ --disable-tests
+ make
+ make DESTDIR=$PKG install
+ install -D -o root -g root -m 0755 $SRC/rc.$name \
+ $PKG/etc/rc.d/$name
+}
Added: crux-2.2/ports/opt/dbus/pre-install
===================================================================
--- crux-2.2/ports/opt/dbus/pre-install (rev 0)
+++ crux-2.2/ports/opt/dbus/pre-install 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# check for messagebus group or add one
+getent group messagebus || /usr/sbin/groupadd -g 81 messagebus
+
+# check for messagebus user or add one
+getent passwd messagebus || /usr/sbin/useradd -g messagebus -u 81 -d /var/empty -s /bin/false -c "D-BUS System Messagebus User" messagebus
+
+# lock the account
+/usr/bin/passwd -l messagebus
Property changes on: crux-2.2/ports/opt/dbus/pre-install
___________________________________________________________________
Name: svn:executable
+ *
Added: crux-2.2/ports/opt/dbus/rc.dbus
===================================================================
--- crux-2.2/ports/opt/dbus/rc.dbus (rev 0)
+++ crux-2.2/ports/opt/dbus/rc.dbus 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# /etc/rc.d/dbus: start/stop dbus messagebus daemon
+#
+
+case $1 in
+ start)
+ /usr/bin/dbus-daemon --system
+ ;;
+ stop)
+ killall -q /usr/bin/dbus-daemon
+ rm -f /var/run/dbus/pid
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 [start|stop|restart]"
+ ;;
+esac
+
+# End of file
Added: crux-2.2/ports/opt/hal/.footprint
===================================================================
--- crux-2.2/ports/opt/hal/.footprint (rev 0)
+++ crux-2.2/ports/opt/hal/.footprint 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,100 @@
+drwxr-xr-x root/root etc/
+drwxr-xr-x root/root etc/rc.d/
+-rwxr-xr-x root/root etc/rc.d/hald
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/hal-device
+-rwxr-xr-x root/root usr/bin/hal-find-by-capability
+-rwxr-xr-x root/root usr/bin/hal-find-by-property
+-rwxr-xr-x root/root usr/bin/hal-get-property
+-rwxr-xr-x root/root usr/bin/hal-set-property
+-rwxr-xr-x root/root usr/bin/lshal
+drwxr-xr-x root/root usr/etc/
+drwxr-xr-x root/root usr/etc/dbus-1/
+drwxr-xr-x root/root usr/etc/dbus-1/system.d/
+-rw-r--r-- root/root usr/etc/dbus-1/system.d/hal.conf
+drwxr-xr-x root/root usr/etc/hal/
+drwxr-xr-x root/root usr/etc/hal/fdi/
+drwxr-xr-x root/root usr/etc/hal/fdi/information/
+drwxr-xr-x root/root usr/etc/hal/fdi/policy/
+drwxr-xr-x root/root usr/etc/hal/fdi/preprobe/
+drwxr-xr-x root/root usr/include/
+drwxr-xr-x root/root usr/include/hal/
+-rw-r--r-- root/root usr/include/hal/libhal-storage.h
+-rw-r--r-- root/root usr/include/hal/libhal.h
+drwxr-xr-x root/root usr/lib/
+drwxr-xr-x root/root usr/lib/hal/
+-rwxr-xr-x root/root usr/lib/hal/hal-system-power-pmu
+-rwxr-xr-x root/root usr/lib/hal/hald-addon-acpi
+-rwxr-xr-x root/root usr/lib/hal/hald-addon-hid-ups
+-rwxr-xr-x root/root usr/lib/hal/hald-addon-keyboard
+-rwxr-xr-x root/root usr/lib/hal/hald-addon-pmu
+-rwxr-xr-x root/root usr/lib/hal/hald-addon-storage
+-rwxr-xr-x root/root usr/lib/hal/hald-addon-usb-csr
+-rwxr-xr-x root/root usr/lib/hal/hald-probe-hiddev
+-rwxr-xr-x root/root usr/lib/hal/hald-probe-input
+-rwxr-xr-x root/root usr/lib/hal/hald-probe-pc-floppy
+-rwxr-xr-x root/root usr/lib/hal/hald-probe-printer
+-rwxr-xr-x root/root usr/lib/hal/hald-probe-serial
+-rwxr-xr-x root/root usr/lib/hal/hald-probe-smbios
+-rwxr-xr-x root/root usr/lib/hal/hald-probe-storage
+-rwxr-xr-x root/root usr/lib/hal/hald-probe-volume
+-rwxr-xr-x root/root usr/lib/hal/hald-runner
+-rw-r--r-- root/root usr/lib/libhal-storage.a
+-rwxr-xr-x root/root usr/lib/libhal-storage.la
+lrwxrwxrwx root/root usr/lib/libhal-storage.so -> libhal-storage.so.1.0.0
+lrwxrwxrwx root/root usr/lib/libhal-storage.so.1 -> libhal-storage.so.1.0.0
+-rwxr-xr-x root/root usr/lib/libhal-storage.so.1.0.0
+-rw-r--r-- root/root usr/lib/libhal.a
+-rwxr-xr-x root/root usr/lib/libhal.la
+lrwxrwxrwx root/root usr/lib/libhal.so -> libhal.so.1.0.0
+lrwxrwxrwx root/root usr/lib/libhal.so.1 -> libhal.so.1.0.0
+-rwxr-xr-x root/root usr/lib/libhal.so.1.0.0
+drwxr-xr-x root/root usr/lib/pkgconfig/
+-rw-r--r-- root/root usr/lib/pkgconfig/hal-storage.pc
+-rw-r--r-- root/root usr/lib/pkgconfig/hal.pc
+drwxr-xr-x root/root usr/sbin/
+-rwxr-xr-x root/root usr/sbin/hald
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/hal/
+drwxr-xr-x root/root usr/share/hal/fdi/
+-rw-r--r-- root/root usr/share/hal/fdi/fdi.dtd
+-rw-r--r-- root/root usr/share/hal/fdi/fdi.rng
+drwxr-xr-x root/root usr/share/hal/fdi/information/
+drwxr-xr-x root/root usr/share/hal/fdi/information/10freedesktop/
+-rw-r--r-- root/root usr/share/hal/fdi/information/10freedesktop/10-camera-ptp.fdi
+-rw-r--r-- root/root usr/share/hal/fdi/information/10freedesktop/10-cd-dvd-burner.fdi
+-rw-r--r-- root/root usr/share/hal/fdi/information/10freedesktop/10-usb-card-readers.fdi
+-rw-r--r-- root/root usr/share/hal/fdi/information/10freedesktop/10-usb-music-players.fdi
+-rw-r--r-- root/root usr/share/hal/fdi/information/10freedesktop/10-usb-pda.fdi
+-rw-r--r-- root/root usr/share/hal/fdi/information/10freedesktop/10-usb-zip-drives.fdi
+-rw-r--r-- root/root usr/share/hal/fdi/information/10freedesktop/10-wireless-mice.fdi
+drwxr-xr-x root/root usr/share/hal/fdi/information/20thirdparty/
+drwxr-xr-x root/root usr/share/hal/fdi/policy/
+drwxr-xr-x root/root usr/share/hal/fdi/policy/10osvendor/
+-rw-r--r-- root/root usr/share/hal/fdi/policy/10osvendor/10-keyboard-policy.fdi
+-rw-r--r-- root/root usr/share/hal/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi
+-rw-r--r-- root/root usr/share/hal/fdi/policy/10osvendor/10-power-mgmt-policy.fdi
+-rw-r--r-- root/root usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
+-rw-r--r-- root/root usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi
+drwxr-xr-x root/root usr/share/hal/fdi/policy/20thirdparty/
+drwxr-xr-x root/root usr/share/hal/fdi/preprobe/
+drwxr-xr-x root/root usr/share/hal/fdi/preprobe/10osvendor/
+-rw-r--r-- root/root usr/share/hal/fdi/preprobe/10osvendor/10-ide-drives.fdi
+drwxr-xr-x root/root usr/share/hal/fdi/preprobe/20thirdparty/
+drwxr-xr-x root/root usr/share/hal/scripts/
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-luks-remove
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-luks-setup
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-luks-teardown
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-system-lcd-get-brightness
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-system-lcd-set-brightness
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-system-power-hibernate
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-system-power-reboot
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-system-power-set-power-save
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-system-power-shutdown
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-system-power-suspend
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-system-storage-cleanup-mountpoint
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-system-storage-cleanup-mountpoints
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-system-storage-eject
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-system-storage-mount
+-rwxr-xr-x root/root usr/share/hal/scripts/hal-system-storage-unmount
Added: crux-2.2/ports/opt/hal/.md5sum
===================================================================
--- crux-2.2/ports/opt/hal/.md5sum (rev 0)
+++ crux-2.2/ports/opt/hal/.md5sum 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,2 @@
+4163afb8285db64e00e7b1392b401d92 hal-0.5.7.tar.gz
+cc3d04e7ac09e15f33c530725f43e641 rc.hald
Added: crux-2.2/ports/opt/hal/Pkgfile
===================================================================
--- crux-2.2/ports/opt/hal/Pkgfile (rev 0)
+++ crux-2.2/ports/opt/hal/Pkgfile 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,28 @@
+# Description: Hardware Abstraction Layer
+# URL: http://freedesktop.org/wiki/Software_2fhal
+# Maintainer: Matt Housh, jaeger at crux dot nu
+# Depends on: dbus
+
+name=hal
+version=0.5.7
+release=1
+source=(http://freedesktop.org/~david/dist/$name-$version.tar.gz \
+ rc.hald)
+
+build() {
+ cd $name-$version
+ sed -i -e 's/USE_NLS=yes/USE_NLS=no/' \
+ -e 's/ENABLE_NLS 1/ENABLE_NLS 0/' configure
+ ./configure --prefix=/usr \
+ --libexecdir=/usr/lib/$name \
+ --localstatedir=/var \
+ --with-hal-user=haldaemon \
+ --with-hal-group=haldaemon \
+ --with-dbus-sys=/usr/etc/dbus-1/system.d
+ sed -i -e '/device-manager/d' tools/Makefile
+ make
+ make DESTDIR=$PKG install
+ install -D -o root -g root -m 0755 $SRC/rc.hald \
+ $PKG/etc/rc.d/hald
+ rm -rf $PKG/usr/share/{doc,locale}
+}
Added: crux-2.2/ports/opt/hal/pre-install
===================================================================
--- crux-2.2/ports/opt/hal/pre-install (rev 0)
+++ crux-2.2/ports/opt/hal/pre-install 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# check for haldaemon group or add one
+getent group haldaemon || /usr/sbin/groupadd -g 82 haldaemon
+
+# check for haldaemon user or add one
+getent passwd haldaemon || /usr/sbin/useradd -g haldaemon -u 82 -d /var/empty -s /bin/false -c "HAL Daemon User" haldaemon
+
+# lock the account
+/usr/bin/passwd -l haldaemon
Property changes on: crux-2.2/ports/opt/hal/pre-install
___________________________________________________________________
Name: svn:executable
+ *
Added: crux-2.2/ports/opt/hal/rc.hald
===================================================================
--- crux-2.2/ports/opt/hal/rc.hald (rev 0)
+++ crux-2.2/ports/opt/hal/rc.hald 2006-09-03 18:44:39 UTC (rev 1809)
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# /etc/rc.d/hald: start/stop HAL daemon
+#
+
+case $1 in
+ start)
+ /usr/sbin/hald --daemon=yes --use-syslog
+ ;;
+ stop)
+ killall -q /usr/sbin/hald
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 [start|stop|restart]"
+ ;;
+esac
+
+# End of file
1
0
Author: jaeger
Date: 2006-09-03 20:42:28 +0200 (Sun, 03 Sep 2006)
New Revision: 1808
Added:
crux-2.2/ports/opt/libdaemon/
crux-2.2/ports/opt/libdaemon/.footprint
crux-2.2/ports/opt/libdaemon/.md5sum
crux-2.2/ports/opt/libdaemon/Pkgfile
Log:
libdaemon: initial import, version 0.10
Added: crux-2.2/ports/opt/libdaemon/.footprint
===================================================================
--- crux-2.2/ports/opt/libdaemon/.footprint (rev 0)
+++ crux-2.2/ports/opt/libdaemon/.footprint 2006-09-03 18:42:28 UTC (rev 1808)
@@ -0,0 +1,18 @@
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/include/
+drwxr-xr-x root/root usr/include/libdaemon/
+-rw-r--r-- root/root usr/include/libdaemon/daemon.h
+-rw-r--r-- root/root usr/include/libdaemon/dexec.h
+-rw-r--r-- root/root usr/include/libdaemon/dfork.h
+-rw-r--r-- root/root usr/include/libdaemon/dlog.h
+-rw-r--r-- root/root usr/include/libdaemon/dnonblock.h
+-rw-r--r-- root/root usr/include/libdaemon/dpid.h
+-rw-r--r-- root/root usr/include/libdaemon/dsignal.h
+drwxr-xr-x root/root usr/lib/
+-rw-r--r-- root/root usr/lib/libdaemon.a
+-rwxr-xr-x root/root usr/lib/libdaemon.la
+lrwxrwxrwx root/root usr/lib/libdaemon.so -> libdaemon.so.0.2.4
+lrwxrwxrwx root/root usr/lib/libdaemon.so.0 -> libdaemon.so.0.2.4
+-rwxr-xr-x root/root usr/lib/libdaemon.so.0.2.4
+drwxr-xr-x root/root usr/lib/pkgconfig/
+-rw-r--r-- root/root usr/lib/pkgconfig/libdaemon.pc
Added: crux-2.2/ports/opt/libdaemon/.md5sum
===================================================================
--- crux-2.2/ports/opt/libdaemon/.md5sum (rev 0)
+++ crux-2.2/ports/opt/libdaemon/.md5sum 2006-09-03 18:42:28 UTC (rev 1808)
@@ -0,0 +1 @@
+6812a5e4063b5016f25e9a0cebbd3dd9 libdaemon-0.10.tar.gz
Added: crux-2.2/ports/opt/libdaemon/Pkgfile
===================================================================
--- crux-2.2/ports/opt/libdaemon/Pkgfile (rev 0)
+++ crux-2.2/ports/opt/libdaemon/Pkgfile 2006-09-03 18:42:28 UTC (rev 1808)
@@ -0,0 +1,16 @@
+# Description: A lightweight C library that eases the writing of UNIX daemons
+# URL: http://0pointer.de/lennart/projects/libdaemon/
+# Maintainer: Matt Housh, jaeger at crux dot nu
+
+name=libdaemon
+version=0.10
+release=1
+source=(http://0pointer.de/lennart/projects/$name/$name-$version.tar.gz)
+
+build() {
+ cd $name-$version
+ ./configure --prefix=/usr \
+ --disable-lynx
+ make
+ make DESTDIR=$PKG install
+}
1
0
Author: jaeger
Date: 2006-09-03 20:40:18 +0200 (Sun, 03 Sep 2006)
New Revision: 1807
Modified:
crux-2.2/ports/opt/libglade/.md5sum
crux-2.2/ports/opt/libglade/Pkgfile
Log:
libglade: updated to version 2.6.0
Modified: crux-2.2/ports/opt/libglade/.md5sum
===================================================================
--- crux-2.2/ports/opt/libglade/.md5sum 2006-09-03 16:12:55 UTC (rev 1806)
+++ crux-2.2/ports/opt/libglade/.md5sum 2006-09-03 18:40:18 UTC (rev 1807)
@@ -1 +1 @@
-e4734a59f1f2308d7714dc0ebf8163f1 libglade-2.5.1.tar.bz2
+81d7b2b64871ce23a5fae1e5da0b1f6e libglade-2.6.0.tar.bz2
Modified: crux-2.2/ports/opt/libglade/Pkgfile
===================================================================
--- crux-2.2/ports/opt/libglade/Pkgfile 2006-09-03 16:12:55 UTC (rev 1806)
+++ crux-2.2/ports/opt/libglade/Pkgfile 2006-09-03 18:40:18 UTC (rev 1807)
@@ -1,13 +1,13 @@
# Description: library to load glade interface files in a program at runtime
# URL: http://glade.gnome.org/
# Maintainer: Matt Housh, jaeger at morpheus dot net
-# Depends on: glib, atk, gtk, libxml2, python
+# Depends on: glib, atk, gtk, libxml2, python, pkg-config
# Group: gnome
name=libglade
-version=2.5.1
+version=2.6.0
release=1
-source=(http://ftp.gnome.org/pub/gnome/platform/2.12/2.12.0/sources/$name-$version.tar.bz2)
+source=(http://ftp.gnome.org/pub/gnome/platform/2.14/2.14.3/sources/$name-$version.tar.bz2)
build() {
install -d -m 0755 $PKG/etc/xml/dtd/$name/2.0
1
0
Author: jw
Date: 2006-09-03 18:12:55 +0200 (Sun, 03 Sep 2006)
New Revision: 1806
Modified:
tools/prt-get/trunk/ChangeLog
tools/prt-get/trunk/src/package.cpp
tools/prt-get/trunk/src/package.h
tools/prt-get/trunk/src/prtget.cpp
tools/prt-get/trunk/src/prtget.h
Log:
prt-get: warn about unclear version decisions when using "prefer higher"
Modified: tools/prt-get/trunk/ChangeLog
===================================================================
--- tools/prt-get/trunk/ChangeLog 2006-09-03 13:21:09 UTC (rev 1805)
+++ tools/prt-get/trunk/ChangeLog 2006-09-03 16:12:55 UTC (rev 1806)
@@ -1,3 +1,8 @@
+* 0.5.13 00.09.2006 Johannes Winkelmann
+- Show undecided versions in diff and sysup when using "prefer higher"
+- fix display bug in "dependent"
+- fix bug in version comparator
+
* 0.5.12 00.04.2006 Johannes Winkelmann
- Add 'depinst' in 'help' (thanks Simone)
- Fix compilation on OpenBSD
Modified: tools/prt-get/trunk/src/package.cpp
===================================================================
--- tools/prt-get/trunk/src/package.cpp 2006-09-03 13:21:09 UTC (rev 1805)
+++ tools/prt-get/trunk/src/package.cpp 2006-09-03 16:12:55 UTC (rev 1806)
@@ -130,6 +130,13 @@
return m_data->hasReadme;
}
+/*! \return a typically formatted version-release string */
+string Package::versionReleaseString() const
+{
+ load();
+ return m_data->versionReleaseString;
+}
+
const bool Package::hasPreInstall() const
{
return m_data->hasPreInstall;
@@ -162,10 +169,10 @@
const int length = BUFSIZ;
char input[length];
string line;
-
+
time_t timeNow;
time(&timeNow);
-
+
struct utsname unameBuf;
if (uname(&unameBuf) != 0) {
unameBuf.release[0] = '\0';
@@ -235,6 +242,7 @@
}
fclose( fp );
+ m_data->generateVersionReleaseString();
string file = m_data->path + "/" + m_data->name + "/README";
struct stat buf;
@@ -282,29 +290,36 @@
maintainer( maintainer_ )
{
+ generateVersionReleaseString();
+
hasReadme = ( stripWhiteSpace( hasReadme_ ) == "yes" );
hasPreInstall = ( stripWhiteSpace( hasPreInstall_ ) == "yes" );
hasPostInstall = ( stripWhiteSpace( hasPostInstall_ ) == "yes" );
}
+void PackageData::generateVersionReleaseString()
+{
+ versionReleaseString = version + "-" + release;
+}
-void Package::expandShellCommands(std::string& input,
+
+void Package::expandShellCommands(std::string& input,
const time_t& timeNow,
const struct utsname unameBuf)
{
// TODO: consider dropping either of the tagsets, depending on feedback
-
+
static const int TAG_COUNT = 2;
string startTag[TAG_COUNT] = { "`", "$(" };
string endTag[TAG_COUNT] = { "`", ")" };
-
+
for (int i = 0; i < TAG_COUNT; ++i) {
string::size_type pos;
while ((pos = input.find(startTag[i])) != string::npos) {
if (unameBuf.release) {
- input = replaceAll(input,
- startTag[i] + "uname -r" + endTag[i],
+ input = replaceAll(input,
+ startTag[i] + "uname -r" + endTag[i],
unameBuf.release);
}
@@ -314,9 +329,9 @@
string::size_type startpos, endpos;
endpos = input.find(endTag[i], pos+1);
startpos = input.find('+', pos+1);
-
+
string format = input.substr(startpos+1, endpos-startpos-1);
-
+
// support date '+...' and date "+..."
int len = format.length();
if (format[len-1] == '\'' || format[len-1] == '"') {
@@ -325,7 +340,7 @@
char timeBuf[32];
strftime(timeBuf, 32, format.c_str(), localtime(&timeNow));
- input = input.substr(0, pos) + timeBuf +
+ input = input.substr(0, pos) + timeBuf +
input.substr(endpos+1);
}
}
Modified: tools/prt-get/trunk/src/package.h
===================================================================
--- tools/prt-get/trunk/src/package.h 2006-09-03 13:21:09 UTC (rev 1805)
+++ tools/prt-get/trunk/src/package.h 2006-09-03 16:12:55 UTC (rev 1806)
@@ -55,14 +55,16 @@
const bool hasReadme() const;
const bool hasPreInstall() const;
const bool hasPostInstall() const;
+
+ std::string versionReleaseString() const;
void setDependencies( const std::string& dependencies );
private:
void load() const;
-
- static void expandShellCommands(std::string& input,
+
+ static void expandShellCommands(std::string& input,
const time_t& timeNow,
const struct utsname unameBuf);
@@ -96,9 +98,13 @@
std::string packager;
std::string maintainer;
+ std::string versionReleaseString;
+
bool hasReadme;
bool hasPreInstall;
bool hasPostInstall;
+
+ void generateVersionReleaseString();
};
#endif /* _PACKAGE_H_ */
Modified: tools/prt-get/trunk/src/prtget.cpp
===================================================================
--- tools/prt-get/trunk/src/prtget.cpp 2006-09-03 13:21:09 UTC (rev 1805)
+++ tools/prt-get/trunk/src/prtget.cpp 2006-09-03 16:12:55 UTC (rev 1806)
@@ -40,6 +40,12 @@
using namespace StringHelper;
+using VersionComparator::COMP_RESULT;
+using VersionComparator::GREATER;
+using VersionComparator::LESS;
+using VersionComparator::EQUAL;
+using VersionComparator::UNDEFINED;
+
const string PrtGet::CONF_FILE = SYSCONFDIR"/prt-get.conf";
const string PrtGet::DEFAULT_CACHE_FILE = LOCALSTATEDIR"/lib/pkg/prt-get.cache";
@@ -148,7 +154,7 @@
cout << " --all list all dependent packages, not "
<< "only installed" << endl;
cout << " --recursive print recursive listing" << endl;
- cout << " --tree print recursive tree listing"
+ cout << " --tree print recursive tree listing"
<< endl;
cout << "\nSEARCHING" << endl;
@@ -792,14 +798,17 @@
const map<string, string>& installed = m_pkgDB->installedPackages();
map<string, string>::const_iterator it = installed.begin();
const Package* p = 0;
+ COMP_RESULT result;
for ( ; it != installed.end(); ++it ) {
if ( !m_locker.isLocked( it->first ) ) {
p = m_repo->getPackage( it->first );
if ( p ) {
- if (greaterThan(p->version() + "-" + p->release(),
- it->second)) {
+ result = compareVersions(p->versionReleaseString(),
+ it->second);
+ if (result == GREATER) {
cout << it->first.c_str() << " ";
}
+ // we don't care about undefined diffs here
}
}
}
@@ -807,6 +816,28 @@
}
+void PrtGet::printFormattedDiffLine(const string& name,
+ const string& version1,
+ const string& version2,
+ bool isLocked)
+{
+ cout.setf( ios::left, ios::adjustfield );
+ cout.width( 20 );
+ cout.fill( ' ' );
+ cout << name;
+
+ cout.width( 20 );
+ cout.fill( ' ' );
+ cout << version1;
+
+ string locked = "";
+ if ( isLocked ) {
+ locked = "locked";
+ }
+ cout.width( 20 );
+ cout.fill( ' ' );
+ cout << version2 << locked << endl;
+}
/*!
print an overview of port which are installed in a different version
than they are in the repository
@@ -843,6 +874,7 @@
map<string, string>::const_iterator it = installed.begin();
const Package* p = 0;
int count = 0;
+ COMP_RESULT result;
for ( ; it != installed.end(); ++it ) {
p = m_repo->getPackage( it->first );
@@ -851,8 +883,9 @@
continue;
}
- if ( greaterThan( p->version() + "-" + p->release(),
- it->second ) ) {
+ result = compareVersions( p->versionReleaseString(),
+ it->second );
+ if (result == GREATER ) {
if ( !m_locker.isLocked( it->first ) ||
m_parser->otherArgs().size() > 0 ||
m_parser->all() ) {
@@ -862,39 +895,46 @@
if ( count == 1 ) {
cout << "Differences between installed packages "
<< "and ports tree:\n" << endl;
- cout.setf( ios::left, ios::adjustfield );
- cout.width( 20 );
- cout.fill( ' ' );
- cout << "Ports";
- cout.width( 20 );
- cout.fill( ' ' );
- cout << "Installed";
- cout.width( 20 );
- cout.fill( ' ' );
- cout << "Available in the ports tree" << endl << endl;
+ printFormattedDiffLine("Port",
+ "Installed",
+ "Available in the ports tree",
+ false);
+ cout << endl;
}
- cout.setf( ios::left, ios::adjustfield );
- cout.width( 20 );
- cout.fill( ' ' );
- cout << it->first.c_str();
- cout.width( 20 );
- cout.fill( ' ' );
- cout << it->second.c_str();
-
- string locked = "";
- if ( m_locker.isLocked( it->first ) ) {
- locked = "locked";
- }
- cout.width( 20 );
- cout.fill( ' ' );
- cout << (p->version()+"-"+p->release()).c_str()
- << locked << endl;
+ printFormattedDiffLine(it->first,
+ it->second,
+ p->versionReleaseString(),
+ m_locker.isLocked( it->first ));
}
+ } else if (result == UNDEFINED) {
+ m_undefinedVersionComp.push_back(make_pair(p, it->second));
}
}
}
+ if (m_undefinedVersionComp.size()) {
+ cout << "\n\n" << "Undecidable version differences (use --strict-diff)"
+ << endl << endl;
+ printFormattedDiffLine("Port",
+ "Installed",
+ "Available in the ports tree",
+ false);
+ cout << endl;
+
+ list< pair< const Package*, string > >::iterator it =
+ m_undefinedVersionComp.begin();
+ const Package* p;
+ for (; it != m_undefinedVersionComp.end(); ++it) {
+ p = it->first;
+ printFormattedDiffLine(p->name(),
+ p->versionReleaseString(),
+ it->second,
+ false);
+ }
+ }
+
+
if ( count == 0 ) {
cout << "No differences found" << endl;
}
@@ -920,8 +960,8 @@
/*! helper method to print the result of an InstallTransaction */
void PrtGet::evaluateResult( InstallTransaction& transaction,
- bool update,
- bool interrupted )
+ bool update,
+ bool interrupted )
{
int errors = 0;
@@ -942,7 +982,6 @@
}
}
-
const list< pair<string, string> >& missing = transaction.missing();
if ( missing.size() ) {
++errors;
@@ -1017,6 +1056,7 @@
cout << endl;
}
+
// readme's
if ( atLeastOnePackageHasReadme ) {
if ( m_config->readmeMode() == Configuration::VERBOSE_README ) {
@@ -1031,10 +1071,26 @@
}
}
}
-
- cout << endl;
}
+ if ( m_undefinedVersionComp.size() ) {
+ cout << endl
+ << "-- Packages with undecidable version "
+ << "difference (use --strict-diff)"
+ << endl;
+ list< pair<const Package*, string> >::const_iterator uit =
+ m_undefinedVersionComp.begin();
+ const Package * p;
+ for ( ; uit != m_undefinedVersionComp.end(); ++uit ) {
+ p = uit->first;
+ cout << p->name() << " ("
+ << p->versionReleaseString()
+ << " vs "
+ << uit->second << ")" << endl;
+ }
+ }
+ cout << endl;
+
if ( errors == 0 && !interrupted ) {
cout << "prt-get: " << command[1] << " successfully" << endl;
} else {
@@ -1093,23 +1149,23 @@
/*!
\return true if v1 is greater than v2
*/
-bool PrtGet::greaterThan( const string& v1, const string& v2 )
+COMP_RESULT PrtGet::compareVersions( const string& v1, const string& v2 )
{
- using namespace VersionComparator;
-
if (v1 == v2) {
- return false;
+ return EQUAL;
}
if (m_parser->preferHigher() ||
(m_config->preferHigher() && !m_parser->strictDiff())) {
- COMP_RESULT result = compareVersions(v1, v2);
- return (result == GREATER);
+ COMP_RESULT result = VersionComparator::compareVersions(v1, v2);
+ return result;
}
- return v1 != v2;
+ if (v1 != v2)
+ return GREATER;
+ return LESS;
}
int PrtGet::returnValue() const
@@ -1172,7 +1228,7 @@
if ( m_pkgDB->isInstalled( p->name() ) ) {
string ip = p->name() + "-" +
m_pkgDB->getPackageVersion( p->name() );
- if ( ip == p->name() + "-" + p->version() + "-" + p->release() ) {
+ if ( ip == p->name() + "-" + p->versionReleaseString() ) {
isInst = "yes";
} else {
isInst = "diff";
@@ -1255,15 +1311,15 @@
initRepo();
string arg = *(m_parser->otherArgs().begin());
-
- if (m_parser) {
+
+ if (m_parser->printTree()) {
cout << arg << endl;
printDependent(arg, 2);
} else {
printDependent(arg, 0);
- }
+ }
}
-
+
void PrtGet::printDependent(const string& dep, int level)
{
map<string, Package*>::const_iterator it = m_repo->packages().begin();
@@ -1294,7 +1350,7 @@
// a -> b -> d
// \ ^
// > c /
- //
+ //
// trying to rebuild 'd' before 'c' might possibly fail
string indent = "";
if (m_parser->printTree()) {
@@ -1305,26 +1361,26 @@
set<const Package*>::iterator it2 = dependent.begin();
for ( ; it2 != dependent.end(); ++it2 ) {
const Package* p = *it2;
-
+
if (m_parser->recursive() && !m_parser->printTree()) {
if (shownMap[p->name()]) {
continue;
}
shownMap[p->name()] = true;
}
-
+
if ( m_parser->all() || m_pkgDB->isInstalled( p->name() ) ) {
-
+
cout << indent << p->name();
if ( m_parser->verbose() > 0 ) {
- cout << " " << p->version() << "-" << p->release();
+ cout << " " << p->versionReleaseString();
}
if ( m_parser->verbose() > 1 ) {
cout << ": " << p->description();
}
cout << endl;
-
+
if (m_parser->recursive()) {
printDependent( p->name(), level+2 );
}
@@ -1338,7 +1394,7 @@
map<string, string> installed = m_pkgDB->installedPackages();
map<string, bool> required;
map<string, string>::iterator it = installed.begin();
-
+
for (; it != installed.end(); ++it) {
list<string> tokens;
const Package* p = m_repo->getPackage(it->first);
@@ -1349,12 +1405,12 @@
required[*lit] = true;
}
}
- }
-
+ }
+
// - we could store the package pointer in another map to avoid
// another getPackage lockup, but it seems better to optimized for
// memory since it's only used when called with -vv
-
+
it = installed.begin();
for (; it != installed.end(); ++it) {
if (!required[it->first]) {
@@ -1393,13 +1449,17 @@
const map<string, string>& installed = m_pkgDB->installedPackages();
map<string, string>::const_iterator it = installed.begin();
const Package* p = 0;
+ COMP_RESULT result;
for ( ; it != installed.end(); ++it ) {
if ( !m_locker.isLocked( it->first ) ) {
p = m_repo->getPackage( it->first );
if ( p ) {
- if ( greaterThan( p->version() + "-" + p->release(),
- it->second ) ) {
+ result = compareVersions( p->versionReleaseString(),
+ it->second );
+ if (result == GREATER ) {
packagesToUpdate.push_back( it->first );
+ } else if (result == UNDEFINED ) {
+ m_undefinedVersionComp.push_back(make_pair(p, it->second));
}
}
}
@@ -1906,7 +1966,7 @@
}
const Package* p = m_repo->getPackage( *it );
if (p) {
- if (p->dependencies().length() > 0) {
+ if (p->dependencies().length() > 0) {
map<string, bool>::iterator shownIt = shownMap.find(*it);
if (shownIt != shownMap.end()) {
cout << " -->" << endl;;
Modified: tools/prt-get/trunk/src/prtget.h
===================================================================
--- tools/prt-get/trunk/src/prtget.h 2006-09-03 13:21:09 UTC (rev 1805)
+++ tools/prt-get/trunk/src/prtget.h 2006-09-03 16:12:55 UTC (rev 1806)
@@ -25,6 +25,7 @@
#include "signaldispatcher.h"
#include "locker.h"
#include "installtransaction.h"
+#include "versioncomparator.h"
/*!
\class PrtGet
@@ -44,7 +45,7 @@
PG_INSTALL_ERROR,
PG_PARTIAL_INSTALL_ERROR
};
-
+
PrtGet( const ArgParser* parser );
~PrtGet();
@@ -97,7 +98,7 @@
protected:
void printDepsLevel(int indent, const Package* package);
-
+
void printDependent(const std::string& dep, int level);
void executeTransaction( InstallTransaction& transaction,
@@ -116,7 +117,13 @@
list<string>& target );
void warnPackageNotFound(InstallTransaction& transaction);
+
+ static void printFormattedDiffLine(const string& name,
+ const string& version1,
+ const string& version2,
+ bool locked);
+
Repository* m_repo;
PkgDB* m_pkgDB;
Configuration* m_config;
@@ -144,8 +151,11 @@
void assertExactArgCount(int count);
void argCountFailure(int count, const string& specifier);
- bool greaterThan( const string& v1, const string& v2 );
+ VersionComparator::COMP_RESULT
+ compareVersions( const string& v1, const string& v2 );
static bool printFile(const string& file);
+
+ std::list< std::pair<const Package*, std::string> > m_undefinedVersionComp;
};
#endif /* _PRTGET_H_ */
1
0