Opened 2 years ago
Closed 2 years ago
#5153 closed enhancement (fixed)
sysvinit-3.05
Reported by: | Owned by: | lfs-book | |
---|---|---|---|
Priority: | normal | Milestone: | 11.3 |
Component: | Book | Version: | git |
Severity: | normal | Keywords: | |
Cc: |
Description
As reported by Uwe Duffert in -dev, there is a new location for sysvinit, https://github.com/slicer69/sysvinit/releases/
From the closed issues there, this does seem to be the new home for what was at savannah.
Therefore, we ought to consider moving to this, and fixing the php script.
However, at the moment the new translated manpages appear to be in non-standard locations and using ROOT= (for DESTDIR) fails on the first (man1 de) pages because the directories are not created. https://github.com/slicer69/sysvinit/issues/14
If these two points are satisfactorily resolved, maybe we should provide a patch for building on LFS to save carrying our own patch to remove certain items ?
Attachments (2)
Change History (15)
comment:1 by , 2 years ago
comment:2 by , 2 years ago
I've got problems with my hub at the moment (red LED which suggests overheating) and I've got an online course and phone calls on Monday and Tuesday (phone connected via hub) so my online time is going to be limited.
I've noted the suggestions, might try those while I'm offline.
comment:3 by , 2 years ago
I've been trying to fix this today. I've found the problem in src/Makefile, but I can't figure out a solution.
for man in $(MAN5) $(subst ../man/,,$(foreach man,$(MAN5),$(wildcard ../man/??/$(man)))); do
assigns the variable man to, for instance:
man = initscript.5 man = de/initscript.5 ...
It then wants to install as
$(INSTALL_DATA) ../man/$$man $(ROOT)$(MANDIR)/man5/$$man
but it needs to separate PO from FILENAME and use:
$(INSTALL_DATA) ../man/$$man $(ROOT)$(MANDIR)/$(PO)/man5/$(FILENAME)
It's ok if PO is null. The problem is that make does not like assigning variables inside a loop. If someone has a solution, I'd like to see it.
comment:4 by , 2 years ago
Thanks for that. I tried your earlier suggestion for the translations with ROOT=, that installed apparently successfully except that no translations were installed!
install -m 644 initreq.h /tmp/SYSV99/usr/include/ for lang in '' ; do \ install -m 755 -d /tmp/SYSV99/usr/share/man/$lang/man1; \ install -m 755 -d /tmp/SYSV99/usr/share/man/$lang/man5; \ install -m 755 -d /tmp/SYSV99/usr/share/man/$lang/man8; \ done for man in last.1 lastb.1 mesg.1 readbootlog.1 utmpdump.1 wall.1 ; do \ install -m 644 ../man/$man /tmp/SYSV99/usr/share/man/man1/$man; \ sed -i "1{ s@^\('\\\\\"\)[^\*-]*-\*- coding: [^[:blank:]]\+ -\*-@\1@; }" /tmp/SYSV99/usr/share/man/man1/$man ; \ done for man in last.1 lastb.1 mesg.1 readbootlog.1 utmpdump.1 wall.1 ; do \ install -m 644 ../man/$man /tmp/SYSV99/usr/share/man/man5/$man; \ sed -i "1{ s@^\('\\\\\"\)[^\*-]*-\*- coding: [^[:blank:]]\+ -\*-@\1@; }" /tmp/SYSV99/usr/share/man/man5/$man ; \ done for man in halt.8 init.8 killall5.8 pidof.8 poweroff.8 reboot.8 runlevel.8 shutdown.8 telinit.8 fstab-decode.8 logsave.8 sulogin.8 bootlogd.8 ; do \ install -m 644 ../man/$man /tmp/SYSV99/usr/share/man/man8/$man; \ sed -i "1{ s@^\('\\\\\"\)[^\*-]*-\*- coding: [^[:blank:]]\+ -\*-@\1@; }" /tmp/SYSV99/usr/share/man/man8/$man ; \ done make[1]: Leaving directory '/tmp/sysvinit-3.05/src'
I then went back to vanilla 3.0.5 with ROOT= and noted:
install -m 644 initreq.h /tmp/SYSVDEF/usr/include/ for lang in '' ; do \ install -m 755 -d /tmp/SYSVDEF/usr/share/man/man1/$lang; \ install -m 755 -d /tmp/SYSVDEF/usr/share/man/man5/$lang; \ install -m 755 -d /tmp/SYSVDEF/usr/share/man/man8/$lang; \ done
i.e. at that point $lang is not set by upstream leading to
install: cannot create regular file '/tmp/SYSVDEF/usr/share/man/man1/de/last.1': No such file or directory sed: can't read /tmp/SYSVDEF/usr/share/man/man1/de/last.1: No such file or directory
Since this is only an "add translations" release I'm inclined to wait a while to see if upstream responds to the issue I raised.
comment:5 by , 2 years ago
I've found a solution by rewriting parts of the Makefile. If it works for us, we can submit it upstream. I'll try to get a new patch out late tomorrow.
One issue for LFS is whether we should continue to install bootlogd and fstab-decode. I don't see any use for those packages in LFS.
by , 2 years ago
Attachment: | sysvinit-3.05-consolidated-1.patch added |
---|
follow-ups: 7 8 comment:6 by , 2 years ago
I'd like to get someone to try the attached patch. The build is slightly more complex than what we have now:
The patch only changes src/Makefile. There are three GCC warnings on the packages we build, but they appear to be harmless.
patch -Np1 -i $DIR/$PROGRAM-consolidated-1.patch && make DISTRO=LFS && make DESTDIR=$PWD/install DISTRO=LFS install
Of course a direct install can be made at root without DESTDIR. Build time at -j1 is 1.5 seconds on my system.
comment:7 by , 2 years ago
Replying to Bruce Dubbs:
I'd like to get someone to try the attached patch. The build is slightly more complex than what we have now:
The patch only changes src/Makefile. There are three GCC warnings on the packages we build, but they appear to be harmless.
patch -Np1 -i ../sysvinit-3.05-consolidated-1.patch && make DISTRO=LFS && make DESTDIR=$PWD/install DISTRO=LFS installOf course a direct install can be made at root without DESTDIR. Build time at -j1 is 1.5 seconds on my system.
Works for me, thanks.
comment:8 by , 2 years ago
Replying to Bruce Dubbs:
I'd like to get someone to try the attached patch. The build is slightly more complex than what we have now:
The patch only changes src/Makefile. There are three GCC warnings on the packages we build, but they appear to be harmless.
patch -Np1 -i ../sysvinit-3.05-consolidated-1.patch && make DISTRO=LFS && make DESTDIR=$PWD/install DISTRO=LFS installOf course a direct install can be made at root without DESTDIR. Build time at -j1 is 1.5 seconds on my system.
i just executed the three cmds as shown above. In usr/bin
i got:
thomas@lfs-x86_64:~/sysvinit-3.05/install$ dir usr/bin/ insgesamt 8 drwxr-xr-x 2 thomas users 4096 5. Nov 20:59 . drwxr-xr-x 5 thomas users 4096 5. Nov 20:59 .. lrwxrwxrwx 1 thomas users 4 5. Nov 20:59 lastb -> last thomas@lfs-x86_64:~/sysvinit-3.05/install$
the lastb
points to nowhere as last
does not exist there.
comment:9 by , 2 years ago
Thanks Thomas. I thought I had fixed that, but it didn't make it into the patch. I'll upload a new patch in a few minutes.
by , 2 years ago
Attachment: | sysvinit-3.05-consolidated-2.patch added |
---|
comment:11 by , 2 years ago
I'd suggest two small fixes:
$ diff -Naur sysvinit-3.05-consolidated-2.patch{.orig,} --- sysvinit-3.05-consolidated-2.patch.orig 2022-11-06 08:20:30.905254677 +0100 +++ sysvinit-3.05-consolidated-2.patch 2022-11-06 08:21:11.995763315 +0100 @@ -11,7 +11,7 @@ +MAN1 = +MAN5 = initscript.5 inittab.5 initctl.5 +MAN8 = halt.8 init.8 killall5.8 pidof.8 poweroff.8 reboot.8 runlevel.8 -+MAN8 = shutdown.8 telinit.8 ++MAN8 += shutdown.8 telinit.8 +MANDB:= +endif + @@ -113,7 +113,7 @@ + done; \ + for man in $(MAN8); do \ + if ! test -f "../man/$$lang/$$man"; then continue; fi; \ -+ $(INSTALL_DATA) ../man/$$lang/$$man $(DESTDIR)/usr/share/man/$$lang/man5/$$man; \ ++ $(INSTALL_DATA) ../man/$$lang/$$man $(DESTDIR)/usr/share/man/$$lang/man8/$$man; \ + done; \ done -ifeq ($(ROOT),)
comment:12 by , 2 years ago
You're right. Both of those are what I intended. It really helps to have someone else review the patch.
I've pushed the fixed patch to the patches git repository as sysvinit-3.05-consolidated-1.patch. I'll update LFS to the new sysvinit with this patch at the usual mid month update.
Our patch to remove programs superseded by other packages works without changes.
This packages does not use configure, so a change to remove wall, mountpoint, last, lastb, mesg, sulogin, and utmpdump can't be done with --without-<program>
There are three Makefiles: ./man/Makefile, ./Makefile, and ./src/Makefile.
In ./Makefile the only relevant portion is:
In man/Makefile there is no install. It is all in src/Makefile.
In src/Makefile we might be able to create a different patch like:
instead of our current patch.
For make install we can s/ROOT/DESTDIR/g
It wants to install in /bin, /sbin, and (for wall and utmpdump only), /usr/bin. We can let our symlinks for /bin and /sbin take care of that.
In the install section for manpages is:
Those should be .e.g. '$(INSTALL_DIR) $(ROOT)$(MANDIR)/$$lang/man1;'
For the actual install they are doing:
I'm not really following this so I'm not sure how to change this for the translated man pages. Perhaps all that is needed is to change in the for statement
$(wildcard ../man/??/$(man))
to $(wildcard ../??/man/$(man))