The officially official Devuan Forum!

You are not logged in.

#1 Re: Off-topic » deb.sury.org now requires systemd » 2020-03-03 14:40:10

I'm kind of disillusioned by Sury's response to this.  His cavalier response that - well, devuan wasn't ever supported anyway just isn't helpful.

I'll guess I'll try to continue rebuiding new releases -- without systemd baked in -- as time allows, we'll have to see how that goes.   it may become more difficult over time as sury/debian change/tweak their packages to further rely on systemd quirks, api's and functions.

I don't necessarily see a problem with moving the responsibility for tmp files management over to opentmpfiles, provided that is then made available as a package/depencency.   But it shouldn't require a systemd equivs package, that seems hacky and not a sensible longterm solution.    His code, if we're going to use it should check to see which command is available, and then use it.

I haven't looked at exactly what the PHP-FPM code is doing when it reports the "systemd monitor" stuff to syslog, I don't know if it's trying to negotiate with systemd on some level, or if it's just making information available.   Regardless, it's writing unnecessary log lines and executing un-necesary code, so it seems better to me to build a package --without-fpm-systemd.      So that the code isn't there and isn't running.

#2 Re: Off-topic » deb.sury.org now requires systemd » 2020-03-02 00:25:55

Havent tried, you'd probably need to grab the dpg source from the repo, and try rebuild them on the newer release.   These binaries were built on deb8, specifically Devuan Jessie. 

If I get a chance next week, I'll try to run a rebuild on devuan Ascii (~ deb9) , see if i hit any roadblocks.    For the moment, all I can say is they seem to work on Jessie.

I see there's some new discussion back on sury's github about putting in an equivs package, linking systemd-tmpfiles to opentmpfiles.   That might help if the backported code stops working but it's not a complete fix IMO -- since his PHP-FPM is now built, with a specific compile time option enabling systemd integration;;    so it's not just about tmp files call in the init script - his php-fpm builds now look towards systemd api's for general process management.  Something that now needs to be undone by building php differently..

Bow to the new systemd gods, so enforced on us by the debian peeps -- or try to maintain a separate set of builds without these recent changes to the packaging/build process.    What I've put out there could be a start I guess;  but there's still a question of who can maintain it goign forward, or even how it gets supported.

#3 Re: Off-topic » deb.sury.org now requires systemd » 2020-02-25 20:32:44

Hi All,

This is a small update, I've now installed the packages locally and they seem to work for my Devuan.   

I've rebuilt them with the tag devuan1~2, and reverted one more patch, which moved some pre/postrm commands into the systemd unit file.

It's a make-it-work build..  ie, whatever it takes to make it build on Jessie.    It appears to work, but hasn't been properly or thoroughly tested.   

   * Make it work (Devuan Jessie)
   * Always disable systemd when building
   * Revert, Remove upstart support, use systemd-tmpfiles (cbd5f429)
   * Revert, Move update-alternatives call to systemd start script (718539bc)

updated amd64-debs (for jessie) and dpkg sources are here:
   https://mega.nz/#!ohAh1IhK!uuyHxOKzhaol … ggQF0u_tN4

Regards,

JXX77

#4 Re: Off-topic » deb.sury.org now requires systemd » 2020-02-24 03:04:24

Ok folks,

Here's where I've got to..  I think, I might just have everything rebuilt on devuan1/jessie .    -- That's php5.6 thru to 7.4.3.

Deb Sources and amd64 binary/debs are linked below.

https://mega.nz/#!V4YhnS6C!V1K35cGW_I5Y … tTbsb7WC8M

#5 Re: Off-topic » deb.sury.org now requires systemd » 2020-02-23 17:57:33

I've got an apparently working but as-yet untested build,  using sury's debian sources for the main - but reverting just the changes made to remove support for non-systemd builds.    And a small change to debian/rules to always consider systemd as disabled.

This seems to work for all php versions currently on devuan Jessie,  just apt-get the source from the sury repo and make the below changes, and rebuild.   (dpkg-buildpackage -rfakeroot )

Before these php builds can be installed, there are a couple of other packages needed from the sury repo - namely apt-get source libsodium, php-defaults, and pkg-php-tools.

However unless anyone is offering to maintain the php repo for devuan - I cetainly can't.. php and particularly this packaging, are very complex animals.  i don't think any major reworking/changes other than what is strictly necessary should be done.

#diff -ruN a/debian/changelog b/debian/changelog
--- a/debian/changelog  2020-02-22 20:56:57.583439580 +0000
+++ b/debian/changelog  2020-02-22 21:54:20.175382451 +0000
@@ -1,3 +1,10 @@
+php7.2 (7.2.28-1+0~20200220.36+devuan1~1.gbpcf4a75) unstable; urgency=medium
+
+  * Make it work (Devuan Jessie)
+  * Revert the removal of systemd/upstart functions
+  * Always disable systemd options when building
+
+ -- JXX77 <jxx77@dev1galaxy>  Sat, 22 Feb 2020 20:58:55 +0100
+
 php7.2 (7.2.28-1+0~20200220.36+debian8~1.gbpcf4a75) unstable; urgency=medium

   ** SNAPSHOT build @cf4a75fa49ec4131a9ec9b1774402ea59c6993da **
diff -ruN a/debian/control b/debian/control
--- a/debian/control    2020-02-22 20:56:57.583439580 +0000
+++ b/debian/control    2020-02-22 21:54:20.171382451 +0000
@@ -10,10 +10,10 @@
                bison,
                chrpath,
                debhelper (>= 9.20150101),
-               default-libmysqlclient-dev | libmysqlclient-dev,
+               default-libmysqlclient-dev | libmysqlclient-dev | libmariadb-dev,
                default-mysql-server <!nocheck> | mysql-server <!nocheck> | virtual-mysql-server <!nocheck>,
                dh-apache2,
-               dh-systemd (>= 1.3) [linux-any],
+               base-files [linux-any],
                dpkg-dev (>= 1.16.1~),
                firebird-dev [!hurd-any !m68k !hppa !ppc64] | firebird2.5-dev [!hurd-any !m68k !hppa !ppc64] | firebird2.1-dev [!hurd-any !m68k !hppa !ppc64],
                flex,
@@ -55,8 +55,8 @@
                libsodium-dev,
                libsqlite3-dev,
                libssl-dev,
-               libsystemd-dev [linux-any],
-               libtidy-dev (>= 1:5.2.0),
+               base-files [linux-any],
+               libtidy-dev,
                libtool (>= 2.2),
                libwebp-dev,
                libwrap0-dev,
@@ -64,7 +64,7 @@
                libxmlrpc-epi-dev,
                libxmltok1-dev,
                libxslt1-dev (>= 1.0.18),
-               libzip-dev (>= 1.0.0),
+               libzip-dev,
                locales-all | language-pack-de,
                netbase,
                netcat-traditional,
@@ -242,7 +242,6 @@
          php7.2-common (= ${binary:Version}),
          php7.2-json,
          php7.2-opcache,
-         systemd,
          tzdata,
          ucf,
          ${misc:Depends},
diff -ruN a/debian/php-fpm.init b/debian/php-fpm.init
--- a/debian/php-fpm.init       2020-02-22 20:56:57.583439580 +0000
+++ b/debian/php-fpm.init       2020-02-22 21:54:20.171382451 +0000
@@ -93,10 +93,31 @@
        return 0
 }

+do_tmpfiles() {
+    local type path mode user group
+
+    [ "$1" != no ] && V=-v
+
+    TMPFILES=/usr/lib/tmpfiles.d/php@PHP_VERSION@-fpm.conf
+
+    if [ -r "$TMPFILES" ]; then
+       while read type path mode user group age argument; do
+           if [ "$type" = "d" ]; then
+               mkdir $V -p "$path"
+               chmod $V "$mode" "$path"
+               chown $V "$user:$group" "$path"
+           fi
+       done < "$TMPFILES"
+    fi
+}
+
 case "$1" in
     start)
+       if init_is_upstart; then
+           exit 1
+       fi
        [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
-       systemd-tmpfiles --remove --create /usr/lib/tmpfiles.d/php@PHP_VERSION@-fpm.conf
+       do_tmpfiles $VERBOSE
        case "$?" in
            0)
                do_start
@@ -109,6 +130,9 @@
        esac
        ;;
     stop)
+       if init_is_upstart; then
+           exit 0
+       fi
        [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
        do_stop
        case "$?" in
@@ -120,6 +144,9 @@
         status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
         ;;
     reload|force-reload)
+       if init_is_upstart; then
+           exit 1
+       fi
        log_daemon_msg "Reloading $DESC" "$NAME"
        do_reload
        log_end_msg $?
diff -ruN a/debian/php-fpm.maintscript b/debian/php-fpm.maintscript
--- a/debian/php-fpm.maintscript        2020-02-22 20:56:57.583439580 +0000
+++ b/debian/php-fpm.maintscript        1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-rm_conffile /etc/init/php@PHP_VERSION@.conf 7.4.2-8~ php@PHP_VERSION@-fpm
diff -ruN a/debian/php-fpm.upstart b/debian/php-fpm.upstart
--- a/debian/php-fpm.upstart    1970-01-01 01:00:00.000000000 +0100
+++ b/debian/php-fpm.upstart    2020-02-22 21:54:20.175382451 +0000
@@ -0,0 +1,19 @@
+# php@PHP_VERSION@-fpm - The PHP FastCGI Process Manager
+
+description "The PHP @PHP_VERSION@ FastCGI Process Manager"
+author "Ondřej Surý <ondrej@debian.org>"
+
+start on runlevel [2345]
+stop on runlevel [016]
+
+# you can uncomment this with recent upstart
+# reload signal USR2
+
+pre-start script
+mkdir -p /run/php
+chmod 0755 /run/php
+chown www-data:www-data /run/php
+end script
+
+respawn
+exec /usr/sbin/php-fpm@PHP_VERSION@ --nodaemonize --fpm-config /etc/php/@PHP_VERSION@/fpm/php-fpm.conf
diff -ruN a/debian/rules b/debian/rules
--- a/debian/rules      2020-02-22 20:56:57.583439580 +0000
+++ b/debian/rules      2020-02-22 21:54:20.171382451 +0000
@@ -115,6 +115,10 @@
   MYSQL_SOCKET := $(MYSQL_DATA_DIR)/mysql.sock
 endif

+# Always Disable Systemd
+  CONFIGURE_SYSTEMD := --without-fpm-systemd
+  DH_SYSTEMD        :=
+
 ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),amd64 armel armhf i386 ia64 powerpc))
   CONFIGURE_DTRACE_ARGS := --enable-dtrace
 else
@@ -229,7 +233,7 @@
                --with-config-file-scan-dir=/etc/php/$(PHP_NAME_VERSION)/fpm/conf.d \
                $(COMMON_CONFIG) \
                --with-libevent-dir=/usr \
-               --with-fpm-systemd
+               $(CONFIGURE_SYSTEMD)

 export phpdbg_config = \
                --prefix=/usr --enable-phpdbg --enable-cli --disable-cgi \
@@ -257,7 +261,7 @@
 #$(info Enabled config $(ext_config))

 %:
-       dh $@ --with systemd --with apache2 --without autoreconf $(PARALLEL)
+       dh $@ $(DH_SYSTEMD) --with apache2 --without autoreconf $(PARALLEL)

 PREPARE_FILES := $(addprefix debian/,$(shell cat debian/prepare-files))

Looks like the  php7.3 and newer builds to work, you need to have build pcre2, from here;
   ( the stock pcre3-dev package is actually an older build - pcre2 is the where the current new builds are happening)

https://packages.debian.org/source/stable/pcre2
http://deb.debian.org/debian/pool/main/ … 0.32-5.dsc
http://deb.debian.org/debian/pool/main/ … rig.tar.gz
http://deb.debian.org/debian/pool/main/ … -5.diff.gz

#6 Re: Off-topic » deb.sury.org now requires systemd » 2020-02-22 01:25:05

I'm fairly confident, that this won't work.  One of the things I tried, was an empty package, called 'systemd'  -- and then i manually reverted the change to the php-fpm init file post install.   

In this way, it used a function for tmpfiles in the init file once more.  And didn't then depend on systemd-tmpfiles.

It seems that with the new php packaging, fpm is now configured and built with the option --with-fpm-systemd.     This enables HAVE_SYSTEMD at compile time and makes php-fpm itself depend on systemd functionality.     Once we get past the tmpfiles init thing, fpm itself then fails since it expects to be able to use systemd api's as part of fpm's normal operation. 

FPM starts logging this kind of thing to syslog:
[21-Feb-2020 16:22:59] NOTICE: systemd monitor interval set to 10000ms

...  so what we need is the package is compiled differently, with the option --without-fpm-systemd

essentially the debian jessie package is now not compatible with devuan jessie..    So I think we're back to needing a specific dist/build that specifically disables systemd. 

Hopefully that --without-fpm-systemd option is still available in the upstream php sources.

#7 Re: Off-topic » deb.sury.org now requires systemd » 2020-02-21 21:08:34

szutt wrote:

I guess now we have to try to compile the packages ourselves :-(

Ditto, im gonna gave to try to make a dev/builder system and see if I can revert Sury's recent changes and buid something workable.   

I'm stuck way back on on kernel 2.6, since I use drbd/openvz6 for container hosting.     Last time i checked though, various things in d9/ascii were complaining with such an old kernel, so until I find an alternative (bsd or maybe even lxc) it's jessie.

It looks like the relevant git repo is here:   
    https://salsa.debian.org/php-team/php

And at a first glance the change to try reverting, that, makes sury packages require systemd is:
https://salsa.debian.org/php-team/php/c … 1ab9285adb

and maybe also we don't need this:
https://salsa.debian.org/php-team/php/c … 00619ef550

Sury dosen't officially support devuan and seems to be drinking the debian/systemd cool-aid.   I guess we've been lucky so far...   His choice, it sucks.. but now that he's made the packaging incompatible that repo will need to be forked and maintianed separately for devuan.

Board footer

Forum Software