Bug 195024 - [maintainer-update] net-mgmt/seafile: remove requirements of /proc
Summary: [maintainer-update] net-mgmt/seafile: remove requirements of /proc
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Many People
Assignee: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-15 02:00 UTC by Jingfeng Yan
Modified: 2014-11-28 08:15 UTC (History)
2 users (show)

See Also:


Attachments
svn diff (8.22 KB, patch)
2014-11-15 02:00 UTC, Jingfeng Yan
no flags Details | Diff
portlint -AC output (442 bytes, text/plain)
2014-11-15 02:01 UTC, Jingfeng Yan
no flags Details
test port log (284.56 KB, text/plain)
2014-11-17 15:55 UTC, Jingfeng Yan
no flags Details
svn diff (14.48 KB, patch)
2014-11-23 02:38 UTC, Jingfeng Yan
no flags Details | Diff
test port log (290.86 KB, text/plain)
2014-11-23 02:39 UTC, Jingfeng Yan
no flags Details
SVN diff (14.30 KB, patch)
2014-11-23 03:11 UTC, Jingfeng Yan
no flags Details | Diff
SVN diff (14.64 KB, patch)
2014-11-23 03:19 UTC, Jingfeng Yan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jingfeng Yan 2014-11-15 02:00:18 UTC
Created attachment 149424 [details]
svn diff

Based on Porter's handbook, the usage of /proc is not recommended.  The diff is implementing the pgrep-like code and using sysctl to get proc info.
Comment 1 Jingfeng Yan 2014-11-15 02:01:56 UTC
Created attachment 149425 [details]
portlint -AC output
Comment 2 John Marino freebsd_committer freebsd_triage 2014-11-15 11:16:23 UTC
this definitely limits the port to freebsd.

What's wrong with /proc other than handbook doesn't recommend it?  What's the reason the handbook doesn't recommend it?
Comment 3 Jingfeng Yan 2014-11-15 14:04:27 UTC
(In reply to John Marino from comment #2)
> this definitely limits the port to freebsd.
> 
> What's wrong with /proc other than handbook doesn't recommend it?  What's
> the reason the handbook doesn't recommend it? 

The porter handbook put this under this section:

"""
12.18. Avoiding Linuxisms
Do not use /proc if there are any other ways of getting the information. For example, setprogname(argv[0]) in main() and then getprogname(3) to know the executable name>.

Do not rely on behavior that is undocumented by POSIX.
...
"""

So, I think this is only reason. :)  BTW, although this port is not directly used by other BSDs, I got OpenBSD side contacts and suggest not using /proc, too.  OpenBSD once supported /proc, and then removed as I heard (from kernel at least, FUSE may be used).
Comment 4 Jingfeng Yan 2014-11-17 15:55:07 UTC
Created attachment 149520 [details]
test port log
Comment 5 John Marino freebsd_committer freebsd_triage 2014-11-19 09:39:24 UTC
Can you clarify?

Are you saying these seafile ports are for FreeBSD only?

The removal of /proc will probably mean these don't build on DragonFly anymore because DF-specific code wasn't added.
Comment 6 Jingfeng Yan 2014-11-19 15:51:53 UTC
(In reply to John Marino from comment #5)
> Can you clarify?
> 
> Are you saying these seafile ports are for FreeBSD only?
[JF] No.

> 
> The removal of /proc will probably mean these don't build on DragonFly
> anymore because DF-specific code wasn't added.
[JF] I will install a DrangoFlyBSD and make a try.  If you have identified any suspicious lib calls, which is not supported by DragonflyBSD, you can also let me know. I am also considering to add the test code for /proc existence.  If so, /proc fs is used; otherwise, we will use sysctl way. I will try to be back on Friday (US EST).
Comment 7 John Marino freebsd_committer freebsd_triage 2014-11-19 19:01:32 UTC
sysctl way is okay as long as it works for both freebsd and dragonfly.  let's keep this simple if we can.
Comment 8 John Marino freebsd_committer freebsd_triage 2014-11-20 14:06:50 UTC
This appears like a moot discussion.

The port won't build on DragonFly anyway because of this requirement:
LIB_DEPENDS= libfuse.so:${PORTSDIR}/sysutils/fusefs-libs


Using FUSE limits seafile to FreeBSD.
Comment 9 Jingfeng Yan 2014-11-20 14:51:01 UTC
(In reply to John Marino from comment #8)
> This appears like a moot discussion.
> 
> The port won't build on DragonFly anyway because of this requirement:
> LIB_DEPENDS= libfuse.so:${PORTSDIR}/sysutils/fusefs-libs
> 
> 
> Using FUSE limits seafile to FreeBSD.

Do you mean DragonFly miss fuse kernel side support? I thought I checked roughly before, but not go to too much detail. FreeBSD and NetBSD, and openBSD seems to fine. the founder of DragonFlyBSD started playing eithe fuse-like idea in 2006.  Could you give me some idea of why fuse is missing there, what I can help to make this port happen on DragonFly? 

You are DPort creator, and active on DragonFly. If you can have some evaluation, maybe we can have a way to make it work. At the same time, I will check why we need fuse.
Comment 10 Jingfeng Yan 2014-11-20 14:56:05 UTC
(In reply to Jingfeng Yan from comment #9)
> (In reply to John Marino from comment #8)
> > This appears like a moot discussion.
> > 
> > The port won't build on DragonFly anyway because of this requirement:
> > LIB_DEPENDS= libfuse.so:${PORTSDIR}/sysutils/fusefs-libs
> > 
> > 
> > Using FUSE limits seafile to FreeBSD.
> 
> Do you mean DragonFly miss fuse kernel side support? I thought I checked
> roughly before, but not go to too much detail. FreeBSD and NetBSD, and
> openBSD seems to fine. the founder of DragonFlyBSD started playing eithe
> fuse-like idea in 2006.  Could you give me some idea of why fuse is missing
> there, what I can help to make this port happen on DragonFly? 
> 
> You are DPort creator, and active on DragonFly. If you can have some
> evaluation, maybe we can have a way to make it work. At the same time, I
> will check why we need fuse.

BTW, if the fuse discussion not fit here, you can send email to me yan_jingfeng@yahoo.com.
Comment 11 John Marino freebsd_committer freebsd_triage 2014-11-20 15:03:38 UTC
(In reply to Jingfeng Yan from comment #9)
> BTW, if the fuse discussion not fit here, you can send email to me yan_jingfeng@yahoo.com.

It's fine here.

> Do you mean DragonFly miss fuse kernel side support? 

Correct - no kernel support for FUSE

> I thought I checked
> roughly before, but not go to too much detail. FreeBSD and NetBSD, and
> openBSD seems to fine. the founder of DragonFlyBSD started playing eithe
> fuse-like idea in 2006.  Could you give me some idea of why fuse is missing
> there, what I can help to make this port happen on DragonFly? 

FUSE basically doesn't work that well.  None of the FUSE ports are maintained (literally, they have no maintainer).  It's unclear who is responsible for FUSE maintenance in the kernel.  I think there's no designated person.  Basically, it barely works on FreeBSD, when there is a problem nobody is there to fix it, and DragonFly just decided it wasn't worth pursuing.  Maybe not officially, but nobody is making an effort to support it.


> You are DPort creator, and active on DragonFly. If you can have some
> evaluation, maybe we can have a way to make it work. At the same time, I
> will check why we need fuse.

I think the only hope is that FUSE is optional and that we don't set the option on DragonFly.  If it's truly required, there's no hope.

John
Comment 12 Jingfeng Yan 2014-11-20 20:15:51 UTC
(In reply to John Marino from comment #11)
> (In reply to Jingfeng Yan from comment #9)
> > BTW, if the fuse discussion not fit here, you can send email to me yan_jingfeng@yahoo.com.
> 
> It's fine here.
> 
> > Do you mean DragonFly miss fuse kernel side support? 
> 
> Correct - no kernel support for FUSE
> 
> > I thought I checked
> > roughly before, but not go to too much detail. FreeBSD and NetBSD, and
> > openBSD seems to fine. the founder of DragonFlyBSD started playing eithe
> > fuse-like idea in 2006.  Could you give me some idea of why fuse is missing
> > there, what I can help to make this port happen on DragonFly? 
> 
> FUSE basically doesn't work that well.  None of the FUSE ports are
> maintained (literally, they have no maintainer).  It's unclear who is
> responsible for FUSE maintenance in the kernel.  I think there's no
> designated person.  Basically, it barely works on FreeBSD, when there is a
> problem nobody is there to fix it, and DragonFly just decided it wasn't
> worth pursuing.  Maybe not officially, but nobody is making an effort to
> support it.
> 
> 
> > You are DPort creator, and active on DragonFly. If you can have some
> > evaluation, maybe we can have a way to make it work. At the same time, I
> > will check why we need fuse.
> 
> I think the only hope is that FUSE is optional and that we don't set the
> option on DragonFly.  If it's truly required, there's no hope.
> 
> John

No, it is not required.  It can be ignored. I will make FUSE to an option.
Comment 13 Jingfeng Yan 2014-11-23 02:38:53 UTC
Created attachment 149740 [details]
svn diff

- procfs is not required, but optional. 
- make fuse is make option, which is default for FreeBSD, disabled in DragonFly. 
- suggest to review last week's seahub new shar file, which has dedicated python django, and djblets installation.
Comment 14 Jingfeng Yan 2014-11-23 02:39:34 UTC
Created attachment 149741 [details]
test port log
Comment 15 Jingfeng Yan 2014-11-23 03:11:26 UTC
Created attachment 149742 [details]
SVN diff

- procfs is not required, but optional. 
- make fuse is make option, which is default for FreeBSD, disabled in DragonFly. 
- suggest to review last week's seahub new shar file, which has dedicated python django, and djblets installation.
Comment 16 Jingfeng Yan 2014-11-23 03:19:41 UTC
Created attachment 149744 [details]
SVN diff

- procfs is not required, but optional. 
- make fuse is make option, which is default for FreeBSD, disabled in DragonFly. 
- suggest to review last week's seahub new shar file, which has dedicated python django, and djblets installation.

149742: SVN diff (outdated) because it contained one patch file without using "-u" option in diff command.
Comment 17 commit-hook freebsd_committer freebsd_triage 2014-11-28 08:12:10 UTC
A commit references this bug:

Author: marino
Date: Fri Nov 28 08:11:14 UTC 2014
New revision: 373534
URL: https://svnweb.freebsd.org/changeset/ports/373534

Log:
  net-mgmt/seafile: Remove use of /proc and make FUSE optional

  DragonFly has not implemented FUSE, so it's not reqired by default.

  PR:		195024
  submitted by:	maintainer

Changes:
  head/net-mgmt/seafile/Makefile
  head/net-mgmt/seafile/files/patch-configure.ac
  head/net-mgmt/seafile/files/patch-controller_seafile-controller.c
  head/net-mgmt/seafile/files/patch-lib_Makfile.am
  head/net-mgmt/seafile/files/patch-lib_utils.c
  head/net-mgmt/seafile/files/patch-lib_utils.h
  head/net-mgmt/seafile/pkg-plist
Comment 18 John Marino freebsd_committer freebsd_triage 2014-11-28 08:15:50 UTC
thanks. I moved some of the option lines around and added tabs, but that was it.