You are not logged in.

#1 2023-05-30 07:05:14

lquidfire
Member
From: South Africa
Registered: 2017-07-26
Posts: 53

[SOLVED] PKGBUILD: How to add ChangeLog from source or raw git?

Hi all,

I maintain the spleen-font AUR package.

I would like to include the ChangeLog from the package's archive, but I run into issues when running `updpkgsums`.

Here is the updated (but not published) PKGBUILD that I am working on.

$ cat PKGBUILD
[snip] Maintainer details [/sinp]

_fontname=spleen

pkgname=spleen-font
pkgver=2.0.0
pkgrel=1
pkgdesc="Monospaced bitmap fonts for user interface including console (OTB, OTF, PSFU)"
arch=('any')
license=('BSD')
url="https://www.cambus.net/spleen-monospaced-bitmap-fonts/"
conflicts=('bdf-spleen')
source=(
  "https://github.com/fcambus/spleen/relea … er}.tar.gz"
  "https://raw.githubusercontent.com/fcamb … /ChangeLog"
)
changelog=ChangeLog
sha256sums=('b7ad1edb02a5ddad117ca94f026eb8450b51504d2e81bc3a03875e12d4e76b25')

package() {
  cd "${srcdir}/${_fontname}-${pkgver}"

  # Install font to its own dir.
  # (c.f.: https://archlinux.org/todo/fix-ttf-font … nt-setup/)
  install -dm755 "${pkgdir}/usr/share/fonts/${_fontname}"
  for font_file in spleen-*.otb; do install -Dm644 "${font_file}" \
    "${pkgdir}/usr/share/fonts/${_fontname}/${font_file}"; done
  for font_file in spleen-*.otf; do install -Dm644 "${font_file}" \
    "${pkgdir}/usr/share/fonts/${_fontname}/${font_file}"; done
  for font_file in spleen-*.psfu; do install -Dm644 "${font_file}" \
    "${pkgdir}/usr/share/kbd/consolefonts/${font_file}"; done
  install -Dm644 fonts.alias "${pkgdir}/usr/share/fonts/${_fontname}/fonts.alias"

  install -Dm644 AUTHORS "${pkgdir}/usr/share/doc/${pkgname}/AUTHORS"
  install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
  install -Dm644 ChangeLog "${pkgdir}/usr/share/doc/${pkgname}/ChangeLog"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

For example, the package is located here: https://github.com/fcambus/spleen/releases/tag/2.0.0

There is a file called ChangeLog inside the package, but I guess `updpkgsums` does not extract it to generate a checksum.

I then tried adding https://github.com/fcambus/spleen/blob/2.0.0/ChangeLog to the sources list, but still, `updpkgsums` says:

$ updpkgsums
==> ERROR: changelog file (ChangeLog) does not exist or is not a regular file.

The same error happens when I use https://raw.githubusercontent.com/fcamb … /ChangeLog as a source.

The package then also won't build in a clean chroot.

What can I do? How would I extract the ChangeLog file from the source package and use it for the changelog line in PKGBUILD? Or how would I use the text directly from the raw github blob? Or can I install the changelog during the build stage?

Thank you for your time and help!

Last edited by lquidfire (2023-05-31 18:56:21)

Offline

#2 2023-05-30 11:45:54

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] PKGBUILD: How to add ChangeLog from source or raw git?

changelog
Specifies a changelog file that is to be included in the package. The changelog file should end in a single newline. This file should reside in the same directory as the PKGBUILD and will be copied into the package by makepkg. It does not need to be included in the source array (e.g., changelog=$pkgname.changelog).

Keep in mind that this entry is intended to be used by the package maintainer to alert users of important changes and NOT for including an upstream changelog.
I am not aware of any aur pacakges that use it.

If you do want to use the changelog entry you'll have to manualy download the upstream changelog to the PKGBUILD folder and incude it in the upload to the aur .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2023-05-30 17:54:15

lquidfire
Member
From: South Africa
Registered: 2017-07-26
Posts: 53

Re: [SOLVED] PKGBUILD: How to add ChangeLog from source or raw git?

Hallo Lone-Wolf!

Lone_Wolf wrote:

Keep in mind that this entry is intended to be used by the package maintainer to alert users of important changes and NOT for including an upstream changelog.

Why would an upstream changelog not be important? Or what would a packager have to report to users, that is somehow not related to the package (otherwise the upstream changelog would be ok?)?

Lone_Wolf wrote:

I am not aware of any aur pacakges that use it.

aurutils has a changelog, which is where I saw it. I like reading what's new before I install a package update.

Lone_Wolf wrote:

If you do want to use the changelog entry you'll have to manualy download the upstream changelog to the PKGBUILD folder and incude it in the upload to the aur .

This I was hoping to somehow automate. But I guess that if this changelog is supposed to be different from upstream's changelog (it must have a completely different raison-d'etre), then that would explain why what I am attempting is not working.

Thank you for your reply!

Offline

#4 2023-05-30 18:12:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,452
Website

Re: [SOLVED] PKGBUILD: How to add ChangeLog from source or raw git?

lquidfire wrote:

Why would an upstream changelog not be important?

That's not what was said.  Lone_Wolf stated that this variable in the PKGBUILD is not for that purpose - that says nothing about the value of acheiving that purpose by other means.

lquidfire wrote:

Or what would a packager have to report to users, that is somehow not related to the package (otherwise the upstream changelog would be ok?)?

Upstream authors know nothing about how the package is built for arch.  The packager may change compile time options which would affect users.

Lone_Wolf wrote:

I am not aware of any aur pacakges that use it.

I don't seem to have *any* packages on my system that use it.

lquidfire wrote:

... if this changelog is supposed to be different from upstream's changelog (it must have a completely different raison-d'etre), then that would explain why what I am attempting is not working.

Yup, I'd just put an upstream changelog under /usr/share/doc/$pkgname/


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#5 2023-05-31 09:05:30

lquidfire
Member
From: South Africa
Registered: 2017-07-26
Posts: 53

Re: [SOLVED] PKGBUILD: How to add ChangeLog from source or raw git?

Thank you for your time and reaction, Trilby!

Trilby wrote:

That's not what was said.

My apologies @Lone_Wolf, I did not formulate that quite the way I meant it! I actually just wondered what important changes could exist, that are not mentioned in the upstream changelog. I was really just wondering what would go into the PKGBUILD changelog, if it is not meant to indicated changes in the software as per upstream.

Trilby wrote:

Upstream authors know nothing about how the package is built for arch.  The packager may change compile time options which would affect users.

And here is the answer. Thank you. If I understand correctly, the PKGBUILD changelog would be used then if I were to build, let's say, opensmtpd with openssl, instead of linked to libressl? Although I don't think this is a change that affects the users, other than possibly having to pull in more dependencies? Just trying to understand.

Trilby wrote:
Lone_Wolf wrote:

I am not aware of any aur pacakges that use it.

I don't seem to have *any* packages on my system that use it.

I appear to have the following installed on my system (2 of which are my doing):
Changelog for aurutils:
Changelog for jq:
Changelog for openbgpd:
Changelog for spleen-font:
Changelog for vifm:

Trilby wrote:

Yup, I'd just put an upstream changelog under /usr/share/doc/$pkgname/

It was already there, and there it shall rest. Although I do like reading through a Changelog before installing updates, to find out if I need to change a configuration or so.

Offline

#6 2023-05-31 12:01:50

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] PKGBUILD: How to add ChangeLog from source or raw git?

Np, lquidfire .
My phrasing was a bit ambiguous so I'm atleast partially to blame for the misunderstanding.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2023-05-31 12:38:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,452
Website

Re: [SOLVED] PKGBUILD: How to add ChangeLog from source or raw git?

I do have jq installed, so I was mistaken.  Interestingly, there is no entry in the local database "desc" file which is where I was looking.  Also the changelog is not "owned" by the package in a traditional sense (it is not listed by `pacman -Ql jq`) but instead is placed in the local db directory for jq next to the "desc", "files", and "mtree" files.  Good to know - and now I can confirm with certaintly that that is the *only* package on my system with such a changelog (as there are no other changelog files in the local db tree).

So it seems these pacman-changelogs are quite rarely used.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#8 2023-06-01 01:56:23

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 412
Website

Re: [SOLVED] PKGBUILD: How to add ChangeLog from source or raw git?

Just chiming in to say that aurutils is the one package where a changelog is really well maintained, coupled with aurutils ability to see the changelog and PKGBUILD diff prior to building using VIFM really makes for a polished experience.

Luckily enough, running an update just now and aurutils is included so can show a screenshot for reference (click on thumbnail for full pic which isn't nearly as blurry):

VL3qhxOs.png

I found myself wishing more packages used the changelog, as based of aurutils I thought it was more of a norm.


"the wind-blown way, wanna win? don't play"

Offline

Board footer

Powered by FluxBB