Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian package continuation #774

Merged
merged 32 commits into from
Jul 25, 2023
Merged

Debian package continuation #774

merged 32 commits into from
Jul 25, 2023

Conversation

ArneBab
Copy link
Contributor

@ArneBab ArneBab commented May 19, 2022

No description provided.

@desyncr desyncr force-pushed the debian-pkg branch 2 times, most recently from da57938 to 85cb5c3 Compare May 21, 2022 20:04
@desyncr
Copy link
Contributor

desyncr commented May 21, 2022

TODO

@ArneBab
Copy link
Contributor Author

ArneBab commented Jun 5, 2022

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

@desyncr
Copy link
Contributor

desyncr commented Jun 8, 2022

@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).

@ArneBab
Copy link
Contributor Author

ArneBab commented Jun 8, 2022

@desyncr thank you! ❤️

@desyncr
Copy link
Contributor

desyncr commented Jun 18, 2022

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.

@ArneBab
Copy link
Contributor Author

ArneBab commented Jun 18, 2022

Nice progress!

@desyncr
Copy link
Contributor

desyncr commented Jun 25, 2022

@ArneBab
Copy link
Contributor Author

ArneBab commented Jul 16, 2022

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

@desyncr
Copy link
Contributor

desyncr commented Jul 16, 2022

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.

@ArneBab
Copy link
Contributor Author

ArneBab commented Sep 15, 2022

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

@desyncr
Copy link
Contributor

desyncr commented Sep 15, 2022

@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).

@ArneBab
Copy link
Contributor Author

ArneBab commented Sep 16, 2022

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

@desyncr
Copy link
Contributor

desyncr commented Sep 17, 2022

@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
Copy link
Contributor

desyncr commented Sep 17, 2022

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
Copy link
Contributor

desyncr commented Sep 17, 2022

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

@ArneBab
Copy link
Contributor Author

ArneBab commented Sep 17, 2022

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

override_dh_builddeb:
	dh_builddeb -- -Zgzip

@ArneBab
Copy link
Contributor Author

ArneBab commented Nov 5, 2022

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

@@ -94,7 +94,7 @@ task jar (type: Jar, overwrite: true) {
exclude 'freenet/node/Version.class'
exclude 'freenet/node/Version$1.class'
}
preserveFileTimestamps = false
preserveFileTimestamps = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reasoning for setting this to true? For deterministic builds it needs to be false - documentation of that is here. If there's a need that it not be deterministic, I think we'd need another task to build for the Debian package.

@ArneBab
Copy link
Contributor Author

ArneBab commented Mar 29, 2023

@desyncr are you still working on this?

@ArneBab
Copy link
Contributor Author

ArneBab commented Jul 25, 2023

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 ArneBab merged commit ed7d74c into hyphanet:next Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants