You are not logged in.

#201 2013-06-08 11:06:11

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,664

Re: OpenRC & eudev on Arch

you were right about runscript location  being the problem.

apg openrc-* pacakges now have runscript in /usr/bin/runscript , all not-starting at boot init.d services still had /sbin/runscript .


I changed them to #!/usr/bin/runscript , and now everything works as intended.
It's just  a guess but maybe switching  from a hardcoded path to something like #!runscript would be best way to prevent these problems in the future ?

We'd have to make sure runscript can be found by using the systemwide path ofcourse.

Last edited by Lone_Wolf (2013-06-08 11:09:00)


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#202 2013-06-08 14:18:06

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 3,541
Website

Re: OpenRC & eudev on Arch

Lone_Wolf wrote:

It's just  a guess but maybe switching  from a hardcoded path to something like #!runscript would be best way to prevent these problems in the future ?

you mean

#!/usr/bin/env runscript

because I am not sure #!runscript will work.

Offline

#203 2013-06-08 15:48:22

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: OpenRC & eudev on Arch

It won't.

Offline

#204 2013-06-08 18:16:50

artoo
Member
Registered: 2012-09-04
Posts: 175
Website

Re: OpenRC & eudev on Arch

Lone_Wolf wrote:

you were right about runscript location  being the problem.

apg openrc-* pacakges now have runscript in /usr/bin/runscript , all not-starting at boot init.d services still had /sbin/runscript .


I changed them to #!/usr/bin/runscript , and now everything works as intended.
It's just  a guess but maybe switching  from a hardcoded path to something like #!runscript would be best way to prevent these problems in the future ?

We'd have to make sure runscript can be found by using the systemwide path ofcourse.

Not without irony to read that apg openrc switched to /usr/sbin/runscript, especially when I returned to standard paths. The /usr merge makes it possible.

I have updated my repo as well as git repo, openrc and and the rest should work just fine.

Re runscript path:

The path in the runscripts in the first line will be dynamically altered, if you eg use a prefix=/usr make flag for openrc.
This is what I did with previous versions, but as mentioned, I returned to standard path with current version from today on

Last edited by artoo (2013-06-08 18:17:20)

Offline

#205 2013-06-08 22:33:58

apg
Developer
Registered: 2012-11-10
Posts: 132

Re: OpenRC & eudev on Arch

artoo wrote:

Not without irony to read that apg openrc switched to /usr/sbin/runscript, especially when I returned to standard paths. The /usr merge makes it possible.

Do you mean that you put files the files in /bin and /sbin?  If you are, you shouldn't.  Although pacman supports treating symlinks as directories like that, support is incomplete and scheduled to be removed in pacman 4.2.  It would be a good idea to avoid putting files in /bin, /sbin, /lib, or /usr/sbin.

Offline

#206 2013-06-08 23:09:00

artoo
Member
Registered: 2012-09-04
Posts: 175
Website

Re: OpenRC & eudev on Arch

apg wrote:
artoo wrote:

Not without irony to read that apg openrc switched to /usr/sbin/runscript, especially when I returned to standard paths. The /usr merge makes it possible.

Do you mean that you put files the files in /bin and /sbin?  If you are, you shouldn't.  Although pacman supports treating symlinks as directories like that, support is incomplete and scheduled to be removed in pacman 4.2.  It would be a good idea to avoid putting files in /bin, /sbin, /lib, or /usr/sbin.

No, I don't put any symlinks.

The rc binary goes to /sbin which is /usr/sbin which is /usr/bin.
similarly, /lib/rc is /usr/lib/rc effectively.

I figured after /usr merge, that maintaining prefix=/usr is not necessary, the install locations of unprefixed install are exactly the same as with prefix=/usr.

I had some short exchange of thoughts with a gentoo dev on that too.

No prefix simplifies the stuff, while prefixed runscripts do work, in the case of eudev, they create some minor problems.

Last edited by artoo (2013-06-08 23:11:35)

Offline

#207 2013-06-08 23:37:12

apg
Developer
Registered: 2012-11-10
Posts: 132

Re: OpenRC & eudev on Arch

artoo wrote:

No, I don't put any symlinks.

The rc binary goes to /sbin which is /usr/sbin which is /usr/bin.
similarly, /lib/rc is /usr/lib/rc effectively.

I figured after /usr merge, that maintaining prefix=/usr is not necessary, the install locations of unprefixed install are exactly the same as with prefix=/usr.

I think you misunderstood me.  Unless you are setting PREFIX or BINDIR and SBINDIR you are putting files in /bin and /sbin (open the package in an archive browser if you want to check).  When the package is installed those files will end up in /usr/bin, but pacman will think they are in /bin or /sbin.  Although that *probably* will not cause any problems up until support for that is removed from pacman, it would be better to just go ahead and put the files in /usr/bin directly at build time.  That way pacman's database will be accurate.

Offline

#208 2013-06-09 11:25:01

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: OpenRC & eudev on Arch

artoo wrote:

The rc binary goes to /sbin which is /usr/sbin which is /usr/bin.

Just want to point out that /sbin points directly to /usr/bin (in Arch at least), not via /usr/sbin

similarly, /lib/rc is /usr/lib/rc effectively.

I figured after /usr merge, that maintaining prefix=/usr is not necessary, the install locations of unprefixed install are exactly the same as with prefix=/usr.

As others have pointed out, it is probably best to install all binaries (resp., libraries) to /usr/bin (resp., /usr/lib) and not to rely on the symlinks (as the symlinks are really an implementation detail of our filesystem package, but pacman knows nothing about them).

Offline

#209 2013-06-09 19:03:40

artoo
Member
Registered: 2012-09-04
Posts: 175
Website

Re: OpenRC & eudev on Arch

apg wrote:
artoo wrote:

No, I don't put any symlinks.

The rc binary goes to /sbin which is /usr/sbin which is /usr/bin.
similarly, /lib/rc is /usr/lib/rc effectively.

I figured after /usr merge, that maintaining prefix=/usr is not necessary, the install locations of unprefixed install are exactly the same as with prefix=/usr.

I think you misunderstood me.  Unless you are setting PREFIX or BINDIR and SBINDIR you are putting files in /bin and /sbin (open the package in an archive browser if you want to check).  When the package is installed those files will end up in /usr/bin, but pacman will think they are in /bin or /sbin.  Although that *probably* will not cause any problems up until support for that is removed from pacman, it would be better to just go ahead and put the files in /usr/bin directly at build time.  That way pacman's database will be accurate.

Hmm, well, I see what you mean, which is what I meant before by doing prefix install.
It seems there are different approaches and views by arch and gentoo devs.

I have basically no problem to just leave all as it was before I updated my builds. But, as mentioned, prefix=/usr complicates the stuff a bit.
Anyway, I will revert to /usr prefix, if we only could agree on leaving conf.d dir where it is meant to be put, and we would have fully compatible projects.
Eg the new cgroup features of openrc seem to use the standard path, regarding the comments in rc.conf
As of now, only arch's subversion, nfs and samba put a conf file in /etc/conf.d. I renamed the openrc services and all goes well, and no conflicts appear.

Edit: I created a no_prefix branch, and I will do a version 0.9.2 reverting to prefix=/usr going into master, so we have unified runscripts.

tomegun wrote:
artoo wrote:

The rc binary goes to /sbin which is /usr/sbin which is /usr/bin.

Just want to point out that /sbin points directly to /usr/bin (in Arch at least), not via /usr/sbin

similarly, /lib/rc is /usr/lib/rc effectively.

I figured after /usr merge, that maintaining prefix=/usr is not necessary, the install locations of unprefixed install are exactly the same as with prefix=/usr.

As others have pointed out, it is probably best to install all binaries (resp., libraries) to /usr/bin (resp., /usr/lib) and not to rely on the symlinks (as the symlinks are really an implementation detail of our filesystem package, but pacman knows nothing about them).

Thx, its not easy to find a solution which satisfies everyone, especially if you ask more than one dev cross distro. smile

As said, I already had before /usr merge what you recommend, it is just reverting changes.

However, you say putting rc binary directly in /usr/bin, while rc requires admin rights instead of /usr/sbin?
Sounds a bit overkill to me to change all the runscripts to /usr/bin as long as /usr/sbin exists.
Does arch want to get rid of /usr/sbin?

Edit: I updated everything, I made a unified /usr/bin path for runscripts and install for openrc.
https://github.com/udeved/pkgbuilds/tree/0.9.2

Last edited by artoo (2013-06-09 23:14:57)

Offline

#210 2013-06-10 11:04:24

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,664

Re: OpenRC & eudev on Arch

Artoo, glad you use /usr/bin now , as /usr/sbin is symlink to /usr/bin since latest filesystem upgrade (the big move to /usr/bin ).

about the config folders :

with apg packages these are under /etc/openrc
conf.d/
init.d/
local.d/
runlevels/
sysctl.d/
inittab (file)
rc.conf (file)

on my system of these folders conf.d and sysctl.d are present under /etc .

$ pacman -Qo /etc/sysctl.d
/etc/sysctl.d is owned by systemd 204-3
$
$ pacman -Qo /etc/conf.d
/etc/conf.d is owned by cdemu-daemon 2.1.0-1
/etc/conf.d is owned by cronie 1.4.9-4
/etc/conf.d is owned by netcfg 3.0-2
/etc/conf.d is owned by ntp 4.2.6.p5-14
/etc/conf.d is owned by samba 4.0.6-1
/etc/conf.d is owned by subversion 1.7.9-6
$ 

In short, there are more packages that still use /etc/conf.d then it looks.
Also using etc/sysctl.d for openrc clashes with systemd .

etc/systctl.d is empty on my system and i don't know where systemd uses that folder for,
but imo as long as systemd uses /etc/sysctl.d , openrc should not use /etc directly for it's files to avoid conflicts.

P.S. i'm aware netcfg is deprecated/unsupported , but sofar i haven't checked if netctl can work with openrc.
netcfg does what i need, and it still works fine with systemd boot (atleast for my use of it).


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#211 2013-06-11 17:46:17

artoo
Member
Registered: 2012-09-04
Posts: 175
Website

Re: OpenRC & eudev on Arch

Lone_Wolf wrote:

Artoo, glad you use /usr/bin now , as /usr/sbin is symlink to /usr/bin since latest filesystem upgrade (the big move to /usr/bin ).

about the config folders :

with apg packages these are under /etc/openrc
conf.d/
init.d/
local.d/
runlevels/
sysctl.d/
inittab (file)
rc.conf (file)

on my system of these folders conf.d and sysctl.d are present under /etc .

$ pacman -Qo /etc/sysctl.d
/etc/sysctl.d is owned by systemd 204-3
$
$ pacman -Qo /etc/conf.d
/etc/conf.d is owned by cdemu-daemon 2.1.0-1
/etc/conf.d is owned by cronie 1.4.9-4
/etc/conf.d is owned by netcfg 3.0-2
/etc/conf.d is owned by ntp 4.2.6.p5-14
/etc/conf.d is owned by samba 4.0.6-1
/etc/conf.d is owned by subversion 1.7.9-6
$ 

In short, there are more packages that still use /etc/conf.d then it looks.
Also using etc/sysctl.d for openrc clashes with systemd .

etc/systctl.d is empty on my system and i don't know where systemd uses that folder for,
but imo as long as systemd uses /etc/sysctl.d , openrc should not use /etc directly for it's files to avoid conflicts.

P.S. i'm aware netcfg is deprecated/unsupported , but sofar i haven't checked if netctl can work with openrc.
netcfg does what i need, and it still works fine with systemd boot (atleast for my use of it).


I haven't checked cdemu, I don't have it in the repo. I'll check it.

Cronie and my package do not have conflicting files. The runscript for cronie does not need a conf.d file, but you could create one.

netcfg is afaik obsolete, and netctl for systemd is recommended. So, in my opinion, you should do networking the openrc way. netctl is systemd specific.

I think, ntp will remove the obsolete rc initscripts in the next release. It is the last package on my arch system still providing rc script. Further, arch's ntp files do not conflict with the openrc version, different file names.
I'd like if arch pkgs always appended *.conf if they use conf,d.

Leaves on my system samba, subversion and nfs, which I solved by renaming the files and service. I append in the case of conflict $svc-rc to mark rc instead of systemd file.
I recall the new pacman version doesn't have the -f switch any more,

sysctl is not a systemd specific service, so I don't see a problem with a shared directory, since the conf files are the same for both init systems. I see it as a benefit if you want to use systemd and openrc, otherwise you have redundant conf files  doing the very same configuration.
I am not sure if sysctl conf files work if you move the sysctl dir while having the default dir present as well. I have not tested it.

http://wiki.gentoo.org/wiki/Procfs

Generally, I use openrc since some time now on arch on multiple computers, and haven't started with systemd ever again. No problems so far.

Last edited by artoo (2013-06-11 18:44:10)

Offline

#212 2013-06-22 22:19:45

artoo
Member
Registered: 2012-09-04
Posts: 175
Website

Re: OpenRC & eudev on Arch

Lone_Wolf,

I think you contributed to the arch openrc wiki page and I want to give some feedback.

The troubleshooting issue mentioned  with /tmp mounted as tmpfs appears to be related to changing the default config dirs for openrc.
I can't reproduce it in any way with default locations untouched. My conclusion is speculation of course, given 3 working arch-openrc systems for me behaving just as gentoo openrc.

A notice on wiki page would eventually do good reminding users that a customized openrc seems to create some problems which can be avoided.

PS: I am about to add two more builds/scripts, nvidia-NoX-init script, and catalyst-atieventsd script.
Will test nvidia today, ati tomorrow eventually, if I sort out the catalyst-legacy-xorg mess.

Last edited by artoo (2013-06-22 22:28:09)

Offline

#213 2013-06-23 15:11:31

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 3,541
Website

Re: OpenRC & eudev on Arch

artoo wrote:

Lone_Wolf,

I think you contributed to the arch openrc wiki page and I want to give some feedback.

That was me.

The troubleshooting issue mentioned  with /tmp mounted as tmpfs appears to be related to changing the default config dirs for openrc.
I can't reproduce it in any way with default locations untouched. My conclusion is speculation of course, given 3 working arch-openrc systems for me behaving just as gentoo openrc.

A notice on wiki page would eventually do good reminding users that a customized openrc seems to create some problems which can be avoided.

Avoided by using the default directories? If yes, then I will add that to the wiki.

Last edited by x33a (2013-06-23 15:11:42)

Offline

#214 2013-06-23 16:19:14

apg
Developer
Registered: 2012-11-10
Posts: 132

Re: OpenRC & eudev on Arch

artoo wrote:

The troubleshooting issue mentioned  with /tmp mounted as tmpfs appears to be related to changing the default config dirs for openrc.
I can't reproduce it in any way with default locations untouched. My conclusion is speculation of course, given 3 working arch-openrc systems for me behaving just as gentoo openrc.

A notice on wiki page would eventually do good reminding users that a customized openrc seems to create some problems which can be avoided.

I fail to see how using different configuration directories could possibly be causing an issue with unmounting /tmp.  I have never encountered the problem nor do I see anything in do_unmount that could even be influenced by changing the configuration directory.  To the best of my knowledge, the patches in the openrc package fix all known issues caused by the make parameters.  If there are any more problems, let me know and I will try to get them fixed.  In the meantime, let's avoid filling the wiki with unhelpful warnings based on pure speculation.

Offline

#215 2013-06-25 10:03:02

artoo
Member
Registered: 2012-09-04
Posts: 175
Website

Re: OpenRC & eudev on Arch

apg wrote:
artoo wrote:

The troubleshooting issue mentioned  with /tmp mounted as tmpfs appears to be related to changing the default config dirs for openrc.
I can't reproduce it in any way with default locations untouched. My conclusion is speculation of course, given 3 working arch-openrc systems for me behaving just as gentoo openrc.

A notice on wiki page would eventually do good reminding users that a customized openrc seems to create some problems which can be avoided.

I fail to see how using different configuration directories could possibly be causing an issue with unmounting /tmp.  I have never encountered the problem nor do I see anything in do_unmount that could even be influenced by changing the configuration directory.  To the best of my knowledge, the patches in the openrc package fix all known issues caused by the make parameters.  If there are any more problems, let me know and I will try to get them fixed.  In the meantime, let's avoid filling the wiki with unhelpful warnings based on pure speculation.

As mentioned, I can't reproduce the /tmp unmount issue with my version.
I remember that there was an issue with /tmp on gentoo long time ago, when they removed old stuff from openrc. but it was  something openrc version 0.9.

The wiki entry reads as if the /tmp issue would definitely occur if tmpfs used.
Since the wiki entry refers to your customized openrc version, the guess was, it has to do with your specific version.

Another question is, which version did produce this error? I would guess it is <=0.11.8.
Does the /tmp trouble also occur with git version the next question.

I would rule out that this problem is prefix related, since we both use it. So what else is different with our openrc versions? This was my thought.


Your last sentence sounds funny, since the troubleshooting on the wiki is not exactly based on solid information, The warning on wiki could be already unhelpful.
If this is an openrc issue, a bug report could be done to fix the issue.
If it it caused by the changes you made, it'd be better you filed a bug report on gentoo.

x33a wrote:

Avoided by using the default directories? If yes, then I will add that to the wiki.

If it is related to apg's version, then yes, this is what we have to find out.

Last edited by artoo (2013-06-25 10:34:12)

Offline

#216 2013-06-26 10:33:45

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 3,541
Website

Re: OpenRC & eudev on Arch

artoo wrote:

Another question is, which version did produce this error? I would guess it is <=0.11.8.
Does the /tmp trouble also occur with git version the next question.

I am using the 0.11.8 version and this error occurs with this version for sure, haven't tried the git version.

Offline

#217 2013-06-26 15:31:51

artoo
Member
Registered: 2012-09-04
Posts: 175
Website

Re: OpenRC & eudev on Arch

x33a wrote:
artoo wrote:

Another question is, which version did produce this error? I would guess it is <=0.11.8.
Does the /tmp trouble also occur with git version the next question.

I am using the 0.11.8 version and this error occurs with this version for sure, haven't tried the git version.


Could you upgrade to git version, which is 0.12xxxx, and give it a test?

Could you first try apq git version, and if the problem persists, you could try my git version?

Last edited by artoo (2013-06-26 15:33:49)

Offline

#218 2013-06-27 11:14:23

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 3,541
Website

Re: OpenRC & eudev on Arch

artoo wrote:

Could you upgrade to git version, which is 0.12xxxx, and give it a test?

Could you first try apq git version, and if the problem persists, you could try my git version?

I tried openrc-git, HEAD -> 00caa14, and the problem is gone.

Last edited by x33a (2013-06-27 11:15:08)

Offline

#219 2013-08-14 15:31:15

artoo
Member
Registered: 2012-09-04
Posts: 175
Website

Re: OpenRC & eudev on Arch

Openrc version 0.12 has been released.

I have updated the openrc pkgbuild on github. It is in openrc.
Version 0.12 has split out networkmanagement scripts, which is the new netifrc pkgbuild also in openrc.

openrc-git moved to testing.

Binary repo should be up to date soon.

Last edited by artoo (2013-08-14 15:57:35)

Offline

#220 2013-08-17 23:15:38

artoo
Member
Registered: 2012-09-04
Posts: 175
Website

Re: OpenRC & eudev on Arch

apg, I think your 0.12 version lacks network support eventually.

I don't know if you looked at the gentoo ebuild, but 0.12 does not provide the old local loopback interface.
Services depending on network connection will fail to start without netifrc, or manual fix in the service file.
The netifrc package was split out from openrc src.

Last edited by artoo (2013-08-18 00:21:33)

Offline

#221 2013-08-18 06:27:02

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 3,541
Website

Re: OpenRC & eudev on Arch

@ artoo, I am using 0.12, and loopback seems fine:

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 0  (Local Loopback)
        RX packets 312  bytes 48155 (47.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 312  bytes 48155 (47.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Network has been configured through conf.d/network.

Offline

#222 2013-08-18 09:30:13

artoo
Member
Registered: 2012-09-04
Posts: 175
Website

Re: OpenRC & eudev on Arch

x33a wrote:

@ artoo, I am using 0.12, and loopback seems fine:

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 0  (Local Loopback)
        RX packets 312  bytes 48155 (47.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 312  bytes 48155 (47.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Network has been configured through conf.d/network.

I see, apg's version uses newnet. I personally will start to use it when gentoo make the switch.
The readme doesn't recommend it, but if it runs, then that's fine.

However, depending services requiring net.lo('net') won't start.

Gentoo ebuild prints a warning msg, I use for my pkgbuild.

# The network scripts are now part of net-misc/netifrc
 	# In order to avoid sys-apps/${P} from removing this file, this comment was
 	# added; you can safely remove this comment. Please see
 	# /usr/share/doc/netifrc*/README* for more information.
if ! use newnet && ! use netifrc; then
 	ewarn "You have emerged OpenRc without network support. This"
 	ewarn "means you need to SET UP a network manager such as"
 	ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
 	ewarn "net-misc/NetworkManager, or net-misc/badvpn."
 	ewarn "Or, you have the option of emerging openrc with the newnet"
 	ewarn "use flag and configuring /etc/conf.d/network and"
 	ewarn "/etc/conf.d/staticroute if you only use static interfaces."
 	fi
 	
 	if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
 	ewarn "Please add the network service to your boot runlevel"
 	ewarn "as soon as possible. Not doing so could leave you with a system"
 	ewarn "without networking."
 	fi
 	
 	ewarn "In this version of OpenRC, the loopback interface no longer"
 	ewarn "satisfies the net virtual."
 	ewarn "If you have services now which do not start because of this,"
 	ewarn "They can be fixed by adding rc_need=\"!net\""
 	ewarn "to the ${EROOT}etc/conf.d/<servicename> file."
 	ewarn "You should also file a bug against the service asking that"
 	ewarn "need net be dropped from the dependencies."
 	ewarn "The bug you file should block the following tracker:"
 	ewarn "https://bugs.gentoo.org/show_bug.cgi?id=439092" 

Last edited by artoo (2013-08-18 09:36:37)

Offline

#223 2013-09-14 03:52:21

jjshinobi
Member
Registered: 2013-04-06
Posts: 97

Re: OpenRC & eudev on Arch

Where can I find the latest update on openrc on arch?

Offline

#224 2013-09-14 04:06:31

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: OpenRC & eudev on Arch

jjshinobi wrote:

Where can I find the latest update on openrc on arch?

Ummmm… use the repo… or use the AUR?  I'm pretty sure you are actually posting in the thread that explains how you can do this.

Offline

#225 2013-09-14 05:03:30

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 3,541
Website

Re: OpenRC & eudev on Arch

@ jjshinobi

If you are familiar with OpenRC, then all you need to do is install the packages (from AUR or artoo's repo) and you are set. If you aren't familiar, take a look here:

https://wiki.archlinux.org/index.php/OpenRC

Offline

Board footer

Powered by FluxBB