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

Fix bad use of "ln -sf" #986

Merged

Conversation

fizbin
Copy link
Contributor

@fizbin fizbin commented Nov 26, 2023

Description

Changes an ln -sf into separate rm -f and ln -s commands, because ln -sf doesn't do what's expected if the destination is already a link to a directory.

Fixes #985 (Incorrect ln -sf in startup script means that ARM can't restart if ~arm/Music is on a CIFS/Samba share)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Changed arm_user_files_setup.sh as in this PR, and ARM then restarted smoothly. Without this change, and with a docker -v option that maps /home/arm/Music to a samba share, restarting ARM after running it and shutting it down won't work. (see bug description)

Please also list any relevant details for your test configuration

  • Docker
  • Other (Please state here)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • [N/A] I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have tested that my fix is effective or that my feature works

Changelog:

Include the details of changes made here

  • Change 1: split ln -sf into rm -f and ln -s

Logs

Attach logs from successful test runs here

Copy link

sonarcloud bot commented Nov 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@microtechno9000 microtechno9000 merged commit 1019e69 into automatic-ripping-machine:main Dec 4, 2023
10 of 11 checks passed
@DArtagan
Copy link

Wait a second, I think this fix makes two assumptions:

  1. That you're using a folder named with capital Music, but the scripts/docker/start_arm_container.sh uses lowercase music. In the original issue, it appears the poster is using a custom start_arm_container.sh script?
  2. That you have a symlink where lowercase /home/arm/music is.

The result of these assumptions is that if you are using the default script from this repo, and placing your folders as the docs instruct, then this line will attempt to delete your music folder and replace it with a symlink to a folder that doesn't exist. I say this, because it just happened to me with a fresh setup.

rm: cannot remove '/home/arm/music': Is a directory 

@DArtagan
Copy link

Correction / addendum / now I'm even more confused:

While the default scripts/docker/start_arm_container.sh does use a lowercase music, the default arm_user_files_setup.sh uses uppercase Music during its mkdir/chown phase.

It looks like a capitalization change was made to start_arm_container.sh ~7 months ago in #874.

truecharts-admin added a commit to truecharts/charts that referenced this pull request Jan 21, 2024
…-ripping-machine to v2.6.69@c364433 by renovate (#17405)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[automaticrippingmachine/automatic-ripping-machine](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine)
| patch | `2.6.67` -> `2.6.69` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>automatic-ripping-machine/automatic-ripping-machine
(automaticrippingmachine/automatic-ripping-machine)</summary>

###
[`v2.6.69`](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/releases/tag/2.6.69)

[Compare
Source](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/compare/2.6.67...2.6.69)

#### What's Changed

- Add configurable URL for notifications by
[@&#8203;anthonylavado](https://togithub.com/anthonylavado) in
[automatic-ripping-machine/automatic-ripping-machine#972
- Bugfix for Music Rips Title issue on initial Job start Issue
[#&#8203;866](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/issues/866)
by [@&#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#980
- Update README-OMDBAPI.md by
[@&#8203;MNTech68](https://togithub.com/MNTech68) in
[automatic-ripping-machine/automatic-ripping-machine#981
- Make the installation/how-to/contributing links longer and easier to
click by [@&#8203;charmarkk](https://togithub.com/charmarkk) in
[automatic-ripping-machine/automatic-ripping-machine#994
- Allow disabling auto-ejects by
[@&#8203;marcusds](https://togithub.com/marcusds) in
[automatic-ripping-machine/automatic-ripping-machine#991
- Fix bad use of "ln -sf" by
[@&#8203;fizbin](https://togithub.com/fizbin) in
[automatic-ripping-machine/automatic-ripping-machine#986
- Images Fix for Reverse Proxy by
[@&#8203;Jarlotee](https://togithub.com/Jarlotee) in
[automatic-ripping-machine/automatic-ripping-machine#997
- Bump tj-actions/branch-names from 7 to 8 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1005
- Bump actions/stale from 8 to 9 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1004
- Bump actions/setup-python from 4 to 5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1002
- Bump docker/metadata-action from 5.0.0 to 5.3.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#998
- Bump github/codeql-action from 2 to 3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1011
- Fixes for when musicbrainz returns a cdstub by
[@&#8203;fizbin](https://togithub.com/fizbin) in
[automatic-ripping-machine/automatic-ripping-machine#990
- bugfix for issue
[#&#8203;1026](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/issues/1026)
- typo in docker-setup.sh by
[@&#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#1027
- Bump docker/metadata-action from 5.3.0 to 5.4.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1016
- Update greetings.yml by
[@&#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#999
- fix: use job.title to show meaningful music notifications by
[@&#8203;chronicrebellion](https://togithub.com/chronicrebellion) in
[automatic-ripping-machine/automatic-ripping-machine#1033
- Improve cover art retrieval / prevent errors by
[@&#8203;chronicrebellion](https://togithub.com/chronicrebellion) in
[automatic-ripping-machine/automatic-ripping-machine#1035
- Bump docker/metadata-action from 5.4.0 to 5.5.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1032
- 933 dvd might have a label containing a / by
[@&#8203;1337-server](https://togithub.com/1337-server) in
[automatic-ripping-machine/automatic-ripping-machine#1041

#### New Contributors

- [@&#8203;MNTech68](https://togithub.com/MNTech68) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#981
- [@&#8203;charmarkk](https://togithub.com/charmarkk) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#994
- [@&#8203;marcusds](https://togithub.com/marcusds) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#991
- [@&#8203;fizbin](https://togithub.com/fizbin) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#986
- [@&#8203;Jarlotee](https://togithub.com/Jarlotee) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#997
- [@&#8203;chronicrebellion](https://togithub.com/chronicrebellion) made
their first contribution in
[automatic-ripping-machine/automatic-ripping-machine#1033

**Full Changelog**:
automatic-ripping-machine/automatic-ripping-machine@2.6.67...2.6.69

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 10pm on monday" in timezone
Europe/Amsterdam, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNDAuMTYiLCJ1cGRhdGVkSW5WZXIiOiIzNy4xNDAuMTYiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIifQ==-->
discretizer pushed a commit to discretizer/charts that referenced this pull request Jan 29, 2024
…-ripping-machine to v2.6.69@c364433 by renovate (truecharts#17405)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[automaticrippingmachine/automatic-ripping-machine](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine)
| patch | `2.6.67` -> `2.6.69` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>automatic-ripping-machine/automatic-ripping-machine
(automaticrippingmachine/automatic-ripping-machine)</summary>

###
[`v2.6.69`](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/releases/tag/2.6.69)

[Compare
Source](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/compare/2.6.67...2.6.69)

#### What's Changed

- Add configurable URL for notifications by
[@&truecharts#8203;anthonylavado](https://togithub.com/anthonylavado) in
[automatic-ripping-machine/automatic-ripping-machine#972
- Bugfix for Music Rips Title issue on initial Job start Issue
[#&truecharts#8203;866](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/issues/866)
by [@&truecharts#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#980
- Update README-OMDBAPI.md by
[@&truecharts#8203;MNTech68](https://togithub.com/MNTech68) in
[automatic-ripping-machine/automatic-ripping-machine#981
- Make the installation/how-to/contributing links longer and easier to
click by [@&truecharts#8203;charmarkk](https://togithub.com/charmarkk) in
[automatic-ripping-machine/automatic-ripping-machine#994
- Allow disabling auto-ejects by
[@&truecharts#8203;marcusds](https://togithub.com/marcusds) in
[automatic-ripping-machine/automatic-ripping-machine#991
- Fix bad use of "ln -sf" by
[@&truecharts#8203;fizbin](https://togithub.com/fizbin) in
[automatic-ripping-machine/automatic-ripping-machine#986
- Images Fix for Reverse Proxy by
[@&truecharts#8203;Jarlotee](https://togithub.com/Jarlotee) in
[automatic-ripping-machine/automatic-ripping-machine#997
- Bump tj-actions/branch-names from 7 to 8 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1005
- Bump actions/stale from 8 to 9 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1004
- Bump actions/setup-python from 4 to 5 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1002
- Bump docker/metadata-action from 5.0.0 to 5.3.0 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#998
- Bump github/codeql-action from 2 to 3 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1011
- Fixes for when musicbrainz returns a cdstub by
[@&truecharts#8203;fizbin](https://togithub.com/fizbin) in
[automatic-ripping-machine/automatic-ripping-machine#990
- bugfix for issue
[#&truecharts#8203;1026](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/issues/1026)
- typo in docker-setup.sh by
[@&truecharts#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#1027
- Bump docker/metadata-action from 5.3.0 to 5.4.0 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1016
- Update greetings.yml by
[@&truecharts#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#999
- fix: use job.title to show meaningful music notifications by
[@&truecharts#8203;chronicrebellion](https://togithub.com/chronicrebellion) in
[automatic-ripping-machine/automatic-ripping-machine#1033
- Improve cover art retrieval / prevent errors by
[@&truecharts#8203;chronicrebellion](https://togithub.com/chronicrebellion) in
[automatic-ripping-machine/automatic-ripping-machine#1035
- Bump docker/metadata-action from 5.4.0 to 5.5.0 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1032
- 933 dvd might have a label containing a / by
[@&truecharts#8203;1337-server](https://togithub.com/1337-server) in
[automatic-ripping-machine/automatic-ripping-machine#1041

#### New Contributors

- [@&truecharts#8203;MNTech68](https://togithub.com/MNTech68) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#981
- [@&truecharts#8203;charmarkk](https://togithub.com/charmarkk) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#994
- [@&truecharts#8203;marcusds](https://togithub.com/marcusds) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#991
- [@&truecharts#8203;fizbin](https://togithub.com/fizbin) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#986
- [@&truecharts#8203;Jarlotee](https://togithub.com/Jarlotee) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#997
- [@&truecharts#8203;chronicrebellion](https://togithub.com/chronicrebellion) made
their first contribution in
[automatic-ripping-machine/automatic-ripping-machine#1033

**Full Changelog**:
automatic-ripping-machine/automatic-ripping-machine@2.6.67...2.6.69

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 10pm on monday" in timezone
Europe/Amsterdam, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNDAuMTYiLCJ1cGRhdGVkSW5WZXIiOiIzNy4xNDAuMTYiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIifQ==-->
GabrielBarzen pushed a commit to GabrielBarzen/charts that referenced this pull request Feb 2, 2024
…-ripping-machine to v2.6.69@c364433 by renovate (truecharts#17405)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[automaticrippingmachine/automatic-ripping-machine](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine)
| patch | `2.6.67` -> `2.6.69` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>automatic-ripping-machine/automatic-ripping-machine
(automaticrippingmachine/automatic-ripping-machine)</summary>

###
[`v2.6.69`](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/releases/tag/2.6.69)

[Compare
Source](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/compare/2.6.67...2.6.69)

#### What's Changed

- Add configurable URL for notifications by
[@&truecharts#8203;anthonylavado](https://togithub.com/anthonylavado) in
[automatic-ripping-machine/automatic-ripping-machine#972
- Bugfix for Music Rips Title issue on initial Job start Issue
[#&truecharts#8203;866](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/issues/866)
by [@&truecharts#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#980
- Update README-OMDBAPI.md by
[@&truecharts#8203;MNTech68](https://togithub.com/MNTech68) in
[automatic-ripping-machine/automatic-ripping-machine#981
- Make the installation/how-to/contributing links longer and easier to
click by [@&truecharts#8203;charmarkk](https://togithub.com/charmarkk) in
[automatic-ripping-machine/automatic-ripping-machine#994
- Allow disabling auto-ejects by
[@&truecharts#8203;marcusds](https://togithub.com/marcusds) in
[automatic-ripping-machine/automatic-ripping-machine#991
- Fix bad use of "ln -sf" by
[@&truecharts#8203;fizbin](https://togithub.com/fizbin) in
[automatic-ripping-machine/automatic-ripping-machine#986
- Images Fix for Reverse Proxy by
[@&truecharts#8203;Jarlotee](https://togithub.com/Jarlotee) in
[automatic-ripping-machine/automatic-ripping-machine#997
- Bump tj-actions/branch-names from 7 to 8 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1005
- Bump actions/stale from 8 to 9 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1004
- Bump actions/setup-python from 4 to 5 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1002
- Bump docker/metadata-action from 5.0.0 to 5.3.0 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#998
- Bump github/codeql-action from 2 to 3 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1011
- Fixes for when musicbrainz returns a cdstub by
[@&truecharts#8203;fizbin](https://togithub.com/fizbin) in
[automatic-ripping-machine/automatic-ripping-machine#990
- bugfix for issue
[#&truecharts#8203;1026](https://togithub.com/automatic-ripping-machine/automatic-ripping-machine/issues/1026)
- typo in docker-setup.sh by
[@&truecharts#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#1027
- Bump docker/metadata-action from 5.3.0 to 5.4.0 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1016
- Update greetings.yml by
[@&truecharts#8203;microtechno9000](https://togithub.com/microtechno9000) in
[automatic-ripping-machine/automatic-ripping-machine#999
- fix: use job.title to show meaningful music notifications by
[@&truecharts#8203;chronicrebellion](https://togithub.com/chronicrebellion) in
[automatic-ripping-machine/automatic-ripping-machine#1033
- Improve cover art retrieval / prevent errors by
[@&truecharts#8203;chronicrebellion](https://togithub.com/chronicrebellion) in
[automatic-ripping-machine/automatic-ripping-machine#1035
- Bump docker/metadata-action from 5.4.0 to 5.5.0 by
[@&truecharts#8203;dependabot](https://togithub.com/dependabot) in
[automatic-ripping-machine/automatic-ripping-machine#1032
- 933 dvd might have a label containing a / by
[@&truecharts#8203;1337-server](https://togithub.com/1337-server) in
[automatic-ripping-machine/automatic-ripping-machine#1041

#### New Contributors

- [@&truecharts#8203;MNTech68](https://togithub.com/MNTech68) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#981
- [@&truecharts#8203;charmarkk](https://togithub.com/charmarkk) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#994
- [@&truecharts#8203;marcusds](https://togithub.com/marcusds) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#991
- [@&truecharts#8203;fizbin](https://togithub.com/fizbin) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#986
- [@&truecharts#8203;Jarlotee](https://togithub.com/Jarlotee) made their first
contribution in
[automatic-ripping-machine/automatic-ripping-machine#997
- [@&truecharts#8203;chronicrebellion](https://togithub.com/chronicrebellion) made
their first contribution in
[automatic-ripping-machine/automatic-ripping-machine#1033

**Full Changelog**:
automatic-ripping-machine/automatic-ripping-machine@2.6.67...2.6.69

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 10pm on monday" in timezone
Europe/Amsterdam, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNDAuMTYiLCJ1cGRhdGVkSW5WZXIiOiIzNy4xNDAuMTYiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIifQ==-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Incorrect ln -sf in startup script means that ARM can't restart if ~arm/Music is on a CIFS/Samba share
3 participants