* [ptxdist] [PATCH 0/3] rootfs: Create /var/www and allow webservers to depend on it
@ 2025-12-11 10:07 Alexander Dahl via ptxdist
2025-12-11 10:07 ` [ptxdist] [PATCH 1/3] rootfs: Add option to create /var/www Alexander Dahl via ptxdist
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Alexander Dahl via ptxdist @ 2025-12-11 10:07 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Dahl
Hello,
we had some trouble with permissions of directories below /var/www with
custom packages installing web applications to that directory,
especially if multiple package implictly created /var/www with different
access rights. Trying to make all this somewhat more predictable.
Greets
Alex
Alexander Dahl (3):
rootfs: Add option to create /var/www
nginx: Select rootfs /var/www dependency
lighttpd: Select rootfs /var/www dependency
rules/lighttpd.in | 1 +
rules/nginx.in | 1 +
rules/rootfs.in | 9 +++++++++
rules/rootfs.make | 3 +++
4 files changed, 14 insertions(+)
base-commit: fd0dc47b258aac09ab961199a3c00ecddf98f244
--
2.47.3
^ permalink raw reply [flat|nested] 7+ messages in thread* [ptxdist] [PATCH 1/3] rootfs: Add option to create /var/www 2025-12-11 10:07 [ptxdist] [PATCH 0/3] rootfs: Create /var/www and allow webservers to depend on it Alexander Dahl via ptxdist @ 2025-12-11 10:07 ` Alexander Dahl via ptxdist 2025-12-12 14:52 ` [ptxdist] [APPLIED] " Michael Olbrich 2025-12-11 10:07 ` [ptxdist] [PATCH 2/3] nginx: Select rootfs /var/www dependency Alexander Dahl via ptxdist 2025-12-11 10:07 ` [ptxdist] [PATCH 3/3] lighttpd: " Alexander Dahl via ptxdist 2 siblings, 1 reply; 7+ messages in thread From: Alexander Dahl via ptxdist @ 2025-12-11 10:07 UTC (permalink / raw) To: ptxdist; +Cc: Alexander Dahl Multiple packages like nginx, lighttpd, and jvisu are installing things to /var/www already, and create that path implicitly. Make it explicit. Signed-off-by: Alexander Dahl <ada@thorsis.com> --- rules/rootfs.in | 9 +++++++++ rules/rootfs.make | 3 +++ 2 files changed, 12 insertions(+) diff --git a/rules/rootfs.in b/rules/rootfs.in index 2b7c50363..93b53481d 100644 --- a/rules/rootfs.in +++ b/rules/rootfs.in @@ -256,6 +256,15 @@ config ROOTFS_VAR_TMP system reboots. Say 'y' here to ensure a '/var/tmp' directory is available at run-time. +config ROOTFS_VAR_WWW + bool + prompt "/var/www" + help + This directory is intended for webserver application data. + Usually things like html or javascript files go here. + Say 'y' here to ensure a '/var/www' directory is available at + run-time. + endmenu endif # ROOTFS diff --git a/rules/rootfs.make b/rules/rootfs.make index 1c1e5501c..656fbe4ba 100644 --- a/rules/rootfs.make +++ b/rules/rootfs.make @@ -145,6 +145,9 @@ ifdef PTXCONF_ROOTFS_VAR_OVERLAYFS @$(call install_link, rootfs, ../var.mount, \ /usr/lib/systemd/system/local-fs.target.requires/var.mount) endif +ifdef PTXCONF_ROOTFS_VAR_WWW + @$(call install_copy, rootfs, 0, 0, 0755, /var/www) +endif # # # # install files in rootfs -- 2.47.3 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [APPLIED] rootfs: Add option to create /var/www 2025-12-11 10:07 ` [ptxdist] [PATCH 1/3] rootfs: Add option to create /var/www Alexander Dahl via ptxdist @ 2025-12-12 14:52 ` Michael Olbrich 0 siblings, 0 replies; 7+ messages in thread From: Michael Olbrich @ 2025-12-12 14:52 UTC (permalink / raw) To: ptxdist; +Cc: Alexander Dahl Thanks, applied as 8e87fca5ae8b36dc5430d16576ae2fb68ac93a32. Michael [sent from post-receive hook] On Fri, 12 Dec 2025 15:52:18 +0100, Alexander Dahl <ada@thorsis.com> wrote: > Multiple packages like nginx, lighttpd, and jvisu are installing things > to /var/www already, and create that path implicitly. Make it explicit. > > Signed-off-by: Alexander Dahl <ada@thorsis.com> > Message-Id: <20251211100718.1261055-2-ada@thorsis.com> > Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> > > diff --git a/rules/rootfs.in b/rules/rootfs.in > index 2b7c50363df0..93b53481d121 100644 > --- a/rules/rootfs.in > +++ b/rules/rootfs.in > @@ -256,6 +256,15 @@ config ROOTFS_VAR_TMP > system reboots. Say 'y' here to ensure a '/var/tmp' directory is > available at run-time. > > +config ROOTFS_VAR_WWW > + bool > + prompt "/var/www" > + help > + This directory is intended for webserver application data. > + Usually things like html or javascript files go here. > + Say 'y' here to ensure a '/var/www' directory is available at > + run-time. > + > endmenu > endif # ROOTFS > > diff --git a/rules/rootfs.make b/rules/rootfs.make > index 1c1e5501cf83..656fbe4ba5a7 100644 > --- a/rules/rootfs.make > +++ b/rules/rootfs.make > @@ -145,6 +145,9 @@ ifdef PTXCONF_ROOTFS_VAR_OVERLAYFS > @$(call install_link, rootfs, ../var.mount, \ > /usr/lib/systemd/system/local-fs.target.requires/var.mount) > endif > +ifdef PTXCONF_ROOTFS_VAR_WWW > + @$(call install_copy, rootfs, 0, 0, 0755, /var/www) > +endif > > # # > # # install files in rootfs ^ permalink raw reply [flat|nested] 7+ messages in thread
* [ptxdist] [PATCH 2/3] nginx: Select rootfs /var/www dependency 2025-12-11 10:07 [ptxdist] [PATCH 0/3] rootfs: Create /var/www and allow webservers to depend on it Alexander Dahl via ptxdist 2025-12-11 10:07 ` [ptxdist] [PATCH 1/3] rootfs: Add option to create /var/www Alexander Dahl via ptxdist @ 2025-12-11 10:07 ` Alexander Dahl via ptxdist 2025-12-12 14:52 ` [ptxdist] [APPLIED] " Michael Olbrich 2025-12-11 10:07 ` [ptxdist] [PATCH 3/3] lighttpd: " Alexander Dahl via ptxdist 2 siblings, 1 reply; 7+ messages in thread From: Alexander Dahl via ptxdist @ 2025-12-11 10:07 UTC (permalink / raw) To: ptxdist; +Cc: Alexander Dahl Let the rootfs package create that dir explicitly, before copying anything into it. Signed-off-by: Alexander Dahl <ada@thorsis.com> --- rules/nginx.in | 1 + 1 file changed, 1 insertion(+) diff --git a/rules/nginx.in b/rules/nginx.in index f83031e97..c12a5df5f 100644 --- a/rules/nginx.in +++ b/rules/nginx.in @@ -9,6 +9,7 @@ menuconfig NGINX select LIBPCRE if NGINX_PCRE select OPENSSL if NGINX_HTTP_SSL_MODULE || NGINX_HTTP_V2_MODULE select ZLIB if NGINX_HTTP_GZIP_MODULE || NGINX_HTTP_GZIP_STATIC_MODULE + select ROOTFS_VAR_WWW if NGINX_POPULATE_TEST_WEBSITE help nginx ("engine X") is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as -- 2.47.3 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [APPLIED] nginx: Select rootfs /var/www dependency 2025-12-11 10:07 ` [ptxdist] [PATCH 2/3] nginx: Select rootfs /var/www dependency Alexander Dahl via ptxdist @ 2025-12-12 14:52 ` Michael Olbrich 0 siblings, 0 replies; 7+ messages in thread From: Michael Olbrich @ 2025-12-12 14:52 UTC (permalink / raw) To: ptxdist; +Cc: Alexander Dahl Thanks, applied as b5def8cac73ed18097ef2c4c35dc89d0b66efcbc. Michael [sent from post-receive hook] On Fri, 12 Dec 2025 15:52:19 +0100, Alexander Dahl <ada@thorsis.com> wrote: > Let the rootfs package create that dir explicitly, > before copying anything into it. > > Signed-off-by: Alexander Dahl <ada@thorsis.com> > Message-Id: <20251211100718.1261055-3-ada@thorsis.com> > Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> > > diff --git a/rules/nginx.in b/rules/nginx.in > index f83031e97f71..c12a5df5fb28 100644 > --- a/rules/nginx.in > +++ b/rules/nginx.in > @@ -9,6 +9,7 @@ menuconfig NGINX > select LIBPCRE if NGINX_PCRE > select OPENSSL if NGINX_HTTP_SSL_MODULE || NGINX_HTTP_V2_MODULE > select ZLIB if NGINX_HTTP_GZIP_MODULE || NGINX_HTTP_GZIP_STATIC_MODULE > + select ROOTFS_VAR_WWW if NGINX_POPULATE_TEST_WEBSITE > help > nginx ("engine X") is a high-performance web and reverse > proxy server created by Igor Sysoev. It can be used both as ^ permalink raw reply [flat|nested] 7+ messages in thread
* [ptxdist] [PATCH 3/3] lighttpd: Select rootfs /var/www dependency 2025-12-11 10:07 [ptxdist] [PATCH 0/3] rootfs: Create /var/www and allow webservers to depend on it Alexander Dahl via ptxdist 2025-12-11 10:07 ` [ptxdist] [PATCH 1/3] rootfs: Add option to create /var/www Alexander Dahl via ptxdist 2025-12-11 10:07 ` [ptxdist] [PATCH 2/3] nginx: Select rootfs /var/www dependency Alexander Dahl via ptxdist @ 2025-12-11 10:07 ` Alexander Dahl via ptxdist 2025-12-12 14:52 ` [ptxdist] [APPLIED] " Michael Olbrich 2 siblings, 1 reply; 7+ messages in thread From: Alexander Dahl via ptxdist @ 2025-12-11 10:07 UTC (permalink / raw) To: ptxdist; +Cc: Alexander Dahl There is an explicit installation of that directory in rootfs package. Signed-off-by: Alexander Dahl <ada@thorsis.com> --- rules/lighttpd.in | 1 + 1 file changed, 1 insertion(+) diff --git a/rules/lighttpd.in b/rules/lighttpd.in index d9b7c048f..aaae5cf3b 100644 --- a/rules/lighttpd.in +++ b/rules/lighttpd.in @@ -17,6 +17,7 @@ menuconfig LIGHTTPD select OPENSSL if LIGHTTPD_OPENSSL select LUA if LIGHTTPD_LUA select LUA_INSTALL_LIBLUA if LIGHTTPD_LUA + select ROOTFS_VAR_WWW if LIGHTTPD_GENERIC_SITE select BUSYBOX_START_STOP_DAEMON if LIGHTTPD_STARTSCRIPT select BUSYBOX_FEATURE_START_STOP_DAEMON_FANCY if LIGHTTPD_STARTSCRIPT select BUSYBOX_FEATURE_START_STOP_DAEMON_LONG_OPTIONS if LIGHTTPD_STARTSCRIPT -- 2.47.3 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [APPLIED] lighttpd: Select rootfs /var/www dependency 2025-12-11 10:07 ` [ptxdist] [PATCH 3/3] lighttpd: " Alexander Dahl via ptxdist @ 2025-12-12 14:52 ` Michael Olbrich 0 siblings, 0 replies; 7+ messages in thread From: Michael Olbrich @ 2025-12-12 14:52 UTC (permalink / raw) To: ptxdist; +Cc: Alexander Dahl Thanks, applied as d770152bbf01f62ccc9e5341b8407b16b4bc6318. Michael [sent from post-receive hook] On Fri, 12 Dec 2025 15:52:19 +0100, Alexander Dahl <ada@thorsis.com> wrote: > There is an explicit installation of that directory in rootfs package. > > Signed-off-by: Alexander Dahl <ada@thorsis.com> > Message-Id: <20251211100718.1261055-4-ada@thorsis.com> > Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> > > diff --git a/rules/lighttpd.in b/rules/lighttpd.in > index d9b7c048fca9..aaae5cf3b235 100644 > --- a/rules/lighttpd.in > +++ b/rules/lighttpd.in > @@ -17,6 +17,7 @@ menuconfig LIGHTTPD > select OPENSSL if LIGHTTPD_OPENSSL > select LUA if LIGHTTPD_LUA > select LUA_INSTALL_LIBLUA if LIGHTTPD_LUA > + select ROOTFS_VAR_WWW if LIGHTTPD_GENERIC_SITE > select BUSYBOX_START_STOP_DAEMON if LIGHTTPD_STARTSCRIPT > select BUSYBOX_FEATURE_START_STOP_DAEMON_FANCY if LIGHTTPD_STARTSCRIPT > select BUSYBOX_FEATURE_START_STOP_DAEMON_LONG_OPTIONS if LIGHTTPD_STARTSCRIPT ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-12-12 14:55 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-12-11 10:07 [ptxdist] [PATCH 0/3] rootfs: Create /var/www and allow webservers to depend on it Alexander Dahl via ptxdist 2025-12-11 10:07 ` [ptxdist] [PATCH 1/3] rootfs: Add option to create /var/www Alexander Dahl via ptxdist 2025-12-12 14:52 ` [ptxdist] [APPLIED] " Michael Olbrich 2025-12-11 10:07 ` [ptxdist] [PATCH 2/3] nginx: Select rootfs /var/www dependency Alexander Dahl via ptxdist 2025-12-12 14:52 ` [ptxdist] [APPLIED] " Michael Olbrich 2025-12-11 10:07 ` [ptxdist] [PATCH 3/3] lighttpd: " Alexander Dahl via ptxdist 2025-12-12 14:52 ` [ptxdist] [APPLIED] " Michael Olbrich
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox