-initscripts = [ 'sfa', 'sfa-cm' ]
-
-data_files = [ ('/etc/sfa/', [ 'config/aggregates.xml',
- 'config/registries.xml',
- 'config/default_config.xml',
- 'config/sfi_config',
- 'config/topology',
- 'sfa/managers/pl/pl.rng',
- 'sfa/trust/credential.xsd',
- 'sfa/trust/top.xsd',
- 'sfa/trust/sig.xsd',
- 'sfa/trust/xml.xsd',
- 'sfa/trust/protogeni-rspec-common.xsd',
- 'flashpolicy/sfa_flashpolicy_config.xml',
- ]),
- ('/etc/sfatables/matches/', glob('sfatables/matches/*.xml')),
- ('/etc/sfatables/targets/', glob('sfatables/targets/*.xml')),
- ('/etc/init.d/', [ "init.d/%s"%x for x in initscripts ]),
- ('/usr/share/sfa/migrations', [ 'sfa/storage/migrations/*' ] ),
- ('/usr/share/sfa/migrations/versions', [ 'sfa/storage/migrations/versions/*' ] ),
- ('/usr/share/sfa/examples/', glob('sfa/examples/*' ) + [ 'cron.d/sfa.cron' ] ),
- ]
-
-# add sfatables processors as data_files
-processor_files = [f for f in glob('sfatables/processors/*') if os.path.isfile(f)]
+data_files = [
+ ('/etc/sfa/',
+ [ 'config/aggregates.xml',
+ 'config/registries.xml',
+ 'config/default_config.xml',
+ 'config/api_versions.xml',
+ 'config/sfi_config',
+ 'config/topology',
+ 'sfa/managers/pl/pl.rng',
+ 'sfa/trust/credential.xsd',
+ 'sfa/trust/top.xsd',
+ 'sfa/trust/sig.xsd',
+ 'sfa/trust/xml.xsd',
+ 'sfa/trust/protogeni-rspec-common.xsd',
+ ]),
+ ('/etc/sfatables/matches/', glob('sfatables/matches/*.xml')),
+ ('/etc/sfatables/targets/', glob('sfatables/targets/*.xml')),
+ ('/usr/share/sfa/migrations', glob('sfa/storage/migrations/*.*') ),
+ ('/usr/share/sfa/migrations/versions', glob('sfa/storage/migrations/versions/*') ),
+ ('/usr/share/sfa/examples/', glob('sfa/examples/*' ) + [ 'cron.d/sfa.cron' ] ),
+]
+
+# use /lib/systemd instead of /usr/lib/systemd
+# the latter would work on fedora only, the former
+# will work on both fedora and ubuntu
+services = ['sfa-db', 'sfa-aggregate', 'sfa-registry']
+data_files.append(
+ ('/lib/systemd/system',
+ ['systemd/{}.service'.format(service)
+ for service in services]))
+
+
+# sfatables processors
+processor_files = [f for f in glob('sfatables/processors/*')
+ if os.path.isfile(f)]