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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The installation of a package does not work, because there may be a problem with systemd DynamicUsers. #621

Closed
tachtler opened this issue Jan 23, 2022 · 12 comments
Labels
duplicate This issue or pull request already exists

Comments

@tachtler
Copy link

tachtler commented Jan 23, 2022

pikaur -Vq
Pikaur v1.9
Pacman v6.0.1 - libalpm v13.0.1 - pyalpm v0.10.6

~/.config/pikaur.conf 
[sync]
alwaysshowpkgorigin = no
develpkgsexpiration = -1
upgradesorting = versiondiff
showdownloadsize = no
ignoreoutofdateaurupgrades = no

[build]
keepbuilddir = no
keepdevbuilddir = yes
keepbuilddeps = no
skipfailedbuild = no
alwaysusedynamicusers = no
ignorearch = no

[review]
noedit = no
donteditbydefault = no
nodiff = no
gitdiffargs = --ignore-space-change,--ignore-all-space
diffpager = auto
hidedifffiles = .SRCINFO

[colors]
version = 10
versiondiffold = 11
versiondiffnew = 9

[ui]
requireenterconfirm = yes
printcommands = no
aursearchsorting = hottest
displaylastupdated = no
groupbyrepository = yes
reversesearchsorting = no

[misc]
sudoloopinterval = 59
pacmanpath = pacman
privilegeescalationtool = sudo

[network]
aururl = https://aur.archlinux.org
newsurl = https://www.archlinux.org/feeds/news/
socks5proxy = 
aurhttpproxy = 
aurhttpsproxy =
[Optional] Prerequisites:
# ls -l /var/cache/private/pikaur/
total 0
drwxr-xr-x 3 62482 62482 25 Jan 23 07:03 aur_repos

There are no build and pkgs directory.

Description:

When I try to install elasticsearch, which uses GRADLE within the build process, is doesn't work because of the error situation I will describe in the Attached log: section:

Exception in thread "main" java.lang.RuntimeException: Could not create parent directory for lock file /.gradle/wrapper/dists/gradle-6.6.1-all/ejrtlte9hlw8v6ii20a9584rs/gradle-6.6.1-all.zip.lck
	at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:43)
	at org.gradle.wrapper.Install.createDist(Install.java:48)
	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)

However, when I run a manual build and install process, it works. See also the Attached log: section for a detailed description.

Maybe I'm wrong and it has nothing to do with the systemd DynamicUsers construct, but why can't I install via AUR-Helper?

Thanks in advance!


Attached log:

pikaur

# pikaur -S elasticsearch --verbose --pikaur-debug
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp true
:: debug: Pikaur operation found for sys.argv=['/usr/bin/pikaur', '-S', 'elasticsearch', '--verbose', '--pikaur-debug']: cli_install_packages
:: debug: install_info_fetcher: Gonna fetch install info for:
    install_package_names=['elasticsearch']
    not_found_repo_pkgs_names=[]
    pkgbuilds_packagelists={}
    manually_excluded_packages_names=[]

:: debug: install_info_fetcher: Gonna get repo pkgs install info...
Reading repository package databases...
Reading local package database...
=> pacman --color=always --sync elasticsearch --print-format %r/%n
:: debug: install_info_fetcher: gonna get AUR pkgs install info for:
    aur_packages_versionmatchers=['elasticsearch']
    self.aur_updates_install_info=[]
    aur_packages_names_to_versions={'elasticsearch': <VersionMatcher elasticsearch['cmp_default']None>}
=> GET https://aur.archlinux.org/rpc/?v=5&type=info&arg[]=elasticsearch
:: debug: install_info_fetcher: found AUR pkgs:
    aur_pkg_list=[<AURPackageInfo "elasticsearch" 7.10.2-2>]
    not_found_aur_pkgs=[]

:: debug: install_info_fetcher: got AUR pkgs install info: self.aur_updates_install_info=[<InstallInfo "elasticsearch"   -> 7.10.2-2>]
Resolving AUR dependencies...
=> pacman --color=always --deptest java-runtime-headless<=16 systemd libxml2 java-environment=11
=> pacman --color=always --sync --print-format=%% java-environment=11 java-runtime-headless<=16
=> pacman --color=always --deptest java-runtime-headless<=16 systemd libxml2 java-environment=11
=> pacman --color=always --sync java-runtime-headless<=16 --print-format %r/%n
=> pacman --color=always --sync java-environment=11 --print-format %r/%n
=> pacman --color=always --sync --needed java-runtime-headless<=16 java-environment=11 --print-format %r/%n

:: New dependencies will be installed from repository:
 freetype2 (for harfbuzz, harfbuzz, jre11-openjdk-headless, jre11-openjdk-headless)    -> 2.11.1-1
 giflib (for jre11-openjdk, jre11-openjdk)                  -> 5.2.1-2
 graphite (for harfbuzz)                                    -> 1:1.3.14-1
 harfbuzz (for freetype2, jre11-openjdk-headless, jre11-openjdk-headless)    -> 3.2.0-1
 hicolor-icon-theme (for jdk11-openjdk)                     -> 0.17-2
 java-environment-common (for jdk11-openjdk)                -> 3-3
 java-runtime-common (for jre11-openjdk-headless)           -> 3-3
 jdk11-openjdk (for elasticsearch)                          -> 11.0.13.u8-1
 jre11-openjdk (for jdk11-openjdk, jdk11-openjdk)           -> 11.0.13.u8-1
 jre11-openjdk-headless (for jre11-openjdk, jre11-openjdk, elasticsearch)    -> 11.0.13.u8-1
 lcms2 (for jre11-openjdk-headless, jre11-openjdk-headless)    -> 2.12-1
 libjpeg-turbo (for libtiff, libtiff, jre11-openjdk-headless, jre11-openjdk-headless)    -> 2.1.2-1
 libnet (for jre11-openjdk-headless)                        -> 1:1.1.6-1
 libpng (for freetype2, jre11-openjdk)                      -> 1.6.37-3
 libtiff (for lcms2)                                        -> 4.3.0-1
 nspr (for nss)                                             -> 4.33-1
 nss (for jre11-openjdk-headless)                           -> 3.74-1

:: AUR package will be installed:
 elasticsearch [orphaned]                                   -> 7.10.2-2 [outofdate: 2022/01/10]

:: debug: PROMPT: Gonna get input from user...
:: debug: PROMPT: Restoring TTY...
:: debug: PROMPT: Using standard input reader...
:: Proceed with installation? [Y/n] 
:: [v]iew package details   [m]anually select packages
>> Y
:: debug: PROMPT: Reverting to prev TTY state...
:: debug: PROMPT: Got answer: 'y'
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp git -C /var/cache/pikaur/aur_repos/elasticsearch pull origin master
=> pacman --color=always --deptest java-runtime-headless<=16 systemd libxml2
=> pacman --color=always --deptest java-environment=11
looking for conflicting AUR packages...
=> pacman --color=always --deptest java-runtime-headless<=16 systemd libxml2 java-environment=11
=> pacman --color=always --sync java-runtime-headless --print-format %r/%n
=> pacman --color=always --sync java-environment --print-format %r/%n
:: warning: Not showing diff for elasticsearch package (installing for the first time)
:: debug: PROMPT: Gonna get input from user...
:: debug: PROMPT: Restoring TTY...
:: debug: PROMPT: Using standard input reader...
Do you want to edit PKGBUILD for elasticsearch package? [Y/n] n
:: debug: PROMPT: Reverting to prev TTY state...
:: debug: PROMPT: Got answer: 'n'

:: debug: Gonna build self.package_builds_by_name={'elasticsearch': <pikaur.build.PackageBuild object at 0x7fde956b7f10>}
:: debug: Gonna build pkg_build.package_names=['elasticsearch']
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp mkdir -p /var/cache/private/pikaur/build/elasticsearch
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp cp -r /var/cache/private/pikaur/aur_repos/elasticsearch/PKGBUILD /var/cache/private/pikaur/aur_repos/elasticsearch/elasticsearch-keystore.service /var/cache/private/pikaur/aur_repos/elasticsearch/elasticsearch-keystore@.service /var/cache/private/pikaur/aur_repos/elasticsearch/elasticsearch-sysctl.conf /var/cache/private/pikaur/aur_repos/elasticsearch/elasticsearch-tmpfile.conf /var/cache/private/pikaur/aur_repos/elasticsearch/elasticsearch-user.conf /var/cache/private/pikaur/aur_repos/elasticsearch/elasticsearch.default /var/cache/private/pikaur/aur_repos/elasticsearch/elasticsearch.service /var/cache/private/pikaur/aur_repos/elasticsearch/elasticsearch@.service /var/cache/private/pikaur/aur_repos/elasticsearch/patch-log4j-JAR-to-remove-JndiLookup-class-81629.patch /var/cache/private/pikaur/aur_repos/elasticsearch/remove-systemd-distribution-check.patch /var/cache/private/pikaur/aur_repos/elasticsearch/.SRCINFO /var/cache/private/pikaur/build/elasticsearch/
=> pacman --color=always --deptest java-runtime-headless<=16 systemd libxml2
=> pacman --color=always --deptest java-environment=11
Reading local package database...
=> pacman --color=always --deptest java-runtime-headless<=16 systemd libxml2
=> pacman --color=always --deptest java-environment=11
:: Installing repository dependencies for elasticsearch:
pikspect => pacman --color=always --sync --asdeps java-environment=11 java-runtime-headless<=16
:: debug: pikspect: Opening virtual terminal...
:: There are 2 providers available for java-runtime-headless<=16:
:: Repository extra
   1) jre11-openjdk-headless  2) jre8-openjdk-headless

Enter a number (default=1): 1
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: harfbuzz will be installed before its freetype2 dependency

Package (17)                   New Version   Net Change

extra/freetype2                2.11.1-1        1.59 MiB
extra/giflib                   5.2.1-2         0.30 MiB
extra/graphite                 1:1.3.14-1      0.67 MiB
extra/harfbuzz                 3.2.0-1         5.45 MiB
extra/hicolor-icon-theme       0.17-2          0.05 MiB
extra/java-environment-common  3-3             0.00 MiB
extra/java-runtime-common      3-3             0.01 MiB
extra/jre11-openjdk            11.0.13.u8-1    0.52 MiB
extra/lcms2                    2.12-1          0.65 MiB
extra/libjpeg-turbo            2.1.2-1         2.02 MiB
extra/libnet                   1:1.1.6-1       0.30 MiB
extra/libpng                   1.6.37-3        0.55 MiB
extra/libtiff                  4.3.0-1         2.82 MiB
core/nspr                      4.33-1          0.72 MiB
core/nss                       3.74-1          4.85 MiB
extra/jdk11-openjdk            11.0.13.u8-1   87.48 MiB
extra/jre11-openjdk-headless   11.0.13.u8-1  157.52 MiB

Total Installed Size:  265.50 MiB

:: Proceed with installation? [Y/n] Y
(17/17) checking keys in keyring                                       [########################################] 100%
(17/17) checking package integrity                                     [########################################] 100%
(17/17) loading package files                                          [########################################] 100%
(17/17) checking for file conflicts                                    [########################################] 100%
(17/17) checking available disk space                                  [########################################] 100%
:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 14
:: Processing package changes...
( 1/17) installing java-runtime-common                                 [########################################] 100%
For the complete set of Java binaries to be available in your PATH,
you need to re-login or source /etc/profile.d/jre.sh
Please note that this package does not support forcing JAVA_HOME as former package java-common did
( 2/17) installing nspr                                                [########################################] 100%
( 3/17) installing nss                                                 [########################################] 100%
( 4/17) installing libjpeg-turbo                                       [########################################] 100%
Optional dependencies for libjpeg-turbo
    java-runtime>11: for TurboJPEG Java wrapper
( 5/17) installing libtiff                                             [########################################] 100%
Optional dependencies for libtiff
    freeglut: for using tiffgt
( 6/17) installing lcms2                                               [########################################] 100%
( 7/17) installing libnet                                              [########################################] 100%
( 8/17) installing libpng                                              [########################################] 100%
( 9/17) installing graphite                                            [########################################] 100%
(10/17) installing harfbuzz                                            [########################################] 100%
Optional dependencies for harfbuzz
    cairo: hb-view program
    chafa: hb-view program
(11/17) installing freetype2                                           [########################################] 100%
(12/17) installing jre11-openjdk-headless                              [########################################] 100%
Optional dependencies for jre11-openjdk-headless
    java-rhino: for some JavaScript support
(13/17) installing giflib                                              [########################################] 100%
(14/17) installing jre11-openjdk                                       [########################################] 100%
when you use a non-reparenting window manager,
set _JAVA_AWT_WM_NONREPARENTING=1 in /etc/profile.d/jre.sh
Optional dependencies for jre11-openjdk
    alsa-lib: for basic sound support
    gtk2: for the Gtk+ 2 look and feel - desktop usage
    gtk3: for the Gtk+ 3 look and feel - desktop usage
(15/17) installing java-environment-common                             [########################################] 100%
(16/17) installing hicolor-icon-theme                                  [########################################] 100%
(17/17) installing jdk11-openjdk                                       [########################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Performing snapper post snapshots for the following configurations...
==> root: 15
Reading local package database...
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/elasticsearch makepkg --packagelist

:: Starting the build:
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/elasticsearch makepkg --force
Running as unit: run-u39.service
Press ^] three times within 1s to disconnect TTY.
==> Making package: elasticsearch 7.10.2-2 (Sun 23 Jan 2022 04:57:58 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading elasticsearch-7.10.2.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   130  100   130    0     0    461      0 --:--:-- --:--:-- --:--:--   462
100 45.9M    0 45.9M    0     0  7741k      0 --:--:--  0:00:06 --:--:-- 8721k
  -> Found elasticsearch.service
  -> Found elasticsearch@.service
  -> Found elasticsearch-keystore.service
  -> Found elasticsearch-keystore@.service
  -> Found elasticsearch-sysctl.conf
  -> Found elasticsearch-user.conf
  -> Found elasticsearch-tmpfile.conf
  -> Found elasticsearch.default
  -> Found remove-systemd-distribution-check.patch
  -> Found patch-log4j-JAR-to-remove-JndiLookup-class-81629.patch
==> Validating source files with sha256sums...
    elasticsearch-7.10.2.tar.gz ... Passed
    elasticsearch.service ... Passed
    elasticsearch@.service ... Passed
    elasticsearch-keystore.service ... Passed
    elasticsearch-keystore@.service ... Passed
    elasticsearch-sysctl.conf ... Passed
    elasticsearch-user.conf ... Passed
    elasticsearch-tmpfile.conf ... Passed
    elasticsearch.default ... Passed
    remove-systemd-distribution-check.patch ... Passed
    patch-log4j-JAR-to-remove-JndiLookup-class-81629.patch ... Passed
==> Extracting sources...
  -> Extracting elasticsearch-7.10.2.tar.gz with bsdtar
==> Starting prepare()...
patching file modules/systemd/src/main/java/org/elasticsearch/systemd/SystemdPlugin.java
patching file distribution/build.gradle
Hunk #1 succeeded at 331 (offset 56 lines).
patching file libs/build.gradle
Hunk #1 succeeded at 17 with fuzz 1 (offset 11 lines).
patching file libs/log4j/build.gradle
==> Starting build()...
Exception in thread "main" java.lang.RuntimeException: Could not create parent directory for lock file /.gradle/wrapper/dists/gradle-6.6.1-all/ejrtlte9hlw8v6ii20a9584rs/gradle-6.6.1-all.zip.lck
	at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:43)
	at org.gradle.wrapper.Install.createDist(Install.java:48)
	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
==> ERROR: A failure occurred in build().
    Aborting...
Finished with result: exit-code
Main processes terminated with: code=exited/status=4
Service runtime: 8.954s
CPU time consumed: 3.840s

Command 'systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/elasticsearch makepkg --force' failed to execute.
:: debug: PROMPT: Gonna get input from user...
:: debug: PROMPT: Restoring TTY...
:: debug: PROMPT: Using standard input reader...
:: Try recovering?
[R] retry build
[p] PGP check skip
[c] checksums skip
[f] check() skip
[i] ignore architecture
[d] delete build dir and try again
[e] edit PKGBUILD
------------------------
[s] skip building this package
[a] abort building all the packages
> a
:: debug: PROMPT: Reverting to prev TTY state...
:: debug: PROMPT: Got answer: 'a'
:: debug: build: Gonna compute diff of installed pkgs
:: debug: build: deps_packages_installed={'jre11-openjdk', 'graphite', 'jdk11-openjdk', 'giflib', 'nspr', 'libtiff', 'harfbuzz', 'java-runtime-common', 'freetype2', 'libnet', 'nss', 'java-environment-common', 'libpng', 'jre11-openjdk-headless', 'libjpeg-turbo', 'lcms2', 'hicolor-icon-theme'}
:: debug: build: deps_packages_removed=set()
:: Removing already installed dependencies for elasticsearch:
pikspect => pacman --color=always --remove jre11-openjdk graphite jdk11-openjdk giflib nspr libtiff harfbuzz java-runtime-common freetype2 libnet nss java-environment-common libpng jre11-openjdk-headless libjpeg-turbo lcms2 hicolor-icon-theme
:: debug: pikspect: Opening virtual terminal...
checking dependencies...
:: grub optionally requires freetype2: For grub-mkfont usage
warning: dependency cycle detected:
warning: freetype2 will be removed after its harfbuzz dependency

Package (17)             Old Version   Net Change 

freetype2                2.11.1-1        -1.59 MiB
giflib                   5.2.1-2         -0.30 MiB
graphite                 1:1.3.14-1      -0.67 MiB
harfbuzz                 3.2.0-1         -5.45 MiB
hicolor-icon-theme       0.17-2          -0.05 MiB
java-environment-common  3-3              0.00 MiB
java-runtime-common      3-3             -0.01 MiB
jdk11-openjdk            11.0.13.u8-1   -87.48 MiB
jre11-openjdk            11.0.13.u8-1    -0.52 MiB
jre11-openjdk-headless   11.0.13.u8-1  -157.52 MiB
lcms2                    2.12-1          -0.65 MiB
libjpeg-turbo            2.1.2-1         -2.02 MiB
libnet                   1:1.1.6-1       -0.30 MiB
libpng                   1.6.37-3        -0.55 MiB
libtiff                  4.3.0-1         -2.82 MiB
nspr                     4.33-1          -0.72 MiB
nss                      3.74-1          -4.85 MiB

Total Removed Size:  265.50 MiB

:: Do you want to remove these packages? [Y/n] Y
:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 16
:: Processing package changes...
( 1/17) removing jdk11-openjdk                                         [########################################] 100%
( 2/17) removing hicolor-icon-theme                                    [########################################] 100%
( 3/17) removing java-environment-common                               [########################################] 100%
( 4/17) removing jre11-openjdk                                         [########################################] 100%
( 5/17) removing jre11-openjdk-headless                                [########################################] 100%
( 6/17) removing lcms2                                                 [########################################] 100%
( 7/17) removing libtiff                                               [########################################] 100%
( 8/17) removing libjpeg-turbo                                         [########################################] 100%
( 9/17) removing nss                                                   [########################################] 100%
(10/17) removing nspr                                                  [########################################] 100%
(11/17) removing libnet                                                [########################################] 100%
(12/17) removing java-runtime-common                                   [########################################] 100%
(13/17) removing harfbuzz                                              [########################################] 100%
(14/17) removing freetype2                                             [########################################] 100%
(15/17) removing graphite                                              [########################################] 100%
(16/17) removing libpng                                                [########################################] 100%
(17/17) removing giflib                                                [########################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Performing snapper post snapshots for the following configurations...
==> root: 17

manual install

$ git clone https://aur.archlinux.org/elasticsearch.git
Cloning into 'elasticsearch'...
remote: Enumerating objects: 14, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 14 (delta 2), reused 9 (delta 0), pack-reused 0
Receiving objects: 100% (14/14), 6.85 KiB | 6.85 MiB/s, done.
Resolving deltas: 100% (2/2), done.
$ cd elasticsearch
$ ls -l
total 48
-rw-r--r-- 1 klaus klaus  218 Jan 23 17:03 elasticsearch.default
-rw-r--r-- 1 klaus klaus  261 Jan 23 17:03 elasticsearch-keystore.service
-rw-r--r-- 1 klaus klaus  311 Jan 23 17:03 elasticsearch-keystore@.service
-rw-r--r-- 1 klaus klaus 1844 Jan 23 17:03 elasticsearch.service
-rw-r--r-- 1 klaus klaus 1879 Jan 23 17:03 elasticsearch@.service
-rw-r--r-- 1 klaus klaus   23 Jan 23 17:03 elasticsearch-sysctl.conf
-rw-r--r-- 1 klaus klaus  753 Jan 23 17:03 elasticsearch-tmpfile.conf
-rw-r--r-- 1 klaus klaus   39 Jan 23 17:03 elasticsearch-user.conf
-rw-r--r-- 1 klaus klaus 1969 Jan 23 17:03 patch-log4j-JAR-to-remove-JndiLookup-class-81629.patch
-rw-r--r-- 1 klaus klaus 4676 Jan 23 17:03 PKGBUILD
-rw-r--r-- 1 klaus klaus 1137 Jan 23 17:03 remove-systemd-distribution-check.patch
$ makepkg
...
...
...

==> Starting build()...
Downloading https://services.gradle.org/distributions/gradle-6.6.1-all.zip
.............10%..............20%..............30%..............40%..............50%..............60%.............70%..............80%..............90%..............100%

Welcome to Gradle 6.6.1!

Here are the highlights of this release:
 - Experimental build configuration caching
 - Built-in conventions for handling credentials
 - Java compilation supports --release flag

For more details see https://docs.gradle.org/6.6.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
...
...
...
BUILD SUCCESSFUL in 1m 38s
387 actionable tasks: 380 executed, 7 up-to-date
==> Entering fakeroot environment...
==> Starting package()...
==> 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 "elasticsearch"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: elasticsearch 7.10.2-2 (Sun 23 Jan 2022 05:15:50 PM CET)
$ ls -l 
total 206224
-rw-r--r-- 1 klaus klaus 162973003 Jan 23 17:15 elasticsearch-7.10.2-2-x86_64.pkg.tar.zst
-rw-r--r-- 1 klaus klaus  48142440 Jan 23 17:11 elasticsearch-7.10.2.tar.gz
-rw-r--r-- 1 klaus klaus       218 Jan 23 17:03 elasticsearch.default
-rw-r--r-- 1 klaus klaus       261 Jan 23 17:03 elasticsearch-keystore.service
-rw-r--r-- 1 klaus klaus       311 Jan 23 17:03 elasticsearch-keystore@.service
-rw-r--r-- 1 klaus klaus      1844 Jan 23 17:03 elasticsearch.service
-rw-r--r-- 1 klaus klaus      1879 Jan 23 17:03 elasticsearch@.service
-rw-r--r-- 1 klaus klaus        23 Jan 23 17:03 elasticsearch-sysctl.conf
-rw-r--r-- 1 klaus klaus       753 Jan 23 17:03 elasticsearch-tmpfile.conf
-rw-r--r-- 1 klaus klaus        39 Jan 23 17:03 elasticsearch-user.conf
-rw-r--r-- 1 klaus klaus      1969 Jan 23 17:03 patch-log4j-JAR-to-remove-JndiLookup-class-81629.patch
drwxr-xr-x 3 klaus klaus        27 Jan 23 17:15 pkg
-rw-r--r-- 1 klaus klaus      4676 Jan 23 17:03 PKGBUILD
-rw-r--r-- 1 klaus klaus      1137 Jan 23 17:03 remove-systemd-distribution-check.patch
drwxr-xr-x 3 klaus klaus      4096 Jan 23 17:11 src
# pacman -U elasticsearch-7.10.2-2-x86_64.pkg.tar.zst 
loading packages...
resolving dependencies...
looking for conflicting packages...

Package (1)    New Version  Net Change

elasticsearch  7.10.2-2     222.55 MiB

Total Installed Size:  222.55 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%
:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 28
:: Processing package changes...
(1/1) installing elasticsearch                                         [########################################] 100%
:: Running post-transaction hooks...
(1/6) Creating system user accounts...
Creating group 'elasticsearch' with GID 973.
Creating user 'elasticsearch' (Elasticsearch user) with UID 973 and GID 973.
(2/6) Reloading system manager configuration...
(3/6) Applying kernel sysctl settings...
(4/6) Creating temporary files...
(5/6) Arming ConditionNeedsUpdate...
(6/6) Performing snapper post snapshots for the following configurations...
==> root: 29
@actionless
Copy link
Owner

Performing snapper pre snapshots for the following configurations...

does it works without this?

@tachtler
Copy link
Author

Hi,

I will build a new virtual machine for testing, without pre snapshots to answer your question.

Thank you in advance
Klaus.

@tachtler
Copy link
Author

Hi,

same problem situation without performing snapper pre snapshots, see installation attempt below:

# pikaur -S elasticsearch
Reading repository package databases...
Reading local package database...
Resolving AUR dependencies...

:: New dependencies will be installed from repository:
 freetype2 (for harfbuzz, harfbuzz, jre11-openjdk-headless, jre11-openjdk-headless)    -> 2.11.1-1
 giflib (for jre11-openjdk, jre11-openjdk)                  -> 5.2.1-2
 graphite (for harfbuzz)                                    -> 1:1.3.14-1
 harfbuzz (for freetype2, jre11-openjdk-headless, jre11-openjdk-headless)    -> 3.2.0-1
 hicolor-icon-theme (for jdk11-openjdk)                     -> 0.17-2
 java-environment-common (for jdk11-openjdk)                -> 3-3
 java-runtime-common (for jre11-openjdk-headless)           -> 3-3
 jdk11-openjdk (for elasticsearch)                          -> 11.0.13.u8-1
 jre11-openjdk (for jdk11-openjdk, jdk11-openjdk)           -> 11.0.13.u8-1
 jre11-openjdk-headless (for jre11-openjdk, jre11-openjdk, elasticsearch)    -> 11.0.13.u8-1
 lcms2 (for jre11-openjdk-headless, jre11-openjdk-headless)    -> 2.12-1
 libjpeg-turbo (for libtiff, libtiff, jre11-openjdk-headless, jre11-openjdk-headless)    -> 2.1.2-1
 libnet (for jre11-openjdk-headless)                        -> 1:1.1.6-1
 libpng (for freetype2, jre11-openjdk)                      -> 1.6.37-3
 libtiff (for lcms2)                                        -> 4.3.0-1
 nspr (for nss)                                             -> 4.33-1
 nss (for jre11-openjdk-headless)                           -> 3.74-1

:: AUR package will be installed:
 elasticsearch [orphaned]                                   -> 7.10.2-2 [outofdate: 2022/01/10]

:: Proceed with installation? [Y/n] 
:: [v]iew package details   [m]anually select packages
>> Y
looking for conflicting AUR packages...
:: warning: Not showing diff for elasticsearch package (installing for the first time)
Do you want to edit PKGBUILD for elasticsearch package? [Y/n] n

Reading local package database...
:: Installing repository dependencies for elasticsearch:
:: There are 2 providers available for java-runtime-headless<=16:
:: Repository extra
   1) jre11-openjdk-headless  2) jre8-openjdk-headless

Enter a number (default=1): 1
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: harfbuzz will be installed before its freetype2 dependency

Package (17)                   New Version   Net Change  Download Size

extra/freetype2                2.11.1-1        1.59 MiB       0.48 MiB
extra/giflib                   5.2.1-2         0.30 MiB       0.07 MiB
extra/graphite                 1:1.3.14-1      0.67 MiB       0.22 MiB
extra/harfbuzz                 3.2.0-1         5.45 MiB       0.91 MiB
extra/hicolor-icon-theme       0.17-2          0.05 MiB       0.01 MiB
extra/java-environment-common  3-3             0.00 MiB       0.00 MiB
extra/java-runtime-common      3-3             0.01 MiB       0.00 MiB
extra/jre11-openjdk            11.0.13.u8-1    0.52 MiB       0.19 MiB
extra/lcms2                    2.12-1          0.65 MiB       0.21 MiB
extra/libjpeg-turbo            2.1.2-1         2.02 MiB       0.41 MiB
extra/libnet                   1:1.1.6-1       0.30 MiB       0.09 MiB
extra/libpng                   1.6.37-3        0.55 MiB       0.24 MiB
extra/libtiff                  4.3.0-1         2.82 MiB       0.85 MiB
core/nspr                      4.33-1          0.72 MiB       0.19 MiB
core/nss                       3.74-1          4.85 MiB       1.52 MiB
extra/jdk11-openjdk            11.0.13.u8-1   87.48 MiB      76.30 MiB
extra/jre11-openjdk-headless   11.0.13.u8-1  157.52 MiB      35.24 MiB

Total Download Size:   116.94 MiB
Total Installed Size:  265.50 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
 jdk11-openjdk-11.0.13.u8-1-x86_64          76.3 MiB  12.9 MiB/s 00:06 [########################################] 100%
 jre11-openjdk-headless-11.0.13.u8-1-...    35.2 MiB  12.9 MiB/s 00:03 [########################################] 100%
 nss-3.74-1-x86_64                        1552.6 KiB  7.58 MiB/s 00:00 [########################################] 100%
 harfbuzz-3.2.0-1-x86_64                   927.6 KiB  7.55 MiB/s 00:00 [########################################] 100%
 libtiff-4.3.0-1-x86_64                    869.1 KiB  7.07 MiB/s 00:00 [########################################] 100%
 freetype2-2.11.1-1-x86_64                 488.8 KiB  5.30 MiB/s 00:00 [########################################] 100%
 libjpeg-turbo-2.1.2-1-x86_64              422.0 KiB  3.75 MiB/s 00:00 [########################################] 100%
 libpng-1.6.37-3-x86_64                    245.9 KiB  3.43 MiB/s 00:00 [########################################] 100%
 graphite-1:1.3.14-1-x86_64                224.5 KiB  2.74 MiB/s 00:00 [########################################] 100%
 lcms2-2.12-1-x86_64                       212.8 KiB  2.60 MiB/s 00:00 [########################################] 100%
 nspr-4.33-1-x86_64                        197.9 KiB  2.42 MiB/s 00:00 [########################################] 100%
 jre11-openjdk-11.0.13.u8-1-x86_64         191.4 KiB  2.34 MiB/s 00:00 [########################################] 100%
 libnet-1:1.1.6-1-x86_64                    96.3 KiB  1376 KiB/s 00:00 [########################################] 100%
 giflib-5.2.1-2-x86_64                      73.7 KiB  1053 KiB/s 00:00 [########################################] 100%
 hicolor-icon-theme-0.17-2-any              10.2 KiB   171 KiB/s 00:00 [########################################] 100%
 java-runtime-common-3-3-any                 4.9 KiB  97.4 KiB/s 00:00 [########################################] 100%
 java-environment-common-3-3-any             2.5 KiB  49.9 KiB/s 00:00 [########################################] 100%
 Total (17/17)                             116.9 MiB  10.9 MiB/s 00:11 [########################################] 100%
(17/17) checking keys in keyring                                       [########################################] 100%
(17/17) checking package integrity                                     [########################################] 100%
(17/17) loading package files                                          [########################################] 100%
(17/17) checking for file conflicts                                    [########################################] 100%
(17/17) checking available disk space                                  [########################################] 100%
:: Processing package changes...
( 1/17) installing java-runtime-common                                 [########################################] 100%
For the complete set of Java binaries to be available in your PATH,
you need to re-login or source /etc/profile.d/jre.sh
Please note that this package does not support forcing JAVA_HOME as former package java-common did
( 2/17) installing nspr                                                [########################################] 100%
( 3/17) installing nss                                                 [########################################] 100%
( 4/17) installing libjpeg-turbo                                       [########################################] 100%
Optional dependencies for libjpeg-turbo
    java-runtime>11: for TurboJPEG Java wrapper
( 5/17) installing libtiff                                             [########################################] 100%
Optional dependencies for libtiff
    freeglut: for using tiffgt
( 6/17) installing lcms2                                               [########################################] 100%
( 7/17) installing libnet                                              [########################################] 100%
( 8/17) installing libpng                                              [########################################] 100%
( 9/17) installing graphite                                            [########################################] 100%
(10/17) installing harfbuzz                                            [########################################] 100%
Optional dependencies for harfbuzz
    cairo: hb-view program
    chafa: hb-view program
(11/17) installing freetype2                                           [########################################] 100%
(12/17) installing jre11-openjdk-headless                              [########################################] 100%
Optional dependencies for jre11-openjdk-headless
    java-rhino: for some JavaScript support
(13/17) installing giflib                                              [########################################] 100%
(14/17) installing jre11-openjdk                                       [########################################] 100%
when you use a non-reparenting window manager,
set _JAVA_AWT_WM_NONREPARENTING=1 in /etc/profile.d/jre.sh
Optional dependencies for jre11-openjdk
    alsa-lib: for basic sound support
    gtk2: for the Gtk+ 2 look and feel - desktop usage
    gtk3: for the Gtk+ 3 look and feel - desktop usage
(15/17) installing java-environment-common                             [########################################] 100%
(16/17) installing hicolor-icon-theme                                  [########################################] 100%
(17/17) installing jdk11-openjdk                                       [########################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
Reading local package database...

:: Starting the build:
Running as unit: run-u12.service
Press ^] three times within 1s to disconnect TTY.
==> Making package: elasticsearch 7.10.2-2 (Thu 27 Jan 2022 10:01:29 AM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading elasticsearch-7.10.2.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   130  100   130    0     0    390      0 --:--:-- --:--:-- --:--:--   390
100 45.9M    0 45.9M    0     0  7661k      0 --:--:--  0:00:06 --:--:-- 8128k
  -> Found elasticsearch.service
  -> Found elasticsearch@.service
  -> Found elasticsearch-keystore.service
  -> Found elasticsearch-keystore@.service
  -> Found elasticsearch-sysctl.conf
  -> Found elasticsearch-user.conf
  -> Found elasticsearch-tmpfile.conf
  -> Found elasticsearch.default
  -> Found remove-systemd-distribution-check.patch
  -> Found patch-log4j-JAR-to-remove-JndiLookup-class-81629.patch
==> Validating source files with sha256sums...
    elasticsearch-7.10.2.tar.gz ... Passed
    elasticsearch.service ... Passed
    elasticsearch@.service ... Passed
    elasticsearch-keystore.service ... Passed
    elasticsearch-keystore@.service ... Passed
    elasticsearch-sysctl.conf ... Passed
    elasticsearch-user.conf ... Passed
    elasticsearch-tmpfile.conf ... Passed
    elasticsearch.default ... Passed
    remove-systemd-distribution-check.patch ... Passed
    patch-log4j-JAR-to-remove-JndiLookup-class-81629.patch ... Passed
==> Extracting sources...
  -> Extracting elasticsearch-7.10.2.tar.gz with bsdtar
==> Starting prepare()...
patching file modules/systemd/src/main/java/org/elasticsearch/systemd/SystemdPlugin.java
patching file distribution/build.gradle
Hunk #1 succeeded at 331 (offset 56 lines).
patching file libs/build.gradle
Hunk #1 succeeded at 17 with fuzz 1 (offset 11 lines).
patching file libs/log4j/build.gradle
==> Starting build()...
Exception in thread "main" java.lang.RuntimeException: Could not create parent directory for lock file /.gradle/wrapper/dists/gradle-6.6.1-all/ejrtlte9hlw8v6ii20a9584rs/gradle-6.6.1-all.zip.lck
	at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:43)
	at org.gradle.wrapper.Install.createDist(Install.java:48)
	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
==> ERROR: A failure occurred in build().
    Aborting...
Finished with result: exit-code
Main processes terminated with: code=exited/status=4
Service runtime: 9.274s
CPU time consumed: 3.975s

Command 'systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/elasticsearch makepkg --force' failed to execute.
:: Try recovering?
[R] retry build
[p] PGP check skip
[c] checksums skip
[f] check() skip
[i] ignore architecture
[d] delete build dir and try again
[e] edit PKGBUILD
------------------------
[s] skip building this package
[a] abort building all the packages
> a
:: Removing already installed dependencies for elasticsearch:
checking dependencies...
:: grub optionally requires freetype2: For grub-mkfont usage
warning: dependency cycle detected:
warning: freetype2 will be removed after its harfbuzz dependency

Package (17)             Old Version   Net Change 

freetype2                2.11.1-1        -1.59 MiB
giflib                   5.2.1-2         -0.30 MiB
graphite                 1:1.3.14-1      -0.67 MiB
harfbuzz                 3.2.0-1         -5.45 MiB
hicolor-icon-theme       0.17-2          -0.05 MiB
java-environment-common  3-3              0.00 MiB
java-runtime-common      3-3             -0.01 MiB
jdk11-openjdk            11.0.13.u8-1   -87.48 MiB
jre11-openjdk            11.0.13.u8-1    -0.52 MiB
jre11-openjdk-headless   11.0.13.u8-1  -157.52 MiB
lcms2                    2.12-1          -0.65 MiB
libjpeg-turbo            2.1.2-1         -2.02 MiB
libnet                   1:1.1.6-1       -0.30 MiB
libpng                   1.6.37-3        -0.55 MiB
libtiff                  4.3.0-1         -2.82 MiB
nspr                     4.33-1          -0.72 MiB
nss                      3.74-1          -4.85 MiB

Total Removed Size:  265.50 MiB

:: Do you want to remove these packages? [Y/n] Y
:: Processing package changes...
( 1/17) removing jdk11-openjdk                                         [########################################] 100%
( 2/17) removing java-environment-common                               [########################################] 100%
( 3/17) removing hicolor-icon-theme                                    [########################################] 100%
( 4/17) removing jre11-openjdk                                         [########################################] 100%
( 5/17) removing jre11-openjdk-headless                                [########################################] 100%
( 6/17) removing nss                                                   [########################################] 100%
( 7/17) removing nspr                                                  [########################################] 100%
( 8/17) removing libnet                                                [########################################] 100%
( 9/17) removing java-runtime-common                                   [########################################] 100%
(10/17) removing lcms2                                                 [########################################] 100%
(11/17) removing libtiff                                               [########################################] 100%
(12/17) removing libjpeg-turbo                                         [########################################] 100%
(13/17) removing harfbuzz                                              [########################################] 100%
(14/17) removing graphite                                              [########################################] 100%
(15/17) removing freetype2                                             [########################################] 100%
(16/17) removing libpng                                                [########################################] 100%
(17/17) removing giflib                                                [########################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

Thank you for your help,
Klaus.

@actionless
Copy link
Owner

this time i see it's build, not installation error:

==> Starting build()...
Exception in thread "main" java.lang.RuntimeException: Could not create parent directory for lock file /.gradle/wrapper/dists/gradle-6.6.1-all/ejrtlte9hlw8v6ii20a9584rs/gradle-6.6.1-all.zip.lck
	at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:43)
	at org.gradle.wrapper.Install.createDist(Install.java:48)
	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
==> ERROR: A failure occurred in build().
    Aborting...
    ```

@actionless
Copy link
Owner

i hardly believe what manually running systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/elasticsearch makepkg --force could potentially produce any different result for you

@tachtler
Copy link
Author

Hi,

systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/elasticsearch makepkg --force

I will try that later.

Thank you
Klaus.

@tachtler
Copy link
Author

Hi,

I'm sorry, but the command

systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/elasticsearch makepkg --force

also doesn't work

# systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/elasticsearch makepkg --force
Running as unit: run-u14.service
Press ^] three times within 1s to disconnect TTY.
==> Making package: elasticsearch 7.10.2-2 (Thu 27 Jan 2022 03:38:04 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found elasticsearch-7.10.2.tar.gz
  -> Found elasticsearch.service
  -> Found elasticsearch@.service
  -> Found elasticsearch-keystore.service
  -> Found elasticsearch-keystore@.service
  -> Found elasticsearch-sysctl.conf
  -> Found elasticsearch-user.conf
  -> Found elasticsearch-tmpfile.conf
  -> Found elasticsearch.default
  -> Found remove-systemd-distribution-check.patch
  -> Found patch-log4j-JAR-to-remove-JndiLookup-class-81629.patch
==> Validating source files with sha256sums...
    elasticsearch-7.10.2.tar.gz ... Passed
    elasticsearch.service ... Passed
    elasticsearch@.service ... Passed
    elasticsearch-keystore.service ... Passed
    elasticsearch-keystore@.service ... Passed
    elasticsearch-sysctl.conf ... Passed
    elasticsearch-user.conf ... Passed
    elasticsearch-tmpfile.conf ... Passed
    elasticsearch.default ... Passed
    remove-systemd-distribution-check.patch ... Passed
    patch-log4j-JAR-to-remove-JndiLookup-class-81629.patch ... Passed
==> Extracting sources...
  -> Extracting elasticsearch-7.10.2.tar.gz with bsdtar
==> Starting prepare()...
patching file modules/systemd/src/main/java/org/elasticsearch/systemd/SystemdPlugin.java
patching file distribution/build.gradle
Hunk #1 succeeded at 331 (offset 56 lines).
patching file libs/build.gradle
Hunk #1 succeeded at 17 with fuzz 1 (offset 11 lines).
The next patch would create the file libs/log4j/build.gradle,
which already exists!  Skipping patch.
1 out of 1 hunk ignored
==> ERROR: A failure occurred in prepare().
    Aborting...
Finished with result: exit-code
Main processes terminated with: code=exited/status=4
Service runtime: 2.410s
CPU time consumed: 2.264s

Thank you,
Klaus.

@actionless
Copy link
Owner

yeah, the it's a rootcase - either gradle not working correctly under this configuration, or mb some arguments of the command should added/changed to accomodate it

@actionless
Copy link
Owner

hm, i see you're using stable version, not git

i believe in pikaur-git that could be fixed by 18f746f

@tachtler
Copy link
Author

Hi,

I've installed the pikaur-git version with following installation commands:

git clone https://aur.archlinux.org/pikaur-git.git
Cloning into 'pikaur-git'...
remote: Enumerating objects: 634, done.
remote: Counting objects: 100% (634/634), done.
remote: Compressing objects: 100% (385/385), done.
remote: Total 634 (delta 249), reused 634 (delta 249), pack-reused 0
Receiving objects: 100% (634/634), 154.19 KiB | 1.33 MiB/s, done.
Resolving deltas: 100% (249/249), done.
$ cd pikaur-git/
$ makepkg -cCfsi
==> Making package: pikaur-git 1.9-1 (Fri 28 Jan 2022 07:58:58 AM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning pikaur-git git repo...
Cloning into bare repository '/tmp/pikaur-git/pikaur-git'...
remote: Enumerating objects: 11134, done.
remote: Counting objects: 100% (902/902), done.
remote: Compressing objects: 100% (557/557), done.
remote: Total 11134 (delta 607), reused 557 (delta 318), pack-reused 10232
Receiving objects: 100% (11134/11134), 5.09 MiB | 7.45 MiB/s, done.
Resolving deltas: 100% (8092/8092), done.
...
...
...
Writing /tmp/pikaur-git/pkg/pikaur-git/usr/lib/python3.10/site-packages/pikaur-1.9-py3.10.egg-info
==> 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 "pikaur-git"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: pikaur-git 1.9.r19.g3599d68-1 (Fri 28 Jan 2022 07:59:01 AM CET)
==> Installing package pikaur-git with pacman -U...
[sudo] password for klaus: 
loading packages...
resolving dependencies...
looking for conflicting packages...

Package (1)  New Version         Net Change

pikaur-git   1.9.r19.g3599d68-1    1.04 MiB

Total Installed Size:  1.04 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) installing pikaur-git                                            [########################################] 100%
Optional dependencies for pikaur-git
    asp: for ABS support in -G/--getpkgbuild operation
    python-pysocks: for socks5 proxy support
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
==> Cleaning up...

Now the installed version are:

$ pikaur -Vq
Pikaur v1.9.r19.g3599d68
Pacman v6.0.1 - libalpm v13.0.1 - pyalpm v0.10.6

So I've tried the installation of elasticsearch again, but it still doesn't work as you can see:

# pikaur -S elasticsearch
Reading repository package databases...
Reading local package database...
Resolving AUR dependencies...

:: AUR package will be installed:
 elasticsearch [orphaned]                                   -> 7.10.2-2 [outofdate: 2022/01/10]

:: Proceed with installation? [Y/n] 
:: [v]iew package details   [m]anually select packages
>> Y
looking for conflicting AUR packages...
:: warning: Not showing diff for elasticsearch package (installing for the first time)
Do you want to edit PKGBUILD for elasticsearch package? [Y/n] n


:: Starting the build:
Running as unit: run-u24.service
Press ^] three times within 1s to disconnect TTY.
==> Making package: elasticsearch 7.10.2-2 (Fri 28 Jan 2022 08:04:25 AM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading elasticsearch-7.10.2.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   130  100   130    0     0    553      0 --:--:-- --:--:-- --:--:--   555
100 45.9M    0 45.9M    0     0  7690k      0 --:--:--  0:00:06 --:--:-- 8009k
  -> Found elasticsearch.service
  -> Found elasticsearch@.service
  -> Found elasticsearch-keystore.service
  -> Found elasticsearch-keystore@.service
  -> Found elasticsearch-sysctl.conf
  -> Found elasticsearch-user.conf
  -> Found elasticsearch-tmpfile.conf
  -> Found elasticsearch.default
  -> Found remove-systemd-distribution-check.patch
  -> Found patch-log4j-JAR-to-remove-JndiLookup-class-81629.patch
==> Validating source files with sha256sums...
    elasticsearch-7.10.2.tar.gz ... Passed
    elasticsearch.service ... Passed
    elasticsearch@.service ... Passed
    elasticsearch-keystore.service ... Passed
    elasticsearch-keystore@.service ... Passed
    elasticsearch-sysctl.conf ... Passed
    elasticsearch-user.conf ... Passed
    elasticsearch-tmpfile.conf ... Passed
    elasticsearch.default ... Passed
    remove-systemd-distribution-check.patch ... Passed
    patch-log4j-JAR-to-remove-JndiLookup-class-81629.patch ... Passed
==> Extracting sources...
  -> Extracting elasticsearch-7.10.2.tar.gz with bsdtar
==> Starting prepare()...
patching file modules/systemd/src/main/java/org/elasticsearch/systemd/SystemdPlugin.java
patching file distribution/build.gradle
Hunk #1 succeeded at 331 (offset 56 lines).
patching file libs/build.gradle
Hunk #1 succeeded at 17 with fuzz 1 (offset 11 lines).
patching file libs/log4j/build.gradle
==> Starting build()...
Exception in thread "main" java.lang.RuntimeException: Could not create parent directory for lock file /.gradle/wrapper/dists/gradle-6.6.1-all/ejrtlte9hlw8v6ii20a9584rs/gradle-6.6.1-all.zip.lck
	at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:43)
	at org.gradle.wrapper.Install.createDist(Install.java:48)
	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
==> ERROR: A failure occurred in build().
    Aborting...
Finished with result: exit-code
Main processes terminated with: code=exited/status=4
Service runtime: 8.542s
CPU time consumed: 3.356s

Command 'systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/elasticsearch makepkg --force' failed to execute.
:: Try recovering?
[R] retry build
[p] PGP check skip
[c] checksums skip
[f] skip 'check()' function of PKGBUILD
[i] ignore architecture
[d] delete build dir and try again
[e] edit PKGBUILD
------------------------
[s] skip building this package
[a] abort building all the packages
> s

Can't build 'elasticsearch'.

Failed to build following packages:
elasticsearch

Thank you for your patience
Klaus.

@actionless
Copy link
Owner

did some search, aparently this is duplicate of:

#498
gradle/gradle#13663

@actionless actionless added duplicate This issue or pull request already exists and removed need info labels Jan 30, 2022
@actionless
Copy link
Owner

i believe, you just need to find a way to tell gradle to not use /root/.gradle directory which SystemD-DynUsers have no rights to write to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants