Description of problem: I have installed Mageia 8 with MATE and Cinnamon as Desktop Environments. Now, when I'm in Cinnamon I download my own spec file that I made to build Tutanota Desktop and this is where rpmbuild -ba fails to create the folder structure like it should. Version-Release number of selected component (if applicable): 4.16.1.3 How reproducible: Everytime in a fresh installation. Steps to Reproduce: 1. Install Mageia 8 with Cinnamon and MATE. 2. Login to Cinnamon. 3. Install rpm-build. 4. Download the tutanota-desktop spec file that I attached. 5. Open a terminal window and cd to the spec file. 6. Run rpmbuild -ba tutanota-desktop.spec 7. rpmbuild fails obviously since there's no rpmbuild folder in $HOME when there should be one followed by the proper subfolders.
Created attachment 12877 [details] Spec file for tutanota-desktop to test with
CC: (none) => lovaren
Unsure if this is relevant to RPM Stack or a wrong SPEC file. As us at bugsquad we don't know about them. Add some useful peoples.
CC: (none) => mageia, ouaurelien, rpmstack
Without being an expert I say that it's NOT due to the spec file as this seems to only happen in Cinnamon. So far I can't recall getting this problem in Plasma.
Not sure what you mean but the wiki clearly say that you have to manually do some things https://wiki.mageia.org/en/Packagers_RPM_tutorial#Preliminary_tasks
Created attachment 12878 [details] spec modifications I made a modification because i can't start with the original But in mg8 i can't go further due npm version npm ERR! code ENOTSUP npm ERR! notsup Unsupported engine for tutanota@3.85.6: wanted: {"npm":">=7.0.0"} (current: {"node":"14.17.3","npm":"6.14.13"}) npm ERR! notsup Not compatible with your version of node/npm: tutanota@3.85.6 npm ERR! notsup Not compatible with your version of node/npm: tutanota@3.85.6 npm ERR! notsup Required: {"npm":">=7.0.0"} npm ERR! notsup Actual: {"npm":"6.14.13","node":"14.17.3"} npm ERR! A complete log of this run can be found in: npm ERR! /home/katnatek/.npm/_logs/2021-07-28T00_25_14_212Z-debug.log
(In reply to katnatek from comment #4) > Not sure what you mean but the wiki clearly say that you have to manually do > some things > > https://wiki.mageia.org/en/Packagers_RPM_tutorial#Preliminary_tasks Running rpmbuild on its own creates these directories in Plasma, at least for past experience.
(In reply to Kristoffer Grundström from comment #6) Did you have your .rpmmacros ? https://wiki.mageia.org/en/Packagers_RPM_tutorial#.rpmmacros_file_creation
@Kristoffer (In reply to Kristoffer Grundström from comment #3) > Without being an expert I say that it's NOT due to the spec file as this > seems to only happen in Cinnamon. So far I can't recall getting this problem > in Plasma. - It seems that the missing directory structure is created when you run rpmbuild. Did you try under Mate? - You say it works under Plasma; is that in the past, or with Mageia 8? - My guess is that this is not desktop dependent. - Have you heeded all the advice in the Wiki that katnatek indicated? (Thanks).
CC: (none) => lewyssmith
@ katnatek Thanks for having tried to reproduce the issue. Changing status to unconfirmed. @ Kristoffer Please reply to Lewis' questions.
CC: (none) => marja11Status: NEW => UNCONFIRMEDEver confirmed: 1 => 0
Keywords: (none) => NEEDINFO
I suspect this might be some kind of user error, but it doesn't matter, because for Mageia 9 (with RPM 4.17), RPM will stop automatically creating these directories anyway. We should update our documentation to tell people to use rpmdev-setuptree command (from rpmdevtools) to setup their working area.
CC: (none) => ngompa13
Thanks for your insight, Neal. Is it (rpmdev-setuptree) valid for Mageiaz 8 - now?
Yes. rpmdev-setuptree (in the rpmdevtools package) has existed since Mageia forked from Mandriva (certainly longer than that).
(In reply to Lewis Smith from comment #8) > @Kristoffer > (In reply to Kristoffer Grundström from comment #3) > > Without being an expert I say that it's NOT due to the spec file as this > > seems to only happen in Cinnamon. So far I can't recall getting this problem > > in Plasma. > - It seems that the missing directory structure is created when you run > rpmbuild. Did you try under Mate? Yes. > - You say it works under Plasma; is that in the past, or with Mageia 8? To my recollection it has always worked to just run rpmbuild alone to get the structure created, I may be mistaken though. > - My guess is that this is not desktop dependent. > - Have you heeded all the advice in the Wiki that katnatek indicated? > (Thanks). Manually creating .rpmmacros is something I haven't done before running rpmbuild because as I stated above it creates the right structure.
Using Xfce, I have been playing with this to at least the point where the essential files & directories are created; but not succeeding in building the example package from just the attached SPEC file. I suspect that needed something more. The Wiki comment 7 needs elaborating. Before doing anything, I checked $HOME for anything 'rpm': $ find . -name '*rpm*' Nothing. $ sudo urpmi rpm-build Still nothing. $ rpmbuild Still nothing. $ rpmbuild -ba tmp/tutanota-desktop.spec error: Bad source: /home/lewis/rpmbuild/SOURCES/tutanota-desktop-release-3.85.6.tar.gz: No such file or directory Still nothing 'rpm' in $HOME. I then created by copying from the wiki .rpmmacros: $ vi .rpmmacros $ find . -name '*rpm*' ./.rpmmacros Following Neal's advice comment 10: $ sudo urpmi rpmdevtools $ rpmdev-setuptree $ find . -name '*rpm*' ./.rpmmacros ./rpmbuild $ tree rpmbuild/ rpmbuild/ ├── BUILD ├── RPMS ├── SOURCES ├── SPECS └── SRPMS Which is what Kristoffer wants, I think. Still no joy for me, though; I suspect something more was needed.: $ rpmbuild -ba tmp/tutanota-desktop.spec error: Bad source: /home/lewis/rpmbuild/SOURCES/tutanota-desktop-release-3.85.6.tar.gz: No such file or directory So Kristoffer, please do at least: - Create ~/.rpmmacros - $ rpmdev-setuptree and take it from there. If that works, I shall tweak the Wiki accordingly. The mere fact that something auto-magic used to happen and does no more (nor will in the future) seems OK in such a techinical environment. And can somebody more learned in this field say whether the steps I went through are correct (so I can put them in the Wiki).
(In reply to Lewis Smith from comment #14) > Using Xfce, I have been playing with this to at least the point where the > essential files & directories are created; but not succeeding in building > the example package from just the attached SPEC file. I suspect that needed > something more. > The Wiki comment 7 needs elaborating. > > Before doing anything, I checked $HOME for anything 'rpm': > $ find . -name '*rpm*' > Nothing. > $ sudo urpmi rpm-build > Still nothing. > $ rpmbuild > Still nothing. > $ rpmbuild -ba tmp/tutanota-desktop.spec > error: Bad source: > /home/lewis/rpmbuild/SOURCES/tutanota-desktop-release-3.85.6.tar.gz: No such > file or directory > Still nothing 'rpm' in $HOME. > I then created by copying from the wiki .rpmmacros: > $ vi .rpmmacros > $ find . -name '*rpm*' > ./.rpmmacros > Following Neal's advice comment 10: > $ sudo urpmi rpmdevtools > $ rpmdev-setuptree > $ find . -name '*rpm*' > ./.rpmmacros > ./rpmbuild > $ tree rpmbuild/ > rpmbuild/ > ├── BUILD > ├── RPMS > ├── SOURCES > ├── SPECS > └── SRPMS > Which is what Kristoffer wants, I think. Still no joy for me, though; I > suspect something more was needed.: > $ rpmbuild -ba tmp/tutanota-desktop.spec > error: Bad source: > /home/lewis/rpmbuild/SOURCES/tutanota-desktop-release-3.85.6.tar.gz: No such > file or directory > > So Kristoffer, please do at least: > - Create ~/.rpmmacros > - $ rpmdev-setuptree > and take it from there. If that works, I shall tweak the Wiki accordingly. > The mere fact that something auto-magic used to happen and does no more (nor > will in the future) seems OK in such a techinical environment. > > And can somebody more learned in this field say whether the steps I went > through are correct (so I can put them in the Wiki). I can confirm that creating the rpmmacros file in $HOME does the trick after you install rpmdev-setuptree.
Thank you. I shall adapt the wiki accordingly, then close this.
Assignee: bugsquad => lewyssmith
Note that "rpmdev-setuptree" will create ~/.rpmmacros for you if it doesn't exist.
(In reply to Neal Gompa from comment #17) > Note that "rpmdev-setuptree" will create ~/.rpmmacros for you if it doesn't > exist. That also means that rpmdev-setuptree should become install as a dependancy to rpm-build because otherwise how would one know?
No. You don't need ~/.rpmmacros to build packages. You also don't need rpmdev-setuptree if you're using tools like Mock[1] to build packages. And we *definitely* don't need rpmdevtools for rpm-build itself. [1]: https://wiki.mageia.org/en/Using_Mock