helpAutoconf - Support: sr #110212, Transform pkgdatadir using...

 
 

sr #110212: Transform pkgdatadir using program-prefix and -suffix

Submitter:  Ross Burton <rossburton>
Submitted:  Thu 19 Mar 2020 04:14:56 PM UTC
 
Category:  None Priority:  1 - Later
Severity:  3 - Normal Status:  Postponed
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Wed 28 Jul 2021 08:29:30 PM UTC, comment #4: 

Here's a workaround:

  1. Edit configure.ac: In the AC_INIT() call, change the first argument to the name you want to use for the subdirectory
  2. Run autoconf (perhaps indirectly, if the package provides an autogen.sh script or the like)
  3. Run configure with --program-prefix, --program-suffix, and/or --program-transform-name, as desired
  4. Once the build is finished, do a test install into a scratch location using DESTDIR=/where/ever, and look it over to make sure all the pathnames that needed to be changed, were in fact changed.

For my particular case (installing gpg1 in parallel with my distro's gpg2), I appended "1" in both places:
  1. Made this change to configure.ac:
        -AC_INIT([gnupg],[mym4_full_version], https://bugs.gnupg.org)
        +AC_INIT([gnupg1],[mym4_full_version], https://bugs.gnupg.org)

  2. Called configure --program-suffix=1

My choice of a "1" suffix was informed by:

  • the python convention, where the suffix is just the major version -- python2 vs python3
  • a desire for consistency with the name of gpg's gnupg1.info file (which is hard-coded as such in Makefile.am; AFAICT, autoconf, configure, and make just pass it through unmodified)

Note that this workaround caused some libexec files to be double-transformed, e.g.:
    $prefix/libexec/gnupg1/gpgkeys_curl1
                         ^             ^
It probably also stuck that "1" in in various bits of documentation, etc.

But I was willing to live with those wrinkles.

Eric Siegerman <erics39>
Wed 28 Jul 2021 07:58:57 PM UTC, comment #3: 

> Such a change first needs to be incorporated into the GNU Coding Standards.


Does it?  The relevant paragraph (from the July 1, 2021 version), says:

> The definition of ‘datadir’ is the same for all packages, so you should install your data in a subdirectory thereof. Most packages install their data under $(datadir)/package-name/.


To me, "Most packages install..." reads more like a recommendation than a firm requirement -- and at that, an even weaker recommendation than the "should install" in the first sentence.

Under that reading, modifying the ${datadir} subdirectory's name would not be a violation of the standard as it's currently written.

Eric Siegerman <erics39>
Fri 10 Jul 2020 08:53:46 PM UTC, comment #2: 

Savannah doesn't have a good way of tagging bugs that are blocked on some external change, so I'm marking this one "postponed."

Regardless, Ross, if you want to push this forward, you should bring it up on the bug-standards mailing list <https://lists.gnu.org/mailman/listinfo/bug-standards>.

Zack Weinberg <zackw>
Project Administrator
Thu 19 Mar 2020 04:27:24 PM UTC, comment #1: 

Such a change first needs to be incorporated into the GNU Coding Standards.

Eric Blake <ericb>
Project Administrator
Thu 19 Mar 2020 04:14:56 PM UTC, original submission:  

The main reason people will build autoconf with --program-prefix or --program-suffix is most likely that they want to support multiple versions of autoconf at the same time.

For example, binutils requires 2.69 exactly, but if 2.70 is released then people will want to use that before binutils has switched and released.

Using --program-suffix=2.69 means that the binaries are installed as /usr/bin/autoconf2.69, but pkgdatadir is still just /usr/share/autoconf.  Everyone who wants parallel installable autoconf then has to fix this somehow (either overwriting pkgdatadir, or fixing the paths after installation).

I suggest overwriting pkgdatadir to respect $program_prefix and $program_suffix.

Ross Burton <rossburton>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by erics39 (Posted a comment)
  • -email is unavailable- added by zackw (Updated the item)
  • -email is unavailable- added by ericb (Posted a comment)
  • -email is unavailable- added by rossburton (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-10 zackw StatusNone Postponed
    2020-07-10 zackw Priority5 - Normal 1 - Later

    Back to the top


    Powered by Savane 3.9