











One more improvement: s2i can generate bash and zsh completion files. We can make that part of the package. --- PKGBUILD.old 2017-11-04 11:51:48.947022371 +0100 +++ PKGBUILD 2017-11-04 12:44:51.888859102 +0100 @@ -3,7 +3,7 @@ _release=v1.1.7 _commit=226afa1 pkgver=1.1.7 -pkgrel=4 +pkgrel=5 pkgdesc="A tool for building/building artifacts from source and injecting into docker images" arch=('i686' 'x86_64') url="https://github.com/openshift/source-to-image" @@ -12,10 +12,13 @@ md5sums=('e23e47bdef21a82e091512cc83080d4e') build() { - echo "Installing source-to-image" + $srcdir/s2i completion bash > $srcdir/s2i.bash + $srcdir/s2i completion zsh > $srcdir/s2i.zsh } package() { install -D -m755 $srcdir/s2i $pkgdir/usr/bin/s2i + install -D -m755 $srcdir/s2i.bash $pkgdir/usr/share/bash-completion/completions/s2i + install -D -m755 $srcdir/s2i.zsh $pkgdir/usr/share/zsh/site-functions/_s2i ln -s s2i $pkgdir/usr/bin/sti }
> I didn't know how to handle symbolic links in PKGBUILD. Me neither, apparently :) Now to find out how to create docker images with s2i......
Hi George. Thanks for your advice. I didn't know how to handle symbolic links in PKGBUILD.
Also, I made an error in my initial comment. If you use "install" as I suggested, it will install a copy of the actual binary and not a symlink. So just simply create the symlink with ln. package() { install -D -m755 $srcdir/s2i $pkgdir/usr/bin/s2i ln -s s2i $pkgdir/usr/bin/sti }
I see you implemented my suggestions. But now there is another issue. ==> Starting build()... Installing source-to-image /home/george/aur/openshift-source-to-image/PKGBUILD: line 16: s2i: command not found ==> ERROR: A failure occurred in build(). Aborting... build() { echo "Installing source-to-image" s2i <====== why? }
Hi Andrej. Some feedback: You don't need the .install script to create a symlink in post_install. You can do it within the PKGBUILD in the package() function. Also, upstream currently provides the symlink in the tar, so you can just copy it along with the executable, like this: package() { install -D -m755 $srcdir/s2i $pkgdir/usr/bin/s2i install -D -m755 $srcdir/sti $pkgdir/usr/bin/sti } and completely remove the install=${pkgname}.install
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
Upstream has not provided the binaries for the 1.5.0 version yet, it isn't clear if it's an error or they don't want to distribute the compiled binaries anymore.
I'll leave the out-of-date flag for now.