#1 ./resources/scripts/misc/versioncheck: line 31: version: Permission denied

Closed
opened 2 years ago by Ghost · 8 comments
Ghost commented 2 years ago
version
versiondate

Are owned by root.

Solved by issuing sudo chown $USER:$USER version*

``` version versiondate ``` Are owned by root. Solved by issuing `sudo chown $USER:$USER version*`
Leah Rowe commented 2 years ago
Owner

I don't see the problem. I just freshly cloned the repository, on 2 different systems, and simply ran:

./build

This is enough to run that script automatically.

The version file does not exist by default, in the build system. It is generated every time you run the build system. In releases, it is left alone, and in the Git repository, it is always updated automatically (so that on new commits, the version automatically updates).

Anyway, I can't reproduce your issue.

I don't see the problem. I just freshly cloned the repository, on 2 different systems, and simply ran: ./build This is enough to run that script automatically. The `version` file does not exist by default, in the build system. It is generated every time you run the build system. In releases, it is left alone, and in the Git repository, it is always updated automatically (so that on new commits, the version automatically updates). Anyway, I can't reproduce your issue.
Leah Rowe commented 2 years ago
Owner

Were you using the build system while logged in as root, and then afterwards decided to run it as a regular user?

If that's the case, I'd just go nuclear and do:

chown -R $USER:$USER lbmk/*
Were you using the build system while logged in as root, and then afterwards decided to run it as a regular user? If that's the case, I'd just go nuclear and do: chown -R $USER:$USER lbmk/*
Ghost commented 2 years ago
Poster

The only commands run as a superuser were for dependency installation, per the documentation:

sudo make install-dependencies-ubuntu
sudo ./build dependencies ubuntu2004
The only commands run as a superuser were for dependency installation, per the documentation: * https://libreboot.org/docs/build/ * https://libreboot.org/docs/gnulinux/grub_cbfs.html ``` sudo make install-dependencies-ubuntu sudo ./build dependencies ubuntu2004 ```
Ghost commented 2 years ago
Poster

The build script sources ./resources/scripts/misc/versioncheck, which runs:

printf "%s\n" "${version}" > version
...
printf "%s\n" "${versiondate}" > versiondate

When installing dependencies, this is performed as root.

The `build` script sources `./resources/scripts/misc/versioncheck`, which runs: ``` printf "%s\n" "${version}" > version ... printf "%s\n" "${versiondate}" > versiondate ``` When installing dependencies, this is performed as root.
Leah Rowe commented 2 years ago
Owner

ah!

nice catch. i'll fix this now

ah! nice catch. i'll fix this now
Leah Rowe commented 2 years ago
Owner

Thanks, I fixed it now. Just nuke the version/versiondate files before you use the build system again, or change ownership to your normal user (using chmod).

This patch fixes it, so please now pull the latest changes in your local git clone. See:

5573dcd103

Thanks, I fixed it now. Just nuke the version/versiondate files before you use the build system again, or change ownership to your normal user (using chmod). This patch fixes it, so please now pull the latest changes in your local git clone. See: <https://notabug.org/libreboot/lbmk/commit/5573dcd1030f976b05c491355e60f8e26e0b2321>
Ghost commented 2 years ago
Poster

Cheers!

Cheers!
Leah Rowe commented 2 years ago
Owner

You're very welcome

You're very welcome
Sign in to join this conversation.
No Label
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.