Summary: | net/gitup: mismatched checksums | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Denis Shaposhnikov <dsh> | ||||||
Component: | Individual Port(s) | Assignee: | Nuno Teixeira <eduardo> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | CC: | grahamperrin, takefu | ||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(eduardo) |
||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
Denis Shaposhnikov
2023-11-07 16:07:20 UTC
Hello Denis, Thanks for let me know about it. Currently, port is doing a 'pkg-post-install' with sed command to update gitup.sample pkg install fase. I'm looking for a way to improve this feature avoiding checksum mismatch. Thanks I think pkg-post-install file should be replaced by something like #!/bin/sh osrel=$(${PKG_ROOTDIR}/bin/freebsd-version -u) releng=${osrel%%-*} stable=${osrel%%.*} if [ ! -e "${PKG_PREFIX}/etc/gitup.conf" ]; then cp "${PKG_PREFIX}/etc/gitup.conf.sample" "${PKG_PREFIX}/etc/gitup.conf" && \ sed -i '' -E \ -e "s,stable/[0-9]+,stable/${stable}," \ -e "s,releng/[0-9]+.[0-9]+,releng/${releng}," \ "${PKG_PREFIX}/etc/gitup.conf" fi so it creates and updates gitup.conf if it doesn't exists, instead of gitup.conf.sample. (In reply to Denis Shaposhnikov from comment #2) Hello Denis, I will try your sugestion since it seems not to be a POLA violation. Next days I will update port to latest version and includes this approach. Thanks (In reply to Nuno Teixeira from comment #3) (...) Your sugestion is similar to what @sample macro do. We get 2 issues installing conf.sample: 1: PLIST_FILES= etc/gitup.conf.sample =>> Checking for extra files and directories =>> Error: Files or directories left over: %%ETCDIR%%.conf build of net/gitup | gitup-0.99 ended at Mon Dec 18 10:05:42 WET 2023 build time: 00:00:04 !!! build failure encountered !!! [00:00:12] Error: Build failed in phase: leftovers 2: PLIST_FILES= "@sample etc/gitup.conf.sample" pkg-post-install script do nothing, because @sample macro created a gitup.conf already. Created attachment 247274 [details]
gitup-0.98.14_1.patch
pkg-post-install -> post-patch :-)
(In reply to takefu from comment #5) That is what net/svnup do. The problem is that OSREL is detected at build time. Build servers are not the same version of the pkg being built, e.g., 13.2 packages are built on 13.1 OSREL servers. The feature that we are looking for is to detect OSREL at install time of the pkg. At the moment pkg-post-install script do it right but it causes chksum mismatch (and it makes sense since we changing files after install) I'm looking for different aproaches like a 'make conf' target like in dns/noip: conf: (cd ${PREFIX}/etc && ${PREFIX}/bin/noip2 -C) ${CHOWN} noip:noip ${PREFIX}/etc/no-ip2.conf ${CHMOD} 0600 ${PREFIX}/etc/no-ip2.conf but it only work manually and with ports tree. Maybe net/gitup could do this feature by itself... :) Created attachment 247437 [details] gitup-0.98.14.patch2 (In reply to Nuno Teixeira from comment #6) Until a countermeasure is taken upstream, it would be a good idea to write the countermeasure in pkg-messages. :-D A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=5445a794bdb24b84073c5c52d65313092153a31d commit 5445a794bdb24b84073c5c52d65313092153a31d Author: Nuno Teixeira <eduardo@FreeBSD.org> AuthorDate: 2024-01-20 15:49:27 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2024-01-20 15:53:04 +0000 net/gitup: Update to 0.99 While here: - drop pkg-post-install as it causing checksum mismatch on sample file. ChangeLog: https://github.com/johnmehr/gitup/compare/0.98-14-g5e26080...0.99 PR: 274955 MFH: 2024Q1 net/gitup/Makefile | 5 ++--- net/gitup/distinfo | 6 +++--- net/gitup/files/pkg-message.in | 2 +- net/gitup/pkg-post-install (gone) | 8 -------- 4 files changed, 6 insertions(+), 15 deletions(-) A commit in branch 2024Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=df1a57013a2b045dba0f7cac2592e788006762be commit df1a57013a2b045dba0f7cac2592e788006762be Author: Nuno Teixeira <eduardo@FreeBSD.org> AuthorDate: 2024-01-20 15:49:27 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2024-01-20 15:54:17 +0000 net/gitup: Update to 0.99 While here: - drop pkg-post-install as it causing checksum mismatch on sample file. ChangeLog: https://github.com/johnmehr/gitup/compare/0.98-14-g5e26080...0.99 PR: 274955 MFH: 2024Q1 (cherry picked from commit 5445a794bdb24b84073c5c52d65313092153a31d) net/gitup/Makefile | 5 ++--- net/gitup/distinfo | 6 +++--- net/gitup/files/pkg-message.in | 2 +- net/gitup/pkg-post-install (gone) | 8 -------- 4 files changed, 6 insertions(+), 15 deletions(-) - Drop pkg-post-install script Committed, thanks! |