Author Topic: Your suggestions of missing runscripts for packages  (Read 16473 times)

0 Members and 1 Guest are viewing this topic.

Offline turkbits

  • Neuling
  • *
  • Posts: 7
  • Desktop: openbox, dwm
  • Skill: Intermediate
Re: Your suggestions of missing runscripts for packages
« Reply #30 on: 06. February 2015, 19:54:08 »
thanks your efforts,

another request

redshift

and

please review the profile-sync-deamon's openrc script. I think it's very buggy for manjaro's openrc way. Because when i compile with openrc support, daemon is not run at  boot sequence.

:)
« Last Edit: 06. February 2015, 19:57:38 by turkbits »

Offline jonathon

  • Core Team
  • *****
  • Posts: 2104
  • Technologist - Teacher - Tea drinker
  • Branch: Unstable
  • Desktop: MATE 1.14
  • GPU Card: Nvidia GTX680M
  • GPU driver: Bumblebee nvidia+intel
  • Kernel: 4.6.0-*-MANJARO x86_64
  • Skill: Advanced
Re: Your suggestions of missing runscripts for packages
« Reply #31 on: 06. February 2015, 21:41:50 »
Should Redshift really be a system service? Shouldn't it be down to a user to decide? What happens on a multi-user system? Aside: Redshift-GTK takes care of things quite nicely.
--
MSI GT70: Core i7-3630QM, 16GB, Nvidia GTX680M, Intel 2230, Manjaro-MATE-amd64-EFI
Lenovo X230: Core i5-3320M, 4GB, Intel HD4000, Intel 6205, Manjaro-MATE-amd64
Dell Studio 1749: Core i5 540, 8GB, ATi HD5650, Intel WLAN, Manjaro-Xfce-amd64
Let's go in the garden; you'll find something waiting.

Offline aaditya

  • OpenRC Team
  • ****
  • Posts: 2844
    • My Website
  • Branch: Testing
  • Desktop: Xfce, Openbox
  • GPU Card: Intel HD 4000
  • Kernel: Linux 4.4 x86_64
  • Skill: Intermediate
Re: Your suggestions of missing runscripts for packages
« Reply #32 on: 07. February 2015, 05:22:54 »
For profile-sync-daemon, there are some things that need to be done with OpenRC:

1. Needs to be built with OpenRC support (that what is already done by turkbits)
Code: [Select]
yaourt -G profile-sync-daemon
cd profile-sync-daemon/
sed -i 's|install-systemd-all|install-openrc-all|' PKGBUILD
makepkg -si

2. Its OpenRC service needs to be edited and moved to the proper place:
Code: [Select]
sudo install -m755 /usr/share/doc/profile-sync-daemon/psd.openrc /etc/init.d/psd
sudo sed -i 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|' /etc/init.d/psd

After that it can be enabled and started in the usual way, ie:
Code: [Select]
sudo rc-service psd start # this can crash your browser if it is open
sudo rc-update add psd

The above was to install it for the first time.
To keep it up to date, the first set of commands can be followed, ie:
Code: [Select]
yaourt -G profile-sync-daemon
cd profile-sync-daemon/
sed -i 's|install-systemd-all|install-openrc-all|' PKGBUILD
makepkg -si
« Last Edit: 08. February 2015, 09:37:24 by aaditya »

Offline turkbits

  • Neuling
  • *
  • Posts: 7
  • Desktop: openbox, dwm
  • Skill: Intermediate
Re: Your suggestions of missing runscripts for packages
« Reply #33 on: 07. February 2015, 21:24:05 »
Hi turkbits,

I am using mariadb with the mysql-openrc package/script.

Not using tlp as the tlp package conflicts with pm-utils, which is required by upower-pm-utils for suspend, hibernate, and other functions. Maybe both tlp package as well as its runscript will be required.

sorry for late reply.
firstly i want to install mariadb today. it'installed and running with any problem from command line. secondly i'm installed mysql-openrc package but mysql daemon isn't run with openrc.

Code: [Select]
sudo pacman -Rnsc mariadb
error: target not found: mariadb
sudo rm -rf /var/lib/mysql
sudo pacman -S mariadb
resolving dependencies...
looking for conflicting packages...

Packages (3) libmariadbclient-10.0.16-1  mariadb-clients-10.0.16-1
             mariadb-10.0.16-1

Total Installed Size:  158.86 MiB

Code: [Select]
sudo /usr/bin/mysqld_safe --datadir='/var/lib/mysql'150207 22:32:59 mysqld_safe Logging to '/var/lib/mysql/HAL9000.err'.
150207 22:32:59 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

Code: [Select]
sudo pacman -S mysql-openrc
resolving dependencies...
looking for conflicting packages...

Packages (1) mysql-openrc-20150119-1

Total Installed Size:  0.01 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
(1/1) installing mysql-openrc                      [######################] 100%
==>  /etc/mysql/my.cnf requires basedir = /usr
==>  /etc/mysql/my.cnf requires pid-file = /var/run/mysqld/mysqld.pid
==>  /etc/mysql/my.cnf requires user = mysql
==> run 'rc-update add mysql default'
Optional dependencies for mysql-openrc
    bind-openrc: bind initscript

Code: [Select]
sudo rc-service mysql start
 * Checking mysqld configuration for mysql ...                            [ ok ]
 * Starting mysql ...
 * MySQL datadir `' is empty or invalid
 * Please check your config file `/etc/mysql/my.cnf'
 * ERROR: mysql failed to start

What is the solution to this problem?

thanks your effort

« Last Edit: 07. February 2015, 21:46:20 by turkbits »

Offline aaditya

  • OpenRC Team
  • ****
  • Posts: 2844
    • My Website
  • Branch: Testing
  • Desktop: Xfce, Openbox
  • GPU Card: Intel HD 4000
  • Kernel: Linux 4.4 x86_64
  • Skill: Intermediate
Re: Your suggestions of missing runscripts for packages
« Reply #34 on: 08. February 2015, 07:22:24 »
sorry for late reply.
firstly i want to install mariadb today. it'installed and running with any problem from command line. secondly i'm installed mysql-openrc package but mysql daemon isn't run with openrc.

Code: [Select]
sudo pacman -Rnsc mariadb
error: target not found: mariadb
sudo rm -rf /var/lib/mysql
sudo pacman -S mariadb
resolving dependencies...
looking for conflicting packages...

Packages (3) libmariadbclient-10.0.16-1  mariadb-clients-10.0.16-1
             mariadb-10.0.16-1

Total Installed Size:  158.86 MiB

Code: [Select]
sudo /usr/bin/mysqld_safe --datadir='/var/lib/mysql'150207 22:32:59 mysqld_safe Logging to '/var/lib/mysql/HAL9000.err'.
150207 22:32:59 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

Code: [Select]
sudo pacman -S mysql-openrc
resolving dependencies...
looking for conflicting packages...

Packages (1) mysql-openrc-20150119-1

Total Installed Size:  0.01 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
(1/1) installing mysql-openrc                      [######################] 100%
==>  /etc/mysql/my.cnf requires basedir = /usr
==>  /etc/mysql/my.cnf requires pid-file = /var/run/mysqld/mysqld.pid
==>  /etc/mysql/my.cnf requires user = mysql
==> run 'rc-update add mysql default'
Optional dependencies for mysql-openrc
    bind-openrc: bind initscript

Code: [Select]
sudo rc-service mysql start
 * Checking mysqld configuration for mysql ...                            [ ok ]
 * Starting mysql ...
 * MySQL datadir `' is empty or invalid
 * Please check your config file `/etc/mysql/my.cnf'
 * ERROR: mysql failed to start

What is the solution to this problem?

thanks your effort
Ah, I think I had faced a similar issue when I had tried it for the first time, I will try to replicate it in a VM and get back to you.

Offline aaditya

  • OpenRC Team
  • ****
  • Posts: 2844
    • My Website
  • Branch: Testing
  • Desktop: Xfce, Openbox
  • GPU Card: Intel HD 4000
  • Kernel: Linux 4.4 x86_64
  • Skill: Intermediate
Re: Your suggestions of missing runscripts for packages
« Reply #35 on: 08. February 2015, 08:40:02 »
After some trial and error I was able to figure it out.
In the config file /etc/mysql/my.cnf, I changed:
Code: [Select]
# The MariaDB server
[mysqld]
port            = 3306
socket          = /run/mysqld/mysqld.sock

to
Code: [Select]
# The MariaDB server
[mysqld]
port            = 3306
socket          = /run/mysqld/mysqld.sock
user            = mysql
basedir         = /usr
datadir         = /var/lib/mysql
pid-file        = /run/mysql/mysql.pid

After adding those four lines it seemed to start correctly.
Code: [Select]
$ sudo rc-service mysql start
 * Checking mysqld configuration for mysql ...                                                                                   [ ok ]
 * Starting mysql ...                                                                                                            [ ok ]

Offline turkbits

  • Neuling
  • *
  • Posts: 7
  • Desktop: openbox, dwm
  • Skill: Intermediate
Re: Your suggestions of missing runscripts for packages
« Reply #36 on: 08. February 2015, 12:47:57 »
everything seems ok, thanks aaditya. (i think, mysql-openrc script should be rework, these paramater is not presented to mysql daemon from script)

Offline artoo

  • OpenRC Team
  • ****
  • Posts: 2373
  • Branch: Unstable
  • Desktop: LXQT/Plasma5, openrc & eudev
  • Kernel: x86_64
  • Skill: Advanced
Re: Your suggestions of missing runscripts for packages
« Reply #37 on: 09. February 2015, 16:25:15 »
everything seems ok, thanks aaditya. (i think, mysql-openrc script should be rework, these paramater is not presented to mysql daemon from script)

Iirc, adding these params breaks mysql under systemd.
I'll have to check this again.
If it doesn't braek, we can automatically add these changes, but, its not really good practise to change a foreign file, in this case mysql.cnf provided by mysql.
So better way is to simply print what changes the user needs to make to the file.

Offline nous

  • Neuling
  • *
  • Posts: 14
  • ΓΝΩΘΙ ΣΑΥΤΟΝ
    • Remove systemd!
  • Desktop: Mate
  • Kernel: linux-pf-lts
  • Skill: Advanced
Re: Your suggestions of missing runscripts for packages
« Reply #38 on: 20. February 2015, 01:47:24 »
Could you do an at-openrc and modify xdm/xdm-setup for mdm support? Thanks!
« Last Edit: 20. February 2015, 10:27:45 by nous »
OpenRC: http://systemd-free.org  |  linux-pf and openrc repo: http://bit.do/linux-pf

Offline aaditya

  • OpenRC Team
  • ****
  • Posts: 2844
    • My Website
  • Branch: Testing
  • Desktop: Xfce, Openbox
  • GPU Card: Intel HD 4000
  • Kernel: Linux 4.4 x86_64
  • Skill: Intermediate
Re: Your suggestions of missing runscripts for packages
« Reply #39 on: 20. February 2015, 16:02:08 »
Hi nous,

I tested mdm in Virtualbox, where it runs but does not recognize my username and password for some reason.

However, I was able to login into mate using lxdm-consolekit, so maybe you could try that.

Edit-
Had a chat with nous in #manjaro-openrc, and he told me that mdm not allowing me to login can be solved by editing /etc/pam.d/mdm and removing the line containing pam_systemd.
« Last Edit: 20. February 2015, 18:00:25 by aaditya »

Offline kah0922

  • Neuling
  • *
  • Posts: 8
    • Nightblood Studios
  • Branch: unstable
  • Desktop: Plasma 5
  • GPU Card: Intel HD Graphics 4000
  • GPU driver: Mesa
  • Kernel: 3.18-ck x86_64
  • Skill: Intermediate
Re: Your suggestions of missing runscripts for packages
« Reply #40 on: 24. February 2015, 18:28:38 »
Not possible, since tlp conflicts with upower-pm-utils.

Thank the upower devs who removed pm-utils support and made it systemd only.

I think someone at Gentoo made it so that tlp works with pm-utils here:https://github.com/dywisor/tlp-portage https://github.com/dywisor/tlp-gentoo-additions.

Offline artoo

  • OpenRC Team
  • ****
  • Posts: 2373
  • Branch: Unstable
  • Desktop: LXQT/Plasma5, openrc & eudev
  • Kernel: x86_64
  • Skill: Advanced
Re: Your suggestions of missing runscripts for packages
« Reply #41 on: 24. February 2015, 18:39:38 »
I think someone at Gentoo made it so that tlp works with pm-utils here:https://github.com/dywisor/tlp-portage https://github.com/dywisor/tlp-gentoo-additions.

Yes, I know, but the arch tlp package conflicts with pm-utils.

Offline kah0922

  • Neuling
  • *
  • Posts: 8
    • Nightblood Studios
  • Branch: unstable
  • Desktop: Plasma 5
  • GPU Card: Intel HD Graphics 4000
  • GPU driver: Mesa
  • Kernel: 3.18-ck x86_64
  • Skill: Intermediate
Re: Your suggestions of missing runscripts for packages
« Reply #42 on: 25. February 2015, 04:16:09 »
Yes, I know, but the arch tlp package conflicts with pm-utils.

Would it be possible to have two different packages for both versions in the Manjaro repos? For example one would be tlp and the other would be tlp-pm?

Offline aaditya

  • OpenRC Team
  • ****
  • Posts: 2844
    • My Website
  • Branch: Testing
  • Desktop: Xfce, Openbox
  • GPU Card: Intel HD 4000
  • Kernel: Linux 4.4 x86_64
  • Skill: Intermediate
Re: Your suggestions of missing runscripts for packages
« Reply #43 on: 25. February 2015, 06:40:12 »
Guys I made a tlp-pmu pacakge and uploaded it to the AUR.
https://aur.archlinux.org/packages/tlp-pmu/

Could you check if it works for you?

You can start it as:
Code: [Select]
sudo rc-service tlp start
And enable it to start at boot as:
Code: [Select]
sudo rc-update add tlp default
To check if it is running:
Code: [Select]
sudo rc-service tlp status
sudo tlp-stat

But the thing is, I already maintain laptop-mode-tools in the AUR.. Could anyone maintain tlp-pmu?

Offline kah0922

  • Neuling
  • *
  • Posts: 8
    • Nightblood Studios
  • Branch: unstable
  • Desktop: Plasma 5
  • GPU Card: Intel HD Graphics 4000
  • GPU driver: Mesa
  • Kernel: 3.18-ck x86_64
  • Skill: Intermediate
Re: Your suggestions of missing runscripts for packages
« Reply #44 on: 25. February 2015, 22:41:33 »
Guys I made a tlp-pmu pacakge and uploaded it to the AUR.
https://aur.archlinux.org/packages/tlp-pmu/

Could you check if it works for you?

You can start it as:
Code: [Select]
sudo rc-service tlp start
And enable it to start at boot as:
Code: [Select]
sudo rc-update add tlp default
To check if it is running:
Code: [Select]
sudo rc-service tlp status
sudo tlp-stat

But the thing is, I already maintain laptop-mode-tools in the AUR.. Could anyone maintain tlp-pmu?

Just installed it. It seems to be working.