gnu: timescaledb: Adjust test preparation to PostgreSQL 13.6.
The previous method of making a union with symlinks would work with 13.4 but not with 13.6, which has an extra 'canonicalize_path' call in 'find_my_exec'. * gnu/packages/databases.scm (timescaledb)[arguments]: In 'prepare-tests', pass #:symlink argument to 'union-build'.
This commit is contained in:
		
							parent
							
								
									b422687cbd
								
							
						
					
					
						commit
						05fef7bfc6
					
				
					 1 changed files with 15 additions and 1 deletions
				
			
		| 
						 | 
					@ -1353,12 +1353,26 @@ pictures, sounds, or video.")
 | 
				
			||||||
                         (pg-union (string-append (getcwd) "/../pg-union")))
 | 
					                         (pg-union (string-append (getcwd) "/../pg-union")))
 | 
				
			||||||
                     (match inputs
 | 
					                     (match inputs
 | 
				
			||||||
                       (((names . directories) ...)
 | 
					                       (((names . directories) ...)
 | 
				
			||||||
                        (union-build pg-union (cons #$output directories))))
 | 
					                        ;; PG will only load extensions from its own $libdir,
 | 
				
			||||||
 | 
					                        ;; which it calculates based on argv[0].  As of
 | 
				
			||||||
 | 
					                        ;; PostgreSQL 13.6, it calls 'canonicalize_path' on
 | 
				
			||||||
 | 
					                        ;; argv[0] so a merge symlink is not enough to trick
 | 
				
			||||||
 | 
					                        ;; it; thus, the code below makes a full copy of PG
 | 
				
			||||||
 | 
					                        ;; and friends such that 'pg_config --libdir', for
 | 
				
			||||||
 | 
					                        ;; instance, points to PG-UNION, allowing it to load
 | 
				
			||||||
 | 
					                        ;; the timescaledb extension.
 | 
				
			||||||
 | 
					                        (union-build pg-union (cons #$output directories)
 | 
				
			||||||
 | 
					                                     #:symlink
 | 
				
			||||||
 | 
					                                     (lambda (old new)
 | 
				
			||||||
 | 
					                                       (if (file-is-directory? old)
 | 
				
			||||||
 | 
					                                           (copy-recursively old new)
 | 
				
			||||||
 | 
					                                           (copy-file old new))))))
 | 
				
			||||||
                     (setenv "PATH" (string-append pg-union "/bin:"
 | 
					                     (setenv "PATH" (string-append pg-union "/bin:"
 | 
				
			||||||
                                                   (getenv "PATH")))
 | 
					                                                   (getenv "PATH")))
 | 
				
			||||||
                     (invoke "initdb" "-D" pg-data)
 | 
					                     (invoke "initdb" "-D" pg-data)
 | 
				
			||||||
                     (copy-file "test/postgresql.conf"
 | 
					                     (copy-file "test/postgresql.conf"
 | 
				
			||||||
                                (string-append pg-data "/postgresql.conf"))
 | 
					                                (string-append pg-data "/postgresql.conf"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                     (invoke "pg_ctl" "-D" pg-data
 | 
					                     (invoke "pg_ctl" "-D" pg-data
 | 
				
			||||||
                             "-o" (string-append "-k " pg-data)
 | 
					                             "-o" (string-append "-k " pg-data)
 | 
				
			||||||
                             "-l" (string-append pg-data "/db.log")
 | 
					                             "-l" (string-append pg-data "/db.log")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue