Bug 63439 - Directory and files in `/usr/share/build-1/` installed
Summary: Directory and files in `/usr/share/build-1/` installed
Status: NEW
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: 1.7.0
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-15 14:13 UTC by Paul Menzel
Modified: 2024-01-22 05:25 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Menzel 2019-05-15 14:13:44 UTC
Building and installing APR 1.7.0 the strange directory `/usr/share/build-1/` including some files is created.

```
$ /scratch/local2/bee-root/apr/apr-1.7.0-0/source/configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --sysconfdir=/etc --sharedstatedir=/var --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --datarootdir=/usr/share --datadir=/usr/share --infodir=/usr/share/info --localedir=/usr/share/locale --mandir=/usr/share/man --docdir=/usr/share/doc/apr --exec-prefix=/usr
[…]
rm: cannot remove 'libtoolT': No such file or directory
config.status: executing default commands
$ make -j8
[…]
$ sudo make -j8 install DESTDIR=/scratch/local2/bee-root/apr/apr-1.7.0-0/image
[…]
```

Then the files below are installed in the destination directory (consider it relative to `/scratch/local2/bee-root/apr/apr-1.7.0-0/image`.

drwxr-xr-x root/root         0 2019-05-15 14:55 /usr/share/build-1/
-rwxr-xr-x root/root    339172 2019-05-15 14:55 /usr/share/build-1/libtool
-rwxr-xr-x root/root      1202 2019-05-15 14:55 /usr/share/build-1/mkdir.sh
-rw-r--r-- root/root      2991 2019-05-15 14:55 /usr/share/build-1/make_exports.awk
-rw-r--r-- root/root      1023 2019-05-15 14:55 /usr/share/build-1/make_var_export.awk
-rw-r--r-- root/root      6238 2019-05-15 14:55 /usr/share/build-1/apr_rules.mk
Comment 1 creatorsmithmdt 2024-01-22 05:19:11 UTC
I'm also encountering this issue building APR 1.7.4.

It looks like the cause is line 23 of config.layout (at least on the 1.7.4 trunk):
      installbuilddir: ${datadir}/build-${APR_MAJOR_VERSION}
which leads to installbuilddir being set to $prefix/include/build-1

I'm building APR for Chromebrew, and this directory fails our FHS compliance check. As I understand it, I could use --enable-layout=GNU to get FHS compliant directories, but our policy is to try and stick as closely to upstream defaults as possible.

I'm interested in the rationale for the APR layout, and why it is the default. According to line 12 of config.layout, it is the "Classical APR path layout designed for parallel installs." 

Is there any particular reason why both the single and parallel APR layouts are not FHS compliant? It seems like a paralell layout that is also FHS compliant is certainly possible to achieve. (i.e. installbuilddir = prefix/share/apr/build-1, or maybe prefix/share/apr-1/build)

I'm wondering whether the default layout could be one that is FHS compliant while also having the same functionality as the current APR paralell layout.