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

net/freeradius3: Add sqlite support #8367

Closed
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
39 changes: 35 additions & 4 deletions net/freeradius3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=freeradius3
PKG_VERSION:=release_3_0_17
PKG_RELEASE:=2
PKG_RELEASE:=3

PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
Expand Down Expand Up @@ -85,6 +85,8 @@ define Package/freeradius3-default
+freeradius3-mod-preprocess \
+freeradius3-mod-radutmp \
+freeradius3-mod-realm \
+freeradius3-mod-sql \
+freeradius3-mod-sql-sqlite \
+freeradius3-mod-unix
TITLE:=Modules needed for Radius default configuration
endef
Expand Down Expand Up @@ -349,7 +351,27 @@ define Package/freeradius3-mod-realm/conffiles
/etc/freeradius3/mods-enabled/realm
endef

# SQL support has not been ported
# SQL support has not been completly ported
define Package/freeradius3-mod-sql
$(call Package/freeradius3/Default)
DEPENDS:=freeradius3
TITLE:=Base SQL module
endef

define Package/freeradius3-mod-sql/conffiles
/etc/freeradius3/mods-available/sql
endef

define Package/freeradius3-mod-sql-sqlite
$(call Package/freeradius3/Default)
DEPENDS:=freeradius3-mod-sql +libsqlite3
TITLE:=SQLite module
endef

define Package/freeradius3-mod-sql-sqlite/conffiles
/etc/freeradius3/mods-config/sql/main/sqlite/queries.conf
/etc/freeradius3/mods-config/sql/main/sqlite/schema.sql
endef

define Package/freeradius3-mod-radutmp
$(call Package/freeradius3/Default)
Expand Down Expand Up @@ -420,15 +442,13 @@ CONFIGURE_ARGS+= \
--without-rlm_ruby \
--without-rlm_securid \
--without-rlm_smsotp \
--without-rlm_sql \
--without-rlm_sql_db2 \
--without-rlm_sql_firebird \
--without-rlm_sql_freetds \
--without-rlm_sql_iodbc \
--without-rlm_sql_mysql \
--without-rlm_sql_oracle \
--without-rlm_sql_postgresql \
--without-rlm_sql_sqlite \
--without-rlm_sql_unixodbc \
--without-rlm_sqlcounter \
--without-rlm_sqlhpwippool \
Expand Down Expand Up @@ -490,6 +510,15 @@ else
CONFIGURE_ARGS+= --without-rlm_radutmp
endif

ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql-sqlite),)
CONFIGURE_ARGS+= \
--with-rlm_sql_sqlite \
--with-sqlite-include-dir="$(STAGING_DIR)/usr/include" \
--with-sqlite-lib-dir="$(STAGING_DIR)/usr/lib"
else
CONFIGURE_ARGS+= --without-rlm_sql_sqlite
endif

ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-unix),)
CONFIGURE_ARGS+= --with-rlm_unix
else
Expand Down Expand Up @@ -634,5 +663,7 @@ $(eval $(call BuildPlugin,freeradius3-mod-passwd,rlm_passwd,))
$(eval $(call BuildPlugin,freeradius3-mod-preprocess,rlm_preprocess,))
$(eval $(call BuildPlugin,freeradius3-mod-radutmp,rlm_radutmp,))
$(eval $(call BuildPlugin,freeradius3-mod-realm,rlm_realm,))
$(eval $(call BuildPlugin,freeradius3-mod-sql,rlm_sql rlm_sql_null,))
$(eval $(call BuildPlugin,freeradius3-mod-sql-sqlite,rlm_sql_sqlite,))
$(eval $(call BuildPlugin,freeradius3-mod-unix,rlm_unix,))
$(eval $(call BuildPackage,freeradius3-utils))