Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#4049 closed enhancement (fixed)

postgresql-9.3.0

Reported by: ken@… Owned by: ken@…
Priority: normal Milestone:
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

Change History (9)

comment:1 by ken@…, 11 years ago

Summary: postgresql-9.3postgresql-9.3.0

comment:2 by ken@…, 11 years ago

Owner: changed from blfs-book@… to ken@…

comment:3 by ken@…, 11 years ago

Fun and games here! Not from 9.3.0, but from the one-line sed in r11169 which moved the socket to /run/postgresql instead of /tmp. That change is correct (debian's patch to use /var/run notes that it stops users spoofing postgresql). But it breaks the regression tests - they can't create a socket in /run/postgresql (either it hasn't been created yet,or else a user can't write there). Think I might have found a/some debian patches [ one for the general case, the others for contrib/ tests of pg_upgrade ].

Still got to test them, but I guess I'll put the whole thing(including hte sed) into a patch if they work.

comment:4 by bdubbs@…, 11 years ago

Run tests as root?

comment:5 by bdubbs@…, 11 years ago

This works for me:

First add postgresql user and group, then:

sudo mkdir -p /run/postgresql &&
sudo chown -Rv postgres:postgres /run/postgresql &&

sed -i -e '/DEFAULT_PGSOCKET_DIR/s@tmp@run/postgresql@' \
    src/include/pg_config_manual.h &&

./configure --prefix=/usr                    \
            --docdir=/usr/share/doc/$PROGRAM \
            --enable-thread-safety &&
make

sudo chown -R postgres:postgres . &&
sudo su postgres -c 'make check' 

Result: All 136 tests passed.

comment:6 by ken@…, 11 years ago

OK - need to add the postgres user, which is an aggravation on desktop machines where only the client is going to be used, but I can live with that. Except, it doesn't work for me (using su instead of sudo, i.e. make ; su ; chown -R ... ; su postgres -c 'make check'

ken@jtm1 /scratch/ken/postgresql-9.3.0 $su
Password: 
root@jtm1 /scratch/ken/postgresql-9.3.0 #time chown -R postgres:postgres .

real	0m0.026s
user	0m0.000s
sys	0m0.024s
root@jtm1 /scratch/ken/postgresql-9.3.0 #time su postgres -c 'make check'
make -C src all
make[1]: Entering directory `/scratch/ken/postgresql-9.3.0/src'
make -C common all
make[2]: Entering directory `/scratch/ken/postgresql-9.3.0/src/common'
make -C ../backend submake-errcodes
make[3]: Entering directory `/scratch/ken/postgresql-9.3.0/src/backend'
make[3]: stat: ../../src/include/utils/errcodes.h: Permission denied
prereqdir=`cd 'utils/' >/dev/null && pwd` && \
  cd '../../src/include/utils/' && rm -f errcodes.h && \
  ln -s "$prereqdir/errcodes.h" .
/bin/sh: line 0: cd: utils/: Not a directory
make[3]: *** [../../src/include/utils/errcodes.h] Error 1
make[3]: Leaving directory `/scratch/ken/postgresql-9.3.0/src/backend'
make[2]: *** [submake-errcodes] Error 2
make[2]: Leaving directory `/scratch/ken/postgresql-9.3.0/src/common'
make[1]: *** [all-common-recurse] Error 2
make[1]: Leaving directory `/scratch/ken/postgresql-9.3.0/src'
make: *** [all-src-recurse] Error 2

comment:7 by ken@…, 11 years ago

For anybody not following -dev, my error above was from a 3.11.0 kernel, looks as if something in the symlink processing changed.

comment:8 by ken@…, 11 years ago

Resolution: fixed
Status: newclosed

Done, (E&OE) in r11831

comment:9 by bdubbs@…, 10 years ago

Milestone: current

Milestone current deleted

Note: See TracTickets for help on using tickets.