Package Details: kubectl-bin 1.32.1-1

Git Clone URL: https://aur.archlinux.org/kubectl-bin.git (read-only, click to copy)
Package Base: kubectl-bin
Description: Kubernetes.io kubectl binary
Upstream URL: http://kubernetes.io
Licenses: Apache
Conflicts: kubectl
Provides: kubectl
Submitter: GeorgeRaven
Maintainer: GeorgeRaven
Last Packager: GeorgeRaven
Votes: 2
Popularity: 0.000039
First Submitted: 2022-09-30 21:42 (UTC)
Last Updated: 2025-01-30 10:33 (UTC)

Dependencies (0)

Required by (74)

Sources (1)

Latest Comments

vitaliikuzhdin commented on 2025-02-11 00:06 (UTC) (edited on 2025-02-11 00:10 (UTC) by vitaliikuzhdin)

@GeorgeRaven, you're correct that updpkgsums works for arch-specific sources and even supports PKGBUILDs which have multiple hash algorithms present at once. While not as relevant in this specific case, it's worth noting that if you want to change the type of hashes used, you can manually replace every instance of, say, b2 with sha512, and the next run of updpkgsums will update the array contents accordingly.

I initially directed you to speedtest-go-bin due to its support for numerous architectures. However, a more relevant example might be protoc-gen-go-bin or any of my recently updated packages. These include an .nvchecker.toml file, which enables version checking with pkgctl version check and upgrading with pkgctl version upgrade. This process updates both the pkgver and the *sums* arrays (checking the version before upgrading is optional). After this, I only need to update the .SRCINFO and submit the commit.

Regarding the kubectl-bin package itself, I realise we should have begun our discussion by addressing the presence of any issues. If the upstream binaries are known to have fewer problems, then the necessity of your package becomes apparent, at least temporarily. Of course, this assumes that the issue has been reported to the upstream developers or respective maintainers, as this workaround, while helpful, isn't a universal solution that should be necessary in the first place.

GeorgeRaven commented on 2025-02-10 23:23 (UTC)

@vitaliikuzhdin Thank you, that is helpful information with regard to source_aarch64 and b2sums_aarch64.

I was aware of the Arch Linux arm differences in packaging, and how they had existing packages, however they did not always work consistently across my heterogenous Arch Linux Kubernetes clusters which I have been running for years. Admittedly, this had more to do with kubelet, kubeadm, and cni-plugins than kubectl since kubectl is only necessary on client machines, but I have since inherited all the associated packages. However, I will grant the landscape has changed since, making things more accessible, and potentially unnecessary, at least for kubectl.

May I ask, how are you keeping your speedtest-go-bin with its various checksums up to date? Does updpkgsums now work with multiple architectures?

vitaliikuzhdin commented on 2025-02-10 22:16 (UTC)

@GeorgeRaven, there is indeed an issue with the architectures. As you mentioned below, the hash sum check will be broken. One way to solve this is to use source_x86_64=() and b2sums_x86_64=() for x86_64-specific files (binaries in this case), source_aarch64=() and b2sums_aarch64=() for aarch64-specific files, and so on. See the Arch Wiki link that I have sent below for more information. You can also find my implementation of this technique here, if needed.

While the Arch Linux upstream does not provide multiarch packages as of now, people who use Arch Linux ARM do not use the repositories from Arch Linux. They have their own (almost) identical repositories, which do provide the same package, as I have linked below. For example, on both Arch Linux and Arch Linux ARM, you would need to execute pacman -S kubectl to install the package. There's no need to install base-devel, set up an AUR helper, or trust strangers on the internet. The official packages also install additional useful files like manpages and shell completions. Additionally, the binaries shipped with them are built with flags chosen best for Arch Linux:

$ namcap kubectl-bin-1.32.1-1-x86_64.pkg.tar.zst # your package from the AUR
kubectl-bin W: ELF file ('usr/bin/kubectl') lacks FULL RELRO, check LDFLAGS.
kubectl-bin W: ELF file ('usr/bin/kubectl') lacks PIE.
kubectl-bin W: ELF file ('usr/bin/kubectl') lacks GNU_PROPERTY_X86_FEATURE_1_SHSTK.
kubectl-bin E: apache is not a valid SPDX license identifier. See https://spdx.org/licenses/ for valid identifiers, or prefix the identifier with 'LicenseRef-', if it is custom.

$ namcap kubectl-1.32.1-2-x86_64.pkg.tar.zst # official package from 'extra'
kubectl W: ELF file ('usr/bin/kubectl') lacks GNU_PROPERTY_X86_FEATURE_1_SHSTK.

Don't get me wrong, I'm not trying to take your package away from you. It's just hard to see a point in you spending your time and effort maintaining this if there is always an official alternative which is better in every way. Personally, I've already had a few of my -bin packages deleted because the normal ones were in the extra, so I guess this is a more or less standard practice (though Package Maintainers will have the final say, of course). In this case, I think we should not be asking ourselves "what's wrong with this package such that it deserves deletion" but rather "what's wrong with the official package such that it needs an unofficial alternative". I don't see any issues with the official one, and even if there are, you would just need to submit an issue for that to be fixed.

I apologize if I'm under- or over-explaining some parts. I have no idea how different our levels of knowledge about Arch Linux are.

GeorgeRaven commented on 2025-02-10 21:16 (UTC)

@vitaliikuzhdin, thank you for your feedback, if you have a particular issue with installation or if it's not working out for you on other architectures please let me know.

I will agree to disagree, while other packages have changed, this still represents a multi-architecture variant whereas upstream does not. Again, if there is a specific issue with this, please let me know. Remember, not fitting your definition of useful does not preclude this package's existence, nor that of the even older packages that I have inherited for the same purpose.

Thank you for pointing out armv7l I will check and remove it if the is not being provided any more upstream.

vitaliikuzhdin commented on 2025-02-10 20:46 (UTC)

@GeorgeRaven,

  1. The packages found in the official repositories are already installed as binaries; you do not need to compile anything yourself (unless, of course, you want to). Additionally, they often include Arch-specific patches/hacks not shipped by the upstream.

  2. If the package is any different (it's not), it should not provide kubectl.

  3. The package does not support other architectures. Try executing CARCH=aarch64 makepkg -s. Hint: you can use source_aarch64=() and sha256sums_aarch64=() architecture-specific arrays.

  4. It's odd that you mention Arch Linux ARM since kubectl already exists in its official repositories. Also, it does not have the armv7l architecture, so shipping it here is pointless.

GeorgeRaven commented on 2025-02-10 17:36 (UTC)

@vitaliikuzhdin This is a binary package, packaged differently, and supports different architectures. If you are on archlinuxarm you will probably have an easier time here for instance.

vitaliikuzhdin commented on 2025-02-10 15:31 (UTC)

What is the point of this package? kubectl already exists in extra.

GeorgeRaven commented on 2023-10-05 08:11 (UTC) (edited on 2023-10-05 08:12 (UTC) by GeorgeRaven)

@meijin I can see you are using the ARM build and the b2sum is failing validation, you will likely need to skip the b2sum/ checksum as it is a limitation of the new automation. In my new automation https://github.com/DreamingRaven/aur-packages I use updpkgsums to update the sums however it does not appear to work with multi-arch packages.

Until I find time for a good workaround please skip the sums for non x86_64 builds or until updpkgsums supports multi arch builds.

meijin commented on 2023-09-28 09:08 (UTC)

failing in build:

==> Validating source files with b2sums...
    kubectl-bin-1.28.2-arm ... FAILED
==> ERROR: One or more files did not pass the validity check!
 -> error making: kubectl-bin-exit status 1
 -> Failed to install the following packages. Manual intervention is required: