From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1D1401382C5 for ; Sun, 14 Feb 2021 16:21:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 320A8E0917; Sun, 14 Feb 2021 16:21:18 +0000 (UTC) Received: from smail.fem.tu-ilmenau.de (smail.fem.tu-ilmenau.de [141.24.220.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E1356E0886 for ; Sun, 14 Feb 2021 16:21:17 +0000 (UTC) Received: from localhost.localdomain (dialin-ip-25-043.ilmenau.net [80.88.25.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smail.fem.tu-ilmenau.de (Postfix) with ESMTPSA id 16C942007D; Sun, 14 Feb 2021 17:21:13 +0100 (CET) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=fem.tu-ilmenau.de; s=30012001; t=1613319674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=47GiF/Vkce0LB2M9bb5v8X0c0GQrvkyNapFZ85wCrnI=; b=m7A+A8C8TzQvu0SsaSYLj+8MKBGB1wnXb6NdknFor026QI3dUhYqOuGRvXpZ7Q9p7kFKjG SeYqQYY/N3oYDxAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fem.tu-ilmenau.de; s=30012002; t=1613319674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=47GiF/Vkce0LB2M9bb5v8X0c0GQrvkyNapFZ85wCrnI=; b=WbbM4zzAYLHCuIRboP3KRCKVIcvJfF4mBEp3EYORRwuHY+SlW6jpC2m/6gN0HpUolWtLcC 9r/mIL+M5WBad/pJNRNXkFCYQeUh/1XY8ioRETXQC2EyUGa9OM3wHou30ReqcxvNhdWLZ/ TIowyJVME0mxoeB6aVOiJ5ljsV/opDVI0l+BdVS42ZLOwK8U+U5vnJCfTgVmW89Fu6R+nK S9Htze8bzJCkIaZ68Pzix7ITU7yBFE0M0xzLBnyWlXnpE0sVoljKQLRiXM8BXJSTQz5eju swWY1/Zof+rNUk5W2aN7wPDwjJN3g1/ocPBNZfHkvcVqkfKXN+uJ/+boIBnvjw== From: jonas.licht@fem.tu-ilmenau.de To: gentoo-dev@lists.gentoo.org Cc: Jonas Licht Subject: [gentoo-dev] [PATCH 0/3] [RFC] www-nginx/ category and nginx-module.eclass Date: Sun, 14 Feb 2021 17:20:34 +0100 Message-Id: <20210214162035.16786-1-jonas.licht@fem.tu-ilmenau.de> X-Mailer: git-send-email 2.26.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 36bd55ab-761c-4c73-b7e5-7e30f48e348b X-Archives-Hash: 1b2273b31f730f062f956f76234719a5 From: Jonas Licht Hi, as my personal need and which I read from Bugs #573710 and #648334 is to add support for external 3rd party modules to nginx. Currently all modules a included in the www-server/nginx ebuild and are build in into the nginx binary. Since around 5 years ago nginx added support for dynamic modules. These modules are build with the nginx build system and generates a shared object which can be loaded on runtime. The build config file of the module needs support for that too. To build a module as a dynamic module you need the nginx source code. On the configure step you add --add-dynamic-module= to the configure command. In the src_compile step you can use the Maketarget modules to only build the module. I have created an eclass which uses the nginx source code and the source code of the module. To use the same configure options as the running nginx, I obtain them by parsing nginx -V. After compiling and linking the eclass reads the config file of the module to get the correct so file name for installing. I've chossen /usr/$(get_libdir)/nginx/modules as installation path. If you now want to load the kaltura/nginx-vod-module, you simple add load_module lib64/nginx/modules/ngx_http_vod_module.so; to your nginx.conf file. As the module must be build for a specific version of nginx, my idea is to set the concatenation of the versions from nginx and the module as version of the module ebuild. I can simply parse that with ver_cut. The patches contains a new category www-nginx, to be the place for nginx module ebuilds, the nginx-module eclass and a sample consumer. I've also opened PR #16053 on Github. Best regards, Jonas Jonas Licht (3): profiles/categories: add www-nginx Add nginx-module.eclass www-nginx/nginx-vod-module: add new package eclass/nginx-module.eclass | 73 +++++++++++++++++++ profiles/categories | 1 + www-nginx/metadata.xml | 7 ++ www-nginx/nginx-vod-module/Manifest | 2 + www-nginx/nginx-vod-module/metadata.xml | 12 +++ .../nginx-vod-module-1.18.0.1.25.ebuild | 21 ++++++ 6 files changed, 116 insertions(+) create mode 100644 eclass/nginx-module.eclass create mode 100644 www-nginx/metadata.xml create mode 100644 www-nginx/nginx-vod-module/Manifest create mode 100644 www-nginx/nginx-vod-module/metadata.xml create mode 100644 www-nginx/nginx-vod-module/nginx-vod-module-1.18.0.1.25.ebuild -- 2.26.2