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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

downgrade-11.3.0-1 package doesn't include executables #220

Closed
2 tasks done
pbrisbin opened this issue Oct 17, 2023 · 3 comments
Closed
2 tasks done

downgrade-11.3.0-1 package doesn't include executables #220

pbrisbin opened this issue Oct 17, 2023 · 3 comments
Labels
bug triage Requires triage to ascertain relevance and actions

Comments

@pbrisbin
Copy link
Member

馃悰 Bug Report

Checklist

  • No duplicate issues/PRs
  • Are you running the latest downgrade release from the AUR?

Environment

  • System information:
  • Downgrade version:
    11.3.0-1

Description

Packing doesn't include executables.

Steps to Reproduce

See https://pastebin.com/DETBtY9r.

Expected behavior

Executables should be included in package (and installed).

Actual behavior

Executables are not packaged or installed.

Other

It seems like this bit is broken:

for script_ in ; do \
  ...
done

I would expect that to be something like,

for script_ in downgrade pacignore; do \
  ...
done

But I suspect there is a make variable that is incorrect.

@pbrisbin pbrisbin added bug triage Requires triage to ascertain relevance and actions labels Oct 17, 2023
@pbrisbin
Copy link
Member Author

I'm not able to reproduce

% cat >PKGBUILD <<'EOM'
\`heredoc> # shellcheck disable=SC2034
# shellcheck disable=SC2154
# Author: Patrick Brisbin <pbrisbin@gmail.com>
pkgname=downgrade
pkgver=11.3.0
pkgrel=1
pkgdesc="Bash script for downgrading one or more packages to a version in your cache or the A.L.A."
arch=('any')
url="https://github.com/archlinux-downgrade/$pkgname"
license=('GPL')
backup=(etc/xdg/downgrade/downgrade.conf)
source=("downgrade-v$pkgver.tar.gz::https://github.com/archlinux-downgrade/$pkgname/archive/v$pkgver.tar.gz")
depends=('pacman-contrib' 'fzf') # pacsort
optdepends=('sudo: for installation via sudo')

package() {
  cd "$pkgname-$pkgver" || exit 1

  make DESTDIR="$pkgdir" PREFIX=/usr install
}
md5sums=('ca0c6958ef85116f96bb65e07cb26aff')
EOM
% makepkg -rsi
==> Making package: downgrade 11.3.0-1 (Tue 17 Oct 2023 08:57:15 AM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading downgrade-v11.3.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 54199    0 54199    0     0   175k      0 --:--:-- --:--:-- --:--:--  175k
==> Validating source files with md5sums...
    downgrade-v11.3.0.tar.gz ... Passed
==> Extracting sources...
  -> Extracting downgrade-v11.3.0.tar.gz with bsdtar
==> Entering fakeroot environment...
==> Starting package()...
install -Dm644 conf/downgrade.conf "/tmp/pkg/downgrade/etc/xdg/downgrade/downgrade.conf"
install -Dm644 doc/downgrade.8 "/tmp/pkg/downgrade/usr/share/man/man8/downgrade.8"
install -Dm644 doc/pacignore.8 "/tmp/pkg/downgrade/usr/share/man/man8/pacignore.8"
for script_ in pacignore downgrade; do \
  install -Dm755 "bin/$script_" "/tmp/pkg/downgrade/usr/bin/$script_"; \
  install -Dm644 "completion/$script_/bash" "/tmp/pkg/downgrade/usr/share/bash-completion/completions/$script_"; \
  install -Dm644 "completion/$script_/zsh" "/tmp/pkg/downgrade/usr/share/zsh/site-functions/_${script_}"; \
  install -Dm644 "completion/$script_/fish" "/tmp/pkg/downgrade/usr/share/fish/vendor_completions.d/${script_}.fish"; \
done
for po_file_ in locale/**/*.po; do \
  locale_="$(basename "$po_file_" .po)"; \
  script_="$(basename "$(dirname "$po_file_")")"; \
  mkdir -p "/tmp/pkg/downgrade/usr/share/locale/$locale_/LC_MESSAGES/"; \
  msgfmt "$po_file_" -o "/tmp/pkg/downgrade/usr/share/locale/$locale_/LC_MESSAGES/${script_}.mo"; \
done
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "downgrade"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: downgrade 11.3.0-1 (Tue 17 Oct 2023 08:57:19 AM EDT)
==> Installing package downgrade with pacman -U...
loading packages...
warning: downgrade-11.3.0-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) downgrade-11.3.0-1

Total Installed Size:  0.07 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                                                           [##############################################################] 100%
(1/1) checking package integrity                                                                         [##############################################################] 100%
(1/1) loading package files                                                                              [##############################################################] 100%
(1/1) checking for file conflicts                                                                        [##############################################################] 100%
(1/1) checking available disk space                                                                      [##############################################################] 100%
:: Processing package changes...
(1/1) reinstalling downgrade                                                                             [##############################################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
makepkg -rsi  3.78s user 2.71s system 74% cpu 8.754 total
% p -Ql downgrade | grep bin
downgrade /usr/bin/
downgrade /usr/bin/downgrade
downgrade /usr/bin/pacignore

So this must be something about the reporting user's system that makes,

SCRIPTS      ?= $(shell find bin -type f -executable -printf "%f\n")

not work.

One theory could be that SCRIPTS is defined somehow for them and is overriding this because of ?=. I don't know that we have a valid use-case for allowing override, and perhaps using := instead would make this work. If that's even the issue.

@rwd2
Copy link

rwd2 commented Oct 25, 2023

The above issue happens when building on a partition with the noexec option.

@pbrisbin
Copy link
Member Author

Thanks for following up, that makes sense. It seems like a bit of an edge-case to add an explicit check for, but if someone opened that as a PR I would probably merge it. Closing this issue now, since it seems to be have been explained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Requires triage to ascertain relevance and actions
Projects
None yet
Development

No branches or pull requests

2 participants