Commit dfe72b75 authored by Michal Čihař's avatar Michal Čihař

Imported Upstream version 4.10.0

parent 084752a0
This diff is collapsed.
......@@ -161,20 +161,12 @@ and then install with:
make install
If you wish to make a tarfile of the binaries so that you may easily
install on machines with OS package managers other then rpm (ed note:
what about putting gzip and bzip2 in the tar, modifying the
/etc/rpmrc?):
Rpm comes with an automated self-test suite. The test-suite relies heavily
on fakechroot (https://github.com/fakechroot/) and cannot be executed
without it. Provided that fakechroot was found during configure,
it can be executed after a succesful build with:
make tar
when installing. If you do install from a tarball, you will need to do
something like
mkdir /var/lib/rpm
rpm --initdb
to initialize your rpm database.
make check
Finally, if you wish to prepare an rpm source tar ball, you should do
......@@ -311,13 +303,12 @@ Pro would want `i586pro' over `i586-pro', but it does make parsing
this filename by other programs a bit more difficult.
GPG/PGP/PGP5
------------
GPG
---
To use the signing features of rpm, you will need to configure certain
rpm macros in ~/.rpmmacros:
%_signature gpg
%_gpg_name <GPG UID>
%_gpg_path %(echo $HOME)/.gnupg
......@@ -19,7 +19,7 @@ endif
if WITH_LUA
SUBDIRS += luaext
endif
SUBDIRS += rpmio lib sign build scripts fileattrs doc . tests
SUBDIRS += rpmio lib sign build scripts fileattrs doc .
if ENABLE_PYTHON
SUBDIRS += python
......@@ -29,6 +29,10 @@ if ENABLE_PLUGINS
SUBDIRS += plugins
endif
if HAVE_FAKECHROOT
SUBDIRS += tests
endif
DIST_SUBDIRS = po misc luaext rpmio lib sign build python scripts fileattrs doc tests plugins
pkgconfigdir = $(libdir)/pkgconfig
......@@ -58,6 +62,7 @@ pkginclude_HEADERS += rpmio/rpmsw.h
pkginclude_HEADERS += rpmio/rpmfileutil.h
pkginclude_HEADERS += rpmio/rpmutil.h
pkginclude_HEADERS += rpmio/rpmkeyring.h
pkginclude_HEADERS += rpmio/rpmbase64.h
pkginclude_HEADERS += lib/header.h
pkginclude_HEADERS += lib/rpmdb.h
......@@ -90,10 +95,11 @@ rpmbin_PROGRAMS = rpm
bin_PROGRAMS = rpm2cpio rpmbuild rpmdb rpmkeys rpmsign rpmspec
rpmlibexec_PROGRAMS =
rpmconfig_SCRIPTS = find-provides find-requires mkinstalldirs \
rpmconfig_SCRIPTS = autodeps/find-provides autodeps/find-requires \
mkinstalldirs \
config.guess config.sub
DISTCLEANFILES = find-provides
DISTCLEANFILES += find-requires
DISTCLEANFILES = autodeps/find-provides
DISTCLEANFILES += autodeps/find-requires
noinst_LTLIBRARIES = libcliutils.la
libcliutils_la_SOURCES = cliutils.h cliutils.c
......@@ -158,10 +164,6 @@ elfdeps_LDADD += @WITH_LIBELF_LIB@ @WITH_POPT_LIB@
endif
endif
rpmlibexec_PROGRAMS += javadeps
javadeps_SOURCES = tools/javadeps.c
javadeps_LDADD =
rpmlibexec_PROGRAMS += rpmdeps
rpmdeps_SOURCES = tools/rpmdeps.c
rpmdeps_LDADD = lib/librpm.la rpmio/librpmio.la build/librpmbuild.la @WITH_POPT_LIB@
......@@ -227,10 +229,10 @@ install-exec-hook:
@LN_S@ ../../bin/rpm $(DESTDIR)$(bindir)/rpmverify
install-data-local:
@case "@host_os@" in \
solaris*|linux*|darwin*) \
DESTDIR="$(DESTDIR)" pkglibdir="$(rpmconfigdir)" $(SHELL) $(top_srcdir)/installplatform rpmrc macros platform ;; \
esac
DESTDIR="$(DESTDIR)" pkglibdir="$(rpmconfigdir)" \
$(SHELL) $(top_srcdir)/installplatform \
rpmrc platform \
$(RPMCANONVENDOR) $(RPMCANONOS) $(RPMCANONGNU)
@$(MKDIR_P) $(DESTDIR)$(localstatedir)/tmp
# XXX to appease distcheck we need to remove "stuff" here...
......
This diff is collapsed.
......@@ -1186,6 +1186,33 @@ Check your system clock])
fi
AC_MSG_RESULT(yes)])
# Copyright (C) 2009 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 1
# AM_SILENT_RULES([DEFAULT])
# --------------------------
# Enable less verbose build rules; with the default set to DEFAULT
# (`yes' being less verbose, `no' or empty being verbose).
AC_DEFUN([AM_SILENT_RULES],
[AC_ARG_ENABLE([silent-rules],
[ --enable-silent-rules less verbose build output (undo: `make V=1')
--disable-silent-rules verbose build output (undo: `make V=0')])
case $enable_silent_rules in
yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;;
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
esac
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
AM_BACKSLASH='\'
AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
......
/find-provides
/find-requires
#!/bin/bash
# This script reads filenames from STDIN and outputs any relevant provides
# information that needs to be included in the package.
filelist=`sed "s/['\"]/\\\&/g"`
solist=$(echo $filelist | grep "\\.so" | grep -v "^/lib/ld.so" | \
xargs file -L 2>/dev/null | grep "ELF.*shared object" | cut -d: -f1)
pythonlist=
tcllist=
#
# --- Alpha does not mark 64bit dependencies
case `uname -m` in
alpha*) mark64="" ;;
*) mark64="()(64bit)" ;;
esac
#
# --- Library sonames and weak symbol versions (from glibc).
for f in $solist; do
soname=$(objdump -p $f | awk '/SONAME/ {print $2}')
lib64=`if file -L $f 2>/dev/null | \
grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
if [ "$soname" != "" ]; then
if [ ! -L $f ]; then
echo $soname$lib64
objdump -p $f | awk '
BEGIN { START=0 ; }
/Version definitions:/ { START=1; }
/^[0-9]/ && (START==1) { print $4; }
/^$/ { START=0; }
' | \
grep -v $soname | \
while read symbol ; do
echo "$soname($symbol)`echo $lib64 | sed 's/()//'`"
done
fi
else
echo ${f##*/}$lib64
fi
done | sort -u
#
# --- Perl modules.
[ -x /usr/lib/rpm/perl.prov ] &&
echo $filelist | tr '[:blank:]' \\n | grep '\.pm$' | /usr/lib/rpm/perl.prov | sort -u
#
# --- Python modules.
[ -x /usr/lib/rpm/python.prov -a -n "$pythonlist" ] &&
echo $pythonlist | tr '[:blank:]' \\n | /usr/lib/rpm/python.prov | sort -u
#
# --- Tcl modules.
[ -x /usr/lib/rpm/tcl.prov -a -n "$tcllist" ] &&
echo $tcllist | tr '[:blank:]' \\n | /usr/lib/rpm/tcl.prov | sort -u
exit 0
#!/bin/bash
#
# Auto-generate requirements for executables (both ELF and a.out) and library
# sonames, script interpreters, and perl modules.
#
ulimit -c 0
#
# --- Set needed to 0 for traditional find-requires behavior.
needed=1
if [ X"$1" = Xldd ]; then
needed=0
elif [ X"$1" = Xobjdump ]; then
needed=1
fi
#
# --- Grab the file manifest and classify files.
#filelist=`sed "s/['\"]/\\\&/g"`
filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
exelist=`echo $filelist | xargs -r file | \
grep -Ev ":.* (commands|script)[, ]" | \
grep ":.*executable" | cut -d: -f1`
scriptlist=`echo $filelist | xargs -r file | \
grep -E ":.* (commands|script)[, ]" | cut -d: -f1`
liblist=`echo $filelist | xargs -r file | \
grep ":.*shared object" | cut -d : -f1`
interplist=
perllist=
pythonlist=
tcllist=
#
# --- Alpha does not mark 64bit dependencies
case `uname -m` in
alpha*) mark64="" ;;
*) mark64="()(64bit)" ;;
esac
if [ "$needed" -eq 0 ]; then
#
# --- Executable dependency sonames.
for f in $exelist; do
[ -r $f -a -x $f ] || continue
lib64=`if file -L $f 2>/dev/null | \
grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
ldd $f | awk '/=>/ {
if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/) {
gsub(/'\''"/,"\\&",$1);
printf "%s'$lib64'\n", $1
}
}'
done | xargs -r -n 1 basename | sort -u
#
# --- Library dependency sonames.
for f in $liblist; do
[ -r $f ] || continue
lib64=`if file -L $f 2>/dev/null | \
grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
ldd $f | awk '/=>/ {
if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/) {
gsub(/'\''"/,"\\&",$1);
printf "%s'$lib64'\n", $1
}
}'
done | xargs -r -n 1 basename | sort -u
fi
#
# --- Script interpreters.
for f in $scriptlist; do
[ -r $f -a -x $f ] || continue
interp=`head -n 1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1`
interplist="$interplist $interp"
case $interp in
*/perl) perllist="$perllist $f" ;;
esac
done
[ -n "$interplist" ] && { echo "$interplist" | tr '[:blank:]' \\n | sort -u ; }
#
# --- Add perl module files to perllist.
for f in $filelist; do
[ -r $f -a "${f%.pm}" != "${f}" ] && perllist="$perllist $f"
done
#
# --- Weak symbol versions (from glibc).
[ -n "$mark64" ] && mark64="(64bit)"
for f in $liblist $exelist ; do
[ -r $f ] || continue
lib64=`if file -L $f 2>/dev/null | \
grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
objdump -p $f | awk 'BEGIN { START=0; LIBNAME=""; needed='$needed'; }
/^$/ { START=0; }
/^Dynamic Section:$/ { START=1; }
(START==1) && /NEEDED/ {
if (needed) {
if ("'$lib64'" != "") {
sub(/$/, "()'$lib64'", $2) ;
}
print $2 ;
}
}
(START==2) && /^[A-Za-z]/ { START=3; }
/^Version References:$/ { START=2; }
(START==2) && /required from/ {
sub(/:/, "", $3);
LIBNAME=$3;
}
(START==2) && (LIBNAME!="") && ($4!="") && (($4~/^GLIBC_*/) || ($4~/^GCC_*/)) {
print LIBNAME "(" $4 ")'$lib64'";
}
'
done | sort -u
#
# --- Perl modules.
[ -x /usr/lib/rpm/perl.req -a -n "$perllist" ] && \
echo $perllist | tr '[:blank:]' \\n | /usr/lib/rpm/perl.req | sort -u
#
# --- Python modules.
[ -x /usr/lib/rpm/python.req -a -n "$pythonlist" ] && \
echo $pythonlist | tr '[:blank:]' \\n | /usr/lib/rpm/python.req | sort -u
#
# --- Tcl modules.
[ -x /usr/lib/rpm/tcl.req -a -n "$tcllist" ] && \
echo $tcllist | tr '[:blank:]' \\n | /usr/lib/rpm/tcl.req | sort -u
exit 0
......@@ -16,7 +16,7 @@ librpmbuild_la_SOURCES = \
parsePolicies.c policies.c \
rpmbuild_internal.h rpmbuild_misc.h
librpmbuild_la_LDFLAGS = -version-info 2:1:0
librpmbuild_la_LDFLAGS = -version-info 3:0:0
librpmbuild_la_LIBADD = \
$(top_builddir)/lib/librpm.la \
$(top_builddir)/rpmio/librpmio.la \
......
......@@ -85,22 +85,39 @@ am_librpmbuild_la_OBJECTS = build.lo expression.lo files.lo misc.lo \
parsePrep.lo parseReqs.lo parseScript.lo parseSpec.lo \
reqprov.lo rpmfc.lo spec.lo parsePolicies.lo policies.lo
librpmbuild_la_OBJECTS = $(am_librpmbuild_la_OBJECTS)
librpmbuild_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(librpmbuild_la_LDFLAGS) $(LDFLAGS) -o $@
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
librpmbuild_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(AM_CFLAGS) $(CFLAGS) $(librpmbuild_la_LDFLAGS) $(LDFLAGS) -o \
$@
DEFAULT_INCLUDES =
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_$(V))
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
am__v_CC_0 = @echo " CC " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_$(V))
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(librpmbuild_la_SOURCES)
DIST_SOURCES = $(librpmbuild_la_SOURCES)
ETAGS = etags
......@@ -108,6 +125,7 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
......@@ -193,8 +211,6 @@ PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RPMCANONARCH = @RPMCANONARCH@
RPMCANONCOLOR = @RPMCANONCOLOR@
RPMCANONGNU = @RPMCANONGNU@
RPMCANONOS = @RPMCANONOS@
RPMCANONVENDOR = @RPMCANONVENDOR@
......@@ -227,6 +243,7 @@ XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
YACC = @YACC@
YFLAGS = @YFLAGS@
__7ZIP = @__7ZIP@
__BZIP2 = @__BZIP2@
__CAT = @__CAT@
__CC = @__CC@
......@@ -339,7 +356,7 @@ librpmbuild_la_SOURCES = \
parsePolicies.c policies.c \
rpmbuild_internal.h rpmbuild_misc.h
librpmbuild_la_LDFLAGS = -version-info 2:1:0
librpmbuild_la_LDFLAGS = -version-info 3:0:0
librpmbuild_la_LIBADD = \
$(top_builddir)/lib/librpm.la \
$(top_builddir)/rpmio/librpmio.la \
......@@ -413,7 +430,7 @@ clean-usrlibLTLIBRARIES:
rm -f "$${dir}/so_locations"; \
done
librpmbuild.la: $(librpmbuild_la_OBJECTS) $(librpmbuild_la_DEPENDENCIES)
$(librpmbuild_la_LINK) -rpath $(usrlibdir) $(librpmbuild_la_OBJECTS) $(librpmbuild_la_LIBADD) $(LIBS)
$(AM_V_CCLD)$(librpmbuild_la_LINK) -rpath $(usrlibdir) $(librpmbuild_la_OBJECTS) $(librpmbuild_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
......@@ -442,25 +459,28 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spec.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
......
......@@ -28,7 +28,7 @@ static rpmRC doRmSource(rpmSpec spec)
if (! (p->flags & RPMBUILD_ISNO)) {
char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
rc = unlink(fn);
fn = _free(fn);
free(fn);
if (rc) goto exit;
}
}
......@@ -38,7 +38,7 @@ static rpmRC doRmSource(rpmSpec spec)
if (! (p->flags & RPMBUILD_ISNO)) {
char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
rc = unlink(fn);
fn = _free(fn);
free(fn);
if (rc) goto exit;
}
}
......@@ -53,9 +53,8 @@ exit:
rpmRC doScript(rpmSpec spec, rpmBuildFlags what, const char *name,
const char *sb, int test)
{
const char * rootDir = spec->rootDir;
char *scriptName = NULL;
char * buildDir = rpmGenPath(rootDir, "%{_builddir}", "");
char * buildDir = rpmGenPath(spec->rootDir, "%{_builddir}", "");
char * buildCmd = NULL;