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

user/lxc: update to 6.0.3 and fix lxc-create template scripts #3376

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BarryLhm
Copy link
Contributor

Checklist

Before this pull request is reviewed, certain conditions must be met.

The following must be true for all changes:

The following must be true for template/package changes:

  • I have read Packaging.md
  • I have built and tested my changes on my machine

The following must be true for new package submissions:

  • I will take responsibility for my template and keep it up to date

@BarryLhm
Copy link
Contributor Author

Closes #3374

@q66
Copy link
Member

q66 commented Dec 31, 2024

you don't need gsed, the problem is that -i requires an argument, so changing sed -i '...' to sed -i '' '...' should be enough

@BarryLhm
Copy link
Contributor Author

BarryLhm commented Jan 1, 2025

@q66 the sed patterns are also incompatible with bsd sed, but I don't know how to fix it.
using gsed is a temporary solution.

@q66
Copy link
Member

q66 commented Jan 1, 2025

the getopt switch is okay, nothing else you can really do

@BarryLhm
Copy link
Contributor Author

BarryLhm commented Jan 1, 2025

sed: 1: "d}
": extra characters at the end of d command

@BarryLhm BarryLhm changed the title user/lxc: fix lxc-create template scripts user/lxc: update to 6.0.3 and fix lxc-create template scripts Jan 1, 2025
@JamiKettunen
Copy link
Contributor

JamiKettunen commented Jan 1, 2025

the patterns are (or should be anyway, specify the exact command which doesn't work if not) compatible with FreeBSD sed, literally just replace -i with -i '' and it'll work at the cost of making them incompatible with gsed (not that this matters to us)

@BarryLhm
Copy link
Contributor Author

BarryLhm commented Jan 1, 2025

or should be anyway, specify the exact command which doesn't

source/templates/lxc-download.in
(generates /usr/share/lxc/templates/lxc-download)
in line 416, 419:
sed -i '' -e "/lxc.net.0/{w ${LXC_PATH}/config-network" -e "d}" "${LXC_PATH}/config"
sed -i '' -e "/lxc./{w ${LXC_PATH}/config-auto" -e "d}" "${LXC_PATH}/config"

still don't work

@q66
Copy link
Member

q66 commented Jan 4, 2025

indeed, specifically the 'd}' is problematic (without the 'd' it works, but then it does not delete the lines from the original file)

i'm not sure if there is a standard equivalent, i need to look into it

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.

3 participants