IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Recent changes left downgradeLzmaLevel dysfunctional (because it does
not recognize 'T'). In my view, the only advantage of XZ over LZMA is
that XZ can can split input into blocks and compress them in parallel
(resulting in a speed-up). Other advantages, such as a checksum, are
immaterial for our purpose (because the package manager must verify the
integrity of a package beforehand). Therefore, downgradeLzmaLevel will
also downgrade XZ->LZMA automatically, for payloads smaller than
5*dictSize (the default blockSize being 3*dictSize, so that there are
at least two blocks, the second block not too small).
The canonicalization is based on the code lifted from tools/debugedit.c
The new behaviour is enabled by default and controlled by
%_canonicalize_symlinks macro.
While supported of course, absolute symlinks are nasty in many ways
so issue a warning to packagers. Update two affected test-cases.
Related to #668.
(cherry picked from rpm.org commit 8359ded6784579b9f2527a09888132034783e1de)
when the files exist during build time.
The hash will never be used for verification anyway.
This helps making packages build more reproducibly.
(cherry picked from rpm.org commit 8cda485e1150dc6be990a7aa4496da848154cf55)
It might be a rare condition but it /can/ happen, and previously that would cause '\0' written out of bounds (at negative array offset). Also leave room for the terminating '\0' at the end of buffer when calling readlink(), previously a link exactly the size of buffer would've been silently truncated.
(cherry picked from rpm.org commit c499a0b912629eeeabc3554d3e3a95c088e96422)
When hasher generates an src.rpm from pkg.tar, it sets $SOURCE_DATE_EPOCH
according to pkg.tar's specfile modification time which in turn is set to
the corresponding commit time.
When hasher builds from an src.rpm, it sets $SOURCE_DATE_EPOCH according
to the src.rpm's RPMTAG_BUILDTIME.
This changes helps to connect these two stages, setting the
RPMTAG_BUILDTIME of the generated src.rpm to $SOURCE_DATE_EPOCH.
Co-Authored-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
* build/parsePrep.c (doPatch): Do not pass null pointer to sprintf.
(doAutopatchMacro): Do not pass null pointer to strcmp.
Fixes: 9c18a402 ("Make %autopatch and %patch accept -pg")
* parsePrep.c (doPatch): Change strip argument type to const char *.
(doPatchMacro, doAutopatchMacro): Change opt_p variable type to char *,
change checking of opt_p: it can be either a number or a 'g' symbol
assuming that -pg is a valid option for patch command.
Spec files have a lot of metadata about a project. However one of the
most key components is the upstream version control system which was
notably lacking.
Resolve this by adding a "VCS" key. There is no specification
for contents of this key, given that the set of version control
systems (and features thereof) are not well-defined. However,
recommendations are:
* git: This URL should be in a form that can be passed to "git clone",
with the additional feature that an optional fragment identifier "#foo"
denotes a branch or tag.
%autopatch is a directive to apply all patches, it supports -p<num> and
-F<num> options
%autopatch was initially introduced in rpm.org with version 4.11 but with
different implementation.
The previous attempt to fail build in case of syntax errors
and unknown dependency qualifiers made in commit
rpm-4.8.0-beta1-385-gbf2bc18ebb325f081ade65adc2fbb6858f0b8396
missed the following classes of erroneous dependencies:
Requires(,) -- erroneously treated as Requires(),
Requires(;) -- erroneously treated as Requires(),
Requires(,pre) -- erroneously treated as Requires(),
Requires(;pre) -- erroneously treated as Requires(),
Requires(pre,) -- erroneously treated as Requires(pre),
Requires(pre,,postun) -- erroneously treated as Requires(pre),
Requires(pre,,junk) -- erroneously treated as Requires(pre),
Requires(pre;postun) -- erroneously treated as Requires(pre),
Requires(pre;junk) -- erroneously treated as Requires(pre).
Found by code inspection.
Fixes: bf2bc18ebb32 ("Always fail build on unknown dependency qualifiers")
(cherry picked from rpm.org commit aafb861846db97d78964e98d603b4e6cd88ed3ae)
The two last cases listed above have already been fixed by commit
f7280d8302.
compare_deps() was simply called with a wrong argument (an illegal value
for this parameter); so it returned a meaningful result only if
the compared deps were identical. (Always, since the inception in f5ed7f870a .)
Example where the dep was not optimized out:
Name: test-epoch-repentancy
Version: 1
Release: alt1
Summary: test-epoch-repentancy
License: public domain
Group: Other
Requires: %name-sub = %EVR
Requires: foo = 1-alt1
BuildArch: noarch
%description
%summary
%package sub
Summary: sub
Group: Other
Requires: foo = 0:1-alt1
%description sub
%summary
%files
%files sub
%changelog
* Wed Feb 27 2019 Ivan Zakharyaschev <imz@altlinux.org> 1-alt1
- initial build for ALT Linux Sisyphus.
(cherry picked from commit 492396b532660f4debc46e96eb306f07a3261d66)
# Conflicts:
# build/interdep.c
These are the cases where even the release was not needed (so, the
disttag is not needed, too), or one case where the filename is
contructed (and it doesn't include the disttag).
Now grep -Ee 'headerNVR[^D]' will show the remaining non-trivial
cases, where adapting to disttags may be needed.
This completes the intention of de77ec4556
"build/interdep.c: fix interpackage dependencies automatically":
> ...This change also downgrades "dependency needs Epoch" error to warning
> because it automatically adds strict dependencies.
However, the dependency pkg1->pkg2 was not fixed (if it needed an epoch
or disttag) if pkg1 was already considered to have a strict transitive
dependency on pkg2 (perhaps, via another pkg3: if pkg1->pkg3 and
pkg3->pkg2 deps have already been fixed and added as strict ones).
Then, if pkg3 was a part of a cycle, the pkg1->pkg2 dep wasn't
optimized out. So, it was left untouched, not in the nice format of a
strict dep (i.e., missing an epoch or a disttag).
This was not dangerous, because the strictness was guaranteed by the
transitive dependency, but it was not nice, and was inconvenient for
tools which happen to compare the dep versions as whole strings (say,
for rpm and apt optimizations, or for disttag-unaware old rpm or apt).
Not touched:
Requires: x < E:V-R[:D]
Obsoletes: x > E:V-R[:D]
Requires: x > E:V-R:D (with a disttag)
There are actually no such dependencies in Sisyphus now.
With this change, there are not so many failing tests from
rpminstall-tests-1.0-alt4 (or equivalently from the predisttag branch
there) when run in a system with an "old" rpm and the "new" rpm-build
$ rpm -q rpm --lastchange
* Пт окт 05 2018 Gleb F-Malinovskiy <glebfm@> 4.13.0.1-alt4
- Add _allow_deps_with_beginning_dot macro to allow dependencies
beginning with a dot character in spec file (vseleznv@).
$ ./makeme.sh -j4 SHORT=1
...
XFailed tests:
installable_dummyDisttag_with_reqEqualEpoch (external/strict-old-old dep & future pkg)
noninstallable_dummyDisttag_with_conflEqualEpoch (external/strict-old-old dep & future pkg)
installable_virtDummyDisttag_with_reqEqualEpoch (external/strict-old-old dep & future pkg)
noninstallable_virtDummyDisttag_with_conflEqualEpoch (external/strict-old-old dep & future pkg)
installable_dummyDisttag_with_reqEqual (elusive external/strict-old-old dep & future pkg)
noninstallable_dummyDisttag_with_conflEqual (elusive external/strict-old-old dep & future pkg)
installable_virtDummyDisttag_with_reqEqual (elusive external/strict-old-old dep & future pkg)
noninstallable_virtDummyDisttag_with_conflEqual (elusive external/strict-old-old dep & future pkg)
obsoleted_dummyDisttag_with_obsolEqualEpochDisttag (unrealistic obsoleting disttag)
obsoleted_dummyDisttag_with_obsolEqualDisttag (unrealistic obsoleting disttag)
installable_provVR3Disttag_with_reqEq_VR3 (elusive external/strict-old-old dep & future pkg)
Failed tests:
noninstallable_provOnlyV_with_reqVR
noninstallable_provOnlyV_before_reqVR
installable_provOnlyV_with_conflVR
installable_provOnlyV_before_conflVR
Except for the underspecified Provides problem, the insteresting cases
are the cases of a = dependency.
We can think of a Conflicts: subpkg = E:V-R, which wouldn't work,
but many such cases (if there are any) must be mitigated by the change
of the value of %%EVR to include the disttag (in another commit).
So, the "old" and "new" rpm behave much more similar w.r.t. to the
packages built by the new rpm-build. (This is what we wanted.)
Convert PreReq tags without qualifiers into Requires(pre,postun)
and PreReq tags with qualifiers into Requires tags with those qualifiers.
This matches compare_deps() behaviour and opens the way
for additional optimizations of dependencies.
Before this change unknown qualifiers were silently ignored if they
happened to be the last or the only qualifier, e.g. Requires(trash) or
Requires(pre,trash) were accepted but Requires(trash,post) were not.
Now all unknown qualifiers are treated as errors.
Before this change abbreviated qualifiers like BuildRequires(pre)
were silently ignored as unknown, now unambiguously abbreviated qualifiers
are handled like non-abbreviated.
Makefile.am:13: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
build/Makefile.am:5: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
lib/Makefile.am:5: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
python/Makefile.am:7: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
rpmdb/Makefile.am:5: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
rpmio/Makefile.am:9: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
tools/Makefile.am:5: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
Before this change, thanks to rpmEVRcmp(), compare_deps() used to treat
EVRs with common EV as equal when one had a release and another hand't.
There were some reasons to use this approach, e.g. to decide that
Requires: %name = %version
is weaker than
Requires: %name = %version-%release
it had firstly to consider them as comparable deps. But, as an
unfortunate consequence of that approach, it was deciding that such deps
are equal, so that addReqProv() was unable to replace former with the
latter.
If one of deps has Epoch and another one hasn't,
we first compare them without Epoch, and if it happens
that they are equal, then the dep that has Epoch wins.
Ignore requirements with RPMSENSE_SENSEMASK containing ~RPMSENSE_EQUAL.
Add strict requirements for requirements on subpackages regardless of
number of alternative providers.
When comparing deps whose senses are identical, Epoch needs special
treatment: if one of deps has Epoch and another one hasn't, we first
compare them without Epoch, and if it happens that they are equal,
the dep that has Epoch wins.
Non-strict interpackage dependencies are now converted to strict when
appropriate.
The %_allowed_nonstrict_interdeps macro support is therefore gone.
This change also downgrades "dependency needs Epoch" error to warning
because it automatically adds strict dependencies.
There is a macro now that can list pairs of allowed non-strict deps.
By default, the macro is not defined so the list is empty and therefore
non-strict deps are not allowed.
In modern rpms both %patch -F <N> and %patch -F<N> are valid option
calls whereas old -F implementation supported -F <N> syntax only.
This patch adds support for %patch -F<N> syntax.