cvs commit: ports/security/portaudit-db/database portaudit.txt portaudit.xlist portaudit.xml

Tom Rhodes trhodes at FreeBSD.org
Tue Aug 17 11:34:13 PDT 2004


On Tue, 17 Aug 2004 13:27:19 -0500
"Jacques A. Vidrine" <nectar at freebsd.org> wrote:

> On Tue, Aug 17, 2004 at 08:26:56PM +0200, Oliver Eikemeier wrote:
> > epoch 0? 1970-01-01? Or the date vuxml was announced? This would be 
> > easier to find than XXX, especially in a rendered version. Or just leave 
> > the entry empty.
> > 
> > Any constant will do, it could be easily rendered to `unknown'. I find a 
> > non-constant value (date of entry) a bad choice it is more difficult to 
> > test against (and could be correct).
> 
> Yes, you are right, we just need a constant string like 'unknown' or
> 'unspecified'.
> 
> > >By way of example, I've been using FreeBSD 4.7-RELEASE-p1 == 4.7_1.  I'm
> > >not entirely satisfied and I am open to suggestions.  This part has been
> > >ill-specified. :-(
> > 
> > Ehm, __FreeBSD_version? What's bad with that? Documented in the Porters 
> > Handbook, and to find out.
> 
> __FreeBSD_version is for developers, not users.  Users need to see
> actual release numbers.
> 
> Cheers,

Do we bump __FreeBSD_version for security patches though?  This
always drove me nuts.  As I said, a simple ident(1) and then
a quick compare would work.  I do something similar in an
upgrade script:

# Define two functions here: system_mysql and port_mysql and assign
# them a task.
system_mysql()
{
system=`ls /var/db/pkg | grep 'mysql-server' | sed 's/mysql-server-//'`
}

port_mysql()
{
port=`cat /usr/ports/databases/mysql323-server/Makefile | grep 'PORTVERSION=' |\
        sed 's/PORTVERSION=//' | awk '{ print $1 }'`
}

#if [ "$port" == "$system" ];
        #then /usr/bin/printf "MySQL Server is up to date.\n" >> $log;

#elif [ "$port" != "$system" ];
        #then /usr/bin/mysqldump  --opt pittgoth > /root/pittgoth.sql;
                #if [ $? -eq 0 ] && [ -s /root/pittgoth.sql ];
                        #then /bin/chmod 777 /var/db/mysql && /bin/rm -rf /var/db/mysql;

        #               else /usr/bin/printf \
                #       "An error occured while backing up the database.\n" >> $log &&
                        #/usr/bin/printf "This command has failed and will exit.\n" \
                        #>> $log && exit
                #fi

#else   /usr/bin/printf "An unknown error occured during the database upgrade.\n" >> \
        #$log;
#fi

Retarded, perhaps, but it can work.  :)

-- 
Tom Rhodes


More information about the freebsd-vuxml mailing list