Tue, 31 Jul 2012 12:12:54 +0200
Correct english, add missing rpl_strnlen, include RPM vars by default.
openpkg/openpkg.spec | file | annotate | diff | comparison | revisions | |
openpkg/rc | file | annotate | diff | comparison | revisions | |
openpkg/rc.8 | file | annotate | diff | comparison | revisions | |
openpkg/rc.conf | file | annotate | diff | comparison | revisions | |
openpkg/rc.func | file | annotate | diff | comparison | revisions | |
openpkg/rc.openpkg | file | annotate | diff | comparison | revisions | |
openpkg/rc.pod | file | annotate | diff | comparison | revisions | |
openpkg/rplstrnlen.c | file | annotate | diff | comparison | revisions | |
openpkg/rpm.patch.feature | file | annotate | diff | comparison | revisions | |
openpkg/rpmmacros | file | annotate | diff | comparison | revisions |
1.1 --- a/openpkg/openpkg.spec Tue Jul 31 10:03:54 2012 +0200 1.2 +++ b/openpkg/openpkg.spec Tue Jul 31 12:12:54 2012 +0200 1.3 @@ -39,7 +39,7 @@ 1.4 # o any cc(1) 1.5 1.6 # the package version/release 1.7 -%define V_openpkg 20110424 1.8 +%define V_openpkg 20120714 1.9 1.10 # the used software versions 1.11 %define V_rpm 4.2.1 1.12 @@ -550,6 +550,7 @@ 1.13 # bootstrap GNU patch tool 1.14 ${l_gzip} -dc `SOURCE patch-%{V_patch}.tar.gz` | ${l_tar} xf - 2>/dev/null || true 1.15 ( cd patch-%{V_patch} 1.16 + cp `SOURCE rplstrnlen.c` gl/lib/strnlen.c 1.17 chmod u+w config.guess config.sub >/dev/null 2>&1 || true 1.18 cp ../config/config.guess . 1.19 cp ../config/config.sub . 1.20 @@ -846,9 +847,6 @@ 1.21 1.22 # build cURL tool 1.23 ( cd curl-%{V_curl} 1.24 - sh $shtool subst \ 1.25 - -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \ 1.26 - configure 1.27 ( echo 'ac_cv_header_openssl_engine_h=no' 1.28 echo 'lt_cv_prog_compiler_c_o_F77=no' 1.29 echo 'lt_cv_sys_max_cmd_len=100'
2.1 --- a/openpkg/rc Tue Jul 31 10:03:54 2012 +0200 2.2 +++ b/openpkg/rc Tue Jul 31 12:12:54 2012 +0200 2.3 @@ -1,6 +1,6 @@ 2.4 #!@l_prefix@/lib/openpkg/bash --noprofile 2.5 ## 2.6 -## rc -- OpenPKG Run-Command Processor 2.7 +## rc -- OpenPKG Runcommand Processor 2.8 ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/> 2.9 ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/> 2.10 ##
3.1 --- a/openpkg/rc.8 Tue Jul 31 10:03:54 2012 +0200 3.2 +++ b/openpkg/rc.8 Tue Jul 31 12:12:54 2012 +0200 3.3 @@ -159,7 +159,7 @@ 3.4 .IX Header "USAGE" 3.5 .IP "\fB@l_prefix@/bin/openpkg rc\fR [\fB\-s\fR|\fB\-\-silent\fR] [\fB\-v\fR|\fB\-\-verbose\fR] [\fB\-d\fR|\fB\-\-debug\fR] [\fB\-k\fR|\fB\-\-keep\fR] \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]" 4 3.6 .IX Item "@l_prefix@/bin/openpkg rc [-s|--silent] [-v|--verbose] [-d|--debug] [-k|--keep] package command [command ...]" 3.7 -\&\fBRun-Command Execution.\fR This executes one or more specified 3.8 +\&\fBRuncommand Execution.\fR This executes one or more specified 3.9 \&\fIcommand\fRs in a particular \fIpackage\fR or in all installed packages if 3.10 \&\fIpackage\fR is "\f(CW\*(C`all\*(C'\fR". Option \fB\-\-silent\fR can be used to explicitly 3.11 disable progress messages on \f(CW\*(C`stderr\*(C'\fR. Option \fB\-\-verbose\fR can be used 3.12 @@ -170,14 +170,14 @@ 3.13 temporary files were generated during internal processing. 3.14 .IP "\fB@l_prefix@/bin/openpkg rc\fR \fB\-p\fR|\fB\-\-print\fR \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]" 4 3.15 .IX Item "@l_prefix@/bin/openpkg rc -p|--print package command [command ...]" 3.16 -\&\fBRun-Command Printing.\fR This is like the run-command execution (see 3.17 +\&\fBRuncommand Printing.\fR This is like the run-command execution (see 3.18 above), but instead of immediately executing all involved individual 3.19 run-command scripts, they are concatenated (but with all configuration 3.20 parts reduced to a single configuration part) and printed to \f(CW\*(C`stdout\*(C'\fR. 3.21 Use this for debugging or post-processing purposes. 3.22 .IP "eval `\fB@l_prefix@/bin/openpkg rc\fR \fB\-e\fR|\fB\-\-eval\fR \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]`" 4 3.23 .IX Item "eval `@l_prefix@/bin/openpkg rc -e|--eval package command [command ...]`" 3.24 -\&\fBRun-Command Evaluation.\fR This is like the run-command execution 3.25 +\&\fBRuncommand Evaluation.\fR This is like the run-command execution 3.26 (see above), but the resulting exported shell environment variables 3.27 are output to a temporary file as a (Bourne\-Shell or C\-Shell syntax) 3.28 shell script, suitable for evaluation within the shell environment
4.1 --- a/openpkg/rc.conf Tue Jul 31 10:03:54 2012 +0200 4.2 +++ b/openpkg/rc.conf Tue Jul 31 12:12:54 2012 +0200 4.3 @@ -1,5 +1,5 @@ 4.4 ## 4.5 -## @l_prefix@/etc/rc.conf -- Run-Command Configuration for OpenPKG Hierarchy 4.6 +## @l_prefix@/etc/rc.conf -- Runcommand Configuration for OpenPKG Hierarchy 4.7 ## 4.8 ## This Bourne-Shell script is sourced from @l_prefix@/etc/rc after 4.9 ## reading the %config sections from the @l_prefix@/etc/rc.d/rc.<name>
5.1 --- a/openpkg/rc.func Tue Jul 31 10:03:54 2012 +0200 5.2 +++ b/openpkg/rc.func Tue Jul 31 12:12:54 2012 +0200 5.3 @@ -1,5 +1,5 @@ 5.4 ## 5.5 -## @l_prefix@/etc/rc.func -- Run-Command Helper Functions 5.6 +## @l_prefix@/etc/rc.func -- Runcommand Helper Functions 5.7 ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/> 5.8 ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/> 5.9 ##
6.1 --- a/openpkg/rc.openpkg Tue Jul 31 10:03:54 2012 +0200 6.2 +++ b/openpkg/rc.openpkg Tue Jul 31 12:12:54 2012 +0200 6.3 @@ -1,6 +1,6 @@ 6.4 #!@l_prefix@/bin/openpkg rc 6.5 ## 6.6 -## rc.openpkg -- Run-Commands 6.7 +## rc.openpkg -- Runcommands 6.8 ## 6.9 6.10 %config
7.1 --- a/openpkg/rc.pod Tue Jul 31 10:03:54 2012 +0200 7.2 +++ b/openpkg/rc.pod Tue Jul 31 12:12:54 2012 +0200 7.3 @@ -26,7 +26,7 @@ 7.4 7.5 =head1 NAME 7.6 7.7 -B<@l_prefix@/bin/openpkg rc> - OpenPKG Run-Command Processor 7.8 +B<@l_prefix@/bin/openpkg rc> - OpenPKG Runcommand Processor 7.9 7.10 =head1 SYNOPSIS 7.11 7.12 @@ -59,7 +59,7 @@ 7.13 7.14 =item B<@l_prefix@/bin/openpkg rc> [B<-s>|B<--silent>] [B<-v>|B<--verbose>] [B<-d>|B<--debug>] [B<-k>|B<--keep>] I<package> I<command> [I<command> ...] 7.15 7.16 -B<Run-Command Execution.> This executes one or more specified 7.17 +B<Runcommand Execution.> This executes one or more specified 7.18 I<command>s in a particular I<package> or in all installed packages if 7.19 I<package> is "C<all>". Option B<--silent> can be used to explicitly 7.20 disable progress messages on C<stderr>. Option B<--verbose> can be used 7.21 @@ -71,7 +71,7 @@ 7.22 7.23 =item B<@l_prefix@/bin/openpkg rc> B<-p>|B<--print> I<package> I<command> [I<command> ...] 7.24 7.25 -B<Run-Command Printing.> This is like the run-command execution (see 7.26 +B<Runcommand Printing.> This is like the run-command execution (see 7.27 above), but instead of immediately executing all involved individual 7.28 run-command scripts, they are concatenated (but with all configuration 7.29 parts reduced to a single configuration part) and printed to C<stdout>. 7.30 @@ -79,7 +79,7 @@ 7.31 7.32 =item eval `B<@l_prefix@/bin/openpkg rc> B<-e>|B<--eval> I<package> I<command> [I<command> ...]` 7.33 7.34 -B<Run-Command Evaluation.> This is like the run-command execution 7.35 +B<Runcommand Evaluation.> This is like the run-command execution 7.36 (see above), but the resulting exported shell environment variables 7.37 are output to a temporary file as a (Bourne-Shell or C-Shell syntax) 7.38 shell script, suitable for evaluation within the shell environment
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/openpkg/rplstrnlen.c Tue Jul 31 12:12:54 2012 +0200 8.3 @@ -0,0 +1,39 @@ 8.4 +// 8.5 +// Stubfunc - Stubs to replace missing functions in third party projects 8.6 +// Copyright © 2012 Michael Schloh von Bennewitz <michael@schloh.com> 8.7 +// 8.8 +// Stubfunc is free software: you can redistribute it and/or modify 8.9 +// it under the terms of the GNU General Public License as published 8.10 +// by the Free Software Foundation, either version 3 of the License, 8.11 +// or (at your option) any later version. 8.12 +// 8.13 +// Stubfunc is distributed in the hope that it will be useful, 8.14 +// but WITHOUT ANY WARRANTY; without even the implied warranty 8.15 +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 8.16 +// the GNU General Public License for more details. 8.17 +// 8.18 +// You should have received a copy of the GNU General Public License 8.19 +// along with Stubfunc. If not, see <http://www.gnu.org/licenses/>. 8.20 +// 8.21 +// This file implements a stub function and is part of a larger project, 8.22 +// explanations of which can be found at http://dev.europalab.com/. 8.23 +// 8.24 +// rplstrnlen.c: ISO C99 implementation 8.25 +// 8.26 + 8.27 +#include <stdio.h> 8.28 + 8.29 + 8.30 +///* replacement for strnlen(3), missing in some POSIX distributions */ 8.31 +//status size_t strnlen(const char *pckInstring, size_t Maxsize) { 8.32 +// register const char *prckIdx; 8.33 +// for(prckIdx = pckInstring; *prckIdx && Maxsize--; ++prckIdx); 8.34 +// return(prckIdx - pckInstring); 8.35 +//} 8.36 + 8.37 +/* replacement for strnlen(3), missing in some POSIX distributions */ 8.38 +extern size_t rpl_strnlen(const char *pckInstring, size_t Maxsize) { 8.39 + register const char *prckIdx; 8.40 + for(prckIdx = pckInstring; *prckIdx && Maxsize--; ++prckIdx); 8.41 + return(prckIdx - pckInstring); 8.42 +}
9.1 --- a/openpkg/rpm.patch.feature Tue Jul 31 10:03:54 2012 +0200 9.2 +++ b/openpkg/rpm.patch.feature Tue Jul 31 12:12:54 2012 +0200 9.3 @@ -58,7 +58,7 @@ 9.4 9.5 install-data-local: 9.6 - @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm 9.7 -+ @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/openpkg 9.8 ++ @$(mkinstalldirs) $(DESTDIR)$(libdir)/openpkg 9.9 @rm -f $(DESTDIR)$(libdir)/rpmrc 9.10 @@LN_S@ rpm/rpmrc $(DESTDIR)$(libdir)/rpmrc 9.11 @rm -f $(DESTDIR)$(libdir)/rpmpopt 9.12 @@ -184,7 +184,7 @@ 9.13 9.14 install-data-local: 9.15 - @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm 9.16 -+ @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/openpkg 9.17 ++ @$(mkinstalldirs) $(DESTDIR)$(libdir)/openpkg 9.18 @rm -f $(DESTDIR)$(libdir)/rpmrc 9.19 @@LN_S@ rpm/rpmrc $(DESTDIR)$(libdir)/rpmrc 9.20 @rm -f $(DESTDIR)$(libdir)/rpmpopt 9.21 @@ -1934,6 +1934,8 @@ 9.22 | (package build-time feature for performing vendor source tracking) 9.23 | and %test (package install-time feature for performing package 9.24 | run-time tests). 9.25 +| 9.26 +| MSvB: Additionally provide a default %clean section, removing buildroot. 9.27 +--------------------------------------------------------------------------- 9.28 Index: build/parseSpec.c 9.29 --- build/parseSpec.c 15 May 2003 13:38:57 -0000 1.1.1.15 9.30 @@ -1965,6 +1967,20 @@ 9.31 case PART_NONE: /* XXX avoid gcc whining */ 9.32 case PART_LAST: 9.33 case PART_BUILDARCHITECTURES: 9.34 +@@ -576,6 +589,13 @@ 9.35 + } 9.36 + /*@=infloops@*/ /* LCL: parsePart is modified @*/ 9.37 + 9.38 ++ if (spec->clean == NULL) { 9.39 ++ char *body = rpmExpand("%{?buildroot: %{__rm} -rf %{buildroot}}", NULL); 9.40 ++ spec->clean = newStringBuf(); 9.41 ++ appendLineStringBuf(spec->clean, body); 9.42 ++ free(body); 9.43 ++ } 9.44 ++ 9.45 + /* Check for description in each package and add arch and os */ 9.46 + { 9.47 + #ifdef DYING 9.48 9.49 +--------------------------------------------------------------------------- 9.50 | Add support for the OpenPKG custom .spec file sections %track
10.1 --- a/openpkg/rpmmacros Tue Jul 31 10:03:54 2012 +0200 10.2 +++ b/openpkg/rpmmacros Tue Jul 31 12:12:54 2012 +0200 10.3 @@ -299,6 +299,7 @@ 10.4 10.5 # path to local build root 10.6 %l_buildroot %{_tmppath}/%{name}-%{version}-root 10.7 +%buildroot %{l_buildroot} 10.8 10.9 # path to local temporary location 10.10 %l_tmpdir() %{_tmppath} 10.11 @@ -438,3 +439,13 @@ 10.12 rm -f $VCFILE\ 10.13 %{nil} 10.14 10.15 +# automatically include never changing RPM header text 10.16 +%__hook_description_1 %{lua: \ 10.17 + local prefix = rpm.expand("%{l_prefix_static}") \ 10.18 + if rpm.expand("%{?prefix}") ~= prefix then \ 10.19 + print(string.format("Prefix: %s\\n", prefix)) \ 10.20 + end \ 10.21 + print("AutoReq: no\\n") \ 10.22 + print("AutoReqProv: no\\n") \ 10.23 +} 10.24 +