Browse Source

Clifford Wolf:


			
			
				rocklinux
			
			
		
Clifford Wolf 20 years ago
parent
commit
2c479b8e37
16 changed files with 246 additions and 133 deletions
  1. +26
    -0
      misc/archive/bash_exec_debug.patch
  2. +97
    -0
      misc/tools-source/descparser.c
  3. +0
    -35
      package/rene/subversion-static/subversion-static.cache
  4. +0
    -43
      package/rene/subversion-static/subversion-static.desc
  5. +12
    -21
      package/rene/subversion/config.in
  6. +0
    -0
      package/rene/subversion/pthread-link.patch
  7. +47
    -23
      package/rene/subversion/subversion.conf
  8. +5
    -0
      package/rene/subversion/subversion.desc
  9. +6
    -3
      scripts/Build-Pkg
  10. +6
    -2
      scripts/Build-Target
  11. +1
    -1
      scripts/Build-Tools
  12. +1
    -1
      scripts/Create-DescPatch
  13. +4
    -1
      scripts/Create-PkgQueue
  14. +37
    -0
      scripts/config.func
  15. +2
    -1
      scripts/functions
  16. +2
    -2
      target/reference/build.sh

+ 26
- 0
misc/archive/bash_exec_debug.patch

@ -0,0 +1,26 @@
--- ./execute_cmd.c.orig 2004-05-11 12:29:15.000000000 +0200
+++ ./execute_cmd.c 2004-05-11 12:43:59.000000000 +0200
@@ -3472,6 +3472,23 @@
int sample_len;
SETOSTYPE (0); /* Some systems use for USG/POSIX semantics */
+ if ( getenv ("BASH_EXEC_DEBUG_FILE") )
+ {
+ char *file = getenv ("BASH_EXEC_DEBUG_FILE");
+ int fd = open (file, O_WRONLY|O_CREAT|O_APPEND, 0666);
+ if ( fd >= 0 )
+ {
+ int i;
+ write (fd, command, strlen(command));
+ for (i=0; args[i]; i++)
+ {
+ write (fd, " ", 1);
+ write (fd, args[i], strlen(args[i]));
+ }
+ write (fd, "\n", 1);
+ close (fd);
+ }
+ }
execve (command, args, env);
i = errno; /* error from execve() */
SETOSTYPE (1);

+ 97
- 0
misc/tools-source/descparser.c

@ -0,0 +1,97 @@
/*
* --- ROCK-COPYRIGHT-NOTE-BEGIN ---
*
* This copyright note is auto-generated by ./scripts/Create-CopyPatch.
* Please add additional copyright information _after_ the line containing
* the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
* the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
*
* ROCK Linux: rock-src/misc/tools-source/descparser.c
* ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. A copy of the GNU General Public
* License can be found at Documentation/COPYING.
*
* Many people helped and are helping developing ROCK Linux. Please
* have a look at http://www.rocklinux.org/ and the Documentation/TEAM
* file for details.
*
* --- ROCK-COPYRIGHT-NOTE-END ---
*/
/* this is a 1st proof-of-concept implementation */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <regex.h>
int check_condition(const char *cond)
{
char *t = strdup(cond);
char *left = strtok(t, " \t\n");
char *op = strtok(0, " \t\n");
char *right = strtok(0, " \t\n");
int retcode = 0;
if ( !strcmp(op, "==") ) {
char regex[strlen(right)+3];
char *text = getenv(left);
regex_t re;
sprintf(regex, "^%s$", right);
if ( !text ) text = "_undef_";
if ( regcomp(&re, regex, REG_EXTENDED|REG_NOSUB) ) {
fprintf(stderr, "failed to compile regex: '%s'.\n", right);
exit(1);
}
if ( !regexec(&re, text, 0, 0, 0) ) retcode = 1;
regfree(&re);
} else {
fprintf(stderr, "Unknown operator: '%s'.\n", op);
exit(1);
}
free(t);
return retcode;
}
int main()
{
char line[4096];
int condstack[128];
int condcount = -1;
int falselevel = 0;
while ( fgets(line, 4096, stdin) ) {
if (line[0] == '#') {
if ( !strncmp(line, "#if ", 4) ) {
condstack[++condcount] = check_condition(line+4);
if ( !condstack[condcount] ) falselevel++;
} else
if ( !strncmp(line, "#else", 5) ) {
falselevel += condstack[condcount] ? +1 : -1;
condstack[condcount] = !condstack[condcount];
} else
if ( !strncmp(line, "#elsif ", 7) ) {
if ( !condstack[condcount] ) {
condstack[condcount] = check_condition(line+7);
if ( condstack[condcount] ) falselevel--;
} else
falselevel++;
} else
if ( !strncmp(line, "#endif", 6) ) {
if ( !condstack[condcount--] ) falselevel--;
}
} else
if ( !falselevel )
puts(line);
}
return 0;
}

+ 0
- 35
package/rene/subversion-static/subversion-static.cache

@ -1,35 +0,0 @@
[COPY] --- ROCK-COPYRIGHT-NOTE-BEGIN ---
[COPY]
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch.
[COPY] Please add additional copyright information _after_ the line containing
[COPY] the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
[COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
[COPY]
[COPY] ROCK Linux: rock-src/package/rene/subversion-static/subversion-static.cache
[COPY] ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
[COPY]
[COPY] This program is free software; you can redistribute it and/or modify
[COPY] it under the terms of the GNU General Public License as published by
[COPY] the Free Software Foundation; either version 2 of the License, or
[COPY] (at your option) any later version. A copy of the GNU General Public
[COPY] License can be found at Documentation/COPYING.
[COPY]
[COPY] Many people helped and are helping developing ROCK Linux. Please
[COPY] have a look at http://www.rocklinux.org/ and the Documentation/TEAM
[COPY] file for details.
[COPY]
[COPY] --- ROCK-COPYRIGHT-NOTE-END ---
[TIMESTAMP] 1073293630 Mon Jan 5 10:07:10 2004
[CONFIG-ID] 2.0.0-rc5-x86-pentium-mmx-32-reference
[ROCKVER] 2.0.0-rc5
[LOGS] 5-subversion-static.log 9-subversion-static.log
[BUILDTIME] 37350 (9)
[SIZE] 8.46 MB, 16 files
[DEP] bash bdb41 binutils bzip2 coreutils diffutils expat findutils gawk
[DEP] gcc3 gdbm glibc23 grep libxml2 linux24-header make mktemp net-tools
[DEP] numpy patch perl5 python sed swig sysfiles tar util-linux zlib

+ 0
- 43
package/rene/subversion-static/subversion-static.desc

@ -1,43 +0,0 @@
[COPY] --- ROCK-COPYRIGHT-NOTE-BEGIN ---
[COPY]
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch.
[COPY] Please add additional copyright information _after_ the line containing
[COPY] the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
[COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
[COPY]
[COPY] ROCK Linux: rock-src/package/rene/subversion-static/subversion-static.desc
[COPY] ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
[COPY]
[COPY] This program is free software; you can redistribute it and/or modify
[COPY] it under the terms of the GNU General Public License as published by
[COPY] the Free Software Foundation; either version 2 of the License, or
[COPY] (at your option) any later version. A copy of the GNU General Public
[COPY] License can be found at Documentation/COPYING.
[COPY]
[COPY] Many people helped and are helping developing ROCK Linux. Please
[COPY] have a look at http://www.rocklinux.org/ and the Documentation/TEAM
[COPY] file for details.
[COPY]
[COPY] --- ROCK-COPYRIGHT-NOTE-END ---
[I] A compelling replacement for CVS
[T] The goal of the Subversion project is to build a version control
[T] system that is a compelling replacement for CVS in the open source
[T] community.
[U] http://subversion.tigris.org/
[A] The Subversion Crew
[M] Rene Rebe <rene@rocklinux.org>
[C] extra/server extra/development
[L] OpenSource
[S] Beta
[V] 1.0.3
[P] X -----5---9 864.000
[D] 245397896 subversion-1.0.3.tar.gz http://subversion.tigris.org/files/documents/15/13430/

package/rene/subversion-static/subversion-static.conf → package/rene/subversion/config.in

@ -5,8 +5,8 @@
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/rene/subversion-static/subversion-static.conf
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
# ROCK Linux: rock-src/package/rene/subversion/config.in
# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -20,23 +20,14 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
svn_static_pm()
{
for prg in svnadmin/svnadmin svnlook/svnlook svnversion/svnversion \
svndumpfilter/svndumpfilter svndumpfilter/svndumpfilter \
clients/cmdline/svn ; do
xprg=$(basename $prg)
cp -v subversion/$prg \
$root/$prefix/bin/$xprg-$arch_machine-static-$ver
ln -sfv $xprg-$arch-static-$ver \
$root/$prefix/bin/$xprg-$arch-static
done
}
createdocs=0
makeinstopt=""
var_append extraconfopt " " "--enable-all-static"
hook_add postmake 3 svn_static_pm
if pkgcheck subversion X
then
menu_begin MENU_PKG_SUBVERSION 'Subversion Options'
bool 'Create a subversion-static package' \
ROCKCFG_PKG_SUBVERSION_STATIC 1
if [ "$ROCKCFG_PKG_SUBVERSION_STATIC" = "1" ] ; then
pkgfork subversion subversion-static
fi
menu_end
fi

package/rene/subversion-static/pthread-link.patch → package/rene/subversion/pthread-link.patch


+ 47
- 23
package/rene/subversion/subversion.conf

@ -20,34 +20,58 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
# use the apache prefix
. $base/package/*/apache/apache.conf
# all this is to build the apache server-side module
# and to make sure no locally included APR stuff get's installed
# as well as no modification to httpd.conf is done ...
if pkginstalled apache; then
var_append extraconfopt " " "--with-apxs=/$prefix/sbin/apxs \
if [ "$xpkg" = subversion-static ]
then
# this is the subversion-static package
svn_static_pm()
{
for prg in svnadmin/svnadmin svnlook/svnlook svnversion/svnversion \
svndumpfilter/svndumpfilter svndumpfilter/svndumpfilter \
clients/cmdline/svn
do
xprg=$(basename $prg)
cp -v subversion/$prg \
$root/$prefix/bin/$xprg-$arch_machine-static-$ver
ln -sfv $xprg-$arch-static-$ver \
$root/$prefix/bin/$xprg-$arch-static
done
}
createdocs=0
makeinstopt=""
var_append extraconfopt " " "--enable-all-static"
hook_add postmake 3 svn_static_pm
else
# use the apache prefix
. $base/package/*/apache/apache.conf
# all this is to build the apache server-side module
# and to make sure no locally included APR stuff get's installed
# as well as no modification to httpd.conf is done ...
if pkginstalled apache; then
var_append extraconfopt " " "--with-apxs=/$prefix/sbin/apxs \
--with-apr=/$prefix/bin/apr-config --with-apr-util=/$prefix \
--disable-mod-activation"
# --with-berkeley-db=/usr/include/db40:/usr/lib
fi
fi
# use system wide neon
var_append extraconfopt " " "--with-neon=$root/usr"
# use system wide neon
var_append extraconfopt " " "--with-neon=$root/usr"
# build and install perl bindings
svn_inst_pl() {
make swig-pl-lib
cd subversion/bindings/swig/perl
perl Makefile.PL; make all
make -C $OLDPWD install-swig-pl-lib
make install; cd $OLDPWD
}
# build and install perl bindings
svn_inst_pl() {
make swig-pl-lib
cd subversion/bindings/swig/perl
perl Makefile.PL; make all
make -C $OLDPWD install-swig-pl-lib
make install; cd $OLDPWD
}
hook_add postmake 3 "install_init svnserve $confdir/svnserve.init"
hook_add postmake 4 "cp -vrf tools $docdir"
hook_add postmake 3 "install_init svnserve $confdir/svnserve.init"
hook_add postmake 4 "cp -vrf tools $docdir"
# if swig is present build and install the perl
pkginstalled swig && hook_add postmake 5 "svn_inst_pl"
# if swig is present build and install the perl
pkginstalled swig && hook_add postmake 5 "svn_inst_pl"
fi

+ 5
- 0
package/rene/subversion/subversion.desc

@ -27,6 +27,11 @@
[T] system that is a compelling replacement for CVS in the open source
[T] community.
#if xpkg == subversion-static
[T]
[T] This package contains the statically linked subversion tools.
#endif
[U] http://subversion.tigris.org/
[A] The Subversion Crew

+ 6
- 3
scripts/Build-Pkg

@ -429,7 +429,11 @@ ver="`echo $desc_V | cut -f1 -d' '`"
extraver="`echo $desc_V | cut -s -f2- -d' '`"
[ -z "$extraver" ] && extraver="${rockver//DEV-*/DEV}"
echo_pkg_start $stagelevel $repository $xpkg $ver $extraver
if [ "$pkg" = "$xpkg" ]; then
echo_pkg_start $stagelevel $repository $xpkg $ver $extraver
else
echo_pkg_start $stagelevel $repository $pkg=$xpkg $ver $extraver
fi
if [ "$ROCKCFG_PARANOIA_CHECK" = 1 -a -z "$pkgdir" ] ; then
x="`./scripts/Check-PkgFormat $pkg`"
@ -832,12 +836,11 @@ $( echo "${desc_D:-None}" | awk '{ print " " $3 $2; }' )
EOT
{
echo "[CONFIG] ${ROCKCFG_ID#*-}"
descfile=$base/package/*/$pkg/$pkg.desc
while read x ; do
if [ "${x#\[}" != "$x" ] ; then
x="`echo ${x// /|} | tr -d '[]'`"
y="${x%%|*}" ; x="(${x%|(*)})"
egrep "^\[$x\]" $descfile | expand | sed "s,^[^ ]*,[$y],"
echo "$descfile" | egrep "^\[$x\]" | expand | sed "s,^[^ ]*,[$y],"
fi
done < $base/Documentation/Developers/PKG-DESC-FORMAT
} > var/adm/descs/$xpkg

+ 6
- 2
scripts/Build-Target

@ -190,7 +190,7 @@ fi
rm -f "${build_root}"/var/adm/logs/${build_only_this_job}.log"
rm -f "${build_root}"/var/adm/logs/${build_only_this_job}.err"
next="$( awk 'BEGIN { FS=" "; }
$5 == "'${build_only_this_job#*-}'" && \
$0 ~ /[ =]'${build_only_this_job#*-}' / && \
$2 ~ /'${build_only_this_job%%-*}'/ \
{ $1="'${build_only_this_job%%-*}' 0";
print; exit; }' < config/$config/packages )"
@ -267,6 +267,10 @@ pkgloop_package() {
pkg_name pkg_ver pkg_prefix pkg_extra
do eval "$x=\$1" ; shift ; done
# Maybe this is a forked package
pkg_basename="${pkg_name%=*}"
pkg_name="${pkg_name#*=}"
[ "$build_only_this_job" -a \
"$stagelevel-$pkg_name" != "$build_only_this_job" ] && return
@ -281,7 +285,7 @@ pkgloop_package() {
else cmd_prefix="" ; fi
cmd_buildpkg="./scripts/Build-Pkg -$stagelevel -cfg $config"
cmd_buildpkg="$cmd_buildpkg $cmd_root $cmd_prefix $pkg_name"
cmd_buildpkg="$cmd_buildpkg $cmd_root $cmd_prefix $pkg_basename=$pkg_name"
# Execute action handler
pkgloop_action || [ "$ROCKCFG_ABORT_ON_ERROR" != 1 ] || exit 1

+ 1
- 1
scripts/Build-Tools

@ -225,7 +225,7 @@ EOT
# Various small tools
#
for x in getdu getfiles fl_wrparse fl_stparse ; do
for x in getdu getfiles fl_wrparse fl_stparse descparser; do
echo_status "Building $toolsdir/bin/$x."
$BUILDCC -Wall -O2 misc/tools-source/$x.c \
-o build/$ROCKCFG_ID/ROCK/$toolsdir/bin/$x.$$ || exit 1

+ 1
- 1
scripts/Create-DescPatch

@ -42,7 +42,7 @@ for package ; do
lastpdir="$pdir"
done
if [ -f $pdir/$package.desc ] ; then
if [ -f $pdir/$package.desc ] && ! grep -q '^#if' $pdir/$package.desc; then
tempfn=`mktemp`
{ echo ; nl=0
while read line ; do

+ 4
- 1
scripts/Create-PkgQueue

@ -57,10 +57,13 @@ function check_package() {
repository = a[4];
package = a[5];
xpackage = a[5];
gsub(".*=", "", xpackage);
logfile = logfile_tpl;
gsub("<stagelevel>", stagelevel, logfile);
gsub("<repository>", repository, logfile);
gsub("<package>", package, logfile);
gsub("<package>", xpackage, logfile);
errfile = logfile; outfile = logfile;
gsub("<log>", "log", logfile);

+ 37
- 0
scripts/config.func

@ -129,6 +129,43 @@ else
}
fi
#
# pkgfork <origpkg> <newpkg> <name1> <value1> <name2> <value2> ..
#
# Names:
# status X / O
# stages 012--5---9
# priority 115.000
# version 0.9.26
# prefix /opt/foobar
#
pkgfork() {
local script="\$5==\"$1\" {print;\$5=\"$1=$2\";"
shift; shift;
while [ -n "$1" ]; do
case "$1" in
status)
script="$script \$1=\"$2\";"
;;
stages)
script="$script \$2=\"$2\";"
;;
priority)
script="$script \$3=\"$2\";"
;;
version)
script="$script \$6=\"$2\";"
;;
prefix)
script="$script \$7=\"$2\";"
;;
esac
shift; shift;
done
script="$script} {print;}"
pkgfilter "awk" "--" "$script"
}
comment() {
bprof comment start
if [ $ROCKCFG_EXPERT -eq 1 -o $expert -eq 0 ] && \

+ 2
- 1
scripts/functions

@ -294,8 +294,9 @@ postflist_static_lib() {
parse_desc() {
tag="`grep '^\[' $base/Documentation/Developers/PKG-DESC-FORMAT | \
sed 's, (\*),,; s,\] \[,|,g; s,\[,,; s,\],,;'`"
descfile="$( pkg="$pkg" xpkg="$xpkg" descparser < $confdir/$1.desc )"
for tag in $tag ; do
tagdata="`egrep "^\[($tag)\]" $confdir/$1.desc | \
tagdata="`echo "$descfile" | egrep "^\[($tag)\]" | \
cut -f2- -d']' | sed 's,^ ,,'`"
tag="`echo $tag | cut -f1 -d'|' | tr - _`"
eval "desc_$tag=\"\$tagdata\""

+ 2
- 2
target/reference/build.sh

@ -6,7 +6,7 @@ pkgloop_action() {
# Rebuild command line without '$cmd_maketar'
#
cmd_buildpkg="./scripts/Build-Pkg -$stagelevel -cfg $config"
cmd_buildpkg="$cmd_buildpkg $cmd_root $cmd_prefix $pkg_name"
cmd_buildpkg="$cmd_buildpkg $cmd_root $cmd_prefix $pkg_basename=$pkg_name"
# Build package
#
@ -15,7 +15,7 @@ pkgloop_action() {
# Copy *.cache file
#
if [ -f "$build_root/var/adm/cache/$pkg_name" ] ; then
dir="$build_result/package/$pkg_tree/$pkg_name" ; mkdir -p $dir
dir="$build_result/package/$pkg_tree/$pkg_basename" ; mkdir -p $dir
cp $build_root/var/adm/cache/$pkg_name $dir/$pkg_name.cache
fi

Loading…
Cancel
Save