-
-
Save MarkWalters-dev/7a7e36c4a99c15e7b355ba12e3857d65 to your computer and use it in GitHub Desktop.
# Maintainer: Moses Narrow <[email protected]> | |
# Co-Maintainer: Felix Golatofski <[email protected]> | |
# Contributor: Mark Weiman <[email protected]> | |
# Contributor: Johannes Dewender arch at JonnyJD dot net | |
# Contributor: Tony Lambiris <[email protected]> | |
pkgbase=apt | |
pkgname=('apt' 'apt-docs') | |
pkgver=2.2.0 | |
pkgrel=1 | |
arch=('i686' 'x86_64') | |
url="http://packages.debian.org" | |
license=('GPL2') | |
makedepends=('cmake' 'dpkg' 'docbook-xsl' 'doxygen' 'git' 'gtest' 'w3m' 'triehash' | |
'perl-text-wrapi18n' 'perl-locale-gettext' 'perl-yaml-tiny' | |
'perl-term-readkey' 'perl-sgmls' 'perl-module-build' 'perl-unicode-linebreak' 'perl-pod-parser' 'po4a' 'xxhash') | |
provides=('libapt-inst' 'libapt-pkg' 'libapt-pkg-dev' "apt-utils") | |
source=("git+https://salsa.debian.org/apt-team/apt.git#tag=${pkgver}" | |
"https://github.com/mquinson/po4a/releases/download/v0.60/po4a-0.60.tar.gz") | |
sha256sums=('SKIP' | |
'c8d9c28758fa007e8e2989b5820c55910a6533dab581208d0c8acf4d43027b59') | |
build() { | |
# arch linux's po4a is too new to build apt, so build an older version | |
# will likely be good to use system po4a when it's updated in sid | |
msg2 "Building po4a 0.60..." | |
cd "$srcdir/po4a-0.60" | |
perl Build.PL installdirs=vendor create_packlist=0 | |
LC_ALL=en_US.UTF-8 perl Build | |
[[ "$PATH" =~ /usr/bin/vendor_perl ]] || export PATH="$PATH:/usr/bin/vendor_perl" | |
msg2 "Building apt..." | |
cd "$srcdir/$pkgname" | |
# docbook xsl is stored with the version on Arch | |
DOCBOOK_XSL_VER=`ls -d /usr/share/xml/docbook/xsl-stylesheets-* | sort | head -1 | xargs basename` | |
cmake -B build \ | |
-DCMAKE_INSTALL_PREFIX="/usr" \ | |
-DCMAKE_INSTALL_LIBDIR="lib" \ | |
-DCMAKE_INSTALL_LIBEXECDIR="lib" \ | |
-DDOCBOOK_XSL="/usr/share/xml/docbook/${DOCBOOK_XSL_VER}-nons" | |
sed -i -e "s|stylesheet/docbook-xsl|$DOCBOOK_XSL_VER=t|" build/doc/*.xsl | |
sed -i -e "s|stylesheet/nwalsh|$DOCBOOK_XSL_VER=|" build/doc/*.xsl | |
make -C build all | |
} | |
package_apt() { | |
depends=('gnupg' 'curl' 'libseccomp' 'perl' 'xxhash') | |
pkgdesc="Command-line package manager used on Debian-based systems" | |
cd "$srcdir/$pkgbase" | |
make -C build DESTDIR="${pkgdir}" install | |
rm -rf "${pkgdir}/usr/share/doc" | |
find "$pkgdir/usr/share/man" -type d -empty -delete | |
} | |
package_apt-docs() { | |
arch=('any') | |
pkgdesc="Documentation for apt" | |
cd "$srcdir/$pkgbase" | |
make -C build DESTDIR="${pkgdir}" install | |
rm -rf "${pkgdir}"/etc | |
rm -rf "${pkgdir}"/var | |
rm -rf "${pkgdir}"/usr/{bin,include,lib} | |
rm -rf "${pkgdir}"/usr/share/{bash-completion,locale,man} | |
} | |
# vim:set ts=2 sw=2 et: |
First edit fixes the p04a error so apt builds now. It might be good enough to just replace the alias with alias po4a="/usr/bin/vendor_perl/po4a"
But now it has another error with apt-docs:
/usr/share/doc/libapt-pkg-doc/method.html/ch1.html exists in both 'apt' and 'apt-docs'
/usr/share/doc/libapt-pkg-doc/method.html/ch2.html exists in both 'apt' and 'apt-docs'
/usr/share/doc/libapt-pkg-doc/method.html/index.html exists in both 'apt' and 'apt-docs'
/usr/share/doc/libapt-pkg-doc/method.text exists in both 'apt' and 'apt-docs'
Errors occurred, no packages were upgraded.
==> WARNING: Failed to install built package(s).```
The second edit fixes the exists in both 'apt' and 'apt-docs'
error. It was just a typo with the doc directory.
Third edit just replaced the alias with PATH.
man pages corrupted (e.g. stray .SH
.PP
.RE
et al. in the following screenshot)
Issue applies to both your PKGBUILD on this page and their PKGBUILD in AUR as of 2.1.7-1
Am I the only one getting this?
Is it upstream?
$ man 8 apt
$ man 5 apt.conf
I'm getting the same thing. Same problem when I tried version 2.2.0.
Looks like it works in debian sid under docker though.
git clone --depth=1 https://salsa.debian.org/apt-team/apt.git --branch 2.2.0
cd apt
cmake -B build \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DCMAKE_INSTALL_LIBEXECDIR="lib" \
-DDOCBOOK_XSL=/usr/share/xml/docbook/stylesheet/docbook-xsl
make -C build all
make -C build DESTDIR=../pkg install
man ./pkg/usr/share/man/man8/apt-get.8
I copied /usr/share/xml/docbook/stylesheet/docbook-xsl to arch and changed the first cmake to:
cmake -B build \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DCMAKE_INSTALL_LIBEXECDIR="lib" \
-DDOCBOOK_XSL=$PWD/docbook-xsl
Which works. So it's a problem with docbook-xsl. Both debian and arch are using the same version of docbook, 1.79.2. Yet the files are not the same. Did a diff between the 2 different apt builds and found a bunch of these errors: Note: namesp. add : added namespace before processing
that is not present when using the debian docbook.
git clone --depth=1 https://github.com/archlinux/svntogit-packages --branch packages/docbook-xsl
cd svntogit-packages/trunk/
makepkg --needed --noconfirm -sf
cd -
Fails when using -DDOCBOOK_XSL=./svntogit-packages/trunk/pkg/docbook-xsl/usr/share/xml/docbook/xsl-stylesheets-1.79.2
but works when using -DDOCBOOK_XSL=./svntogit-packages/trunk/pkg/docbook-xsl/usr/share/xml/docbook/xsl-stylesheets-1.79.2-nons
So updated it to -DDOCBOOK_XSL="/usr/share/xml/docbook/${DOCBOOK_XSL_VER}-nons" which works for me. Does it work for you now?
Works like a charm 🚀 Thanks
namcap apt-2.2.0-1-x86_64.pkg.tar
base
depends onxz
=> removexz
from depends of package_apt()/usr/lib/libapt-pkg.so.6.0.0
depends on/usr/lib/libxxhash.so.0
=> addxxhash
to package_apt() depends/usr/lib/apt/methods/store
depends on/usr/lib/libseccomp.so.2
=> addlibseccomp
to package_apt() depends/usr/lib/dpkg/methods/apt/setup
is aperl
script => addperl
to package_apt() dependsfind "$pkgdir/usr/share/man" -type d -empty -delete
since the following empty directories are introducedon my machine- /usr/share/man/pl/man7
- /usr/share/man/ja/man7
- /usr/share/man/es/man7
- /usr/share/man/it/man7
namcap apt-2.2.0-1-x86_64.pkg.tar
apt-docs W: No ELF files and not an "any" package => add overriding arch=('any')
to package_apt-docs()
patch in the next comment
orig + patch = new
patch
--- PKGBUILD
+++ PKGBUILD
@@ -48,14 +48,16 @@
}
package_apt() {
- depends=('gnupg' 'curl' 'xz')
+ depends=('gnupg' 'curl' 'libseccomp' 'perl' 'xxhash')
pkgdesc="Command-line package manager used on Debian-based systems"
cd "$srcdir/$pkgbase"
make -C build DESTDIR="${pkgdir}" install
rm -rf "${pkgdir}/usr/share/doc"
+ find "$pkgdir/usr/share/man" -type d -empty -delete
}
package_apt-docs() {
+ arch=('any')
pkgdesc="Documentation for apt"
cd "$srcdir/$pkgbase"
make -C build DESTDIR="${pkgdir}" install
new
# Maintainer: Moses Narrow <[email protected]>
# Co-Maintainer: Felix Golatofski <[email protected]>
# Contributor: Mark Weiman <[email protected]>
# Contributor: Johannes Dewender arch at JonnyJD dot net
# Contributor: Tony Lambiris <[email protected]>
pkgbase=apt
pkgname=('apt' 'apt-docs')
pkgver=2.2.0
pkgrel=1
arch=('i686' 'x86_64')
url="http://packages.debian.org"
license=('GPL2')
makedepends=('cmake' 'dpkg' 'docbook-xsl' 'doxygen' 'git' 'gtest' 'w3m' 'triehash'
'perl-text-wrapi18n' 'perl-locale-gettext' 'perl-yaml-tiny'
'perl-term-readkey' 'perl-sgmls' 'perl-module-build' 'perl-unicode-linebreak' 'perl-pod-parser' 'po4a' 'xxhash')
provides=('libapt-inst' 'libapt-pkg' 'libapt-pkg-dev' "apt-utils")
source=("git+https://salsa.debian.org/apt-team/apt.git#tag=${pkgver}"
"https://github.com/mquinson/po4a/releases/download/v0.60/po4a-0.60.tar.gz")
sha256sums=('SKIP'
'c8d9c28758fa007e8e2989b5820c55910a6533dab581208d0c8acf4d43027b59')
build() {
# arch linux's po4a is too new to build apt, so build an older version
# will likely be good to use system po4a when it's updated in sid
msg2 "Building po4a 0.60..."
cd "$srcdir/po4a-0.60"
perl Build.PL installdirs=vendor create_packlist=0
LC_ALL=en_US.UTF-8 perl Build
[[ "$PATH" =~ /usr/bin/vendor_perl ]] || export PATH="$PATH:/usr/bin/vendor_perl"
msg2 "Building apt..."
cd "$srcdir/$pkgname"
# docbook xsl is stored with the version on Arch
DOCBOOK_XSL_VER=`ls -d /usr/share/xml/docbook/xsl-stylesheets-* | sort | head -1 | xargs basename`
cmake -B build \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DCMAKE_INSTALL_LIBEXECDIR="lib" \
-DDOCBOOK_XSL="/usr/share/xml/docbook/${DOCBOOK_XSL_VER}-nons"
sed -i -e "s|stylesheet/docbook-xsl|$DOCBOOK_XSL_VER=t|" build/doc/*.xsl
sed -i -e "s|stylesheet/nwalsh|$DOCBOOK_XSL_VER=|" build/doc/*.xsl
make -C build all
}
package_apt() {
depends=('gnupg' 'curl' 'libseccomp' 'perl' 'xxhash')
pkgdesc="Command-line package manager used on Debian-based systems"
cd "$srcdir/$pkgbase"
make -C build DESTDIR="${pkgdir}" install
rm -rf "${pkgdir}/usr/share/doc"
find "$pkgdir/usr/share/man" -type d -empty -delete
}
package_apt-docs() {
arch=('any')
pkgdesc="Documentation for apt"
cd "$srcdir/$pkgbase"
make -C build DESTDIR="${pkgdir}" install
rm -rf "${pkgdir}"/etc
rm -rf "${pkgdir}"/var
rm -rf "${pkgdir}"/usr/{bin,include,lib}
rm -rf "${pkgdir}"/usr/share/{bash-completion,locale,man}
}
# vim:set ts=2 sw=2 et:
1-4: Good catch.
5: Yep. I see that on my machine too.
Updated my gist. Hopefully the maintainer will use these updates.
The original fails to build with the error:
/bin/sh: line 1: po4a: command not found