[systemd-devel] systemd convert

Dave (Bob) dave at bob-the-boat.me.uk
Sat Nov 24 02:18:28 PST 2012


On Fri, Nov 23, 2012 at 9:43 AM, David Humphreys <dave at datatone.co.uk> wrote:

> I am just starting to experiment with systemd.
>
> My first 'problem' is that the build process does not seem to properly
> obey the --prefix= directive.
>
> I get some stuff installed where I tell it with --prefix, and some other
> stuff installed in /usr/bin and /usr/lib.
>
> I can get around this easily enough, but it maybe should be fixed. I
> hate it when installs put stuff anywhere other than where directed: it
> makes it immensely more difficult to maintain visibility of what is
> going on.

Try--with-rootprefix=DIR , mangling prefix to / might not work.

Kay

= = = = = = = = = = = 

--with-rootprefix=DIR is the answer.

I'm getting on very well. I started this morning with no knowledge of systemd.

I have found my way around the system well enough to overcome each problem in turn until now I can boot my system with it.

I am an enthusiastic convert.

My systems are entirely built from source, compiled by me. I don't adhere to any conventions of any 'distro' (for what I believe to be good reasons: these are MY systems, and I have my particular views and requirements; I don't need to worry about compatibility).

However, within a few hours from 'cold' I am making use of systemd and I feel that I will master it with a few weeks of concerted effort.

I can't say the same about my efforts with 'upstart'.

The only thing that I would be interested to know, is why what I would see as executables and cofiguration files are put in the 'lib' directory?

I see the logic in the:

 --prefix=<root of where all 'given' things are placed (executables, libraries, 'share' stuff)>
 --sysconfdir=<root of where all configuration files are placed>
 --localstatedir=<root of where all run-time data is placed>

I think that I should be able to make the 'prefix' stuff read-only if I wanted, since it shouldn't change.
I think that I should be able to make the 'sysconfdir' stuff read-only accept when a configuration change is required.
I think that the 'localstatedir' obviously is in active use when the application runs.

I think that 'lib' should contain stuff of interest to a linker when building applications and to the loader when loading shared libraries.
I think that executables should be in 'bin', or 'sbin' if they have a purely administrative purpose.
I think that I can see that 'libexec' is appropriate for executables that run only as part of the running system.

There seems to be a logic in all this, but systemd seems to mix everything up for no purpose that I can discern without explanation.

As I hope you will see, I am very enthusiastic, but I'd appreciate knowledge of the thinking behind these decisions.

Best regards,
David

PS, for anyone working their way into this from cold, my advice is to start with 'emergency.target' as the default, and work your way up from there via 'rescue.target'. Look at the .target files in lib/systemd/system, it is easy to see how it all works (at a superficial level). If you can't boot to the 'emergency.target' (which I couldn't at first) get access to the machine in whatever way you do in your situation without going through 'init' and look at the 'emergency.target'. Make sure that the very few steps that it takes are possible, then you should find that it works. Work your way up. Once you get past the point that the journal service is started, you will find that you get access to plenty of diagnostic information using the 'journalctl' application, and you should be on your way to success.

I've got a way to go before I feel that I have mastered it, but I have quickly gained the confidence that it will be worth the effort!



More information about the systemd-devel mailing list