Bug 243857 - New Port: /sysutils/xdisk - a partition editor
Summary: New Port: /sysutils/xdisk - a partition editor
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs mailing list
URL: https://github.com/random532/xdisk---...
: 243858 (view as bug list)
Depends on:
Reported: 2020-02-04 00:35 UTC by georg.lastname
Modified: 2020-03-19 15:19 UTC (History)
2 users (show)

See Also:
georg.lastname: maintainer-feedback+

shar file as described in the porters handbook (2.35 KB, text/plain)
2020-02-04 00:35 UTC, georg.lastname
no flags Details
new .shar file (1.96 KB, text/plain)
2020-03-14 08:33 UTC, georg.lastname
no flags Details
.shar as described in the handbook (Sun Mar 15) (1.75 KB, text/plain)
2020-03-15 17:57 UTC, georg.lastname
no flags Details
.shar as described in the handbook (Tue Mar 17) (1.50 KB, text/plain)
2020-03-17 21:16 UTC, georg.lastname
no flags Details
.shar file as described in the handbook (Wed Mar 18 ) (1.50 KB, text/plain)
2020-03-18 10:42 UTC, georg.lastname
no flags Details
shar (1.50 KB, text/plain)
2020-03-19 15:19 UTC, georg.lastname
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description georg.lastname 2020-02-04 00:35:36 UTC
Created attachment 211331 [details]
shar file as described in the porters handbook

It's a GUI partition editor. 

It is mainly a wrapper around /sbin/gpart, for use in Xorg. It uses gtk3.

- A GUI (X11, gtk3) for:
- create, delete, edit disks/slices/partitions
- create file systems
- write .img files to disk.

The project is here:
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2020-02-04 02:21:37 UTC
*** Bug 243858 has been marked as a duplicate of this bug. ***
Comment 2 georg.lastname 2020-03-14 08:22:43 UTC
Update description:

This is a GUI for editing hard drives (partition editor, disk editor).
It uses gtk3.

Sourcecode, Screenshots:
Comment 3 georg.lastname 2020-03-14 08:33:41 UTC
Created attachment 212402 [details]
new .shar file
Comment 4 Tobias C. Berner freebsd_committer 2020-03-15 09:45:49 UTC
Moin moin 

Cool :) 

Could you update your port to follow the order of variables defined in [1]

Also, COMMENT should start with a big letter (and not 'A' :)). [2]

mfg Tobias

[1] https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-order.html
[2] https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-comment.html
Comment 5 georg.lastname 2020-03-15 17:57:50 UTC
Created attachment 212434 [details]
.shar as described in the handbook (Sun Mar 15)

Hey, sorry.
I reformatted the ports Makefile and removed unnecessary dependencies.
New shar file.
Comment 6 Tobias C. Berner freebsd_committer 2020-03-16 19:25:48 UTC
Exp-runs are for testing changes with dangerous large impact -- adding a new port does not require them :)
Comment 7 Adam Weinberger freebsd_committer 2020-03-16 21:41:30 UTC
This program looks cool! Some issues:

1) Why is this pulling a single file out of source control? That doesn't seem ideal. There's no guarantee that that file won't change or disappear in any future commit. Also it seems strange that people checking out from git should have to download tarballs. Ideally it should be pulling a tag, or a file from releases.

2) All the args to ${INSTALL_PROGRAM} are unnecessary (and the mode is wrong---binaries should be installed 555, as they are by default, and not 755). root:wheel and mode 555 happens automatically. And while we're here: no slash needed after ${STAGEDIR} (${LOCALBASE} starts with a /): ${STAGEDIR}${LOCALBSE}/...

3) The upstream Makefile hardcodes /usr/local, which need to be substituted. See https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/slow-patch.html#slow-patch-automatic-replacements

4) Ideally, the Makefile should be getting the glib/gtk/cairo/pango/etc. from pkg-config, not by hardcoding. That's up to developer preference but we'd certainly urge it.
Comment 8 georg.lastname 2020-03-17 21:16:06 UTC
Created attachment 212472 [details]
.shar as described in the handbook (Tue Mar 17)
Comment 9 georg.lastname 2020-03-17 21:20:07 UTC
Thanks. :-)

- The Makefile now properly uses USE_GITHUB=. I also created a github release.
- do-install is now cleaner
- no hardcoded /usr/local

The port was successfully build on another machine.

The upstream Makefile has many includes, but gtk won't compile otherwise..
Comment 10 Adam Weinberger freebsd_committer 2020-03-17 21:32:40 UTC
Good work on those changes.

I won't be adding the port myself, as I have concerns about underlying code safety, including executing commands as root built from unvalidated and unbounded string operations.

However, any other committer is absolutely welcome to do add it to the tree if they desire.
Comment 11 georg.lastname 2020-03-18 10:42:36 UTC
Created attachment 212492 [details]
.shar file as described in the handbook (Wed Mar 18 )

It is now safe to use. (User input is limited to 8 chars, replaced strcat with strncat where it matters)

Anyways, I will continue to update this over time, adding new shars. Thx all.
Comment 12 georg.lastname 2020-03-19 15:19:27 UTC
Created attachment 212526 [details]