deutrino's picture

Hi there, I've FINALLY gotten around to working on the "LEPP" (Linux+Nginx+PHP+PostgreSQL) appliance and my 'make' is blowing up.

I'm basically merging the LAPP appliance and the Nginx+PHP-fastcgi appliance. So I'm sure I've done something wrong. My guess would be because I removed Apache entirely in the new plan file, and Turnkey depends on Apache?

The current state of my definitions/whatever you call them is here: https://github.com/deutrino/lepp/tree/decompose-base-lapp

Errors are thus:

Executing: /lib/systemd/systemd-sysv-install disable shellinabox
Created symlink /etc/systemd/system/multi-user.target.wants/shellinabox.service -> /usr/lib/systemd/system/shellinabox.service.
Created symlink /etc/systemd/system/multi-user.target.wants/stunnel4@shellinabox.service -> /lib/systemd/system/stunnel4@.service.
Failed to enable: Invalid argument.
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/sshd
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/sslcert
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/stunnel
Created symlink /etc/systemd/system/stunnel4.service -> /dev/null.
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/sysctl
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/vim.tiny
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/vim (vim) in auto mode
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/webmin-cats
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/webmin-conf-stunnel
Created symlink /etc/systemd/system/multi-user.target.wants/stunnel4@webmin.service -> /lib/systemd/system/stunnel4@.service.
Failed to enable: Invalid argument.
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/webmin-defmodule
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/webmin-enable
Synchronizing state of webmin.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable webmin
Created symlink /etc/systemd/system/multi-user.target.wants/webmin.service -> /lib/systemd/system/webmin.service.
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/webmin-fix-modules
Use of uninitialized value $type in chop at /usr/share/webmin/webmin/webmin-lib.pl line 213.
Use of uninitialized value $type in string eq at /usr/share/webmin/webmin/webmin-lib.pl line 217.
Installed Linux RAID in /usr/share/webmin/raid (676 kb)
Use of uninitialized value $type in chop at /usr/share/webmin/webmin/webmin-lib.pl line 213.
Use of uninitialized value $type in string eq at /usr/share/webmin/webmin/webmin-lib.pl line 217.
Installed Logical Volume Management in /usr/share/webmin/lvm (548 kb)
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/webmin-fw
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/webmin-handy-log
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/webmin-history
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/webmin-theme
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/webmin-updates
fab-chroot build/root.patched --script /turnkey/fab/common/conf/turnkey.d/zz-ssl-ciphers
tmp/chroot-script.ucyeNx/zz-ssl-ciphers: line 31: a2enmod: command not found
make: *** [/usr/share/fab/product.mk:540: build/stamps/root.patched] Error 127

 

 

Forum: 
deutrino's picture

hmm, actually looks like the script zz-ssl-ciphers is failing here:

CONF="/etc/apache2/mods-available/ssl.conf"
if [ -f "$CONF" ]; then
    sed -i "s|^\(\s*SSLCipherSuite\s\+\).*$|\1${SECURE_CIPHER_LIST}|g" $CONF
    a2enmod ssl
    a2enconf security
fi

it's detecting that file because that file exists, even though I removed Apache from the plan file, etc. Verified in my root.patched filesystem. Maybe it's coming from the bootstrap?

deutrino's picture

Aha:

fab-apply-overlay /turnkey/fab/common/overlays/apache build/root.patched

but why?

deutrino's picture

Still don't know why 'make' is applying apache-related overlays etc, however, I have submitted one pull request which fixes a bug in the zz-ssl-ciphers script: https://github.com/turnkeylinux/common/pull/161

deutrino's picture

So I've gotten as far as 'make' running common configuration scripts, and it's running all the apache ones in /turnkey/fab/common/conf along with everything else.

I'm not sure if these scripts are supposed to be 'reentrant' (in that they exit gracefully if apache is not present) or if they are being executed by mistake or what.

Just for one example though, /turnkey/fab/common/conf/apache-vhost does not test for the presence of an apache config file before attempting to run 'sed' on it. There are similar problems in other common conf files.

If these files are supposed to be 'reentrant' like I described, I can submit a pull request once I patch all the ones that are failing on my build because I do not have apache installed.

deutrino's picture

aha, the Makefile.

I hope at some point to be familiar enough to contribute to the documentation for the development process.

Jeremy Davis's picture

I went straight to your code and didn't double check the timestamps on your post against your repo and was quite perplexed by what might be going wrong (FWIW the makefile was my guess but it was updated in your code repo!?). But after reading this whole thread it became clear...! :)

I suspect that there is an element of "curse of knowledge" going on here re the docs and you missing the Makefile, although I did double check the docs and the Makefile does get quite a few mentions:

root@tkldev4 .../products/tkldev# grep -ir makefile docs/
docs/tips.rst:root.sandbox depends on root.patched in the Makefile so after removing
docs/tips.rst:Did you know that the Makefile is self documenting?::
docs/tips.rst:    2) product Makefile
docs/appliance-checklist.rst:Makefile
docs/appliance-checklist.rst:    `Makefile `_.
docs/README.rst:      3 core/Makefile
docs/README.rst:    root@tkldev fab/products# cat core/Makefile 
docs/README.rst:       5 lamp/Makefile
docs/appliance-buildcode-dir.rst:   |-- Makefile
docs/development/howto-new-app.rst:        These common bases are used via the Makefile, here is a list of appliances which use
docs/development/howto-new-app.rst:        want to do is create a Makefile.
docs/development/howto-new-app.rst:            all appliance-base specific common makefiles must be included BEFORE turnkey.mk
docs/development/howto-new-app.rst:        For our lamp based appliance our Makefile will be as follows
docs/development/howto-new-app.rst:        .. code-block:: Makefile
docs/development/howto-new-app.rst:Makefile
docs/development/howto-new-app.rst:    1. Copy the makefile from core
docs/development/howto-new-app.rst:    2. Set any appropriate build flags within the makefile
docs/development/walkthrough.rst:Makefile
docs/development/walkthrough.rst:	root@tkldev products/core# cat Makefile 
docs/development/walkthrough.rst:The `Makefile`_ includes `common/mk/turnkey.mk`_, which defines default values for
docs/development/walkthrough.rst:Makefile. It's designed to be highly configurable and extensible.
docs/development/walkthrough.rst:.. _Makefile: https://github.com/turnkeylinux-apps/core/blob/master/Makefile
docs/development/new.rst:  the ``Makefile`` and ``overlay/etc/confconsole/services.txt``.
docs/development/new.rst:start with the ``Makefile``, ``plan`` and finally ``conf.d and

Having said that the TKLDev docs are a bit of a mess. Lots of people have contributed in the past and I have added new bits and updated some bits but others haven't been touched for ages... A fresh set of eyes over that would be incredibly useful! :) TBH, perhaps it's better to edit the docs before you become too familiar with TKLDev?!

PS I tried building using your buildcode and it successfully built to ISO. I didn't test the ISO itself though.

deutrino's picture

Yeah, got it building yesterday, going to test and see if it actually works today :D

My main observations with the docs are that they're hard to follow - I have like 8-10 tabs of docs open right now and jump around a lot - so of the many mentions of the Makefile, none happened to be at the right places where I was looking while hacking on this yesterday! Mainly, it seems like there isn't a single linear "flow" thru the documentation for somebody trying to get oriented to using TKLdev. That, and the outdated bits that are sprinkled around.

I don't want to over-promise, but if I continue to get more involved, I would be happy to contribute to docs, I actually enjoy it and am pretty good at it. Time will tell!

 

Jeremy Davis's picture

My main observations with the docs are that they're hard to follow - I have like 8-10 tabs of docs open right now and jump around a lot - so of the many mentions of the Makefile, none happened to be at the right places where I was looking while hacking on this yesterday! Mainly, it seems like there isn't a single linear "flow" thru the documentation for somebody trying to get oriented to using TKLdev. That, and the outdated bits that are sprinkled around.
Great feedback, thanks! I suspect that part of the issue is that most of the docs were written by Liraz many years ago. Then I've added to them and tweaked bits here and there, but not revised them start to finish...

I think that probably the way to go would be to have 2 (or perhaps even 3) "sets" of docs. A high level overview and a lower level, more detailed view (with perhaps a mid level view as well?).

If you do get a chance to have a look, please do as documentation is generally an area where we would love to do much better. I have tried to make improvements along the way, but most of my efforts re development docs have been adding new info rather that improving what already there and curse of knowledge is always an issue.

Add new comment