Page MenuHomeFreeBSD

Normalize the g(eom,cache,part,...) build.
ClosedPublic

Authored by brooks on May 8 2018, 10:33 PM.
Tags
None
Referenced Files
F80186651: D15360.id.diff
Thu, Mar 28, 11:07 PM
Unknown Object (File)
Feb 23 2024, 12:34 PM
Unknown Object (File)
Feb 16 2024, 12:44 AM
Unknown Object (File)
Jan 21 2024, 2:52 PM
Unknown Object (File)
Jan 21 2024, 7:54 AM
Unknown Object (File)
Dec 24 2023, 2:41 AM
Unknown Object (File)
Dec 24 2023, 2:41 AM
Unknown Object (File)
Dec 24 2023, 2:41 AM
Subscribers

Details

Summary

Rather then combining hardlink creation for the geom(8) binary with
shared library build, move libraries to src/lib/geom so they are
built and installed normally. Create a common Makefile.classes
which is included by both lib/geom/Makefile and sbin/geom/Makefile
so the symlink and libraries stay in sync.

The relocation of libraries allows libraries to be build for 32-bit
compat. This also reduces the number of non-standard build options in
the system.

This commit is not sufficent to run a 32-bit /sbin/geom on a 64-bit
system out of the box as it will look in the wrong place for libraries
unless GEOM_LIBRARY_PATH is set appropriatly in the environment.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Please update the paths here too:

targets/pseudo/tests/Makefile.depend:      tests/sys/geom \
targets/pseudo/tests/Makefile.depend:      tests/sys/geom/class \
targets/pseudo/tests/Makefile.depend:      tests/sys/geom/class/concat \
targets/pseudo/tests/Makefile.depend:      tests/sys/geom/class/eli \
targets/pseudo/tests/Makefile.depend:      tests/sys/geom/class/gate \
targets/pseudo/tests/Makefile.depend:      tests/sys/geom/class/mirror \
targets/pseudo/tests/Makefile.depend:      tests/sys/geom/class/nop \
targets/pseudo/tests/Makefile.depend:      tests/sys/geom/class/raid3 \
targets/pseudo/tests/Makefile.depend:      tests/sys/geom/class/shsec \
targets/pseudo/tests/Makefile.depend:      tests/sys/geom/class/stripe \
targets/pseudo/tests/Makefile.depend:      tests/sys/geom/class/uzip \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/cache \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/concat \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/eli \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/journal \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/label \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/mirror \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/mountver \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/multipath \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/nop \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/part \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/raid \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/raid3 \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/sched \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/shsec \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/stripe \
targets/pseudo/userland/Makefile.depend:        sbin/geom/class/virstor \
targets/pseudo/userland/Makefile.depend:        sbin/geom/core \

And the paths in the moved Makefile.depend files:

sbin/geom/class/cache/Makefile.depend:  sbin/geom/core \
sbin/geom/class/concat/Makefile.depend: sbin/geom/core \
sbin/geom/class/eli/Makefile.depend:    sbin/geom/core \
sbin/geom/class/journal/Makefile.depend:        sbin/geom/core \
sbin/geom/class/label/Makefile.depend:  sbin/geom/core \
sbin/geom/class/mirror/Makefile.depend: sbin/geom/core \
sbin/geom/class/mountver/Makefile.depend:       sbin/geom/core \
sbin/geom/class/multipath/Makefile.depend:      sbin/geom/core \
sbin/geom/class/nop/Makefile.depend:    sbin/geom/core \
sbin/geom/class/part/Makefile.depend:   sbin/geom/core \
sbin/geom/class/raid/Makefile.depend:   sbin/geom/core \
sbin/geom/class/raid3/Makefile.depend:  sbin/geom/core \
sbin/geom/class/sched/Makefile.depend:  sbin/geom/core \
sbin/geom/class/shsec/Makefile.depend:  sbin/geom/core \
sbin/geom/class/stripe/Makefile.depend: sbin/geom/core \
This revision now requires changes to proceed.May 8 2018, 10:46 PM
Makefile.inc1
2426 ↗(On Diff #42292)

Ew now we have a lib/geom and lib/libgeom. It's already confused me at least 3 times in this review.

lib/Makefile
22 ↗(On Diff #42292)

Adding this down below:
SUBDIR_DEPEND_geom+= libufs
Should allow moving libufs down to the normal SUBDIR in the alphabetical order.

This SUBDIR_BOOTSTRAP list is a lazy hack to avoid writing a bunch more SUBDIR_DEPEND.

  • Chase the relocation of library directories.
brooks marked an inline comment as done.
  • Create WORLDTMP/lib/geom
  • Use SUBDIR_DEPENDS_geom to depend on libufs.
brooks added inline comments.
Makefile.inc1
2426 ↗(On Diff #42292)

Other name options welcome. The best alternative I've come up with is libgeom_classes.

This revision is now accepted and ready to land.Jun 19 2018, 5:15 PM
This revision was automatically updated to reflect the committed changes.

This commit is possibly incomplete. I get a make[4]: "/usr/src/lib/geom/Makefile.inc" line 15: Could not find Makefile.classes immediately after the new geom objdir is created; make completely aborts here. Makefile.classes indeed does not exist in the new directory.

In D15360#338986, @ml_vishwin.info wrote:

This commit is possibly incomplete. I get a make[4]: "/usr/src/lib/geom/Makefile.inc" line 15: Could not find Makefile.classes immediately after the new geom objdir is created; make completely aborts here. Makefile.classes indeed does not exist in the new directory.

Fixed in rS335647.