# HG changeset patch # User Michael Schloh von Bennewitz # Date 1343729574 -7200 # Node ID 71503088f51b4f6ec1f6690f6965ed068da0ea8f # Parent c9323ebe0764e270a6688b7186a51811cf048c66 Correct english, add missing rpl_strnlen, include RPM vars by default. diff -r c9323ebe0764 -r 71503088f51b openpkg/openpkg.spec --- a/openpkg/openpkg.spec Tue Jul 31 10:03:54 2012 +0200 +++ b/openpkg/openpkg.spec Tue Jul 31 12:12:54 2012 +0200 @@ -39,7 +39,7 @@ # o any cc(1) # the package version/release -%define V_openpkg 20110424 +%define V_openpkg 20120714 # the used software versions %define V_rpm 4.2.1 @@ -550,6 +550,7 @@ # bootstrap GNU patch tool ${l_gzip} -dc `SOURCE patch-%{V_patch}.tar.gz` | ${l_tar} xf - 2>/dev/null || true ( cd patch-%{V_patch} + cp `SOURCE rplstrnlen.c` gl/lib/strnlen.c chmod u+w config.guess config.sub >/dev/null 2>&1 || true cp ../config/config.guess . cp ../config/config.sub . @@ -846,9 +847,6 @@ # build cURL tool ( cd curl-%{V_curl} - sh $shtool subst \ - -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \ - configure ( echo 'ac_cv_header_openssl_engine_h=no' echo 'lt_cv_prog_compiler_c_o_F77=no' echo 'lt_cv_sys_max_cmd_len=100' diff -r c9323ebe0764 -r 71503088f51b openpkg/rc --- a/openpkg/rc Tue Jul 31 10:03:54 2012 +0200 +++ b/openpkg/rc Tue Jul 31 12:12:54 2012 +0200 @@ -1,6 +1,6 @@ #!@l_prefix@/lib/openpkg/bash --noprofile ## -## rc -- OpenPKG Run-Command Processor +## rc -- OpenPKG Runcommand Processor ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. ## Copyright (c) 2000-2007 Ralf S. Engelschall ## diff -r c9323ebe0764 -r 71503088f51b openpkg/rc.8 --- a/openpkg/rc.8 Tue Jul 31 10:03:54 2012 +0200 +++ b/openpkg/rc.8 Tue Jul 31 12:12:54 2012 +0200 @@ -159,7 +159,7 @@ .IX Header "USAGE" .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 .IX Item "@l_prefix@/bin/openpkg rc [-s|--silent] [-v|--verbose] [-d|--debug] [-k|--keep] package command [command ...]" -\&\fBRun-Command Execution.\fR This executes one or more specified +\&\fBRuncommand Execution.\fR This executes one or more specified \&\fIcommand\fRs in a particular \fIpackage\fR or in all installed packages if \&\fIpackage\fR is "\f(CW\*(C`all\*(C'\fR". Option \fB\-\-silent\fR can be used to explicitly disable progress messages on \f(CW\*(C`stderr\*(C'\fR. Option \fB\-\-verbose\fR can be used @@ -170,14 +170,14 @@ temporary files were generated during internal processing. .IP "\fB@l_prefix@/bin/openpkg rc\fR \fB\-p\fR|\fB\-\-print\fR \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]" 4 .IX Item "@l_prefix@/bin/openpkg rc -p|--print package command [command ...]" -\&\fBRun-Command Printing.\fR This is like the run-command execution (see +\&\fBRuncommand Printing.\fR This is like the run-command execution (see above), but instead of immediately executing all involved individual run-command scripts, they are concatenated (but with all configuration parts reduced to a single configuration part) and printed to \f(CW\*(C`stdout\*(C'\fR. Use this for debugging or post-processing purposes. .IP "eval `\fB@l_prefix@/bin/openpkg rc\fR \fB\-e\fR|\fB\-\-eval\fR \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]`" 4 .IX Item "eval `@l_prefix@/bin/openpkg rc -e|--eval package command [command ...]`" -\&\fBRun-Command Evaluation.\fR This is like the run-command execution +\&\fBRuncommand Evaluation.\fR This is like the run-command execution (see above), but the resulting exported shell environment variables are output to a temporary file as a (Bourne\-Shell or C\-Shell syntax) shell script, suitable for evaluation within the shell environment diff -r c9323ebe0764 -r 71503088f51b openpkg/rc.conf --- a/openpkg/rc.conf Tue Jul 31 10:03:54 2012 +0200 +++ b/openpkg/rc.conf Tue Jul 31 12:12:54 2012 +0200 @@ -1,5 +1,5 @@ ## -## @l_prefix@/etc/rc.conf -- Run-Command Configuration for OpenPKG Hierarchy +## @l_prefix@/etc/rc.conf -- Runcommand Configuration for OpenPKG Hierarchy ## ## This Bourne-Shell script is sourced from @l_prefix@/etc/rc after ## reading the %config sections from the @l_prefix@/etc/rc.d/rc. diff -r c9323ebe0764 -r 71503088f51b openpkg/rc.func --- a/openpkg/rc.func Tue Jul 31 10:03:54 2012 +0200 +++ b/openpkg/rc.func Tue Jul 31 12:12:54 2012 +0200 @@ -1,5 +1,5 @@ ## -## @l_prefix@/etc/rc.func -- Run-Command Helper Functions +## @l_prefix@/etc/rc.func -- Runcommand Helper Functions ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. ## Copyright (c) 2000-2007 Ralf S. Engelschall ## diff -r c9323ebe0764 -r 71503088f51b openpkg/rc.openpkg --- a/openpkg/rc.openpkg Tue Jul 31 10:03:54 2012 +0200 +++ b/openpkg/rc.openpkg Tue Jul 31 12:12:54 2012 +0200 @@ -1,6 +1,6 @@ #!@l_prefix@/bin/openpkg rc ## -## rc.openpkg -- Run-Commands +## rc.openpkg -- Runcommands ## %config diff -r c9323ebe0764 -r 71503088f51b openpkg/rc.pod --- a/openpkg/rc.pod Tue Jul 31 10:03:54 2012 +0200 +++ b/openpkg/rc.pod Tue Jul 31 12:12:54 2012 +0200 @@ -26,7 +26,7 @@ =head1 NAME -B<@l_prefix@/bin/openpkg rc> - OpenPKG Run-Command Processor +B<@l_prefix@/bin/openpkg rc> - OpenPKG Runcommand Processor =head1 SYNOPSIS @@ -59,7 +59,7 @@ =item B<@l_prefix@/bin/openpkg rc> [B<-s>|B<--silent>] [B<-v>|B<--verbose>] [B<-d>|B<--debug>] [B<-k>|B<--keep>] I I [I ...] -B This executes one or more specified +B This executes one or more specified Is in a particular I or in all installed packages if I is "C". Option B<--silent> can be used to explicitly disable progress messages on C. Option B<--verbose> can be used @@ -71,7 +71,7 @@ =item B<@l_prefix@/bin/openpkg rc> B<-p>|B<--print> I I [I ...] -B This is like the run-command execution (see +B This is like the run-command execution (see above), but instead of immediately executing all involved individual run-command scripts, they are concatenated (but with all configuration parts reduced to a single configuration part) and printed to C. @@ -79,7 +79,7 @@ =item eval `B<@l_prefix@/bin/openpkg rc> B<-e>|B<--eval> I I [I ...]` -B This is like the run-command execution +B This is like the run-command execution (see above), but the resulting exported shell environment variables are output to a temporary file as a (Bourne-Shell or C-Shell syntax) shell script, suitable for evaluation within the shell environment diff -r c9323ebe0764 -r 71503088f51b openpkg/rplstrnlen.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/rplstrnlen.c Tue Jul 31 12:12:54 2012 +0200 @@ -0,0 +1,39 @@ +// +// Stubfunc - Stubs to replace missing functions in third party projects +// Copyright © 2012 Michael Schloh von Bennewitz +// +// Stubfunc 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 3 of the License, +// or (at your option) any later version. +// +// Stubfunc is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +// the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Stubfunc. If not, see . +// +// This file implements a stub function and is part of a larger project, +// explanations of which can be found at http://dev.europalab.com/. +// +// rplstrnlen.c: ISO C99 implementation +// + +#include + + +///* replacement for strnlen(3), missing in some POSIX distributions */ +//status size_t strnlen(const char *pckInstring, size_t Maxsize) { +// register const char *prckIdx; +// for(prckIdx = pckInstring; *prckIdx && Maxsize--; ++prckIdx); +// return(prckIdx - pckInstring); +//} + +/* replacement for strnlen(3), missing in some POSIX distributions */ +extern size_t rpl_strnlen(const char *pckInstring, size_t Maxsize) { + register const char *prckIdx; + for(prckIdx = pckInstring; *prckIdx && Maxsize--; ++prckIdx); + return(prckIdx - pckInstring); +} diff -r c9323ebe0764 -r 71503088f51b openpkg/rpm.patch.feature --- a/openpkg/rpm.patch.feature Tue Jul 31 10:03:54 2012 +0200 +++ b/openpkg/rpm.patch.feature Tue Jul 31 12:12:54 2012 +0200 @@ -58,7 +58,7 @@ install-data-local: - @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm -+ @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/openpkg ++ @$(mkinstalldirs) $(DESTDIR)$(libdir)/openpkg @rm -f $(DESTDIR)$(libdir)/rpmrc @@LN_S@ rpm/rpmrc $(DESTDIR)$(libdir)/rpmrc @rm -f $(DESTDIR)$(libdir)/rpmpopt @@ -184,7 +184,7 @@ install-data-local: - @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm -+ @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/openpkg ++ @$(mkinstalldirs) $(DESTDIR)$(libdir)/openpkg @rm -f $(DESTDIR)$(libdir)/rpmrc @@LN_S@ rpm/rpmrc $(DESTDIR)$(libdir)/rpmrc @rm -f $(DESTDIR)$(libdir)/rpmpopt @@ -1934,6 +1934,8 @@ | (package build-time feature for performing vendor source tracking) | and %test (package install-time feature for performing package | run-time tests). +| +| MSvB: Additionally provide a default %clean section, removing buildroot. +--------------------------------------------------------------------------- Index: build/parseSpec.c --- build/parseSpec.c 15 May 2003 13:38:57 -0000 1.1.1.15 @@ -1965,6 +1967,20 @@ case PART_NONE: /* XXX avoid gcc whining */ case PART_LAST: case PART_BUILDARCHITECTURES: +@@ -576,6 +589,13 @@ + } + /*@=infloops@*/ /* LCL: parsePart is modified @*/ + ++ if (spec->clean == NULL) { ++ char *body = rpmExpand("%{?buildroot: %{__rm} -rf %{buildroot}}", NULL); ++ spec->clean = newStringBuf(); ++ appendLineStringBuf(spec->clean, body); ++ free(body); ++ } ++ + /* Check for description in each package and add arch and os */ + { + #ifdef DYING +--------------------------------------------------------------------------- | Add support for the OpenPKG custom .spec file sections %track diff -r c9323ebe0764 -r 71503088f51b openpkg/rpmmacros --- a/openpkg/rpmmacros Tue Jul 31 10:03:54 2012 +0200 +++ b/openpkg/rpmmacros Tue Jul 31 12:12:54 2012 +0200 @@ -299,6 +299,7 @@ # path to local build root %l_buildroot %{_tmppath}/%{name}-%{version}-root +%buildroot %{l_buildroot} # path to local temporary location %l_tmpdir() %{_tmppath} @@ -438,3 +439,13 @@ rm -f $VCFILE\ %{nil} +# automatically include never changing RPM header text +%__hook_description_1 %{lua: \ + local prefix = rpm.expand("%{l_prefix_static}") \ + if rpm.expand("%{?prefix}") ~= prefix then \ + print(string.format("Prefix: %s\\n", prefix)) \ + end \ + print("AutoReq: no\\n") \ + print("AutoReqProv: no\\n") \ +} +