Giter Club home page Giter Club logo

Comments (12)

kpcyrd avatar kpcyrd commented on June 17, 2024

hi! :) can you share the package this happened with?

from archlinux-repro.

Foxboron avatar Foxboron commented on June 17, 2024

Sorry, user root is not allowed to execute

This is a message from sudo, not repro.

from archlinux-repro.

frankm773 avatar frankm773 commented on June 17, 2024

hi! :) can you share the package this happened with?

This happens with any package. Last one that I tested was libseccomp

Sorry, user root is not allowed to execute

This is a message from sudo, not repro.

The command I used was "repro -d packagename.tar.zst"
The use of sudo therefore comes from 'repro', though I suspect the issue was triggered by something else on the system.

from archlinux-repro.

frankm773 avatar frankm773 commented on June 17, 2024

I created a new testuser to reproduce this with several packages and ended up getting even more errors

id
uid=1004(tester) gid=1004(tester) groups=1004(tester),998(wheel)

(276/276) installing which
[##################################################################################################################################################################]
100%
:: Running post-transaction hooks...
( 1/21) Creating system user accounts... Creating group 'avahi' with GID
975. Creating user 'avahi' (Avahi mDNS/DNS-SD daemon) with UID 975 and
GID 975. Creating group 'tss' with GID 974. Creating user 'tss' (tss
user for tpm2) with UID 974 and GID 974. ( 2/21) Updating journal
message catalog... ( 3/21) Reloading system manager configuration...
  Skipped: Running in chroot. ( 4/21) Updating udev hardware database...
( 5/21) Applying kernel sysctl settings...
  Skipped: Running in chroot. ( 6/21) Creating temporary files... (
7/21) Reloading device manager configuration...
  Skipped: Running in chroot. ( 8/21) Arming ConditionNeedsUpdate... (
9/21) Updating the MIME type database... (10/21) Updating fontconfig
configuration... (11/21) Rebuilding certificate stores... (12/21)
Reloading system bus configuration...
  Skipped: Running in chroot. (13/21) Warn about old perl modules
(14/21) Updating fontconfig cache... (15/21) Probing GDK-Pixbuf loader
modules... (16/21) Updating GIO module cache... (17/21) Compiling
GSettings XML schema files... (18/21) Probing GTK3 input method
modules... (19/21) Updating icon theme caches... (20/21) Updating the
info directory file... (21/21) Updating the desktop file MIME type
cache... Installing devtools from
https://archive.archlinux.org/packages/d/devtools-20220207-2-any.pkg.tar.zst
:: Retrieving packages...
 devtools-20220207-2-any 47.9 KiB 25.8 KiB/s 00:02
 [##################################################################################################################################################################]
 100%
loading packages... looking for conflicting packages... Packages (1)
devtools-20220207-2 Total Installed Size: 0.19 MiB
:: Proceed with installation? [Y/n]
(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 devtools
[##################################################################################################################################################################]
100% Optional dependencies for devtools
    btrfs-progs: btrfs support
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
'/usr/share/devtools/makepkg-x86_64.conf' -> '/mnt/etc/makepkg.conf'
Generating locales...
  en_US.UTF-8... done de_DE.UTF-8... done Generation complete. Sorry,
user root is not allowed to execute '/bin/bash -c bash -c .\
/etc/profile;\ .\ /env;\ cd\ /startdir;\ makepkg\ --syncdeps\ --clean\
--noconfirm\ --skippgpcheck' as builduser on zathura55046.
  -> Delete snapshot for zathura_55046...

108/108) installing which
[##################################################################################################################################################################]
100%
:: Running post-transaction hooks...
(1/3) Rebuilding certificate stores... (2/3) Warn about old perl modules
(3/3) Updating the info directory file... Installing devtools from
https://archive.archlinux.org/packages/d/devtools/devtools-20210202-3-any.pkg.tar.zst
:: Retrieving packages...
 devtools-20210202-3-any 41.7 KiB 393 KiB/s 00:00
 [##################################################################################################################################################################]
 100%
loading packages... looking for conflicting packages... Packages (1)
devtools-20210202-3 Total Installed Size: 0.16 MiB
:: Proceed with installation? [Y/n]
(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 devtools
[##################################################################################################################################################################]
100% Optional dependencies for devtools
    btrfs-progs: btrfs support
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
'/usr/share/devtools/makepkg-x86_64.conf' -> '/mnt/etc/makepkg.conf'
Generating locales...
  en_US.UTF-8... done de_DE.UTF-8... done Generation complete. useradd:
group 'users' does not exist useradd: the GROUP= configuration in
/etc/default/useradd will be ignored sudo: unable to change directory to
/build: Permission denied sudo: unable to execute /bin/bash: Permission
denied
  -> Delete snapshot for less_68638...

group 'users' does not exist // this group does exist
useradd: the GROUP= configuration in /etc/default/useradd will be ignored //useradd is still the default arch useradd
sudo: unable to change directory to /build: Permission denied
sudo: unable to execute /bin/bash: Permission denied

I find this all very confusing, any ideas what to look at?

from archlinux-repro.

Foxboron avatar Foxboron commented on June 17, 2024

What distro are you using, how did you install repo?

Run rm -rf /var/lib/repro, then use repro with DEBUG=1 defined and attach the complete output.

from archlinux-repro.

frankm773 avatar frankm773 commented on June 17, 2024

What distro are you using, how did you install repo?

This is on arch, installed via pacman using the official repo
https://archlinux.org/packages/community/any/archlinux-repro/

here is the full log with debug
https://gist.github.com/frankm773/019a48dfda4c391eda71f95af412f2de

Looking through /var/lib/repro I noticed the /build directory mentioned in the log is owned by uid 1000, even though the user running the script has uid 1004. This is possibly due to a namespace created by systemd-nspawn and may very well be related to the issue.

from archlinux-repro.

frankm773 avatar frankm773 commented on June 17, 2024

I tried some more packages and so far was not able to test a single package successfully.

I did get one more different error message though (while testing the bc package)


looking for conflicting packages... Packages (1) devtools-20210202-3
Total Installed Size: 0.16 MiB
:: Proceed with installation? [Y/n]
(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 devtools
[##################################################################################################################################################################]
100% Optional dependencies for devtools
    btrfs-progs: btrfs support
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
'/usr/share/devtools/makepkg-x86_64.conf' -> '/mnt/etc/makepkg.conf'
execv(locale-gen) failed: No such file or directory

There should be nothing different on this system in regards to the permissions as compared to a default arch install, so Im really confused about this.

from archlinux-repro.

kpcyrd avatar kpcyrd commented on June 17, 2024

Can you describe the setup you're using? Is this directly on a computer, inside of a container engine or a virtual machine?

from archlinux-repro.

frankm773 avatar frankm773 commented on June 17, 2024

It seems I found the issue: The umask setting on the effected machine is set to 077 instead of 022 (like is the default)
If umask is set to 022 repro works as intended but with a stricter umask setting it fails.

Can you describe the setup you're using? Is this directly on a computer, inside of a container engine or a virtual machine?

This was on bare metal. No container or VM

I suppose whether this is considered a bug or not depends on the question if non default umask settings are supposed to fail like this. Setting umask to the appropriate value inside the script may be a solution to avoid this.

from archlinux-repro.

Foxboron avatar Foxboron commented on June 17, 2024

The umask setting on the effected machine is set to 077 instead of 022 (like is the default)
If umask is set to 022 repro works as intended but with a stricter umask setting it fails.

I guess this mostly fails when we unpack the arch bootstrap ISO? I guess we can enforce the relaxed umask when unpacking.

I do consider this a bug and we should probably keep better tabs at the permissions of the files we create.

from archlinux-repro.

kpcyrd avatar kpcyrd commented on June 17, 2024

If it's the bootstrap iso we can use tar with -p when extracting to preserve the permissions (this is only the default when uid=0).

If this doesn't help we could call umask 022 in repro to set it to a known-good value.

from archlinux-repro.

frankm773 avatar frankm773 commented on June 17, 2024

I tried the -p option by adding it to this line

tar xvf "$IMGDIRECTORY/$bootstrap_img" -C "$BUILDDIRECTORY/root" --strip-components=1 > /dev/null

However, I still got permission errors for /build and similar files

Running 'umask 022' before executing the script seems to work though.

from archlinux-repro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.