SPECS: adapter.awk - external specs adapterize - make it not to sc...
glen
glen at pld-linux.org
Thu Jul 28 22:36:32 CEST 2005
Author: glen Date: Thu Jul 28 20:36:32 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- external specs adapterize
- make it not to screw *rc-scripts.spec
---- Files affected:
SPECS:
adapter.awk (1.165 -> 1.166)
---- Diffs:
================================================================
Index: SPECS/adapter.awk
diff -u SPECS/adapter.awk:1.165 SPECS/adapter.awk:1.166
--- SPECS/adapter.awk:1.165 Mon Jul 25 00:15:30 2005
+++ SPECS/adapter.awk Thu Jul 28 22:36:26 2005
@@ -760,11 +760,17 @@
gsub("^%{_sbindir}", "%attr(755,root,root) %{_sbindir}")
gsub("^%{_bindir}", "%attr(755,root,root) %{_bindir}")
- gsub("%{_sysconfdir}\/rc\.d\/init.d", "/etc/rc.d/init.d")
- gsub("%{_sysconfdir}\/init.d", "/etc/rc.d/init.d")
+ # replace back
+ gsub("%{_sysconfdir}/rc\.d/init.d", "/etc/rc.d/init.d")
+ gsub("%{_sysconfdir}/init.d", "/etc/init.d")
gsub("%{_sysconfdir}\/sysconfig", "/etc/sysconfig")
- if (/\/etc\/rc\.d\/init\.d/) {
+ # /etc/init.d -> /etc/rc.d/init.d
+ if (!/^\/etc\/init\.d$/) {
+ gsub("/etc/init.d", "/etc/rc.d/init.d")
+ }
+
+ if (/\/etc\/rc\.d\/init\.d\// && !/functions/) {
if (!/%attr.*\/etc\/rc\.d\/init\.d/) {
$0 = "%attr(754,root,root) " $0
}
@@ -773,7 +779,6 @@
}
}
-
if (/lib.+\.so/ && !/^%attr.*/) {
$0 = "%attr(755,root,root) " $0
}
@@ -781,20 +786,22 @@
# /etc/sysconfig files
# %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/*
# attr not required, allow default 644 attr
- if (/\/etc\/sysconfig\// && /%config/ && !/%config\(noreplace\)/) {
- gsub("%config", "%config(noreplace)")
- }
+ if (!/network-scripts/) {
+ if (/\/etc\/sysconfig\// && /%config/ && !/%config\(noreplace\)/) {
+ gsub("%config", "%config(noreplace)")
+ }
- if (/\/etc\/sysconfig\// && !/%config\(noreplace\)/) {
- $NF = "%config(noreplace) " $NF
- }
+ if (/\/etc\/sysconfig\// && !/%config\(noreplace\)/) {
+ $NF = "%config(noreplace) " $NF
+ }
- if (/\/etc\/sysconfig\// && /%attr\(755/) {
- gsub("^%attr\(... *,", "%attr(640,");
- }
+ if (/\/etc\/sysconfig\// && /%attr\(755/) {
+ gsub("^%attr\(... *,", "%attr(640,");
+ }
- if (/\/etc\/sysconfig\// && !/%verify/) {
- gsub("/etc/sysconfig", "%verify(not size mtime md5) /etc/sysconfig");
+ if (/\/etc\/sysconfig\// && !/%verify/) {
+ gsub("/etc/sysconfig", "%verify(not size mtime md5) /etc/sysconfig");
+ }
}
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/adapter.awk?r1=1.165&r2=1.166&f=u
More information about the pld-cvs-commit
mailing list