From b35e8f78a35eb49404b988562daec8d4ec2712e6 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Mon, 2 Jan 2012 15:32:55 -0600 Subject: move acl_fix_fstab.py to linhes-scripts: modify packages to depend on linhes-scripts >=7-24 certmaster linhes-system wmaker-settings xymon e16-themes refs #805 res #806 --- abs/core/LinHES-system/PKGBUILD | 4 +- abs/core/certmaster/PKGBUILD | 8 ++-- abs/core/certmaster/acl_fix_fstab.py | 64 -------------------------- abs/core/certmaster/certmaster.install | 2 +- abs/core/e16_theme_settings/PKGBUILD | 4 +- abs/core/linhes-scripts/PKGBUILD | 6 ++- abs/core/linhes-scripts/linhes-scripts.install | 7 +++ abs/core/wmaker_settings/PKGBUILD | 4 +- abs/core/xymon/PKGBUILD | 4 +- 9 files changed, 23 insertions(+), 80 deletions(-) delete mode 100644 abs/core/certmaster/acl_fix_fstab.py diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD index 4b054ff..ef5b2e8 100755 --- a/abs/core/LinHES-system/PKGBUILD +++ b/abs/core/LinHES-system/PKGBUILD @@ -1,12 +1,12 @@ pkgname=LinHES-system pkgver=2 -pkgrel=20 +pkgrel=22 arch=('i686') MVDIR=$startdir/pkg/usr/LH BINDIR=$startdir/pkg/usr/bin install=LinHES.install pkgdesc="scripts and things related to having an automated system" -depends=(linhes-sounds xdotool fluxbox tilda keylaunch python_aosd) +depends=(linhes-sounds xdotool fluxbox tilda keylaunch python_aosd 'linhes-scripts>=7-24' 'runit-scripts>=2.1.1-43') backup=(etc/modprobe.d/alsa-base) binfiles="LinHES-start optimize_mythdb.py myth_mtc.py myth_mtc.sh LinHES-run diff --git a/abs/core/certmaster/PKGBUILD b/abs/core/certmaster/PKGBUILD index 367ca78..e3b9df1 100644 --- a/abs/core/certmaster/PKGBUILD +++ b/abs/core/certmaster/PKGBUILD @@ -1,10 +1,10 @@ pkgname=certmaster pkgver=0.28 -pkgrel=2 +pkgrel=3 pkgdesc="certmaster" url="https://fedorahosted.org/certmaster/ " license="gpl" -depends=(pyopenssl) +depends=('pyopenssl' 'linhes-scripts>=7-24' ) makedepends=() conflicts=() replaces=() @@ -12,7 +12,7 @@ moddir="pkg/usr/lib/python2.6/site-packages/func/minion/modules/" backup=('etc/certmaster/certmaster.conf' 'etc/certmaster/minion.conf') install=certmaster.install -source=($pkgname-$pkgver.tar.gz certmaster.conf minion.conf acl_fix_fstab.py logrotate-certmaster.conf) +source=($pkgname-$pkgver.tar.gz certmaster.conf minion.conf logrotate-certmaster.conf) arch=('i686') build() { @@ -23,7 +23,6 @@ build() { install -m755 -D minion.conf $startdir/pkg/etc/certmaster/minion.conf install -m755 -D certmaster.conf $startdir/pkg/etc/certmaster/certmaster.conf install -m755 -D logrotate-certmaster.conf $startdir/pkg/etc/logrotate.d/certmaster.conf - install -m755 -D acl_fix_fstab.py $startdir/pkg/usr/MythVantage/bin/acl_fix_fstab.py mkdir -p $startdir/pkg/var/log/certmaster cd $startdir/pkg find ./ -name "*.pyc" -print | xargs rm -f @@ -31,5 +30,4 @@ build() { md5sums=('f5acc9ff1efa34971296e26d794c5b35' '953ff601e5381b457383e7a3c4928192' 'be7bd532ae103ab3c0048980314b4fd9' - 'cc9cdabcdfc969c2829b58c0e513488c' '6bc28ccd331a6c4c05e0a9c9755a848f') diff --git a/abs/core/certmaster/acl_fix_fstab.py b/abs/core/certmaster/acl_fix_fstab.py deleted file mode 100644 index 187cab1..0000000 --- a/abs/core/certmaster/acl_fix_fstab.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/python2 -import os -import sys -import subprocess as sub - -def should_add_acl(mount_point,fs_map): - acl_fs_list=["ext3","ext4"] - rc = False - for i in fs_map: - if i[0] == mount_point: - if i[1] in acl_fs_list: - rc = True - - return rc - - -cmd="cp -f /etc/fstab /etc/fstab.backup.pre_acl" -os.system(cmd) -f = open('/etc/fstab', 'r') -fstab=f.readlines() -f.close() - -p = sub.Popen(['/sbin/fsck','-N' ],stdout=sub.PIPE,stderr=sub.PIPE) -output, errors = p.communicate() -output = output.split("\n") -fs_map=[] -for i in output: - if i.startswith("["): - split_line=i.split() - #find mount_p and remove the last char - mount_p = split_line[3][:-1] - fstype = split_line[4].split(".")[1] - append_tuple=(mount_p,fstype) - fs_map.append(append_tuple) - - - -mp=['/' , '/myth', '/data'] -newfstab=[] -for line in fstab: - new_line=line - split_line=line.split() - try: - if split_line[1] in mp and should_add_acl(split_line[1],fs_map): - #print split_line[3] - if "acl" in split_line[3]: - pass - else: - print "Adding ACL" - new_acl=split_line[3]+",acl" - split_line[3]=new_acl - new_line='\t'.join(split_line) - except: - pass - newfstab.append(new_line) - - -f = open('/etc/fstab', 'w') -for i in newfstab: - f.write(i) - f.write("\n") - -f.close() - diff --git a/abs/core/certmaster/certmaster.install b/abs/core/certmaster/certmaster.install index e0dac8c..b30f7ee 100644 --- a/abs/core/certmaster/certmaster.install +++ b/abs/core/certmaster/certmaster.install @@ -13,7 +13,7 @@ post_install() { then mkdir -p /var/log/certmaster fi - /usr/MythVantage/bin/acl_fix_fstab.py + /usr/LH/bin/acl_fix_fstab.py mount -o remount / if [ ! -e /etc/pki/certmaster/ca ] then diff --git a/abs/core/e16_theme_settings/PKGBUILD b/abs/core/e16_theme_settings/PKGBUILD index c71e6d0..278c08a 100644 --- a/abs/core/e16_theme_settings/PKGBUILD +++ b/abs/core/e16_theme_settings/PKGBUILD @@ -1,8 +1,8 @@ pkgname=e16_theme_settings pkgver=1.0 -pkgrel=8 +pkgrel=9 pkgdesc="Default settings for e16" -depends=(enlightenment) +depends=(enlightenment 'linhes-scripts>=7-24') source=() arch=('i686') groups=(alt_wm) diff --git a/abs/core/linhes-scripts/PKGBUILD b/abs/core/linhes-scripts/PKGBUILD index 80321a3..4c3dd05 100644 --- a/abs/core/linhes-scripts/PKGBUILD +++ b/abs/core/linhes-scripts/PKGBUILD @@ -3,7 +3,7 @@ pkgname=linhes-scripts pkgver=7 -pkgrel=22 +pkgrel=24 pkgdesc="Various scripts that help to make LinHES, LinHES." arch=('i686' 'x86_64') license=('GPL2') @@ -48,6 +48,7 @@ xwin_find.sh upgrade_screen_rc upgrade_linhes_script.sh find_orphans.py +acl_fix_fstab.py ) build() { @@ -99,4 +100,5 @@ md5sums=('f56985b2d602e11dc1e10d3e7848b2a5' 'a94fe6d980f4b810f2e2ae5352084b39' '974c137d3fcb85942ba8945a1bc815fe' 'aad75575c9af70aa8bf3a06718985664' - 'd8838461af9d446a1fd7e7883fdc75d1') + 'd8838461af9d446a1fd7e7883fdc75d1' + 'cc9cdabcdfc969c2829b58c0e513488c') diff --git a/abs/core/linhes-scripts/linhes-scripts.install b/abs/core/linhes-scripts/linhes-scripts.install index f554bd0..d4c9e59 100644 --- a/abs/core/linhes-scripts/linhes-scripts.install +++ b/abs/core/linhes-scripts/linhes-scripts.install @@ -2,6 +2,13 @@ post_upgrade() { . /etc/profile /usr/LH/bin/remove_php_mythvideo.sh + if [ "`vercmp $2 7-24`" -lt 0 ] + then + echo "Applying ACL fix and remounting /" + /usr/LH/bin/acl_fix_fstab.py + mount -o remount / + fi + } # vim:set ts=2 sw=2 et: diff --git a/abs/core/wmaker_settings/PKGBUILD b/abs/core/wmaker_settings/PKGBUILD index 73b3050..47b4b99 100644 --- a/abs/core/wmaker_settings/PKGBUILD +++ b/abs/core/wmaker_settings/PKGBUILD @@ -1,8 +1,8 @@ pkgname=wmaker_settings pkgver=1.0 -pkgrel=5 +pkgrel=8 pkgdesc="Default settings for windowmaker+ theme" -depends=(windowmaker) +depends=('windowmaker' 'linhes-scripts>=7-24') source=() arch=('i686') groups=(alt_wm) diff --git a/abs/core/xymon/PKGBUILD b/abs/core/xymon/PKGBUILD index d8b4b33..23590a1 100644 --- a/abs/core/xymon/PKGBUILD +++ b/abs/core/xymon/PKGBUILD @@ -1,7 +1,7 @@ pkgbase=xymon pkgname=(xymonserver xymonclient) pkgver=4.3.5 -pkgrel=31 +pkgrel=32 pkgdesc="Hobbit is a system for monitoring servers and networks. " license="GPL" arch=('i686' 'x86_64') @@ -9,7 +9,7 @@ arch=('i686' 'x86_64') url="http://www.xymon.com/" source=(http://voxel.dl.sourceforge.net/project/xymon/Xymon/4.3.5/xymon-4.3.5.tar.gz hobbitadd.py xymon_ghost_check graph.cfg.diff xymonserver.cfg.diff tasks.d.mv clientlaunch.cfg.patch hobbitstorage.py hbnotes.py hobbit-myth-orphan.sh analysis.cfg hbfunc.py be.png tuner.png tv.png hobbit-mem-myth.sh hobbit_notify.sh alerts.cfg hobbit_myth_data.py logrotate-server.xymon logrotate-client.xymon log_list.sh client-local.cfg.patch led_themes.tar.gz ) -depends=(rrdtool fping pcre python graphviz) +depends=(rrdtool fping pcre python graphviz 'linhes-scripts>=7-24') install=xymon.install build() { -- cgit v0.12