dozzie / yumbootstrap

Linux chroot installer for Yum-based distributions
http://dozzie.jarowit.net/trac/wiki/yumbootstrap
GNU General Public License v3.0
119 stars 45 forks source link

Updated Makefile, builds rpm in local directory #2

Closed markeissler closed 10 years ago

markeissler commented 10 years ago

The rebuild instructions (from README.md) aren't correct for CentOS, which places the rpmbuild directory in the user's home directory. The resulting RPM is placed in ~rpmbuild/RPMS/noarch/. On Fedora (Rawhide), the output directory seems to /rpmbuild/RPMS/noarch/ -- also different from documented. To alleviate the trouble new users might have with this, I rewrote the Makefile.

Builds will now occur in the yumbootstrap build directory under rpm-build. For convenience, both src.rpm and noarch.rpm will be copied to the top of the build directory. A build and install is simplified to:

>make rpm
>sudo make install

Followed by cleanup:

>make clean

-or- To remove intermediate build files but preserve src.rpm and noarch.rpm in the top directory...
>make mostlyclean

The old make install-notmodule remains. This has been tested on CentOS 7 and Fedora Rawhide.

dozzie commented 10 years ago

OK, but what's the point of the whole rewrite? It seems to be very, very verbose way of running yum localinstall, which in my opinion should not be a target in Makefile anyway.

It also introduces several bugs (mkdir foo/{bar,baz,nabla} is not guaranteed to expand to three directories, unless you have Bash as /bin/sh; rm -rf foo || true is not a good idea, since rm -f is already not expected to fail, and if it fails, things are really bad; I have also ).

I agree that the installation instruction for RH-likes doesn't match what is default after RHEL5 and should be adjusted in README, but it's a minor issue and doesn't justify such excessive Makefile.