Bookworm and LMS once more

Hi There,

once upon a time i needed to upgrade to bookworm, because i needed PHP8. But back in time i read: LMS wont run in bookworm. So - i left everything unchanged.
However, the urge to use PHP8 has rather increased than decreased (unfortunately). So i needed to come up with a solution. My first idea: set up another server, simply to run LMS on it and leave it on bullseye.

Well - i didnt like the idea and i still dont. However, today i read somewhere in the LMS forums that bookworm and LMS work just fine on X86_64 based plattforms.

So - i downloaded a dietpi OVA to my ESXi, did the basic setup, installed LMS manually and … well… everything worked as expected… so … what exactly is not working again? Or why do we not want to use LMS on bookworm?

Sorry if the question sounds a little dumb… i am not really a newbie, but i simply lack the time to spend more time on such matters. Nevertheless - i just stumbled into this and thought it might be of interest to others as well… I really, really need PHP8. And i am just wondering why i shouldnt try to run the upgrade script to bookworm and install LMS manually. Am i missing something?

Thanks!

Searching the forum should bring up a discussion from last days LMS inactive status - #11 by innovodev

FYI: Upgraded to bookworm and LMS kept working… magic :smiley: ?

which version of LMS and perl you are running?

LMS 8.3.1 (the one from dietpi-software install 35)

And for Perl

dietpi@OldMan:~$ perl -v

This is perl 5, version 36, subversion 0 (v5.36.0) built for x86_64-linux-gnu-thread-multi

The upgrade script upgraded me to dietpi 9.0.0:
DietPi v9.0.0 (dev)

Additional info:

dietpi@OldMan:~$ uname -a
Linux OldMan 6.1.0-17-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.69-1 (2023-12-30) x86_64 GNU/Linux
dietpi@OldMan:~$ cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=9
G_DIETPI_VERSION_SUB=0
G_DIETPI_VERSION_RC=0
G_GITBRANCH='dev'
G_GITOWNER='MichaIng'
dietpi@OldMan:~$ echo $G_DISTRO_NAME $G_RASPBIAN
bookworm
dietpi@OldMan:~$ dpkg --print-architecture
amd64
dietpi@OldMan:~$ echo $G_HW_MODEL_NAME
Native PC (x86_64)

Running on a 3,5 year old NUC9i9QNB:

dietpi@OldMan:~$ sudo dmidecode -t 2 | grep Name
        Product Name: NUC9i9QNB
dietpi@OldMan:~$ sudo lscpu | grep Model
Model name:                         Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz

Id like to help more, but i dont know which kind of info you really need?
And by the way, i really wanna say thank you for the upgrade script. It really went pretty smooth and all of my software kept working without any issues now after a good 5 days of testing.

With upcoming DietPi v9, support for LMS will be added again. As you are already on v9 dev, it’s not surprising. However it should be 5.3.2 :thinking:

Did you moved to development branch by purpose? If not, you should move back to Beta or Master branch.

Hi,

i switched to dev, because it was mentioned in the instruction on first comment here:

G_DEV_BRANCH dev
bash -c "$(curl -sSf 'https://raw.githubusercontent.com/MichaIng/DietPi/dev/.meta/dietpi-bookworm-upgrade')"

I do not remember changing my Perl Version deliberately. However, this seems to indicate that the default perl version for bookworm is indeed 5.36:

If i am moving back to Master or Beta - what will exactly change? I just want to understand the risk of changing this again.

Should not be needed anymore.

Correct, it’s the Debian package version that has been updated on Bookworm Debian -- Details of package perl in bookworm

It’s related to our DietPi script only. No impact to your runing software apps.

1 Like

switched to “beta” as advised (master seems to be not available for me). However this broke my apache installation (it stopped working right after that). Switching right back to dev didnt fix it:

│ × apache2.service - The Apache HTTP Server                                                                           
││      Loaded: loaded (/lib/systemd/system/apache2.service; enabled; preset: enabled)                                  
││     Drop-In: /etc/systemd/system/apache2.service.d                                                                  
││              └─dietpi.conf                                                                                           
││      Active: failed (Result: exit-code) since Wed 2024-01-17 14:30:15 CET; 2s ago                                    
││    Duration: 18h 8min 24.128s                                                                                        
││        Docs: https://httpd.apache.org/docs/2.4/                                                                      
││     Process: 2109964 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)                             
││         CPU: 15ms                                                                                                    
││                                                                                                                      
││ Jan 17 14:30:15 OldMan systemd[1]: Starting apache2.service - The Apache HTTP Server...                              
││ Jan 17 14:30:15 OldMan apachectl[2109967]: AH00526: Syntax error on line 6 of                                        
││ /etc/apache2/sites-enabled/dietpi-nextcloud.conf:                                                                    
││ Jan 17 14:30:15 OldMan apachectl[2109967]: Invalid command 'url.redirect', perhaps misspelled or 
defined by a module 
││ not included in the server configuration                                                                             
││ Jan 17 14:30:15 OldMan apachectl[2109964]: Action 'start' failed.                                                    
││ Jan 17 14:30:15 OldMan apachectl[2109964]: The Apache error log may have more information.                          
││ Jan 17 14:30:15 OldMan systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE            
││ Jan 17 14:30:15 OldMan systemd[1]: apache2.service: Failed with result 'exit-code'.                                  
││ Jan 17 14:30:15 OldMan systemd[1]: Failed to start apache2.service - The Apache HTTP Server. 

My Apache2 config is pretty default (never changed anything):

  GNU nano 7.2                        /etc/apache2/sites-enabled/dietpi-nextcloud.conf                                  # Derived from:
# - Apache: https://github.com/nextcloud/server/blob/5de3028f667afb807d1c682238340208e56d6b91/.htaccess
# - Nginx:  https://github.com/nextcloud/documentation/blob/61b6e9400bf8d40b3dfd7f4816575a9eebafe759/admin_manual/installation/nginx-subdir.conf.sample

# Redirect webfinger and nodeinfo requests to Nextcloud endpoint:
url.redirect += (
        "^/.well-known/webfinger" => "/nextcloud/index.php/.well-known/webfinger",
        "^/.well-known/nodeinfo" => "/nextcloud/index.php/.well-known/nodeinfo"
)

$HTTP["url"] =~ "^/nextcloud($|/)" {
        # Hardening
        # - Directories
        $HTTP["url"] =~ "^/nextcloud/(build|tests|config|lib|3rdparty|templates|data)($|/)" { url.access-deny = ("") }
        # - Files
        $HTTP["url"] =~ "^/nextcloud/(\.|autotest|occ|issue|indie|db_|console)" { url.access-deny = ("") }
        # - Directory listing
        dir-listing.activate = "disable"
        # - Security and cache control headers for static resources
        $HTTP["url"] =~ "\.(css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map|woff2?)$" {
                setenv.add-response-header += (
                        "Referrer-Policy" => "no-referrer",
                        "X-Content-Type-Options" => "nosniff",
                        "X-Download-Options" => "noopen",
                        "X-Frame-Options" => "SAMEORIGIN",
                        "X-Permitted-Cross-Domain-Policies" => "none",
                        "X-Robots-Tag" => "noindex, nofollow",
                        "X-XSS-Protection" => "1; mode=block",
                        "Cache-Control" => "public, max-age=15778463",
                )
        }
        # Rewrites
        url.rewrite-once += (
                "^/nextcloud/remote/(.*)" => "/nextcloud/remote.php/$1",
                "^/nextcloud/ocm-provider($|/\?.*)" => "/nextcloud/index.php$1"
        )
        url.rewrite-if-not-file += (
                "^/nextcloud/((core/ajax/update|cron|public|remote|status|ocs/v[12]|richdocumentscode(_arm64)?/proxy)\.>                "^/nextcloud(.*)" => "/nextcloud/index.php$1"
        )
}

Any chance on helping me to fix that?

Needed my Nextcloud urgently and restored a backup from last week. That also rolled back my bookworm upgrade. But never mind. I will simply leave it like that for another while.

Tried upgrading to bookworm again (the same way as before) - this time neither LMS nor Nextcloud is working. Rolling back again.

did you use master or beta branch this time? At least you would require beta as we will add support for LMS back on v9.

For Apache it would be needed to further investigate because your dietpi-nextcloud.conf file seems to be the one for Lighttpd and not Apache. This naturally leads to the failure of Apache. Would be interesting to see your install log

For reference our configs

Just checked on a demo system and I’m getting correct configuration.

[  OK  ] DietPi-Software | curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/beta/.conf/dps_114/apache.nextcloud.conf -o apache.nextcloud.conf
[  OK  ] DietPi-Software | mv apache.nextcloud.conf /etc/apache2/sites-available/dietpi-nextcloud.conf
root@DietPiOPi5:~# cat /etc/apache2/sites-enabled/dietpi-nextcloud.conf
# Location: /etc/apache2/sites-available/dietpi-nextcloud.conf
# Based on: https://github.com/nextcloud/documentation/blob/61b6e9400bf8d40b3dfd7f4816575a9eebafe759/admin_manual/installation/source_installation.rst#apache-web-server-configuration
<Directory /var/www/nextcloud>
        Require all granted
        AllowOverride All
        Options FollowSymLinks

        <IfModule mod_dav.c>
                Dav off
        </IfModule>

        # Mute outdated admin panel warning
        Header set X-XSS-Protection "1; mode=block"
</Directory>

# Redirect webfinger and nodeinfo requests to Nextcloud endpoint
Redirect 301 /.well-known/webfinger /nextcloud/index.php/.well-known/webfinger
Redirect 301 /.well-known/nodeinfo  /nextcloud/index.php/.well-known/nodeinfo
root@DietPiOPi5:~#

OK I found the issue. It’s the patch to DietPi v9.0 and not the Debian Bookworm upgrade.

[  OK  ] DietPi-Patch | Patched to DietPi v8.25
[ INFO ] DietPi-Patch | Patching to DietPi v9.0...
[  OK  ] DietPi-Patch | mv /etc/apache2/sites-available/dietpi-nextcloud.conf /etc/apache2/sites-available/dietpi-nextcloud.conf.dietpi-old
[  OK  ] DietPi-Patch | curl -sSfo /etc/apache2/sites-available/dietpi-nextcloud.conf https://raw.githubusercontent.com/MichaIng/DietPi/dev/.conf/dps_114/lighttpd.nextcloud.conf
[  OK  ] DietPi-Patch | Patched to DietPi v9.0

However, the update creates a backup file that you should be able to restore.

EDIT: we already merged a fix into DEV branch DietPi-Update | Fix Nextcloud Apache configuration URL by Joulinar · Pull Request #6863 · MichaIng/DietPi · GitHub

1 Like

Wow - that was fast :wink:
Thank you for the research!

My current thoughts:
1.) You said it shouldnt be necessary to switch to the dev branch… so i tried to upgrade to bookworm yesterday night while staying on master (i simply wanted bookworm back so badly). Worked again nice and smoothly. Which matches with your research.
2.) Unfortunately, i cannot test restoring the backup of said config file, because i restored a system backup yesterday (twice actually) in order to roll back to bullseye.

However, i would like to express my thanks and my sincere gratitude for your continous help.

THANK YOU

I also setup a small testvm, installed my usual software titles, switched to the DEV branch and upgraded again to bookworm and i can confirm that the issue has been successful mitigated.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.