Forum › Forums › antiX-development › antiX Respins › antix +s6/66 -sysv -runit
- This topic has 13 replies, 4 voices, and was last updated Feb 18-5:18 pm by notospam.
-
AuthorPosts
-
December 16, 2019 at 5:02 am #30729Member
fungalnet
1st some history/background:
Back some time ago an alternative to sysv was developed called daemontools and people liked it. From it runit was cloned, very similar but started from scratch, to be as small, as light, as simple, and as responsive as hw itself. Runit set some goals for its development, kept being refined and eliminating any bugs, it worked on as many architectures as people could get their hands on, and the chief runit man decided to put it to bed.
While runit was running s6 (and a few others) took different aims based on the same daemontool idea. Runit was being overly simplistic and therefore limited, s6 was designed not to just handle the needs of a pc or a pocket device but be able to handle the complexities of the largest machines conceived (I think). While runit was placed to rest, it is being kept alive and polished by Void, s6 keeps on maturing. I believe it is nearing 10y in development. The two are like comparing a 70s local race car to a 24hr LeMans racer of the future.
66 is the management front for s6 that works for common mortals. Using s6 out of the box (from skarnet not debian) requires much previous knowledge and some more studying of s6. It is not a plug and play system. 66 makes it plug and play.So with the courage that anti provided (to publish a runit-antiX iso) and with admitted little investigation I undertook the task of converting a 19 installation to s6 and 66. I also had the faith it would work since the 66 developer/s would get a quick success from trying it (adelie, void, alpine, funtoo, devuan) and since 66 is native in void now, I had succeeded in void myself. But debian is a very different monster.
The first mistake was not to study antiX-runit as closely. I realized right away that it was not like void and didn’t spend time to see how it actually worked (with sysvinit on its side).Basically you get the installation running, as you want it to, and then exit and work from chroot. This helps if you don’t want to crash reboot/shutdown since what is doing this properly will not be there and what replaces it will not work with the old system in memory. So there would be a chance of corrupting data on all mounted volumes when you just pull the plug on it (sort of speak).
The one way is to begin by struggling to make what is on debian as s6, and removing runit/sysvinit.
The other way (suggested by the 66 developer) is to leave things as they are and just replace /usr/bin/init after you installed the proper software. Debian has first incorporated execline in a different place than it was designed to work by skarnet, so s6-rc can’t work. Also, s6 on buster and testing is 2 versions back, the real current software is 2.9 not 2.7 and it is only on sid, still incomplete and wrongfully packaged. You can install it (from sid) and take all its tools and move them/copy them to /usr/bin/. Then the s6 skarnet libraries are not completely adopted, s6-linux-utils netw..-utils, etc. have been left out. So here is a set of instructions on how to properly install the real software from skarnet and obarun (66) into your antix. After having some minor issues the 66 developer (Eric Vidal) came to rescue me and here is what he advised as a complete procedure:– update and install git with apt (if it is not there already, I don’t remember)
Note: % (user) # (root)
% cd /tmp
% git clone https://github.com/skarnet/skalibs
% git clone https://github.com/skarnet/execline
% git clone https://github.com/skarnet/s6
% git clone https://github.com/skarnet/s6-rc
% git clone https://github.com/skarnet/s6-linux-utils
% git clone https://github.com/skarnet/s6-portable-utils
% git clone https://framagit.org/obarun/oblibs
% git clone https://framagit.org/obarun/66
% git clone https://framagit.org/obarun/66-tools
% git clone https://framagit.org/obarun/boot-66serv
% git clone https://framagit.org/pkg/observice/tty_instance-66serv(remember to return to /tmp after each step/group)
% cd skalibs
% ./configure –bindir=/usr/bin
% sudo make install% cd ../execline
% ./configure –bindir=/usr/bin –with-lib=/usr/lib/skalibs
% sudo make install% cd ../s6
% ./configure –bindir=/usr/bin –with-lib=/usr/lib/skalibs –with-lib=/usr/lib/execline
% sudo make install% cd ../s6-rc
% ./configure –bindir=/usr/bin –with-lib=/usr/lib/skalibs –with-lib=/usr/lib/execline –with-lib=/usr/lib/s6
% sudo make install% cd ../s6-linux-utils
% ./configure –bindir=/usr/bin –with-lib=/usr/lib/skalibs
% sudo make install% cd ../s6-portable-utils
% ./configure –bindir=/usr/bin –with-lib=/usr/lib/skalibs
% sudo make install% cd ../oblibs
% ./configure –bindir=/usr/bin –with-lib=/usr/lib/skalibs –with-lib=/usr/lib/execline
% sudo make install% cd ../66
% ./configure –bindir=/usr/bin –with-lib=/usr/lib/skalibs –with-lib=/usr/lib/execline –with-lib=/usr/lib/s6 –with-lib=/usr/lib/s6-rc –with-lib=/usr/lib/oblibs
% sudo make install% cd ../66-tools
% ./configure –bindir=/usr/bin –with-lib=/usr/lib/skalibs –with-lib=/usr/lib/execline –with-lib=/usr/lib/oblibs
% sudo make installBe carefull of the single quote at –KEYMAP option. Also, you can omit all options except –bindir and edit manually the /etc/66/boot.conf. It’s up to you – in this case the hostname is set as 66 and TZ is out in the middle of nowhere 🙂 your keymap is gr in honor of “Marinos Antipas” 😛
% cd ../boot-66serv
% ./configure –bindir=/usr/bin –HOSTNAME=66 –TZ=Pacific/Noumea –KEYMAP=’!gr’
% sudo make install% cd ..
% sudo cp tty_instance-66serv/trunk/tty@ /usr/share/66/serviceNow you are ready to configure the system:
– Edit the /etc/66/init file and add the -m option to 66-boot as:
#!/usr/bin/execlineb -P
66-boot -mMake copies of skeleton files at /usr/sbin (debian use /usr/sbin)
# cp -f /etc/66/{init,reboot,poweroff,shutdown,halt} /usr/sbin
There is a tree of services that are needed to boot the system (mount file systems, checks fs, set hostname, devices, etc.) that are all inside the boot-66serv. You simply create a tree (bundle of services) named boot and enable the boot bundle in it as a single service.
# 66-tree -n boot
# 66-enable -t boot bootThen you create at least one tree, by convention it is called root, and enable ttys and services dhcpcd, dbus, wpa_supplicant etc.
# 66-tree -cnE root
# 66-enable tty@tty{1,2,3,4,5} dhcpcd .. etc.dhcpcd works out of the box as it is in obarun, dbus needs some editing of dbus syntax as used on antix, slim (if you want to run it) I have a copy of a service file below that should work. Anything else you have to see the template of a service and write one. Anything that is already made is on https://framagit.org/pkg/observice
You are done you can now boot if you are on chroot or you can try to reboot with this command below:
# 66-hpr -r -f
Extra configuration
create the slim service at /usr/share/66/service/slim. This is frontend :
[main]
@type = classic
@description = “slim daemon”
@user = ( root )[start]
@build = auto
@execute = (slim -d)enable it
# 66-enable slim
For how and why things work the way they do see the wiki at obarun (last link).
Sources:
http://cr.yp.to/daemontools.html
http://smarden.org/runit/
https://skarnet.org/software/s6/
https://web.obarun.org/software
https://wiki.obarun.org/doku.php?id=66introPS: This should work equally on devuan, mx, or anything debian based, but it is meant for antix which is trully a non-systemd distribution and not something of a gray shade.
PS2: As s6 and 66 is not handled by apt don’t expect it to magically be upgraded when new editions come out, so keep an eye on framagit for 66 and github/skarnet for s6 updates. If you knew nothing about init and service supervision before this, give 66 a couple of weeks and it will all make sense. If you do know about them, good for you! Tell us how it compares.
PS3: Will this work on an antiX live system? I don’t know yet, you tell me or I’ll tell you when I try it.
PS4: This is all written in C and is meant to be portable anywhere and this far it seems to be. Void has as many or more architectures it supports and two different C libraries (gnu and musl) and all their software is crosslinked to work on all combinations. Debian twisted and scraped s6 around and didn’t even apply it to all architectures, which are all glibc. Arch is all amd64 and glibc, nothing else. It is good to keep such things in mind … you can like manjaro and mint all you want but what have they contributed to development?
PS5 (final): Expect computer scientists and mathematicians in universities to really appreciate s6 and 66. Expect state agency executives and large corporations to continue liking systemd “and keep using the irrational argument” <systemd is better than sysvinit> as an excuse. The future is here!
- This topic was modified 3 years, 4 months ago by anticapitalista.
- This topic was modified 3 years, 4 months ago by fungalnet.
anti-X - Adélie - obarun - systemd Free Space
December 21, 2019 at 4:00 pm #31022Member
oops
December 22, 2019 at 3:45 pm #31046Member
fungalnet
December 23, 2019 at 12:28 pm #31076Member
fungalnet
::On Sid today while base-passwd was upgraded and configured it asked to remove “users log and s6-log” because “they do not match Debian’s default”. They warn that software might not work because of those parasitic extra users on the system.
This is 5-6 days before they announce the election results from their init-freedom-act of 2019.
In about 7 years from now they will be voting on the logger-freedom-resolution of 2026I want to download the latest debian image and installer and when it asks me for a user name I will enter systemd-log …. Yeap that is my name from now on, I will switch my nickname I will be systemd-log
anti-X - Adélie - obarun - systemd Free Space
December 23, 2019 at 2:14 pm #31077Anonymous
::base-passwd was upgraded and
[..]
This is 5-6 days before they announce the election results from their init-freedom-act of 2019.^— Flawed reasoning ~~ Post hoc ergo propter hoc fallacy.
Within the base-passwd package, nothing remarkable has been changed recently. In fact, from 2014 onward, has remained unchanged except for administrivial changes to its packaging.
The onscreen message presented during the upgrade operation
https://sources.debian.org/src/base-passwd/3.5.47/debian/postinst/#L93
is necessary (IOW, the “They warn” aspect is not nefarious) and is correct. On a DEBIAN-BASED SYSTEM, problems can ensue if accounts (or accunt datials of) UIDs 0-99 (and some UIDs in the 60000+ range) differ from what the debian mechanisms (apt|dpkg|debconf) expect.Hey, speaking of debconf, and the “seems fishy” message(s) seen during pkg install|upgrade operations… we can even “relive the moment” to revisit the changes (or proposed changes), inspecting the details, and alter the previous selections:
- sudo dpkg-reconfigure
base-passwd
tip: Usually, probably always, any operation that presents debconf prompts can be revisited via “dpkg-reconfigure”
To know which packages are “debconf aware” and have (re)settable details, we can:
apropos debconf
^—v
debconf-get-selections | grep (whatever query word or phrase)
but it may be more expedient to just inspect the content of
/var/cache/debconf/config.datAnyhow, aside from triggering the debconf postinst mechanism, the base-passwd pkg only provides (installs) the “update-passwd” utility and its associated manpage + docs. If you are concerned (or just curious), you can read in text editor the provided /usr/share/doc/base-passwd/README …along with the files (use the “locate” command to find ’em) “group.master” and “passwd.master”
During day-to-day usage, we might not notice problems stemming from mismatched-vs-expected details of the UID[1-99] “system accounts”… but understandably problems will occur if|when “files needed by daemon suchandsuch are expected to be owned by member|group suchandsuch, but…”
December 23, 2019 at 2:17 pm #31078Anonymous
::Above, the forum software inexplicably split the following into separate lines
sudo dpkg-reconfigure base-passwdDecember 23, 2019 at 2:21 pm #31079Member
fungalnet
::I am reminding you only that on a pure debian someone can install s6 and its associated libraries and tools. s6log is a logging tool for s6 supervision, which if somene desired could be a supervisor for services on top of systemd. I think the log account was there from antix sysv/runit (not sure). I am not sure whether if I create a user in a vacant 0-99 range and run dpkg –configure base-passwd whether it would try to remove it. According to what you say it would, while if I gave it a 2000 id it wouldn’t. Right?
anti-X - Adélie - obarun - systemd Free Space
December 23, 2019 at 2:25 pm #31080Anonymous
::Really, the degree to which “They” (maintainers of base-passwd package) conditionally explain the considerations related to various proposed changes is quite admirable:
https://sources.debian.org/src/base-passwd/3.5.47/debian/templates/
December 23, 2019 at 2:26 pm #31081Member
oops
December 23, 2019 at 2:45 pm #31082Anonymous
::If […] run dpkg –configure base-passwd whether it would try to remove it.
dpkg-configure (one word, the filename contains a hypen)
The best answer to your latest question is “try it, and find out for yourself”.
“IT” does not do anything aside from presenting you with choices (Y vs N, or pick from multiple, or…)
You get to choose. You can revisit later, to inspect and|or revise any of the choices you had elected previously.
Understand that I am not using S6, idunno what choices are appropriate on your system.“if I gave it a 2000 id”
Maybe I’m pedantically tripping over the wording.
Unknown to me whether S6 setup supports ad hoc choice of UID for accountname suchandsuch.
Yes, I expect the debconf prompt would not have been triggered for UID 2000, unless the accountname conflicted with that of a proposed, about-to-be-created, same named account.December 23, 2019 at 2:53 pm #31083Member
fungalnet
::While digging a little deeper I noticed how anti’s implementation of runit has a runit-log user and it has a high id number, so this wasn’t bothering base-passwd. It is also odd how on the 2nd buster/19 s6 installation from git s6log was not added to the system. On sid where I installed s6 from debian’s repository s6log exists … both systems work fine and logging starts after pid1.
The warning “Debian’s software may not work” because a user with a certain number is there puzzles me. I find it unnecessarily intrusive.
anti-X - Adélie - obarun - systemd Free Space
December 23, 2019 at 3:19 pm #31086Anonymous
::skidoo pointed asks:
unnecessarily intrusive
or
extremely accommodating, but prone to encountering “false positives”
???sudo dpkg-reconfigure debconfnotice that ” critical | high | medium | low ”
is pre-configured (by debian, unchanged by antiX) to use medium.Damned if “They” do, damned if they don’t.
If we REALLY want toworrylearn about what goes on, and want to micromanage all the details, we’re free to choose “low”.December 23, 2019 at 3:24 pm #31087Anonymous
::The point of that last post:
go ahead, set it to “low” and run the system for a few days… and discover (or not) what degree of “intrusiveness” might be a more laudable pre-configured default.February 18, 2020 at 5:18 pm #32896Membernotospam
::Nice guide. I can’t build s6-rc and oblibs on antix 19 stable.
I get the following error building s6-rc:
% git clone https://github.com/skarnet/s6-rc
% cd ../s6-rc
% ./configure –bindir=/usr/bin –with-lib=/usr/lib/skalibs –with-lib=/usr/lib/execline –with-lib=/usr/lib/s6
% sudo make install$ sudo make install exec gcc -o s6-rc-fdholder-filler -pipe -Wall -std=c99 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -ffunction-sections -fdata-sections -O2 -fomit-frame-pointer -fno-stack-protector -Wl,--sort-section=alignment -Wl,--sort-common -Wl,--gc-sections src/s6-rc/s6-rc-fdholder-filler.o -ls6 -lskarnet /usr/bin/ld: cannot find -ls6 collect2: error: ld returned 1 exit status make: *** [Makefile:138: s6-rc-fdholder-filler] Error 1I get the following error building oblibs:
% git clone https://framagit.org/obarun/oblibs
% cd ../oblibs
% ./configure –bindir=/usr/bin –with-lib=/usr/lib/skalibs –with-lib=/usr/lib/execline
% sudo make installsudo make install exec gcc -o liboblibs.so.xyzzy -pipe -Wall -fPIC -std=c99 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -ffunction-sections -fdata-sections -O2 -fomit-frame-pointer -fno-stack-protector -Wl,--sort-section=alignment -Wl,--sort-common -Wl,--hash-style=both -shared -Wl,-soname,liboblibs.so.0.0 src/str/get_uidbyname.lo src/str/dirname.lo src/str/scan_timeout.lo src/str/scan_uid.lo src/str/get_nbline.lo src/str/obstr_sep.lo src/str/obstr_equal.lo src/str/get_rstrlen_until.lo src/str/scan_isspace.lo src/str/obstr_sub.lo src/str/auto.lo src/str/get_flags.lo src/str/get_len_until.lo src/str/get_rlen_until.lo src/str/get_wasted_line.lo src/str/get_sep_before.lo src/str/scan_uint32.lo src/str/scan_mode.lo src/str/scan_uidlist.lo src/str/basename.lo src/str/get_namebyuid.lo src/str/scan_uidlist_wdelim.lo src/str/obstr_dup.lo src/str/obstr_trim.lo src/str/obstr_replace.lo src/directory/dir_create_parent.lo src/directory/dir_create_tmp.lo src/directory/dir_beabsolute.lo src/directory/dir_create.lo src/io/log.lo src/mill/mill.lo src/mill/mill_config.lo src/sastr/sastr_clean_string.lo src/sastr/sastr_split_string_in_nline.lo src/sastr/sastr_clean_string_wdelim.lo src/sastr/sastr_clean_element.lo src/sastr/sastr_get_double_quote.lo src/sastr/sastr_find.lo src/sastr/sastr_replace_all.lo src/sastr/sastr_split_element_in_nline.lo src/sastr/sastr_rebuild_in_nline.lo src/sastr/sastr_add_string.lo src/sastr/sastr_len.lo src/sastr/sastr_cmp.lo src/sastr/sastr_replace.lo src/sastr/sastr_rebuild_in_oneline.lo src/sastr/sastr_dir_get.lo src/sastr/sastr_reverse.lo src/memory/free_mem.lo src/memory/obstr_alloc.lo src/memory/obstr_del.lo src/files/file_write_unsafe.lo src/files/file_create_empty.lo src/files/file_get_size.lo src/files/file_readputsa.lo src/files/file_openclose_readonly.lo src/environ/environ_get_envfile_error.lo src/environ/environ_clean_line.lo src/environ/environ_get_val_of_key.lo src/environ/environ_get_num_of_line.lo src/environ/environ_get_val.lo src/environ/environ_get_clean_env.lo src/environ/environ_clean_nline.lo src/environ/environ_get_key_nclean.lo src/environ/environ_rebuild_line.lo src/environ/environ_remove_unexport.lo src/environ/environ_get_envfile_n_merge.lo src/environ/environ_substitute.lo src/environ/environ_clean_envfile.lo src/environ/environ_add_key_val.lo src/environ/environ_get_envfile.lo src/opts/getopt_args.lo -lskarnet -lexecline /usr/bin/ld: cannot find -lexecline collect2: error: ld returned 1 exit status make: *** [Makefile:121: liboblibs.so.xyzzy] Error 1Any ideas what am I missing?
- This reply was modified 3 years, 2 months ago by notospam.
-
AuthorPosts
- You must be logged in to reply to this topic.