Bug 2239662 - Review Request: golang-github-katalix-l2tp - L2TP library and daemons built using golang
Summary: Review Request: golang-github-katalix-l2tp - L2TP library and daemons built u...
Keywords:
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Pavel Solovev
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-09-19 16:26 UTC by Tom Parkin
Modified: 2023-10-24 16:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
daron439: fedora-review+


Attachments (Terms of Use)

Description Tom Parkin 2023-09-19 16:26:29 UTC
Spec URL: https://github.com/katalix/go-l2tp-fedora/blob/master/golang-github-katalix-l2tp.spec
SRPM URL: https://github.com/katalix/go-l2tp-fedora/blob/master/golang-github-katalix-l2tp-0.1.2-1.fc38.src.rpm
COPR URL: https://copr.fedorainfracloud.org/coprs/tomparkin/golang-github-katalix-go-l2tp/
Description: go-l2tp is a library for building L2TP applications on Linux using the Go language.  It comes bundled with some working daemons: one of these, kl2tpd, is used by default by the NetworkManager-l2tp VPN plugin (https://github.com/nm-l2tp/NetworkManager-l2tp).

I am hoping to submit the Fedora package to make it easier for users of nm-l2tp to use kl2tpd without having to download and build the Go sources themselves.

Fedora Account System Username: tomparkin

Comment 1 Tom Parkin 2023-09-20 09:13:09 UTC
I should have added that this is my first package submission for Fedora, and I am seeking sponsorship.

My Pagure package-sponsors ticket is here: https://pagure.io/packager-sponsors/issue/592

Comment 2 Pavel Solovev 2023-09-20 10:35:09 UTC
please provide direct links to spec and srpm so that they are picked by the fedora-review tool correctly (eg. https://raw.githubusercontent.com/katalix/go-l2tp-fedora/master/golang-github-katalix-l2tp.spec)

BuildRequires: ... aren't needed, handeled by %go_generate_buildrequires

manpages are installed in %{_mandir}/man1 %{_mandir}/man5, executable bit isn't needed

Packagers SHOULD NOT simply glob everything under a shared directory https://docs.fedoraproject.org/en-US/packaging-guidelines/#_explicit_lists 

--- /proc/self/fd/14	2023-09-20 13:33:13.080116090 +0300
+++ golang-github-katalix-l2tp.spec	2023-09-20 13:32:37.091307757 +0300
@@ -21,14 +21,6 @@
 URL:            %{gourl}
 Source:         %{gosource}
 
-BuildRequires:  golang(github.com/go-kit/kit/log)
-BuildRequires:  golang(github.com/go-kit/kit/log/level)
-BuildRequires:  golang(github.com/mdlayher/genetlink)
-BuildRequires:  golang(github.com/mdlayher/netlink)
-BuildRequires:  golang(github.com/mdlayher/netlink/nlenc)
-BuildRequires:  golang(github.com/pelletier/go-toml)
-BuildRequires:  golang(golang.org/x/sys/unix)
-
 %description %{common_description}
 
 %gopkg
@@ -49,13 +41,13 @@
 %gopkginstall
 install -m 0755 -vd                                                     %{buildroot}%{_bindir}
 install -m 0755 -vp %{gobuilddir}/bin/*                                 %{buildroot}%{_bindir}/
-install -m 0755 -vd                                                     %{buildroot}%{_mandir}/1
-install -m 0755 -vp %{_builddir}/go-l2tp-%{version}/doc/kl2tpd.1        %{buildroot}%{_mandir}/1
-install -m 0755 -vp %{_builddir}/go-l2tp-%{version}/doc/kpppoed.1       %{buildroot}%{_mandir}/1
-install -m 0755 -vp %{_builddir}/go-l2tp-%{version}/doc/ql2tpd.1        %{buildroot}%{_mandir}/1
-install -m 0755 -vd                                                     %{buildroot}%{_mandir}/5
-install -m 0755 -vp %{_builddir}/go-l2tp-%{version}/doc/kl2tpd.toml.5    %{buildroot}%{_mandir}/5
-install -m 0755 -vp %{_builddir}/go-l2tp-%{version}/doc/ql2tpd.toml.5   %{buildroot}%{_mandir}/5
+install -m 0755 -vd                                                     %{buildroot}%{_mandir}/man1
+install -m 0644 -vp %{_builddir}/go-l2tp-%{version}/doc/kl2tpd.1        %{buildroot}%{_mandir}/man1
+install -m 0644 -vp %{_builddir}/go-l2tp-%{version}/doc/kpppoed.1       %{buildroot}%{_mandir}/man1
+install -m 0644 -vp %{_builddir}/go-l2tp-%{version}/doc/ql2tpd.1        %{buildroot}%{_mandir}/man1
+install -m 0755 -vd                                                     %{buildroot}%{_mandir}/man5
+install -m 0644 -vp %{_builddir}/go-l2tp-%{version}/doc/kl2tpd.toml.5    %{buildroot}%{_mandir}/man5
+install -m 0644 -vp %{_builddir}/go-l2tp-%{version}/doc/ql2tpd.toml.5   %{buildroot}%{_mandir}/man5
 
 %if %{with check}
 %check
@@ -65,8 +57,10 @@
 %files
 %license LICENSE
 %doc CHANGELOG.md README.md
-%{_bindir}/*
-%{_mandir}/*/*
+%{_bindir}/kl2tpd
+%{_bindir}/kpppoed
+%{_bindir}/ql2tpd
+%{_mandir}/man{1,5}/*.{1,5}*
 
 %gopkgfiles

Comment 3 Tom Parkin 2023-09-20 12:58:28 UTC
Thank you Pavel for your review!

I have updated my spec file and SRPM as you indicated.

Spec URL: https://raw.githubusercontent.com/katalix/go-l2tp-fedora/master/golang-github-katalix-l2tp.spec
SRPM URL: https://raw.githubusercontent.com/katalix/go-l2tp-fedora/raw/master/golang-github-katalix-l2tp-0.1.2-1.fc38.src.rpm

Comment 4 Pavel Solovev 2023-09-20 13:14:04 UTC
Great! Unfortunately, it's not possible to build the package in rawhide because golang-opentelemetry-otel updates broke some stuff, so we will have to wait until it's fixed.

Comment 5 Tom Parkin 2023-09-20 13:27:22 UTC
Ah, I see.

Do I need to do anything in the meantime or is it just a case of waiting until the golang-opentelemetry-otel issues are resolved?

Comment 6 Pavel Solovev 2023-09-20 14:02:13 UTC
Yes, you don't need to do anything, just wait. :)

Comment 7 Pavel Solovev 2023-09-23 17:18:17 UTC
Golang Package Review
==============

This package was generated using go2rpm, which simplifies the review.
Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated


- [x] The specfile is sane.
- [x] The License tag reflects the package contents and uses the correct identifiers.
- [x] The package builds successfully in mock.
- [x] Package is installable (checked by fedora-review).
- [x] There are no relevant rpmlint errors.
- [x] The package runs tests in %check.
- [x] `%goipath` is set correctly.
- [x] The package's binaries don't conflict with binaries already in the distribution. (Some Go projects include utility binaries with very generic names)
- [x] There are no `%{_bindir}/*` wildcards in %files. (go2rpm includes these by default)
- [x] The package complies with the Golang and general Packaging Guidelines.

Package approved! On import, don't forget to do the following:

- [ ] Add the package to release-monitoring.org
- [ ] Give go-sig privileges (at least commit) on the package
- [ ] Close the review bug by referencing its ID in the rpm changelog and the Bodhi ticket.

Thanks!

Comment 8 Tom Parkin 2023-10-17 15:28:32 UTC
Hi Pavel,

I'm also submitting go-l2tp for Debian, and during the review process it was pointed out that the kl2tpd, ql2tpd, and kpppoed daemons need root permissions for creating the L2TP dataplane, and hence should be installed under /usr/sbin.  Correspondingly the manpages should be in section 8 of the manual rather than section 1.

At this stage is it possible for me to post an updated specfile and srpm?

Comment 9 Pavel Solovev 2023-10-17 15:46:41 UTC
Sure

Comment 10 Tom Parkin 2023-10-18 11:49:12 UTC
Package updated to 0.1.6, and rebuilt using copr.

The main change is that the go-l2tp programs are now installed to /usr/sbin rather than /usr/bin.  The former is more appropriate since the programs all require root permissions.

The manpages have been relocated from section 1 to section 8 correspondingly.

Spec URL: https://github.com/katalix/go-l2tp-fedora/blob/master/golang-github-katalix-l2tp.spec
SRPM URL: https://github.com/katalix/go-l2tp-fedora/blob/master/golang-github-katalix-l2tp-0.1.6-1.fc38.src.rpm
COPR URL: https://copr.fedorainfracloud.org/coprs/tomparkin/golang-github-katalix-go-l2tp/

Comment 11 Fedora Review Service 2023-10-18 11:51:02 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6543455
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2239662-golang-github-katalix-l2tp/srpm-builds/06543455/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 13 Fedora Review Service 2023-10-18 12:01:17 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6543484
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2239662-golang-github-katalix-l2tp/srpm-builds/06543484/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 15 Fedora Review Service 2023-10-18 12:40:21 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6543550
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2239662-golang-github-katalix-l2tp/fedora-rawhide-x86_64/06543550-golang-github-katalix-l2tp/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 16 Pavel Solovev 2023-10-18 12:53:04 UTC
Looks good, reapproved! Source checksums don't match but there's no file-specific differences. Download sources with spectool -g ./golang-github-katalix-l2tp.spec

Source checksums
----------------
https://github.com/katalix/go-l2tp/archive/v0.1.6/go-l2tp-0.1.6.tar.gz :
  CHECKSUM(SHA256) this package     : 965cf69f545417f94019a1ad3ad275b8b649908c028ca125867d21df1fbcf711
  CHECKSUM(SHA256) upstream package : 2fd2c58f58ea69252272eb30c9066bed98ad70241b43b6e500fe4ebb2dee2628

Comment 17 Tom Parkin 2023-10-18 13:46:43 UTC
Thank you Pavel.

Apologies for the checksum delta.  I think that's down to process issues -- I was generating tarballs using "git archive", but I'll take the github tarball in future.

Comment 18 Tom Parkin 2023-10-24 10:08:22 UTC
Hi Pavel,

Sorry to bother you with process questions, but I wonder if you could guide me?

I was reviewing the Fedora process documentation[1], and it's not clear to me whether I need to wait to get sponsored prior to setting up a git repo for the project using fedpkg, and getting set up for Koji builds, etc.

I wonder whether it's appropriate/possible for me to work on this while I'm waiting for a package sponsor?  Or should I get a sponsor first and carry on with the rest of the process at that point?

Thanks in advance for any insights :-)

[1] https://docs.fedoraproject.org/en-US/package-maintainers/Package_Review_Process/

Comment 19 Pavel Solovev 2023-10-24 16:08:39 UTC
Yes, you need to be in the packager group(get sponsored) to be able to request repos and upload sources. I think you may get sponsored faster if you ask about it in #fedora-devel and/or #fedora-golang IRC/Matrix.


Note You need to log in before you can comment on or make changes to this bug.