diff --git a/bin/postgresql14.23/bearsampp.conf b/bin/postgresql14.23/bearsampp.conf new file mode 100644 index 0000000..4724b2a --- /dev/null +++ b/bin/postgresql14.23/bearsampp.conf @@ -0,0 +1,14 @@ +postgresqlVersion = "14.23" +postgresqlCtlExe = "bin/pg_ctl.exe" +postgresqlCliExe = "bin/psql.exe" +postgresqlDumpExe = "bin/pg_dump.exe" +postgresqlDumpAllExe = "bin/pg_dumpall.exe" +postgresqlConf = "data/postgresql.conf" +postgresqlUserConf = "data/pg_hba.conf" +postgresqlAltConf = "postgresql.conf.ber" +postgresqlAltUserConf = "pg_hba.conf.ber" +postgresqlPort = "5432" +postgresqlRootUser = "postgres" +postgresqlRootPwd = "" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/postgresql14.23/init.bat b/bin/postgresql14.23/init.bat new file mode 100644 index 0000000..f0acb2d --- /dev/null +++ b/bin/postgresql14.23/init.bat @@ -0,0 +1,5 @@ +@ECHO OFF + +%~dp0bin\initdb.exe -U postgres -A trust -E utf8 -D "%~dp0data" > "~BEARSAMPP_WIN_PATH~\logs\postgresql-install.log" 2>&1 +copy /y "%~dp0postgresql.conf.ber" "%~dp0data\postgresql.conf" +copy /y "%~dp0pg_hba.conf.ber" "%~dp0data\pg_hba.conf" diff --git a/bin/postgresql14.23/pg_hba.conf.ber b/bin/postgresql14.23/pg_hba.conf.ber new file mode 100644 index 0000000..29b8f8b --- /dev/null +++ b/bin/postgresql14.23/pg_hba.conf.ber @@ -0,0 +1,3 @@ +# TYPE DATABASE USER ADDRESS METHOD + host all all 127.0.0.1/32 trust + host all all ::1/128 trust diff --git a/bin/postgresql14.23/postgresql.conf.ber b/bin/postgresql14.23/postgresql.conf.ber new file mode 100644 index 0000000..d141049 --- /dev/null +++ b/bin/postgresql14.23/postgresql.conf.ber @@ -0,0 +1,35 @@ +#------------------------------------------------------------------------------ +# FILE LOCATIONS +#------------------------------------------------------------------------------ +data_directory = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql14.23/data' +hba_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql14.23/data/pg_hba.conf' +ident_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql14.23/data/pg_ident.conf' + +#------------------------------------------------------------------------------ +# CONNECTIONS AND AUTHENTICATION +#------------------------------------------------------------------------------ +listen_addresses = '*' +port = 5432 +max_connections = 100 + +#------------------------------------------------------------------------------ +# RESOURCE USAGE (except WAL) +#------------------------------------------------------------------------------ +shared_buffers = 32MB + +#------------------------------------------------------------------------------ +# ERROR REPORTING AND LOGGING +#------------------------------------------------------------------------------ +log_destination = 'stderr' +logging_collector = on +log_directory = '~BEARSAMPP_LIN_PATH~/logs' +log_filename = 'postgresql.log' +log_file_mode = 0777 +log_truncate_on_rotation = off +log_rotation_age = 0 +log_rotation_size = 0 + +client_min_messages = notice +log_min_messages = warning +log_min_error_statement = error +log_min_duration_statement = -1 diff --git a/bin/postgresql15.18/bearsampp.conf b/bin/postgresql15.18/bearsampp.conf new file mode 100644 index 0000000..b9ce381 --- /dev/null +++ b/bin/postgresql15.18/bearsampp.conf @@ -0,0 +1,14 @@ +postgresqlVersion = "15.18" +postgresqlCtlExe = "bin/pg_ctl.exe" +postgresqlCliExe = "bin/psql.exe" +postgresqlDumpExe = "bin/pg_dump.exe" +postgresqlDumpAllExe = "bin/pg_dumpall.exe" +postgresqlConf = "data/postgresql.conf" +postgresqlUserConf = "data/pg_hba.conf" +postgresqlAltConf = "postgresql.conf.ber" +postgresqlAltUserConf = "pg_hba.conf.ber" +postgresqlPort = "5432" +postgresqlRootUser = "postgres" +postgresqlRootPwd = "" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/postgresql15.18/init.bat b/bin/postgresql15.18/init.bat new file mode 100644 index 0000000..f0acb2d --- /dev/null +++ b/bin/postgresql15.18/init.bat @@ -0,0 +1,5 @@ +@ECHO OFF + +%~dp0bin\initdb.exe -U postgres -A trust -E utf8 -D "%~dp0data" > "~BEARSAMPP_WIN_PATH~\logs\postgresql-install.log" 2>&1 +copy /y "%~dp0postgresql.conf.ber" "%~dp0data\postgresql.conf" +copy /y "%~dp0pg_hba.conf.ber" "%~dp0data\pg_hba.conf" diff --git a/bin/postgresql15.18/pg_hba.conf.ber b/bin/postgresql15.18/pg_hba.conf.ber new file mode 100644 index 0000000..29b8f8b --- /dev/null +++ b/bin/postgresql15.18/pg_hba.conf.ber @@ -0,0 +1,3 @@ +# TYPE DATABASE USER ADDRESS METHOD + host all all 127.0.0.1/32 trust + host all all ::1/128 trust diff --git a/bin/postgresql15.18/postgresql.conf.ber b/bin/postgresql15.18/postgresql.conf.ber new file mode 100644 index 0000000..a7c31c0 --- /dev/null +++ b/bin/postgresql15.18/postgresql.conf.ber @@ -0,0 +1,35 @@ +#------------------------------------------------------------------------------ +# FILE LOCATIONS +#------------------------------------------------------------------------------ +data_directory = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql15.18/data' +hba_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql15.18/data/pg_hba.conf' +ident_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql15.18/data/pg_ident.conf' + +#------------------------------------------------------------------------------ +# CONNECTIONS AND AUTHENTICATION +#------------------------------------------------------------------------------ +listen_addresses = '*' +port = 5432 +max_connections = 100 + +#------------------------------------------------------------------------------ +# RESOURCE USAGE (except WAL) +#------------------------------------------------------------------------------ +shared_buffers = 32MB + +#------------------------------------------------------------------------------ +# ERROR REPORTING AND LOGGING +#------------------------------------------------------------------------------ +log_destination = 'stderr' +logging_collector = on +log_directory = '~BEARSAMPP_LIN_PATH~/logs' +log_filename = 'postgresql.log' +log_file_mode = 0777 +log_truncate_on_rotation = off +log_rotation_age = 0 +log_rotation_size = 0 + +client_min_messages = notice +log_min_messages = warning +log_min_error_statement = error +log_min_duration_statement = -1 diff --git a/bin/postgresql16.14/bearsampp.conf b/bin/postgresql16.14/bearsampp.conf new file mode 100644 index 0000000..5bc07ea --- /dev/null +++ b/bin/postgresql16.14/bearsampp.conf @@ -0,0 +1,14 @@ +postgresqlVersion = "16.14" +postgresqlCtlExe = "bin/pg_ctl.exe" +postgresqlCliExe = "bin/psql.exe" +postgresqlDumpExe = "bin/pg_dump.exe" +postgresqlDumpAllExe = "bin/pg_dumpall.exe" +postgresqlConf = "data/postgresql.conf" +postgresqlUserConf = "data/pg_hba.conf" +postgresqlAltConf = "postgresql.conf.ber" +postgresqlAltUserConf = "pg_hba.conf.ber" +postgresqlPort = "5432" +postgresqlRootUser = "postgres" +postgresqlRootPwd = "" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/postgresql16.14/init.bat b/bin/postgresql16.14/init.bat new file mode 100644 index 0000000..f0acb2d --- /dev/null +++ b/bin/postgresql16.14/init.bat @@ -0,0 +1,5 @@ +@ECHO OFF + +%~dp0bin\initdb.exe -U postgres -A trust -E utf8 -D "%~dp0data" > "~BEARSAMPP_WIN_PATH~\logs\postgresql-install.log" 2>&1 +copy /y "%~dp0postgresql.conf.ber" "%~dp0data\postgresql.conf" +copy /y "%~dp0pg_hba.conf.ber" "%~dp0data\pg_hba.conf" diff --git a/bin/postgresql16.14/pg_hba.conf.ber b/bin/postgresql16.14/pg_hba.conf.ber new file mode 100644 index 0000000..29b8f8b --- /dev/null +++ b/bin/postgresql16.14/pg_hba.conf.ber @@ -0,0 +1,3 @@ +# TYPE DATABASE USER ADDRESS METHOD + host all all 127.0.0.1/32 trust + host all all ::1/128 trust diff --git a/bin/postgresql16.14/postgresql.conf.ber b/bin/postgresql16.14/postgresql.conf.ber new file mode 100644 index 0000000..653546a --- /dev/null +++ b/bin/postgresql16.14/postgresql.conf.ber @@ -0,0 +1,35 @@ +#------------------------------------------------------------------------------ +# FILE LOCATIONS +#------------------------------------------------------------------------------ +data_directory = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql16.14/data' +hba_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql16.14/data/pg_hba.conf' +ident_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql16.14/data/pg_ident.conf' + +#------------------------------------------------------------------------------ +# CONNECTIONS AND AUTHENTICATION +#------------------------------------------------------------------------------ +listen_addresses = '*' +port = 5432 +max_connections = 100 + +#------------------------------------------------------------------------------ +# RESOURCE USAGE (except WAL) +#------------------------------------------------------------------------------ +shared_buffers = 32MB + +#------------------------------------------------------------------------------ +# ERROR REPORTING AND LOGGING +#------------------------------------------------------------------------------ +log_destination = 'stderr' +logging_collector = on +log_directory = '~BEARSAMPP_LIN_PATH~/logs' +log_filename = 'postgresql.log' +log_file_mode = 0777 +log_truncate_on_rotation = off +log_rotation_age = 0 +log_rotation_size = 0 + +client_min_messages = notice +log_min_messages = warning +log_min_error_statement = error +log_min_duration_statement = -1 diff --git a/bin/postgresql17.10/bearsampp.conf b/bin/postgresql17.10/bearsampp.conf new file mode 100644 index 0000000..4b3f8fd --- /dev/null +++ b/bin/postgresql17.10/bearsampp.conf @@ -0,0 +1,14 @@ +postgresqlVersion = "17.10" +postgresqlCtlExe = "bin/pg_ctl.exe" +postgresqlCliExe = "bin/psql.exe" +postgresqlDumpExe = "bin/pg_dump.exe" +postgresqlDumpAllExe = "bin/pg_dumpall.exe" +postgresqlConf = "data/postgresql.conf" +postgresqlUserConf = "data/pg_hba.conf" +postgresqlAltConf = "postgresql.conf.ber" +postgresqlAltUserConf = "pg_hba.conf.ber" +postgresqlPort = "5432" +postgresqlRootUser = "postgres" +postgresqlRootPwd = "" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/postgresql17.10/init.bat b/bin/postgresql17.10/init.bat new file mode 100644 index 0000000..f0acb2d --- /dev/null +++ b/bin/postgresql17.10/init.bat @@ -0,0 +1,5 @@ +@ECHO OFF + +%~dp0bin\initdb.exe -U postgres -A trust -E utf8 -D "%~dp0data" > "~BEARSAMPP_WIN_PATH~\logs\postgresql-install.log" 2>&1 +copy /y "%~dp0postgresql.conf.ber" "%~dp0data\postgresql.conf" +copy /y "%~dp0pg_hba.conf.ber" "%~dp0data\pg_hba.conf" diff --git a/bin/postgresql17.10/pg_hba.conf.ber b/bin/postgresql17.10/pg_hba.conf.ber new file mode 100644 index 0000000..29b8f8b --- /dev/null +++ b/bin/postgresql17.10/pg_hba.conf.ber @@ -0,0 +1,3 @@ +# TYPE DATABASE USER ADDRESS METHOD + host all all 127.0.0.1/32 trust + host all all ::1/128 trust diff --git a/bin/postgresql17.10/postgresql.conf.ber b/bin/postgresql17.10/postgresql.conf.ber new file mode 100644 index 0000000..1a919f3 --- /dev/null +++ b/bin/postgresql17.10/postgresql.conf.ber @@ -0,0 +1,35 @@ +#------------------------------------------------------------------------------ +# FILE LOCATIONS +#------------------------------------------------------------------------------ +data_directory = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql17.10/data' +hba_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql17.10/data/pg_hba.conf' +ident_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql17.10/data/pg_ident.conf' + +#------------------------------------------------------------------------------ +# CONNECTIONS AND AUTHENTICATION +#------------------------------------------------------------------------------ +listen_addresses = '*' +port = 5432 +max_connections = 100 + +#------------------------------------------------------------------------------ +# RESOURCE USAGE (except WAL) +#------------------------------------------------------------------------------ +shared_buffers = 32MB + +#------------------------------------------------------------------------------ +# ERROR REPORTING AND LOGGING +#------------------------------------------------------------------------------ +log_destination = 'stderr' +logging_collector = on +log_directory = '~BEARSAMPP_LIN_PATH~/logs' +log_filename = 'postgresql.log' +log_file_mode = 0777 +log_truncate_on_rotation = off +log_rotation_age = 0 +log_rotation_size = 0 + +client_min_messages = notice +log_min_messages = warning +log_min_error_statement = error +log_min_duration_statement = -1 diff --git a/bin/postgresql18.4/bearsampp.conf b/bin/postgresql18.4/bearsampp.conf new file mode 100644 index 0000000..bfa4960 --- /dev/null +++ b/bin/postgresql18.4/bearsampp.conf @@ -0,0 +1,14 @@ +postgresqlVersion = "18.4" +postgresqlCtlExe = "bin/pg_ctl.exe" +postgresqlCliExe = "bin/psql.exe" +postgresqlDumpExe = "bin/pg_dump.exe" +postgresqlDumpAllExe = "bin/pg_dumpall.exe" +postgresqlConf = "data/postgresql.conf" +postgresqlUserConf = "data/pg_hba.conf" +postgresqlAltConf = "postgresql.conf.ber" +postgresqlAltUserConf = "pg_hba.conf.ber" +postgresqlPort = "5432" +postgresqlRootUser = "postgres" +postgresqlRootPwd = "" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/postgresql18.4/init.bat b/bin/postgresql18.4/init.bat new file mode 100644 index 0000000..f0acb2d --- /dev/null +++ b/bin/postgresql18.4/init.bat @@ -0,0 +1,5 @@ +@ECHO OFF + +%~dp0bin\initdb.exe -U postgres -A trust -E utf8 -D "%~dp0data" > "~BEARSAMPP_WIN_PATH~\logs\postgresql-install.log" 2>&1 +copy /y "%~dp0postgresql.conf.ber" "%~dp0data\postgresql.conf" +copy /y "%~dp0pg_hba.conf.ber" "%~dp0data\pg_hba.conf" diff --git a/bin/postgresql18.4/pg_hba.conf.ber b/bin/postgresql18.4/pg_hba.conf.ber new file mode 100644 index 0000000..29b8f8b --- /dev/null +++ b/bin/postgresql18.4/pg_hba.conf.ber @@ -0,0 +1,3 @@ +# TYPE DATABASE USER ADDRESS METHOD + host all all 127.0.0.1/32 trust + host all all ::1/128 trust diff --git a/bin/postgresql18.4/postgresql.conf.ber b/bin/postgresql18.4/postgresql.conf.ber new file mode 100644 index 0000000..d505c59 --- /dev/null +++ b/bin/postgresql18.4/postgresql.conf.ber @@ -0,0 +1,35 @@ +#------------------------------------------------------------------------------ +# FILE LOCATIONS +#------------------------------------------------------------------------------ +data_directory = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql18.4/data' +hba_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql18.4/data/pg_hba.conf' +ident_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql18.4/data/pg_ident.conf' + +#------------------------------------------------------------------------------ +# CONNECTIONS AND AUTHENTICATION +#------------------------------------------------------------------------------ +listen_addresses = '*' +port = 5432 +max_connections = 100 + +#------------------------------------------------------------------------------ +# RESOURCE USAGE (except WAL) +#------------------------------------------------------------------------------ +shared_buffers = 32MB + +#------------------------------------------------------------------------------ +# ERROR REPORTING AND LOGGING +#------------------------------------------------------------------------------ +log_destination = 'stderr' +logging_collector = on +log_directory = '~BEARSAMPP_LIN_PATH~/logs' +log_filename = 'postgresql.log' +log_file_mode = 0777 +log_truncate_on_rotation = off +log_rotation_age = 0 +log_rotation_size = 0 + +client_min_messages = notice +log_min_messages = warning +log_min_error_statement = error +log_min_duration_statement = -1 diff --git a/build.gradle b/build.gradle index 936ef37..cf75044 100644 --- a/build.gradle +++ b/build.gradle @@ -20,9 +20,9 @@ plugins { id 'base' } -// Load build properties from gradle.properties +// Load build properties from build.properties def buildProps = new Properties() -file('gradle.properties').withInputStream { buildProps.load(it) } +file('build.properties').withInputStream { buildProps.load(it) } // Project information group = 'com.bearsampp.modules' @@ -35,14 +35,14 @@ ext { rootDir = projectDir.parent devPath = file("${rootDir}/dev").absolutePath - // Bundle properties from gradle.properties + // Bundle properties from build.properties bundleName = buildProps.getProperty('bundle.name', 'postgresql') bundleRelease = buildProps.getProperty('bundle.release', '1.0.0') bundleType = buildProps.getProperty('bundle.type', 'bins') bundleFormat = buildProps.getProperty('bundle.format', '7z') // Build paths - with configurable base path - // Priority: 1) gradle.properties, 2) Environment variable, 3) Default + // Priority: 1) build.properties, 2) Environment variable, 3) Default def buildPathFromProps = buildProps.getProperty('build.path', '').trim() def buildPathFromEnv = System.getenv('BEARSAMPP_BUILD_PATH') ?: '' def defaultBuildPath = "${rootDir}/bearsampp-build" @@ -592,9 +592,9 @@ tasks.register('release') { println "Preparing archive..." // Determine build output path following Bruno pattern - // bearsampp-build/{bundleType}/{bundleName} + // bearsampp-build/{bundleType}/{bundleName}/{bundleRelease} def buildPath = file(buildBasePath) - def buildBinsPath = file("${buildPath}/${bundleType}/${bundleName}") + def buildBinsPath = file("${buildPath}/${bundleType}/${bundleName}/${bundleRelease}") buildBinsPath.mkdirs() // Build archive filename @@ -856,7 +856,20 @@ tasks.register('listReleases') { println "\nAvailable PostgreSQL Releases (modules-untouched):" println "-".multiply(80) - props.sort { a, b -> a.key <=> b.key }.each { version, url -> + props.sort { a, b -> + def aParts = a.key.tokenize('.').collect { it.isInteger() ? it.toInteger() : it } + def bParts = b.key.tokenize('.').collect { it.isInteger() ? it.toInteger() : it } + for (int i = 0; i < Math.max(aParts.size(), bParts.size()); i++) { + def aVal = i < aParts.size() ? aParts[i] : 0 + def bVal = i < bParts.size() ? bParts[i] : 0 + if (aVal.getClass() != bVal.getClass()) { + aVal = aVal.toString() + bVal = bVal.toString() + } + if (aVal != bVal) return aVal <=> bVal + } + return 0 + }.each { version, url -> println " ${version.padRight(10)} -> ${url}" } println "-".multiply(80) diff --git a/build.properties b/build.properties new file mode 100644 index 0000000..cf76225 --- /dev/null +++ b/build.properties @@ -0,0 +1,6 @@ +bundle.name = postgresql +bundle.release = 2025.6.2 +bundle.type = bins +bundle.format = 7z + +#build.path = C:/Bearsampp-build diff --git a/gradle.properties b/gradle.properties index 408d35d..cb651ab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,5 @@ # Gradle Build Properties for Bearsampp Module PostgreSQL -# Bundle configuration -bundle.name = postgresql -bundle.release = 2025.3.8 -bundle.type = bins -bundle.format = 7z - # Gradle daemon configuration org.gradle.daemon=true org.gradle.parallel=true