Package Details: nchat 4.41-1

Git Clone URL: (read-only, click to copy)
Package Base: nchat
Description: console-based chat client with support for Telegram
Upstream URL:
Licenses: MIT
Conflicts: nchat-git
Submitter: doclai
Maintainer: doclai
Last Packager: doclai
Votes: 2
Popularity: 0.046207
First Submitted: 2023-10-11 00:33 (UTC)
Last Updated: 2024-04-03 02:47 (UTC)

Required by (0)

Sources (1)

Latest Comments

xiota commented on 2024-04-03 14:44 (UTC) (edited on 2024-04-03 14:45 (UTC) by xiota)

The requirement is for direct depends, not makedepends. The packages you list are not direct depends for most programs.

gesh commented on 2024-04-03 12:59 (UTC) (edited on 2024-04-03 12:59 (UTC) by gesh)

Right, cf my qualifier that it's not an urgent matter given that it doesn't practically make a difference.

Checking the data confuses me even more -- cf the data points I posted on the PKGBUILD Talk page, with glibc and gcc-libs in the triple digits of occurrences in depends. file does appear, pulled in by subversion, util-linux, xdg-utils, and zathura. On the other hand, I'd think coreutils, filesystem, tar, util-linux, bzip2 and xz would at least be in many packages' implicit makedepends, raising the question of where the dividing line is.

All in all, consider my objection dropped until a clearer policy statement is given. I'm sorry about the wasted time, this seemed so obvious and trivial that I didn't expect it to drag on this much.

xiota commented on 2024-04-03 12:27 (UTC) (edited on 2024-04-03 12:39 (UTC) by xiota)

@gesh I had a typo in the command I used to check depends. file is pulled in by base, and there is no practical difference whether it's listed in depends.

There is no exemption in current guidelines for listing depends. As far as I can tell, it is intentional. If base or another package changes, the package would still work, instead of breaking.

Ultimately up to the maintainer. An active maintainer could fix the package. An inactive maintainer could leave it broken until someone else takes over.

gesh commented on 2024-04-03 12:16 (UTC)

In fact, I actually don't see the base exemption documented anywhere, annoyingly enough.

gesh commented on 2024-04-03 12:10 (UTC) (edited on 2024-04-03 12:11 (UTC) by gesh)

My mistake in re the guidelines, but pacman -Qi base does list file as one of the direct dependencies of base. It is true that it is a common dependency with base-devel, but so are archlinux-keyring, findutils, gawk, gettext, grep, gzip, pacman and sed.

xiota commented on 2024-04-03 11:32 (UTC)

@gesh file is pulled in by base-devel, not base. It can/should be excluded from makedepends, but not depends because the built package may be installed on a different machine that does not have base-devel installed. Newer guidelines require including it.

gesh commented on 2024-04-03 11:16 (UTC)

Just went through the new commit, thanks! I forgot to remove file from depends in my patch -- it's unnecessary, given that it's in base. No rush for that, though, it's not harmful.

A stylistic point, though -- I notice you moved the url and license to be near the source -- any reason for that? I generally like to have my PKGBUILDs follow PKGBUILD.proto guideline of having the metadata being in increasing order of specificity to this PKGBUILD (so pkgname, pkgver, ... are near the top, depends are in the middle, and install, source, *sums are at the bottom), but perhaps you have a different style? It doesn't matter that much though, so feel free to ignore this point.

gesh commented on 2024-03-26 13:38 (UTC) (edited on 2024-03-26 19:37 (UTC) by gesh)

The following should address my concerns: EDIT: After discussing the matter with the packager for nchat-git, I've edited the below to be more in line with that package (in particular, I invoke cmake directly, instead of relying on upstream's flaky

diff --git a/PKGBUILD b/PKGBUILD
index 8e88343..0a989cb 100644
@@ -1,26 +1,50 @@
 # Maintainer: Hoang Nguyen <toi at doclai dot com>

-pkgdesc="nchat is a console-based chat client for Linux and macOS with support for Telegram."
+pkgdesc="console-based chat client with support for Telegram"
-depends=('ncurses' 'gperf' 'help2man' 'readline' 'openssl' 'zlib'  'sqlite' 'go' 'file')
-makedepends=('ccache' 'cmake')

-conflicts=('nchat' 'nchat-git')
+    'file'
+    'ncurses'
+    'openssl'
+    'sqlite'
+    'zlib'
+    'cmake'
+    'go'
+    'gperf'

 build() {
-    cd "${srcdir}/${pkgname}-${pkgver}"
-   bash ./ build
+    local _cmake_options=(
+      -B build
+      -S "$_pkgsrc"
+      -G 'Unix Makefiles'
+      -DCMAKE_INSTALL_MANDIR='/usr/share/man'
+      -Wno-dev
+    )
+    cmake "${_cmake_options[@]}"
+    cmake --build build
 package() {
-    cd "${srcdir}/${pkgname}-${pkgver}/build"
-   make DESTDIR="${pkgdir}" install
+    DESTDIR="$pkgdir" cmake --install build
+    install -D -m644 "$_pkgsrc/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/"

gesh commented on 2024-03-26 12:16 (UTC) (edited on 2024-03-26 12:24 (UTC) by gesh)

v4.41 was released a couple of days ago. Some critiques of the package:

  • arch is definitely not any -- the package built is platform-specific, and needs to be rebuilt for any new architecture

  • No need for _pkgname when it is equal to pkgname

  • No need for $pkgname in provides and conflicts

  • Given that this isn't a VCS package, setting *sums=('SKIP') is unacceptable. Also, prefer SHA to MD5 for checksums (though the attack vector here is sufficiently unrealistic that it's not a big deal)

  • Pet peeve, but please don't mix hard-tabs and spaces

Also, comparing to the -git package, I find several unnecessary differences

  • The -git package's description more closely approximates man PKGBUILD's guidelines for what a good pkgdesc is

  • It would help for comparison if the layout (variable order, dependency order) were shared between the packages

  • go, gperf are made depends here, where the -git package correctly sees them as makedepends

  • @Freso's correct questioning of the addition of ccache to makedepends -- it should be a Wiki suggestion, with tradeoffs clearly marked

  • help2man is unnecessary -- it's just used in bash ./ doc, which appears to be an upstream release engineering step and unnecessary for us.


Freso commented on 2023-12-31 18:58 (UTC)

Why does this depend on ccache and cmake rather than makedepend? Also, why force ccache? Shouldn’t that be up to users whether they decide to use it or not?