diff --git a/debian/patches/0001-Use-user-name-with-underline.patch b/debian/patches/0001-Use-user-name-with-underline.patch new file mode 100644 index 0000000..8bdadf9 --- /dev/null +++ b/debian/patches/0001-Use-user-name-with-underline.patch @@ -0,0 +1,21 @@ +From: Kentaro Hayashi +Date: Wed, 5 Feb 2020 20:08:19 +0900 +Subject: Use user name with underline + +--- + data/groonga-httpd.conf.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/data/groonga-httpd.conf.in b/data/groonga-httpd.conf.in +index 9aab975..e4d8aad 100644 +--- a/data/groonga-httpd.conf.in ++++ b/data/groonga-httpd.conf.in +@@ -3,7 +3,7 @@ pid @GROONGA_HTTPD_PID_PATH@; + + # Match this to the file owner of Groonga database files if groonga-httpd is + # run as root. +-user groonga groonga; ++user _groonga groonga; + + env GRN_IN_VALUES_TOO_MANY_INDEX_MATCH_RATIO; + env GRN_BETWEEN_TOO_MANY_INDEX_MATCH_RATIO; diff --git a/debian/patches/0002-Remove-needless-groonga-keyring-postrm.patch b/debian/patches/0002-Remove-needless-groonga-keyring-postrm.patch new file mode 100644 index 0000000..210b749 --- /dev/null +++ b/debian/patches/0002-Remove-needless-groonga-keyring-postrm.patch @@ -0,0 +1,20 @@ +From: Kentaro Hayashi +Date: Sat, 2 Nov 2019 21:01:03 +0900 +Subject: Remove needless groonga-keyring postrm + +--- + configure.ac | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 19f9705..4432e87 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1851,7 +1851,6 @@ AC_CONFIG_FILES([ + lib/mrb/scripts/query_logger/Makefile + lib/proc/Makefile + packages/Makefile +- packages/apt/debian/groonga-keyring.postrm + packages/apt/env.sh + packages/source/Makefile + packages/windows/Makefile diff --git a/debian/patches/0003-Use-_GNU_SOURCE-on-GNU-kFreeBSD.patch b/debian/patches/0003-Use-_GNU_SOURCE-on-GNU-kFreeBSD.patch new file mode 100644 index 0000000..ceb5dd3 --- /dev/null +++ b/debian/patches/0003-Use-_GNU_SOURCE-on-GNU-kFreeBSD.patch @@ -0,0 +1,29 @@ +From: Kentaro Hayashi +Date: Wed, 2 Dec 2020 17:24:45 +0900 +Subject: Use _GNU_SOURCE on GNU/kFreeBSD + +Define _GNU_SOURCE not only on GNU/Hurd, but also other glibc-based +platforms including GNU/kFreeBSD. + +See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826061#10 +--- + vendor/nginx-1.19.5/src/os/unix/ngx_posix_config.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/vendor/nginx-1.19.5/src/os/unix/ngx_posix_config.h b/vendor/nginx-1.19.5/src/os/unix/ngx_posix_config.h +index 2a8c413..772cfa6 100644 +--- a/vendor/nginx-1.19.5/src/os/unix/ngx_posix_config.h ++++ b/vendor/nginx-1.19.5/src/os/unix/ngx_posix_config.h +@@ -21,10 +21,11 @@ + #endif + + +-#if (NGX_GNU_HURD) ++#if defined(__GLIBC__) + #ifndef _GNU_SOURCE + #define _GNU_SOURCE /* accept4() */ + #endif ++ + #define _FILE_OFFSET_BITS 64 + #endif + diff --git a/debian/patches/0004-Enable-user-site-configuration.patch b/debian/patches/0004-Enable-user-site-configuration.patch new file mode 100644 index 0000000..81a3b78 --- /dev/null +++ b/debian/patches/0004-Enable-user-site-configuration.patch @@ -0,0 +1,19 @@ +From: Kentaro Hayashi +Date: Wed, 2 Dec 2020 20:29:31 +0900 +Subject: Enable user site configuration + +--- + data/groonga-httpd.conf.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/data/groonga-httpd.conf.in b/data/groonga-httpd.conf.in +index e4d8aad..d7788ff 100644 +--- a/data/groonga-httpd.conf.in ++++ b/data/groonga-httpd.conf.in +@@ -78,4 +78,6 @@ http { + root html; + } + } ++ # Configure application ++ include /etc/groonga/httpd/conf.d/*.conf; + } diff --git a/debian/patches/fix-nginx-FTBFS-on-kfreebsd.patch b/debian/patches/fix-nginx-FTBFS-on-kfreebsd.patch deleted file mode 100644 index 898049c..0000000 --- a/debian/patches/fix-nginx-FTBFS-on-kfreebsd.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Steven Chamberlain -Date: Sat, 16 Jul 2016 23:52:50 +0100 -Subject: Use _GNU_SOURCE on GNU/kFreeBSD - -Define _GNU_SOURCE not only on GNU/Hurd, but also other glibc-based -platforms including GNU/kFreeBSD. - -See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826061#10 ---- - vendor/nginx-1.19.4/src/os/unix/ngx_posix_config.h | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/vendor/nginx-1.19.4/src/os/unix/ngx_posix_config.h b/vendor/nginx-1.19.4/src/os/unix/ngx_posix_config.h -index 2a8c413..03f7e0a 100644 ---- a/vendor/nginx-1.19.4/src/os/unix/ngx_posix_config.h -+++ b/vendor/nginx-1.19.4/src/os/unix/ngx_posix_config.h -@@ -21,10 +21,13 @@ - #endif - - --#if (NGX_GNU_HURD) -+#if defined(__GLIBC__) - #ifndef _GNU_SOURCE - #define _GNU_SOURCE /* accept4() */ - #endif -+#endif -+ -+#if (NGX_GNU_HURD) - #define _FILE_OFFSET_BITS 64 - #endif - diff --git a/debian/patches/prepend-underline-groonga-user.patch b/debian/patches/prepend-underline-groonga-user.patch deleted file mode 100644 index 8bdadf9..0000000 --- a/debian/patches/prepend-underline-groonga-user.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Kentaro Hayashi -Date: Wed, 5 Feb 2020 20:08:19 +0900 -Subject: Use user name with underline - ---- - data/groonga-httpd.conf.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/data/groonga-httpd.conf.in b/data/groonga-httpd.conf.in -index 9aab975..e4d8aad 100644 ---- a/data/groonga-httpd.conf.in -+++ b/data/groonga-httpd.conf.in -@@ -3,7 +3,7 @@ pid @GROONGA_HTTPD_PID_PATH@; - - # Match this to the file owner of Groonga database files if groonga-httpd is - # run as root. --user groonga groonga; -+user _groonga groonga; - - env GRN_IN_VALUES_TOO_MANY_INDEX_MATCH_RATIO; - env GRN_BETWEEN_TOO_MANY_INDEX_MATCH_RATIO; diff --git a/debian/patches/remove-groonga-keyring-postrc.patch b/debian/patches/remove-groonga-keyring-postrc.patch deleted file mode 100644 index 210b749..0000000 --- a/debian/patches/remove-groonga-keyring-postrc.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Kentaro Hayashi -Date: Sat, 2 Nov 2019 21:01:03 +0900 -Subject: Remove needless groonga-keyring postrm - ---- - configure.ac | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 19f9705..4432e87 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1851,7 +1851,6 @@ AC_CONFIG_FILES([ - lib/mrb/scripts/query_logger/Makefile - lib/proc/Makefile - packages/Makefile -- packages/apt/debian/groonga-keyring.postrm - packages/apt/env.sh - packages/source/Makefile - packages/windows/Makefile diff --git a/debian/patches/series b/debian/patches/series index 9a42811..b4858e6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ -fix-nginx-FTBFS-on-kfreebsd.patch -remove-groonga-keyring-postrc.patch -prepend-underline-groonga-user.patch +0001-Use-user-name-with-underline.patch +0002-Remove-needless-groonga-keyring-postrm.patch +0003-Use-_GNU_SOURCE-on-GNU-kFreeBSD.patch +0004-Enable-user-site-configuration.patch