Commit feb056cc authored by Rene Ladan's avatar Rene Ladan
Browse files

www/seahub: Remove expired port

2026-08-31 www/seahub: The update of net-mgmt/seafile-server to a newer version is more difficult than expected, and the current version of www/seahub only runs on Django 4.2
parent cd55eef7
Loading
Loading
Loading
Loading
+1 −0
Changes for MOVED: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -5578,3 +5578,4 @@ audio/denemo||2026-08-31|Has expired: Outdated, current release is a decade old
textproc/logseq||2026-08-31|Has expired: Depends on expired devel/electron38
science/py-mdp||2026-08-31|Has expired: No upstream activity since 2020
devel/electron38||2026-08-31|Has expired: EOLed upstream, switch to newer version
www/seahub||2026-08-31|Has expired: The update of net-mgmt/seafile-server to a newer version is more difficult than expected, and the current version of www/seahub only runs on Django 4.2
+0 −1
Changes for www/Makefile: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -2568,7 +2568,6 @@
    SUBDIR += sarg
    SUBDIR += scloader
    SUBDIR += script4rss
    SUBDIR += seahub
    SUBDIR += selenium
    SUBDIR += serendipity
    SUBDIR += serf

www/seahub/Makefile

deleted100644 → 0
+0 −131
Changes for www/seahub/Makefile: 0 added lines, 131 removed lines.
Original line number Diff line number Diff line
PORTNAME=	seahub
DISTVERSIONPREFIX=	v
DISTVERSION=	${SEAHUB_VER}
DISTVERSIONSUFFIX=	-server
PORTREVISION=	2
CATEGORIES=	www

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Web frontend for Seafile
WWW=		https://github.com/haiwen/seahub

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/LICENSE.txt

DEPRECATED=	The update of net-mgmt/seafile-server to a newer version is more difficult than expected, and the current version of www/seahub only runs on Django 4.2
EXPIRATION_DATE=2026-08-31

BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django42>=0:www/py-django42@${PY_FLAVOR}

RUN_DEPENDS=	bash:shells/bash \
		${LOCALBASE}/www/haiwen/seafile-server/seafile/bin/seaf-server:net-mgmt/seafile-server \
		${PYTHON_PKGNAMEPREFIX}django42>=0:www/py-django42@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}dj42-django_statici18n>=2.3:www/py-dj42-django_statici18n@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}dj42-django-webpack-loader>=1.7:www/py-dj42-django-webpack-loader@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}dj42-django-picklefield>=3.1:www/py-dj42-django-picklefield@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}django-formtools>=2.3:www/py-django-formtools@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}dj42-djangosaml2>=1.5:www/py-dj42-djangosaml2@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}dj42-djangorestframework>=3.14:www/py-dj42-djangorestframework@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}python-dateutil>=2.8:devel/py-python-dateutil@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}pyjwt>=2.6:www/py-pyjwt@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}pycryptodome>=3.20:security/py-pycryptodome@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}python-cas>=1.6:security/py-python-cas@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}pysaml2>=7.2:security/py-pysaml2@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}requests>=2.31:www/py-requests@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}requests-oauthlib>=1.3:www/py-requests-oauthlib@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}future>=0.18:devel/py-future@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}gunicorn>=20.1:www/py-gunicorn@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}mysqlclient>=2.1:databases/py-mysqlclient@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}qrcode>=7.3:textproc/py-qrcode@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}pillow>=10.2:graphics/py-pillow@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}chardet>=5.1:textproc/py-chardet@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}cffi>=1.15:devel/py-cffi@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}dj42-django-simple-captcha>=0.5:www/py-dj42-django-simple-captcha@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}openpyxl>=3.0:textproc/py-openpyxl@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}markdown>=3.3:textproc/py-markdown@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}bleach>=5.0:www/py-bleach@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}python-ldap>=3.4:net/py-python-ldap@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}setuptools>=3.4:devel/py-setuptools@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}pytz>=3.4:devel/py-pytz@${PY_FLAVOR}

		#${PYTHON_PKGNAMEPREFIX}captcha>=0.4:www/py-captcha@${PY_FLAVOR} \

USES=		gettext-tools:build python shebangfix
USE_GITHUB=	yes
GH_ACCOUNT=	haiwen
SHEBANG_FILES=	*.sh tests/*.sh *.template *.py tools/*.py seahub/*.py \
		scripts/*.sh scripts/upgrade/*.sh *.sh scripts/build/*.py \
		scripts/*.py scripts/upgrade/*.py

NO_ARCH=	yes

OPTIONS_DEFINE=		SEAFOBJ SEAFDAV NLS
OPTIONS_DEFAULT=	SEAFOBJ SEAFDAV
OPTIONS_SUB=		yes

ALL_TARGET=	locale

SEAFOBJ_DESC=		Enable Seafile file object modeling support
SEAFDAV_DESC=		Enable Seafile WsgiDav-based support

SEAFOBJ_CONFIGURE_WITH=	seafobj
SEAFOBJ_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}seafobj>0:www/py-seafobj@${PY_FLAVOR}

SEAFDAV_CONFIGURE_WITH=	seafdav
SEAFDAV_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}seafdav>0:www/py-seafdav@${PY_FLAVOR}

NLS_USES=		gettext iconv
NLS_CONFIGURE_OFF=	--disable-nls

USE_RC_SUBR=	${PORTNAME}

SUB_FILES=	pkg-message

post-patch:
	${REINPLACE_CMD} -Ee "s|SEAFILE_VERSION = '[0-9]+\.[0-9]+\.[0-9]+'|SEAFILE_VERSION = '${SEAFILE_VER}'|" \
			 ${WRKSRC}/seahub/settings.py
	${REINPLACE_CMD} -e 's|##FIX_WWWDIR##|${PREFIX}/${HAIWENDIR}|' ${WRKSRC}/*.template
	${REINPLACE_CMD} -e 's|##FIX_SEALIB##|${PREFIX}/${SEALIB}|' ${WRKSRC}/*.template
	${REINPLACE_CMD} -e 's|##FIX_SITEPACKAGEDIR##|${PREFIX}/${SITEPACKAGEDIR}|' ${WRKSRC}/*.template
	${REINPLACE_CMD} -e 's|##PYTHON_VERSION##|${PYTHON_VERSION}|g' ${WRKSRC}/*.template
	${REINPLACE_CMD} -e 's|##FIX_LOCALBASE##|${LOCALBASE}|' ${WRKSRC}/*.template
	(cd ${WRKSRC}; (for file in run-seahub.sh.template \
		send_user_notifications.sh.template setenv.sh.template; do \
		${CP} $$file $${file%%.template}; \
		done))
	${REINPLACE_CMD} -E 's/stat.+\$$/stat -f %Su $$/' ${WRKSRC}/scripts/seafile.sh
	${REINPLACE_CMD} 's/%%SEAFILE_USER%%/${USERS:[1]}/ ; s/%%SEAFILE_GROUP%%/${GROUPS:[1]}/' \
			${WRKSRC}/scripts/setup-seafile.sh ${WRKSRC}/scripts/setup-seafile-mysql.py
# Fix python hardcodings
	${REINPLACE_CMD} 's/python3\.[0-9]/${PYTHON_VERSION}/g; s/python3 /${PYTHON_VERSION} / ; \
			s/PYTHON=python3/PYTHON=${PYTHON_VERSION}/ ; s|/python3/|/${PYTHON_VERSION}/|g' \
		${WRKSRC}/scripts/*.sh \
		${WRKSRC}/scripts/setup-seafile-mysql.py \
		${WRKSRC}/scripts/upgrade/upgrade_[7-9].[0-9]_[7-9].[0-9].sh
	${REINPLACE_CMD} 's/python/${PYTHON_VERSION}/' \
		${WRKSRC}/scripts/upgrade/regenerate_secret_key.sh
	${FIND} ${WRKSRC} -name "*.bak" -exec ${RM} {} \;
	${FIND} ${WRKSRC} -name "*.orig" -exec ${RM} {} \;
	${RM} ${WRKSRC}/.gitignore

do-install:
	@${MKDIR} ${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/runtime/ \
		${STAGEDIR}${PREFIX}/${SEAHUBDIR} ${STAGEDIR}${PREFIX}/${SEAHUB_DATA_DIR} \
		${STAGEDIR}${PREFIX}/${SEAHUB_DATA_DIR}/custom \
		${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/upgrade
	(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${SEAHUBDIR} \
	"! -name Makefile ! -name seahub.conf ! -name avatars \
	! -name default-non-register.jpg ! -name default.png ! -name groups")
	(cd ${WRKSRC}/media && ${COPYTREE_SHARE} ./avatars \
		 ${STAGEDIR}${PREFIX}/${SEAHUB_DATA_DIR})
	${LN} -fs ../../../seahub-data/avatars \
		${STAGEDIR}${PREFIX}/${SEAHUBDIR}/media/avatars
	${INSTALL_SCRIPT} ${WRKSRC}/scripts/*.[ps][yh] ${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}
	${INSTALL_SCRIPT} ${WRKSRC}/scripts/upgrade/*.[ps][yh] \
		${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/upgrade
	(cd ${WRKSRC}/scripts && \
		${COPYTREE_SHARE} "upgrade/sql" ${STAGEDIR}${PREFIX}/${SEAFILE_SERVER})

.include "${.CURDIR}/../../net-mgmt/seafile-server/Makefile.include"

.include <bsd.port.mk>

www/seahub/distinfo

deleted100644 → 0
+0 −3
Changes for www/seahub/distinfo: 0 added lines, 3 removed lines.
Original line number Diff line number Diff line
TIMESTAMP = 1723996819
SHA256 (haiwen-seahub-v11.0.12-server_GH0.tar.gz) = cf416030f113b1b857ca17ee1160259373da19e93605b828a0a73bc6b95fe127
SIZE (haiwen-seahub-v11.0.12-server_GH0.tar.gz) = 21331840
+0 −79
Changes for www/seahub/files/patch-scripts_setup-seafile-mysql.py: 0 added lines, 79 removed lines.
Original line number Diff line number Diff line
--- scripts/setup-seafile-mysql.py.orig	2020-01-19 18:47:28 UTC
+++ scripts/setup-seafile-mysql.py
@@ -23,6 +23,8 @@ try:
 except ImportError:
     pass
 
+import pwd
+import grp
 
 SERVER_MANUAL_HTTP = 'https://download.seafile.com/published/seafile-manual/home.md'
 
@@ -421,8 +423,6 @@ Please choose a way to initialize seafile databases:
         if not re.match(r'^[a-zA-Z0-9_\-\.]+$', host):
             raise InvalidAnswer('%s is not a valid host' % Utils.highlight(host))
 
-        if host == 'localhost':
-            host = '127.0.0.1'
         return host
 
     def ask_mysql_host(self):
@@ -1276,17 +1276,23 @@ limit_request_line = 8190
 
 class UserManualHandler(object):
     def __init__(self):
-        self.src_docs_dir = os.path.join(env_mgr.install_path, 'seafile', 'docs')
+        self.src_docs_dir = os.path.join(env_mgr.install_path, 'seafile', 'share', 'doc', 'seafile')
         self.library_template_dir = None
 
     def copy_user_manuals(self):
         self.library_template_dir = os.path.join(seafile_config.seafile_dir, 'library-template')
         Utils.must_mkdir(self.library_template_dir)
 
+        uid = pwd.getpwnam("%%SEAFILE_USER%%").pw_uid
+        gid = grp.getgrnam("%%SEAFILE_GROUP%%").gr_gid
+        os.chown(self.library_template_dir, uid, gid)
+
         pattern = os.path.join(self.src_docs_dir, '*.doc')
 
         for doc in glob.glob(pattern):
             Utils.must_copy(doc, self.library_template_dir)
+            doc_full = os.path.join(self.library_template_dir, os.path.basename(doc))
+            os.chown(doc_full, uid, gid)
 
 def report_config():
     print()
@@ -1351,6 +1357,8 @@ def create_seafile_server_symlink():
 def set_file_perm():
     filemode = 0o600
     dirmode = 0o700
+    uid = pwd.getpwnam("%%SEAFILE_USER%%").pw_uid
+    gid = grp.getgrnam("%%SEAFILE_GROUP%%").gr_gid
     files = [
         seahub_config.seahub_settings_py,
     ]
@@ -1362,8 +1370,10 @@ def set_file_perm():
     ]
     for fpath in files:
         os.chmod(fpath, filemode)
+        os.chown(fpath, uid, gid)
     for dpath in dirs:
         os.chmod(dpath, dirmode)
+        os.chown(dpath, uid, gid)
 
 env_mgr = EnvManager()
 ccnet_config = CcnetConfigurator()
@@ -1557,8 +1567,11 @@ def report_success():
 Your seafile server configuration has been finished successfully.
 -----------------------------------------------------------------
 
-run seafile server:     ./seafile.sh { start | stop | restart }
-run seahub  server:     ./seahub.sh  { start <port> | stop | restart <port> }
+run seafile server:     sysrc seafile_enable=YES
+                        service seafile { start | stop | restart }
+run seahub  server:     sysrc seahub_enable=YES
+                        service seahub { start | stop | restart }
+run reset-admin:        ./reset-admin.sh
 
 -----------------------------------------------------------------
 If you are behind a firewall, remember to allow input/output of these tcp ports:
Loading