[Rpm-maint] [rpm] Add lua function posix.close (#44)

2016-01-14 Thread Zbigniew Jędrzejewski-Szmek
This is useful to silence output in forked programs: https://bugzilla.redhat.com/show_bug.cgi?id=1287918 Tested with the following scriptlet: ``` %post -p pid = posix.fork() if pid == 0 then assert(posix.exec("/bin/sed")) elseif pid > 0 then posix.wait(pid) end pid = posix.fork() if pid

[Rpm-maint] [rpm] Fix option parsing in pythondistdeps (#62)

2016-03-02 Thread Zbigniew Jędrzejewski-Szmek
Followup for d636ab1. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/62 -- Commit Summary -- * Fix option parsing in pythondistdeps -- File Changes -- M scripts/pythondistdeps.py (2) -- Patch Links --

Re: [Rpm-maint] [rpm-software-management/rpm] macros: make unversioned python macros not expand to empty (#469)

2018-08-06 Thread Zbigniew Jędrzejewski-Szmek
Sure, an option for "default" syntax or something like that would be nice. Those macros could then be adapted to use this syntax. I still think this is a good temporary fix, since the expansion of those macros to empty is causing quite a few hard-to-diagnose problems in rawhide. -- You are

[Rpm-maint] [rpm-software-management/rpm] Skip showing empty Relocations line in rpm -qi (#532)

2018-08-23 Thread Zbigniew Jędrzejewski-Szmek
Almost nobody uses them, so the "Relocations : (not relocatable)" line is a waste of screen estate. Just output the line if there's something interesting to show. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/532 -- Commit

Re: [Rpm-maint] [rpm-software-management/rpm] Skip showing empty Relocations line in rpm -qi (#532)

2018-08-23 Thread Zbigniew Jędrzejewski-Szmek
Various other tags (Bugurl, etc) are shown conditionally, so I don't see why this should not be. I'd love to see the same change for Group, but afaics, current syntax does not allow conditional expansion based on value. -- You are receiving this because you are subscribed to this thread.

[Rpm-maint] [rpm-software-management/rpm] macros: make unversioned python macros not expand to empty (#469)

2018-07-17 Thread Zbigniew Jędrzejewski-Szmek
In Fedora the removal of /usr/bin/python in favour of explicit /usr/bin/python2 and /usr/bin/python3 is happening now. Unless python-unversioned-command.rpm is installed, /usr/bin/python does not exists. This means that packages use %python_{sitelib,sitearch,version}, they get a warning in the

Re: [Rpm-maint] [rpm-software-management/rpm] fileattrs: Tighten pythondist path regex for metadata (RhBug:1618949) (#562)

2018-10-02 Thread Zbigniew Jędrzejewski-Szmek
keszybz requested changes on this pull request. > @@ -1,4 +1,4 @@ %__python_provides %{_rpmconfigdir}/pythondeps.sh --provides %__python_requires %{_rpmconfigdir}/pythondeps.sh --requires -%__python_path

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for sorting caret ('^') higher than base version (#597)

2018-11-18 Thread Zbigniew Jędrzejewski-Szmek
keszybz commented on this pull request. Nice! > @@ -45,6 +45,20 @@ int rpmvercmp(const char * a, const char * b) continue; } + /* +* Handle caret separator. Concept is same as tilde, except if one of +* strings ends (base version), another considered

Re: [Rpm-maint] [rpm-software-management/rpm] WIP: RFC: Buildsystem overhaul (meson) (#1209)

2020-05-08 Thread Zbigniew Jędrzejewski-Szmek
I think switching to a better build system is a worthwhile goal. Every switch to meson that I have seen has worked out well and was definitely worth the work. Apart from the speed and number-of-lines benefits that Igor listed, there are less tangible but important benefits that come from a

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: %{_system_bindir} and such macro (#721)

2020-09-24 Thread Zbigniew Jędrzejewski-Szmek
An alternative approach: let's accept the fact that %_bindir=/usr/bin is here to stay. Using a macro for "system binaries directory" is a legacy of old times and we can just as well use the fixed path of "/usr/bin" for that everywhere. (Using a macro for "where should I install my binaries",

Re: [Rpm-maint] [rpm-software-management/rpm] Add OrderWithRequires dependency generation (#1257)

2020-06-07 Thread Zbigniew Jędrzejewski-Szmek
> it is only some specific cases where this needs to be used. Yeah, we used to pull in systemd much more often. Nowadays, most packages should not pull in systemd, and install time ordering also doesn't matter. But that's largely irrelevant here, since systemd was only used as an example here.

Re: [Rpm-maint] [rpm-software-management/rpm] Add OrderWithRequires dependency generation (#1257)

2020-06-08 Thread Zbigniew Jędrzejewski-Szmek
> But why? If a package contains a config is /usr/lib/sysusers.d/, why not to > ensure that it is installed after systemd-sysusers binary is present and so > the scriptlet which creates users can be executed? Yes, in that case the dependency is warranted. > If there is just a scriptlet which

Re: [Rpm-maint] [rpm-software-management/rpm] Add deprecated %apply_patch, provide an alternative (#1668)

2021-05-05 Thread Zbigniew Jędrzejewski-Szmek
FWIW, I think that deprecation+eventual removal is the way to go in this case. If the macro was exposed, but not *actually used*, it'd be OK to quickly yank it out. But clearly it is in use, and we know that the removal breaks packages that are out there. I appreciate the desire to make a clean

Re: [Rpm-maint] [rpm-software-management/rpm] Clarify %check script use-case by executing it before %install (#1618)

2021-04-07 Thread Zbigniew Jędrzejewski-Szmek
> Would it make sense to change `%check` as the PR here does, and at the same > time also add a `%check_buildroot` or something that's the equivalent of the > current `%check` and runs after `%install`? IMHO, no. Rpm is not just the handful of packages in Fedora dist-git. It's also suse and

Re: [Rpm-maint] [rpm-software-management/rpm] Clarify %check script use-case by executing it before %install (#1618)

2021-04-07 Thread Zbigniew Jędrzejewski-Szmek
> Most packages execute their %check in the build directory, following the > spirit of autotools "make check" target. Quotation needed. Who uses autotools these days anyway? Many many packages go to a big effort to test files from the %buildroot. This change would significantly break

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: allow clamping username and permissions for source RPMs (Issue #2604)

2023-09-14 Thread Zbigniew Jędrzejewski-Szmek
> it would be useful to clamp the ownership of the files to root:root--though > this will necessitate ensuring that the applications which work with RPM > input/output respect this clamping and change the permissions if a user > extracts or installs it. (Namely, we don't want a user to install

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: allow overriding buildtime and hostname via environment variable (Issue #2603)

2023-10-25 Thread Zbigniew Jędrzejewski-Szmek
Yeah, it seems that `%_buildhost` might be enough. I'm just starting to work on this again, so I didn't have time to figure out the details. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2603#issuecomment-1779525256 You are receiving

[Rpm-maint] [rpm-software-management/rpm] Native sysusers support is missing dependencies (Issue #2697)

2023-10-04 Thread Zbigniew Jędrzejewski-Szmek
Please correct me if I got something wrong. My understanding is the following: - rpmbuild will generate `Provides: user(foo) = ` and `Provides: group(foo) = ` (??, see below) for packages which have sysusers.d files - rpmbuild will generate `Requires: {user,group}(foo)` or `Recommends:

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for generating buildinfo file as subpackage (#1532)

2022-11-27 Thread Zbigniew Jędrzejewski-Szmek
@keszybz commented on this pull request. > + +printf 'Installed-Build-Depends:\n' >> "$BUILDINFO" +rpm -qa --queryformat '%{epoch}:%{name}-%{version}-%{release}.%{arch}\n' \ +| LC_ALL=C sort -t: -k2 \ +| sed -e 's/^(none)://; /\.(none)$/d; s/^/ /' >> "$BUILDINFO" + +printf

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for generating buildinfo file as subpackage (#1532)

2022-11-27 Thread Zbigniew Jędrzejewski-Szmek
@keszybz commented on this pull request. > +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY > RIGHTS. IN +# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +# OTHERWISE,

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for generating buildinfo file as subpackage (#1532)

2022-11-27 Thread Zbigniew Jędrzejewski-Szmek
@keszybz commented on this pull request. > +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY > RIGHTS. IN +# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +# OTHERWISE,

Re: [Rpm-maint] [rpm-software-management/rpm] Enhance requires with version information from the build root. (PR #2372)

2023-01-29 Thread Zbigniew Jędrzejewski-Szmek
A different approach, which wouldn't require calling into `rpm` and dealing with multiple rpms, would be to: 1. change the existing Provides generator for SONAME to use a version: `libcurl.so.4()(64bit)` → `libcurl.so.4()(64bit) = 4.8.0`. I think this would be backwards compatible: because the

Re: [Rpm-maint] [rpm-software-management/rpm] Enhance requires with version information from the build root. (PR #2372)

2023-01-29 Thread Zbigniew Jędrzejewski-Szmek
@keszybz commented on this pull request. > @@ -0,0 +1,15 @@ +#!/bin/sh + +version_deps () { + while read dep + do + if [[ "${dep}" =~ ^[^\(]*\(\) ]] && rpm -q --whatprovides "${dep}" &> /dev/null + then + printf "($dep with %s)\n"

Re: [Rpm-maint] [rpm-software-management/rpm] Enhance requires with version information from the build root. (PR #2372)

2023-01-29 Thread Zbigniew Jędrzejewski-Szmek
Oh, one more caveat: if the shared library uses symbol versioning, exclude it from the new generator. This is important because of at least one important package: `glibc`. Without this, every build would depend on the latest version of `glibc`. `glibc` spends a lot of effort making sure that

Re: [Rpm-maint] [rpm-software-management/rpm] rpm should not use short gpg key ids in messages (Issue #2403)

2023-03-05 Thread Zbigniew Jędrzejewski-Szmek
What "config management tools" are that? Maybe they need to be warned that the output will change and then the output in rpm adjusted after a while. Short gpg ids are widely known to be a bad idea at least since 2011 [1]. Is the idea to set every mistake that was ever made in stone? [1]

[Rpm-maint] [rpm-software-management/rpm] rpm should not use short gpg key ids in messages (Issue #2403)

2023-03-01 Thread Zbigniew Jędrzejewski-Szmek
Copied over from https://bugzilla.redhat.com/show_bug.cgi?id=2174373: Description of problem: (Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=2170878.) Short gpg key ids are easy to spoof and generally should not be used [e.g. 1]. rpm prints them in various messages: ``` warning:

Re: [Rpm-maint] [rpm-software-management/rpm] rpm should not use short gpg key ids in messages (Issue #2403)

2023-03-01 Thread Zbigniew Jędrzejewski-Szmek
Well, anything which parses this output and makes use of it is broken. I shouldn't be using short ids for *anything*, particularly not in a script. So I think it's entirely reasonable to just change the output. Also, I'm not sure if too many things would break. I'd expect that even sloppy

Re: [Rpm-maint] [rpm-software-management/rpm] Rpm chroot operations use user/group info from the host (#882)

2023-04-12 Thread Zbigniew Jędrzejewski-Szmek
> Yup. Perhaps the bigger question is, should rpm _always_ use just the local > passwd/group files? Yes, nothing else is useful. > I'm not sure if rpm needs to take into account nsswitch. I don't think so. Firstly, it's not well defined what that would even mean. The host's nsswitch is

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-25 Thread Zbigniew Jędrzejewski-Szmek
@keszybz commented on this pull request. > + if [ "-" = "$fn" ]; then + parse <&0 + else + [ -r "$fn" ] || continue + parse <"$fn" Indentation is strange, also in other places. > +[ -e "$ROOT"/etc/passwd ] || touch "$ROOT"/etc/passwd +[ -e

[Rpm-maint] [rpm-software-management/rpm] RFE: allow overriding buildtime and hostname via environment variable (Issue #2603)

2023-08-04 Thread Zbigniew Jędrzejewski-Szmek
`rpm` embeds the build time and host into output headers. This is very useful to figure out when and where the build was done. But when trying to trying to reproduce an earlier rpm build, we want to override those to the value that was used in the previous build. Please add something like

Re: [Rpm-maint] [rpm-software-management/rpm] Make rpm rebuilds more reproducible (Issue #2590)

2023-08-04 Thread Zbigniew Jędrzejewski-Szmek
Hi Simon, To achieve build reproducibility, you must have the same versions of dependencies. In particular, the compiler, linker, and compressors, python if you write .pyc files, but also various helper programs that process documentation files, etc. So generally the only feasible approach is

Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild: default to LANG=C.utf8 ? (Issue #2587)

2023-08-04 Thread Zbigniew Jędrzejewski-Szmek
Please default to `C.UTF-8`, this is generally correct setting. An option can be provided to override for the fringe cases that need it. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2587#issuecomment-1665577795 You are receiving

Re: [Rpm-maint] [rpm-software-management/rpm] Make rpm rebuilds more reproducible (Issue #2590)

2023-08-04 Thread Zbigniew Jędrzejewski-Szmek
Maybe I misunderstood what you mean by "reproducible". I meant exact reproducibility in the sense of https://reproducible-builds.org/. If you just want to "roughly recreate" a build, then what you say is applicable. I would suggest retitling the issue to something like "Record macros defined

Re: [Rpm-maint] [rpm-software-management/rpm] Make rpm builds more reproducible (Issue #2590)

2023-08-07 Thread Zbigniew Jędrzejewski-Szmek
> I'm also aware that if you run `rpmbuild -bs .spec` there's no binary > build process going on so I'd guess it's quite possible that macro > definitions and installed package lists may not actually be useful. However, > if you build source and binary packages together, which I'd assume is

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: allow overriding buildtime and hostname via environment variable (Issue #2603)

2023-08-07 Thread Zbigniew Jędrzejewski-Szmek
> As far as BUILDHOST goes, rather than using a default value, it would be > better to just disinclude the tag IMO. That is certainly an option. But people consider both BUILDTIME and BUILDHOST very useful for figuring out where/when/who exactly build a package. For example, even in Fedora

Re: [Rpm-maint] [rpm-software-management/rpm] Source RPMs should have ARCH set to src (Issue #2601)

2023-08-07 Thread Zbigniew Jędrzejewski-Szmek
Please reconsider. The current behaviour is just not useful. The tooling that relies on this, if any, should be adjusted. This part of behaviour is not useful, and in fact we go to large efforts to work around it, for example by buiding srpms on all architectures and checking that they are

Re: [Rpm-maint] [rpm-software-management/rpm] Source RPMs should have ARCH set to src (Issue #2601)

2023-08-08 Thread Zbigniew Jędrzejewski-Szmek
Actually, srpm are *almost* arch-independent. I know of two issues: the ARCH tag, and BuildRequires. But Fedora packaging guidelines actually forbid archful BuildRequires (https://docs.fedoraproject.org/en-US/packaging-guidelines/#_buildrequires_and_isa, "SRPMs need to be architecture

Re: [Rpm-maint] [rpm-software-management/rpm] Source RPMs should have ARCH set to src (Issue #2601)

2023-08-08 Thread Zbigniew Jędrzejewski-Szmek
> You can do many nasty things with %ifarch, e.g. not include some patch on an > architecture. (But is is probably against the packaging guidelines of any > distribution.) Exactly. You *could* do this, but it doesn't make sense. Fedora packaging guidelines strongly forbid this, and probably so

Re: [Rpm-maint] [rpm-software-management/rpm] Source RPMs should have ARCH set to src (Issue #2601)

2023-08-09 Thread Zbigniew Jędrzejewski-Szmek
> One could imagine a "bare source rpm" format that basically only carries the > name, version and release and the source file metadata in its header OK, can we do this and then switch the Fedora ecosystem to this? -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Never use current user info or file ownership during build (PR #2797)

2023-12-05 Thread Zbigniew Jędrzejewski-Szmek
Beautiful! -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2797#issuecomment-1840394162 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: %{_system_bindir} and such macro (#721)

2023-11-14 Thread Zbigniew Jędrzejewski-Szmek
> Save the packagers some typing I generally agree with the rest of the discussion, but I want to reply to this point in particular: I very much disagree that those macros make things easier. Typing `/usr/bin` is not any harder than typing `%{_bindir}`. The original form is shorter and also

[Rpm-maint] [rpm-software-management/rpm] Set git commit dates based on $SOURCE_DATE_EPOCH (PR #2930)

2024-02-23 Thread Zbigniew Jędrzejewski-Szmek
When %autosetup -S git is used, a bunch of git commits are created. Without an override, their metadata will include the current time. Many projects include the git hash of HEAD in the build information, which means that the build result is not reproducible. Since were creating a scratch repo

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

2024-02-27 Thread Zbigniew Jędrzejewski-Szmek
I read this proposal when the ticket was initially created, and I didn't find it convincing, and now, a few weeks later, I still don't. This is a very complex solution to a very specific problem. It is very narrowly tailored to the specific details of the build system and package delivery

Re: [Rpm-maint] [rpm-software-management/rpm] Set git commit dates based on $SOURCE_DATE_EPOCH (PR #2930)

2024-02-26 Thread Zbigniew Jędrzejewski-Szmek
Another case which becomes reproducible with this patch: podman, and presumably any go package. Go builds include `vcs.revision=…` `vcs.time=…` somewhere in binary file metadata and with this patch (plus a few others to remove intentional randomness), `podman-5.0.0~rc3-3.fc41.x86_64.rpm`

Re: [Rpm-maint] [rpm-software-management/rpm] Set git commit dates based on $SOURCE_DATE_EPOCH (PR #2930)

2024-02-27 Thread Zbigniew Jędrzejewski-Szmek
> I'd rather use rpm's buildtime here buildtime is not clamped? We had a discussion about this in https://github.com/rpm-software-management/rpm/issues/2603 and it was explicitly rejected. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Expose build time to package build scriptlets via $RPM_BUILD_TIME (PR #2933)

2024-02-27 Thread Zbigniew Jędrzejewski-Szmek
@keszybz commented on this pull request. LGTM too. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2933#pullrequestreview-1903483241 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] Set git commit dates based on $SOURCE_DATE_EPOCH (PR #2930)

2024-02-27 Thread Zbigniew Jędrzejewski-Szmek
I changed the patch to use $RPM_BUILD_TIME as fallback, as suggested by Neal. But I think $SOURCE_DATE_EPOCH must remain the primary source for this. When it is set, then we set various mtimes and other stuff to it, and it would be very strange to use something different for the repo commits.

Re: [Rpm-maint] [rpm-software-management/rpm] Set git commit dates based on $SOURCE_DATE_EPOCH (PR #2930)

2024-02-27 Thread Zbigniew Jędrzejewski-Szmek
@keszybz pushed 1 commit. 1fac2eab0fd823817b52b53891f27d6cf2aacf43 Set git commit dates based on $SOURCE_DATE_EPOCH or $RPM_BUILD_TIME -- View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Expose build time to package build scriptlets via $RPM_BUILD_TIME (PR #2933)

2024-02-27 Thread Zbigniew Jędrzejewski-Szmek
@keszybz commented on this pull request. > @@ -476,6 +476,25 @@ If the main section exists, it must come first to avoid > ambiguity. Otherwise, append and prepend can be used in any order and multiple times, even if the corresponding main section does not exist. +During the execution of

Re: [Rpm-maint] [rpm-software-management/rpm] Reproducible builds improvements (Discussion #2934)

2024-02-28 Thread Zbigniew Jędrzejewski-Szmek
"Implementation detail". The important part is to get the payload and significant metadata to be identical. Once we have that, we can do optimizations to handle comparisons efficiently. One option is to strip fields and hash that. Another option, for example, would be to define a hash method

Re: [Rpm-maint] [rpm-software-management/rpm] Reproducible builds improvements (Discussion #2934)

2024-02-28 Thread Zbigniew Jędrzejewski-Szmek
If we could drop OPTFLAGS, that'd be great. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/2934#discussioncomment-8623707 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] Reproducible builds improvements (Discussion #2934)

2024-03-01 Thread Zbigniew Jędrzejewski-Szmek
I think the signature must give the real date of when the signature was actually made. Setting a fake date would be very very icky, undermining the trust in the signing process and the holders of the signing key used in such a manner. At the more technical level, keys have a creation time, e.g.

Re: [Rpm-maint] [rpm-software-management/rpm] Set git commit dates based on $SOURCE_DATE_EPOCH (PR #2930)

2024-03-01 Thread Zbigniew Jędrzejewski-Szmek
> > A signed rpm build can never be "reproducible" according to their current > > definition. > > Theoretically you could just ensure that the RPM signature uses the same > `SOURCE_DATE_EPOCH` timestamp rather than the current time I generally assume that the private key used for signing is

Re: [Rpm-maint] [rpm-software-management/rpm] Reproducible builds improvements (Discussion #2934)

2024-03-01 Thread Zbigniew Jędrzejewski-Szmek
Yes, I think both are worthwhile. But they must be opt-in. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/2934#discussioncomment-8643884 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] Set git commit dates based on $SOURCE_DATE_EPOCH (PR #2930)

2024-03-01 Thread Zbigniew Jędrzejewski-Szmek
> @DemiMarie suggested a while back that if the non-signature aspects of the > package are reproducible, then you can combine the signature of the original > package with rebuilt package, and _that_ should be able to reproduce the > package. Yes, in principle you could. But it still wouldn't

Re: [Rpm-maint] [rpm-software-management/rpm] Set git commit dates based on $SOURCE_DATE_EPOCH (PR #2930)

2024-03-01 Thread Zbigniew Jędrzejewski-Szmek
> Oh, wouldn't we need these fixups for all the VCS backends, not just Git? Theoretically, yes. In practice, nobody cares. I have never seen any of the other macros used. Once we have a version that is acceptable, I'd be happy to submit a follow-up that extends the same logic to other systems,

Re: [Rpm-maint] [rpm-software-management/rpm] Expose build time to package build scriptlets via $RPM_BUILD_TIME (PR #2933)

2024-02-27 Thread Zbigniew Jędrzejewski-Szmek
 -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2933#issuecomment-1967314022 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Reproducible builds improvements (Issue #2894)

2024-02-27 Thread Zbigniew Jędrzejewski-Szmek
> a coherent (re)design for reproducible builds, where you basically just flick > it on and be done with it I agree that the current set of options is a bit ad-hoc. But I think it's completely unrealistic to achieve a single switch, because different build systems and ways of managing the

Re: [Rpm-maint] [rpm-software-management/rpm] Set git commit dates based on $SOURCE_DATE_EPOCH (PR #2930)

2024-02-27 Thread Zbigniew Jędrzejewski-Szmek
I wrote a longer reply in https://github.com/rpm-software-management/rpm/issues/2894… But even ignoring the discussion there, I think SOURCE_DATE_EPOCH is **exactly** the field that should be used here. That variable says when the sources were last modified, so if we do a fake commit when

Re: [Rpm-maint] [rpm-software-management/rpm] Set git commit dates based on $SOURCE_DATE_EPOCH (PR #2930)

2024-02-28 Thread Zbigniew Jędrzejewski-Szmek
That spec was written by Debian maintainers and it's heavily slanted towards some Debian concepts and needs some adaptation to the rpm world. In particular, their definitions are incompatible with embedded signatures. A signed rpm build can never be "reproducible" according to their current

Re: [Rpm-maint] [rpm-software-management/rpm] Reproducible builds improvements (Discussion #2934)

2024-02-28 Thread Zbigniew Jędrzejewski-Szmek
> Wait, what? If those differ then the packages do differ, so its not actually > bit-per-bit identical. Which is what _I've_ assumed reproducability to mean. > This just goes to point out how completely different expectations people > have. No wonder having a meaningful discussion about

Re: [Rpm-maint] [rpm-software-management/rpm] Set git commit dates based on $SOURCE_DATE_EPOCH (PR #2930)

2024-03-04 Thread Zbigniew Jędrzejewski-Szmek
Cool, thanks. We'll give this a go in Fedora as soon as it becomes available by doing some rebuilds of official koji builds. I hope it works as expected, and if not, we can always adjust. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Reproducible builds improvements (Discussion #2934)

2024-02-29 Thread Zbigniew Jędrzejewski-Szmek
I don't think that a custom "rpmhash" tool is the problem. We have to "trust" the tools anyway… A tool that deletes signatures is as much an opaque binary as the tool that calculates some hash. I think it would a reasonable compromise to say that the hypothetical "rpmhash" tool must give a

Re: [Rpm-maint] [rpm-software-management/rpm] Make rpm builds more reproducible (Discussion #2654)

2024-03-08 Thread Zbigniew Jędrzejewski-Szmek
Yeah, I think that `SPEC` tag may actually be quite useful for rebuilds. There are at least two problematic variables in the spec file: the full build paths, e.g. `cd '/builddir/build/BUILD'`. But if the build is done in mock, the path is always the same, so this doesn't cause a problem. A

[Rpm-maint] [rpm-software-management/rpm] docs: mention systemd-standalone-sysusers (PR #2953)

2024-03-08 Thread Zbigniew Jędrzejewski-Szmek
Also fix some typos and add punctuation. Follow-up for 44afd5b49c5375dee1892845c2ee873425728138. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/2953 -- Commit Summary -- * docs: mention systemd-standalone-sysusers --

Re: [Rpm-maint] [rpm-software-management/rpm] Make rpm builds more reproducible (Discussion #2654)

2024-03-08 Thread Zbigniew Jędrzejewski-Szmek
Ah, OK, thanks for the clarification. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/2654#discussioncomment-8721879 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] Make rpm builds more reproducible (Discussion #2654)

2024-03-08 Thread Zbigniew Jędrzejewski-Szmek
Ideally, the NEVRA would indicate the vendor via the `%_dist` suffix. Fedora, ELN, RHEL, SuSE mostly use unique suffixes. Of course this doesn't help when derivates rebuild using the same suffix. But I think with this, we're getting into the territory of SBOMs. Any reasonable SBOM should be

[Rpm-maint] [rpm-software-management/rpm] rpm-uncompress uses local timezone for zip files (Issue #2955)

2024-03-10 Thread Zbigniew Jędrzejewski-Szmek
According to Wikipedia, > The ZIP format has no notion of time zone, so timestamps are only meaningful > if it is known what time zone they were created in. rpm-uncompress uses the current (local) time zone, leading to irreproducibility in builds. ```console $ fedpkg clone xz-java && cd

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for setting the build time and clamping to the build time (PR #2944)

2024-03-05 Thread Zbigniew Jędrzejewski-Szmek
@keszybz commented on this pull request. > @@ -245,6 +245,10 @@ Supplements: (%{name} = %{version}-%{release} and > langpacks-%{1})\ # Is ignored when SOURCE_DATE_EPOCH is not set. %clamp_mtime_to_source_date_epoch 0 +# If true, make sure that timestamps in built rpms +#

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

2024-03-06 Thread Zbigniew Jędrzejewski-Szmek
> I don't think bumping the changelog for rebuilds is actually important, but I > do think that this is still the wrong way to solve it, because we're > presuming that _a rebuild is important_. When rebuilds happen every day for > whatever reason due to dependency churn, they are no longer

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for setting the build time and clamping to the build time (PR #2944)

2024-03-22 Thread Zbigniew Jędrzejewski-Szmek
I think proposal 2 is more extensible. With proposal 1 we assume that no policy except clamping would be wanted, but people are clearly interested in other approaches. So I'd go with 2., even if initially there are no plans to provide non-clamping choices. -- Reply to this email directly or

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for setting the build time and clamping to the build time (PR #2944)

2024-03-28 Thread Zbigniew Jędrzejewski-Szmek
@keszybz commented on this pull request. Looks nice. > @@ -240,10 +240,12 @@ Supplements: (%{name} = %{version}-%{release} and > langpacks-%{1})\ # Is ignored when SOURCE_DATE_EPOCH is not set. %use_source_date_epoch_as_buildtime 0 -# If true, make sure that timestamps in built

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: ensure unwritable buildroot during %check (Issue #3010)

2024-04-02 Thread Zbigniew Jędrzejewski-Szmek
An idea was floated on fedora-devel to remove tests from packages altogether. I empathetically disagree with that, but maybe it'd be useful to "sandbox" the tests a bit. The test code is often of lesser quality and less reviewed. The basic idea is to make sure that the `%check` section

Re: [Rpm-maint] [rpm-software-management/rpm] Make rpm builds more reproducible (Discussion #2654)

2024-04-09 Thread Zbigniew Jędrzejewski-Szmek
> For rolling distributions were no consistent snapshot is used for building > there is the need for an archive of all previous builds and a tool that > selects the correct versions from the archive as the buildinfo says. How is this handled in Debian? I know that they report certain

[Rpm-maint] [rpm-software-management/rpm] crash in %filetrigger in scriptlet (Issue #3029)

2024-04-10 Thread Zbigniew Jędrzejewski-Szmek
I'm trying to add a scriptlet to filesystem.rpm, and rpm fails like this: ```console $ sudo rpm --root=/var/tmp/inst3 --reinstall x86_64/filesystem-3.18-8.fc41.x86_64.rpm ... filetriggerin table: 0x55b04c8b4590 will return PANIC: unprotected error in call to Lua API (attempt to index a number

Re: [Rpm-maint] [rpm-software-management/rpm] crash in %filetrigger in scriptlet (Issue #3029)

2024-04-10 Thread Zbigniew Jędrzejewski-Szmek
Thank you for the quick response. I can confirm that when `return 0` is removed, things seems to work again. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3029#issuecomment-2047559681 You are receiving this because you are subscribed

Re: [Rpm-maint] [rpm-software-management/rpm] debuginfo generation does not work with --build-in-place (Issue #3042)

2024-04-16 Thread Zbigniew Jędrzejewski-Szmek
Actually, this is probably not the right tracker for this bug. The problematic definition is from https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/macros#_302, so maybe it'd be better to file a bug against the package. -- Reply to this email directly or view it on GitHub:

[Rpm-maint] [rpm-software-management/rpm] %transfiletriggerpostun is not executed (Issue #3048)

2024-04-18 Thread Zbigniew Jędrzejewski-Szmek
I have a package with the a few file triggers: ```console $ rpm -q --filetriggers filesystem|grep -w using -A1 filetriggerin scriptlet (using ) -- /usr/bin print('FILETRIGGERIN start') -- filetriggerpostun scriptlet (using ) -- /usr/bin print('FILETRIGGERPOSTUN /usr/bin start') --

Re: [Rpm-maint] [rpm-software-management/rpm] %transfiletriggerpostun is not executed (Issue #3048)

2024-04-18 Thread Zbigniew Jędrzejewski-Szmek
Hmm, maybe this only happens if `--reinstall` is used? -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3048#issuecomment-2064164044 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: support isolation between %prep/%build/%install/%check (Issue #3050)

2024-04-19 Thread Zbigniew Jędrzejewski-Szmek
> %install should run with a read-only build directory I don't think this is going to work. E.g. autotoolz-based systems (something in the autotools, automake, libconf stack) do final preparation steps in the install target. I think this is inelegant, but not really "wrong". Old meson versions

Re: [Rpm-maint] [rpm-software-management/rpm] debuginfo generation does not work with --build-in-place (Issue #3042)

2024-04-24 Thread Zbigniew Jędrzejewski-Szmek
> Only with --short-circuit we "poison" the produced packages to prevent people > from distributing them (accidentally or otherwise). It is a misfeature. It means that the produced packages cannot be compared and tested properly. In particular, `--short-circuit` is very often used to test