Doc: Add fallback path for asciidoc-icons to fix install error
PATCH 1/1 Doc: Add fallback path for asciidoc-icons to fix install error
By adding an additional check for the existence of the /usr/share/asciidoc/icons/ directory in the Makefile.am file, this patch improves compatibility across different environments and fix an install error due to missing icon files.
Symptom when running make install:
cp: cannot stat '/etc/asciidoc/images/icons/': No such file or directory make[2]: *** [Makefile:629: html/asciidoc-icons] Error 1 make[2]: Leaving directory '/root/xenomai-upstream/xenomai/doc/asciidoc' make[1]: *** [Makefile:421: install-recursive] Error 1 make[1]: Leaving directory '/root/xenomai-upstream/xenomai/doc'
make: *** [Makefile:472: install-recursive] Error 1
Environment:
$ dpkg -S /usr/share/asciidoc/icons/ asciidoc-common: /usr/share/asciidoc/icons
$ apt show asciidoc-common Package: asciidoc-common Version: 10.1.2-1
$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
Configure:
$ ./configure \ CFLAGS="-march=armv8-a" \ LDFLAGS="-march=armv8-a" \ --build=i686-pc-linux-gnu \ --host=aarch64-linux-gnu \ --enable-smp \ --with-core=cobalt \ --enable-doc-build \ CC=aarch64-linux-gnu-gcc \ LD=aarch64-linux-gnu-ld
--- doc/asciidoc/Makefile.am | 2 ++ 1 file changed, 2 insertions(+)
doc/asciidoc/Makefile.am +2 -0
@@ -112,6 +112,8 @@ html/asciidoc-icons: cp -a /usr/share/doc/asciidoc/images/icons/ html/asciidoc-icons; \ elif test -d /usr/share/asciidoc/images/icons/; then \ cp -a /usr/share/asciidoc/images/icons/ html/asciidoc-icons; \ + elif test -d /usr/share/asciidoc/icons/; then \ + cp -a /usr/share/asciidoc/icons/ html/asciidoc-icons; \ else \ cp -a /etc/asciidoc/images/icons/ html/asciidoc-icons; \ fi
Signature · 1 line
2.34.1
Jan Kiszka
AppliedQuoted 49 lines · Haiyang He
By adding an additional check for the existence of the
/usr/share/asciidoc/icons/directory in the Makefile.am file, this patch improves compatibility across different environments and fix an install error due to missing icon files.Symptom when running make install:
cp: cannot stat '/etc/asciidoc/images/icons/': No such file or directory make[2]: *** [Makefile:629: html/asciidoc-icons] Error 1 make[2]: Leaving directory '/root/xenomai-upstream/xenomai/doc/asciidoc' make[1]: *** [Makefile:421: install-recursive] Error 1 make[1]: Leaving directory '/root/xenomai-upstream/xenomai/doc'
make: *** [Makefile:472: install-recursive] Error 1Environment:
$ dpkg -S /usr/share/asciidoc/icons/ asciidoc-common: /usr/share/asciidoc/icons$ apt show asciidoc-common Package: asciidoc-common Version: 10.1.2-1$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"Configure:
$ ./configure \ CFLAGS="-march=armv8-a" \ LDFLAGS="-march=armv8-a" \ --build=i686-pc-linux-gnu \ --host=aarch64-linux-gnu \ --enable-smp \ --with-core=cobalt \ --enable-doc-build \ CC=aarch64-linux-gnu-gcc \ LD=aarch64-linux-gnu-ldSigned-off-by Haiyang He <[email protected]>--- doc/asciidoc/Makefile.am | 2 ++ 1 file changed, 2 insertions(+)doc/asciidoc/Makefile.am +0
-0
doc/asciidoc/Makefile.am html/asciidoc-icons: · line 119
Quoted 8 lines
doc/asciidoc/Makefile.am +2
-0@@ -112,6 +112,8 @@ html/asciidoc-icons: cp -a /usr/share/doc/asciidoc/images/icons/ html/asciidoc-icons; \ elif test -d /usr/share/asciidoc/images/icons/; then \ cp -a /usr/share/asciidoc/images/icons/ html/asciidoc-icons; \ + elif test -d /usr/share/asciidoc/icons/; then \ + cp -a /usr/share/asciidoc/icons/ html/asciidoc-icons; \ else \ cp -a /etc/asciidoc/images/icons/ html/asciidoc-icons; \ fi
Thanks, applied.
Yeah, I think I've seen that with Debian as well while updating the homepage last week - but then I worked around it locally. Thanks for addressing it properly.
While at that, I was wondering if we shouldn't automate the doc deployment further. We have a (not yet public) repo on source.denx.de that builds the static doc pages, but I have to do this first:
- build xenomai with ../configure --enable-doc-build
- replace content in public/v3/html with
- build/doc/asciidoc/html
- build/doc/doxygen/html/xeno3rpm
- replace conent in public/v3/pdf with
- build/doc/asciidoc/*.pdf
- build/doc/doxygen/xeno3prm.pdf
- commit and push, CI pipeline will publish automatically
Would you be interested in working on an automation via gitlab-ci?
We are also lacking CI runs with --enable-doc-build inside Xenomai itself. Such runs may have revealed issues like above already. And possibly things like
https://gitlab.com/Xenomai/xenomai-hacker-space/-/issues/49...
Jan
Signature · 2 lines
Siemens AG, Foundational Technologies Linux Expert Center
Quoted 78 lines · Jan Kiszka
Quoted 49 lines · Haiyang He
By adding an additional check for the existence of the
/usr/share/asciidoc/icons/directory in the Makefile.am file, this patch improves compatibility across different environments and fix an install error due to missing icon files.Symptom when running make install:
cp: cannot stat '/etc/asciidoc/images/icons/': No such file or directory make[2]: *** [Makefile:629: html/asciidoc-icons] Error 1 make[2]: Leaving directory '/root/xenomai-upstream/xenomai/doc/asciidoc' make[1]: *** [Makefile:421: install-recursive] Error 1 make[1]: Leaving directory '/root/xenomai-upstream/xenomai/doc'
make: *** [Makefile:472: install-recursive] Error 1Environment:
$ dpkg -S /usr/share/asciidoc/icons/ asciidoc-common: /usr/share/asciidoc/icons$ apt show asciidoc-common Package: asciidoc-common Version: 10.1.2-1$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"Configure:
$ ./configure \ CFLAGS="-march=armv8-a" \ LDFLAGS="-march=armv8-a" \ --build=i686-pc-linux-gnu \ --host=aarch64-linux-gnu \ --enable-smp \ --with-core=cobalt \ --enable-doc-build \ CC=aarch64-linux-gnu-gcc \ LD=aarch64-linux-gnu-ldSigned-off-by Haiyang He <[email protected]>--- doc/asciidoc/Makefile.am | 2 ++ 1 file changed, 2 insertions(+)doc/asciidoc/Makefile.am +0
-0doc/asciidoc/Makefile.am html/asciidoc-icons: · line 119
Quoted 8 lines
doc/asciidoc/Makefile.am +2
-0@@ -112,6 +112,8 @@ html/asciidoc-icons: cp -a /usr/share/doc/asciidoc/images/icons/ html/asciidoc-icons; \ elif test -d /usr/share/asciidoc/images/icons/; then \ cp -a /usr/share/asciidoc/images/icons/ html/asciidoc-icons; \ + elif test -d /usr/share/asciidoc/icons/; then \ + cp -a /usr/share/asciidoc/icons/ html/asciidoc-icons; \ else \ cp -a /etc/asciidoc/images/icons/ html/asciidoc-icons; \ fiThanks, applied.
Yeah, I think I've seen that with Debian as well while updating the homepage last week - but then I worked around it locally. Thanks for addressing it properly.
While at that, I was wondering if we shouldn't automate the doc deployment further. We have a (not yet public) repo on source.denx.de that builds the static doc pages, but I have to do this first:
- build xenomai with ../configure --enable-doc-build
- replace content in public/v3/html with
- build/doc/asciidoc/html
- build/doc/doxygen/html/xeno3rpm
- replace conent in public/v3/pdf with
- build/doc/asciidoc/*.pdf
- build/doc/doxygen/xeno3prm.pdf
- commit and push, CI pipeline will publish automatically
Quoted 2 lines
Would you be interested in working on an automation via gitlab-ci?
Sure, I could.
I quickly check the .gitlab-ci.yml and the CONFIGURE_OPTS does not include --enable-doc-build by default.
To enable CI automation of doc, these actions should be added into .gitlab-ci.yml:
1. define a new build job which is arch independent and has --enable-doc-build enabled.
2. at the last of build stage, push html/pdf things to another repo which builds the static doc pages.
Correct me if I am wrong.
Haiyang.
Quoted 10 lines
We are also lacking CI runs with --enable-doc-build inside Xenomai itself. Such runs may have revealed issues like above already. And possibly things like
https://gitlab.com/Xenomai/xenomai-hacker-space/-/issues/49...Jan
Signature · 2 lines
Siemens AG, Foundational Technologies Linux Expert Center