Re: %prep and %autosetup: move the unpacked source directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 17 Jan 2017 3:49 pm, "arnaud gaboury" <arnaud.gaboury@xxxxxxxxx> wrote:
Here is my working directory at the beginning of build, right after I downloaded the source with spectool. The root directory of the .zip file is called "platform-master".

-------------------
[makerpm@thetradinghall rpmbuild]$ ls -al
-rw-rw-r-- 1 makerpm makerpm 31120791 Jan 15 11:52 master.zip
-rw-rw-r-- 1 makerpm makerpm     4325 Jan 17 16:22 mattermost.spec
-------------------------

At the begining of my build, I need:
- mkdir src/github.com/mattermost
Here is what I wrote in my .spec file:

%prep
%autosetup -n platform-master
mkdir -p %{_topdir}/src/github.com/mattermost  <<< = (here, is it correct to use %{_topdir} ? )
mv plateform-master %{_topdir}/src/github.com/mattermost/platform

Unfortunately, I have this error:

mv plateform-master /home/makerpm/rpmbuild/src/github.com/mattermost/platform
mv: cannot stat 'plateform-master': No such file or director

Here is what happens when running $fedpkg --dist f25 prep:
-------------------------------------
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.zJOa1Q
+ umask 022
+ cd /home/makerpm/rpmbuild
+ cd /home/makerpm/rpmbuild
+ rm -rf platform-master
+ /usr/bin/unzip -qq /home/makerpm/rpmbuild/master.zip
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd platform-master   <<< ====  WHY ??
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ mkdir -p /home/makerpm/rpmbuild/src/github.com/mattermost
+ cd ..
+ mv plateform-master /home/makerpm/rpmbuild/src/github.com/mattermost/platform
mv: cannot stat 'plateform-master': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.zJOa1Q (%prep)
--------------------------------------------------

It seems I am inside the directory I want to move, platform-master.
Why do I cd this directory? How to avoid it so I am able to move this directory? Or best, how can I unzip the content of master.zip in src/github.com/mattermost/platform?

Thank you for help to write these few lines in a clean manner.

Please don't take this as a hostile message in any way but I can't help but feel your needs don't really align with the intent of this mailing list.

These are not in any way fedora problems.

Given your messages are primarily about packaging the fedora development list may appear more appropriate, but before you do might I suggest you take a breather to get some coffee and take a breath of fresh air?

In this specific instance you have made a typo, as simple as that.

To your specific question you really shouldn't be referring to %{_topdir} ever and I can't help but think your current methodology is suspect

You should probably go revisit some basic rpm guides such as:

https://www.hogarthuk.com/?q=node/11

Follow the minimal templates to learn a little better.

Then if you have trouble include the full spec file when describing the problem and not just the snippet you think is the issue.

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]
  Powered by Linux