net/onedrive: Update to 2.5.4

From this version, libinotify linking is officially supported for
FreeBSD and OpenBSD, so ports local patches are no more needed.

Changelog: https://github.com/abraunegg/onedrive/blob/v2.5.4/changelog.md

PR:		284555
This commit is contained in:
Hiroo Ono 2025-02-09 13:18:05 +01:00 committed by Daniel Engberg
parent c108cb5bde
commit 6e53b218fd
6 changed files with 5 additions and 155 deletions

View file

@ -1,6 +1,6 @@
PORTNAME= onedrive
DISTVERSIONPREFIX= v
DISTVERSION= 2.5.2
DISTVERSION= 2.5.4
CATEGORIES= net
MAINTAINER= hiroo.ono+freebsd@gmail.com
@ -20,7 +20,6 @@ USE_GITHUB= yes
GH_ACCOUNT= abraunegg
GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
PORTDOCS= *
@ -40,10 +39,8 @@ NOTIFY_CONFIGURE_ENABLE= notifications
ONEDRIVE_LOGDIR= /var/log/${PORTNAME}
post-extract:
${CP} ${FILESDIR}/freebsd_inotify.d ${WRKSRC}/src
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/onedrive
${INSTALL} -d -m 0775 ${STAGEDIR}${ONEDRIVE_LOGDIR}
.include <bsd.port.mk>

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1727676524
SHA256 (abraunegg-onedrive-v2.5.2_GH0.tar.gz) = 2abad70160853a25b6784025ef7e7636fcb077b5623c8fe521df9e3aa8089a89
SIZE (abraunegg-onedrive-v2.5.2_GH0.tar.gz) = 4129032
TIMESTAMP = 1738636238
SHA256 (abraunegg-onedrive-v2.5.4_GH0.tar.gz) = c11605fb0ad1b5cd1da9a34ebfb036bd743d42b84417385cf3f077383970f426
SIZE (abraunegg-onedrive-v2.5.4_GH0.tar.gz) = 4169512

View file

@ -1,70 +0,0 @@
/**
* D header file for libinotify (incomplete)
*/
module freebsd_inotify;
import core.stdc.stdint;
struct inotify_event
{
int wd; /* Watch descriptor. */
uint32_t mask; /* Watch mask. */
uint32_t cookie; /* Cookie to synchronize two events. */
uint32_t len; /* Length (including NULLs) of name. */
char[0] name; /* Name. */
@disable this(this);
};
/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */
enum IN_ACCESS = 0x00000001; /* File was accessed. */
enum IN_MODIFY = 0x00000002; /* File was modified. */
enum IN_ATTRIB = 0x00000004; /* Metadata changed. */
enum IN_CLOSE_WRITE = 0x00000008; /* Writtable file was closed. */
enum IN_CLOSE_NOWRITE = 0x00000010; /* Unwrittable file closed. */
enum IN_CLOSE = (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE); /* Close. */
enum IN_OPEN = 0x00000020; /* File was opened. */
enum IN_MOVED_FROM = 0x00000040; /* File was moved from X. */
enum IN_MOVED_TO = 0x00000080; /* File was moved to Y. */
enum IN_MOVE = (IN_MOVED_FROM | IN_MOVED_TO); /* Moves. */
enum IN_CREATE = 0x00000100; /* Subfile was created. */
enum IN_DELETE = 0x00000200; /* Subfile was deleted. */
enum IN_DELETE_SELF = 0x00000400; /* Self was deleted. */
enum IN_MOVE_SELF = 0x00000800; /* Self was moved. */
/* Additional events and flags. Some of these flags are unsupported,
but still should be present */
enum IN_UNMOUNT = 0x00002000; /* Backing fs was unmounted. */
enum IN_Q_OVERFLOW = 0x00004000; /* Event queued overflowed. */
enum IN_IGNORED = 0x00008000; /* File was ignored. */
enum IN_ONLYDIR = 0x01000000; /* Only watch the path if it is a
directory. */
enum IN_DONT_FOLLOW = 0x02000000; /* Do not follow a sym link. */
enum IN_EXCL_UNLINK = 0x04000000; /* Exclude events on unlinked
objects. */
enum IN_MASK_ADD = 0x20000000; /* Add to the mask of an already
existing watch. */
enum IN_ISDIR = 0x40000000; /* Event occurred against dir. */
enum IN_ONESHOT = 0x80000000; /* Only send event once. */
enum IN_ALL_EVENTS = (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | IN_MOVE_SELF | IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF);
/* Create and initialize inotify-kqueue instance. */
extern (C) int inotify_init ();
/* Create and initialize inotify-kqueue instance. */
extern (C) int inotify_init1 (int flags);
/* Add watch of object NAME to inotify-kqueue instance FD. Notify about
events specified by MASK. */
extern (C) int inotify_add_watch (int fd, const char *name, uint32_t mask);
/* Remove the watch specified by WD from the inotify instance FD. */
extern (C) int inotify_rm_watch (int fd, int wd);
/* Libinotify specific. Set inotify instance parameter. */
extern (C) int inotify_set_param (int fd, int param, intptr_t value);

View file

@ -1,55 +0,0 @@
--- Makefile.in.orig 2024-09-16 01:14:46 UTC
+++ Makefile.in
@@ -25,6 +25,7 @@ notify_LIBS = @notify_LIBS@
curl_LIBS = @curl_LIBS@
sqlite_LIBS = @sqlite_LIBS@
notify_LIBS = @notify_LIBS@
+inotify_LIBS = @inotify_LIBS@
COMPLETIONS = @COMPLETIONS@
BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@
ZSH_COMPLETION_DIR = @ZSH_COMPLETION_DIR@
@@ -84,6 +85,7 @@ SOURCES = \
src/sqlite.d \
src/clientSideFiltering.d \
src/monitor.d \
+ src/freebsd_inotify.d \
src/arsd/cgi.d
ifeq ($(NOTIFICATIONS),yes)
@@ -107,14 +109,15 @@ onedrive: $(SOURCES)
else \
echo $(version) > version ; \
fi
- $(DC) $(DCFLAGS) $(addprefix -L,$(curl_LIBS)) $(addprefix -L,$(sqlite_LIBS)) $(addprefix -L,$(notify_LIBS)) -L-ldl $(SOURCES) -of$@
+ $(DC) $(DCFLAGS) $(addprefix -L,$(curl_LIBS)) $(addprefix -L,$(sqlite_LIBS)) $(addprefix -L,$(notify_LIBS)) -$(addprefix -L,$(inotify_LIBS)) -L-ldl $(SOURCES) -of$@
install: all
- $(INSTALL) -D onedrive $(DESTDIR)$(bindir)/onedrive
- $(INSTALL) -D -m 0644 onedrive.1 $(DESTDIR)$(mandir)/man1/onedrive.1
- $(INSTALL) -D -m 0644 contrib/logrotate/onedrive.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/onedrive
+ $(INSTALL) -s onedrive $(DESTDIR)$(bindir)/onedrive
+ $(INSTALL) -m 0644 onedrive.1 $(DESTDIR)$(mandir)/man1/onedrive.1
+ mkdir -p $(DESTDIR)$(sysconfdir)/logrotate.d
+ $(INSTALL) -m 0644 contrib/logrotate/onedrive.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/onedrive
mkdir -p $(DESTDIR)$(docdir)
- $(INSTALL) -D -m 0644 $(DOCFILES) $(DESTDIR)$(docdir)
+ $(INSTALL) -m 0644 $(DOCFILES) $(DESTDIR)$(docdir)
ifeq ($(HAVE_SYSTEMD),yes)
$(INSTALL) -d -m 0755 $(DESTDIR)$(systemduserunitdir) $(DESTDIR)$(systemdsystemunitdir)
ifeq ($(RHEL),1)
@@ -131,9 +134,12 @@ ifeq ($(COMPLETIONS),yes)
endif
endif
ifeq ($(COMPLETIONS),yes)
- $(INSTALL) -D -m 0644 contrib/completions/complete.zsh $(DESTDIR)$(ZSH_COMPLETION_DIR)/_onedrive
- $(INSTALL) -D -m 0644 contrib/completions/complete.bash $(DESTDIR)$(BASH_COMPLETION_DIR)/onedrive
- $(INSTALL) -D -m 0644 contrib/completions/complete.fish $(DESTDIR)$(FISH_COMPLETION_DIR)/onedrive.fish
+ mkdir -p $(DESTDIR)$(ZSH_COMPLETION_DIR)
+ $(INSTALL) -m 0644 contrib/completions/complete.zsh $(DESTDIR)$(ZSH_COMPLETION_DIR)/_onedrive
+ mkdir -p $(DESTDIR)$(BASH_COMPLETION_DIR)
+ $(INSTALL) -m 0644 contrib/completions/complete.bash $(DESTDIR)$(BASH_COMPLETION_DIR)/onedrive
+ mkdir -p $(DESTDIR)$(FISH_COMPLETION_DIR)
+ $(INSTALL) -m 0644 contrib/completions/complete.fish $(DESTDIR)$(FISH_COMPLETION_DIR)/onedrive.fish
endif
uninstall:

View file

@ -1,10 +0,0 @@
--- configure.ac.orig 2020-04-21 17:07:18 UTC
+++ configure.ac
@@ -144,6 +144,7 @@
dnl Check for required modules: curl and sqlite at the moment
PKG_CHECK_MODULES([curl],[libcurl])
PKG_CHECK_MODULES([sqlite],[sqlite3])
+PKG_CHECK_MODULES([inotify],[libinotify])
dnl
dnl systemd and unit file directories

View file

@ -1,12 +0,0 @@
--- src/monitor.d.orig 2024-09-18 07:16:29 UTC
+++ src/monitor.d
@@ -4,7 +4,8 @@ import core.stdc.stdlib;
// What does this module require to function?
import core.stdc.errno;
import core.stdc.stdlib;
-import core.sys.linux.sys.inotify;
+// import core.sys.linux.sys.inotify;
+import freebsd_inotify;
import core.sys.posix.poll;
import core.sys.posix.unistd;
import core.sys.posix.sys.select;