to set a separate license to the source RPM. This can be useful if the
sources have code under additional licenses that do not end up in the
binary packeges.
Resolves: #2079
for unknown payload compression format. At this point it is unlikely
this isn't an RPM file as we detected the headers but much more likely
the package is using a newer compression format.
As the shell can't deal with null bytes only read two bytes and check
for proper match. This way we can match for the null byte even if it is
not part of the string.
This also silents the warning from the shell that there is a null byte
being ignored in the magic string for lzma.
This script converts binary header sizes to decimal numbers. Shell is
not that well suited for this task as it drops newlines at the end of
command substitutions. Add a . character at the end and strip it right
after that to avoid this problem.
Resolves: rhbz#1983015
With the SRPMs now containing the expanded spec file they are bound to
have the build root included in the header. Turns out some people
package SRPMs to rebuild them locally e.g. against the local kernel.
Resolves: rhbz#2104150
This is an incomplete release-early version, NOT intended or
suitable for production use. It is intended to replace the autotools
based buildsystem in rpm 4.20, until then it'll be developed alongside
it. This causes some extra complications of course, but then we avoid
a huge flag-day, and that matters more.
To those wondering why cmake and not ${myfavorite}: the community around
us effectively made that choice for us. We've made a lot of noise about
bootstrap dependencies. When libsolv, dnf and all the related stack is
powered by cmake build, it'd be just foolish to go with anything else.
This way people working on the rpm stack have only one build system to
learn, there's peer support available nearby and bootstrap dependencies
are reduced, not increased. It also doesn't hurt that cmake is actually
and actively maintained.
Make sure any quoted metacharacters in a pattern are unescaped before
it's passed to addFile() and subsequently lstat(2). Do this by always
letting such patterns through rpmGlob() which now handles backslashes
properly since commit 4030062f2b. Don't
expand globs twice in processSpecialDir(), though.
Axe the public rpmIsGlob() which is no longer needed, we'll be bumping
the soname in 4.19.
Construct absolute file names directly without going through
rpmGenPath() so that literal (double) percent signs are not expanded
twice and can be used the same way as in other parts of a spec file.
This means URLs are not handled anymore but we're dealing with local
files here so that should be fine.
Add the "cp" binary to the test environment, it's needed for the %doc
directives which copy stuff around.
Fixes: #1749
Unindent the block touched in the previous commit and move declarations
to the beginning, dropping the now redundant gflags in the process.
Best served with "git show --ignore-all-space".
No functional change.
We currently accept a space-separated list of patterns here so any
backslash, whether it belongs to a space char or not, gets consumed by
poptParseArgvString() before the string is passed to glob(3), requiring
callers to double-escape anything they wish to keep literal.
Fix that by only accepting one pattern. Adapt the one caller which
relies on this actually being a list, in rpmReadPackageManifest(), and
those callers where we preserve spaces by escaping them which is no
longer needed.
Replace our own heuristic emulating GLOB_NOMAGIC with the actual flag to
glob(3) so that literal (double) backslashes are also handled properly.
Keep the indentation of the original for loop to make the diff easier to
read, next commit will fix that.
No immediate effect within RPM since we currently avoid passing escaped
patterns to rpmGlob(), this is just a prerequisite for the following
commits. External users of rpmGlob(), as unlikely as they are, might,
in theory, notice this subtle change but we'll be bumping the soname in
4.19 so that's covered.
We use an empty string when discarding a value due to short circuiting, but
an empty string is not allowed for versions. So use "0" in that case.
Fixes: #1883
Recent binutils can do debug section lookups over the internet, but this
is something we never want during rpmbuild (everything else aside, we're
just building the thing so there wont be anything on the net anyhow).
Disable the lookups by setting DEBUGINFOD_URLS to empty rather than
using the specific option as this is compatible with any old version of
readelf.
Last OSF/1 release is older than rpm itself, supporting its pthread
libraries doesn't seem all that relevant now. Instead, use the space to
test whether we need to link to libpthread at all (with glibc we dont),
and test for a function we actually use.
This is equally far from being "correct" as the previous version was,
we should instead be passing -pthread to the compiler and let it worry
about the rest. But doing *that* in autoconf apperars to be a lifetime
study material - there exists a > 500 line long extension which attempts
to do that, but which is reputedly buggy. We'll live with what we got
now, thanks.
cap_compare() is in libcap since 2008 or so, we really don't need to
bother with versions older than that. Another redundant configure check
and a piece of moldy code bites the dust.
setexecfilecon() is in libselinux version 2.3 in 2014, we don't need to
worry about it's availability anymore. Instead, use it to determine
libselinux suitability in the configure check, eliminating another
redundant check and a bunch of unused code.
The couple of symbols defined here are only used by one source in
librpmbuild internals so they don't really need to be a in a header,
and in particular they don't need to be in a public header. Bury
the contents to the source that actually uses them.
Fedora >= 36 carries a downstream patch which causes distutils.sysconfig
and sysconfig to disagree on the prefix, and with autoconf up to 2.69
using distutils, 2.70 preferring sysconfig and other tools still using
distutils it gets a bit much to guess. So don't.
It's a much nicer solution to the mess that commit
4a0071c339 tried to address as it takes us
out of the equation entirely.
Some of the replacements in platform.in are expected to be processed
by the build system configuration file, whereas others are replaced
by installplatform at the time of install. Use =VAR= notation instead
of @VAR@ to differentiate the latter from the former.
No functional changes, just makes it easier to understand and handle.
Once upon time where the proprietary unixen roamed there were mkdir
versions which didn't know how to create intermediate directories,
and to provide compatibility automake provided a script to do that
if the host system didn't support it. And as rpm chose to re-export
the MKDIR_P thing as a macro, we were kinda forced to carry this
script to provide that compatibility. Enough is enough, -p has been
even in POSIX for ages.
Should've really gone together with the %__mkdir_p change, but whatever.
Nobody is going to notice.
In this day and age, in anything we'll care about, calling 'ln -s' is
going to work for creating symlinks and 'mkdir -p is going to create
missing intermediate directories.
OTOH, in order to use ln -s we need to find ln, so add a new macro
for that. It's useless, but then so is %{__ln_s} these days but still
people appear to be using it a lot. And having %{__ln_s} but no %{__ln}
seems even weirder.
A whole lotta babble for a change that wont affect anybody at all.
Create a new optional UpstreamReleases tag that allows to specify an URL
of the location, where the source code could be downloaded. In
contrast to the URL part of the Source tag, this is intended for
the referrer of the sorce code, e. g. download top dir or the
sub-page of the web that contains references to the source files.
Third party tools or the package maintainer can use this tag and
find the latest version of the source code.
Co-authoredby: Florian Festi <ffesti@redhat.com>
Create a new optional TranslationURL tag that allows to specify URL
for translators. Third party tools can visualize it and motivate
people to translate.