Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freeradius: revert to use shared libtalloc #1495

Merged
merged 1 commit into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 5 additions & 21 deletions build/freeradius/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,36 +55,20 @@ init
prep_build

#########################################################################
# build static libtalloc dependency
# build libtalloc dependency

save_buildenv

post_install() {
typeset arch=$1

# talloc does not support buiding a static archive
# wipe the dynamic libraries from _deproot and
# build a static archive ourselves
logcmd $RM -f $DEPROOT$PREFIX/${LIBDIRS[$arch]}/libtalloc.* \
|| logerr "removing dynamic libraries failed"

logcmd $AR -q "$DEPROOT$PREFIX/${LIBDIRS[$arch]}/libtalloc.a" \
$TMPDIR/$BUILDDIR/bin/default/talloc.c.*.o \
|| logerr "creating archive failed"
}

CONFIGURE_OPTS="
--prefix=$PREFIX
--disable-python
"
build_dependency talloc talloc-$TALLOCVER $PROG talloc $TALLOCVER
build_dependency -merge talloc talloc-$TALLOCVER $PROG talloc $TALLOCVER
# Extract the talloc licence
sed '/^\*/q' < $TMPDIR/talloc-$TALLOCVER/talloc.c > $TMPDIR/LICENCE.talloc

restore_buildenv

unset -f post_install

#########################################################################

note -n "Building $PROG"
Expand All @@ -95,11 +79,11 @@ CONFIGURE_OPTS="
--with-logdir=/var/log$PREFIX
--localstatedir=/var$PREFIX
--with-raddbdir=/etc$PREFIX
--with-talloc-include-dir=$DEPROOT$PREFIX/include
--with-talloc-include-dir=$DESTDIR$PREFIX/include
"
CONFIGURE_OPTS[amd64]+="
--libdir=$PREFIX/${LIBDIRS[amd64]}
--with-talloc-lib-dir=$DEPROOT$PREFIX/${LIBDIRS[amd64]}
--with-talloc-lib-dir=$DESTDIR$PREFIX/${LIBDIRS[amd64]}
"

pre_configure() {
Expand All @@ -108,7 +92,7 @@ pre_configure() {
# This prevents the build from embedding the temporary build directory into
# the runpath of every object.
MAKE_ARGS_WS="
TALLOC_LDFLAGS=\"-L$DEPROOT$PREFIX/${LIBDIRS[$arch]} \
TALLOC_LDFLAGS=\"-L$DESTDIR$PREFIX/${LIBDIRS[$arch]} \
-R$PREFIX/${LIBDIRS[$arch]}\"
"

Expand Down
5 changes: 4 additions & 1 deletion build/freeradius/local.mog
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ user ftpuser=false username=$(USER) uid=$(UID) group=$(GROUP) \
<transform path=$(PREFIX)/share/doc -> drop>

# Drop rc.radiusd
<transform path=$(PREFIX)/sbin/rc.radiusd -> drop>
<transform path=$(PREFIX)/sbin/rc\.radiusd -> drop>

# Drop talloc header and .pc
<transform file path=.*/talloc\.(?:pc|h)$ -> drop>

# Drop static libs
<transform file path=.*\.a$ -> drop>
Expand Down
Loading