Bug 1851238 - Weird behavior if %_disable_source_fetch is undefined
Summary: Weird behavior if %_disable_source_fetch is undefined
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-25 20:57 UTC by Pavel Raiskup
Modified: 2021-11-30 16:17 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-11-30 16:17:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pavel Raiskup 2020-06-25 20:57:39 UTC
Consider specfile doing `%undefine _disable_source_fetch`.  When no
special tweaks are done, rpm downloads the sources automatically.  This
is IMO wrong default when specfile undefines the _disable_source_fetch.

When we _also_ set `%_disable_source_fetch 0` in ~/.rpmmacros, rpm
suddenly stops downloading the sources (but this is IMO expected and safer
default when the macro is undefined by spec).

No matter the ~/.rpmmacros content, I think that %undefine
_disable_source_fetch should have the same effects.

Per report:
https://lists.fedoraproject.org/archives/list/copr-devel@lists.fedorahosted.org/thread/OZ23ROKWPW5MNSNF5EHF3TC6XRRGYODE/

Comment 1 Panu Matilainen 2020-08-05 06:46:51 UTC
%undefine merely pops from the macro stack, so its behavior depends on how many times a given macro has been defined, this is not specific to _disable_source_fetch at all. 

If the main purpose here is to say that it shouldn't be possible for a spec to enable source fetch (it always was an ill-fated feature that shouldn't really exist) then I'm inclined to agree.

Comment 2 Pavel Raiskup 2020-08-05 07:50:07 UTC
> %undefine merely pops from the macro stack, so its behavior depends on
> how many times a given macro has been defined

Heh, I am curious why I haven't heard about this rpm behaviour from our
guidelines (and I never personally experienced this behavior).  Thank you
for the info.

> If the main purpose here is to say that it shouldn't be possible for a
> spec to enable source fetch (it always was an ill-fated feature that
> shouldn't really exist) then I'm inclined to agree.

If that was possible, why not ... this sounds good (I mean.., can we keep
the source fetching feature as opt-in for ~/.rpmmacros, but disallow the
feature for spec?).

In Copr we set in some situations __disable_source_fetch to 0 in
~/.rpmmacros because sometimes people expect us to download the sources
(perhaps we could use spectool instead).  That said, this issue was filled
only because we faced some inconsistency between "Copr environment" and
"local environment" (without ~/.rpmmacros hack).

Comment 3 Ben Cotton 2020-08-11 13:40:58 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 4 Ben Cotton 2021-11-04 17:38:05 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2021-11-30 16:17:17 UTC
Fedora 33 changed to end-of-life (EOL) status on 2021-11-30. Fedora 33 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.