Re: [Rpm-maint] [PATCH] Warn and create empty debugsource package if there are no sources.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Wed, 2017-08-02 at 13:09 +0200, Mark Wielaard wrote: > Hi, > > On Fri, 2017-07-28 at 15:29 +0200, Mark Wielaard wrote: > > + if [ ! -s "$srcout" ]; then > > +echo >&2 "*** WARNING: No source files found. Creating empty > > debugsource package" > > +# Create the empty directory. > > +# See also debugedit invocation. Directories must match up. > > +debug_base_name="$RPM_BUILD_DIR" > > +debug_dest_name="/usr/src/debug" > > +if [ ! -z "$unique_debug_src_base" ]; then > > + debug_base_name="$BUILDDIR" > > + debug_dest_name="/usr/src/debug/${unique_debug_src_base}" > > +fi > > +mkdir -p "${RPM_BUILD_ROOT}${debug_dest_name}" > > +echo "$debug_dest_name" > "$srcout" > > + fi > > fi > > Do we want to be nicer to packages that don't include sources like > this? > Or should we just declare that this is probably a packaging issue > (badly > produced debuginfo) and improve the error message? We do this today with debuginfo packages, I don't think debugsource should be treated differently. If there will be use-case, then we can figure something out. > > Alternatively we might just skip creation of the whole debugsource > package. But I couldn't figure out how to do that. > > Cheers, > > Mark > > ___ > Rpm-maint mailing list > Rpm-maint@lists.rpm.org > http://lists.rpm.org/mailman/listinfo/rpm-maint - -- - -Igor Gnatenko -BEGIN PGP SIGNATURE- iQIzBAEBCAAdFiEEhLFO09aHZVqO+CM6aVcUvRu8X0wFAlmB8xQACgkQaVcUvRu8 X0xkwQ/+KWNuHImQSrkIqldzlGeSbZkgbMErZ0rBoNOGuxKvqnQilNzbIaVF932/ kw8xubIGmLesERjyl73hHUHRVYr/oSPvMahV0msR2I1Te2+bI1/2JENSqVK/iBa/ jjKL3GUV/txMi3VoIaBDLhyDhhEyc9FvXB1kXM+n9acG2ejFQKjKOSwp1CLohhCT ++POJ2Gx/GgSJ4fBNYtoHDDYNmC+QbHfJdjWggtkT73HxZ21OqvwBc86wu8Zlz2t aKsn3e9VwwU/rSEsTagsusn8JIHsujLVkidokaKuXtN7vpxRGp/AhEbwW7D+oPBY yM2T3MFMexDDKA1C3Tm+ccdG8rqF4xKO4klA3I8NMjK7U3RHc2YNwRalI65NQ0b0 TawIClAToYRHn1W0dBD0aJcGAJgGRF6KzGG5f5CQxcMUiE1i7IrMcc4WdXhOn7OY Ci1anBl7D7t85HBn6G/DINFgM6lTSSJGA5o0NxQS9w7BADZA2/LH8dGBAoOZNOoG blk1nM8sWnif7O13J2z9DTK2UvWobsBOb49lMeNZFu9P+KZ5dhWIXJ9N0sT+JFL8 AgkiAp33nuEz5IH7NJbSoB/sk4yE1++jSV0qgZL3U6yQpjzfAoxgH3dzVg/Z8cZV Omb3CWKFtiumTg3OeUksRVccEGuRuJQHeQXbdFHpPrAEBaW6yQ8= =pJHz -END PGP SIGNATURE- ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Do not hardcode "lib/rpm" as the installation path for default configuration and macros. (#298)
The Yocto Project doesn't mandate any particular userspace layout. You can configure it to match FHS but we expect software to match the configuration that is set. The issue here is that rpm doesn't honour our configuration settings. People can and do change the layouts for various reasons, I don't pass judgement on whether these are good or bad, our policy is to be flexible and do what users configure. If we can't change rpm in ways which let us pass configuration in, we'll just have to carry patches but obviously we'd prefer to avoid that if we can. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/298#issuecomment-319657461___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Do not hardcode "lib/rpm" as the installation path for default configuration and macros. (#298)
It is a problem for multilib environments which are very common in embedded space. Yocto has had full support for it for a long time, but it does require that nothing hardcodes the /usr/lib assumption, and instead installs its stuff where it is told to by the build environment. http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#combining-multiple-versions-library-files-into-one-image -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/298#issuecomment-319654697___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Do not hardcode "lib/rpm" as the installation path for default configuration and macros. (#298)
> /usr/lib includes object files and libraries. [21] On some systems, it may > also include internal binaries that are not intended to be executed directly > by users or shell scripts. [22] > ... > [22] See below, in the /usr/libexec section, for a discussion of /usr/lib vs. > /usr/libexec for executable binaries. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/298#issuecomment-319651227___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Do not hardcode "lib/rpm" as the installation path for default configuration and macros. (#298)
@kanavin I still don't understand why $prefix/lib/rpm is a problem. This location is even described in FHS. so Yocto doesn't support FHS? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/298#issuecomment-319650754___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Do not hardcode "lib/rpm" as the installation path for default configuration and macros. (#298)
I just want to settle this question going forward: should these references be hardcoded to /usr/lib, which is less pain for existing distributions, but more pain for Yocto, as we have to fix every instance of such hard coding (that also includes the rest of dnf stack, and various other software), and then carry/rebase the fixes forever as vendor patches. Or should they be made flexible, as an upstream policy. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/298#issuecomment-319650516___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] add support for zstd compressed payload (#297)
ignatenkobrain commented on this pull request. > @@ -351,6 +351,9 @@ int rpmFileIsCompressed(const char * file, > rpmCompressedMagic * compressed) (magic[4] == 0x5a) && (magic[5] == 0x00)) { /* new style xz (lzma) with magic */ *compressed = COMPRESSED_XZ; +} else if ((magic[0] == 0x28) && (magic[1] == 0x85) && + (magic[2] == 0x2f) ) { seems like I overlooked this useless spaces in here, will fix in a bit -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/297#pullrequestreview-53770200___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] add support for zstd compressed payload (#297)
ignatenkobrain commented on this pull request. > @@ -8,7 +8,7 @@ Name: RPM Description: RPM Package Manager Version: @VERSION@ URL: http://rpm.org -# Requires: +Requires.private: @ZSTD_REQUIRES@ this is mostly if you would like to do `pkg-config --static --cflags --ldflags rpm` to link RPM statically.. most likely it will not work at all due to some other issues, but this is not problem of this patchset ;) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/297#discussion_r130850315___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] add support for zstd compressed payload (#297)
ignatenkobrain commented on this pull request. > @@ -8,7 +8,7 @@ Name: RPM Description: RPM Package Manager Version: @VERSION@ URL: http://rpm.org -# Requires: +Requires.private: @ZSTD_REQUIRES@ well, we do for Libraries.private... but since we use pkg-config for zstd, it is better to put into Requires.private.. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/297#discussion_r130850129___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Do not hardcode "lib/rpm" as the installation path for default configuration and macros. (#298)
this will break existing distributions. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/298#issuecomment-319643940___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Do not hardcode "lib/rpm" as the installation path for default configuration and macros. (#298)
This can be named in various different ways, especially in cross-compilation environments, so let's take it from the build setup. This is a much simpler and less invasive version of an earlier patch: it simply changes references to $(prefix)/lib/rpm, so that they become $(libdir)/rpm. Hopefully this is less controversial or problematic. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/298 -- Commit Summary -- * Do not hardcode "lib/rpm" as the installation path for default configuration and macros. -- File Changes -- M configure.ac (2) M rpm.am (6) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/298.patch https://github.com/rpm-software-management/rpm/pull/298.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/298 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [PATCH 2/2] Test split debuginfo packages with RemovePathPostfixes.
On Fri, 2017-07-28 at 23:24 +0200, Mark Wielaard wrote: > If split debuginfo code doesn't know about RemovePathPostfixes it fails: > > error: Installed (but unpackaged) file(s) found: >/usr/lib/debug/bin/hello.foobar-1.0-1.x86_64.debug This one also now passes with Igor's fixes. ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [PATCH 1/2] Test split debuginfo packages with excluded files.
On Fri, 2017-07-28 at 23:24 +0200, Mark Wielaard wrote: > If split debuginfo code doesn't know about excluded files it fails: > > error: Installed (but unpackaged) file(s) found: >/usr/lib/debug/bin/hello3-1.0-1.x86_64.debug And with Igor's fixes this test now passes. ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [PATCH] Add rpmbuild debuginfo subpackages tests.
On Fri, 2017-07-28 at 21:55 +0200, Mark Wielaard wrote: > This adds various tests for making sure multiple subpackages are build > correctly. Without debuginfo subpackages, with subpackages, subpackages > with unique debug file and source dir paths and with separate debugsources. Ping. These are simply tests for existing functionality that didn't have tests before. ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [PATCH] Warn and create empty debugsource package if there are no sources.
Hi, On Fri, 2017-07-28 at 15:29 +0200, Mark Wielaard wrote: > + if [ ! -s "$srcout" ]; then > +echo >&2 "*** WARNING: No source files found. Creating empty > debugsource package" > +# Create the empty directory. > +# See also debugedit invocation. Directories must match up. > +debug_base_name="$RPM_BUILD_DIR" > +debug_dest_name="/usr/src/debug" > +if [ ! -z "$unique_debug_src_base" ]; then > + debug_base_name="$BUILDDIR" > + debug_dest_name="/usr/src/debug/${unique_debug_src_base}" > +fi > +mkdir -p "${RPM_BUILD_ROOT}${debug_dest_name}" > +echo "$debug_dest_name" > "$srcout" > + fi > fi Do we want to be nicer to packages that don't include sources like this? Or should we just declare that this is probably a packaging issue (badly produced debuginfo) and improve the error message? Alternatively we might just skip creation of the whole debugsource package. But I couldn't figure out how to do that. Cheers, Mark ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] add support for zstd compressed payload (#297)
Conan-Kudo requested changes on this pull request. > @@ -8,7 +8,7 @@ Name: RPM Description: RPM Package Manager Version: @VERSION@ URL: http://rpm.org -# Requires: +Requires.private: @ZSTD_REQUIRES@ If this is linked in from librpmio, there's no reason to add `Requires.private`, right? We never did this for any of the others... -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/297#pullrequestreview-53765658___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Do not hardcode "lib/rpm" as the installation path for default config… (#263)
@pmatilai Okay, splitting things into two places is bad. How about not hardcoding the 'lib' part? Should I open a separate PR for it? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/263#issuecomment-319639985___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Do not hardcode "lib/rpm" as the installation path for default config… (#263)
Closed #263. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/263#event-1189319031___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Do not hardcode "lib/rpm" as the installation path for default config… (#263)
@Conan-Kudo in Yocto the generated platform macros are not used, as there is a hardcoded list of those platforms, which is not flexible enough for us. So we directly override settings from the default macros file at runtime. However, for some reason _libdir is not overriden in the same way, and is instead configured at build time - so you have a point, I should change that. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/263#issuecomment-319638245___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Do not hardcode "lib/rpm" as the installation path for default config… (#263)
My personal preference is to keep $prefix/lib/rpm hardcoded. We do this in systemd, casync and a lot of other tools. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/263#issuecomment-319636312___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Do not hardcode "lib/rpm" as the installation path for default config… (#263)
@pmatilai We could at least move things to `$(libexecdir)/rpm` and for Fedora have a symlink for the old location to point to the new one. That'd keep things consistent, right? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/263#issuecomment-319635899___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] add support for %{shrink:} (#296)
@pmatilai I think I fixed all nitpicks ;) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/296#issuecomment-319634624___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] add support for %{shrink:} (#296)
pmatilai commented on this pull request. > +} else if (STREQ("shrink", f, fn)) { + /* +* shrink body by removing all leading and trailing whitespaces and +* reducing intermediate whitespaces to a single space character. +*/ + int i, j, k, was_space = 0; + for (i = 0, j = 0, k = (int)strlen(buf); i < k; ) { + if (isspace((int)(buf[i]))) { + was_space = 1; + i++; + continue; + } else if (was_space) { + was_space = 0; + if (j > 0) /* remove leading blanks at all */ + buf[j++] = ' '; + /* fallthrough */ The /* fallthrough */ comment seems out of place, there's no switch-case here. A leftover porting artifact maybe? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/296#pullrequestreview-53757958___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add zstd compressed payload support to RPM (from @n3npq in #256) (#295)
Superseded by #297 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/295#issuecomment-319632547___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] add support for zstd compressed payload (#297)
You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/297 -- Commit Summary -- * add support for zstd compressed payload * ci: Add libzstd-devel to CI Dockerfile -- File Changes -- M build/pack.c (6) M build/parsePrep.c (3) M ci/Dockerfile (1) M configure.ac (26) M lib/rpmds.c (5) M macros.in (1) M rpm.pc.in (2) M rpmio/Makefile.am (2) M rpmio/macro.c (3) M rpmio/rpmfileutil.c (3) M rpmio/rpmfileutil.h (3) M rpmio/rpmio.c (251) M scripts/rpm2cpio.sh (1) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/297.patch https://github.com/rpm-software-management/rpm/pull/297.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/297 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] add support for %{shrink:} (#296)
pmatilai commented on this pull request. > @@ -864,6 +865,27 @@ doFoo(MacroBuf mb, int negate, const char * f, size_t fn, if ((b = strrchr(buf, '/')) != NULL) *b = '\0'; b = buf; +} else if (STREQ("shrink", f, fn)) { + /* +* shrink body by removing all leading and trailing whitespaces and +* reducing intermediate whitespaces to a single space character. +*/ + int i, j, k, was_space = 0; + for (i = 0, j = 0, k = (int)strlen(buf); i < k; ) { Use the appropriate type for the variable so you dont need a silly cast like this. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/296#pullrequestreview-53756704___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Do not hardcode "lib/rpm" as the installation path for default config… (#263)
@kanavin The values in macros.in are overridden by the generated platform macros: https://github.com/rpm-software-management/rpm/blob/master/platform.in As far as I know, as long as you aren't purging the platforms, this doesn't matter. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/263#issuecomment-319629413___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Do not hardcode "lib/rpm" as the installation path for default config… (#263)
@Conan-Kudo In Yocto project the libdir can be lib, lib32, lib64, or anything else. You cannot assume anything about it, and when building the software, the value for it is typically passed to ./configure as a command line switch. On the other hand, %_libdir macro hardcodes the value to be /usr/lib, and then that macro is used all over the place in rpm. So I am removing that hardcoding, and setting the macro dynamically at build time from the build environment settings. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/263#issuecomment-319627324___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] add support for %{shrink:}, derived from rpm5.org (#234)
superseded by #296 which fixes some style issue in code + adds test -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/234#issuecomment-319608110___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Zstd compression support (from jbj) (#283)
superseded by #295 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/283#issuecomment-319600646___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint