Bug 518766 - Review Request: auto-destdir - Automate DESTDIR support for "make install"
Review Request: auto-destdir - Automate DESTDIR support for "make install"
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rahul Sundaram
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-22 11:46 EDT by David A. Wheeler
Modified: 2013-03-13 01:45 EDT (History)
5 users (show)

See Also:
Fixed In Version: 1.11-1.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-04 00:01:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
sundaram: fedora‑review+
kevin: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description David A. Wheeler 2009-08-22 11:46:32 EDT
Spec URL: http://www.dwheeler.com/auto-destdir/auto-destdir.spec
SRPM URL: http://www.dwheeler.com/auto-destdir/auto-destdir-1.4-1.fc10.src.rpm
Description:
Auto-DESTDIR is a set of programs for POSIX/Unix/Linux systems
that helps automate program installation from source code.
The Auto-DESTDIR tools (run-redir and make-redir)
redirect file installations so that the installed
files are placed inside the the $DESTDIR directory,
even if the provided makefile doesn't support the DESTDIR convention.
For example, you can replace "make install" with
"make-redir DESTDIR=xyz install", and
then all files are stored inside $DESTDIR.

This program can be useful for creating native packages (e.g., RPM or deb),
or for installing programs from source code to be managed by tools
like GNU stow.

Note: rpmlint gives one warning:
 auto-destdir.src:50: W: configure-without-libdir-spec
This warning is irrelevant; this only installs bash scripts and documentation,
so there's no libdir to use.
Comment 1 Susi Lehtola 2009-08-23 04:05:33 EDT
If the program uses autotools, use
 %configure
instead of
 ./configure

%configure also sets a lot of other stuff, such as the optimization flags.
Comment 2 Ralf Corsepius 2009-08-23 04:57:07 EDT
(In reply to comment #0)
> This warning is irrelevant; this only installs bash scripts and documentation,
> so there's no libdir to use.  
Correct, but it uses bindir and datadir, two configuration options you don't pass to configure (MUSTFIX).

(In reply to comment #1)
> %configure also sets a lot of other stuff, such as the optimization flags.  
Very bad explanation, optimization flags are irrelevant on noarch-packages (such as this). What is not irrelevant are installation directories (c.f. comment above)

Finally, I am having doubts that this package works and will ever work.
Comment 3 David A. Wheeler 2009-08-23 09:02:10 EDT
It doesn't use autotools, and optimization rules are irrelevant since this is implemented entirely in bash.

It *does* use bindir and datadir.  I can set those, and if %configure is the preferred way to set them, that's fine.

As far as the doubts that this works, it "works for me", with a variety of programs.  Let's let users decide if it works for them :-).
Comment 4 David A. Wheeler 2009-08-23 12:29:05 EDT
Okay, here's a new package release that I believe addresses the issues above.  Basically, I changed ./configure to %configure.  The %configure macro includes settings for bindir and datadir, addressing the MUSTFIX.  This eliminates all rpmlint complaints, too, because the macro sets libdir.

Updated package here:
Spec URL: http://www.dwheeler.com/auto-destdir/auto-destdir.spec
SRPM URL: http://www.dwheeler.com/auto-destdir/auto-destdir-1.4-2.fc10.src.rpm

Anything else?
Comment 5 Ralf Corsepius 2009-08-23 13:25:53 EDT
(In reply to comment #4)
> Anything else?  

Yes, 
* MUSTFIX: remove this from your spec:
...
# This only has simple scripts, so there's nothing to put in a debug package:
%define _enable_debug_package 0
%define debug_package %{nil}
%define __os_install_post /usr/lib/rpm/brp-compress %{nil}
...
This doesn't make any sense.


(In reply to comment #3)
> As far as the doubts that this works, it "works for me", with a variety of
> programs.  Let's let users decide if it works for them :-).  
OK, then elaborate how this package works.
Comment 6 David A. Wheeler 2009-08-23 22:13:22 EDT
* "MUSTFIX: remove this from your spec:"
Okay, removed.  Thanks for noticing.  I made a few more tweaks while doing it.

* "OK, then elaborate how this package works."
For that, see its "man" page, esp. the "implementation approach" section.
This is available as PDF here:
 http://www.dwheeler.com/auto-destdir/make-redir.pdf
A longer paper, discussing alternative approaches, is here:
 http://www.dwheeler.com/essays/automating-destdir.html

Here's the new version, which addresses all previously-noted MUSTFIX-es:
Spec URL: http://www.dwheeler.com/auto-destdir/auto-destdir.spec
SRPM URL: http://www.dwheeler.com/auto-destdir/auto-destdir-1.5-1.fc10.src.rpm
Comment 7 David A. Wheeler 2009-08-23 22:15:38 EDT
FYI, I think the "_enable_debug_package 0" stuff was to make Fedora 9 or 8 happy; I wrote the original .spec file a long time ago.  Obviously that's irrelevant today.  In any case, it's gone now.
Comment 8 David A. Wheeler 2009-08-27 16:19:22 EDT
Here's the new version, which addresses all previously-noted MUSTFIX-es *AND* improves the test suite.  rpmlint gives no warnings, no errors:

Spec URL: http://www.dwheeler.com/auto-destdir/auto-destdir.spec
SRPM URL: http://www.dwheeler.com/auto-destdir/auto-destdir-1.6-1.fc11.src.rpm  

Let me know of anything else that needs doing; I don't know of anything.
Comment 9 Rahul Sundaram 2009-08-27 16:32:17 EDT
A few minor things:

Remove the # commented out lines. The description deosn't seem aligned and seems too long. Unless you are branching out for EPEL, you don't need to define the buildroot or remove it in the %install section anymore. 

IIUC, the mini scripts that are in /usr/share are really helper apps that should be in /usr/libexec instead.
Comment 10 Ralf Corsepius 2009-08-27 16:55:53 EDT
(In reply to comment #6)

> * "OK, then elaborate how this package works."
> For that, see its "man" page, esp. the "implementation approach" section.
> This is available as PDF here:
>  http://www.dwheeler.com/auto-destdir/make-redir.pdf
Well, if you think this is a nice approach, I can't avoid to disagree.

I will not approve this package and recommend other reviewers to do the same.
Comment 11 David A. Wheeler 2009-08-27 17:13:01 EDT
Thanks for commenting!

* "The description deosn't seem aligned and seems too long".

I can shorten it, sure!  But I don't understand the 'aligned' comment.  Can you
explain what you mean?


* "Remove the # commented out lines... Unless you are branching out for EPEL,
you don't need to define the buildroot or remove it in the %install section
anymore."

Actually, I *am* hoping to have the same .spec file for other RPM-based
systems, including RHEL/EPEL.  These lines are critically necessary for many
systems, and they cause no harm to Fedora.  So, I'd rather leave them in. 
Please tell me if removing them is really critical.


* "IIUC, the mini scripts that are in /usr/share are really helper apps that
should be in /usr/libexec instead."

If they were binaries, I'd 100% agree with you.  But these files do NOT depend
on the specific architecture being used.

Unfortunately, /usr/libexec isn't in FHS, so it's hard to find really good
rules to make a clear determination.  The FHS DOES say /usr/lib is for
architecture-dependent data (e.g., ELF files like .so files), while /usr/share
is for architecture-independent data.  I think /usr/libexec is intended to be
like /usr/lib, namely, it stores architecture-specific files, as suggested by
the name similarity.  Following that line of thought, private executables that
are architecture-independent would go into /usr/share instead.  Obviously, if
you take the position that "all private executables go into /usr/libexec,
architecture-neutral or not", then /usr/libexec would be the answer.

The GNU coding standards talk about libexecdir, but don't make it entirely
clear (to me) if private scripts would go here too.

Anyone know of a semi-official Fedora position (either way) on this? If they
should be moved, that would be trivial to do, by just changing %configure to:
 %configure --scriptdir=%{_libexecdir}/%{name}
Comment 12 Rahul Sundaram 2009-08-27 17:27:06 EDT
On alignment, there is a lot of white space in between lines and makes it harder to read the text and text does get displayed in many places including PackageKit and therefore writing a shorter description makes sense. It is mostly cosmetic however.

Removing the buildroot stuff is not critical at all. If you want, you can keep them and branch for EPEL as well

https://fedoraproject.org/wiki/EPEL

The guidelines for libexec are at

https://fedoraproject.org/wiki/Packaging/Guidelines#Libexecdir

The majority of packages in /usr/libexec are binaries but I found a few shell scripts as well. 

rpm -qf /usr/libexec/xscreensaver-autostart 

xscreensaver-base-5.08-12.fc12.i686

This is recommended but I won't insist on it. 

Btw, Fedora did try to get it into FHS but it appears there are no owners to keep it updated anymore. 

APPROVED
Comment 13 David A. Wheeler 2009-08-27 17:57:37 EDT
Okay, I per comment #12, I moved the scripts to libexecdir and shortened the description.  (You didn't REQUIRE this, but they made sense).  I left the buildroot stuff, as discussed above.  rpmlint still reports 0 errors, 0 warnings.

The new versions, with the optional changes suggested, are here:
Spec URL: http://www.dwheeler.com/auto-destdir/auto-destdir.spec
SRPM URL: http://www.dwheeler.com/auto-destdir/auto-destdir-1.7-1.fc11.src.rpm  

Thanks for the approval! (see comment #12)
Comment 14 David A. Wheeler 2009-08-27 18:02:44 EDT
New Package CVS Request
=======================
Package Name: auto-destdir
Short Description: Automate DESTDIR support for "make install"
Owners: dwheeler
Branches: F-10 F-11
InitialCC:
Comment 15 Jason Tibbitts 2009-08-28 11:53:02 EDT
CVS done.
Comment 16 Fedora Update System 2009-09-02 19:59:56 EDT
auto-destdir-1.10-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/auto-destdir-1.10-1.fc11
Comment 17 Fedora Update System 2009-09-02 20:00:01 EDT
auto-destdir-1.10-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/auto-destdir-1.10-1.fc10
Comment 18 David A. Wheeler 2009-09-03 09:34:07 EDT
Package Change Request
======================
Package Name: auto-destdir
New Branches: EL-4 EL-5
Owners: dwheeler
Comment 19 Kevin Fenzi 2009-09-03 22:07:25 EDT
cvs done.
Comment 20 Fedora Update System 2009-09-04 00:01:39 EDT
auto-destdir-1.10-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 21 Fedora Update System 2009-09-04 00:07:43 EDT
auto-destdir-1.10-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 22 Fedora Update System 2009-09-10 22:00:47 EDT
auto-destdir-1.11-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/auto-destdir-1.11-1.fc11
Comment 23 Fedora Update System 2009-09-11 19:24:57 EDT
auto-destdir-1.11-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

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