Re: [Rpm-maint] [rpm-software-management/rpm] Proof-of-concept native support for vpath-style builds (PR #2886)

2024-02-09 Thread Panu Matilainen
Okay this PR served its purpose, lessons learned: not this way, and not just now. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2886#issuecomment-1935490089 You are receiving this because you are subscribed to this thread. Message

Re: [Rpm-maint] [rpm-software-management/rpm] Add a low-level package dump utility (PR #2893)

2024-02-09 Thread Panu Matilainen
Merged #2893 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2893#event-11754933396 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

[Rpm-maint] [rpm-software-management/rpm] Add a low-level package dump utility (PR #2893)

2024-02-08 Thread Panu Matilainen
This started life as pkgdump.c written way back when I needed to analyze some low-level issues with malformed packages and the like. Since then its proven necessary every once in a blue moon, so might as well include it in the rpm codebase where it may actually be kept up to date and even

Re: [Rpm-maint] [rpm-software-management/rpm] Enhance the recoverability and location of database exceptions (Issue #2828)

2024-02-08 Thread Panu Matilainen
> I think the database is abnormal because the verification fails when I run > the rpm command, You mean 'rpm --verify'? What errors? > or the "rpm -qa" command cannot find the kernel package, but the "rpm -q" > command can find the kernel package. According to the result, the problem is >

Re: [Rpm-maint] [rpm-software-management/rpm] Noarch RPMs that contain EBPF binaries code incorrectly fail with "Arch dependent binaries in noarch package" (Issue #2875)

2024-02-07 Thread Panu Matilainen
Okay, managed to produce one by myself: > [pmatilai︎localhost ~]$ clang -target bpf -c bpf.c -o bpf.o > [pmatilai︎localhost ~]$ file bpf.o > bpf.o: ELF 64-bit LSB relocatable, eBPF, version 1 (SYSV), not stripped So it's an architecture by itself, speced to be always 64bit:

Re: [Rpm-maint] [rpm-software-management/rpm] Introduce an rpm-controlled per-build directory (PR #2885)

2024-02-07 Thread Panu Matilainen
Other ponderings include the per-build directory macro name, should it be just %builddir without the underscore (instead of %pkgbuilddir) -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2885#issuecomment-1931865327 You are receiving this

Re: [Rpm-maint] [rpm-software-management/rpm] Introduce an rpm-controlled per-build directory (PR #2885)

2024-02-07 Thread Panu Matilainen
Merged this into a single commit at least for now as the changing paths clashed in maddening ways in the test-suite on rebases, making simple changes too hard to bother with. Buildroot is just BUILDROOT now. I would've used name-version-release.arch for the per-build directory, but this turns

Re: [Rpm-maint] [rpm-software-management/rpm] Introduce an rpm-controlled per-build directory (PR #2885)

2024-02-07 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -303,6 +300,24 @@ static rpmRC doCheckBuildRequires(rpmts ts, rpmSpec > spec, int test) return rc; } +static rpmRC doBuildDir(rpmSpec spec, int test, StringBuf *sbp) +{ +char *doDir = rstrscat(NULL, + "rm -rf

Re: [Rpm-maint] [rpm-software-management/rpm] Introduce an rpm-controlled per-build directory (PR #2885)

2024-02-07 Thread Panu Matilainen
@pmatilai pushed 1 commit. 9d19699f6c8dc0c3eeaf8dcea820e76171aac84d Introduce an rpm-controlled per-build directory -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2885/files/80a60aa2bddb78a897e6279891ec58d862d92d74..9d19699f6c8dc0c3eeaf8dcea820e76171aac84d You are

Re: [Rpm-maint] [rpm-software-management/rpm] Introduce an rpm-controlled per-build directory (PR #2885)

2024-02-07 Thread Panu Matilainen
The thing is (well, one of the things) is that, foo-1.0/foo-1.0 can mask a bug or packaging error. The ugly -PKG suffix was absolutely necessary for seeing which path a thing is actually trying to use when developing this PR, and will be equally necessary for packagers trying to troubleshoot

Re: [Rpm-maint] [rpm-software-management/rpm] Enhance the recoverability and location of database exceptions (Issue #2828)

2024-02-07 Thread Panu Matilainen
Um, what exactly do you mean by "database being abnormal" then? -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2828#issuecomment-1931688028 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] Clarify %_build*, %_host* and %_target* macros (Discussion #2889)

2024-02-07 Thread Panu Matilainen
AFAICS --target was always wrong from the autoconf cross-compilation terminology point of view. For what it does in rpm, --host would be closer to the mark. But outside a autoconf terminology explanation, would anybody ever guess that --host somehow relates to output architecture and stuff?

Re: [Rpm-maint] [rpm-software-management/rpm] Introduce an rpm-controlled per-build directory (PR #2885)

2024-02-07 Thread Panu Matilainen
> Not a fan of the `-PKG` and `-root` suffixes. The -PKG is ugly for sure, but *some* differentation from the traditional %setup created directory seems necessary to drive the point across, and make logs easier to look at. If you just have 'foo-1.0/foo-1.0/' its easy to mix up etc. NEVRA

Re: [Rpm-maint] [rpm-software-management/rpm] Introduce an rpm-controlled per-build directory (PR #2885)

2024-02-07 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -303,6 +300,24 @@ static rpmRC doCheckBuildRequires(rpmts ts, rpmSpec > spec, int test) return rc; } +static rpmRC doBuildDir(rpmSpec spec, int test, StringBuf *sbp) +{ +char *doDir = rstrscat(NULL, + "rm -rf

Re: [Rpm-maint] [rpm-software-management/rpm] Clarify %_build*, %_host* and %_target* macros (Discussion #2889)

2024-02-06 Thread Panu Matilainen
Nobody knows. See https://github.com/rpm-software-management/rpm/issues/1650 -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/2889#discussioncomment-8382986 You are receiving this because you are subscribed to this thread. Message

Re: [Rpm-maint] [rpm-software-management/rpm] Pass arg2 to file trigger scripts (PR #2883)

2024-02-06 Thread Panu Matilainen
Aside from those three-way indiretions making me cringe a bit (not that it makes any difference here), looks pretty straight-forward to me. This is one where feedback from active packagers would be useful. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Introduce an rpm-controlled per-build directory (PR #2885)

2024-02-06 Thread Panu Matilainen
Multiple buildroots could be useful for the the "variant builds" case, but the arch-os naming doesn't help with *that* at all, the potential benefits I see are more far fetched. But, it's useful to shake things a bit, it doesn't *have* to be BUILDROOT just because we've had such a thing in the

Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-06 Thread Panu Matilainen
I'll still want to see the "real-world" test cases added to this. The gotchas and bugs are always in the part that you didn't think needs testing :laughing: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1929442665

Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-06 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -91,5 +91,16 @@ macros which is nicer in other situations, e.g.: Always test for the `with`-condition, not the `without`-counterpart! +## Overrinding Defaults + +For distributions it can be useful to overwrite the build conditionals on a

Re: [Rpm-maint] [rpm-software-management/rpm] Add "local_generator" (PR #2734)

2024-02-06 Thread Panu Matilainen
One more thing wrt the macro name: I wonder if this is a case where it should *not* have those leading underscores. The generator itself is full of those, but the newly added macro here is something directly intended for packager use. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add "local_generator" (PR #2734)

2024-02-06 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -995,6 +995,25 @@ runroot rpm -qp --requires > /build/RPMS/noarch/shebang-0.1-1.noarch.rpm|grep -v ^ []) RPMTEST_CLEANUP +AT_SETUP([Local dependency generator]) +AT_KEYWORDS([build]) +RPMTEST_CHECK([ +RPMDB_INIT + +runroot rpmbuild -bb --quiet

Re: [Rpm-maint] [rpm-software-management/rpm] Add "local_generator" (PR #2734)

2024-02-06 Thread Panu Matilainen
@pmatilai commented on this pull request. > - bn[strlen(bn)-strlen(".attr")] = '\0'; - fc->atypes[i] = rpmfcAttrNew(bn); + nfiles = argvCount(files); +} +char * local_attr_names = rpmExpand("%{?__local_file_attrs}", NULL); +ARGV_t local_attrs =

Re: [Rpm-maint] [rpm-software-management/rpm] Add "local_generator" (PR #2734)

2024-02-06 Thread Panu Matilainen
@pmatilai commented on this pull request. > - fc->atypes = xcalloc(nattrs + 1, sizeof(*fc->atypes)); - for (int i = 0; i < nattrs; i++) { - char *bn = basename(files[i]); - bn[strlen(bn)-strlen(".attr")] = '\0'; - fc->atypes[i] = rpmfcAttrNew(bn); +

Re: [Rpm-maint] [rpm-software-management/rpm] Add "local_generator" (PR #2734)

2024-02-06 Thread Panu Matilainen
@pmatilai commented on this pull request. > - bn[strlen(bn)-strlen(".attr")] = '\0'; - fc->atypes[i] = rpmfcAttrNew(bn); + nfiles = argvCount(files); +} +char * local_attr_names = rpmExpand("%{?__local_file_attrs}", NULL); +ARGV_t local_attrs =

Re: [Rpm-maint] [rpm-software-management/rpm] RPM 4.19.1.1 bugfix update (PR #2888)

2024-02-06 Thread Panu Matilainen
> > There are a few memleak fixes > > Oh, you mean (some commits from) #2879. Indeed, I somehow ignored this whole > PR due to it starting with "Add support for ..."  I'll look at those patches > and see if cherry picking at least some of them would make sense, thanks. Yup, those. OTOH you

Re: [Rpm-maint] [rpm-software-management/rpm] Introduce an rpm-controlled per-build directory (PR #2885)

2024-02-06 Thread Panu Matilainen
@kloczek , this is not about SPECPARTS although if you *look* at the PR, that's one of the issues that gets solved by this. See #2532 for the background. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2885#issuecomment-1929038038 You

Re: [Rpm-maint] [rpm-software-management/rpm] Is there a way to merge several RPMs (Discussion #2887)

2024-02-06 Thread Panu Matilainen
I guess what you mean by "merging" is something entirely different than me & ffesti think of. Binary rpm's are immutable end products of a spec which directs rpmbuild to produce said rpms. Somehow undoing a separation set by the packager is just not a meaningful operation at all. The only

Re: [Rpm-maint] [rpm-software-management/rpm] Proof-of-concept native support for vpath-style builds (PR #2886)

2024-02-06 Thread Panu Matilainen
> I am not sure if tying this to the `%setup` is useful, unless there is also > some alternative to setup this independently. Maybe if the `%{-s}` also > accepted some alternative build name(s). The way builds are tied to %setup, I think there needs to be a way to achieve this via %setup. It

Re: [Rpm-maint] [rpm-software-management/rpm] RPM 4.19.1.1 bugfix update (PR #2888)

2024-02-06 Thread Panu Matilainen
There are a few memleak fixes + maybe the unsigned buildtime thing that might be worth considering too. Although, there's always the next release, so up to you. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Introduce an rpm-controlled per-build directory (PR #2885)

2024-02-06 Thread Panu Matilainen
> Do I understand correctly that the `BUILDROOT` dir was replaced by > `%{_builddir}/%{_target_cpu}-%{_target_os}-root`? The `%{_builddir}` is the > right move IMHO, but what is the advantage of > `%{_target_cpu}-%{_target_os}-root` over `BUILDROOT`, especially when e.g. > `SPECPARTS` stays

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: introduce an rpm-controlled per-build directory to builds (Issue #2078)

2024-02-05 Thread Panu Matilainen
Making remote execution (cross-compilation) easier added (inspired by https://github.com/rpm-software-management/rpm/discussions/2884) -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2078#issuecomment-1928947972 You are receiving this

Re: [Rpm-maint] [rpm-software-management/rpm] Support for running %check on a different machine (Discussion #2884)

2024-02-05 Thread Panu Matilainen
Oh. Reading more carefully now, I can see a lack of "the" and a relevant plural in "running test suites" :sweat_smile: Adjusted the title to make it clear. All the build scriptlets have (some) support for remote execution through this: > %___build_cmd %{?_sudo:%{_sudo}

Re: [Rpm-maint] [rpm-software-management/rpm] support reproducible automatic rebuilds (PR #2880)

2024-02-05 Thread Panu Matilainen
> Steps to reproduce: > >package gcc: version 1.1 >package hello: BuildDepends gcc; changelog epoch 1; but its build script > includes SOURCE_DATE_EPOCH in the binary >build package hello >update package gcc to version 1.2 >[...] I get that this is the real-world scenario,

Re: [Rpm-maint] [rpm-software-management/rpm] Support for running tests on a different machine (Discussion #2884)

2024-02-05 Thread Panu Matilainen
@dmnks feel free to correct/extend, but the test-suite does run as a separate step in the "native" mode using already built binaries. That's only supported on Fedora at the moment but that's AIUI just a matter of somebody adding + maintaining a native dockerfile for their target distro. --

Re: [Rpm-maint] [rpm-software-management/rpm] Introduce an rpm-controlled per-build directory (PR #2885)

2024-02-05 Thread Panu Matilainen
FWIW, the %{NAME}-%{VERSION}-PKG name is not really intended as final, I used that just to have it stand out from the logs. Better ideas welcome. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2885#issuecomment-1926715511 You are

Re: [Rpm-maint] [rpm-software-management/rpm] Proof-of-concept native support for vpath-style builds (PR #2886)

2024-02-05 Thread Panu Matilainen
Besides PoC, this is of course rather simple-minded too. There may be some interesting possibilities in supporting multiple build variants natively here. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2886#issuecomment-1926707782 You

Re: [Rpm-maint] [rpm-software-management/rpm] Introduce an rpm-controlled per-build directory (PR #2885)

2024-02-05 Thread Panu Matilainen
@pmatilai pushed 1 commit. 80a60aa2bddb78a897e6279891ec58d862d92d74 fixup! Introduce an rpm-controlled per-build directory -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2885/files/2e18582771df083726278bc64feee8b8b5268e74..80a60aa2bddb78a897e6279891ec58d862d92d74

Re: [Rpm-maint] [rpm-software-management/rpm] Proof-of-concept native support for vpath-style builds (PR #2886)

2024-02-05 Thread Panu Matilainen
This is on top of the per-build directory PR because it makes this much easier to do, ie the actual feature here is just the last commit. This is NOT meant for merging at this point, just that even a crude implementation is easier to discuss than thin air. See also

[Rpm-maint] [rpm-software-management/rpm] Proof-of-concept native support for vpath-style builds (PR #2886)

2024-02-05 Thread Panu Matilainen
Add a new %setup switch -s to indicate building in a directory outside the source directory, known as vpath build in some circles. Add a new %{sourcesubdir} macro which by default equals %{buildsubdir}, but when -s is used, we create and switch to a separate directory after unpacking. A one

Re: [Rpm-maint] [rpm-software-management/rpm] Introduce an rpm-controlled per-build directory (PR #2885)

2024-02-05 Thread Panu Matilainen
@pmatilai pushed 2 commits. beeb017d5f471aa5572f5c18365ece89cce8ebd0 Make buildroot fully rpm controlled, always inside the per-build directory 2e18582771df083726278bc64feee8b8b5268e74 Move SPECPARTS to per-pkg builddir, no longer needing name-version -- View it on GitHub:

[Rpm-maint] [rpm-software-management/rpm] Introduce an rpm-controlled per-build directory (PR #2885)

2024-02-05 Thread Panu Matilainen
In our ancient wacko setup, %_builddir is shared by all your packages, under which a package may create %buildsubdir - if it uses %setup that is. In other words, theres no safe and sane place for rpm to place per-build material. Introduce a new intermediate directory between the two, created in

Re: [Rpm-maint] [rpm-software-management/rpm] Native support for separate build and source tree (aka vpath builds) (Discussion #2882)

2024-02-05 Thread Panu Matilainen
Good point wrt multiple build directories :+1: While we have native support for these kind of multiple variants builds via `RemovePathPostfixes` (which isn't used by vim or python in fedora, curl does though), having separate build and buildroot directories could make that easier to use. --

Re: [Rpm-maint] [rpm-software-management/rpm] Package specific prep/build/... sections (Discussion #2849)

2024-02-05 Thread Panu Matilainen
Append/prepend is still operating on exactly one script of a type. Adding support for multiple scripts for each step would be a huge amount of work for very little benefit, I don't see that happening. With append/prepend, you can place sub-package specific build scriptlet sections into their

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: introduce an rpm-controlled per-build directory to builds (Issue #2078)

2024-02-02 Thread Panu Matilainen
Vpath builds added... -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2078#issuecomment-1923786897 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Native support for separate build and source tree (aka vpath builds) (Discussion #2882)

2024-02-02 Thread Panu Matilainen
Yeah I was aware Fedora is doing cmake builds in a vpath, but that's quite a different thing from having rpm natively support it. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/2882#discussioncomment-8346327 You are receiving

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Make `%setup` work with archives regardless of inner structure (Issue #2664)

2024-02-02 Thread Panu Matilainen
Oh, yup, this can be closed now. Thanks again! -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2664#issuecomment-1923700556 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Make `%setup` work with archives regardless of inner structure (Issue #2664)

2024-02-02 Thread Panu Matilainen
Closed #2664 as completed. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2664#event-11683454322 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

[Rpm-maint] [rpm-software-management/rpm] Native support for separate build and source tree (aka vpath builds) (Discussion #2882)

2024-02-02 Thread Panu Matilainen
rpmbuild traditionally builds in the same directory where it unpacks the sources. Probably at least in part because in the nineties anything else was considered fancy pants that few projects supported. Apart from hand-rolled makefiles, these days the situation is almost the opposite: any sane

Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-02 Thread Panu Matilainen
I'd like to see tests with real-world bconds in packages. We already have tests for bcond so this can build on top of those. I'd like to see documentation and tests on how this is supposed to be used in real life, answering some practical matters like - Where would the overrides/defaults be

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-02-02 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -22,6 +26,8 @@ static struct poptOption optionsTable[] = { N_("provide more detailed output"), NULL }, { "dry-run", 'n', POPT_ARG_VAL, , 1, N_("only print what would be done"), NULL }, +{ "path", 'C', POPT_ARG_STRING, , 0,

Re: [Rpm-maint] [rpm-software-management/rpm] Add "local_generator" (PR #2734)

2024-02-02 Thread Panu Matilainen
> This all makes `__local_file_attrs` look less horrible than I first thought Indeed. It's sufficiently vague to cover both cases we care about, and totally accurate in the sense that its local to the build. > `__additional_file_attrs` is actually kinda close but not quite as it implies >

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-02-02 Thread Panu Matilainen
Merged #2859 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2859#event-11682412695 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-02-02 Thread Panu Matilainen
Oh well, rpmuncompress is an internal tool and we can still change the option names before we release if need be, no point getting stuck over that here. I initially misunderstood what happens when there are multiple top-entries, but having cleared that up for myself, I think this is good to go.

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-02-02 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -22,6 +26,8 @@ static struct poptOption optionsTable[] = { N_("provide more detailed output"), NULL }, { "dry-run", 'n', POPT_ARG_VAL, , 1, N_("only print what would be done"), NULL }, +{ "path", 'C', POPT_ARG_STRING, , 0,

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-02-02 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -22,6 +26,8 @@ static struct poptOption optionsTable[] = { N_("provide more detailed output"), NULL }, { "dry-run", 'n', POPT_ARG_VAL, , 1, N_("only print what would be done"), NULL }, +{ "path", 'C', POPT_ARG_STRING, , 0,

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-02-01 Thread Panu Matilainen
Thanks for the test-cases! I see four tarballs added but only two used. Also, it's better to add separate tests as separate RPMTESTS_CHECK() (under a shared setup/cleanup block). Makes it easier to see what's going on and where. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] support reproducible automatic rebuilds (PR #2880)

2024-02-01 Thread Panu Matilainen
The issues with this one start with the topic. Reproducible builds are reproducible whether manually or automatically, we don't need this patch for that. None of this makes any sense without reading up a whole lot of additional context as to how some initially unmentioned buildsystem processes

Re: [Rpm-maint] [rpm-software-management/rpm] RPM v6 package format, first public draft for commenting (Discussion #2374)

2024-02-01 Thread Panu Matilainen
That's a spec syntax issue, it doesn't matter for package format. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/2374#discussioncomment-8331847 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] Year 2038 plan for rpm (#1084)

2024-02-01 Thread Panu Matilainen
I recently fixed a couple of signed int time usages, the rest of the plan is here: https://github.com/rpm-software-management/rpm/issues/1229#issuecomment-1920724526 No point breaking compatibility to be 80+ years future compliant. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Year 2038 plan for rpm (#1084)

2024-02-01 Thread Panu Matilainen
Closed #1084 as completed. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/1084#event-11666047548 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Move all time related APIs to 64 bit (#1229)

2024-02-01 Thread Panu Matilainen
AFAICS we have precisely five relevant time-related APIs: - rpmfiFMtime() - rpmfilesFMtime() - rpmtsTid() - rpmtsSetTid() - pgpDigParamsCreationTime() Mtime and tid are stored in a uint32_t tag in the package as per RPM v3/v4 spec, former at build and latter at install-time. OpenPGP timestamps

Re: [Rpm-maint] [rpm-software-management/rpm] Is there available a macro with package name during processing `%files` section? (Discussion #2876)

2024-01-31 Thread Panu Matilainen
Yes, I get that you have repetitive sections. Like I've been telling you: script it (build scriptlets are shell scripts, you can have functions in there) or macroize it, with parameters to allow for the variety. The package name in macros would not be helpful here at all. -- Reply to this

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-01-31 Thread Panu Matilainen
Oh yup, sorry for leaving you hanging in the air here. Technically this looks pretty good (but yup, could use a test-case). What this needs now is us thinking it all through, taking other plans into consideration and see how the details fit in with those. Don't despair in the meanwhile

Re: [Rpm-maint] [rpm-software-management/rpm] Add a build option for enabling undefined behavior sanitizer, use for CI (PR #2881)

2024-01-31 Thread Panu Matilainen
Merged #2881 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2881#event-11652657021 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Add a build option for enabling undefined behavior sanitizer, use for CI (PR #2881)

2024-01-31 Thread Panu Matilainen
@pmatilai pushed 1 commit. 8b8f905d29b6bf92fd36f712ef55a59360353405 Fix an UB in expression code (when built without -fno-strict-overflow) -- View it on GitHub:

[Rpm-maint] [rpm-software-management/rpm] Add a build option for enabling undefined behavior sanitizer, use for CI (PR #2881)

2024-01-31 Thread Panu Matilainen
Similar to ASAN, now that we can this is a nice and cheap way to keep compiler gremlins at bay. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/2881 -- Commit Summary -- * Add a build option for enabling undefined behavior

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for address-sanitizer builds and enable on CI (PR #2879)

2024-01-31 Thread Panu Matilainen
Merged #2879 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2879#event-11652142792 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] support reproducible automatic rebuilds (PR #2880)

2024-01-30 Thread Panu Matilainen
> This seems to defeat the point. The point of this is to clamp the times to > the date stamp in the changelog. If you're doing automatic rebuilds, you > should not use that feature, full stop. :+1: It looks like an attempt to eat and keep the cake, and we all know how well that works. >

[Rpm-maint] [rpm-software-management/rpm] Add support for address-sanitizer builds and enable on CI (PR #2879)

2024-01-30 Thread Panu Matilainen
Details in commits, but in short - fix a bunch of leaks + other issues found by ASAN - add ENABLE_ASAN build-option to cmake, and enable it on CI going forward You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/2879 -- Commit

[Rpm-maint] [rpm-software-management/rpm] RPM 4.19.x bugfix release (Issue #2878)

2024-01-29 Thread Panu Matilainen
There are some pretty nasty bugs in 4.19.1 still, I think we should put out an expedited bugfix release to address at least these regressions: - https://github.com/rpm-software-management/rpm/pull/2843 - https://github.com/rpm-software-management/rpm/pull/2818 Other, less nasty stuff: -

Re: [Rpm-maint] [rpm-software-management/rpm] Noarch RPMs that contain EBPF binaries code incorrectly fail with "Arch dependent binaries in noarch package" (Issue #2875)

2024-01-26 Thread Panu Matilainen
Can you point me to such a specimen? Rpm doesn't know anything about EBPF, the warning/error is based on detecting ELF files which up to now have been pretty arch-specific. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Support building other projects as part of test image (Issue #2877)

2024-01-26 Thread Panu Matilainen
Yep, both rpm-sequoia and popt are something we'd occasionally want to build from sources instead of packaged versions. So this is actually fairly important piece, even if we have managed without it so far. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Safer handling of internal soname dependencies (Discussion #2872)

2024-01-26 Thread Panu Matilainen
One thing just for the record, up to now elfdeps has been path agnostic by design to match the dynamic linker: it doesn't matter where those libraries come from as long as they're in the runtime path. Of course it's not an "end user tool" but having consistent output regardless of the file

Re: [Rpm-maint] [rpm-software-management/rpm] Safer handling of internal soname dependencies (Discussion #2872)

2024-01-26 Thread Panu Matilainen
Actually, we'll need to have this path-discovery wrapped in some libc specific helper script in rpm because this eg musl has an entirely different library search path mechnism. That's fine though, for glibc we could implement our own ld.so.conf parser for the immediate use and then once the

Re: [Rpm-maint] [rpm-software-management/rpm] Safer handling of internal soname dependencies (Discussion #2872)

2024-01-26 Thread Panu Matilainen
Yeah elfdeps basically ignores all path-aspects, it only really handles DT_NEEDED and DT_SONAME. One thing here though: a manually added require/provide is not equal to one discovered by rpm, the latter are tracked on file-level and rpm actually uses this information. That's why I'm so

Re: [Rpm-maint] [rpm-software-management/rpm] Is there available a macro with package name during processing `%files` section? (Discussion #2876)

2024-01-25 Thread Panu Matilainen
> If there was some macro with package name, I think I could simplify this: > > %{gem_extdir_mri} > %dir %{gem_instdir} > %{gem_libdir} > %{gem_spec -d} If you declared these macros in terms including some %{name} then ... you'd have X number of such identical %files sections, now just even

Re: [Rpm-maint] [rpm-software-management/rpm] Safer handling of internal soname dependencies (Discussion #2872)

2024-01-25 Thread Panu Matilainen
Note that I'm specifically avoiding talking about filtering these dependencies out because I think in many cases its more useful to turn them into something else instead. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Safer handling of internal soname dependencies (Discussion #2872)

2024-01-25 Thread Panu Matilainen
Yes, that possible ld.so.conf fragment in the buildroot needs to be covered. But, I think the hosts ld.so.conf[.d] needs to be processed as well. The currently building package could be installing to a subdirectory that some other package (which would have to be a build-dependency) has declared

Re: [Rpm-maint] [rpm-software-management/rpm] Is there available a macro with package name during processing `%files` section? (Discussion #2876)

2024-01-25 Thread Panu Matilainen
No no. What I'm telling you is to script the file section generation. Something like ``` for n in psych mental; do cat << EOF > ${n}.txt %{ruby_libdir}/${n} %{ruby_libdir}/${n}.rb %{ruby_libarchdir}/${n}.so #... EOF done ``` ...and include from %files with -f. Or make that a spec local macro

Re: [Rpm-maint] [rpm-software-management/rpm] Is there available a macro with package name during processing `%files` section? (Discussion #2876)

2024-01-25 Thread Panu Matilainen
If you have lots of those with nothing but the name changing, no macros will help with that. Generate those files manifests programmatically from %install and include with %files -f. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Testsuite failure with rpm 4.18.2 (Issue #2874)

2024-01-25 Thread Panu Matilainen
:monocle_face: seems most appropriate here... -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2874#issuecomment-1910081323 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] Testsuite failure with rpm 4.18.2 (Issue #2874)

2024-01-25 Thread Panu Matilainen
So this is actually another bug fixed by a0553eb38a01772254cd48fef7ad116294cf801a -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2874#issuecomment-1910075031 You are receiving this because you are subscribed to this thread. Message

Re: [Rpm-maint] [rpm-software-management/rpm] Testsuite failure with rpm 4.18.2 (Issue #2874)

2024-01-25 Thread Panu Matilainen
Looking at `cpio -t` output is proving more helpful :smile: This from the Ubuntu-created file: > [pmatilai︎localhost tmp]$ cpio -tv < out |head -4 6 blocks drwx-- 1 root root0 Jun 28 2011 ./a/dir -r 1 root root 15 Jun 28 2011 ./a/file drwx--

Re: [Rpm-maint] [rpm-software-management/rpm] Testsuite failure with rpm 4.18.2 (Issue #2874)

2024-01-25 Thread Panu Matilainen
Okay, the headers are otherwise identical so it's the payload that has to differ then, and that payloaddigest changing throws everything else off too. And indeed, extracting the rpm2cpio output shows some differences (from `diff -u -a` output), eg: ```

Re: [Rpm-maint] [rpm-software-management/rpm] Safer handling of internal soname dependencies (Discussion #2872)

2024-01-25 Thread Panu Matilainen
The above *almost* works. It's just that the ld.so.conf from Fedora causes an "ldconfig: need absolute file name for configuration file when using -r" error from ldconfig. Had me scratching hair for a bit because I thought it ws complaining about the path I was passing in -f which *was*

Re: [Rpm-maint] [rpm-software-management/rpm] Testsuite failure with rpm 4.18.2 (Issue #2874)

2024-01-25 Thread Panu Matilainen
4.18.2 would be missing at least this: 7ec148c1d61e0b526ae5c917f0ddc2b4a3222146 which could affect it. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2874#issuecomment-1909841982 You are receiving this because you are subscribed to

Re: [Rpm-maint] [rpm-software-management/rpm] Testsuite failure with rpm 4.18.2 (Issue #2874)

2024-01-25 Thread Panu Matilainen
I remember a case or two where the checksums mismatch due to different libmagic versions producing different strings. I also remember tweaking the test to avoid relying on libmagic stuff there, but don't remember when exactly. But yes, it's fragile. Very. -- Reply to this email directly or

Re: [Rpm-maint] [rpm-software-management/rpm] Testsuite failure with rpm 4.18.2 (Issue #2874)

2024-01-25 Thread Panu Matilainen
If guessing and trying fails, 'runroot rpm -qp --xml /build/RPMS/noarch/attrtest-1.0-1.noarch.rpm' is your friend, one can then diff the output of that between working and non-working files. We should probably dump that output anyway to make it more debuggable. -- Reply to this email directly

Re: [Rpm-maint] [rpm-software-management/rpm] Safer handling of internal soname dependencies (Discussion #2872)

2024-01-25 Thread Panu Matilainen
Yes, a clean way to discover the system library paths searched by the dynamic loader would go a long way. Hmm. I guess this is kinda doable by running `ldconfig -r ` followed by `ldconfig -r -p` from which you can pull the directories (so effectively the path) or the files themselves. Just do

Re: [Rpm-maint] [rpm-software-management/rpm] Split Perl dependency generators into a separate repo (Issue #2873)

2024-01-24 Thread Panu Matilainen
FWIW, I think we should follow the [Python lead](https://github.com/rpm-software-management/python-rpm-packaging) and call it perl-rpm-packaging to allow for all sorts of helper material to live there and not just macros/scripts and the like. A bit of consistency is a nice bonus. -- Reply to

Re: [Rpm-maint] [rpm-software-management/rpm] add build directory auto path to %autosetup step (PR #2859)

2024-01-24 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -78,16 +84,81 @@ static char *doUncompress(const char *fn) return cmd; } +/** + * Detect if an archive has a single top level entry, and it's a directory. + * + * @param path path of the archive + * @return 1 if archive as only a

Re: [Rpm-maint] [rpm-software-management/rpm] Check date/time for consistently using unsigned ints (#1228)

2024-01-24 Thread Panu Matilainen
Static checking in RHEL discovered exactly one place where we still had time_t conversion to signed integers: getBuildTime(). Fixed that in https://github.com/rpm-software-management/rpm/commit/97aa64d8281974fb369c66d5aef8650515b89c52, I think we can consider this done now. -- Reply to this

Re: [Rpm-maint] [rpm-software-management/rpm] Check date/time for consistently using unsigned ints (#1228)

2024-01-24 Thread Panu Matilainen
Closed #1228 as completed via 97aa64d8281974fb369c66d5aef8650515b89c52. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/1228#event-11582158266 You are receiving this because you are subscribed to this thread. Message ID:

[Rpm-maint] [rpm-software-management/rpm] Safer handling of internal soname dependencies (Discussion #2872)

2024-01-24 Thread Panu Matilainen
This is one of those topics that gets raised semi-annually at least. To point out a couple, https://bugzilla.redhat.com/show_bug.cgi?id=2259260 and https://bugzilla.redhat.com/show_bug.cgi?id=1464368 and https://github.com/rpm-software-management/rpm/issues/1227 but there are certainly more

Re: [Rpm-maint] [rpm-software-management/rpm] Don't use _nl_msg_cat_cntr if __GLIC__ is not defined (PR #2856)

2024-01-23 Thread Panu Matilainen
Thanks for the patch! -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2856#issuecomment-1905777264 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Don't use _nl_msg_cat_cntr if __GLIC__ is not defined (PR #2856)

2024-01-23 Thread Panu Matilainen
Merged #2856 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2856#event-11568363991 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Update format documentation in the manual (PR #2835)

2024-01-23 Thread Panu Matilainen
I'm not actually finished with this, but I do have a local backup anyway, closing is okay. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2835#issuecomment-1905561075 You are receiving this because you are subscribed to this thread.

Re: [Rpm-maint] [rpm-software-management/rpm] Don't use _nl_msg_cat_cntr if __GLIC__ is not defined (PR #2856)

2024-01-23 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -532,7 +532,7 @@ static int filerequireTag(Header h, rpmtd td, > headerGetFlags hgflags) /* I18N look aside diversions */ -#if defined(ENABLE_NLS) +#if defined(ENABLE_NLS) && (defined(__GLIBC__) || !defined(__linux__)) AFAICS this isn't

Re: [Rpm-maint] [rpm-software-management/rpm] Pass arg1 to file trigger scripts (PR #2871)

2024-01-23 Thread Panu Matilainen
I'm glad this ended up on your plate, I never found the patience to sort this out :smile: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2871#issuecomment-1905533378 You are receiving this because you are subscribed to this thread.

Re: [Rpm-maint] [rpm-software-management/rpm] Pass arg1 to file trigger scripts (PR #2871)

2024-01-23 Thread Panu Matilainen
Merged #2871 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2871#event-11566516191 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

<    3   4   5   6   7   8   9   10   11   12   >