You are not logged in.

#501 2023-09-27 06:17:24

mbw
Member
Registered: 2020-01-04
Posts: 28

Re: aurutils - helper tools for the aur

Thanks I'll try this next time.

I have one more follow-up question though. As of now, I converged on using aurutils like this when upgrading packages:

aur repo --upgrades  # Check for upgrades. This is somewhat redundant but gives a nice overview I guess.
aur sync --upgrades --no-build  # Check for differences by looking at the diff (this should hopefully become easier if I can actually make something out
aur sync --upgrades --no-view  # Build and sync packages
sudo pacman -Syu

There are two problems with this:

  1. I can't invoke the --no-build step twice to see the diff, since by then the changes have already been merged. Is it possible to actually only fetch (not pull) and diff with remote?

  2. Between the two last steps, the system is theoretically in an inconsistent state. Is it possible to only build the packages, so that they are synced only in the very last step?

My intention is to have the flow like this:

  1. Check for upgrades

  2. git-fetch and check for differences

  3. If OK, git-pull and build

  4. Sync everything with pacman -Syu

Is this reasonable and possible with aur-sync?

Offline

#502 2023-09-27 23:41:02

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,401
Website

Re: aurutils - helper tools for the aur

I can't invoke the --no-build step twice to see the diff, since by then the changes have already been merged. Is it possible to actually only fetch (not pull) and diff with remote?

You can just look at the diffs and abort the process with :cq in vifm. This (exits vifm with status 1 and) will keep the diffs available for later inspection. It also doesn't require a separate --no-build step.

Between the two last steps, the system is theoretically in an inconsistent state. Is it possible to only build the packages, so that they are synced only in the very last step?

Either run pacman -Syu before aur-sync, or build in a container (aur sync --chroot).


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#503 2023-09-28 07:00:39

mbw
Member
Registered: 2020-01-04
Posts: 28

Re: aurutils - helper tools for the aur

Alad wrote:

Between the two last steps, the system is theoretically in an inconsistent state. Is it possible to only build the packages, so that they are synced only in the very last step?

Either run pacman -Syu before aur-sync, or build in a container (aur sync --chroot).

I am trying to understand how chroot changes things here.
Does it prevent packages from being synced? After all, many (all?) AUR packages enter a chroot jail during upgrade.

Or does supplying --chroot change the inherent behavior of aur-sync?
Ok, after looking at the source, I traced it to /usr/lib/aurutils/aur-build.407, where syncing the package is skipped if either chroot or no_sync is set.
If this is in the aur-sync documentation, I did not see it.

Offline

#504 2023-09-29 13:09:51

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,401
Website

Re: aurutils - helper tools for the aur

pacman -Syu is always run inside the container before the build. Thus, any packages you build are built against latest repo packages. The container has write access to your local repository, so the newly built packages and repository are written there.

When you then run pacman -Syu yourself (on the host) , pacman's copy of your local repository is updated, together with the AUR packages built int he container.

Last edited by Alad (2023-09-29 13:10:31)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#505 2023-11-13 21:51:39

demizer
Member
From: Gilroy, CA
Registered: 2010-03-03
Posts: 116
Website

Re: aurutils - helper tools for the aur

First, thanks very much to AladW and everyone that has contributed to this project. It's been exactly what I need to maintain the custom packages on my arch systems for many years now.

However, lately I have been suffering a lot of pain with building using nspawn containers.

  • I am using aurutils 18.3 and have rebuilt my chroot envs following the recommendation from #477

  • Building outside of the chroot with aurutils works fine.

Command:

aur sync --rebuild --sign --chroot --pacman-conf <my_custom_pacman_conf>

Some examples:

linux-bcachefs-git:

note: this build failed after 45 minutes compile and on the last steps:

==> Starting package_linux-bcachefs-git-docs()...
/startdir/PKGBUILD: line 389: version: No such file or directory
==> ERROR: Build failed, check /var/lib/aurbuild/x86_64/demizer/build

And AppImage based packages, tested orca-slicer-bin and superslicer-bin:

/startdir/PKGBUILD: line 25: /build/superslicer-bin/src/SuperSlicer-ubuntu_18.04-2.4.58.5.AppImage: cannot execute: required file not found
==> ERROR: A failure occurred in prepare().
    Aborting...
==> ERROR: Build failed, check /var/lib/aurbuild/x86_64/demizer/build

and ...

==> Starting prepare()...
/startdir/PKGBUILD: line 18: ./OrcaSlicer_Linux_V1.7.0.AppImage: cannot execute: required file not found
==> ERROR: A failure occurred in prepare().
    Aborting...
==> ERROR: Build failed, check /var/lib/aurbuild/x86_64/demizer/build

It seems these packages are having trouble with the bindmounts from the package extract dir from the host to the container. I searched the docs and the source code to see if I can disable mounting into the container but I haven't found anything relevant. I want everything to happen in the container and then copy the files back to the host when done as this is less likely to cause issues with the various PKGBUILDS. I believe this is how it used to work.

Does anyone know how to overcome these issues while still building in a container?

Offline

#506 2023-11-13 22:58:49

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 742

Re: aurutils - helper tools for the aur

Have you edited and saved the PKGBUILD while the build was in progress? This behavior is exactly what you get when you change a bash script while it is running...

Offline

#507 2023-11-14 19:29:42

demizer
Member
From: Gilroy, CA
Registered: 2010-03-03
Posts: 116
Website

Re: aurutils - helper tools for the aur

lahwaacz wrote:

Have you edited and saved the PKGBUILD while the build was in progress? This behavior is exactly what you get when you change a bash script while it is running...

No not at all. aurutils copies the package srcs to /tmp

Offline

#508 2023-11-17 17:10:54

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,401
Website

Re: aurutils - helper tools for the aur

aurutils copies the package srcs to /tmp

No such copy is performed. Any source repositories are retrieved to and built in XDG_CACHE_HOME/aurutils/sync by default (if using aur-sync) or the current directory (if using aur-fetch + aur-build).

To the issue at hand, it looks like a problem with devtools. Check if you can reproduce your issue with extra-x86_64-build.


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#509 2023-11-22 18:59:36

demizer
Member
From: Gilroy, CA
Registered: 2010-03-03
Posts: 116
Website

Re: aurutils - helper tools for the aur

Alad wrote:

To the issue at hand, it looks like a problem with devtools. Check if you can reproduce your issue with extra-x86_64-build.

Ah of course. I will take a look at that and report an issue if anything comes up. Thank you!

Offline

#510 2023-11-29 19:22:49

qubeck
Member
From: Europe
Registered: 2023-11-29
Posts: 1

Re: aurutils - helper tools for the aur

I had a similar issue, but the fatal error only occurred after "Starting package()..." stage.  Maybe it's needed to add AURUTILS_VERSION=$pkgver in the PKGBUILD in package() too? After that I had no problems smile
Current output:

==> Making package: aurutils 18.5-1 (Wed 29 Nov 2023 21:44:00 MSK)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found aurutils-18.5.tar.gz
==> Validating source files with sha256sums...
    aurutils-18.5.tar.gz ... Passed
==> Extracting sources...
  -> Extracting aurutils-18.5.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
sed -e 's|AURUTILS_LIB_DIR|/usr/lib/aurutils|' \
    -e 's|AURUTILS_VERSION|18.5|' aur.in >aur
make[1]: Entering directory '/home/qubeck/aurutils/src/aurutils-18.5/completions'
make[1]: Nothing to be done for 'bash'.
make[1]: Nothing to be done for 'zsh'.
make[1]: Leaving directory '/home/qubeck/aurutils/src/aurutils-18.5/completions'
==> Entering fakeroot environment...
==> Starting package()...
fatal: No names found, cannot describe anything.
sed -e 's|AURUTILS_LIB_DIR|/usr/lib/aurutils|' \
    -e 's|AURUTILS_VERSION|18.5|' aur.in >aur
make[1]: Entering directory '/home/qubeck/aurutils/src/aurutils-18.5/completions'
make[1]: Leaving directory '/home/qubeck/aurutils/src/aurutils-18.5/completions'
make[1]: Entering directory '/home/qubeck/aurutils/src/aurutils-18.5/perl'
make[1]: Leaving directory '/home/qubeck/aurutils/src/aurutils-18.5/perl'
==> 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 "aurutils"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Adding changelog file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: aurutils 18.5-1 (Wed 29 Nov 2023 21:44:02 MSK)

Modified PKGBUILD:

build() {
    cd "$pkgname-$pkgver"
    make AURUTILS_VERSION=$pkgver
}

package() {
    cd "$pkgname-$pkgver"
    make PREFIX=/usr ETCDIR=/etc DESTDIR="$pkgdir" AURUTILS_VERSION=$pkgver install
}

Last edited by qubeck (2023-11-29 19:56:21)

Offline

Board footer

Powered by FluxBB