Archive for September 28, 2007

Symfony + Propel AUTO_INCREMENT offset

There’s no way to natively setup the starting offset for AUTO_INCREMENT columns in propel. Ideally, you would just set autoIncrement=”100000″ for an offset of 100000, but unfortunately they expect a boolean argument. To get around this, edit data/sql/sqldb.map and add an entry contrib.sql=propel and edit a file in data/sql/contrib.sql.

Add the following to the file:

ALTER TABLE example_table_1 AUTO_INCREMENT = 100000; ALTER TABLE example_table_2 AUTO_INCREMENT = 100000;

Then rerun 
symfony propel-insert-sql
. WARNING: this will ofcourse dump ALL of your data.

Debian NFS HOWTO

apt-get install nfs-common nfs-kernel-server /etc/init.d/nfs-kernel-server restart

configure mout points in /etc/exports and when done, run

exportfs -a

If you are using ACLs, make sure you add the acl option to the exported filesystem options in exports.

Debian trying to overwrite add-shell with passwd

Preparing to replace debianutils 2.8.4 (using …/debianutils_2.23.1_i386.deb) … Unpacking replacement debianutils … dpkg: error processing /var/cache/apt/archives/debianutils_2.23.1_i386.deb (--unpack):  trying to overwrite `/usr/sbin/add-shell’, which is also in package passwd Errors were encountered while processing:  /var/cache/apt/archives/debianutils_2.23.1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

Simply run

dpkg -r --force all passwd apt-get -f install

Debian apt-get update fails with NO_PUBKEY A70DAF536070D3A1

Reading package lists… Done W: GPG error: http://ftp.debian.org etch Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A70DAF536070D3A1 NO_PUBKEY B5D0C804ADB11277 W: GPG error: http://security.debian.org etch/updates Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A70DAF536070D3A1 W: You may want to run apt-get update to correct these problems

Just run…

gpg --keyserver wwwkeys.eu.pgp.net --recv-keys A70DAF536070D3A1 gpg --keyserver wwwkeys.eu.pgp.net --recv-keys B5D0C804ADB11277 gpg --armor --export A70DAF536070D3A1 | apt-key add - gpg --armor --export B5D0C804ADB11277 | apt-key add -