Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
today updated want to replace udev with systemd
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3209

PostPosted: Thu Aug 01, 2013 7:32 am    Post subject: Reply with quote

Are you on kernel-3.10? I saw one issue with mounting usb flash drives with gentoo-sources-3.10.3. One of my flash drives would take about 5 minutes to show up - the device would show up as /dev/sdb immediately, but the partitions /dev/sdb1, /dev/sdb2 would appear after 3-4 minutes. Downgrading to 3.9.11 immediately fixed the issue.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde4 :-/
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1049

PostPosted: Thu Aug 01, 2013 9:00 am    Post subject: Reply with quote

made the switch to systemd. got most of the services to start: fetchmail, postgrey, dspam, shorewall,
spamassassin, postfix, clamd, freshclam, dovecot, mysql, fail2ban ecc.
so far so good. what i notice is that my system is a bit instable.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
Fred Krogh
l33t
l33t


Joined: 07 Feb 2005
Posts: 796
Location: Tujunga, CA

PostPosted: Thu Aug 01, 2013 1:40 pm    Post subject: Reply with quote

I'd be interested in anything special you did to get shorewall and mysql working as I had not luck with them. Actually I'd be interested in anything done for the rest of them as well. I also had no luck with apache.
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1049

PostPosted: Thu Aug 01, 2013 2:34 pm    Post subject: Reply with quote

Fred Krogh wrote:
I'd be interested in anything special you did to get shorewall and mysql working as I had not luck with them. Actually I'd be interested in anything done for the rest of them as well. I also had no luck with apache.


Apache2;

[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
EnvironmentFile=/etc/conf.d/apache2
ExecStart=/usr/sbin/apache2 $APACHE2_OPTS -DFOREGROUND
ExecReload=/usr/sbin/apache2 $APACHE2_OPTS -k graceful
ExecStop=/usr/sbin/apache2 $APACHE2_OPTS -k graceful-stop
# We want systemd to give httpd some time to finish gracefully, but still want
# it to kill httpd after TimeoutStopSec if something went wrong during the
# graceful stop. Normally, Systemd sends SIGTERM signal right after the
# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give
# httpd time to finish.
KillSignal=SIGCONT
PrivateTmp=true

[Install]
WantedBy=multi-user.target


Shorewall;

[Unit]
Description=Shorewall IPv4 firewall
After=syslog.target
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
#EnvironmentFile=/etc/shorewall/
StandardOutput=syslog
ExecStart=/sbin/shorewall $OPTIONS start
ExecStop=/sbin/shorewall $OPTIONS stop

[Install]
WantedBy=multi-user.target

Mongodb;

[Unit]
Description = Mongodb Server
Wants=network.target
After=syslog.target network.target

[Service]
Type=fork
#EnvironmentFile=/etc/mongodb.conf
ExecStart=/usr/bin/mongod --config /etc/mongodb.conf
User=mongodb
Group=mongodb
#NoNewPrivileges=yes


RestartSec=1

[Install]
WantedBy=multi-user.target

Note: the mongodb.conf is the debian not /etc/conf.d/mongodb

Fetchmail;

[Unit]
Description=A remote-mail retrieval utility
After=network.target postfix.service

[Service]
EnvironmentFile=-/etc/conf.d/fetchmail
PIDFile=/var/run/fetchmail.pid
User=fetchmail
ExecStart=/usr/bin/fetchmail --fetchmailrc /etc/fetchmailrc

Restart=always
RestartSec=1

[Install]
WantedBy=multi-user.target

Postgrey;

[Unit]
Description=Postfix Greylisting Service
Before=postfix.service

[Service]
Type=forking
EnvironmentFile=-/etc/conf.d/postgrey
ExecStartPre=-/bin/rm -f /var/run/postgrey.pid
ExecStart=/usr/sbin/postgrey --unix=/var/spool/postfix/private/postgrey --daemonize $POSTGREY_OPTS
PIDFile=/var/run/postgrey.pid

Restart=always
RestartSec=1

[Install]
WantedBy=multi-user.target

Spamassassin;

[Unit]
Description=Spamassassin's spamd
After=syslog.target network.target

[Service]
Type=forking
#PIDFile=/var/run/spamd/spamd.pid
#EnvironmentFile=/etc/mail/spamassassin
#ExecStartPre=/sbin/portrelease spamd
ExecStart=/usr/sbin/spamd --daemon
# -d -r ${PIDFILE}
StandardOutput=syslog
StandardError=syslog

[Install]
WantedBy=multi-user.target

Dspam;

[Unit]
Description=Dspam
After=network.target
Requires=network.target

[Service]
Type=forking
#EnvironmentFile=/etc/dspam
User=filter
ExecStart=/usr/bin/dspam --daemon 2>/dev/null

[Install]
WantedBy=multi-user.target

Freshclam;

[Unit]
Description=freshclam

[Service]
Type=forking

PIDFile=/var/run/clamav/freshclam.pid
ExecStart=/usr/bin/freshclam -d -p /var/run/clamav/freshclam.pid $OPTIONS



[Install]
WantedBy=multi-user.target

Dovecot;

[Unit]
Description=Dovecot IMAP/POP3 email server
After=local-fs.target network.target

[Service]
Type=simple
ExecStart=/usr/sbin/dovecot -F
NonBlocking=yes

[Install]
WantedBy=multi-user.target


Ntpd;

[Unit]
Description=ntpd - Network Time Protocol daemon
After=network.target

[Service]
Type=forking
ExecStart=/usr/sbin/ntpd -s

[Install]
WantedBy=multi-user.target


Mariadb;

[Unit]
Description=MySQL Server
After=network.target

[Service]
Type=simple
ExecStart=/usr/sbin/mysqld --user=mysql --pid-file=/var/run/mysqld/mysqld.pid
ExecStop=/bin/kill -15 $MAINPID
PIDFile=/var/run/mysqld/mysqld.pid
Restart=always

[Install]
WantedBy=multi-user.target

more or less so far. hope it helps.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2734
Location: Bay Area, CA

PostPosted: Thu Aug 01, 2013 3:32 pm    Post subject: Reply with quote

devsk wrote:
Several udev issues:

1. Is /usr/lib/udev/rules.d not being read anymore? I have to copy the files to /etc/udev/rules.d/.

2. Also, the events are not triggering automatically. I have to trigger them by calling 'udevadm trigger'.

3. There is some sort of delay when the events are actually triggered after 'udevadm trigger'. Some queue is not getting flushed or something. If I run 'udevadm trigger' multiple times, I can see all the device paths created.

The issue in question applies to /usr/lib/udev/rules.d/10-virtualbox.rules, which creates /dev/vboxusb/ folder and USB devices inside.
Anybody got any info on these? If udev is not looking at /usr/lib/udev/rules.d, why are packages putting their stuff in there?

And how do we trigger rebuild of packages which have put files in /usr/lib/udev/rules.d when udev has changed its behavior, because may be they have changed the ebuild but it hasn't rebuild yet? This is a bit messy.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3209

PostPosted: Thu Aug 01, 2013 3:38 pm    Post subject: Reply with quote

devsk wrote:
And how do we trigger rebuild of packages which have put files in /usr/lib/udev/rules.d when udev has changed its behavior, because may be they have changed the ebuild but it hasn't rebuild yet? This is a bit messy.
Is it /lib/udev/rules.d or /usr/lib/udev/rules.d?

Either way, you can merge packages containing those files like this
Code:
emerge -1a /usr/lib/udev/rules.d

_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde4 :-/
Back to top
View user's profile Send private message
Fred Krogh
l33t
l33t


Joined: 07 Feb 2005
Posts: 796
Location: Tujunga, CA

PostPosted: Thu Aug 01, 2013 4:02 pm    Post subject: Reply with quote

When I try emerge -1a /usr/lib/udev/rules.d, I get
Quote:
!!! '/usr/lib/udev/rules.d' is not claimed by any package.
... done!
Am I missing something?
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2734
Location: Bay Area, CA

PostPosted: Thu Aug 01, 2013 4:52 pm    Post subject: Reply with quote

How can they drop a path they have been looking at traditionally? What happened to the backwards compatibility promise?
Quote:

When I try emerge -1a /usr/lib/udev/rules.d, I get
Quote:
!!! '/usr/lib/udev/rules.d' is not claimed by any package.
... done!
Am I missing something?
may be all your packages have moved to /etc/udev/rules.d.

As far as I know, there is no way for an ebuild to install files outside the sandbox of emerge. So, logically, there should be no files in /usr/lib/udev/rules.d for you. For me, that command worked fine and showed the packages which have installed a file in that folder.
Back to top
View user's profile Send private message
Fred Krogh
l33t
l33t


Joined: 07 Feb 2005
Posts: 796
Location: Tujunga, CA

PostPosted: Thu Aug 01, 2013 5:01 pm    Post subject: Reply with quote

I have moved to using using systemd for all but booting. That message still seeems confusing to me. I had hoped it might help explain the post by tranquilcool which contained a lot of stuff that I think goes in separate files. If so, how does one set them up? If not, that would be great just take all this stuff (almost all of which I use) and put it in a single file, but what and where? I'm still finding systemd confusing to use. (And given the reported "bit instable" in the result, I'll probably not make the switch soon. I'm just interested in the details of how to make t he switch, and I suspect others are too.
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1049

PostPosted: Thu Aug 01, 2013 10:29 pm    Post subject: Reply with quote

Fred Krogh wrote:
I have moved to using using systemd for all but booting. That message still seeems confusing to me. I had hoped it might help explain the post by tranquilcool which contained a lot of stuff that I think goes in separate files. If so, how does one set them up? If not, that would be great just take all this stuff (almost all of which I use) and put it in a single file, but what and where? I'm still finding systemd confusing to use. (And given the reported "bit instable" in the result, I'll probably not make the switch soon. I'm just interested in the details of how to make t he switch, and I suspect others are too.


They go in separate files.
Put then in /usr/lib/systemd/systemd/
Then do;
systemctll enable foo.service
systemctl start foo.service
systemctl status foo.service

Check the gentoo systemd wiki for kernel configuration.
Well maybe my box is not so unstable afterall. Just getting used to systemd.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
doralsoral
Tux's lil' helper
Tux's lil' helper


Joined: 12 May 2004
Posts: 113

PostPosted: Fri Aug 02, 2013 1:11 am    Post subject: Reply with quote

ssuominen wrote:
/etc/portage/package.use would look like this if you want sys-apps/systemd

Quote:

sys-fs/cryptsetup -static -static-libs
sys-fs/lvm2 -static -static-libs
virtual/udev -static-libs


as in, sys-apps/systemd doesn't support building static archive libudev.a which is required for cryptsetup and lvm2 when USE="static" or USE="static-libs" is enabled
therefore those should be disabled to let cryptsetup and lvm2 to use shared library libudev.so


I have these flags set globally and virtual/udev still wants to pull in both systemd and sys-fs/udev. I had systemd installed and working fine before and i think when i emerge --sync it started to show blocks. May be a bug
Back to top
View user's profile Send private message
jburns
l33t
l33t


Joined: 18 Jan 2007
Posts: 832
Location: Massachusetts USA

PostPosted: Fri Aug 02, 2013 5:53 am    Post subject: Reply with quote

You could add sys-fs/udev to package.mask.

You could use emerge -pv --depclean to find out what is calling sys-fs/udev. You may need to rebuild packages that are calling for sys-fs/udev.
Code:
emerge -pv --depclean =sys-fs/udev-206
Back to top
View user's profile Send private message
doralsoral
Tux's lil' helper
Tux's lil' helper


Joined: 12 May 2004
Posts: 113

PostPosted: Fri Aug 02, 2013 12:40 pm    Post subject: Reply with quote

jburns wrote:
You could add sys-fs/udev to package.mask.

You could use emerge -pv --depclean to find out what is calling sys-fs/udev. You may need to rebuild packages that are calling for sys-fs/udev.
Code:
emerge -pv --depclean =sys-fs/udev-206


i Figured it out. I had an issue with gnome 3.8 randomly locking the screen and then when i swiped up the "curtain" it said authentication error or something and i couldn't log back in. Some other people had the same issue and said downgrading to the previous version of systemd fixed it. So i masked the "bad" version (And everything after i that i guess). After emerge --sync there was a newer version. I removed the line from packages.mask and didn't get any more blockages
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1149

PostPosted: Fri Aug 02, 2013 2:33 pm    Post subject: Reply with quote

Thank you very much tranquilcool,

your instructions and units were very helpful.

Ma
ps: squid

[Unit]
Description=Squid Proxy
After=network.target

[Service]
Type=forking
PIDFile=/var/run/squid.pid
ExecStart=/usr/sbin/squid -YC
KillSignal=SIGQUIT
#User=

[Install]
WantedBy=multi-user.target
_________________
Test Adobe Flash Player
The Indian Shankar Drum Ganesh Machine
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1049

PostPosted: Sat Aug 03, 2013 4:08 pm    Post subject: Reply with quote

happy it helped.


arangodb;


[Unit]
Description=ArangoDB Server
After=syslog.target network.target

[Service]
Type=simple
PIDFile=/var/rub/arangod.pid
ExecStart=/usr/sbin/arangod --config /etc/arangodb/arangod.conf
KillSignal=SIGQUIT

[Install]
WantedBy=multi-user.target
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3209

PostPosted: Sat Aug 03, 2013 6:45 pm    Post subject: Reply with quote

doralsoral wrote:
i Figured it out. I had an issue with gnome 3.8 randomly locking the screen and then when i swiped up the "curtain" it said authentication error or something and i couldn't log back in. Some other people had the same issue and said downgrading to the previous version of systemd fixed it. So i masked the "bad" version ...
This is the kind of stuff that an init system should not be messing with. It will be too late and there will be too much damage to the linux ecosystem by the time the devs realize their mistakes.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde4 :-/
Back to top
View user's profile Send private message
Fred Krogh
l33t
l33t


Joined: 07 Feb 2005
Posts: 796
Location: Tujunga, CA

PostPosted: Sat Aug 03, 2013 9:48 pm    Post subject: Reply with quote

When try to boot using open--rc with /etc/udev/rules.d/80-net-name-slot.rules containing
Quote:
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:e0:4c:68:e4:0c", NAME="netx"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:e0:4c:68:e5:12", NAME="net1"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:e0:4c:68:e4:0d", NAME="net2"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:e0:4c:68:e5:11", NAME="net3"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="f4:6d:04:d6:7d:15", NAME="net4"
while booting it puts up messages I don't see in any log files, but includes things like trying to work with dhcpd which I don't us on my network. Ultimately the system boots, and amazingly assigns the proper addresses to eth0, eth1, and eth2. Impressive since these are not present in the configuration files in /etc. If I boot with "init=/usr/lib/systemd/systemd", the network comes up just fine using netx, net1, etc. In that case I can't get shorewall to run, and I'm not going to track down other problems with that being the case. /systemctl status shorewall show this
Quote:
Aug 03 18:59:40 mon1 systemd[1]: Starting Shorewall IPv4 firewall...
Aug 03 18:59:40 mon1 systemd[1]: Failed to load environment files: Is a dir...ry
Aug 03 18:59:40 mon1 systemd[1]: shorewall.service failed to run 'start' ta...ry
Aug 03 18:59:40 mon1 systemd[1]: Failed to start Shorewall IPv4 firewall.
Aug 03 18:59:40 mon1 systemd[1]: Unit shorewall.service entered failed state.
Aug 03 19:00:19 mon1 systemd[1]: Starting Shorewall IPv4 firewall...
Aug 03 19:00:19 mon1 systemd[1]: Failed to load environment files: Is a dir...ry
Aug 03 19:00:19 mon1 systemd[1]: shorewall.service failed to run 'start' ta...ry
Aug 03 19:00:19 mon1 systemd[1]: Failed to start Shorewall IPv4 firewall.
My system is set up so I can change the configuration files in /etc with easy to run scripts, so I could try again, but I need some insight to make further progress. Of course everything is working using open-rc using eth0, etc. in the configuration files in /etc.
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4286

PostPosted: Sun Aug 04, 2013 6:08 am    Post subject: Reply with quote

Do you have udev linked in /etc/runlevels/sysinit?
Back to top
View user's profile Send private message
Fred Krogh
l33t
l33t


Joined: 07 Feb 2005
Posts: 796
Location: Tujunga, CA

PostPosted: Sun Aug 04, 2013 2:49 pm    Post subject: Reply with quote

In /etc/runlevels/sysinit I have udev-> /etc/init.d/udev* and udev-mount -> /etc/init.d/udev-mount*. I also had this broken soft link tmpfilesd.sysinit -> //etc/init.d/tmpfilesd.sysinit, which I just deleted.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2, 3, 4, 5
Page 5 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum