[oe] [meta-webserver][PATCH] nginx: fix install paths

Gaylord Charles gaylord.charles at veo-labs.com
Thu Sep 26 15:31:47 UTC 2019


Yes, thanks.

>From c936d2d6f9db956432b187c0ca28cecd3ffc3bb2 Mon Sep 17 00:00:00 2001
From: Gaylord CHARLES <gaylord.charles at veo-labs.com>
Date: Tue, 24 Sep 2019 18:56:45 +0200
Subject: [PATCH] nginx: fix install paths

- Use path variable instead of /usr
- Replace the absolute path symlink with a relative one (using lnr)

Signed-off-by: Gaylord CHARLES <gaylord.charles at veo-labs.com>
---
 meta-webserver/recipes-httpd/nginx/nginx.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc
b/meta-webserver/recipes-httpd/nginx/nginx.inc
index 29e7efc14..6af42d72d 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx.inc
+++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
@@ -92,9 +92,9 @@ do_install () {
             >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
     fi
     install -d ${D}${sysconfdir}/${BPN}
-    ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
+    lnr ${D}${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
     install -d ${D}${NGINX_WWWDIR}
-    mv ${D}/usr/html ${D}${NGINX_WWWDIR}/
+    mv ${D}${exec_prefix}/html ${D}${NGINX_WWWDIR}/
     chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR}

     install -d ${D}${sysconfdir}/init.d
-- 
2.20.1

Le jeu. 26 sept. 2019 à 15:11, Khem Raj <raj.khem at gmail.com> a écrit :

> On Thu, Sep 26, 2019 at 2:47 AM Gaylord Charles
> <gaylord.charles at veo-labs.com> wrote:
> >
> > Ok, thank you. I was not sure of this part.
> > I was trying to fix this error :
> >
> > ERROR: nginx-native-1.15.7-r0 do_populate_sysroot: sstate found an
> absolute path symlink
> /home/gaylord/Projets/box/bbb/tmp/work/x86_64-linux/nginx-native/1.15.7-r0/sysroot-destdir/home/gaylord/Projets/box/bbb/tmp/work/x86_64-linux/nginx-native/1.15.7-r0/recipe-sysroot-native/etc/nginx/run
> pointing at
> /home/gaylord/Projets/box/bbb/tmp/work/x86_64-linux/nginx-native/1.15.7-r0/recipe-sysroot-native/var/run/nginx.
> Please replace this with a relative link.
> >
>
> right. Perhaps use lnr since that will work across all distros
>
> > Le mer. 25 sept. 2019 à 15:22, Khem Raj <raj.khem at gmail.com> a écrit :
> >>
> >>
> >>
> >> On 9/25/19 2:20 AM, Gaylord Charles wrote:
> >> > Hello,
> >> >
> >> > This patch fixes Nginx install paths. I tried to build the native
> variant
> >> > for testing purpose and had errors.
> >> >
> >> > Regards,
> >> > Gaylord Charles
> >> >
> >> > From b6dc845b645cc8667b2d89412c292c0801de9270 Mon Sep 17 00:00:00 2001
> >> > From: Gaylord CHARLES <gaylord.charles at veo-labs.com>
> >> > Date: Tue, 24 Sep 2019 18:56:45 +0200
> >> > Subject: [PATCH] nginx: fix install paths
> >> >
> >> > - Use path variable instead of /usr
> >> > - Replace the absolute path symlink with a relative one
> >> >
> >> > Signed-off-by: Gaylord CHARLES <gaylord.charles at veo-labs.com>
> >> > ---
> >> >  meta-webserver/recipes-httpd/nginx/nginx.inc | 4 ++--
> >> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >> >
> >> > diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc
> >> > b/meta-webserver/recipes-httpd/nginx/nginx.inc
> >> > index 29e7efc14..1e9d2e1a4 100644
> >> > --- a/meta-webserver/recipes-httpd/nginx/nginx.inc
> >> > +++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
> >> > @@ -92,9 +92,9 @@ do_install () {
> >> >              >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
> >> >      fi
> >> >      install -d ${D}${sysconfdir}/${BPN}
> >> > -    ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
> >> > +    ln -snf ../../var/run/${BPN} ${D}${sysconfdir}/${BPN}/run
> >>
> >> localstatedir variable could have stayed there, any particular reason to
> >> drop it in favor of hardcoding /var
> >>
> >> >      install -d ${D}${NGINX_WWWDIR}
> >> > -    mv ${D}/usr/html ${D}${NGINX_WWWDIR}/
> >> > +    mv ${D}${exec_prefix}/html ${D}${NGINX_WWWDIR}/
> >> >      chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR}
> >> >
> >> >      install -d ${D}${sysconfdir}/init.d
> >> >
>


More information about the Openembedded-devel mailing list