Bug 31850 - bm -u not working
Summary: bm -u not working
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal minor
Target Milestone: ---
Assignee: Pascal Terjan
QA Contact:
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2023-04-29 10:59 CEST by Marc Krämer
Modified: 2024-02-12 20:07 CET (History)
3 users (show)

See Also:
Source RPM: bm-3.3-1.mga9.src.rpm
CVE:
Status comment:


Attachments
patch to set bm's unpacking directory (1.88 KB, patch)
2024-02-10 00:43 CET, Aurelian R
Details | Diff
updates patch to set current working directory (1.95 KB, patch)
2024-02-10 17:29 CET, Aurelian R
Details | Diff

Description Marc Krämer 2023-04-29 10:59:33 CEST
some commands, e.g. -u not working:
bm -lu
creating package list
processing package restic-0.15.2-%mkrel 1
unpacking
succeeded!

ls BUILD
%no output%
Comment 1 Aurelian R 2023-04-29 15:19:16 CEST
As a workaround, it seems to work if a path is specified:

 bm -lu --unpack-dir=./ your_pkg.src.rpm

CC: (none) => arusanu

Comment 2 Lewis Smith 2023-04-29 21:04:41 CEST
It is disconcerting that the example Marc gives in comment 0 looks to work.
BTAIM Can you give any other commands which you know do not work?
Do you know whether they worked in the past, or have they always been no good?

@Aurelian
Thanks for that very helpful tip.

It looks like the only changes this year (indeed, since 2015) were done by 	pterjan, so assigning this bug accordingly.
CCing DavidG who is down as registered maintainer so you can follow this.

Keywords: (none) => FOR_ERRATA9
Assignee: bugsquad => pterjan
CC: (none) => geiger.david68210

Comment 3 Marc Krämer 2023-04-30 00:48:13 CEST
no, I don't know if it worked in the past, just looked it up in the man page, as I don't want it to build, just want to unpack the source(s).
Sure, you can do this by hand, so there is an easy workaround, but I guess, it should be easy to fix in future.
Comment 4 Pascal Terjan 2023-04-30 01:20:08 CEST
I usually use bm -pl which unpacks and runs %prep so applies patches.
Comment 5 Marc Krämer 2023-04-30 01:24:35 CEST
that is even better than just unpack. didn't see that one.
Comment 6 Jani Välimaa 2023-04-30 06:39:54 CEST
This is a "known issue", 'man bm' says the following.

BUGS
       -u doesn't seem to do anything.
Jani Välimaa 2023-04-30 06:40:40 CEST

Summary: bm: some commands not working => bm -u not working

Comment 7 Morgan Leijström 2023-06-21 08:59:46 CEST
Per comment 6 a known bug, even noted in man page

Keywords: FOR_ERRATA9 => UPSTREAM
CC: (none) => fri

Comment 8 Aurelian R 2024-02-10 00:43:21 CET
Created attachment 14352 [details]
patch to set bm's unpacking directory

It looks like the documentation is lacking a bit. In fact bm does unpack successfully, as it says, but the default directory is /var/tmp/${PKG_NAME}-topdir and that is nowhere specified and not quite intuitive.
As bm can build rpm packages at any location, one may expect that it also has the default unpacking directory to the current directory imho.
Attached is a patch that makes bm to be more clear about where it unpacks.
Regards,
Comment 9 Aurelian R 2024-02-10 17:29:08 CET
Created attachment 14363 [details]
updates patch to set current working directory

Updated patch.

Attachment 14352 is obsolete: 0 => 1

Comment 10 Mageia Robot 2024-02-12 18:58:32 CET
commit fde9fe10ef2bb4d201f81c28052dd82f36276cff
Author: daviddavid <geiger.david68210@...>
Date:   Mon Feb 12 18:58:26 2024 +0100

    Set current working directory for 'unpack (-u)' command (mga#31850)
    
    - Thanks to Aurelian R
---
 Commit Link:
   https://gitweb.mageia.org/software/build-system/bm/commit/?id=fde9fe10ef2bb4d201f81c28052dd82f36276cff
Comment 11 David GEIGER 2024-02-12 20:07:28 CET
bm-3.5 is available for test on Cauldron!

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