Bug 226226 - [NEW PORT] www/quark: Small and simple HTTP GET/HEAD-only web server for static content
Summary: [NEW PORT] www/quark: Small and simple HTTP GET/HEAD-only web server for stat...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-26 22:36 UTC by Mateusz Piotrowski
Modified: 2018-03-14 00:34 UTC (History)
2 users (show)

See Also:
0mp: maintainer-feedback+


Attachments
Shell archive with the new net/quark port (3.20 KB, text/plain)
2018-02-26 22:36 UTC, Mateusz Piotrowski
0mp: maintainer-approval+
Details
Shell archive with the new www/quark port (rev. 1) (2.91 KB, text/plain)
2018-03-05 12:38 UTC, Mateusz Piotrowski
0mp: maintainer-approval+
Details
Shell archive with the new www/quark port (rev. 2) (2.85 KB, text/plain)
2018-03-05 21:53 UTC, Mateusz Piotrowski
0mp: maintainer-approval+
Details
Shell archive with the new www/quark port (rev. 3) (2.91 KB, text/plain)
2018-03-07 00:09 UTC, Mateusz Piotrowski
0mp: maintainer-approval+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Piotrowski freebsd_committer 2018-02-26 22:36:34 UTC
Created attachment 191032 [details]
Shell archive with the new net/quark port

General information:

 * Add a new port quark, which is a small HTTP GET-only web server developed at https://suckless.org.
 * There already exists a port called quark: multimedia/quark. If it is a problem then maybe we can call this new port "net/quark-server"?
 * The current upstream version of this port is '0' (as found in config.mk). There are no official releases yet so I had to define a 'GITHASH' variable to be able to define DISTNAME.
 * The port uses the dprintf function. There were some changes regarding this change in r303524. This is why '-D_WITH_DPRINTF' is added to CFLAGS on systems with the old dprintf behavior.
 * This is a program from suckless.org so as usual it is possible to provide a custom config.h with a 'QUARK_CONF' knob. Similar knobs are used in x11-wm/dwm and x11/sterm.
 * Patch sock.c due to a missing header. 

Testing:

 * The port has been tested with portlint, port test on FreeBSD 12-CURRENT and in the following Poudriere jails: 10.4-RELEASE amd64, 11.1-RELEASE amd64, 12.0-CURRENT amd64 and 11.1-RELEASE i386. The only issue is that on i386 when a timestamp function is called it expects "'size_t' (aka 'unsigned int') but the argument has type 'off_t' (aka 'long long')". Otherwise, it builds and runs smoothly.

Additional details:

 * The port was created by Magda Suchodolska (magda.suchodolska@gmail.com) and Adam Paszke (adam.paszke@gmail.com) during FreeBSD Ports workshop [1], which took place on 24.02.2018 at Warsaw Hackerspace. I'm merely submitting the port and taking over the maintainership after some additional testing and linting.

[1]: https://wiki.freebsd.org/MateuszPiotrowski/Ports/Workshops/201802
Comment 1 Mateusz Piotrowski freebsd_committer 2018-03-05 12:38:52 UTC
Created attachment 191221 [details]
Shell archive with the new www/quark port (rev. 1)

I've been contacted by the original author of this software. I was informed that some of the workarounds are no longer necessary.

Here's a refreshed shell archive with the quark port. 

---

Changes (relatively to the previous patch):

 * Move quark to the www category. It is a server after all and servers like Apache and Nginx live in www instead of net.
 * Update descriptions.
 * Remove patches for the missing header in sock.c.
 * Fix the manpage installation path. Now the manpage is correctly installed under $DESTDIR$PREFIX/man/man1.
 * User DISTVERSION instead of PORTVERSION.

QA:
 * Poudriere: 11.1-RELEASE amd64
 * FreeBSD 12.0-CURRENT amd64

No build errors.
Comment 2 Mateusz Piotrowski freebsd_committer 2018-03-05 21:53:15 UTC
Created attachment 191237 [details]
Shell archive with the new www/quark port (rev. 2)

It turns out that there's no need to add explicit STRIP_CMD as upstream already strips the binary by supplying a '-s' flag to LDFLAGS.

I've removed STRIP_CMD in the lastest patch.
Comment 3 Mateusz Piotrowski freebsd_committer 2018-03-07 00:09:45 UTC
Created attachment 191270 [details]
Shell archive with the new www/quark port (rev. 3)

This revision removes -s from LDFLAGS and replaces it with STRIP_CMD. The reason for this is that STRIP_CMD respects WITH_DEBUG in contrast to LDFLAGS=-s.

Otherwise, everything works as before / as expected.
Comment 4 commit-hook freebsd_committer 2018-03-13 07:11:22 UTC
A commit references this bug:

Author: tobik
Date: Tue Mar 13 07:10:24 UTC 2018
New revision: 464345
URL: https://svnweb.freebsd.org/changeset/ports/464345

Log:
  New port: www/quark

  Extremely small and simple HTTP GET/HEAD-only web server for static content.

  WWW: https://tools.suckless.org/quark/

  PR:		226226
  Submitted by:	0mp

Changes:
  head/www/Makefile
  head/www/quark/
  head/www/quark/Makefile
  head/www/quark/distinfo
  head/www/quark/files/
  head/www/quark/files/patch-config.mk
  head/www/quark/pkg-descr
Comment 5 Tobias Kortkamp freebsd_committer 2018-03-13 07:13:41 UTC
Committed with some changes. Thanks!

Usually we use the date of the commit for the PORTVERSION for snapshots
when there are no tags.  Inventing version numbers on our own just leads
to confusion all around.

Also removed -Os from CFLAGS and eliminated GITHASH which can just be
part of DISTNAME.
Comment 6 w.schwarzenfeld freebsd_triage 2018-03-13 20:07:13 UTC
Reopen -> Tobik, you was too quick! The port is deleted by antoine ports r464400.
Comment 7 w.schwarzenfeld freebsd_triage 2018-03-13 20:16:43 UTC
PLIST_FILES=	bin/quark \
		man/man1/quark.1.gz

should renamed.

multimedia/quark has also bin/quark.
Comment 8 commit-hook freebsd_committer 2018-03-13 22:19:16 UTC
A commit references this bug:

Author: tobik
Date: Tue Mar 13 22:18:22 UTC 2018
New revision: 464437
URL: https://svnweb.freebsd.org/changeset/ports/464437

Log:
  www/quark: Readd with package name quark-server

  PR:		226226

Changes:
  head/www/Makefile
  head/www/quark/
  head/www/quark/Makefile
Comment 9 Mateusz Piotrowski freebsd_committer 2018-03-14 00:34:56 UTC
Thanks!