Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Supporting non-official packages as dependencies #4

Closed
evanpurkhiser opened this issue Aug 16, 2018 · 4 comments
Closed

Supporting non-official packages as dependencies #4

evanpurkhiser opened this issue Aug 16, 2018 · 4 comments

Comments

@evanpurkhiser
Copy link
Contributor

Hi there! Awesome docker image, I recently set this up for my personal PKGBUILD repo, it's really cool!

Unfortunately some of my packages are failing to build at the moment using this, as they depend on some AUR packages (and perhaps in the future maybe even packages not in the AUR).

I'm wondering what we might be able to do to expand this to support installation of dependencies first. I was thinking something simple like specifying an environment variable, something like

export aur_deps="homebridge-git another-dep-git"
docker run -v -e aur_deps $(pwd):/pkg whynothugo/makepkg

Then the script would just install each one before running makepkg.

@WhyNotHugo
Copy link
Owner

Yeah, that would make sense. The only downside I can see is that I'd need to install an AUR helper first, but I'll try to look into it.

@evanpurkhiser
Copy link
Contributor Author

evanpurkhiser commented Aug 16, 2018

We might not need a helper necessarily, we could just download and makepkg the package, something like this:

# Install any specified AUR dependencies
for package in $aur_deps; do
    git clone https://aur.archlinux.org/$package.git /tmp/$package
    pushd /tmp/$package

    chown -R notroot /tmp/$package
    chmod -R u+rw /tmp/$package
    find /tmp/$package -type d -exec chmod u+x {} \;

    sudo -u notroot makepkg -fs --noconfirm
    pacman -U --noconfirm $package*.pkg.tar.xz
    popd
done

I was playing with this last night but was having trouble getting the docker image to build.

AUR helper might still be nicer however since it would keep the run script a little cleaner, at the cost of a more complicated Dockerfile.

for package in $aur_deps; do
    yaourt -S --no-confirm $package
done

@WhyNotHugo
Copy link
Owner

That wouldn't deal with transitive AUR dependencies, regrettably. It might be possible to make it a function, and just run recursively though.

@evanpurkhiser
Copy link
Contributor Author

Opened up #5 with a proposed solution

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants