Makefile, plugin_net: various improvements
- replaced bash loops with GNU Make loops (can now run in parallel) - preserved original file timestamps during installation - used install -D instead of mkdir -p - fixed typo in plugin_net that caused error during byte compilation Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
5b8a2d2e8e
commit
de1bb42821
2 changed files with 20 additions and 35 deletions
53
Makefile
53
Makefile
|
|
@ -16,7 +16,8 @@ archive: clean
|
|||
cp AUTHORS COPYING INSTALL README $(VERSIONED_NAME)
|
||||
|
||||
cp tuned.py tuned.spec tuned.service tuned.tmpfiles Makefile tuned-adm.py \
|
||||
tuned.bash dbus.conf recommend.conf tuned-main.conf $(VERSIONED_NAME)
|
||||
tuned.bash dbus.conf recommend.conf tuned-main.conf 00_tuned bootcmdline \
|
||||
$(VERSIONED_NAME)
|
||||
cp -a doc experiments libexec man profiles systemtap tuned $(VERSIONED_NAME)
|
||||
|
||||
tar cjf $(VERSIONED_NAME).tar.bz2 $(VERSIONED_NAME)
|
||||
|
|
@ -37,60 +38,47 @@ install:
|
|||
cp -a tuned $(DESTDIR)$(PYTHON_SITELIB)
|
||||
|
||||
# binaries
|
||||
mkdir -p $(DESTDIR)/usr/sbin
|
||||
install -m 0755 tuned.py $(DESTDIR)/usr/sbin/tuned
|
||||
install -m 0755 tuned-adm.py $(DESTDIR)/usr/sbin/tuned-adm
|
||||
for file in systemtap/*; do \
|
||||
install -m 0755 $$file $(DESTDIR)/usr/sbin/; \
|
||||
done
|
||||
install -Dpm 0755 tuned.py $(DESTDIR)/usr/sbin/tuned
|
||||
install -Dpm 0755 tuned-adm.py $(DESTDIR)/usr/sbin/tuned-adm
|
||||
$(foreach file, $(wildcard systemtap/*), \
|
||||
install -Dpm 0755 $(file) $(DESTDIR)/usr/sbin/$(notdir $(file));)
|
||||
|
||||
# tools
|
||||
mkdir -p $(DESTDIR)/usr/bin
|
||||
install -m 0755 experiments/powertop2tuned.py $(DESTDIR)/usr/bin/powertop2tuned
|
||||
install -Dpm 0755 experiments/powertop2tuned.py $(DESTDIR)/usr/bin/powertop2tuned
|
||||
|
||||
# configuration files
|
||||
mkdir -p $(DESTDIR)/etc/tuned
|
||||
install -m 0644 tuned-main.conf $(DESTDIR)/etc/tuned/tuned-main.conf
|
||||
install -Dpm 0644 tuned-main.conf $(DESTDIR)/etc/tuned/tuned-main.conf
|
||||
# None profile in the moment, autodetection will be used
|
||||
echo -n > $(DESTDIR)/etc/tuned/active_profile
|
||||
install -m 0644 bootcmdline $(DESTDIR)/etc/tuned/bootcmdline
|
||||
install -Dpm 0644 bootcmdline $(DESTDIR)/etc/tuned/bootcmdline
|
||||
|
||||
# profiles & system config
|
||||
mkdir -p $(DESTDIR)$(TUNED_PROFILESDIR)
|
||||
cp -a profiles/* $(DESTDIR)$(TUNED_PROFILESDIR)/
|
||||
install -m 0644 recommend.conf $(DESTDIR)$(TUNED_PROFILESDIR)/recommend.conf
|
||||
install -pm 0644 recommend.conf $(DESTDIR)$(TUNED_PROFILESDIR)/recommend.conf
|
||||
|
||||
# Install bash completion
|
||||
mkdir -p $(DESTDIR)$(BASH_COMPLETIONS)
|
||||
install -m 0644 tuned.bash $(DESTDIR)$(BASH_COMPLETIONS)/tuned
|
||||
install -Dpm 0644 tuned.bash $(DESTDIR)$(BASH_COMPLETIONS)/tuned/tuned.bash
|
||||
|
||||
# log dir
|
||||
mkdir -p $(DESTDIR)/var/log/tuned
|
||||
|
||||
# runtime directory
|
||||
mkdir -p $(DESTDIR)/run/tuned
|
||||
mkdir -p $(DESTDIR)$(TMPFILESDIR)
|
||||
install -m 0644 tuned.tmpfiles $(DESTDIR)$(TMPFILESDIR)/tuned.conf
|
||||
install -Dpm 0644 tuned.tmpfiles $(DESTDIR)$(TMPFILESDIR)/tuned.conf
|
||||
|
||||
# systemd units
|
||||
mkdir -p $(DESTDIR)$(UNITDIR)
|
||||
install -m 0644 tuned.service $(DESTDIR)$(UNITDIR)/tuned.service
|
||||
install -Dpm 0644 tuned.service $(DESTDIR)$(UNITDIR)/tuned.service
|
||||
|
||||
# dbus configuration
|
||||
mkdir -p $(DESTDIR)/etc/dbus-1/system.d
|
||||
install -m 0644 dbus.conf $(DESTDIR)/etc/dbus-1/system.d/com.redhat.tuned.conf
|
||||
install -Dpm 0644 dbus.conf $(DESTDIR)/etc/dbus-1/system.d/com.redhat.tuned.conf
|
||||
|
||||
# grub template
|
||||
mkdir -p $(DESTDIR)/etc/grub.d
|
||||
install -m 0755 00_tuned $(DESTDIR)/etc/grub.d/00_tuned
|
||||
install -Dpm 0755 00_tuned $(DESTDIR)/etc/grub.d/00_tuned
|
||||
|
||||
# manual pages
|
||||
for man_section in 5 7 8; do \
|
||||
mkdir -p $(DESTDIR)/usr/share/man/man$$man_section; \
|
||||
for file in man/*.$$man_section; do \
|
||||
install -m 0644 $$file $(DESTDIR)/usr/share/man/man$$man_section; \
|
||||
done; \
|
||||
done
|
||||
$(foreach man_section, 5 7 8, $(foreach file, $(wildcard man/*.$(man_section)), \
|
||||
install -Dpm 0644 $(file) $(DESTDIR)/usr/share/man/man$(man_section)/$(notdir $(file));))
|
||||
|
||||
# documentation
|
||||
mkdir -p $(DESTDIR)/usr/share/doc/$(NAME)
|
||||
|
|
@ -98,10 +86,8 @@ install:
|
|||
cp AUTHORS COPYING README $(DESTDIR)/usr/share/doc/$(NAME)
|
||||
|
||||
# Install libexec scripts
|
||||
install -m 0755 -Dd $(DESTDIR)/usr/libexec/tuned
|
||||
for file in libexec/*; do \
|
||||
install -m 0755 $$file $(DESTDIR)/usr/libexec/tuned; \
|
||||
done
|
||||
$(foreach file, $(wildcard libexec/*), \
|
||||
install -Dpm 0755 $(file) $(DESTDIR)/usr/libexec/tuned/$(notdir $(file));)
|
||||
|
||||
clean:
|
||||
find -name "*.pyc" | xargs rm -f
|
||||
|
|
@ -111,4 +97,3 @@ test:
|
|||
python -m unittest discover tests
|
||||
|
||||
.PHONY: clean archive srpm tag test
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import base
|
|||
from decorators import *
|
||||
import tuned.logs
|
||||
from tuned.utils.nettool import ethcard
|
||||
from tuned utils.commands import commands
|
||||
from tuned.utils.commands import commands
|
||||
import os
|
||||
import re
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue