Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933985 - net-p2p/syncthing-1.27.6 Add ufw support
Summary: net-p2p/syncthing-1.27.6 Add ufw support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Marek Szuba (RETIRED)
URL: https://github.com/gentoo/gentoo/pull...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-06-10 02:17 UTC by Ryan Wong
Modified: 2024-06-22 04:39 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
1.27.6-r1.patch (1.27.6-r1.patch,5.81 KB, patch)
2024-06-10 02:20 UTC, Ryan Wong
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Wong 2024-06-10 02:17:07 UTC
Hello:

I added a new use flag to the current syncthing package, so that it can install application profile to net-firewall/ufw.

I changed the ebuild file to add a check if ufw IUSE is enabled.
If it is, we install the application profile at ${FILESDIR}/syncthing.ufw to /etc/ufw/applications.d/

The github pull request for this is available at the URL I specified.

Thanks.

Ryan
Comment 1 Ryan Wong 2024-06-10 02:20:59 UTC
Created attachment 895489 [details, diff]
1.27.6-r1.patch

This patch adds the functionality that I mentioned before, 
And should be the same as the github pull request
Comment 2 Marek Szuba (RETIRED) archtester gentoo-dev 2024-06-14 11:36:21 UTC
Thanks, I'll merge this shortly (will take your word for it that the application profile itself is correct, as I do not use ufw). Mind you, in your future please refrain from making multiple independent changes - such as both adding a new USE flag to a package and reindenting metadata.xml, as it has been the case here - in a single commit. One logical change per commit, please!
Comment 3 Marek Szuba (RETIRED) archtester gentoo-dev 2024-06-14 13:29:39 UTC
I am about to push 1.27.8 to the tree and it installs the ufw profile for Syncthing. Thank you again! Two more comments about your patch, for future reference:

- this may or may not be a bit obscure (can't recall what the current version of devmanual has got to say about it) but the present-day rule for introducing new USE flags is not to if all they do is install "small" files. The ufw profile is only 175 bytes long so it might as well be installed unconditionally

- the profile in question is included in the Syncthing release tarballs, no need to add it to FILESDIR.
Comment 4 Larry the Git Cow gentoo-dev 2024-06-14 13:33:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35b15dad1e5d3397aae68a56a06a01c9edfd747f

commit 35b15dad1e5d3397aae68a56a06a01c9edfd747f
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2024-06-14 13:29:48 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2024-06-14 13:33:38 +0000

    net-p2p/syncthing: add 1.27.8
    
    Closes: https://bugs.gentoo.org/933985
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 net-p2p/syncthing/Manifest                |   1 +
 net-p2p/syncthing/syncthing-1.27.8.ebuild | 116 ++++++++++++++++++++++++++++++
 2 files changed, 117 insertions(+)
Comment 5 Ryan Wong 2024-06-22 04:39:53 UTC
(In reply to Marek Szuba from comment #3) 
> - this may or may not be a bit obscure (can't recall what the current
> version of devmanual has got to say about it) but the present-day rule for
> introducing new USE flags is not to if all they do is install "small" files.
> The ufw profile is only 175 bytes long so it might as well be installed
> unconditionally

Thanks for the tips and corrections :)

That was my fault, the rule is indeed in the gentoo devmanual, I didn't check them thoroughly.

At the time of writing, I simply copied what others was doing, in this case net-misc/mosh, which has a ufw use flag that installs a small file. 

I will check that package later and try to come up with a patch that aligns with the "not to add use flag" rule.