OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src openpkg-web Date: 17-Nov-2003 22:47:30
Branch: HEAD Handle: 2003111721472702
Modified files:
openpkg-src/openpkg HISTORY openpkg.spec rpmmacros rpmtool
openpkg-web news.txt
Log:
automatically check for %NoSource/%NoPatch integrity and package class
in %prep
Summary:
Revision Changes Path
1.90 +1 -0 openpkg-src/openpkg/HISTORY
1.246 +1 -1 openpkg-src/openpkg/openpkg.spec
1.46 +9 -1 openpkg-src/openpkg/rpmmacros
1.25 +48 -6 openpkg-src/openpkg/rpmtool
1.7448 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/HISTORY
============================================================================
$ cvs diff -u -r1.89 -r1.90 HISTORY
--- openpkg-src/openpkg/HISTORY 13 Nov 2003 13:17:00 -0000 1.89
+++ openpkg-src/openpkg/HISTORY 17 Nov 2003 21:47:29 -0000 1.90
@@ -2,6 +2,7 @@
2003
====
+20031117 automatically check for %NoSource/%NoPatch integrity and package class in
%prep
20031113 stop processing if we cannot create the necessary user accounts
20031107 fix usage of %pre in aux.wrapbin.sh -- was broken after recent work-offs
20031102 upgrade to cURL 7.10.8
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/openpkg.spec
============================================================================
$ cvs diff -u -r1.245 -r1.246 openpkg.spec
--- openpkg-src/openpkg/openpkg.spec 13 Nov 2003 13:17:00 -0000 1.245
+++ openpkg-src/openpkg/openpkg.spec 17 Nov 2003 21:47:29 -0000 1.246
@@ -39,7 +39,7 @@
# o any cc(1)
# the package version/release
-%define V_openpkg 20031113
+%define V_openpkg 20031117
# the used software versions
%define V_rpm 4.2.1
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/rpmmacros
============================================================================
$ cvs diff -u -r1.45 -r1.46 rpmmacros
--- openpkg-src/openpkg/rpmmacros 19 Oct 2003 19:00:46 -0000 1.45
+++ openpkg-src/openpkg/rpmmacros 17 Nov 2003 21:47:29 -0000 1.46
@@ -295,7 +295,15 @@
# macros for NoSource/NoPatch (distribution restriction) integrity handling
%NoSource() %(if [ ".%{?restriction}" != ".no" ]; then echo "NoSource:
%1"; fi)%{expand:%%global _restricted %{?_restricted:%{_restricted}} %%{SOURCEURL%1}}
%NoPatch() %(if [ ".%{?restriction}" != ".no" ]; then echo "NoPatch:
%1"; fi)%{expand:%%global _restricted %{?_restricted:%{_restricted}} %%{PATCHURL%1}}
-%integrity() %(for url in . %{?_restricted}; do [ ".$url" = .. ] &&
continue; eval `echo "$url" | sed -e 's!^\\(.*\\)::/\\([^/][^/]*\\)$!;url=\\"\\1 -->
\\"; file=\\"\\2\\"!' -e 's!^\\([^:;][^:]*://.*/\\)\\([^/][^/]*\\)$!;url=\\"\\1\\";
file=\\"\\2\\"!' -e 's:^\\([^;].*\\)$:;url="(from unknown location) "; file="\\1":' -e
's:^;::'`; if [ ! -f "%{_specdir}/$file" ] && [ ! -f "%{_sourcedir}/$file" ]; then (
echo "Sorry, this OpenPKG package contains a DISTRIBUTION RESTRICTED source file.";
echo "Before you can proceed building this package you have to MANUALLY fetch"; echo "
${url}${file}"; echo "and provide it locally under the path"; echo "
%{_sourcedir}/$file" ) | %{l_rpmtool} msg -b -t error 1>&2; echo "exit 1"; fi; done)
+%integrity() %{l_check_nosource}
+
+# macros for checking build environment
+%l_check_nosource() %(for url in . %{?_restricted}; do [ ".$url" = .. ] &&
continue; eval `echo "$url" | sed -e 's!^\\(.*\\)::/\\([^/][^/]*\\)$!;url=\\"\\1 -->
\\"; file=\\"\\2\\"!' -e 's!^\\([^:;][^:]*://.*/\\)\\([^/][^/]*\\)$!;url=\\"\\1\\";
file=\\"\\2\\"!' -e 's:^\\([^;].*\\)$:;url="(from unknown location) "; file="\\1":' -e
's:^;::'`; if [ ! -f "%{_specdir}/$file" ] && [ ! -f "%{_sourcedir}/$file" ]; then (
echo "Sorry, this OpenPKG package contains a DISTRIBUTION RESTRICTED source file.";
echo "Before you can proceed building this package you have to MANUALLY fetch"; echo "
${url}${file}"; echo "and provide it locally under the path"; echo "
%{_sourcedir}/$file" ) | %{l_rpmtool} msg -b -t error 1>&2; echo "exit 1"; fi; done)
+%l_check_class() %(class=`echo "%{distribution}" | sed -e 's;^;X;' -e
's;^X.*\\[\\(..*\\)\\].*$;\\1;' -e 's;^X.*;JUNK;'`; %{l_rpmtool} check-class "$class")
+%prep %%prep\
+ %{l_check_nosource} \
+ %{l_check_class} \
+ %{nil}
# macro-processor add-on for testing external conditions
%l_test(pfd) %(if [ ".%{?-p:yes}" = .yes ]; then %{l_prefix}/bin/rpm -q
%1 >/dev/null 2>&1; rc=$?; elif [ ".%{?-f:yes}" = .yes ]; then test -f %1; rc=$?; elif
[ ".%{?-d:yes}" = .yes ]; then test -d %1; rc=$?; fi; if [ ".$rc" = .0 ]; then echo
"yes"; else echo "no"; fi)
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/rpmtool
============================================================================
$ cvs diff -u -r1.24 -r1.25 rpmtool
--- openpkg-src/openpkg/rpmtool 28 Oct 2003 09:37:34 -0000 1.24
+++ openpkg-src/openpkg/rpmtool 17 Nov 2003 21:47:29 -0000 1.25
@@ -56,7 +56,7 @@
echo ' group [-c] [-d] <groupname> <min-gid> [<username> ...]'
echo ' signal [-v] [-t] [-n] [-c] [-d <delay>] [-p <pid>] [-m <pattern>] <sig>
[<sig> ...]'
echo ' config [-v] [-s] [-a] [-r] [-b <ext>] [-p <tagprefix>] [-t <tagname>]
[-i <tagid>] <file>'
- echo ' msg [-b] [-t <type>]'
+ echo ' msg [-b] [-r] [-t <type>]'
echo ''
exit 0
fi
@@ -162,13 +162,18 @@
gen_tmpfile=yes
;;
msg )
- str_usage="[-b] [-t <type>]"
+ str_usage="[-b] [-r] [-t <type>]"
arg_spec="0="
- opt_spec="b."
- opt_spec="b.t:"
+ opt_spec="b.r.t:"
opt_b=no
+ opt_r=no
opt_t=info
;;
+ check-class )
+ str_usage=""
+ arg_spec="1="
+ opt_spec=""
+ ;;
-* )
echo "$prog_name:Error: unknown option \`$tool'" 2>&1
echo "$prog_name:Hint: run \`$0 -h' for usage" 2>&1
@@ -459,7 +464,7 @@
cppflags="-I${opt_p}/include$cppflags"
fi
if [ ".$opt_i" = .yes ]; then
- eval `sh /cw/lib/openpkg/platform -U -S ":" -C "" -F "%<ac>:%<st>" |\
+ eval `sh @l_prefix@/lib/openpkg/platform -U -S ":" -C "" -F
"%<ac>:%<st>" |\
sed -e 's/^\(.*\):\(.*\):\(.*\)$/arch="\1"; os_name="\2";
os_vers="\3";/'`
V=0; R=0; L=0
eval `echo "$os_vers" |\
@@ -1319,10 +1324,47 @@
esac
# display message
- echo . | awk '{ printf("\r"); }'
+ if [ ".$opt_r" != .yes ]; then
+ echo . | awk '{ printf("\r"); }'
+ fi
echo
"+----------------------------------${title}------------------------------------+"
expand -8 | sed -e 's; *$;;' | awk '{ printf("| %-75s |\n", substr($0, 0,
75)); }'
echo
"+-----------------------------------------------------------------------------+"
+ ;;
+ check-class )
+ # check package class from within .spec file macro expansion for %prep
section
+ class="$1"; shift
+ case "$class" in
+ BASE|CORE )
+ ;;
+ PLUS )
+ echo "set +x"
+ ( echo "This OpenPKG package is of class PLUS."
+ echo "It is in pre-release state and perhaps ready for release
soon."
+ echo "Nevertheless, use it with great care in production
environments."
+ echo "It might be unstable and perhaps break your environment."
+ ) | @l_prefix@/lib/openpkg/rpmtool msg -r -t notice | sed -e
's;^;echo ";' -e 's;$;";'
+ echo "set -x"
+ ;;
+ EVAL )
+ echo "set +x"
+ ( echo "This OpenPKG package is of class EVAL."
+ echo "It is in evaluation state and still not ready for release."
+ echo "Hence do not use it in production environments at all."
+ echo "It might be unstable and perhaps even be incompletely
packaged."
+ ) | @l_prefix@/lib/openpkg/rpmtool msg -r -t warn | sed -e
's;^;echo ";' -e 's;$;";'
+ echo "set -x"
+ ;;
+ JUNK )
+ echo "set +x"
+ ( echo "This OpenPKG package is of class JUNK."
+ echo "It is in development state and still not even ready for
evaluation."
+ echo "Hence do not try to use it at all in any environment."
+ echo "It is definitely unstable and incomplete."
+ ) | @l_prefix@/lib/openpkg/rpmtool msg -r -t warn | sed -e
's;^;echo ";' -e 's;$;";'
+ echo "set -x"
+ ;;
+ esac
;;
esac
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.7447 -r1.7448 news.txt
--- openpkg-web/news.txt 17 Nov 2003 20:10:48 -0000 1.7447
+++ openpkg-web/news.txt 17 Nov 2003 21:47:27 -0000 1.7448
@@ -1,3 +1,4 @@
+17-Nov-2003: Upgraded package: P<openpkg-20031117-20031117>
17-Nov-2003: Upgraded package: P<snort-2.0.4-20031117>
17-Nov-2003: Upgraded package: P<mysql-4.0.16-20031117>
17-Nov-2003: Upgraded package: P<abiword-2.0.1.2-20031117>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]