Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 481760 - sys-cluster/quantum should install init.d scripts
Summary: sys-cluster/quantum should install init.d scripts
Status: RESOLVED DUPLICATE of bug 483386
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthew Thode ( prometheanfire )
URL:
Whiteboard:
Keywords: EBUILD, PATCH
Depends on:
Blocks:
 
Reported: 2013-08-20 15:40 UTC by Davide Rebeccani
Modified: 2013-09-11 03:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixed ebuild that installs init scripts with use flag selections (quantum-2013.1.9999.ebuild,3.17 KB, text/plain)
2013-08-20 15:41 UTC, Davide Rebeccani
Details
/etc/conf.d/quantum file to write PID file during startup of quantum services (quantum.confd,79 bytes, text/plain)
2013-08-20 15:42 UTC, Davide Rebeccani
Details
/etc/init.d/quantum script to start services (quantum.initd,1.35 KB, text/plain)
2013-08-20 15:43 UTC, Davide Rebeccani
Details
Missed the $PID_PATH creation (quantum-2013.1.9999.ebuild,3.17 KB, text/plain)
2013-08-20 16:12 UTC, Davide Rebeccani
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Rebeccani 2013-08-20 15:40:19 UTC
After emergine sys-cluster/quantum there isn't any init scripts

Reproducible: Always

Steps to Reproduce:
1.emerge sys-cluster/quantum
2.
3.
Actual Results:  
Missing init scripts

Expected Results:  
Find /etc/init.d/quantum
Comment 1 Davide Rebeccani 2013-08-20 15:41:40 UTC
Created attachment 356498 [details]
Fixed ebuild that installs init scripts with use flag selections
Comment 2 Davide Rebeccani 2013-08-20 15:42:25 UTC
Created attachment 356500 [details]
/etc/conf.d/quantum file to write PID file during startup of quantum services
Comment 3 Davide Rebeccani 2013-08-20 15:43:07 UTC
Created attachment 356502 [details]
/etc/init.d/quantum script to start services
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2013-08-20 15:45:23 UTC
Comment on attachment 356498 [details]
Fixed ebuild that installs init scripts with use flag selections

--- quantum-2013.1.9999.ebuild  2013-08-20 15:37:56.636596016 +0200
+++ -   2013-08-20 17:45:10.941831930 +0200
@@ -1,6 +1,6 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/quantum/quantum-2013.1.9999.ebuild,v 1.2 2013/08/19 03:29:17 prometheanfire Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/quantum/quantum-2013.1.9999.ebuild,v 1.1 2013/08/02 18:33:11 prometheanfire Exp $
 
 EAPI=5
 PYTHON_COMPAT=( python2_7 )
@@ -16,8 +16,8 @@
 
 LICENSE="Apache-2.0"
 SLOT="0"
-KEYWORDS=""
-IUSE="test"
+KEYWORDS="~amd64 ~x86"
+IUSE="server test"
 
 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
                test? ( dev-python/cliff[${PYTHON_USEDEP}]
@@ -58,8 +58,21 @@
                virtual/python-argparse[${PYTHON_USEDEP}]
                net-misc/openvswitch"

+pkg_setup() {
+       enewgroup quantum
+       enewuser quantum -1 -1 /var/lib/quantum quantum
+}
+
 python_install() {
        distutils-r1_python_install
+
+       newconfd "${FILESDIR}/quantum.confd" quantum
+       newinitd "${FILESDIR}/quantum.initd" quantum
+
+       use server && dosym /etc/init.d/quantum /etc/init.d/quantum-server
+
+       dodir /var/log/quantum /run/quantum
+       fowners quantum:quantum /var/log/quantum
        keepdir /etc/quantum
        insinto /etc/quantum

@@ -78,3 +91,8 @@
        insinto "/usr/lib64/python2.7/site-packages/quantum/db/migration/alembic_migrations/"
        doins -r "quantum/db/migration/alembic_migrations/versions"
 }
+
+pkg_config() {
+       fperms 0700 /var/log/quantum
+       fowners quantum:quantum /var/log quantum
+}
Comment 5 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2013-08-20 15:50:26 UTC
if all that the server flag does is a symlink I think I'll forgo that flag for now.  But thanks for the conf.d and init files :D
Comment 6 Davide Rebeccani 2013-08-20 16:12:27 UTC
Created attachment 356510 [details]
Missed the $PID_PATH creation
Comment 7 Davide Rebeccani 2013-08-20 16:17:23 UTC
(In reply to Matthew Thode ( prometheanfire ) from comment #5)
> if all that the server flag does is a symlink I think I'll forgo that flag
> for now.  But thanks for the conf.d and init files :D

I was thinking about enabling the selection of the quantum modules/plugins via USE flags so i was trying with the first and the easier :-D
Comment 8 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2013-08-20 16:41:30 UTC
(In reply to Davide Rebeccani from comment #7)
> (In reply to Matthew Thode ( prometheanfire ) from comment #5)
> > if all that the server flag does is a symlink I think I'll forgo that flag
> > for now.  But thanks for the conf.d and init files :D
> 
> I was thinking about enabling the selection of the quantum modules/plugins
> via USE flags so i was trying with the first and the easier :-D

that's fair :D
Comment 9 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2013-09-11 03:02:19 UTC

*** This bug has been marked as a duplicate of bug 483386 ***