You are not logged in.
Hi all :-)
I wrote a Python daemon to control PV surplus charging with an go-e Charger (cf. https://gitlab.com/l3u/go-e-pvsd if this may be of interest for anybody). The daemon is well-behaved, backgrounds itself and creates a pidfile.
I also wrote a quite simple OpenRC init script to start it:
#!/sbin/openrc-run
depend() {
need net
use logger
}
command="/usr/bin/go-e-pvsd"
pidfile="/run/${RC_SVCNAME}.pid"
command_args="-s"
command_args_background="-d -p $pidfile"
Both on my Gentoo/OpenRC machine and my Artix/OpenRC machine, the script does what it should, starts and stops the daemon:
# ./go-e-pvsd start
* Starting go-e-pvsd ... [ ok ]
# ./go-e-pvsd stop
* Stopping go-e-pvsd ... [ ok ]
#
But if I use it on the Devuan server (where it should run later), I can start the daemon, but not stop it:
# ./go-e-pvsd start
* Starting go-e-pvsd ... [ ok ]
# ./go-e-pvsd stop
* Stopping go-e-pvsd ...
No /usr/bin/go-e-pvsd found running; none killed.
* Failed to stop go-e-pvsd [ !! ]
* ERROR: go-e-pvsd failed to stop
#
However, the pidfile is created as it should be:
cat /run/go-e-pvsd.pid
21411
the daemon runs and actually does have this pid:
# ps -ef | grep /usr/bin/go-e-pvsd
root 21411 1 1 09:47 ? 00:00:00 python3 /usr/bin/go-e-pvsd -d -p /run/go-e-pvsd.pid -vs
root 21454 21389 0 09:48 pts/0 00:00:00 grep --color=auto /usr/bin/go-e-pvsd
and I can also manually tell it to stop by sending a SIGTERM:
# kill -s SIGTERM 21411
# ps -ef | grep /usr/bin/go-e-pvsd
root 21980 21976 0 10:21 pts/0 00:00:00 grep /usr/bin/go-e-pvsd
Starting and stopping the daemon using a sysvinit init script like this works as expected:
#!/bin/sh
### BEGIN INIT INFO
# Provides: go-e-pvsd
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start the go-e PV surplus daemon
# Description: Daemon for PV surplus charging
# with an go-e Charger
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/go-e-pvsd
NAME=go-e-pvsd
DESC="pv surplus charging daemon"
PIDFILE=/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
DAEMON_OPTS="-d -p $PIDFILE -s"
test -x $DAEMON || exit 0
set -e
. /lib/lsb/init-functions
case "$1" in
start)
status="0"
pidofproc -p $PIDFILE $DAEMON >/dev/null || status="$?"
if [ "$status" = 0 ]; then
log_daemon_msg "$NAME is already running" $NAME
log_end_msg 0
exit 0
fi
log_daemon_msg "Starting $DESC" $NAME
if ! start-stop-daemon --start --pidfile $PIDFILE \
--exec $DAEMON -- $DAEMON_OPTS
then
log_end_msg 1
else
log_end_msg 0
fi
;;
stop)
log_daemon_msg "Stopping $DESC" $NAME
if start-stop-daemon --stop --pidfile $PIDFILE
then
rm -f $PIDFILE
log_end_msg 0
else
log_end_msg 1
fi
;;
restart)
$0 stop
$0 start
;;
status)
status_of_proc -p "$PIDFILE" "$DAEMON" go-e-pvsd && exit 0 || exit $?
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|status}" >&2
exit 1
;;
esac
exit 0
So … what's wrong with OpenRC? Why can't it stop the daemon, although both the process name and the pidfile provide the correct information?
Thanks for all help!
Yay, I could get it to work :-) The printer driver is 32 bit. So I had to install libc6-i386, and the Gentoo/Artix ported package worked!
The CUPS error log is a bit confusing. Nowhere a hint that the missing 32 bit stuff was causing this …
I also tried to use Brother's upstream brgenml1lpr and brgenml1cupswrapper packages (the Gentoo package is based on), with the same result.
Those ARE the linked .deb packages :-(
Does nobody use this or have an idea about this? This actually currently stops me from stopping playing around with Devuan in a virtual machine and really doing the migration … :-(
Are we ready for a group hug?
Yeah, of course ;-)
Well, tbh, I don't really consider myself a n00b after having used Gentoo for quite exactly 18 years now ;-)
That behavior was just plain unexpected (to me as a Devuan newbie). And as it was (from my point of view) a similar problem like the Radicale init script one, I simply supposed the init script to be the problem, not Debian's way how su works. Esp. as Devuan doesn't "really" support OpenRC, because it only lets OpenRC execute the Sysvinit init scripts. And states that OpenRC support would be "experimental".
Of course there's no excuse for the "crime" (as you call it) not to have searched the board for a su problem when Samba won't start, but – and I again beg your pardon – this interconnection was in no way clear to me, esp. facing the fact that I can start other init script with a plain "su" (not "su -") session, beacuse they do include a PATH statement containing "/sbin". May other newbies with this very problem find this thread to avoid such posts in the future.
But I think this issue is now solved, and I learned that Debian's su works in an odd way (if I'm very bored some time, I'll read through the lengthy disussion you linked to find out why Debian acts in another way as other distributions do here. But for now, I simply accept it as a given fact).
So everything is good concerning this … at least for me ;-)
Hi all :-)
I'm migrating a Gentoo machine to Devuan.
How can I use Brother's BrGenML1 printer driver?
I first tried to manually install it by creating a deb package from Gentoo's slightly patched BrGenML1 package. This one works without a problem on Gentoo, and I also ported the very same package to Artix Linux where I also can use it without a problem.
On Devuan, this one sadly does not work. After having added the printer the same way I did on Gentoo and Artix, I can't print: Nothing happens, and the CUPS error log says:
W [27/Dec/2022:09:02:17 +0100] [Job 8] Grayscale/monochrome printing requested for this job but Poppler is not able to convert to grayscale/monochrome PostScript.
W [27/Dec/2022:09:02:17 +0100] [Job 8] Use \"pdftops-renderer\" option (see cups-filters README file) to use Ghostscript or MuPDF for the PDF -> PostScript conversion.
The second line always appears when e.g. printing the CUPS test page. I googled for the first line's error message and hit some Debian bug report, but I can't really figure out what's wrong here.
I also tried to use Brother's upstream brgenml1lpr and brgenml1cupswrapper packages (the Gentoo package is based on), with the same result.
Does anybody use BrGenML1 who can help me?
Thanks in advance for all help!
Well, that of course explains it. I would never have thought that this could be the cause though …
Thanks for the information! No hard feelings ;-)
I now simply shipped around this (imo odd) behavior by simply creating a file in /etc/profile.d/ (/etc/profile.d/path.sh) with the following content:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Just that I maybe understand this a bit better: What's the point in leaving /sbin out of the PATH? And what's the point of only getting root's PATH when using su - instead of su?!
Sorry, this is for sure not intended to be a wind-up!
I'm new to Devuan and trying to migrate a Gentoo machine. I installed Samba and tried to start it … and couldn't.
Apparently, the behavior of a default Debian/Devuan machine differs quite a bit from a Gentoo one. As the installer stated that using OpenRC is experimental and would require some handwork, I supposed this would be such a case.
I e.g. recently setup radicale on a fresh Devuan installation, which could not be started using the shipped init script, see https://dev1galaxy.org/viewtopic.php?id=5353 (you even commented there), and this turned out to be an actual bug.
I just wanted to help Devuan concerning OpenRC. Sorry for me not knowing all Devuan's peculiarities yet. I hope you Devuan guys are not alway so bad-tempered when it comes to dumb newbie problems :-(
Hi all :-)
When starting Samba using the default init script on an OpenRC system, it fails:
# /etc/init.d/smbd start
Starting SMB/CIFS daemon: smbd/etc/init.d/smbd: 43: start-stop-daemon: not found
failed!
This is due to start-stop-daemon living in /sbin/ and this is (for whatever reason) not added to the default PATH. Adding a PATH variable containing /sbin/ to the init script fixes this.
I'm pretty sure this is something Debian won't fix … maybe there's a way this can be fixed for Devuan?
deb mirror+file:/etc/apt/mirror_list.txt chimaera main
mirror_list.txt should contain only mirror urls , eg
https://pkgmaster.devuan.org/merged
it's not supposed to be the same as https://pkgmaster.devuan.org/mirror_list.txt. not the same format to use.. completely different things...
and no, i don't know of a similar netselect tool for devuan.
Hey, thanks for the info!
I could get it to work with two mirror files, one for "devuan" and one for "merged":
# cat mirrors_devuan.txt
https://ftp.fau.de/devuan/devuan/
https://dist-mirror.fem.tu-ilmenau.de/devuan/devuan/
# cat mirrors_merged.txt
https://ftp.fau.de/devuan/merged/
https://dist-mirror.fem.tu-ilmenau.de/devuan/merged/
and these chages to sources.list:
# cat sources.list
deb mirror+file:/etc/apt/mirrors_merged.txt chimaera main contrib non-free
deb mirror+file:/etc/apt/mirrors_merged.txt chimaera-updates main contrib non-free
deb mirror+file:/etc/apt/mirrors_devuan.txt chimaera-proposed-updates main contrib non-free
deb mirror+file:/etc/apt/mirrors_merged.txt chimaera-security main contrib non-free
deb mirror+file:/etc/apt/mirrors_merged.txt chimaera-backports main contrib non-free
Works now. This way, I could leave out the faulty/incomplete lmu mirror.
Thanks a lot!
Okay, I now both wrote to mirrors@devuan.org and (hopefully) to the mirror maintainers. Let's see what happens.
Thanks, I already found https://pkgmaster.devuan.org/mirror_list.txt – but how would I use a changed local version of it?!
https://sledjhamr.org/apt-panopticon/results/Report-web.html even lists devuan.bio.lmu.de as a "faulty mirror"! Will this lead to this one being removed, or will the maintainers be contacted? I wrote some email to the LMU Munich, but I'm not sure if they will reach the correct addressee …
Hey, thanks!
deb mirror://path/to/mirrors.txt chimaera main
looks very promising!
Is there some automated way to check which mirrors are the fastest for my location? Like Artix'/Arch's rankmirrors or Gentoo's mirrorselect?
How would I change sources.list? I tried to download http://pkgmaster.devuan.org/mirror_list.txt to/etc/apt/ and removed the mirror in question. Then I changed the sources.list from
deb http://deb.devuan.org/merged chimaera main contrib non-free
deb http://deb.devuan.org/merged chimaera-updates main contrib non-free
deb http://deb.devuan.org/devuan chimaera-proposed-updates main contrib non-free
deb http://deb.devuan.org/merged chimaera-security main contrib non-free
deb http://deb.devuan.org/merged chimaera-backports main contrib non-free
to
deb mirror://etc/apt/mirror_list.txt chimaera main contrib non-free
deb mirror://etc/apt/mirror_list.txt chimaera-updates main contrib non-free
deb mirror://etc/apt/mirror_list.txt chimaera-proposed-updates main contrib non-free
deb mirror://etc/apt/mirror_list.txt chimaera-security main contrib non-free
deb mirror://etc/apt/mirror_list.txt chimaera-backports main contrib non-free
but it dosn't work: I get
Err:1 http://etc/apt/mirror_list.txt Mirrorlist
Could not resolve 'etc'
...
With three slashes after mirror:, it's
Err:1 http://etc/apt/mirror_list.txt Mirrorlist
Could not resolve 'etc'
Well, that also would be a solution.
Is it the expected behavior that apt doesn't try another mirror but just gives up right away though?! On Gentoo, we simply have a config file with a variable containing the mirrors we want to use (along with a script to check which ones will work best). As there seems to be no easy way to do this using apt & Co, I would have at least expected that it would retry …
Apart from this: Wouldn't be the mirror be exptected to actually serve the packages in question? Or does everybody choose which architectures to provide when mirroring Debian? And if so, shouldn't the mirror announce itself for leaving some architectures behind?
Sorry, I'm quite new to the Debian/Devuan universe, and a couple of things here are a bit strange ;-)
Okay, then, it would get complicated ;-) Not that I don't have or use local nameservers, but it would really suck to work around this by installing BIND or whatever on my Raspberry Pi just to really exclude this very mirror.
Maybe, this is actually a syncing problem. Seems like they have all kinds of ARM packages – but not the armel one needed by my Raspberry Pi 1. I think I'll contact the mirror admin. Maybe, they can or want to change this. Quasi as an upstream bugfix.
If I get this correctly, blocking a host through /etc/hosts would look like this:
127.0.0.1 debian.bio.lmu.de
Alas, this doesn't help – instead of e.g.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
ninja-build
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 97.8 kB of archives.
After this operation, 317 kB of additional disk space will be used.
Err:1 http://deb.devuan.org/merged chimaera/main armel ninja-build armel 1.10.1-1
404 Not Found [IP: 2001:4ca0:4300::1:22 80]
E: Failed to fetch http://debian.bio.lmu.de/debian/pool/main/n/ninja-build/ninja-build_1.10.1-1_armel.deb 404 Not Found [IP: 2001:4ca0:4300::1:22 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I then get
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
ninja-build
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 97.8 kB of archives.
After this operation, 317 kB of additional disk space will be used.
Err:1 http://deb.devuan.org/merged chimaera/main armel ninja-build armel 1.10.1-1
404 Not Found [IP: 127.0.0.1 80]
E: Failed to fetch http://debian.bio.lmu.de/debian/pool/main/n/ninja-build/ninja-build_1.10.1-1_armel.deb 404 Not Found [IP: 127.0.0.1 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
So apt doesn't try the next round-robin mirror but just gives up, as on 127.0.0.1, the package isn't there as well :-(
Just in case anybody else runs into this and finds this post: I created a bug report about this: https://github.com/rdiff-backup/rdiff-backup/issues/789
Okay, I think I found it. Neither do I use xattrs, nor have I set the user_xattr option for any entry in my fstab.
Nevertheless, rdiff-backup seems to think that I use xattrs:
# rdiff-backup -v 5 foo/ /nas/backup/test/
...
-----------------------------------------------------------------
Detected abilities for source (read only) file system:
...
Extended attributes On
...
-----------------------------------------------------------------
...
Detected abilities for destination (read/write) file system:
...
Extended attributes On
...
-----------------------------------------------------------------
Explicitely disabling the use of xattrs via the --no-eas option works.
Seems to be a bug?!
I don't use xattrs. Also, as said, it works when using Gentoo or Artix! So I'm pretty sure this is a Devuan/Debian specific problem …
This also happens using Debian. I just tried it with a new installation of Debian Bullseye, with only nfs-common and rdiff-backup installed. Same error.
Using a more verbose output, one can see that the crash happens after already having copied the file, when applying the attributes:
2022-11-21 12:26:22.184387 +0100 <CLIENT-2738> Copying attributes from (b'bar',) to /nas/backup/test/rdiff-backup.tmp.1
This is a nice idea, I'll try that! Thanks :-)
Hi all,
I'm about to migrate a small server from Gentoo to Devuan. After solving some problems (e.g. Radicale not starting), I hit the next one:
Rdiff-backup does not work. I used rdiff-backup to automatically create backups. Running the very same backup script now fails, rdiff-backup crashes. I can't even backup a single file to my (no_root_squash) NFS share:
# cd
# mkdir foo
# touch foo/bar
# rdiff-backup foo/ /nas/backup/test/
Exception '[Errno 22] Invalid argument' raised of class '<class 'OSError'>':
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 395, in error_check_Main
Main(arglist)
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 417, in Main
take_action(rps)
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 353, in take_action
Backup(rps[0], rps[1])
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 442, in Backup
backup.Mirror(rpin, rpout)
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 39, in Mirror
DestS.patch(dest_rpath, source_diffiter)
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 269, in patch
ITR(diff.index, diff)
File "/usr/lib/python3/dist-packages/rdiff_backup/rorpiter.py", line 313, in __call__
last_branch.fast_process(*args)
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 587, in fast_process
if self.patch_to_temp(mirror_rp, diff_rorp, tf):
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 636, in patch_to_temp
rpath.copy_attribs(diff_rorp, new)
File "/usr/lib/python3/dist-packages/rdiff_backup/rpath.py", line 238, in copy_attribs
rpout.write_ea(rpin.get_ea())
File "/usr/lib/python3/dist-packages/rdiff_backup/rpath.py", line 1664, in write_ea
ea.write_to_rp(self)
File "/usr/lib/python3/dist-packages/rdiff_backup/eas_acls.py", line 131, in write_to_rp
self.clear_rp(rp)
File "/usr/lib/python3/dist-packages/rdiff_backup/eas_acls.py", line 106, in clear_rp
rp.conn.xattr.remove(rp.path, name, rp.issym())
Traceback (most recent call last):
File "/usr/bin/rdiff-backup", line 32, in <module>
rdiff_backup.Main.error_check_Main(sys.argv[1:])
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 395, in error_check_Main
Main(arglist)
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 417, in Main
take_action(rps)
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 353, in take_action
Backup(rps[0], rps[1])
File "/usr/lib/python3/dist-packages/rdiff_backup/Main.py", line 442, in Backup
backup.Mirror(rpin, rpout)
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 39, in Mirror
DestS.patch(dest_rpath, source_diffiter)
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 269, in patch
ITR(diff.index, diff)
File "/usr/lib/python3/dist-packages/rdiff_backup/rorpiter.py", line 313, in __call__
last_branch.fast_process(*args)
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 587, in fast_process
if self.patch_to_temp(mirror_rp, diff_rorp, tf):
File "/usr/lib/python3/dist-packages/rdiff_backup/backup.py", line 636, in patch_to_temp
rpath.copy_attribs(diff_rorp, new)
File "/usr/lib/python3/dist-packages/rdiff_backup/rpath.py", line 238, in copy_attribs
rpout.write_ea(rpin.get_ea())
File "/usr/lib/python3/dist-packages/rdiff_backup/rpath.py", line 1664, in write_ea
ea.write_to_rp(self)
File "/usr/lib/python3/dist-packages/rdiff_backup/eas_acls.py", line 131, in write_to_rp
self.clear_rp(rp)
File "/usr/lib/python3/dist-packages/rdiff_backup/eas_acls.py", line 106, in clear_rp
rp.conn.xattr.remove(rp.path, name, rp.issym())
OSError: [Errno 22] Invalid argument
Trying to do some rdiff-backup run from my other machines (running Gentoo and Artix) on the same share works without a problem. The even run the same version of rdiff-backup: v2.0.5.
I'm out of ideas right now … can anybody help me? Having this automated backup up and running is crucial for the migration :-(
Well,
devuan chimaera-proposed-updates
is there because it's the default – I never touched this file.
However, I want quite the opposite of "... a specific mirror from the list can be accessed ..." – I don't want to connect only to one specific mirror, but exclude one specific mirror …