From 7d4e59f3e7c2edc470fd4aa4c5b1f0429aaab8a6 Mon Sep 17 00:00:00 2001 From: ngn Date: Wed, 21 Aug 2024 07:27:35 +0300 Subject: [PATCH] new: httpd, pooler and mirp --- src/apr-util/.gitignore | 3 + src/apr-util/changes.md | 2 + src/apr-util/pkg.sh | 32 ++++ src/apr/.gitignore | 3 + src/apr/changes.md | 2 + src/apr/pkg.sh | 25 +++ src/httpd/.gitignore | 3 + src/httpd/changes.md | 2 + src/httpd/httpd-2.4.58-layout.patch | 259 ++++++++++++++++++++++++++++ src/httpd/httpd.service | 15 ++ src/httpd/pkg.sh | 76 ++++++++ src/mirp/.gitignore | 3 + src/mirp/changes.md | 5 + src/mirp/pkg.sh | 22 +++ src/pooler/.gitignore | 3 + src/pooler/changes.md | 5 + src/pooler/pkg.sh | 40 +++++ src/pooler/pooler.service | 11 ++ 18 files changed, 511 insertions(+) create mode 100644 src/apr-util/.gitignore create mode 100644 src/apr-util/changes.md create mode 100644 src/apr-util/pkg.sh create mode 100644 src/apr/.gitignore create mode 100644 src/apr/changes.md create mode 100644 src/apr/pkg.sh create mode 100644 src/httpd/.gitignore create mode 100644 src/httpd/changes.md create mode 100644 src/httpd/httpd-2.4.58-layout.patch create mode 100644 src/httpd/httpd.service create mode 100644 src/httpd/pkg.sh create mode 100644 src/mirp/.gitignore create mode 100644 src/mirp/changes.md create mode 100644 src/mirp/pkg.sh create mode 100644 src/pooler/.gitignore create mode 100644 src/pooler/changes.md create mode 100644 src/pooler/pkg.sh create mode 100644 src/pooler/pooler.service diff --git a/src/apr-util/.gitignore b/src/apr-util/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/apr-util/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/apr-util/changes.md b/src/apr-util/changes.md new file mode 100644 index 0000000..252eead --- /dev/null +++ b/src/apr-util/changes.md @@ -0,0 +1,2 @@ +# 1.6.3 +First version diff --git a/src/apr-util/pkg.sh b/src/apr-util/pkg.sh new file mode 100644 index 0000000..05e11ee --- /dev/null +++ b/src/apr-util/pkg.sh @@ -0,0 +1,32 @@ +# general info +NAME="apr-util" +DESC="Apache Portable Runtime utility library" +VERSION="1.6.3" + +# required files +FILES=("https://archive.apache.org/dist/apr/apr-util-${VERSION}.tar.bz2") +HASHES=("b6e8c9b31d938fe5797ceb0d1ff2eb69") + +# install and build depends +DEPENDS=("apr" "expat" "libxcrypt") +BUILD=( + "gdbm" "openldap" "nss" + "openssl" "python3" "sqlite" + "unixodbc" +) + +PACKAGE(){ + tar xf "${NAME}-${VERSION}.tar.bz2" + cd "${NAME}-${VERSION}" + + ./configure --prefix=/usr \ + --with-apr=/usr \ + --with-gdbm=/usr \ + --with-openssl=/usr \ + --with-ldap \ + --with-crypto + make + make DESTDIR="${ROOTDIR}" install + + cd .. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/apr/.gitignore b/src/apr/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/apr/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/apr/changes.md b/src/apr/changes.md new file mode 100644 index 0000000..166cfa8 --- /dev/null +++ b/src/apr/changes.md @@ -0,0 +1,2 @@ +# 1.7.4 +First version diff --git a/src/apr/pkg.sh b/src/apr/pkg.sh new file mode 100644 index 0000000..1c3f209 --- /dev/null +++ b/src/apr/pkg.sh @@ -0,0 +1,25 @@ +# general info +NAME="apr" +DESC="Apache Portable Runtime" +VERSION="1.7.4" + +# required files +FILES=("https://archive.apache.org/dist/apr/apr-${VERSION}.tar.bz2") +HASHES=("f8a62f3984898ba0ea8b6f26b851cb99") + +# install and build depends +DEPENDS=("util-linux") +BUILD=("python3") + +PACKAGE(){ + tar xf "${NAME}-${VERSION}.tar.bz2" + cd "${NAME}-${VERSION}" + + ./configure --prefix=/usr \ + --disable-static \ + --with-installbuilddir=/usr/share/apr-1/build + make + make DESTDIR="${ROOTDIR}" install + + cd .. && rm -r "${NAME}-${VERSION}" +} diff --git a/src/httpd/.gitignore b/src/httpd/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/httpd/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/httpd/changes.md b/src/httpd/changes.md new file mode 100644 index 0000000..011ab6d --- /dev/null +++ b/src/httpd/changes.md @@ -0,0 +1,2 @@ +# 2.4.58 +First version diff --git a/src/httpd/httpd-2.4.58-layout.patch b/src/httpd/httpd-2.4.58-layout.patch new file mode 100644 index 0000000..ff29855 --- /dev/null +++ b/src/httpd/httpd-2.4.58-layout.patch @@ -0,0 +1,259 @@ +diff -Naur a/config.layout b/config.layout +--- a/config.layout 2020-02-21 01:39:22.000000000 +0100 ++++ b/config.layout 2022-03-19 10:58:09.199098421 +0100 +@@ -9,6 +9,30 @@ + ## (This may become a configurable parameter at some point.) + ## + ++ ++ prefix: ++ exec_prefix: ${prefix}/usr ++ bindir: ${exec_prefix}/bin ++ sbindir: ${exec_prefix}/sbin ++ libdir: ${exec_prefix}/lib ++ libexecdir: ${exec_prefix}/lib/httpd/modules ++ mandir: ${exec_prefix}/share/man ++ sysconfdir: ${prefix}/etc/httpd ++ datadir: ${exec_prefix}/share/httpd ++ iconsdir: ${datadir}/icons ++ htdocsdir: ${prefix}/srv/www ++ manualdir: ${datadir}/manual ++ cgidir: ${exec_prefix}/lib/httpd/cgi-bin ++ includedir: ${exec_prefix}/include/httpd ++ localstatedir: ${prefix}/var/lock/httpd ++ runtimedir: ${prefix}/run/httpd ++ logfiledir: ${prefix}/var/log/httpd ++ proxycachedir: ${prefix}/var/cache/httpd/proxy ++ infodir: ${exec_prefix}/share/info ++ installbuilddir: ${datadir}/build ++ errordir: ${datadir}/error ++ ++ + # Classical Apache path layout. + + prefix: /usr/local/apache2 + +diff -Naur a/configure.in b/configure.in +--- a/configure.in 2022-02-24 23:18:42.000000000 +0100 ++++ b/configure.in 2022-03-19 10:58:09.202098385 +0100 +@@ -901,11 +901,11 @@ + echo $MODLIST | $AWK -f $srcdir/build/build-modules-c.awk > modules.c + + APR_EXPAND_VAR(ap_prefix, $prefix) +-AC_DEFINE_UNQUOTED(HTTPD_ROOT, "${ap_prefix}", ++AC_DEFINE_UNQUOTED(HTTPD_ROOT, "/etc/httpd", + [Root directory of the Apache install area]) +-AC_DEFINE_UNQUOTED(SERVER_CONFIG_FILE, "${rel_sysconfdir}/${progname}.conf", ++AC_DEFINE_UNQUOTED(SERVER_CONFIG_FILE, "${progname}.conf", + [Location of the config file, relative to the Apache root directory]) +-AC_DEFINE_UNQUOTED(AP_TYPES_CONFIG_FILE, "${rel_sysconfdir}/mime.types", ++AC_DEFINE_UNQUOTED(AP_TYPES_CONFIG_FILE, "mime.types", + [Location of the MIME types config file, relative to the Apache root directory]) + + perlbin=`$ac_aux_dir/PrintPath perl` + +diff -Naur a/docs/conf/httpd.conf.in b/docs/conf/httpd.conf.in +--- a/docs/conf/httpd.conf.in 2016-08-17 01:12:07.000000000 +0200 ++++ b/docs/conf/httpd.conf.in 2022-03-19 10:58:09.203098373 +0100 +@@ -28,7 +28,7 @@ + # same ServerRoot for multiple httpd daemons, you will need to change at + # least PidFile. + # +-ServerRoot "@@ServerRoot@@" ++#ServerRoot "@@ServerRoot@@" + + # + # Mutex: Allows you to set the mutex mechanism and mutex file directory +@@ -74,8 +74,8 @@ + # It is usually good practice to create a dedicated user and group for + # running httpd, as with most system services. + # +-User daemon +-Group daemon ++User httpd ++Group httpd + + + +@@ -96,7 +96,7 @@ + # e-mailed. This address appears on some server-generated pages, such + # as error documents. e.g. admin@your-domain.com + # +-ServerAdmin you@example.com ++ServerAdmin admin@localhost + + # + # ServerName gives the name and port that the server uses to identify itself. +@@ -105,7 +105,7 @@ + # + # If your host doesn't have a registered DNS name, enter its IP address here. + # +-#ServerName www.example.com:@@Port@@ ++#ServerName localhost:@@Port@@ + + # + # Deny access to the entirety of your server's filesystem. You must +@@ -181,7 +181,7 @@ + # logged here. If you *do* define an error logfile for a + # container, that host's errors will be logged there and not here. + # +-ErrorLog "@rel_logfiledir@/error_log" ++ErrorLog "@rel_logfiledir@/error.log" + + # + # LogLevel: Control the number of messages logged to the error_log. +@@ -210,13 +210,13 @@ + # define per- access logfiles, transactions will be + # logged therein and *not* in this file. + # +- CustomLog "@rel_logfiledir@/access_log" common ++ CustomLog "@rel_logfiledir@/access.log" common + + # + # If you prefer a logfile with access, agent, and referer information + # (Combined Logfile Format) you can use the following directive. + # +- #CustomLog "@rel_logfiledir@/access_log" combined ++ #CustomLog "@rel_logfiledir@/access.log" combined + + + +diff -Naur a/include/ap_config_layout.h.in b/include/ap_config_layout.h.in +--- a/include/ap_config_layout.h.in 2006-07-11 22:55:32.000000000 +0200 ++++ b/include/ap_config_layout.h.in 2022-03-19 10:58:09.203098373 +0100 +@@ -60,5 +60,6 @@ + #define DEFAULT_REL_LOGFILEDIR "@rel_logfiledir@" + #define DEFAULT_EXP_PROXYCACHEDIR "@exp_proxycachedir@" + #define DEFAULT_REL_PROXYCACHEDIR "@rel_proxycachedir@" ++#define DEFAULT_PIDLOG "/run/httpd/httpd.pid" + + #endif /* AP_CONFIG_LAYOUT_H */ +diff -Naur a/include/httpd.h b/include/httpd.h +--- a/include/httpd.h 2022-03-09 15:04:15.000000000 +0100 ++++ b/include/httpd.h 2022-03-19 10:58:09.203098373 +0100 +@@ -110,7 +110,7 @@ + #define DOCUMENT_LOCATION HTTPD_ROOT "/docs" + #else + /* Set default for non OS/2 file system */ +-#define DOCUMENT_LOCATION HTTPD_ROOT "/htdocs" ++#define DOCUMENT_LOCATION "/srv/www" + #endif + #endif /* DOCUMENT_LOCATION */ + +diff -Naur a/Makefile.in b/Makefile.in +--- a/Makefile.in 2021-06-02 09:11:47.000000000 +0200 ++++ b/Makefile.in 2022-03-19 11:07:06.441588175 +0100 +@@ -121,9 +121,9 @@ + done ; \ + done ; \ + if test -f "$(builddir)/envvars-std"; then \ +- cp -p envvars-std $(DESTDIR)$(sbindir); \ +- if test ! -f $(DESTDIR)$(sbindir)/envvars; then \ +- cp -p envvars-std $(DESTDIR)$(sbindir)/envvars ; \ ++ install -m644 envvars-std $(DESTDIR)$(installbuilddir); \ ++ if test ! -f $(DESTDIR)$(sysconfdir)/envvars; then \ ++ install -m644 envvars-std $(DESTDIR)$(sysconfdir)/envvars; \ + fi ; \ + fi + +@@ -195,7 +195,7 @@ + if test -d $(htdocs-srcdir) && test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \ + $(RSYNC) --exclude .svn -rlpt --numeric-ids $(htdocs-srcdir)/ $(DESTDIR)$(htdocsdir)/; \ + else \ +- test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir)) ; \ ++ test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -r * $(DESTDIR)$(htdocsdir)) ; \ + cd $(DESTDIR)$(htdocsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \ + fi; \ + fi +@@ -206,7 +206,7 @@ + else \ + echo Installing error documents ; \ + $(MKINSTALLDIRS) $(DESTDIR)$(errordir) ; \ +- cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir) ; \ ++ cd $(top_srcdir)/docs/error && cp -r * $(DESTDIR)$(errordir) ; \ + test "x$(errordir)" != "x" && cd $(DESTDIR)$(errordir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \ + fi + +@@ -216,7 +216,7 @@ + else \ + echo Installing icons ; \ + $(MKINSTALLDIRS) $(DESTDIR)$(iconsdir) ; \ +- cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir) ; \ ++ cd $(top_srcdir)/docs/icons && cp -r * $(DESTDIR)$(iconsdir) ; \ + test "x$(iconsdir)" != "x" && cd $(DESTDIR)$(iconsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \ + fi + +@@ -226,7 +226,7 @@ + else \ + echo Installing CGIs ; \ + $(MKINSTALLDIRS) $(DESTDIR)$(cgidir) ; \ +- cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir) ; \ ++ cd $(top_srcdir)/docs/cgi-examples && cp -r * $(DESTDIR)$(cgidir) ; \ + test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \ + fi + +@@ -280,12 +280,12 @@ + @test -d $(DESTDIR)$(mandir)/man1 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1 + @test -d $(DESTDIR)$(mandir)/man8 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man8 + @test -d $(DESTDIR)$(manualdir) || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir) +- @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1 +- @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8 ++ @cp $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1 ++ @cp $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8 + @if test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \ + $(RSYNC) --exclude .svn -rlpt --numeric-ids $(top_srcdir)/docs/manual/ $(DESTDIR)$(manualdir)/; \ + else \ +- cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir); \ ++ cd $(top_srcdir)/docs/manual && cp -r * $(DESTDIR)$(manualdir); \ + cd $(DESTDIR)$(manualdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \ + fi + +diff -Naur a/support/apachectl.in b/support/apachectl.in +--- a/support/apachectl.in 2012-02-01 04:47:28.000000000 +0100 ++++ b/support/apachectl.in 2022-03-19 10:58:09.204098361 +0100 +@@ -45,8 +45,8 @@ + HTTPD='@exp_sbindir@/@progname@' + # + # pick up any necessary environment variables +-if test -f @exp_sbindir@/envvars; then +- . @exp_sbindir@/envvars ++if test -f @exp_sysconfdir@/envvars; then ++ . @exp_sysconfdir@/envvars + fi + # + # a command that outputs a formatted text version of the HTML at the +diff -Naur a/support/Makefile.in b/support/Makefile.in +--- a/support/Makefile.in 2018-02-09 11:17:30.000000000 +0100 ++++ b/support/Makefile.in 2022-03-19 11:10:11.799345130 +0100 +@@ -16,23 +16,23 @@ + @test -d $(DESTDIR)$(bindir) || $(MKINSTALLDIRS) $(DESTDIR)$(bindir) + @test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir) + @test -d $(DESTDIR)$(libexecdir) || $(MKINSTALLDIRS) $(DESTDIR)$(libexecdir) +- @cp -p $(top_builddir)/server/httpd.exp $(DESTDIR)$(libexecdir) ++ @test -d $(DESTDIR)$(sysconfdir) || $(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir) ++ @test -d $(DESTDIR)$(installbuilddir) || $(MKINSTALLDIRS) $(DESTDIR)$(installbuilddir) ++ @install -m644 $(top_builddir)/server/httpd.exp $(DESTDIR)$(libexecdir) + @for i in apxs dbmmanage; do \ + if test -f "$(builddir)/$$i"; then \ +- cp -p $$i $(DESTDIR)$(bindir); \ +- chmod 755 $(DESTDIR)$(bindir)/$$i; \ ++ install -m755 $$i $(DESTDIR)$(bindir);\ + fi ; \ + done + @for i in apachectl; do \ + if test -f "$(builddir)/$$i"; then \ +- cp -p $$i $(DESTDIR)$(sbindir); \ +- chmod 755 $(DESTDIR)$(sbindir)/$$i; \ ++ install -m755 $$i $(DESTDIR)$(sbindir);\ + fi ; \ + done + @if test -f "$(builddir)/envvars-std"; then \ +- cp -p envvars-std $(DESTDIR)$(sbindir); \ +- if test ! -f $(DESTDIR)$(sbindir)/envvars; then \ +- cp -p envvars-std $(DESTDIR)$(sbindir)/envvars ; \ ++ install -m644 envvars-std $(DESTDIR)$(installbuilddir); \ ++ if test ! -f $(DESTDIR)$(sysconfdir)/envvars; then \ ++ install -m644 envvars-std $(DESTDIR)$(sysconfdir)/envvars; \ + fi ; \ + fi + diff --git a/src/httpd/httpd.service b/src/httpd/httpd.service new file mode 100644 index 0000000..67805ff --- /dev/null +++ b/src/httpd/httpd.service @@ -0,0 +1,15 @@ +[Unit] +Description=Apache Web Server +After=network.target remote-fs.target nss-lookup.target + +[Service] +Type=simple +ExecStart=/usr/bin/httpd -k start -DFOREGROUND +ExecStop=/usr/bin/httpd -k graceful-stop +ExecReload=/usr/bin/httpd -k graceful +PrivateTmp=true +LimitNOFILE=infinity +KillMode=mixed + +[Install] +WantedBy=multi-user.target diff --git a/src/httpd/pkg.sh b/src/httpd/pkg.sh new file mode 100644 index 0000000..fd9e10d --- /dev/null +++ b/src/httpd/pkg.sh @@ -0,0 +1,76 @@ +# general info +NAME="httpd" +DESC="Apache HTTP server" +VERSION="2.4.58" + +# required files +FILES=( + "https://archive.apache.org/dist/httpd/httpd-${VERSION}.tar.bz2" + "httpd-${VERSION}-layout.patch" + "httpd.service" +) +HASHES=( + "30377ec4d7fb8361e1d1f2ab3158b467" + "507e758614da8b0222aedb8a92d2222246f513428166de841e435dbb254bb2b6" + "f574bac6d5f398e7a649fc0e1ca66ff01ad4ef34dac71258e93d8a9d9a2b3960" +) + +# install and build depends +DEPENDS=( + "apr-util" "nghttp2" "openssl" + "brotli" "jansson" "libxml2" + "libxcrypt" "pcre2" "zlib" + "lua" "lynx" "openldap" +) +BUILD=("systemd") + +PACKAGE(){ + tar xf "${NAME}-${VERSION}.tar.bz2" + cd "${NAME}-${VERSION}" + + patch -Np1 -i "../httpd-${VERSION}-layout.patch" + + sed '/dir.*CFG_PREFIX/s@^@#@' -i support/apxs.in + + sed -e '/HTTPD_ROOT/s:${ap_prefix}:/etc/httpd:' \ + -e '/SERVER_CONFIG_FILE/s:${rel_sysconfdir}/::' \ + -e '/AP_TYPES_CONFIG_FILE/s:${rel_sysconfdir}/::' \ + -i configure + + sed -e '/encoding.h/a # include ' \ + -i modules/filters/mod_xml2enc.c + + ./configure --enable-authnz-fcgi \ + --enable-layout=MatterLinux \ + --enable-mods-shared="all cgi" \ + --enable-mpms-shared=all \ + --enable-suexec= \ + --with-apr=/usr/bin/apr-1-config \ + --with-apr-util=/usr/bin/apu-1-config \ + --with-suexec-caller=httpd \ + --with-suexec-docroot=/srv/www \ + --with-suexec-logfile=/var/log/httpd/suexec.log \ + --with-suexec-bin=/usr/bin/suexec \ + --with-suexec-uidmin=99 --with-suexec-gidmin=99 \ + --with-suexec-userdir=public_html \ + --enable-ldap --enable-cache --enable-ssl \ + --with-ssl --enable-proxy --enable-proxy-connect \ + --enable-proxy-http --enable-proxy-ftp \ + --enable-cern-meta --enable-lua --enable-xml2enc \ + --enable-http2 --enable-brotli --enable-systemd \ + --with-pcre2 + make + make DESTDIR="${ROOTDIR}" install + install -Dm644 ../httpd.service "${ROOTDIR}/usr/lib/systemd/system/httpd.service" + install -Ddm755 "${ROOTDIR}/srv/www" + + cd .. && rm -r "${NAME}-${VERSION}" +} + +INSTALL(){ + groupadd -g 1025 httpd + useradd -c "Apache HTTP server" -d /srv/www -g httpd \ + -s /bin/false -u 1025 httpd + chown -v -R httpd:httpd /srv/www + exit 0 +} diff --git a/src/mirp/.gitignore b/src/mirp/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/mirp/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/mirp/changes.md b/src/mirp/changes.md new file mode 100644 index 0000000..b50a54f --- /dev/null +++ b/src/mirp/changes.md @@ -0,0 +1,5 @@ +# 24.01 +Updated to the latest upstream release + +# 24.00 +First version diff --git a/src/mirp/pkg.sh b/src/mirp/pkg.sh new file mode 100644 index 0000000..5cd6dc3 --- /dev/null +++ b/src/mirp/pkg.sh @@ -0,0 +1,22 @@ +# general info +NAME="mirp" +DESC="MPTP mirror tool" +VERSION="24.01" + +# required files +FILES=("https://git.matterlinux.xyz/Matter/mirp/archive/${VERSION}.tar.gz") +HASHES=("66fa6ea01ecf640582b78f38b953f8e9f859303511b3303653c43bd16ebe9835") + +# install and build depends +DEPENDS=("libmp") +BUILD=("gettext") + +PACKAGE(){ + tar xf "${VERSION}.tar.gz" + cd "${NAME}" + + make + make DESTDIR="${ROOTDIR}" install + + cd .. && rm -r "${NAME}" +} diff --git a/src/pooler/.gitignore b/src/pooler/.gitignore new file mode 100644 index 0000000..8b56c9f --- /dev/null +++ b/src/pooler/.gitignore @@ -0,0 +1,3 @@ +.cache/ +dist/ +root/ diff --git a/src/pooler/changes.md b/src/pooler/changes.md new file mode 100644 index 0000000..d6cee4b --- /dev/null +++ b/src/pooler/changes.md @@ -0,0 +1,5 @@ +# 24.02 +Updated to latest upstream release + +# 24.01 +First version diff --git a/src/pooler/pkg.sh b/src/pooler/pkg.sh new file mode 100644 index 0000000..d03edff --- /dev/null +++ b/src/pooler/pkg.sh @@ -0,0 +1,40 @@ +# general info +NAME="pooler" +DESC="Simple MPTP server for serving package pools" +VERSION="24.02" + +# required files +FILES=( + "https://git.matterlinux.xyz/Matter/pooler/archive/${VERSION}.tar.gz" + "pooler.service" +) +HASHES=( + "8acf72885dd840cb4565d5bea035206af3786da54b1718ae1af0427d08925e15" + "c33e084c1e5be884f174a17856f1704c280b54ae6c4da496f9ce1f207646d173" +) + +# install and build depends +DEPENDS=("libmp" "libinih") +BUILD=("gettext") + +PACKAGE(){ + tar xf "${VERSION}.tar.gz" + cd "${NAME}" + + make + make DESTDIR="${ROOTDIR}" install + + install -Dm644 ../pooler.service "${ROOTDIR}/usr/lib/systemd/system/pooler.service" + install -Ddm755 "${ROOTDIR}/srv/pools" + + cd .. && rm -r "${NAME}" +} + +INSTALL(){ + groupadd -g 1032 pooler + useradd -c "Pooler MPTP server" -d /srv/pools -g pooler \ + -s /bin/false -u 1032 pooler + chown -v -R pooler:pooler /srv/pools + chown -v -R pooler:pooler /etc/pooler + exit 0 +} diff --git a/src/pooler/pooler.service b/src/pooler/pooler.service new file mode 100644 index 0000000..93230fc --- /dev/null +++ b/src/pooler/pooler.service @@ -0,0 +1,11 @@ +[Unit] +Description=Pooler MPTP server +After=network.target remote-fs.target nss-lookup.target + +[Install] +WantedBy=multi-user.target + +[Service] +Type=simple +User=pooler +ExecStart=/usr/bin/pooler /etc/pooler/config.ini