fred icon indicating copy to clipboard operation
fred copied to clipboard

Debian package continuation

Open ArneBab opened this issue 2 years ago • 16 comments

ArneBab avatar May 19 '22 17:05 ArneBab

TODO

  • [x] Generate seednodes.fref from https://github.com/freenet/seedrefs
  • [x] Move wrapper.conf somewhere else (but probably preserve in this repository)
  • [x] Review copyright file for missing things, original https://github.com/freenet/debian/blob/master/debian/copyright
  • [x] Put attribution to https://github.com/freenet/debian
  • [x] Test on Debian 10 (Buster)
  • [x] Test on Debian 11 (Bullseye)
  • [x] Test on Debian 12 (Bookworm)
  • [x] Test on Ubuntu 20 (Focal)
  • [x] Test on Ubuntu 21 (Impish)
  • [x] Test on Ubuntu 22 (Jammy)
  • [x] Add building instructions (for maintainers)
  • [ ] Add setup repository instructions
  • [x] Add install instructions (for users), example https://apt.syncthing.net/

desyncr avatar May 21 '22 20:05 desyncr

@desyncr what’s the state of the debian package? Are the todo points up to date?

ArneBab avatar Jun 05 '22 22:06 ArneBab

@ArneBab Hey there Arne, yes the TODO points are up to date and I'll keep them up do date with each iteration. I'll continue working tackling down the low hanging fruits (missing attribution, instructions) then test and iterate over multiple OSes. Hopefully getting to a point of testing soon (few weeks).

desyncr avatar Jun 08 '22 16:06 desyncr

@desyncr thank you! :heart:

ArneBab avatar Jun 08 '22 16:06 ArneBab

Lintian warnings and errors pending:

Now running lintian freenet_0.7.5+1493-1_amd64.changes ...
E: freenet changes: bad-distribution-in-changes-file unstable
E: freenet: init.d-script-does-not-implement-required-option etc/init.d/freenet force-reload
E: freenet: init.d-script-does-not-implement-required-option etc/init.d/freenet restart
E: freenet: init.d-script-does-not-implement-required-option etc/init.d/freenet start
E: freenet: init.d-script-does-not-implement-required-option etc/init.d/freenet stop
E: freenet: init.d-script-missing-dependency-on-local_fs etc/init.d/freenet: required-stop
E: freenet: init.d-script-should-always-start-service etc/default/freenet (line 10)
E: freenet source: temporary-debhelper-file freenet.debhelper.log
W: freenet source: custom-compression-in-debian-rules dh_builddeb -- -Zgzip (line 46)
W: freenet: init.d-script-does-not-source-init-functions etc/init.d/freenet
W: freenet: initial-upload-closes-no-bugs
W: freenet: missing-systemd-service-for-init.d-script freenet
W: freenet source: package-needs-versioned-debhelper-build-depends 11
W: freenet: unknown-field freenet_0.7.5+1493-1_amd64.deb Tag
N: 26 hints overridden (26 errors)
Finished running lintian.

desyncr avatar Jun 18 '22 18:06 desyncr

Nice progress!

ArneBab avatar Jun 18 '22 23:06 ArneBab

Packaging guide: https://github.com/freenet/wiki/wiki/Debian-package

desyncr avatar Jun 25 '22 21:06 desyncr

@desyncr does this mean, you finished the packaging now?

ArneBab avatar Jul 16 '22 17:07 ArneBab

They're some errors and warnings still. But the package builds and works.

I'd say the package is ready to go since the errors are related to how the init script works with the wrapper. Besides that since we don't intent to be in the debian's repositories I'd not care too much about these errors.

I'd like to have some feedback from users installing the"beta" versions.

desyncr avatar Jul 16 '22 18:07 desyncr

@desyncr did you already get enough feedback or should I try it in a VM?

ArneBab avatar Sep 15 '22 22:09 ArneBab

@ArneBab I did have some feedback regarding packagecloud.io not having the packages for different versions, which is true. I need to build a package and upload to the different debian and ubuntu versions.

My concern with packagecloud.io is that the disk quota will be exhausted very quickly if I have to upload the same package for each version we want to support. Alternatives are very little as far as I'm concern:

  1. Hosting it under the Freenet Project Inc umbrella will introduce monthly costs which I'd not like to incur.
  2. Submitting to Debian will definitely take a long while since I'm not able to progress much on the linting issues, let alone any feedback the Debian packaging team might have.

Regardless of the linting issues, the package does build and runs correctly. I'm using it on my node without problems (although my node doesn't have a high uptime).

desyncr avatar Sep 15 '22 23:09 desyncr

Can you share the current lint output? Maybe I can help get that fixed.

ArneBab avatar Sep 16 '22 05:09 ArneBab

@ArneBab Here they are, not much progress :(

Now running lintian freenet_0.7.5+1494-4_amd64.changes ...
E: freenet changes: bad-distribution-in-changes-file unstable
E: freenet: init.d-script-does-not-implement-required-option etc/init.d/freenet force-reload
E: freenet: init.d-script-does-not-implement-required-option etc/init.d/freenet restart
E: freenet: init.d-script-does-not-implement-required-option etc/init.d/freenet start
E: freenet: init.d-script-does-not-implement-required-option etc/init.d/freenet stop
E: freenet: init.d-script-missing-dependency-on-local_fs etc/init.d/freenet: required-stop
E: freenet: init.d-script-should-always-start-service etc/default/freenet (line 10)
W: freenet source: custom-compression-in-debian-rules dh_builddeb -- -Zgzip (line 42)
W: freenet: init.d-script-does-not-source-init-functions [etc/init.d/freenet]
W: freenet: missing-systemd-service-for-init.d-script freenet [etc/init.d/freenet]
W: freenet source: no-debian-changes
W: freenet source: no-versioned-debhelper-prerequisite 11
W: freenet: unknown-field Tag
N: 6 hints overridden (6 errors); 0 unused override

desyncr avatar Sep 17 '22 11:09 desyncr

Updated errors with some overrides:

E: freenet changes: bad-distribution-in-changes-file unstable
E: freenet: init.d-script-missing-dependency-on-local_fs etc/init.d/freenet: required-stop
E: freenet: init.d-script-should-always-start-service etc/default/freenet (line 10)
W: freenet source: debian-rules-should-not-use-custom-compression-settings dh_builddeb -- -Zgzip (line 42)
W: freenet: init.d-script-does-not-source-init-functions etc/init.d/freenet
W: freenet source: latest-debian-changelog-entry-reuses-existing-version 0.7.5+1494-7 ~= 0.7.5+1494-7 (last used: Sat, 17 Sep 2022 13:57:51 +0100)
W: freenet: missing-systemd-service-for-init.d-script freenet
W: freenet source: newer-standards-version 4.5.1 (current is 4.5.0)
W: freenet source: package-needs-versioned-debhelper-build-depends 11
N: 30 tags overridden (30 errors)
Finished running lintian.

Some notes on the error messages:

E: freenet changes: bad-distribution-in-changes-file unstable

You’ve specified an unknown target distribution for your upload in the debian/changelog file. It is possible that you are uploading for a different distribution than the one Lintian is checking for. In that case, passing –profile $VENDOR may fix this warning. (source)

In a .changes file or parsed changelog output this contains the (space-separated) name(s) of the distribution(s) where this version of the package should be installed. Valid distributions are determined by the archive maintainers. 10 The Debian archive software only supports listing a single distribution. Migration of packages to other distributions is handled outside of the upload process. (source)

See here for explanation on this behaviour.

E: freenet: init.d-script-does-not-implement-required-option etc/init.d/freenet force-reload

The /etc/init.d scripts have to support the following command line arguments: start, stop, restart, force-reload. (source)

Checkout freenet/debian example:

# lintian not smart enough to detect these things for service-wrapper-java
freenet-daemon binary: init.d-script-does-not-source-init-functions etc/init.d/freenet-daemon
freenet-daemon binary: init.d-script-does-not-implement-required-option etc/init.d/freenet-daemon start
freenet-daemon binary: init.d-script-does-not-implement-required-option etc/init.d/freenet-daemon stop
freenet-daemon binary: init.d-script-does-not-implement-required-option etc/init.d/freenet-daemon restart
freenet-daemon binary: init.d-script-does-not-implement-required-option etc/init.d/freenet-daemon force-reload
freenet-daemon binary: init.d-script-does-not-implement-optional-option etc/init.d/freenet-daemon status

E: freenet: init.d-script-does-not-implement-required-option etc/init.d/freenet force-reload
E: freenet: init.d-script-does-not-implement-required-option etc/init.d/freenet restart
E: freenet: init.d-script-does-not-implement-required-option etc/init.d/freenet start
E: freenet: init.d-script-does-not-implement-required-option etc/init.d/freenet stop

From man:

For binary packages, Lintian looks for overrides in a file named
usr/share/lintian/overrides/<package> inside the binary package, where
<package> is the name of the binary package.  For source packages,
Lintian looks for overrides in debian/source/lintian-overrides and then
in debian/source.lintian-overrides if the first file is not found.  The
first path is preferred.  See the Lintian User's Manual for the syntax
of overrides.

desyncr avatar Sep 17 '22 14:09 desyncr

@ArneBab By the way, the build process can be seen here.

desyncr avatar Sep 17 '22 15:09 desyncr

The Zgzip error sounds like it could be caused by this line:

override_dh_builddeb:
	dh_builddeb -- -Zgzip

ArneBab avatar Sep 17 '22 21:09 ArneBab

@desyncr will you take care of the Zgzip error? What’s still missing to get this done?

ArneBab avatar Nov 05 '22 18:11 ArneBab

@desyncr are you still working on this?

ArneBab avatar Mar 29 '23 07:03 ArneBab

I looked into this again and I see no dangerous stuff, so I decided to merge it. I’ll undo the preserveFileTimestamps change on next.

ArneBab avatar Jul 25 '23 08:07 ArneBab