pg.ddx.io  pgaudit/pgaudit GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgaudit/pgaudit] PR #326: Locate pgaudit.control relative to the Makefile.
9+ messages / 2 participants
[nested] [flat]

* [pgaudit/pgaudit] PR #326: Locate pgaudit.control relative to the Makefile.
@ 2026-07-15 16:09  "rjd15372 (@rjd15372)" <noreply+rjd15372@github.com>
  0 siblings, 0 replies; 9+ messages in thread

From: rjd15372 (@rjd15372) @ 2026-07-15 16:09 UTC (permalink / raw)
  To: pgaudit/pgaudit <noreply+pgaudit-pgaudit@github.com>

`PGAUDIT_VERSION` is determined by grepping `pgaudit.control` with a path relative to the current working directory. That works for in-tree builds, but in out-of-tree PGXS builds (`make -f path/to/Makefile` with `VPATH`, as used e.g. by Debian's `pg_buildext`) the control file is not in the build directory: the grep fails, `PGAUDIT_VERSION` expands to an empty string, and the build breaks later when installing the version suffixed SQL file:

```
    grep: pgaudit.control: No such file or directory
    ...
    install: cannot stat '.../pgaudit--.sql': No such file or directory
```

Resolve the control file relative to the Makefile location instead, using `$(dir $(firstword $(MAKEFILE_LIST)))`, which yields the source directory in both in-tree and `VPATH` builds.

inline patch 1: Makefile (+1/-1 lines) download inline-1.patchdiff --git a/Makefile b/Makefile index 8886980..207cf7a 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ MODULE_big = pgaudit OBJS = pgaudit.o $(WIN32RES) # The version in the control file is the source of truth -PGAUDIT_VERSION := $(shell grep default_version pgaudit.control | sed "s/.*'\(.*\)'/\1/") +PGAUDIT_VERSION := $(shell grep default_version $(dir $(firstword $(MAKEFILE_LIST)))pgaudit.control | sed "s/.*'\(.*\)'/\1/") EXTENSION = pgaudit DATA = pgaudit--$(PGAUDIT_VERSION).sql
^ permalink raw [nested|flat] 9+ messages in thread

* Re: [pgaudit/pgaudit] PR #326: Locate pgaudit.control relative to the Makefile.
@ 2026-07-20 01:54  "dwsteele (@dwsteele)" <noreply+dwsteele@github.com>
  7 siblings, 0 replies; 9+ messages in thread

From: dwsteele (@dwsteele) @ 2026-07-20 01:54 UTC (permalink / raw)
  To: pgaudit/pgaudit <noreply+pgaudit-pgaudit@github.com>

@dwsteele assigned @dwsteele.

^ permalink  raw  [nested|flat] 9+ messages in thread

* Re: [pgaudit/pgaudit] PR #326: Locate pgaudit.control relative to the Makefile.
@ 2026-07-20 01:54  "dwsteele (@dwsteele)" <noreply+dwsteele@github.com>
  7 siblings, 0 replies; 9+ messages in thread

From: dwsteele (@dwsteele) @ 2026-07-20 01:54 UTC (permalink / raw)
  To: pgaudit/pgaudit <noreply+pgaudit-pgaudit@github.com>

@dwsteele applied label "enhancement".

^ permalink  raw  [nested|flat] 9+ messages in thread

* Re: [pgaudit/pgaudit] PR #326 (approved): Locate pgaudit.control relative to the Makefile.
@ 2026-07-20 01:55  "dwsteele (@dwsteele)" <noreply+dwsteele@github.com>
  7 siblings, 0 replies; 9+ messages in thread

From: dwsteele (@dwsteele) @ 2026-07-20 01:55 UTC (permalink / raw)
  To: pgaudit/pgaudit <noreply+pgaudit-pgaudit@github.com>

Thank you for this! It definitely would have caused some issues after the release.

^ permalink  raw  [nested|flat] 9+ messages in thread

* Re: [pgaudit/pgaudit] PR #326: Locate pgaudit.control relative to the Makefile.
@ 2026-07-21 04:01  "dwsteele (@dwsteele)" <noreply+dwsteele@github.com>
  7 siblings, 0 replies; 9+ messages in thread

From: dwsteele (@dwsteele) @ 2026-07-21 04:01 UTC (permalink / raw)
  To: pgaudit/pgaudit <noreply+pgaudit-pgaudit@github.com>

@dwsteele renamed this.

^ permalink  raw  [nested|flat] 9+ messages in thread

* Re: [pgaudit/pgaudit] PR #326: Locate pgaudit.control relative to the Makefile.
@ 2026-07-21 04:08  "dwsteele (@dwsteele)" <noreply+dwsteele@github.com>
  7 siblings, 0 replies; 9+ messages in thread

From: dwsteele (@dwsteele) @ 2026-07-21 04:08 UTC (permalink / raw)
  To: pgaudit/pgaudit <noreply+pgaudit-pgaudit@github.com>

@dwsteele closed this.

^ permalink  raw  [nested|flat] 9+ messages in thread

* Re: [pgaudit/pgaudit] PR #326: Locate pgaudit.control relative to the Makefile.
@ 2026-07-21 04:08  "dwsteele (@dwsteele)" <noreply+dwsteele@github.com>
  7 siblings, 0 replies; 9+ messages in thread

From: dwsteele (@dwsteele) @ 2026-07-21 04:08 UTC (permalink / raw)
  To: pgaudit/pgaudit <noreply+pgaudit-pgaudit@github.com>

@dwsteele merged this (commit f4563a68c72b).

^ permalink  raw  [nested|flat] 9+ messages in thread

* Re: [pgaudit/pgaudit] PR #326: Locate pgaudit.control relative to the Makefile.
@ 2026-07-21 04:19  "dwsteele (@dwsteele)" <noreply+dwsteele@github.com>
  7 siblings, 0 replies; 9+ messages in thread

From: dwsteele (@dwsteele) @ 2026-07-21 04:19 UTC (permalink / raw)
  To: pgaudit/pgaudit <noreply+pgaudit-pgaudit@github.com>

Thank you! Committed and back patched.

^ permalink  raw  [nested|flat] 9+ messages in thread

* Re: [pgaudit/pgaudit] PR #326: Locate pgaudit.control relative to the Makefile.
@ 2026-07-21 09:05  "rjd15372 (@rjd15372)" <noreply+rjd15372@github.com>
  7 siblings, 0 replies; 9+ messages in thread

From: rjd15372 (@rjd15372) @ 2026-07-21 09:05 UTC (permalink / raw)
  To: pgaudit/pgaudit <noreply+pgaudit-pgaudit@github.com>

Thanks @dwsteele for the review and merge!

^ permalink  raw  [nested|flat] 9+ messages in thread


end of thread, other threads:[~2026-07-21 09:05 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-15 16:09 [pgaudit/pgaudit] PR #326: Locate pgaudit.control relative to the Makefile. "rjd15372 (@rjd15372)" <noreply+rjd15372@github.com>
2026-07-20 01:54 ` "dwsteele (@dwsteele)" <noreply+dwsteele@github.com>
2026-07-20 01:54 ` "dwsteele (@dwsteele)" <noreply+dwsteele@github.com>
2026-07-20 01:55 ` Re: [pgaudit/pgaudit] PR #326 (approved): Locate pgaudit.control relative to the Makefile. "dwsteele (@dwsteele)" <noreply+dwsteele@github.com>
2026-07-21 04:01 ` "dwsteele (@dwsteele)" <noreply+dwsteele@github.com>
2026-07-21 04:08 ` "dwsteele (@dwsteele)" <noreply+dwsteele@github.com>
2026-07-21 04:08 ` "dwsteele (@dwsteele)" <noreply+dwsteele@github.com>
2026-07-21 04:19 ` "dwsteele (@dwsteele)" <noreply+dwsteele@github.com>
2026-07-21 09:05 ` "rjd15372 (@rjd15372)" <noreply+rjd15372@github.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox